@transferwise/components 46.50.1 → 46.52.0
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 +3 -7
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs +3 -3
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/build/actionButton/ActionButton.js +2 -6
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs +2 -2
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js +2 -6
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs +2 -2
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js +3 -7
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +3 -3
- package/build/alert/Alert.mjs.map +1 -1
- package/build/avatar/Avatar.js +2 -6
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +2 -2
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/badge/Badge.js +2 -6
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +2 -2
- package/build/badge/Badge.mjs.map +1 -1
- package/build/body/Body.js +2 -6
- package/build/body/Body.js.map +1 -1
- package/build/body/Body.mjs +2 -2
- package/build/body/Body.mjs.map +1 -1
- package/build/button/Button.js +2 -6
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +2 -2
- package/build/button/Button.mjs.map +1 -1
- package/build/card/Card.js +4 -8
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs +4 -4
- package/build/card/Card.mjs.map +1 -1
- package/build/carousel/Carousel.js +5 -9
- package/build/carousel/Carousel.js.map +1 -1
- package/build/carousel/Carousel.mjs +5 -5
- package/build/carousel/Carousel.mjs.map +1 -1
- package/build/checkbox/Checkbox.js +3 -7
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs +3 -3
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/checkboxButton/CheckboxButton.js +2 -6
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.mjs +2 -2
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
- package/build/chevron/Chevron.js +3 -7
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chevron/Chevron.mjs +3 -3
- package/build/chevron/Chevron.mjs.map +1 -1
- package/build/chips/Chip.js +2 -6
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chip.mjs +2 -2
- package/build/chips/Chip.mjs.map +1 -1
- package/build/chips/Chips.js +3 -7
- package/build/chips/Chips.js.map +1 -1
- package/build/chips/Chips.mjs +3 -3
- package/build/chips/Chips.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +3 -7
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +3 -3
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/Option/Option.js +3 -7
- package/build/common/Option/Option.js.map +1 -1
- package/build/common/Option/Option.mjs +3 -3
- package/build/common/Option/Option.mjs.map +1 -1
- package/build/common/RadioButton/RadioButton.js +2 -6
- package/build/common/RadioButton/RadioButton.js.map +1 -1
- package/build/common/RadioButton/RadioButton.mjs +2 -2
- package/build/common/RadioButton/RadioButton.mjs.map +1 -1
- package/build/common/action/Action.js +2 -6
- package/build/common/action/Action.js.map +1 -1
- package/build/common/action/Action.mjs +2 -2
- package/build/common/action/Action.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +2 -6
- 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/card/Card.js +2 -6
- package/build/common/card/Card.js.map +1 -1
- package/build/common/card/Card.mjs +2 -2
- package/build/common/card/Card.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.js +2 -6
- package/build/common/closeButton/CloseButton.js.map +1 -1
- package/build/common/closeButton/CloseButton.mjs +2 -2
- package/build/common/closeButton/CloseButton.mjs.map +1 -1
- package/build/common/flowHeader/FlowHeader.js +3 -6
- package/build/common/flowHeader/FlowHeader.js.map +1 -1
- package/build/common/flowHeader/FlowHeader.mjs +3 -3
- package/build/common/flowHeader/FlowHeader.mjs.map +1 -1
- package/build/common/panel/Panel.js +4 -8
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +4 -4
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +4 -8
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +4 -4
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js +2 -6
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +2 -2
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +2 -6
- 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 -6
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +2 -2
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/dateLookup/tableLink/TableLink.js +15 -21
- package/build/dateLookup/tableLink/TableLink.js.map +1 -1
- package/build/dateLookup/tableLink/TableLink.mjs +16 -18
- package/build/dateLookup/tableLink/TableLink.mjs.map +1 -1
- package/build/decision/Decision.js +3 -7
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs +3 -3
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js +4 -8
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs +4 -4
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/dimmer/Dimmer.js +6 -10
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs +6 -6
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/display/Display.js +2 -6
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs +2 -2
- package/build/display/Display.mjs.map +1 -1
- package/build/drawer/Drawer.js +5 -9
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +5 -5
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/field/Field.js +2 -6
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +2 -2
- package/build/field/Field.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js +4 -8
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +4 -4
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js +3 -7
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs +3 -3
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
- package/build/flowNavigation/backButton/BackButton.js +2 -6
- package/build/flowNavigation/backButton/BackButton.js.map +1 -1
- package/build/flowNavigation/backButton/BackButton.mjs +2 -2
- package/build/flowNavigation/backButton/BackButton.mjs.map +1 -1
- package/build/header/Header.js +3 -7
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +3 -3
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/zh-HK.json +2 -0
- package/build/i18n/zh-HK.json.js +2 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +2 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/image/Image.js +2 -6
- package/build/image/Image.js.map +1 -1
- package/build/image/Image.mjs +2 -2
- package/build/image/Image.mjs.map +1 -1
- package/build/info/Info.js +2 -6
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.mjs +2 -2
- package/build/info/Info.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js +2 -6
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs +2 -2
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/inputs/Input.js +2 -6
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs +2 -2
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/InputGroup.js +3 -7
- package/build/inputs/InputGroup.js.map +1 -1
- package/build/inputs/InputGroup.mjs +3 -3
- package/build/inputs/InputGroup.mjs.map +1 -1
- package/build/inputs/SelectInput.js +118 -48
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs +120 -49
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/TextArea.js +2 -6
- package/build/inputs/TextArea.js.map +1 -1
- package/build/inputs/TextArea.mjs +2 -2
- package/build/inputs/TextArea.mjs.map +1 -1
- package/build/inputs/_BottomSheet.js +2 -6
- package/build/inputs/_BottomSheet.js.map +1 -1
- package/build/inputs/_BottomSheet.mjs +2 -2
- package/build/inputs/_BottomSheet.mjs.map +1 -1
- package/build/inputs/_ButtonInput.js +2 -6
- package/build/inputs/_ButtonInput.js.map +1 -1
- package/build/inputs/_ButtonInput.mjs +2 -2
- package/build/inputs/_ButtonInput.mjs.map +1 -1
- package/build/inputs/_Popover.js +3 -7
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +3 -3
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/inputs/_common.js +2 -6
- package/build/inputs/_common.js.map +1 -1
- package/build/inputs/_common.mjs +2 -2
- package/build/inputs/_common.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +2 -6
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs +2 -2
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/label/Label.js +2 -6
- package/build/label/Label.js.map +1 -1
- package/build/label/Label.mjs +2 -2
- package/build/label/Label.mjs.map +1 -1
- package/build/link/Link.js +2 -6
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +2 -2
- package/build/link/Link.mjs.map +1 -1
- package/build/listItem/ListItem.js +3 -7
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +3 -3
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/loader/Loader.js +2 -6
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs +4 -4
- package/build/loader/Loader.mjs.map +1 -1
- package/build/logo/Logo.js +2 -6
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs +2 -2
- package/build/logo/Logo.mjs.map +1 -1
- package/build/main.css +10 -0
- package/build/modal/Modal.js +7 -11
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +7 -7
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +17 -39
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +17 -35
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js +2 -6
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs +2 -2
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/nudge/Nudge.js +4 -8
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +4 -4
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/overlayHeader/OverlayHeader.js +3 -7
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.mjs +3 -3
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/popover/Popover.js +2 -6
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs +2 -2
- package/build/popover/Popover.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js +2 -6
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs +2 -2
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/progress/Progress.js +2 -6
- package/build/progress/Progress.js.map +1 -1
- package/build/progress/Progress.mjs +2 -2
- package/build/progress/Progress.mjs.map +1 -1
- package/build/progressBar/ProgressBar.js +2 -6
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs +2 -2
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/promoCard/PromoCard.js +3 -4
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCard.mjs +3 -3
- package/build/promoCard/PromoCard.mjs.map +1 -1
- package/build/promoCard/PromoCardGroup.js +2 -3
- package/build/promoCard/PromoCardGroup.js.map +1 -1
- package/build/promoCard/PromoCardGroup.mjs +2 -2
- package/build/promoCard/PromoCardGroup.mjs.map +1 -1
- package/build/promoCard/PromoCardIndicator.js +2 -6
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +2 -2
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
- package/build/radio/Radio.js +5 -9
- package/build/radio/Radio.js.map +1 -1
- package/build/radio/Radio.mjs +5 -5
- package/build/radio/Radio.mjs.map +1 -1
- package/build/section/Section.js +2 -6
- package/build/section/Section.js.map +1 -1
- package/build/section/Section.mjs +2 -2
- package/build/section/Section.mjs.map +1 -1
- package/build/segmentedControl/SegmentedControl.js +5 -9
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.mjs +5 -5
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/select/Select.js +9 -10
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +9 -9
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js +2 -6
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs +2 -2
- package/build/select/option/Option.mjs.map +1 -1
- package/build/select/searchBox/SearchBox.js +4 -8
- package/build/select/searchBox/SearchBox.js.map +1 -1
- package/build/select/searchBox/SearchBox.mjs +6 -6
- package/build/select/searchBox/SearchBox.mjs.map +1 -1
- package/build/selectOption/SelectOption.js +4 -8
- package/build/selectOption/SelectOption.js.map +1 -1
- package/build/selectOption/SelectOption.mjs +4 -4
- package/build/selectOption/SelectOption.mjs.map +1 -1
- package/build/slidingPanel/SlidingPanel.js +2 -6
- package/build/slidingPanel/SlidingPanel.js.map +1 -1
- package/build/slidingPanel/SlidingPanel.mjs +2 -2
- package/build/slidingPanel/SlidingPanel.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js +3 -7
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +3 -3
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js +3 -7
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +3 -3
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/styles/inputs/SelectInput.css +10 -0
- package/build/styles/main.css +10 -0
- package/build/summary/Summary.js +2 -6
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.mjs +2 -2
- package/build/summary/Summary.mjs.map +1 -1
- package/build/switch/Switch.js +2 -6
- package/build/switch/Switch.js.map +1 -1
- package/build/switch/Switch.mjs +2 -2
- package/build/switch/Switch.mjs.map +1 -1
- package/build/tabs/Tab.js +6 -7
- package/build/tabs/Tab.js.map +1 -1
- package/build/tabs/Tab.mjs +6 -6
- package/build/tabs/Tab.mjs.map +1 -1
- package/build/tabs/Tabs.js +2 -3
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +2 -2
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tile/Tile.js +3 -7
- package/build/tile/Tile.js.map +1 -1
- package/build/tile/Tile.mjs +3 -3
- package/build/tile/Tile.mjs.map +1 -1
- package/build/title/Title.js +3 -7
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +3 -3
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +3 -7
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +3 -3
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +6 -7
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +6 -6
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.js +2 -6
- package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +2 -2
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.js +2 -6
- package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs +2 -2
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -1
- package/build/types/accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/build/types/chevron/Chevron.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts +0 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/select/searchBox/SearchBox.d.ts.map +1 -1
- package/build/types/tabs/Tab.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
- package/build/upload/Upload.js +2 -6
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +2 -2
- package/build/upload/Upload.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js +2 -6
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +2 -2
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +5 -9
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs +5 -5
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +3 -7
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +3 -3
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js +2 -6
- package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.mjs +2 -2
- package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
- package/package.json +6 -5
- package/src/accordion/AccordionItem/AccordionItem.tsx +5 -9
- package/src/actionButton/ActionButton.tsx +2 -2
- package/src/actionOption/ActionOption.tsx +2 -2
- package/src/alert/Alert.tsx +3 -3
- package/src/avatar/Avatar.tsx +2 -2
- package/src/badge/Badge.tsx +2 -2
- package/src/body/Body.tsx +2 -2
- package/src/button/Button.tsx +2 -2
- package/src/card/Card.tsx +4 -4
- package/src/carousel/Carousel.tsx +5 -5
- package/src/checkbox/Checkbox.tsx +3 -3
- package/src/checkboxButton/CheckboxButton.tsx +2 -2
- package/src/chevron/Chevron.tsx +3 -12
- package/src/chips/Chip.tsx +2 -2
- package/src/chips/Chips.tsx +3 -3
- package/src/circularButton/CircularButton.tsx +4 -7
- package/src/common/Option/Option.tsx +3 -3
- package/src/common/RadioButton/RadioButton.tsx +2 -2
- package/src/common/action/Action.tsx +2 -2
- package/src/common/bottomSheet/BottomSheet.tsx +2 -2
- package/src/common/card/Card.tsx +2 -2
- package/src/common/closeButton/CloseButton.tsx +2 -2
- package/src/common/flowHeader/FlowHeader.tsx +3 -3
- package/src/common/panel/Panel.tsx +4 -4
- package/src/criticalBanner/CriticalCommsBanner.tsx +4 -4
- package/src/dateInput/DateInput.tsx +2 -2
- package/src/dateLookup/DateLookup.tsx +2 -2
- package/src/dateLookup/dateHeader/DateHeader.tsx +2 -2
- package/src/dateLookup/tableLink/TableLink.tsx +3 -5
- package/src/decision/Decision.tsx +3 -3
- package/src/definitionList/DefinitionList.tsx +4 -4
- package/src/dimmer/Dimmer.tsx +6 -6
- package/src/display/Display.tsx +2 -2
- package/src/drawer/Drawer.tsx +5 -5
- package/src/field/Field.tsx +3 -3
- package/src/flowNavigation/FlowNavigation.tsx +6 -7
- package/src/flowNavigation/animatedLabel/AnimatedLabel.tsx +3 -3
- package/src/flowNavigation/backButton/BackButton.tsx +2 -2
- package/src/header/Header.tsx +3 -3
- package/src/i18n/zh-HK.json +2 -0
- package/src/image/Image.tsx +2 -2
- package/src/info/Info.tsx +2 -2
- package/src/inlineAlert/InlineAlert.tsx +2 -2
- package/src/inputs/Input.tsx +2 -2
- package/src/inputs/InputGroup.tsx +3 -3
- package/src/inputs/SelectInput.css +10 -0
- package/src/inputs/SelectInput.less +12 -0
- package/src/inputs/SelectInput.story.tsx +22 -2
- package/src/inputs/SelectInput.tsx +156 -58
- package/src/inputs/TextArea.tsx +2 -2
- package/src/inputs/_BottomSheet.tsx +2 -2
- package/src/inputs/_ButtonInput.tsx +2 -2
- package/src/inputs/_Popover.tsx +3 -3
- package/src/inputs/_common.ts +2 -2
- package/src/instructionsList/InstructionsList.tsx +3 -3
- package/src/label/Label.tsx +2 -2
- package/src/link/Link.tsx +2 -7
- package/src/listItem/ListItem.tsx +3 -3
- package/src/loader/Loader.tsx +2 -2
- package/src/logo/Logo.tsx +2 -2
- package/src/main.css +10 -0
- package/src/modal/Modal.tsx +9 -15
- package/src/moneyInput/MoneyInput.story.tsx +0 -34
- package/src/moneyInput/MoneyInput.tsx +6 -29
- package/src/navigationOption/NavigationOption.tsx +2 -2
- package/src/nudge/Nudge.tsx +4 -4
- package/src/overlayHeader/OverlayHeader.tsx +3 -3
- package/src/popover/Popover.tsx +2 -2
- package/src/processIndicator/ProcessIndicator.tsx +2 -2
- package/src/progress/Progress.tsx +2 -2
- package/src/progressBar/ProgressBar.tsx +2 -2
- package/src/promoCard/PromoCard.tsx +4 -4
- package/src/promoCard/PromoCardGroup.tsx +2 -2
- package/src/promoCard/PromoCardIndicator.tsx +2 -2
- package/src/radio/Radio.tsx +5 -5
- package/src/section/Section.tsx +2 -2
- package/src/segmentedControl/SegmentedControl.tsx +5 -5
- package/src/select/Select.js +9 -9
- package/src/select/option/Option.tsx +2 -2
- package/src/select/searchBox/SearchBox.tsx +4 -7
- package/src/selectOption/SelectOption.tsx +5 -5
- package/src/slidingPanel/SlidingPanel.tsx +2 -2
- package/src/statusIcon/StatusIcon.tsx +3 -3
- package/src/stepper/Stepper.tsx +3 -3
- package/src/summary/Summary.tsx +2 -2
- package/src/switch/Switch.tsx +2 -2
- package/src/tabs/Tab.js +8 -12
- package/src/tabs/Tabs.js +2 -2
- package/src/tile/Tile.tsx +3 -3
- package/src/title/Title.tsx +3 -3
- package/src/tooltip/Tooltip.tsx +3 -3
- package/src/typeahead/Typeahead.tsx +6 -6
- package/src/typeahead/typeaheadInput/TypeaheadInput.tsx +2 -2
- package/src/typeahead/typeaheadOption/TypeaheadOption.tsx +2 -2
- package/src/upload/Upload.tsx +2 -2
- package/src/uploadInput/UploadInput.tsx +2 -2
- package/src/uploadInput/uploadButton/UploadButton.tsx +5 -9
- package/src/uploadInput/uploadItem/UploadItem.tsx +3 -3
- package/src/uploadInput/uploadItem/UploadItemLink.tsx +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
|
|
@@ -55,11 +55,10 @@ const TableLink = ({
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
|
-
|
|
59
|
-
<button
|
|
58
|
+
<button
|
|
60
59
|
ref={buttonRef}
|
|
61
60
|
type="button"
|
|
62
|
-
className={
|
|
61
|
+
className={clsx(
|
|
63
62
|
`tw-date-lookup-${type}-option np-text-body-default-bold`,
|
|
64
63
|
{ active: !!active },
|
|
65
64
|
{ today: !!today },
|
|
@@ -72,7 +71,6 @@ const TableLink = ({
|
|
|
72
71
|
>
|
|
73
72
|
{title || item}
|
|
74
73
|
</button>
|
|
75
|
-
</>
|
|
76
74
|
);
|
|
77
75
|
};
|
|
78
76
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
|
|
3
3
|
import { Size, Breakpoint, SizeSmall, SizeMedium } from '../common';
|
|
4
4
|
import { useScreenSize } from '../common/hooks/useScreenSize';
|
|
@@ -88,7 +88,7 @@ const Decision = ({
|
|
|
88
88
|
|
|
89
89
|
return (
|
|
90
90
|
<div
|
|
91
|
-
className={
|
|
91
|
+
className={clsx(
|
|
92
92
|
'np-decision d-flex',
|
|
93
93
|
{
|
|
94
94
|
'np-decision--small': isSmall,
|
|
@@ -106,7 +106,7 @@ const Decision = ({
|
|
|
106
106
|
<Tile
|
|
107
107
|
// eslint-disable-next-line react/no-array-index-key
|
|
108
108
|
key={`tile-${key}`}
|
|
109
|
-
className={
|
|
109
|
+
className={clsx(`np-decision__tile${isSmall ? '--small' : ''}`, {
|
|
110
110
|
'np-decision__tile--fixed-width': isGrid,
|
|
111
111
|
})}
|
|
112
112
|
description={description}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
|
|
3
3
|
import ActionButton from '../actionButton';
|
|
4
4
|
import { Layout } from '../common';
|
|
@@ -63,7 +63,7 @@ export default function DefinitionList({
|
|
|
63
63
|
}: DefinitionListProps) {
|
|
64
64
|
return (
|
|
65
65
|
<dl
|
|
66
|
-
className={
|
|
66
|
+
className={clsx('tw-definition-list d-flex ', {
|
|
67
67
|
'text-muted': muted,
|
|
68
68
|
'flex-column': layout === Layout.VERTICAL_ONE_COLUMN,
|
|
69
69
|
'tw-definition-list--columns flex-column flex-row--sm':
|
|
@@ -76,11 +76,11 @@ export default function DefinitionList({
|
|
|
76
76
|
.map(({ action, title, value, key }) => (
|
|
77
77
|
<div key={key} className="tw-definition-list__item">
|
|
78
78
|
<dt>{title}</dt>
|
|
79
|
-
<dd className={
|
|
79
|
+
<dd className={clsx(...getAlignmentClasses(layout, action))}>
|
|
80
80
|
<div>{value}</div>
|
|
81
81
|
{action ? (
|
|
82
82
|
<div
|
|
83
|
-
className={
|
|
83
|
+
className={clsx(
|
|
84
84
|
isLayoutHorizontal(layout) ? 'p-l-2' : 'p-x-2',
|
|
85
85
|
'tw-definition-list__action',
|
|
86
86
|
)}
|
package/src/dimmer/Dimmer.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ThemeProvider, useTheme } from '@wise/components-theming';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { MouseEvent, ReactNode, useCallback, useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { CSSTransition } from 'react-transition-group';
|
|
5
5
|
|
|
@@ -126,11 +126,11 @@ const Dimmer = ({
|
|
|
126
126
|
// Wait for animation to finish before unmount.
|
|
127
127
|
timeout={{ enter: 0, exit: EXIT_ANIMATION }}
|
|
128
128
|
classNames={{
|
|
129
|
-
enter:
|
|
130
|
-
enterDone:
|
|
129
|
+
enter: clsx({ 'dimmer--enter-fade': fadeContentOnEnter }),
|
|
130
|
+
enterDone: clsx('dimmer--enter-done', {
|
|
131
131
|
'dimmer--enter-fade': fadeContentOnEnter,
|
|
132
132
|
}),
|
|
133
|
-
exit:
|
|
133
|
+
exit: clsx('dimmer--exit', { 'dimmer--exit-fade': fadeContentOnExit }),
|
|
134
134
|
}}
|
|
135
135
|
unmountOnExit
|
|
136
136
|
onEnter={onEnter}
|
|
@@ -140,7 +140,7 @@ const Dimmer = ({
|
|
|
140
140
|
<FocusBoundary>
|
|
141
141
|
<div
|
|
142
142
|
ref={dimmerReference}
|
|
143
|
-
className={
|
|
143
|
+
className={clsx(
|
|
144
144
|
'dimmer',
|
|
145
145
|
{ 'dimmer--scrollable': scrollable, 'dimmer--transparent': transparent },
|
|
146
146
|
className,
|
|
@@ -149,7 +149,7 @@ const Dimmer = ({
|
|
|
149
149
|
onClick={handleClick}
|
|
150
150
|
>
|
|
151
151
|
<div
|
|
152
|
-
className={
|
|
152
|
+
className={clsx(
|
|
153
153
|
'dimmer-content-positioner',
|
|
154
154
|
contentPosition != null && [
|
|
155
155
|
'd-flex justify-content-center',
|
package/src/display/Display.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
|
|
4
4
|
import { DisplayTypes, Typography } from '../common';
|
|
@@ -18,7 +18,7 @@ function Display({
|
|
|
18
18
|
id,
|
|
19
19
|
}: Props) {
|
|
20
20
|
return (
|
|
21
|
-
<Heading id={id} className={
|
|
21
|
+
<Heading id={id} className={clsx(`np-text-${type}`, 'text-primary', className)}>
|
|
22
22
|
{children}
|
|
23
23
|
</Heading>
|
|
24
24
|
);
|
package/src/drawer/Drawer.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useContext, useId } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Position, Typography } from '../common';
|
|
@@ -53,10 +53,10 @@ export default function Drawer({
|
|
|
53
53
|
role="dialog"
|
|
54
54
|
aria-modal
|
|
55
55
|
aria-labelledby={headerTitle ? titleId : undefined}
|
|
56
|
-
className={
|
|
56
|
+
className={clsx('np-drawer', className)}
|
|
57
57
|
>
|
|
58
58
|
<div
|
|
59
|
-
className={
|
|
59
|
+
className={clsx('np-drawer-header', {
|
|
60
60
|
'np-drawer-header--withborder': headerTitle,
|
|
61
61
|
})}
|
|
62
62
|
>
|
|
@@ -67,8 +67,8 @@ export default function Drawer({
|
|
|
67
67
|
)}
|
|
68
68
|
<CloseButton onClick={onClose} />
|
|
69
69
|
</div>
|
|
70
|
-
{children && <div className={
|
|
71
|
-
{footerContent && <div className={
|
|
70
|
+
{children && <div className={clsx('np-drawer-content')}>{children}</div>}
|
|
71
|
+
{footerContent && <div className={clsx('np-drawer-footer')}>{footerContent}</div>}
|
|
72
72
|
</div>
|
|
73
73
|
</SlidingPanel>
|
|
74
74
|
</Dimmer>
|
package/src/field/Field.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useId } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Sentiment } from '../common';
|
|
@@ -42,7 +42,7 @@ export const Field = ({
|
|
|
42
42
|
const labelId = useId();
|
|
43
43
|
|
|
44
44
|
const fallbackInputId = useId();
|
|
45
|
-
const inputId = id !== null ? id ?? fallbackInputId : undefined;
|
|
45
|
+
const inputId = id !== null ? (id ?? fallbackInputId) : undefined;
|
|
46
46
|
|
|
47
47
|
const descriptionId = useId();
|
|
48
48
|
|
|
@@ -52,7 +52,7 @@ export const Field = ({
|
|
|
52
52
|
<InputDescribedByProvider value={message ? descriptionId : undefined}>
|
|
53
53
|
<InputInvalidProvider value={hasError}>
|
|
54
54
|
<div
|
|
55
|
-
className={
|
|
55
|
+
className={clsx(
|
|
56
56
|
'form-group d-block',
|
|
57
57
|
{
|
|
58
58
|
'has-success': sentiment === Sentiment.POSITIVE,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
|
|
4
4
|
import { Breakpoint, Layout } from '../common';
|
|
@@ -47,13 +47,12 @@ const FlowNavigation = ({
|
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
49
|
<div
|
|
50
|
-
className={
|
|
51
|
-
'np-flow-navigation
|
|
52
|
-
|
|
53
|
-
)}
|
|
50
|
+
className={clsx('np-flow-navigation d-flex align-items-center justify-content-center p-y-3', {
|
|
51
|
+
'np-flow-navigation--border-bottom': !done,
|
|
52
|
+
})}
|
|
54
53
|
>
|
|
55
54
|
<FlowHeader
|
|
56
|
-
className={
|
|
55
|
+
className={clsx(
|
|
57
56
|
'np-flow-navigation__content p-x-3',
|
|
58
57
|
screenSm == null
|
|
59
58
|
? 'np-flow-navigation--hidden'
|
|
@@ -92,7 +91,7 @@ const FlowNavigation = ({
|
|
|
92
91
|
<Stepper
|
|
93
92
|
activeStep={activeStep}
|
|
94
93
|
steps={steps}
|
|
95
|
-
className={
|
|
94
|
+
className={clsx('np-flow-navigation__stepper')}
|
|
96
95
|
/>
|
|
97
96
|
)
|
|
98
97
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
|
|
4
4
|
import Body from '../../body';
|
|
@@ -12,13 +12,13 @@ export interface AnimatedLabelProps {
|
|
|
12
12
|
|
|
13
13
|
const AnimatedLabel = ({ activeLabel, className, labels }: AnimatedLabelProps) => {
|
|
14
14
|
return (
|
|
15
|
-
<Body type={Typography.BODY_LARGE_BOLD} className={
|
|
15
|
+
<Body type={Typography.BODY_LARGE_BOLD} className={clsx('np-animated-label', className)}>
|
|
16
16
|
{labels.map((label, index) => {
|
|
17
17
|
const nextLabel = index - 1;
|
|
18
18
|
return (
|
|
19
19
|
<div
|
|
20
20
|
key={nextLabel}
|
|
21
|
-
className={
|
|
21
|
+
className={clsx('text-xs-center', {
|
|
22
22
|
'np-animated-label--in text-ellipsis': index === activeLabel,
|
|
23
23
|
})}
|
|
24
24
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArrowLeft as ArrowLeftIcon } from '@transferwise/icons';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
|
|
4
4
|
import Avatar, { AvatarType } from '../../avatar';
|
|
5
5
|
|
|
@@ -19,7 +19,7 @@ export default function BackButton({
|
|
|
19
19
|
<button
|
|
20
20
|
type="button"
|
|
21
21
|
aria-label={ariaLabel}
|
|
22
|
-
className={
|
|
22
|
+
className={clsx('np-back-button', 'btn-unstyled', className)}
|
|
23
23
|
onClick={onClick}
|
|
24
24
|
>
|
|
25
25
|
<ArrowLeftIcon size={24} />
|
package/src/header/Header.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTheme } from '@wise/components-theming';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
|
|
4
4
|
import ActionButton, { ActionButtonProps } from '../actionButton/ActionButton';
|
|
5
5
|
import Button from '../button';
|
|
@@ -71,7 +71,7 @@ export const Header = ({ action, as = 'h5', title, className }: HeaderProps) =>
|
|
|
71
71
|
<Title
|
|
72
72
|
as={as}
|
|
73
73
|
type={Typography.TITLE_GROUP}
|
|
74
|
-
className={
|
|
74
|
+
className={clsx('np-header', 'np-header__title', className)}
|
|
75
75
|
>
|
|
76
76
|
{title}
|
|
77
77
|
</Title>
|
|
@@ -86,7 +86,7 @@ export const Header = ({ action, as = 'h5', title, className }: HeaderProps) =>
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
return (
|
|
89
|
-
<div className={
|
|
89
|
+
<div className={clsx('np-header', className)}>
|
|
90
90
|
<Title as={as} type={Typography.TITLE_GROUP} className="np-header__title">
|
|
91
91
|
{title}
|
|
92
92
|
</Title>
|
package/src/i18n/zh-HK.json
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "選擇其中一項…",
|
|
24
24
|
"neptune.Select.searchPlaceholder": "搜尋…",
|
|
25
25
|
"neptune.SelectInput.noResultsFound": "找不到任何結果",
|
|
26
|
+
"neptune.SelectOption.action.label": "選擇",
|
|
27
|
+
"neptune.SelectOption.selected.action.label": "更改已選選項",
|
|
26
28
|
"neptune.Summary.statusDone": "已完成事項",
|
|
27
29
|
"neptune.Summary.statusNotDone": "未完成事項",
|
|
28
30
|
"neptune.Summary.statusPending": "待處理事項",
|
package/src/image/Image.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import { useHasIntersected } from '../common/hooks';
|
|
@@ -47,7 +47,7 @@ const Image = ({
|
|
|
47
47
|
id={id}
|
|
48
48
|
alt={alt}
|
|
49
49
|
src={imageSource}
|
|
50
|
-
className={
|
|
50
|
+
className={clsx([
|
|
51
51
|
'tw-image',
|
|
52
52
|
{
|
|
53
53
|
'tw-image__stretch': stretch,
|
package/src/info/Info.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QuestionMarkCircle as HelpCircleIcon } from '@transferwise/icons';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
|
|
@@ -63,7 +63,7 @@ const Info = ({
|
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
65
|
<span
|
|
66
|
-
className={
|
|
66
|
+
className={clsx(className, 'np-info', {
|
|
67
67
|
'np-info__small': isSmall,
|
|
68
68
|
'np-info__large': !isSmall,
|
|
69
69
|
})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Sentiment, Size } from '../common';
|
|
@@ -29,7 +29,7 @@ export default function InlineAlert({
|
|
|
29
29
|
<div
|
|
30
30
|
role="alert"
|
|
31
31
|
id={id}
|
|
32
|
-
className={
|
|
32
|
+
className={clsx(
|
|
33
33
|
'alert alert-detach',
|
|
34
34
|
`alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,
|
|
35
35
|
className,
|
package/src/inputs/Input.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import { SizeLarge, SizeMedium, SizeSmall } from '../common';
|
|
@@ -27,7 +27,7 @@ export const Input = forwardRef(function Input(
|
|
|
27
27
|
return (
|
|
28
28
|
<input
|
|
29
29
|
ref={reference}
|
|
30
|
-
className={
|
|
30
|
+
className={clsx(className, inputClassNameBase({ size }), 'np-input', {
|
|
31
31
|
'np-input--shape-rectangle': shape === 'rectangle',
|
|
32
32
|
'np-input--shape-pill': shape === 'pill',
|
|
33
33
|
})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { createContext, useContext, useMemo, useRef, useState } from 'react';
|
|
3
3
|
|
|
4
4
|
import { useResizeObserver } from '../common/hooks/useResizeObserver';
|
|
@@ -77,7 +77,7 @@ export function InputGroup({
|
|
|
77
77
|
<InputPaddingEndContext.Provider
|
|
78
78
|
value={useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd])}
|
|
79
79
|
>
|
|
80
|
-
<fieldset disabled={disabled} className={
|
|
80
|
+
<fieldset disabled={disabled} className={clsx(className, 'np-input-group')}>
|
|
81
81
|
{addonStart != null ? <InputAddon placement="start" {...addonStart} /> : null}
|
|
82
82
|
{children}
|
|
83
83
|
{addonEnd != null ? <InputAddon placement="end" {...addonEnd} /> : null}
|
|
@@ -135,7 +135,7 @@ function InputAddon({
|
|
|
135
135
|
<InputInvalidProvider value={undefined}>
|
|
136
136
|
<span
|
|
137
137
|
ref={ref}
|
|
138
|
-
className={
|
|
138
|
+
className={clsx(
|
|
139
139
|
'np-input-addon',
|
|
140
140
|
{
|
|
141
141
|
'np-input-addon--placement-start': placement === 'start',
|
|
@@ -206,6 +206,10 @@
|
|
|
206
206
|
height: auto;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
+
.np-select-input-listbox-container--virtualized {
|
|
210
|
+
/* The wrapping element shrinks this as needed */
|
|
211
|
+
height: 100vh;
|
|
212
|
+
}
|
|
209
213
|
.np-select-input-listbox-container--has-group {
|
|
210
214
|
scroll-padding-top: 32px;
|
|
211
215
|
scroll-padding-top: var(--size-32);
|
|
@@ -224,6 +228,12 @@
|
|
|
224
228
|
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
225
229
|
outline-offset: var(--ring-outline-offset);
|
|
226
230
|
}
|
|
231
|
+
.np-select-input-listbox-container--virtualized .np-select-input-listbox {
|
|
232
|
+
/* Adopted from `VList` in virtua: https://github.com/inokawa/virtua/blob/7f6ed5b37df6b480d4ff350f3960067c5b3519d2/src/react/VList.tsx#L113-L116 */
|
|
233
|
+
overflow-y: auto;
|
|
234
|
+
contain: strict;
|
|
235
|
+
height: 100%;
|
|
236
|
+
}
|
|
227
237
|
.np-select-input-separator-item {
|
|
228
238
|
margin: 8px;
|
|
229
239
|
margin: var(--size-8);
|
|
@@ -60,6 +60,11 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
&--virtualized {
|
|
64
|
+
/* The wrapping element shrinks this as needed */
|
|
65
|
+
height: 100vh;
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
&--has-group {
|
|
64
69
|
scroll-padding-top: var(--size-32);
|
|
65
70
|
}
|
|
@@ -71,6 +76,13 @@
|
|
|
71
76
|
|
|
72
77
|
.focus-ring();
|
|
73
78
|
--ring-outline-offset: calc(-1 * var(--ring-outline-width));
|
|
79
|
+
|
|
80
|
+
.np-select-input-listbox-container--virtualized & {
|
|
81
|
+
/* Adopted from `VList` in virtua: https://github.com/inokawa/virtua/blob/7f6ed5b37df6b480d4ff350f3960067c5b3519d2/src/react/VList.tsx#L113-L116 */
|
|
82
|
+
overflow-y: auto;
|
|
83
|
+
contain: strict;
|
|
84
|
+
height: 100%;
|
|
85
|
+
}
|
|
74
86
|
}
|
|
75
87
|
|
|
76
88
|
.np-select-input-separator-item {
|
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { expect, fn, screen, userEvent, within, type Mock } from '@storybook/test';
|
|
3
3
|
import { Calendar, ChevronDown } from '@transferwise/icons';
|
|
4
4
|
import { Flag } from '@wise/art';
|
|
5
|
-
import
|
|
5
|
+
import { clsx } from 'clsx';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
|
|
8
8
|
import Button from '../button/Button';
|
|
@@ -260,7 +260,7 @@ export const CustomTrigger: Story<Month> = {
|
|
|
260
260
|
withinTrigger ? month.name : <SelectInputOptionContent title={month.name} />,
|
|
261
261
|
renderTrigger: ({ content, className }) => (
|
|
262
262
|
<SelectInputTriggerButton
|
|
263
|
-
className={
|
|
263
|
+
className={clsx(className, 'btn-unstyled np-text-link-large align-items-center')}
|
|
264
264
|
style={{ display: 'inline-flex', columnGap: '0.25rem' }}
|
|
265
265
|
>
|
|
266
266
|
{content}
|
|
@@ -322,6 +322,26 @@ export const Advanced: Story<Month> = {
|
|
|
322
322
|
},
|
|
323
323
|
};
|
|
324
324
|
|
|
325
|
+
export const ManyItems: Story<string, true> = {
|
|
326
|
+
args: {
|
|
327
|
+
multiple: true,
|
|
328
|
+
items: Array.from({ length: 1000 }, (_, index) => ({
|
|
329
|
+
type: 'option',
|
|
330
|
+
value: String(index + 1),
|
|
331
|
+
})),
|
|
332
|
+
renderValue: (value, withinTrigger) =>
|
|
333
|
+
withinTrigger ? (
|
|
334
|
+
value
|
|
335
|
+
) : (
|
|
336
|
+
<SelectInputOptionContent
|
|
337
|
+
title={value}
|
|
338
|
+
description={Number(value) % 10 === 0 ? 'Divisible by 10' : undefined}
|
|
339
|
+
/>
|
|
340
|
+
),
|
|
341
|
+
filterable: true,
|
|
342
|
+
},
|
|
343
|
+
};
|
|
344
|
+
|
|
325
345
|
export const WithinDrawer: Story<Currency> = {
|
|
326
346
|
args: CurrenciesArgs,
|
|
327
347
|
decorators: [
|