@transferwise/components 0.0.0-experimental-4c97d70 → 0.0.0-experimental-a322f91
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/accordion/AccordionItem/AccordionItem.js +2 -1
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs +2 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/build/actionButton/ActionButton.js +2 -1
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs +2 -1
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js +2 -1
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs +2 -1
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js +2 -1
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +2 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js +2 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +2 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
- package/build/avatar/Avatar.js +2 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +2 -1
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarLayout/AvatarLayout.js +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +1 -1
- package/build/avatarView/AvatarView.js +2 -1
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs +2 -1
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +2 -1
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +2 -1
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +2 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +2 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/badge/BadgeAssets.js +2 -1
- package/build/badge/BadgeAssets.js.map +1 -1
- package/build/badge/BadgeAssets.mjs +2 -1
- package/build/badge/BadgeAssets.mjs.map +1 -1
- package/build/button/Button.js +2 -1
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +2 -1
- package/build/button/Button.mjs.map +1 -1
- package/build/button/LegacyButton.js +2 -1
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs +2 -1
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/button/classMap.js +2 -1
- package/build/button/classMap.js.map +1 -1
- package/build/button/classMap.mjs +2 -1
- package/build/button/classMap.mjs.map +1 -1
- package/build/button/legacyUtils/legacyUtils.js +2 -1
- package/build/button/legacyUtils/legacyUtils.js.map +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs +2 -1
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
- package/build/card/Card.js +2 -1
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs +2 -1
- package/build/card/Card.mjs.map +1 -1
- package/build/checkbox/Checkbox.js +2 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs +2 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/chevron/Chevron.js +2 -1
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chevron/Chevron.mjs +2 -1
- package/build/chevron/Chevron.mjs.map +1 -1
- package/build/chips/Chip.js +2 -1
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chip.mjs +2 -1
- package/build/chips/Chip.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +3 -2
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +3 -2
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +2 -2
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs +2 -2
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/circle/Circle.js +2 -2
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +2 -2
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/common/hooks/useLayout/useLayout.js +6 -6
- package/build/common/hooks/useLayout/useLayout.js.map +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs.map +1 -1
- package/build/common/hooks/useScreenSize.js.map +1 -1
- package/build/common/hooks/useScreenSize.mjs.map +1 -1
- package/build/common/locale/index.js +9 -4
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs +9 -4
- package/build/common/locale/index.mjs.map +1 -1
- package/build/common/panel/Panel.js +51 -55
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +56 -60
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js +2 -1
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs +2 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +2 -1
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +2 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js +2 -2
- package/build/dateInput/DateInput.mjs +2 -2
- package/build/dateLookup/DateLookup.js +3 -3
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +2 -2
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +2 -1
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +2 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +1 -1
- package/build/decision/Decision.js +4 -3
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs +2 -1
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js +2 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs +2 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/dimmer/Dimmer.js +2 -1
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs +2 -1
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/display/Display.js +2 -1
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs +2 -1
- package/build/display/Display.mjs.map +1 -1
- package/build/drawer/Drawer.js +2 -1
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +2 -1
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +5 -4
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +5 -4
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
- package/build/field/Field.js +6 -6
- package/build/field/Field.mjs +6 -6
- package/build/flowNavigation/FlowNavigation.js +4 -3
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +2 -1
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/header/Header.js +2 -1
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +2 -1
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/en.json +0 -2
- package/build/i18n/en.json.js +0 -2
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -2
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/image/Image.js +1 -1
- package/build/image/Image.mjs +1 -1
- package/build/index.js +2 -4
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -2
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +2 -1
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.mjs +2 -1
- package/build/info/Info.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js +2 -1
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs +2 -1
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/inputs/SearchInput.js +2 -1
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs +2 -1
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/inputs/SelectInput/SelectInput.js +2 -2
- package/build/inputs/SelectInput/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput/SelectInput.mjs +1 -1
- package/build/inputs/SelectInput/SelectInput.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +2 -1
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs +2 -1
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/link/Link.js +2 -1
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +2 -1
- package/build/link/Link.mjs.map +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +2 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +2 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -1
- package/build/listItem/ListItem.js +2 -1
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +2 -1
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +6 -6
- package/build/listItem/Prompt/ListItemPrompt.mjs +6 -6
- package/build/loader/Loader.js +2 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs +2 -1
- package/build/loader/Loader.mjs.map +1 -1
- package/build/logo/Logo.js +1 -1
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs +1 -1
- package/build/logo/Logo.mjs.map +1 -1
- package/build/main.css +351 -418
- package/build/markdown/Markdown.js +2 -1
- package/build/markdown/Markdown.js.map +1 -1
- package/build/markdown/Markdown.mjs +2 -1
- package/build/markdown/Markdown.mjs.map +1 -1
- package/build/modal/Modal.js +2 -1
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +2 -1
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +29 -13
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +31 -15
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/moneyInput/currencyFormatting.js +8 -2
- package/build/moneyInput/currencyFormatting.js.map +1 -1
- package/build/moneyInput/currencyFormatting.mjs +5 -4
- package/build/moneyInput/currencyFormatting.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js +2 -1
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs +2 -1
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/nudge/Nudge.js +2 -1
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +2 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/overlayHeader/OverlayHeader.js +2 -1
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.mjs +2 -1
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +2 -1
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +2 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/popover/Popover.js +2 -1
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs +2 -1
- package/build/popover/Popover.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js +2 -1
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs +2 -1
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/progressBar/ProgressBar.js +2 -1
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs +2 -1
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/promoCard/PromoCard.js +2 -1
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCard.mjs +2 -1
- package/build/promoCard/PromoCard.mjs.map +1 -1
- package/build/promoCard/PromoCardIndicator.js +2 -1
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +2 -1
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.js +43 -10
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +42 -9
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js +2 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +2 -1
- package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.js +2 -1
- package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs +2 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +0 -2
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +0 -2
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/provider/Provider.js +1 -1
- package/build/provider/Provider.mjs +1 -1
- package/build/radio/Radio.js +2 -1
- package/build/radio/Radio.js.map +1 -1
- package/build/radio/Radio.mjs +2 -1
- package/build/radio/Radio.mjs.map +1 -1
- package/build/segmentedControl/SegmentedControl.js +2 -1
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.mjs +2 -1
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/select/Select.js +3 -2
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +3 -2
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js +2 -1
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs +2 -1
- package/build/select/option/Option.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js +3 -2
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +3 -2
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js +2 -1
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +2 -1
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/sticky/Sticky.js +2 -1
- package/build/sticky/Sticky.js.map +1 -1
- package/build/sticky/Sticky.mjs +2 -1
- package/build/sticky/Sticky.mjs.map +1 -1
- package/build/styles/accordion/Accordion.css +1 -1
- package/build/styles/card/Card.css +2 -2
- package/build/styles/carousel/Carousel.css +5 -5
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/common/baseCard/BaseCard.css +1 -1
- package/build/styles/criticalBanner/CriticalCommsBanner.css +1 -1
- package/build/styles/css/accordion.css +4 -4
- package/build/styles/css/button-groups.css +6 -6
- package/build/styles/css/buttons.css +1 -1
- package/build/styles/css/circles.css +1 -1
- package/build/styles/css/column-layout.css +4 -4
- package/build/styles/css/decision.css +4 -4
- package/build/styles/css/dropdowns.css +10 -10
- package/build/styles/css/droppable.css +8 -8
- package/build/styles/css/flex.css +14 -14
- package/build/styles/css/footer.css +3 -3
- package/build/styles/css/grid.css +19 -19
- package/build/styles/css/input-groups.css +12 -12
- package/build/styles/css/list-group.css +8 -8
- package/build/styles/css/modals.css +3 -3
- package/build/styles/css/navbar.css +62 -62
- package/build/styles/css/navs.css +2 -2
- package/build/styles/css/neptune.css +280 -269
- package/build/styles/css/panels.css +9 -9
- package/build/styles/css/popovers.css +13 -13
- package/build/styles/css/select.css +1 -1
- package/build/styles/css/sequences.css +6 -6
- package/build/styles/css/table.css +6 -6
- package/build/styles/css/utilities.css +4 -4
- package/build/styles/css/wells.css +4 -4
- package/build/styles/dateInput/DateInput.css +1 -1
- package/build/styles/definitionList/DefinitionList.css +2 -2
- package/build/styles/drawer/Drawer.css +1 -1
- package/build/styles/inputs/Input.css +3 -3
- package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +2 -2
- package/build/styles/inputs/SelectInput/SelectInput.css +2 -2
- package/build/styles/inputs/TextArea.css +3 -3
- package/build/styles/less/legacy-variables.less +34 -47
- package/build/styles/less/neptune-tokens.less +5 -4
- package/build/styles/logo/Logo.css +2 -2
- package/build/styles/main.css +351 -418
- package/build/styles/modal/Modal.css +5 -5
- package/build/styles/popover/Popover.css +3 -3
- package/build/styles/promoCard/PromoCard.css +1 -1
- package/build/styles/prompt/ActionPrompt/ActionPrompt.css +1 -1
- package/build/styles/prompt/PrimitivePrompt/PrimitivePrompt.css +1 -1
- package/build/styles/props/custom-media.css +23 -11
- package/build/styles/props/neptune-tokens.css +3 -2
- package/build/styles/select/Select.css +2 -1
- package/build/styles/snackbar/Snackbar.css +2 -2
- package/build/styles/stepper/Stepper.css +2 -2
- package/build/styles/styles/less/accordion.css +4 -4
- package/build/styles/styles/less/button-groups.css +6 -6
- package/build/styles/styles/less/buttons.css +1 -1
- package/build/styles/styles/less/circles.css +1 -1
- package/build/styles/styles/less/column-layout.css +4 -4
- package/build/styles/styles/less/decision.css +4 -4
- package/build/styles/styles/less/dropdowns.css +10 -10
- package/build/styles/styles/less/droppable.css +8 -8
- package/build/styles/styles/less/flex.css +14 -14
- package/build/styles/styles/less/footer.css +3 -3
- package/build/styles/styles/less/forms/bootstrap-forms.css +9 -9
- package/build/styles/styles/less/grid.css +19 -19
- package/build/styles/styles/less/input-groups.css +12 -12
- package/build/styles/styles/less/list-group.css +8 -8
- package/build/styles/styles/less/modals.css +3 -3
- package/build/styles/styles/less/navbar.css +62 -62
- package/build/styles/styles/less/navs.css +2 -2
- package/build/styles/styles/less/neptune.css +280 -269
- package/build/styles/styles/less/panels.css +9 -9
- package/build/styles/styles/less/popovers.css +13 -13
- package/build/styles/styles/less/select.css +1 -1
- package/build/styles/styles/less/sequences.css +6 -6
- package/build/styles/styles/less/table.css +6 -6
- package/build/styles/styles/less/utilities.css +4 -4
- package/build/styles/styles/less/wells.css +4 -4
- package/build/styles/styles/props/custom-media.css +1 -11
- package/build/styles/table/Table.css +1 -1
- package/build/styles/tabs/Tabs.css +2 -2
- package/build/styles/typeahead/Typeahead.css +1 -1
- package/build/summary/Summary.js +2 -1
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.mjs +2 -1
- package/build/summary/Summary.mjs.map +1 -1
- package/build/table/Table.js +2 -1
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.mjs +2 -1
- package/build/table/Table.mjs.map +1 -1
- package/build/table/TableRow.js +2 -1
- package/build/table/TableRow.js.map +1 -1
- package/build/table/TableRow.mjs +2 -1
- package/build/table/TableRow.mjs.map +1 -1
- package/build/table/TableStatusText.js +2 -1
- package/build/table/TableStatusText.js.map +1 -1
- package/build/table/TableStatusText.mjs +2 -1
- package/build/table/TableStatusText.mjs.map +1 -1
- package/build/tabs/Tabs.js +2 -1
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +2 -1
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tile/Tile.js +2 -1
- package/build/tile/Tile.js.map +1 -1
- package/build/tile/Tile.mjs +2 -1
- package/build/tile/Tile.mjs.map +1 -1
- package/build/title/Title.js +2 -1
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +2 -1
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +31 -51
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +32 -52
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +6 -6
- package/build/typeahead/Typeahead.mjs +6 -6
- package/build/types/badge/BadgeAssets.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/hooks/useScreenSize.d.ts +1 -1
- package/build/types/common/hooks/useScreenSize.d.ts.map +1 -1
- package/build/types/common/index.d.ts +1 -1
- package/build/types/common/index.d.ts.map +1 -1
- package/build/types/common/locale/index.d.ts +1 -1
- package/build/types/common/locale/index.d.ts.map +1 -1
- package/build/types/common/panel/Panel.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/decision/Decision.d.ts.map +1 -1
- package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/index.d.ts +4 -3
- package/build/types/index.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts +6 -0
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/moneyInput/currencyFormatting.d.ts +4 -3
- package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +11 -2
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +3 -8
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/prompt/index.d.ts +0 -2
- package/build/types/prompt/index.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +0 -4
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/upload/Upload.js +2 -1
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +2 -1
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +2 -1
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +2 -1
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js +2 -1
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +2 -1
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +2 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +2 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js +2 -1
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +2 -1
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +2 -1
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs +2 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
- package/build/uploadInput/uploadButton/defaults.js +2 -1
- package/build/uploadInput/uploadButton/defaults.js.map +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs +2 -1
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +2 -1
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +2 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +2 -1
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +2 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +20 -22
- package/src/accordion/Accordion.css +1 -1
- package/src/avatarView/AvatarView.story.tsx +1 -1
- package/src/avatarView/AvatarView.test.story.tsx +108 -1
- package/src/badge/BadgeAssets.tsx +2 -0
- package/src/card/Card.css +2 -2
- package/src/carousel/Carousel.css +5 -5
- package/src/circularButton/CircularButton.tsx +3 -2
- package/src/common/Option/Option.css +1 -1
- package/src/common/baseCard/BaseCard.css +1 -1
- package/src/common/bottomSheet/BottomSheet.tsx +2 -2
- package/src/common/circle/Circle.tsx +2 -2
- package/src/common/hooks/useLayout/useLayout.ts +1 -1
- package/src/common/hooks/useScreenSize.ts +1 -1
- package/src/common/index.ts +1 -1
- package/src/common/locale/index.test.ts +13 -4
- package/src/common/locale/index.ts +9 -3
- package/src/common/panel/Panel.tsx +56 -49
- package/src/common/responsivePanel/ResponsivePanel.test.js +3 -2
- package/src/criticalBanner/CriticalCommsBanner.css +1 -1
- package/src/dateInput/DateInput.css +1 -1
- package/src/dateLookup/DateLookup.tsx +1 -1
- package/src/decision/Decision.test.tsx +2 -1
- package/src/decision/Decision.tsx +2 -1
- package/src/definitionList/DefinitionList.css +2 -2
- package/src/definitionList/DefinitionList.less +2 -2
- package/src/drawer/Drawer.css +1 -1
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +18 -0
- package/src/expressiveMoneyInput/currencySelector/CurrencySelector.test.tsx +119 -1
- package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +4 -3
- package/src/flowNavigation/FlowNavigation.test.js +1 -1
- package/src/flowNavigation/FlowNavigation.tsx +2 -1
- package/src/i18n/en.json +0 -2
- package/src/index.ts +3 -3
- package/src/inputs/Input.css +3 -3
- package/src/inputs/SelectInput/Options/SelectInputOptions.css +2 -2
- package/src/inputs/SelectInput/SelectInput.css +2 -2
- package/src/inputs/SelectInput/SelectInput.tsx +1 -1
- package/src/inputs/TextArea.css +3 -3
- package/src/logo/Logo.css +2 -2
- package/src/logo/Logo.story.tsx +3 -3
- package/src/logo/Logo.tsx +1 -1
- package/src/main.css +351 -418
- package/src/main.less +1 -3
- package/src/modal/Modal.css +5 -5
- package/src/moneyInput/MoneyInput.story.tsx +10 -1
- package/src/moneyInput/MoneyInput.test.story.tsx +141 -1
- package/src/moneyInput/MoneyInput.test.tsx +45 -0
- package/src/moneyInput/MoneyInput.tsx +27 -3
- package/src/moneyInput/currencyFormatting.ts +11 -5
- package/src/popover/Popover.css +3 -3
- package/src/popover/Popover.test.tsx +2 -1
- package/src/promoCard/PromoCard.css +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.css +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.test.tsx +3 -3
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +64 -10
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.css +1 -1
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +2 -9
- package/src/prompt/index.ts +0 -4
- package/src/section/Section.story.tsx +2 -8
- package/src/select/Select.css +2 -1
- package/src/select/Select.less +6 -5
- package/src/select/Select.test.story.tsx +59 -0
- package/src/select/Select.test.tsx +1 -1
- package/src/select/Select.tsx +1 -1
- package/src/sentimentSurface/SentimentSurface.story.tsx +17 -43
- package/src/snackbar/Snackbar.css +2 -2
- package/src/statusIcon/StatusIcon.test.tsx +0 -2
- package/src/statusIcon/StatusIcon.tsx +3 -2
- package/src/stepper/Stepper.css +2 -2
- package/src/styles/less/accordion.css +4 -4
- package/src/styles/less/button-groups.css +6 -6
- package/src/styles/less/buttons.css +1 -1
- package/src/styles/less/circles.css +1 -1
- package/src/styles/less/column-layout.css +4 -4
- package/src/styles/less/decision.css +4 -4
- package/src/styles/less/dropdowns.css +10 -10
- package/src/styles/less/droppable.css +8 -8
- package/src/styles/less/flex.css +14 -14
- package/src/styles/less/footer.css +3 -3
- package/src/styles/less/forms/bootstrap-forms.css +9 -9
- package/src/styles/less/forms/bootstrap-forms.less +1 -1
- package/src/styles/less/grid.css +19 -19
- package/src/styles/less/input-groups.css +12 -12
- package/src/styles/less/list-group.css +8 -8
- package/src/styles/less/modals.css +3 -3
- package/src/styles/less/navbar.css +62 -62
- package/src/styles/less/navbar.less +2 -2
- package/src/styles/less/navs.css +2 -2
- package/src/styles/less/neptune.bundle.less +1 -0
- package/src/styles/less/neptune.css +280 -269
- package/src/styles/less/panels.css +9 -9
- package/src/styles/less/popovers.css +13 -13
- package/src/styles/less/select.css +1 -1
- package/src/styles/less/sequences.css +6 -6
- package/src/styles/less/table.css +6 -6
- package/src/styles/less/table.less +1 -1
- package/src/styles/less/utilities.css +4 -4
- package/src/styles/less/wells.css +4 -4
- package/src/styles/props/custom-media.css +1 -11
- package/src/styles/variables/legacy-variables.less +4 -47
- package/src/table/Table.css +1 -1
- package/src/tabs/Tabs.css +2 -2
- package/src/tooltip/Tooltip.tsx +26 -45
- package/src/typeahead/Typeahead.css +1 -1
- package/build/common/propsValues/breakpoint.js +0 -12
- package/build/common/propsValues/breakpoint.js.map +0 -1
- package/build/common/propsValues/breakpoint.mjs +0 -12
- package/build/common/propsValues/breakpoint.mjs.map +0 -1
- package/build/prompt/CriticalBanner/CriticalBanner.js +0 -143
- package/build/prompt/CriticalBanner/CriticalBanner.js.map +0 -1
- package/build/prompt/CriticalBanner/CriticalBanner.mjs +0 -141
- package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +0 -1
- package/build/prompt/CriticalBanner/helpers.js +0 -29
- package/build/prompt/CriticalBanner/helpers.js.map +0 -1
- package/build/prompt/CriticalBanner/helpers.mjs +0 -26
- package/build/prompt/CriticalBanner/helpers.mjs.map +0 -1
- package/build/prompt/common/Expander/Expander.js +0 -47
- package/build/prompt/common/Expander/Expander.js.map +0 -1
- package/build/prompt/common/Expander/Expander.messages.js +0 -17
- package/build/prompt/common/Expander/Expander.messages.js.map +0 -1
- package/build/prompt/common/Expander/Expander.messages.mjs +0 -13
- package/build/prompt/common/Expander/Expander.messages.mjs.map +0 -1
- package/build/prompt/common/Expander/Expander.mjs +0 -44
- package/build/prompt/common/Expander/Expander.mjs.map +0 -1
- package/build/prompt/helpers/promptMedia.js +0 -52
- package/build/prompt/helpers/promptMedia.js.map +0 -1
- package/build/prompt/helpers/promptMedia.mjs +0 -50
- package/build/prompt/helpers/promptMedia.mjs.map +0 -1
- package/build/styles/prompt/CriticalBanner/CriticalBanner.css +0 -59
- package/build/styles/prompt/common/Expander/Expander.css +0 -8
- package/build/types/common/propsValues/breakpoint.d.ts +0 -9
- package/build/types/common/propsValues/breakpoint.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +0 -33
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/helpers.d.ts +0 -18
- package/build/types/prompt/CriticalBanner/helpers.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/index.d.ts +0 -3
- package/build/types/prompt/CriticalBanner/index.d.ts.map +0 -1
- package/build/types/prompt/common/Expander/Expander.d.ts +0 -20
- package/build/types/prompt/common/Expander/Expander.d.ts.map +0 -1
- package/build/types/prompt/common/Expander/Expander.messages.d.ts +0 -14
- package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +0 -1
- package/build/types/prompt/helpers/promptMedia.d.ts +0 -22
- package/build/types/prompt/helpers/promptMedia.d.ts.map +0 -1
- package/src/common/propsValues/breakpoint.ts +0 -8
- package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +0 -113
- package/src/prompt/CriticalBanner/CriticalBanner.css +0 -59
- package/src/prompt/CriticalBanner/CriticalBanner.less +0 -64
- package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +0 -632
- package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +0 -285
- package/src/prompt/CriticalBanner/CriticalBanner.tsx +0 -182
- package/src/prompt/CriticalBanner/helpers.ts +0 -39
- package/src/prompt/CriticalBanner/index.ts +0 -2
- package/src/prompt/common/Expander/Expander.css +0 -8
- package/src/prompt/common/Expander/Expander.less +0 -9
- package/src/prompt/common/Expander/Expander.messages.ts +0 -14
- package/src/prompt/common/Expander/Expander.test.tsx +0 -167
- package/src/prompt/common/Expander/Expander.tsx +0 -83
- package/src/prompt/helpers/promptMedia.tsx +0 -79
package/src/common/index.ts
CHANGED
|
@@ -4,8 +4,8 @@ export { addNoScrollClass, removeNoScrollClass } from './DOMOperations';
|
|
|
4
4
|
export * from './theme';
|
|
5
5
|
export * from './direction';
|
|
6
6
|
// Props
|
|
7
|
+
export { Breakpoint } from '@transferwise/neptune-tokens';
|
|
7
8
|
export * from './propsValues/control';
|
|
8
|
-
export { Breakpoint } from './propsValues/breakpoint';
|
|
9
9
|
export * from './propsValues/size';
|
|
10
10
|
export * from './propsValues/typography';
|
|
11
11
|
export * from './propsValues/width';
|
|
@@ -120,12 +120,12 @@ describe('locale utils', () => {
|
|
|
120
120
|
const result = getLocaleCurrencyName(intl, 'USD');
|
|
121
121
|
expect(intl.formatDisplayName).toHaveBeenCalledWith('USD', {
|
|
122
122
|
type: 'currency',
|
|
123
|
-
fallback: '
|
|
123
|
+
fallback: 'none',
|
|
124
124
|
});
|
|
125
125
|
expect(result).toBe('US Dollar');
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
it('should return the
|
|
128
|
+
it('should return the formatted currency code if Intl.DisplayNames is not supported', () => {
|
|
129
129
|
const intl = {
|
|
130
130
|
formatDisplayName: jest.fn().mockReturnValue('US Dollar'),
|
|
131
131
|
} as unknown as IntlShape;
|
|
@@ -134,8 +134,17 @@ describe('locale utils', () => {
|
|
|
134
134
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
135
135
|
(Intl as any).DisplayNames = undefined;
|
|
136
136
|
|
|
137
|
-
const result = getLocaleCurrencyName(intl, '
|
|
138
|
-
expect(result).toBe('
|
|
137
|
+
const result = getLocaleCurrencyName(intl, 'USC');
|
|
138
|
+
expect(result).toBe('USDC');
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('should return the formatted code when formatDisplayName does not support the currency code', () => {
|
|
142
|
+
const intl = {
|
|
143
|
+
formatDisplayName: jest.fn().mockReturnValue(undefined),
|
|
144
|
+
} as unknown as IntlShape;
|
|
145
|
+
|
|
146
|
+
const result = getLocaleCurrencyName(intl, 'USC');
|
|
147
|
+
expect(result).toBe('USDC');
|
|
139
148
|
});
|
|
140
149
|
});
|
|
141
150
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IntlShape } from 'react-intl/src/types';
|
|
2
|
+
import { formatCurrencyCode } from '@transferwise/formatting';
|
|
2
3
|
import { Direction } from '../direction';
|
|
3
4
|
|
|
4
5
|
export const DEFAULT_LANG = 'en';
|
|
@@ -105,7 +106,12 @@ export function getDirectionFromLocale(locale: string) {
|
|
|
105
106
|
* @returns The localized currency name if Intl.DisplayNames is supported supported, otherwise returns the original currency code.
|
|
106
107
|
*/
|
|
107
108
|
export function getLocaleCurrencyName(intl: IntlShape, currencyCode: string) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
if (typeof Intl.DisplayNames === 'function') {
|
|
110
|
+
const localisedName = intl.formatDisplayName(currencyCode, {
|
|
111
|
+
type: 'currency',
|
|
112
|
+
fallback: 'none',
|
|
113
|
+
});
|
|
114
|
+
return localisedName != null ? localisedName : formatCurrencyCode(currencyCode);
|
|
115
|
+
}
|
|
116
|
+
return formatCurrencyCode(currencyCode);
|
|
111
117
|
}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
arrow as arrowMiddleware,
|
|
3
|
+
autoUpdate,
|
|
4
|
+
flip as flipMiddleware,
|
|
5
|
+
offset,
|
|
6
|
+
type Placement,
|
|
7
|
+
shift,
|
|
8
|
+
size as sizeMiddleware,
|
|
9
|
+
useFloating,
|
|
10
|
+
} from '@floating-ui/react';
|
|
1
11
|
import { clsx } from 'clsx';
|
|
2
12
|
import {
|
|
3
13
|
CSSProperties,
|
|
@@ -7,21 +17,19 @@ import {
|
|
|
7
17
|
SyntheticEvent,
|
|
8
18
|
forwardRef,
|
|
9
19
|
useContext,
|
|
10
|
-
|
|
11
|
-
useState,
|
|
20
|
+
useRef,
|
|
12
21
|
} from 'react';
|
|
13
|
-
import { usePopper } from 'react-popper';
|
|
14
22
|
|
|
15
23
|
import { Position, PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';
|
|
16
24
|
import Dimmer from '../../dimmer';
|
|
17
25
|
import { OverlayIdContext } from '../../provider/overlay/OverlayIdProvider';
|
|
18
26
|
|
|
19
|
-
const POPOVER_OFFSET =
|
|
27
|
+
const POPOVER_OFFSET = 16;
|
|
20
28
|
|
|
21
29
|
// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
|
|
22
30
|
// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
|
|
23
31
|
// This mapping forces popover to try the four available positions before going back to the initial chosen one.
|
|
24
|
-
const fallbackPlacements = {
|
|
32
|
+
const fallbackPlacements: Record<string, Placement[]> = {
|
|
25
33
|
[Position.TOP]: [Position.BOTTOM, Position.RIGHT, Position.LEFT],
|
|
26
34
|
[Position.BOTTOM]: [Position.TOP, Position.RIGHT, Position.LEFT],
|
|
27
35
|
[Position.LEFT]: [Position.RIGHT, Position.TOP, Position.BOTTOM],
|
|
@@ -57,56 +65,57 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(
|
|
|
57
65
|
}: PanelProps,
|
|
58
66
|
reference,
|
|
59
67
|
) {
|
|
60
|
-
const
|
|
61
|
-
|
|
68
|
+
const arrowRef = useRef<HTMLDivElement | null>(null);
|
|
69
|
+
|
|
70
|
+
const middleware = [];
|
|
62
71
|
|
|
63
|
-
|
|
72
|
+
if (arrow) {
|
|
73
|
+
middleware.push(offset(POPOVER_OFFSET));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (flip && fallbackPlacements[position]) {
|
|
77
|
+
middleware.push(
|
|
78
|
+
flipMiddleware({
|
|
79
|
+
fallbackPlacements: fallbackPlacements[position],
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
64
83
|
|
|
65
84
|
if (altAxis) {
|
|
66
|
-
|
|
67
|
-
// https://popper.js.org/docs/v2/modifiers/prevent-overflow
|
|
68
|
-
name: 'preventOverflow',
|
|
69
|
-
options: {
|
|
70
|
-
altAxis: true,
|
|
71
|
-
tether: false,
|
|
72
|
-
},
|
|
73
|
-
});
|
|
85
|
+
middleware.push(shift());
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
if (arrow) {
|
|
77
|
-
|
|
78
|
-
name: 'arrow',
|
|
79
|
-
options: {
|
|
80
|
-
element: arrowElement,
|
|
81
|
-
options: {
|
|
82
|
-
padding: 8, // 8px from the edges of the popper
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
// This lets you displace a popper element from its reference element.
|
|
87
|
-
modifiers.push({ name: 'offset', options: { offset: POPOVER_OFFSET } });
|
|
89
|
+
middleware.push(arrowMiddleware({ element: arrowRef, padding: 8 }));
|
|
88
90
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
|
|
92
|
+
if (considerHeight) {
|
|
93
|
+
middleware.push(
|
|
94
|
+
sizeMiddleware({
|
|
95
|
+
padding: POPOVER_OFFSET,
|
|
96
|
+
apply: ({ elements, availableHeight }) => {
|
|
97
|
+
elements.floating.style.setProperty(
|
|
98
|
+
'--np-panel-available-height',
|
|
99
|
+
`${availableHeight}px`,
|
|
100
|
+
);
|
|
101
|
+
},
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
96
104
|
}
|
|
97
105
|
|
|
98
|
-
const {
|
|
106
|
+
const { refs, floatingStyles, placement, middlewareData } = useFloating({
|
|
99
107
|
placement: position,
|
|
100
|
-
|
|
108
|
+
middleware,
|
|
109
|
+
elements: {
|
|
110
|
+
reference: anchorRef.current,
|
|
111
|
+
},
|
|
112
|
+
whileElementsMounted: open ? autoUpdate : undefined,
|
|
101
113
|
});
|
|
102
114
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
forceUpdate();
|
|
108
|
-
}
|
|
109
|
-
}, [open]);
|
|
115
|
+
const arrowStyle: CSSProperties = {
|
|
116
|
+
...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),
|
|
117
|
+
...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),
|
|
118
|
+
};
|
|
110
119
|
|
|
111
120
|
const contentStyle: CSSProperties = {
|
|
112
121
|
...(anchorWidth ? { width: anchorRef.current?.clientWidth } : undefined),
|
|
@@ -119,18 +128,16 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(
|
|
|
119
128
|
<div
|
|
120
129
|
id={overlayId}
|
|
121
130
|
{...rest}
|
|
122
|
-
ref={
|
|
131
|
+
ref={refs.setFloating}
|
|
123
132
|
role="dialog"
|
|
124
|
-
style={
|
|
125
|
-
{
|
|
133
|
+
style={floatingStyles}
|
|
134
|
+
data-popper-placement={placement}
|
|
126
135
|
className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}
|
|
127
136
|
>
|
|
128
137
|
<div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>
|
|
129
138
|
{children}
|
|
130
139
|
{/* Arrow has to stay inside content to get the same animations as the "dialog" and to get hidden when panel is closed. */}
|
|
131
|
-
{arrow && (
|
|
132
|
-
<div ref={setArrowElement} className={clsx('np-panel__arrow')} style={styles.arrow} />
|
|
133
|
-
)}
|
|
140
|
+
{arrow && <div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />}
|
|
134
141
|
</div>
|
|
135
142
|
</div>
|
|
136
143
|
</Dimmer>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Breakpoint
|
|
1
|
+
import { Breakpoint } from '@transferwise/neptune-tokens';
|
|
2
|
+
import { Position } from '..';
|
|
2
3
|
import { mockMatchMedia, render, screen } from '../../test-utils';
|
|
3
|
-
import React
|
|
4
|
+
import React from 'react';
|
|
4
5
|
|
|
5
6
|
import ResponsivePanel from './ResponsivePanel';
|
|
6
7
|
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
--Button-background-hover: var(--color-sentiment-interactive-secondary-neutral-hover);
|
|
45
45
|
--Button-background-active: var(--color-sentiment-interactive-secondary-neutral-active);
|
|
46
46
|
}
|
|
47
|
-
@media (min-width:
|
|
47
|
+
@media (min-width: 840px) {
|
|
48
48
|
.critical-comms .alert-warning .alert__message,
|
|
49
49
|
.critical-comms .alert-negative .alert__message,
|
|
50
50
|
.critical-comms .alert-neutral .alert__message {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { createRef, PureComponent, KeyboardEvent } from 'react';
|
|
3
|
+
import { Breakpoint } from '@transferwise/neptune-tokens';
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
Size,
|
|
6
7
|
MonthFormat,
|
|
7
8
|
Position,
|
|
8
|
-
Breakpoint,
|
|
9
9
|
type SizeSmall,
|
|
10
10
|
type SizeMedium,
|
|
11
11
|
type SizeLarge,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
|
+
import { Breakpoint } from '@transferwise/neptune-tokens';
|
|
2
3
|
|
|
3
|
-
import { Size,
|
|
4
|
+
import { Size, SizeSmall, SizeMedium } from '../common';
|
|
4
5
|
import { useScreenSize } from '../common/hooks/useScreenSize';
|
|
5
6
|
import NavigationOption from '../navigationOption';
|
|
6
7
|
import Tile from '../tile';
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
.tw-definition-list__button {
|
|
10
10
|
margin-top: -50%;
|
|
11
11
|
}
|
|
12
|
-
@media (max-width:
|
|
12
|
+
@media (max-width: 599.98px) {
|
|
13
13
|
.tw-definition-list--right-aligned-desktop {
|
|
14
14
|
justify-content: space-between;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
@media (min-width:
|
|
17
|
+
@media (min-width: 600px) {
|
|
18
18
|
.tw-definition-list--right-aligned-desktop {
|
|
19
19
|
justify-content: flex-end;
|
|
20
20
|
}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
margin-top: -50%;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
@media (max
|
|
18
|
+
@media (--screen-xs-max) {
|
|
19
19
|
&--right-aligned-desktop {
|
|
20
20
|
justify-content: space-between;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
@media (
|
|
24
|
+
@media (--screen-sm) {
|
|
25
25
|
&--right-aligned-desktop {
|
|
26
26
|
justify-content: flex-end;
|
|
27
27
|
}
|
package/src/drawer/Drawer.css
CHANGED
|
@@ -161,6 +161,24 @@ export const WithInlinePromptSentiment = {
|
|
|
161
161
|
},
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
+
export const WithFormattedCurrencyCode = {
|
|
165
|
+
args: {
|
|
166
|
+
currency: 'USC',
|
|
167
|
+
currencySelector: {
|
|
168
|
+
...getCurrencySelectorProps({ logEvents: true }),
|
|
169
|
+
options: [
|
|
170
|
+
{
|
|
171
|
+
title: 'Popular',
|
|
172
|
+
currencies: [
|
|
173
|
+
{ code: 'USC', label: 'Digital Dollar', keywords: ['USDC', 'Digital Dollar'] },
|
|
174
|
+
{ code: 'USD', label: 'US Dollar', keywords: ['dollar', 'us'] },
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
|
|
164
182
|
export const WithSecondaryCurrencySelectorAvatar = {
|
|
165
183
|
args: {
|
|
166
184
|
currencySelector: getCurrencySelectorProps({ logEvents: true, secondAvatar: true }),
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
mockMatchMedia,
|
|
3
|
+
mockResizeObserver,
|
|
4
|
+
render,
|
|
5
|
+
screen,
|
|
6
|
+
userEvent,
|
|
7
|
+
waitFor,
|
|
8
|
+
} from '../../test-utils';
|
|
2
9
|
|
|
3
10
|
import { CurrencySelector } from './CurrencySelector';
|
|
4
11
|
|
|
@@ -92,6 +99,112 @@ describe('CurrencySelector', () => {
|
|
|
92
99
|
expect(screen.getByRole('combobox')).toBeDisabled();
|
|
93
100
|
});
|
|
94
101
|
|
|
102
|
+
it('displays formatted currency code when the currency is selected', () => {
|
|
103
|
+
render(<CurrencySelector options={mockCurrencies} id="id" currency="USC" labelId="labelId" />);
|
|
104
|
+
|
|
105
|
+
expect(screen.getByRole('combobox', { name: 'Select currency' })).toHaveTextContent('USDC');
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it('displays formatted currency code in the selected option content', async () => {
|
|
109
|
+
render(
|
|
110
|
+
<CurrencySelector
|
|
111
|
+
options={[
|
|
112
|
+
{
|
|
113
|
+
title: 'All',
|
|
114
|
+
currencies: [
|
|
115
|
+
{ code: 'USC', label: 'USDC', keywords: ['USDC'] },
|
|
116
|
+
{ code: 'EUR', label: 'Euro', keywords: ['EUR'] },
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
]}
|
|
120
|
+
id="id"
|
|
121
|
+
currency="USC"
|
|
122
|
+
labelId="labelId"
|
|
123
|
+
onChange={jest.fn()}
|
|
124
|
+
/>,
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
await userEvent.click(screen.getByRole('combobox'));
|
|
128
|
+
|
|
129
|
+
expect(screen.getByRole('option', { name: /^usdc/iu })).toHaveTextContent('USDC');
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it('fires onChange with the raw currency code when selecting a formatted currency', async () => {
|
|
133
|
+
const onChange = jest.fn();
|
|
134
|
+
render(
|
|
135
|
+
<CurrencySelector
|
|
136
|
+
options={[
|
|
137
|
+
{
|
|
138
|
+
title: 'All',
|
|
139
|
+
currencies: [
|
|
140
|
+
{ code: 'USC', label: 'USDC', keywords: ['USC'] },
|
|
141
|
+
{ code: 'EUR', label: 'Euro', keywords: ['EUR'] },
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
]}
|
|
145
|
+
id="id"
|
|
146
|
+
currency="EUR"
|
|
147
|
+
labelId="labelId"
|
|
148
|
+
onChange={onChange}
|
|
149
|
+
/>,
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
await userEvent.click(screen.getByRole('combobox'));
|
|
153
|
+
await userEvent.click(screen.getByRole('option', { name: /^usdc/iu }));
|
|
154
|
+
|
|
155
|
+
expect(onChange).toHaveBeenCalledWith('USC');
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it('returns USC option when searching by the formatted code USDC', async () => {
|
|
159
|
+
render(
|
|
160
|
+
<CurrencySelector
|
|
161
|
+
options={mockCurrencies}
|
|
162
|
+
id="id"
|
|
163
|
+
currency="USD"
|
|
164
|
+
labelId="labelId"
|
|
165
|
+
onChange={jest.fn()}
|
|
166
|
+
/>,
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
await userEvent.click(screen.getByRole('combobox', { name: 'Select currency' }));
|
|
170
|
+
|
|
171
|
+
await userEvent.type(
|
|
172
|
+
screen.getByRole('combobox', {
|
|
173
|
+
name: /type a currency \/ country/iu,
|
|
174
|
+
}),
|
|
175
|
+
'USDC',
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
await waitFor(() => {
|
|
179
|
+
expect(screen.getByRole('option', { name: /usdc/iu })).toBeInTheDocument();
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it('does not return USDC option when searching by the raw code USC', async () => {
|
|
184
|
+
render(
|
|
185
|
+
<CurrencySelector
|
|
186
|
+
options={mockCurrencies}
|
|
187
|
+
id="id"
|
|
188
|
+
currency="USD"
|
|
189
|
+
labelId="labelId"
|
|
190
|
+
onChange={jest.fn()}
|
|
191
|
+
/>,
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
await userEvent.click(screen.getByRole('combobox', { name: 'Select currency' }));
|
|
195
|
+
|
|
196
|
+
await userEvent.type(
|
|
197
|
+
screen.getByRole('combobox', {
|
|
198
|
+
name: /type a currency \/ country/iu,
|
|
199
|
+
}),
|
|
200
|
+
'USC',
|
|
201
|
+
);
|
|
202
|
+
|
|
203
|
+
await waitFor(() => {
|
|
204
|
+
expect(screen.queryByRole('option')).not.toBeInTheDocument();
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
|
|
95
208
|
it('deduplicates currencies while searching', async () => {
|
|
96
209
|
render(
|
|
97
210
|
<CurrencySelector
|
|
@@ -155,6 +268,11 @@ const mockCurrencies = [
|
|
|
155
268
|
label: 'Australian Dollar',
|
|
156
269
|
keywords: ['AUD', 'australia'],
|
|
157
270
|
},
|
|
271
|
+
{
|
|
272
|
+
code: 'USC',
|
|
273
|
+
label: 'Digital Dollar',
|
|
274
|
+
keywords: ['USDC', 'Digital Dollar'],
|
|
275
|
+
},
|
|
158
276
|
],
|
|
159
277
|
},
|
|
160
278
|
];
|
|
@@ -19,6 +19,7 @@ import { useIntl } from 'react-intl';
|
|
|
19
19
|
|
|
20
20
|
import messages from '../ExpressiveMoneyInput.messages';
|
|
21
21
|
import { getLocaleCurrencyName } from '../../common';
|
|
22
|
+
import { formatCurrencyCode } from '@transferwise/formatting';
|
|
22
23
|
|
|
23
24
|
export interface CurrencyOption {
|
|
24
25
|
label?: string;
|
|
@@ -99,7 +100,7 @@ export const CurrencySelector = ({
|
|
|
99
100
|
renderValue={({ code, label }) => {
|
|
100
101
|
return (
|
|
101
102
|
<SelectInputOptionContent
|
|
102
|
-
title={code}
|
|
103
|
+
title={formatCurrencyCode(code)}
|
|
103
104
|
note={label}
|
|
104
105
|
icon={<Flag code={code} intrinsicSize={24} />}
|
|
105
106
|
/>
|
|
@@ -128,7 +129,7 @@ export const CurrencySelector = ({
|
|
|
128
129
|
onClick={(event) => handleTriggerClick(event)}
|
|
129
130
|
>
|
|
130
131
|
<>
|
|
131
|
-
<span aria-hidden>{currency}</span>
|
|
132
|
+
<span aria-hidden>{formatCurrencyCode(currency)}</span>
|
|
132
133
|
<span className="sr-only">{getLocaleCurrencyName(intl, currency)}</span>
|
|
133
134
|
</>
|
|
134
135
|
</SelectInputTriggerButton>
|
|
@@ -203,7 +204,7 @@ const filterAndSortCurrenciesForQuery = (
|
|
|
203
204
|
currencies
|
|
204
205
|
.filter((currency) => {
|
|
205
206
|
return (
|
|
206
|
-
currency.code.toLowerCase().includes(query) ||
|
|
207
|
+
formatCurrencyCode(currency.code).toLowerCase().includes(query) ||
|
|
207
208
|
(currency.label ?? '').toLowerCase().includes(query) ||
|
|
208
209
|
currency.keywords?.some((keyword) => keyword.toLowerCase().includes(query))
|
|
209
210
|
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
+
import { Breakpoint } from '@transferwise/neptune-tokens';
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import { Layout } from '../common';
|
|
5
6
|
import { CloseButton } from '../common/closeButton';
|
|
6
7
|
import FlowHeader from '../common/flowHeader/FlowHeader';
|
|
7
8
|
import Logo from '../logo';
|
package/src/i18n/en.json
CHANGED
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
"neptune.DateLookup.selected": "selected",
|
|
17
17
|
"neptune.DateLookup.twentyYears": "20 years",
|
|
18
18
|
"neptune.DateLookup.year": "year",
|
|
19
|
-
"neptune.Expander.collapseAriaLabel": "Collapse",
|
|
20
|
-
"neptune.Expander.expandAriaLabel": "Expand",
|
|
21
19
|
"neptune.ExpressiveMoneyInput.currency.search.placeholder": "Type a currency / country",
|
|
22
20
|
"neptune.ExpressiveMoneyInput.currency.select.currency": "Select currency",
|
|
23
21
|
"neptune.FlowNavigation.back": "back to previous step",
|
package/src/index.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type { HeaderProps } from './header';
|
|
|
35
35
|
export type { EmphasisProps } from './emphasis';
|
|
36
36
|
export type { FieldProps } from './field/Field';
|
|
37
37
|
export type { InfoProps } from './info';
|
|
38
|
-
export type { InlinePromptProps, ActionPromptProps
|
|
38
|
+
export type { InlinePromptProps, ActionPromptProps } from './prompt';
|
|
39
39
|
export type { InfoPromptProps, InfoPromptAction, InfoPromptMedia } from './prompt';
|
|
40
40
|
export type { InputWithDisplayFormatProps } from './inputWithDisplayFormat';
|
|
41
41
|
export type { InputProps } from './inputs/Input';
|
|
@@ -173,7 +173,7 @@ export { default as Header } from './header';
|
|
|
173
173
|
export { default as Image } from './image';
|
|
174
174
|
export { default as Info } from './info';
|
|
175
175
|
export { default as InlineAlert } from './inlineAlert';
|
|
176
|
-
export { InfoPrompt, InlinePrompt, ActionPrompt
|
|
176
|
+
export { InfoPrompt, InlinePrompt, ActionPrompt } from './prompt';
|
|
177
177
|
export { default as InputWithDisplayFormat } from './inputWithDisplayFormat';
|
|
178
178
|
export { Input } from './inputs/Input';
|
|
179
179
|
export { InputGroup } from './inputs/InputGroup';
|
|
@@ -246,10 +246,10 @@ export { default as useSnackbar } from './snackbar/useSnackbar';
|
|
|
246
246
|
/**
|
|
247
247
|
* Enums
|
|
248
248
|
*/
|
|
249
|
+
export { Breakpoint } from '@transferwise/neptune-tokens';
|
|
249
250
|
export { AlertArrowPosition } from './alert/Alert';
|
|
250
251
|
export { AvatarType } from './avatar';
|
|
251
252
|
export {
|
|
252
|
-
Breakpoint,
|
|
253
253
|
ControlType,
|
|
254
254
|
DateMode,
|
|
255
255
|
Direction,
|
package/src/inputs/Input.css
CHANGED
|
@@ -111,12 +111,12 @@
|
|
|
111
111
|
hyphens: auto;
|
|
112
112
|
hyphenate-limit-chars: 7 3;
|
|
113
113
|
}
|
|
114
|
-
@media (min-width:
|
|
114
|
+
@media (min-width: 840px) {
|
|
115
115
|
.np-form-control--size-lg {
|
|
116
116
|
hyphenate-limit-chars: 8 3;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
@media (min-width:
|
|
119
|
+
@media (min-width: 1160px) {
|
|
120
120
|
.np-form-control--size-lg {
|
|
121
121
|
hyphenate-limit-chars: 10 4 3;
|
|
122
122
|
}
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
-webkit-hyphenate-limit-before: 3;
|
|
129
129
|
-webkit-hyphenate-limit-after: 3;
|
|
130
130
|
}
|
|
131
|
-
@media (min-width:
|
|
131
|
+
@media (min-width: 1160px) {
|
|
132
132
|
.np-form-control--size-lg {
|
|
133
133
|
-webkit-hyphenate-limit-before: 4;
|
|
134
134
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
.np-select-input-options-container:focus {
|
|
7
7
|
outline: none;
|
|
8
8
|
}
|
|
9
|
-
@media (min-width:
|
|
9
|
+
@media (min-width: 600px) {
|
|
10
10
|
.np-select-input-options-container {
|
|
11
11
|
max-height: 28rem /* 448px */;
|
|
12
12
|
}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
scroll-padding-bottom: var(--size-8);
|
|
43
43
|
overflow-y: auto;
|
|
44
44
|
}
|
|
45
|
-
@media (min-width:
|
|
45
|
+
@media (min-width: 600px) {
|
|
46
46
|
.np-select-input-listbox-container {
|
|
47
47
|
height: auto;
|
|
48
48
|
}
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
.np-select-input-options-container:focus {
|
|
251
251
|
outline: none;
|
|
252
252
|
}
|
|
253
|
-
@media (min-width:
|
|
253
|
+
@media (min-width: 600px) {
|
|
254
254
|
.np-select-input-options-container {
|
|
255
255
|
max-height: 28rem /* 448px */;
|
|
256
256
|
}
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
scroll-padding-bottom: var(--size-8);
|
|
287
287
|
overflow-y: auto;
|
|
288
288
|
}
|
|
289
|
-
@media (min-width:
|
|
289
|
+
@media (min-width: 600px) {
|
|
290
290
|
.np-select-input-listbox-container {
|
|
291
291
|
height: auto;
|
|
292
292
|
}
|