@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
|
@@ -253,6 +253,45 @@ describe('Money Input', () => {
|
|
|
253
253
|
await userEvent.tab();
|
|
254
254
|
expect(input).toHaveValue('1,234,567.65');
|
|
255
255
|
});
|
|
256
|
+
|
|
257
|
+
it('uses custom decimals when specified', async () => {
|
|
258
|
+
customRender({ decimals: 4 });
|
|
259
|
+
const input = getInput();
|
|
260
|
+
await userEvent.clear(input);
|
|
261
|
+
await userEvent.type(input, '1234.56789');
|
|
262
|
+
await userEvent.tab();
|
|
263
|
+
expect(input).toHaveValue('1,234.5679');
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
it('uses custom decimals of 0', async () => {
|
|
267
|
+
customRender({ decimals: 0 });
|
|
268
|
+
const input = getInput();
|
|
269
|
+
await userEvent.clear(input);
|
|
270
|
+
await userEvent.type(input, '1234.56');
|
|
271
|
+
await userEvent.tab();
|
|
272
|
+
expect(input).toHaveValue('1,235');
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('ignores custom decimals override for zero-decimal currencies like JPY', async () => {
|
|
276
|
+
const jpyCurrency: CurrencyOptionItem = {
|
|
277
|
+
value: 'JPY',
|
|
278
|
+
label: 'JPY',
|
|
279
|
+
note: 'Japanese yen',
|
|
280
|
+
currency: 'jpy',
|
|
281
|
+
};
|
|
282
|
+
customRender({
|
|
283
|
+
decimals: 4,
|
|
284
|
+
selectedCurrency: jpyCurrency,
|
|
285
|
+
currencies: [jpyCurrency],
|
|
286
|
+
amount: 1234,
|
|
287
|
+
});
|
|
288
|
+
const input = getInput();
|
|
289
|
+
expect(input).toHaveValue('1,234');
|
|
290
|
+
await userEvent.clear(input);
|
|
291
|
+
await userEvent.type(input, '5678.9999');
|
|
292
|
+
await userEvent.tab();
|
|
293
|
+
expect(input).toHaveValue('5,679');
|
|
294
|
+
});
|
|
256
295
|
});
|
|
257
296
|
|
|
258
297
|
it('calls onAmountChange with parsed and formatted value', async () => {
|
|
@@ -263,6 +302,12 @@ describe('Money Input', () => {
|
|
|
263
302
|
expect(initialProps.onAmountChange).toHaveBeenCalledWith(1000.65);
|
|
264
303
|
});
|
|
265
304
|
|
|
305
|
+
it('calls onAmountChange with value rounded to custom decimals', async () => {
|
|
306
|
+
customRender({ decimals: 4, amount: null });
|
|
307
|
+
await userEvent.type(getInput(), '12.34567');
|
|
308
|
+
expect(initialProps.onAmountChange).toHaveBeenCalledWith(12.3457);
|
|
309
|
+
});
|
|
310
|
+
|
|
266
311
|
it('calls onAmountChange when input value is empty', async () => {
|
|
267
312
|
customRender();
|
|
268
313
|
await userEvent.clear(getInput());
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import Title from '../title';
|
|
25
25
|
|
|
26
26
|
import messages from './MoneyInput.messages';
|
|
27
|
-
import { formatAmount, parseAmount } from './currencyFormatting';
|
|
27
|
+
import { formatAmount, formatNumber, getCurrencyDecimals, parseAmount } from './currencyFormatting';
|
|
28
28
|
import withId from '../withId';
|
|
29
29
|
|
|
30
30
|
export interface CurrencyOptionItem {
|
|
@@ -48,24 +48,34 @@ const formatAmountIfSet = ({
|
|
|
48
48
|
amount,
|
|
49
49
|
currency,
|
|
50
50
|
locale,
|
|
51
|
+
decimals,
|
|
51
52
|
}: {
|
|
52
53
|
amount: number | null | undefined;
|
|
53
54
|
currency: string;
|
|
54
55
|
locale: string;
|
|
56
|
+
decimals?: number;
|
|
55
57
|
}) => {
|
|
56
|
-
|
|
58
|
+
if (typeof amount !== 'number') {
|
|
59
|
+
return '';
|
|
60
|
+
}
|
|
61
|
+
if (decimals != null && getCurrencyDecimals(currency) !== 0) {
|
|
62
|
+
return formatNumber(amount, locale, decimals);
|
|
63
|
+
}
|
|
64
|
+
return formatAmount(amount, currency, locale);
|
|
57
65
|
};
|
|
58
66
|
|
|
59
67
|
const parseNumber = ({
|
|
60
68
|
amount,
|
|
61
69
|
currency,
|
|
62
70
|
locale,
|
|
71
|
+
decimals,
|
|
63
72
|
}: {
|
|
64
73
|
amount: string;
|
|
65
74
|
currency: string;
|
|
66
75
|
locale: string;
|
|
76
|
+
decimals?: number;
|
|
67
77
|
}) => {
|
|
68
|
-
return parseAmount(amount, currency, locale);
|
|
78
|
+
return parseAmount(amount, currency, locale, decimals);
|
|
69
79
|
};
|
|
70
80
|
|
|
71
81
|
const allowedInputKeys = new Set([
|
|
@@ -102,6 +112,12 @@ export interface MoneyInputProps extends WrappedComponentProps {
|
|
|
102
112
|
onCustomAction?: () => void;
|
|
103
113
|
classNames?: Record<string, string>;
|
|
104
114
|
selectProps?: Partial<SelectInputProps<CurrencyOptionItem>>;
|
|
115
|
+
/**
|
|
116
|
+
* Specify the number of decimal places to format the amount. When not specified, the number of
|
|
117
|
+
* decimals is determined by the selected currency (e.g. 2 for EUR, 0 for JPY, 3 for BHD).
|
|
118
|
+
* This override is ignored for zero-decimal currencies (e.g. JPY, KRW, HUF), which always use 0.
|
|
119
|
+
*/
|
|
120
|
+
decimals?: number;
|
|
105
121
|
}
|
|
106
122
|
|
|
107
123
|
export type MoneyInputPropsWithInputAttributes = MoneyInputProps &
|
|
@@ -133,6 +149,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
133
149
|
amount: props.amount,
|
|
134
150
|
currency: props.selectedCurrency.currency,
|
|
135
151
|
locale: props.intl.locale,
|
|
152
|
+
decimals: props.decimals,
|
|
136
153
|
}),
|
|
137
154
|
locale: props.intl.locale,
|
|
138
155
|
};
|
|
@@ -147,6 +164,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
147
164
|
amount: nextProps.amount,
|
|
148
165
|
currency: nextProps.selectedCurrency.currency,
|
|
149
166
|
locale: nextProps.intl.locale,
|
|
167
|
+
decimals: nextProps.decimals,
|
|
150
168
|
}),
|
|
151
169
|
});
|
|
152
170
|
}
|
|
@@ -174,6 +192,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
174
192
|
amount: paste,
|
|
175
193
|
currency: this.props.selectedCurrency.currency,
|
|
176
194
|
locale,
|
|
195
|
+
decimals: this.props.decimals,
|
|
177
196
|
});
|
|
178
197
|
|
|
179
198
|
if (isNumberOrNull(parsed)) {
|
|
@@ -182,6 +201,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
182
201
|
amount: parsed,
|
|
183
202
|
currency: this.props.selectedCurrency.currency,
|
|
184
203
|
locale,
|
|
204
|
+
decimals: this.props.decimals,
|
|
185
205
|
}),
|
|
186
206
|
});
|
|
187
207
|
this.props.onAmountChange?.(parsed);
|
|
@@ -201,6 +221,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
201
221
|
amount: value,
|
|
202
222
|
currency: this.props.selectedCurrency.currency,
|
|
203
223
|
locale: this.state.locale,
|
|
224
|
+
decimals: this.props.decimals,
|
|
204
225
|
});
|
|
205
226
|
if (isNumberOrNull(parsed)) {
|
|
206
227
|
this.props.onAmountChange?.(parsed);
|
|
@@ -248,6 +269,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
248
269
|
amount: previousState.formattedAmount,
|
|
249
270
|
currency: this.props.selectedCurrency.currency,
|
|
250
271
|
locale: previousState.locale,
|
|
272
|
+
decimals: this.props.decimals,
|
|
251
273
|
});
|
|
252
274
|
if (!isNumberOrNull(parsed)) {
|
|
253
275
|
return {
|
|
@@ -259,6 +281,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
259
281
|
amount: parsed,
|
|
260
282
|
currency: this.props.selectedCurrency.currency,
|
|
261
283
|
locale: previousState.locale,
|
|
284
|
+
decimals: this.props.decimals,
|
|
262
285
|
}),
|
|
263
286
|
};
|
|
264
287
|
});
|
|
@@ -340,6 +363,7 @@ class MoneyInput extends Component<MoneyInputPropsWithInputAttributes, MoneyInpu
|
|
|
340
363
|
amount: this.props.placeholder,
|
|
341
364
|
currency: this.props.selectedCurrency.currency,
|
|
342
365
|
locale: this.state.locale,
|
|
366
|
+
decimals: this.props.decimals,
|
|
343
367
|
})}
|
|
344
368
|
autoComplete="off"
|
|
345
369
|
aria-describedby={selectedCurrencyElementId}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { formatAmount } from '@transferwise/formatting';
|
|
1
|
+
import { formatAmount, formatNumber } from '@transferwise/formatting';
|
|
2
2
|
|
|
3
3
|
import { DEFAULT_LOCALE } from '../common/locale';
|
|
4
4
|
|
|
5
|
-
export { formatAmount };
|
|
5
|
+
export { formatAmount, formatNumber };
|
|
6
6
|
|
|
7
7
|
// TODO: do not duplicate this between formatting and components
|
|
8
8
|
const currencyDecimals: Record<string, number> = {
|
|
@@ -52,7 +52,7 @@ function getValidLocale(locale: string) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
function getCurrencyDecimals(currency: string) {
|
|
55
|
+
export function getCurrencyDecimals(currency: string) {
|
|
56
56
|
const upperCaseCurrency = currency.toUpperCase();
|
|
57
57
|
return currencyDecimals[upperCaseCurrency] ?? DEFAULT_CURRENCY_DECIMALS;
|
|
58
58
|
}
|
|
@@ -61,10 +61,16 @@ function getDecimalSeparator(locale: string) {
|
|
|
61
61
|
return isNumberLocaleSupported() ? (1.1).toLocaleString(locale)[1] : '.';
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export function parseAmount(
|
|
64
|
+
export function parseAmount(
|
|
65
|
+
number: string,
|
|
66
|
+
currency: string,
|
|
67
|
+
locale = DEFAULT_LOCALE,
|
|
68
|
+
decimals?: number,
|
|
69
|
+
) {
|
|
65
70
|
const validLocale = getValidLocale(locale);
|
|
66
71
|
|
|
67
|
-
const
|
|
72
|
+
const currencyDefault = getCurrencyDecimals(currency);
|
|
73
|
+
const precision = currencyDefault === 0 ? 0 : (decimals ?? currencyDefault);
|
|
68
74
|
const groupSeparator = isNumberLocaleSupported() ? (10000).toLocaleString(validLocale)[2] : ',';
|
|
69
75
|
const decimalSeparator = getDecimalSeparator(validLocale);
|
|
70
76
|
const numberWithStandardDecimalSeparator = (number || '')
|
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import { AriaAttributes, ReactNode, useId } from 'react';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
|
|
4
|
+
import StatusIcon from '../../statusIcon';
|
|
4
5
|
import Body from '../../body';
|
|
5
6
|
import Button from '../../button';
|
|
6
7
|
import { Breakpoint, Typography } from '../../common';
|
|
8
|
+
import AvatarView, { AvatarViewProps } from '../../avatarView';
|
|
9
|
+
import Image from '../../image';
|
|
7
10
|
import { ButtonProps } from '../../button/Button.types';
|
|
8
11
|
import { PrimitivePrompt, PrimitivePromptProps } from '../PrimitivePrompt';
|
|
12
|
+
import { BadgeAssetsProps } from '../../badge';
|
|
13
|
+
import { GiftBox } from '@transferwise/icons';
|
|
9
14
|
import { useScreenSize } from '../../common/hooks/useScreenSize';
|
|
10
|
-
import { renderPromptMedia, PromptMedia } from '../helpers/promptMedia';
|
|
11
15
|
|
|
12
16
|
export type ActionPromptProps = {
|
|
13
17
|
title: ReactNode;
|
|
14
18
|
description?: ReactNode;
|
|
15
19
|
/** @default {} */
|
|
16
|
-
media?:
|
|
20
|
+
media?: {
|
|
21
|
+
imgSrc?: string;
|
|
22
|
+
avatar?: Pick<AvatarViewProps, 'imgSrc' | 'profileName' | 'profileType'> & {
|
|
23
|
+
asset?: AvatarViewProps['children'];
|
|
24
|
+
badge?: Pick<BadgeAssetsProps, 'flagCode'>;
|
|
25
|
+
};
|
|
26
|
+
'aria-label'?: string;
|
|
27
|
+
'aria-hidden'?: boolean;
|
|
28
|
+
};
|
|
17
29
|
action: Pick<ButtonProps, 'onClick' | 'href' | 'target'> & {
|
|
18
30
|
label: ButtonProps['children'];
|
|
19
31
|
};
|
|
@@ -62,13 +74,54 @@ export const ActionPrompt = ({
|
|
|
62
74
|
.filter(Boolean)
|
|
63
75
|
.join(' ');
|
|
64
76
|
|
|
65
|
-
const renderMedia = () =>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
const renderMedia = () => {
|
|
78
|
+
if (media?.imgSrc) {
|
|
79
|
+
return (
|
|
80
|
+
<Image
|
|
81
|
+
id={mediaId}
|
|
82
|
+
src={media.imgSrc}
|
|
83
|
+
className="wds-action-prompt--media-image"
|
|
84
|
+
alt={media['aria-label'] ?? ''}
|
|
85
|
+
/>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
if (media?.avatar) {
|
|
89
|
+
const badge = media.avatar.badge
|
|
90
|
+
? media.avatar.badge
|
|
91
|
+
: sentiment === 'proposition'
|
|
92
|
+
? {}
|
|
93
|
+
: { status: sentiment };
|
|
94
|
+
return (
|
|
95
|
+
<AvatarView
|
|
96
|
+
{...media.avatar}
|
|
97
|
+
badge={badge}
|
|
98
|
+
aria-label={media['aria-label']}
|
|
99
|
+
aria-hidden={media['aria-hidden']}
|
|
100
|
+
id={mediaId}
|
|
101
|
+
size={48}
|
|
102
|
+
>
|
|
103
|
+
{media.avatar.asset}
|
|
104
|
+
</AvatarView>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
return sentiment === 'proposition' ? (
|
|
108
|
+
<AvatarView
|
|
109
|
+
id={mediaId}
|
|
110
|
+
size={48}
|
|
111
|
+
aria-label={media['aria-label']}
|
|
112
|
+
aria-hidden={media['aria-hidden']}
|
|
113
|
+
>
|
|
114
|
+
<GiftBox />
|
|
115
|
+
</AvatarView>
|
|
116
|
+
) : (
|
|
117
|
+
<StatusIcon
|
|
118
|
+
id={mediaId}
|
|
119
|
+
size={48}
|
|
120
|
+
sentiment={sentiment}
|
|
121
|
+
iconLabel={media['aria-hidden'] ? null : media['aria-label']}
|
|
122
|
+
/>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
72
125
|
|
|
73
126
|
return (
|
|
74
127
|
<PrimitivePrompt
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cross } from '@transferwise/icons';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
-
import SentimentSurface, {
|
|
3
|
+
import SentimentSurface, { Sentiment } from '../../sentimentSurface';
|
|
4
4
|
import IconButton from '../../iconButton';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import closeBtnMessages from '../../common/closeButton/CloseButton.messages';
|
|
@@ -8,15 +8,10 @@ import { HTMLAttributes, ReactNode } from 'react';
|
|
|
8
8
|
|
|
9
9
|
export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
|
|
10
10
|
/**
|
|
11
|
-
* The sentiment determines the colour scheme
|
|
11
|
+
* The sentiment determines the colour scheme
|
|
12
12
|
* @default success
|
|
13
13
|
*/
|
|
14
14
|
sentiment?: Sentiment;
|
|
15
|
-
/**
|
|
16
|
-
* The emphasis level affecting background and text contrast.
|
|
17
|
-
* @default 'base
|
|
18
|
-
*/
|
|
19
|
-
emphasis?: Emphasis;
|
|
20
15
|
/**
|
|
21
16
|
* Media to be displayed on the prompt (icon/image/etc).
|
|
22
17
|
*/
|
|
@@ -40,7 +35,6 @@ export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
40
35
|
* Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */
|
|
41
36
|
export const PrimitivePrompt = ({
|
|
42
37
|
sentiment = 'success',
|
|
43
|
-
emphasis = 'base',
|
|
44
38
|
media,
|
|
45
39
|
actions,
|
|
46
40
|
onDismiss,
|
|
@@ -53,7 +47,6 @@ export const PrimitivePrompt = ({
|
|
|
53
47
|
return (
|
|
54
48
|
<SentimentSurface
|
|
55
49
|
sentiment={sentiment}
|
|
56
|
-
emphasis={emphasis}
|
|
57
50
|
className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}
|
|
58
51
|
{...restProps}
|
|
59
52
|
>
|
package/src/prompt/index.ts
CHANGED
|
@@ -12,7 +12,3 @@ export { ActionPrompt } from './ActionPrompt';
|
|
|
12
12
|
// InfoPrompt
|
|
13
13
|
export type { InfoPromptProps, InfoPromptAction, InfoPromptMedia } from './InfoPrompt';
|
|
14
14
|
export { InfoPrompt } from './InfoPrompt';
|
|
15
|
-
|
|
16
|
-
// CriticalBanner
|
|
17
|
-
export type { CriticalBannerProps } from './CriticalBanner';
|
|
18
|
-
export { CriticalBanner } from './CriticalBanner';
|
|
@@ -202,26 +202,18 @@ const TokenSwatch = ({ token }: { token: string }) => (
|
|
|
202
202
|
export const EmphasisLevels: Story = {
|
|
203
203
|
render: (args) => (
|
|
204
204
|
<>
|
|
205
|
-
{
|
|
206
|
-
<div
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
{...args}
|
|
218
|
-
sentiment={sentiment}
|
|
219
|
-
emphasis="elevated"
|
|
220
|
-
>
|
|
221
|
-
<div className="p-a-2 text-capitalize">{sentiment} - Elevated emphasis</div>
|
|
222
|
-
</SentimentSurface>
|
|
223
|
-
</div>
|
|
224
|
-
))}
|
|
205
|
+
<SentimentSurface {...args} sentiment="negative" emphasis="base">
|
|
206
|
+
<div className="p-a-2">Negative - Base emphasis</div>
|
|
207
|
+
</SentimentSurface>
|
|
208
|
+
<SentimentSurface {...args} sentiment="negative" emphasis="elevated">
|
|
209
|
+
<div className="p-a-2">Negative - Elevated emphasis</div>
|
|
210
|
+
</SentimentSurface>
|
|
211
|
+
<SentimentSurface {...args} sentiment="success" emphasis="base">
|
|
212
|
+
<div className="p-a-2">Success - Base emphasis</div>
|
|
213
|
+
</SentimentSurface>
|
|
214
|
+
<SentimentSurface {...args} sentiment="success" emphasis="elevated">
|
|
215
|
+
<div className="p-a-2">Success - Elevated emphasis</div>
|
|
216
|
+
</SentimentSurface>
|
|
225
217
|
</>
|
|
226
218
|
),
|
|
227
219
|
parameters: {
|
|
@@ -377,8 +369,8 @@ export const SentimentAwareComponents: Story = {
|
|
|
377
369
|
{STATUS_NEGATIVE}
|
|
378
370
|
</div>
|
|
379
371
|
|
|
380
|
-
<Header level="group" title="Success sentiment surface
|
|
381
|
-
<SentimentSurface sentiment="success"
|
|
372
|
+
<Header level="group" title="Success sentiment surface" />
|
|
373
|
+
<SentimentSurface sentiment="success">
|
|
382
374
|
<div className="p-a-2 m-b-2 sentimentAwareComponent">
|
|
383
375
|
{BODY}
|
|
384
376
|
{AVATAR_SUCCESS}
|
|
@@ -386,26 +378,8 @@ export const SentimentAwareComponents: Story = {
|
|
|
386
378
|
</div>
|
|
387
379
|
</SentimentSurface>
|
|
388
380
|
|
|
389
|
-
<Header level="group" title="
|
|
390
|
-
<SentimentSurface sentiment="
|
|
391
|
-
<div className="p-a-2 m-b-2 sentimentAwareComponent">
|
|
392
|
-
{BODY}
|
|
393
|
-
{AVATAR_SUCCESS}
|
|
394
|
-
{STATUS_SUCCESS}
|
|
395
|
-
</div>
|
|
396
|
-
</SentimentSurface>
|
|
397
|
-
|
|
398
|
-
<Header level="group" title="Negative sentiment surface - Base emphasis" />
|
|
399
|
-
<SentimentSurface sentiment="negative" emphasis="base">
|
|
400
|
-
<div className="p-a-2 m-b-2 sentimentAwareComponent">
|
|
401
|
-
{BODY}
|
|
402
|
-
{AVATAR_NEGATIVE}
|
|
403
|
-
{STATUS_NEGATIVE}
|
|
404
|
-
</div>
|
|
405
|
-
</SentimentSurface>
|
|
406
|
-
|
|
407
|
-
<Header level="group" title="Negative sentiment surface - Elevated emphasis" />
|
|
408
|
-
<SentimentSurface sentiment="negative" emphasis="elevated">
|
|
381
|
+
<Header level="group" title="Negative sentiment surface" />
|
|
382
|
+
<SentimentSurface sentiment="negative">
|
|
409
383
|
<div className="p-a-2 m-b-2 sentimentAwareComponent">
|
|
410
384
|
{BODY}
|
|
411
385
|
{AVATAR_NEGATIVE}
|
|
@@ -453,7 +427,7 @@ function CustomCard({ children, className }: { className?: string; children: Rea
|
|
|
453
427
|
|
|
454
428
|
export const CustomComponents: Story = {
|
|
455
429
|
tags: ['!autodocs', '!dev'],
|
|
456
|
-
render: () => (
|
|
430
|
+
render: (args) => (
|
|
457
431
|
<>
|
|
458
432
|
<style>{`
|
|
459
433
|
.custom-card {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
* Generated on Tue, 31 Mar 2026 13:02:10 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
|
-
* Do not edit directly
|
|
146
|
-
* Generated on
|
|
145
|
+
* Do not edit directly, this file was auto-generated.
|
|
146
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
147
147
|
*/
|
|
148
148
|
|
|
149
149
|
.np-theme-personal {
|
|
@@ -391,8 +391,8 @@
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
|
-
* Do not edit directly
|
|
395
|
-
* Generated on
|
|
394
|
+
* Do not edit directly, this file was auto-generated.
|
|
395
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
396
396
|
*/
|
|
397
397
|
|
|
398
398
|
.np-theme-personal--forest-green {
|
|
@@ -640,8 +640,8 @@
|
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
/**
|
|
643
|
-
* Do not edit directly
|
|
644
|
-
* Generated on
|
|
643
|
+
* Do not edit directly, this file was auto-generated.
|
|
644
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
645
645
|
*/
|
|
646
646
|
|
|
647
647
|
.np-theme-personal--bright-green {
|
|
@@ -889,8 +889,8 @@
|
|
|
889
889
|
}
|
|
890
890
|
|
|
891
891
|
/**
|
|
892
|
-
* Do not edit directly
|
|
893
|
-
* Generated on
|
|
892
|
+
* Do not edit directly, this file was auto-generated.
|
|
893
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
894
894
|
*/
|
|
895
895
|
|
|
896
896
|
.np-theme-personal--dark {
|
|
@@ -1138,8 +1138,8 @@
|
|
|
1138
1138
|
}
|
|
1139
1139
|
|
|
1140
1140
|
/**
|
|
1141
|
-
* Do not edit directly
|
|
1142
|
-
* Generated on
|
|
1141
|
+
* Do not edit directly, this file was auto-generated.
|
|
1142
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
1143
1143
|
*/
|
|
1144
1144
|
|
|
1145
1145
|
.np-theme-platform {
|
|
@@ -1321,8 +1321,8 @@
|
|
|
1321
1321
|
}
|
|
1322
1322
|
|
|
1323
1323
|
/**
|
|
1324
|
-
* Do not edit directly
|
|
1325
|
-
* Generated on
|
|
1324
|
+
* Do not edit directly, this file was auto-generated.
|
|
1325
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
1326
1326
|
*/
|
|
1327
1327
|
|
|
1328
1328
|
.np-theme-platform--forest-green {
|
|
@@ -1504,8 +1504,8 @@
|
|
|
1504
1504
|
}
|
|
1505
1505
|
|
|
1506
1506
|
/**
|
|
1507
|
-
* Do not edit directly
|
|
1508
|
-
* Generated on
|
|
1507
|
+
* Do not edit directly, this file was auto-generated.
|
|
1508
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
1509
1509
|
*/
|
|
1510
1510
|
|
|
1511
1511
|
.np-theme-business {
|
|
@@ -1688,8 +1688,8 @@
|
|
|
1688
1688
|
}
|
|
1689
1689
|
|
|
1690
1690
|
/**
|
|
1691
|
-
* Do not edit directly
|
|
1692
|
-
* Generated on
|
|
1691
|
+
* Do not edit directly, this file was auto-generated.
|
|
1692
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
1693
1693
|
*/
|
|
1694
1694
|
|
|
1695
1695
|
.np-theme-business--dark {
|
|
@@ -1872,8 +1872,8 @@
|
|
|
1872
1872
|
}
|
|
1873
1873
|
|
|
1874
1874
|
/**
|
|
1875
|
-
* Do not edit directly
|
|
1876
|
-
* Generated on
|
|
1875
|
+
* Do not edit directly, this file was auto-generated.
|
|
1876
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
1877
1877
|
*/
|
|
1878
1878
|
|
|
1879
1879
|
.np-theme-business--forest-green {
|
|
@@ -2056,8 +2056,8 @@
|
|
|
2056
2056
|
}
|
|
2057
2057
|
|
|
2058
2058
|
/**
|
|
2059
|
-
* Do not edit directly
|
|
2060
|
-
* Generated on
|
|
2059
|
+
* Do not edit directly, this file was auto-generated.
|
|
2060
|
+
* Generated on Tue, 31 Mar 2026 13:02:11 GMT
|
|
2061
2061
|
*/
|
|
2062
2062
|
|
|
2063
2063
|
.np-theme-business--bright-green {
|