1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

36 Commits

Author SHA1 Message Date
George Marshall
35ae06d824
Adding Box component in TS to component-library (#19363)
* Adding TS version of Box to component-library

* Updates to types and comments
2023-06-08 11:12:16 -07:00
George Marshall
9d38e537fc
Adding Modal and updating ModalContent component (#19020) 2023-05-19 13:20:15 -07:00
Garrett Bear
2326195324
Add DS Popover component (#18805)
* Add DS Popover component

* Update to Popover story

* make role a prop with PopoverRole enum

* update to Hiro design changes

* fix snapshot

* Update ui/components/component-library/popover/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/popover/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* small story changes and removal of unused forwardRef

* add more test coverage

* add more story demos

* add more popover demos

* if escKeyClose is passed then it will add event listener

* isPortal story

* add if statement

* replace Text with Box for now

* add esc test coverage

* add README docs

* fix readme and onEscKeyClose

* onEscKeyClose to onPressEscKey

* Update ui/components/component-library/popover/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* change conditional on useEffect

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-05-19 11:49:53 -07:00
George Marshall
32688c2e3c
Adding ModalFocus component (#18979) 2023-05-09 14:33:29 -07:00
Hakeemullah J. Yousufzai
1f0c0d041c
Update Button prop name type to variant (#18774)
* Update Button prop name type to variant

* fix: lint errors on running test cases

* change remaining files

* change typo: BUTTON_VARIANTS to BUTTON_VARIANT

* fix: button.test.js lint errors

* update: button instances & import in remaing files

* fix: prettier warnings

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2023-04-26 11:17:25 -05:00
George Marshall
6a78592af6
Adding ModalHeader component and updating PopoverHeader stories (#18311) 2023-04-25 14:27:54 -07:00
Garrett Bear
4e1a96b4ef
Feat/18308/ds popover header component (#18489)
* add popover component

popperjs init

popperjs hook init

popper arrow styles

fix popover story

add popover positions constant

story testing

popover structure

popper placement

make forwardref

fix popover with TS updates

modifiers

createPortal

add useClickAway hook

newer popover component build

simplifed popperjs with toggle to show/hide

toggle popover

modal version

popover progress 65%

add hover functionality

hide folder

storybook demo

add close button props

working popover with arrow

title prop breaking

popover TS conversion

TS updates

update test

add test

add arrow test

add stories

remove unused hook

fix docs

add popoverheader

types fix

Fix typo: detetcted-tokens-link -> detected-tokens-link (#18408)

Typography to text (#18382)

* Typography to text

* Update README.md

* Update README.md

* minor changes in custom file

* minor change

* Resolved Conflict issues

---------

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

fix: Pass correct optimism chain id to gas estimation (#18478)

removes unnecessary images (#18484)

Fix firsttimeloaded logic (#18344)

* use session storage, instead of chrome.runtime.onStartup and globalThis, for firstTimeLoaded architecture

* Ensure account tracker accounts remain defined upon service worker restart

* lint fix

* Simplify code

* Only call browser.storage.session in mv3

* Only call browser.storage.session.set after resetStates in mv3

* fix metamask controller reset states unit tests

* fix test

* fix test

* Actually fix tests

* lint fix

[FLASK] More Snaps E2E Optimization and Delay Reductions (#18245)

* bip32 delay reduction

* asserts changed to waitFors in 32/44

* scrollTo change

* replaced delay for firefox flake

* more reduced delays

* more delay reductions and changes

* raise paralellism to 4 for snaps tests

* additional delay changes

* fixed update code

* removed comment

* removed another comment

Fix switch-ethereum-chain handler by passing configuration id to setA… (#18483)

* Fix switch-ethereum-chain handler by passing configuration id to setActiveNetwork

* fix e2e test

* Fix e2e tests

* Update test/e2e/tests/switch-custom-network.spec.js

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

* Revert "Update test/e2e/tests/switch-custom-network.spec.js"

This reverts commit be533ff7f25e1fd42e951d9b817b8438035ae256.

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>

Bumping notification id's to 18 & 19 (#18460)

* Popover header update with TS ButtonIcon

* update PopoverHeader types

* update using new Text enums

* readme fix

* direct file import

* remove forwardRef and add action argtypes

* remove console.logs

* add arg types and fix TS on HeaderBase

* george nits

* popover header snapshot update

---------

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-19 10:36:01 -07:00
Garrett Bear
065c499753
update ButtonIcon to TS (#18448)
* update ButtonIcon to TS

lint updates

fix lint issues

add ref

fix as prop

test updates

* box and icon updates for support

* Update ui/components/component-library/text-field/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* fix disabled

* update types for as

* update readme

* fix storybook

* george changes to button icon

* revert headerbase

* box prop back to HTMLElementTagNameMap

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
2023-04-12 08:55:24 -07:00
George Marshall
739075662c
Migrating Icon to typescript and deprecating JS component (#18431)
* Migrating Icon to typescript and deprecating JS component

* gw suggestions (#18434)

---------

Co-authored-by: Garrett Bear <gwhisten@gmail.com>
2023-04-04 09:48:04 -07:00
Garrett Bear
01057f9824
convert text component to TS (#18329)
* convert text component to TS

* invisible character fix

* storybook fix

* fix types export

* update ButtonBase

* add typeof to objects in TextProps

* fix linting issues

* fix implicit conversion

* lint fix

* add deprecated Text back

* change box ref to any

* fix classnames issue

* account details to use deprecated text reference

* ref update

* make RefObject

* remove RefObject and go back to Ref

* react.ref change to box
2023-04-03 10:42:37 -07:00
Garrett Bear
ed5b78d61b
Feat/add header base component (#18043)
* add header base component

* fix resizing issue

* add center

* add demo

* header base using flexbox

* fix button issue

* header base clean up

* update tests

* add readme description

* add docs

* update snapshot

* add more to readme

* convert to TS

* fix file name

* fix types and colors

* fix classname error

* fix boxprops import

* fix boxprops

* prop fix

* fix errors

* Update ui/components/component-library/header-base/header-base.stories.tsx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/header-base/header-base.types.ts

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/header-base/header-base.types.ts

Co-authored-by: George Marshall <george.marshall@consensys.net>

* headerbase fixes

* fix export

* remove Math.max

* change order for index on storybook to prep build

* revert back to order

* remove type from export

* add type to export

* change export of headerbase function

* export update

* revert back to normal

* add type to export

* Removing interface export from index

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-23 08:24:23 -07:00
George Marshall
99bdf8458c
Adding ModalOverlay component (#18161) 2023-03-23 06:36:09 -07:00
George Marshall
68f928c8a2
Adding ModalContent component (#18175)
* Adding ModalContent component

* Using different component api for ref

* use imperative handle

* Updating size

* Updating stories and docs as well as component api

* Fixing import
2023-03-22 17:17:19 -07:00
George Marshall
5d5fa242c3
Updating AvatarAccount objects to enums (#17727)
* Updating object to enums

* lint fix

* Improving test coverage

* Updating filename to .types.ts
2023-03-10 12:12:55 -08:00
Garrett Bear
2c2505be06
add banner-tip component (#17814)
* add banner-tip component

* set fixed width

* add banner tip props to logo

* fix logo type naming

* update test

* reduce png sizes

* upate type name and add image element test

* updates

* Update ui/components/component-library/banner-tip/banner-tip.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* update BannerTip

* fix text case banner tip

---------

Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-03-08 13:27:24 -08:00
George Marshall
ed519d8b60
Updating AvatarWithBage to BadgeWrapper (#17851) 2023-03-08 13:18:55 -08:00
HowardBraham
694773f17a
Upgrading the Import Account modal (#17763)
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
Co-authored-by: NidhiKJha <nidhi.kumari@consensys.net>
Co-authored-by: montelaidev <monte.lai@consensys.net>
2023-03-06 09:48:28 -08:00
George Marshall
527387bbfe
Adding Input component and updating TextFieldBase (#17664)
* Adding Input component and updating TextField

* Exporting from index, removing as prop and updating snapshot
2023-02-21 10:35:28 -08:00
George Marshall
f6ee35b6e3
Updating TextField component (#17732)
* Removing TextFieldBase and updating TextField and TextFieldSearch

* Removing autoFocus from MDX so it's not annoying
2023-02-15 15:43:51 -08:00
George Marshall
e269790ff4
Removing TEXT_VARIANTS in favour of TextVariant (#17674) 2023-02-09 16:09:33 -08:00
Garrett Bear
fd53de6af5
Update BannerAlert component (#17586)
* update button alert component

* update test

* rename Banner to BannerAlert

* remove old banner snapshot

* fix banner alert border left
2023-02-07 09:32:35 -08:00
Garrett Bear
ed75dabe57
Feat/15086/add banner severities component (#17307)
* add banner component

* update banner styles and tests

* fix padding and update snapshot

* banner stories id removal

* update readme

* Update ui/components/component-library/banner/banner.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/banner/README.mdx

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/component-library/banner/README.mdx

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* banner updates

Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2023-01-25 10:39:49 -08:00
Garrett Bear
1265731344
Feat/16637/button housekeeping (#16872)
* button housekeeping

* add iconsearch

* fix description

* readme update

* update disabled classnames

* buttonlink disabled class

* add disabled proptypes

* add constant exports

* update disabled style classes

* update snapshot for box pill classname

* add buttonTextProps

* update primarybutton background color to use box props

* update button secondary and link to use box props

* update tests
2023-01-13 13:58:09 -08:00
Garrett Bear
01c0d7823d
Feat/15085/banner base component (#16828)
* add banner base component

banner base wip

remove base avatar

banner base

* add banner base

* Update ui/components/component-library/banner-base/banner-base.stories.js

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/component-library/banner-base/banner-base.js

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* named export org fix

* Update ui/components/component-library/banner-base/README.mdx

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* updated changes to banner base

* banner base updates

* fix description/children

* move banner base down

* Update ui/components/component-library/banner-base/README.mdx

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/component-library/banner-base/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/banner-base/banner-base.js

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>

* Update ui/components/component-library/banner-base/banner-base.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/banner-base/banner-base.test.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/banner-base/banner-base.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* fix linting

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2023-01-11 09:42:18 -08:00
Nidhi Kumari
6e900fb0e3
housekeeping for Avatar Favicon (#16931)
* housekeeping for avatar favicon

* added test for custom className

* fixed lint errors

* updated avatar favicon in tag url

* updated import

* updated readme and fixed label

* updated tag url snapshot

* updated snapshot for favicon
2023-01-11 21:41:06 +05:30
Nidhi Kumari
56a3afaace
avatar account housekeeping (#16930)
* avatar account housekeeping

* avatar number to the diametere

* fixed lint errors

* converting blockie to number

* updated README

* updated constants for avatar account
2023-01-09 16:38:43 -08:00
Nidhi Kumari
f8881a01db
AvatarWithBadge Housekeeping (#16985)
* updated classnames

* updated readme and tests for avatar with badge

* updated constants in root

* replacing BADGE_POSITIONS with AVATAR_WITH_BADGE_BADGE_POSITIONS
2022-12-22 00:36:40 +05:30
Garrett Bear
4ba081a096
add text directions (#16901)
* add text directions

* add text direction test

Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net>
2022-12-15 10:49:47 -08:00
Nidhi Kumari
4fcbaae32f
housekeeping for avatar network (#16663)
* added housekeeping for avatar network

* fixed alt

* updated story in Readme

* fixed indentation and added network src

* updated SIZES for avatar network

* updated snapshot

* updated docs and props

* updated name of avatar

* removed comments

* updated avatar network component

* updated readme

* updated story for badge

* added constants to the root
2022-12-15 22:58:42 +05:30
Garrett Bear
c9560b75f2
add avatar icon component (#16755)
* add avatar icon component

* add avatar icon severities

* avatar icon docs

* update tests and remove stylesheet

* aria label

* remove aria label

* update test

* remove aria label

* iconName prop type string

* Update ui/components/component-library/avatar-icon/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/avatar-icon/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/avatar-icon/avatar-icon.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/component-library/avatar-icon/avatar-icon.stories.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* marginSizeControlOptions

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-12-08 10:25:19 -08:00
Garrett Bear
6689f8b71d
Feat/16634/buttonicon housekeeping (#16666)
* rename iconName prop

* pixel update

* updates to iconProps

* arialabel to stories
2022-12-01 09:26:31 -08:00
Garrett Bear
1007930078
Feat/16187/text housekeeping (#16589)
* text housekeeping

* update testing

* Text constant

* TEXT const to story

* format text sizes

* add associated constants to text component

* add all exports to global index.js

* update snapshot

* update text component variants

* Update ui/components/component-library/text/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* update rearrangements

* update text in tests

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-12-01 09:26:19 -08:00
George Marshall
ab808b670a
Icon house keeping updates (#16621) 2022-11-23 09:58:43 -08:00
Nidhi Kumari
67bfd446fc
avatar base component housekeeping (#16583)
* replace base avatar with avatar base component

* updated tests

* updated description for props

* updated docs and background colors

* updated snapshot

* replaced size with avatar size constant

* added tests and fixed indentation

* fixed indentation in readme
2022-11-23 22:12:43 +05:30
George Marshall
5ee7da6afe
Adding FormTextField component (#16497)
* Adding FormTextField component

* Adding to index.js

* Adding id, label and helptext stories

* Removing unneeded htmlFor and fixing accessibility on helpText story

* Fixing issues with review suggestions

* Fixing lint issue

* Adding snapshot test
2022-11-22 13:04:27 -08:00
George Marshall
23b412c13f
Component library adding global index and other housekeeping (#16441)
* Adding global index.js file

* Removing style prop from button base

* Fixing comment on generate-icon-names.js file

* Re-ordering sass imports to atomic structure

* Updating component paths code examples of MDX docs
2022-11-16 14:15:08 -08:00