@transferwise/components 46.45.0 → 46.46.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/accordion/Accordion.js +40 -0
- package/build/accordion/Accordion.js.map +1 -0
- package/build/accordion/Accordion.mjs +38 -0
- package/build/accordion/Accordion.mjs.map +1 -0
- package/build/accordion/AccordionItem/AccordionItem.js +70 -0
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -0
- package/build/accordion/AccordionItem/AccordionItem.mjs +64 -0
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -0
- package/build/actionButton/ActionButton.js +31 -0
- package/build/actionButton/ActionButton.js.map +1 -0
- package/build/actionButton/ActionButton.mjs +25 -0
- package/build/actionButton/ActionButton.mjs.map +1 -0
- package/build/actionOption/ActionOption.js +61 -0
- package/build/actionOption/ActionOption.js.map +1 -0
- package/build/actionOption/ActionOption.mjs +55 -0
- package/build/actionOption/ActionOption.mjs.map +1 -0
- package/build/alert/Alert.js +159 -0
- package/build/alert/Alert.js.map +1 -0
- package/build/alert/Alert.mjs +151 -0
- package/build/alert/Alert.mjs.map +1 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.js +18 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +16 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -0
- package/build/avatar/Avatar.js +54 -0
- package/build/avatar/Avatar.js.map +1 -0
- package/build/avatar/Avatar.mjs +48 -0
- package/build/avatar/Avatar.mjs.map +1 -0
- package/build/avatar/avatarTypes.js +11 -0
- package/build/avatar/avatarTypes.js.map +1 -0
- package/build/avatar/avatarTypes.mjs +11 -0
- package/build/avatar/avatarTypes.mjs.map +1 -0
- package/build/avatar/colors/colors.js +31 -0
- package/build/avatar/colors/colors.js.map +1 -0
- package/build/avatar/colors/colors.mjs +29 -0
- package/build/avatar/colors/colors.mjs.map +1 -0
- package/build/avatarWrapper/AvatarWrapper.js +120 -0
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -0
- package/build/avatarWrapper/AvatarWrapper.mjs +118 -0
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -0
- package/build/avatarWrapper/index.js +8 -0
- package/build/avatarWrapper/index.js.map +1 -0
- package/build/avatarWrapper/index.mjs +6 -0
- package/build/avatarWrapper/index.mjs.map +1 -0
- package/build/badge/Badge.js +36 -0
- package/build/badge/Badge.js.map +1 -0
- package/build/badge/Badge.mjs +30 -0
- package/build/badge/Badge.mjs.map +1 -0
- package/build/body/Body.js +31 -0
- package/build/body/Body.js.map +1 -0
- package/build/body/Body.mjs +25 -0
- package/build/body/Body.mjs.map +1 -0
- package/build/button/Button.js +86 -0
- package/build/button/Button.js.map +1 -0
- package/build/button/Button.messages.js +12 -0
- package/build/button/Button.messages.js.map +1 -0
- package/build/button/Button.messages.mjs +10 -0
- package/build/button/Button.messages.mjs.map +1 -0
- package/build/button/Button.mjs +80 -0
- package/build/button/Button.mjs.map +1 -0
- package/build/button/classMap.js +18 -0
- package/build/button/classMap.js.map +1 -0
- package/build/button/classMap.mjs +15 -0
- package/build/button/classMap.mjs.map +1 -0
- package/build/button/legacyUtils/legacyUtils.js +54 -0
- package/build/button/legacyUtils/legacyUtils.js.map +1 -0
- package/build/button/legacyUtils/legacyUtils.mjs +50 -0
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -0
- package/build/card/Card.js +65 -0
- package/build/card/Card.js.map +1 -0
- package/build/card/Card.mjs +59 -0
- package/build/card/Card.mjs.map +1 -0
- package/build/carousel/Carousel.js +283 -0
- package/build/carousel/Carousel.js.map +1 -0
- package/build/carousel/Carousel.mjs +277 -0
- package/build/carousel/Carousel.mjs.map +1 -0
- package/build/checkbox/Checkbox.js +64 -0
- package/build/checkbox/Checkbox.js.map +1 -0
- package/build/checkbox/Checkbox.mjs +58 -0
- package/build/checkbox/Checkbox.mjs.map +1 -0
- package/build/checkboxButton/CheckboxButton.js +40 -0
- package/build/checkboxButton/CheckboxButton.js.map +1 -0
- package/build/checkboxButton/CheckboxButton.mjs +34 -0
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -0
- package/build/checkboxOption/CheckboxOption.js +27 -0
- package/build/checkboxOption/CheckboxOption.js.map +1 -0
- package/build/checkboxOption/CheckboxOption.mjs +25 -0
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -0
- package/build/chevron/Chevron.js +60 -0
- package/build/chevron/Chevron.js.map +1 -0
- package/build/chevron/Chevron.mjs +54 -0
- package/build/chevron/Chevron.mjs.map +1 -0
- package/build/chips/Chip.js +71 -0
- package/build/chips/Chip.js.map +1 -0
- package/build/chips/Chip.mjs +65 -0
- package/build/chips/Chip.mjs.map +1 -0
- package/build/chips/Chips.js +62 -0
- package/build/chips/Chips.js.map +1 -0
- package/build/chips/Chips.messages.js +12 -0
- package/build/chips/Chips.messages.js.map +1 -0
- package/build/chips/Chips.messages.mjs +10 -0
- package/build/chips/Chips.messages.mjs.map +1 -0
- package/build/chips/Chips.mjs +56 -0
- package/build/chips/Chips.mjs.map +1 -0
- package/build/circularButton/CircularButton.js +46 -0
- package/build/circularButton/CircularButton.js.map +1 -0
- package/build/circularButton/CircularButton.mjs +40 -0
- package/build/circularButton/CircularButton.mjs.map +1 -0
- package/build/common/DOMOperations/DOMOperations.js +24 -0
- package/build/common/DOMOperations/DOMOperations.js.map +1 -0
- package/build/common/DOMOperations/DOMOperations.mjs +21 -0
- package/build/common/DOMOperations/DOMOperations.mjs.map +1 -0
- package/build/common/Option/Option.js +71 -0
- package/build/common/Option/Option.js.map +1 -0
- package/build/common/Option/Option.mjs +65 -0
- package/build/common/Option/Option.mjs.map +1 -0
- package/build/common/RadioButton/RadioButton.js +46 -0
- package/build/common/RadioButton/RadioButton.js.map +1 -0
- package/build/common/RadioButton/RadioButton.mjs +40 -0
- package/build/common/RadioButton/RadioButton.mjs.map +1 -0
- package/build/common/action/Action.js +37 -0
- package/build/common/action/Action.js.map +1 -0
- package/build/common/action/Action.mjs +31 -0
- package/build/common/action/Action.mjs.map +1 -0
- package/build/common/bottomSheet/BottomSheet.js +194 -0
- package/build/common/bottomSheet/BottomSheet.js.map +1 -0
- package/build/common/bottomSheet/BottomSheet.mjs +188 -0
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -0
- package/build/common/card/Card.js +49 -0
- package/build/common/card/Card.js.map +1 -0
- package/build/common/card/Card.mjs +43 -0
- package/build/common/card/Card.mjs.map +1 -0
- package/build/common/closeButton/CloseButton.js +46 -0
- package/build/common/closeButton/CloseButton.js.map +1 -0
- package/build/common/closeButton/CloseButton.messages.js +12 -0
- package/build/common/closeButton/CloseButton.messages.js.map +1 -0
- package/build/common/closeButton/CloseButton.messages.mjs +10 -0
- package/build/common/closeButton/CloseButton.messages.mjs.map +1 -0
- package/build/common/closeButton/CloseButton.mjs +40 -0
- package/build/common/closeButton/CloseButton.mjs.map +1 -0
- package/build/common/dateUtils/getDayNames/getDayNames.js +18 -0
- package/build/common/dateUtils/getDayNames/getDayNames.js.map +1 -0
- package/build/common/dateUtils/getDayNames/getDayNames.mjs +16 -0
- package/build/common/dateUtils/getDayNames/getDayNames.mjs.map +1 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.js +8 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.js.map +1 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.mjs +5 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.mjs.map +1 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.js +19 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.js.map +1 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.mjs +17 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.mjs.map +1 -0
- package/build/common/dateUtils/isDateValid/isDateValid.js +17 -0
- package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -0
- package/build/common/dateUtils/isDateValid/isDateValid.mjs +14 -0
- package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +8 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js.map +1 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.mjs +6 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.mjs.map +1 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.js +8 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.js.map +1 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.mjs +6 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.mjs.map +1 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js +15 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js.map +1 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs +13 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs.map +1 -0
- package/build/common/deviceDetection/deviceDetection.js +11 -0
- package/build/common/deviceDetection/deviceDetection.js.map +1 -0
- package/build/common/deviceDetection/deviceDetection.mjs +9 -0
- package/build/common/deviceDetection/deviceDetection.mjs.map +1 -0
- package/build/common/direction.js +9 -0
- package/build/common/direction.js.map +1 -0
- package/build/common/direction.mjs +9 -0
- package/build/common/direction.mjs.map +1 -0
- package/build/common/domHelpers/documentIosClick.js +39 -0
- package/build/common/domHelpers/documentIosClick.js.map +1 -0
- package/build/common/domHelpers/documentIosClick.mjs +33 -0
- package/build/common/domHelpers/documentIosClick.mjs.map +1 -0
- package/build/common/fileType.js +10 -0
- package/build/common/fileType.js.map +1 -0
- package/build/common/fileType.mjs +10 -0
- package/build/common/fileType.mjs.map +1 -0
- package/build/common/flowHeader/FlowHeader.js +53 -0
- package/build/common/flowHeader/FlowHeader.js.map +1 -0
- package/build/common/flowHeader/FlowHeader.mjs +28 -0
- package/build/common/flowHeader/FlowHeader.mjs.map +1 -0
- package/build/common/focusBoundary/FocusBoundary.js +28 -0
- package/build/common/focusBoundary/FocusBoundary.js.map +1 -0
- package/build/common/focusBoundary/FocusBoundary.mjs +26 -0
- package/build/common/focusBoundary/FocusBoundary.mjs.map +1 -0
- package/build/common/historyNavigator/historyNavigator.js +39 -0
- package/build/common/historyNavigator/historyNavigator.js.map +1 -0
- package/build/common/historyNavigator/historyNavigator.mjs +37 -0
- package/build/common/historyNavigator/historyNavigator.mjs.map +1 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.js +25 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.js.map +1 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.mjs +23 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.mjs.map +1 -0
- package/build/common/hooks/useDirection/useDirection.js +15 -0
- package/build/common/hooks/useDirection/useDirection.js.map +1 -0
- package/build/common/hooks/useDirection/useDirection.mjs +13 -0
- package/build/common/hooks/useDirection/useDirection.mjs.map +1 -0
- package/build/common/hooks/useEffectEvent.js +22 -0
- package/build/common/hooks/useEffectEvent.js.map +1 -0
- package/build/common/hooks/useEffectEvent.mjs +20 -0
- package/build/common/hooks/useEffectEvent.mjs.map +1 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.js +64 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs +62 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -0
- package/build/common/hooks/useLayout/useLayout.js +26 -0
- package/build/common/hooks/useLayout/useLayout.js.map +1 -0
- package/build/common/hooks/useLayout/useLayout.mjs +24 -0
- package/build/common/hooks/useLayout/useLayout.mjs.map +1 -0
- package/build/common/hooks/useMedia.js +16 -0
- package/build/common/hooks/useMedia.js.map +1 -0
- package/build/common/hooks/useMedia.mjs +14 -0
- package/build/common/hooks/useMedia.mjs.map +1 -0
- package/build/common/hooks/useResizeObserver.js +25 -0
- package/build/common/hooks/useResizeObserver.js.map +1 -0
- package/build/common/hooks/useResizeObserver.mjs +23 -0
- package/build/common/hooks/useResizeObserver.mjs.map +1 -0
- package/build/common/hooks/useScreenSize.js +10 -0
- package/build/common/hooks/useScreenSize.js.map +1 -0
- package/build/common/hooks/useScreenSize.mjs +8 -0
- package/build/common/hooks/useScreenSize.mjs.map +1 -0
- package/build/common/hooks/useVirtualKeyboard.js +26 -0
- package/build/common/hooks/useVirtualKeyboard.js.map +1 -0
- package/build/common/hooks/useVirtualKeyboard.mjs +24 -0
- package/build/common/hooks/useVirtualKeyboard.mjs.map +1 -0
- package/build/common/locale/index.js +85 -0
- package/build/common/locale/index.js.map +1 -0
- package/build/common/locale/index.mjs +76 -0
- package/build/common/locale/index.mjs.map +1 -0
- package/build/common/panel/Panel.js +133 -0
- package/build/common/panel/Panel.js.map +1 -0
- package/build/common/panel/Panel.mjs +127 -0
- package/build/common/panel/Panel.mjs.map +1 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.js +21 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.js.map +1 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.mjs +19 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.mjs.map +1 -0
- package/build/common/preventScroll/PreventScroll.js +11 -0
- package/build/common/preventScroll/PreventScroll.js.map +1 -0
- package/build/common/preventScroll/PreventScroll.mjs +9 -0
- package/build/common/preventScroll/PreventScroll.mjs.map +1 -0
- package/build/common/propsValues/breakpoint.js +12 -0
- package/build/common/propsValues/breakpoint.js.map +1 -0
- package/build/common/propsValues/breakpoint.mjs +12 -0
- package/build/common/propsValues/breakpoint.mjs.map +1 -0
- package/build/common/propsValues/control.js +15 -0
- package/build/common/propsValues/control.js.map +1 -0
- package/build/common/propsValues/control.mjs +15 -0
- package/build/common/propsValues/control.mjs.map +1 -0
- package/build/common/propsValues/dateMode.js +8 -0
- package/build/common/propsValues/dateMode.js.map +1 -0
- package/build/common/propsValues/dateMode.mjs +8 -0
- package/build/common/propsValues/dateMode.mjs.map +1 -0
- package/build/common/propsValues/layouts.js +13 -0
- package/build/common/propsValues/layouts.js.map +1 -0
- package/build/common/propsValues/layouts.mjs +13 -0
- package/build/common/propsValues/layouts.mjs.map +1 -0
- package/build/common/propsValues/markdownNodeType.js +22 -0
- package/build/common/propsValues/markdownNodeType.js.map +1 -0
- package/build/common/propsValues/markdownNodeType.mjs +22 -0
- package/build/common/propsValues/markdownNodeType.mjs.map +1 -0
- package/build/common/propsValues/monthFormat.js +8 -0
- package/build/common/propsValues/monthFormat.js.map +1 -0
- package/build/common/propsValues/monthFormat.mjs +8 -0
- package/build/common/propsValues/monthFormat.mjs.map +1 -0
- package/build/common/propsValues/position.js +15 -0
- package/build/common/propsValues/position.js.map +1 -0
- package/build/common/propsValues/position.mjs +15 -0
- package/build/common/propsValues/position.mjs.map +1 -0
- package/build/common/propsValues/profileType.js +8 -0
- package/build/common/propsValues/profileType.js.map +1 -0
- package/build/common/propsValues/profileType.mjs +8 -0
- package/build/common/propsValues/profileType.mjs.map +1 -0
- package/build/common/propsValues/scroll.js +8 -0
- package/build/common/propsValues/scroll.js.map +1 -0
- package/build/common/propsValues/scroll.mjs +8 -0
- package/build/common/propsValues/scroll.mjs.map +1 -0
- package/build/common/propsValues/sentiment.js +23 -0
- package/build/common/propsValues/sentiment.js.map +1 -0
- package/build/common/propsValues/sentiment.mjs +23 -0
- package/build/common/propsValues/sentiment.mjs.map +1 -0
- package/build/common/propsValues/size.js +11 -0
- package/build/common/propsValues/size.js.map +1 -0
- package/build/common/propsValues/size.mjs +11 -0
- package/build/common/propsValues/size.mjs.map +1 -0
- package/build/common/propsValues/status.js +13 -0
- package/build/common/propsValues/status.js.map +1 -0
- package/build/common/propsValues/status.mjs +13 -0
- package/build/common/propsValues/status.mjs.map +1 -0
- package/build/common/propsValues/type.js +17 -0
- package/build/common/propsValues/type.js.map +1 -0
- package/build/common/propsValues/type.mjs +17 -0
- package/build/common/propsValues/type.mjs.map +1 -0
- package/build/common/propsValues/typography.js +25 -0
- package/build/common/propsValues/typography.js.map +1 -0
- package/build/common/propsValues/typography.mjs +25 -0
- package/build/common/propsValues/typography.mjs.map +1 -0
- package/build/common/propsValues/variant.js +8 -0
- package/build/common/propsValues/variant.js.map +1 -0
- package/build/common/propsValues/variant.mjs +8 -0
- package/build/common/propsValues/variant.mjs.map +1 -0
- package/build/common/propsValues/width.js +8 -0
- package/build/common/propsValues/width.js.map +1 -0
- package/build/common/propsValues/width.mjs +8 -0
- package/build/common/propsValues/width.mjs.map +1 -0
- package/build/common/responsivePanel/ResponsivePanel.js +45 -0
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -0
- package/build/common/responsivePanel/ResponsivePanel.mjs +43 -0
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js +27 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js.map +1 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs +25 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs.map +1 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +8 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js.map +1 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.mjs +6 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.mjs.map +1 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +30 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js.map +1 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs +28 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs.map +1 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +32 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js.map +1 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs +29 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs.map +1 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +18 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js.map +1 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs +16 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs.map +1 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js +14 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js.map +1 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs +12 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs.map +1 -0
- package/build/common/theme.js +13 -0
- package/build/common/theme.js.map +1 -0
- package/build/common/theme.mjs +13 -0
- package/build/common/theme.mjs.map +1 -0
- package/build/criticalBanner/CriticalCommsBanner.js +77 -0
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -0
- package/build/criticalBanner/CriticalCommsBanner.mjs +71 -0
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -0
- package/build/dateInput/DateInput.js +329 -0
- package/build/dateInput/DateInput.js.map +1 -0
- package/build/dateInput/DateInput.messages.js +24 -0
- package/build/dateInput/DateInput.messages.js.map +1 -0
- package/build/dateInput/DateInput.messages.mjs +22 -0
- package/build/dateInput/DateInput.messages.mjs.map +1 -0
- package/build/dateInput/DateInput.mjs +323 -0
- package/build/dateInput/DateInput.mjs.map +1 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +9 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js.map +1 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs +7 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs.map +1 -0
- package/build/dateLookup/DateLookup.js +339 -0
- package/build/dateLookup/DateLookup.js.map +1 -0
- package/build/dateLookup/DateLookup.messages.js +33 -0
- package/build/dateLookup/DateLookup.messages.js.map +1 -0
- package/build/dateLookup/DateLookup.messages.mjs +31 -0
- package/build/dateLookup/DateLookup.messages.mjs.map +1 -0
- package/build/dateLookup/DateLookup.mjs +333 -0
- package/build/dateLookup/DateLookup.mjs.map +1 -0
- package/build/dateLookup/dateHeader/DateHeader.js +73 -0
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -0
- package/build/dateLookup/dateHeader/DateHeader.mjs +67 -0
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.js +70 -0
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js +12 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs +10 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +68 -0
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -0
- package/build/dateLookup/dayCalendar/DayCalendar.js +71 -0
- package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -0
- package/build/dateLookup/dayCalendar/DayCalendar.mjs +69 -0
- package/build/dateLookup/dayCalendar/DayCalendar.mjs.map +1 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +150 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +148 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.js +8 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.js.map +1 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.mjs +6 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.mjs.map +1 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.js +15 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.js.map +1 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.mjs +13 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.mjs.map +1 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.js +64 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.mjs +62 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.mjs.map +1 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js +83 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs +81 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -0
- package/build/dateLookup/tableLink/TableLink.js +65 -0
- package/build/dateLookup/tableLink/TableLink.js.map +1 -0
- package/build/dateLookup/tableLink/TableLink.mjs +59 -0
- package/build/dateLookup/tableLink/TableLink.mjs.map +1 -0
- package/build/dateLookup/yearCalendar/YearCalendar.js +57 -0
- package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -0
- package/build/dateLookup/yearCalendar/YearCalendar.mjs +55 -0
- package/build/dateLookup/yearCalendar/YearCalendar.mjs.map +1 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js +83 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs +81 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -0
- package/build/decision/Decision.js +108 -0
- package/build/decision/Decision.js.map +1 -0
- package/build/decision/Decision.mjs +100 -0
- package/build/decision/Decision.mjs.map +1 -0
- package/build/definitionList/DefinitionList.js +72 -0
- package/build/definitionList/DefinitionList.js.map +1 -0
- package/build/definitionList/DefinitionList.mjs +66 -0
- package/build/definitionList/DefinitionList.mjs.map +1 -0
- package/build/dimmer/Dimmer.js +184 -0
- package/build/dimmer/Dimmer.js.map +1 -0
- package/build/dimmer/Dimmer.mjs +172 -0
- package/build/dimmer/Dimmer.mjs.map +1 -0
- package/build/dimmer/dimmerManager/DimmerManager.js +36 -0
- package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -0
- package/build/dimmer/dimmerManager/DimmerManager.mjs +34 -0
- package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -0
- package/build/display/Display.js +26 -0
- package/build/display/Display.js.map +1 -0
- package/build/display/Display.mjs +20 -0
- package/build/display/Display.mjs.map +1 -0
- package/build/drawer/Drawer.js +68 -0
- package/build/drawer/Drawer.js.map +1 -0
- package/build/drawer/Drawer.mjs +62 -0
- package/build/drawer/Drawer.mjs.map +1 -0
- package/build/dropFade/DropFade.js +48 -0
- package/build/dropFade/DropFade.js.map +1 -0
- package/build/dropFade/DropFade.mjs +42 -0
- package/build/dropFade/DropFade.mjs.map +1 -0
- package/build/emphasis/Emphasis.js +24 -0
- package/build/emphasis/Emphasis.js.map +1 -0
- package/build/emphasis/Emphasis.mjs +22 -0
- package/build/emphasis/Emphasis.mjs.map +1 -0
- package/build/emphasis/EmphasisHtmlTransformer.js +39 -0
- package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -0
- package/build/emphasis/EmphasisHtmlTransformer.mjs +37 -0
- package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -0
- package/build/field/Field.js +63 -0
- package/build/field/Field.js.map +1 -0
- package/build/field/Field.mjs +57 -0
- package/build/field/Field.mjs.map +1 -0
- package/build/flowNavigation/FlowNavigation.js +80 -0
- package/build/flowNavigation/FlowNavigation.js.map +1 -0
- package/build/flowNavigation/FlowNavigation.messages.js +12 -0
- package/build/flowNavigation/FlowNavigation.messages.js.map +1 -0
- package/build/flowNavigation/FlowNavigation.messages.mjs +10 -0
- package/build/flowNavigation/FlowNavigation.messages.mjs.map +1 -0
- package/build/flowNavigation/FlowNavigation.mjs +74 -0
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js +34 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs +28 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -0
- package/build/flowNavigation/backButton/BackButton.js +34 -0
- package/build/flowNavigation/backButton/BackButton.js.map +1 -0
- package/build/flowNavigation/backButton/BackButton.mjs +28 -0
- package/build/flowNavigation/backButton/BackButton.mjs.map +1 -0
- package/build/header/Header.js +87 -0
- package/build/header/Header.js.map +1 -0
- package/build/header/Header.mjs +78 -0
- package/build/header/Header.mjs.map +1 -0
- package/build/i18n/cs.json.js +61 -0
- package/build/i18n/cs.json.js.map +1 -0
- package/build/i18n/cs.json.mjs +59 -0
- package/build/i18n/cs.json.mjs.map +1 -0
- package/build/i18n/de.json.js +62 -0
- package/build/i18n/de.json.js.map +1 -0
- package/build/i18n/de.json.mjs +60 -0
- package/build/i18n/de.json.mjs.map +1 -0
- package/build/i18n/en.json.js +62 -0
- package/build/i18n/en.json.js.map +1 -0
- package/build/i18n/en.json.mjs +60 -0
- package/build/i18n/en.json.mjs.map +1 -0
- package/build/i18n/es.json.js +62 -0
- package/build/i18n/es.json.js.map +1 -0
- package/build/i18n/es.json.mjs +60 -0
- package/build/i18n/es.json.mjs.map +1 -0
- package/build/i18n/fr.json.js +62 -0
- package/build/i18n/fr.json.js.map +1 -0
- package/build/i18n/fr.json.mjs +60 -0
- package/build/i18n/fr.json.mjs.map +1 -0
- package/build/i18n/hu.json.js +62 -0
- package/build/i18n/hu.json.js.map +1 -0
- package/build/i18n/hu.json.mjs +60 -0
- package/build/i18n/hu.json.mjs.map +1 -0
- package/build/i18n/id.json.js +62 -0
- package/build/i18n/id.json.js.map +1 -0
- package/build/i18n/id.json.mjs +60 -0
- package/build/i18n/id.json.mjs.map +1 -0
- package/build/i18n/index.js +45 -0
- package/build/i18n/index.js.map +1 -0
- package/build/i18n/index.mjs +43 -0
- package/build/i18n/index.mjs.map +1 -0
- package/build/i18n/it.json.js +62 -0
- package/build/i18n/it.json.js.map +1 -0
- package/build/i18n/it.json.mjs +60 -0
- package/build/i18n/it.json.mjs.map +1 -0
- package/build/i18n/ja.json.js +62 -0
- package/build/i18n/ja.json.js.map +1 -0
- package/build/i18n/ja.json.mjs +60 -0
- package/build/i18n/ja.json.mjs.map +1 -0
- package/build/i18n/pl.json.js +62 -0
- package/build/i18n/pl.json.js.map +1 -0
- package/build/i18n/pl.json.mjs +60 -0
- package/build/i18n/pl.json.mjs.map +1 -0
- package/build/i18n/pt.json.js +62 -0
- package/build/i18n/pt.json.js.map +1 -0
- package/build/i18n/pt.json.mjs +60 -0
- package/build/i18n/pt.json.mjs.map +1 -0
- package/build/i18n/ro.json.js +62 -0
- package/build/i18n/ro.json.js.map +1 -0
- package/build/i18n/ro.json.mjs +60 -0
- package/build/i18n/ro.json.mjs.map +1 -0
- package/build/i18n/ru.json.js +62 -0
- package/build/i18n/ru.json.js.map +1 -0
- package/build/i18n/ru.json.mjs +60 -0
- package/build/i18n/ru.json.mjs.map +1 -0
- package/build/i18n/th.json.js +62 -0
- package/build/i18n/th.json.js.map +1 -0
- package/build/i18n/th.json.mjs +60 -0
- package/build/i18n/th.json.mjs.map +1 -0
- package/build/i18n/tr.json.js +62 -0
- package/build/i18n/tr.json.js.map +1 -0
- package/build/i18n/tr.json.mjs +60 -0
- package/build/i18n/tr.json.mjs.map +1 -0
- package/build/i18n/uk.json.js +61 -0
- package/build/i18n/uk.json.js.map +1 -0
- package/build/i18n/uk.json.mjs +59 -0
- package/build/i18n/uk.json.mjs.map +1 -0
- package/build/i18n/zh-CN.json.js +62 -0
- package/build/i18n/zh-CN.json.js.map +1 -0
- package/build/i18n/zh-CN.json.mjs +60 -0
- package/build/i18n/zh-CN.json.mjs.map +1 -0
- package/build/i18n/zh-HK.json.js +62 -0
- package/build/i18n/zh-HK.json.js.map +1 -0
- package/build/i18n/zh-HK.json.mjs +60 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -0
- package/build/image/Image.js +55 -0
- package/build/image/Image.js.map +1 -0
- package/build/image/Image.mjs +46 -0
- package/build/image/Image.mjs.map +1 -0
- package/build/index.js +278 -14434
- package/build/index.js.map +1 -1
- package/build/index.mjs +118 -14359
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +80 -0
- package/build/info/Info.js.map +1 -0
- package/build/info/Info.messages.js +12 -0
- package/build/info/Info.messages.js.map +1 -0
- package/build/info/Info.messages.mjs +10 -0
- package/build/info/Info.messages.mjs.map +1 -0
- package/build/info/Info.mjs +74 -0
- package/build/info/Info.mjs.map +1 -0
- package/build/info/infoPresentations.js +9 -0
- package/build/info/infoPresentations.js.map +1 -0
- package/build/info/infoPresentations.mjs +9 -0
- package/build/info/infoPresentations.mjs.map +1 -0
- package/build/inlineAlert/InlineAlert.js +35 -0
- package/build/inlineAlert/InlineAlert.js.map +1 -0
- package/build/inlineAlert/InlineAlert.mjs +29 -0
- package/build/inlineAlert/InlineAlert.mjs.map +1 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js +15 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js.map +1 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.mjs +13 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.mjs.map +1 -0
- package/build/inputs/Input.js +39 -0
- package/build/inputs/Input.js.map +1 -0
- package/build/inputs/Input.mjs +33 -0
- package/build/inputs/Input.mjs.map +1 -0
- package/build/inputs/InputGroup.js +116 -0
- package/build/inputs/InputGroup.js.map +1 -0
- package/build/inputs/InputGroup.mjs +109 -0
- package/build/inputs/InputGroup.mjs.map +1 -0
- package/build/inputs/SearchInput.js +38 -0
- package/build/inputs/SearchInput.js.map +1 -0
- package/build/inputs/SearchInput.mjs +36 -0
- package/build/inputs/SearchInput.mjs.map +1 -0
- package/build/inputs/SelectInput.js +585 -0
- package/build/inputs/SelectInput.js.map +1 -0
- package/build/inputs/SelectInput.messages.js +12 -0
- package/build/inputs/SelectInput.messages.js.map +1 -0
- package/build/inputs/SelectInput.messages.mjs +10 -0
- package/build/inputs/SelectInput.messages.mjs.map +1 -0
- package/build/inputs/SelectInput.mjs +576 -0
- package/build/inputs/SelectInput.mjs.map +1 -0
- package/build/inputs/TextArea.js +27 -0
- package/build/inputs/TextArea.js.map +1 -0
- package/build/inputs/TextArea.mjs +21 -0
- package/build/inputs/TextArea.mjs.map +1 -0
- package/build/inputs/_BottomSheet.js +115 -0
- package/build/inputs/_BottomSheet.js.map +1 -0
- package/build/inputs/_BottomSheet.mjs +109 -0
- package/build/inputs/_BottomSheet.mjs.map +1 -0
- package/build/inputs/_ButtonInput.js +37 -0
- package/build/inputs/_ButtonInput.js.map +1 -0
- package/build/inputs/_ButtonInput.mjs +31 -0
- package/build/inputs/_ButtonInput.mjs.map +1 -0
- package/build/inputs/_Popover.js +120 -0
- package/build/inputs/_Popover.js.map +1 -0
- package/build/inputs/_Popover.mjs +114 -0
- package/build/inputs/_Popover.mjs.map +1 -0
- package/build/inputs/_common.js +23 -0
- package/build/inputs/_common.js.map +1 -0
- package/build/inputs/_common.mjs +17 -0
- package/build/inputs/_common.mjs.map +1 -0
- package/build/inputs/contexts.js +42 -0
- package/build/inputs/contexts.js.map +1 -0
- package/build/inputs/contexts.mjs +35 -0
- package/build/inputs/contexts.mjs.map +1 -0
- package/build/instructionsList/InstructionsList.js +66 -0
- package/build/instructionsList/InstructionsList.js.map +1 -0
- package/build/instructionsList/InstructionsList.mjs +60 -0
- package/build/instructionsList/InstructionsList.mjs.map +1 -0
- package/build/label/Label.js +25 -0
- package/build/label/Label.js.map +1 -0
- package/build/label/Label.mjs +19 -0
- package/build/label/Label.mjs.map +1 -0
- package/build/link/Link.js +42 -0
- package/build/link/Link.js.map +1 -0
- package/build/link/Link.messages.js +12 -0
- package/build/link/Link.messages.js.map +1 -0
- package/build/link/Link.messages.mjs +10 -0
- package/build/link/Link.messages.mjs.map +1 -0
- package/build/link/Link.mjs +36 -0
- package/build/link/Link.mjs.map +1 -0
- package/build/listItem/ListItem.js +50 -0
- package/build/listItem/ListItem.js.map +1 -0
- package/build/listItem/ListItem.mjs +44 -0
- package/build/listItem/ListItem.mjs.map +1 -0
- package/build/loader/Loader.js +68 -0
- package/build/loader/Loader.js.map +1 -0
- package/build/loader/Loader.mjs +62 -0
- package/build/loader/Loader.mjs.map +1 -0
- package/build/logo/Logo.js +176 -0
- package/build/logo/Logo.js.map +1 -0
- package/build/logo/Logo.mjs +168 -0
- package/build/logo/Logo.mjs.map +1 -0
- package/build/markdown/Markdown.js +75 -0
- package/build/markdown/Markdown.js.map +1 -0
- package/build/markdown/Markdown.mjs +69 -0
- package/build/markdown/Markdown.mjs.map +1 -0
- package/build/modal/Modal.js +113 -0
- package/build/modal/Modal.js.map +1 -0
- package/build/modal/Modal.mjs +107 -0
- package/build/modal/Modal.mjs.map +1 -0
- package/build/money/Money.js +20 -0
- package/build/money/Money.js.map +1 -0
- package/build/money/Money.mjs +18 -0
- package/build/money/Money.mjs.map +1 -0
- package/build/moneyInput/MoneyInput.js +369 -0
- package/build/moneyInput/MoneyInput.js.map +1 -0
- package/build/moneyInput/MoneyInput.messages.js +12 -0
- package/build/moneyInput/MoneyInput.messages.js.map +1 -0
- package/build/moneyInput/MoneyInput.messages.mjs +10 -0
- package/build/moneyInput/MoneyInput.messages.mjs.map +1 -0
- package/build/moneyInput/MoneyInput.mjs +363 -0
- package/build/moneyInput/MoneyInput.mjs.map +1 -0
- package/build/moneyInput/currencyFormatting.js +70 -0
- package/build/moneyInput/currencyFormatting.js.map +1 -0
- package/build/moneyInput/currencyFormatting.mjs +64 -0
- package/build/moneyInput/currencyFormatting.mjs.map +1 -0
- package/build/navigationOption/NavigationOption.js +48 -0
- package/build/navigationOption/NavigationOption.js.map +1 -0
- package/build/navigationOption/NavigationOption.mjs +42 -0
- package/build/navigationOption/NavigationOption.mjs.map +1 -0
- package/build/navigationOptionsList/NavigationOptionsList.js +19 -0
- package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -0
- package/build/navigationOptionsList/NavigationOptionsList.mjs +17 -0
- package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -0
- package/build/nudge/Nudge.js +121 -0
- package/build/nudge/Nudge.js.map +1 -0
- package/build/nudge/Nudge.mjs +112 -0
- package/build/nudge/Nudge.mjs.map +1 -0
- package/build/overlayHeader/OverlayHeader.js +40 -0
- package/build/overlayHeader/OverlayHeader.js.map +1 -0
- package/build/overlayHeader/OverlayHeader.mjs +34 -0
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.js +161 -0
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.js +12 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.js.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs +10 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.mjs +159 -0
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -0
- package/build/phoneNumberInput/data/countries.js +1278 -0
- package/build/phoneNumberInput/data/countries.js.map +1 -0
- package/build/phoneNumberInput/data/countries.mjs +1276 -0
- package/build/phoneNumberInput/data/countries.mjs.map +1 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.js +7 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.js.map +1 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.mjs +5 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.mjs.map +1 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.js +19 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.js.map +1 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.mjs +17 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.mjs.map +1 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.js +21 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.js.map +1 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs +19 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.js +17 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.js.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.mjs +15 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js +17 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs +15 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +12 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js.map +1 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs +10 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs.map +1 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +11 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js.map +1 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.mjs +9 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.mjs.map +1 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.js +6 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.js.map +1 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.mjs +4 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.js +22 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.js.map +1 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.mjs +20 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +8 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js.map +1 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs +6 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs.map +1 -0
- package/build/popover/Popover.js +79 -0
- package/build/popover/Popover.js.map +1 -0
- package/build/popover/Popover.mjs +73 -0
- package/build/popover/Popover.mjs.map +1 -0
- package/build/processIndicator/ProcessIndicator.js +120 -0
- package/build/processIndicator/ProcessIndicator.js.map +1 -0
- package/build/processIndicator/ProcessIndicator.mjs +114 -0
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -0
- package/build/progress/Progress.js +24 -0
- package/build/progress/Progress.js.map +1 -0
- package/build/progress/Progress.mjs +18 -0
- package/build/progress/Progress.mjs.map +1 -0
- package/build/progressBar/ProgressBar.js +51 -0
- package/build/progressBar/ProgressBar.js.map +1 -0
- package/build/progressBar/ProgressBar.mjs +45 -0
- package/build/progressBar/ProgressBar.mjs.map +1 -0
- package/build/promoCard/PromoCard.js +189 -0
- package/build/promoCard/PromoCard.js.map +1 -0
- package/build/promoCard/PromoCard.mjs +182 -0
- package/build/promoCard/PromoCard.mjs.map +1 -0
- package/build/promoCard/PromoCardContext.js +33 -0
- package/build/promoCard/PromoCardContext.js.map +1 -0
- package/build/promoCard/PromoCardContext.mjs +27 -0
- package/build/promoCard/PromoCardContext.mjs.map +1 -0
- package/build/promoCard/PromoCardGroup.js +80 -0
- package/build/promoCard/PromoCardGroup.js.map +1 -0
- package/build/promoCard/PromoCardGroup.mjs +73 -0
- package/build/promoCard/PromoCardGroup.mjs.map +1 -0
- package/build/promoCard/PromoCardIndicator.js +53 -0
- package/build/promoCard/PromoCardIndicator.js.map +1 -0
- package/build/promoCard/PromoCardIndicator.mjs +47 -0
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -0
- package/build/provider/Provider.js +53 -0
- package/build/provider/Provider.js.map +1 -0
- package/build/provider/Provider.mjs +51 -0
- package/build/provider/Provider.mjs.map +1 -0
- package/build/provider/direction/DirectionProvider.js +20 -0
- package/build/provider/direction/DirectionProvider.js.map +1 -0
- package/build/provider/direction/DirectionProvider.mjs +17 -0
- package/build/provider/direction/DirectionProvider.mjs.map +1 -0
- package/build/provider/language/LanguageProvider.js +20 -0
- package/build/provider/language/LanguageProvider.js.map +1 -0
- package/build/provider/language/LanguageProvider.mjs +17 -0
- package/build/provider/language/LanguageProvider.mjs.map +1 -0
- package/build/radio/Radio.js +63 -0
- package/build/radio/Radio.js.map +1 -0
- package/build/radio/Radio.mjs +57 -0
- package/build/radio/Radio.mjs.map +1 -0
- package/build/radioGroup/RadioGroup.js +40 -0
- package/build/radioGroup/RadioGroup.js.map +1 -0
- package/build/radioGroup/RadioGroup.mjs +38 -0
- package/build/radioGroup/RadioGroup.mjs.map +1 -0
- package/build/radioOption/RadioOption.js +46 -0
- package/build/radioOption/RadioOption.js.map +1 -0
- package/build/radioOption/RadioOption.mjs +44 -0
- package/build/radioOption/RadioOption.mjs.map +1 -0
- package/build/section/Section.js +24 -0
- package/build/section/Section.js.map +1 -0
- package/build/section/Section.mjs +18 -0
- package/build/section/Section.mjs.map +1 -0
- package/build/segmentedControl/SegmentedControl.js +115 -0
- package/build/segmentedControl/SegmentedControl.js.map +1 -0
- package/build/segmentedControl/SegmentedControl.mjs +109 -0
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -0
- package/build/select/Select.js +579 -0
- package/build/select/Select.js.map +1 -0
- package/build/select/Select.messages.js +12 -0
- package/build/select/Select.messages.js.map +1 -0
- package/build/select/Select.messages.mjs +10 -0
- package/build/select/Select.messages.mjs.map +1 -0
- package/build/select/Select.mjs +572 -0
- package/build/select/Select.mjs.map +1 -0
- package/build/select/index.js +8 -0
- package/build/select/index.js.map +1 -0
- package/build/select/index.mjs +6 -0
- package/build/select/index.mjs.map +1 -0
- package/build/select/option/Option.js +58 -0
- package/build/select/option/Option.js.map +1 -0
- package/build/select/option/Option.mjs +52 -0
- package/build/select/option/Option.mjs.map +1 -0
- package/build/select/option/index.js +8 -0
- package/build/select/option/index.js.map +1 -0
- package/build/select/option/index.mjs +6 -0
- package/build/select/option/index.mjs.map +1 -0
- package/build/select/searchBox/SearchBox.js +54 -0
- package/build/select/searchBox/SearchBox.js.map +1 -0
- package/build/select/searchBox/SearchBox.mjs +48 -0
- package/build/select/searchBox/SearchBox.mjs.map +1 -0
- package/build/slidingPanel/SlidingPanel.js +51 -0
- package/build/slidingPanel/SlidingPanel.js.map +1 -0
- package/build/slidingPanel/SlidingPanel.mjs +42 -0
- package/build/slidingPanel/SlidingPanel.mjs.map +1 -0
- package/build/snackbar/Snackbar.js +128 -0
- package/build/snackbar/Snackbar.js.map +1 -0
- package/build/snackbar/Snackbar.mjs +123 -0
- package/build/snackbar/Snackbar.mjs.map +1 -0
- package/build/snackbar/SnackbarContext.js +12 -0
- package/build/snackbar/SnackbarContext.js.map +1 -0
- package/build/snackbar/SnackbarContext.mjs +9 -0
- package/build/snackbar/SnackbarContext.mjs.map +1 -0
- package/build/snackbar/SnackbarProvider.js +48 -0
- package/build/snackbar/SnackbarProvider.js.map +1 -0
- package/build/snackbar/SnackbarProvider.mjs +46 -0
- package/build/snackbar/SnackbarProvider.mjs.map +1 -0
- package/build/snackbar/useSnackbar.js +14 -0
- package/build/snackbar/useSnackbar.js.map +1 -0
- package/build/snackbar/useSnackbar.mjs +12 -0
- package/build/snackbar/useSnackbar.mjs.map +1 -0
- package/build/statusIcon/StatusIcon.js +37 -0
- package/build/statusIcon/StatusIcon.js.map +1 -0
- package/build/statusIcon/StatusIcon.mjs +31 -0
- package/build/statusIcon/StatusIcon.mjs.map +1 -0
- package/build/stepper/Stepper.js +80 -0
- package/build/stepper/Stepper.js.map +1 -0
- package/build/stepper/Stepper.mjs +74 -0
- package/build/stepper/Stepper.mjs.map +1 -0
- package/build/stepper/deviceDetection.js +22 -0
- package/build/stepper/deviceDetection.js.map +1 -0
- package/build/stepper/deviceDetection.mjs +20 -0
- package/build/stepper/deviceDetection.mjs.map +1 -0
- package/build/sticky/Sticky.js +24 -0
- package/build/sticky/Sticky.js.map +1 -0
- package/build/sticky/Sticky.mjs +22 -0
- package/build/sticky/Sticky.mjs.map +1 -0
- package/build/summary/Summary.js +119 -0
- package/build/summary/Summary.js.map +1 -0
- package/build/summary/Summary.messages.js +18 -0
- package/build/summary/Summary.messages.js.map +1 -0
- package/build/summary/Summary.messages.mjs +16 -0
- package/build/summary/Summary.messages.mjs.map +1 -0
- package/build/summary/Summary.mjs +113 -0
- package/build/summary/Summary.mjs.map +1 -0
- package/build/switch/Switch.js +82 -0
- package/build/switch/Switch.js.map +1 -0
- package/build/switch/Switch.mjs +76 -0
- package/build/switch/Switch.mjs.map +1 -0
- package/build/switchOption/SwitchOption.js +59 -0
- package/build/switchOption/SwitchOption.js.map +1 -0
- package/build/switchOption/SwitchOption.mjs +57 -0
- package/build/switchOption/SwitchOption.mjs.map +1 -0
- package/build/tabs/Tab.js +81 -0
- package/build/tabs/Tab.js.map +1 -0
- package/build/tabs/Tab.mjs +74 -0
- package/build/tabs/Tab.mjs.map +1 -0
- package/build/tabs/TabList.js +24 -0
- package/build/tabs/TabList.js.map +1 -0
- package/build/tabs/TabList.mjs +18 -0
- package/build/tabs/TabList.mjs.map +1 -0
- package/build/tabs/TabPanel.js +35 -0
- package/build/tabs/TabPanel.js.map +1 -0
- package/build/tabs/TabPanel.mjs +29 -0
- package/build/tabs/TabPanel.mjs.map +1 -0
- package/build/tabs/Tabs.js +541 -0
- package/build/tabs/Tabs.js.map +1 -0
- package/build/tabs/Tabs.mjs +533 -0
- package/build/tabs/Tabs.mjs.map +1 -0
- package/build/tabs/utils.js +50 -0
- package/build/tabs/utils.js.map +1 -0
- package/build/tabs/utils.mjs +42 -0
- package/build/tabs/utils.mjs.map +1 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +15 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js.map +1 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.mjs +13 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.mjs.map +1 -0
- package/build/tile/Tile.js +58 -0
- package/build/tile/Tile.js.map +1 -0
- package/build/tile/Tile.mjs +52 -0
- package/build/tile/Tile.mjs.map +1 -0
- package/build/title/Title.js +42 -0
- package/build/title/Title.js.map +1 -0
- package/build/title/Title.mjs +36 -0
- package/build/title/Title.mjs.map +1 -0
- package/build/tooltip/Tooltip.js +103 -0
- package/build/tooltip/Tooltip.js.map +1 -0
- package/build/tooltip/Tooltip.mjs +97 -0
- package/build/tooltip/Tooltip.mjs.map +1 -0
- package/build/typeahead/Typeahead.js +468 -0
- package/build/typeahead/Typeahead.js.map +1 -0
- package/build/typeahead/Typeahead.mjs +460 -0
- package/build/typeahead/Typeahead.mjs.map +1 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.js +120 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +114 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.js +49 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs +43 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -0
- package/build/typeahead/util/highlight.js +21 -0
- package/build/typeahead/util/highlight.js.map +1 -0
- package/build/typeahead/util/highlight.mjs +19 -0
- package/build/typeahead/util/highlight.mjs.map +1 -0
- package/build/upload/Upload.js +366 -0
- package/build/upload/Upload.js.map +1 -0
- package/build/upload/Upload.messages.js +39 -0
- package/build/upload/Upload.messages.js.map +1 -0
- package/build/upload/Upload.messages.mjs +37 -0
- package/build/upload/Upload.messages.mjs.map +1 -0
- package/build/upload/Upload.mjs +356 -0
- package/build/upload/Upload.mjs.map +1 -0
- package/build/upload/steps/completeStep/completeStep.js +65 -0
- package/build/upload/steps/completeStep/completeStep.js.map +1 -0
- package/build/upload/steps/completeStep/completeStep.mjs +63 -0
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -0
- package/build/upload/steps/processingStep/processingStep.js +50 -0
- package/build/upload/steps/processingStep/processingStep.js.map +1 -0
- package/build/upload/steps/processingStep/processingStep.mjs +48 -0
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +88 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +86 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.js +17 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.js.map +1 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.mjs +15 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.mjs.map +1 -0
- package/build/upload/utils/getFileType/getFileType.js +18 -0
- package/build/upload/utils/getFileType/getFileType.js.map +1 -0
- package/build/upload/utils/getFileType/getFileType.mjs +16 -0
- package/build/upload/utils/getFileType/getFileType.mjs.map +1 -0
- package/build/upload/utils/isSizeValid/isSizeValid.js +8 -0
- package/build/upload/utils/isSizeValid/isSizeValid.js.map +1 -0
- package/build/upload/utils/isSizeValid/isSizeValid.mjs +6 -0
- package/build/upload/utils/isSizeValid/isSizeValid.mjs.map +1 -0
- package/build/upload/utils/isTypeValid/isTypeValid.js +21 -0
- package/build/upload/utils/isTypeValid/isTypeValid.js.map +1 -0
- package/build/upload/utils/isTypeValid/isTypeValid.mjs +19 -0
- package/build/upload/utils/isTypeValid/isTypeValid.mjs.map +1 -0
- package/build/upload/utils/postData/postData.js +31 -0
- package/build/upload/utils/postData/postData.js.map +1 -0
- package/build/upload/utils/postData/postData.mjs +28 -0
- package/build/upload/utils/postData/postData.mjs.map +1 -0
- package/build/uploadInput/UploadInput.js +259 -0
- package/build/uploadInput/UploadInput.js.map +1 -0
- package/build/uploadInput/UploadInput.messages.js +30 -0
- package/build/uploadInput/UploadInput.messages.js.map +1 -0
- package/build/uploadInput/UploadInput.messages.mjs +28 -0
- package/build/uploadInput/UploadInput.messages.mjs.map +1 -0
- package/build/uploadInput/UploadInput.mjs +253 -0
- package/build/uploadInput/UploadInput.mjs.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.js +186 -0
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.js +24 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.js.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.mjs +22 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.mjs.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.mjs +178 -0
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -0
- package/build/uploadInput/uploadButton/defaults.js +10 -0
- package/build/uploadInput/uploadButton/defaults.js.map +1 -0
- package/build/uploadInput/uploadButton/defaults.mjs +7 -0
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js +8 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs +6 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.js +174 -0
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.js +27 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.js.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.mjs +25 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.mjs.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.mjs +166 -0
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -0
- package/build/uploadInput/uploadItem/UploadItemBody.js +27 -0
- package/build/uploadInput/uploadItem/UploadItemBody.js.map +1 -0
- package/build/uploadInput/uploadItem/UploadItemBody.mjs +25 -0
- package/build/uploadInput/uploadItem/UploadItemBody.mjs.map +1 -0
- package/build/utilities/cssValueWithUnit.js +8 -0
- package/build/utilities/cssValueWithUnit.js.map +1 -0
- package/build/utilities/cssValueWithUnit.mjs +6 -0
- package/build/utilities/cssValueWithUnit.mjs.map +1 -0
- package/build/utilities/logActionRequired.js +17 -0
- package/build/utilities/logActionRequired.js.map +1 -0
- package/build/utilities/logActionRequired.mjs +14 -0
- package/build/utilities/logActionRequired.mjs.map +1 -0
- package/build/withDisplayFormat/WithDisplayFormat.js +304 -0
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -0
- package/build/withDisplayFormat/WithDisplayFormat.mjs +282 -0
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -0
- package/build/withNextPortal/withNextPortal.js +20 -0
- package/build/withNextPortal/withNextPortal.js.map +1 -0
- package/build/withNextPortal/withNextPortal.mjs +18 -0
- package/build/withNextPortal/withNextPortal.mjs.map +1 -0
- package/package.json +3 -2
- package/src/common/hooks/useVirtualKeyboard.ts +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactTransitionGroup = require('react-transition-group');
|
|
7
|
+
var ActionButton = require('../actionButton/ActionButton.js');
|
|
8
|
+
var Body = require('../body/Body.js');
|
|
9
|
+
var DirectionProvider = require('../provider/direction/DirectionProvider.js');
|
|
10
|
+
var withNextPortal = require('../withNextPortal/withNextPortal.js');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
|
|
13
|
+
const CSS_TRANSITION_DURATION = 400;
|
|
14
|
+
class Snackbar extends React.Component {
|
|
15
|
+
bodyRef = /*#__PURE__*/React.createRef();
|
|
16
|
+
timeout = 0;
|
|
17
|
+
transitionTimeout = 0;
|
|
18
|
+
constructor(props) {
|
|
19
|
+
super(props);
|
|
20
|
+
this.state = {
|
|
21
|
+
visible: false,
|
|
22
|
+
text: ''
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
componentWillUnmount() {
|
|
26
|
+
window.clearTimeout(this.timeout);
|
|
27
|
+
window.clearTimeout(this.transitionTimeout);
|
|
28
|
+
}
|
|
29
|
+
shouldComponentUpdate(nextProps, nextState) {
|
|
30
|
+
if (!nextProps.text) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
if (nextProps.timestamp === this.props.timestamp && nextState.visible === this.state.visible && nextState.text === this.state.text) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
setLeaveTimeout = () => {
|
|
39
|
+
const {
|
|
40
|
+
timeout
|
|
41
|
+
} = this.props;
|
|
42
|
+
this.timeout = window.setTimeout(() => {
|
|
43
|
+
this.setState({
|
|
44
|
+
visible: false
|
|
45
|
+
});
|
|
46
|
+
}, timeout);
|
|
47
|
+
};
|
|
48
|
+
componentDidUpdate(previousProps) {
|
|
49
|
+
const {
|
|
50
|
+
action,
|
|
51
|
+
text,
|
|
52
|
+
timestamp
|
|
53
|
+
} = this.props;
|
|
54
|
+
if (!previousProps.text) {
|
|
55
|
+
this.setState({
|
|
56
|
+
visible: true,
|
|
57
|
+
action,
|
|
58
|
+
text
|
|
59
|
+
}, () => {
|
|
60
|
+
this.setLeaveTimeout();
|
|
61
|
+
});
|
|
62
|
+
} else if (previousProps.timestamp !== timestamp) {
|
|
63
|
+
window.clearTimeout(this.timeout);
|
|
64
|
+
if (this.state.visible) {
|
|
65
|
+
this.setState({
|
|
66
|
+
visible: false
|
|
67
|
+
}, () => {
|
|
68
|
+
this.transitionTimeout = window.setTimeout(() => {
|
|
69
|
+
this.setState({
|
|
70
|
+
visible: true,
|
|
71
|
+
action,
|
|
72
|
+
text
|
|
73
|
+
});
|
|
74
|
+
this.setLeaveTimeout();
|
|
75
|
+
}, CSS_TRANSITION_DURATION);
|
|
76
|
+
});
|
|
77
|
+
} else {
|
|
78
|
+
this.setState({
|
|
79
|
+
visible: true,
|
|
80
|
+
action,
|
|
81
|
+
text
|
|
82
|
+
});
|
|
83
|
+
this.setLeaveTimeout();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
const {
|
|
89
|
+
action,
|
|
90
|
+
text,
|
|
91
|
+
visible
|
|
92
|
+
} = this.state;
|
|
93
|
+
const {
|
|
94
|
+
timeout
|
|
95
|
+
} = this.props;
|
|
96
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
97
|
+
className: "snackbar",
|
|
98
|
+
children: /*#__PURE__*/jsxRuntime.jsx(reactTransitionGroup.CSSTransition, {
|
|
99
|
+
nodeRef: this.bodyRef,
|
|
100
|
+
in: visible,
|
|
101
|
+
classNames: "snackbar__text-container",
|
|
102
|
+
timeout: {
|
|
103
|
+
appear: 0,
|
|
104
|
+
enter: timeout,
|
|
105
|
+
exit: CSS_TRANSITION_DURATION
|
|
106
|
+
},
|
|
107
|
+
unmountOnExit: true,
|
|
108
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Body, {
|
|
109
|
+
ref: this.bodyRef,
|
|
110
|
+
as: "span",
|
|
111
|
+
className: "snackbar__text",
|
|
112
|
+
"aria-live": "polite",
|
|
113
|
+
children: [text, action ? /*#__PURE__*/jsxRuntime.jsx(ActionButton, {
|
|
114
|
+
className: "snackbar__text__action",
|
|
115
|
+
onClick: action.onClick,
|
|
116
|
+
children: action.label
|
|
117
|
+
}) : null]
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
Snackbar.contextType = DirectionProvider.DirectionContext;
|
|
124
|
+
var SnackbarPortal = withNextPortal(Snackbar);
|
|
125
|
+
|
|
126
|
+
exports.Snackbar = Snackbar;
|
|
127
|
+
exports.default = SnackbarPortal;
|
|
128
|
+
//# sourceMappingURL=Snackbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Snackbar.js","sources":["../../src/snackbar/Snackbar.tsx"],"sourcesContent":["import { Component, createRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport ActionButton from '../actionButton';\nimport Body from '../body';\nimport { Theme, type ThemeDark, type ThemeLight } from '../common';\nimport { DirectionContext } from '../provider/direction';\nimport withNextPortal from '../withNextPortal/withNextPortal';\n\nconst CSS_TRANSITION_DURATION = 400;\n\nexport interface SnackbarProps {\n action?: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n text: React.ReactNode;\n /** @deprecated */\n theme?: ThemeLight | ThemeDark;\n timeout: number;\n timestamp: number;\n}\n\ninterface SnackbarState extends Pick<SnackbarProps, 'action' | 'text' | 'theme'> {\n visible: boolean;\n}\n\nexport class Snackbar extends Component<SnackbarProps, SnackbarState> {\n bodyRef = createRef<HTMLSpanElement>();\n timeout = 0;\n transitionTimeout = 0;\n\n constructor(props: SnackbarProps) {\n super(props);\n this.state = {\n visible: false,\n text: '',\n };\n }\n\n componentWillUnmount() {\n window.clearTimeout(this.timeout);\n window.clearTimeout(this.transitionTimeout);\n }\n\n shouldComponentUpdate(nextProps: SnackbarProps, nextState: SnackbarState) {\n if (!nextProps.text) {\n return false;\n }\n if (\n nextProps.timestamp === this.props.timestamp &&\n nextState.visible === this.state.visible &&\n nextState.text === this.state.text\n ) {\n return false;\n }\n\n return true;\n }\n\n setLeaveTimeout = () => {\n const { timeout } = this.props;\n\n this.timeout = window.setTimeout(() => {\n this.setState({ visible: false });\n }, timeout);\n };\n\n componentDidUpdate(previousProps: SnackbarProps) {\n const { action, text, timestamp } = this.props;\n\n if (!previousProps.text) {\n this.setState({ visible: true, action, text }, () => {\n this.setLeaveTimeout();\n });\n } else if (previousProps.timestamp !== timestamp) {\n window.clearTimeout(this.timeout);\n\n if (this.state.visible) {\n this.setState({ visible: false }, () => {\n this.transitionTimeout = window.setTimeout(() => {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }, CSS_TRANSITION_DURATION);\n });\n } else {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }\n }\n }\n\n render() {\n const { action, text, visible } = this.state;\n const { timeout } = this.props;\n\n return (\n <div className=\"snackbar\">\n <CSSTransition\n nodeRef={this.bodyRef}\n in={visible}\n classNames=\"snackbar__text-container\"\n timeout={{\n appear: 0,\n enter: timeout,\n exit: CSS_TRANSITION_DURATION,\n }}\n unmountOnExit\n >\n <Body ref={this.bodyRef} as=\"span\" className=\"snackbar__text\" aria-live=\"polite\">\n {text}\n {action ? (\n <ActionButton className=\"snackbar__text__action\" onClick={action.onClick}>\n {action.label}\n </ActionButton>\n ) : null}\n </Body>\n </CSSTransition>\n </div>\n );\n }\n}\n\nSnackbar.contextType = DirectionContext;\n\nexport default withNextPortal(Snackbar);\n"],"names":["CSS_TRANSITION_DURATION","Snackbar","Component","bodyRef","createRef","timeout","transitionTimeout","constructor","props","state","visible","text","componentWillUnmount","window","clearTimeout","shouldComponentUpdate","nextProps","nextState","timestamp","setLeaveTimeout","setTimeout","setState","componentDidUpdate","previousProps","action","render","_jsx","className","children","CSSTransition","nodeRef","in","classNames","appear","enter","exit","unmountOnExit","_jsxs","Body","ref","as","ActionButton","onClick","label","contextType","DirectionContext","withNextPortal"],"mappings":";;;;;;;;;;;;AASA,MAAMA,uBAAuB,GAAG,GAAG,CAAA;AAkB7B,MAAOC,QAAS,SAAQC,eAAuC,CAAA;EACnEC,OAAO,gBAAGC,eAAS,EAAmB,CAAA;AACtCC,EAAAA,OAAO,GAAG,CAAC,CAAA;AACXC,EAAAA,iBAAiB,GAAG,CAAC,CAAA;EAErBC,WAAAA,CAAYC,KAAoB,EAAA;IAC9B,KAAK,CAACA,KAAK,CAAC,CAAA;IACZ,IAAI,CAACC,KAAK,GAAG;AACXC,MAAAA,OAAO,EAAE,KAAK;AACdC,MAAAA,IAAI,EAAE,EAAA;KACP,CAAA;AACH,GAAA;AAEAC,EAAAA,oBAAoBA,GAAA;AAClBC,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACT,OAAO,CAAC,CAAA;AACjCQ,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACR,iBAAiB,CAAC,CAAA;AAC7C,GAAA;AAEAS,EAAAA,qBAAqBA,CAACC,SAAwB,EAAEC,SAAwB,EAAA;AACtE,IAAA,IAAI,CAACD,SAAS,CAACL,IAAI,EAAE;AACnB,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AACA,IAAA,IACEK,SAAS,CAACE,SAAS,KAAK,IAAI,CAACV,KAAK,CAACU,SAAS,IAC5CD,SAAS,CAACP,OAAO,KAAK,IAAI,CAACD,KAAK,CAACC,OAAO,IACxCO,SAAS,CAACN,IAAI,KAAK,IAAI,CAACF,KAAK,CAACE,IAAI,EAClC;AACA,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AAEA,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;EAEAQ,eAAe,GAAGA,MAAK;IACrB,MAAM;AAAEd,MAAAA,OAAAA;KAAS,GAAG,IAAI,CAACG,KAAK,CAAA;AAE9B,IAAA,IAAI,CAACH,OAAO,GAAGQ,MAAM,CAAC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
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Component, createRef } from 'react';
|
|
2
|
+
import { CSSTransition } from 'react-transition-group';
|
|
3
|
+
import ActionButton from '../actionButton/ActionButton.mjs';
|
|
4
|
+
import Body from '../body/Body.mjs';
|
|
5
|
+
import { DirectionContext } from '../provider/direction/DirectionProvider.mjs';
|
|
6
|
+
import withNextPortalWrapper from '../withNextPortal/withNextPortal.mjs';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
const CSS_TRANSITION_DURATION = 400;
|
|
10
|
+
class Snackbar extends Component {
|
|
11
|
+
bodyRef = /*#__PURE__*/createRef();
|
|
12
|
+
timeout = 0;
|
|
13
|
+
transitionTimeout = 0;
|
|
14
|
+
constructor(props) {
|
|
15
|
+
super(props);
|
|
16
|
+
this.state = {
|
|
17
|
+
visible: false,
|
|
18
|
+
text: ''
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
componentWillUnmount() {
|
|
22
|
+
window.clearTimeout(this.timeout);
|
|
23
|
+
window.clearTimeout(this.transitionTimeout);
|
|
24
|
+
}
|
|
25
|
+
shouldComponentUpdate(nextProps, nextState) {
|
|
26
|
+
if (!nextProps.text) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
if (nextProps.timestamp === this.props.timestamp && nextState.visible === this.state.visible && nextState.text === this.state.text) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
setLeaveTimeout = () => {
|
|
35
|
+
const {
|
|
36
|
+
timeout
|
|
37
|
+
} = this.props;
|
|
38
|
+
this.timeout = window.setTimeout(() => {
|
|
39
|
+
this.setState({
|
|
40
|
+
visible: false
|
|
41
|
+
});
|
|
42
|
+
}, timeout);
|
|
43
|
+
};
|
|
44
|
+
componentDidUpdate(previousProps) {
|
|
45
|
+
const {
|
|
46
|
+
action,
|
|
47
|
+
text,
|
|
48
|
+
timestamp
|
|
49
|
+
} = this.props;
|
|
50
|
+
if (!previousProps.text) {
|
|
51
|
+
this.setState({
|
|
52
|
+
visible: true,
|
|
53
|
+
action,
|
|
54
|
+
text
|
|
55
|
+
}, () => {
|
|
56
|
+
this.setLeaveTimeout();
|
|
57
|
+
});
|
|
58
|
+
} else if (previousProps.timestamp !== timestamp) {
|
|
59
|
+
window.clearTimeout(this.timeout);
|
|
60
|
+
if (this.state.visible) {
|
|
61
|
+
this.setState({
|
|
62
|
+
visible: false
|
|
63
|
+
}, () => {
|
|
64
|
+
this.transitionTimeout = window.setTimeout(() => {
|
|
65
|
+
this.setState({
|
|
66
|
+
visible: true,
|
|
67
|
+
action,
|
|
68
|
+
text
|
|
69
|
+
});
|
|
70
|
+
this.setLeaveTimeout();
|
|
71
|
+
}, CSS_TRANSITION_DURATION);
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
this.setState({
|
|
75
|
+
visible: true,
|
|
76
|
+
action,
|
|
77
|
+
text
|
|
78
|
+
});
|
|
79
|
+
this.setLeaveTimeout();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
render() {
|
|
84
|
+
const {
|
|
85
|
+
action,
|
|
86
|
+
text,
|
|
87
|
+
visible
|
|
88
|
+
} = this.state;
|
|
89
|
+
const {
|
|
90
|
+
timeout
|
|
91
|
+
} = this.props;
|
|
92
|
+
return /*#__PURE__*/jsx("div", {
|
|
93
|
+
className: "snackbar",
|
|
94
|
+
children: /*#__PURE__*/jsx(CSSTransition, {
|
|
95
|
+
nodeRef: this.bodyRef,
|
|
96
|
+
in: visible,
|
|
97
|
+
classNames: "snackbar__text-container",
|
|
98
|
+
timeout: {
|
|
99
|
+
appear: 0,
|
|
100
|
+
enter: timeout,
|
|
101
|
+
exit: CSS_TRANSITION_DURATION
|
|
102
|
+
},
|
|
103
|
+
unmountOnExit: true,
|
|
104
|
+
children: /*#__PURE__*/jsxs(Body, {
|
|
105
|
+
ref: this.bodyRef,
|
|
106
|
+
as: "span",
|
|
107
|
+
className: "snackbar__text",
|
|
108
|
+
"aria-live": "polite",
|
|
109
|
+
children: [text, action ? /*#__PURE__*/jsx(ActionButton, {
|
|
110
|
+
className: "snackbar__text__action",
|
|
111
|
+
onClick: action.onClick,
|
|
112
|
+
children: action.label
|
|
113
|
+
}) : null]
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
Snackbar.contextType = DirectionContext;
|
|
120
|
+
var SnackbarPortal = withNextPortalWrapper(Snackbar);
|
|
121
|
+
|
|
122
|
+
export { Snackbar, SnackbarPortal as default };
|
|
123
|
+
//# sourceMappingURL=Snackbar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Snackbar.mjs","sources":["../../src/snackbar/Snackbar.tsx"],"sourcesContent":["import { Component, createRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport ActionButton from '../actionButton';\nimport Body from '../body';\nimport { Theme, type ThemeDark, type ThemeLight } from '../common';\nimport { DirectionContext } from '../provider/direction';\nimport withNextPortal from '../withNextPortal/withNextPortal';\n\nconst CSS_TRANSITION_DURATION = 400;\n\nexport interface SnackbarProps {\n action?: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n text: React.ReactNode;\n /** @deprecated */\n theme?: ThemeLight | ThemeDark;\n timeout: number;\n timestamp: number;\n}\n\ninterface SnackbarState extends Pick<SnackbarProps, 'action' | 'text' | 'theme'> {\n visible: boolean;\n}\n\nexport class Snackbar extends Component<SnackbarProps, SnackbarState> {\n bodyRef = createRef<HTMLSpanElement>();\n timeout = 0;\n transitionTimeout = 0;\n\n constructor(props: SnackbarProps) {\n super(props);\n this.state = {\n visible: false,\n text: '',\n };\n }\n\n componentWillUnmount() {\n window.clearTimeout(this.timeout);\n window.clearTimeout(this.transitionTimeout);\n }\n\n shouldComponentUpdate(nextProps: SnackbarProps, nextState: SnackbarState) {\n if (!nextProps.text) {\n return false;\n }\n if (\n nextProps.timestamp === this.props.timestamp &&\n nextState.visible === this.state.visible &&\n nextState.text === this.state.text\n ) {\n return false;\n }\n\n return true;\n }\n\n setLeaveTimeout = () => {\n const { timeout } = this.props;\n\n this.timeout = window.setTimeout(() => {\n this.setState({ visible: false });\n }, timeout);\n };\n\n componentDidUpdate(previousProps: SnackbarProps) {\n const { action, text, timestamp } = this.props;\n\n if (!previousProps.text) {\n this.setState({ visible: true, action, text }, () => {\n this.setLeaveTimeout();\n });\n } else if (previousProps.timestamp !== timestamp) {\n window.clearTimeout(this.timeout);\n\n if (this.state.visible) {\n this.setState({ visible: false }, () => {\n this.transitionTimeout = window.setTimeout(() => {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }, CSS_TRANSITION_DURATION);\n });\n } else {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }\n }\n }\n\n render() {\n const { action, text, visible } = this.state;\n const { timeout } = this.props;\n\n return (\n <div className=\"snackbar\">\n <CSSTransition\n nodeRef={this.bodyRef}\n in={visible}\n classNames=\"snackbar__text-container\"\n timeout={{\n appear: 0,\n enter: timeout,\n exit: CSS_TRANSITION_DURATION,\n }}\n unmountOnExit\n >\n <Body ref={this.bodyRef} as=\"span\" className=\"snackbar__text\" aria-live=\"polite\">\n {text}\n {action ? (\n <ActionButton className=\"snackbar__text__action\" onClick={action.onClick}>\n {action.label}\n </ActionButton>\n ) : null}\n </Body>\n </CSSTransition>\n </div>\n );\n }\n}\n\nSnackbar.contextType = DirectionContext;\n\nexport default withNextPortal(Snackbar);\n"],"names":["CSS_TRANSITION_DURATION","Snackbar","Component","bodyRef","createRef","timeout","transitionTimeout","constructor","props","state","visible","text","componentWillUnmount","window","clearTimeout","shouldComponentUpdate","nextProps","nextState","timestamp","setLeaveTimeout","setTimeout","setState","componentDidUpdate","previousProps","action","render","_jsx","className","children","CSSTransition","nodeRef","in","classNames","appear","enter","exit","unmountOnExit","_jsxs","Body","ref","as","ActionButton","onClick","label","contextType","DirectionContext","withNextPortal"],"mappings":";;;;;;;;AASA,MAAMA,uBAAuB,GAAG,GAAG,CAAA;AAkB7B,MAAOC,QAAS,SAAQC,SAAuC,CAAA;EACnEC,OAAO,gBAAGC,SAAS,EAAmB,CAAA;AACtCC,EAAAA,OAAO,GAAG,CAAC,CAAA;AACXC,EAAAA,iBAAiB,GAAG,CAAC,CAAA;EAErBC,WAAAA,CAAYC,KAAoB,EAAA;IAC9B,KAAK,CAACA,KAAK,CAAC,CAAA;IACZ,IAAI,CAACC,KAAK,GAAG;AACXC,MAAAA,OAAO,EAAE,KAAK;AACdC,MAAAA,IAAI,EAAE,EAAA;KACP,CAAA;AACH,GAAA;AAEAC,EAAAA,oBAAoBA,GAAA;AAClBC,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACT,OAAO,CAAC,CAAA;AACjCQ,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACR,iBAAiB,CAAC,CAAA;AAC7C,GAAA;AAEAS,EAAAA,qBAAqBA,CAACC,SAAwB,EAAEC,SAAwB,EAAA;AACtE,IAAA,IAAI,CAACD,SAAS,CAACL,IAAI,EAAE;AACnB,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AACA,IAAA,IACEK,SAAS,CAACE,SAAS,KAAK,IAAI,CAACV,KAAK,CAACU,SAAS,IAC5CD,SAAS,CAACP,OAAO,KAAK,IAAI,CAACD,KAAK,CAACC,OAAO,IACxCO,SAAS,CAACN,IAAI,KAAK,IAAI,CAACF,KAAK,CAACE,IAAI,EAClC;AACA,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AAEA,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;EAEAQ,eAAe,GAAGA,MAAK;IACrB,MAAM;AAAEd,MAAAA,OAAAA;KAAS,GAAG,IAAI,CAACG,KAAK,CAAA;AAE9B,IAAA,IAAI,CAACH,OAAO,GAAGQ,MAAM,CAACO,UAAU,CAAC,MAAK;MACpC,IAA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
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
const SnackbarContext = /*#__PURE__*/React.createContext({
|
|
6
|
+
createSnackbar: () => {}
|
|
7
|
+
});
|
|
8
|
+
const SnackbarConsumer = SnackbarContext.Consumer;
|
|
9
|
+
|
|
10
|
+
exports.SnackbarConsumer = SnackbarConsumer;
|
|
11
|
+
exports.SnackbarContext = SnackbarContext;
|
|
12
|
+
//# sourceMappingURL=SnackbarContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnackbarContext.js","sources":["../../src/snackbar/SnackbarContext.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport { SnackbarProps } from './Snackbar';\n\nexport type SnackbarContextType = {\n createSnackbar: (props: Omit<SnackbarProps, 'timeout' | 'timestamp'>) => void;\n};\n\nexport const SnackbarContext = createContext<SnackbarContextType>({ createSnackbar: () => {} });\n\nexport const SnackbarConsumer = SnackbarContext.Consumer;\n"],"names":["SnackbarContext","createContext","createSnackbar","SnackbarConsumer","Consumer"],"mappings":";;;;AAQaA,MAAAA,eAAe,gBAAGC,mBAAa,CAAsB;EAAEC,cAAc,EAAEA,MAAK,EAAE;AAAC,CAAE,EAAC;AAElFC,MAAAA,gBAAgB,GAAGH,eAAe,CAACI;;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
|
|
3
|
+
const SnackbarContext = /*#__PURE__*/createContext({
|
|
4
|
+
createSnackbar: () => {}
|
|
5
|
+
});
|
|
6
|
+
const SnackbarConsumer = SnackbarContext.Consumer;
|
|
7
|
+
|
|
8
|
+
export { SnackbarConsumer, SnackbarContext };
|
|
9
|
+
//# sourceMappingURL=SnackbarContext.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnackbarContext.mjs","sources":["../../src/snackbar/SnackbarContext.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport { SnackbarProps } from './Snackbar';\n\nexport type SnackbarContextType = {\n createSnackbar: (props: Omit<SnackbarProps, 'timeout' | 'timestamp'>) => void;\n};\n\nexport const SnackbarContext = createContext<SnackbarContextType>({ createSnackbar: () => {} });\n\nexport const SnackbarConsumer = SnackbarContext.Consumer;\n"],"names":["SnackbarContext","createContext","createSnackbar","SnackbarConsumer","Consumer"],"mappings":";;AAQaA,MAAAA,eAAe,gBAAGC,aAAa,CAAsB;EAAEC,cAAc,EAAEA,MAAK,EAAE;AAAC,CAAE,EAAC;AAElFC,MAAAA,gBAAgB,GAAGH,eAAe,CAACI;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Snackbar = require('./Snackbar.js');
|
|
5
|
+
var SnackbarContext = require('./SnackbarContext.js');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
function SnackbarProvider({
|
|
9
|
+
timeout = 4500,
|
|
10
|
+
children
|
|
11
|
+
}) {
|
|
12
|
+
const [state, setState] = React.useState({
|
|
13
|
+
text: '',
|
|
14
|
+
timestamp: 0
|
|
15
|
+
});
|
|
16
|
+
const {
|
|
17
|
+
action,
|
|
18
|
+
text,
|
|
19
|
+
theme,
|
|
20
|
+
timestamp
|
|
21
|
+
} = state;
|
|
22
|
+
return /*#__PURE__*/jsxRuntime.jsxs(SnackbarContext.SnackbarContext.Provider, {
|
|
23
|
+
value: React.useMemo(() => ({
|
|
24
|
+
createSnackbar: ({
|
|
25
|
+
action,
|
|
26
|
+
text,
|
|
27
|
+
theme
|
|
28
|
+
}) => {
|
|
29
|
+
setState({
|
|
30
|
+
action,
|
|
31
|
+
text,
|
|
32
|
+
theme,
|
|
33
|
+
timestamp: Date.now()
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}), []),
|
|
37
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Snackbar.default, {
|
|
38
|
+
action: action,
|
|
39
|
+
text: text,
|
|
40
|
+
timestamp: timestamp,
|
|
41
|
+
timeout: timeout,
|
|
42
|
+
theme: theme
|
|
43
|
+
}), children]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = SnackbarProvider;
|
|
48
|
+
//# sourceMappingURL=SnackbarProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnackbarProvider.js","sources":["../../src/snackbar/SnackbarProvider.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\n\nimport SnackbarPortal, { SnackbarProps } from './Snackbar';\nimport { SnackbarContext } from './SnackbarContext';\n\nexport interface SnackbarProviderProps {\n timeout?: number;\n children?: React.ReactNode;\n}\n\nexport default function SnackbarProvider({ timeout = 4500, children }: SnackbarProviderProps) {\n const [state, setState] = useState<Omit<SnackbarProps, 'timeout'>>({\n text: '',\n timestamp: 0,\n });\n const { action, text, theme, timestamp } = state;\n\n return (\n <SnackbarContext.Provider\n value={useMemo(\n () => ({\n createSnackbar: ({ action, text, theme }) => {\n setState({ action, text, theme, timestamp: Date.now() });\n },\n }),\n [],\n )}\n >\n <SnackbarPortal\n action={action}\n text={text}\n timestamp={timestamp}\n timeout={timeout}\n theme={theme}\n />\n {children}\n </SnackbarContext.Provider>\n );\n}\n"],"names":["SnackbarProvider","timeout","children","state","setState","useState","text","timestamp","action","theme","_jsxs","SnackbarContext","Provider","value","useMemo","createSnackbar","Date","now","_jsx","SnackbarPortal"],"mappings":";;;;;;;AAUc,SAAUA,gBAAgBA,CAAC;AAAEC,EAAAA,OAAO,GAAG,IAAI;AAAEC,EAAAA,QAAAA;AAAiC,CAAA,EAAA;AAC1F,EAAA,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,cAAQ,CAAiC;AACjEC,IAAAA,IAAI,EAAE,EAAE;AACRC,IAAAA,SAAS,EAAE,CAAA;AACZ,GAAA,CAAC,CAAA;EACF,MAAM;IAAEC,MAAM;IAAEF,IAAI;IAAEG,KAAK;AAAEF,IAAAA,SAAAA;AAAS,GAAE,GAAGJ,KAAK,CAAA;AAEhD,EAAA,oBACEO,eAAA,CAACC,+BAAe,CAACC,QAAQ,EAAA;IACvBC,KAAK,EAAEC,aAAO,CACZ,OAAO;AACLC,MAAAA,cAAc,EAAEA,CAAC;QAAEP,MAAM;QAAEF,IAAI;AAAEG,QAAAA,KAAAA;AAAO,OAAA,KAAI;AAC1CL,QAAAA,QAAQ,CAAC;UAAEI,MAAM;UAAEF,IAAI;UAAEG,KAAK;AAAEF,UAAAA,SAAS,EAAES,IAAI,CAACC,GAAG,EAAE;AAAA,SAAE,CAAC,CAAA;AAC1D,OAAA;KACD,CAAC,EACF,EAAE,CACF;IAAAf,QAAA,EAAA,cAEFgB,cAAA,CAACC,gBAAc,EAAA;AACbX,MAAAA,MAAM,EAAEA,MAAO;AACfF,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,SAAS,EAAEA,SAAU;AACrBN,MAAAA,OAAO,EAAEA,OAAQ;AACjBQ,MAAAA,KAAK,EAAEA,KAAAA;KAET,CAAA,EAACP,QAAQ,CAAA;AAAA,GACe,CAAC,CAAA;AAE/B;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useState, useMemo } from 'react';
|
|
2
|
+
import SnackbarPortal from './Snackbar.mjs';
|
|
3
|
+
import { SnackbarContext } from './SnackbarContext.mjs';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function SnackbarProvider({
|
|
7
|
+
timeout = 4500,
|
|
8
|
+
children
|
|
9
|
+
}) {
|
|
10
|
+
const [state, setState] = useState({
|
|
11
|
+
text: '',
|
|
12
|
+
timestamp: 0
|
|
13
|
+
});
|
|
14
|
+
const {
|
|
15
|
+
action,
|
|
16
|
+
text,
|
|
17
|
+
theme,
|
|
18
|
+
timestamp
|
|
19
|
+
} = state;
|
|
20
|
+
return /*#__PURE__*/jsxs(SnackbarContext.Provider, {
|
|
21
|
+
value: useMemo(() => ({
|
|
22
|
+
createSnackbar: ({
|
|
23
|
+
action,
|
|
24
|
+
text,
|
|
25
|
+
theme
|
|
26
|
+
}) => {
|
|
27
|
+
setState({
|
|
28
|
+
action,
|
|
29
|
+
text,
|
|
30
|
+
theme,
|
|
31
|
+
timestamp: Date.now()
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}), []),
|
|
35
|
+
children: [/*#__PURE__*/jsx(SnackbarPortal, {
|
|
36
|
+
action: action,
|
|
37
|
+
text: text,
|
|
38
|
+
timestamp: timestamp,
|
|
39
|
+
timeout: timeout,
|
|
40
|
+
theme: theme
|
|
41
|
+
}), children]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { SnackbarProvider as default };
|
|
46
|
+
//# sourceMappingURL=SnackbarProvider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnackbarProvider.mjs","sources":["../../src/snackbar/SnackbarProvider.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\n\nimport SnackbarPortal, { SnackbarProps } from './Snackbar';\nimport { SnackbarContext } from './SnackbarContext';\n\nexport interface SnackbarProviderProps {\n timeout?: number;\n children?: React.ReactNode;\n}\n\nexport default function SnackbarProvider({ timeout = 4500, children }: SnackbarProviderProps) {\n const [state, setState] = useState<Omit<SnackbarProps, 'timeout'>>({\n text: '',\n timestamp: 0,\n });\n const { action, text, theme, timestamp } = state;\n\n return (\n <SnackbarContext.Provider\n value={useMemo(\n () => ({\n createSnackbar: ({ action, text, theme }) => {\n setState({ action, text, theme, timestamp: Date.now() });\n },\n }),\n [],\n )}\n >\n <SnackbarPortal\n action={action}\n text={text}\n timestamp={timestamp}\n timeout={timeout}\n theme={theme}\n />\n {children}\n </SnackbarContext.Provider>\n );\n}\n"],"names":["SnackbarProvider","timeout","children","state","setState","useState","text","timestamp","action","theme","_jsxs","SnackbarContext","Provider","value","useMemo","createSnackbar","Date","now","_jsx","SnackbarPortal"],"mappings":";;;;;AAUc,SAAUA,gBAAgBA,CAAC;AAAEC,EAAAA,OAAO,GAAG,IAAI;AAAEC,EAAAA,QAAAA;AAAiC,CAAA,EAAA;AAC1F,EAAA,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAiC;AACjEC,IAAAA,IAAI,EAAE,EAAE;AACRC,IAAAA,SAAS,EAAE,CAAA;AACZ,GAAA,CAAC,CAAA;EACF,MAAM;IAAEC,MAAM;IAAEF,IAAI;IAAEG,KAAK;AAAEF,IAAAA,SAAAA;AAAS,GAAE,GAAGJ,KAAK,CAAA;AAEhD,EAAA,oBACEO,IAAA,CAACC,eAAe,CAACC,QAAQ,EAAA;IACvBC,KAAK,EAAEC,OAAO,CACZ,OAAO;AACLC,MAAAA,cAAc,EAAEA,CAAC;QAAEP,MAAM;QAAEF,IAAI;AAAEG,QAAAA,KAAAA;AAAO,OAAA,KAAI;AAC1CL,QAAAA,QAAQ,CAAC;UAAEI,MAAM;UAAEF,IAAI;UAAEG,KAAK;AAAEF,UAAAA,SAAS,EAAES,IAAI,CAACC,GAAG,EAAE;AAAA,SAAE,CAAC,CAAA;AAC1D,OAAA;KACD,CAAC,EACF,EAAE,CACF;IAAAf,QAAA,EAAA,cAEFgB,GAAA,CAACC,cAAc,EAAA;AACbX,MAAAA,MAAM,EAAEA,MAAO;AACfF,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,SAAS,EAAEA,SAAU;AACrBN,MAAAA,OAAO,EAAEA,OAAQ;AACjBQ,MAAAA,KAAK,EAAEA,KAAAA;KAET,CAAA,EAACP,QAAQ,CAAA;AAAA,GACe,CAAC,CAAA;AAE/B;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var SnackbarContext = require('./SnackbarContext.js');
|
|
5
|
+
|
|
6
|
+
function useSnackbar() {
|
|
7
|
+
const {
|
|
8
|
+
createSnackbar
|
|
9
|
+
} = React.useContext(SnackbarContext.SnackbarContext);
|
|
10
|
+
return createSnackbar;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = useSnackbar;
|
|
14
|
+
//# sourceMappingURL=useSnackbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSnackbar.js","sources":["../../src/snackbar/useSnackbar.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { SnackbarContext } from './SnackbarContext';\n\nfunction useSnackbar() {\n const { createSnackbar } = useContext(SnackbarContext);\n\n return createSnackbar;\n}\n\nexport default useSnackbar;\n"],"names":["useSnackbar","createSnackbar","useContext","SnackbarContext"],"mappings":";;;;;AAIA,SAASA,WAAWA,GAAA;EAClB,MAAM;AAAEC,IAAAA,cAAAA;AAAgB,GAAA,GAAGC,gBAAU,CAACC,+BAAe,CAAC,CAAA;AAEtD,EAAA,OAAOF,cAAc,CAAA;AACvB;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { SnackbarContext } from './SnackbarContext.mjs';
|
|
3
|
+
|
|
4
|
+
function useSnackbar() {
|
|
5
|
+
const {
|
|
6
|
+
createSnackbar
|
|
7
|
+
} = useContext(SnackbarContext);
|
|
8
|
+
return createSnackbar;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { useSnackbar as default };
|
|
12
|
+
//# sourceMappingURL=useSnackbar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSnackbar.mjs","sources":["../../src/snackbar/useSnackbar.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { SnackbarContext } from './SnackbarContext';\n\nfunction useSnackbar() {\n const { createSnackbar } = useContext(SnackbarContext);\n\n return createSnackbar;\n}\n\nexport default useSnackbar;\n"],"names":["useSnackbar","createSnackbar","useContext","SnackbarContext"],"mappings":";;;AAIA,SAASA,WAAWA,GAAA;EAClB,MAAM;AAAEC,IAAAA,cAAAA;AAAgB,GAAA,GAAGC,UAAU,CAACC,eAAe,CAAC,CAAA;AAEtD,EAAA,OAAOF,cAAc,CAAA;AACvB;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var icons = require('@transferwise/icons');
|
|
4
|
+
var classNames = require('classnames');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
10
|
+
|
|
11
|
+
const iconTypeMap = {
|
|
12
|
+
positive: icons.Check,
|
|
13
|
+
neutral: icons.Info,
|
|
14
|
+
warning: icons.Alert,
|
|
15
|
+
negative: icons.Cross,
|
|
16
|
+
pending: icons.ClockBorderless,
|
|
17
|
+
info: icons.Info,
|
|
18
|
+
error: icons.Cross,
|
|
19
|
+
success: icons.Check
|
|
20
|
+
};
|
|
21
|
+
const StatusIcon = ({
|
|
22
|
+
sentiment = 'neutral',
|
|
23
|
+
size = 'md'
|
|
24
|
+
}) => {
|
|
25
|
+
const Icon = iconTypeMap[sentiment];
|
|
26
|
+
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
27
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
28
|
+
"data-testid": "status-icon",
|
|
29
|
+
className: classNames__default.default('status-circle', `status-circle-${size}`, sentiment),
|
|
30
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
31
|
+
className: classNames__default.default('status-icon', iconColor)
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
module.exports = StatusIcon;
|
|
37
|
+
//# sourceMappingURL=StatusIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport classNames from 'classnames';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment } from '../common';\n\nexport type StatusIconProps = {\n sentiment: `${Sentiment}`;\n size: SizeSmall | SizeMedium | SizeLarge;\n};\n\nconst iconTypeMap = {\n positive: Check,\n neutral: Info,\n warning: Alert,\n negative: Cross,\n pending: ClockBorderless,\n info: Info,\n error: Cross,\n success: Check,\n} satisfies Record<`${Sentiment}`, React.ElementType>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size = 'md' }: StatusIconProps) => {\n const Icon = iconTypeMap[sentiment];\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n\n return (\n <span\n data-testid=\"status-icon\"\n className={classNames('status-circle', `status-circle-${size}`, sentiment)}\n >\n <Icon className={classNames('status-icon', iconColor)} />\n </span>\n );\n};\n\nexport default StatusIcon;\n"],"names":["iconTypeMap","positive","Check","neutral","Info","warning","Alert","negative","Cross","pending","ClockBorderless","info","error","success","StatusIcon","sentiment","size","Icon","iconColor","_jsx","className","classNames","children"],"mappings":";;;;;;;;;;AAUA,MAAMA,WAAW,GAAG;AAClBC,EAAAA,QAAQ,EAAEC,WAAK;AACfC,EAAAA,OAAO,EAAEC,UAAI;AACbC,EAAAA,OAAO,EAAEC,WAAK;AACdC,EAAAA,QAAQ,EAAEC,WAAK;AACfC,EAAAA,OAAO,EAAEC,qBAAe;AACxBC,EAAAA,IAAI,EAAEP,UAAI;AACVQ,EAAAA,KAAK,EAAEJ,WAAK;AACZK,EAAAA,OAAO,EAAEX,WAAAA;CAC0C,CAAA;AAE/CY,MAAAA,UAAU,GAAGA,CAAC;AAAEC,EAAAA,SAAS,GAAG,SAAS;AAAEC,EAAAA,IAAI,GAAG,IAAA;AAAI,CAAmB,KAAI;AAC7E,EAAA,MAAMC,IAAI,GAAGjB,WAAW,CAACe,SAAS,CAAC,CAAA;AACnC,EAAA,MAAMG,SAAS,GAAGH,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AAEvF,EAAA,oBACEI,cAAA,CAAA,MAAA,EAAA;AACE,IAAA,aAAA,EAAY,aAAa;IACzBC,SAAS,EAAEC,2BAAU,CAAC,eAAe,EAAmB,iBAAAL,MAAM,EAAED,SAAS,CAAE;IAAAO,QAAA,eAE3EH,cAAA,CAACF,IAAI,EAAA;AAACG,MAAAA,SAAS,EAAEC,2BAAU,CAAC,aAAa,EAAEH,SAAS,CAAA;KACtD,CAAA;AAAA,GAAM,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Check, Info, Alert, Cross, ClockBorderless } from '@transferwise/icons';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const iconTypeMap = {
|
|
6
|
+
positive: Check,
|
|
7
|
+
neutral: Info,
|
|
8
|
+
warning: Alert,
|
|
9
|
+
negative: Cross,
|
|
10
|
+
pending: ClockBorderless,
|
|
11
|
+
info: Info,
|
|
12
|
+
error: Cross,
|
|
13
|
+
success: Check
|
|
14
|
+
};
|
|
15
|
+
const StatusIcon = ({
|
|
16
|
+
sentiment = 'neutral',
|
|
17
|
+
size = 'md'
|
|
18
|
+
}) => {
|
|
19
|
+
const Icon = iconTypeMap[sentiment];
|
|
20
|
+
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
21
|
+
return /*#__PURE__*/jsx("span", {
|
|
22
|
+
"data-testid": "status-icon",
|
|
23
|
+
className: classNames('status-circle', `status-circle-${size}`, sentiment),
|
|
24
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
25
|
+
className: classNames('status-icon', iconColor)
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { StatusIcon as default };
|
|
31
|
+
//# sourceMappingURL=StatusIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusIcon.mjs","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport classNames from 'classnames';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment } from '../common';\n\nexport type StatusIconProps = {\n sentiment: `${Sentiment}`;\n size: SizeSmall | SizeMedium | SizeLarge;\n};\n\nconst iconTypeMap = {\n positive: Check,\n neutral: Info,\n warning: Alert,\n negative: Cross,\n pending: ClockBorderless,\n info: Info,\n error: Cross,\n success: Check,\n} satisfies Record<`${Sentiment}`, React.ElementType>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size = 'md' }: StatusIconProps) => {\n const Icon = iconTypeMap[sentiment];\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n\n return (\n <span\n data-testid=\"status-icon\"\n className={classNames('status-circle', `status-circle-${size}`, sentiment)}\n >\n <Icon className={classNames('status-icon', iconColor)} />\n </span>\n );\n};\n\nexport default StatusIcon;\n"],"names":["iconTypeMap","positive","Check","neutral","Info","warning","Alert","negative","Cross","pending","ClockBorderless","info","error","success","StatusIcon","sentiment","size","Icon","iconColor","_jsx","className","classNames","children"],"mappings":";;;;AAUA,MAAMA,WAAW,GAAG;AAClBC,EAAAA,QAAQ,EAAEC,KAAK;AACfC,EAAAA,OAAO,EAAEC,IAAI;AACbC,EAAAA,OAAO,EAAEC,KAAK;AACdC,EAAAA,QAAQ,EAAEC,KAAK;AACfC,EAAAA,OAAO,EAAEC,eAAe;AACxBC,EAAAA,IAAI,EAAEP,IAAI;AACVQ,EAAAA,KAAK,EAAEJ,KAAK;AACZK,EAAAA,OAAO,EAAEX,KAAAA;CAC0C,CAAA;AAE/CY,MAAAA,UAAU,GAAGA,CAAC;AAAEC,EAAAA,SAAS,GAAG,SAAS;AAAEC,EAAAA,IAAI,GAAG,IAAA;AAAI,CAAmB,KAAI;AAC7E,EAAA,MAAMC,IAAI,GAAGjB,WAAW,CAACe,SAAS,CAAC,CAAA;AACnC,EAAA,MAAMG,SAAS,GAAGH,SAAS,KAAK,SAAS,IAAIA,SAAS,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;AAEvF,EAAA,oBACEI,GAAA,CAAA,MAAA,EAAA;AACE,IAAA,aAAA,EAAY,aAAa;IACzBC,SAAS,EAAEC,UAAU,CAAC,eAAe,EAAmB,iBAAAL,MAAM,EAAED,SAAS,CAAE;IAAAO,QAAA,eAE3EH,GAAA,CAACF,IAAI,EAAA;AAACG,MAAAA,SAAS,EAAEC,UAAU,CAAC,aAAa,EAAEH,SAAS,CAAA;KACtD,CAAA;AAAA,GAAM,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classNames = require('classnames');
|
|
4
|
+
require('react');
|
|
5
|
+
var Tooltip = require('../tooltip/Tooltip.js');
|
|
6
|
+
var deviceDetection = require('./deviceDetection.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var useDirection = require('../common/hooks/useDirection/useDirection.js');
|
|
9
|
+
var position = require('../common/propsValues/position.js');
|
|
10
|
+
|
|
11
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
14
|
+
|
|
15
|
+
function clamp(from, to, value) {
|
|
16
|
+
return Math.max(Math.min(to, value), from);
|
|
17
|
+
}
|
|
18
|
+
/* eslint-disable react/no-array-index-key */
|
|
19
|
+
const Stepper = ({
|
|
20
|
+
steps,
|
|
21
|
+
activeStep = 0,
|
|
22
|
+
className
|
|
23
|
+
}) => {
|
|
24
|
+
const {
|
|
25
|
+
isRTL
|
|
26
|
+
} = useDirection.useDirection();
|
|
27
|
+
if (steps.length === 0) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const activeStepIndex = clamp(0, steps.length - 1, activeStep);
|
|
31
|
+
const stepPercentage = 1 / (steps.length - 1);
|
|
32
|
+
const percentageCompleted = activeStepIndex / (steps.length - 1);
|
|
33
|
+
const renderStep = (step, index) => {
|
|
34
|
+
const active = index === activeStepIndex;
|
|
35
|
+
const clickable = step.onClick && !active;
|
|
36
|
+
const labelButton = clickable ? /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
37
|
+
type: "button",
|
|
38
|
+
className: "btn-unstyled tw-stepper__step-label",
|
|
39
|
+
onClick: () => clickable && step.onClick?.(),
|
|
40
|
+
children: /*#__PURE__*/jsxRuntime.jsx("small", {
|
|
41
|
+
children: step.label
|
|
42
|
+
})
|
|
43
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
44
|
+
className: "tw-stepper__step-label",
|
|
45
|
+
children: step.label
|
|
46
|
+
});
|
|
47
|
+
return /*#__PURE__*/jsxRuntime.jsx("li", {
|
|
48
|
+
className: classNames__default.default('hidden-xs', 'tw-stepper__step', active ? 'np-text-body-default-bold tw-stepper__step--active' : 'np-text-body-default', clickable && 'tw-stepper__step--clickable', step.hoverLabel && 'tw-stepper__step--has-tooltip'),
|
|
49
|
+
"aria-current": active ? 'step' : false,
|
|
50
|
+
style: isRTL ? {
|
|
51
|
+
right: `${index * stepPercentage * 100}%`
|
|
52
|
+
} : {
|
|
53
|
+
left: `${index * stepPercentage * 100}%`
|
|
54
|
+
},
|
|
55
|
+
children: step.hoverLabel && !deviceDetection.isTouchDevice() ? /*#__PURE__*/jsxRuntime.jsx(Tooltip, {
|
|
56
|
+
position: position.Position.BOTTOM,
|
|
57
|
+
label: step.hoverLabel,
|
|
58
|
+
children: labelButton
|
|
59
|
+
}) : labelButton
|
|
60
|
+
}, index);
|
|
61
|
+
};
|
|
62
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
63
|
+
className: classNames__default.default('tw-stepper', className),
|
|
64
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
65
|
+
className: "progress",
|
|
66
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
67
|
+
className: "progress-bar",
|
|
68
|
+
style: {
|
|
69
|
+
width: `${percentageCompleted * 100}%`
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}), /*#__PURE__*/jsxRuntime.jsx("ul", {
|
|
73
|
+
className: "tw-stepper-steps p-t-1 m-b-0",
|
|
74
|
+
children: steps.map(renderStep)
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
module.exports = Stepper;
|
|
80
|
+
//# sourceMappingURL=Stepper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.js","sources":["../../src/stepper/Stepper.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport * as React from 'react';\n\nimport { Position } from '../common';\nimport { useDirection } from '../common/hooks';\nimport Tooltip from '../tooltip';\n\nimport { isTouchDevice } from './deviceDetection';\n\nfunction clamp(from: number, to: number, value: number) {\n return Math.max(Math.min(to, value), from);\n}\n\nexport interface Step {\n label: React.ReactNode;\n onClick?: () => void;\n hoverLabel?: React.ReactNode;\n}\n\nexport interface StepperProps {\n steps: readonly Step[];\n activeStep?: number;\n className?: string;\n}\n\n/* eslint-disable react/no-array-index-key */\nconst Stepper = ({ steps, activeStep = 0, className }: StepperProps) => {\n const { isRTL } = useDirection();\n\n if (steps.length === 0) {\n return null;\n }\n\n const activeStepIndex = clamp(0, steps.length - 1, activeStep);\n const stepPercentage = 1 / (steps.length - 1);\n const percentageCompleted = activeStepIndex / (steps.length - 1);\n\n const renderStep = (step: Step, index: number) => {\n const active = index === activeStepIndex;\n const clickable = step.onClick && !active;\n\n const labelButton = clickable ? (\n <button\n type=\"button\"\n className=\"btn-unstyled tw-stepper__step-label\"\n onClick={() => clickable && step.onClick?.()}\n >\n <small>{step.label}</small>\n </button>\n ) : (\n <span className=\"tw-stepper__step-label\">{step.label}</span>\n );\n return (\n <li\n key={index}\n className={classNames(\n 'hidden-xs',\n 'tw-stepper__step',\n active ? 'np-text-body-default-bold tw-stepper__step--active' : 'np-text-body-default',\n clickable && 'tw-stepper__step--clickable',\n step.hoverLabel && 'tw-stepper__step--has-tooltip',\n )}\n aria-current={active ? 'step' : false}\n style={\n isRTL\n ? { right: `${index * stepPercentage * 100}%` }\n : { left: `${index * stepPercentage * 100}%` }\n }\n >\n {step.hoverLabel && !isTouchDevice() ? (\n <Tooltip position={Position.BOTTOM} label={step.hoverLabel}>\n {labelButton}\n </Tooltip>\n ) : (\n labelButton\n )}\n </li>\n );\n };\n\n return (\n <div className={classNames('tw-stepper', className)}>\n <div className=\"progress\">\n <div className=\"progress-bar\" style={{ width: `${percentageCompleted * 100}%` }} />\n </div>\n <ul className=\"tw-stepper-steps p-t-1 m-b-0\">{steps.map(renderStep)}</ul>\n </div>\n );\n};\n/* eslint-enable react/no-array-index-key */\n\nexport default Stepper;\n"],"names":["clamp","from","to","value","Math","max","min","Stepper","steps","activeStep","className","isRTL","useDirection","length","activeStepIndex","stepPercentage","percentageCompleted","renderStep","step","index","active","clickable","onClick","labelButton","_jsx","type","children","label","classNames","hoverLabel","style","right","left","isTouchDevice","Tooltip","position","Position","BOTTOM","_jsxs","width","map"],"mappings":";;;;;;;;;;;;;;AASA,SAASA,KAAKA,CAACC,IAAY,EAAEC,EAAU,EAAEC,KAAa,EAAA;AACpD,EAAA,OAAOC,IAAI,CAACC,GAAG,CAACD,IAAI,CAACE,GAAG,CAACJ,EAAE,EAAEC,KAAK,CAAC,EAAEF,IAAI,CAAC,CAAA;AAC5C,CAAA;AAcA;AACMM,MAAAA,OAAO,GAAGA,CAAC;EAAEC,KAAK;AAAEC,EAAAA,UAAU,GAAG,CAAC;AAAEC,EAAAA,SAAAA;AAAS,CAAgB,KAAI;EACrE,MAAM;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