@transferwise/components 0.0.0-experimental-a18466a → 0.0.0-experimental-d6b038b
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/Accordion.js.map +1 -1
- package/build/accordion/Accordion.mjs.map +1 -1
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js +1 -1
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +1 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/body/Body.js.map +1 -1
- package/build/body/Body.mjs.map +1 -1
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs.map +1 -1
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/propsValues/type.js +1 -1
- package/build/common/propsValues/type.js.map +1 -1
- package/build/common/propsValues/type.mjs +1 -1
- package/build/common/propsValues/type.mjs.map +1 -1
- package/build/common/propsValues/typography.js +1 -1
- package/build/common/propsValues/typography.js.map +1 -1
- package/build/common/propsValues/typography.mjs +1 -1
- package/build/common/propsValues/typography.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +68 -3
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +69 -4
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js +12 -5
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +11 -4
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +16 -8
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +14 -6
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs.map +1 -1
- package/build/iconButton/IconButton.js.map +1 -1
- package/build/iconButton/IconButton.mjs.map +1 -1
- package/build/index.js +14 -7
- package/build/index.js.map +1 -1
- package/build/index.mjs +10 -3
- package/build/index.mjs.map +1 -1
- package/build/inputs/{_BottomSheet.js → SelectInput/BottomSheet/SelectInputBottomSheet.js} +7 -7
- package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +1 -0
- package/build/inputs/{_BottomSheet.mjs → SelectInput/BottomSheet/SelectInputBottomSheet.mjs} +7 -7
- package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +1 -0
- package/build/inputs/{_ButtonInput.js → SelectInput/ButtonInput/SelectInputButtonInput.js} +5 -5
- package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.js.map +1 -0
- package/build/inputs/{_ButtonInput.mjs → SelectInput/ButtonInput/SelectInputButtonInput.mjs} +5 -5
- package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.mjs.map +1 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js +27 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js.map +1 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs +25 -0
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs.map +1 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js +59 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js.map +1 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs +56 -0
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs.map +1 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js +50 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js.map +1 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs +48 -0
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs.map +1 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.js +47 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.js.map +1 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs +45 -0
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs.map +1 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.js +42 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.js.map +1 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.mjs +40 -0
- package/build/inputs/SelectInput/Option/SelectInputOption.mjs.map +1 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js +40 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +1 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +38 -0
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +1 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js +48 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js.map +1 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs +46 -0
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs.map +1 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.js +300 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.js.map +1 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs +298 -0
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs.map +1 -0
- package/build/inputs/{_Popover.js → SelectInput/Popover/SelectInputPopover.js} +7 -7
- package/build/inputs/SelectInput/Popover/SelectInputPopover.js.map +1 -0
- package/build/inputs/{_Popover.mjs → SelectInput/Popover/SelectInputPopover.mjs} +7 -7
- package/build/inputs/SelectInput/Popover/SelectInputPopover.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.contexts.js +29 -0
- package/build/inputs/SelectInput/SelectInput.contexts.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.contexts.mjs +24 -0
- package/build/inputs/SelectInput/SelectInput.contexts.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.js +222 -0
- package/build/inputs/SelectInput/SelectInput.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.messages.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.messages.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.mjs +216 -0
- package/build/inputs/SelectInput/SelectInput.mjs.map +1 -0
- package/build/inputs/SelectInput/SelectInput.utils.js +164 -0
- package/build/inputs/SelectInput/SelectInput.utils.js.map +1 -0
- package/build/inputs/SelectInput/SelectInput.utils.mjs +154 -0
- package/build/inputs/SelectInput/SelectInput.utils.mjs.map +1 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js +42 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +1 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs +36 -0
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +1 -0
- package/build/legacylistItem/LegacyListItem.js.map +1 -1
- package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
- package/build/list/List.js.map +1 -1
- package/build/list/List.mjs.map +1 -1
- package/build/listItem/Button/ListItemButton.js.map +1 -1
- package/build/listItem/Button/ListItemButton.mjs.map +1 -1
- package/build/listItem/IconButton/ListItemIconButton.js.map +1 -1
- package/build/listItem/IconButton/ListItemIconButton.mjs.map +1 -1
- package/build/listItem/Image/ListItemImage.js.map +1 -1
- package/build/listItem/Image/ListItemImage.mjs.map +1 -1
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs.map +1 -1
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs.map +1 -1
- package/build/main.css +123 -105
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +9 -2
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +8 -1
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +10 -3
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +9 -2
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
- package/build/radioOption/RadioOption.js.map +1 -1
- package/build/radioOption/RadioOption.mjs.map +1 -1
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/criticalBanner/CriticalCommsBanner.css +33 -15
- package/build/styles/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +96 -0
- package/build/styles/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +16 -0
- package/build/styles/inputs/SelectInput/ClearButton/SelectInputClearButton.css +46 -0
- package/build/styles/inputs/SelectInput/ItemView/SelectInputItemView.css +16 -0
- package/build/styles/inputs/SelectInput/Option/SelectInputOption.css +33 -0
- package/build/styles/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +37 -0
- package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +81 -0
- package/build/styles/inputs/SelectInput/Popover/SelectInputPopover.css +46 -0
- package/build/styles/main.css +123 -105
- package/build/summary/Summary.js +1 -1
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.mjs +1 -1
- package/build/summary/Summary.mjs.map +1 -1
- package/build/switchOption/SwitchOption.js +1 -1
- package/build/switchOption/SwitchOption.js.map +1 -1
- package/build/switchOption/SwitchOption.mjs +1 -1
- package/build/switchOption/SwitchOption.mjs.map +1 -1
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/accordion/Accordion.d.ts +2 -8
- package/build/types/accordion/Accordion.d.ts.map +1 -1
- package/build/types/actionButton/ActionButton.d.ts +4 -6
- package/build/types/actionButton/ActionButton.d.ts.map +1 -1
- package/build/types/actionOption/ActionOption.d.ts +1 -1
- package/build/types/alert/Alert.d.ts +2 -5
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/avatar/Avatar.d.ts +0 -4
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatarLayout/AvatarLayout.d.ts +1 -5
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +0 -2
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/body/Body.d.ts +6 -2
- package/build/types/body/Body.d.ts.map +1 -1
- package/build/types/button/Button.types.d.ts +1 -4
- package/build/types/button/Button.types.d.ts.map +1 -1
- package/build/types/button/LegacyButton.d.ts +4 -4
- package/build/types/card/Card.d.ts +0 -1
- package/build/types/card/Card.d.ts.map +1 -1
- package/build/types/checkboxButton/CheckboxButton.d.ts +0 -2
- package/build/types/checkboxButton/CheckboxButton.d.ts.map +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +1 -1
- package/build/types/circularButton/CircularButton.d.ts +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/propsValues/type.d.ts +1 -1
- package/build/types/common/propsValues/typography.d.ts +2 -2
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts +4 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
- package/build/types/criticalBanner/index.d.ts +1 -0
- package/build/types/criticalBanner/index.d.ts.map +1 -1
- package/build/types/dateInput/DateInput.d.ts +0 -5
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts +0 -6
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/drawer/Drawer.d.ts +2 -8
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/field/Field.d.ts +2 -5
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts +0 -3
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/header/Header.d.ts +1 -5
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/iconButton/IconButton.d.ts +0 -6
- package/build/types/iconButton/IconButton.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/{_BottomSheet.d.ts → SelectInput/BottomSheet/SelectInputBottomSheet.d.ts} +3 -3
- package/build/types/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/BottomSheet/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/BottomSheet/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts +5 -0
- package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ButtonInput/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/ButtonInput/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts +7 -0
- package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ClearButton/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/ClearButton/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts +16 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts +2 -0
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts +9 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts +11 -0
- package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/ItemView/index.d.ts +4 -0
- package/build/types/inputs/SelectInput/ItemView/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts +11 -0
- package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Option/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/Option/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +13 -0
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts +9 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts +21 -0
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Options/index.d.ts +4 -0
- package/build/types/inputs/SelectInput/Options/index.d.ts.map +1 -0
- package/build/types/inputs/{_Popover.d.ts → SelectInput/Popover/SelectInputPopover.d.ts} +3 -3
- package/build/types/inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/Popover/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/Popover/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts +33 -0
- package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.d.ts +10 -0
- package/build/types/inputs/SelectInput/SelectInput.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.messages.d.ts.map +1 -0
- package/build/types/inputs/{SelectInput.d.ts → SelectInput/SelectInput.types.d.ts} +12 -38
- package/build/types/inputs/SelectInput/SelectInput.types.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/SelectInput.utils.d.ts +61 -0
- package/build/types/inputs/SelectInput/SelectInput.utils.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +12 -0
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts +3 -0
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/components.d.ts +10 -0
- package/build/types/inputs/SelectInput/components.d.ts.map +1 -0
- package/build/types/inputs/SelectInput/index.d.ts +12 -0
- package/build/types/inputs/SelectInput/index.d.ts.map +1 -0
- package/build/types/legacylistItem/LegacyListItem.d.ts +1 -1
- package/build/types/list/List.d.ts +0 -1
- package/build/types/list/List.d.ts.map +1 -1
- package/build/types/listItem/Button/ListItemButton.d.ts +0 -4
- package/build/types/listItem/Button/ListItemButton.d.ts.map +1 -1
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts +1 -3
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +1 -1
- package/build/types/listItem/Image/ListItemImage.d.ts +0 -2
- package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +0 -3
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/loader/Loader.d.ts +1 -5
- package/build/types/loader/Loader.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +1 -4
- package/build/types/logo/Logo.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts +0 -6
- package/build/types/modal/Modal.d.ts.map +1 -1
- package/build/types/navigationOption/NavigationOption.d.ts +1 -1
- package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +1 -1
- package/build/types/nudge/Nudge.d.ts +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +1 -7
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/popover/Popover.d.ts +0 -1
- package/build/types/popover/Popover.d.ts.map +1 -1
- package/build/types/processIndicator/ProcessIndicator.d.ts +0 -2
- package/build/types/processIndicator/ProcessIndicator.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +1 -8
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts +0 -1
- package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -1
- package/build/types/radioOption/RadioOption.d.ts +1 -1
- package/build/types/select/Select.d.ts +0 -4
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +1 -3
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/summary/Summary.d.ts +4 -7
- package/build/types/summary/Summary.d.ts.map +1 -1
- package/build/types/switchOption/SwitchOption.d.ts +1 -1
- package/build/types/tabs/Tabs.d.ts +0 -2
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts +1 -14
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts +0 -6
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +1 -10
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +0 -3
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +1 -1
- package/src/accordion/Accordion.tsx +2 -8
- package/src/actionButton/ActionButton.tsx +3 -4
- package/src/actionOption/ActionOption.tsx +1 -1
- package/src/alert/Alert.tsx +2 -5
- package/src/avatar/Avatar.tsx +0 -4
- package/src/avatarLayout/AvatarLayout.tsx +1 -5
- package/src/badge/Badge.tsx +0 -2
- package/src/body/Body.tsx +6 -2
- package/src/button/Button.types.ts +1 -4
- package/src/button/LegacyButton.tsx +4 -4
- package/src/card/Card.tsx +0 -1
- package/src/checkboxButton/CheckboxButton.tsx +0 -1
- package/src/checkboxOption/CheckboxOption.tsx +1 -1
- package/src/circularButton/CircularButton.tsx +2 -1
- package/src/common/propsValues/type.ts +1 -1
- package/src/common/propsValues/typography.ts +2 -2
- package/src/criticalBanner/CriticalCommsBanner.css +33 -15
- package/src/criticalBanner/CriticalCommsBanner.less +46 -36
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +9 -15
- package/src/criticalBanner/CriticalCommsBanner.test.story.tsx +70 -0
- package/src/criticalBanner/CriticalCommsBanner.test.tsx +66 -0
- package/src/criticalBanner/CriticalCommsBanner.tsx +54 -5
- package/src/criticalBanner/index.ts +1 -0
- package/src/dateInput/DateInput.tsx +0 -5
- package/src/dimmer/Dimmer.tsx +0 -6
- package/src/drawer/Drawer.tsx +2 -8
- package/src/field/Field.tsx +2 -5
- package/src/flowNavigation/FlowNavigation.tsx +0 -3
- package/src/header/Header.tsx +1 -5
- package/src/iconButton/IconButton.tsx +0 -3
- package/src/index.ts +1 -0
- package/src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +96 -0
- package/src/inputs/{_BottomSheet.tsx → SelectInput/BottomSheet/SelectInputBottomSheet.tsx} +7 -7
- package/src/inputs/SelectInput/BottomSheet/index.ts +2 -0
- package/src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +16 -0
- package/src/inputs/{_ButtonInput.tsx → SelectInput/ButtonInput/SelectInputButtonInput.tsx} +5 -5
- package/src/inputs/SelectInput/ButtonInput/index.ts +2 -0
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.css +46 -0
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.less +40 -0
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx +29 -0
- package/src/inputs/SelectInput/ClearButton/index.ts +2 -0
- package/src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx +74 -0
- package/src/inputs/SelectInput/DefaultRenderTrigger/index.ts +5 -0
- package/src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx +61 -0
- package/src/inputs/SelectInput/ItemView/GroupItemView/index.ts +2 -0
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.css +16 -0
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.less +17 -0
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.tsx +48 -0
- package/src/inputs/SelectInput/ItemView/index.ts +3 -0
- package/src/inputs/SelectInput/Option/SelectInputOption.css +33 -0
- package/src/inputs/SelectInput/Option/SelectInputOption.less +32 -0
- package/src/inputs/SelectInput/Option/SelectInputOption.tsx +57 -0
- package/src/inputs/SelectInput/Option/index.ts +2 -0
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +37 -0
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.less +38 -0
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +72 -0
- package/src/inputs/SelectInput/OptionContent/index.ts +2 -0
- package/src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx +59 -0
- package/src/inputs/SelectInput/Options/OptionsContainer/index.ts +2 -0
- package/src/inputs/SelectInput/Options/SelectInputOptions.css +81 -0
- package/src/inputs/SelectInput/Options/SelectInputOptions.less +77 -0
- package/src/inputs/SelectInput/Options/SelectInputOptions.tsx +411 -0
- package/src/inputs/SelectInput/Options/index.ts +3 -0
- package/src/inputs/SelectInput/Popover/SelectInputPopover.css +46 -0
- package/src/inputs/{_Popover.tsx → SelectInput/Popover/SelectInputPopover.tsx} +7 -7
- package/src/inputs/SelectInput/Popover/index.ts +2 -0
- package/src/inputs/SelectInput/SelectInput.contexts.tsx +40 -0
- package/src/inputs/SelectInput/SelectInput.less +22 -0
- package/src/inputs/{SelectInput.test.tsx → SelectInput/SelectInput.test.tsx} +9 -11
- package/src/inputs/SelectInput/SelectInput.tsx +257 -0
- package/src/inputs/SelectInput/SelectInput.types.ts +113 -0
- package/src/inputs/SelectInput/SelectInput.utils.ts +206 -0
- package/src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +36 -0
- package/src/inputs/SelectInput/TriggerButton/index.ts +5 -0
- package/src/inputs/{SelectInput.docs.mdx → SelectInput/_stories/SelectInput.docs.mdx} +0 -1
- package/src/inputs/{SelectInput.story.tsx → SelectInput/_stories/SelectInput.story.tsx} +11 -8
- package/src/inputs/{SelectInput.test.story.tsx → SelectInput/_stories/SelectInput.test.story.tsx} +5 -10
- package/src/inputs/SelectInput/components.ts +10 -0
- package/src/inputs/SelectInput/index.ts +14 -0
- package/src/legacylistItem/LegacyListItem.tsx +1 -1
- package/src/list/List.tsx +0 -1
- package/src/listItem/Button/ListItemButton.tsx +0 -2
- package/src/listItem/IconButton/ListItemIconButton.tsx +1 -3
- package/src/listItem/Image/ListItemImage.tsx +0 -2
- package/src/listItem/ListItem.tsx +0 -2
- package/src/loader/Loader.tsx +2 -6
- package/src/logo/Logo.tsx +1 -4
- package/src/main.css +123 -105
- package/src/main.less +1 -1
- package/src/modal/Modal.tsx +0 -6
- package/src/navigationOption/NavigationOption.tsx +1 -1
- package/src/navigationOptionsList/NavigationOptionsList.tsx +1 -1
- package/src/nudge/Nudge.tsx +1 -1
- package/src/phoneNumberInput/PhoneNumberInput.tsx +1 -7
- package/src/popover/Popover.tsx +0 -1
- package/src/processIndicator/ProcessIndicator.tsx +0 -2
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +1 -8
- package/src/prompt/InlinePrompt/InlinePrompt.tsx +0 -1
- package/src/radioOption/RadioOption.tsx +1 -1
- package/src/select/Select.tsx +0 -4
- package/src/statusIcon/StatusIcon.tsx +1 -3
- package/src/summary/Summary.tsx +4 -7
- package/src/switchOption/SwitchOption.tsx +1 -1
- package/src/tabs/Tabs.tsx +0 -2
- package/src/typeahead/Typeahead.tsx +2 -14
- package/src/upload/Upload.tsx +0 -6
- package/src/uploadInput/UploadInput.tsx +4 -12
- package/src/withDisplayFormat/WithDisplayFormat.tsx +0 -3
- package/build/inputs/SelectInput.js +0 -890
- package/build/inputs/SelectInput.js.map +0 -1
- package/build/inputs/SelectInput.messages.js.map +0 -1
- package/build/inputs/SelectInput.messages.mjs.map +0 -1
- package/build/inputs/SelectInput.mjs +0 -881
- package/build/inputs/SelectInput.mjs.map +0 -1
- package/build/inputs/_BottomSheet.js.map +0 -1
- package/build/inputs/_BottomSheet.mjs.map +0 -1
- package/build/inputs/_ButtonInput.js.map +0 -1
- package/build/inputs/_ButtonInput.mjs.map +0 -1
- package/build/inputs/_Popover.js.map +0 -1
- package/build/inputs/_Popover.mjs.map +0 -1
- package/build/types/inputs/SelectInput.d.ts.map +0 -1
- package/build/types/inputs/SelectInput.messages.d.ts.map +0 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +0 -1
- package/build/types/inputs/_ButtonInput.d.ts +0 -5
- package/build/types/inputs/_ButtonInput.d.ts.map +0 -1
- package/build/types/inputs/_Popover.d.ts.map +0 -1
- package/src/inputs/SelectInput.less +0 -219
- package/src/inputs/SelectInput.tsx +0 -1269
- package/build/inputs/{SelectInput.messages.js → SelectInput/SelectInput.messages.js} +0 -0
- package/build/inputs/{SelectInput.messages.mjs → SelectInput/SelectInput.messages.mjs} +0 -0
- package/build/styles/inputs/{SelectInput.css → SelectInput/SelectInput.css} +90 -90
- package/build/types/inputs/{SelectInput.messages.d.ts → SelectInput/SelectInput.messages.d.ts} +0 -0
- package/src/inputs/{_BottomSheet.less → SelectInput/BottomSheet/SelectInputBottomSheet.less} +0 -0
- package/src/inputs/{_ButtonInput.less → SelectInput/ButtonInput/SelectInputButtonInput.less} +0 -0
- package/src/inputs/{_Popover.less → SelectInput/Popover/SelectInputPopover.less} +0 -0
- package/src/inputs/{SelectInput.css → SelectInput/SelectInput.css} +90 -90
- /package/src/inputs/{SelectInput.messages.ts → SelectInput/SelectInput.messages.ts} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { render, screen, mockMatchMedia } from '../test-utils';
|
|
2
|
+
|
|
3
|
+
import CriticalCommsBanner from './CriticalCommsBanner';
|
|
4
|
+
|
|
5
|
+
mockMatchMedia();
|
|
6
|
+
|
|
7
|
+
describe('CriticalCommsBanner', () => {
|
|
8
|
+
const defaultProps = {
|
|
9
|
+
title: 'Test title',
|
|
10
|
+
subtitle: 'Test subtitle',
|
|
11
|
+
action: { label: 'Take action', href: 'https://wise.com' },
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
it('renders with default negative sentiment', () => {
|
|
15
|
+
render(<CriticalCommsBanner {...defaultProps} />);
|
|
16
|
+
|
|
17
|
+
expect(screen.getByText('Test title')).toBeInTheDocument();
|
|
18
|
+
expect(screen.getByText('Test subtitle')).toBeInTheDocument();
|
|
19
|
+
expect(screen.getByTestId('alert')).toHaveClass('alert-negative');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('renders the action', () => {
|
|
23
|
+
render(<CriticalCommsBanner {...defaultProps} />);
|
|
24
|
+
|
|
25
|
+
expect(screen.getByText('Take action')).toBeInTheDocument();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
describe('sentiment variants', () => {
|
|
29
|
+
it('renders negative sentiment with correct alert type and icon', () => {
|
|
30
|
+
render(<CriticalCommsBanner {...defaultProps} sentiment="negative" />);
|
|
31
|
+
|
|
32
|
+
expect(screen.getByTestId('alert')).toHaveClass('alert-negative');
|
|
33
|
+
// Custom icon replaces the default StatusIcon
|
|
34
|
+
expect(screen.queryByTestId('status-icon')).not.toBeInTheDocument();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('renders warning sentiment with correct alert type and icon', () => {
|
|
38
|
+
render(<CriticalCommsBanner {...defaultProps} sentiment="warning" />);
|
|
39
|
+
|
|
40
|
+
expect(screen.getByTestId('alert')).toHaveClass('alert-warning');
|
|
41
|
+
expect(screen.queryByTestId('status-icon')).not.toBeInTheDocument();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('renders neutral sentiment with correct alert type and icon', () => {
|
|
45
|
+
render(<CriticalCommsBanner {...defaultProps} sentiment="neutral" />);
|
|
46
|
+
|
|
47
|
+
expect(screen.getByTestId('alert')).toHaveClass('alert-neutral');
|
|
48
|
+
expect(screen.queryByTestId('status-icon')).not.toBeInTheDocument();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('wraps content in SentimentSurface with elevated emphasis', () => {
|
|
53
|
+
render(<CriticalCommsBanner {...defaultProps} sentiment="warning" />);
|
|
54
|
+
|
|
55
|
+
const surface = screen.getByTestId('alert').closest('.critical-comms');
|
|
56
|
+
expect(surface).toHaveClass('wds-sentiment-surface');
|
|
57
|
+
expect(surface).toHaveClass('wds-sentiment-surface-warning-elevated');
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('applies className to the wrapper', () => {
|
|
61
|
+
render(<CriticalCommsBanner {...defaultProps} className="custom-class" />);
|
|
62
|
+
|
|
63
|
+
const surface = screen.getByTestId('alert').closest('.critical-comms');
|
|
64
|
+
expect(surface).toHaveClass('custom-class');
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import Alert from '
|
|
1
|
+
import { Alert as AlertIcon, ClockBorderless as ClockIcon } from '@transferwise/icons';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
+
import { PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
import Alert from '../alert';
|
|
6
|
+
import { Sentiment } from '../common';
|
|
7
|
+
import Circle, { CircleProps } from '../common/circle';
|
|
8
|
+
import SentimentSurface from '../sentimentSurface';
|
|
9
|
+
|
|
10
|
+
export type CriticalCommsBannerSentiment =
|
|
11
|
+
| `${Sentiment.WARNING}`
|
|
12
|
+
| `${Sentiment.NEGATIVE}`
|
|
13
|
+
| `${Sentiment.NEUTRAL}`;
|
|
3
14
|
|
|
4
15
|
export type CriticalCommsBannerProps = {
|
|
5
16
|
title: string;
|
|
@@ -9,20 +20,58 @@ export type CriticalCommsBannerProps = {
|
|
|
9
20
|
href?: string;
|
|
10
21
|
onClick?: () => void;
|
|
11
22
|
};
|
|
23
|
+
sentiment?: CriticalCommsBannerSentiment;
|
|
12
24
|
className?: string;
|
|
13
25
|
};
|
|
14
26
|
|
|
15
|
-
|
|
27
|
+
const makeSurface = (sentiment: CriticalCommsBannerSentiment) => {
|
|
28
|
+
const Surface = (props: PropsWithChildren<Pick<CircleProps, 'className'>>) => (
|
|
29
|
+
<SentimentSurface as="span" emphasis="elevated" sentiment={sentiment} {...props} />
|
|
30
|
+
);
|
|
31
|
+
Surface.displayName = `CriticalCommsSurface(${sentiment})`;
|
|
32
|
+
return Surface;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const iconBySentiment: Record<CriticalCommsBannerSentiment, React.ReactNode> = {
|
|
36
|
+
[Sentiment.NEGATIVE]: (
|
|
37
|
+
<Circle as={makeSurface(Sentiment.NEGATIVE)} size={32} className="status-circle negative">
|
|
38
|
+
<AlertIcon className="status-icon light" />
|
|
39
|
+
</Circle>
|
|
40
|
+
),
|
|
41
|
+
[Sentiment.WARNING]: (
|
|
42
|
+
<Circle as={makeSurface(Sentiment.WARNING)} size={32} className="status-circle warning">
|
|
43
|
+
<AlertIcon className="status-icon dark" />
|
|
44
|
+
</Circle>
|
|
45
|
+
),
|
|
46
|
+
[Sentiment.NEUTRAL]: (
|
|
47
|
+
<Circle as={makeSurface(Sentiment.NEUTRAL)} size={32} className="status-circle neutral">
|
|
48
|
+
<ClockIcon className="status-icon dark" />
|
|
49
|
+
</Circle>
|
|
50
|
+
),
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
function CriticalCommsBanner({
|
|
54
|
+
title,
|
|
55
|
+
subtitle,
|
|
56
|
+
action,
|
|
57
|
+
sentiment = Sentiment.NEGATIVE,
|
|
58
|
+
className,
|
|
59
|
+
}: CriticalCommsBannerProps) {
|
|
16
60
|
return (
|
|
17
|
-
<
|
|
61
|
+
<SentimentSurface
|
|
62
|
+
sentiment={sentiment}
|
|
63
|
+
emphasis="elevated"
|
|
64
|
+
className={clsx('critical-comms', className)}
|
|
65
|
+
>
|
|
18
66
|
<Alert
|
|
19
67
|
title={title}
|
|
20
68
|
message={subtitle}
|
|
21
69
|
action={{ onClick: action?.onClick, target: action?.href, text: action?.label }}
|
|
22
70
|
className={className}
|
|
23
|
-
type=
|
|
71
|
+
type={sentiment}
|
|
72
|
+
icon={iconBySentiment[sentiment]}
|
|
24
73
|
/>
|
|
25
|
-
</
|
|
74
|
+
</SentimentSurface>
|
|
26
75
|
);
|
|
27
76
|
}
|
|
28
77
|
|
|
@@ -27,9 +27,7 @@ export interface DateInputProps {
|
|
|
27
27
|
/** @deprecated Use `Field` wrapper or the `aria-labelledby` attribute instead. */
|
|
28
28
|
'aria-label'?: string;
|
|
29
29
|
'aria-labelledby'?: string;
|
|
30
|
-
/** @default false */
|
|
31
30
|
disabled?: boolean;
|
|
32
|
-
/** @default 'md' */
|
|
33
31
|
size?: SizeSmall | SizeMedium | SizeLarge;
|
|
34
32
|
value?: Date | string;
|
|
35
33
|
onChange: (value: string | null) => void;
|
|
@@ -40,9 +38,7 @@ export interface DateInputProps {
|
|
|
40
38
|
monthLabel?: string;
|
|
41
39
|
yearLabel?: string;
|
|
42
40
|
yearAutoComplete?: string;
|
|
43
|
-
/** @default 'long' */
|
|
44
41
|
monthFormat?: `${MonthFormat}`;
|
|
45
|
-
/** @default 'day-month-year' */
|
|
46
42
|
mode?: `${DateMode}`;
|
|
47
43
|
placeholders?: {
|
|
48
44
|
day?: string;
|
|
@@ -50,7 +46,6 @@ export interface DateInputProps {
|
|
|
50
46
|
year?: string;
|
|
51
47
|
};
|
|
52
48
|
id?: string;
|
|
53
|
-
/** @default {} */
|
|
54
49
|
selectProps?: Partial<SelectInputProps<number | null>>;
|
|
55
50
|
}
|
|
56
51
|
|
package/src/dimmer/Dimmer.tsx
CHANGED
|
@@ -23,18 +23,12 @@ const dimmerManager = new DimmerManager();
|
|
|
23
23
|
|
|
24
24
|
export type DimmerProps = CommonProps & {
|
|
25
25
|
children?: ReactNode;
|
|
26
|
-
/** @default false */
|
|
27
26
|
disableClickToClose?: boolean;
|
|
28
27
|
contentPosition?: PositionTop | PositionCenter | PositionBottom;
|
|
29
|
-
/** @default false */
|
|
30
28
|
fadeContentOnEnter?: boolean;
|
|
31
|
-
/** @default false */
|
|
32
29
|
fadeContentOnExit?: boolean;
|
|
33
|
-
/** @default false */
|
|
34
30
|
open?: boolean;
|
|
35
|
-
/** @default false */
|
|
36
31
|
scrollable?: boolean;
|
|
37
|
-
/** @default false */
|
|
38
32
|
transparent?: boolean;
|
|
39
33
|
onClose?: (event: KeyboardEvent | MouseEvent) => void;
|
|
40
34
|
onExited?: () => void;
|
package/src/drawer/Drawer.tsx
CHANGED
|
@@ -21,15 +21,9 @@ export type DrawerProps = {
|
|
|
21
21
|
footerContent?: React.ReactNode;
|
|
22
22
|
/** The content to appear in the drawer header. */
|
|
23
23
|
headerTitle?: React.ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* The status of Drawer either open or not.
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
24
|
+
/** The status of Drawer either open or not. */
|
|
28
25
|
open?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* The placement of Drawer on the screen either left or right. On mobile it will default to bottom.
|
|
31
|
-
* @default 'right'
|
|
32
|
-
*/
|
|
26
|
+
/** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */
|
|
33
27
|
position?: `${Position.LEFT | Position.RIGHT | Position.BOTTOM}`;
|
|
34
28
|
/** The action to perform on close click. */
|
|
35
29
|
onClose?: (event: KeyboardEvent | React.MouseEvent) => void;
|
package/src/field/Field.tsx
CHANGED
|
@@ -16,9 +16,8 @@ export type FieldProps = {
|
|
|
16
16
|
id?: string | null;
|
|
17
17
|
/** Should be specified unless the wrapped control has its own labeling mechanism, e.g. `Checkbox`. */
|
|
18
18
|
label?: React.ReactNode;
|
|
19
|
-
/** @default true */
|
|
20
19
|
required?: boolean;
|
|
21
|
-
/** @deprecated
|
|
20
|
+
/** @deprecated use `description` prop instead */
|
|
22
21
|
hint?: React.ReactNode;
|
|
23
22
|
message?: React.ReactNode;
|
|
24
23
|
/**
|
|
@@ -28,13 +27,11 @@ export type FieldProps = {
|
|
|
28
27
|
messageIconLabel?: string;
|
|
29
28
|
/**
|
|
30
29
|
* If true, shows a loading spinner in place of the message icon of the InlinePrompt
|
|
31
|
-
* @default false
|
|
32
30
|
*/
|
|
33
31
|
messageLoading?: boolean;
|
|
34
32
|
description?: React.ReactNode;
|
|
35
|
-
/** @deprecated
|
|
33
|
+
/** @deprecated use `message` and `type={Sentiment.NEGATIVE}` prop instead */
|
|
36
34
|
error?: React.ReactNode;
|
|
37
|
-
/** @default Sentiment.NEUTRAL */
|
|
38
35
|
sentiment?: InlinePromptProps['sentiment'];
|
|
39
36
|
className?: string;
|
|
40
37
|
children?: React.ReactNode;
|
|
@@ -14,12 +14,9 @@ import IconButton from '../iconButton';
|
|
|
14
14
|
import { ArrowLeft } from '@transferwise/icons';
|
|
15
15
|
|
|
16
16
|
export interface FlowNavigationProps {
|
|
17
|
-
/** @default 0 */
|
|
18
17
|
activeStep?: number;
|
|
19
18
|
avatar?: React.ReactNode;
|
|
20
|
-
/** @default <Logo /> */
|
|
21
19
|
logo?: React.ReactNode;
|
|
22
|
-
/** @default false */
|
|
23
20
|
done?: boolean;
|
|
24
21
|
/** Called when the close button is clicked. If not provided the close button won't show */
|
|
25
22
|
onClose?: () => void;
|
package/src/header/Header.tsx
CHANGED
|
@@ -29,17 +29,13 @@ export interface HeaderProps extends CommonProps {
|
|
|
29
29
|
* If this condition is not met, a warning will be logged to the console.
|
|
30
30
|
*
|
|
31
31
|
* - Other valid values include standard heading tags (`h1` to `h6`) or `header`.
|
|
32
|
-
* @default 'h5'
|
|
33
32
|
*/
|
|
34
33
|
as?: Heading | 'legend' | 'header';
|
|
35
34
|
|
|
36
35
|
/** Required prop to set the title of the Header. */
|
|
37
36
|
title: ReactNode;
|
|
38
37
|
|
|
39
|
-
/**
|
|
40
|
-
* Optional prop to specify the level of the Header
|
|
41
|
-
* @default 'group'
|
|
42
|
-
*/
|
|
38
|
+
/** Optional prop to specify the level of the Header */
|
|
43
39
|
level?: 'section' | 'group';
|
|
44
40
|
|
|
45
41
|
className?: string;
|
|
@@ -4,11 +4,8 @@ import Circle from '../common/circle';
|
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
|
|
6
6
|
export type Props = {
|
|
7
|
-
/** @default 48 */
|
|
8
7
|
size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
9
|
-
/** @default 'primary' */
|
|
10
8
|
priority?: 'primary' | 'secondary' | 'tertiary' | 'minimal';
|
|
11
|
-
/** @default 'default' */
|
|
12
9
|
type?: 'default' | 'negative';
|
|
13
10
|
'data-testid'?: string;
|
|
14
11
|
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick'> &
|
package/src/index.ts
CHANGED
|
@@ -156,6 +156,7 @@ export { default as Option } from './common/Option';
|
|
|
156
156
|
export { default as BottomSheet } from './common/bottomSheet';
|
|
157
157
|
export { default as BaseCard } from './common/baseCard';
|
|
158
158
|
export { default as CriticalCommsBanner } from './criticalBanner';
|
|
159
|
+
export type { CriticalCommsBannerProps } from './criticalBanner';
|
|
159
160
|
export { default as DateInput } from './dateInput';
|
|
160
161
|
export { default as DateLookup } from './dateLookup';
|
|
161
162
|
export { default as Decision } from './decision';
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
.np-bottom-sheet-v2-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
z-index: 1060;
|
|
4
|
+
}
|
|
5
|
+
.np-bottom-sheet-v2-backdrop {
|
|
6
|
+
position: fixed;
|
|
7
|
+
inset: 0px;
|
|
8
|
+
background-color: #37517e;
|
|
9
|
+
background-color: var(--color-content-primary);
|
|
10
|
+
opacity: 0.4;
|
|
11
|
+
transition-property: opacity;
|
|
12
|
+
transition-timing-function: ease-out;
|
|
13
|
+
transition-duration: 300ms;
|
|
14
|
+
}
|
|
15
|
+
.np-bottom-sheet-v2-backdrop--closed {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
}
|
|
18
|
+
.np-bottom-sheet-v2 {
|
|
19
|
+
position: fixed;
|
|
20
|
+
inset: 0px;
|
|
21
|
+
bottom: env(keyboard-inset-height, 0px);
|
|
22
|
+
margin-left: 8px;
|
|
23
|
+
margin-left: var(--size-8);
|
|
24
|
+
margin-right: 8px;
|
|
25
|
+
margin-right: var(--size-8);
|
|
26
|
+
margin-top: 64px;
|
|
27
|
+
margin-top: var(--size-64);
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: flex-end;
|
|
31
|
+
}
|
|
32
|
+
.np-bottom-sheet-v2-content {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
overflow: auto;
|
|
36
|
+
border-top-left-radius: 32px;
|
|
37
|
+
/* TODO: Tokenize */
|
|
38
|
+
border-top-right-radius: 32px;
|
|
39
|
+
/* TODO: Tokenize */
|
|
40
|
+
background-color: #ffffff;
|
|
41
|
+
background-color: var(--color-background-elevated);
|
|
42
|
+
box-shadow: 0 0 40px rgba(69, 71, 69, 0.2);
|
|
43
|
+
}
|
|
44
|
+
.np-bottom-sheet-v2-content:focus {
|
|
45
|
+
outline: none;
|
|
46
|
+
}
|
|
47
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
48
|
+
.np-bottom-sheet-v2-content {
|
|
49
|
+
transition-property: transform;
|
|
50
|
+
transition-timing-function: ease-out;
|
|
51
|
+
transition-duration: 300ms;
|
|
52
|
+
}
|
|
53
|
+
.np-bottom-sheet-v2-content--closed {
|
|
54
|
+
transform: translateY(100%);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
.np-bottom-sheet-v2-content {
|
|
59
|
+
transition-property: opacity;
|
|
60
|
+
transition-timing-function: ease-out;
|
|
61
|
+
transition-duration: 300ms;
|
|
62
|
+
}
|
|
63
|
+
.np-bottom-sheet-v2-content--closed {
|
|
64
|
+
opacity: 0;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
.np-bottom-sheet-v2-header {
|
|
68
|
+
align-self: flex-end;
|
|
69
|
+
padding: 16px;
|
|
70
|
+
padding: var(--size-16);
|
|
71
|
+
}
|
|
72
|
+
.np-bottom-sheet-v2-content-inner {
|
|
73
|
+
display: grid;
|
|
74
|
+
grid-template-rows: minmax(0, 1fr);
|
|
75
|
+
grid-row-gap: 8px;
|
|
76
|
+
grid-row-gap: var(--size-8);
|
|
77
|
+
row-gap: 8px;
|
|
78
|
+
row-gap: var(--size-8);
|
|
79
|
+
overflow: auto;
|
|
80
|
+
}
|
|
81
|
+
.np-bottom-sheet-v2-content-inner--has-title {
|
|
82
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
83
|
+
}
|
|
84
|
+
.np-bottom-sheet-v2-content-inner--padding-md {
|
|
85
|
+
padding: 16px;
|
|
86
|
+
padding: var(--size-16);
|
|
87
|
+
padding-top: 0px;
|
|
88
|
+
}
|
|
89
|
+
.np-bottom-sheet-v2-title {
|
|
90
|
+
color: #37517e;
|
|
91
|
+
color: var(--color-content-primary);
|
|
92
|
+
}
|
|
93
|
+
.np-bottom-sheet-v2-body {
|
|
94
|
+
color: #5d7079;
|
|
95
|
+
color: var(--color-content-secondary);
|
|
96
|
+
}
|
|
@@ -12,12 +12,12 @@ import { ThemeProvider, useTheme } from '@wise/components-theming';
|
|
|
12
12
|
import { clsx } from 'clsx';
|
|
13
13
|
import { Fragment, useState } from 'react';
|
|
14
14
|
|
|
15
|
-
import { CloseButton } from '
|
|
16
|
-
import { useVirtualKeyboard } from '
|
|
17
|
-
import { PreventScroll } from '
|
|
18
|
-
import { Size } from '
|
|
15
|
+
import { CloseButton } from '../../../common/closeButton';
|
|
16
|
+
import { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard';
|
|
17
|
+
import { PreventScroll } from '../../../common/preventScroll/PreventScroll';
|
|
18
|
+
import { Size } from '../../../common/propsValues/size';
|
|
19
19
|
|
|
20
|
-
export interface
|
|
20
|
+
export interface SelectInputBottomSheetProps {
|
|
21
21
|
open: boolean;
|
|
22
22
|
renderTrigger?: (args: {
|
|
23
23
|
ref: React.RefCallback<Element>;
|
|
@@ -33,7 +33,7 @@ export interface BottomSheetProps {
|
|
|
33
33
|
onCloseEnd?: () => void;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export function
|
|
36
|
+
export function SelectInputBottomSheet({
|
|
37
37
|
open,
|
|
38
38
|
renderTrigger,
|
|
39
39
|
title,
|
|
@@ -42,7 +42,7 @@ export function BottomSheet({
|
|
|
42
42
|
children,
|
|
43
43
|
onClose,
|
|
44
44
|
onCloseEnd,
|
|
45
|
-
}:
|
|
45
|
+
}: SelectInputBottomSheetProps) {
|
|
46
46
|
useVirtualKeyboard(open);
|
|
47
47
|
|
|
48
48
|
const { refs, context } = useFloating<Element>({
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.np-button-input {
|
|
2
|
+
display: inline-grid;
|
|
3
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
4
|
+
align-content: center;
|
|
5
|
+
border-radius: 10px;
|
|
6
|
+
border-radius: var(--size-10);
|
|
7
|
+
text-align: start;
|
|
8
|
+
}
|
|
9
|
+
.np-button-input:has(.np-select-input-option-description-in-trigger) {
|
|
10
|
+
height: auto !important;
|
|
11
|
+
align-content: start;
|
|
12
|
+
padding-top: 12px !important;
|
|
13
|
+
padding-top: var(--size-12) !important;
|
|
14
|
+
padding-bottom: 12px !important;
|
|
15
|
+
padding-bottom: var(--size-12) !important;
|
|
16
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
|
|
4
|
-
import { useInputPaddings } from '
|
|
5
|
-
import { inputClassNameBase } from '
|
|
4
|
+
import { useInputPaddings } from '../../InputGroup';
|
|
5
|
+
import { inputClassNameBase } from '../../_common';
|
|
6
6
|
|
|
7
|
-
export interface
|
|
7
|
+
export interface SelectInputButtonInputProps extends React.ComponentPropsWithRef<'button'> {
|
|
8
8
|
size?: 'sm' | 'md' | 'lg';
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
12
|
-
{ size = 'md', className, style, ...restProps }:
|
|
11
|
+
export const SelectInputButtonInput = forwardRef(function ButtonInput(
|
|
12
|
+
{ size = 'md', className, style, ...restProps }: SelectInputButtonInputProps,
|
|
13
13
|
ref: React.ForwardedRef<HTMLButtonElement | null>,
|
|
14
14
|
) {
|
|
15
15
|
const inputPaddings = useInputPaddings();
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.np-select-input-addon-container {
|
|
2
|
+
pointer-events: none;
|
|
3
|
+
margin-inline-start: 4px;
|
|
4
|
+
margin-inline-start: var(--size-4);
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
}
|
|
8
|
+
.np-select-input-addon-container > :not([hidden]) ~ :not([hidden]) {
|
|
9
|
+
margin-inline-start: 4px;
|
|
10
|
+
margin-inline-start: var(--size-4);
|
|
11
|
+
}
|
|
12
|
+
.np-select-input-addon {
|
|
13
|
+
border-width: 0;
|
|
14
|
+
background: none;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
height: 24px;
|
|
17
|
+
height: var(--size-24);
|
|
18
|
+
width: 24px;
|
|
19
|
+
width: var(--size-24);
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
border-radius: 0.125rem /* 2px */;
|
|
23
|
+
/* TODO: Tokenize */
|
|
24
|
+
}
|
|
25
|
+
.np-select-input-addon--interactive {
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
color: #c9cbce;
|
|
28
|
+
color: var(--color-interactive-secondary);
|
|
29
|
+
}
|
|
30
|
+
.np-select-input-addon--interactive:hover {
|
|
31
|
+
color: #b5b7ba;
|
|
32
|
+
color: var(--color-interactive-secondary-hover);
|
|
33
|
+
}
|
|
34
|
+
.np-select-input-addon--interactive:focus {
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
.np-select-input-addon--interactive:focus-visible {
|
|
38
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
39
|
+
outline-offset: var(--ring-outline-offset);
|
|
40
|
+
}
|
|
41
|
+
.np-select-input-addon-separator {
|
|
42
|
+
height: 24px;
|
|
43
|
+
height: var(--size-24);
|
|
44
|
+
border-inline-start: 1px solid rgba(0,0,0,0.10196);
|
|
45
|
+
border-inline-start: 1px solid var(--color-border-neutral);
|
|
46
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@import (reference) "../../../../node_modules/@transferwise/neptune-css/src/less/ring.less";
|
|
2
|
+
|
|
3
|
+
.np-select-input-addon-container {
|
|
4
|
+
pointer-events: none;
|
|
5
|
+
margin-inline-start: var(--size-4);
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
|
|
9
|
+
& > :not([hidden]) ~ :not([hidden]) {
|
|
10
|
+
margin-inline-start: var(--size-4);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.np-select-input-addon {
|
|
15
|
+
border-width: 0;
|
|
16
|
+
background: none;
|
|
17
|
+
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
height: var(--size-24);
|
|
20
|
+
width: var(--size-24);
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
border-radius: 0.125rem /* 2px */; /* TODO: Tokenize */
|
|
24
|
+
|
|
25
|
+
&--interactive {
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
color: var(--color-interactive-secondary);
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
color: var(--color-interactive-secondary-hover);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.focus-ring();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.np-select-input-addon-separator {
|
|
38
|
+
height: var(--size-24);
|
|
39
|
+
border-inline-start: 1px solid var(--color-border-neutral);
|
|
40
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Cross } from '@transferwise/icons';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import dateTriggerMessages from '../../../dateLookup/dateTrigger/DateTrigger.messages';
|
|
5
|
+
|
|
6
|
+
export interface SelectInputClearButtonProps extends Pick<
|
|
7
|
+
React.ComponentPropsWithoutRef<'button'>,
|
|
8
|
+
'className' | 'onClick'
|
|
9
|
+
> {}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A button component used to clear the selected value in a SelectInput.
|
|
13
|
+
*/
|
|
14
|
+
export function SelectInputClearButton({ className, onClick }: SelectInputClearButtonProps) {
|
|
15
|
+
const intl = useIntl();
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<button
|
|
19
|
+
type="button"
|
|
20
|
+
aria-label={intl.formatMessage(dateTriggerMessages.ariaLabel)}
|
|
21
|
+
className={clsx(className, 'np-select-input-addon np-select-input-addon--interactive')}
|
|
22
|
+
onClick={onClick}
|
|
23
|
+
>
|
|
24
|
+
<Cross size={16} />
|
|
25
|
+
</button>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Type is already exported above
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { ChevronDown } from '@transferwise/icons';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { InputGroup } from "../../InputGroup";
|
|
6
|
+
import { SelectInputClearButton } from '../ClearButton';
|
|
7
|
+
import { SelectInputTriggerButton } from '../TriggerButton';
|
|
8
|
+
import { SelectInputProps } from '../SelectInput.types';
|
|
9
|
+
import { SelectInputButtonInput } from '../ButtonInput';
|
|
10
|
+
|
|
11
|
+
export interface SelectInputDefaultRenderTriggerProps {
|
|
12
|
+
content: React.ReactNode;
|
|
13
|
+
placeholderShown: boolean;
|
|
14
|
+
clear: (() => void) | undefined;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
size: 'sm' | 'md' | 'lg';
|
|
17
|
+
className: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Default render function for the SelectInput trigger.
|
|
22
|
+
* Displays the selected value or placeholder with clear button and dropdown indicator.
|
|
23
|
+
*/
|
|
24
|
+
export function SelectInputDefaultRenderTrigger({
|
|
25
|
+
content,
|
|
26
|
+
placeholderShown,
|
|
27
|
+
clear,
|
|
28
|
+
disabled,
|
|
29
|
+
size,
|
|
30
|
+
className,
|
|
31
|
+
}: SelectInputDefaultRenderTriggerProps) {
|
|
32
|
+
return (
|
|
33
|
+
<InputGroup
|
|
34
|
+
addonEnd={{
|
|
35
|
+
content: (
|
|
36
|
+
<span className={clsx('np-select-input-addon-container', disabled && 'disabled')}>
|
|
37
|
+
{clear != null && !placeholderShown ? (
|
|
38
|
+
<>
|
|
39
|
+
<SelectInputClearButton
|
|
40
|
+
onClick={(event) => {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
clear();
|
|
43
|
+
}}
|
|
44
|
+
/>
|
|
45
|
+
<span className="np-select-input-addon-separator" />
|
|
46
|
+
</>
|
|
47
|
+
) : null}
|
|
48
|
+
<span className="np-select-input-addon">
|
|
49
|
+
<ChevronDown size={16} />
|
|
50
|
+
</span>
|
|
51
|
+
</span>
|
|
52
|
+
),
|
|
53
|
+
initialContentWidth: 24 + 4,
|
|
54
|
+
padding: 'sm',
|
|
55
|
+
}}
|
|
56
|
+
disabled={disabled}
|
|
57
|
+
className={className}
|
|
58
|
+
>
|
|
59
|
+
<SelectInputTriggerButton as={SelectInputButtonInput} size={size}>
|
|
60
|
+
<span
|
|
61
|
+
className={clsx(
|
|
62
|
+
'np-select-input-content',
|
|
63
|
+
placeholderShown && 'np-select-input-placeholder',
|
|
64
|
+
)}
|
|
65
|
+
>
|
|
66
|
+
{content}
|
|
67
|
+
</span>
|
|
68
|
+
</SelectInputTriggerButton>
|
|
69
|
+
</InputGroup>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const DefaultRenderTrigger =
|
|
74
|
+
SelectInputDefaultRenderTrigger satisfies SelectInputProps['renderTrigger'];
|