@transferwise/components 46.130.3 → 46.131.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/flowNavigation/FlowNavigation.js +4 -2
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +4 -2
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/main.css +27004 -7
- package/build/styles/css/accordion.css +255 -0
- package/build/styles/css/alerts.css +751 -0
- package/build/styles/css/background.css +20 -0
- package/build/styles/css/badge.css +90 -0
- package/build/styles/css/border-radius.css +3 -0
- package/build/styles/css/breadcrumbs.css +20 -0
- package/build/styles/css/button-groups.css +495 -0
- package/build/styles/css/buttons.css +1390 -0
- package/build/styles/css/chevron.css +35 -0
- package/build/styles/css/circles.css +248 -0
- package/build/styles/css/close.css +47 -0
- package/build/styles/css/column-layout.css +164 -0
- package/build/styles/css/currency-flags.css +46 -0
- package/build/styles/css/decision.css +136 -0
- package/build/styles/css/dropdowns.css +472 -0
- package/build/styles/css/droppable.css +221 -0
- package/build/styles/css/flex.css +598 -0
- package/build/styles/css/footer.css +129 -0
- package/build/styles/css/grid.css +2369 -0
- package/build/styles/css/input-groups.css +2740 -0
- package/build/styles/css/link-callout.css +20 -0
- package/build/styles/css/list-group.css +350 -0
- package/build/styles/css/loaders.css +76 -0
- package/build/styles/css/media.css +74 -0
- package/build/styles/css/modals.css +185 -0
- package/build/styles/css/navbar.css +2406 -0
- package/build/styles/css/navs.css +296 -0
- package/build/styles/css/neptune-social-media.css +144 -0
- package/build/styles/css/neptune.css +25724 -0
- package/build/styles/css/panels.css +528 -0
- package/build/styles/css/popovers.css +661 -0
- package/build/styles/css/process.css +483 -0
- package/build/styles/css/progress-bars.css +64 -0
- package/build/styles/css/ring.css +55 -0
- package/build/styles/css/select.css +99 -0
- package/build/styles/css/sequences.css +855 -0
- package/build/styles/css/table.css +446 -0
- package/build/styles/css/tick.css +32 -0
- package/build/styles/css/tooltip.css +160 -0
- package/build/styles/css/utilities.css +145 -0
- package/build/styles/css/wells.css +74 -0
- package/build/styles/fonts/TW-Averta-Bold.woff +0 -0
- package/build/styles/fonts/TW-Averta-Bold.woff2 +0 -0
- package/build/styles/fonts/TW-Averta-Regular.woff +0 -0
- package/build/styles/fonts/TW-Averta-Regular.woff2 +0 -0
- package/build/styles/fonts/TW-Averta-Semibold.woff +0 -0
- package/build/styles/fonts/TW-Averta-Semibold.woff2 +0 -0
- package/build/styles/fonts/TransferWise-IconFont.svg +81 -0
- package/build/styles/fonts/TransferWise-IconFont.woff +0 -0
- package/build/styles/fonts/WiseSans-Heavy.woff2 +0 -0
- package/build/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
- package/build/styles/img/bg-dark.svg +31 -0
- package/build/styles/img/bg-light.svg +26 -0
- package/build/styles/less/legacy-variables.css +0 -0
- package/build/styles/less/legacy-variables.less +1299 -0
- package/build/styles/less/neptune-tokens.css +0 -0
- package/build/styles/less/neptune-tokens.less +275 -0
- package/build/styles/less/zindex.css +0 -0
- package/build/styles/less/zindex.less +17 -0
- package/build/styles/main.css +27004 -7
- package/build/styles/props/custom-media.css +11 -0
- package/build/styles/props/legacy-custom-props.css +69 -0
- package/build/styles/props/neptune-tokens.css +152 -0
- package/build/styles/styles/less/accordion.css +255 -0
- package/build/styles/styles/less/alerts.css +751 -0
- package/build/styles/styles/less/background.css +20 -0
- package/build/styles/styles/less/badge.css +90 -0
- package/build/styles/styles/less/border-radius.css +3 -0
- package/build/styles/styles/less/breadcrumbs.css +20 -0
- package/build/styles/styles/less/button-groups.css +495 -0
- package/build/styles/styles/less/buttons.css +1390 -0
- package/build/styles/styles/less/chevron.css +35 -0
- package/build/styles/styles/less/circles.css +248 -0
- package/build/styles/styles/less/close.css +47 -0
- package/build/styles/styles/less/column-layout.css +164 -0
- package/build/styles/styles/less/core/viewport-themes.css +59 -0
- package/build/styles/styles/less/currency-flags.css +46 -0
- package/build/styles/styles/less/decision.css +136 -0
- package/build/styles/styles/less/dropdowns.css +472 -0
- package/build/styles/styles/less/droppable.css +221 -0
- package/build/styles/styles/less/flex.css +598 -0
- package/build/styles/styles/less/footer.css +129 -0
- package/build/styles/styles/less/forms/bootstrap-forms.css +2277 -0
- package/build/styles/styles/less/forms/checkbox-radio.css +367 -0
- package/build/styles/styles/less/grid.css +2369 -0
- package/build/styles/styles/less/input-groups.css +2740 -0
- package/build/styles/styles/less/link-callout.css +20 -0
- package/build/styles/styles/less/list-group.css +350 -0
- package/build/styles/styles/less/loaders.css +76 -0
- package/build/styles/styles/less/media.css +74 -0
- package/build/styles/styles/less/modals.css +185 -0
- package/build/styles/styles/less/navbar.css +2406 -0
- package/build/styles/styles/less/navs.css +296 -0
- package/build/styles/styles/less/neptune-social-media.css +144 -0
- package/build/styles/styles/less/neptune.css +25724 -0
- package/build/styles/styles/less/panels.css +528 -0
- package/build/styles/styles/less/popovers.css +661 -0
- package/build/styles/styles/less/process.css +483 -0
- package/build/styles/styles/less/progress-bars.css +64 -0
- package/build/styles/styles/less/ring.css +55 -0
- package/build/styles/styles/less/select.css +99 -0
- package/build/styles/styles/less/sequences.css +855 -0
- package/build/styles/styles/less/table.css +446 -0
- package/build/styles/styles/less/tick.css +32 -0
- package/build/styles/styles/less/tooltip.css +160 -0
- package/build/styles/styles/less/utilities.css +145 -0
- package/build/styles/styles/less/wells.css +74 -0
- package/build/styles/styles/props/custom-media.css +11 -0
- package/build/styles/styles/props/legacy-custom-props.css +69 -0
- package/build/styles/styles/props/neptune-tokens.css +11 -0
- package/build/styles/styles/variables/legacy-variables.css +0 -0
- package/build/styles/styles/variables/neptune-tokens.css +0 -0
- package/build/styles/styles/variables/zindex.css +0 -0
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/package.json +8 -4
- package/src/{DisabledComponents.story.tsx → DisabledComponents.test.story.tsx} +1 -1
- package/src/accordion/Accordion.less +3 -3
- package/src/actionButton/ActionButton.less +1 -1
- package/src/actionButton/ActionButton.story.tsx +11 -7
- package/src/actionButton/ActionButton.test.story.tsx +49 -0
- package/src/avatar/Avatar.less +3 -3
- package/src/avatarLayout/AvatarLayout.story.tsx +1 -105
- package/src/avatarLayout/AvatarLayout.test.story.tsx +117 -0
- package/src/avatarView/AvatarView.story.tsx +1 -104
- package/src/avatarView/AvatarView.test.story.tsx +114 -0
- package/src/badge/Badge.less +1 -1
- package/src/button/LegacyButton.less +1 -1
- package/src/button/LegacyButton.story.tsx +1 -26
- package/src/button/LegacyButton.test.story.tsx +37 -0
- package/src/button/_stories/Button.story.tsx +17 -41
- package/src/button/_stories/Button.test.story.tsx +30 -0
- package/src/card/Card.less +3 -3
- package/src/checkbox/Checkbox.story.tsx +1 -6
- package/src/checkbox/Checkbox.test.story.tsx +33 -0
- package/src/checkboxButton/CheckboxButton.less +2 -2
- package/src/chips/Chip.less +3 -3
- package/src/circularButton/CircularButton.story.tsx +0 -6
- package/src/circularButton/CircularButton.test.story.tsx +62 -1
- package/src/common/Option/Option.less +2 -2
- package/src/common/bottomSheet/BottomSheet.less +1 -1
- package/src/common/bottomSheet/BottomSheet.story.tsx +0 -55
- package/src/common/bottomSheet/BottomSheet.test.story.tsx +118 -2
- package/src/common/closeButton/CloseButton.less +1 -1
- package/src/common/panel/Panel.less +1 -1
- package/src/criticalBanner/CriticalCommsBanner.test.story.tsx +1 -1
- package/src/dateLookup/DateLookup.less +1 -1
- package/src/dateLookup/DateLookup.story.tsx +0 -18
- package/src/dateLookup/DateLookup.test.story.tsx +51 -1
- package/src/dateLookup/dateTrigger/DateTrigger.less +2 -2
- package/src/decision/Decision.less +1 -1
- package/src/definitionList/DefinitionList.less +1 -1
- package/src/dimmer/Dimmer.less +2 -2
- package/src/divider/Divider.story.tsx +0 -1
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.autofocus.docs.mdx +1 -1
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +0 -9
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.test.story.tsx +23 -0
- package/src/field/Field.story.tsx +1 -34
- package/src/field/Field.test.story.tsx +56 -0
- package/src/flowNavigation/FlowNavigation.less +1 -1
- package/src/flowNavigation/FlowNavigation.test.js +7 -0
- package/src/flowNavigation/FlowNavigation.tsx +5 -2
- package/src/flowNavigation/animatedLabel/AnimatedLabel.less +2 -2
- package/src/header/Header.test.story.tsx +1 -1
- package/src/info/Info.less +1 -1
- package/src/info/Info.story.tsx +1 -34
- package/src/info/Info.test.story.tsx +53 -0
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +0 -12
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.test.story.tsx +33 -0
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.less +1 -1
- package/src/inputs/SelectInput/Options/SelectInputOptions.less +1 -1
- package/src/inputs/SelectInput/SelectInput.less +1 -1
- package/src/inputs/_common.less +1 -1
- package/src/legacylistItem/LegacyListItem.test.story.tsx +1 -1
- package/src/link/Link.less +2 -2
- package/src/listItem/ListItem.less +1 -1
- package/src/listItem/_stories/Breakpoints/ListItem.noMedia.test.story.tsx +1 -1
- package/src/listItem/_stories/Breakpoints/ListItem.sideMedia.test.story.tsx +1 -1
- package/src/listItem/_stories/Breakpoints/ListItem.stackedMedia.test.story.tsx +1 -1
- package/src/listItem/_stories/ListItem.focus.test.story.tsx +1 -1
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.brightGreen.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.dark.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.forestGreen.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.medium.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.neutral.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.personal.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.rtl.test.story.tsx +1 -1
- package/src/listItem/_stories/variants/ListItem.small.test.story.tsx +1 -1
- package/src/logo/Logo.story.tsx +0 -6
- package/src/logo/Logo.test.story.tsx +20 -0
- package/src/main.css +27004 -7
- package/src/main.less +2 -0
- package/src/modal/Modal.story.tsx +0 -26
- package/src/modal/Modal.test.story.tsx +125 -0
- package/src/moneyInput/MoneyInput.less +2 -2
- package/src/moneyInput/MoneyInput.test.story.tsx +1 -1
- package/src/navigationOption/NavigationOption.less +3 -3
- package/src/navigationOptionsList/NavigationOptionsList.less +1 -1
- package/src/overlayHeader/OverlayHeader.less +1 -1
- package/src/phoneNumberInput/PhoneNumberInput.less +1 -1
- package/src/popover/Popover.less +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.story.tsx +0 -43
- package/src/prompt/ActionPrompt/ActionPrompt.test.story.tsx +45 -1
- package/src/radioGroup/RadioGroup.test.story.tsx +1 -1
- package/src/select/Select.less +5 -5
- package/src/slidingPanel/SlidingPanel.less +2 -2
- package/src/snackbar/Snackbar.less +3 -3
- package/src/stepper/Stepper.less +3 -3
- package/src/stepper/Stepper.test.story.tsx +1 -1
- package/src/styles/fonts/TW-Averta-Bold.woff +0 -0
- package/src/styles/fonts/TW-Averta-Bold.woff2 +0 -0
- package/src/styles/fonts/TW-Averta-Regular.woff +0 -0
- package/src/styles/fonts/TW-Averta-Regular.woff2 +0 -0
- package/src/styles/fonts/TW-Averta-Semibold.woff +0 -0
- package/src/styles/fonts/TW-Averta-Semibold.woff2 +0 -0
- package/src/styles/fonts/TransferWise-IconFont.svg +81 -0
- package/src/styles/fonts/TransferWise-IconFont.woff +0 -0
- package/src/styles/fonts/WiseSans-Heavy.woff2 +0 -0
- package/src/styles/fonts/inter-cyrillic-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-cyrillic-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-greek-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-greek-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-latin-ext-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-latin-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/fonts/inter-vietnamese-variable-wghtOnly-normal.woff2 +0 -0
- package/src/styles/img/bg-dark.svg +31 -0
- package/src/styles/img/bg-light.svg +26 -0
- package/src/styles/less/accordion.css +255 -0
- package/src/styles/less/accordion.less +15 -0
- package/src/styles/less/addons/_background-utilities.less +82 -0
- package/src/styles/less/addons/_border.less +3 -0
- package/src/styles/less/addons/_display-utilities.less +159 -0
- package/src/styles/less/addons/_spacing-utilities.less +73 -0
- package/src/styles/less/addons/_utilities.less +147 -0
- package/src/styles/less/alerts.css +751 -0
- package/src/styles/less/alerts.less +252 -0
- package/src/styles/less/background.css +20 -0
- package/src/styles/less/background.less +24 -0
- package/src/styles/less/badge.css +90 -0
- package/src/styles/less/badge.less +85 -0
- package/src/styles/less/border-radius.css +3 -0
- package/src/styles/less/border-radius.less +3 -0
- package/src/styles/less/breadcrumbs.css +20 -0
- package/src/styles/less/breadcrumbs.less +27 -0
- package/src/styles/less/button-groups.css +495 -0
- package/src/styles/less/button-groups.less +424 -0
- package/src/styles/less/buttons.css +1390 -0
- package/src/styles/less/buttons.less +738 -0
- package/src/styles/less/chevron.css +35 -0
- package/src/styles/less/chevron.less +39 -0
- package/src/styles/less/circles.css +248 -0
- package/src/styles/less/circles.less +233 -0
- package/src/styles/less/close.css +47 -0
- package/src/styles/less/close.less +48 -0
- package/src/styles/less/column-layout.css +164 -0
- package/src/styles/less/column-layout.less +167 -0
- package/src/styles/less/components/_component-animations.less +43 -0
- package/src/styles/less/core/_fonts.less +97 -0
- package/src/styles/less/core/_scaffolding.less +380 -0
- package/src/styles/less/core/_typography-utilities.less +255 -0
- package/src/styles/less/core/_typography.less +575 -0
- package/src/styles/less/core/viewport-themes.css +59 -0
- package/src/styles/less/core/viewport-themes.less +65 -0
- package/src/styles/less/currency-flags.css +46 -0
- package/src/styles/less/currency-flags.less +42 -0
- package/src/styles/less/decision.css +136 -0
- package/src/styles/less/decision.less +98 -0
- package/src/styles/less/dropdowns.css +472 -0
- package/src/styles/less/dropdowns.less +365 -0
- package/src/styles/less/droppable.css +221 -0
- package/src/styles/less/droppable.less +213 -0
- package/src/styles/less/flex.css +598 -0
- package/src/styles/less/flex.less +113 -0
- package/src/styles/less/footer.css +129 -0
- package/src/styles/less/footer.less +113 -0
- package/src/styles/less/forms/bootstrap-forms.css +2277 -0
- package/src/styles/less/forms/bootstrap-forms.less +1218 -0
- package/src/styles/less/forms/checkbox-radio.css +367 -0
- package/src/styles/less/forms/checkbox-radio.less +330 -0
- package/src/styles/less/grid.css +2369 -0
- package/src/styles/less/grid.less +187 -0
- package/src/styles/less/input-groups.css +2740 -0
- package/src/styles/less/input-groups.less +298 -0
- package/src/styles/less/link-callout.css +20 -0
- package/src/styles/less/link-callout.less +17 -0
- package/src/styles/less/list-group.css +350 -0
- package/src/styles/less/list-group.less +260 -0
- package/src/styles/less/loaders.css +76 -0
- package/src/styles/less/loaders.less +91 -0
- package/src/styles/less/media.css +74 -0
- package/src/styles/less/media.less +68 -0
- package/src/styles/less/mixins/_alerts.less +39 -0
- package/src/styles/less/mixins/_arrows.less +52 -0
- package/src/styles/less/mixins/_border-radius.less +11 -0
- package/src/styles/less/mixins/_buttons.less +82 -0
- package/src/styles/less/mixins/_center-block.less +7 -0
- package/src/styles/less/mixins/_clearfix.less +23 -0
- package/src/styles/less/mixins/_flex.less +105 -0
- package/src/styles/less/mixins/_forms.less +130 -0
- package/src/styles/less/mixins/_grid-framework.less +104 -0
- package/src/styles/less/mixins/_grid.less +158 -0
- package/src/styles/less/mixins/_hide-text.less +20 -0
- package/src/styles/less/mixins/_links.less +7 -0
- package/src/styles/less/mixins/_list-group.less +23 -0
- package/src/styles/less/mixins/_logical-properties-IE-friendly.less +381 -0
- package/src/styles/less/mixins/_logical-properties-modern-browsers.less +226 -0
- package/src/styles/less/mixins/_logical-properties.less +5 -0
- package/src/styles/less/mixins/_nav-divider.less +10 -0
- package/src/styles/less/mixins/_nav-vertical-align.less +10 -0
- package/src/styles/less/mixins/_panels.less +23 -0
- package/src/styles/less/mixins/_physical-properties.less +110 -0
- package/src/styles/less/mixins/_reset-text.less +22 -0
- package/src/styles/less/mixins/_sequence.less +203 -0
- package/src/styles/less/mixins/_spacing.less +122 -0
- package/src/styles/less/mixins/_tab-focus.less +5 -0
- package/src/styles/less/mixins/_table-row.less +47 -0
- package/src/styles/less/mixins/_text-emphasis.less +39 -0
- package/src/styles/less/mixins/_text-overflow.less +8 -0
- package/src/styles/less/mixins/_theming.less +7 -0
- package/src/styles/less/modals.css +185 -0
- package/src/styles/less/modals.less +239 -0
- package/src/styles/less/navbar.css +2406 -0
- package/src/styles/less/navbar.less +1442 -0
- package/src/styles/less/navs.css +296 -0
- package/src/styles/less/navs.less +339 -0
- package/src/styles/less/neptune-social-media.css +144 -0
- package/src/styles/less/neptune-social-media.less +84 -0
- package/src/styles/less/neptune.bundle.less +63 -0
- package/src/styles/less/neptune.css +25724 -0
- package/src/styles/less/panels.css +528 -0
- package/src/styles/less/panels.less +410 -0
- package/src/styles/less/popovers.css +661 -0
- package/src/styles/less/popovers.less +379 -0
- package/src/styles/less/process.css +483 -0
- package/src/styles/less/process.less +426 -0
- package/src/styles/less/progress-bars.css +64 -0
- package/src/styles/less/progress-bars.less +55 -0
- package/src/styles/less/ring.css +55 -0
- package/src/styles/less/ring.less +51 -0
- package/src/styles/less/select.css +99 -0
- package/src/styles/less/select.less +88 -0
- package/src/styles/less/sequences.css +855 -0
- package/src/styles/less/sequences.less +511 -0
- package/src/styles/less/table.css +446 -0
- package/src/styles/less/table.less +385 -0
- package/src/styles/less/tick.css +32 -0
- package/src/styles/less/tick.less +37 -0
- package/src/styles/less/tooltip.css +160 -0
- package/src/styles/less/tooltip.less +130 -0
- package/src/styles/less/utilities.css +145 -0
- package/src/styles/less/utilities.less +153 -0
- package/src/styles/less/wells.css +74 -0
- package/src/styles/less/wells.less +37 -0
- package/src/styles/props/custom-media.css +11 -0
- package/src/styles/props/legacy-custom-props.css +69 -0
- package/src/styles/props/neptune-tokens.css +11 -0
- package/src/styles/variables/legacy-variables.css +0 -0
- package/src/styles/variables/legacy-variables.less +1299 -0
- package/src/styles/variables/neptune-tokens.css +0 -0
- package/src/styles/variables/neptune-tokens.less +12 -0
- package/src/styles/variables/zindex.css +0 -0
- package/src/styles/variables/zindex.less +17 -0
- package/src/summary/Summary.less +1 -1
- package/src/summary/Summary.test.story.tsx +1 -1
- package/src/switch/Switch.less +4 -4
- package/src/table/Table.less +1 -1
- package/src/tabs/Tabs.less +4 -4
- package/src/tile/Tile.less +1 -1
- package/src/tooltip/Tooltip.less +1 -1
- package/src/tooltip/Tooltip.story.tsx +0 -21
- package/src/tooltip/Tooltip.test.story.tsx +42 -0
- package/src/typeahead/Typeahead.less +2 -2
- package/src/typeahead/Typeahead.story.tsx +0 -52
- package/src/typeahead/Typeahead.test.story.tsx +73 -0
- package/src/typeahead/typeaheadOption/TypeaheadOption.less +1 -1
- package/src/upload/Upload.less +1 -1
- package/src/uploadInput/UploadInput.less +2 -2
- package/src/uploadInput/uploadItem/UploadItem.less +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import AvatarLayout from '.';
|
|
3
|
+
import { Freeze, Plane } from '@transferwise/icons';
|
|
4
|
+
import { Flag } from '@wise/art';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof AvatarLayout> = {
|
|
7
|
+
component: AvatarLayout,
|
|
8
|
+
tags: ['!autodocs', '!manifest'],
|
|
9
|
+
title: 'Content/AvatarLayout/Tests',
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj<typeof AvatarLayout>;
|
|
14
|
+
|
|
15
|
+
export const EdgeInstances: Story = {
|
|
16
|
+
render: () => (
|
|
17
|
+
<div
|
|
18
|
+
style={{
|
|
19
|
+
gap: '1em',
|
|
20
|
+
display: 'grid',
|
|
21
|
+
justifyContent: 'space-between',
|
|
22
|
+
gridTemplate: `auto auto / repeat(2, min-content)`,
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
<AvatarLayout orientation="diagonal" avatars={[]} />
|
|
26
|
+
|
|
27
|
+
<AvatarLayout orientation="diagonal" avatars={[{}]} />
|
|
28
|
+
|
|
29
|
+
<AvatarLayout orientation="diagonal" avatars={[{ profileName: 'Jay Jay' }]} />
|
|
30
|
+
<AvatarLayout orientation="diagonal" size={16} avatars={[{ profileName: 'Jay Jay' }]} />
|
|
31
|
+
|
|
32
|
+
<AvatarLayout orientation="diagonal" avatars={[{ asset: <Flag code="gb" /> }]} />
|
|
33
|
+
<AvatarLayout orientation="diagonal" size={24} avatars={[{ asset: <Flag code="gb" /> }]} />
|
|
34
|
+
|
|
35
|
+
<AvatarLayout
|
|
36
|
+
orientation="diagonal"
|
|
37
|
+
avatars={[{ asset: <Flag code="gb" /> }, { asset: <Flag code="jp" /> }]}
|
|
38
|
+
/>
|
|
39
|
+
|
|
40
|
+
<AvatarLayout
|
|
41
|
+
orientation="horizontal"
|
|
42
|
+
interactive
|
|
43
|
+
avatars={[
|
|
44
|
+
{ imgSrc: '../avatar-squere-dude.webp' },
|
|
45
|
+
{ asset: null, style: { border: '1px dashed var(--color-border-neutral)' } },
|
|
46
|
+
]}
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
<AvatarLayout
|
|
50
|
+
orientation="horizontal"
|
|
51
|
+
interactive
|
|
52
|
+
avatars={[
|
|
53
|
+
{ imgSrc: '../avatar-square-dude.webp' },
|
|
54
|
+
{
|
|
55
|
+
asset: <Plane />,
|
|
56
|
+
style: { backgroundColor: 'var(--color-bright-pink)' },
|
|
57
|
+
},
|
|
58
|
+
]}
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
<AvatarLayout
|
|
62
|
+
orientation="horizontal"
|
|
63
|
+
interactive
|
|
64
|
+
avatars={[
|
|
65
|
+
{
|
|
66
|
+
asset: <Freeze />,
|
|
67
|
+
style: { color: 'rgb(22, 51, 0)', backgroundColor: 'rgb(203, 217, 195)' },
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
asset: <Freeze />,
|
|
71
|
+
style: { color: 'rgb(203, 217, 195)', backgroundColor: 'rgb(22, 51, 0)' },
|
|
72
|
+
},
|
|
73
|
+
]}
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<AvatarLayout
|
|
77
|
+
orientation="horizontal"
|
|
78
|
+
interactive
|
|
79
|
+
avatars={[
|
|
80
|
+
{ asset: <Flag code="gb" /> },
|
|
81
|
+
{ asset: '3+', style: { border: '1px dashed var(--color-border-neutral)' } },
|
|
82
|
+
]}
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
<AvatarLayout
|
|
86
|
+
orientation="horizontal"
|
|
87
|
+
avatars={[{ imgSrc: '../avatar-rectangle-fox.webp' }, { profileName: 'Jay Jay' }]}
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
<AvatarLayout
|
|
91
|
+
interactive
|
|
92
|
+
orientation="horizontal"
|
|
93
|
+
avatars={[
|
|
94
|
+
{ imgSrc: '../avatar-rectangle-fox.webp' },
|
|
95
|
+
{ imgSrc: '../avatar-square-dude.webp' },
|
|
96
|
+
{ asset: '7+' },
|
|
97
|
+
]}
|
|
98
|
+
/>
|
|
99
|
+
|
|
100
|
+
<AvatarLayout
|
|
101
|
+
interactive
|
|
102
|
+
orientation="horizontal"
|
|
103
|
+
avatars={[{ asset: <Flag code="gb" /> }, { asset: <Flag code="br" /> }, { asset: '3+' }]}
|
|
104
|
+
/>
|
|
105
|
+
|
|
106
|
+
<AvatarLayout
|
|
107
|
+
orientation="horizontal"
|
|
108
|
+
avatars={[
|
|
109
|
+
{ asset: <Flag code="gb" /> },
|
|
110
|
+
{ asset: <Flag code="br" /> },
|
|
111
|
+
{ asset: <Flag code="jp" /> },
|
|
112
|
+
{ asset: '3+' },
|
|
113
|
+
]}
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
),
|
|
117
|
+
};
|
|
@@ -5,25 +5,19 @@ import {
|
|
|
5
5
|
Convert,
|
|
6
6
|
FastFlag,
|
|
7
7
|
Freeze,
|
|
8
|
-
Graph,
|
|
9
|
-
Money,
|
|
10
8
|
Leaf,
|
|
11
9
|
Plane,
|
|
12
|
-
PlusCircle,
|
|
13
10
|
QrCode,
|
|
14
|
-
Rewards,
|
|
15
11
|
Target,
|
|
16
12
|
Team,
|
|
17
13
|
Transport,
|
|
18
14
|
Wallet,
|
|
19
15
|
Water,
|
|
20
16
|
Bank,
|
|
21
|
-
GiftBox,
|
|
22
17
|
} from '@transferwise/icons';
|
|
23
18
|
import AvatarView, { AvatarViewProps } from '.';
|
|
24
19
|
import { Flag } from '@wise/art';
|
|
25
|
-
import {
|
|
26
|
-
import Display from '../display';
|
|
20
|
+
import { ProfileType } from '../common';
|
|
27
21
|
import Body from '../body';
|
|
28
22
|
import SentimentSurface from '../sentimentSurface';
|
|
29
23
|
|
|
@@ -490,100 +484,3 @@ export const SentimentAwareness: Story = {
|
|
|
490
484
|
},
|
|
491
485
|
decorators: [withComponentGrid],
|
|
492
486
|
};
|
|
493
|
-
|
|
494
|
-
export const ProfileBrokenImageFallback: Story = {
|
|
495
|
-
parameters: {
|
|
496
|
-
chromatic: {
|
|
497
|
-
delay: 5000,
|
|
498
|
-
},
|
|
499
|
-
},
|
|
500
|
-
render: () => {
|
|
501
|
-
const assetUrl = 'https://test.com/img-wrong-url.test';
|
|
502
|
-
return (
|
|
503
|
-
<>
|
|
504
|
-
<AvatarView />
|
|
505
|
-
<AvatarView imgSrc={assetUrl} />
|
|
506
|
-
<AvatarView imgSrc={assetUrl} profileType={ProfileType.BUSINESS} />
|
|
507
|
-
<AvatarView imgSrc={assetUrl} profileType={ProfileType.BUSINESS} profileName="Test Name" />
|
|
508
|
-
</>
|
|
509
|
-
);
|
|
510
|
-
},
|
|
511
|
-
};
|
|
512
|
-
|
|
513
|
-
export const EdgeInstaces: Story = {
|
|
514
|
-
render: () => {
|
|
515
|
-
const css = `.custom-variant {
|
|
516
|
-
border: 1px dashed var(--color-border-neutral);
|
|
517
|
-
}`;
|
|
518
|
-
return (
|
|
519
|
-
<div
|
|
520
|
-
style={{
|
|
521
|
-
gap: '1em',
|
|
522
|
-
display: 'grid',
|
|
523
|
-
justifyContent: 'space-between',
|
|
524
|
-
gridTemplate: 'auto auto / repeat(2, min-content)',
|
|
525
|
-
}}
|
|
526
|
-
>
|
|
527
|
-
<style>{css}</style>
|
|
528
|
-
<AvatarView
|
|
529
|
-
interactive
|
|
530
|
-
badge={{ flagCode: 'EU' }}
|
|
531
|
-
style={{ backgroundColor: 'var(--color-bright-orange)' }}
|
|
532
|
-
>
|
|
533
|
-
<Money />
|
|
534
|
-
</AvatarView>
|
|
535
|
-
<AvatarView
|
|
536
|
-
badge={{ flagCode: 'EU' }}
|
|
537
|
-
style={{ backgroundColor: 'var(--color-bright-orange)', border: 'none' }}
|
|
538
|
-
>
|
|
539
|
-
<Money />
|
|
540
|
-
</AvatarView>
|
|
541
|
-
<AvatarView interactive className="custom-variant">
|
|
542
|
-
<PlusCircle />
|
|
543
|
-
</AvatarView>
|
|
544
|
-
<AvatarView interactive className="custom-variant">
|
|
545
|
-
{null}
|
|
546
|
-
</AvatarView>
|
|
547
|
-
<AvatarView style={{ color: 'rgb(22, 51, 0)', backgroundColor: 'rgb(203, 217, 195)' }}>
|
|
548
|
-
<Graph />
|
|
549
|
-
</AvatarView>
|
|
550
|
-
<AvatarView
|
|
551
|
-
interactive
|
|
552
|
-
style={{ color: 'rgb(22, 51, 0)', backgroundColor: 'rgb(203, 217, 195)' }}
|
|
553
|
-
>
|
|
554
|
-
<Graph />
|
|
555
|
-
</AvatarView>
|
|
556
|
-
<AvatarView style={{ color: 'rgb(203, 217, 195)', backgroundColor: 'rgb(22, 51, 0)' }}>
|
|
557
|
-
<Rewards />
|
|
558
|
-
</AvatarView>
|
|
559
|
-
<AvatarView
|
|
560
|
-
interactive
|
|
561
|
-
style={{ color: 'rgb(203, 217, 195)', backgroundColor: 'rgb(22, 51, 0)' }}
|
|
562
|
-
>
|
|
563
|
-
<Rewards />
|
|
564
|
-
</AvatarView>
|
|
565
|
-
<AvatarView
|
|
566
|
-
badge={{ flagCode: 'EU' }}
|
|
567
|
-
style={{ backgroundColor: getBrandColorFromSeed(profileName1) }}
|
|
568
|
-
>
|
|
569
|
-
<Display>{getInitials(profileName1)}</Display>
|
|
570
|
-
</AvatarView>
|
|
571
|
-
<AvatarView style={{ backgroundColor: getBrandColorFromSeed(profileName1) }}>
|
|
572
|
-
<Display>{getInitials(profileName1)}</Display>
|
|
573
|
-
</AvatarView>
|
|
574
|
-
<AvatarView interactive style={{ backgroundColor: getBrandColorFromSeed(profileName2) }}>
|
|
575
|
-
<Display>{getInitials(profileName1)}</Display>
|
|
576
|
-
</AvatarView>
|
|
577
|
-
<AvatarView
|
|
578
|
-
interactive
|
|
579
|
-
badge={{ flagCode: 'EU' }}
|
|
580
|
-
style={{ backgroundColor: getBrandColorFromSeed(profileName2) }}
|
|
581
|
-
>
|
|
582
|
-
<Display>{getInitials(profileName1)}</Display>
|
|
583
|
-
</AvatarView>
|
|
584
|
-
<AvatarView>9+</AvatarView>
|
|
585
|
-
<AvatarView interactive>5+</AvatarView>
|
|
586
|
-
</div>
|
|
587
|
-
);
|
|
588
|
-
},
|
|
589
|
-
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { Graph, Money, PlusCircle, Rewards } from '@transferwise/icons';
|
|
3
|
+
import AvatarView from '.';
|
|
4
|
+
import { getBrandColorFromSeed, getInitials, ProfileType } from '../common';
|
|
5
|
+
import Display from '../display';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof AvatarView> = {
|
|
8
|
+
component: AvatarView,
|
|
9
|
+
tags: ['!autodocs', '!manifest'],
|
|
10
|
+
title: 'Content/AvatarView/Tests',
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof AvatarView>;
|
|
15
|
+
|
|
16
|
+
const profileName1 = 'Wolter White';
|
|
17
|
+
const profileName2 = 'Tyler Durden';
|
|
18
|
+
|
|
19
|
+
export const EdgeInstances: Story = {
|
|
20
|
+
render: () => {
|
|
21
|
+
const css = `.custom-variant {
|
|
22
|
+
border: 1px dashed var(--color-border-neutral);
|
|
23
|
+
}`;
|
|
24
|
+
return (
|
|
25
|
+
<div
|
|
26
|
+
style={{
|
|
27
|
+
gap: '1em',
|
|
28
|
+
display: 'grid',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
gridTemplate: 'auto auto / repeat(2, min-content)',
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
<style>{css}</style>
|
|
34
|
+
<AvatarView
|
|
35
|
+
interactive
|
|
36
|
+
badge={{ flagCode: 'EU' }}
|
|
37
|
+
style={{ backgroundColor: 'var(--color-bright-orange)' }}
|
|
38
|
+
>
|
|
39
|
+
<Money />
|
|
40
|
+
</AvatarView>
|
|
41
|
+
<AvatarView
|
|
42
|
+
badge={{ flagCode: 'EU' }}
|
|
43
|
+
style={{ backgroundColor: 'var(--color-bright-orange)', border: 'none' }}
|
|
44
|
+
>
|
|
45
|
+
<Money />
|
|
46
|
+
</AvatarView>
|
|
47
|
+
<AvatarView interactive className="custom-variant">
|
|
48
|
+
<PlusCircle />
|
|
49
|
+
</AvatarView>
|
|
50
|
+
<AvatarView interactive className="custom-variant">
|
|
51
|
+
{null}
|
|
52
|
+
</AvatarView>
|
|
53
|
+
<AvatarView style={{ color: 'rgb(22, 51, 0)', backgroundColor: 'rgb(203, 217, 195)' }}>
|
|
54
|
+
<Graph />
|
|
55
|
+
</AvatarView>
|
|
56
|
+
<AvatarView
|
|
57
|
+
interactive
|
|
58
|
+
style={{ color: 'rgb(22, 51, 0)', backgroundColor: 'rgb(203, 217, 195)' }}
|
|
59
|
+
>
|
|
60
|
+
<Graph />
|
|
61
|
+
</AvatarView>
|
|
62
|
+
<AvatarView style={{ color: 'rgb(203, 217, 195)', backgroundColor: 'rgb(22, 51, 0)' }}>
|
|
63
|
+
<Rewards />
|
|
64
|
+
</AvatarView>
|
|
65
|
+
<AvatarView
|
|
66
|
+
interactive
|
|
67
|
+
style={{ color: 'rgb(203, 217, 195)', backgroundColor: 'rgb(22, 51, 0)' }}
|
|
68
|
+
>
|
|
69
|
+
<Rewards />
|
|
70
|
+
</AvatarView>
|
|
71
|
+
<AvatarView
|
|
72
|
+
badge={{ flagCode: 'EU' }}
|
|
73
|
+
style={{ backgroundColor: getBrandColorFromSeed(profileName1) }}
|
|
74
|
+
>
|
|
75
|
+
<Display>{getInitials(profileName1)}</Display>
|
|
76
|
+
</AvatarView>
|
|
77
|
+
<AvatarView style={{ backgroundColor: getBrandColorFromSeed(profileName1) }}>
|
|
78
|
+
<Display>{getInitials(profileName1)}</Display>
|
|
79
|
+
</AvatarView>
|
|
80
|
+
<AvatarView interactive style={{ backgroundColor: getBrandColorFromSeed(profileName2) }}>
|
|
81
|
+
<Display>{getInitials(profileName1)}</Display>
|
|
82
|
+
</AvatarView>
|
|
83
|
+
<AvatarView
|
|
84
|
+
interactive
|
|
85
|
+
badge={{ flagCode: 'EU' }}
|
|
86
|
+
style={{ backgroundColor: getBrandColorFromSeed(profileName2) }}
|
|
87
|
+
>
|
|
88
|
+
<Display>{getInitials(profileName1)}</Display>
|
|
89
|
+
</AvatarView>
|
|
90
|
+
<AvatarView>9+</AvatarView>
|
|
91
|
+
<AvatarView interactive>5+</AvatarView>
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const ProfileBrokenImageFallback: Story = {
|
|
98
|
+
parameters: {
|
|
99
|
+
chromatic: {
|
|
100
|
+
delay: 5000,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
render: () => {
|
|
104
|
+
const assetUrl = 'https://test.com/img-wrong-url.test';
|
|
105
|
+
return (
|
|
106
|
+
<>
|
|
107
|
+
<AvatarView />
|
|
108
|
+
<AvatarView imgSrc={assetUrl} />
|
|
109
|
+
<AvatarView imgSrc={assetUrl} profileType={ProfileType.BUSINESS} />
|
|
110
|
+
<AvatarView imgSrc={assetUrl} profileType={ProfileType.BUSINESS} profileName="Test Name" />
|
|
111
|
+
</>
|
|
112
|
+
);
|
|
113
|
+
},
|
|
114
|
+
};
|
package/src/badge/Badge.less
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import {
|
|
3
|
-
import { useState } from 'react';
|
|
2
|
+
import { fn } from 'storybook/test';
|
|
4
3
|
|
|
5
4
|
import Button from '.';
|
|
6
5
|
import LegacyButton from './LegacyButton';
|
|
@@ -170,30 +169,6 @@ export const Variants: Story = {
|
|
|
170
169
|
},
|
|
171
170
|
};
|
|
172
171
|
|
|
173
|
-
const wait = async (duration = 500) =>
|
|
174
|
-
new Promise<void>((resolve) => {
|
|
175
|
-
setTimeout(resolve, duration);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
export const Focused: Story = {
|
|
179
|
-
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
|
|
180
|
-
const canvas = within(canvasElement);
|
|
181
|
-
const button = canvas.getByRole('button');
|
|
182
|
-
await userEvent.tab();
|
|
183
|
-
await expect(button).toHaveFocus();
|
|
184
|
-
await expect(button).toHaveTextContent('Focused!');
|
|
185
|
-
},
|
|
186
|
-
render: function Render(args: React.ComponentProps<typeof Button>) {
|
|
187
|
-
const [focused, setFocused] = useState(false);
|
|
188
|
-
|
|
189
|
-
return (
|
|
190
|
-
<Button {...args} onFocus={() => setFocused(true)}>
|
|
191
|
-
{focused ? 'Focused!' : 'Button text'}
|
|
192
|
-
</Button>
|
|
193
|
-
);
|
|
194
|
-
},
|
|
195
|
-
};
|
|
196
|
-
|
|
197
172
|
export const SocialMedia: Story = {
|
|
198
173
|
render: () => {
|
|
199
174
|
return (
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { userEvent, within, expect } from 'storybook/test';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
|
|
5
|
+
import Button from '.';
|
|
6
|
+
import LegacyButton from './LegacyButton';
|
|
7
|
+
|
|
8
|
+
LegacyButton.displayName = 'Button';
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof LegacyButton> = {
|
|
11
|
+
component: LegacyButton,
|
|
12
|
+
title: 'Actions/Button/Legacy Button/Tests',
|
|
13
|
+
tags: ['!autodocs', '!manifest', 'deprecated'],
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default meta;
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof Button>;
|
|
19
|
+
|
|
20
|
+
export const Focused: Story = {
|
|
21
|
+
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
|
|
22
|
+
const canvas = within(canvasElement);
|
|
23
|
+
const button = canvas.getByRole('button');
|
|
24
|
+
await userEvent.tab();
|
|
25
|
+
await expect(button).toHaveFocus();
|
|
26
|
+
await expect(button).toHaveTextContent('Focused!');
|
|
27
|
+
},
|
|
28
|
+
render: function Render(args: React.ComponentProps<typeof Button>) {
|
|
29
|
+
const [focused, setFocused] = useState(false);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<Button {...args} onFocus={() => setFocused(true)}>
|
|
33
|
+
{focused ? 'Focused!' : 'Button text'}
|
|
34
|
+
</Button>
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -455,46 +455,36 @@ export const AsAnchor: StoryObj<PreviewStoryArgs> = {
|
|
|
455
455
|
},
|
|
456
456
|
};
|
|
457
457
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
return (
|
|
463
|
-
<Button {...props} {...previewProps}>
|
|
464
|
-
Disabled button
|
|
465
|
-
</Button>
|
|
466
|
-
);
|
|
467
|
-
},
|
|
468
|
-
argTypes: {
|
|
469
|
-
...hideControls(['block']),
|
|
470
|
-
...previewArgTypes,
|
|
471
|
-
},
|
|
472
|
-
args: {
|
|
473
|
-
disabled: true,
|
|
474
|
-
previewAddonStart: false,
|
|
475
|
-
previewAddonEnd: false,
|
|
476
|
-
},
|
|
477
|
-
};
|
|
478
|
-
|
|
479
|
-
export const Loading: StoryObj<PreviewStoryArgs> = {
|
|
458
|
+
/**
|
|
459
|
+
* Buttons can be in `disabled` or `loading` states to indicate they're not currently actionable.
|
|
460
|
+
*/
|
|
461
|
+
export const States: StoryObj<PreviewStoryArgs> = {
|
|
480
462
|
render: function Render(args: PreviewStoryArgs) {
|
|
481
463
|
const [props, previewProps] = getPropsForPreview(args);
|
|
482
464
|
|
|
483
465
|
return (
|
|
484
|
-
|
|
485
|
-
Button
|
|
486
|
-
|
|
466
|
+
<>
|
|
467
|
+
<Button {...props} {...previewProps} v2>
|
|
468
|
+
Default
|
|
469
|
+
</Button>
|
|
470
|
+
<Button {...props} {...previewProps} v2 disabled>
|
|
471
|
+
Disabled
|
|
472
|
+
</Button>
|
|
473
|
+
<Button {...props} {...previewProps} v2 loading>
|
|
474
|
+
Loading
|
|
475
|
+
</Button>
|
|
476
|
+
</>
|
|
487
477
|
);
|
|
488
478
|
},
|
|
489
479
|
argTypes: {
|
|
490
|
-
...hideControls(['block']),
|
|
480
|
+
...hideControls(['disabled', 'loading', 'block']),
|
|
491
481
|
...previewArgTypes,
|
|
492
482
|
},
|
|
493
483
|
args: {
|
|
494
|
-
loading: true,
|
|
495
484
|
previewAddonStart: false,
|
|
496
485
|
previewAddonEnd: false,
|
|
497
486
|
},
|
|
487
|
+
decorators: [withComponentGrid()],
|
|
498
488
|
};
|
|
499
489
|
|
|
500
490
|
/**
|
|
@@ -786,20 +776,6 @@ export const DealingWithLongText: StoryObj<PreviewStoryArgs> = {
|
|
|
786
776
|
},
|
|
787
777
|
};
|
|
788
778
|
|
|
789
|
-
export const AccessibilityAddons: Story = {
|
|
790
|
-
args: {
|
|
791
|
-
v2: true,
|
|
792
|
-
addonStart: {
|
|
793
|
-
type: 'avatar',
|
|
794
|
-
value: [{ asset: <Flag code="br" /> }, { asset: <Flag code="jp" /> }],
|
|
795
|
-
},
|
|
796
|
-
'aria-label': 'Convert Real to Yen',
|
|
797
|
-
children: 'Convert',
|
|
798
|
-
size: 'md',
|
|
799
|
-
},
|
|
800
|
-
tags: ['!autodocs', '!dev'],
|
|
801
|
-
};
|
|
802
|
-
|
|
803
779
|
/**
|
|
804
780
|
* `Button` is sentiment-aware and will automatically adjust its colours if wrapped inside
|
|
805
781
|
* the [SentimentSurface](?path=/docs/foundations-sentimentsurface--docs) component
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
import { ArrowRight, ChevronRight, Freeze } from '@transferwise/icons';
|
|
3
|
+
import { Flag } from '@wise/art';
|
|
3
4
|
import { expect, userEvent, within } from 'storybook/test';
|
|
4
5
|
import Button from '../Button.resolver';
|
|
5
6
|
import { ButtonPriority } from '../Button.types';
|
|
@@ -135,3 +136,32 @@ export const AllVariants: Story = {
|
|
|
135
136
|
</div>
|
|
136
137
|
),
|
|
137
138
|
};
|
|
139
|
+
|
|
140
|
+
export const Disabled: Story = {
|
|
141
|
+
args: {
|
|
142
|
+
v2: true,
|
|
143
|
+
disabled: true,
|
|
144
|
+
children: 'Disabled button',
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export const Loading: Story = {
|
|
149
|
+
args: {
|
|
150
|
+
v2: true,
|
|
151
|
+
loading: true,
|
|
152
|
+
children: 'Loading button',
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const AccessibilityAddons: Story = {
|
|
157
|
+
args: {
|
|
158
|
+
v2: true,
|
|
159
|
+
addonStart: {
|
|
160
|
+
type: 'avatar',
|
|
161
|
+
value: [{ asset: <Flag code="br" /> }, { asset: <Flag code="jp" /> }],
|
|
162
|
+
},
|
|
163
|
+
'aria-label': 'Convert Real to Yen',
|
|
164
|
+
children: 'Convert',
|
|
165
|
+
size: 'md',
|
|
166
|
+
},
|
|
167
|
+
};
|
package/src/card/Card.less
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@import (reference) "
|
|
2
|
-
@import (reference) "
|
|
3
|
-
@import (reference) "
|
|
1
|
+
@import (reference) "./../styles/less/mixins/_logical-properties.less";
|
|
2
|
+
@import (reference) "./../styles/less/mixins/_theming.less";
|
|
3
|
+
@import (reference) "./../styles/less/ring.less";
|
|
4
4
|
|
|
5
5
|
.np-card {
|
|
6
6
|
overflow: hidden;
|
|
@@ -2,10 +2,10 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { fn } from 'storybook/test';
|
|
3
3
|
|
|
4
4
|
import { Field } from '../field/Field';
|
|
5
|
-
import { lorem10 } from '../test-utils';
|
|
6
5
|
|
|
7
6
|
import Checkbox from './Checkbox';
|
|
8
7
|
import { withVariantConfig } from '../../.storybook/helpers';
|
|
8
|
+
import { lorem10 } from '../test-utils';
|
|
9
9
|
|
|
10
10
|
const meta: Meta<typeof Checkbox> = {
|
|
11
11
|
component: Checkbox,
|
|
@@ -36,11 +36,6 @@ export const Multiple: Story = {
|
|
|
36
36
|
...withVariantConfig(['default', 'dark', 'rtl']),
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export const MultipleMobile: Story = {
|
|
40
|
-
...Multiple,
|
|
41
|
-
...withVariantConfig(['default', 'dark', 'rtl', 'mobile'], Multiple),
|
|
42
|
-
};
|
|
43
|
-
|
|
44
39
|
export const WithinField = {
|
|
45
40
|
decorators: [
|
|
46
41
|
(Story) => (
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { fn } from 'storybook/test';
|
|
3
|
+
import { lorem10 } from '../test-utils';
|
|
4
|
+
import Checkbox from './Checkbox';
|
|
5
|
+
import { withVariantConfig } from '../../.storybook/helpers';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Checkbox> = {
|
|
8
|
+
component: Checkbox,
|
|
9
|
+
tags: ['!autodocs', '!manifest'],
|
|
10
|
+
title: 'Forms/Checkbox/Tests',
|
|
11
|
+
args: {
|
|
12
|
+
label: 'This is the label',
|
|
13
|
+
onChange: fn(),
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
|
|
18
|
+
type Story = StoryObj<typeof Checkbox>;
|
|
19
|
+
|
|
20
|
+
export const MultipleMobile: Story = {
|
|
21
|
+
render: (args) => {
|
|
22
|
+
return (
|
|
23
|
+
<>
|
|
24
|
+
<Checkbox {...args} />
|
|
25
|
+
<Checkbox {...args} checked />
|
|
26
|
+
<Checkbox {...args} label={lorem10} />
|
|
27
|
+
<Checkbox {...args} label={lorem10} secondary={lorem10} />
|
|
28
|
+
<Checkbox {...args} disabled />
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
},
|
|
32
|
+
...withVariantConfig(['default', 'dark', 'rtl', 'mobile']),
|
|
33
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@import (reference) "
|
|
2
|
-
@import (reference) "
|
|
1
|
+
@import (reference) "./../styles/variables/neptune-tokens.less";
|
|
2
|
+
@import (reference) "./../styles/less/mixins/_logical-properties.less";
|
|
3
3
|
|
|
4
4
|
.np-checkbox-button {
|
|
5
5
|
input[type="checkbox"] {
|
package/src/chips/Chip.less
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@import (reference) "
|
|
2
|
-
@import (reference) "
|
|
3
|
-
@import (reference) "
|
|
1
|
+
@import (reference) "./../styles/variables/neptune-tokens.less";
|
|
2
|
+
@import (reference) "./../styles/less/mixins/_logical-properties.less";
|
|
3
|
+
@import (reference) "./../styles/less/ring.less";
|
|
4
4
|
|
|
5
5
|
.np-chip {
|
|
6
6
|
background-color: transparent;
|
|
@@ -6,7 +6,6 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
|
6
6
|
import CircularButton from './CircularButton';
|
|
7
7
|
import Title from '../title';
|
|
8
8
|
import Body from '../body';
|
|
9
|
-
import { withVariantConfig } from '../../.storybook/helpers';
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
11
|
component: CircularButton,
|
|
@@ -86,8 +85,3 @@ export const All: Story = {
|
|
|
86
85
|
);
|
|
87
86
|
},
|
|
88
87
|
};
|
|
89
|
-
|
|
90
|
-
export const All400Zoom: Story = {
|
|
91
|
-
...All,
|
|
92
|
-
...withVariantConfig(['400%'], All),
|
|
93
|
-
};
|