@transferwise/components 0.0.0-experimental-24a0a12 → 0.0.0-experimental-d678cd6
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 -0
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs +1 -0
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/build/actionButton/ActionButton.js +1 -0
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs +1 -0
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js +1 -0
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs +1 -0
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js +1 -0
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +1 -0
- package/build/alert/Alert.mjs.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js +1 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +1 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
- package/build/avatar/Avatar.js +1 -0
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +1 -0
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +1 -0
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs +1 -0
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +1 -0
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +1 -0
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +1 -0
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +1 -0
- package/build/badge/Badge.mjs.map +1 -1
- package/build/badge/BadgeAssets.js +2 -1
- package/build/badge/BadgeAssets.js.map +1 -1
- package/build/badge/BadgeAssets.mjs +2 -1
- package/build/badge/BadgeAssets.mjs.map +1 -1
- package/build/button/Button.js +1 -0
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +1 -0
- package/build/button/Button.mjs.map +1 -1
- package/build/button/LegacyButton.js +1 -0
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs +1 -0
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/button/classMap.js +1 -0
- package/build/button/classMap.js.map +1 -1
- package/build/button/classMap.mjs +1 -0
- package/build/button/classMap.mjs.map +1 -1
- package/build/button/legacyUtils/legacyUtils.js +1 -0
- package/build/button/legacyUtils/legacyUtils.js.map +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs +1 -0
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
- package/build/card/Card.js +1 -0
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs +1 -0
- package/build/card/Card.mjs.map +1 -1
- package/build/checkbox/Checkbox.js +1 -0
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs +1 -0
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/chevron/Chevron.js +1 -0
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chevron/Chevron.mjs +1 -0
- package/build/chevron/Chevron.mjs.map +1 -1
- package/build/chips/Chip.js +1 -0
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chip.mjs +1 -0
- package/build/chips/Chip.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +1 -0
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +1 -0
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/locale/index.js +9 -4
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs +9 -4
- package/build/common/locale/index.mjs.map +1 -1
- package/build/common/panel/Panel.js +41 -56
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +46 -61
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js +1 -0
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs +1 -0
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +1 -0
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -0
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js +1 -1
- package/build/dateInput/DateInput.mjs +1 -1
- package/build/dateLookup/DateLookup.js +1 -1
- package/build/dateLookup/DateLookup.mjs +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +1 -0
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +1 -0
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/decision/Decision.js +1 -0
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs +1 -0
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js +1 -0
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs +1 -0
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/dimmer/Dimmer.js +1 -0
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs +1 -0
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/display/Display.js +1 -0
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs +1 -0
- package/build/display/Display.mjs.map +1 -1
- package/build/drawer/Drawer.js +1 -0
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +1 -0
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +4 -3
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +4 -3
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
- package/build/field/Field.js +5 -5
- package/build/field/Field.mjs +5 -5
- package/build/flowNavigation/FlowNavigation.js +1 -0
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +1 -0
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/header/Header.js +1 -0
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -0
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/en.json +0 -2
- package/build/i18n/en.json.js +0 -2
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -2
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/index.js +0 -2
- package/build/index.js.map +1 -1
- package/build/index.mjs +0 -1
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +1 -0
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.mjs +1 -0
- package/build/info/Info.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js +1 -0
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs +1 -0
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/inputs/SearchInput.js +1 -0
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs +1 -0
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +1 -0
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs +1 -0
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/link/Link.js +1 -0
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +1 -0
- package/build/link/Link.mjs.map +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +1 -0
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +1 -0
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +1 -1
- package/build/listItem/ListItem.js +1 -0
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +1 -0
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +5 -5
- package/build/listItem/Prompt/ListItemPrompt.mjs +5 -5
- package/build/loader/Loader.js +1 -0
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs +1 -0
- package/build/loader/Loader.mjs.map +1 -1
- package/build/main.css +51 -130
- package/build/markdown/Markdown.js +1 -0
- package/build/markdown/Markdown.js.map +1 -1
- package/build/markdown/Markdown.mjs +1 -0
- package/build/markdown/Markdown.mjs.map +1 -1
- package/build/modal/Modal.js +1 -0
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +1 -0
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +28 -12
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +30 -14
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/moneyInput/currencyFormatting.js +8 -2
- package/build/moneyInput/currencyFormatting.js.map +1 -1
- package/build/moneyInput/currencyFormatting.mjs +5 -4
- package/build/moneyInput/currencyFormatting.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js +1 -0
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs +1 -0
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/nudge/Nudge.js +1 -0
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +1 -0
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/overlayHeader/OverlayHeader.js +1 -0
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.mjs +1 -0
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/popover/Popover.js +1 -0
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs +1 -0
- package/build/popover/Popover.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js +1 -0
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs +1 -0
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/progressBar/ProgressBar.js +1 -0
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs +1 -0
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/promoCard/PromoCard.js +1 -0
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCard.mjs +1 -0
- package/build/promoCard/PromoCard.mjs.map +1 -1
- package/build/promoCard/PromoCardIndicator.js +1 -0
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +1 -0
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.js +41 -8
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +41 -8
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js +1 -0
- package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +1 -0
- package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.js +1 -0
- package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs +1 -0
- package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +0 -2
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +0 -2
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/radio/Radio.js +1 -0
- package/build/radio/Radio.js.map +1 -1
- package/build/radio/Radio.mjs +1 -0
- package/build/radio/Radio.mjs.map +1 -1
- package/build/segmentedControl/SegmentedControl.js +1 -0
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.mjs +1 -0
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/select/Select.js +1 -0
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +1 -0
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js +1 -0
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs +1 -0
- package/build/select/option/Option.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js +1 -0
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +1 -0
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js +1 -0
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +1 -0
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/sticky/Sticky.js +1 -0
- package/build/sticky/Sticky.js.map +1 -1
- package/build/sticky/Sticky.mjs +1 -0
- package/build/sticky/Sticky.mjs.map +1 -1
- package/build/styles/css/neptune.css +22 -22
- package/build/styles/less/neptune-tokens.less +4 -4
- package/build/styles/main.css +51 -130
- package/build/styles/props/neptune-tokens.css +2 -2
- package/build/styles/styles/less/neptune.css +22 -22
- package/build/summary/Summary.js +1 -0
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.mjs +1 -0
- package/build/summary/Summary.mjs.map +1 -1
- package/build/table/Table.js +1 -0
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.mjs +1 -0
- package/build/table/Table.mjs.map +1 -1
- package/build/table/TableRow.js +1 -0
- package/build/table/TableRow.js.map +1 -1
- package/build/table/TableRow.mjs +1 -0
- package/build/table/TableRow.mjs.map +1 -1
- package/build/table/TableStatusText.js +1 -0
- package/build/table/TableStatusText.js.map +1 -1
- package/build/table/TableStatusText.mjs +1 -0
- package/build/table/TableStatusText.mjs.map +1 -1
- package/build/tabs/Tabs.js +1 -0
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +1 -0
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tile/Tile.js +1 -0
- package/build/tile/Tile.js.map +1 -1
- package/build/tile/Tile.mjs +1 -0
- package/build/tile/Tile.mjs.map +1 -1
- package/build/title/Title.js +1 -0
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +1 -0
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +30 -50
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +31 -51
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +5 -5
- package/build/typeahead/Typeahead.mjs +5 -5
- package/build/types/badge/BadgeAssets.d.ts.map +1 -1
- package/build/types/common/locale/index.d.ts +1 -1
- package/build/types/common/locale/index.d.ts.map +1 -1
- package/build/types/common/panel/Panel.d.ts.map +1 -1
- package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts +6 -0
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/moneyInput/currencyFormatting.d.ts +4 -3
- package/build/types/moneyInput/currencyFormatting.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +11 -2
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +3 -8
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/prompt/index.d.ts +0 -2
- package/build/types/prompt/index.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +0 -4
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/upload/Upload.js +1 -0
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +1 -0
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +1 -0
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -0
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js +1 -0
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -0
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js +1 -0
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -0
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +1 -0
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs +1 -0
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
- package/build/uploadInput/uploadButton/defaults.js +1 -0
- package/build/uploadInput/uploadButton/defaults.js.map +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs +1 -0
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +1 -0
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +1 -0
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +1 -0
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +1 -0
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +14 -16
- package/src/avatarView/AvatarView.story.tsx +1 -1
- package/src/badge/BadgeAssets.tsx +2 -0
- package/src/common/locale/index.test.ts +13 -4
- package/src/common/locale/index.ts +9 -3
- package/src/common/panel/Panel.tsx +42 -50
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +18 -0
- package/src/expressiveMoneyInput/currencySelector/CurrencySelector.test.tsx +119 -1
- package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +4 -3
- package/src/i18n/en.json +0 -2
- package/src/index.ts +2 -2
- package/src/main.css +51 -130
- package/src/main.less +1 -3
- package/src/moneyInput/MoneyInput.story.tsx +10 -1
- package/src/moneyInput/MoneyInput.test.story.tsx +141 -1
- package/src/moneyInput/MoneyInput.test.tsx +45 -0
- package/src/moneyInput/MoneyInput.tsx +27 -3
- package/src/moneyInput/currencyFormatting.ts +11 -5
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +62 -9
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +2 -9
- package/src/prompt/index.ts +0 -4
- package/src/sentimentSurface/SentimentSurface.story.tsx +17 -43
- package/src/styles/less/neptune.css +22 -22
- package/src/tooltip/Tooltip.tsx +26 -45
- package/build/prompt/CriticalBanner/CriticalBanner.js +0 -148
- package/build/prompt/CriticalBanner/CriticalBanner.js.map +0 -1
- package/build/prompt/CriticalBanner/CriticalBanner.mjs +0 -146
- package/build/prompt/CriticalBanner/CriticalBanner.mjs.map +0 -1
- package/build/prompt/CriticalBanner/helpers.js +0 -29
- package/build/prompt/CriticalBanner/helpers.js.map +0 -1
- package/build/prompt/CriticalBanner/helpers.mjs +0 -26
- package/build/prompt/CriticalBanner/helpers.mjs.map +0 -1
- package/build/prompt/common/Expander/Expander.js +0 -47
- package/build/prompt/common/Expander/Expander.js.map +0 -1
- package/build/prompt/common/Expander/Expander.messages.js +0 -17
- package/build/prompt/common/Expander/Expander.messages.js.map +0 -1
- package/build/prompt/common/Expander/Expander.messages.mjs +0 -13
- package/build/prompt/common/Expander/Expander.messages.mjs.map +0 -1
- package/build/prompt/common/Expander/Expander.mjs +0 -44
- package/build/prompt/common/Expander/Expander.mjs.map +0 -1
- package/build/prompt/helpers/promptMedia.js +0 -52
- package/build/prompt/helpers/promptMedia.js.map +0 -1
- package/build/prompt/helpers/promptMedia.mjs +0 -50
- package/build/prompt/helpers/promptMedia.mjs.map +0 -1
- package/build/styles/prompt/CriticalBanner/CriticalBanner.css +0 -59
- package/build/styles/prompt/common/Expander/Expander.css +0 -8
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts +0 -40
- package/build/types/prompt/CriticalBanner/CriticalBanner.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/helpers.d.ts +0 -18
- package/build/types/prompt/CriticalBanner/helpers.d.ts.map +0 -1
- package/build/types/prompt/CriticalBanner/index.d.ts +0 -3
- package/build/types/prompt/CriticalBanner/index.d.ts.map +0 -1
- package/build/types/prompt/common/Expander/Expander.d.ts +0 -20
- package/build/types/prompt/common/Expander/Expander.d.ts.map +0 -1
- package/build/types/prompt/common/Expander/Expander.messages.d.ts +0 -14
- package/build/types/prompt/common/Expander/Expander.messages.d.ts.map +0 -1
- package/build/types/prompt/helpers/promptMedia.d.ts +0 -22
- package/build/types/prompt/helpers/promptMedia.d.ts.map +0 -1
- package/src/prompt/CriticalBanner/CriticalBanner.accessibility.docs.mdx +0 -131
- package/src/prompt/CriticalBanner/CriticalBanner.css +0 -59
- package/src/prompt/CriticalBanner/CriticalBanner.less +0 -64
- package/src/prompt/CriticalBanner/CriticalBanner.story.tsx +0 -645
- package/src/prompt/CriticalBanner/CriticalBanner.test.story.tsx +0 -285
- package/src/prompt/CriticalBanner/CriticalBanner.tsx +0 -194
- package/src/prompt/CriticalBanner/helpers.ts +0 -39
- package/src/prompt/CriticalBanner/index.ts +0 -2
- package/src/prompt/common/Expander/Expander.css +0 -8
- package/src/prompt/common/Expander/Expander.less +0 -9
- package/src/prompt/common/Expander/Expander.messages.ts +0 -14
- package/src/prompt/common/Expander/Expander.test.tsx +0 -167
- package/src/prompt/common/Expander/Expander.tsx +0 -83
- package/src/prompt/helpers/promptMedia.tsx +0 -79
package/src/tooltip/Tooltip.tsx
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
arrow as arrowMiddleware,
|
|
3
|
+
autoUpdate,
|
|
4
|
+
flip,
|
|
5
|
+
offset,
|
|
6
|
+
useFloating,
|
|
7
|
+
} from '@floating-ui/react';
|
|
2
8
|
import { clsx } from 'clsx';
|
|
3
9
|
import {
|
|
4
10
|
AriaAttributes,
|
|
11
|
+
CSSProperties,
|
|
5
12
|
PropsWithChildren,
|
|
6
13
|
ReactElement,
|
|
7
14
|
ReactNode,
|
|
8
15
|
cloneElement,
|
|
9
|
-
useEffect,
|
|
10
16
|
useId,
|
|
11
17
|
useRef,
|
|
12
18
|
useState,
|
|
13
19
|
} from 'react';
|
|
14
|
-
import { usePopper } from 'react-popper';
|
|
15
20
|
|
|
16
21
|
import { CommonProps, Position } from '../common';
|
|
17
22
|
import {
|
|
@@ -36,48 +41,30 @@ const Tooltip = ({
|
|
|
36
41
|
className,
|
|
37
42
|
}: TooltipProps) => {
|
|
38
43
|
const [open, setOpen] = useState(false);
|
|
39
|
-
const
|
|
40
|
-
const [arrowElement, setArrowElement] = useState(null);
|
|
41
|
-
const [popperElement, setPopperElement] = useState(null);
|
|
44
|
+
const arrowRef = useRef<HTMLDivElement | null>(null);
|
|
42
45
|
|
|
43
46
|
const fallbackId = useId();
|
|
44
47
|
const tooltipId = id ?? fallbackId;
|
|
45
|
-
const modifiers = [];
|
|
46
|
-
|
|
47
|
-
modifiers.push({
|
|
48
|
-
name: 'arrow',
|
|
49
|
-
options: {
|
|
50
|
-
element: arrowElement,
|
|
51
|
-
options: {
|
|
52
|
-
padding: 8, // 8px from the edges of the popper
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
// This lets you displace a popper element from its reference element.
|
|
57
|
-
modifiers.push({ name: 'offset', options: { offset: [0, 16] } });
|
|
58
|
-
modifiers.push({
|
|
59
|
-
name: 'flip',
|
|
60
|
-
options: {
|
|
61
|
-
fallbackPlacements: Position.TOP,
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
48
|
|
|
65
|
-
const {
|
|
49
|
+
const { refs, floatingStyles, placement, middlewareData } = useFloating({
|
|
66
50
|
placement: position,
|
|
67
|
-
|
|
51
|
+
middleware: [
|
|
52
|
+
offset(16),
|
|
53
|
+
flip({ fallbackPlacements: [Position.TOP] }),
|
|
54
|
+
arrowMiddleware({ element: arrowRef, padding: 8 }),
|
|
55
|
+
],
|
|
56
|
+
whileElementsMounted: open ? autoUpdate : undefined,
|
|
57
|
+
open,
|
|
68
58
|
});
|
|
69
59
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
forceUpdate();
|
|
75
|
-
}
|
|
76
|
-
}, [open]);
|
|
60
|
+
const arrowStyle: CSSProperties = {
|
|
61
|
+
...(middlewareData.arrow?.x != null ? { left: middlewareData.arrow.x } : {}),
|
|
62
|
+
...(middlewareData.arrow?.y != null ? { top: middlewareData.arrow.y } : {}),
|
|
63
|
+
};
|
|
77
64
|
|
|
78
65
|
return (
|
|
79
66
|
<span
|
|
80
|
-
ref={
|
|
67
|
+
ref={refs.setReference}
|
|
81
68
|
className="tw-tooltip-container"
|
|
82
69
|
onMouseOver={() => setOpen(true)}
|
|
83
70
|
onFocus={() => setOpen(true)}
|
|
@@ -90,28 +77,22 @@ const Tooltip = ({
|
|
|
90
77
|
})
|
|
91
78
|
: null}
|
|
92
79
|
<div
|
|
93
|
-
|
|
94
|
-
ref={setPopperElement}
|
|
80
|
+
ref={refs.setFloating}
|
|
95
81
|
className={clsx(
|
|
96
82
|
'np-tooltip',
|
|
97
83
|
'np-panel',
|
|
98
84
|
open ? `np-panel--open np-tooltip--open` : null,
|
|
99
85
|
className,
|
|
100
86
|
)}
|
|
101
|
-
style={
|
|
102
|
-
{
|
|
87
|
+
style={floatingStyles}
|
|
88
|
+
data-popper-placement={placement}
|
|
103
89
|
aria-hidden={!open}
|
|
104
90
|
role="tooltip"
|
|
105
91
|
id={`${tooltipId}-tooltip`}
|
|
106
92
|
>
|
|
107
93
|
<div className="np-panel__content tooltip-inner">
|
|
108
94
|
{label}
|
|
109
|
-
<div
|
|
110
|
-
// @ts-expect-error
|
|
111
|
-
ref={setArrowElement}
|
|
112
|
-
className={clsx('np-panel__arrow')}
|
|
113
|
-
style={styles.arrow}
|
|
114
|
-
/>
|
|
95
|
+
<div ref={arrowRef} className={clsx('np-panel__arrow')} style={arrowStyle} />
|
|
115
96
|
</div>
|
|
116
97
|
</div>
|
|
117
98
|
</span>
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var clsx = require('clsx');
|
|
5
|
-
var Body = require('../../body/Body.js');
|
|
6
|
-
var Button_resolver = require('../../button/Button.resolver.js');
|
|
7
|
-
require('../../common/theme.js');
|
|
8
|
-
require('../../common/direction.js');
|
|
9
|
-
require('../../common/propsValues/control.js');
|
|
10
|
-
var breakpoint = require('../../common/propsValues/breakpoint.js');
|
|
11
|
-
require('../../common/propsValues/size.js');
|
|
12
|
-
var typography = require('../../common/propsValues/typography.js');
|
|
13
|
-
require('../../common/propsValues/width.js');
|
|
14
|
-
require('../../common/propsValues/type.js');
|
|
15
|
-
require('../../common/propsValues/dateMode.js');
|
|
16
|
-
require('../../common/propsValues/monthFormat.js');
|
|
17
|
-
require('../../common/propsValues/position.js');
|
|
18
|
-
require('../../common/propsValues/layouts.js');
|
|
19
|
-
require('../../common/propsValues/status.js');
|
|
20
|
-
require('../../common/propsValues/sentiment.js');
|
|
21
|
-
require('../../common/propsValues/profileType.js');
|
|
22
|
-
require('../../common/propsValues/variant.js');
|
|
23
|
-
require('../../common/propsValues/scroll.js');
|
|
24
|
-
require('../../common/propsValues/markdownNodeType.js');
|
|
25
|
-
require('../../common/fileType.js');
|
|
26
|
-
require('@transferwise/icons');
|
|
27
|
-
require('react-intl');
|
|
28
|
-
require('../../common/closeButton/CloseButton.messages.js');
|
|
29
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
30
|
-
var LiveRegion = require('../../common/liveRegion/LiveRegion.js');
|
|
31
|
-
var PrimitivePrompt = require('../PrimitivePrompt/PrimitivePrompt.js');
|
|
32
|
-
var useScreenSize = require('../../common/hooks/useScreenSize.js');
|
|
33
|
-
var promptMedia = require('../helpers/promptMedia.js');
|
|
34
|
-
var Expander = require('../common/Expander/Expander.js');
|
|
35
|
-
var helpers = require('./helpers.js');
|
|
36
|
-
|
|
37
|
-
const CriticalBanner = ({
|
|
38
|
-
sentiment = 'negative',
|
|
39
|
-
title,
|
|
40
|
-
description,
|
|
41
|
-
media = {},
|
|
42
|
-
action,
|
|
43
|
-
actionSecondary,
|
|
44
|
-
expanded = true,
|
|
45
|
-
onToggle,
|
|
46
|
-
id,
|
|
47
|
-
className,
|
|
48
|
-
'data-testid': testId,
|
|
49
|
-
'aria-label': ariaLabel
|
|
50
|
-
}) => {
|
|
51
|
-
const isMobile = !useScreenSize.useScreenSize(breakpoint.Breakpoint.EXTRA_SMALL);
|
|
52
|
-
const resolvedExpanded = !isMobile || expanded;
|
|
53
|
-
const hasActions = action ?? actionSecondary;
|
|
54
|
-
const mediaId = React.useId();
|
|
55
|
-
const titleId = React.useId();
|
|
56
|
-
const descId = React.useId();
|
|
57
|
-
const ariaLabelledByIds = [media['aria-hidden'] ? undefined : mediaId, ariaLabel || !title ? undefined : titleId].filter(Boolean).join(' ');
|
|
58
|
-
return /*#__PURE__*/jsxRuntime.jsx(LiveRegion.LiveRegion, {
|
|
59
|
-
"aria-live": "assertive",
|
|
60
|
-
announceOnChange: helpers.buildAnnouncementString({
|
|
61
|
-
title,
|
|
62
|
-
description,
|
|
63
|
-
expanded: resolvedExpanded,
|
|
64
|
-
actionLabel: action?.label,
|
|
65
|
-
actionSecondaryLabel: actionSecondary?.label
|
|
66
|
-
}),
|
|
67
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(PrimitivePrompt.PrimitivePrompt, {
|
|
68
|
-
id: id,
|
|
69
|
-
sentiment: sentiment,
|
|
70
|
-
emphasis: sentiment === 'neutral' ? 'base' : 'elevated',
|
|
71
|
-
"data-testid": testId,
|
|
72
|
-
className: clsx.clsx('wds-critical-banner', {
|
|
73
|
-
'wds-critical-banner__mobile--collapsed': !resolvedExpanded,
|
|
74
|
-
'wds-critical-banner--with-two-actions': !!actionSecondary
|
|
75
|
-
}, className),
|
|
76
|
-
media: promptMedia.renderPromptMedia({
|
|
77
|
-
media,
|
|
78
|
-
sentiment,
|
|
79
|
-
mediaId,
|
|
80
|
-
imgClassName: 'wds-critical-banner--media-image'
|
|
81
|
-
}),
|
|
82
|
-
actions: Expander.shouldShowWhenExpanded({
|
|
83
|
-
expanded: resolvedExpanded,
|
|
84
|
-
hasContent: !!hasActions
|
|
85
|
-
}) ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
86
|
-
children: [actionSecondary &&
|
|
87
|
-
/*#__PURE__*/
|
|
88
|
-
// @ts-expect-error onClick type mismatch
|
|
89
|
-
jsxRuntime.jsx(Button_resolver.default, {
|
|
90
|
-
v2: true,
|
|
91
|
-
size: "md",
|
|
92
|
-
priority: "secondary",
|
|
93
|
-
href: actionSecondary.href,
|
|
94
|
-
block: isMobile,
|
|
95
|
-
onClick: actionSecondary?.onClick,
|
|
96
|
-
children: actionSecondary.label
|
|
97
|
-
}), action &&
|
|
98
|
-
/*#__PURE__*/
|
|
99
|
-
// @ts-expect-error onClick type mismatch
|
|
100
|
-
jsxRuntime.jsx(Button_resolver.default, {
|
|
101
|
-
v2: true,
|
|
102
|
-
size: "md",
|
|
103
|
-
priority: "primary",
|
|
104
|
-
href: action.href,
|
|
105
|
-
block: isMobile,
|
|
106
|
-
onClick: action.onClick,
|
|
107
|
-
children: action.label
|
|
108
|
-
})]
|
|
109
|
-
}) : undefined,
|
|
110
|
-
role: "region",
|
|
111
|
-
...(ariaLabel ? {
|
|
112
|
-
'aria-label': ariaLabel
|
|
113
|
-
} : {
|
|
114
|
-
'aria-labelledby': ariaLabelledByIds,
|
|
115
|
-
'aria-describedby': descId
|
|
116
|
-
}),
|
|
117
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
118
|
-
className: clsx.clsx('d-flex', 'flex-column', 'justify-content-center', 'wds-critical-banner__text-wrapper'),
|
|
119
|
-
children: [title && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
120
|
-
id: titleId,
|
|
121
|
-
type: typography.Typography.BODY_LARGE_BOLD,
|
|
122
|
-
className: clsx.clsx('wds-critical-banner__content', {
|
|
123
|
-
'wds-critical-banner__title--collapsed': !resolvedExpanded
|
|
124
|
-
}),
|
|
125
|
-
children: title
|
|
126
|
-
}), Expander.shouldShowWhenExpanded({
|
|
127
|
-
expanded: resolvedExpanded,
|
|
128
|
-
hasContent: !!description,
|
|
129
|
-
alwaysShow: !title
|
|
130
|
-
}) && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
131
|
-
id: descId,
|
|
132
|
-
className: clsx.clsx('wds-critical-banner__content', {
|
|
133
|
-
'wds-critical-banner__description--collapsed': !resolvedExpanded && !title
|
|
134
|
-
}),
|
|
135
|
-
children: description
|
|
136
|
-
})]
|
|
137
|
-
}), isMobile && /*#__PURE__*/jsxRuntime.jsx(Expander.ExpanderToggle, {
|
|
138
|
-
expanded: expanded,
|
|
139
|
-
size: 24,
|
|
140
|
-
className: "wds-critical-banner__toggle",
|
|
141
|
-
onToggle: onToggle
|
|
142
|
-
})]
|
|
143
|
-
})
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
exports.CriticalBanner = CriticalBanner;
|
|
148
|
-
//# sourceMappingURL=CriticalBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalBanner.js","sources":["../../../src/prompt/CriticalBanner/CriticalBanner.tsx"],"sourcesContent":["import { AriaAttributes, ReactNode, useId } 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';\nimport { useScreenSize } from '../../common/hooks/useScreenSize';\n\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\nimport { shouldShowWhenExpanded, ExpanderToggle } from '../common/Expander/Expander';\nimport { buildAnnouncementString } from './helpers';\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.\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 expanded?: boolean;\n /** Called when the user clicks the chevron toggle. */\n onToggle?: () => void;\n /**\n * Overrides the default labelling derived from `title` and `description`.\n *\n * **NB:** When provided, the default `aria-labelledby` / `aria-describedby`\n * attributes are removed — include all necessary context in the label.\n */\n 'aria-label'?: AriaAttributes['aria-label'];\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 = true,\n onToggle,\n id,\n className,\n 'data-testid': testId,\n 'aria-label': ariaLabel,\n}: CriticalBannerProps) => {\n const isMobile = !useScreenSize(Breakpoint.EXTRA_SMALL);\n const resolvedExpanded = !isMobile || expanded;\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 ariaLabel || !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 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__mobile--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 shouldShowWhenExpanded({ expanded: resolvedExpanded, hasContent: !!hasActions }) ? (\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 {action && (\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 ) : undefined\n }\n role=\"region\"\n {...(ariaLabel\n ? { 'aria-label': ariaLabel }\n : {\n 'aria-labelledby': ariaLabelledByIds,\n 'aria-describedby': descId,\n })}\n >\n <div\n className={clsx(\n 'd-flex',\n 'flex-column',\n 'justify-content-center',\n 'wds-critical-banner__text-wrapper',\n )}\n >\n {title && (\n <Body\n id={titleId}\n type={Typography.BODY_LARGE_BOLD}\n className={clsx('wds-critical-banner__content', {\n 'wds-critical-banner__title--collapsed': !resolvedExpanded,\n })}\n >\n {title}\n </Body>\n )}\n {shouldShowWhenExpanded({\n expanded: resolvedExpanded,\n hasContent: !!description,\n alwaysShow: !title,\n }) && (\n <Body\n id={descId}\n className={clsx('wds-critical-banner__content', {\n 'wds-critical-banner__description--collapsed': !resolvedExpanded && !title,\n })}\n >\n {description}\n </Body>\n )}\n </div>\n {isMobile && (\n <ExpanderToggle\n expanded={expanded}\n size={24}\n className=\"wds-critical-banner__toggle\"\n onToggle={onToggle}\n />\n )}\n </PrimitivePrompt>\n </LiveRegion>\n );\n};\n\nexport default CriticalBanner;\n"],"names":["CriticalBanner","sentiment","title","description","media","action","actionSecondary","expanded","onToggle","id","className","testId","ariaLabel","isMobile","useScreenSize","Breakpoint","EXTRA_SMALL","resolvedExpanded","hasActions","mediaId","useId","titleId","descId","ariaLabelledByIds","undefined","filter","Boolean","join","_jsx","LiveRegion","announceOnChange","buildAnnouncementString","actionLabel","label","actionSecondaryLabel","children","_jsxs","PrimitivePrompt","emphasis","clsx","renderPromptMedia","imgClassName","actions","shouldShowWhenExpanded","hasContent","_Fragment","Button","v2","size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AAAA,SAAS,EAAC,6BAA6B;AACvCF,QAAAA,QAAQ,EAAEA;AAAS,OAAA,CAEtB;KACc;AACnB,GAAY,CAAC;AAEjB;;;;"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { useId } from 'react';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
import Body from '../../body/Body.mjs';
|
|
4
|
-
import Button from '../../button/Button.resolver.mjs';
|
|
5
|
-
import '../../common/theme.mjs';
|
|
6
|
-
import '../../common/direction.mjs';
|
|
7
|
-
import '../../common/propsValues/control.mjs';
|
|
8
|
-
import { Breakpoint } from '../../common/propsValues/breakpoint.mjs';
|
|
9
|
-
import '../../common/propsValues/size.mjs';
|
|
10
|
-
import { Typography } from '../../common/propsValues/typography.mjs';
|
|
11
|
-
import '../../common/propsValues/width.mjs';
|
|
12
|
-
import '../../common/propsValues/type.mjs';
|
|
13
|
-
import '../../common/propsValues/dateMode.mjs';
|
|
14
|
-
import '../../common/propsValues/monthFormat.mjs';
|
|
15
|
-
import '../../common/propsValues/position.mjs';
|
|
16
|
-
import '../../common/propsValues/layouts.mjs';
|
|
17
|
-
import '../../common/propsValues/status.mjs';
|
|
18
|
-
import '../../common/propsValues/sentiment.mjs';
|
|
19
|
-
import '../../common/propsValues/profileType.mjs';
|
|
20
|
-
import '../../common/propsValues/variant.mjs';
|
|
21
|
-
import '../../common/propsValues/scroll.mjs';
|
|
22
|
-
import '../../common/propsValues/markdownNodeType.mjs';
|
|
23
|
-
import '../../common/fileType.mjs';
|
|
24
|
-
import '@transferwise/icons';
|
|
25
|
-
import 'react-intl';
|
|
26
|
-
import '../../common/closeButton/CloseButton.messages.mjs';
|
|
27
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
28
|
-
import { LiveRegion } from '../../common/liveRegion/LiveRegion.mjs';
|
|
29
|
-
import { PrimitivePrompt } from '../PrimitivePrompt/PrimitivePrompt.mjs';
|
|
30
|
-
import { useScreenSize } from '../../common/hooks/useScreenSize.mjs';
|
|
31
|
-
import { renderPromptMedia } from '../helpers/promptMedia.mjs';
|
|
32
|
-
import { shouldShowWhenExpanded, ExpanderToggle } from '../common/Expander/Expander.mjs';
|
|
33
|
-
import { buildAnnouncementString } from './helpers.mjs';
|
|
34
|
-
|
|
35
|
-
const CriticalBanner = ({
|
|
36
|
-
sentiment = 'negative',
|
|
37
|
-
title,
|
|
38
|
-
description,
|
|
39
|
-
media = {},
|
|
40
|
-
action,
|
|
41
|
-
actionSecondary,
|
|
42
|
-
expanded = true,
|
|
43
|
-
onToggle,
|
|
44
|
-
id,
|
|
45
|
-
className,
|
|
46
|
-
'data-testid': testId,
|
|
47
|
-
'aria-label': ariaLabel
|
|
48
|
-
}) => {
|
|
49
|
-
const isMobile = !useScreenSize(Breakpoint.EXTRA_SMALL);
|
|
50
|
-
const resolvedExpanded = !isMobile || expanded;
|
|
51
|
-
const hasActions = action ?? actionSecondary;
|
|
52
|
-
const mediaId = useId();
|
|
53
|
-
const titleId = useId();
|
|
54
|
-
const descId = useId();
|
|
55
|
-
const ariaLabelledByIds = [media['aria-hidden'] ? undefined : mediaId, ariaLabel || !title ? undefined : titleId].filter(Boolean).join(' ');
|
|
56
|
-
return /*#__PURE__*/jsx(LiveRegion, {
|
|
57
|
-
"aria-live": "assertive",
|
|
58
|
-
announceOnChange: buildAnnouncementString({
|
|
59
|
-
title,
|
|
60
|
-
description,
|
|
61
|
-
expanded: resolvedExpanded,
|
|
62
|
-
actionLabel: action?.label,
|
|
63
|
-
actionSecondaryLabel: actionSecondary?.label
|
|
64
|
-
}),
|
|
65
|
-
children: /*#__PURE__*/jsxs(PrimitivePrompt, {
|
|
66
|
-
id: id,
|
|
67
|
-
sentiment: sentiment,
|
|
68
|
-
emphasis: sentiment === 'neutral' ? 'base' : 'elevated',
|
|
69
|
-
"data-testid": testId,
|
|
70
|
-
className: clsx('wds-critical-banner', {
|
|
71
|
-
'wds-critical-banner__mobile--collapsed': !resolvedExpanded,
|
|
72
|
-
'wds-critical-banner--with-two-actions': !!actionSecondary
|
|
73
|
-
}, className),
|
|
74
|
-
media: renderPromptMedia({
|
|
75
|
-
media,
|
|
76
|
-
sentiment,
|
|
77
|
-
mediaId,
|
|
78
|
-
imgClassName: 'wds-critical-banner--media-image'
|
|
79
|
-
}),
|
|
80
|
-
actions: shouldShowWhenExpanded({
|
|
81
|
-
expanded: resolvedExpanded,
|
|
82
|
-
hasContent: !!hasActions
|
|
83
|
-
}) ? /*#__PURE__*/jsxs(Fragment, {
|
|
84
|
-
children: [actionSecondary &&
|
|
85
|
-
/*#__PURE__*/
|
|
86
|
-
// @ts-expect-error onClick type mismatch
|
|
87
|
-
jsx(Button, {
|
|
88
|
-
v2: true,
|
|
89
|
-
size: "md",
|
|
90
|
-
priority: "secondary",
|
|
91
|
-
href: actionSecondary.href,
|
|
92
|
-
block: isMobile,
|
|
93
|
-
onClick: actionSecondary?.onClick,
|
|
94
|
-
children: actionSecondary.label
|
|
95
|
-
}), action &&
|
|
96
|
-
/*#__PURE__*/
|
|
97
|
-
// @ts-expect-error onClick type mismatch
|
|
98
|
-
jsx(Button, {
|
|
99
|
-
v2: true,
|
|
100
|
-
size: "md",
|
|
101
|
-
priority: "primary",
|
|
102
|
-
href: action.href,
|
|
103
|
-
block: isMobile,
|
|
104
|
-
onClick: action.onClick,
|
|
105
|
-
children: action.label
|
|
106
|
-
})]
|
|
107
|
-
}) : undefined,
|
|
108
|
-
role: "region",
|
|
109
|
-
...(ariaLabel ? {
|
|
110
|
-
'aria-label': ariaLabel
|
|
111
|
-
} : {
|
|
112
|
-
'aria-labelledby': ariaLabelledByIds,
|
|
113
|
-
'aria-describedby': descId
|
|
114
|
-
}),
|
|
115
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
116
|
-
className: clsx('d-flex', 'flex-column', 'justify-content-center', 'wds-critical-banner__text-wrapper'),
|
|
117
|
-
children: [title && /*#__PURE__*/jsx(Body, {
|
|
118
|
-
id: titleId,
|
|
119
|
-
type: Typography.BODY_LARGE_BOLD,
|
|
120
|
-
className: clsx('wds-critical-banner__content', {
|
|
121
|
-
'wds-critical-banner__title--collapsed': !resolvedExpanded
|
|
122
|
-
}),
|
|
123
|
-
children: title
|
|
124
|
-
}), shouldShowWhenExpanded({
|
|
125
|
-
expanded: resolvedExpanded,
|
|
126
|
-
hasContent: !!description,
|
|
127
|
-
alwaysShow: !title
|
|
128
|
-
}) && /*#__PURE__*/jsx(Body, {
|
|
129
|
-
id: descId,
|
|
130
|
-
className: clsx('wds-critical-banner__content', {
|
|
131
|
-
'wds-critical-banner__description--collapsed': !resolvedExpanded && !title
|
|
132
|
-
}),
|
|
133
|
-
children: description
|
|
134
|
-
})]
|
|
135
|
-
}), isMobile && /*#__PURE__*/jsx(ExpanderToggle, {
|
|
136
|
-
expanded: expanded,
|
|
137
|
-
size: 24,
|
|
138
|
-
className: "wds-critical-banner__toggle",
|
|
139
|
-
onToggle: onToggle
|
|
140
|
-
})]
|
|
141
|
-
})
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export { CriticalBanner };
|
|
146
|
-
//# sourceMappingURL=CriticalBanner.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalBanner.mjs","sources":["../../../src/prompt/CriticalBanner/CriticalBanner.tsx"],"sourcesContent":["import { AriaAttributes, ReactNode, useId } 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';\nimport { useScreenSize } from '../../common/hooks/useScreenSize';\n\nimport { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';\nimport { shouldShowWhenExpanded, ExpanderToggle } from '../common/Expander/Expander';\nimport { buildAnnouncementString } from './helpers';\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.\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 expanded?: boolean;\n /** Called when the user clicks the chevron toggle. */\n onToggle?: () => void;\n /**\n * Overrides the default labelling derived from `title` and `description`.\n *\n * **NB:** When provided, the default `aria-labelledby` / `aria-describedby`\n * attributes are removed — include all necessary context in the label.\n */\n 'aria-label'?: AriaAttributes['aria-label'];\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 = true,\n onToggle,\n id,\n className,\n 'data-testid': testId,\n 'aria-label': ariaLabel,\n}: CriticalBannerProps) => {\n const isMobile = !useScreenSize(Breakpoint.EXTRA_SMALL);\n const resolvedExpanded = !isMobile || expanded;\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 ariaLabel || !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 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__mobile--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 shouldShowWhenExpanded({ expanded: resolvedExpanded, hasContent: !!hasActions }) ? (\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 {action && (\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 ) : undefined\n }\n role=\"region\"\n {...(ariaLabel\n ? { 'aria-label': ariaLabel }\n : {\n 'aria-labelledby': ariaLabelledByIds,\n 'aria-describedby': descId,\n })}\n >\n <div\n className={clsx(\n 'd-flex',\n 'flex-column',\n 'justify-content-center',\n 'wds-critical-banner__text-wrapper',\n )}\n >\n {title && (\n <Body\n id={titleId}\n type={Typography.BODY_LARGE_BOLD}\n className={clsx('wds-critical-banner__content', {\n 'wds-critical-banner__title--collapsed': !resolvedExpanded,\n })}\n >\n {title}\n </Body>\n )}\n {shouldShowWhenExpanded({\n expanded: resolvedExpanded,\n hasContent: !!description,\n alwaysShow: !title,\n }) && (\n <Body\n id={descId}\n className={clsx('wds-critical-banner__content', {\n 'wds-critical-banner__description--collapsed': !resolvedExpanded && !title,\n })}\n >\n {description}\n </Body>\n )}\n </div>\n {isMobile && (\n <ExpanderToggle\n expanded={expanded}\n size={24}\n className=\"wds-critical-banner__toggle\"\n onToggle={onToggle}\n />\n )}\n </PrimitivePrompt>\n </LiveRegion>\n );\n};\n\nexport default CriticalBanner;\n"],"names":["CriticalBanner","sentiment","title","description","media","action","actionSecondary","expanded","onToggle","id","className","testId","ariaLabel","isMobile","useScreenSize","Breakpoint","EXTRA_SMALL","resolvedExpanded","hasActions","mediaId","useId","titleId","descId","ariaLabelledByIds","undefined","filter","Boolean","join","_jsx","LiveRegion","announceOnChange","buildAnnouncementString","actionLabel","label","actionSecondaryLabel","children","_jsxs","PrimitivePrompt","emphasis","clsx","renderPromptMedia","imgClassName","actions","shouldShowWhenExpanded","hasContent","_Fragment","Button","v2","size","priority","href","block","onClick","role","Body","type","Typography","BODY_LARGE_BOLD","alwaysShow","ExpanderToggle"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDO,MAAMA,cAAc,GAAGA,CAAC;AAC7BC,EAAAA,SAAS,GAAG,UAAU;EACtBC,KAAK;EACLC,WAAW;EACXC,KAAK,GAAG,EAAE;EACVC,MAAM;EACNC,eAAe;AACfC,EAAAA,QAAQ,GAAG,IAAI;EACfC,QAAQ;EACRC,EAAE;EACFC,SAAS;AACT,EAAA,aAAa,EAAEC,MAAM;AACrB,EAAA,YAAY,EAAEC;AAAS,CACH,KAAI;EACxB,MAAMC,QAAQ,GAAG,CAACC,aAAa,CAACC,UAAU,CAACC,WAAW,CAAC;AACvD,EAAA,MAAMC,gBAAgB,GAAG,CAACJ,QAAQ,IAAIN,QAAQ;AAC9C,EAAA,MAAMW,UAAU,GAAGb,MAAM,IAAIC,eAAe;AAC5C,EAAA,MAAMa,OAAO,GAAGC,KAAK,EAAE;AACvB,EAAA,MAAMC,OAAO,GAAGD,KAAK,EAAE;AACvB,EAAA,MAAME,MAAM,GAAGF,KAAK,EAAE;AAEtB,EAAA,MAAMG,iBAAiB,GAAG,CACxBnB,KAAK,CAAC,aAAa,CAAC,GAAGoB,SAAS,GAAGL,OAAO,EAC1CP,SAAS,IAAI,CAACV,KAAK,GAAGsB,SAAS,GAAGH,OAAO,CAC1C,CACEI,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC;EAEZ,oBACEC,GAAA,CAACC,UAAU,EAAA;AACT,IAAA,WAAA,EAA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B,gBAAgB,IAAI,CAACf;AACtE,WAAA,CAAE;AAAAiC,UAAAA,QAAA,EAEFhC;AAAW,SACR,CACP;AAAA,OACE,CACL,EAACU,QAAQ,iBACPe,GAAA,CAAC+B,cAAc,EAAA;AACbpD,QAAAA,QAAQ,EAAEA,QAAS;AACnByC,QAAAA,IAAI,EAAE,EAAG;AACTtC,QAAAA,SAAS,EAAC,6BAA6B;AACvCF,QAAAA,QAAQ,EAAEA;AAAS,OAAA,CAEtB;KACc;AACnB,GAAY,CAAC;AAEjB;;;;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Helper to extract string from ReactNode for announcements.
|
|
5
|
-
* Complex ReactNodes (JSX elements) return empty string.
|
|
6
|
-
*/
|
|
7
|
-
const getStringValue = node => {
|
|
8
|
-
if (typeof node === 'string' || typeof node === 'number') {
|
|
9
|
-
return String(node);
|
|
10
|
-
}
|
|
11
|
-
return '';
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Builds the announcement string from visible content only.
|
|
15
|
-
* Content visibility depends on expanded state and presence of title.
|
|
16
|
-
*/
|
|
17
|
-
const buildAnnouncementString = ({
|
|
18
|
-
title,
|
|
19
|
-
description,
|
|
20
|
-
expanded,
|
|
21
|
-
actionLabel,
|
|
22
|
-
actionSecondaryLabel
|
|
23
|
-
}) => {
|
|
24
|
-
return [title ? getStringValue(title) : undefined, description && (expanded || !title) ? getStringValue(description) : undefined, expanded && actionLabel ? getStringValue(actionLabel) : undefined, expanded && actionSecondaryLabel ? getStringValue(actionSecondaryLabel) : undefined].filter(Boolean).join('|');
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
exports.buildAnnouncementString = buildAnnouncementString;
|
|
28
|
-
exports.getStringValue = getStringValue;
|
|
29
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../src/prompt/CriticalBanner/helpers.ts"],"sourcesContent":["import { ReactNode } from 'react';\n\n/**\n * Helper to extract string from ReactNode for announcements.\n * Complex ReactNodes (JSX elements) return empty string.\n */\nexport const getStringValue = (node: ReactNode): string => {\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node);\n }\n return '';\n};\n\n/**\n * Builds the announcement string from visible content only.\n * Content visibility depends on expanded state and presence of title.\n */\nexport const buildAnnouncementString = ({\n title,\n description,\n expanded,\n actionLabel,\n actionSecondaryLabel,\n}: {\n title?: ReactNode;\n description?: ReactNode;\n expanded: boolean;\n actionLabel?: ReactNode;\n actionSecondaryLabel?: ReactNode;\n}): string => {\n return [\n title ? getStringValue(title) : undefined,\n description && (expanded || !title) ? getStringValue(description) : undefined,\n expanded && actionLabel ? getStringValue(actionLabel) : undefined,\n expanded && actionSecondaryLabel ? getStringValue(actionSecondaryLabel) : undefined,\n ]\n .filter(Boolean)\n .join('|');\n};\n"],"names":["getStringValue","node","String","buildAnnouncementString","title","description","expanded","actionLabel","actionSecondaryLabel","undefined","filter","Boolean","join"],"mappings":";;AAEA;;;AAGG;AACI,MAAMA,cAAc,GAAIC,IAAe,IAAY;EACxD,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACxD,OAAOC,MAAM,CAACD,IAAI,CAAC;AACrB,EAAA;AACA,EAAA,OAAO,EAAE;AACX;AAEA;;;AAGG;AACI,MAAME,uBAAuB,GAAGA,CAAC;EACtCC,KAAK;EACLC,WAAW;EACXC,QAAQ;EACRC,WAAW;AACXC,EAAAA;AAAoB,CAOrB,KAAY;EACX,OAAO,CACLJ,KAAK,GAAGJ,cAAc,CAACI,KAAK,CAAC,GAAGK,SAAS,EACzCJ,WAAW,KAAKC,QAAQ,IAAI,CAACF,KAAK,CAAC,GAAGJ,cAAc,CAACK,WAAW,CAAC,GAAGI,SAAS,EAC7EH,QAAQ,IAAIC,WAAW,GAAGP,cAAc,CAACO,WAAW,CAAC,GAAGE,SAAS,EACjEH,QAAQ,IAAIE,oBAAoB,GAAGR,cAAc,CAACQ,oBAAoB,CAAC,GAAGC,SAAS,CACpF,CACEC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC;AACd;;;;;"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Helper to extract string from ReactNode for announcements.
|
|
3
|
-
* Complex ReactNodes (JSX elements) return empty string.
|
|
4
|
-
*/
|
|
5
|
-
const getStringValue = node => {
|
|
6
|
-
if (typeof node === 'string' || typeof node === 'number') {
|
|
7
|
-
return String(node);
|
|
8
|
-
}
|
|
9
|
-
return '';
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Builds the announcement string from visible content only.
|
|
13
|
-
* Content visibility depends on expanded state and presence of title.
|
|
14
|
-
*/
|
|
15
|
-
const buildAnnouncementString = ({
|
|
16
|
-
title,
|
|
17
|
-
description,
|
|
18
|
-
expanded,
|
|
19
|
-
actionLabel,
|
|
20
|
-
actionSecondaryLabel
|
|
21
|
-
}) => {
|
|
22
|
-
return [title ? getStringValue(title) : undefined, description && (expanded || !title) ? getStringValue(description) : undefined, expanded && actionLabel ? getStringValue(actionLabel) : undefined, expanded && actionSecondaryLabel ? getStringValue(actionSecondaryLabel) : undefined].filter(Boolean).join('|');
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { buildAnnouncementString, getStringValue };
|
|
26
|
-
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.mjs","sources":["../../../src/prompt/CriticalBanner/helpers.ts"],"sourcesContent":["import { ReactNode } from 'react';\n\n/**\n * Helper to extract string from ReactNode for announcements.\n * Complex ReactNodes (JSX elements) return empty string.\n */\nexport const getStringValue = (node: ReactNode): string => {\n if (typeof node === 'string' || typeof node === 'number') {\n return String(node);\n }\n return '';\n};\n\n/**\n * Builds the announcement string from visible content only.\n * Content visibility depends on expanded state and presence of title.\n */\nexport const buildAnnouncementString = ({\n title,\n description,\n expanded,\n actionLabel,\n actionSecondaryLabel,\n}: {\n title?: ReactNode;\n description?: ReactNode;\n expanded: boolean;\n actionLabel?: ReactNode;\n actionSecondaryLabel?: ReactNode;\n}): string => {\n return [\n title ? getStringValue(title) : undefined,\n description && (expanded || !title) ? getStringValue(description) : undefined,\n expanded && actionLabel ? getStringValue(actionLabel) : undefined,\n expanded && actionSecondaryLabel ? getStringValue(actionSecondaryLabel) : undefined,\n ]\n .filter(Boolean)\n .join('|');\n};\n"],"names":["getStringValue","node","String","buildAnnouncementString","title","description","expanded","actionLabel","actionSecondaryLabel","undefined","filter","Boolean","join"],"mappings":"AAEA;;;AAGG;AACI,MAAMA,cAAc,GAAIC,IAAe,IAAY;EACxD,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACxD,OAAOC,MAAM,CAACD,IAAI,CAAC;AACrB,EAAA;AACA,EAAA,OAAO,EAAE;AACX;AAEA;;;AAGG;AACI,MAAME,uBAAuB,GAAGA,CAAC;EACtCC,KAAK;EACLC,WAAW;EACXC,QAAQ;EACRC,WAAW;AACXC,EAAAA;AAAoB,CAOrB,KAAY;EACX,OAAO,CACLJ,KAAK,GAAGJ,cAAc,CAACI,KAAK,CAAC,GAAGK,SAAS,EACzCJ,WAAW,KAAKC,QAAQ,IAAI,CAACF,KAAK,CAAC,GAAGJ,cAAc,CAACK,WAAW,CAAC,GAAGI,SAAS,EAC7EH,QAAQ,IAAIC,WAAW,GAAGP,cAAc,CAACO,WAAW,CAAC,GAAGE,SAAS,EACjEH,QAAQ,IAAIE,oBAAoB,GAAGR,cAAc,CAACQ,oBAAoB,CAAC,GAAGC,SAAS,CACpF,CACEC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC;AACd;;;;"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('react');
|
|
4
|
-
var clsx = require('clsx');
|
|
5
|
-
var icons = require('@transferwise/icons');
|
|
6
|
-
var IconButton = require('../../../iconButton/IconButton.js');
|
|
7
|
-
var reactIntl = require('react-intl');
|
|
8
|
-
var Expander_messages = require('./Expander.messages.js');
|
|
9
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
|
|
11
|
-
// Helper for conditional rendering based on expanded state
|
|
12
|
-
function shouldShowWhenExpanded({
|
|
13
|
-
expanded,
|
|
14
|
-
hasContent,
|
|
15
|
-
alwaysShow = false
|
|
16
|
-
}) {
|
|
17
|
-
if (alwaysShow) {
|
|
18
|
-
return hasContent;
|
|
19
|
-
}
|
|
20
|
-
return expanded && hasContent;
|
|
21
|
-
}
|
|
22
|
-
// Reusable toggle button component
|
|
23
|
-
const ExpanderToggle = ({
|
|
24
|
-
expanded,
|
|
25
|
-
onToggle,
|
|
26
|
-
size = 24,
|
|
27
|
-
className,
|
|
28
|
-
'data-testid': testId
|
|
29
|
-
}) => {
|
|
30
|
-
const intl = reactIntl.useIntl();
|
|
31
|
-
return /*#__PURE__*/jsxRuntime.jsx(IconButton.default, {
|
|
32
|
-
size: size,
|
|
33
|
-
priority: "secondary",
|
|
34
|
-
"aria-label": intl.formatMessage(expanded ? Expander_messages.default.collapseAriaLabel : Expander_messages.default.expandAriaLabel),
|
|
35
|
-
"aria-expanded": expanded,
|
|
36
|
-
className: clsx.clsx('wds-expander-toggle', {
|
|
37
|
-
'wds-expander-toggle--collapsed': !expanded
|
|
38
|
-
}, className),
|
|
39
|
-
"data-testid": testId,
|
|
40
|
-
onClick: onToggle,
|
|
41
|
-
children: /*#__PURE__*/jsxRuntime.jsx(icons.ChevronUp, {})
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.ExpanderToggle = ExpanderToggle;
|
|
46
|
-
exports.shouldShowWhenExpanded = shouldShowWhenExpanded;
|
|
47
|
-
//# sourceMappingURL=Expander.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Expander.js","sources":["../../../../src/prompt/common/Expander/Expander.tsx"],"sourcesContent":["import { useState, useCallback } from 'react';\nimport { clsx } from 'clsx';\nimport { ChevronUp } from '@transferwise/icons';\nimport IconButton from '../../../iconButton';\nimport { useIntl } from 'react-intl';\nimport messages from './Expander.messages';\n\nexport type ExpanderState = {\n expanded: boolean;\n toggle: () => void;\n setExpanded: (expanded: boolean) => void;\n};\n\n// Hook for managing expander state\nexport function useExpanderState(initialExpanded = true): ExpanderState {\n const [expanded, setExpanded] = useState(initialExpanded);\n\n const toggle = useCallback(() => {\n setExpanded((prev) => !prev);\n }, []);\n\n return {\n expanded,\n toggle,\n setExpanded,\n };\n}\n\n// Helper for conditional rendering based on expanded state\nexport function shouldShowWhenExpanded({\n expanded,\n hasContent,\n alwaysShow = false,\n}: {\n expanded: boolean;\n hasContent: boolean;\n alwaysShow?: boolean;\n}): boolean {\n if (alwaysShow) {\n return hasContent;\n }\n\n return expanded && hasContent;\n}\n\nexport type ExpanderToggleProps = {\n expanded: boolean;\n onToggle?: () => void;\n size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;\n className?: string;\n 'data-testid'?: string;\n};\n\n// Reusable toggle button component\nexport const ExpanderToggle = ({\n expanded,\n onToggle,\n size = 24,\n className,\n 'data-testid': testId,\n}: ExpanderToggleProps) => {\n const intl = useIntl();\n\n return (\n <IconButton\n size={size}\n priority=\"secondary\"\n aria-label={intl.formatMessage(\n expanded ? messages.collapseAriaLabel : messages.expandAriaLabel,\n )}\n aria-expanded={expanded}\n className={clsx(\n 'wds-expander-toggle',\n { 'wds-expander-toggle--collapsed': !expanded },\n className,\n )}\n data-testid={testId}\n onClick={onToggle}\n >\n <ChevronUp />\n </IconButton>\n );\n};\n"],"names":["shouldShowWhenExpanded","expanded","hasContent","alwaysShow","ExpanderToggle","onToggle","size","className","testId","intl","useIntl","_jsx","IconButton","priority","formatMessage","messages","collapseAriaLabel","expandAriaLabel","clsx","onClick","children","ChevronUp"],"mappings":";;;;;;;;;;AA4BA;AACM,SAAUA,sBAAsBA,CAAC;EACrCC,QAAQ;EACRC,UAAU;AACVC,EAAAA,UAAU,GAAG;AAAK,CAKnB,EAAA;AACC,EAAA,IAAIA,UAAU,EAAE;AACd,IAAA,OAAOD,UAAU;AACnB,EAAA;EAEA,OAAOD,QAAQ,IAAIC,UAAU;AAC/B;AAUA;AACO,MAAME,cAAc,GAAGA,CAAC;EAC7BH,QAAQ;EACRI,QAAQ;AACRC,EAAAA,IAAI,GAAG,EAAE;EACTC,SAAS;AACT,EAAA,aAAa,EAAEC;AAAM,CACD,KAAI;AACxB,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EAEtB,oBACEC,cAAA,CAACC,kBAAU,EAAA;AACTN,IAAAA,IAAI,EAAEA,IAAK;AACXO,IAAAA,QAAQ,EAAC,WAAW;AACpB,IAAA,YAAA,EAAYJ,IAAI,CAACK,aAAa,CAC5Bb,QAAQ,GAAGc,yBAAQ,CAACC,iBAAiB,GAAGD,yBAAQ,CAACE,eAAe,CAChE;AACF,IAAA,eAAA,EAAehB,QAAS;AACxBM,IAAAA,SAAS,EAAEW,SAAI,CACb,qBAAqB,EACrB;AAAE,MAAA,gCAAgC,EAAE,CAACjB;KAAU,EAC/CM,SAAS,CACT;AACF,IAAA,aAAA,EAAaC,MAAO;AACpBW,IAAAA,OAAO,EAAEd,QAAS;AAAAe,IAAAA,QAAA,eAElBT,cAAA,CAACU,eAAS,EAAA,EAAA;AACZ,GAAY,CAAC;AAEjB;;;;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var reactIntl = require('react-intl');
|
|
6
|
-
|
|
7
|
-
var messages = reactIntl.defineMessages({
|
|
8
|
-
expandAriaLabel: {
|
|
9
|
-
id: "neptune.Expander.expandAriaLabel"
|
|
10
|
-
},
|
|
11
|
-
collapseAriaLabel: {
|
|
12
|
-
id: "neptune.Expander.collapseAriaLabel"
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
exports.default = messages;
|
|
17
|
-
//# sourceMappingURL=Expander.messages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Expander.messages.js","sources":["../../../../src/prompt/common/Expander/Expander.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n expandAriaLabel: {\n id: 'neptune.Expander.expandAriaLabel',\n defaultMessage: 'Expand',\n description: 'Expand button for expander',\n },\n collapseAriaLabel: {\n id: 'neptune.Expander.collapseAriaLabel',\n defaultMessage: 'Collapse',\n description: 'Collapse button for expander',\n },\n});\n"],"names":["defineMessages","expandAriaLabel","id","collapseAriaLabel"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,eAAe,EAAE;IACfC,EAAE,EAAA;GAGH;AACDC,EAAAA,iBAAiB,EAAE;IACjBD,EAAE,EAAA;AAGH;AACF,CAAA,CAAC;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { defineMessages } from 'react-intl';
|
|
2
|
-
|
|
3
|
-
var messages = defineMessages({
|
|
4
|
-
expandAriaLabel: {
|
|
5
|
-
id: "neptune.Expander.expandAriaLabel"
|
|
6
|
-
},
|
|
7
|
-
collapseAriaLabel: {
|
|
8
|
-
id: "neptune.Expander.collapseAriaLabel"
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export { messages as default };
|
|
13
|
-
//# sourceMappingURL=Expander.messages.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Expander.messages.mjs","sources":["../../../../src/prompt/common/Expander/Expander.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n expandAriaLabel: {\n id: 'neptune.Expander.expandAriaLabel',\n defaultMessage: 'Expand',\n description: 'Expand button for expander',\n },\n collapseAriaLabel: {\n id: 'neptune.Expander.collapseAriaLabel',\n defaultMessage: 'Collapse',\n description: 'Collapse button for expander',\n },\n});\n"],"names":["defineMessages","expandAriaLabel","id","collapseAriaLabel"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,eAAe,EAAE;IACfC,EAAE,EAAA;GAGH;AACDC,EAAAA,iBAAiB,EAAE;IACjBD,EAAE,EAAA;AAGH;AACF,CAAA,CAAC;;;;"}
|