@transferwise/components 46.124.1 → 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/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/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 +1 -2
- 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/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/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/inputs/{SelectInput.spec.tsx → SelectInput.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/{MoneyInput.spec.tsx → MoneyInput.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimitivePrompt.js","sources":["../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport SentimentSurface, { Sentiment } from '../../sentimentSurface';\nimport IconButton from '../../iconButton';\nimport { useIntl } from 'react-intl';\nimport closeBtnMessages from '../../common/closeButton/CloseButton.messages';\nimport { ReactNode } from 'react';\n\nexport type PrimitivePromptProps = {\n /**\n * The sentiment determines the colour scheme\n * @default success\n */\n sentiment?: Sentiment;\n /**\n * Media to be displayed on the prompt (icon/image/etc).\n */\n media: ReactNode;\n /**\n * Any actions to be displayed on the prompt.\n */\n actions?: ReactNode;\n /**\n * Handler called when the close button is clicked. If not provided, then the close button is hidden.\n */\n onDismiss?: () => void;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: ReactNode;\n};\n\n/**\n * PrimitivePrompt is a low-level component that provides the structure, sentiment support and styling for various prompts.\n * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */\nexport const PrimitivePrompt = ({\n sentiment = 'success',\n media,\n actions,\n onDismiss,\n className,\n children,\n ...restProps\n}: PrimitivePromptProps) => {\n const intl = useIntl();\n\n return (\n <SentimentSurface\n sentiment={sentiment}\n className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}\n {...restProps}\n >\n <div
|
|
1
|
+
{"version":3,"file":"PrimitivePrompt.js","sources":["../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport SentimentSurface, { Sentiment } from '../../sentimentSurface';\nimport IconButton from '../../iconButton';\nimport { useIntl } from 'react-intl';\nimport closeBtnMessages from '../../common/closeButton/CloseButton.messages';\nimport { ReactNode } from 'react';\n\nexport type PrimitivePromptProps = {\n /**\n * The sentiment determines the colour scheme\n * @default success\n */\n sentiment?: Sentiment;\n /**\n * Media to be displayed on the prompt (icon/image/etc).\n */\n media: ReactNode;\n /**\n * Any actions to be displayed on the prompt.\n */\n actions?: ReactNode;\n /**\n * Handler called when the close button is clicked. If not provided, then the close button is hidden.\n */\n onDismiss?: () => void;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: ReactNode;\n};\n\n/**\n * PrimitivePrompt is a low-level component that provides the structure, sentiment support and styling for various prompts.\n * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */\nexport const PrimitivePrompt = ({\n sentiment = 'success',\n media,\n actions,\n onDismiss,\n className,\n children,\n ...restProps\n}: PrimitivePromptProps) => {\n const intl = useIntl();\n\n return (\n <SentimentSurface\n sentiment={sentiment}\n className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}\n {...restProps}\n >\n <div\n className={clsx('wds-prompt__content-wrapper', {\n 'wds-prompt__content-wrapper--with-dismiss': !!onDismiss,\n })}\n >\n <div className={clsx('wds-prompt__media-wrapper')}>{media}</div>\n {children}\n {onDismiss && (\n <IconButton\n size={24}\n priority=\"secondary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onDismiss}\n >\n <Cross />\n </IconButton>\n )}\n {actions && <div className=\"wds-prompt__actions-wrapper\">{actions}</div>}\n </div>\n </SentimentSurface>\n );\n};\n"],"names":["PrimitivePrompt","sentiment","media","actions","onDismiss","className","children","restProps","intl","useIntl","_jsx","SentimentSurface","clsx","_jsxs","IconButton","size","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;;;AAmCO,MAAMA,eAAe,GAAGA,CAAC;AAC9BC,EAAAA,SAAS,GAAG,SAAS;EACrBC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAS,CACS,KAAI;AACzB,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;EAEtB,oBACEC,cAAA,CAACC,wBAAgB,EAAA;AACfV,IAAAA,SAAS,EAAEA,SAAU;IACrBI,SAAS,EAAEO,SAAI,CAAC,YAAY,EAAE,eAAeX,SAAS,CAAA,CAAE,EAAEI,SAAS,CAAE;AAAA,IAAA,GACjEE,SAAS;AAAAD,IAAAA,QAAA,eAEbO,eAAA,CAAA,KAAA,EAAA;AACER,MAAAA,SAAS,EAAEO,SAAI,CAAC,6BAA6B,EAAE;QAC7C,2CAA2C,EAAE,CAAC,CAACR;AAChD,OAAA,CAAE;AAAAE,MAAAA,QAAA,gBAEHI,cAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAEO,SAAI,CAAC,2BAA2B,CAAE;AAAAN,QAAAA,QAAA,EAAEJ;OAAW,CAC/D,EAACI,QAAQ,EACRF,SAAS,iBACRM,cAAA,CAACI,kBAAU,EAAA;AACTC,QAAAA,IAAI,EAAE,EAAG;AACTC,QAAAA,QAAQ,EAAC,WAAW;AACpB,QAAA,YAAA,EAAYR,IAAI,CAACS,aAAa,CAACC,4BAAgB,CAACC,SAAS,CAAE;AAC3DC,QAAAA,OAAO,EAAEhB,SAAU;AAAAE,QAAAA,QAAA,eAEnBI,cAAA,CAACW,WAAK,EAAA,EAAA;AACR,OAAY,CACb,EACAlB,OAAO,iBAAIO,cAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAC,6BAA6B;AAAAC,QAAAA,QAAA,EAAEH;AAAO,OAAM,CAAC;KACrE;AACP,GAAkB,CAAC;AAEvB;;;;"}
|
|
@@ -4,7 +4,7 @@ import SentimentSurface from '../../sentimentSurface/SentimentSurface.mjs';
|
|
|
4
4
|
import IconButton from '../../iconButton/IconButton.mjs';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import closeBtnMessages from '../../common/closeButton/CloseButton.messages.mjs';
|
|
7
|
-
import {
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
const PrimitivePrompt = ({
|
|
10
10
|
sentiment = 'success',
|
|
@@ -16,26 +16,28 @@ const PrimitivePrompt = ({
|
|
|
16
16
|
...restProps
|
|
17
17
|
}) => {
|
|
18
18
|
const intl = useIntl();
|
|
19
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/jsx(SentimentSurface, {
|
|
20
20
|
sentiment: sentiment,
|
|
21
21
|
className: clsx('wds-prompt', `wds-prompt--${sentiment}`, className),
|
|
22
22
|
...restProps,
|
|
23
|
-
children:
|
|
24
|
-
className:
|
|
23
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
24
|
+
className: clsx('wds-prompt__content-wrapper', {
|
|
25
|
+
'wds-prompt__content-wrapper--with-dismiss': !!onDismiss
|
|
26
|
+
}),
|
|
25
27
|
children: [/*#__PURE__*/jsx("div", {
|
|
26
28
|
className: clsx('wds-prompt__media-wrapper'),
|
|
27
29
|
children: media
|
|
28
|
-
}), children,
|
|
30
|
+
}), children, onDismiss && /*#__PURE__*/jsx(IconButton, {
|
|
31
|
+
size: 24,
|
|
32
|
+
priority: "secondary",
|
|
33
|
+
"aria-label": intl.formatMessage(closeBtnMessages.ariaLabel),
|
|
34
|
+
onClick: onDismiss,
|
|
35
|
+
children: /*#__PURE__*/jsx(Cross, {})
|
|
36
|
+
}), actions && /*#__PURE__*/jsx("div", {
|
|
29
37
|
className: "wds-prompt__actions-wrapper",
|
|
30
38
|
children: actions
|
|
31
39
|
})]
|
|
32
|
-
})
|
|
33
|
-
size: 24,
|
|
34
|
-
priority: "secondary",
|
|
35
|
-
"aria-label": intl.formatMessage(closeBtnMessages.ariaLabel),
|
|
36
|
-
onClick: onDismiss,
|
|
37
|
-
children: /*#__PURE__*/jsx(Cross, {})
|
|
38
|
-
})]
|
|
40
|
+
})
|
|
39
41
|
});
|
|
40
42
|
};
|
|
41
43
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimitivePrompt.mjs","sources":["../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport SentimentSurface, { Sentiment } from '../../sentimentSurface';\nimport IconButton from '../../iconButton';\nimport { useIntl } from 'react-intl';\nimport closeBtnMessages from '../../common/closeButton/CloseButton.messages';\nimport { ReactNode } from 'react';\n\nexport type PrimitivePromptProps = {\n /**\n * The sentiment determines the colour scheme\n * @default success\n */\n sentiment?: Sentiment;\n /**\n * Media to be displayed on the prompt (icon/image/etc).\n */\n media: ReactNode;\n /**\n * Any actions to be displayed on the prompt.\n */\n actions?: ReactNode;\n /**\n * Handler called when the close button is clicked. If not provided, then the close button is hidden.\n */\n onDismiss?: () => void;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: ReactNode;\n};\n\n/**\n * PrimitivePrompt is a low-level component that provides the structure, sentiment support and styling for various prompts.\n * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */\nexport const PrimitivePrompt = ({\n sentiment = 'success',\n media,\n actions,\n onDismiss,\n className,\n children,\n ...restProps\n}: PrimitivePromptProps) => {\n const intl = useIntl();\n\n return (\n <SentimentSurface\n sentiment={sentiment}\n className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}\n {...restProps}\n >\n <div
|
|
1
|
+
{"version":3,"file":"PrimitivePrompt.mjs","sources":["../../../src/prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport SentimentSurface, { Sentiment } from '../../sentimentSurface';\nimport IconButton from '../../iconButton';\nimport { useIntl } from 'react-intl';\nimport closeBtnMessages from '../../common/closeButton/CloseButton.messages';\nimport { ReactNode } from 'react';\n\nexport type PrimitivePromptProps = {\n /**\n * The sentiment determines the colour scheme\n * @default success\n */\n sentiment?: Sentiment;\n /**\n * Media to be displayed on the prompt (icon/image/etc).\n */\n media: ReactNode;\n /**\n * Any actions to be displayed on the prompt.\n */\n actions?: ReactNode;\n /**\n * Handler called when the close button is clicked. If not provided, then the close button is hidden.\n */\n onDismiss?: () => void;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: ReactNode;\n};\n\n/**\n * PrimitivePrompt is a low-level component that provides the structure, sentiment support and styling for various prompts.\n * Uses several css variables to handle styling from within the consuming component, e.g. --Prompt-padding. */\nexport const PrimitivePrompt = ({\n sentiment = 'success',\n media,\n actions,\n onDismiss,\n className,\n children,\n ...restProps\n}: PrimitivePromptProps) => {\n const intl = useIntl();\n\n return (\n <SentimentSurface\n sentiment={sentiment}\n className={clsx('wds-prompt', `wds-prompt--${sentiment}`, className)}\n {...restProps}\n >\n <div\n className={clsx('wds-prompt__content-wrapper', {\n 'wds-prompt__content-wrapper--with-dismiss': !!onDismiss,\n })}\n >\n <div className={clsx('wds-prompt__media-wrapper')}>{media}</div>\n {children}\n {onDismiss && (\n <IconButton\n size={24}\n priority=\"secondary\"\n aria-label={intl.formatMessage(closeBtnMessages.ariaLabel)}\n onClick={onDismiss}\n >\n <Cross />\n </IconButton>\n )}\n {actions && <div className=\"wds-prompt__actions-wrapper\">{actions}</div>}\n </div>\n </SentimentSurface>\n );\n};\n"],"names":["PrimitivePrompt","sentiment","media","actions","onDismiss","className","children","restProps","intl","useIntl","_jsx","SentimentSurface","clsx","_jsxs","IconButton","size","priority","formatMessage","closeBtnMessages","ariaLabel","onClick","Cross"],"mappings":";;;;;;;;AAmCO,MAAMA,eAAe,GAAGA,CAAC;AAC9BC,EAAAA,SAAS,GAAG,SAAS;EACrBC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAS,CACS,KAAI;AACzB,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE;EAEtB,oBACEC,GAAA,CAACC,gBAAgB,EAAA;AACfV,IAAAA,SAAS,EAAEA,SAAU;IACrBI,SAAS,EAAEO,IAAI,CAAC,YAAY,EAAE,eAAeX,SAAS,CAAA,CAAE,EAAEI,SAAS,CAAE;AAAA,IAAA,GACjEE,SAAS;AAAAD,IAAAA,QAAA,eAEbO,IAAA,CAAA,KAAA,EAAA;AACER,MAAAA,SAAS,EAAEO,IAAI,CAAC,6BAA6B,EAAE;QAC7C,2CAA2C,EAAE,CAAC,CAACR;AAChD,OAAA,CAAE;AAAAE,MAAAA,QAAA,gBAEHI,GAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAEO,IAAI,CAAC,2BAA2B,CAAE;AAAAN,QAAAA,QAAA,EAAEJ;OAAW,CAC/D,EAACI,QAAQ,EACRF,SAAS,iBACRM,GAAA,CAACI,UAAU,EAAA;AACTC,QAAAA,IAAI,EAAE,EAAG;AACTC,QAAAA,QAAQ,EAAC,WAAW;AACpB,QAAA,YAAA,EAAYR,IAAI,CAACS,aAAa,CAACC,gBAAgB,CAACC,SAAS,CAAE;AAC3DC,QAAAA,OAAO,EAAEhB,SAAU;AAAAE,QAAAA,QAAA,eAEnBI,GAAA,CAACW,KAAK,EAAA,EAAA;AACR,OAAY,CACb,EACAlB,OAAO,iBAAIO,GAAA,CAAA,KAAA,EAAA;AAAKL,QAAAA,SAAS,EAAC,6BAA6B;AAAAC,QAAAA,QAAA,EAAEH;AAAO,OAAM,CAAC;KACrE;AACP,GAAkB,CAAC;AAEvB;;;;"}
|
package/build/styles/main.css
CHANGED
|
@@ -5337,8 +5337,10 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5337
5337
|
}
|
|
5338
5338
|
.wds-prompt {
|
|
5339
5339
|
border-radius: 10px;
|
|
5340
|
-
border-radius: var(--radius-small);
|
|
5340
|
+
border-radius: var(--Prompt-border-radius, var(--radius-small));
|
|
5341
5341
|
display: flex;
|
|
5342
|
+
gap: 16px;
|
|
5343
|
+
gap: var(--Prompt-gap, var(--size-16));
|
|
5342
5344
|
word-wrap: break-word;
|
|
5343
5345
|
padding: 8px;
|
|
5344
5346
|
padding: var(--Prompt-padding, var(--padding-x-small));
|
|
@@ -5354,6 +5356,9 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5354
5356
|
grid-template-columns: auto 1fr;
|
|
5355
5357
|
width: 100%;
|
|
5356
5358
|
}
|
|
5359
|
+
.wds-prompt__content-wrapper--with-dismiss {
|
|
5360
|
+
grid-template-columns: auto 1fr auto;
|
|
5361
|
+
}
|
|
5357
5362
|
.wds-prompt__media-wrapper {
|
|
5358
5363
|
align-self: flex-start;
|
|
5359
5364
|
padding-top: calc(4px - 1px);
|
|
@@ -5369,12 +5374,16 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5369
5374
|
gap: 8px;
|
|
5370
5375
|
gap: var(--Prompt-actions-gap, var(--size-8));
|
|
5371
5376
|
grid-column-start: 2;
|
|
5377
|
+
grid-column-end: 3;
|
|
5372
5378
|
}
|
|
5373
|
-
@media (max-width:
|
|
5379
|
+
@media (max-width: 767px) {
|
|
5374
5380
|
.wds-prompt__actions-wrapper {
|
|
5375
5381
|
grid-column: span 2;
|
|
5376
5382
|
width: 100%;
|
|
5377
5383
|
}
|
|
5384
|
+
.wds-prompt__content-wrapper--with-dismiss .wds-prompt__actions-wrapper {
|
|
5385
|
+
grid-column: span 3;
|
|
5386
|
+
}
|
|
5378
5387
|
}
|
|
5379
5388
|
.wds-inline-prompt {
|
|
5380
5389
|
--Prompt-gap: calc(var(--size-12) / 2);
|
|
@@ -7423,3 +7432,24 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
7423
7432
|
.np-list-item__action {
|
|
7424
7433
|
flex-shrink: 0;
|
|
7425
7434
|
}
|
|
7435
|
+
.wds-action-prompt {
|
|
7436
|
+
--Prompt-padding: var(--size-16);
|
|
7437
|
+
--Prompt-actions-gap: var(--size-8);
|
|
7438
|
+
--Prompt-gap: var(--size-10) var(--size-16);
|
|
7439
|
+
--Prompt-border-radius: var(--radius-large);
|
|
7440
|
+
}
|
|
7441
|
+
.wds-action-prompt--media-image {
|
|
7442
|
+
width: 48px;
|
|
7443
|
+
width: var(--size-48);
|
|
7444
|
+
height: 48px;
|
|
7445
|
+
height: var(--size-48);
|
|
7446
|
+
-o-object-fit: contain;
|
|
7447
|
+
object-fit: contain;
|
|
7448
|
+
}
|
|
7449
|
+
@media (max-width: 767px) {
|
|
7450
|
+
.wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
7451
|
+
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
7452
|
+
min-width: -moz-fit-content;
|
|
7453
|
+
min-width: fit-content;
|
|
7454
|
+
}
|
|
7455
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.wds-action-prompt {
|
|
2
|
+
--Prompt-padding: var(--size-16);
|
|
3
|
+
--Prompt-actions-gap: var(--size-8);
|
|
4
|
+
--Prompt-gap: var(--size-10) var(--size-16);
|
|
5
|
+
--Prompt-border-radius: var(--radius-large);
|
|
6
|
+
}
|
|
7
|
+
.wds-action-prompt--media-image {
|
|
8
|
+
width: 48px;
|
|
9
|
+
width: var(--size-48);
|
|
10
|
+
height: 48px;
|
|
11
|
+
height: var(--size-48);
|
|
12
|
+
-o-object-fit: contain;
|
|
13
|
+
object-fit: contain;
|
|
14
|
+
}
|
|
15
|
+
@media (max-width: 767px) {
|
|
16
|
+
.wds-action-prompt--with-two-actions .wds-prompt__actions-wrapper .wds-Button {
|
|
17
|
+
flex: 1 1 calc(50% - (var(--Prompt-actions-gap) / 2));
|
|
18
|
+
min-width: -moz-fit-content;
|
|
19
|
+
min-width: fit-content;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
.wds-prompt {
|
|
2
2
|
border-radius: 10px;
|
|
3
|
-
border-radius: var(--radius-small);
|
|
3
|
+
border-radius: var(--Prompt-border-radius, var(--radius-small));
|
|
4
4
|
display: flex;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
gap: var(--Prompt-gap, var(--size-16));
|
|
5
7
|
word-wrap: break-word;
|
|
6
8
|
padding: 8px;
|
|
7
9
|
padding: var(--Prompt-padding, var(--padding-x-small));
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
grid-template-columns: auto 1fr;
|
|
18
20
|
width: 100%;
|
|
19
21
|
}
|
|
22
|
+
.wds-prompt__content-wrapper--with-dismiss {
|
|
23
|
+
grid-template-columns: auto 1fr auto;
|
|
24
|
+
}
|
|
20
25
|
.wds-prompt__media-wrapper {
|
|
21
26
|
align-self: flex-start;
|
|
22
27
|
padding-top: calc(4px - 1px);
|
|
@@ -32,10 +37,14 @@
|
|
|
32
37
|
gap: 8px;
|
|
33
38
|
gap: var(--Prompt-actions-gap, var(--size-8));
|
|
34
39
|
grid-column-start: 2;
|
|
40
|
+
grid-column-end: 3;
|
|
35
41
|
}
|
|
36
|
-
@media (max-width:
|
|
42
|
+
@media (max-width: 767px) {
|
|
37
43
|
.wds-prompt__actions-wrapper {
|
|
38
44
|
grid-column: span 2;
|
|
39
45
|
width: 100%;
|
|
40
46
|
}
|
|
47
|
+
.wds-prompt__content-wrapper--with-dismiss .wds-prompt__actions-wrapper {
|
|
48
|
+
grid-column: span 3;
|
|
49
|
+
}
|
|
41
50
|
}
|
package/build/tabs/Tabs.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var web = require('@react-spring/web');
|
|
6
5
|
var clsx = require('clsx');
|
|
7
6
|
var clamp = require('lodash.clamp');
|
|
8
7
|
var React = require('react');
|
|
@@ -40,17 +39,9 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
40
39
|
var clamp__default = /*#__PURE__*/_interopDefault(clamp);
|
|
41
40
|
|
|
42
41
|
const MIN_INDEX = 0;
|
|
43
|
-
const SpacerWidth = {
|
|
44
|
-
default: 0,
|
|
45
|
-
xs: 8,
|
|
46
|
-
sm: 16,
|
|
47
|
-
md: 24,
|
|
48
|
-
lg: 32
|
|
49
|
-
};
|
|
50
42
|
class Tabs extends React.Component {
|
|
51
43
|
static defaultProps = {
|
|
52
44
|
changeTabOnSwipe: true,
|
|
53
|
-
transitionSpacing: 'default',
|
|
54
45
|
headerWidth: width.Width.BLOCK
|
|
55
46
|
};
|
|
56
47
|
containerReference = /*#__PURE__*/React.createRef();
|
|
@@ -58,25 +49,15 @@ class Tabs extends React.Component {
|
|
|
58
49
|
super(props);
|
|
59
50
|
this.state = {
|
|
60
51
|
start: null,
|
|
61
|
-
translateX: 0,
|
|
62
|
-
translateFrom: 0,
|
|
63
|
-
translateTo: 0,
|
|
64
52
|
translateLineX: null,
|
|
65
|
-
isAnimating: false,
|
|
66
53
|
isSwiping: false,
|
|
67
54
|
isScrolling: false,
|
|
68
|
-
|
|
69
|
-
fullWidthTabs: props.headerWidth === width.Width.BLOCK,
|
|
70
|
-
currentSwipe: [],
|
|
71
|
-
selectedTabIndex: props.selected
|
|
55
|
+
fullWidthTabs: props.headerWidth === width.Width.BLOCK
|
|
72
56
|
};
|
|
73
57
|
}
|
|
74
58
|
container = null;
|
|
75
59
|
containerWidth = 0;
|
|
76
60
|
tabRefs = [];
|
|
77
|
-
get filteredTabsLength() {
|
|
78
|
-
return this.props.tabs.filter(tab => !tab.disabled).length;
|
|
79
|
-
}
|
|
80
61
|
get MAX_INDEX() {
|
|
81
62
|
return this.props.tabs.length - 1;
|
|
82
63
|
}
|
|
@@ -86,7 +67,7 @@ class Tabs extends React.Component {
|
|
|
86
67
|
} = this.props;
|
|
87
68
|
this.setTabWidth();
|
|
88
69
|
this.switchTab(clamp__default.default(selected, MIN_INDEX, this.MAX_INDEX));
|
|
89
|
-
this.
|
|
70
|
+
this.animateLine(clamp__default.default(selected, MIN_INDEX, this.MAX_INDEX));
|
|
90
71
|
document.body.addEventListener('touchmove', this.disableScroll, {
|
|
91
72
|
passive: false
|
|
92
73
|
});
|
|
@@ -95,7 +76,7 @@ class Tabs extends React.Component {
|
|
|
95
76
|
});
|
|
96
77
|
window.addEventListener('resize', this.handleResize);
|
|
97
78
|
}
|
|
98
|
-
componentDidUpdate(previousProps
|
|
79
|
+
componentDidUpdate(previousProps) {
|
|
99
80
|
const currentSelected = this.props.selected;
|
|
100
81
|
const previousSelected = previousProps.selected;
|
|
101
82
|
const currentSelectedTab = this.props.tabs[currentSelected];
|
|
@@ -108,15 +89,11 @@ class Tabs extends React.Component {
|
|
|
108
89
|
const previousDisabledTabsLength = previousProps.tabs.filter(tab => !tab.disabled).length;
|
|
109
90
|
const currentHeaderWidth = this.props.headerWidth;
|
|
110
91
|
const previousFullHeaderWidth = previousProps.headerWidth;
|
|
111
|
-
const {
|
|
112
|
-
animatePanelsOnClick
|
|
113
|
-
} = this.props;
|
|
114
|
-
const instantOnClick = !animatePanelsOnClick && !previousState.isSwiping;
|
|
115
92
|
if (currentHeaderWidth !== previousFullHeaderWidth || currentTabsLength !== previousTabsLength) {
|
|
116
93
|
this.setTabWidth();
|
|
117
94
|
}
|
|
118
95
|
if (currentSelected !== previousSelected || currentDisabledTabsLength !== previousDisabledTabsLength || currentSelectedTabIsDisabled !== previousSelectedTabIsDisabled) {
|
|
119
|
-
this.
|
|
96
|
+
this.animateLine(clamp__default.default(currentSelected, MIN_INDEX, this.MAX_INDEX));
|
|
120
97
|
}
|
|
121
98
|
}
|
|
122
99
|
componentWillUnmount() {
|
|
@@ -126,11 +103,6 @@ class Tabs extends React.Component {
|
|
|
126
103
|
}
|
|
127
104
|
handleResize = () => {
|
|
128
105
|
this.setContainerWidth(this.container);
|
|
129
|
-
this.setState(({
|
|
130
|
-
selectedTabIndex
|
|
131
|
-
}) => ({
|
|
132
|
-
translateTo: -(this.containerWidth * selectedTabIndex)
|
|
133
|
-
}));
|
|
134
106
|
};
|
|
135
107
|
setContainerRefAndWidth = node => {
|
|
136
108
|
this.container = node;
|
|
@@ -220,60 +192,17 @@ class Tabs extends React.Component {
|
|
|
220
192
|
return nextSelected;
|
|
221
193
|
};
|
|
222
194
|
swipedOverHalfOfContainer = difference => difference / this.containerWidth >= 0.5;
|
|
223
|
-
calculateApplicableDragDifference = ({
|
|
224
|
-
currentSelected,
|
|
225
|
-
nextSelected,
|
|
226
|
-
start,
|
|
227
|
-
end
|
|
228
|
-
}) => {
|
|
229
|
-
const difference = utils.getSwipeDifference(start, end);
|
|
230
|
-
const elasticDrag = utils.getElasticDragDifference(difference);
|
|
231
|
-
if (utils.swipedLeftToRight(start, end)) {
|
|
232
|
-
if (currentSelected > MIN_INDEX && currentSelected !== nextSelected) {
|
|
233
|
-
return Math.min(difference, this.containerWidth);
|
|
234
|
-
}
|
|
235
|
-
return elasticDrag;
|
|
236
|
-
}
|
|
237
|
-
if (utils.swipedRightToLeft(start, end)) {
|
|
238
|
-
if (currentSelected < this.MAX_INDEX && currentSelected !== nextSelected) {
|
|
239
|
-
return -Math.min(difference, this.containerWidth);
|
|
240
|
-
}
|
|
241
|
-
return -elasticDrag;
|
|
242
|
-
}
|
|
243
|
-
return false;
|
|
244
|
-
};
|
|
245
195
|
switchTab = index => {
|
|
246
196
|
const {
|
|
247
197
|
onTabSelect
|
|
248
198
|
} = this.props;
|
|
249
199
|
onTabSelect(index);
|
|
250
200
|
};
|
|
251
|
-
getTabIndexWithoutDisabledTabs(index) {
|
|
252
|
-
return index - this.props.tabs.slice(0, index).filter(tab => tab.disabled).length;
|
|
253
|
-
}
|
|
254
|
-
animateToTab = (index, instant) => {
|
|
255
|
-
this.animateLine(index);
|
|
256
|
-
this.animatePanel(this.getTabIndexWithoutDisabledTabs(index), instant);
|
|
257
|
-
};
|
|
258
201
|
animateLine = index => {
|
|
259
202
|
this.setState(previousState => ({
|
|
260
203
|
translateLineX: previousState.fullWidthTabs ? `${index * 100}%` : `${this.getDistanceToSelectedTab(index)}px`
|
|
261
204
|
}));
|
|
262
205
|
};
|
|
263
|
-
// Pass `instant` to set the `translateX` to the new panel with no transition
|
|
264
|
-
animatePanel = (index, instant = false) => {
|
|
265
|
-
const {
|
|
266
|
-
translateTo: currentTranslateTo
|
|
267
|
-
} = this.state;
|
|
268
|
-
const translateFrom = currentTranslateTo;
|
|
269
|
-
const translateTo = -(this.containerWidth * index);
|
|
270
|
-
this.setState({
|
|
271
|
-
selectedTabIndex: index,
|
|
272
|
-
isAnimating: !instant && translateFrom !== translateTo,
|
|
273
|
-
translateFrom,
|
|
274
|
-
translateTo
|
|
275
|
-
});
|
|
276
|
-
};
|
|
277
206
|
disableScroll = event => {
|
|
278
207
|
const {
|
|
279
208
|
isSwiping
|
|
@@ -297,10 +226,8 @@ class Tabs extends React.Component {
|
|
|
297
226
|
time: Date.now()
|
|
298
227
|
};
|
|
299
228
|
this.setState({
|
|
300
|
-
start
|
|
301
|
-
currentSwipe: [start]
|
|
229
|
+
start
|
|
302
230
|
});
|
|
303
|
-
event.persist();
|
|
304
231
|
};
|
|
305
232
|
handleTouchMove = event => {
|
|
306
233
|
const {
|
|
@@ -312,7 +239,6 @@ class Tabs extends React.Component {
|
|
|
312
239
|
const {
|
|
313
240
|
selected: currentSelectedFromProps
|
|
314
241
|
} = this.props;
|
|
315
|
-
const selected = this.getTabIndexWithoutDisabledTabs(currentSelectedFromProps);
|
|
316
242
|
const end = {
|
|
317
243
|
x: event.nativeEvent.changedTouches[0].clientX,
|
|
318
244
|
y: event.nativeEvent.changedTouches[0].clientY,
|
|
@@ -324,7 +250,6 @@ class Tabs extends React.Component {
|
|
|
324
250
|
isScrolling,
|
|
325
251
|
isSwiping
|
|
326
252
|
} = this.state;
|
|
327
|
-
event.persist();
|
|
328
253
|
if (!isScrolling && !isSwiping) {
|
|
329
254
|
if (difference > yAxisDifference) {
|
|
330
255
|
isSwiping = true;
|
|
@@ -339,18 +264,6 @@ class Tabs extends React.Component {
|
|
|
339
264
|
if (isSwiping) {
|
|
340
265
|
const nextSelected = this.getTabToSelect(currentSelectedFromProps, start, end);
|
|
341
266
|
this.animateLine(this.swipedOverHalfOfContainer(difference) ? nextSelected : currentSelectedFromProps);
|
|
342
|
-
const dragDifference = this.calculateApplicableDragDifference({
|
|
343
|
-
currentSelected: currentSelectedFromProps,
|
|
344
|
-
nextSelected,
|
|
345
|
-
start,
|
|
346
|
-
end
|
|
347
|
-
});
|
|
348
|
-
const translateX = dragDifference ? -(this.containerWidth * selected) + dragDifference : false;
|
|
349
|
-
this.setState(state => ({
|
|
350
|
-
currentSwipe: [...state.currentSwipe, end],
|
|
351
|
-
translateFrom: translateX || state.translateFrom,
|
|
352
|
-
translateTo: translateX || state.translateTo
|
|
353
|
-
}));
|
|
354
267
|
}
|
|
355
268
|
};
|
|
356
269
|
handleTouchEnd = event => {
|
|
@@ -370,23 +283,15 @@ class Tabs extends React.Component {
|
|
|
370
283
|
time: Date.now()
|
|
371
284
|
};
|
|
372
285
|
const difference = utils.getSwipeDifference(start, end);
|
|
373
|
-
const velocity = utils.getVelocity([...this.state.currentSwipe, end]);
|
|
374
|
-
this.setState({
|
|
375
|
-
currentSwipe: []
|
|
376
|
-
});
|
|
377
286
|
let nextSelected = selected;
|
|
378
|
-
event.persist();
|
|
379
287
|
if (isSwiping) {
|
|
380
288
|
if (utils.swipeShouldChangeTab(start, end) || this.swipedOverHalfOfContainer(difference)) {
|
|
381
289
|
nextSelected = this.getTabToSelect(nextSelected, start, end);
|
|
382
290
|
}
|
|
383
291
|
if (nextSelected !== selected) {
|
|
384
292
|
this.switchTab(nextSelected);
|
|
385
|
-
this.setState({
|
|
386
|
-
lastSwipeVelocity: velocity
|
|
387
|
-
});
|
|
388
293
|
} else {
|
|
389
|
-
this.
|
|
294
|
+
this.animateLine(nextSelected);
|
|
390
295
|
}
|
|
391
296
|
}
|
|
392
297
|
this.setState({
|
|
@@ -401,34 +306,13 @@ class Tabs extends React.Component {
|
|
|
401
306
|
name,
|
|
402
307
|
selected,
|
|
403
308
|
className,
|
|
404
|
-
transitionSpacing,
|
|
405
309
|
headerWidth
|
|
406
310
|
} = this.props;
|
|
407
311
|
const {
|
|
408
|
-
isSwiping,
|
|
409
312
|
translateLineX,
|
|
410
|
-
isAnimating,
|
|
411
|
-
translateFrom,
|
|
412
|
-
translateTo,
|
|
413
|
-
lastSwipeVelocity,
|
|
414
313
|
fullWidthTabs
|
|
415
314
|
} = this.state;
|
|
416
|
-
const
|
|
417
|
-
const tabsLength = this.filteredTabsLength;
|
|
418
|
-
const distanceSwiped = Math.abs(-translateFrom - this.containerWidth * selected);
|
|
419
|
-
const remainingContainerToTravel = isSwiping ? 1 - distanceSwiped / this.containerWidth : 1 - Math.abs(distanceSwiped / this.containerWidth - 1);
|
|
420
|
-
const restrictedVelocity = (Number.isNaN(remainingContainerToTravel) ? 0 : remainingContainerToTravel) * Math.min(10 * Math.E, lastSwipeVelocity * 10 * Math.E);
|
|
421
|
-
const hidePanelOverflow = isAnimating || isSwiping;
|
|
422
|
-
const sliderWidth = tabsLength * this.containerWidth + spacer * 2;
|
|
423
|
-
// Uses `props.panelTransitionSpacing` to add a spacer in-between the `TabPanel` you're transitioning to/from
|
|
424
|
-
const Spacer = ({
|
|
425
|
-
id
|
|
426
|
-
}) => spacer > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
427
|
-
style: {
|
|
428
|
-
width: spacer,
|
|
429
|
-
display: hidePanelOverflow ? 'block' : 'none'
|
|
430
|
-
}
|
|
431
|
-
}, id);
|
|
315
|
+
const selectedTab = tabs[selected];
|
|
432
316
|
return /*#__PURE__*/jsxRuntime.jsx(DirectionProvider.DirectionContext.Consumer, {
|
|
433
317
|
children: direction$1 => {
|
|
434
318
|
const isRTL = direction$1 === direction.Direction.RTL;
|
|
@@ -478,55 +362,14 @@ class Tabs extends React.Component {
|
|
|
478
362
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
479
363
|
ref: this.setContainerRefAndWidth,
|
|
480
364
|
className: "tabs__panel-container",
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
transform: `translateX(${translateFrom - spacer}px)`
|
|
487
|
-
},
|
|
488
|
-
to: {
|
|
489
|
-
transform: `translateX(${translateTo - spacer}px)`
|
|
490
|
-
},
|
|
491
|
-
config: {
|
|
492
|
-
precision: isSwiping ? 1 : 0.01,
|
|
493
|
-
velocity: !isSwiping ? restrictedVelocity : 0,
|
|
494
|
-
clamp: true
|
|
495
|
-
},
|
|
496
|
-
onRest: () => {
|
|
497
|
-
if (isAnimating) {
|
|
498
|
-
this.setState({
|
|
499
|
-
isAnimating: false,
|
|
500
|
-
lastSwipeVelocity: 0
|
|
501
|
-
});
|
|
502
|
-
}
|
|
365
|
+
children: selectedTab && !selectedTab.disabled ? /*#__PURE__*/jsxRuntime.jsx(TabPanel.default, {
|
|
366
|
+
tabId: `${name}-tab-${selected}`,
|
|
367
|
+
id: `${name}-panel-${selected}`,
|
|
368
|
+
style: {
|
|
369
|
+
width: '100%'
|
|
503
370
|
},
|
|
504
|
-
children:
|
|
505
|
-
|
|
506
|
-
style: {
|
|
507
|
-
width: hidePanelOverflow ? `${sliderWidth}px` : '100%',
|
|
508
|
-
transform: hidePanelOverflow ? props.transform : 'translateX(0px)'
|
|
509
|
-
},
|
|
510
|
-
children: tabs.map(({
|
|
511
|
-
content,
|
|
512
|
-
disabled
|
|
513
|
-
}, index) => !disabled ? /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
514
|
-
children: [index === selected && /*#__PURE__*/jsxRuntime.jsx(Spacer, {
|
|
515
|
-
id: "left-spacer"
|
|
516
|
-
}), /*#__PURE__*/jsxRuntime.jsx(TabPanel.default, {
|
|
517
|
-
tabId: `${name}-tab-${index}`,
|
|
518
|
-
id: `${name}-panel-${index}`,
|
|
519
|
-
style: {
|
|
520
|
-
width: hidePanelOverflow ? `${this.containerWidth}px` : '100%',
|
|
521
|
-
display: hidePanelOverflow || index === selected ? 'block' : 'none'
|
|
522
|
-
},
|
|
523
|
-
children: content
|
|
524
|
-
}, tabs[index].title), index === selected && /*#__PURE__*/jsxRuntime.jsx(Spacer, {
|
|
525
|
-
id: "right-spacer"
|
|
526
|
-
})]
|
|
527
|
-
}, `${tabs[index].title}-fragment`) : null)
|
|
528
|
-
})
|
|
529
|
-
})
|
|
371
|
+
children: selectedTab.content
|
|
372
|
+
}, selectedTab.title) : null
|
|
530
373
|
})]
|
|
531
374
|
});
|
|
532
375
|
}
|