@transferwise/components 46.50.0 → 46.51.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 +12 -13
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs +12 -12
- 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/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 +8 -9
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +8 -5
- package/build/stepper/Stepper.mjs.map +1 -1
- 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/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/stepper/Stepper.d.ts +4 -0
- package/build/types/stepper/Stepper.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 +3 -3
- 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/__snapshots__/FlowNavigation.spec.js.snap +4 -4
- 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.story.tsx +2 -2
- package/src/inputs/SelectInput.tsx +12 -12
- 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/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.less +2 -2
- package/src/stepper/Stepper.story.tsx +49 -0
- package/src/stepper/Stepper.tsx +10 -6
- 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
- package/src/stepper/Stepper.story.js +0 -40
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.51.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"storybook": "^8.2.2",
|
|
95
95
|
"@transferwise/less-config": "3.1.0",
|
|
96
96
|
"@transferwise/neptune-css": "14.12.1",
|
|
97
|
-
"@wise/components-theming": "1.
|
|
97
|
+
"@wise/components-theming": "1.5.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"@transferwise/icons": "^3.7.0",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"@react-spring/web": "~9.7.3",
|
|
117
117
|
"@transferwise/formatting": "^2.13.0",
|
|
118
118
|
"@transferwise/neptune-validation": "^3.3.0",
|
|
119
|
-
"
|
|
119
|
+
"clsx": "^2.1.1",
|
|
120
120
|
"commonmark": "0.29.1",
|
|
121
121
|
"core-js": "^3.37.1",
|
|
122
122
|
"lodash.clamp": "^4.0.3",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IdIconProps } from '@transferwise/icons';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { FC, ReactNode, cloneElement, useId } from 'react';
|
|
4
4
|
|
|
5
5
|
import Body from '../../body';
|
|
@@ -83,13 +83,9 @@ const AccordionItem: FC<AccordionItemProps> = ({
|
|
|
83
83
|
return (
|
|
84
84
|
<div
|
|
85
85
|
id={accordionId}
|
|
86
|
-
className={
|
|
87
|
-
'np-accordion-item',
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
'np-accordion-item--open': open,
|
|
91
|
-
},
|
|
92
|
-
)}
|
|
86
|
+
className={clsx('np-accordion-item', iconElement ? 'np-accordion-item--with-icon' : null, {
|
|
87
|
+
'np-accordion-item--open': open,
|
|
88
|
+
})}
|
|
93
89
|
>
|
|
94
90
|
<Option
|
|
95
91
|
aria-label={ariaLabel}
|
|
@@ -109,7 +105,7 @@ const AccordionItem: FC<AccordionItemProps> = ({
|
|
|
109
105
|
<Body
|
|
110
106
|
as="span"
|
|
111
107
|
type={Typography.BODY_LARGE}
|
|
112
|
-
className={
|
|
108
|
+
className={clsx('np-accordion-item__content', 'd-block', {
|
|
113
109
|
'has-icon': icon,
|
|
114
110
|
})}
|
|
115
111
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { ButtonHTMLAttributes, forwardRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Priority, PriorityPrimary, PrioritySecondary } from '../common';
|
|
@@ -27,7 +27,7 @@ const ActionButton = forwardRef<HTMLButtonElement, ActionButtonProps>(
|
|
|
27
27
|
<button
|
|
28
28
|
ref={reference}
|
|
29
29
|
type="button"
|
|
30
|
-
className={
|
|
30
|
+
className={clsx(
|
|
31
31
|
'np-action-btn',
|
|
32
32
|
'np-text-body-default-bold',
|
|
33
33
|
priority === Priority.SECONDARY ? 'btn-priority-2' : 'btn-priority-1',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
|
|
3
3
|
import ActionButton from '../actionButton';
|
|
4
4
|
import { CommonProps, Priority, PriorityPrimary, PrioritySecondary } from '../common';
|
|
@@ -42,7 +42,7 @@ const ActionOption = ({
|
|
|
42
42
|
disabled,
|
|
43
43
|
showMediaAtAllSizes,
|
|
44
44
|
showMediaCircle,
|
|
45
|
-
className:
|
|
45
|
+
className: clsx('tw-action-option', className),
|
|
46
46
|
isContainerAligned,
|
|
47
47
|
as,
|
|
48
48
|
};
|
package/src/alert/Alert.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useState, useRef, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
import Body from '../body/Body';
|
|
@@ -134,7 +134,7 @@ export default function Alert({
|
|
|
134
134
|
|
|
135
135
|
return (
|
|
136
136
|
<div
|
|
137
|
-
className={
|
|
137
|
+
className={clsx(
|
|
138
138
|
'alert d-flex',
|
|
139
139
|
`alert-${resolvedType}`,
|
|
140
140
|
arrow != null && alertArrowClassNames(arrow),
|
|
@@ -162,7 +162,7 @@ export default function Alert({
|
|
|
162
162
|
onTouchMove={() => setShouldFire(false)}
|
|
163
163
|
>
|
|
164
164
|
<div
|
|
165
|
-
className={
|
|
165
|
+
className={clsx('alert__content', 'd-flex', 'flex-grow-1', variant)}
|
|
166
166
|
data-testid={variant}
|
|
167
167
|
>
|
|
168
168
|
{icon ? (
|
package/src/avatar/Avatar.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Theme } from '../common';
|
|
@@ -66,7 +66,7 @@ const Avatar: React.FC<AvatarProps> = ({
|
|
|
66
66
|
|
|
67
67
|
return (
|
|
68
68
|
<div
|
|
69
|
-
className={
|
|
69
|
+
className={clsx('tw-avatar', className, `tw-avatar--${size}`, `tw-avatar--${type}`, {
|
|
70
70
|
'tw-avatar--outlined': outlined,
|
|
71
71
|
'tw-avatar--branded': Boolean(backgroundColorFromSeed),
|
|
72
72
|
'np-text-title-body': type === 'initials',
|
package/src/badge/Badge.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -28,7 +28,7 @@ const Badge = ({
|
|
|
28
28
|
'aria-label': ariaLabel,
|
|
29
29
|
children,
|
|
30
30
|
}: BadgeProps) => {
|
|
31
|
-
const classes: string =
|
|
31
|
+
const classes: string = clsx(
|
|
32
32
|
'tw-badge',
|
|
33
33
|
{
|
|
34
34
|
[`tw-badge-border-${border}`]: border,
|
package/src/body/Body.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { forwardRef, HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Typography, BodyTypes } from '../common/propsValues/typography';
|
|
@@ -39,7 +39,7 @@ const Body = forwardRef(function Body(
|
|
|
39
39
|
// @ts-expect-error TODO: Remove when component could be rewritten with generics
|
|
40
40
|
// See: https://fettblog.eu/typescript-react-generic-forward-refs/
|
|
41
41
|
ref={reference}
|
|
42
|
-
className={
|
|
42
|
+
className={clsx(`np-text-${isTypeSupported ? type : DEFAULT_TYPE}`, className)}
|
|
43
43
|
/>
|
|
44
44
|
);
|
|
45
45
|
});
|
package/src/button/Button.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, forwardRef } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
|
|
@@ -79,7 +79,7 @@ const Button = forwardRef<ButtonReferenceType, Props>(
|
|
|
79
79
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
80
80
|
const newPriority = establishNewPriority(priority, type);
|
|
81
81
|
|
|
82
|
-
const classes =
|
|
82
|
+
const classes = clsx(
|
|
83
83
|
`btn btn-${size}`,
|
|
84
84
|
`np-btn np-btn-${size}`,
|
|
85
85
|
{
|
package/src/card/Card.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import Body from '../body';
|
|
@@ -45,7 +45,7 @@ const Card = forwardRef(function Card(
|
|
|
45
45
|
return (
|
|
46
46
|
<Element
|
|
47
47
|
ref={reference}
|
|
48
|
-
className={
|
|
48
|
+
className={clsx('np-card', className, {
|
|
49
49
|
'np-card--expanded': isOpen,
|
|
50
50
|
'np-card--inactive': !children,
|
|
51
51
|
'np-card--has-icon': !!icon,
|
|
@@ -56,7 +56,7 @@ const Card = forwardRef(function Card(
|
|
|
56
56
|
<Option
|
|
57
57
|
aria-label={ariaLabel}
|
|
58
58
|
as={children ? 'button' : 'div'}
|
|
59
|
-
className={
|
|
59
|
+
className={clsx('np-card__button')}
|
|
60
60
|
media={icon}
|
|
61
61
|
title={title}
|
|
62
62
|
content={details}
|
|
@@ -65,7 +65,7 @@ const Card = forwardRef(function Card(
|
|
|
65
65
|
onClick={children ? () => onClick?.(!isExpanded) : undefined}
|
|
66
66
|
/>
|
|
67
67
|
<div
|
|
68
|
-
className={
|
|
68
|
+
className={clsx('np-card__divider', {
|
|
69
69
|
'np-card__divider--expanded': isOpen,
|
|
70
70
|
})}
|
|
71
71
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChevronLeft, ChevronRight } from '@transferwise/icons';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { type CSSProperties, type ReactNode, useEffect, useRef, useState } from 'react';
|
|
4
4
|
|
|
5
5
|
import ActionButton from '../actionButton';
|
|
@@ -159,7 +159,7 @@ const Carousel: React.FC<CarouselProps> = ({ header, className, cards, onClick }
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
return (
|
|
162
|
-
<div className={
|
|
162
|
+
<div className={clsx('carousel-wrapper', className)}>
|
|
163
163
|
<div className="d-flex justify-content-between carousel__header">
|
|
164
164
|
{typeof header === 'string' ? (
|
|
165
165
|
<Title as="span" type="title-body">
|
|
@@ -208,7 +208,7 @@ const Carousel: React.FC<CarouselProps> = ({ header, className, cards, onClick }
|
|
|
208
208
|
{cards?.map((card, index) => {
|
|
209
209
|
const sharedProps = {
|
|
210
210
|
id: card.id,
|
|
211
|
-
className:
|
|
211
|
+
className: clsx('carousel__card', {
|
|
212
212
|
'carousel__card--focused': card.id === focusedCard,
|
|
213
213
|
}),
|
|
214
214
|
onClick: () => {
|
|
@@ -224,7 +224,7 @@ const Carousel: React.FC<CarouselProps> = ({ header, className, cards, onClick }
|
|
|
224
224
|
card.type !== 'promo' ? (
|
|
225
225
|
<div
|
|
226
226
|
id={`${card.id}-content`}
|
|
227
|
-
className={
|
|
227
|
+
className={clsx('carousel__card-content', {
|
|
228
228
|
[card.className ?? '']: !!card.className,
|
|
229
229
|
})}
|
|
230
230
|
// eslint-disable-next-line react/forbid-dom-props
|
|
@@ -320,7 +320,7 @@ const Carousel: React.FC<CarouselProps> = ({ header, className, cards, onClick }
|
|
|
320
320
|
tabIndex={-1}
|
|
321
321
|
aria-hidden
|
|
322
322
|
type="button"
|
|
323
|
-
className={
|
|
323
|
+
className={clsx('carousel__indicator', {
|
|
324
324
|
'carousel__indicator--selected': card.id === visibleCardOnMobileView,
|
|
325
325
|
})}
|
|
326
326
|
onClick={() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
|
|
3
3
|
import Body from '../body/Body';
|
|
4
4
|
import CheckboxButton from '../checkboxButton';
|
|
@@ -31,7 +31,7 @@ export default function Checkbox({
|
|
|
31
31
|
onFocus,
|
|
32
32
|
onBlur,
|
|
33
33
|
}: CheckboxProps) {
|
|
34
|
-
const classList =
|
|
34
|
+
const classList = clsx(
|
|
35
35
|
'np-checkbox',
|
|
36
36
|
{
|
|
37
37
|
checkbox: true,
|
|
@@ -45,7 +45,7 @@ export default function Checkbox({
|
|
|
45
45
|
return (
|
|
46
46
|
<div id={id} className={classList}>
|
|
47
47
|
{/* eslint-disable-next-line jsx-a11y/label-has-for */}
|
|
48
|
-
<label className={
|
|
48
|
+
<label className={clsx({ disabled })}>
|
|
49
49
|
<CheckboxButton
|
|
50
50
|
className="p-r-2"
|
|
51
51
|
checked={checked}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { InputHTMLAttributes, forwardRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import { useInputAttributes } from '../inputs/contexts';
|
|
@@ -12,7 +12,7 @@ const CheckboxButton = forwardRef<HTMLInputElement, CheckboxButtonProps>(functio
|
|
|
12
12
|
const inputAttributes = useInputAttributes();
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
<span className={
|
|
15
|
+
<span className={clsx('np-checkbox-button', className, disabled && 'disabled')}>
|
|
16
16
|
<input
|
|
17
17
|
{...inputAttributes}
|
|
18
18
|
{...rest}
|
package/src/chevron/Chevron.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChevronUp } from '@transferwise/icons';
|
|
2
2
|
import { IconSize } from '@transferwise/icons/lib/types';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
Size,
|
|
@@ -33,11 +33,7 @@ export interface ExtraSmallChevronProps {
|
|
|
33
33
|
|
|
34
34
|
const ExtraSmallChevron = ({ className }: ExtraSmallChevronProps) => {
|
|
35
35
|
return (
|
|
36
|
-
<span
|
|
37
|
-
className={classNames('tw-icon', 'tw-icon-chevron', className)}
|
|
38
|
-
role="presentation"
|
|
39
|
-
aria-hidden
|
|
40
|
-
>
|
|
36
|
+
<span className={clsx('tw-icon', 'tw-icon-chevron', className)} role="presentation" aria-hidden>
|
|
41
37
|
<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor" focusable="false">
|
|
42
38
|
<path
|
|
43
39
|
fillRule="evenodd"
|
|
@@ -54,12 +50,7 @@ const Chevron = ({
|
|
|
54
50
|
disabled = false,
|
|
55
51
|
className,
|
|
56
52
|
}: ChevronProps) => {
|
|
57
|
-
const classNameValue =
|
|
58
|
-
'tw-chevron',
|
|
59
|
-
{ 'chevron-color': !disabled },
|
|
60
|
-
orientation,
|
|
61
|
-
className,
|
|
62
|
-
);
|
|
53
|
+
const classNameValue = clsx('tw-chevron', { 'chevron-color': !disabled }, orientation, className);
|
|
63
54
|
|
|
64
55
|
if (size === Size.EXTRA_SMALL) {
|
|
65
56
|
return <ExtraSmallChevron className={classNameValue} />;
|
package/src/chips/Chip.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTheme } from '@wise/components-theming';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { useEffect, useRef } from 'react';
|
|
4
4
|
|
|
5
5
|
import Body from '../body/Body';
|
|
@@ -54,7 +54,7 @@ const Chip = ({
|
|
|
54
54
|
tabIndex={tabIndex}
|
|
55
55
|
aria-label={ariaLabel}
|
|
56
56
|
aria-checked={ariaChecked}
|
|
57
|
-
className={
|
|
57
|
+
className={clsx(
|
|
58
58
|
'np-chip',
|
|
59
59
|
'd-flex',
|
|
60
60
|
'align-items-center',
|
package/src/chips/Chips.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
|
|
4
4
|
import { CommonProps, AriaLabelProperty } from '../common';
|
|
@@ -50,7 +50,7 @@ const Chips = ({
|
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
52
|
<div
|
|
53
|
-
className={
|
|
53
|
+
className={clsx('np-chips d-flex', className)}
|
|
54
54
|
aria-label={ariaLabel}
|
|
55
55
|
role={!multiple ? 'radiogroup' : undefined}
|
|
56
56
|
>
|
|
@@ -64,7 +64,7 @@ const Chips = ({
|
|
|
64
64
|
closeButton={{
|
|
65
65
|
'aria-label': intl.formatMessage(messages.ariaLabel, { choice: chip.label }),
|
|
66
66
|
}}
|
|
67
|
-
className={
|
|
67
|
+
className={clsx('text-xs-nowrap', {
|
|
68
68
|
'np-chip--selected': chipSelected,
|
|
69
69
|
'p-r-1': multiple && chipSelected,
|
|
70
70
|
})}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { cloneElement } from 'react';
|
|
3
3
|
|
|
4
4
|
import Body from '../body/Body';
|
|
5
5
|
import { typeClassMap, priorityClassMap } from '../button/classMap';
|
|
6
|
-
import { ControlType, Priority } from '../common';
|
|
7
|
-
import { Typography } from '../common';
|
|
6
|
+
import { ControlType, Priority , Typography } from '../common';
|
|
8
7
|
|
|
9
8
|
export interface CircularButtonProps {
|
|
10
9
|
className?: string;
|
|
@@ -25,14 +24,12 @@ const CircularButton = ({
|
|
|
25
24
|
type = ControlType.ACCENT,
|
|
26
25
|
...rest
|
|
27
26
|
}: CircularButtonProps) => {
|
|
28
|
-
const classes =
|
|
27
|
+
const classes = clsx('btn np-btn', typeClassMap[type], priorityClassMap[priority]);
|
|
29
28
|
|
|
30
29
|
const iconElement = Number(icon.props.size) !== 24 ? cloneElement(icon, { size: 24 }) : icon;
|
|
31
30
|
|
|
32
31
|
return (
|
|
33
|
-
<label
|
|
34
|
-
className={classNames('np-circular-btn', priority, type, disabled && 'disabled', className)}
|
|
35
|
-
>
|
|
32
|
+
<label className={clsx('np-circular-btn', priority, type, disabled && 'disabled', className)}>
|
|
36
33
|
<input
|
|
37
34
|
type="button"
|
|
38
35
|
aria-label={children}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { MouseEvent, forwardRef, HTMLAttributes, ReactNode, ElementType } from 'react';
|
|
3
3
|
|
|
4
4
|
import Body from '../../body';
|
|
@@ -58,7 +58,7 @@ const Option = forwardRef<ReferenceType, OptionProps>(
|
|
|
58
58
|
<Element
|
|
59
59
|
{...rest}
|
|
60
60
|
ref={reference}
|
|
61
|
-
className={
|
|
61
|
+
className={clsx('np-option', className, {
|
|
62
62
|
'decision-complex': complex,
|
|
63
63
|
decision,
|
|
64
64
|
disabled,
|
|
@@ -72,7 +72,7 @@ const Option = forwardRef<ReferenceType, OptionProps>(
|
|
|
72
72
|
<div className="media-left">
|
|
73
73
|
{showMediaCircle ? (
|
|
74
74
|
<div
|
|
75
|
-
className={
|
|
75
|
+
className={clsx('circle circle-sm text-primary', {
|
|
76
76
|
'circle-inverse': inverseMediaCircle,
|
|
77
77
|
})}
|
|
78
78
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
|
|
3
3
|
export interface RadioButtonProps<T extends string | number = string> {
|
|
4
4
|
id?: string;
|
|
@@ -35,7 +35,7 @@ export default function RadioButton<T extends string | number = ''>({
|
|
|
35
35
|
}
|
|
36
36
|
}}
|
|
37
37
|
/>
|
|
38
|
-
<span className={
|
|
38
|
+
<span className={clsx('tw-radio-button', { checked, disabled: disabled || readOnly })}>
|
|
39
39
|
<span className="tw-radio-check" />
|
|
40
40
|
</span>
|
|
41
41
|
</>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import Link from '../../link';
|
|
3
3
|
import { Typography } from '../propsValues/typography';
|
|
4
4
|
|
|
@@ -35,7 +35,7 @@ export function Action({ action, className }: Props) {
|
|
|
35
35
|
<button
|
|
36
36
|
type="button"
|
|
37
37
|
aria-label={action['aria-label']}
|
|
38
|
-
className={
|
|
38
|
+
className={clsx('btn-unstyled np-text-link-large', className)}
|
|
39
39
|
onClick={action.onClick}
|
|
40
40
|
>
|
|
41
41
|
{action.text}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import {
|
|
3
3
|
CSSProperties,
|
|
4
4
|
PropsWithChildren,
|
|
@@ -190,7 +190,7 @@ const BottomSheet = (props: BottomSheetProps) => {
|
|
|
190
190
|
ref={bottomSheetReference}
|
|
191
191
|
open={props.open}
|
|
192
192
|
position={Position.BOTTOM}
|
|
193
|
-
className={
|
|
193
|
+
className={clsx('np-bottom-sheet', props.className)}
|
|
194
194
|
>
|
|
195
195
|
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
|
|
196
196
|
<div
|
package/src/common/card/Card.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { MouseEvent, type ReactNode, forwardRef, useRef } from 'react';
|
|
3
3
|
|
|
4
4
|
import { CloseButton } from '../closeButton';
|
|
@@ -67,7 +67,7 @@ const Card = forwardRef<HTMLDivElement, CardProps>(
|
|
|
67
67
|
return (
|
|
68
68
|
<div
|
|
69
69
|
ref={ref}
|
|
70
|
-
className={
|
|
70
|
+
className={clsx(
|
|
71
71
|
'np-Card',
|
|
72
72
|
{
|
|
73
73
|
'np-Card--small': !!isSmall,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cross, CrossCircleFill } from '@transferwise/icons';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
|
|
@@ -37,7 +37,7 @@ export const CloseButton = forwardRef(function CloseButton(
|
|
|
37
37
|
<button
|
|
38
38
|
ref={reference}
|
|
39
39
|
type="button"
|
|
40
|
-
className={
|
|
40
|
+
className={clsx(
|
|
41
41
|
'np-close-button',
|
|
42
42
|
'close btn-link',
|
|
43
43
|
'text-no-decoration',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
import { Layout } from '../propsValues/layouts';
|
|
@@ -27,7 +27,7 @@ const FlowHeader = React.forwardRef(
|
|
|
27
27
|
return (
|
|
28
28
|
<div
|
|
29
29
|
ref={reference}
|
|
30
|
-
className={
|
|
30
|
+
className={clsx(
|
|
31
31
|
'np-flow-header',
|
|
32
32
|
'd-flex',
|
|
33
33
|
'flex-wrap',
|
|
@@ -40,7 +40,7 @@ const FlowHeader = React.forwardRef(
|
|
|
40
40
|
{leftContent}
|
|
41
41
|
{rightContent}
|
|
42
42
|
<div
|
|
43
|
-
className={
|
|
43
|
+
className={clsx('align-items-center', 'd-flex', 'justify-content-center', {
|
|
44
44
|
'flex__item--12': isVertical,
|
|
45
45
|
'order-1 flex-grow-1': !isVertical,
|
|
46
46
|
})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import {
|
|
3
3
|
CSSProperties,
|
|
4
4
|
HTMLAttributes,
|
|
@@ -122,20 +122,20 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(
|
|
|
122
122
|
// eslint-disable-next-line react/forbid-dom-props
|
|
123
123
|
style={{ ...styles.popper }}
|
|
124
124
|
{...attributes.popper}
|
|
125
|
-
className={
|
|
125
|
+
className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}
|
|
126
126
|
>
|
|
127
127
|
<div
|
|
128
128
|
ref={reference}
|
|
129
129
|
/* eslint-disable-next-line react/forbid-dom-props */
|
|
130
130
|
style={contentStyle}
|
|
131
|
-
className={
|
|
131
|
+
className={clsx('np-panel__content')}
|
|
132
132
|
>
|
|
133
133
|
{children}
|
|
134
134
|
{/* Arrow has to stay inside content to get the same animations as the "dialog" and to get hidden when panel is closed. */}
|
|
135
135
|
{arrow && (
|
|
136
136
|
<div
|
|
137
137
|
ref={setArrowElement}
|
|
138
|
-
className={
|
|
138
|
+
className={clsx('np-panel__arrow')}
|
|
139
139
|
// eslint-disable-next-line react/forbid-dom-props
|
|
140
140
|
style={styles.arrow}
|
|
141
141
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Alert as DangerIcon, AlertCircleFill } from '@transferwise/icons';
|
|
2
2
|
import { useTheme } from '@wise/components-theming';
|
|
3
|
-
import
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
4
|
|
|
5
5
|
import Avatar, { AvatarType } from '../avatar';
|
|
6
6
|
import Body from '../body';
|
|
@@ -21,12 +21,12 @@ export type CriticalCommsBannerProps = {
|
|
|
21
21
|
function CriticalCommsBanner({ title, subtitle, action, className }: CriticalCommsBannerProps) {
|
|
22
22
|
const { isModern } = useTheme();
|
|
23
23
|
return (
|
|
24
|
-
<div className={
|
|
24
|
+
<div className={clsx('critical-comms', className)}>
|
|
25
25
|
<div className="critical-comms-body">
|
|
26
26
|
<Avatar
|
|
27
27
|
size={Size.MEDIUM}
|
|
28
28
|
type={AvatarType.ICON}
|
|
29
|
-
className={
|
|
29
|
+
className={clsx(isModern ? 'm-r-2' : 'm-r-1')}
|
|
30
30
|
backgroundColor={
|
|
31
31
|
isModern ? 'var(--color-sentiment-negative)' : 'var(--color-background-negative)'
|
|
32
32
|
}
|
|
@@ -34,7 +34,7 @@ function CriticalCommsBanner({ title, subtitle, action, className }: CriticalCom
|
|
|
34
34
|
{isModern ? <AlertCircleFill /> : <DangerIcon size={24} />}
|
|
35
35
|
</Avatar>
|
|
36
36
|
<div className="critical-comms-content d-flex align-items-center flex-grow-1">
|
|
37
|
-
<div className={
|
|
37
|
+
<div className={clsx('flex-grow-1', { 'p-x-2': !isModern })}>
|
|
38
38
|
<Title
|
|
39
39
|
type={isModern ? Typography.TITLE_BODY : Typography.TITLE_GROUP}
|
|
40
40
|
className="critical-comms--title"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
|
|
@@ -234,7 +234,7 @@ const DateInput = ({
|
|
|
234
234
|
|
|
235
235
|
const monthYearOnly = mode === DateMode.MONTH_YEAR;
|
|
236
236
|
|
|
237
|
-
const monthWidth =
|
|
237
|
+
const monthWidth = clsx({
|
|
238
238
|
'col-sm-8': monthYearOnly,
|
|
239
239
|
'col-sm-5': !monthYearOnly,
|
|
240
240
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { createRef, PureComponent, KeyboardEvent } from 'react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -254,7 +254,7 @@ class DateLookup extends PureComponent<DateLookupPropsWithInputAttributes, DateL
|
|
|
254
254
|
const { selectedDate, min, max, viewMonth, viewYear, mode, isMobile } = this.state;
|
|
255
255
|
const { placeholder, monthFormat } = this.props;
|
|
256
256
|
return (
|
|
257
|
-
<div className={
|
|
257
|
+
<div className={clsx({ 'p-a-1': !isMobile })}>
|
|
258
258
|
{mode === 'day' && (
|
|
259
259
|
<DayCalendar
|
|
260
260
|
selectedDate={selectedDate}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
|
|
4
4
|
import Chevron from '../../chevron';
|
|
@@ -27,7 +27,7 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
27
27
|
const intl = useIntl();
|
|
28
28
|
const { isMobile } = useLayout();
|
|
29
29
|
return (
|
|
30
|
-
<div className={
|
|
30
|
+
<div className={clsx('text-xs-center', !isMobile && ['clearfix', 'p-y-1'])}>
|
|
31
31
|
<div className="pull-left-single-direction">
|
|
32
32
|
<button
|
|
33
33
|
type="button"
|