@transferwise/components 46.142.0 → 46.143.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 +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs +1 -1
- package/build/actionButton/ActionButton.js +1 -1
- package/build/actionButton/ActionButton.mjs +1 -1
- package/build/actionOption/ActionOption.js +1 -1
- package/build/actionOption/ActionOption.mjs +1 -1
- package/build/alert/Alert.js +1 -1
- package/build/alert/Alert.mjs +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +1 -1
- package/build/avatar/Avatar.js +1 -1
- package/build/avatar/Avatar.mjs +1 -1
- package/build/avatarLayout/AvatarLayout.js +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +1 -1
- package/build/avatarView/AvatarView.js +1 -1
- package/build/avatarView/AvatarView.mjs +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +1 -1
- package/build/badge/Badge.js +1 -1
- package/build/badge/Badge.mjs +1 -1
- package/build/button/Button.js +1 -1
- package/build/button/Button.mjs +1 -1
- package/build/button/LegacyButton.js +1 -1
- package/build/button/LegacyButton.mjs +1 -1
- package/build/button/classMap.js +1 -1
- package/build/button/classMap.mjs +1 -1
- package/build/button/legacyUtils/legacyUtils.js +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs +1 -1
- package/build/card/Card.js +1 -1
- package/build/card/Card.mjs +1 -1
- package/build/checkbox/Checkbox.js +1 -1
- package/build/checkbox/Checkbox.mjs +1 -1
- package/build/chevron/Chevron.js +1 -1
- package/build/chevron/Chevron.mjs +1 -1
- package/build/chips/Chip.js +1 -1
- package/build/chips/Chip.mjs +1 -1
- package/build/circularButton/CircularButton.js +2 -2
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +2 -2
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +2 -2
- 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/circle/Circle.js +2 -2
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +2 -2
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/common/hooks/useLayout/useLayout.js +6 -6
- package/build/common/hooks/useLayout/useLayout.js.map +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs.map +1 -1
- package/build/common/hooks/useScreenSize.js.map +1 -1
- package/build/common/hooks/useScreenSize.mjs.map +1 -1
- package/build/common/panel/Panel.js +1 -1
- package/build/common/panel/Panel.mjs +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -1
- package/build/dateInput/DateInput.js +1 -1
- package/build/dateInput/DateInput.mjs +1 -1
- package/build/dateLookup/DateLookup.js +2 -2
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +1 -1
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +1 -1
- package/build/decision/Decision.js +3 -3
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs +1 -1
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js +1 -1
- package/build/definitionList/DefinitionList.mjs +1 -1
- package/build/dimmer/Dimmer.js +1 -1
- package/build/dimmer/Dimmer.mjs +1 -1
- package/build/display/Display.js +1 -1
- package/build/display/Display.mjs +1 -1
- package/build/drawer/Drawer.js +1 -1
- package/build/drawer/Drawer.mjs +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +1 -1
- package/build/field/Field.js +1 -1
- package/build/field/Field.mjs +1 -1
- package/build/flowNavigation/FlowNavigation.js +3 -3
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +1 -1
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/header/Header.js +1 -1
- package/build/header/Header.mjs +1 -1
- package/build/image/Image.js +1 -1
- package/build/image/Image.mjs +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/info/Info.js +1 -1
- package/build/info/Info.mjs +1 -1
- package/build/inlineAlert/InlineAlert.js +1 -1
- package/build/inlineAlert/InlineAlert.mjs +1 -1
- package/build/inputs/SearchInput.js +1 -1
- package/build/inputs/SearchInput.mjs +1 -1
- package/build/inputs/SelectInput/SelectInput.js +2 -2
- package/build/inputs/SelectInput/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput/SelectInput.mjs +1 -1
- package/build/inputs/SelectInput/SelectInput.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +1 -1
- package/build/instructionsList/InstructionsList.mjs +1 -1
- package/build/link/Link.js +1 -1
- package/build/link/Link.mjs +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +1 -1
- package/build/listItem/ListItem.js +1 -1
- package/build/listItem/ListItem.mjs +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +1 -1
- package/build/loader/Loader.js +1 -1
- package/build/loader/Loader.mjs +1 -1
- package/build/logo/Logo.js +3 -3
- 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 +308 -394
- package/build/markdown/Markdown.js +1 -1
- package/build/markdown/Markdown.mjs +1 -1
- package/build/modal/Modal.js +3 -3
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +3 -3
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +1 -1
- package/build/moneyInput/MoneyInput.mjs +1 -1
- package/build/navigationOption/NavigationOption.js +1 -1
- package/build/navigationOption/NavigationOption.mjs +1 -1
- package/build/nudge/Nudge.js +1 -1
- package/build/nudge/Nudge.mjs +1 -1
- package/build/overlayHeader/OverlayHeader.js +1 -1
- package/build/overlayHeader/OverlayHeader.mjs +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +1 -1
- package/build/popover/Popover.js +1 -1
- package/build/popover/Popover.mjs +1 -1
- package/build/processIndicator/ProcessIndicator.js +1 -1
- package/build/processIndicator/ProcessIndicator.mjs +1 -1
- package/build/progressBar/ProgressBar.js +1 -1
- package/build/progressBar/ProgressBar.mjs +1 -1
- package/build/promoCard/PromoCard.js +1 -1
- package/build/promoCard/PromoCard.mjs +1 -1
- package/build/promoCard/PromoCardIndicator.js +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.js +2 -2
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +2 -2
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/CriticalBanner/CriticalBanner.js +2 -2
- package/build/prompt/CriticalBanner/CriticalBanner.js.map +1 -1
- package/build/prompt/CriticalBanner/CriticalBanner.mjs +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.js +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs +1 -1
- package/build/provider/Provider.js +1 -1
- package/build/provider/Provider.mjs +1 -1
- package/build/radio/Radio.js +1 -1
- package/build/radio/Radio.mjs +1 -1
- package/build/segmentedControl/SegmentedControl.js +1 -1
- package/build/segmentedControl/SegmentedControl.mjs +1 -1
- package/build/select/Select.js +1 -1
- package/build/select/Select.mjs +1 -1
- package/build/select/option/Option.js +1 -1
- package/build/select/option/Option.mjs +1 -1
- package/build/statusIcon/StatusIcon.js +2 -2
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +2 -2
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js +1 -1
- package/build/stepper/Stepper.mjs +1 -1
- package/build/sticky/Sticky.js +1 -1
- package/build/sticky/Sticky.mjs +1 -1
- package/build/styles/accordion/Accordion.css +1 -1
- package/build/styles/card/Card.css +2 -2
- package/build/styles/carousel/Carousel.css +5 -5
- package/build/styles/common/Option/Option.css +2 -4
- package/build/styles/common/baseCard/BaseCard.css +1 -1
- package/build/styles/container/Container.css +3 -3
- package/build/styles/criticalBanner/CriticalCommsBanner.css +1 -1
- package/build/styles/css/accordion.css +4 -4
- package/build/styles/css/button-groups.css +6 -6
- package/build/styles/css/buttons.css +1 -1
- package/build/styles/css/circles.css +1 -1
- package/build/styles/css/column-layout.css +4 -4
- package/build/styles/css/decision.css +4 -4
- package/build/styles/css/dropdowns.css +10 -10
- package/build/styles/css/droppable.css +8 -8
- package/build/styles/css/flex.css +13 -15
- package/build/styles/css/footer.css +3 -3
- package/build/styles/css/grid.css +19 -19
- package/build/styles/css/input-groups.css +12 -12
- package/build/styles/css/list-group.css +8 -8
- package/build/styles/css/modals.css +6 -6
- package/build/styles/css/navbar.css +62 -62
- package/build/styles/css/navs.css +2 -2
- package/build/styles/css/neptune.css +259 -327
- package/build/styles/css/panels.css +9 -9
- package/build/styles/css/popovers.css +13 -13
- package/build/styles/css/select.css +1 -1
- package/build/styles/css/sequences.css +6 -6
- package/build/styles/css/table.css +6 -6
- package/build/styles/css/utilities.css +8 -20
- package/build/styles/css/wells.css +4 -18
- package/build/styles/dateInput/DateInput.css +1 -1
- package/build/styles/definitionList/DefinitionList.css +2 -2
- package/build/styles/drawer/Drawer.css +2 -2
- package/build/styles/flowNavigation/FlowNavigation.css +1 -1
- package/build/styles/inputs/Input.css +3 -3
- package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +2 -2
- package/build/styles/inputs/SelectInput/SelectInput.css +2 -2
- package/build/styles/inputs/TextArea.css +3 -3
- package/build/styles/less/legacy-variables.less +34 -47
- package/build/styles/main.css +308 -394
- package/build/styles/modal/Modal.css +7 -20
- package/build/styles/overlayHeader/OverlayHeader.css +1 -1
- package/build/styles/popover/Popover.css +3 -3
- package/build/styles/promoCard/PromoCard.css +1 -1
- package/build/styles/prompt/ActionPrompt/ActionPrompt.css +1 -1
- package/build/styles/prompt/CriticalBanner/CriticalBanner.css +1 -1
- package/build/styles/prompt/PrimitivePrompt/PrimitivePrompt.css +1 -1
- package/build/styles/props/custom-media.css +23 -11
- package/build/styles/snackbar/Snackbar.css +2 -2
- package/build/styles/stepper/Stepper.css +2 -2
- package/build/styles/styles/less/accordion.css +4 -4
- package/build/styles/styles/less/button-groups.css +6 -6
- package/build/styles/styles/less/buttons.css +1 -1
- package/build/styles/styles/less/circles.css +1 -1
- package/build/styles/styles/less/column-layout.css +4 -4
- package/build/styles/styles/less/decision.css +4 -4
- package/build/styles/styles/less/dropdowns.css +10 -10
- package/build/styles/styles/less/droppable.css +8 -8
- package/build/styles/styles/less/flex.css +13 -15
- package/build/styles/styles/less/footer.css +3 -3
- package/build/styles/styles/less/forms/bootstrap-forms.css +9 -9
- package/build/styles/styles/less/grid.css +19 -19
- package/build/styles/styles/less/input-groups.css +12 -12
- package/build/styles/styles/less/list-group.css +8 -8
- package/build/styles/styles/less/modals.css +6 -6
- package/build/styles/styles/less/navbar.css +62 -62
- package/build/styles/styles/less/navs.css +2 -2
- package/build/styles/styles/less/neptune.css +259 -327
- package/build/styles/styles/less/panels.css +9 -9
- package/build/styles/styles/less/popovers.css +13 -13
- package/build/styles/styles/less/select.css +1 -1
- package/build/styles/styles/less/sequences.css +6 -6
- package/build/styles/styles/less/table.css +6 -6
- package/build/styles/styles/less/utilities.css +8 -20
- package/build/styles/styles/less/wells.css +4 -18
- package/build/styles/styles/props/custom-media.css +1 -11
- package/build/styles/table/Table.css +1 -1
- package/build/styles/tabs/Tabs.css +2 -2
- package/build/styles/typeahead/Typeahead.css +1 -1
- package/build/summary/Summary.js +1 -1
- package/build/summary/Summary.mjs +1 -1
- package/build/table/Table.js +1 -1
- package/build/table/Table.mjs +1 -1
- package/build/table/TableRow.js +1 -1
- package/build/table/TableRow.mjs +1 -1
- package/build/table/TableStatusText.js +1 -1
- package/build/table/TableStatusText.mjs +1 -1
- package/build/tabs/Tabs.js +1 -1
- package/build/tabs/Tabs.mjs +1 -1
- package/build/tile/Tile.js +1 -1
- package/build/tile/Tile.mjs +1 -1
- package/build/title/Title.js +1 -1
- package/build/title/Title.mjs +1 -1
- package/build/tooltip/Tooltip.js +1 -1
- package/build/tooltip/Tooltip.mjs +1 -1
- package/build/typeahead/Typeahead.js +1 -1
- package/build/typeahead/Typeahead.mjs +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/hooks/useScreenSize.d.ts +1 -1
- package/build/types/common/hooks/useScreenSize.d.ts.map +1 -1
- package/build/types/common/index.d.ts +1 -1
- package/build/types/common/index.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/decision/Decision.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/upload/Upload.js +1 -1
- package/build/upload/Upload.mjs +1 -1
- package/build/upload/steps/completeStep/completeStep.js +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -1
- package/build/upload/steps/processingStep/processingStep.js +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -1
- package/build/uploadInput/UploadInput.js +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs +1 -1
- package/build/uploadInput/uploadButton/defaults.js +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +1 -1
- package/package.json +3 -3
- package/src/accordion/Accordion.css +1 -1
- package/src/card/Card.css +2 -2
- package/src/carousel/Carousel.css +5 -5
- package/src/carousel/Carousel.less +3 -3
- package/src/circularButton/CircularButton.tsx +3 -2
- package/src/common/Option/Option.css +2 -4
- package/src/common/Option/Option.less +2 -4
- package/src/common/baseCard/BaseCard.css +1 -1
- package/src/common/bottomSheet/BottomSheet.tsx +2 -2
- package/src/common/circle/Circle.tsx +2 -2
- package/src/common/hooks/useLayout/useLayout.ts +1 -1
- package/src/common/hooks/useScreenSize.ts +1 -1
- package/src/common/index.ts +1 -1
- package/src/common/responsivePanel/ResponsivePanel.test.js +3 -2
- package/src/container/Container.css +3 -3
- package/src/criticalBanner/CriticalCommsBanner.css +1 -1
- package/src/dateInput/DateInput.css +1 -1
- package/src/dateLookup/DateLookup.tsx +1 -1
- package/src/decision/Decision.test.tsx +2 -1
- package/src/decision/Decision.tsx +2 -1
- package/src/definitionList/DefinitionList.css +2 -2
- package/src/definitionList/DefinitionList.less +2 -2
- package/src/drawer/Drawer.css +2 -2
- package/src/drawer/Drawer.less +4 -3
- package/src/flowNavigation/FlowNavigation.css +1 -1
- package/src/flowNavigation/FlowNavigation.less +2 -1
- package/src/flowNavigation/FlowNavigation.story.tsx +6 -3
- package/src/flowNavigation/FlowNavigation.test.js +1 -1
- package/src/flowNavigation/FlowNavigation.tsx +2 -1
- package/src/index.ts +1 -1
- package/src/inputs/Input.css +3 -3
- package/src/inputs/SelectInput/Options/SelectInputOptions.css +2 -2
- package/src/inputs/SelectInput/SelectInput.css +2 -2
- package/src/inputs/SelectInput/SelectInput.tsx +1 -1
- package/src/inputs/TextArea.css +3 -3
- package/src/logo/Logo.tsx +1 -1
- package/src/main.css +308 -394
- package/src/modal/Modal.css +7 -20
- package/src/modal/Modal.less +7 -19
- package/src/modal/Modal.tsx +2 -2
- package/src/overlayHeader/OverlayHeader.css +1 -1
- package/src/overlayHeader/OverlayHeader.less +3 -2
- package/src/popover/Popover.css +3 -3
- package/src/popover/Popover.test.tsx +2 -1
- package/src/promoCard/PromoCard.css +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.css +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.less +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.test.tsx +37 -6
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +3 -2
- package/src/prompt/CriticalBanner/CriticalBanner.css +1 -1
- package/src/prompt/CriticalBanner/CriticalBanner.less +2 -2
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.css +1 -1
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.less +1 -1
- package/src/select/Select.test.tsx +1 -1
- package/src/snackbar/Snackbar.css +2 -2
- package/src/statusIcon/StatusIcon.tsx +3 -2
- package/src/stepper/Stepper.css +2 -2
- package/src/styles/less/accordion.css +4 -4
- package/src/styles/less/addons/_display-utilities.less +13 -27
- package/src/styles/less/button-groups.css +6 -6
- package/src/styles/less/buttons.css +1 -1
- package/src/styles/less/circles.css +1 -1
- package/src/styles/less/column-layout.css +4 -4
- package/src/styles/less/core/_typography-utilities.less +10 -22
- package/src/styles/less/decision.css +4 -4
- package/src/styles/less/dropdowns.css +10 -10
- package/src/styles/less/droppable.css +8 -8
- package/src/styles/less/flex.css +13 -15
- package/src/styles/less/flex.less +1 -3
- package/src/styles/less/footer.css +3 -3
- package/src/styles/less/forms/bootstrap-forms.css +9 -9
- package/src/styles/less/forms/bootstrap-forms.less +1 -1
- package/src/styles/less/grid.css +19 -19
- package/src/styles/less/input-groups.css +12 -12
- package/src/styles/less/list-group.css +8 -8
- package/src/styles/less/modals.css +6 -6
- package/src/styles/less/modals.less +4 -4
- package/src/styles/less/navbar.css +62 -62
- package/src/styles/less/navbar.less +2 -2
- package/src/styles/less/navs.css +2 -2
- package/src/styles/less/neptune.bundle.less +1 -0
- package/src/styles/less/neptune.css +259 -327
- package/src/styles/less/panels.css +9 -9
- package/src/styles/less/popovers.css +13 -13
- package/src/styles/less/popovers.less +6 -6
- package/src/styles/less/select.css +1 -1
- package/src/styles/less/sequences.css +6 -6
- package/src/styles/less/table.css +6 -6
- package/src/styles/less/table.less +1 -1
- package/src/styles/less/utilities.css +8 -20
- package/src/styles/less/utilities.less +6 -14
- package/src/styles/less/wells.css +4 -18
- package/src/styles/less/wells.less +3 -5
- package/src/styles/props/custom-media.css +1 -11
- package/src/styles/variables/legacy-variables.less +4 -47
- package/src/table/Table.css +1 -1
- package/src/tabs/Tabs.css +2 -2
- package/src/typeahead/Typeahead.css +1 -1
- package/src/uploadInput/uploadItem/UploadItem.less +2 -2
- package/build/common/propsValues/breakpoint.js +0 -12
- package/build/common/propsValues/breakpoint.js.map +0 -1
- package/build/common/propsValues/breakpoint.mjs +0 -12
- package/build/common/propsValues/breakpoint.mjs.map +0 -1
- package/build/types/common/propsValues/breakpoint.d.ts +0 -9
- package/build/types/common/propsValues/breakpoint.d.ts.map +0 -1
- package/src/common/propsValues/breakpoint.ts +0 -8
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var commonmark = require('commonmark');
|
|
6
6
|
require('../common/theme.js');
|
|
7
7
|
require('../common/direction.js');
|
|
8
|
+
require('@transferwise/neptune-tokens');
|
|
8
9
|
require('../common/propsValues/control.js');
|
|
9
|
-
require('../common/propsValues/breakpoint.js');
|
|
10
10
|
require('../common/propsValues/size.js');
|
|
11
11
|
require('../common/propsValues/typography.js');
|
|
12
12
|
require('../common/propsValues/width.js');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as commonmark from 'commonmark';
|
|
2
2
|
import '../common/theme.mjs';
|
|
3
3
|
import '../common/direction.mjs';
|
|
4
|
+
import '@transferwise/neptune-tokens';
|
|
4
5
|
import '../common/propsValues/control.mjs';
|
|
5
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
6
6
|
import '../common/propsValues/size.mjs';
|
|
7
7
|
import '../common/propsValues/typography.mjs';
|
|
8
8
|
import '../common/propsValues/width.mjs';
|
package/build/modal/Modal.js
CHANGED
|
@@ -8,8 +8,8 @@ var reactTransitionGroup = require('react-transition-group');
|
|
|
8
8
|
var reactIntl = require('react-intl');
|
|
9
9
|
require('../common/theme.js');
|
|
10
10
|
require('../common/direction.js');
|
|
11
|
+
require('@transferwise/neptune-tokens');
|
|
11
12
|
require('../common/propsValues/control.js');
|
|
12
|
-
require('../common/propsValues/breakpoint.js');
|
|
13
13
|
var size = require('../common/propsValues/size.js');
|
|
14
14
|
var typography = require('../common/propsValues/typography.js');
|
|
15
15
|
require('../common/propsValues/width.js');
|
|
@@ -55,12 +55,12 @@ const Modal = ({
|
|
|
55
55
|
}) => {
|
|
56
56
|
const intl = reactIntl.useIntl();
|
|
57
57
|
const {
|
|
58
|
-
|
|
58
|
+
isSmall
|
|
59
59
|
} = useLayout.useLayout();
|
|
60
60
|
const contentReference = React.useRef(null);
|
|
61
61
|
const titleId = React.useId();
|
|
62
62
|
const overlayId = React.useContext(OverlayIdProvider.OverlayIdContext);
|
|
63
|
-
return !
|
|
63
|
+
return !isSmall ? /*#__PURE__*/jsxRuntime.jsx(Drawer.default, {
|
|
64
64
|
open: open,
|
|
65
65
|
className: className,
|
|
66
66
|
headerTitle: title,
|
package/build/modal/Modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../src/modal/Modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode, useContext, useId, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n Position,\n PositionTop,\n PositionCenter,\n Scroll,\n CommonProps,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n SizeExtraLarge,\n ScrollContent,\n ScrollViewport,\n Typography,\n} from '../common';\nimport { useLayout } from '../common/hooks';\nimport Dimmer from '../dimmer';\nimport Drawer from '../drawer';\nimport { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';\nimport Title from '../title/Title';\nimport { Cross } from '@transferwise/icons';\nimport IconButton from '../iconButton';\nimport closeBtnMessages from '../common/closeButton/CloseButton.messages';\n\nconst TRANSITION_DURATION_IN_MILLISECONDS = 150;\n\nexport type ModalProps = CommonProps & {\n /** @default null */\n title?: ReactNode;\n body: ReactNode;\n /** @default null */\n footer?: ReactNode;\n /** @default 'md' */\n size?: SizeSmall | SizeMedium | SizeLarge | SizeExtraLarge;\n onClose: () => void;\n onUnmount?: () => void;\n open: boolean;\n /** @default 'viewport' */\n scroll?: ScrollContent | ScrollViewport;\n /** @default 'center' */\n position?: PositionTop | PositionCenter;\n /** @default false */\n disableDimmerClickToClose?: boolean;\n};\n\nconst Modal = ({\n title = null,\n body,\n footer = null,\n onClose,\n onUnmount,\n className,\n open,\n size = Size.MEDIUM,\n scroll = Scroll.VIEWPORT,\n position = Position.CENTER,\n disableDimmerClickToClose = false,\n ...otherProps\n}: ModalProps) => {\n const intl = useIntl();\n const {
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../src/modal/Modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode, useContext, useId, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n Position,\n PositionTop,\n PositionCenter,\n Scroll,\n CommonProps,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n SizeExtraLarge,\n ScrollContent,\n ScrollViewport,\n Typography,\n} from '../common';\nimport { useLayout } from '../common/hooks';\nimport Dimmer from '../dimmer';\nimport Drawer from '../drawer';\nimport { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';\nimport Title from '../title/Title';\nimport { Cross } from '@transferwise/icons';\nimport IconButton from '../iconButton';\nimport closeBtnMessages from '../common/closeButton/CloseButton.messages';\n\nconst TRANSITION_DURATION_IN_MILLISECONDS = 150;\n\nexport type ModalProps = CommonProps & {\n /** @default null */\n title?: ReactNode;\n body: ReactNode;\n /** @default null */\n footer?: ReactNode;\n /** @default 'md' */\n size?: SizeSmall | SizeMedium | SizeLarge | SizeExtraLarge;\n onClose: () => void;\n onUnmount?: () => void;\n open: boolean;\n /** @default 'viewport' */\n scroll?: ScrollContent | ScrollViewport;\n /** @default 'center' */\n position?: PositionTop | PositionCenter;\n /** @default false */\n disableDimmerClickToClose?: boolean;\n};\n\nconst Modal = ({\n title = null,\n body,\n footer = null,\n onClose,\n onUnmount,\n className,\n open,\n size = Size.MEDIUM,\n scroll = Scroll.VIEWPORT,\n position = Position.CENTER,\n disableDimmerClickToClose = false,\n ...otherProps\n}: ModalProps) => {\n const intl = useIntl();\n const { isSmall } = useLayout();\n\n const contentReference = useRef<HTMLDivElement>(null);\n const titleId = useId();\n\n const overlayId = useContext(OverlayIdContext);\n\n return !isSmall ? (\n <Drawer\n open={open}\n className={className}\n headerTitle={title}\n footerContent={footer}\n position={Position.BOTTOM}\n onClose={onClose}\n onUnmount={onUnmount}\n >\n {body}\n </Drawer>\n ) : (\n <Dimmer\n open={open}\n scrollable={scroll === Scroll.VIEWPORT}\n contentPosition={position}\n disableClickToClose={disableDimmerClickToClose}\n onClose={onClose}\n onExited={onUnmount}\n >\n <CSSTransition\n nodeRef={contentReference}\n appear\n in={open}\n classNames={{ enterDone: 'in' }}\n timeout={TRANSITION_DURATION_IN_MILLISECONDS}\n unmountOnExit\n >\n <div\n ref={contentReference}\n className={clsx(\n 'tw-modal',\n 'd-flex',\n 'fade',\n 'outline-none',\n scroll === Scroll.CONTENT && 'tw-modal--scrollable',\n className,\n )}\n {...otherProps}\n >\n <div\n id={overlayId}\n role=\"dialog\"\n aria-modal\n aria-labelledby={titleId}\n className={clsx('tw-modal-dialog', 'd-flex', {\n [`tw-modal-${size}`]: size,\n })}\n >\n <div\n className={clsx(\n 'tw-modal-content',\n 'd-flex',\n 'flex-column',\n 'justify-content-between',\n )}\n >\n <div\n className={clsx(\n 'tw-modal-header',\n 'd-flex',\n 'align-items-center',\n title ? 'justify-content-between' : 'justify-content-end',\n 'flex-wrap',\n )}\n >\n {title && (\n <Title id={titleId} type={Typography.TITLE_SUBSECTION} className=\"tw-modal-title\">\n {title}\n </Title>\n )}\n <IconButton\n size={40}\n priority=\"tertiary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onClose}\n >\n <Cross />\n </IconButton>\n </div>\n <div\n className={clsx('tw-modal-body', {\n 'tw-modal-body--scrollable': scroll === Scroll.CONTENT,\n })}\n >\n {body}\n </div>\n {footer ? (\n <div\n className={clsx('tw-modal-footer', 'd-flex', 'align-items-center', 'flex-wrap')}\n >\n {footer}\n </div>\n ) : (\n <div className=\"m-t-3\" />\n )}\n </div>\n </div>\n </div>\n </CSSTransition>\n </Dimmer>\n );\n};\n\nexport default Modal;\n"],"names":["TRANSITION_DURATION_IN_MILLISECONDS","Modal","title","body","footer","onClose","onUnmount","className","open","size","Size","MEDIUM","scroll","Scroll","VIEWPORT","position","Position","CENTER","disableDimmerClickToClose","otherProps","intl","useIntl","isSmall","useLayout","contentReference","useRef","titleId","useId","overlayId","useContext","OverlayIdContext","_jsx","Drawer","headerTitle","footerContent","BOTTOM","children","Dimmer","scrollable","contentPosition","disableClickToClose","onExited","CSSTransition","nodeRef","appear","in","classNames","enterDone","timeout","unmountOnExit","ref","clsx","CONTENT","id","role","_jsxs","Title","type","Typography","TITLE_SUBSECTION","IconButton","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAMA,mCAAmC,GAAG,GAAG;AAqB/C,MAAMC,KAAK,GAAGA,CAAC;AACbC,EAAAA,KAAK,GAAG,IAAI;EACZC,IAAI;AACJC,EAAAA,MAAM,GAAG,IAAI;EACbC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,IAAI;QACJC,MAAI,GAAGC,SAAI,CAACC,MAAM;UAClBC,QAAM,GAAGC,aAAM,CAACC,QAAQ;YACxBC,UAAQ,GAAGC,iBAAQ,CAACC,MAAM;AAC1BC,EAAAA,yBAAyB,GAAG,KAAK;EACjC,GAAGC;AAAU,CACF,KAAI;AACf,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EACtB,MAAM;AAAEC,IAAAA;GAAS,GAAGC,mBAAS,EAAE;AAE/B,EAAA,MAAMC,gBAAgB,GAAGC,YAAM,CAAiB,IAAI,CAAC;AACrD,EAAA,MAAMC,OAAO,GAAGC,WAAK,EAAE;AAEvB,EAAA,MAAMC,SAAS,GAAGC,gBAAU,CAACC,kCAAgB,CAAC;AAE9C,EAAA,OAAO,CAACR,OAAO,gBACbS,cAAA,CAACC,cAAM,EAAA;AACLxB,IAAAA,IAAI,EAAEA,IAAK;AACXD,IAAAA,SAAS,EAAEA,SAAU;AACrB0B,IAAAA,WAAW,EAAE/B,KAAM;AACnBgC,IAAAA,aAAa,EAAE9B,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BAAiB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,WAAW,CAAE;AAAAf,cAAAA,QAAA,EAE/EhC;aACE,CAAC,gBAEN2B,cAAA,CAAA,KAAA,EAAA;AAAKxB,cAAAA,SAAS,EAAC;AAAO,aAAA,CACvB;WACE;SACF;OACF;KACQ;AACjB,GAAQ,CACT;AACH;;;;"}
|
package/build/modal/Modal.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { CSSTransition } from 'react-transition-group';
|
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
import '../common/theme.mjs';
|
|
6
6
|
import '../common/direction.mjs';
|
|
7
|
+
import '@transferwise/neptune-tokens';
|
|
7
8
|
import '../common/propsValues/control.mjs';
|
|
8
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
9
9
|
import { Size } from '../common/propsValues/size.mjs';
|
|
10
10
|
import { Typography } from '../common/propsValues/typography.mjs';
|
|
11
11
|
import '../common/propsValues/width.mjs';
|
|
@@ -51,12 +51,12 @@ const Modal = ({
|
|
|
51
51
|
}) => {
|
|
52
52
|
const intl = useIntl();
|
|
53
53
|
const {
|
|
54
|
-
|
|
54
|
+
isSmall
|
|
55
55
|
} = useLayout();
|
|
56
56
|
const contentReference = useRef(null);
|
|
57
57
|
const titleId = useId();
|
|
58
58
|
const overlayId = useContext(OverlayIdContext);
|
|
59
|
-
return !
|
|
59
|
+
return !isSmall ? /*#__PURE__*/jsx(Drawer, {
|
|
60
60
|
open: open,
|
|
61
61
|
className: className,
|
|
62
62
|
headerTitle: title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.mjs","sources":["../../src/modal/Modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode, useContext, useId, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n Position,\n PositionTop,\n PositionCenter,\n Scroll,\n CommonProps,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n SizeExtraLarge,\n ScrollContent,\n ScrollViewport,\n Typography,\n} from '../common';\nimport { useLayout } from '../common/hooks';\nimport Dimmer from '../dimmer';\nimport Drawer from '../drawer';\nimport { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';\nimport Title from '../title/Title';\nimport { Cross } from '@transferwise/icons';\nimport IconButton from '../iconButton';\nimport closeBtnMessages from '../common/closeButton/CloseButton.messages';\n\nconst TRANSITION_DURATION_IN_MILLISECONDS = 150;\n\nexport type ModalProps = CommonProps & {\n /** @default null */\n title?: ReactNode;\n body: ReactNode;\n /** @default null */\n footer?: ReactNode;\n /** @default 'md' */\n size?: SizeSmall | SizeMedium | SizeLarge | SizeExtraLarge;\n onClose: () => void;\n onUnmount?: () => void;\n open: boolean;\n /** @default 'viewport' */\n scroll?: ScrollContent | ScrollViewport;\n /** @default 'center' */\n position?: PositionTop | PositionCenter;\n /** @default false */\n disableDimmerClickToClose?: boolean;\n};\n\nconst Modal = ({\n title = null,\n body,\n footer = null,\n onClose,\n onUnmount,\n className,\n open,\n size = Size.MEDIUM,\n scroll = Scroll.VIEWPORT,\n position = Position.CENTER,\n disableDimmerClickToClose = false,\n ...otherProps\n}: ModalProps) => {\n const intl = useIntl();\n const {
|
|
1
|
+
{"version":3,"file":"Modal.mjs","sources":["../../src/modal/Modal.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode, useContext, useId, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n Position,\n PositionTop,\n PositionCenter,\n Scroll,\n CommonProps,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n SizeExtraLarge,\n ScrollContent,\n ScrollViewport,\n Typography,\n} from '../common';\nimport { useLayout } from '../common/hooks';\nimport Dimmer from '../dimmer';\nimport Drawer from '../drawer';\nimport { OverlayIdContext } from '../provider/overlay/OverlayIdProvider';\nimport Title from '../title/Title';\nimport { Cross } from '@transferwise/icons';\nimport IconButton from '../iconButton';\nimport closeBtnMessages from '../common/closeButton/CloseButton.messages';\n\nconst TRANSITION_DURATION_IN_MILLISECONDS = 150;\n\nexport type ModalProps = CommonProps & {\n /** @default null */\n title?: ReactNode;\n body: ReactNode;\n /** @default null */\n footer?: ReactNode;\n /** @default 'md' */\n size?: SizeSmall | SizeMedium | SizeLarge | SizeExtraLarge;\n onClose: () => void;\n onUnmount?: () => void;\n open: boolean;\n /** @default 'viewport' */\n scroll?: ScrollContent | ScrollViewport;\n /** @default 'center' */\n position?: PositionTop | PositionCenter;\n /** @default false */\n disableDimmerClickToClose?: boolean;\n};\n\nconst Modal = ({\n title = null,\n body,\n footer = null,\n onClose,\n onUnmount,\n className,\n open,\n size = Size.MEDIUM,\n scroll = Scroll.VIEWPORT,\n position = Position.CENTER,\n disableDimmerClickToClose = false,\n ...otherProps\n}: ModalProps) => {\n const intl = useIntl();\n const { isSmall } = useLayout();\n\n const contentReference = useRef<HTMLDivElement>(null);\n const titleId = useId();\n\n const overlayId = useContext(OverlayIdContext);\n\n return !isSmall ? (\n <Drawer\n open={open}\n className={className}\n headerTitle={title}\n footerContent={footer}\n position={Position.BOTTOM}\n onClose={onClose}\n onUnmount={onUnmount}\n >\n {body}\n </Drawer>\n ) : (\n <Dimmer\n open={open}\n scrollable={scroll === Scroll.VIEWPORT}\n contentPosition={position}\n disableClickToClose={disableDimmerClickToClose}\n onClose={onClose}\n onExited={onUnmount}\n >\n <CSSTransition\n nodeRef={contentReference}\n appear\n in={open}\n classNames={{ enterDone: 'in' }}\n timeout={TRANSITION_DURATION_IN_MILLISECONDS}\n unmountOnExit\n >\n <div\n ref={contentReference}\n className={clsx(\n 'tw-modal',\n 'd-flex',\n 'fade',\n 'outline-none',\n scroll === Scroll.CONTENT && 'tw-modal--scrollable',\n className,\n )}\n {...otherProps}\n >\n <div\n id={overlayId}\n role=\"dialog\"\n aria-modal\n aria-labelledby={titleId}\n className={clsx('tw-modal-dialog', 'd-flex', {\n [`tw-modal-${size}`]: size,\n })}\n >\n <div\n className={clsx(\n 'tw-modal-content',\n 'd-flex',\n 'flex-column',\n 'justify-content-between',\n )}\n >\n <div\n className={clsx(\n 'tw-modal-header',\n 'd-flex',\n 'align-items-center',\n title ? 'justify-content-between' : 'justify-content-end',\n 'flex-wrap',\n )}\n >\n {title && (\n <Title id={titleId} type={Typography.TITLE_SUBSECTION} className=\"tw-modal-title\">\n {title}\n </Title>\n )}\n <IconButton\n size={40}\n priority=\"tertiary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onClose}\n >\n <Cross />\n </IconButton>\n </div>\n <div\n className={clsx('tw-modal-body', {\n 'tw-modal-body--scrollable': scroll === Scroll.CONTENT,\n })}\n >\n {body}\n </div>\n {footer ? (\n <div\n className={clsx('tw-modal-footer', 'd-flex', 'align-items-center', 'flex-wrap')}\n >\n {footer}\n </div>\n ) : (\n <div className=\"m-t-3\" />\n )}\n </div>\n </div>\n </div>\n </CSSTransition>\n </Dimmer>\n );\n};\n\nexport default Modal;\n"],"names":["TRANSITION_DURATION_IN_MILLISECONDS","Modal","title","body","footer","onClose","onUnmount","className","open","size","Size","MEDIUM","scroll","Scroll","VIEWPORT","position","Position","CENTER","disableDimmerClickToClose","otherProps","intl","useIntl","isSmall","useLayout","contentReference","useRef","titleId","useId","overlayId","useContext","OverlayIdContext","_jsx","Drawer","headerTitle","footerContent","BOTTOM","children","Dimmer","scrollable","contentPosition","disableClickToClose","onExited","CSSTransition","nodeRef","appear","in","classNames","enterDone","timeout","unmountOnExit","ref","clsx","CONTENT","id","role","_jsxs","Title","type","Typography","TITLE_SUBSECTION","IconButton","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAMA,mCAAmC,GAAG,GAAG;AAqB/C,MAAMC,KAAK,GAAGA,CAAC;AACbC,EAAAA,KAAK,GAAG,IAAI;EACZC,IAAI;AACJC,EAAAA,MAAM,GAAG,IA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,gBAAiB;AAACpD,gBAAAA,SAAS,EAAC,gBAAgB;AAAA6B,gBAAAA,QAAA,EAC9ElC;AAAK,eACD,CACR,eACD6B,GAAA,CAAC6B,UAAU,EAAA;AACTnD,gBAAAA,IAAI,EAAE,EAAG;AACToD,gBAAAA,QAAQ,EAAC,UAAU;AACnB,gBAAA,YAAA,EAAYzC,IAAI,CAAC0C,aAAa,CAACC,gBAAgB,CAACC,SAAS,CAAE;AAC3DC,gBAAAA,OAAO,EAAE5D,OAAQ;AAAA+B,gBAAAA,QAAA,eAEjBL,GAAA,CAACmC,KAAK,EAAA,EAAA;AACR,eAAY,CACd;aAAK,CACL,eAAAnC,GAAA,CAAA,KAAA,EAAA;AACExB,cAAAA,SAAS,EAAE4C,IAAI,CAAC,eAAe,EAAE;AAC/B,gBAAA,2BAA2B,EAAEvC,MAAM,KAAKC,MAAM,CAACuC;AAChD,eAAA,CAAE;AAAAhB,cAAAA,QAAA,EAEFjC;AAAI,aACF,CACL,EAACC,MAAM,gBACL2B,GAAA,CAAA,KAAA,EAAA;cACExB,SAAS,EAAE4C,IAAI,CAAC,iBAAiB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,WAAW,CAAE;AAAAf,cAAAA,QAAA,EAE/EhC;aACE,CAAC,gBAEN2B,GAAA,CAAA,KAAA,EAAA;AAAKxB,cAAAA,SAAS,EAAC;AAAO,aAAA,CACvB;WACE;SACF;OACF;KACQ;AACjB,GAAQ,CACT;AACH;;;;"}
|
|
@@ -9,8 +9,8 @@ var React = require('react');
|
|
|
9
9
|
var reactIntl = require('react-intl');
|
|
10
10
|
require('../common/theme.js');
|
|
11
11
|
require('../common/direction.js');
|
|
12
|
+
require('@transferwise/neptune-tokens');
|
|
12
13
|
require('../common/propsValues/control.js');
|
|
13
|
-
require('../common/propsValues/breakpoint.js');
|
|
14
14
|
var size = require('../common/propsValues/size.js');
|
|
15
15
|
var typography = require('../common/propsValues/typography.js');
|
|
16
16
|
require('../common/propsValues/width.js');
|
|
@@ -5,8 +5,8 @@ import { Component } from 'react';
|
|
|
5
5
|
import { injectIntl } from 'react-intl';
|
|
6
6
|
import '../common/theme.mjs';
|
|
7
7
|
import '../common/direction.mjs';
|
|
8
|
+
import '@transferwise/neptune-tokens';
|
|
8
9
|
import '../common/propsValues/control.mjs';
|
|
9
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
10
10
|
import { Size } from '../common/propsValues/size.mjs';
|
|
11
11
|
import { Typography } from '../common/propsValues/typography.mjs';
|
|
12
12
|
import '../common/propsValues/width.mjs';
|
|
@@ -7,8 +7,8 @@ var React = require('react');
|
|
|
7
7
|
var Chevron = require('../chevron/Chevron.js');
|
|
8
8
|
require('../common/theme.js');
|
|
9
9
|
require('../common/direction.js');
|
|
10
|
+
require('@transferwise/neptune-tokens');
|
|
10
11
|
require('../common/propsValues/control.js');
|
|
11
|
-
require('../common/propsValues/breakpoint.js');
|
|
12
12
|
require('../common/propsValues/size.js');
|
|
13
13
|
require('../common/propsValues/typography.js');
|
|
14
14
|
require('../common/propsValues/width.js');
|
|
@@ -3,8 +3,8 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import Chevron from '../chevron/Chevron.mjs';
|
|
4
4
|
import '../common/theme.mjs';
|
|
5
5
|
import '../common/direction.mjs';
|
|
6
|
+
import '@transferwise/neptune-tokens';
|
|
6
7
|
import '../common/propsValues/control.mjs';
|
|
7
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
8
8
|
import '../common/propsValues/size.mjs';
|
|
9
9
|
import '../common/propsValues/typography.mjs';
|
|
10
10
|
import '../common/propsValues/width.mjs';
|
package/build/nudge/Nudge.js
CHANGED
|
@@ -8,8 +8,8 @@ var React = require('react');
|
|
|
8
8
|
var Body = require('../body/Body.js');
|
|
9
9
|
require('../common/theme.js');
|
|
10
10
|
require('../common/direction.js');
|
|
11
|
+
require('@transferwise/neptune-tokens');
|
|
11
12
|
require('../common/propsValues/control.js');
|
|
12
|
-
require('../common/propsValues/breakpoint.js');
|
|
13
13
|
require('../common/propsValues/size.js');
|
|
14
14
|
var typography = require('../common/propsValues/typography.js');
|
|
15
15
|
require('../common/propsValues/width.js');
|
package/build/nudge/Nudge.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { useCallback, useState, useEffect } from 'react';
|
|
|
4
4
|
import Body from '../body/Body.mjs';
|
|
5
5
|
import '../common/theme.mjs';
|
|
6
6
|
import '../common/direction.mjs';
|
|
7
|
+
import '@transferwise/neptune-tokens';
|
|
7
8
|
import '../common/propsValues/control.mjs';
|
|
8
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
9
9
|
import '../common/propsValues/size.mjs';
|
|
10
10
|
import { Typography } from '../common/propsValues/typography.mjs';
|
|
11
11
|
import '../common/propsValues/width.mjs';
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
require('../common/theme.js');
|
|
7
7
|
require('../common/direction.js');
|
|
8
|
+
require('@transferwise/neptune-tokens');
|
|
8
9
|
require('../common/propsValues/control.js');
|
|
9
|
-
require('../common/propsValues/breakpoint.js');
|
|
10
10
|
var size = require('../common/propsValues/size.js');
|
|
11
11
|
require('../common/propsValues/typography.js');
|
|
12
12
|
require('../common/propsValues/width.js');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import '../common/theme.mjs';
|
|
3
3
|
import '../common/direction.mjs';
|
|
4
|
+
import '@transferwise/neptune-tokens';
|
|
4
5
|
import '../common/propsValues/control.mjs';
|
|
5
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
6
6
|
import { Size } from '../common/propsValues/size.mjs';
|
|
7
7
|
import '../common/propsValues/typography.mjs';
|
|
8
8
|
import '../common/propsValues/width.mjs';
|
|
@@ -6,8 +6,8 @@ var React = require('react');
|
|
|
6
6
|
var reactIntl = require('react-intl');
|
|
7
7
|
require('../common/theme.js');
|
|
8
8
|
require('../common/direction.js');
|
|
9
|
+
require('@transferwise/neptune-tokens');
|
|
9
10
|
require('../common/propsValues/control.js');
|
|
10
|
-
require('../common/propsValues/breakpoint.js');
|
|
11
11
|
var size = require('../common/propsValues/size.js');
|
|
12
12
|
require('../common/propsValues/typography.js');
|
|
13
13
|
require('../common/propsValues/width.js');
|
|
@@ -2,8 +2,8 @@ import { useRef, useState, useEffect, useMemo } from 'react';
|
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
import '../common/theme.mjs';
|
|
4
4
|
import '../common/direction.mjs';
|
|
5
|
+
import '@transferwise/neptune-tokens';
|
|
5
6
|
import '../common/propsValues/control.mjs';
|
|
6
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
7
7
|
import { Size } from '../common/propsValues/size.mjs';
|
|
8
8
|
import '../common/propsValues/typography.mjs';
|
|
9
9
|
import '../common/propsValues/width.mjs';
|
package/build/popover/Popover.js
CHANGED
|
@@ -6,8 +6,8 @@ var clsx = require('clsx');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
require('../common/theme.js');
|
|
8
8
|
require('../common/direction.js');
|
|
9
|
+
require('@transferwise/neptune-tokens');
|
|
9
10
|
require('../common/propsValues/control.js');
|
|
10
|
-
require('../common/propsValues/breakpoint.js');
|
|
11
11
|
require('../common/propsValues/size.js');
|
|
12
12
|
var typography = require('../common/propsValues/typography.js');
|
|
13
13
|
require('../common/propsValues/width.js');
|
|
@@ -2,8 +2,8 @@ import { clsx } from 'clsx';
|
|
|
2
2
|
import { useId, useEffect, useRef, useState, isValidElement, cloneElement } from 'react';
|
|
3
3
|
import '../common/theme.mjs';
|
|
4
4
|
import '../common/direction.mjs';
|
|
5
|
+
import '@transferwise/neptune-tokens';
|
|
5
6
|
import '../common/propsValues/control.mjs';
|
|
6
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
7
7
|
import '../common/propsValues/size.mjs';
|
|
8
8
|
import { Typography } from '../common/propsValues/typography.mjs';
|
|
9
9
|
import '../common/propsValues/width.mjs';
|
|
@@ -6,8 +6,8 @@ var clsx = require('clsx');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
require('../common/theme.js');
|
|
8
8
|
require('../common/direction.js');
|
|
9
|
+
require('@transferwise/neptune-tokens');
|
|
9
10
|
require('../common/propsValues/control.js');
|
|
10
|
-
require('../common/propsValues/breakpoint.js');
|
|
11
11
|
require('../common/propsValues/size.js');
|
|
12
12
|
require('../common/propsValues/typography.js');
|
|
13
13
|
require('../common/propsValues/width.js');
|
|
@@ -2,8 +2,8 @@ import { clsx } from 'clsx';
|
|
|
2
2
|
import { Component } from 'react';
|
|
3
3
|
import '../common/theme.mjs';
|
|
4
4
|
import '../common/direction.mjs';
|
|
5
|
+
import '@transferwise/neptune-tokens';
|
|
5
6
|
import '../common/propsValues/control.mjs';
|
|
6
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
7
7
|
import '../common/propsValues/size.mjs';
|
|
8
8
|
import '../common/propsValues/typography.mjs';
|
|
9
9
|
import '../common/propsValues/width.mjs';
|
|
@@ -6,8 +6,8 @@ var clsx = require('clsx');
|
|
|
6
6
|
var Body = require('../body/Body.js');
|
|
7
7
|
require('../common/theme.js');
|
|
8
8
|
require('../common/direction.js');
|
|
9
|
+
require('@transferwise/neptune-tokens');
|
|
9
10
|
require('../common/propsValues/control.js');
|
|
10
|
-
require('../common/propsValues/breakpoint.js');
|
|
11
11
|
require('../common/propsValues/size.js');
|
|
12
12
|
var typography = require('../common/propsValues/typography.js');
|
|
13
13
|
require('../common/propsValues/width.js');
|
|
@@ -2,8 +2,8 @@ import { clsx } from 'clsx';
|
|
|
2
2
|
import Body from '../body/Body.mjs';
|
|
3
3
|
import '../common/theme.mjs';
|
|
4
4
|
import '../common/direction.mjs';
|
|
5
|
+
import '@transferwise/neptune-tokens';
|
|
5
6
|
import '../common/propsValues/control.mjs';
|
|
6
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
7
7
|
import '../common/propsValues/size.mjs';
|
|
8
8
|
import { Typography } from '../common/propsValues/typography.mjs';
|
|
9
9
|
import '../common/propsValues/width.mjs';
|
|
@@ -8,8 +8,8 @@ var React = require('react');
|
|
|
8
8
|
var Body = require('../body/Body.js');
|
|
9
9
|
require('../common/theme.js');
|
|
10
10
|
require('../common/direction.js');
|
|
11
|
+
require('@transferwise/neptune-tokens');
|
|
11
12
|
require('../common/propsValues/control.js');
|
|
12
|
-
require('../common/propsValues/breakpoint.js');
|
|
13
13
|
require('../common/propsValues/size.js');
|
|
14
14
|
var typography = require('../common/propsValues/typography.js');
|
|
15
15
|
require('../common/propsValues/width.js');
|
|
@@ -4,8 +4,8 @@ import React__default, { forwardRef, useState, useId, useEffect } from 'react';
|
|
|
4
4
|
import Body from '../body/Body.mjs';
|
|
5
5
|
import '../common/theme.mjs';
|
|
6
6
|
import '../common/direction.mjs';
|
|
7
|
+
import '@transferwise/neptune-tokens';
|
|
7
8
|
import '../common/propsValues/control.mjs';
|
|
8
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
9
9
|
import '../common/propsValues/size.mjs';
|
|
10
10
|
import { Typography } from '../common/propsValues/typography.mjs';
|
|
11
11
|
import '../common/propsValues/width.mjs';
|
|
@@ -7,8 +7,8 @@ var clsx = require('clsx');
|
|
|
7
7
|
var Body = require('../body/Body.js');
|
|
8
8
|
require('../common/theme.js');
|
|
9
9
|
require('../common/direction.js');
|
|
10
|
+
require('@transferwise/neptune-tokens');
|
|
10
11
|
require('../common/propsValues/control.js');
|
|
11
|
-
require('../common/propsValues/breakpoint.js');
|
|
12
12
|
require('../common/propsValues/size.js');
|
|
13
13
|
var typography = require('../common/propsValues/typography.js');
|
|
14
14
|
require('../common/propsValues/width.js');
|
|
@@ -3,8 +3,8 @@ import { clsx } from 'clsx';
|
|
|
3
3
|
import Body from '../body/Body.mjs';
|
|
4
4
|
import '../common/theme.mjs';
|
|
5
5
|
import '../common/direction.mjs';
|
|
6
|
+
import '@transferwise/neptune-tokens';
|
|
6
7
|
import '../common/propsValues/control.mjs';
|
|
7
|
-
import '../common/propsValues/breakpoint.mjs';
|
|
8
8
|
import '../common/propsValues/size.mjs';
|
|
9
9
|
import { Typography } from '../common/propsValues/typography.mjs';
|
|
10
10
|
import '../common/propsValues/width.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var neptuneTokens = require('@transferwise/neptune-tokens');
|
|
4
5
|
var clsx = require('clsx');
|
|
5
6
|
var Body = require('../../body/Body.js');
|
|
6
7
|
var Button_resolver = require('../../button/Button.resolver.js');
|
|
7
8
|
require('../../common/theme.js');
|
|
8
9
|
require('../../common/direction.js');
|
|
9
10
|
require('../../common/propsValues/control.js');
|
|
10
|
-
var breakpoint = require('../../common/propsValues/breakpoint.js');
|
|
11
11
|
require('../../common/propsValues/size.js');
|
|
12
12
|
var typography = require('../../common/propsValues/typography.js');
|
|
13
13
|
require('../../common/propsValues/width.js');
|
|
@@ -45,7 +45,7 @@ const ActionPrompt = ({
|
|
|
45
45
|
'data-testid': testId,
|
|
46
46
|
'aria-label': ariaLabel
|
|
47
47
|
}) => {
|
|
48
|
-
const isMobile = !useScreenSize.useScreenSize(
|
|
48
|
+
const isMobile = !useScreenSize.useScreenSize(neptuneTokens.Breakpoint.SMALL);
|
|
49
49
|
const mediaId = React.useId();
|
|
50
50
|
const titleId = React.useId();
|
|
51
51
|
const descId = React.useId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionPrompt.js","sources":["../../../src/prompt/ActionPrompt/ActionPrompt.tsx"],"sourcesContent":["import { AriaAttributes, ReactNode, useId } from 'react';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport {
|
|
1
|
+
{"version":3,"file":"ActionPrompt.js","sources":["../../../src/prompt/ActionPrompt/ActionPrompt.tsx"],"sourcesContent":["import { AriaAttributes, ReactNode, useId } from 'react';\nimport { Breakpoint } from '@transferwise/neptune-tokens';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport { Typography } from '../../common';\nimport { ButtonProps } from '../../button/Button.types';\nimport { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';\nimport { useScreenSize } from '../../common/hooks/useScreenSize';\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\n\nexport type ActionPromptProps = {\n title: ReactNode;\n description?: ReactNode;\n /** @default {} */\n media?: PromptMedia;\n action: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {\n label: ButtonProps['children'];\n };\n actionSecondary?: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {\n label: ButtonProps['children'];\n };\n 'aria-label'?: AriaAttributes['aria-label'];\n} & Pick<PrimitivePromptProps, 'id' | 'className' | 'data-testid' | 'onDismiss'> & {\n /**\n * The sentiment determines the colour scheme\n * @default 'neutral'\n */\n sentiment?: PrimitivePromptProps['sentiment'];\n };\n\n/**\n * Use an action prompt for optional feedback that doesn't require immediate action, such as feature upsells, warnings, or suggestions. These prompts are typically used outside of core product flows (e.g., Launchpad, Recipient, or Transaction screens) and can be addressed at the user's convenience.\n *\n * If your message is about immediate user feedback (e.g., form submission errors, download failures, missing data warnings), use an [info prompt](https://storybook.wise.design/?path=/docs/prompts-infoprompt--docs) instead.\n *\n * Guidance can be found in the [design system](https://wise.design/components/action-prompt).\n */\nexport const ActionPrompt = ({\n sentiment = 'neutral',\n title,\n description,\n onDismiss,\n media = {},\n action,\n actionSecondary,\n id,\n className,\n 'data-testid': testId,\n 'aria-label': ariaLabel,\n}: ActionPromptProps) => {\n const isMobile = !useScreenSize(Breakpoint.SMALL);\n\n const mediaId = useId();\n const titleId = useId();\n const descId = useId();\n\n const ariaLabelledByIds = [\n media['aria-hidden'] ? undefined : mediaId,\n ariaLabel ? undefined : titleId,\n ]\n .filter(Boolean)\n .join(' ');\n\n const renderMedia = () =>\n renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName: 'wds-action-prompt--media-image',\n });\n\n return (\n <PrimitivePrompt\n id={id}\n sentiment={sentiment}\n data-testid={testId}\n className={clsx(\n 'wds-action-prompt',\n { 'wds-action-prompt--with-two-actions': !!actionSecondary },\n className,\n )}\n media={renderMedia()}\n actions={\n <>\n {actionSecondary && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"secondary\"\n href={actionSecondary.href}\n block={isMobile}\n onClick={actionSecondary?.onClick}\n >\n {actionSecondary.label}\n </Button>\n )}\n {/* @ts-expect-error onClick type mismatch */}\n <Button\n v2\n size=\"md\"\n priority=\"primary\"\n href={action.href}\n block={isMobile}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n </>\n }\n role=\"region\"\n onDismiss={onDismiss}\n {...(ariaLabel\n ? { 'aria-label': ariaLabel }\n : {\n 'aria-labelledby': ariaLabelledByIds,\n 'aria-describedby': descId,\n })}\n >\n <div className={clsx('d-flex', 'flex-column', 'justify-content-center')}>\n <Body id={titleId} type={Typography.BODY_LARGE_BOLD} className=\"wds-action-prompt__content\">\n {title}\n </Body>\n {description && (\n <Body id={descId} className=\"wds-action-prompt__content\">\n {description}\n </Body>\n )}\n </div>\n </PrimitivePrompt>\n );\n};\n\nexport default ActionPrompt;\n"],"names":["ActionPrompt","sentiment","title","description","onDismiss","media","action","actionSecondary","id","className","testId","ariaLabel","isMobile","useScreenSize","Breakpoint","SMALL","mediaId","useId","titleId","descId","ariaLabelledByIds","undefined","filter","Boolean","join","renderMedia","renderPromptMedia","imgClassName","_jsx","PrimitivePrompt","clsx","actions","_jsxs","_Fragment","children","Button","v2","size","priority","href","block","onClick","label","role","Body","type","Typography","BODY_LARGE_BOLD"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCO,MAAMA,YAAY,GAAGA,CAAC;AAC3BC,EAAAA,SAAS,GAAG,SAAS;EACrBC,KAAK;EACLC,WAAW;EACXC,SAAS;EACTC,KAAK,GAAG,EAAE;EACVC,MAAM;EACNC,eAAe;EACfC,EAAE;EAC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C,OAAQ;QAAAP,QAAA,EAEjC3B,eAAe,CAACmC;AAAK,OAChB,CACT,eAEDd,cAAA,CAACO,uBAAM,EAAA;QACLC,EAAE,EAAA,IAAA;AACFC,QAAAA,IAAI,EAAC,IAAI;AACTC,QAAAA,QAAQ,EAAC,SAAS;QAClBC,IAAI,EAAEjC,MAAM,CAACiC,IAAK;AAClBC,QAAAA,KAAK,EAAE5B,QAAS;QAChB6B,OAAO,EAAEnC,MAAM,CAACmC,OAAQ;QAAAP,QAAA,EAEvB5B,MAAM,CAACoC;AAAK,OACP,CACV;AAAA,KAAA,CACD;AACDC,IAAAA,IAAI,EAAC,QAAQ;AACbvC,IAAAA,SAAS,EAAEA,SAAU;AAAA,IAAA,IAChBO,SAAS,GACV;AAAE,MAAA,YAAY,EAAEA;AAAS,KAAE,GAC3B;AACE,MAAA,iBAAiB,EAAES,iBAAiB;AACpC,MAAA,kBAAkB,EAAED;KACrB,CAAA;AAAAe,IAAAA,QAAA,eAELF,eAAA,CAAA,KAAA,EAAA;MAAKvB,SAAS,EAAEqB,SAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,wBAAwB,CAAE;MAAAI,QAAA,EAAA,cACtEN,cAAA,CAACgB,YAAI,EAAA;AAACpC,QAAAA,EAAE,EAAEU,OAAQ;QAAC2B,IAAI,EAAEC,qBAAU,CAACC,eAAgB;AAACtC,QAAAA,SAAS,EAAC,4BAA4B;AAAAyB,QAAAA,QAAA,EACxFhC;AAAK,OACF,CACN,EAACC,WAAW,iBACVyB,cAAA,CAACgB,YAAI,EAAA;AAACpC,QAAAA,EAAE,EAAEW,MAAO;AAACV,QAAAA,SAAS,EAAC,4BAA4B;AAAAyB,QAAAA,QAAA,EACrD/B;AAAW,OACR,CACP;KACE;AACP,GAAiB,CAAC;AAEtB;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useId } from 'react';
|
|
2
|
+
import { Breakpoint } from '@transferwise/neptune-tokens';
|
|
2
3
|
import { clsx } from 'clsx';
|
|
3
4
|
import Body from '../../body/Body.mjs';
|
|
4
5
|
import Button from '../../button/Button.resolver.mjs';
|
|
5
6
|
import '../../common/theme.mjs';
|
|
6
7
|
import '../../common/direction.mjs';
|
|
7
8
|
import '../../common/propsValues/control.mjs';
|
|
8
|
-
import { Breakpoint } from '../../common/propsValues/breakpoint.mjs';
|
|
9
9
|
import '../../common/propsValues/size.mjs';
|
|
10
10
|
import { Typography } from '../../common/propsValues/typography.mjs';
|
|
11
11
|
import '../../common/propsValues/width.mjs';
|
|
@@ -43,7 +43,7 @@ const ActionPrompt = ({
|
|
|
43
43
|
'data-testid': testId,
|
|
44
44
|
'aria-label': ariaLabel
|
|
45
45
|
}) => {
|
|
46
|
-
const isMobile = !useScreenSize(Breakpoint.
|
|
46
|
+
const isMobile = !useScreenSize(Breakpoint.SMALL);
|
|
47
47
|
const mediaId = useId();
|
|
48
48
|
const titleId = useId();
|
|
49
49
|
const descId = useId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionPrompt.mjs","sources":["../../../src/prompt/ActionPrompt/ActionPrompt.tsx"],"sourcesContent":["import { AriaAttributes, ReactNode, useId } from 'react';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport {
|
|
1
|
+
{"version":3,"file":"ActionPrompt.mjs","sources":["../../../src/prompt/ActionPrompt/ActionPrompt.tsx"],"sourcesContent":["import { AriaAttributes, ReactNode, useId } from 'react';\nimport { Breakpoint } from '@transferwise/neptune-tokens';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport { Typography } from '../../common';\nimport { ButtonProps } from '../../button/Button.types';\nimport { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';\nimport { useScreenSize } from '../../common/hooks/useScreenSize';\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\n\nexport type ActionPromptProps = {\n title: ReactNode;\n description?: ReactNode;\n /** @default {} */\n media?: PromptMedia;\n action: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {\n label: ButtonProps['children'];\n };\n actionSecondary?: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {\n label: ButtonProps['children'];\n };\n 'aria-label'?: AriaAttributes['aria-label'];\n} & Pick<PrimitivePromptProps, 'id' | 'className' | 'data-testid' | 'onDismiss'> & {\n /**\n * The sentiment determines the colour scheme\n * @default 'neutral'\n */\n sentiment?: PrimitivePromptProps['sentiment'];\n };\n\n/**\n * Use an action prompt for optional feedback that doesn't require immediate action, such as feature upsells, warnings, or suggestions. These prompts are typically used outside of core product flows (e.g., Launchpad, Recipient, or Transaction screens) and can be addressed at the user's convenience.\n *\n * If your message is about immediate user feedback (e.g., form submission errors, download failures, missing data warnings), use an [info prompt](https://storybook.wise.design/?path=/docs/prompts-infoprompt--docs) instead.\n *\n * Guidance can be found in the [design system](https://wise.design/components/action-prompt).\n */\nexport const ActionPrompt = ({\n sentiment = 'neutral',\n title,\n description,\n onDismiss,\n media = {},\n action,\n actionSecondary,\n id,\n className,\n 'data-testid': testId,\n 'aria-label': ariaLabel,\n}: ActionPromptProps) => {\n const isMobile = !useScreenSize(Breakpoint.SMALL);\n\n const mediaId = useId();\n const titleId = useId();\n const descId = useId();\n\n const ariaLabelledByIds = [\n media['aria-hidden'] ? undefined : mediaId,\n ariaLabel ? undefined : titleId,\n ]\n .filter(Boolean)\n .join(' ');\n\n const renderMedia = () =>\n renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName: 'wds-action-prompt--media-image',\n });\n\n return (\n <PrimitivePrompt\n id={id}\n sentiment={sentiment}\n data-testid={testId}\n className={clsx(\n 'wds-action-prompt',\n { 'wds-action-prompt--with-two-actions': !!actionSecondary },\n className,\n )}\n media={renderMedia()}\n actions={\n <>\n {actionSecondary && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"secondary\"\n href={actionSecondary.href}\n block={isMobile}\n onClick={actionSecondary?.onClick}\n >\n {actionSecondary.label}\n </Button>\n )}\n {/* @ts-expect-error onClick type mismatch */}\n <Button\n v2\n size=\"md\"\n priority=\"primary\"\n href={action.href}\n block={isMobile}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n </>\n }\n role=\"region\"\n onDismiss={onDismiss}\n {...(ariaLabel\n ? { 'aria-label': ariaLabel }\n : {\n 'aria-labelledby': ariaLabelledByIds,\n 'aria-describedby': descId,\n })}\n >\n <div className={clsx('d-flex', 'flex-column', 'justify-content-center')}>\n <Body id={titleId} type={Typography.BODY_LARGE_BOLD} className=\"wds-action-prompt__content\">\n {title}\n </Body>\n {description && (\n <Body id={descId} className=\"wds-action-prompt__content\">\n {description}\n </Body>\n )}\n </div>\n </PrimitivePrompt>\n );\n};\n\nexport default ActionPrompt;\n"],"names":["ActionPrompt","sentiment","title","description","onDismiss","media","action","actionSecondary","id","className","testId","ariaLabel","isMobile","useScreenSize","Breakpoint","SMALL","mediaId","useId","titleId","descId","ariaLabelledByIds","undefined","filter","Boolean","join","renderMedia","renderPromptMedia","imgClassName","_jsx","PrimitivePrompt","clsx","actions","_jsxs","_Fragment","children","Button","v2","size","priority","href","block","onClick","label","role","Body","type","Typography","BODY_LARGE_BOLD"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCO,MAAMA,YAAY,GAAGA,CAAC;AAC3BC,EAAAA,SAAS,GAAG,SAAS;EACrBC,KAAK;EACLC,WAAW;EACXC,SAAS;EACTC,KAAK,GAAG,EAAE;EACVC,MAAM;EACNC,eAAe;EACfC,EAAE;EACFC,SAAS;AACT,EAAA,aAAa,EAAEC,MAAM;AACrB,EAAA,YAAY,EAAEC;AAAS,CACL,KAAI;EACtB,MAAMC,QAAQ,GAAG,CAACC,aAAa,CAACC,UAAU,CAACC,KAAK,CAAC;AAEjD,EAAA,MAAMC,OAAO,GAAGC,KAAK,EAAE;AACvB,EAAA,MAAMC,OAAO,GAAGD,KAAK,EAAE;AACvB,EAAA,MAAME,MAAM,GAAGF,KA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MAAM,CAACmC,OAAQ;QAAAP,QAAA,EAEvB5B,MAAM,CAACoC;AAAK,OACP,CACV;AAAA,KAAA,CACD;AACDC,IAAAA,IAAI,EAAC,QAAQ;AACbvC,IAAAA,SAAS,EAAEA,SAAU;AAAA,IAAA,IAChBO,SAAS,GACV;AAAE,MAAA,YAAY,EAAEA;AAAS,KAAE,GAC3B;AACE,MAAA,iBAAiB,EAAES,iBAAiB;AACpC,MAAA,kBAAkB,EAAED;KACrB,CAAA;AAAAe,IAAAA,QAAA,eAELF,IAAA,CAAA,KAAA,EAAA;MAAKvB,SAAS,EAAEqB,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,wBAAwB,CAAE;MAAAI,QAAA,EAAA,cACtEN,GAAA,CAACgB,IAAI,EAAA;AAACpC,QAAAA,EAAE,EAAEU,OAAQ;QAAC2B,IAAI,EAAEC,UAAU,CAACC,eAAgB;AAACtC,QAAAA,SAAS,EAAC,4BAA4B;AAAAyB,QAAAA,QAAA,EACxFhC;AAAK,OACF,CACN,EAACC,WAAW,iBACVyB,GAAA,CAACgB,IAAI,EAAA;AAACpC,QAAAA,EAAE,EAAEW,MAAO;AAACV,QAAAA,SAAS,EAAC,4BAA4B;AAAAyB,QAAAA,QAAA,EACrD/B;AAAW,OACR,CACP;KACE;AACP,GAAiB,CAAC;AAEtB;;;;"}
|
|
@@ -6,8 +6,8 @@ var Body = require('../../body/Body.js');
|
|
|
6
6
|
var Button_resolver = require('../../button/Button.resolver.js');
|
|
7
7
|
require('../../common/theme.js');
|
|
8
8
|
require('../../common/direction.js');
|
|
9
|
+
var neptuneTokens = require('@transferwise/neptune-tokens');
|
|
9
10
|
require('../../common/propsValues/control.js');
|
|
10
|
-
var breakpoint = require('../../common/propsValues/breakpoint.js');
|
|
11
11
|
require('../../common/propsValues/size.js');
|
|
12
12
|
var typography = require('../../common/propsValues/typography.js');
|
|
13
13
|
require('../../common/propsValues/width.js');
|
|
@@ -48,7 +48,7 @@ const CriticalBanner = ({
|
|
|
48
48
|
className,
|
|
49
49
|
'data-testid': testId
|
|
50
50
|
}) => {
|
|
51
|
-
const [containerRef, isDesktop] = useContainerSize.useContainerSize(
|
|
51
|
+
const [containerRef, isDesktop] = useContainerSize.useContainerSize(neptuneTokens.Breakpoint.MEDIUM);
|
|
52
52
|
const isControlled = expandedProp !== undefined && onToggle !== undefined;
|
|
53
53
|
const [internalExpanded, setInternalExpanded] = React.useState(true);
|
|
54
54
|
const resolvedExpanded = isDesktop ? true : isControlled ? expandedProp : internalExpanded;
|