@transferwise/components 46.124.0 → 46.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/field/Field.js +10 -0
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +10 -0
- package/build/field/Field.mjs.map +1 -1
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -0
- package/build/index.mjs.map +1 -1
- package/build/inputs/SelectInput.js +10 -5
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs +11 -6
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/_BottomSheet.js +5 -2
- package/build/inputs/_BottomSheet.js.map +1 -1
- package/build/inputs/_BottomSheet.mjs +6 -3
- package/build/inputs/_BottomSheet.mjs.map +1 -1
- package/build/inputs/_Popover.js +2 -0
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +2 -0
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +10 -0
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +10 -0
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +32 -2
- package/build/prompt/ActionPrompt/ActionPrompt.js +123 -0
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -0
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +118 -0
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -0
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js +13 -11
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs +14 -12
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/styles/main.css +32 -2
- package/build/styles/prompt/ActionPrompt/ActionPrompt.css +21 -0
- package/build/styles/prompt/PrimitivePrompt/PrimitivePrompt.css +11 -2
- package/build/tabs/Tabs.js +14 -171
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +16 -173
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tabs/utils.js +0 -18
- package/build/tabs/utils.js.map +1 -1
- package/build/tabs/utils.mjs +1 -17
- package/build/tabs/utils.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +10 -0
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +10 -0
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/index.d.ts +2 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +26 -0
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -0
- package/build/types/prompt/ActionPrompt/index.d.ts +3 -0
- package/build/types/prompt/ActionPrompt/index.d.ts.map +1 -0
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/prompt/index.d.ts +2 -0
- package/build/types/prompt/index.d.ts.map +1 -1
- package/build/types/tabs/Tabs.d.ts +2 -24
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/tabs/utils.d.ts +0 -2
- package/build/types/tabs/utils.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/actionButton/ActionButton.story.tsx +2 -9
- package/src/avatar/Avatar.story.tsx +2 -8
- package/src/button/_stories/{Button.tests.story.tsx → Button.test.story.tsx} +5 -10
- package/src/checkbox/Checkbox.story.tsx +3 -16
- package/src/circularButton/CircularButton.story.tsx +2 -7
- package/src/common/bottomSheet/BottomSheet.story.tsx +6 -32
- package/src/common/circle/Circle.story.tsx +3 -14
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +3 -16
- package/src/dateInput/{DateInput.tests.story.tsx → DateInput.test.story.tsx} +3 -13
- package/src/dateLookup/DateLookup.story.tsx +9 -7
- package/src/header/{Header.tests.story.tsx → Header.test.story.tsx} +5 -10
- package/src/index.ts +2 -2
- package/src/info/Info.story.tsx +4 -20
- package/src/inputs/{SelectInput.spec.tsx → SelectInput.test.tsx} +78 -7
- package/src/inputs/SelectInput.tsx +21 -10
- package/src/inputs/_BottomSheet.tsx +7 -4
- package/src/inputs/_Popover.tsx +2 -0
- package/src/listItem/_stories/variants/ListItem.brightGreen.test.story.tsx +2 -7
- package/src/listItem/_stories/variants/ListItem.dark.test.story.tsx +2 -7
- package/src/listItem/_stories/variants/ListItem.forestGreen.test.story.tsx +2 -7
- package/src/listItem/_stories/variants/ListItem.rtl.test.story.tsx +2 -7
- package/src/main.css +32 -2
- package/src/main.less +1 -0
- package/src/modal/Modal.story.tsx +6 -31
- package/src/moneyInput/{MoneyInput.spec.tsx → MoneyInput.test.tsx} +26 -7
- package/src/prompt/ActionPrompt/ActionPrompt.css +21 -0
- package/src/prompt/ActionPrompt/ActionPrompt.less +23 -0
- package/src/prompt/ActionPrompt/ActionPrompt.story.tsx +184 -0
- package/src/prompt/ActionPrompt/ActionPrompt.test.tsx +256 -0
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +129 -0
- package/src/prompt/ActionPrompt/index.ts +2 -0
- package/src/prompt/InlinePrompt/{InlinePrompt.spec.tsx → InlinePrompt.test.tsx} +3 -38
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.css +11 -2
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.less +12 -2
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.test.tsx +161 -0
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +15 -11
- package/src/prompt/index.ts +3 -0
- package/src/snackbar/{Snackbar.tests.story.tsx → Snackbar.test.story.tsx} +6 -32
- package/src/{ssr.spec.tsx → ssr.test.tsx} +1 -0
- package/src/statusIcon/StatusIcon.story.tsx +5 -9
- package/src/tabs/Tabs.story.tsx +1 -45
- package/src/tabs/{Tabs.spec.tsx → Tabs.test.tsx} +0 -22
- package/src/tabs/Tabs.tsx +23 -240
- package/src/tabs/utils.test.ts +68 -0
- package/src/tabs/utils.ts +0 -20
- package/src/tooltip/Tooltip.story.tsx +2 -7
- package/src/tabs/utils.spec.ts +0 -126
- /package/src/accordion/{Accordion.spec.js → Accordion.test.js} +0 -0
- /package/src/accordion/AccordionItem/{AccordionItem.spec.js → AccordionItem.test.js} +0 -0
- /package/src/accordion/AccordionItem/__snapshots__/{AccordionItem.spec.js.snap → AccordionItem.test.js.snap} +0 -0
- /package/src/accordion/__snapshots__/{Accordion.spec.js.snap → Accordion.test.js.snap} +0 -0
- /package/src/actionButton/{ActionButton.spec.tsx → ActionButton.test.tsx} +0 -0
- /package/src/actionButton/__snapshots__/{ActionButton.spec.tsx.snap → ActionButton.test.tsx.snap} +0 -0
- /package/src/actionOption/{ActionOption.spec.tsx → ActionOption.test.tsx} +0 -0
- /package/src/alert/{Alert.tests.story.tsx → Alert.test.story.tsx} +0 -0
- /package/src/alert/{Alert.spec.tsx → Alert.test.tsx} +0 -0
- /package/src/avatar/{Avatar.spec.tsx → Avatar.test.tsx} +0 -0
- /package/src/avatarWrapper/{AvatarWrapper.spec.tsx → AvatarWrapper.test.tsx} +0 -0
- /package/src/avatarWrapper/__snapshots__/{AvatarWrapper.spec.tsx.snap → AvatarWrapper.test.tsx.snap} +0 -0
- /package/src/badge/{Badge.spec.tsx → Badge.test.tsx} +0 -0
- /package/src/body/{Body.spec.tsx → Body.test.tsx} +0 -0
- /package/src/button/{Button.spec.tsx → Button.test.tsx} +0 -0
- /package/src/button/{LegacyButton.spec.tsx → LegacyButton.test.tsx} +0 -0
- /package/src/button/_stories/{Button.brightGreen.tests.story.tsx → Button.brightGreen.test.story.tsx} +0 -0
- /package/src/button/_stories/{Button.dark.tests.story.tsx → Button.dark.test.story.tsx} +0 -0
- /package/src/button/_stories/{Button.default.tests.story.tsx → Button.default.test.story.tsx} +0 -0
- /package/src/button/_stories/{Button.forestGreen.tests.story.tsx → Button.forestGreen.test.story.tsx} +0 -0
- /package/src/button/legacyUtils/{legacyUtils.spec.tsx → legacyUtils.test.tsx} +0 -0
- /package/src/card/{Card.spec.tsx → Card.test.tsx} +0 -0
- /package/src/carousel/{Carousel.spec.tsx → Carousel.test.tsx} +0 -0
- /package/src/checkbox/{Checkbox.spec.tsx → Checkbox.test.tsx} +0 -0
- /package/src/checkbox/__snapshots__/{Checkbox.spec.tsx.snap → Checkbox.test.tsx.snap} +0 -0
- /package/src/checkboxButton/{CheckboxButton.spec.tsx → CheckboxButton.test.tsx} +0 -0
- /package/src/checkboxOption/{CheckboxOption.spec.tsx → CheckboxOption.test.tsx} +0 -0
- /package/src/chevron/{Chevron.spec.tsx → Chevron.test.tsx} +0 -0
- /package/src/chevron/__snapshots__/{Chevron.spec.tsx.snap → Chevron.test.tsx.snap} +0 -0
- /package/src/chips/{Chips.spec.tsx → Chips.test.tsx} +0 -0
- /package/src/chips/__snapshots__/{Chips.spec.tsx.snap → Chips.test.tsx.snap} +0 -0
- /package/src/circularButton/{CircularButton.tests.story.tsx → CircularButton.test.story.tsx} +0 -0
- /package/src/circularButton/{CircularButton.spec.tsx → CircularButton.test.tsx} +0 -0
- /package/src/common/DOMOperations/{DOMOperations.spec.tsx → DOMOperations.test.tsx} +0 -0
- /package/src/common/Option/{Option.spec.tsx → Option.test.tsx} +0 -0
- /package/src/common/RadioButton/{RadioButton.spec.tsx → RadioButton.test.tsx} +0 -0
- /package/src/common/RadioButton/__snapshots__/{RadioButton.spec.tsx.snap → RadioButton.test.tsx.snap} +0 -0
- /package/src/common/bottomSheet/{BottomSheet.spec.tsx → BottomSheet.test.tsx} +0 -0
- /package/src/common/bottomSheet/__snapshots__/{BottomSheet.spec.tsx.snap → BottomSheet.test.tsx.snap} +0 -0
- /package/src/common/card/{Card.spec.tsx → Card.test.tsx} +0 -0
- /package/src/common/card/__snapshots__/{Card.spec.tsx.snap → Card.test.tsx.snap} +0 -0
- /package/src/common/closeButton/{CloseButton.spec.tsx → CloseButton.test.tsx} +0 -0
- /package/src/common/closeButton/__snapshots__/{CloseButton.spec.tsx.snap → CloseButton.test.tsx.snap} +0 -0
- /package/src/common/dateUtils/getDayNames/{getDayNames.spec.js → getDayNames.test.js} +0 -0
- /package/src/common/dateUtils/getMonthNames/{getMonthNames.spec.js → getMonthNames.test.js} +0 -0
- /package/src/common/dateUtils/isDateValid/{isDateValid.spec.ts → isDateValid.test.ts} +0 -0
- /package/src/common/dateUtils/isMonthAndYearFormat/{isMonthAndYearFormat.spec.js → isMonthAndYearFormat.test.js} +0 -0
- /package/src/common/dateUtils/isWithinRange/{isWithinRange.spec.ts → isWithinRange.test.ts} +0 -0
- /package/src/common/dateUtils/moveToWithinRange/{moveToWithinRange.spec.js → moveToWithinRange.test.js} +0 -0
- /package/src/common/deviceDetection/{deviceDetection.spec.ts → deviceDetection.test.ts} +0 -0
- /package/src/common/domHelpers/{documentIosClick.spec.ts → documentIosClick.test.ts} +0 -0
- /package/src/common/flowHeader/{FlowHeader.spec.tsx → FlowHeader.test.tsx} +0 -0
- /package/src/common/flowHeader/__snapshots__/{FlowHeader.spec.tsx.snap → FlowHeader.test.tsx.snap} +0 -0
- /package/src/common/historyNavigator/{historyNavigator.spec.ts → historyNavigator.test.ts} +0 -0
- /package/src/common/hooks/useConditionalListener/{useConditionalListener.spec.js → useConditionalListener.test.js} +0 -0
- /package/src/common/hooks/useDirection/{useDirection.spec.js → useDirection.test.js} +0 -0
- /package/src/common/hooks/useHasIntersected/{useHasIntersected.spec.js → useHasIntersected.test.js} +0 -0
- /package/src/common/hooks/{useMedia.spec.ts → useMedia.test.ts} +0 -0
- /package/src/common/{initials.spec.tsx → initials.test.tsx} +0 -0
- /package/src/common/locale/{index.spec.ts → index.test.ts} +0 -0
- /package/src/common/panel/{Panel.spec.tsx → Panel.test.tsx} +0 -0
- /package/src/common/panel/__snapshots__/{Panel.spec.tsx.snap → Panel.test.tsx.snap} +0 -0
- /package/src/common/responsivePanel/{ResponsivePanel.spec.js → ResponsivePanel.test.js} +0 -0
- /package/src/common/textFormat/formatWithPattern/{formatWithPattern.spec.ts → formatWithPattern.test.ts} +0 -0
- /package/src/common/textFormat/getCountOfSymbolsInSelection/{getCountOfSymbolsInSelection.spec.ts → getCountOfSymbolsInSelection.test.ts} +0 -0
- /package/src/common/textFormat/getCursorPositionAfterKeystroke/{getCursorPositionAfterKeystroke.spec.ts → getCursorPositionAfterKeystroke.test.ts} +0 -0
- /package/src/common/textFormat/getDistanceToSymbol/{getDistanceToSymbol.spec.ts → getDistanceToSymbol.test.ts} +0 -0
- /package/src/common/textFormat/getSymbolsInPatternWithPosition/{getSymbolsInPatternWithPosition.spec.ts → getSymbolsInPatternWithPosition.test.ts} +0 -0
- /package/src/common/textFormat/unformatWithPattern/{unformatWithPattern.spec.ts → unformatWithPattern.test.ts} +0 -0
- /package/src/dateInput/{DateInput.spec.tsx → DateInput.test.tsx} +0 -0
- /package/src/dateInput/utils/convertToLocalMidnight/{convertToLocalMidnight.spec.ts → convertToLocalMidnight.test.ts} +0 -0
- /package/src/dateLookup/{DateLookup.tests.story.tsx → DateLookup.test.story.tsx} +0 -0
- /package/src/dateLookup/{DateLookup.spec.tsx → DateLookup.test.tsx} +0 -0
- /package/src/dateLookup/getFocusableTime/{getFocusable.spec.ts → getFocusable.test.ts} +0 -0
- /package/src/dateLookup/getStartOfDay/{getStartOfDay.spec.js → getStartOfDay.test.js} +0 -0
- /package/src/decision/{Decision.spec.tsx → Decision.test.tsx} +0 -0
- /package/src/dimmer/{Dimmer.spec.tsx → Dimmer.test.tsx} +0 -0
- /package/src/divider/{Divider.spec.tsx → Divider.test.tsx} +0 -0
- /package/src/drawer/{Drawer.spec.tsx → Drawer.test.tsx} +0 -0
- /package/src/emphasis/{Emphasis.spec.tsx → Emphasis.test.tsx} +0 -0
- /package/src/emphasis/{EmphasisHtmlTransformer.spec.tsx → EmphasisHtmlTransformer.test.tsx} +0 -0
- /package/src/expressiveMoneyInput/{ExpressiveMoneyInput.spec.tsx → ExpressiveMoneyInput.test.tsx} +0 -0
- /package/src/expressiveMoneyInput/amountInput/{AmountInput.spec.tsx → AmountInput.test.tsx} +0 -0
- /package/src/expressiveMoneyInput/amountInput/{utils.spec.ts → utils.test.ts} +0 -0
- /package/src/expressiveMoneyInput/currencySelector/{CurrencySelector.spec.tsx → CurrencySelector.test.tsx} +0 -0
- /package/src/field/{Field.spec.tsx → Field.test.tsx} +0 -0
- /package/src/flowNavigation/{FlowNavigation.spec.js → FlowNavigation.test.js} +0 -0
- /package/src/flowNavigation/__snapshots__/{FlowNavigation.spec.js.snap → FlowNavigation.test.js.snap} +0 -0
- /package/src/flowNavigation/animatedLabel/{AnimatedLabel.spec.js → AnimatedLabel.test.js} +0 -0
- /package/src/header/{Header.spec.tsx → Header.test.tsx} +0 -0
- /package/src/iconButton/{iconButton.spec.tsx → iconButton.test.tsx} +0 -0
- /package/src/image/{Image.spec.tsx → Image.test.tsx} +0 -0
- /package/src/info/{Info.spec.jsx → Info.test.jsx} +0 -0
- /package/src/inlineAlert/{InlineAlert.spec.tsx → InlineAlert.test.tsx} +0 -0
- /package/src/inputWithDisplayFormat/{InputWithDisplayFormat.spec.js → InputWithDisplayFormat.test.js} +0 -0
- /package/src/inputs/{InputGroup.spec.tsx → InputGroup.test.tsx} +0 -0
- /package/src/inputs/{SearchInput.spec.tsx → SearchInput.test.tsx} +0 -0
- /package/src/instructionsList/{InstructionsList.spec.tsx → InstructionsList.test.tsx} +0 -0
- /package/src/label/{Label.spec.tsx → Label.test.tsx} +0 -0
- /package/src/legacylistItem/{LegacyListItem.tests.story.tsx → LegacyListItem.test.story.tsx} +0 -0
- /package/src/legacylistItem/{LegacyListItem.spec.tsx → LegacyListItem.test.tsx} +0 -0
- /package/src/link/{Link.spec.tsx → Link.test.tsx} +0 -0
- /package/src/list/{List.spec.tsx → List.test.tsx} +0 -0
- /package/src/listItem/AdditionalInfo/{ListItemAdditionalInfo.spec.tsx → ListItemAdditionalInfo.test.tsx} +0 -0
- /package/src/listItem/AvatarLayout/{ListItemAvatarLayout.spec.tsx → ListItemAvatarLayout.test.tsx} +0 -0
- /package/src/listItem/AvatarView/{ListItemAvatarView.spec.tsx → ListItemAvatarView.test.tsx} +0 -0
- /package/src/listItem/Button/{ListItemButton.spec.tsx → ListItemButton.test.tsx} +0 -0
- /package/src/listItem/Checkbox/{ListItemCheckbox.spec.tsx → ListItemCheckbox.test.tsx} +0 -0
- /package/src/listItem/IconButton/{ListItemIconButton.spec.tsx → ListItemIconButton.test.tsx} +0 -0
- /package/src/listItem/Image/{ListItemImage.spec.tsx → ListItemImage.test.tsx} +0 -0
- /package/src/listItem/{ListItem.spec.tsx → ListItem.test.tsx} +0 -0
- /package/src/listItem/Navigation/{ListItemNavigation.spec.tsx → ListItemNavigation.test.tsx} +0 -0
- /package/src/listItem/Prompt/{ListItemPrompt.spec.tsx → ListItemPrompt.test.tsx} +0 -0
- /package/src/listItem/Radio/{ListItemRadio.spec.tsx → ListItemRadio.test.tsx} +0 -0
- /package/src/listItem/Switch/{ListItemSwitch.spec.tsx → ListItemSwitch.test.tsx} +0 -0
- /package/src/loader/{Loader.spec.tsx → Loader.test.tsx} +0 -0
- /package/src/logo/{Logo.spec.tsx → Logo.test.tsx} +0 -0
- /package/src/logo/__snapshots__/{Logo.spec.tsx.snap → Logo.test.tsx.snap} +0 -0
- /package/src/markdown/{Markdown.spec.tsx → Markdown.test.tsx} +0 -0
- /package/src/modal/{Modal.spec.tsx → Modal.test.tsx} +0 -0
- /package/src/money/{Money.spec.tsx → Money.test.tsx} +0 -0
- /package/src/moneyInput/{currencyFormatting.spec.ts → currencyFormatting.test.ts} +0 -0
- /package/src/navigationOption/{NavigationOption.spec.tsx → NavigationOption.test.tsx} +0 -0
- /package/src/navigationOptionsList/{NavigationOptionsList.spec.tsx → NavigationOptionsList.test.tsx} +0 -0
- /package/src/nudge/{Nudge.spec.tsx → Nudge.test.tsx} +0 -0
- /package/src/overlayHeader/{OverlayHeader.spec.tsx → OverlayHeader.test.tsx} +0 -0
- /package/src/overlayHeader/__snapshots__/{OverlayHeader.spec.tsx.snap → OverlayHeader.test.tsx.snap} +0 -0
- /package/src/phoneNumberInput/{PhoneNumberInput.spec.tsx → PhoneNumberInput.test.tsx} +0 -0
- /package/src/phoneNumberInput/utils/cleanNumber/{cleanNumber.spec.ts → cleanNumber.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/excludeCountries/{excludeCountries.spec.ts → excludeCountries.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/explodeNumberModel/{explodeNumberModel.spec.ts → explodeNumberModel.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/findCountryByCode/{findCountryByCode.spec.ts → findCountryByCode.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/findCountryByPrefix/{findCountryByPrefix.spec.ts → findCountryByPrefix.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/groupCountriesByPrefix/{groupCountriesByPrefix.spec.ts → groupCountriesByPrefix.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/isStringNumeric/{isStringNumeric.spec.ts → isStringNumeric.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/isValidPhoneNumber/{isValidPhoneNumber.spec.ts → isValidPhoneNumber.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/longestMatchingPrefix/{longestMatchingPrefix.spec.ts → longestMatchingPrefix.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/setDefaultPrefix/{setDefaultPrefix.spec.ts → setDefaultPrefix.test.ts} +0 -0
- /package/src/phoneNumberInput/utils/sortArrayByProperty/{sortArrayByProperty.spec.ts → sortArrayByProperty.test.ts} +0 -0
- /package/src/popover/{Popover.spec.tsx → Popover.test.tsx} +0 -0
- /package/src/popover/__snapshots__/{Popover.spec.tsx.snap → Popover.test.tsx.snap} +0 -0
- /package/src/primitives/PrimitiveAnchor/stories/{PrimitiveAnchor.tests.story.tsx → PrimitiveAnchor.test.story.tsx} +0 -0
- /package/src/primitives/PrimitiveAnchor/test/{PrimitiveAnchor.spec.tsx → PrimitiveAnchor.test.tsx} +0 -0
- /package/src/primitives/PrimitiveButton/stories/{PrimitiveButton.tests.story.tsx → PrimitiveButton.test.story.tsx} +0 -0
- /package/src/primitives/PrimitiveButton/test/{PrimitiveButton.spec.tsx → PrimitiveButton.test.tsx} +0 -0
- /package/src/processIndicator/{ProcessIndicator.rtl.spec.tsx → ProcessIndicator.rtl.test.tsx} +0 -0
- /package/src/progress/{Progress.spec.tsx → Progress.test.tsx} +0 -0
- /package/src/progressBar/{ProgressBar.spec.tsx → ProgressBar.test.tsx} +0 -0
- /package/src/promoCard/{PromoCard.spec.tsx → PromoCard.test.tsx} +0 -0
- /package/src/promoCard/{PromoCardContext.spec.tsx → PromoCardContext.test.tsx} +0 -0
- /package/src/promoCard/{PromoCardGroup.spec.tsx → PromoCardGroup.test.tsx} +0 -0
- /package/src/promoCard/__snapshots__/{PromoCard.spec.tsx.snap → PromoCard.test.tsx.snap} +0 -0
- /package/src/promoCard/__snapshots__/{PromoCardGroup.spec.tsx.snap → PromoCardGroup.test.tsx.snap} +0 -0
- /package/src/provider/{Provider.spec.tsx → Provider.test.tsx} +0 -0
- /package/src/provider/direction/{DirectionProvider.spec.tsx → DirectionProvider.test.tsx} +0 -0
- /package/src/provider/language/{LanguageProvider.spec.tsx → LanguageProvider.test.tsx} +0 -0
- /package/src/radio/{Radio.spec.tsx → Radio.test.tsx} +0 -0
- /package/src/radioGroup/{RadioGroup.spec.tsx → RadioGroup.test.tsx} +0 -0
- /package/src/radioOption/{RadioOption.spec.tsx → RadioOption.test.tsx} +0 -0
- /package/src/section/{Section.spec.tsx → Section.test.tsx} +0 -0
- /package/src/segmentedControl/{SegmentedControl.spec.tsx → SegmentedControl.test.tsx} +0 -0
- /package/src/select/{Select.rtl.spec.tsx → Select.rtl.test.tsx} +0 -0
- /package/src/select/{Select.spec.tsx → Select.test.tsx} +0 -0
- /package/src/select/option/{Option.spec.tsx → Option.test.tsx} +0 -0
- /package/src/select/searchBox/{SearchBox.spec.tsx → SearchBox.test.tsx} +0 -0
- /package/src/sentimentSurface/{SentimentSurface.tests.story.tsx → SentimentSurface.test.story.tsx} +0 -0
- /package/src/sentimentSurface/{SentimentSurface.spec.tsx → SentimentSurface.test.tsx} +0 -0
- /package/src/slidingPanel/{SlidingPanel.spec.tsx → SlidingPanel.test.tsx} +0 -0
- /package/src/statusIcon/{StatusIcon.spec.tsx → StatusIcon.test.tsx} +0 -0
- /package/src/stepper/{Stepper.tests.story.tsx → Stepper.test.story.tsx} +0 -0
- /package/src/stepper/{Stepper.spec.tsx → Stepper.test.tsx} +0 -0
- /package/src/stepper/{deviceDetection.spec.ts → deviceDetection.test.ts} +0 -0
- /package/src/sticky/{Sticky.spec.tsx → Sticky.test.tsx} +0 -0
- /package/src/summary/{Summary.tests.story.tsx → Summary.test.story.tsx} +0 -0
- /package/src/summary/{Summary.spec.tsx → Summary.test.tsx} +0 -0
- /package/src/switch/{Switch.spec.tsx → Switch.test.tsx} +0 -0
- /package/src/switchOption/{SwitchOption.spec.tsx → SwitchOption.test.tsx} +0 -0
- /package/src/table/{Table.spec.tsx → Table.test.tsx} +0 -0
- /package/src/table/{TableCell.spec.tsx → TableCell.test.tsx} +0 -0
- /package/src/table/{TableHeader.spec.tsx → TableHeader.test.tsx} +0 -0
- /package/src/table/{TableRow.spec.tsx → TableRow.test.tsx} +0 -0
- /package/src/table/{TableStatusText.spec.tsx → TableStatusText.test.tsx} +0 -0
- /package/src/textareaWithDisplayFormat/{TextareaWithDisplayFormat.spec.js → TextareaWithDisplayFormat.test.js} +0 -0
- /package/src/tile/{Tile.spec.tsx → Tile.test.tsx} +0 -0
- /package/src/tile/__snapshots__/{Tile.spec.tsx.snap → Tile.test.tsx.snap} +0 -0
- /package/src/title/{Title.spec.tsx → Title.test.tsx} +0 -0
- /package/src/tooltip/{Tooltip.spec.tsx → Tooltip.test.tsx} +0 -0
- /package/src/tooltip/__snapshots__/{Tooltip.spec.tsx.snap → Tooltip.test.tsx.snap} +0 -0
- /package/src/typeahead/{Typeahead.spec.tsx → Typeahead.test.tsx} +0 -0
- /package/src/typeahead/typeaheadInput/{TypeaheadInput.spec.tsx → TypeaheadInput.test.tsx} +0 -0
- /package/src/typeahead/util/{highlight.spec.tsx → highlight.test.tsx} +0 -0
- /package/src/upload/{Upload.tests.story.tsx → Upload.test.story.tsx} +0 -0
- /package/src/upload/{Upload.spec.tsx → Upload.test.tsx} +0 -0
- /package/src/upload/steps/completeStep/{completeStep.spec.tsx → completeStep.test.tsx} +0 -0
- /package/src/upload/steps/processingStep/{processingStep.spec.tsx → processingStep.test.tsx} +0 -0
- /package/src/upload/steps/uploadImageStep/{uploadImageStep.spec.tsx → uploadImageStep.test.tsx} +0 -0
- /package/src/upload/utils/asyncFileRead/{asyncFileRead.spec.ts → asyncFileRead.test.ts} +0 -0
- /package/src/upload/utils/getFileType/{getFileType.spec.ts → getFileType.test.ts} +0 -0
- /package/src/upload/utils/isSizeValid/{isSizeValid.spec.ts → isSizeValid.test.ts} +0 -0
- /package/src/upload/utils/isTypeValid/{isTypeValid.spec.ts → isTypeValid.test.ts} +0 -0
- /package/src/upload/utils/postData/{postData.spec.ts → postData.test.ts} +0 -0
- /package/src/uploadInput/{UploadInput.tests.story.tsx → UploadInput.test.story.tsx} +0 -0
- /package/src/uploadInput/{UploadInput.spec.tsx → UploadInput.test.tsx} +0 -0
- /package/src/uploadInput/uploadButton/{UploadButton.spec.tsx → UploadButton.test.tsx} +0 -0
- /package/src/uploadInput/uploadButton/{getAllowedFileTypes.spec.ts → getAllowedFileTypes.test.ts} +0 -0
- /package/src/uploadInput/uploadItem/{UploadItem.spec.tsx → UploadItem.test.tsx} +0 -0
- /package/src/utilities/deprecatedProperty/{deprecatedProperty.spec.ts → deprecatedProperty.test.ts} +0 -0
- /package/src/withDisplayFormat/{WithDisplayFormat.spec.js → WithDisplayFormat.test.js} +0 -0
- /package/src/withId/{withId.spec.tsx → withId.test.tsx} +0 -0
- /package/src/withNextPortal/{withNextPortal.spec.tsx → withNextPortal.test.tsx} +0 -0
|
@@ -50,21 +50,25 @@ export const PrimitivePrompt = ({
|
|
|
50
50
|
className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}
|
|
51
51
|
{...restProps}
|
|
52
52
|
>
|
|
53
|
-
<div
|
|
53
|
+
<div
|
|
54
|
+
className={clsx('wds-prompt__content-wrapper', {
|
|
55
|
+
'wds-prompt__content-wrapper--with-dismiss': !!onDismiss,
|
|
56
|
+
})}
|
|
57
|
+
>
|
|
54
58
|
<div className={clsx('wds-prompt__media-wrapper')}>{media}</div>
|
|
55
59
|
{children}
|
|
60
|
+
{onDismiss && (
|
|
61
|
+
<IconButton
|
|
62
|
+
size={24}
|
|
63
|
+
priority="secondary"
|
|
64
|
+
aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}
|
|
65
|
+
onClick={onDismiss}
|
|
66
|
+
>
|
|
67
|
+
<Cross />
|
|
68
|
+
</IconButton>
|
|
69
|
+
)}
|
|
56
70
|
{actions && <div className="wds-prompt__actions-wrapper">{actions}</div>}
|
|
57
71
|
</div>
|
|
58
|
-
{onDismiss && (
|
|
59
|
-
<IconButton
|
|
60
|
-
size={24}
|
|
61
|
-
priority="secondary"
|
|
62
|
-
aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}
|
|
63
|
-
onClick={onDismiss}
|
|
64
|
-
>
|
|
65
|
-
<Cross />
|
|
66
|
-
</IconButton>
|
|
67
|
-
)}
|
|
68
72
|
</SentimentSurface>
|
|
69
73
|
);
|
|
70
74
|
};
|
package/src/prompt/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import SnackbarProvider from './SnackbarProvider';
|
|
|
7
7
|
import Button from '../button';
|
|
8
8
|
import CheckboxOption from '../checkboxOption';
|
|
9
9
|
import { wait } from '../test-utils/wait';
|
|
10
|
-
import {
|
|
10
|
+
import { withVariantConfig } from '../../.storybook/helpers';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
title: 'Dialogs/Snackbar/Tests',
|
|
@@ -115,12 +115,7 @@ export const Mobile = {
|
|
|
115
115
|
</div>
|
|
116
116
|
) as React.ReactNode,
|
|
117
117
|
},
|
|
118
|
-
|
|
119
|
-
variants: ['mobile'],
|
|
120
|
-
chromatic: {
|
|
121
|
-
mobile: allModes.largeMobile,
|
|
122
|
-
},
|
|
123
|
-
},
|
|
118
|
+
...withVariantConfig(['mobile'], Default),
|
|
124
119
|
};
|
|
125
120
|
|
|
126
121
|
const switchToDarkMode = async (context: { canvasElement: HTMLElement }) => {
|
|
@@ -152,12 +147,7 @@ export const DarkMode = {
|
|
|
152
147
|
) as React.ReactNode,
|
|
153
148
|
},
|
|
154
149
|
play: switchToDarkMode,
|
|
155
|
-
|
|
156
|
-
variants: ['dark'],
|
|
157
|
-
chromatic: {
|
|
158
|
-
dark: allModes.dark,
|
|
159
|
-
},
|
|
160
|
-
},
|
|
150
|
+
...withVariantConfig(['dark'], Default),
|
|
161
151
|
};
|
|
162
152
|
|
|
163
153
|
const switchToRTL = async (context: { canvasElement: HTMLElement }) => {
|
|
@@ -209,12 +199,7 @@ export const RTL = {
|
|
|
209
199
|
) as React.ReactNode,
|
|
210
200
|
},
|
|
211
201
|
play: switchToRTL,
|
|
212
|
-
|
|
213
|
-
variants: ['rtl'],
|
|
214
|
-
chromatic: {
|
|
215
|
-
rtl: allModes.rtl,
|
|
216
|
-
},
|
|
217
|
-
},
|
|
202
|
+
...withVariantConfig(['rtl'], Default),
|
|
218
203
|
};
|
|
219
204
|
|
|
220
205
|
export const RTLMobile = {
|
|
@@ -223,13 +208,7 @@ export const RTLMobile = {
|
|
|
223
208
|
...RTL.args,
|
|
224
209
|
},
|
|
225
210
|
play: switchToRTL,
|
|
226
|
-
|
|
227
|
-
variants: ['rtl', 'mobile'],
|
|
228
|
-
chromatic: {
|
|
229
|
-
rtl: allModes.rtl,
|
|
230
|
-
mobile: allModes.largeMobile,
|
|
231
|
-
},
|
|
232
|
-
},
|
|
211
|
+
...withVariantConfig(['rtl', 'mobile'], Default),
|
|
233
212
|
};
|
|
234
213
|
|
|
235
214
|
export const Zoom400 = {
|
|
@@ -254,12 +233,7 @@ export const Zoom400 = {
|
|
|
254
233
|
</div>
|
|
255
234
|
),
|
|
256
235
|
},
|
|
257
|
-
|
|
258
|
-
variants: ['400%'],
|
|
259
|
-
chromatic: {
|
|
260
|
-
zoom400: allModes.zoom400,
|
|
261
|
-
},
|
|
262
|
-
},
|
|
236
|
+
...withVariantConfig(['400%'], Default),
|
|
263
237
|
};
|
|
264
238
|
|
|
265
239
|
export const MultipleClicks = {
|
|
@@ -181,6 +181,7 @@ describe('Server side rendering', () => {
|
|
|
181
181
|
|
|
182
182
|
// Override props in case of name collision.
|
|
183
183
|
const overrideProps: Partial<Record<keyof ExposedLibraryItemsType, Record<string, unknown>>> = {
|
|
184
|
+
ActionPrompt: { action: { label: 'Action', onClick: jest.fn(), href: '#' } },
|
|
184
185
|
Alert: { children: undefined, message: 'Fluffy kittens', size: undefined },
|
|
185
186
|
Card: { isExpanded: true },
|
|
186
187
|
CheckboxButton: { children: undefined, onChange: jest.fn() },
|
|
@@ -3,7 +3,7 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
|
3
3
|
import { Sentiment, Size, Status } from '../common';
|
|
4
4
|
|
|
5
5
|
import StatusIcon, { StatusIconSentiment } from './StatusIcon';
|
|
6
|
-
import {
|
|
6
|
+
import { withVariantConfig } from '../../.storybook/helpers';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
component: StatusIcon,
|
|
@@ -30,15 +30,11 @@ export const Presentational: Story = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export const Variants: Story = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
chromatic: {
|
|
37
|
-
dark: allModes.dark,
|
|
38
|
-
brightGreen: allModes.brightGreen,
|
|
39
|
-
forestGreen: allModes.forestGreen,
|
|
33
|
+
...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green'], {
|
|
34
|
+
parameters: {
|
|
35
|
+
padding: '0',
|
|
40
36
|
},
|
|
41
|
-
},
|
|
37
|
+
}),
|
|
42
38
|
render: () => (
|
|
43
39
|
<span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
|
|
44
40
|
{[
|
package/src/tabs/Tabs.story.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Width } from '../common';
|
|
4
4
|
|
|
5
5
|
import Tabs from './Tabs';
|
|
6
6
|
|
|
@@ -15,7 +15,6 @@ export const Basic = () => {
|
|
|
15
15
|
<Tabs
|
|
16
16
|
className="tabs-custom-class"
|
|
17
17
|
name="tabs-docs"
|
|
18
|
-
transitionSpacing={Size.MEDIUM}
|
|
19
18
|
tabs={[
|
|
20
19
|
{
|
|
21
20
|
title: 'Title 1',
|
|
@@ -44,7 +43,6 @@ export const Basic = () => {
|
|
|
44
43
|
},
|
|
45
44
|
]}
|
|
46
45
|
selected={selected}
|
|
47
|
-
animatePanelsOnClick
|
|
48
46
|
onTabSelect={(index) => setSelected(index)}
|
|
49
47
|
/>
|
|
50
48
|
);
|
|
@@ -56,7 +54,6 @@ export const AutoTabHeaderWidth = () => {
|
|
|
56
54
|
<Tabs
|
|
57
55
|
className="tabs-custom-class"
|
|
58
56
|
name="tabs-docs"
|
|
59
|
-
transitionSpacing={Size.MEDIUM}
|
|
60
57
|
headerWidth={Width.AUTO}
|
|
61
58
|
tabs={[
|
|
62
59
|
{
|
|
@@ -92,44 +89,3 @@ export const AutoTabHeaderWidth = () => {
|
|
|
92
89
|
/>
|
|
93
90
|
);
|
|
94
91
|
};
|
|
95
|
-
|
|
96
|
-
export const NoPanelAnimation = () => {
|
|
97
|
-
const [selected, setSelected] = useState(0);
|
|
98
|
-
return (
|
|
99
|
-
<Tabs
|
|
100
|
-
animatePanelsOnClick={false}
|
|
101
|
-
className="tabs-custom-class"
|
|
102
|
-
name="tabs-docs"
|
|
103
|
-
transitionSpacing={Size.MEDIUM}
|
|
104
|
-
tabs={[
|
|
105
|
-
{
|
|
106
|
-
title: 'Title 1',
|
|
107
|
-
disabled: false,
|
|
108
|
-
content: (
|
|
109
|
-
<div className="p-a-2">
|
|
110
|
-
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Cum totam debitis similique
|
|
111
|
-
</div>
|
|
112
|
-
),
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
title: 'Title 2',
|
|
116
|
-
disabled: false,
|
|
117
|
-
content: (
|
|
118
|
-
<div className="p-a-2">Lorem ipsum dolor, sit amet consectetur adipisicing elit.</div>
|
|
119
|
-
),
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
title: 'Title 3',
|
|
123
|
-
disabled: true,
|
|
124
|
-
content: (
|
|
125
|
-
<div className="p-a-2">
|
|
126
|
-
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Cum totam debitis similique
|
|
127
|
-
</div>
|
|
128
|
-
),
|
|
129
|
-
},
|
|
130
|
-
]}
|
|
131
|
-
selected={selected}
|
|
132
|
-
onTabSelect={(index) => setSelected(index)}
|
|
133
|
-
/>
|
|
134
|
-
);
|
|
135
|
-
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Globals } from '@react-spring/web';
|
|
2
1
|
import { render, screen, userEvent } from '../test-utils';
|
|
3
2
|
import Tabs, { TabsProps } from './Tabs';
|
|
4
3
|
|
|
@@ -18,21 +17,13 @@ function generateTabs(tabsStatus = defaultTabsStatus) {
|
|
|
18
17
|
}));
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
beforeAll(() => {
|
|
22
|
-
Globals.assign({
|
|
23
|
-
skipAnimation: true,
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
20
|
describe('Tabs', () => {
|
|
28
21
|
const initialProps: TabsProps = {
|
|
29
|
-
animatePanelsOnClick: true,
|
|
30
22
|
tabs: generateTabs(),
|
|
31
23
|
changeTabOnSwipe: true,
|
|
32
24
|
name: 'testName',
|
|
33
25
|
headerWidth: 'block',
|
|
34
26
|
selected: 0,
|
|
35
|
-
transitionSpacing: 'default',
|
|
36
27
|
onTabSelect: jest.fn(),
|
|
37
28
|
className: 'custom-class-name',
|
|
38
29
|
};
|
|
@@ -65,19 +56,6 @@ describe('Tabs', () => {
|
|
|
65
56
|
expect(screen.getByRole('tabpanel')).toHaveAttribute('id', controlsTarget);
|
|
66
57
|
});
|
|
67
58
|
|
|
68
|
-
describe('transitionSpacing', () => {
|
|
69
|
-
test.each([
|
|
70
|
-
['default', '100%'],
|
|
71
|
-
['xs', '8px'],
|
|
72
|
-
['sm', '16px'],
|
|
73
|
-
['md', '24px'],
|
|
74
|
-
['lg', '32px'],
|
|
75
|
-
] as const)('should respect `%s`', (input, width) => {
|
|
76
|
-
render(<Tabs {...initialProps} transitionSpacing={input} />);
|
|
77
|
-
expect(screen.getByRole('tabpanel').nextSibling).toHaveStyle({ width });
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
|
|
81
59
|
it('should render correct number of tabs', () => {
|
|
82
60
|
render(<Tabs {...initialProps} />);
|
|
83
61
|
expect(screen.getAllByRole('tab')).toHaveLength(defaultTabsStatus.length);
|