@transferwise/components 0.0.0-experimental-9050641 → 0.0.0-experimental-ce05ccb
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/propsValues/breakpoint.js +12 -0
- package/build/common/propsValues/breakpoint.js.map +1 -0
- package/build/common/propsValues/breakpoint.mjs +12 -0
- package/build/common/propsValues/breakpoint.mjs.map +1 -0
- 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 +477 -319
- 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 +83 -70
- package/build/prompt/CriticalBanner/CriticalBanner.js.map +1 -1
- package/build/prompt/CriticalBanner/CriticalBanner.mjs +83 -70
- package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +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 +4 -2
- 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 +15 -13
- 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 +338 -270
- 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 +20 -8
- package/build/styles/css/wells.css +18 -4
- 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 +47 -34
- package/build/styles/less/neptune-tokens.less +2 -2
- package/build/styles/main.css +477 -319
- package/build/styles/modal/Modal.css +20 -7
- 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 +63 -1
- package/build/styles/prompt/PrimitivePrompt/PrimitivePrompt.css +1 -1
- package/build/styles/props/custom-media.css +11 -23
- package/build/styles/props/neptune-tokens.css +1 -1
- 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 +15 -13
- 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 +338 -270
- 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 +20 -8
- package/build/styles/styles/less/wells.css +18 -4
- package/build/styles/styles/props/custom-media.css +11 -1
- 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/common/propsValues/breakpoint.d.ts +9 -0
- package/build/types/common/propsValues/breakpoint.d.ts.map +1 -0
- 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 +1 -2
- 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/prompt/CriticalBanner/CriticalBanner.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 +2 -3
- package/src/common/Option/Option.css +4 -2
- package/src/common/Option/Option.less +4 -2
- 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/propsValues/breakpoint.ts +8 -0
- package/src/common/responsivePanel/ResponsivePanel.test.js +2 -3
- 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 +1 -2
- package/src/decision/Decision.tsx +1 -2
- 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 +3 -4
- package/src/flowNavigation/FlowNavigation.css +1 -1
- package/src/flowNavigation/FlowNavigation.less +1 -2
- package/src/flowNavigation/FlowNavigation.story.tsx +0 -3
- package/src/flowNavigation/FlowNavigation.test.js +1 -1
- package/src/flowNavigation/FlowNavigation.tsx +1 -2
- 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 +477 -319
- package/src/modal/Modal.css +20 -7
- package/src/modal/Modal.less +19 -7
- package/src/modal/Modal.tsx +2 -2
- package/src/overlayHeader/OverlayHeader.css +1 -1
- package/src/overlayHeader/OverlayHeader.less +2 -3
- package/src/popover/Popover.css +3 -3
- package/src/popover/Popover.test.tsx +1 -2
- 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 +6 -37
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +2 -3
- package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +9 -0
- package/src/prompt/CriticalBanner/CriticalBanner.css +63 -1
- package/src/prompt/CriticalBanner/CriticalBanner.less +96 -2
- package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +156 -169
- package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +25 -6
- package/src/prompt/CriticalBanner/CriticalBanner.test.tsx +37 -0
- package/src/prompt/CriticalBanner/CriticalBanner.tsx +98 -81
- package/src/prompt/CriticalBanner/CriticalBanner.vars.less +1 -0
- 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 +2 -3
- package/src/stepper/Stepper.css +2 -2
- package/src/styles/less/accordion.css +4 -4
- package/src/styles/less/addons/_display-utilities.less +27 -13
- 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 +22 -10
- 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 +15 -13
- package/src/styles/less/flex.less +3 -1
- 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 +0 -1
- package/src/styles/less/neptune.css +338 -270
- 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 +20 -8
- package/src/styles/less/utilities.less +14 -6
- package/src/styles/less/wells.css +18 -4
- package/src/styles/less/wells.less +5 -3
- package/src/styles/props/custom-media.css +11 -1
- package/src/styles/variables/legacy-variables.less +47 -4
- 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
|
@@ -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');
|
|
10
9
|
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(breakpoint.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;
|
|
@@ -58,6 +58,75 @@ const CriticalBanner = ({
|
|
|
58
58
|
const titleId = React.useId();
|
|
59
59
|
const descId = React.useId();
|
|
60
60
|
const ariaLabelledByIds = [media['aria-hidden'] ? undefined : mediaId, !title ? undefined : titleId].filter(Boolean).join(' ');
|
|
61
|
+
const bannerSurface = /*#__PURE__*/jsxRuntime.jsxs(PrimitivePrompt.PrimitivePrompt, {
|
|
62
|
+
ref: containerRef,
|
|
63
|
+
id: id,
|
|
64
|
+
sentiment: sentiment,
|
|
65
|
+
emphasis: sentiment === 'neutral' ? 'base' : 'elevated',
|
|
66
|
+
"data-testid": testId,
|
|
67
|
+
className: clsx.clsx('wds-critical-banner', {
|
|
68
|
+
'wds-critical-banner--collapsed': !resolvedExpanded,
|
|
69
|
+
'wds-critical-banner--with-two-actions': !!actionSecondary
|
|
70
|
+
}, className),
|
|
71
|
+
media: promptMedia.renderPromptMedia({
|
|
72
|
+
media,
|
|
73
|
+
sentiment,
|
|
74
|
+
mediaId,
|
|
75
|
+
imgClassName: 'wds-critical-banner--media-image'
|
|
76
|
+
}),
|
|
77
|
+
actions: hasActions ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
78
|
+
"aria-hidden": !resolvedExpanded ? true : undefined,
|
|
79
|
+
style: {
|
|
80
|
+
display: 'contents'
|
|
81
|
+
},
|
|
82
|
+
children: [actionSecondary &&
|
|
83
|
+
/*#__PURE__*/
|
|
84
|
+
// @ts-expect-error onClick type mismatch
|
|
85
|
+
jsxRuntime.jsx(Button_resolver.default, {
|
|
86
|
+
v2: true,
|
|
87
|
+
size: "md",
|
|
88
|
+
priority: "secondary",
|
|
89
|
+
href: actionSecondary.href,
|
|
90
|
+
tabIndex: resolvedExpanded ? undefined : -1,
|
|
91
|
+
onClick: actionSecondary?.onClick,
|
|
92
|
+
children: actionSecondary.label
|
|
93
|
+
}), action &&
|
|
94
|
+
/*#__PURE__*/
|
|
95
|
+
// @ts-expect-error onClick type mismatch
|
|
96
|
+
jsxRuntime.jsx(Button_resolver.default, {
|
|
97
|
+
v2: true,
|
|
98
|
+
size: "md",
|
|
99
|
+
priority: "primary",
|
|
100
|
+
href: action.href,
|
|
101
|
+
tabIndex: resolvedExpanded ? undefined : -1,
|
|
102
|
+
onClick: action.onClick,
|
|
103
|
+
children: action.label
|
|
104
|
+
})]
|
|
105
|
+
}) : undefined,
|
|
106
|
+
role: "region",
|
|
107
|
+
"aria-labelledby": ariaLabelledByIds || undefined,
|
|
108
|
+
"aria-describedby": description ? descId : undefined,
|
|
109
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
110
|
+
className: "wds-critical-banner__text-wrapper",
|
|
111
|
+
children: [title && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
112
|
+
id: titleId,
|
|
113
|
+
type: typography.Typography.BODY_LARGE_BOLD,
|
|
114
|
+
className: "wds-critical-banner__content wds-critical-banner__title",
|
|
115
|
+
children: title
|
|
116
|
+
}), description && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
117
|
+
id: descId,
|
|
118
|
+
className: clsx.clsx('wds-critical-banner__content', 'wds-critical-banner__description', {
|
|
119
|
+
'wds-critical-banner__description--with-title': !!title
|
|
120
|
+
}),
|
|
121
|
+
children: description
|
|
122
|
+
})]
|
|
123
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Expander.ExpanderToggle, {
|
|
124
|
+
expanded: resolvedExpanded,
|
|
125
|
+
size: 24,
|
|
126
|
+
className: "wds-critical-banner__toggle",
|
|
127
|
+
onToggle: handleToggle
|
|
128
|
+
})]
|
|
129
|
+
});
|
|
61
130
|
return /*#__PURE__*/jsxRuntime.jsx(LiveRegion.LiveRegion, {
|
|
62
131
|
"aria-live": "assertive",
|
|
63
132
|
announceOnChange: helpers.buildAnnouncementString({
|
|
@@ -67,74 +136,18 @@ const CriticalBanner = ({
|
|
|
67
136
|
actionLabel: action?.label,
|
|
68
137
|
actionSecondaryLabel: actionSecondary?.label
|
|
69
138
|
}),
|
|
70
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
sentiment,
|
|
83
|
-
mediaId,
|
|
84
|
-
imgClassName: 'wds-critical-banner--media-image'
|
|
85
|
-
}),
|
|
86
|
-
actions: hasActions ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
87
|
-
"aria-hidden": !resolvedExpanded ? true : undefined,
|
|
88
|
-
style: {
|
|
89
|
-
display: 'contents'
|
|
90
|
-
},
|
|
91
|
-
children: [actionSecondary &&
|
|
92
|
-
/*#__PURE__*/
|
|
93
|
-
// @ts-expect-error onClick type mismatch
|
|
94
|
-
jsxRuntime.jsx(Button_resolver.default, {
|
|
95
|
-
v2: true,
|
|
96
|
-
size: "md",
|
|
97
|
-
priority: "secondary",
|
|
98
|
-
href: actionSecondary.href,
|
|
99
|
-
tabIndex: resolvedExpanded ? undefined : -1,
|
|
100
|
-
onClick: actionSecondary?.onClick,
|
|
101
|
-
children: actionSecondary.label
|
|
102
|
-
}), action &&
|
|
103
|
-
/*#__PURE__*/
|
|
104
|
-
// @ts-expect-error onClick type mismatch
|
|
105
|
-
jsxRuntime.jsx(Button_resolver.default, {
|
|
106
|
-
v2: true,
|
|
107
|
-
size: "md",
|
|
108
|
-
priority: "primary",
|
|
109
|
-
href: action.href,
|
|
110
|
-
tabIndex: resolvedExpanded ? undefined : -1,
|
|
111
|
-
onClick: action.onClick,
|
|
112
|
-
children: action.label
|
|
113
|
-
})]
|
|
114
|
-
}) : undefined,
|
|
115
|
-
role: "region",
|
|
116
|
-
"aria-labelledby": ariaLabelledByIds || undefined,
|
|
117
|
-
"aria-describedby": description ? descId : undefined,
|
|
118
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
119
|
-
className: "wds-critical-banner__text-wrapper",
|
|
120
|
-
children: [title && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
121
|
-
id: titleId,
|
|
122
|
-
type: typography.Typography.BODY_LARGE_BOLD,
|
|
123
|
-
className: "wds-critical-banner__content wds-critical-banner__title",
|
|
124
|
-
children: title
|
|
125
|
-
}), description && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
126
|
-
id: descId,
|
|
127
|
-
className: clsx.clsx('wds-critical-banner__content', 'wds-critical-banner__description', {
|
|
128
|
-
'wds-critical-banner__description--with-title': !!title
|
|
129
|
-
}),
|
|
130
|
-
children: description
|
|
131
|
-
})]
|
|
132
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Expander.ExpanderToggle, {
|
|
133
|
-
expanded: resolvedExpanded,
|
|
134
|
-
size: 24,
|
|
135
|
-
className: "wds-critical-banner__toggle",
|
|
136
|
-
onToggle: handleToggle
|
|
137
|
-
})]
|
|
139
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
140
|
+
className: "wds-critical-banner-overhang-query",
|
|
141
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
142
|
+
className: "wds-critical-banner__entry-mask",
|
|
143
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
144
|
+
className: "wds-critical-banner__entry-track",
|
|
145
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
146
|
+
className: clsx.clsx('wds-critical-banner-overhang', `wds-critical-banner-overhang--${sentiment}`),
|
|
147
|
+
children: bannerSurface
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
})
|
|
138
151
|
})
|
|
139
152
|
});
|
|
140
153
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalBanner.js","sources":["../../../src/prompt/CriticalBanner/CriticalBanner.tsx"],"sourcesContent":["import { ReactNode, useId, useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport { Breakpoint, LiveRegion, Typography } from '../../common';\nimport { ButtonProps } from '../../button/Button.types';\nimport { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';\n\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\nimport { ExpanderToggle } from '../common/Expander/Expander';\nimport { buildAnnouncementString } from './helpers';\nimport { useContainerSize } from '../../common/hooks/useContainerSize';\n\nexport type CriticalBannerProps = {\n title?: ReactNode;\n description: ReactNode;\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 sentiment?: Exclude<PrimitivePromptProps['sentiment'], 'proposition'>;\n /**\n * Controls whether the description and actions are visible, as a controlled component.\n * When collapsed with a title, only the title is shown.\n * When collapsed without a title, the description is trimmed to 2 lines.\n *\n * Note: On desktop (container width >= 768px), the banner is always expanded\n * regardless of this prop value.\n */\n expanded?: boolean;\n /**\n * Called when the user clicks the chevron toggle.\n * If not provided, the component will manage expanded state internally.\n */\n onToggle?: () => void;\n} & Pick<PrimitivePromptProps, 'id' | 'className' | 'data-testid'>;\n\n/**\n * A full-width, non-dismissible banner for critical messages such as account blocks or\n * time-sensitive actions that require immediate user attention.\n\n * @see {@link https://wise.design/components/critical-banner Design Spec}\n */\nexport const CriticalBanner = ({\n sentiment = 'negative',\n title,\n description,\n media = {},\n action,\n actionSecondary,\n expanded: expandedProp,\n onToggle,\n id,\n className,\n 'data-testid': testId,\n}: CriticalBannerProps) => {\n const [containerRef, isDesktop] = useContainerSize(Breakpoint.MEDIUM);\n const isControlled = expandedProp !== undefined && onToggle !== undefined;\n const [internalExpanded, setInternalExpanded] = useState(true);\n const resolvedExpanded = isDesktop ? true : isControlled ? expandedProp : internalExpanded;\n const handleToggle = isControlled\n ? onToggle\n : () => setInternalExpanded((previousExpanded) => !previousExpanded);\n const hasActions = action ?? actionSecondary;\n const mediaId = useId();\n const titleId = useId();\n const descId = useId();\n\n const ariaLabelledByIds = [\n media['aria-hidden'] ? undefined : mediaId,\n !title ? undefined : titleId,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <LiveRegion\n aria-live=\"assertive\"\n announceOnChange={buildAnnouncementString({\n title,\n description,\n expanded: resolvedExpanded,\n actionLabel: action?.label,\n actionSecondaryLabel: actionSecondary?.label,\n })}\n >\n <PrimitivePrompt\n ref={containerRef}\n id={id}\n sentiment={sentiment}\n emphasis={sentiment === 'neutral' ? 'base' : 'elevated'}\n data-testid={testId}\n className={clsx(\n 'wds-critical-banner',\n {\n 'wds-critical-banner--collapsed': !resolvedExpanded,\n 'wds-critical-banner--with-two-actions': !!actionSecondary,\n },\n className,\n )}\n media={renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName: 'wds-critical-banner--media-image',\n })}\n actions={\n hasActions ? (\n <div aria-hidden={!resolvedExpanded ? true : undefined} style={{ display: 'contents' }}>\n {actionSecondary && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"secondary\"\n href={actionSecondary.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={actionSecondary?.onClick}\n >\n {actionSecondary.label}\n </Button>\n )}\n {action && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"primary\"\n href={action.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n )}\n </div>\n ) : undefined\n }\n role=\"region\"\n aria-labelledby={ariaLabelledByIds || undefined}\n aria-describedby={description ? descId : undefined}\n >\n <div className=\"wds-critical-banner__text-wrapper\">\n {title && (\n <Body\n id={titleId}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-critical-banner__content wds-critical-banner__title\"\n >\n {title}\n </Body>\n )}\n {description && (\n <Body\n id={descId}\n className={clsx('wds-critical-banner__content', 'wds-critical-banner__description', {\n 'wds-critical-banner__description--with-title': !!title,\n })}\n >\n {description}\n </Body>\n )}\n </div>\n <ExpanderToggle\n expanded={resolvedExpanded}\n size={24}\n className=\"wds-critical-banner__toggle\"\n onToggle={handleToggle}\n />\n </PrimitivePrompt>\n </LiveRegion>\n );\n};\n\nexport default CriticalBanner;\n"],"names":["CriticalBanner","sentiment","title","description","media","action","actionSecondary","expanded","expandedProp","onToggle","id","className","testId","containerRef","isDesktop","useContainerSize","Breakpoint","MEDIUM","isControlled","undefined","internalExpanded","setInternalExpanded","useState","resolvedExpanded","handleToggle","previousExpanded","hasActions","mediaId","useId","titleId","descId","ariaLabelledByIds","filter","Boolean","join","_jsx","LiveRegion","announceOnChange","buildAnnouncementString","actionLabel","label","actionSecondaryLabel","children","_jsxs","PrimitivePrompt","ref","emphasis","clsx","renderPromptMedia","imgClassName","actions","style","display","Button","v2","size","priority","href","tabIndex","onClick","role","Body","type","Typography","BODY_LARGE_BOLD","ExpanderToggle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CO,MAAMA,cAAc,GAAGA,CAAC;AAC7BC,EAAAA,SAAS,GAAG,UAAU;EACtBC,KAAK;EACLC,WAAW;EACXC,KAAK,GAAG,EAAE;EACVC,MAAM;EACNC,eAAe;AACfC,EAAAA,QAAQ,EAAEC,YAAY;EACtBC,QAAQ;EACRC,EAAE;EACFC,SAAS;AACT,EAAA,aAAa,EAAEC;AAAM,CACD,KAAI;EACxB,MAAM,CAACC,YAAY,EAAEC,SAAS,CAAC,GAAGC,iCAAgB,CAACC,wBAAU,CAACC,MAAM,CAAC;EACrE,MAAMC,YAAY,GAAGV,YAAY,KAAKW,SAAS,IAAIV,QAAQ,KAAKU,SAAS;EACzE,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGC,cAAQ,CAAC,IAAI,CAAC;EAC9D,MAAMC,gBAAgB,GAAGT,SAAS,GAAG,IAAI,GAAGI,YAAY,GAAGV,YAAY,GAAGY,gBAAgB;AAC1F,EAAA,MAAMI,YAAY,GAAGN,YAA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CxC,KAAK,iBACJiC,cAAA,CAAC0B,YAAI,EAAA;AACHnD,UAAAA,EAAE,EAAEmB,OAAQ;UACZiC,IAAI,EAAEC,qBAAU,CAACC,eAAgB;AACjCrD,UAAAA,SAAS,EAAC,yDAAyD;AAAA+B,UAAAA,QAAA,EAElExC;AAAK,SACF,CACP,EACAC,WAAW,iBACVgC,cAAA,CAAC0B,YAAI,EAAA;AACHnD,UAAAA,EAAE,EAAEoB,MAAO;AACXnB,UAAAA,SAAS,EAAEoC,SAAI,CAAC,8BAA8B,EAAE,kCAAkC,EAAE;YAClF,8CAA8C,EAAE,CAAC,CAAC7C;AACnD,WAAA,CAAE;AAAAwC,UAAAA,QAAA,EAEFvC;AAAW,SACR,CACP;AAAA,OACE,CACL,eAAAgC,cAAA,CAAC8B,uBAAc,EAAA;AACb1D,QAAAA,QAAQ,EAAEgB,gBAAiB;AAC3BgC,QAAAA,IAAI,EAAE,EAAG;AACT5C,QAAAA,SAAS,EAAC,6BAA6B;AACvCF,QAAAA,QAAQ,EAAEe;AAAa,OAAA,CAE3B;KAAiB;AACnB,GAAY,CAAC;AAEjB;;;;"}
|
|
1
|
+
{"version":3,"file":"CriticalBanner.js","sources":["../../../src/prompt/CriticalBanner/CriticalBanner.tsx"],"sourcesContent":["import { ReactNode, useId, useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport { Breakpoint, LiveRegion, Typography } from '../../common';\nimport { ButtonProps } from '../../button/Button.types';\nimport { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';\n\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\nimport { ExpanderToggle } from '../common/Expander/Expander';\nimport { buildAnnouncementString } from './helpers';\nimport { useContainerSize } from '../../common/hooks/useContainerSize';\n\nexport type CriticalBannerProps = {\n title?: ReactNode;\n description: ReactNode;\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 sentiment?: Exclude<PrimitivePromptProps['sentiment'], 'proposition'>;\n /**\n * Controls whether the description and actions are visible, as a controlled component.\n * When collapsed with a title, only the title is shown.\n * When collapsed without a title, the description is trimmed to 2 lines.\n *\n * Note: On desktop (container width >= 768px), the banner is always expanded\n * regardless of this prop value.\n */\n expanded?: boolean;\n /**\n * Called when the user clicks the chevron toggle.\n * If not provided, the component will manage expanded state internally.\n */\n onToggle?: () => void;\n} & Pick<PrimitivePromptProps, 'id' | 'className' | 'data-testid'>;\n\n/**\n * A full-width, non-dismissible banner for critical messages such as account blocks or\n * time-sensitive actions that require immediate user attention.\n\n * @see {@link https://wise.design/components/critical-banner Design Spec}\n */\nexport const CriticalBanner = ({\n sentiment = 'negative',\n title,\n description,\n media = {},\n action,\n actionSecondary,\n expanded: expandedProp,\n onToggle,\n id,\n className,\n 'data-testid': testId,\n}: CriticalBannerProps) => {\n const [containerRef, isDesktop] = useContainerSize(Breakpoint.MEDIUM);\n const isControlled = expandedProp !== undefined && onToggle !== undefined;\n const [internalExpanded, setInternalExpanded] = useState(true);\n const resolvedExpanded = isDesktop ? true : isControlled ? expandedProp : internalExpanded;\n const handleToggle = isControlled\n ? onToggle\n : () => setInternalExpanded((previousExpanded) => !previousExpanded);\n const hasActions = action ?? actionSecondary;\n const mediaId = useId();\n const titleId = useId();\n const descId = useId();\n\n const ariaLabelledByIds = [\n media['aria-hidden'] ? undefined : mediaId,\n !title ? undefined : titleId,\n ]\n .filter(Boolean)\n .join(' ');\n\n const bannerSurface = (\n <PrimitivePrompt\n ref={containerRef}\n id={id}\n sentiment={sentiment}\n emphasis={sentiment === 'neutral' ? 'base' : 'elevated'}\n data-testid={testId}\n className={clsx(\n 'wds-critical-banner',\n {\n 'wds-critical-banner--collapsed': !resolvedExpanded,\n 'wds-critical-banner--with-two-actions': !!actionSecondary,\n },\n className,\n )}\n media={renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName: 'wds-critical-banner--media-image',\n })}\n actions={\n hasActions ? (\n <div aria-hidden={!resolvedExpanded ? true : undefined} style={{ display: 'contents' }}>\n {actionSecondary && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"secondary\"\n href={actionSecondary.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={actionSecondary?.onClick}\n >\n {actionSecondary.label}\n </Button>\n )}\n {action && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"primary\"\n href={action.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n )}\n </div>\n ) : undefined\n }\n role=\"region\"\n aria-labelledby={ariaLabelledByIds || undefined}\n aria-describedby={description ? descId : undefined}\n >\n <div className=\"wds-critical-banner__text-wrapper\">\n {title && (\n <Body\n id={titleId}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-critical-banner__content wds-critical-banner__title\"\n >\n {title}\n </Body>\n )}\n {description && (\n <Body\n id={descId}\n className={clsx('wds-critical-banner__content', 'wds-critical-banner__description', {\n 'wds-critical-banner__description--with-title': !!title,\n })}\n >\n {description}\n </Body>\n )}\n </div>\n <ExpanderToggle\n expanded={resolvedExpanded}\n size={24}\n className=\"wds-critical-banner__toggle\"\n onToggle={handleToggle}\n />\n </PrimitivePrompt>\n );\n\n return (\n <LiveRegion\n aria-live=\"assertive\"\n announceOnChange={buildAnnouncementString({\n title,\n description,\n expanded: resolvedExpanded,\n actionLabel: action?.label,\n actionSecondaryLabel: actionSecondary?.label,\n })}\n >\n <div className=\"wds-critical-banner-overhang-query\">\n <div className=\"wds-critical-banner__entry-mask\">\n <div className=\"wds-critical-banner__entry-track\">\n <div\n className={clsx(\n 'wds-critical-banner-overhang',\n `wds-critical-banner-overhang--${sentiment}`,\n )}\n >\n {bannerSurface}\n </div>\n </div>\n </div>\n </div>\n </LiveRegion>\n );\n};\n\nexport default CriticalBanner;\n"],"names":["CriticalBanner","sentiment","title","description","media","action","actionSecondary","expanded","expandedProp","onToggle","id","className","testId","containerRef","isDesktop","useContainerSize","Breakpoint","MEDIUM","isControlled","undefined","internalExpanded","setInternalExpanded","useState","resolvedExpanded","handleToggle","previousExpanded","hasActions","mediaId","useId","titleId","descId","ariaLabelledByIds","filter","Boolean","join","bannerSurface","_jsxs","PrimitivePrompt","ref","emphasis","clsx","renderPromptMedia","imgClassName","actions","style","display","children","_jsx","Button","v2","size","priority","href","tabIndex","onClick","label","role","Body","type","Typography","BODY_LARGE_BOLD","ExpanderToggle","LiveRegion","announceOnChange","buildAnnouncementString","actionLabel","actionSecondaryLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CO,MAAMA,cAAc,GAAGA,CAAC;AAC7BC,EAAAA,SAAS,GAAG,UAAU;EACtBC,KAAK;EACLC,WAAW;EACXC,KAAK,GAAG,EAAE;EACVC,MAAM;EACNC,eAAe;AACfC,EAAAA,QAAQ,EAAEC,YAAY;EACtBC,QAAQ;EACRC,EAAE;EACFC,SAAS;AACT,EAAA,aAAa,EAAEC;AAAM,CACD,KAAI;EACxB,MAAM,CAACC,YAAY,EAAEC,SAAS,CAAC,GAAGC,iCAAgB,CAACC,qBAAU,CAACC,MAAM,CAAC;EACrE,MAAMC,YAAY,GAAGV,YAAY,KAAKW,SAAS,IAAIV,QAAQ,KAAKU,SAAS;EACzE,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGC,cAAQ,CAAC,IAAI,CAAC;EAC9D,MAAMC,gBAAgB,GAAGT,SAAS,GAAG,IAAI,GAAGI,YAAY,GAAGV,YAAY,GAAGY,gBAAgB;AAC1F,EAAA,MAAMI,YAAY,GAAGN,YAAY,GAC7BT,QAAQ,GACR,MAAMY,mBAAmB,CAAEI,gBAAgB,IAAK,CAACA,gBAAgB,CAAC;AACtE,EAAA,MAAMC,UAAU,GAAGrB,MAAM,IAA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C;AACnD,SAAA,CAAE;AAAA4C,QAAAA,QAAA,EAEF3C;AAAW,OACR,CACP;AAAA,KACE,CACL,eAAA4C,cAAA,CAACc,uBAAc,EAAA;AACbtD,MAAAA,QAAQ,EAAEgB,gBAAiB;AAC3B2B,MAAAA,IAAI,EAAE,EAAG;AACTvC,MAAAA,SAAS,EAAC,6BAA6B;AACvCF,MAAAA,QAAQ,EAAEe;AAAa,KAAA,CAE3B;AAAA,GAAiB,CAClB;EAED,oBACEuB,cAAA,CAACe,qBAAU,EAAA;AACT,IAAA,WAAA,EAAU,WAAW;IACrBC,gBAAgB,EAAEC,+BAAuB,CAAC;MACxC9D,KAAK;MACLC,WAAW;AACXI,MAAAA,QAAQ,EAAEgB,gBAAgB;MAC1B0C,WAAW,EAAE5D,MAAM,EAAEkD,KAAK;MAC1BW,oBAAoB,EAAE5D,eAAe,EAAEiD;AACxC,KAAA,CAAE;AAAAT,IAAAA,QAAA,eAEHC,cAAA,CAAA,KAAA,EAAA;AAAKpC,MAAAA,SAAS,EAAC,oCAAoC;AAAAmC,MAAAA,QAAA,eACjDC,cAAA,CAAA,KAAA,EAAA;AAAKpC,QAAAA,SAAS,EAAC,iCAAiC;AAAAmC,QAAAA,QAAA,eAC9CC,cAAA,CAAA,KAAA,EAAA;AAAKpC,UAAAA,SAAS,EAAC,kCAAkC;AAAAmC,UAAAA,QAAA,eAC/CC,cAAA,CAAA,KAAA,EAAA;YACEpC,SAAS,EAAE6B,SAAI,CACb,8BAA8B,EAC9B,CAAA,8BAAA,EAAiCvC,SAAS,EAAE,CAC5C;AAAA6C,YAAAA,QAAA,EAEDX;WACE;SACF;OACF;KACF;AACP,GAAY,CAAC;AAEjB;;;;"}
|
|
@@ -4,8 +4,8 @@ import Body from '../../body/Body.mjs';
|
|
|
4
4
|
import Button from '../../button/Button.resolver.mjs';
|
|
5
5
|
import '../../common/theme.mjs';
|
|
6
6
|
import '../../common/direction.mjs';
|
|
7
|
-
import { Breakpoint } from '@transferwise/neptune-tokens';
|
|
8
7
|
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';
|
|
@@ -25,7 +25,7 @@ import '@transferwise/formatting';
|
|
|
25
25
|
import '@transferwise/icons';
|
|
26
26
|
import 'react-intl';
|
|
27
27
|
import '../../common/closeButton/CloseButton.messages.mjs';
|
|
28
|
-
import {
|
|
28
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
29
29
|
import { LiveRegion } from '../../common/liveRegion/LiveRegion.mjs';
|
|
30
30
|
import { PrimitivePrompt } from '../PrimitivePrompt/PrimitivePrompt.mjs';
|
|
31
31
|
import { renderPromptMedia } from '../helpers/promptMedia.mjs';
|
|
@@ -56,6 +56,75 @@ const CriticalBanner = ({
|
|
|
56
56
|
const titleId = useId();
|
|
57
57
|
const descId = useId();
|
|
58
58
|
const ariaLabelledByIds = [media['aria-hidden'] ? undefined : mediaId, !title ? undefined : titleId].filter(Boolean).join(' ');
|
|
59
|
+
const bannerSurface = /*#__PURE__*/jsxs(PrimitivePrompt, {
|
|
60
|
+
ref: containerRef,
|
|
61
|
+
id: id,
|
|
62
|
+
sentiment: sentiment,
|
|
63
|
+
emphasis: sentiment === 'neutral' ? 'base' : 'elevated',
|
|
64
|
+
"data-testid": testId,
|
|
65
|
+
className: clsx('wds-critical-banner', {
|
|
66
|
+
'wds-critical-banner--collapsed': !resolvedExpanded,
|
|
67
|
+
'wds-critical-banner--with-two-actions': !!actionSecondary
|
|
68
|
+
}, className),
|
|
69
|
+
media: renderPromptMedia({
|
|
70
|
+
media,
|
|
71
|
+
sentiment,
|
|
72
|
+
mediaId,
|
|
73
|
+
imgClassName: 'wds-critical-banner--media-image'
|
|
74
|
+
}),
|
|
75
|
+
actions: hasActions ? /*#__PURE__*/jsxs("div", {
|
|
76
|
+
"aria-hidden": !resolvedExpanded ? true : undefined,
|
|
77
|
+
style: {
|
|
78
|
+
display: 'contents'
|
|
79
|
+
},
|
|
80
|
+
children: [actionSecondary &&
|
|
81
|
+
/*#__PURE__*/
|
|
82
|
+
// @ts-expect-error onClick type mismatch
|
|
83
|
+
jsx(Button, {
|
|
84
|
+
v2: true,
|
|
85
|
+
size: "md",
|
|
86
|
+
priority: "secondary",
|
|
87
|
+
href: actionSecondary.href,
|
|
88
|
+
tabIndex: resolvedExpanded ? undefined : -1,
|
|
89
|
+
onClick: actionSecondary?.onClick,
|
|
90
|
+
children: actionSecondary.label
|
|
91
|
+
}), action &&
|
|
92
|
+
/*#__PURE__*/
|
|
93
|
+
// @ts-expect-error onClick type mismatch
|
|
94
|
+
jsx(Button, {
|
|
95
|
+
v2: true,
|
|
96
|
+
size: "md",
|
|
97
|
+
priority: "primary",
|
|
98
|
+
href: action.href,
|
|
99
|
+
tabIndex: resolvedExpanded ? undefined : -1,
|
|
100
|
+
onClick: action.onClick,
|
|
101
|
+
children: action.label
|
|
102
|
+
})]
|
|
103
|
+
}) : undefined,
|
|
104
|
+
role: "region",
|
|
105
|
+
"aria-labelledby": ariaLabelledByIds || undefined,
|
|
106
|
+
"aria-describedby": description ? descId : undefined,
|
|
107
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
108
|
+
className: "wds-critical-banner__text-wrapper",
|
|
109
|
+
children: [title && /*#__PURE__*/jsx(Body, {
|
|
110
|
+
id: titleId,
|
|
111
|
+
type: Typography.BODY_LARGE_BOLD,
|
|
112
|
+
className: "wds-critical-banner__content wds-critical-banner__title",
|
|
113
|
+
children: title
|
|
114
|
+
}), description && /*#__PURE__*/jsx(Body, {
|
|
115
|
+
id: descId,
|
|
116
|
+
className: clsx('wds-critical-banner__content', 'wds-critical-banner__description', {
|
|
117
|
+
'wds-critical-banner__description--with-title': !!title
|
|
118
|
+
}),
|
|
119
|
+
children: description
|
|
120
|
+
})]
|
|
121
|
+
}), /*#__PURE__*/jsx(ExpanderToggle, {
|
|
122
|
+
expanded: resolvedExpanded,
|
|
123
|
+
size: 24,
|
|
124
|
+
className: "wds-critical-banner__toggle",
|
|
125
|
+
onToggle: handleToggle
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
59
128
|
return /*#__PURE__*/jsx(LiveRegion, {
|
|
60
129
|
"aria-live": "assertive",
|
|
61
130
|
announceOnChange: buildAnnouncementString({
|
|
@@ -65,74 +134,18 @@ const CriticalBanner = ({
|
|
|
65
134
|
actionLabel: action?.label,
|
|
66
135
|
actionSecondaryLabel: actionSecondary?.label
|
|
67
136
|
}),
|
|
68
|
-
children: /*#__PURE__*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
sentiment,
|
|
81
|
-
mediaId,
|
|
82
|
-
imgClassName: 'wds-critical-banner--media-image'
|
|
83
|
-
}),
|
|
84
|
-
actions: hasActions ? /*#__PURE__*/jsxs("div", {
|
|
85
|
-
"aria-hidden": !resolvedExpanded ? true : undefined,
|
|
86
|
-
style: {
|
|
87
|
-
display: 'contents'
|
|
88
|
-
},
|
|
89
|
-
children: [actionSecondary &&
|
|
90
|
-
/*#__PURE__*/
|
|
91
|
-
// @ts-expect-error onClick type mismatch
|
|
92
|
-
jsx(Button, {
|
|
93
|
-
v2: true,
|
|
94
|
-
size: "md",
|
|
95
|
-
priority: "secondary",
|
|
96
|
-
href: actionSecondary.href,
|
|
97
|
-
tabIndex: resolvedExpanded ? undefined : -1,
|
|
98
|
-
onClick: actionSecondary?.onClick,
|
|
99
|
-
children: actionSecondary.label
|
|
100
|
-
}), action &&
|
|
101
|
-
/*#__PURE__*/
|
|
102
|
-
// @ts-expect-error onClick type mismatch
|
|
103
|
-
jsx(Button, {
|
|
104
|
-
v2: true,
|
|
105
|
-
size: "md",
|
|
106
|
-
priority: "primary",
|
|
107
|
-
href: action.href,
|
|
108
|
-
tabIndex: resolvedExpanded ? undefined : -1,
|
|
109
|
-
onClick: action.onClick,
|
|
110
|
-
children: action.label
|
|
111
|
-
})]
|
|
112
|
-
}) : undefined,
|
|
113
|
-
role: "region",
|
|
114
|
-
"aria-labelledby": ariaLabelledByIds || undefined,
|
|
115
|
-
"aria-describedby": description ? descId : undefined,
|
|
116
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
117
|
-
className: "wds-critical-banner__text-wrapper",
|
|
118
|
-
children: [title && /*#__PURE__*/jsx(Body, {
|
|
119
|
-
id: titleId,
|
|
120
|
-
type: Typography.BODY_LARGE_BOLD,
|
|
121
|
-
className: "wds-critical-banner__content wds-critical-banner__title",
|
|
122
|
-
children: title
|
|
123
|
-
}), description && /*#__PURE__*/jsx(Body, {
|
|
124
|
-
id: descId,
|
|
125
|
-
className: clsx('wds-critical-banner__content', 'wds-critical-banner__description', {
|
|
126
|
-
'wds-critical-banner__description--with-title': !!title
|
|
127
|
-
}),
|
|
128
|
-
children: description
|
|
129
|
-
})]
|
|
130
|
-
}), /*#__PURE__*/jsx(ExpanderToggle, {
|
|
131
|
-
expanded: resolvedExpanded,
|
|
132
|
-
size: 24,
|
|
133
|
-
className: "wds-critical-banner__toggle",
|
|
134
|
-
onToggle: handleToggle
|
|
135
|
-
})]
|
|
137
|
+
children: /*#__PURE__*/jsx("div", {
|
|
138
|
+
className: "wds-critical-banner-overhang-query",
|
|
139
|
+
children: /*#__PURE__*/jsx("div", {
|
|
140
|
+
className: "wds-critical-banner__entry-mask",
|
|
141
|
+
children: /*#__PURE__*/jsx("div", {
|
|
142
|
+
className: "wds-critical-banner__entry-track",
|
|
143
|
+
children: /*#__PURE__*/jsx("div", {
|
|
144
|
+
className: clsx('wds-critical-banner-overhang', `wds-critical-banner-overhang--${sentiment}`),
|
|
145
|
+
children: bannerSurface
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
})
|
|
136
149
|
})
|
|
137
150
|
});
|
|
138
151
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalBanner.mjs","sources":["../../../src/prompt/CriticalBanner/CriticalBanner.tsx"],"sourcesContent":["import { ReactNode, useId, useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport { Breakpoint, LiveRegion, Typography } from '../../common';\nimport { ButtonProps } from '../../button/Button.types';\nimport { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';\n\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\nimport { ExpanderToggle } from '../common/Expander/Expander';\nimport { buildAnnouncementString } from './helpers';\nimport { useContainerSize } from '../../common/hooks/useContainerSize';\n\nexport type CriticalBannerProps = {\n title?: ReactNode;\n description: ReactNode;\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 sentiment?: Exclude<PrimitivePromptProps['sentiment'], 'proposition'>;\n /**\n * Controls whether the description and actions are visible, as a controlled component.\n * When collapsed with a title, only the title is shown.\n * When collapsed without a title, the description is trimmed to 2 lines.\n *\n * Note: On desktop (container width >= 768px), the banner is always expanded\n * regardless of this prop value.\n */\n expanded?: boolean;\n /**\n * Called when the user clicks the chevron toggle.\n * If not provided, the component will manage expanded state internally.\n */\n onToggle?: () => void;\n} & Pick<PrimitivePromptProps, 'id' | 'className' | 'data-testid'>;\n\n/**\n * A full-width, non-dismissible banner for critical messages such as account blocks or\n * time-sensitive actions that require immediate user attention.\n\n * @see {@link https://wise.design/components/critical-banner Design Spec}\n */\nexport const CriticalBanner = ({\n sentiment = 'negative',\n title,\n description,\n media = {},\n action,\n actionSecondary,\n expanded: expandedProp,\n onToggle,\n id,\n className,\n 'data-testid': testId,\n}: CriticalBannerProps) => {\n const [containerRef, isDesktop] = useContainerSize(Breakpoint.MEDIUM);\n const isControlled = expandedProp !== undefined && onToggle !== undefined;\n const [internalExpanded, setInternalExpanded] = useState(true);\n const resolvedExpanded = isDesktop ? true : isControlled ? expandedProp : internalExpanded;\n const handleToggle = isControlled\n ? onToggle\n : () => setInternalExpanded((previousExpanded) => !previousExpanded);\n const hasActions = action ?? actionSecondary;\n const mediaId = useId();\n const titleId = useId();\n const descId = useId();\n\n const ariaLabelledByIds = [\n media['aria-hidden'] ? undefined : mediaId,\n !title ? undefined : titleId,\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <LiveRegion\n aria-live=\"assertive\"\n announceOnChange={buildAnnouncementString({\n title,\n description,\n expanded: resolvedExpanded,\n actionLabel: action?.label,\n actionSecondaryLabel: actionSecondary?.label,\n })}\n >\n <PrimitivePrompt\n ref={containerRef}\n id={id}\n sentiment={sentiment}\n emphasis={sentiment === 'neutral' ? 'base' : 'elevated'}\n data-testid={testId}\n className={clsx(\n 'wds-critical-banner',\n {\n 'wds-critical-banner--collapsed': !resolvedExpanded,\n 'wds-critical-banner--with-two-actions': !!actionSecondary,\n },\n className,\n )}\n media={renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName: 'wds-critical-banner--media-image',\n })}\n actions={\n hasActions ? (\n <div aria-hidden={!resolvedExpanded ? true : undefined} style={{ display: 'contents' }}>\n {actionSecondary && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"secondary\"\n href={actionSecondary.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={actionSecondary?.onClick}\n >\n {actionSecondary.label}\n </Button>\n )}\n {action && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"primary\"\n href={action.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n )}\n </div>\n ) : undefined\n }\n role=\"region\"\n aria-labelledby={ariaLabelledByIds || undefined}\n aria-describedby={description ? descId : undefined}\n >\n <div className=\"wds-critical-banner__text-wrapper\">\n {title && (\n <Body\n id={titleId}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-critical-banner__content wds-critical-banner__title\"\n >\n {title}\n </Body>\n )}\n {description && (\n <Body\n id={descId}\n className={clsx('wds-critical-banner__content', 'wds-critical-banner__description', {\n 'wds-critical-banner__description--with-title': !!title,\n })}\n >\n {description}\n </Body>\n )}\n </div>\n <ExpanderToggle\n expanded={resolvedExpanded}\n size={24}\n className=\"wds-critical-banner__toggle\"\n onToggle={handleToggle}\n />\n </PrimitivePrompt>\n </LiveRegion>\n );\n};\n\nexport default CriticalBanner;\n"],"names":["CriticalBanner","sentiment","title","description","media","action","actionSecondary","expanded","expandedProp","onToggle","id","className","testId","containerRef","isDesktop","useContainerSize","Breakpoint","MEDIUM","isControlled","undefined","internalExpanded","setInternalExpanded","useState","resolvedExpanded","handleToggle","previousExpanded","hasActions","mediaId","useId","titleId","descId","ariaLabelledByIds","filter","Boolean","join","_jsx","LiveRegion","announceOnChange","buildAnnouncementString","actionLabel","label","actionSecondaryLabel","children","_jsxs","PrimitivePrompt","ref","emphasis","clsx","renderPromptMedia","imgClassName","actions","style","display","Button","v2","size","priority","href","tabIndex","onClick","role","Body","type","Typography","BODY_LARGE_BOLD","ExpanderToggle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CO,MAAMA,cAAc,GAAGA,CAAC;AAC7BC,EAAAA,SAAS,GAAG,UAAU;EACtBC,KAAK;EACLC,WAAW;EACXC,KAAK,GAAG,EAAE;EACVC,MAAM;EACNC,eAAe;AACfC,EAAAA,QAAQ,EAAEC,YAAY;EACtBC,QAAQ;EACRC,EAAE;EACFC,SAAS;AACT,EAAA,aAAa,EAAEC;AAAM,CACD,KAAI;EACxB,MAAM,CAACC,YAAY,EAAEC,SAAS,CAAC,GAAGC,gBAAgB,CAACC,UAAU,CAACC,MAAM,CAAC;EACrE,MAAMC,YAAY,GAAGV,YAAY,KAAKW,SAAS,IAAIV,Q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AA,EAAiB7B,iBAAiB,IAAIZ,SAAU;AAChD,MAAA,kBAAA,EAAkBhB,WAAW,GAAG2B,MAAM,GAAGX,SAAU;AAAAuB,MAAAA,QAAA,gBAEnDC,IAAA,CAAA,KAAA,EAAA;AAAKhC,QAAAA,SAAS,EAAC,mCAAmC;AAAA+B,QAAAA,QAAA,EAAA,CAC/CxC,KAAK,iBACJiC,GAAA,CAAC0B,IAAI,EAAA;AACHnD,UAAAA,EAAE,EAAEmB,OAAQ;UACZiC,IAAI,EAAEC,UAAU,CAACC,eAAgB;AACjCrD,UAAAA,SAAS,EAAC,yDAAyD;AAAA+B,UAAAA,QAAA,EAElExC;AAAK,SACF,CACP,EACAC,WAAW,iBACVgC,GAAA,CAAC0B,IAAI,EAAA;AACHnD,UAAAA,EAAE,EAAEoB,MAAO;AACXnB,UAAAA,SAAS,EAAEoC,IAAI,CAAC,8BAA8B,EAAE,kCAAkC,EAAE;YAClF,8CAA8C,EAAE,CAAC,CAAC7C;AACnD,WAAA,CAAE;AAAAwC,UAAAA,QAAA,EAEFvC;AAAW,SACR,CACP;AAAA,OACE,CACL,eAAAgC,GAAA,CAAC8B,cAAc,EAAA;AACb1D,QAAAA,QAAQ,EAAEgB,gBAAiB;AAC3BgC,QAAAA,IAAI,EAAE,EAAG;AACT5C,QAAAA,SAAS,EAAC,6BAA6B;AACvCF,QAAAA,QAAQ,EAAEe;AAAa,OAAA,CAE3B;KAAiB;AACnB,GAAY,CAAC;AAEjB;;;;"}
|
|
1
|
+
{"version":3,"file":"CriticalBanner.mjs","sources":["../../../src/prompt/CriticalBanner/CriticalBanner.tsx"],"sourcesContent":["import { ReactNode, useId, useState } from 'react';\nimport { clsx } from 'clsx';\n\nimport Body from '../../body';\nimport Button from '../../button';\nimport { Breakpoint, LiveRegion, Typography } from '../../common';\nimport { ButtonProps } from '../../button/Button.types';\nimport { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';\n\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\nimport { ExpanderToggle } from '../common/Expander/Expander';\nimport { buildAnnouncementString } from './helpers';\nimport { useContainerSize } from '../../common/hooks/useContainerSize';\n\nexport type CriticalBannerProps = {\n title?: ReactNode;\n description: ReactNode;\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 sentiment?: Exclude<PrimitivePromptProps['sentiment'], 'proposition'>;\n /**\n * Controls whether the description and actions are visible, as a controlled component.\n * When collapsed with a title, only the title is shown.\n * When collapsed without a title, the description is trimmed to 2 lines.\n *\n * Note: On desktop (container width >= 768px), the banner is always expanded\n * regardless of this prop value.\n */\n expanded?: boolean;\n /**\n * Called when the user clicks the chevron toggle.\n * If not provided, the component will manage expanded state internally.\n */\n onToggle?: () => void;\n} & Pick<PrimitivePromptProps, 'id' | 'className' | 'data-testid'>;\n\n/**\n * A full-width, non-dismissible banner for critical messages such as account blocks or\n * time-sensitive actions that require immediate user attention.\n\n * @see {@link https://wise.design/components/critical-banner Design Spec}\n */\nexport const CriticalBanner = ({\n sentiment = 'negative',\n title,\n description,\n media = {},\n action,\n actionSecondary,\n expanded: expandedProp,\n onToggle,\n id,\n className,\n 'data-testid': testId,\n}: CriticalBannerProps) => {\n const [containerRef, isDesktop] = useContainerSize(Breakpoint.MEDIUM);\n const isControlled = expandedProp !== undefined && onToggle !== undefined;\n const [internalExpanded, setInternalExpanded] = useState(true);\n const resolvedExpanded = isDesktop ? true : isControlled ? expandedProp : internalExpanded;\n const handleToggle = isControlled\n ? onToggle\n : () => setInternalExpanded((previousExpanded) => !previousExpanded);\n const hasActions = action ?? actionSecondary;\n const mediaId = useId();\n const titleId = useId();\n const descId = useId();\n\n const ariaLabelledByIds = [\n media['aria-hidden'] ? undefined : mediaId,\n !title ? undefined : titleId,\n ]\n .filter(Boolean)\n .join(' ');\n\n const bannerSurface = (\n <PrimitivePrompt\n ref={containerRef}\n id={id}\n sentiment={sentiment}\n emphasis={sentiment === 'neutral' ? 'base' : 'elevated'}\n data-testid={testId}\n className={clsx(\n 'wds-critical-banner',\n {\n 'wds-critical-banner--collapsed': !resolvedExpanded,\n 'wds-critical-banner--with-two-actions': !!actionSecondary,\n },\n className,\n )}\n media={renderPromptMedia({\n media,\n sentiment,\n mediaId,\n imgClassName: 'wds-critical-banner--media-image',\n })}\n actions={\n hasActions ? (\n <div aria-hidden={!resolvedExpanded ? true : undefined} style={{ display: 'contents' }}>\n {actionSecondary && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"secondary\"\n href={actionSecondary.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={actionSecondary?.onClick}\n >\n {actionSecondary.label}\n </Button>\n )}\n {action && (\n // @ts-expect-error onClick type mismatch\n <Button\n v2\n size=\"md\"\n priority=\"primary\"\n href={action.href}\n tabIndex={resolvedExpanded ? undefined : -1}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n )}\n </div>\n ) : undefined\n }\n role=\"region\"\n aria-labelledby={ariaLabelledByIds || undefined}\n aria-describedby={description ? descId : undefined}\n >\n <div className=\"wds-critical-banner__text-wrapper\">\n {title && (\n <Body\n id={titleId}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-critical-banner__content wds-critical-banner__title\"\n >\n {title}\n </Body>\n )}\n {description && (\n <Body\n id={descId}\n className={clsx('wds-critical-banner__content', 'wds-critical-banner__description', {\n 'wds-critical-banner__description--with-title': !!title,\n })}\n >\n {description}\n </Body>\n )}\n </div>\n <ExpanderToggle\n expanded={resolvedExpanded}\n size={24}\n className=\"wds-critical-banner__toggle\"\n onToggle={handleToggle}\n />\n </PrimitivePrompt>\n );\n\n return (\n <LiveRegion\n aria-live=\"assertive\"\n announceOnChange={buildAnnouncementString({\n title,\n description,\n expanded: resolvedExpanded,\n actionLabel: action?.label,\n actionSecondaryLabel: actionSecondary?.label,\n })}\n >\n <div className=\"wds-critical-banner-overhang-query\">\n <div className=\"wds-critical-banner__entry-mask\">\n <div className=\"wds-critical-banner__entry-track\">\n <div\n className={clsx(\n 'wds-critical-banner-overhang',\n `wds-critical-banner-overhang--${sentiment}`,\n )}\n >\n {bannerSurface}\n </div>\n </div>\n </div>\n </div>\n </LiveRegion>\n );\n};\n\nexport default CriticalBanner;\n"],"names":["CriticalBanner","sentiment","title","description","media","action","actionSecondary","expanded","expandedProp","onToggle","id","className","testId","containerRef","isDesktop","useContainerSize","Breakpoint","MEDIUM","isControlled","undefined","internalExpanded","setInternalExpanded","useState","resolvedExpanded","handleToggle","previousExpanded","hasActions","mediaId","useId","titleId","descId","ariaLabelledByIds","filter","Boolean","join","bannerSurface","_jsxs","PrimitivePrompt","ref","emphasis","clsx","renderPromptMedia","imgClassName","actions","style","display","children","_jsx","Button","v2","size","priority","href","tabIndex","onClick","label","role","Body","type","Typography","BODY_LARGE_BOLD","ExpanderToggle","LiveRegion","announceOnChange","buildAnnouncementString","actionLabel","actionSecondaryLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CO,MAAMA,cAAc,GAAGA,CAAC;AAC7BC,EAAAA,SAAS,GAAG,UAAU;EACtBC,KAAK;EACLC,WAAW;EACXC,KAAK,GAAG,EAAE;EACVC,MAAM;EACNC,eAAe;AACfC,EAAAA,QAAQ,EAAEC,YAAY;EACtBC,QAAQ;EACRC,EAAE;EACFC,SAAS;AACT,EAAA,aAAa,EAAEC;AAAM,CACD,KAAI;EACxB,MAAM,CAACC,YAAY,EAAEC,SAAS,CAAC,GAAGC,gBAAgB,CAACC,UAAU,CAACC,MAAM,CAAC;EACrE,MAAMC,YAAY,GAAGV,YAAY,KAAKW,SAAS,IAAIV,QAAQ,KAAKU,SAAS;EACzE,MAAM,CAACC,gBAAgB,EAAEC,mBAAmB,CAAC,GAAGC,QAAQ,CAAC,IAAI,CAAC;EAC9D,MAAMC,gBAAgB,GAAGT,SA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;AACP,GAAY,CAAC;AAEjB;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
require('../../common/theme.js');
|
|
5
5
|
require('../../common/direction.js');
|
|
6
|
-
require('@transferwise/neptune-tokens');
|
|
7
6
|
require('../../common/propsValues/control.js');
|
|
7
|
+
require('../../common/propsValues/breakpoint.js');
|
|
8
8
|
require('../../common/propsValues/size.js');
|
|
9
9
|
var typography = require('../../common/propsValues/typography.js');
|
|
10
10
|
require('../../common/propsValues/width.js');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import '../../common/theme.mjs';
|
|
3
3
|
import '../../common/direction.mjs';
|
|
4
|
-
import '@transferwise/neptune-tokens';
|
|
5
4
|
import '../../common/propsValues/control.mjs';
|
|
5
|
+
import '../../common/propsValues/breakpoint.mjs';
|
|
6
6
|
import '../../common/propsValues/size.mjs';
|
|
7
7
|
import { Typography } from '../../common/propsValues/typography.mjs';
|
|
8
8
|
import '../../common/propsValues/width.mjs';
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
require('../../common/theme.js');
|
|
4
4
|
require('../../common/direction.js');
|
|
5
|
-
require('@transferwise/neptune-tokens');
|
|
6
5
|
require('../../common/propsValues/control.js');
|
|
6
|
+
require('../../common/propsValues/breakpoint.js');
|
|
7
7
|
require('../../common/propsValues/size.js');
|
|
8
8
|
require('../../common/propsValues/typography.js');
|
|
9
9
|
require('../../common/propsValues/width.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../common/theme.mjs';
|
|
2
2
|
import '../../common/direction.mjs';
|
|
3
|
-
import '@transferwise/neptune-tokens';
|
|
4
3
|
import '../../common/propsValues/control.mjs';
|
|
4
|
+
import '../../common/propsValues/breakpoint.mjs';
|
|
5
5
|
import '../../common/propsValues/size.mjs';
|
|
6
6
|
import '../../common/propsValues/typography.mjs';
|
|
7
7
|
import '../../common/propsValues/width.mjs';
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var reactIntl = require('react-intl');
|
|
6
6
|
require('../common/theme.js');
|
|
7
7
|
require('../common/direction.js');
|
|
8
|
-
require('@transferwise/neptune-tokens');
|
|
9
8
|
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 { IntlProvider } from 'react-intl';
|
|
2
2
|
import '../common/theme.mjs';
|
|
3
3
|
import '../common/direction.mjs';
|
|
4
|
-
import '@transferwise/neptune-tokens';
|
|
5
4
|
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/radio/Radio.js
CHANGED
|
@@ -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');
|
|
10
9
|
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');
|
package/build/radio/Radio.mjs
CHANGED
|
@@ -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';
|
|
6
5
|
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';
|
|
@@ -7,8 +7,8 @@ var React = require('react');
|
|
|
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');
|
|
11
10
|
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 { useState, useRef, createRef, useEffect } from 'react';
|
|
|
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';
|
|
7
6
|
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';
|
package/build/select/Select.js
CHANGED
|
@@ -10,8 +10,8 @@ var Chevron = require('../chevron/Chevron.js');
|
|
|
10
10
|
var documentIosClick = require('../common/domHelpers/documentIosClick.js');
|
|
11
11
|
require('../common/theme.js');
|
|
12
12
|
require('../common/direction.js');
|
|
13
|
-
require('@transferwise/neptune-tokens');
|
|
14
13
|
require('../common/propsValues/control.js');
|
|
14
|
+
require('../common/propsValues/breakpoint.js');
|
|
15
15
|
require('../common/propsValues/size.js');
|
|
16
16
|
require('../common/propsValues/typography.js');
|
|
17
17
|
require('../common/propsValues/width.js');
|
package/build/select/Select.mjs
CHANGED
|
@@ -6,8 +6,8 @@ import Chevron from '../chevron/Chevron.mjs';
|
|
|
6
6
|
import { stopPropagation } from '../common/domHelpers/documentIosClick.mjs';
|
|
7
7
|
import '../common/theme.mjs';
|
|
8
8
|
import '../common/direction.mjs';
|
|
9
|
-
import '@transferwise/neptune-tokens';
|
|
10
9
|
import '../common/propsValues/control.mjs';
|
|
10
|
+
import '../common/propsValues/breakpoint.mjs';
|
|
11
11
|
import '../common/propsValues/size.mjs';
|
|
12
12
|
import '../common/propsValues/typography.mjs';
|
|
13
13
|
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');
|
|
12
11
|
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 { cloneElement } 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';
|
|
8
7
|
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';
|