@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowNavigation.mjs","sources":["../../src/flowNavigation/FlowNavigation.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"FlowNavigation.mjs","sources":["../../src/flowNavigation/FlowNavigation.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { Breakpoint, Layout } from '../common';\nimport { CloseButton } from '../common/closeButton';\nimport FlowHeader from '../common/flowHeader/FlowHeader';\nimport Logo from '../logo';\nimport Stepper, { type Step } from '../stepper/Stepper';\n\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport messages from './FlowNavigation.messages';\nimport AnimatedLabel from './animatedLabel';\nimport BackButton from './backButton';\n\nexport interface FlowNavigationProps {\n activeStep?: number;\n avatar?: React.ReactNode;\n logo?: React.ReactNode;\n done?: boolean;\n /** Called when the close button is clicked. If not provided the close button won't show */\n onClose?: () => void;\n /** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */\n onGoBack?: () => void;\n /** Steps to be displayed in stepper. If you don't need the stepper, please use OverlayHeader instead */\n steps: readonly Step[];\n}\n\nconst FlowNavigation = ({\n activeStep = 0,\n avatar,\n logo = <Logo />,\n done = false,\n onClose,\n onGoBack,\n steps,\n}: FlowNavigationProps) => {\n const intl = useIntl();\n\n const closeButton = onClose != null && <CloseButton size=\"lg\" onClick={onClose} />;\n\n const screenSm = useScreenSize(Breakpoint.SMALL);\n const screenLg = useScreenSize(Breakpoint.LARGE);\n\n const newAvatar = done ? null : avatar;\n\n const displayGoBack = onGoBack != null && activeStep > 0;\n\n return (\n <div\n className={clsx('np-flow-navigation d-flex align-items-center justify-content-center p-y-3', {\n 'np-flow-navigation--border-bottom': !done,\n })}\n >\n <FlowHeader\n className={clsx(\n 'np-flow-navigation__content p-x-3',\n screenSm == null\n ? 'np-flow-navigation--hidden'\n : {\n 'np-flow-navigation--xs-max': !screenSm,\n // Size switches on parent container which may or may not have the same size as the window.\n 'np-flow-navigation--sm': screenSm,\n 'np-flow-navigation--lg': screenLg,\n },\n )}\n leftContent={\n <>\n {!screenSm && displayGoBack ? (\n <BackButton aria-label={intl.formatMessage(messages.back)} onClick={onGoBack} />\n ) : (\n <div className=\"np-flow-header__left\">{logo}</div>\n )}\n {!screenSm && !done && (\n <AnimatedLabel\n className=\"m-x-1\"\n labels={steps.map((step) => step.label)}\n activeLabel={activeStep}\n />\n )}\n </>\n }\n rightContent={\n <div className=\"np-flow-header__right d-flex align-items-center justify-content-end order-2--lg\">\n {newAvatar}\n {newAvatar && closeButton && <span className=\"m-x-1\" />}\n {closeButton}\n </div>\n }\n bottomContent={\n !done && (\n <Stepper\n activeStep={activeStep}\n steps={steps}\n className={clsx('np-flow-navigation__stepper')}\n />\n )\n }\n layout={!screenLg ? Layout.VERTICAL : Layout.HORIZONTAL}\n />\n </div>\n );\n};\n\nexport default FlowNavigation;\n"],"names":["FlowNavigation","activeStep","avatar","logo","_jsx","Logo","done","onClose","onGoBack","steps","intl","useIntl","closeButton","CloseButton","size","onClick","screenSm","useScreenSize","Breakpoint","SMALL","screenLg","LARGE","newAvatar","displayGoBack","className","clsx","children","FlowHeader","leftContent","_jsxs","_Fragment","BackButton","formatMessage","messages","back","AnimatedLabel","labels","map","step","label","activeLabel","rightContent","bottomContent","Stepper","layout","Layout","VERTICAL","HORIZONTAL"],"mappings":";;;;;;;;;;;;;;AA2BMA,MAAAA,cAAc,GAAGA,CAAC;AACtBC,EAAAA,UAAU,GAAG,CAAC;EACdC,MAAM;AACNC,EAAAA,IAAI,gBAAGC,GAAA,CAACC,IAAI,IAAG,CAAA;AACfC,EAAAA,IAAI,GAAG,KAAK;EACZC,OAAO;EACPC,QAAQ;AACRC,EAAAA,KAAAA;AAAK,CACe,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE,CAAA;EAEtB,MAAMC,WAAW,GAAGL,OAAO,IAAI,IAAI,iBAAIH,GAAA,CAACS,WAAW,EAAA;AAACC,IAAAA,IAAI,EAAC,IAAI;AAACC,IAAAA,OAAO,EAAER,OAAAA;AAAQ,IAAG,CAAA;AAElF,EAAA,MAAMS,QAAQ,GAAGC,aAAa,CAACC,UAAU,CAACC,KAAK,CAAC,CAAA;AAChD,EAAA,MAAMC,QAAQ,GAAGH,aAAa,CAACC,UAAU,CAACG,KAAK,CAAC,CAAA;AAEhD,EAAA,MAAMC,SAAS,GAAGhB,IAAI,GAAG,IAAI,GAAGJ,MAAM,CAAA;EAEtC,MAAMqB,aAAa,GAAGf,QAAQ,IAAI,IAAI,IAAIP,UAAU,GAAG,CAAC,CAAA;AAExD,EAAA,oBACEG,GAAA,CAAA,KAAA,EAAA;AACEoB,IAAAA,SAAS,EAAEC,IAAI,CAAC,2EAA2E,EAAE;AAC3F,MAAA,mCAAmC,EAAE,CAACnB,IAAAA;AACvC,KAAA,CAAE;IAAAoB,QAAA,eAEHtB,GAAA,CAACuB,UAAU,EAAA;MACTH,SAAS,EAAEC,IAAI,CACb,mCAAmC,EACnCT,QAAQ,IAAI,IAAI,GACZ,4BAA4B,GAC5B;QACE,4BAA4B,EAAE,CAACA,QAAQ;AACvC;AACA,QAAA,wBAAwB,EAAEA,QAAQ;AAClC,QAAA,wBAAwB,EAAEI,QAAAA;AAC3B,OAAA,CACL;MACFQ,WAAW,eACTC,IAAA,CAAAC,QAAA,EAAA;QAAAJ,QAAA,EAAA,CACG,CAACV,QAAQ,IAAIO,aAAa,gBACzBnB,GAAA,CAAC2B,UAAU,EAAA;AAAC,UAAA,YAAA,EAAYrB,IAAI,CAACsB,aAAa,CAACC,QAAQ,CAACC,IAAI,CAAE;AAACnB,UAAAA,OAAO,EAAEP,QAAAA;SAAS,CAAG,gBAEhFJ,GAAA,CAAA,KAAA,EAAA;AAAKoB,UAAAA,SAAS,EAAC,sBAAsB;AAAAE,UAAAA,QAAA,EAAEvB,IAAAA;SAAU,CAClD,EACA,CAACa,QAAQ,IAAI,CAACV,IAAI,iBACjBF,GAAA,CAAC+B,aAAa,EAAA;AACZX,UAAAA,SAAS,EAAC,OAAO;UACjBY,MAAM,EAAE3B,KAAK,CAAC4B,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACC,KAAK,CAAE;AACxCC,UAAAA,WAAW,EAAEvC,UAAAA;AAAW,SAAA,CAE3B,CAAA;AAAA,OAEL,CAAC;AACDwC,MAAAA,YAAY,eACVZ,IAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAC,iFAAiF;AAAAE,QAAAA,QAAA,GAC7FJ,SAAS,EACTA,SAAS,IAAIV,WAAW,iBAAIR,GAAA,CAAA,MAAA,EAAA;AAAMoB,UAAAA,SAAS,EAAC,OAAA;SAAO,CAAG,EACtDZ,WAAW,CAAA;AAAA,OACT,CACN;AACD8B,MAAAA,aAAa,EACX,CAACpC,IAAI,iBACHF,GAAA,CAACuC,OAAO,EAAA;AACN1C,QAAAA,UAAU,EAAEA,UAAW;AACvBQ,QAAAA,KAAK,EAAEA,KAAM;QACbe,SAAS,EAAEC,IAAI,CAAC,6BAA6B,CAAA;AAAE,OAAA,CAGpD;MACDmB,MAAM,EAAE,CAACxB,QAAQ,GAAGyB,MAAM,CAACC,QAAQ,GAAGD,MAAM,CAACE,UAAAA;KAEjD,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var clsx = require('clsx');
|
|
4
4
|
require('react');
|
|
5
5
|
var Body = require('../../body/Body.js');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var typography = require('../../common/propsValues/typography.js');
|
|
8
8
|
|
|
9
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
12
|
-
|
|
13
9
|
const AnimatedLabel = ({
|
|
14
10
|
activeLabel,
|
|
15
11
|
className,
|
|
@@ -17,11 +13,11 @@ const AnimatedLabel = ({
|
|
|
17
13
|
}) => {
|
|
18
14
|
return /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
19
15
|
type: typography.Typography.BODY_LARGE_BOLD,
|
|
20
|
-
className:
|
|
16
|
+
className: clsx.clsx('np-animated-label', className),
|
|
21
17
|
children: labels.map((label, index) => {
|
|
22
18
|
const nextLabel = index - 1;
|
|
23
19
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
24
|
-
className:
|
|
20
|
+
className: clsx.clsx('text-xs-center', {
|
|
25
21
|
'np-animated-label--in text-ellipsis': index === activeLabel
|
|
26
22
|
}),
|
|
27
23
|
children: label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedLabel.js","sources":["../../../src/flowNavigation/animatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"AnimatedLabel.js","sources":["../../../src/flowNavigation/animatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\n\nimport Body from '../../body';\nimport { Typography } from '../../common';\n\nexport interface AnimatedLabelProps {\n activeLabel: number;\n className?: string;\n labels: readonly React.ReactNode[];\n}\n\nconst AnimatedLabel = ({ activeLabel, className, labels }: AnimatedLabelProps) => {\n return (\n <Body type={Typography.BODY_LARGE_BOLD} className={clsx('np-animated-label', className)}>\n {labels.map((label, index) => {\n const nextLabel = index - 1;\n return (\n <div\n key={nextLabel}\n className={clsx('text-xs-center', {\n 'np-animated-label--in text-ellipsis': index === activeLabel,\n })}\n >\n {label}\n </div>\n );\n })}\n </Body>\n );\n};\n\nexport default AnimatedLabel;\n"],"names":["AnimatedLabel","activeLabel","className","labels","_jsx","Body","type","Typography","BODY_LARGE_BOLD","clsx","children","map","label","index","nextLabel"],"mappings":";;;;;;;;AAYMA,MAAAA,aAAa,GAAGA,CAAC;EAAEC,WAAW;EAAEC,SAAS;AAAEC,EAAAA,MAAAA;AAA4B,CAAA,KAAI;EAC/E,oBACEC,cAAA,CAACC,IAAI,EAAA;IAACC,IAAI,EAAEC,qBAAU,CAACC,eAAgB;AAACN,IAAAA,SAAS,EAAEO,SAAI,CAAC,mBAAmB,EAAEP,SAAS,CAAE;IAAAQ,QAAA,EACrFP,MAAM,CAACQ,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAI;AAC3B,MAAA,MAAMC,SAAS,GAAGD,KAAK,GAAG,CAAC,CAAA;AAC3B,MAAA,oBACET,cAAA,CAAA,KAAA,EAAA;AAEEF,QAAAA,SAAS,EAAEO,SAAI,CAAC,gBAAgB,EAAE;UAChC,qCAAqC,EAAEI,KAAK,KAAKZ,WAAAA;AAClD,SAAA,CAAE;AAAAS,QAAAA,QAAA,EAEFE,KAAAA;AAAK,OAAA,EALDE,SAMF,CAAC,CAAA;KAET,CAAA;AAAC,GACE,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import 'react';
|
|
3
3
|
import Body from '../../body/Body.mjs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -11,11 +11,11 @@ const AnimatedLabel = ({
|
|
|
11
11
|
}) => {
|
|
12
12
|
return /*#__PURE__*/jsx(Body, {
|
|
13
13
|
type: Typography.BODY_LARGE_BOLD,
|
|
14
|
-
className:
|
|
14
|
+
className: clsx('np-animated-label', className),
|
|
15
15
|
children: labels.map((label, index) => {
|
|
16
16
|
const nextLabel = index - 1;
|
|
17
17
|
return /*#__PURE__*/jsx("div", {
|
|
18
|
-
className:
|
|
18
|
+
className: clsx('text-xs-center', {
|
|
19
19
|
'np-animated-label--in text-ellipsis': index === activeLabel
|
|
20
20
|
}),
|
|
21
21
|
children: label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedLabel.mjs","sources":["../../../src/flowNavigation/animatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"AnimatedLabel.mjs","sources":["../../../src/flowNavigation/animatedLabel/AnimatedLabel.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport React from 'react';\n\nimport Body from '../../body';\nimport { Typography } from '../../common';\n\nexport interface AnimatedLabelProps {\n activeLabel: number;\n className?: string;\n labels: readonly React.ReactNode[];\n}\n\nconst AnimatedLabel = ({ activeLabel, className, labels }: AnimatedLabelProps) => {\n return (\n <Body type={Typography.BODY_LARGE_BOLD} className={clsx('np-animated-label', className)}>\n {labels.map((label, index) => {\n const nextLabel = index - 1;\n return (\n <div\n key={nextLabel}\n className={clsx('text-xs-center', {\n 'np-animated-label--in text-ellipsis': index === activeLabel,\n })}\n >\n {label}\n </div>\n );\n })}\n </Body>\n );\n};\n\nexport default AnimatedLabel;\n"],"names":["AnimatedLabel","activeLabel","className","labels","_jsx","Body","type","Typography","BODY_LARGE_BOLD","clsx","children","map","label","index","nextLabel"],"mappings":";;;;;;AAYMA,MAAAA,aAAa,GAAGA,CAAC;EAAEC,WAAW;EAAEC,SAAS;AAAEC,EAAAA,MAAAA;AAA4B,CAAA,KAAI;EAC/E,oBACEC,GAAA,CAACC,IAAI,EAAA;IAACC,IAAI,EAAEC,UAAU,CAACC,eAAgB;AAACN,IAAAA,SAAS,EAAEO,IAAI,CAAC,mBAAmB,EAAEP,SAAS,CAAE;IAAAQ,QAAA,EACrFP,MAAM,CAACQ,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAI;AAC3B,MAAA,MAAMC,SAAS,GAAGD,KAAK,GAAG,CAAC,CAAA;AAC3B,MAAA,oBACET,GAAA,CAAA,KAAA,EAAA;AAEEF,QAAAA,SAAS,EAAEO,IAAI,CAAC,gBAAgB,EAAE;UAChC,qCAAqC,EAAEI,KAAK,KAAKZ,WAAAA;AAClD,SAAA,CAAE;AAAAS,QAAAA,QAAA,EAEFE,KAAAA;AAAK,OAAA,EALDE,SAMF,CAAC,CAAA;KAET,CAAA;AAAC,GACE,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var icons = require('@transferwise/icons');
|
|
4
|
-
var
|
|
4
|
+
var clsx = require('clsx');
|
|
5
5
|
var avatarTypes = require('../../avatar/avatarTypes.js');
|
|
6
6
|
var Avatar = require('../../avatar/Avatar.js');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
|
|
9
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
12
|
-
|
|
13
9
|
function BackButton({
|
|
14
10
|
className,
|
|
15
11
|
onClick,
|
|
@@ -21,7 +17,7 @@ function BackButton({
|
|
|
21
17
|
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
22
18
|
type: "button",
|
|
23
19
|
"aria-label": ariaLabel,
|
|
24
|
-
className:
|
|
20
|
+
className: clsx.clsx('np-back-button', 'btn-unstyled', className),
|
|
25
21
|
onClick: onClick,
|
|
26
22
|
children: /*#__PURE__*/jsxRuntime.jsx(icons.ArrowLeft, {
|
|
27
23
|
size: 24
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackButton.js","sources":["../../../src/flowNavigation/backButton/BackButton.tsx"],"sourcesContent":["import { ArrowLeft as ArrowLeftIcon } from '@transferwise/icons';\nimport
|
|
1
|
+
{"version":3,"file":"BackButton.js","sources":["../../../src/flowNavigation/backButton/BackButton.tsx"],"sourcesContent":["import { ArrowLeft as ArrowLeftIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\n\nimport Avatar, { AvatarType } from '../../avatar';\n\nexport interface BackButtonProps {\n 'aria-label': string;\n className?: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nexport default function BackButton({\n className,\n onClick,\n 'aria-label': ariaLabel,\n}: BackButtonProps) {\n return (\n <Avatar type={AvatarType.ICON} size={40}>\n <button\n type=\"button\"\n aria-label={ariaLabel}\n className={clsx('np-back-button', 'btn-unstyled', className)}\n onClick={onClick}\n >\n <ArrowLeftIcon size={24} />\n </button>\n </Avatar>\n );\n}\n"],"names":["BackButton","className","onClick","ariaLabel","_jsx","Avatar","type","AvatarType","ICON","size","children","clsx","ArrowLeftIcon"],"mappings":";;;;;;;;AAWwB,SAAAA,UAAUA,CAAC;EACjCC,SAAS;EACTC,OAAO;AACP,EAAA,YAAY,EAAEC,SAAAA;AACE,CAAA,EAAA;EAChB,oBACEC,cAAA,CAACC,MAAM,EAAA;IAACC,IAAI,EAAEC,sBAAU,CAACC,IAAK;AAACC,IAAAA,IAAI,EAAE,EAAG;AAAAC,IAAAA,QAAA,eACtCN,cAAA,CAAA,QAAA,EAAA;AACEE,MAAAA,IAAI,EAAC,QAAQ;AACb,MAAA,YAAA,EAAYH,SAAU;MACtBF,SAAS,EAAEU,SAAI,CAAC,gBAAgB,EAAE,cAAc,EAAEV,SAAS,CAAE;AAC7DC,MAAAA,OAAO,EAAEA,OAAQ;MAAAQ,QAAA,eAEjBN,cAAA,CAACQ,eAAa,EAAA;AAACH,QAAAA,IAAI,EAAE,EAAA;OACvB,CAAA;KAAQ,CAAA;AACV,GAAQ,CAAC,CAAA;AAEb;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArrowLeft } from '@transferwise/icons';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import { AvatarType } from '../../avatar/avatarTypes.mjs';
|
|
4
4
|
import Avatar from '../../avatar/Avatar.mjs';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -15,7 +15,7 @@ function BackButton({
|
|
|
15
15
|
children: /*#__PURE__*/jsx("button", {
|
|
16
16
|
type: "button",
|
|
17
17
|
"aria-label": ariaLabel,
|
|
18
|
-
className:
|
|
18
|
+
className: clsx('np-back-button', 'btn-unstyled', className),
|
|
19
19
|
onClick: onClick,
|
|
20
20
|
children: /*#__PURE__*/jsx(ArrowLeft, {
|
|
21
21
|
size: 24
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackButton.mjs","sources":["../../../src/flowNavigation/backButton/BackButton.tsx"],"sourcesContent":["import { ArrowLeft as ArrowLeftIcon } from '@transferwise/icons';\nimport
|
|
1
|
+
{"version":3,"file":"BackButton.mjs","sources":["../../../src/flowNavigation/backButton/BackButton.tsx"],"sourcesContent":["import { ArrowLeft as ArrowLeftIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\n\nimport Avatar, { AvatarType } from '../../avatar';\n\nexport interface BackButtonProps {\n 'aria-label': string;\n className?: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nexport default function BackButton({\n className,\n onClick,\n 'aria-label': ariaLabel,\n}: BackButtonProps) {\n return (\n <Avatar type={AvatarType.ICON} size={40}>\n <button\n type=\"button\"\n aria-label={ariaLabel}\n className={clsx('np-back-button', 'btn-unstyled', className)}\n onClick={onClick}\n >\n <ArrowLeftIcon size={24} />\n </button>\n </Avatar>\n );\n}\n"],"names":["BackButton","className","onClick","ariaLabel","_jsx","Avatar","type","AvatarType","ICON","size","children","clsx","ArrowLeftIcon"],"mappings":";;;;;;AAWwB,SAAAA,UAAUA,CAAC;EACjCC,SAAS;EACTC,OAAO;AACP,EAAA,YAAY,EAAEC,SAAAA;AACE,CAAA,EAAA;EAChB,oBACEC,GAAA,CAACC,MAAM,EAAA;IAACC,IAAI,EAAEC,UAAU,CAACC,IAAK;AAACC,IAAAA,IAAI,EAAE,EAAG;AAAAC,IAAAA,QAAA,eACtCN,GAAA,CAAA,QAAA,EAAA;AACEE,MAAAA,IAAI,EAAC,QAAQ;AACb,MAAA,YAAA,EAAYH,SAAU;MACtBF,SAAS,EAAEU,IAAI,CAAC,gBAAgB,EAAE,cAAc,EAAEV,SAAS,CAAE;AAC7DC,MAAAA,OAAO,EAAEA,OAAQ;MAAAQ,QAAA,eAEjBN,GAAA,CAACQ,SAAa,EAAA;AAACH,QAAAA,IAAI,EAAE,EAAA;OACvB,CAAA;KAAQ,CAAA;AACV,GAAQ,CAAC,CAAA;AAEb;;;;"}
|
package/build/header/Header.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var componentsTheming = require('@wise/components-theming');
|
|
6
|
-
var
|
|
6
|
+
var clsx = require('clsx');
|
|
7
7
|
var ActionButton = require('../actionButton/ActionButton.js');
|
|
8
8
|
var Button = require('../button/Button.js');
|
|
9
9
|
var Link = require('../link/Link.js');
|
|
@@ -11,10 +11,6 @@ var Title = require('../title/Title.js');
|
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
var typography = require('../common/propsValues/typography.js');
|
|
13
13
|
|
|
14
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
17
|
-
|
|
18
14
|
const HeaderAction = ({
|
|
19
15
|
action
|
|
20
16
|
}) => {
|
|
@@ -61,7 +57,7 @@ const Header = ({
|
|
|
61
57
|
return /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
62
58
|
as: as,
|
|
63
59
|
type: typography.Typography.TITLE_GROUP,
|
|
64
|
-
className:
|
|
60
|
+
className: clsx.clsx('np-header', 'np-header__title', className),
|
|
65
61
|
children: title
|
|
66
62
|
});
|
|
67
63
|
}
|
|
@@ -70,7 +66,7 @@ const Header = ({
|
|
|
70
66
|
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
71
67
|
}
|
|
72
68
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
73
|
-
className:
|
|
69
|
+
className: clsx.clsx('np-header', className),
|
|
74
70
|
children: [/*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
75
71
|
as: as,
|
|
76
72
|
type: typography.Typography.TITLE_GROUP,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\n\nimport ActionButton, { ActionButtonProps } from '../actionButton/ActionButton';\nimport Button from '../button';\nimport { AriaLabelProperty, CommonProps, Heading, LinkProps, Typography } from '../common';\nimport Link from '../link';\nimport Title from '../title';\n\ntype ActionProps = AriaLabelProperty & {\n text: string;\n};\n\ntype ButtonActionProps = ActionProps & ActionButtonProps;\n\ntype LinkActionProps = ActionProps & LinkProps;\n\nexport type HeaderProps = CommonProps & {\n /**\n * When the `href` property is provided to the `action`, we will render a `Link` instead of a `ActionButton`.\n */\n action?: ButtonActionProps | LinkActionProps;\n /**\n * Override the heading element rendered for the title, useful to specify the semantics of your header.\n *\n * @default \"h5\"\n */\n as?: Heading | 'legend';\n title: string;\n};\n\nconst HeaderAction = ({ action }: { action: ButtonActionProps | LinkActionProps }) => {\n const { isModern } = useTheme();\n const props = {\n 'aria-label': action['aria-label'],\n };\n\n if ('href' in action) {\n return (\n <Link href={action.href} target={action.target} onClick={action.onClick} {...props}>\n {action.text}\n </Link>\n );\n }\n\n return isModern ? (\n <Button\n className=\"np-header__button\"\n priority=\"tertiary\"\n size=\"sm\"\n onClick={action.onClick}\n {...props}\n >\n {action.text}\n </Button>\n ) : (\n <ActionButton onClick={action.onClick} {...props}>\n {action.text}\n </ActionButton>\n );\n};\n\n/**\n *\n * Neptune Web: https://transferwise.github.io/neptune-web/components/content/Header\n *\n */\nexport const Header = ({ action, as = 'h5', title, className }: HeaderProps) => {\n if (!action) {\n return (\n <Title\n as={as}\n type={Typography.TITLE_GROUP}\n className={clsx('np-header', 'np-header__title', className)}\n >\n {title}\n </Title>\n );\n }\n\n if (as === 'legend') {\n // eslint-disable-next-line no-console\n console.warn(\n 'Legends should be the first child in a fieldset, and this is not possible when including an action',\n );\n }\n\n return (\n <div className={clsx('np-header', className)}>\n <Title as={as} type={Typography.TITLE_GROUP} className=\"np-header__title\">\n {title}\n </Title>\n <HeaderAction action={action} />\n </div>\n );\n};\n\nexport default Header;\n"],"names":["HeaderAction","action","isModern","useTheme","props","_jsx","Link","href","target","onClick","children","text","Button","className","priority","size","ActionButton","Header","as","title","Title","type","Typography","TITLE_GROUP","clsx","console","warn","_jsxs"],"mappings":";;;;;;;;;;;;;AA+BA,MAAMA,YAAY,GAAGA,CAAC;AAAEC,EAAAA,MAAAA;AAAM,CAAmD,KAAI;EACnF,MAAM;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,0BAAQ,EAAE,CAAA;AAC/B,EAAA,MAAMC,KAAK,GAAG;IACZ,YAAY,EAAEH,MAAM,CAAC,YAAY,CAAA;GAClC,CAAA;EAED,IAAI,MAAM,IAAIA,MAAM,EAAE;IACpB,oBACEI,cAAA,CAACC,IAAI,EAAA;MAACC,IAAI,EAAEN,MAAM,CAACM,IAAK;MAACC,MAAM,EAAEP,MAAM,CAACO,MAAO;MAACC,OAAO,EAAER,MAAM,CAACQ,OAAQ;AAAA,MAAA,GAAKL,KAAK;MAAAM,QAAA,EAC/ET,MAAM,CAACU,IAAAA;AAAI,KACR,CAAC,CAAA;AAEX,GAAA;AAEA,EAAA,OAAOT,QAAQ,gBACbG,cAAA,CAACO,MAAM,EAAA;AACLC,IAAAA,SAAS,EAAC,mBAAmB;AAC7BC,IAAAA,QAAQ,EAAC,UAAU;AACnBC,IAAAA,IAAI,EAAC,IAAI;IACTN,OAAO,EAAER,MAAM,CAACQ,OAAQ;AAAA,IAAA,GACpBL,KAAK;IAAAM,QAAA,EAERT,MAAM,CAACU,IAAAA;AAAI,GACN,CAAC,gBAETN,cAAA,CAACW,YAAY,EAAA;IAACP,OAAO,EAAER,MAAM,CAACQ,OAAQ;AAAA,IAAA,GAAKL,KAAK;IAAAM,QAAA,EAC7CT,MAAM,CAACU,IAAAA;AAAI,GACA,CACf,CAAA;AACH,CAAC,CAAA;AAED;;;;AAIG;AACI,MAAMM,MAAM,GAAGA,CAAC;EAAEhB,MAAM;AAAEiB,EAAAA,EAAE,GAAG,IAAI;EAAEC,KAAK;AAAEN,EAAAA,SAAAA;AAAS,CAAe,KAAI;EAC7E,IAAI,CAACZ,MAAM,EAAE;IACX,oBACEI,cAAA,CAACe,KAAK,EAAA;AACJF,MAAAA,EAAE,EAAEA,EAAG;MACPG,IAAI,EAAEC,qBAAU,CAACC,WAAY;MAC7BV,SAAS,EAAEW,SAAI,CAAC,WAAW,EAAE,kBAAkB,EAAEX,SAAS,CAAE;AAAAH,MAAAA,QAAA,EAE3DS,KAAAA;AAAK,KACD,CAAC,CAAA;AAEZ,GAAA;EAEA,IAAID,EAAE,KAAK,QAAQ,EAAE;AACnB;AACAO,IAAAA,OAAO,CAACC,IAAI,CACV,oGAAoG,CACrG,CAAA;AACH,GAAA;AAEA,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AAAKd,IAAAA,SAAS,EAAEW,SAAI,CAAC,WAAW,EAAEX,SAAS,CAAE;IAAAH,QAAA,EAAA,cAC3CL,cAAA,CAACe,KAAK,EAAA;AAACF,MAAAA,EAAE,EAAEA,EAAG;MAACG,IAAI,EAAEC,qBAAU,CAACC,WAAY;AAACV,MAAAA,SAAS,EAAC,kBAAkB;AAAAH,MAAAA,QAAA,EACtES,KAAAA;AAAK,KACD,CACP,eAAAd,cAAA,CAACL,YAAY,EAAA;AAACC,MAAAA,MAAM,EAAEA,MAAAA;AAAO,KAC/B,CAAA,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;;"}
|
package/build/header/Header.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTheme } from '@wise/components-theming';
|
|
2
|
-
import
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
3
|
import ActionButton from '../actionButton/ActionButton.mjs';
|
|
4
4
|
import Button from '../button/Button.mjs';
|
|
5
5
|
import Link from '../link/Link.mjs';
|
|
@@ -53,7 +53,7 @@ const Header = ({
|
|
|
53
53
|
return /*#__PURE__*/jsx(Title, {
|
|
54
54
|
as: as,
|
|
55
55
|
type: Typography.TITLE_GROUP,
|
|
56
|
-
className:
|
|
56
|
+
className: clsx('np-header', 'np-header__title', className),
|
|
57
57
|
children: title
|
|
58
58
|
});
|
|
59
59
|
}
|
|
@@ -62,7 +62,7 @@ const Header = ({
|
|
|
62
62
|
console.warn('Legends should be the first child in a fieldset, and this is not possible when including an action');
|
|
63
63
|
}
|
|
64
64
|
return /*#__PURE__*/jsxs("div", {
|
|
65
|
-
className:
|
|
65
|
+
className: clsx('np-header', className),
|
|
66
66
|
children: [/*#__PURE__*/jsx(Title, {
|
|
67
67
|
as: as,
|
|
68
68
|
type: Typography.TITLE_GROUP,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.mjs","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport
|
|
1
|
+
{"version":3,"file":"Header.mjs","sources":["../../src/header/Header.tsx"],"sourcesContent":["import { useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\n\nimport ActionButton, { ActionButtonProps } from '../actionButton/ActionButton';\nimport Button from '../button';\nimport { AriaLabelProperty, CommonProps, Heading, LinkProps, Typography } from '../common';\nimport Link from '../link';\nimport Title from '../title';\n\ntype ActionProps = AriaLabelProperty & {\n text: string;\n};\n\ntype ButtonActionProps = ActionProps & ActionButtonProps;\n\ntype LinkActionProps = ActionProps & LinkProps;\n\nexport type HeaderProps = CommonProps & {\n /**\n * When the `href` property is provided to the `action`, we will render a `Link` instead of a `ActionButton`.\n */\n action?: ButtonActionProps | LinkActionProps;\n /**\n * Override the heading element rendered for the title, useful to specify the semantics of your header.\n *\n * @default \"h5\"\n */\n as?: Heading | 'legend';\n title: string;\n};\n\nconst HeaderAction = ({ action }: { action: ButtonActionProps | LinkActionProps }) => {\n const { isModern } = useTheme();\n const props = {\n 'aria-label': action['aria-label'],\n };\n\n if ('href' in action) {\n return (\n <Link href={action.href} target={action.target} onClick={action.onClick} {...props}>\n {action.text}\n </Link>\n );\n }\n\n return isModern ? (\n <Button\n className=\"np-header__button\"\n priority=\"tertiary\"\n size=\"sm\"\n onClick={action.onClick}\n {...props}\n >\n {action.text}\n </Button>\n ) : (\n <ActionButton onClick={action.onClick} {...props}>\n {action.text}\n </ActionButton>\n );\n};\n\n/**\n *\n * Neptune Web: https://transferwise.github.io/neptune-web/components/content/Header\n *\n */\nexport const Header = ({ action, as = 'h5', title, className }: HeaderProps) => {\n if (!action) {\n return (\n <Title\n as={as}\n type={Typography.TITLE_GROUP}\n className={clsx('np-header', 'np-header__title', className)}\n >\n {title}\n </Title>\n );\n }\n\n if (as === 'legend') {\n // eslint-disable-next-line no-console\n console.warn(\n 'Legends should be the first child in a fieldset, and this is not possible when including an action',\n );\n }\n\n return (\n <div className={clsx('np-header', className)}>\n <Title as={as} type={Typography.TITLE_GROUP} className=\"np-header__title\">\n {title}\n </Title>\n <HeaderAction action={action} />\n </div>\n );\n};\n\nexport default Header;\n"],"names":["HeaderAction","action","isModern","useTheme","props","_jsx","Link","href","target","onClick","children","text","Button","className","priority","size","ActionButton","Header","as","title","Title","type","Typography","TITLE_GROUP","clsx","console","warn","_jsxs"],"mappings":";;;;;;;;;AA+BA,MAAMA,YAAY,GAAGA,CAAC;AAAEC,EAAAA,MAAAA;AAAM,CAAmD,KAAI;EACnF,MAAM;AAAEC,IAAAA,QAAAA;GAAU,GAAGC,QAAQ,EAAE,CAAA;AAC/B,EAAA,MAAMC,KAAK,GAAG;IACZ,YAAY,EAAEH,MAAM,CAAC,YAAY,CAAA;GAClC,CAAA;EAED,IAAI,MAAM,IAAIA,MAAM,EAAE;IACpB,oBACEI,GAAA,CAACC,IAAI,EAAA;MAACC,IAAI,EAAEN,MAAM,CAACM,IAAK;MAACC,MAAM,EAAEP,MAAM,CAACO,MAAO;MAACC,OAAO,EAAER,MAAM,CAACQ,OAAQ;AAAA,MAAA,GAAKL,KAAK;MAAAM,QAAA,EAC/ET,MAAM,CAACU,IAAAA;AAAI,KACR,CAAC,CAAA;AAEX,GAAA;AAEA,EAAA,OAAOT,QAAQ,gBACbG,GAAA,CAACO,MAAM,EAAA;AACLC,IAAAA,SAAS,EAAC,mBAAmB;AAC7BC,IAAAA,QAAQ,EAAC,UAAU;AACnBC,IAAAA,IAAI,EAAC,IAAI;IACTN,OAAO,EAAER,MAAM,CAACQ,OAAQ;AAAA,IAAA,GACpBL,KAAK;IAAAM,QAAA,EAERT,MAAM,CAACU,IAAAA;AAAI,GACN,CAAC,gBAETN,GAAA,CAACW,YAAY,EAAA;IAACP,OAAO,EAAER,MAAM,CAACQ,OAAQ;AAAA,IAAA,GAAKL,KAAK;IAAAM,QAAA,EAC7CT,MAAM,CAACU,IAAAA;AAAI,GACA,CACf,CAAA;AACH,CAAC,CAAA;AAED;;;;AAIG;AACI,MAAMM,MAAM,GAAGA,CAAC;EAAEhB,MAAM;AAAEiB,EAAAA,EAAE,GAAG,IAAI;EAAEC,KAAK;AAAEN,EAAAA,SAAAA;AAAS,CAAe,KAAI;EAC7E,IAAI,CAACZ,MAAM,EAAE;IACX,oBACEI,GAAA,CAACe,KAAK,EAAA;AACJF,MAAAA,EAAE,EAAEA,EAAG;MACPG,IAAI,EAAEC,UAAU,CAACC,WAAY;MAC7BV,SAAS,EAAEW,IAAI,CAAC,WAAW,EAAE,kBAAkB,EAAEX,SAAS,CAAE;AAAAH,MAAAA,QAAA,EAE3DS,KAAAA;AAAK,KACD,CAAC,CAAA;AAEZ,GAAA;EAEA,IAAID,EAAE,KAAK,QAAQ,EAAE;AACnB;AACAO,IAAAA,OAAO,CAACC,IAAI,CACV,oGAAoG,CACrG,CAAA;AACH,GAAA;AAEA,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;AAAKd,IAAAA,SAAS,EAAEW,IAAI,CAAC,WAAW,EAAEX,SAAS,CAAE;IAAAH,QAAA,EAAA,cAC3CL,GAAA,CAACe,KAAK,EAAA;AAACF,MAAAA,EAAE,EAAEA,EAAG;MAACG,IAAI,EAAEC,UAAU,CAACC,WAAY;AAACV,MAAAA,SAAS,EAAC,kBAAkB;AAAAH,MAAAA,QAAA,EACtES,KAAAA;AAAK,KACD,CACP,eAAAd,GAAA,CAACL,YAAY,EAAA;AAACC,MAAAA,MAAM,EAAEA,MAAAA;AAAO,KAC/B,CAAA,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
package/build/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/build/i18n/zh-HK.json.js
CHANGED
|
@@ -25,6 +25,8 @@ var zhHK = {
|
|
|
25
25
|
"neptune.PhoneNumberInput.SelectInput.placeholder": "選擇其中一項…",
|
|
26
26
|
"neptune.Select.searchPlaceholder": "搜尋…",
|
|
27
27
|
"neptune.SelectInput.noResultsFound": "找不到任何結果",
|
|
28
|
+
"neptune.SelectOption.action.label": "選擇",
|
|
29
|
+
"neptune.SelectOption.selected.action.label": "更改已選選項",
|
|
28
30
|
"neptune.Summary.statusDone": "已完成事項",
|
|
29
31
|
"neptune.Summary.statusNotDone": "未完成事項",
|
|
30
32
|
"neptune.Summary.statusPending": "待處理事項",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-HK.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zh-HK.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -23,6 +23,8 @@ var zhHK = {
|
|
|
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": "待處理事項",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-HK.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zh-HK.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/image/Image.js
CHANGED
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var clsx = require('clsx');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var useHasIntersected = require('../common/hooks/useHasIntersected/useHasIntersected.js');
|
|
9
9
|
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
13
|
-
|
|
14
10
|
const EmptyTransparentImage = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
|
|
15
11
|
const Image = ({
|
|
16
12
|
id,
|
|
@@ -40,7 +36,7 @@ const Image = ({
|
|
|
40
36
|
id: id,
|
|
41
37
|
alt: alt,
|
|
42
38
|
src: imageSource,
|
|
43
|
-
className:
|
|
39
|
+
className: clsx.clsx(['tw-image', {
|
|
44
40
|
'tw-image__stretch': stretch,
|
|
45
41
|
'tw-image__shrink': shrink
|
|
46
42
|
}, className]),
|
package/build/image/Image.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.js","sources":["../../src/image/Image.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Image.js","sources":["../../src/image/Image.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useRef } from 'react';\n\nimport { useHasIntersected } from '../common/hooks';\n\nexport interface ImageProps {\n alt: string;\n src: string;\n id?: string;\n onLoad?: () => void;\n onError?: () => void;\n className?: string;\n loading?: 'lazy' | 'eager';\n stretch?: boolean;\n role?: string;\n shrink?: boolean;\n}\n\nexport const EmptyTransparentImage =\n 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n\nconst Image = ({\n id,\n src,\n alt,\n onLoad,\n onError,\n className,\n loading,\n stretch = true,\n role,\n shrink = true,\n}: ImageProps) => {\n const elementReference = useRef<HTMLImageElement>(null);\n const [hasIntersected] = useHasIntersected({ elRef: elementReference, loading });\n let imageSource = src;\n let imageOnLoad = onLoad;\n\n if (loading === 'lazy' && !hasIntersected) {\n imageSource = EmptyTransparentImage;\n imageOnLoad = undefined;\n }\n\n return (\n <img\n ref={elementReference}\n id={id}\n alt={alt}\n src={imageSource}\n className={clsx([\n 'tw-image',\n {\n 'tw-image__stretch': stretch,\n 'tw-image__shrink': shrink,\n },\n className,\n ])}\n role={role}\n onLoad={imageOnLoad}\n onError={onError}\n />\n );\n};\n\nexport default Image;\n"],"names":["EmptyTransparentImage","Image","id","src","alt","onLoad","onError","className","loading","stretch","role","shrink","elementReference","useRef","hasIntersected","useHasIntersected","elRef","imageSource","imageOnLoad","undefined","_jsx","ref","clsx"],"mappings":";;;;;;;;;AAkBO,MAAMA,qBAAqB,GAChC,6EAA4E;AAExEC,MAAAA,KAAK,GAAGA,CAAC;EACbC,EAAE;EACFC,GAAG;EACHC,GAAG;EACHC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC,OAAO;AACPC,EAAAA,OAAO,GAAG,IAAI;EACdC,IAAI;AACJC,EAAAA,MAAM,GAAG,IAAA;AAAI,CACF,KAAI;AACf,EAAA,MAAMC,gBAAgB,GAAGC,YAAM,CAAmB,IAAI,CAAC,CAAA;AACvD,EAAA,MAAM,CAACC,cAAc,CAAC,GAAGC,mCAAiB,CAAC;AAAEC,IAAAA,KAAK,EAAEJ,gBAAgB;AAAEJ,IAAAA,OAAAA;AAAO,GAAE,CAAC,CAAA;EAChF,IAAIS,WAAW,GAAGd,GAAG,CAAA;EACrB,IAAIe,WAAW,GAAGb,MAAM,CAAA;AAExB,EAAA,IAAIG,OAAO,KAAK,MAAM,IAAI,CAACM,cAAc,EAAE;AACzCG,IAAAA,WAAW,GAAGjB,qBAAqB,CAAA;AACnCkB,IAAAA,WAAW,GAAGC,SAAS,CAAA;AACzB,GAAA;AAEA,EAAA,oBACEC,cAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,GAAG,EAAET,gBAAiB;AACtBV,IAAAA,EAAE,EAAEA,EAAG;AACPE,IAAAA,GAAG,EAAEA,GAAI;AACTD,IAAAA,GAAG,EAAEc,WAAY;AACjBV,IAAAA,SAAS,EAAEe,SAAI,CAAC,CACd,UAAU,EACV;AACE,MAAA,mBAAmB,EAAEb,OAAO;AAC5B,MAAA,kBAAkB,EAAEE,MAAAA;KACrB,EACDJ,SAAS,CACV,CAAE;AACHG,IAAAA,IAAI,EAAEA,IAAK;AACXL,IAAAA,MAAM,EAAEa,WAAY;AACpBZ,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GACjB,CAAA,CAAA;AAEN;;;;;"}
|
package/build/image/Image.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useHasIntersected } from '../common/hooks/useHasIntersected/useHasIntersected.mjs';
|
|
@@ -32,7 +32,7 @@ const Image = ({
|
|
|
32
32
|
id: id,
|
|
33
33
|
alt: alt,
|
|
34
34
|
src: imageSource,
|
|
35
|
-
className:
|
|
35
|
+
className: clsx(['tw-image', {
|
|
36
36
|
'tw-image__stretch': stretch,
|
|
37
37
|
'tw-image__shrink': shrink
|
|
38
38
|
}, className]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.mjs","sources":["../../src/image/Image.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Image.mjs","sources":["../../src/image/Image.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { useRef } from 'react';\n\nimport { useHasIntersected } from '../common/hooks';\n\nexport interface ImageProps {\n alt: string;\n src: string;\n id?: string;\n onLoad?: () => void;\n onError?: () => void;\n className?: string;\n loading?: 'lazy' | 'eager';\n stretch?: boolean;\n role?: string;\n shrink?: boolean;\n}\n\nexport const EmptyTransparentImage =\n 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n\nconst Image = ({\n id,\n src,\n alt,\n onLoad,\n onError,\n className,\n loading,\n stretch = true,\n role,\n shrink = true,\n}: ImageProps) => {\n const elementReference = useRef<HTMLImageElement>(null);\n const [hasIntersected] = useHasIntersected({ elRef: elementReference, loading });\n let imageSource = src;\n let imageOnLoad = onLoad;\n\n if (loading === 'lazy' && !hasIntersected) {\n imageSource = EmptyTransparentImage;\n imageOnLoad = undefined;\n }\n\n return (\n <img\n ref={elementReference}\n id={id}\n alt={alt}\n src={imageSource}\n className={clsx([\n 'tw-image',\n {\n 'tw-image__stretch': stretch,\n 'tw-image__shrink': shrink,\n },\n className,\n ])}\n role={role}\n onLoad={imageOnLoad}\n onError={onError}\n />\n );\n};\n\nexport default Image;\n"],"names":["EmptyTransparentImage","Image","id","src","alt","onLoad","onError","className","loading","stretch","role","shrink","elementReference","useRef","hasIntersected","useHasIntersected","elRef","imageSource","imageOnLoad","undefined","_jsx","ref","clsx"],"mappings":";;;;;AAkBO,MAAMA,qBAAqB,GAChC,6EAA4E;AAExEC,MAAAA,KAAK,GAAGA,CAAC;EACbC,EAAE;EACFC,GAAG;EACHC,GAAG;EACHC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC,OAAO;AACPC,EAAAA,OAAO,GAAG,IAAI;EACdC,IAAI;AACJC,EAAAA,MAAM,GAAG,IAAA;AAAI,CACF,KAAI;AACf,EAAA,MAAMC,gBAAgB,GAAGC,MAAM,CAAmB,IAAI,CAAC,CAAA;AACvD,EAAA,MAAM,CAACC,cAAc,CAAC,GAAGC,iBAAiB,CAAC;AAAEC,IAAAA,KAAK,EAAEJ,gBAAgB;AAAEJ,IAAAA,OAAAA;AAAO,GAAE,CAAC,CAAA;EAChF,IAAIS,WAAW,GAAGd,GAAG,CAAA;EACrB,IAAIe,WAAW,GAAGb,MAAM,CAAA;AAExB,EAAA,IAAIG,OAAO,KAAK,MAAM,IAAI,CAACM,cAAc,EAAE;AACzCG,IAAAA,WAAW,GAAGjB,qBAAqB,CAAA;AACnCkB,IAAAA,WAAW,GAAGC,SAAS,CAAA;AACzB,GAAA;AAEA,EAAA,oBACEC,GAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,GAAG,EAAET,gBAAiB;AACtBV,IAAAA,EAAE,EAAEA,EAAG;AACPE,IAAAA,GAAG,EAAEA,GAAI;AACTD,IAAAA,GAAG,EAAEc,WAAY;AACjBV,IAAAA,SAAS,EAAEe,IAAI,CAAC,CACd,UAAU,EACV;AACE,MAAA,mBAAmB,EAAEb,OAAO;AAC5B,MAAA,kBAAkB,EAAEE,MAAAA;KACrB,EACDJ,SAAS,CACV,CAAE;AACHG,IAAAA,IAAI,EAAEA,IAAK;AACXL,IAAAA,MAAM,EAAEa,WAAY;AACpBZ,IAAAA,OAAO,EAAEA,OAAAA;AAAQ,GACjB,CAAA,CAAA;AAEN;;;;"}
|
package/build/info/Info.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var icons = require('@transferwise/icons');
|
|
4
|
-
var
|
|
4
|
+
var clsx = require('clsx');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactIntl = require('react-intl');
|
|
7
7
|
var Modal = require('../modal/Modal.js');
|
|
@@ -12,10 +12,6 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
12
12
|
var size = require('../common/propsValues/size.js');
|
|
13
13
|
var position = require('../common/propsValues/position.js');
|
|
14
14
|
|
|
15
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
|
|
17
|
-
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
18
|
-
|
|
19
15
|
const Info = ({
|
|
20
16
|
className = undefined,
|
|
21
17
|
content = undefined,
|
|
@@ -39,7 +35,7 @@ const Info = ({
|
|
|
39
35
|
})
|
|
40
36
|
};
|
|
41
37
|
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
42
|
-
className:
|
|
38
|
+
className: clsx.clsx(className, 'np-info', {
|
|
43
39
|
'np-info__small': isSmall,
|
|
44
40
|
'np-info__large': !isSmall
|
|
45
41
|
}),
|
package/build/info/Info.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Info.js","sources":["../../src/info/Info.tsx"],"sourcesContent":["import { QuestionMarkCircle as HelpCircleIcon } from '@transferwise/icons';\nimport
|
|
1
|
+
{"version":3,"file":"Info.js","sources":["../../src/info/Info.tsx"],"sourcesContent":["import { QuestionMarkCircle as HelpCircleIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { Size, Position, SizeSmall, SizeLarge } from '../common';\nimport Modal from '../modal';\nimport Popover, { PopoverPreferredPlacement } from '../popover';\n\nimport messages from './Info.messages';\nimport { InfoPresentation } from './infoPresentations';\n\nexport interface InfoProps {\n 'aria-label'?: string;\n /**\n * Extra classes applied to Info\n */\n className?: string;\n /**\n * Content displayed inside a Popover a Modal\n */\n content?: React.ReactNode;\n onClick?: () => void;\n /**\n * Decides whether to display content in a Popover or a Modal\n */\n presentation?: 'MODAL' | 'POPOVER';\n /**\n * Decides the size of help Icon\n */\n size?: SizeSmall | SizeLarge;\n /**\n * Title displayed inside a Popover a Modal\n */\n title?: React.ReactNode;\n /**\n * Prferred placement of the Popover, does not apply to Modal\n */\n preferredPlacement?: PopoverPreferredPlacement;\n}\n\nconst Info = ({\n className = undefined,\n content = undefined,\n onClick = undefined,\n presentation = InfoPresentation.POPOVER,\n size = Size.SMALL,\n title = undefined,\n 'aria-label': ariaLabel,\n preferredPlacement = Position.BOTTOM,\n}: InfoProps) => {\n const intl = useIntl();\n const [open, setOpen] = useState(false);\n ariaLabel ??= intl.formatMessage(messages.ariaLabel);\n const isModal = presentation === InfoPresentation.MODAL;\n const isSmall = size === Size.SMALL;\n\n const buttonProps = {\n 'aria-label': ariaLabel,\n className: 'btn-unstyled',\n children: <HelpCircleIcon size={isSmall ? 16 : 24} />,\n };\n\n return (\n <span\n className={clsx(className, 'np-info', {\n 'np-info__small': isSmall,\n 'np-info__large': !isSmall,\n })}\n >\n {isModal ? (\n <>\n <button\n type=\"button\"\n onClick={() => {\n setOpen(!open);\n if (onClick) {\n onClick();\n }\n }}\n {...buttonProps}\n />\n <Modal body={content} open={open} title={title} onClose={() => setOpen(false)} />\n </>\n ) : (\n <Popover content={content} preferredPlacement={preferredPlacement} title={title}>\n <button\n type=\"button\"\n {...buttonProps}\n onClick={() => {\n if (onClick) {\n onClick();\n }\n }}\n />\n </Popover>\n )}\n </span>\n );\n};\n\nexport default Info;\n"],"names":["Info","className","undefined","content","onClick","presentation","InfoPresentation","POPOVER","size","Size","SMALL","title","ariaLabel","preferredPlacement","Position","BOTTOM","intl","useIntl","open","setOpen","useState","formatMessage","messages","isModal","MODAL","isSmall","buttonProps","children","_jsx","HelpCircleIcon","clsx","_jsxs","_Fragment","type","Modal","body","onClose","Popover"],"mappings":";;;;;;;;;;;;;;AAyCMA,MAAAA,IAAI,GAAGA,CAAC;AACZC,EAAAA,SAAS,GAAGC,SAAS;AACrBC,EAAAA,OAAO,GAAGD,SAAS;AACnBE,EAAAA,OAAO,GAAGF,SAAS;EACnBG,YAAY,GAAGC,kCAAgB,CAACC,OAAO;QACvCC,MAAI,GAAGC,SAAI,CAACC,KAAK;AACjBC,EAAAA,KAAK,GAAGT,SAAS;AACjB,EAAA,YAAY,EAAEU,SAAS;EACvBC,kBAAkB,GAAGC,iBAAQ,CAACC,MAAAA;AAAM,CAC1B,KAAI;AACd,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE,CAAA;EACtB,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC,CAAA;EACvCR,SAAS,KAAKI,IAAI,CAACK,aAAa,CAACC,aAAQ,CAACV,SAAS,CAAC,CAAA;AACpD,EAAA,MAAMW,OAAO,GAAGlB,YAAY,KAAKC,kCAAgB,CAACkB,KAAK,CAAA;AACvD,EAAA,MAAMC,OAAO,GAAGjB,MAAI,KAAKC,SAAI,CAACC,KAAK,CAAA;AAEnC,EAAA,MAAMgB,WAAW,GAAG;AAClB,IAAA,YAAY,EAAEd,SAAS;AACvBX,IAAAA,SAAS,EAAE,cAAc;IACzB0B,QAAQ,eAAEC,cAAA,CAACC,wBAAc,EAAA;AAACrB,MAAAA,IAAI,EAAEiB,OAAO,GAAG,EAAE,GAAG,EAAA;KAAM,CAAA;GACtD,CAAA;AAED,EAAA,oBACEG,cAAA,CAAA,MAAA,EAAA;AACE3B,IAAAA,SAAS,EAAE6B,SAAI,CAAC7B,SAAS,EAAE,SAAS,EAAE;AACpC,MAAA,gBAAgB,EAAEwB,OAAO;AACzB,MAAA,gBAAgB,EAAE,CAACA,OAAAA;AACpB,KAAA,CAAE;AAAAE,IAAAA,QAAA,EAEFJ,OAAO,gBACNQ,eAAA,CAAAC,mBAAA,EAAA;AAAAL,MAAAA,QAAA,gBACEC,cAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;QACb7B,OAAO,EAAEA,MAAK;UACZe,OAAO,CAAC,CAACD,IAAI,CAAC,CAAA;AACd,UAAA,IAAId,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;SACA;QAAA,GACEsB,WAAAA;AAAW,OAEjB,CAAA,eAAAE,cAAA,CAACM,KAAK,EAAA;AAACC,QAAAA,IAAI,EAAEhC,OAAQ;AAACe,QAAAA,IAAI,EAAEA,IAAK;AAACP,QAAAA,KAAK,EAAEA,KAAM;AAACyB,QAAAA,OAAO,EAAEA,MAAMjB,OAAO,CAAC,KAAK,CAAA;AAAE,OAChF,CAAA,CAAA;AAAA,KAAG,CAAA,gBAEHS,cAAA,CAACS,OAAO,EAAA;AAAClC,MAAAA,OAAO,EAAEA,OAAQ;AAACU,MAAAA,kBAAkB,EAAEA,kBAAmB;AAACF,MAAAA,KAAK,EAAEA,KAAM;AAAAgB,MAAAA,QAAA,eAC9EC,cAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;AAAA,QAAA,GACTP,WAAW;QACftB,OAAO,EAAEA,MAAK;AACZ,UAAA,IAAIA,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;AACF,SAAA;OAEJ,CAAA;KAAS,CAAA;AACV,GACG,CAAC,CAAA;AAEX;;;;"}
|
package/build/info/Info.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QuestionMarkCircle } 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
|
import Modal from '../modal/Modal.mjs';
|
|
@@ -33,7 +33,7 @@ const Info = ({
|
|
|
33
33
|
})
|
|
34
34
|
};
|
|
35
35
|
return /*#__PURE__*/jsx("span", {
|
|
36
|
-
className:
|
|
36
|
+
className: clsx(className, 'np-info', {
|
|
37
37
|
'np-info__small': isSmall,
|
|
38
38
|
'np-info__large': !isSmall
|
|
39
39
|
}),
|
package/build/info/Info.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Info.mjs","sources":["../../src/info/Info.tsx"],"sourcesContent":["import { QuestionMarkCircle as HelpCircleIcon } from '@transferwise/icons';\nimport
|
|
1
|
+
{"version":3,"file":"Info.mjs","sources":["../../src/info/Info.tsx"],"sourcesContent":["import { QuestionMarkCircle as HelpCircleIcon } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { Size, Position, SizeSmall, SizeLarge } from '../common';\nimport Modal from '../modal';\nimport Popover, { PopoverPreferredPlacement } from '../popover';\n\nimport messages from './Info.messages';\nimport { InfoPresentation } from './infoPresentations';\n\nexport interface InfoProps {\n 'aria-label'?: string;\n /**\n * Extra classes applied to Info\n */\n className?: string;\n /**\n * Content displayed inside a Popover a Modal\n */\n content?: React.ReactNode;\n onClick?: () => void;\n /**\n * Decides whether to display content in a Popover or a Modal\n */\n presentation?: 'MODAL' | 'POPOVER';\n /**\n * Decides the size of help Icon\n */\n size?: SizeSmall | SizeLarge;\n /**\n * Title displayed inside a Popover a Modal\n */\n title?: React.ReactNode;\n /**\n * Prferred placement of the Popover, does not apply to Modal\n */\n preferredPlacement?: PopoverPreferredPlacement;\n}\n\nconst Info = ({\n className = undefined,\n content = undefined,\n onClick = undefined,\n presentation = InfoPresentation.POPOVER,\n size = Size.SMALL,\n title = undefined,\n 'aria-label': ariaLabel,\n preferredPlacement = Position.BOTTOM,\n}: InfoProps) => {\n const intl = useIntl();\n const [open, setOpen] = useState(false);\n ariaLabel ??= intl.formatMessage(messages.ariaLabel);\n const isModal = presentation === InfoPresentation.MODAL;\n const isSmall = size === Size.SMALL;\n\n const buttonProps = {\n 'aria-label': ariaLabel,\n className: 'btn-unstyled',\n children: <HelpCircleIcon size={isSmall ? 16 : 24} />,\n };\n\n return (\n <span\n className={clsx(className, 'np-info', {\n 'np-info__small': isSmall,\n 'np-info__large': !isSmall,\n })}\n >\n {isModal ? (\n <>\n <button\n type=\"button\"\n onClick={() => {\n setOpen(!open);\n if (onClick) {\n onClick();\n }\n }}\n {...buttonProps}\n />\n <Modal body={content} open={open} title={title} onClose={() => setOpen(false)} />\n </>\n ) : (\n <Popover content={content} preferredPlacement={preferredPlacement} title={title}>\n <button\n type=\"button\"\n {...buttonProps}\n onClick={() => {\n if (onClick) {\n onClick();\n }\n }}\n />\n </Popover>\n )}\n </span>\n );\n};\n\nexport default Info;\n"],"names":["Info","className","undefined","content","onClick","presentation","InfoPresentation","POPOVER","size","Size","SMALL","title","ariaLabel","preferredPlacement","Position","BOTTOM","intl","useIntl","open","setOpen","useState","formatMessage","messages","isModal","MODAL","isSmall","buttonProps","children","_jsx","HelpCircleIcon","clsx","_jsxs","_Fragment","type","Modal","body","onClose","Popover"],"mappings":";;;;;;;;;;;;AAyCMA,MAAAA,IAAI,GAAGA,CAAC;AACZC,EAAAA,SAAS,GAAGC,SAAS;AACrBC,EAAAA,OAAO,GAAGD,SAAS;AACnBE,EAAAA,OAAO,GAAGF,SAAS;EACnBG,YAAY,GAAGC,gBAAgB,CAACC,OAAO;EACvCC,IAAI,GAAGC,IAAI,CAACC,KAAK;AACjBC,EAAAA,KAAK,GAAGT,SAAS;AACjB,EAAA,YAAY,EAAEU,SAAS;EACvBC,kBAAkB,GAAGC,QAAQ,CAACC,MAAAA;AAAM,CAC1B,KAAI;AACd,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE,CAAA;EACtB,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC,CAAA;EACvCR,SAAS,KAAKI,IAAI,CAACK,aAAa,CAACC,QAAQ,CAACV,SAAS,CAAC,CAAA;AACpD,EAAA,MAAMW,OAAO,GAAGlB,YAAY,KAAKC,gBAAgB,CAACkB,KAAK,CAAA;AACvD,EAAA,MAAMC,OAAO,GAAGjB,IAAI,KAAKC,IAAI,CAACC,KAAK,CAAA;AAEnC,EAAA,MAAMgB,WAAW,GAAG;AAClB,IAAA,YAAY,EAAEd,SAAS;AACvBX,IAAAA,SAAS,EAAE,cAAc;IACzB0B,QAAQ,eAAEC,GAAA,CAACC,kBAAc,EAAA;AAACrB,MAAAA,IAAI,EAAEiB,OAAO,GAAG,EAAE,GAAG,EAAA;KAAM,CAAA;GACtD,CAAA;AAED,EAAA,oBACEG,GAAA,CAAA,MAAA,EAAA;AACE3B,IAAAA,SAAS,EAAE6B,IAAI,CAAC7B,SAAS,EAAE,SAAS,EAAE;AACpC,MAAA,gBAAgB,EAAEwB,OAAO;AACzB,MAAA,gBAAgB,EAAE,CAACA,OAAAA;AACpB,KAAA,CAAE;AAAAE,IAAAA,QAAA,EAEFJ,OAAO,gBACNQ,IAAA,CAAAC,QAAA,EAAA;AAAAL,MAAAA,QAAA,gBACEC,GAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;QACb7B,OAAO,EAAEA,MAAK;UACZe,OAAO,CAAC,CAACD,IAAI,CAAC,CAAA;AACd,UAAA,IAAId,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;SACA;QAAA,GACEsB,WAAAA;AAAW,OAEjB,CAAA,eAAAE,GAAA,CAACM,KAAK,EAAA;AAACC,QAAAA,IAAI,EAAEhC,OAAQ;AAACe,QAAAA,IAAI,EAAEA,IAAK;AAACP,QAAAA,KAAK,EAAEA,KAAM;AAACyB,QAAAA,OAAO,EAAEA,MAAMjB,OAAO,CAAC,KAAK,CAAA;AAAE,OAChF,CAAA,CAAA;AAAA,KAAG,CAAA,gBAEHS,GAAA,CAACS,OAAO,EAAA;AAAClC,MAAAA,OAAO,EAAEA,OAAQ;AAACU,MAAAA,kBAAkB,EAAEA,kBAAmB;AAACF,MAAAA,KAAK,EAAEA,KAAM;AAAAgB,MAAAA,QAAA,eAC9EC,GAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;AAAA,QAAA,GACTP,WAAW;QACftB,OAAO,EAAEA,MAAK;AACZ,UAAA,IAAIA,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;AACF,SAAA;OAEJ,CAAA;KAAS,CAAA;AACV,GACG,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var clsx = require('clsx');
|
|
4
4
|
var StatusIcon = require('../statusIcon/StatusIcon.js');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var sentiment = require('../common/propsValues/sentiment.js');
|
|
7
7
|
var size = require('../common/propsValues/size.js');
|
|
8
8
|
|
|
9
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
|
|
11
|
-
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
12
|
-
|
|
13
9
|
const iconTypes = new Set([sentiment.Sentiment.NEGATIVE, sentiment.Sentiment.ERROR, sentiment.Sentiment.POSITIVE, sentiment.Sentiment.SUCCESS, sentiment.Sentiment.WARNING]);
|
|
14
10
|
function InlineAlert({
|
|
15
11
|
id,
|
|
@@ -20,7 +16,7 @@ function InlineAlert({
|
|
|
20
16
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
21
17
|
role: "alert",
|
|
22
18
|
id: id,
|
|
23
|
-
className:
|
|
19
|
+
className: clsx.clsx('alert alert-detach', `alert-${type === sentiment.Sentiment.NEGATIVE || type === sentiment.Sentiment.ERROR ? 'danger' : type}`, className),
|
|
24
20
|
children: [iconTypes.has(type) && /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
25
21
|
sentiment: type,
|
|
26
22
|
size: size.Size.SMALL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineAlert.js","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"InlineAlert.js","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n className?: string;\n children: ReactNode;\n}\n\nconst iconTypes = new Set<NonNullable<InlineAlertProps['type']>>([\n Sentiment.NEGATIVE,\n Sentiment.ERROR,\n Sentiment.POSITIVE,\n Sentiment.SUCCESS,\n Sentiment.WARNING,\n]);\n\nexport default function InlineAlert({\n id,\n type = 'neutral',\n className,\n children,\n}: InlineAlertProps) {\n return (\n <div\n role=\"alert\"\n id={id}\n className={clsx(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n className,\n )}\n >\n {iconTypes.has(type) && <StatusIcon sentiment={type} size={Size.SMALL} />}\n <div className=\"np-text-body-default\">{children}</div>\n </div>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","className","children","_jsxs","role","clsx","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;;;AAaA,MAAMA,SAAS,GAAG,IAAIC,GAAG,CAAwC,CAC/DC,mBAAS,CAACC,QAAQ,EAClBD,mBAAS,CAACE,KAAK,EACfF,mBAAS,CAACG,QAAQ,EAClBH,mBAAS,CAACI,OAAO,EACjBJ,mBAAS,CAACK,OAAO,CAClB,CAAC,CAAA;AAEsB,SAAAC,WAAWA,CAAC;EAClCC,EAAE;AACFC,EAAAA,IAAI,GAAG,SAAS;EAChBC,SAAS;AACTC,EAAAA,QAAAA;AACiB,CAAA,EAAA;AACjB,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,OAAO;AACZL,IAAAA,EAAE,EAAEA,EAAG;IACPE,SAAS,EAAEI,SAAI,CACb,oBAAoB,EACpB,SAASL,IAAI,KAAKR,mBAAS,CAACC,QAAQ,IAAIO,IAAI,KAAKR,mBAAS,CAACE,KAAK,GAAG,QAAQ,GAAGM,IAAI,CAAA,CAAE,EACpFC,SAAS,CACT;IAAAC,QAAA,EAAA,CAEDZ,SAAS,CAACgB,GAAG,CAACN,IAAI,CAAC,iBAAIO,cAAA,CAACC,UAAU,EAAA;AAACC,MAAAA,SAAS,EAAET,IAAK;MAACU,IAAI,EAAEC,SAAI,CAACC,KAAAA;KAAM,CAAG,eACzEL,cAAA,CAAA,KAAA,EAAA;AAAKN,MAAAA,SAAS,EAAC,sBAAsB;AAAAC,MAAAA,QAAA,EAAEA,QAAAA;AAAQ,KAAM,CACvD,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
2
|
import StatusIcon from '../statusIcon/StatusIcon.mjs';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Sentiment } from '../common/propsValues/sentiment.mjs';
|
|
@@ -14,7 +14,7 @@ function InlineAlert({
|
|
|
14
14
|
return /*#__PURE__*/jsxs("div", {
|
|
15
15
|
role: "alert",
|
|
16
16
|
id: id,
|
|
17
|
-
className:
|
|
17
|
+
className: clsx('alert alert-detach', `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`, className),
|
|
18
18
|
children: [iconTypes.has(type) && /*#__PURE__*/jsx(StatusIcon, {
|
|
19
19
|
sentiment: type,
|
|
20
20
|
size: Size.SMALL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineAlert.mjs","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"InlineAlert.mjs","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n className?: string;\n children: ReactNode;\n}\n\nconst iconTypes = new Set<NonNullable<InlineAlertProps['type']>>([\n Sentiment.NEGATIVE,\n Sentiment.ERROR,\n Sentiment.POSITIVE,\n Sentiment.SUCCESS,\n Sentiment.WARNING,\n]);\n\nexport default function InlineAlert({\n id,\n type = 'neutral',\n className,\n children,\n}: InlineAlertProps) {\n return (\n <div\n role=\"alert\"\n id={id}\n className={clsx(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n className,\n )}\n >\n {iconTypes.has(type) && <StatusIcon sentiment={type} size={Size.SMALL} />}\n <div className=\"np-text-body-default\">{children}</div>\n </div>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","className","children","_jsxs","role","clsx","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;AAaA,MAAMA,SAAS,GAAG,IAAIC,GAAG,CAAwC,CAC/DC,SAAS,CAACC,QAAQ,EAClBD,SAAS,CAACE,KAAK,EACfF,SAAS,CAACG,QAAQ,EAClBH,SAAS,CAACI,OAAO,EACjBJ,SAAS,CAACK,OAAO,CAClB,CAAC,CAAA;AAEsB,SAAAC,WAAWA,CAAC;EAClCC,EAAE;AACFC,EAAAA,IAAI,GAAG,SAAS;EAChBC,SAAS;AACTC,EAAAA,QAAAA;AACiB,CAAA,EAAA;AACjB,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,OAAO;AACZL,IAAAA,EAAE,EAAEA,EAAG;IACPE,SAAS,EAAEI,IAAI,CACb,oBAAoB,EACpB,SAASL,IAAI,KAAKR,SAAS,CAACC,QAAQ,IAAIO,IAAI,KAAKR,SAAS,CAACE,KAAK,GAAG,QAAQ,GAAGM,IAAI,CAAA,CAAE,EACpFC,SAAS,CACT;IAAAC,QAAA,EAAA,CAEDZ,SAAS,CAACgB,GAAG,CAACN,IAAI,CAAC,iBAAIO,GAAA,CAACC,UAAU,EAAA;AAACC,MAAAA,SAAS,EAAET,IAAK;MAACU,IAAI,EAAEC,IAAI,CAACC,KAAAA;KAAM,CAAG,eACzEL,GAAA,CAAA,KAAA,EAAA;AAAKN,MAAAA,SAAS,EAAC,sBAAsB;AAAAC,MAAAA,QAAA,EAAEA,QAAAA;AAAQ,KAAM,CACvD,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|