@transferwise/components 0.0.0-experimental-d6b038b → 0.0.0-experimental-c84454a
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/dateInput/DateInput.js +5 -12
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +4 -11
- 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 +8 -16
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +6 -14
- 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 +7 -14
- package/build/index.js.map +1 -1
- package/build/index.mjs +3 -10
- package/build/index.mjs.map +1 -1
- package/build/inputs/SelectInput.js +890 -0
- package/build/inputs/SelectInput.js.map +1 -0
- package/build/inputs/SelectInput.messages.js.map +1 -0
- package/build/inputs/SelectInput.messages.mjs.map +1 -0
- package/build/inputs/SelectInput.mjs +881 -0
- package/build/inputs/SelectInput.mjs.map +1 -0
- package/build/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.js → _BottomSheet.js} +7 -7
- package/build/inputs/_BottomSheet.js.map +1 -0
- package/build/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.mjs → _BottomSheet.mjs} +7 -7
- package/build/inputs/_BottomSheet.mjs.map +1 -0
- package/build/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.js → _ButtonInput.js} +5 -5
- package/build/inputs/_ButtonInput.js.map +1 -0
- package/build/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.mjs → _ButtonInput.mjs} +5 -5
- package/build/inputs/_ButtonInput.mjs.map +1 -0
- package/build/inputs/{SelectInput/Popover/SelectInputPopover.js → _Popover.js} +7 -7
- package/build/inputs/_Popover.js.map +1 -0
- package/build/inputs/{SelectInput/Popover/SelectInputPopover.mjs → _Popover.mjs} +7 -7
- package/build/inputs/_Popover.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 +126 -126
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +2 -9
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +1 -8
- 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 +3 -10
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +2 -9
- 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/main.css +126 -126
- package/build/styles/sentimentSurface/SentimentSurface.css +36 -36
- 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 +8 -2
- package/build/types/accordion/Accordion.d.ts.map +1 -1
- package/build/types/actionButton/ActionButton.d.ts +6 -4
- 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 +5 -2
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/avatar/Avatar.d.ts +4 -0
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatarLayout/AvatarLayout.d.ts +5 -1
- package/build/types/avatarLayout/AvatarLayout.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +2 -0
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/body/Body.d.ts +2 -6
- package/build/types/body/Body.d.ts.map +1 -1
- package/build/types/button/Button.types.d.ts +4 -1
- 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 +1 -0
- package/build/types/card/Card.d.ts.map +1 -1
- package/build/types/checkboxButton/CheckboxButton.d.ts +2 -0
- 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/dateInput/DateInput.d.ts +5 -0
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts +6 -0
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/drawer/Drawer.d.ts +8 -2
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/field/Field.d.ts +5 -2
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts +3 -0
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/header/Header.d.ts +5 -1
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/iconButton/IconButton.d.ts +6 -0
- package/build/types/iconButton/IconButton.d.ts.map +1 -1
- package/build/types/inputs/{SelectInput/SelectInput.types.d.ts → SelectInput.d.ts} +38 -12
- package/build/types/inputs/SelectInput.d.ts.map +1 -0
- package/build/types/inputs/SelectInput.messages.d.ts.map +1 -0
- package/build/types/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.d.ts → _BottomSheet.d.ts} +3 -3
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -0
- package/build/types/inputs/_ButtonInput.d.ts +5 -0
- package/build/types/inputs/_ButtonInput.d.ts.map +1 -0
- package/build/types/inputs/{SelectInput/Popover/SelectInputPopover.d.ts → _Popover.d.ts} +3 -3
- package/build/types/inputs/_Popover.d.ts.map +1 -0
- package/build/types/legacylistItem/LegacyListItem.d.ts +1 -1
- package/build/types/list/List.d.ts +1 -0
- package/build/types/list/List.d.ts.map +1 -1
- package/build/types/listItem/Button/ListItemButton.d.ts +4 -0
- package/build/types/listItem/Button/ListItemButton.d.ts.map +1 -1
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts +3 -1
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +1 -1
- package/build/types/listItem/Image/ListItemImage.d.ts +2 -0
- package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +3 -0
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/loader/Loader.d.ts +5 -1
- package/build/types/loader/Loader.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +4 -1
- package/build/types/logo/Logo.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts +6 -0
- 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 +7 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/popover/Popover.d.ts +1 -0
- package/build/types/popover/Popover.d.ts.map +1 -1
- package/build/types/processIndicator/ProcessIndicator.d.ts +2 -0
- package/build/types/processIndicator/ProcessIndicator.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +8 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts +1 -0
- 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 +4 -0
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +3 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/summary/Summary.d.ts +7 -4
- 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 +2 -0
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts +14 -1
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts +6 -0
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +10 -1
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +3 -0
- 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 +8 -2
- package/src/actionButton/ActionButton.tsx +4 -3
- package/src/actionOption/ActionOption.tsx +1 -1
- package/src/alert/Alert.tsx +5 -2
- package/src/avatar/Avatar.tsx +4 -0
- package/src/avatarLayout/AvatarLayout.tsx +5 -1
- package/src/badge/Badge.tsx +2 -0
- package/src/body/Body.tsx +2 -6
- package/src/button/Button.types.ts +4 -1
- package/src/button/LegacyButton.tsx +4 -4
- package/src/card/Card.tsx +1 -0
- package/src/checkboxButton/CheckboxButton.tsx +1 -0
- package/src/checkboxOption/CheckboxOption.tsx +1 -1
- package/src/circularButton/CircularButton.tsx +1 -2
- package/src/common/propsValues/type.ts +1 -1
- package/src/common/propsValues/typography.ts +2 -2
- package/src/dateInput/DateInput.tsx +5 -0
- package/src/dimmer/Dimmer.tsx +6 -0
- package/src/drawer/Drawer.tsx +8 -2
- package/src/field/Field.tsx +5 -2
- package/src/flowNavigation/FlowNavigation.tsx +3 -0
- package/src/header/Header.tsx +5 -1
- package/src/iconButton/IconButton.tsx +3 -0
- package/src/inputs/{SelectInput/_stories/SelectInput.docs.mdx → SelectInput.docs.mdx} +1 -0
- package/src/inputs/SelectInput.less +219 -0
- package/src/inputs/{SelectInput/_stories/SelectInput.story.tsx → SelectInput.story.tsx} +8 -11
- package/src/inputs/{SelectInput/_stories/SelectInput.test.story.tsx → SelectInput.test.story.tsx} +10 -5
- package/src/inputs/{SelectInput/SelectInput.test.tsx → SelectInput.test.tsx} +11 -9
- package/src/inputs/SelectInput.tsx +1269 -0
- package/src/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.tsx → _BottomSheet.tsx} +7 -7
- package/src/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.tsx → _ButtonInput.tsx} +5 -5
- package/src/inputs/{SelectInput/Popover/SelectInputPopover.tsx → _Popover.tsx} +7 -7
- package/src/legacylistItem/LegacyListItem.tsx +1 -1
- package/src/list/List.tsx +1 -0
- package/src/listItem/Button/ListItemButton.tsx +2 -0
- package/src/listItem/IconButton/ListItemIconButton.tsx +3 -1
- package/src/listItem/Image/ListItemImage.tsx +2 -0
- package/src/listItem/ListItem.tsx +2 -0
- package/src/loader/Loader.tsx +6 -2
- package/src/logo/Logo.tsx +4 -1
- package/src/main.css +126 -126
- package/src/main.less +1 -1
- package/src/modal/Modal.tsx +6 -0
- 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 +7 -1
- package/src/popover/Popover.tsx +1 -0
- package/src/processIndicator/ProcessIndicator.tsx +2 -0
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +8 -1
- package/src/prompt/InlinePrompt/InlinePrompt.tsx +1 -0
- package/src/radioOption/RadioOption.tsx +1 -1
- package/src/select/Select.tsx +4 -0
- package/src/sentimentSurface/SentimentSurface.css +36 -36
- package/src/sentimentSurface/SentimentSurface.less +12 -12
- package/src/statusIcon/StatusIcon.tsx +3 -1
- package/src/summary/Summary.tsx +7 -4
- package/src/switchOption/SwitchOption.tsx +1 -1
- package/src/tabs/Tabs.tsx +2 -0
- package/src/typeahead/Typeahead.tsx +14 -2
- package/src/upload/Upload.tsx +6 -0
- package/src/uploadInput/UploadInput.tsx +12 -4
- package/src/withDisplayFormat/WithDisplayFormat.tsx +3 -0
- package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +0 -1
- package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +0 -1
- package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.js.map +0 -1
- package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.mjs.map +0 -1
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js +0 -27
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js.map +0 -1
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs +0 -25
- package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs.map +0 -1
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js +0 -59
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js.map +0 -1
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs +0 -56
- package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs.map +0 -1
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js +0 -50
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js.map +0 -1
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs +0 -48
- package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs.map +0 -1
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.js +0 -47
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.js.map +0 -1
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs +0 -45
- package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs.map +0 -1
- package/build/inputs/SelectInput/Option/SelectInputOption.js +0 -42
- package/build/inputs/SelectInput/Option/SelectInputOption.js.map +0 -1
- package/build/inputs/SelectInput/Option/SelectInputOption.mjs +0 -40
- package/build/inputs/SelectInput/Option/SelectInputOption.mjs.map +0 -1
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js +0 -40
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +0 -1
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +0 -38
- package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +0 -1
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js +0 -48
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js.map +0 -1
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs +0 -46
- package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs.map +0 -1
- package/build/inputs/SelectInput/Options/SelectInputOptions.js +0 -300
- package/build/inputs/SelectInput/Options/SelectInputOptions.js.map +0 -1
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs +0 -298
- package/build/inputs/SelectInput/Options/SelectInputOptions.mjs.map +0 -1
- package/build/inputs/SelectInput/Popover/SelectInputPopover.js.map +0 -1
- package/build/inputs/SelectInput/Popover/SelectInputPopover.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.contexts.js +0 -29
- package/build/inputs/SelectInput/SelectInput.contexts.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.contexts.mjs +0 -24
- package/build/inputs/SelectInput/SelectInput.contexts.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.js +0 -222
- package/build/inputs/SelectInput/SelectInput.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.messages.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.messages.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.mjs +0 -216
- package/build/inputs/SelectInput/SelectInput.mjs.map +0 -1
- package/build/inputs/SelectInput/SelectInput.utils.js +0 -164
- package/build/inputs/SelectInput/SelectInput.utils.js.map +0 -1
- package/build/inputs/SelectInput/SelectInput.utils.mjs +0 -154
- package/build/inputs/SelectInput/SelectInput.utils.mjs.map +0 -1
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js +0 -42
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +0 -1
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs +0 -36
- package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +0 -1
- package/build/styles/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +0 -96
- package/build/styles/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +0 -16
- package/build/styles/inputs/SelectInput/ClearButton/SelectInputClearButton.css +0 -46
- package/build/styles/inputs/SelectInput/ItemView/SelectInputItemView.css +0 -16
- package/build/styles/inputs/SelectInput/Option/SelectInputOption.css +0 -33
- package/build/styles/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
- package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +0 -81
- package/build/styles/inputs/SelectInput/Popover/SelectInputPopover.css +0 -46
- package/build/types/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/BottomSheet/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/BottomSheet/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts +0 -5
- package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ButtonInput/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/ButtonInput/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts +0 -7
- package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ClearButton/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/ClearButton/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts +0 -16
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts +0 -2
- package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts +0 -9
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts +0 -11
- package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/ItemView/index.d.ts +0 -4
- package/build/types/inputs/SelectInput/ItemView/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts +0 -11
- package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Option/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/Option/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +0 -13
- package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/OptionContent/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts +0 -9
- package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts +0 -21
- package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Options/index.d.ts +0 -4
- package/build/types/inputs/SelectInput/Options/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/Popover/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/Popover/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts +0 -33
- package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.d.ts +0 -10
- package/build/types/inputs/SelectInput/SelectInput.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.messages.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.types.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/SelectInput.utils.d.ts +0 -61
- package/build/types/inputs/SelectInput/SelectInput.utils.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +0 -12
- package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts +0 -3
- package/build/types/inputs/SelectInput/TriggerButton/index.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/components.d.ts +0 -10
- package/build/types/inputs/SelectInput/components.d.ts.map +0 -1
- package/build/types/inputs/SelectInput/index.d.ts +0 -12
- package/build/types/inputs/SelectInput/index.d.ts.map +0 -1
- package/src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +0 -96
- package/src/inputs/SelectInput/BottomSheet/index.ts +0 -2
- package/src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +0 -16
- package/src/inputs/SelectInput/ButtonInput/index.ts +0 -2
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.css +0 -46
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.less +0 -40
- package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx +0 -29
- package/src/inputs/SelectInput/ClearButton/index.ts +0 -2
- package/src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx +0 -74
- package/src/inputs/SelectInput/DefaultRenderTrigger/index.ts +0 -5
- package/src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx +0 -61
- package/src/inputs/SelectInput/ItemView/GroupItemView/index.ts +0 -2
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.css +0 -16
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.less +0 -17
- package/src/inputs/SelectInput/ItemView/SelectInputItemView.tsx +0 -48
- package/src/inputs/SelectInput/ItemView/index.ts +0 -3
- package/src/inputs/SelectInput/Option/SelectInputOption.css +0 -33
- package/src/inputs/SelectInput/Option/SelectInputOption.less +0 -32
- package/src/inputs/SelectInput/Option/SelectInputOption.tsx +0 -57
- package/src/inputs/SelectInput/Option/index.ts +0 -2
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.less +0 -38
- package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +0 -72
- package/src/inputs/SelectInput/OptionContent/index.ts +0 -2
- package/src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx +0 -59
- package/src/inputs/SelectInput/Options/OptionsContainer/index.ts +0 -2
- package/src/inputs/SelectInput/Options/SelectInputOptions.css +0 -81
- package/src/inputs/SelectInput/Options/SelectInputOptions.less +0 -77
- package/src/inputs/SelectInput/Options/SelectInputOptions.tsx +0 -411
- package/src/inputs/SelectInput/Options/index.ts +0 -3
- package/src/inputs/SelectInput/Popover/SelectInputPopover.css +0 -46
- package/src/inputs/SelectInput/Popover/index.ts +0 -2
- package/src/inputs/SelectInput/SelectInput.contexts.tsx +0 -40
- package/src/inputs/SelectInput/SelectInput.less +0 -22
- package/src/inputs/SelectInput/SelectInput.tsx +0 -257
- package/src/inputs/SelectInput/SelectInput.types.ts +0 -113
- package/src/inputs/SelectInput/SelectInput.utils.ts +0 -206
- package/src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +0 -36
- package/src/inputs/SelectInput/TriggerButton/index.ts +0 -5
- package/src/inputs/SelectInput/components.ts +0 -10
- package/src/inputs/SelectInput/index.ts +0 -14
- package/build/inputs/{SelectInput/SelectInput.messages.js → SelectInput.messages.js} +0 -0
- package/build/inputs/{SelectInput/SelectInput.messages.mjs → SelectInput.messages.mjs} +0 -0
- package/build/styles/inputs/{SelectInput/SelectInput.css → SelectInput.css} +90 -90
- package/build/types/inputs/{SelectInput/SelectInput.messages.d.ts → SelectInput.messages.d.ts} +0 -0
- package/src/inputs/{SelectInput/SelectInput.css → SelectInput.css} +90 -90
- /package/src/inputs/{SelectInput/SelectInput.messages.ts → SelectInput.messages.ts} +0 -0
- /package/src/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.less → _BottomSheet.less} +0 -0
- /package/src/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.less → _ButtonInput.less} +0 -0
- /package/src/inputs/{SelectInput/Popover/SelectInputPopover.less → _Popover.less} +0 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
@import "./_BottomSheet.less";
|
|
2
|
+
@import "./_ButtonInput.less";
|
|
3
|
+
@import "./_Popover.less";
|
|
4
|
+
@import (reference) "../../node_modules/@transferwise/neptune-css/src/less/ring.less";
|
|
5
|
+
|
|
6
|
+
.np-select-input-content {
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
text-overflow: ellipsis;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.np-select-input-placeholder {
|
|
13
|
+
color: var(--color-content-tertiary);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.np-select-input-options-container {
|
|
17
|
+
display: flex;
|
|
18
|
+
height: 100%;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
|
|
21
|
+
&:focus {
|
|
22
|
+
outline: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (--screen-sm) {
|
|
26
|
+
& {
|
|
27
|
+
max-height: 28rem /* 448px */;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.np-select-input-options-status {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
column-gap: var(--size-8);
|
|
36
|
+
padding: var(--size-8) var(--size-24) 0px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.np-select-input-options-status-icon {
|
|
40
|
+
padding: 0 var(--size-4);
|
|
41
|
+
color: var(--color-content-tertiary);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.np-select-input-query-container {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
padding: var(--size-8);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.np-select-input-listbox-container {
|
|
51
|
+
position: relative;
|
|
52
|
+
height: var(--initial-height);
|
|
53
|
+
scroll-padding-top: var(--size-8);
|
|
54
|
+
scroll-padding-bottom: var(--size-8);
|
|
55
|
+
overflow-y: auto;
|
|
56
|
+
|
|
57
|
+
@media (--screen-sm) {
|
|
58
|
+
& {
|
|
59
|
+
height: auto;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--virtualized {
|
|
64
|
+
/* The wrapping element shrinks this as needed */
|
|
65
|
+
height: 100vh;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&--has-group {
|
|
69
|
+
scroll-padding-top: var(--size-32);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.np-select-input-listbox {
|
|
74
|
+
border-radius: var(--radius-small);
|
|
75
|
+
padding: var(--size-8);
|
|
76
|
+
|
|
77
|
+
.focus-ring();
|
|
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
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.np-select-input-separator-item {
|
|
89
|
+
margin: var(--size-8);
|
|
90
|
+
border-top-width: 1px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.np-select-input-group-item {
|
|
94
|
+
&--without-needle:first-child {
|
|
95
|
+
margin-top: calc(-1 * var(--size-8));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.np-select-input-group-item-header {
|
|
100
|
+
position: sticky;
|
|
101
|
+
top: 0px;
|
|
102
|
+
z-index: 10;
|
|
103
|
+
background-color: var(--color-background-elevated);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.np-select-input-option-container {
|
|
107
|
+
display: flex;
|
|
108
|
+
cursor: default;
|
|
109
|
+
user-select: none;
|
|
110
|
+
align-items: center;
|
|
111
|
+
column-gap: var(--size-8);
|
|
112
|
+
border-radius: var(--radius-small);
|
|
113
|
+
padding: var(--size-12) var(--size-16);
|
|
114
|
+
color: var(--color-interactive-primary);
|
|
115
|
+
|
|
116
|
+
&:focus {
|
|
117
|
+
outline: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&--active {
|
|
121
|
+
box-shadow: inset 0 0 0 1px var(--color-interactive-secondary);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&--disabled {
|
|
125
|
+
opacity: 0.45;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.np-select-input-option-check {
|
|
130
|
+
&--not-selected {
|
|
131
|
+
visibility: hidden;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.np-select-input-option {
|
|
136
|
+
flex: 1;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.np-select-input-option-content-container {
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
column-gap: var(--size-8);
|
|
143
|
+
color: var(--color-content-primary);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.np-select-input-option-content-icon {
|
|
147
|
+
display: flex;
|
|
148
|
+
|
|
149
|
+
&--not-within-trigger {
|
|
150
|
+
align-self: flex-start;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.np-select-input-option-content-text {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex: 1;
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.np-select-input-option-content-text-secondary {
|
|
162
|
+
color: var(--color-content-secondary);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.np-select-input-option-content-text-within-trigger {
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
text-overflow: ellipsis;
|
|
168
|
+
white-space: nowrap;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.np-select-input-option-content-text-line-1 {
|
|
172
|
+
> :not([hidden]) ~ :not([hidden]) {
|
|
173
|
+
margin-right: var(--size-8);
|
|
174
|
+
margin-left: var(--size-8);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.np-select-input-footer {
|
|
179
|
+
padding: var(--size-4) var(--size-24) var(--size-16);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.np-select-input-addon-container {
|
|
183
|
+
pointer-events: none;
|
|
184
|
+
margin-inline-start: var(--size-4);
|
|
185
|
+
display: inline-flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
|
|
188
|
+
& > :not([hidden]) ~ :not([hidden]) {
|
|
189
|
+
margin-inline-start: var(--size-4);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.np-select-input-addon {
|
|
194
|
+
border-width: 0;
|
|
195
|
+
background: none;
|
|
196
|
+
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
height: var(--size-24);
|
|
199
|
+
width: var(--size-24);
|
|
200
|
+
align-items: center;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
border-radius: 0.125rem /* 2px */; /* TODO: Tokenize */
|
|
203
|
+
|
|
204
|
+
&--interactive {
|
|
205
|
+
pointer-events: auto;
|
|
206
|
+
color: var(--color-interactive-secondary);
|
|
207
|
+
|
|
208
|
+
&:hover {
|
|
209
|
+
color: var(--color-interactive-secondary-hover);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.focus-ring();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.np-select-input-addon-separator {
|
|
217
|
+
height: var(--size-24);
|
|
218
|
+
border-inline-start: 1px solid var(--color-border-neutral);
|
|
219
|
+
}
|
|
@@ -5,19 +5,19 @@ import { Flag } from '@wise/art';
|
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import Button from '
|
|
9
|
-
import { getMonthNames } from '
|
|
10
|
-
import Drawer from '
|
|
11
|
-
import { Field } from '
|
|
12
|
-
import Modal from '
|
|
13
|
-
import { wait } from '
|
|
8
|
+
import Button from '../button';
|
|
9
|
+
import { getMonthNames } from '../common/dateUtils';
|
|
10
|
+
import Drawer from '../drawer';
|
|
11
|
+
import { Field } from '../field/Field';
|
|
12
|
+
import Modal from '../modal';
|
|
13
|
+
import { wait } from '../test-utils/wait';
|
|
14
14
|
import {
|
|
15
15
|
SelectInput,
|
|
16
16
|
type SelectInputItem,
|
|
17
17
|
SelectInputOptionContent,
|
|
18
18
|
type SelectInputProps,
|
|
19
19
|
SelectInputTriggerButton,
|
|
20
|
-
} from '
|
|
20
|
+
} from './SelectInput';
|
|
21
21
|
|
|
22
22
|
const meta = {
|
|
23
23
|
title: 'Forms/SelectInput',
|
|
@@ -35,10 +35,7 @@ const meta = {
|
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
|
-
parameters: {
|
|
39
|
-
docs: { toc: true },
|
|
40
|
-
actions: { argTypesRegex: '' },
|
|
41
|
-
},
|
|
38
|
+
parameters: { actions: { argTypesRegex: '' } },
|
|
42
39
|
} satisfies Meta<typeof SelectInput>;
|
|
43
40
|
export default meta;
|
|
44
41
|
|
package/src/inputs/{SelectInput/_stories/SelectInput.test.story.tsx → SelectInput.test.story.tsx}
RENAMED
|
@@ -2,11 +2,16 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { fireEvent, fn, type Mock, screen, userEvent, within } from 'storybook/test';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
|
-
import { allModes } from '
|
|
6
|
-
import Body from '
|
|
7
|
-
import { Field } from '
|
|
8
|
-
import { lorem5, lorem500 } from '
|
|
9
|
-
import {
|
|
5
|
+
import { allModes } from '../../.storybook/modes';
|
|
6
|
+
import Body from '../body';
|
|
7
|
+
import { Field } from '../field/Field';
|
|
8
|
+
import { lorem5, lorem500 } from '../test-utils';
|
|
9
|
+
import {
|
|
10
|
+
SelectInput,
|
|
11
|
+
SelectInputOptionContent,
|
|
12
|
+
type SelectInputProps,
|
|
13
|
+
sortByRelevance,
|
|
14
|
+
} from './SelectInput';
|
|
10
15
|
|
|
11
16
|
const meta = {
|
|
12
17
|
title: 'Forms/SelectInput/Tests',
|
|
@@ -2,15 +2,15 @@ import { screen, waitFor, within } from '@testing-library/react';
|
|
|
2
2
|
import { userEvent } from '@testing-library/user-event';
|
|
3
3
|
import { mockAnimationsApi } from 'jsdom-testing-mocks';
|
|
4
4
|
|
|
5
|
-
import { render, mockMatchMedia, mockResizeObserver } from '
|
|
5
|
+
import { render, mockMatchMedia, mockResizeObserver } from '../test-utils';
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
SelectInput,
|
|
9
9
|
SelectInputOptionContent,
|
|
10
10
|
type SelectInputOptionItem,
|
|
11
11
|
type SelectInputProps,
|
|
12
|
-
} from '
|
|
13
|
-
import { Field } from '
|
|
12
|
+
} from './SelectInput';
|
|
13
|
+
import { Field } from '../field/Field';
|
|
14
14
|
|
|
15
15
|
mockMatchMedia();
|
|
16
16
|
mockResizeObserver();
|
|
@@ -40,7 +40,7 @@ describe('SelectInput', () => {
|
|
|
40
40
|
]}
|
|
41
41
|
renderFooter={({ queryNormalized: normalizedQuery }) =>
|
|
42
42
|
normalizedQuery != null ? (
|
|
43
|
-
<>Showing results for
|
|
43
|
+
<>Showing results for ‘{normalizedQuery}’</>
|
|
44
44
|
) : (
|
|
45
45
|
<>All items shown</>
|
|
46
46
|
)
|
|
@@ -56,16 +56,16 @@ describe('SelectInput', () => {
|
|
|
56
56
|
expect(footer).toBeInTheDocument();
|
|
57
57
|
|
|
58
58
|
await userEvent.keyboard('u');
|
|
59
|
-
expect(footer).toHaveTextContent(
|
|
59
|
+
expect(footer).toHaveTextContent(/‘u’$/);
|
|
60
60
|
|
|
61
61
|
await userEvent.keyboard('r');
|
|
62
|
-
expect(footer).toHaveTextContent(
|
|
62
|
+
expect(footer).toHaveTextContent(/‘ur’$/);
|
|
63
63
|
|
|
64
64
|
await userEvent.keyboard('x');
|
|
65
|
-
expect(footer).toHaveTextContent(
|
|
65
|
+
expect(footer).toHaveTextContent(/‘urx’$/);
|
|
66
66
|
|
|
67
67
|
await userEvent.keyboard('{Backspace}');
|
|
68
|
-
expect(footer).toHaveTextContent(
|
|
68
|
+
expect(footer).toHaveTextContent(/‘ur’$/);
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
it('allows navigating the listbox with cursors', async () => {
|
|
@@ -76,7 +76,9 @@ describe('SelectInput', () => {
|
|
|
76
76
|
{ type: 'option', value: 'EUR' },
|
|
77
77
|
{ type: 'option', value: 'USD' },
|
|
78
78
|
]}
|
|
79
|
-
renderFooter={() =>
|
|
79
|
+
renderFooter={({ queryNormalized: normalizedQuery }) => (
|
|
80
|
+
<button type="button">Footer button</button>
|
|
81
|
+
)}
|
|
80
82
|
filterable
|
|
81
83
|
/>,
|
|
82
84
|
);
|