@transferwise/components 46.44.1 → 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/types/definitionList/DefinitionList.d.ts +2 -2
- package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
- package/build/types/definitionList/index.d.ts +1 -1
- package/build/types/definitionList/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- 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 +4 -3
- package/src/common/hooks/useVirtualKeyboard.ts +1 -1
- package/src/definitionList/DefinitionList.tsx +6 -3
- package/src/definitionList/index.ts +1 -1
- package/src/index.ts +1 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import '@transferwise/formatting';
|
|
5
|
+
import { getMonthNames } from '../common/dateUtils/getMonthNames/getMonthNames.mjs';
|
|
6
|
+
import { isDateValid } from '../common/dateUtils/isDateValid/isDateValid.mjs';
|
|
7
|
+
import { isMonthAndYearFormat } from '../common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.mjs';
|
|
8
|
+
import { MDY, YMD } from '../common/dateUtils/getFormatForLocale/getFormatForLocale.mjs';
|
|
9
|
+
import { useInputAttributes } from '../inputs/contexts.mjs';
|
|
10
|
+
import messages from './DateInput.messages.mjs';
|
|
11
|
+
import { convertToLocalMidnight } from './utils/convertToLocalMidnight/convertToLocalMidnight.mjs';
|
|
12
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
|
+
import { DateMode } from '../common/propsValues/dateMode.mjs';
|
|
14
|
+
import { MonthFormat } from '../common/propsValues/monthFormat.mjs';
|
|
15
|
+
import Body from '../body/Body.mjs';
|
|
16
|
+
import { Input } from '../inputs/Input.mjs';
|
|
17
|
+
import { SelectInput, SelectInputOptionContent } from '../inputs/SelectInput.mjs';
|
|
18
|
+
import { Size } from '../common/propsValues/size.mjs';
|
|
19
|
+
import { Typography } from '../common/propsValues/typography.mjs';
|
|
20
|
+
|
|
21
|
+
const DateInput = ({
|
|
22
|
+
'aria-labelledby': ariaLabelledByProp,
|
|
23
|
+
'aria-label': ariaLabel,
|
|
24
|
+
disabled = false,
|
|
25
|
+
size = Size.MEDIUM,
|
|
26
|
+
value,
|
|
27
|
+
dayLabel,
|
|
28
|
+
dayAutoComplete,
|
|
29
|
+
monthLabel,
|
|
30
|
+
yearLabel,
|
|
31
|
+
yearAutoComplete,
|
|
32
|
+
monthFormat = MonthFormat.LONG,
|
|
33
|
+
mode = DateMode.DAY_MONTH_YEAR,
|
|
34
|
+
onChange,
|
|
35
|
+
onFocus,
|
|
36
|
+
onBlur,
|
|
37
|
+
placeholders,
|
|
38
|
+
id: idProp,
|
|
39
|
+
selectProps = {}
|
|
40
|
+
}) => {
|
|
41
|
+
const inputAttributes = useInputAttributes({
|
|
42
|
+
nonLabelable: true
|
|
43
|
+
});
|
|
44
|
+
const id = idProp ?? inputAttributes.id;
|
|
45
|
+
const ariaLabelledBy = ariaLabelledByProp ?? inputAttributes['aria-labelledby'];
|
|
46
|
+
const {
|
|
47
|
+
locale,
|
|
48
|
+
formatMessage
|
|
49
|
+
} = useIntl();
|
|
50
|
+
const getDateObject = () => {
|
|
51
|
+
if (value && isDateValid(value)) {
|
|
52
|
+
return typeof value === 'string' ? convertToLocalMidnight(value) : value;
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
};
|
|
56
|
+
const getInitialDate = unit => {
|
|
57
|
+
if (value && isDateValid(value)) {
|
|
58
|
+
const dateObject = getDateObject();
|
|
59
|
+
if (typeof value === 'string' && isMonthAndYearFormat(value) && unit === 'day') {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
if (dateObject !== undefined) {
|
|
63
|
+
switch (unit) {
|
|
64
|
+
case 'year':
|
|
65
|
+
return dateObject.getFullYear();
|
|
66
|
+
case 'month':
|
|
67
|
+
return dateObject.getMonth();
|
|
68
|
+
case 'day':
|
|
69
|
+
return dateObject.getDate();
|
|
70
|
+
default:
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
76
|
+
};
|
|
77
|
+
const [day, setDay] = useState(() => getInitialDate('day'));
|
|
78
|
+
const [displayDay, setDisplayDay] = useState(day?.toString());
|
|
79
|
+
const [month, setMonth] = useState(() => getInitialDate('month'));
|
|
80
|
+
const [year, setYear] = useState(() => getInitialDate('year'));
|
|
81
|
+
const [displayYear, setDisplayYear] = useState(year?.toString());
|
|
82
|
+
const [lastBroadcastedValue, setLastBroadcastedValue] = useState(getDateObject);
|
|
83
|
+
const monthNames = getMonthNames(locale, monthFormat);
|
|
84
|
+
dayLabel ||= formatMessage(messages.dayLabel);
|
|
85
|
+
monthLabel ||= formatMessage(messages.monthLabel);
|
|
86
|
+
yearLabel ||= formatMessage(messages.yearLabel);
|
|
87
|
+
placeholders = {
|
|
88
|
+
day: placeholders?.day || formatMessage(messages.dayPlaceholder),
|
|
89
|
+
month: placeholders?.month || formatMessage(messages.monthLabel),
|
|
90
|
+
year: placeholders?.year || formatMessage(messages.yearPlaceholder)
|
|
91
|
+
};
|
|
92
|
+
const getDateAsString = date => {
|
|
93
|
+
if (!isDateValid(date)) {
|
|
94
|
+
return '';
|
|
95
|
+
}
|
|
96
|
+
switch (mode) {
|
|
97
|
+
case DateMode.MONTH_YEAR:
|
|
98
|
+
return [date.getFullYear(), `0${date.getMonth() + 1}`.slice(-2)].join('-');
|
|
99
|
+
case DateMode.DAY_MONTH_YEAR:
|
|
100
|
+
default:
|
|
101
|
+
return [date.getFullYear(), `0${date.getMonth() + 1}`.slice(-2), `0${date.getDate()}`.slice(-2)].join('-');
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const getSelectElement = () => {
|
|
105
|
+
return /*#__PURE__*/jsxs("label", {
|
|
106
|
+
className: "d-flex flex-column",
|
|
107
|
+
children: [/*#__PURE__*/jsx(Body, {
|
|
108
|
+
type: Typography.BODY_DEFAULT,
|
|
109
|
+
children: monthLabel
|
|
110
|
+
}), /*#__PURE__*/jsx(SelectInput, {
|
|
111
|
+
name: "month",
|
|
112
|
+
disabled: disabled,
|
|
113
|
+
placeholder: placeholders?.month,
|
|
114
|
+
items: Array.from({
|
|
115
|
+
length: 12
|
|
116
|
+
}, (_, index) => ({
|
|
117
|
+
type: 'option',
|
|
118
|
+
value: index
|
|
119
|
+
})),
|
|
120
|
+
size: size,
|
|
121
|
+
value: month,
|
|
122
|
+
renderValue: selectedValue => /*#__PURE__*/jsx(SelectInputOptionContent, {
|
|
123
|
+
title: monthNames[selectedValue]
|
|
124
|
+
}),
|
|
125
|
+
onChange: selectedValue => handleMonthChange(selectedValue),
|
|
126
|
+
...selectProps
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
const isDayValid = (newDay, newMonth, newYear) => {
|
|
131
|
+
const maxDay = new Date(newYear, newMonth + 1, 0).getDate();
|
|
132
|
+
return newDay <= maxDay;
|
|
133
|
+
};
|
|
134
|
+
const handleInternalValue = (newDay = day, newMonth = month, newYear = year) => {
|
|
135
|
+
if (newDay == null || newDay === 0 || newMonth == null || newYear == null || newYear === 0) {
|
|
136
|
+
broadcastNewValue(null);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (!isDayValid(newDay, newMonth, newYear)) {
|
|
140
|
+
broadcastNewValue(null);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const dateValue = new Date(newYear, newMonth, newDay);
|
|
144
|
+
if (newYear < 100) {
|
|
145
|
+
dateValue.setFullYear(newYear);
|
|
146
|
+
}
|
|
147
|
+
if (!isDateValid(dateValue)) {
|
|
148
|
+
broadcastNewValue(null);
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (mode === DateMode.MONTH_YEAR) {
|
|
152
|
+
if (newMonth !== month || newYear !== year) {
|
|
153
|
+
broadcastNewValue(dateValue);
|
|
154
|
+
}
|
|
155
|
+
} else if (newDay !== day || newMonth !== month || newYear !== year) {
|
|
156
|
+
broadcastNewValue(dateValue);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const handleDayChange = event => {
|
|
160
|
+
const newDayString = event.target.value.replace(/\D/g, '');
|
|
161
|
+
const newDayNumber = Number.parseInt(newDayString, 10);
|
|
162
|
+
setDay(newDayNumber);
|
|
163
|
+
setDisplayDay(newDayString);
|
|
164
|
+
handleInternalValue(newDayNumber, month, year);
|
|
165
|
+
};
|
|
166
|
+
const handleMonthChange = selectedMonth => {
|
|
167
|
+
if (selectedMonth === null) {
|
|
168
|
+
setMonth(null);
|
|
169
|
+
handleInternalValue(day, null, year);
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
setMonth(selectedMonth);
|
|
173
|
+
handleInternalValue(day, selectedMonth, year);
|
|
174
|
+
};
|
|
175
|
+
const handleYearChange = event => {
|
|
176
|
+
const newYearString = event.target.value.replace(/\D/g, '');
|
|
177
|
+
const newYearNumber = Number.parseInt(newYearString, 10);
|
|
178
|
+
if (newYearString.length >= 4 && newYearString.length <= 6) {
|
|
179
|
+
setYear(newYearNumber);
|
|
180
|
+
setDisplayYear(newYearString);
|
|
181
|
+
handleInternalValue(day, month, newYearNumber);
|
|
182
|
+
} else {
|
|
183
|
+
setYear(null);
|
|
184
|
+
setDisplayYear(newYearString);
|
|
185
|
+
handleInternalValue(day, month, null);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
const broadcastNewValue = newValue => {
|
|
189
|
+
if (newValue !== lastBroadcastedValue) {
|
|
190
|
+
setLastBroadcastedValue(newValue);
|
|
191
|
+
onChange(newValue != null ? getDateAsString(newValue) : null);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
const monthYearOnly = mode === DateMode.MONTH_YEAR;
|
|
195
|
+
const monthWidth = classNames({
|
|
196
|
+
'col-sm-8': monthYearOnly,
|
|
197
|
+
'col-sm-5': !monthYearOnly
|
|
198
|
+
});
|
|
199
|
+
const getMonth = () => {
|
|
200
|
+
return /*#__PURE__*/jsx("div", {
|
|
201
|
+
className: monthWidth,
|
|
202
|
+
children: getSelectElement()
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
const getDay = () => {
|
|
206
|
+
return /*#__PURE__*/jsx("div", {
|
|
207
|
+
className: "col-sm-3",
|
|
208
|
+
children: /*#__PURE__*/jsxs("label", {
|
|
209
|
+
children: [/*#__PURE__*/jsx(Body, {
|
|
210
|
+
type: Typography.BODY_DEFAULT,
|
|
211
|
+
children: dayLabel
|
|
212
|
+
}), /*#__PURE__*/jsx("div", {
|
|
213
|
+
className: `input-group input-group-${size}`,
|
|
214
|
+
children: /*#__PURE__*/jsx(Input, {
|
|
215
|
+
type: "text",
|
|
216
|
+
inputMode: "numeric",
|
|
217
|
+
pattern: "[0-9]*",
|
|
218
|
+
name: "day",
|
|
219
|
+
autoComplete: dayAutoComplete,
|
|
220
|
+
value: displayDay || '',
|
|
221
|
+
placeholder: placeholders?.day,
|
|
222
|
+
disabled: disabled,
|
|
223
|
+
min: 1,
|
|
224
|
+
max: 31,
|
|
225
|
+
maxLength: 2,
|
|
226
|
+
onChange: event => handleDayChange(event)
|
|
227
|
+
})
|
|
228
|
+
})]
|
|
229
|
+
})
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
const getYear = () => {
|
|
233
|
+
return /*#__PURE__*/jsx("div", {
|
|
234
|
+
className: "col-sm-4",
|
|
235
|
+
children: /*#__PURE__*/jsxs("label", {
|
|
236
|
+
children: [/*#__PURE__*/jsx(Body, {
|
|
237
|
+
type: Typography.BODY_DEFAULT,
|
|
238
|
+
children: yearLabel
|
|
239
|
+
}), /*#__PURE__*/jsx("div", {
|
|
240
|
+
className: `input-group input-group-${size}`,
|
|
241
|
+
children: /*#__PURE__*/jsx(Input, {
|
|
242
|
+
type: "text",
|
|
243
|
+
inputMode: "numeric",
|
|
244
|
+
pattern: "[0-9]*",
|
|
245
|
+
name: "year",
|
|
246
|
+
autoComplete: yearAutoComplete,
|
|
247
|
+
placeholder: placeholders?.year,
|
|
248
|
+
value: displayYear || '',
|
|
249
|
+
disabled: disabled,
|
|
250
|
+
min: 0,
|
|
251
|
+
max: 9999,
|
|
252
|
+
maxLength: 6,
|
|
253
|
+
onChange: event => handleYearChange(event)
|
|
254
|
+
})
|
|
255
|
+
})]
|
|
256
|
+
})
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
const monthBeforeDay = MDY.has(locale);
|
|
260
|
+
const yearFirst = YMD.has(locale);
|
|
261
|
+
return /*#__PURE__*/jsx("div", {
|
|
262
|
+
className: "tw-date",
|
|
263
|
+
...inputAttributes,
|
|
264
|
+
id: id,
|
|
265
|
+
"aria-labelledby": ariaLabelledBy,
|
|
266
|
+
"aria-label": ariaLabel,
|
|
267
|
+
role: "group" // Add role attribute to indicate container for interactive elements
|
|
268
|
+
,
|
|
269
|
+
onFocus: event => shouldPropagateOnFocus(event) ? onFocus && onFocus(event) : event.stopPropagation(),
|
|
270
|
+
onBlur: event => shouldPropagateOnBlur(event) ? onBlur && onBlur(event) : event.stopPropagation(),
|
|
271
|
+
children: /*#__PURE__*/jsx("div", {
|
|
272
|
+
className: "row",
|
|
273
|
+
children: (() => {
|
|
274
|
+
if (monthYearOnly) {
|
|
275
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
276
|
+
children: [!yearFirst && getMonth(), getYear(), yearFirst && getMonth()]
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
if (monthBeforeDay) {
|
|
280
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
281
|
+
children: [getMonth(), getDay(), getYear()]
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
if (yearFirst) {
|
|
285
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
286
|
+
children: [getYear(), getMonth(), getDay()]
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
290
|
+
children: [getDay(), getMonth(), getYear()]
|
|
291
|
+
});
|
|
292
|
+
})()
|
|
293
|
+
})
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
// Should only propagate if the relatedTarget is not part of this DateInput component.
|
|
297
|
+
function shouldPropagateOnFocus({
|
|
298
|
+
target,
|
|
299
|
+
relatedTarget
|
|
300
|
+
}) {
|
|
301
|
+
const targetParent = target.closest('.tw-date');
|
|
302
|
+
const relatedParent = relatedTarget && relatedTarget.closest('.tw-date');
|
|
303
|
+
return targetParent !== relatedParent;
|
|
304
|
+
}
|
|
305
|
+
// Should only propagate if the relatedTarget or the activeElement is not part of this DateInput component.
|
|
306
|
+
function shouldPropagateOnBlur({
|
|
307
|
+
target,
|
|
308
|
+
relatedTarget
|
|
309
|
+
}) {
|
|
310
|
+
const blurElementParent = target.closest('.tw-date');
|
|
311
|
+
// Even though FocusEvent.relatedTarget is supported by IE
|
|
312
|
+
// (https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget)
|
|
313
|
+
// "IE11 sets document.activeElement to the next focused element before the blur event is called."
|
|
314
|
+
// (https://stackoverflow.com/a/49325196/986241)
|
|
315
|
+
// Therefore if the relatedTarget is null, we try the document.activeElement,
|
|
316
|
+
// which may contain the HTML element that is gaining focus
|
|
317
|
+
const focusElement = relatedTarget || (document.activeElement !== target ? document.activeElement : null);
|
|
318
|
+
const focusElementParent = focusElement && focusElement.closest('.tw-date');
|
|
319
|
+
return blurElementParent !== focusElementParent;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export { DateInput as default };
|
|
323
|
+
//# sourceMappingURL=DateInput.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateInput.mjs","sources":["../../src/dateInput/DateInput.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { Body, Input, SelectInput, SelectInputOptionContent, SelectInputProps } from '..';\nimport {\n DateMode,\n MonthFormat,\n Size,\n SizeLarge,\n SizeMedium,\n SizeSmall,\n Typography,\n} from '../common';\nimport { MDY, YMD, getMonthNames, isDateValid, isMonthAndYearFormat } from '../common/dateUtils';\nimport { useInputAttributes } from '../inputs/contexts';\nimport messages from './DateInput.messages';\nimport { convertToLocalMidnight } from './utils';\n\nexport interface DateInputProps {\n /** @deprecated Use `Field` wrapper or the `aria-labelledby` attribute instead. */\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n disabled?: boolean;\n size?: SizeSmall | SizeMedium | SizeLarge;\n value?: Date | string;\n onChange: (value: string | null) => void;\n onFocus?: React.FocusEventHandler<HTMLDivElement>;\n onBlur?: React.FocusEventHandler<HTMLDivElement>;\n dayLabel?: string;\n dayAutoComplete?: string;\n monthLabel?: string;\n yearLabel?: string;\n yearAutoComplete?: string;\n monthFormat?: `${MonthFormat}`;\n mode?: `${DateMode}`;\n placeholders?: {\n day?: string;\n month?: string;\n year?: string;\n };\n id?: string;\n selectProps?: Partial<SelectInputProps<number | null>>;\n}\n\nconst DateInput = ({\n 'aria-labelledby': ariaLabelledByProp,\n 'aria-label': ariaLabel,\n disabled = false,\n size = Size.MEDIUM,\n value,\n dayLabel,\n dayAutoComplete,\n monthLabel,\n yearLabel,\n yearAutoComplete,\n monthFormat = MonthFormat.LONG,\n mode = DateMode.DAY_MONTH_YEAR,\n onChange,\n onFocus,\n onBlur,\n placeholders,\n id: idProp,\n selectProps = {},\n}: DateInputProps) => {\n const inputAttributes = useInputAttributes({ nonLabelable: true });\n const id = idProp ?? inputAttributes.id;\n const ariaLabelledBy = ariaLabelledByProp ?? inputAttributes['aria-labelledby'];\n\n const { locale, formatMessage } = useIntl();\n\n const getDateObject = (): Date | undefined => {\n if (value && isDateValid(value)) {\n return typeof value === 'string' ? convertToLocalMidnight(value) : value;\n }\n return undefined;\n };\n\n const getInitialDate = (unit: 'year' | 'month' | 'day'): number | null => {\n if (value && isDateValid(value)) {\n const dateObject = getDateObject();\n\n if (typeof value === 'string' && isMonthAndYearFormat(value) && unit === 'day') {\n return null;\n }\n\n if (dateObject !== undefined) {\n switch (unit) {\n case 'year':\n return dateObject.getFullYear();\n case 'month':\n return dateObject.getMonth();\n case 'day':\n return dateObject.getDate();\n default:\n return null;\n }\n }\n }\n return null;\n };\n\n const [day, setDay] = useState(() => getInitialDate('day'));\n const [displayDay, setDisplayDay] = useState(day?.toString());\n const [month, setMonth] = useState(() => getInitialDate('month'));\n const [year, setYear] = useState(() => getInitialDate('year'));\n const [displayYear, setDisplayYear] = useState(year?.toString());\n const [lastBroadcastedValue, setLastBroadcastedValue] = useState<Date | null | undefined>(\n getDateObject,\n );\n const monthNames = getMonthNames(locale, monthFormat);\n\n dayLabel ||= formatMessage(messages.dayLabel);\n monthLabel ||= formatMessage(messages.monthLabel);\n yearLabel ||= formatMessage(messages.yearLabel);\n placeholders = {\n day: placeholders?.day || formatMessage(messages.dayPlaceholder),\n month: placeholders?.month || formatMessage(messages.monthLabel),\n year: placeholders?.year || formatMessage(messages.yearPlaceholder),\n };\n\n const getDateAsString = (date: Date) => {\n if (!isDateValid(date)) {\n return '';\n }\n switch (mode) {\n case DateMode.MONTH_YEAR:\n return [date.getFullYear(), `0${date.getMonth() + 1}`.slice(-2)].join('-');\n case DateMode.DAY_MONTH_YEAR:\n default:\n return [\n date.getFullYear(),\n `0${date.getMonth() + 1}`.slice(-2),\n `0${date.getDate()}`.slice(-2),\n ].join('-');\n }\n };\n\n const getSelectElement = () => {\n return (\n <label className=\"d-flex flex-column\">\n <Body type={Typography.BODY_DEFAULT}>{monthLabel}</Body>\n <SelectInput\n name=\"month\"\n disabled={disabled}\n placeholder={placeholders?.month}\n items={Array.from({ length: 12 }, (_, index) => ({ type: 'option', value: index }))}\n size={size}\n value={month}\n renderValue={(selectedValue) => (\n <SelectInputOptionContent title={monthNames[selectedValue]} />\n )}\n onChange={(selectedValue) => handleMonthChange(selectedValue)}\n {...selectProps}\n />\n </label>\n );\n };\n\n const isDayValid = (newDay: number, newMonth: number, newYear: number) => {\n const maxDay = new Date(newYear, newMonth + 1, 0).getDate();\n return newDay <= maxDay;\n };\n\n const handleInternalValue = (newDay = day, newMonth = month, newYear = year) => {\n if (newDay == null || newDay === 0 || newMonth == null || newYear == null || newYear === 0) {\n broadcastNewValue(null);\n return;\n }\n if (!isDayValid(newDay, newMonth, newYear)) {\n broadcastNewValue(null);\n return;\n }\n\n const dateValue = new Date(newYear, newMonth, newDay);\n if (newYear < 100) {\n dateValue.setFullYear(newYear);\n }\n\n if (!isDateValid(dateValue)) {\n broadcastNewValue(null);\n return;\n }\n\n if (mode === DateMode.MONTH_YEAR) {\n if (newMonth !== month || newYear !== year) {\n broadcastNewValue(dateValue);\n }\n } else if (newDay !== day || newMonth !== month || newYear !== year) {\n broadcastNewValue(dateValue);\n }\n };\n\n const handleDayChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newDayString = event.target.value.replace(/\\D/g, '');\n const newDayNumber = Number.parseInt(newDayString, 10);\n\n setDay(newDayNumber);\n setDisplayDay(newDayString);\n handleInternalValue(newDayNumber, month, year);\n };\n\n const handleMonthChange = (selectedMonth: number | null) => {\n if (selectedMonth === null) {\n setMonth(null);\n handleInternalValue(day, null, year);\n return;\n }\n setMonth(selectedMonth);\n handleInternalValue(day, selectedMonth, year);\n };\n\n const handleYearChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newYearString = event.target.value.replace(/\\D/g, '');\n const newYearNumber = Number.parseInt(newYearString, 10);\n\n if (newYearString.length >= 4 && newYearString.length <= 6) {\n setYear(newYearNumber);\n setDisplayYear(newYearString);\n handleInternalValue(day, month, newYearNumber);\n } else {\n setYear(null);\n setDisplayYear(newYearString);\n handleInternalValue(day, month, null);\n }\n };\n\n const broadcastNewValue = (newValue: Date | null) => {\n if (newValue !== lastBroadcastedValue) {\n setLastBroadcastedValue(newValue);\n onChange(newValue != null ? getDateAsString(newValue) : null);\n }\n };\n\n const monthYearOnly = mode === DateMode.MONTH_YEAR;\n\n const monthWidth = classNames({\n 'col-sm-8': monthYearOnly,\n 'col-sm-5': !monthYearOnly,\n });\n\n const getMonth = () => {\n return <div className={monthWidth}>{getSelectElement()}</div>;\n };\n\n const getDay = () => {\n return (\n <div className=\"col-sm-3\">\n <label>\n <Body type={Typography.BODY_DEFAULT}>{dayLabel}</Body>\n <div className={`input-group input-group-${size}`}>\n <Input\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n name=\"day\"\n autoComplete={dayAutoComplete}\n value={displayDay || ''}\n placeholder={placeholders?.day}\n disabled={disabled}\n min={1}\n max={31}\n maxLength={2}\n onChange={(event) => handleDayChange(event)}\n />\n </div>\n </label>\n </div>\n );\n };\n\n const getYear = () => {\n return (\n <div className=\"col-sm-4\">\n <label>\n <Body type={Typography.BODY_DEFAULT}>{yearLabel}</Body>\n <div className={`input-group input-group-${size}`}>\n <Input\n type=\"text\"\n inputMode=\"numeric\"\n pattern=\"[0-9]*\"\n name=\"year\"\n autoComplete={yearAutoComplete}\n placeholder={placeholders?.year}\n value={displayYear || ''}\n disabled={disabled}\n min={0}\n max={9999}\n maxLength={6}\n onChange={(event) => handleYearChange(event)}\n />\n </div>\n </label>\n </div>\n );\n };\n const monthBeforeDay = MDY.has(locale);\n const yearFirst = YMD.has(locale);\n\n return (\n <div\n className=\"tw-date\"\n {...inputAttributes}\n id={id}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n role=\"group\" // Add role attribute to indicate container for interactive elements\n onFocus={(event) =>\n shouldPropagateOnFocus(event) ? onFocus && onFocus(event) : event.stopPropagation()\n }\n onBlur={(event) =>\n shouldPropagateOnBlur(event) ? onBlur && onBlur(event) : event.stopPropagation()\n }\n >\n <div className=\"row\">\n {(() => {\n if (monthYearOnly) {\n return (\n <>\n {!yearFirst && getMonth()}\n {getYear()}\n {yearFirst && getMonth()}\n </>\n );\n }\n if (monthBeforeDay) {\n return (\n <>\n {getMonth()}\n {getDay()}\n {getYear()}\n </>\n );\n }\n if (yearFirst) {\n return (\n <>\n {getYear()}\n {getMonth()}\n {getDay()}\n </>\n );\n }\n return (\n <>\n {getDay()}\n {getMonth()}\n {getYear()}\n </>\n );\n })()}\n </div>\n </div>\n );\n};\n\n// Should only propagate if the relatedTarget is not part of this DateInput component.\nfunction shouldPropagateOnFocus({\n target,\n relatedTarget,\n}: Pick<React.FocusEvent, 'target' | 'relatedTarget'>) {\n const targetParent = target.closest('.tw-date');\n const relatedParent = relatedTarget && relatedTarget.closest('.tw-date');\n return targetParent !== relatedParent;\n}\n\n// Should only propagate if the relatedTarget or the activeElement is not part of this DateInput component.\nfunction shouldPropagateOnBlur({\n target,\n relatedTarget,\n}: Pick<React.FocusEvent, 'target' | 'relatedTarget'>) {\n const blurElementParent = target.closest('.tw-date');\n // Even though FocusEvent.relatedTarget is supported by IE\n // (https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget)\n // \"IE11 sets document.activeElement to the next focused element before the blur event is called.\"\n // (https://stackoverflow.com/a/49325196/986241)\n // Therefore if the relatedTarget is null, we try the document.activeElement,\n // which may contain the HTML element that is gaining focus\n const focusElement =\n relatedTarget || (document.activeElement !== target ? document.activeElement : null);\n const focusElementParent = focusElement && focusElement.closest('.tw-date');\n return blurElementParent !== focusElementParent;\n}\n\nexport default DateInput;\n"],"names":["DateInput","ariaLabelledByProp","ariaLabel","disabled","size","Size","MEDIUM","value","dayLabel","dayAutoComplete","monthLabel","yearLabel","yearAutoComplete","monthFormat","MonthFormat","LONG","mode","DateMode","DAY_MONTH_YEAR","onChange","onFocus","onBlur","placeholders","id","idProp","selectProps","inputAttributes","useInputAttributes","nonLabelable","ariaLabelledBy","locale","formatMessage","useIntl","getDateObject","isDateValid","convertToLocalMidnight","undefined","getInitialDate","unit","dateObject","isMonthAndYearFormat","getFullYear","getMonth","getDate","day","setDay","useState","displayDay","setDisplayDay","toString","month","setMonth","year","setYear","displayYear","setDisplayYear","lastBroadcastedValue","setLastBroadcastedValue","monthNames","getMonthNames","messages","dayPlaceholder","yearPlaceholder","getDateAsString","date","MONTH_YEAR","slice","join","getSelectElement","_jsxs","className","children","_jsx","Body","type","Typography","BODY_DEFAULT","SelectInput","name","placeholder","items","Array","from","length","_","index","renderValue","selectedValue","SelectInputOptionContent","title","handleMonthChange","isDayValid","newDay","newMonth","newYear","maxDay","Date","handleInternalValue","broadcastNewValue","dateValue","setFullYear","handleDayChange","event","newDayString","target","replace","newDayNumber","Number","parseInt","selectedMonth","handleYearChange","newYearString","newYearNumber","newValue","monthYearOnly","monthWidth","classNames","getDay","Input","inputMode","pattern","autoComplete","min","max","maxLength","getYear","monthBeforeDay","MDY","has","yearFirst","YMD","role","shouldPropagateOnFocus","stopPropagation","shouldPropagateOnBlur","_Fragment","relatedTarget","targetParent","closest","relatedParent","blurElementParent","focusElement","document","activeElement","focusElementParent"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6CMA,MAAAA,SAAS,GAAGA,CAAC;AACjB,EAAA,iBAAiB,EAAEC,kBAAkB;AACrC,EAAA,YAAY,EAAEC,SAAS;AACvBC,EAAAA,QAAQ,GAAG,KAAK;EAChBC,IAAI,GAAGC,IAAI,CAACC,MAAM;EAClBC,KAAK;EACLC,QAAQ;EACRC,eAAe;EACfC,UAAU;EACVC,SAAS;EACTC,gBAAgB;EAChBC,WAAW,GAAGC,WAAW,CAACC,IAAI;EAC9BC,IAAI,GAAGC,QAAQ,CAACC,cAAc;EAC9BC,QAAQ;EACRC,OAAO;EACPC,MAAM;EACNC,YAAY;AACZC,EAAAA,EAAE,EAAEC,MAAM;AACVC,EAAAA,WAAW,GAAG,EAAE;AAAA,CACD,KAAI;EACnB,MAAMC,eAAe,GAAGC,kBAAkB,CAAC;AAAEC,IAAAA,YAAY,EAAE,IAAA;AAAM,GAAA,CAAC,CAAA;AAClE,EAAA,MAAML,EAAE,GAAGC,MAAM,IAAIE,eAAe,CAACH,EAAE,CAAA;AACvC,EAAA,MAAMM,cAAc,GAAG5B,kBAAkB,IAAIyB,eAAe,CAAC,iBAAiB,CAAC,CAAA;EAE/E,MAAM;IAAEI,MAAM;AAAEC,IAAAA,aAAAA;GAAe,GAAGC,OAAO,EAAE,CAAA;EAE3C,MAAMC,aAAa,GAAGA,MAAuB;AAC3C,IAAA,IAAI1B,KAAK,IAAI2B,WAAW,CAAC3B,KAAK,CAAC,EAAE;MAC/B,OAAO,OAAOA,KAAK,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jC,MAAM,CAACkC,OAAO,CAAC,UAAU,CAAC,CAAA;EAC/C,MAAMC,aAAa,GAAGH,aAAa,IAAIA,aAAa,CAACE,OAAO,CAAC,UAAU,CAAC,CAAA;EACxE,OAAOD,YAAY,KAAKE,aAAa,CAAA;AACvC,CAAA;AAEA;AACA,SAASL,qBAAqBA,CAAC;EAC7B9B,MAAM;AACNgC,EAAAA,aAAAA;AACmD,CAAA,EAAA;AACnD,EAAA,MAAMI,iBAAiB,GAAGpC,MAAM,CAACkC,OAAO,CAAC,UAAU,CAAC,CAAA;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,MAAMG,YAAY,GAChBL,aAAa,KAAKM,QAAQ,CAACC,aAAa,KAAKvC,MAAM,GAAGsC,QAAQ,CAACC,aAAa,GAAG,IAAI,CAAC,CAAA;EACtF,MAAMC,kBAAkB,GAAGH,YAAY,IAAIA,YAAY,CAACH,OAAO,CAAC,UAAU,CAAC,CAAA;EAC3E,OAAOE,iBAAiB,KAAKI,kBAAkB,CAAA;AACjD;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const convertToLocalMidnight = date => {
|
|
4
|
+
const utcDate = new Date(date.split('T')[0]); // using YYYY-MM-DD creates UTC date
|
|
5
|
+
return new Date(utcDate.getUTCFullYear(), utcDate.getUTCMonth(), utcDate.getUTCDate());
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
exports.convertToLocalMidnight = convertToLocalMidnight;
|
|
9
|
+
//# sourceMappingURL=convertToLocalMidnight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertToLocalMidnight.js","sources":["../../../../src/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.ts"],"sourcesContent":["export const convertToLocalMidnight = (date: string) => {\n const utcDate = new Date(date.split('T')[0]); // using YYYY-MM-DD creates UTC date\n\n return new Date(utcDate.getUTCFullYear(), utcDate.getUTCMonth(), utcDate.getUTCDate());\n};\n"],"names":["convertToLocalMidnight","date","utcDate","Date","split","getUTCFullYear","getUTCMonth","getUTCDate"],"mappings":";;AAAaA,MAAAA,sBAAsB,GAAIC,IAAY,IAAI;AACrD,EAAA,MAAMC,OAAO,GAAG,IAAIC,IAAI,CAACF,IAAI,CAACG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EAE7C,OAAO,IAAID,IAAI,CAACD,OAAO,CAACG,cAAc,EAAE,EAAEH,OAAO,CAACI,WAAW,EAAE,EAAEJ,OAAO,CAACK,UAAU,EAAE,CAAC,CAAA;AACxF;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const convertToLocalMidnight = date => {
|
|
2
|
+
const utcDate = new Date(date.split('T')[0]); // using YYYY-MM-DD creates UTC date
|
|
3
|
+
return new Date(utcDate.getUTCFullYear(), utcDate.getUTCMonth(), utcDate.getUTCDate());
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export { convertToLocalMidnight };
|
|
7
|
+
//# sourceMappingURL=convertToLocalMidnight.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertToLocalMidnight.mjs","sources":["../../../../src/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.ts"],"sourcesContent":["export const convertToLocalMidnight = (date: string) => {\n const utcDate = new Date(date.split('T')[0]); // using YYYY-MM-DD creates UTC date\n\n return new Date(utcDate.getUTCFullYear(), utcDate.getUTCMonth(), utcDate.getUTCDate());\n};\n"],"names":["convertToLocalMidnight","date","utcDate","Date","split","getUTCFullYear","getUTCMonth","getUTCDate"],"mappings":"AAAaA,MAAAA,sBAAsB,GAAIC,IAAY,IAAI;AACrD,EAAA,MAAMC,OAAO,GAAG,IAAIC,IAAI,CAACF,IAAI,CAACG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;EAE7C,OAAO,IAAID,IAAI,CAACD,OAAO,CAACG,cAAc,EAAE,EAAEH,OAAO,CAACI,WAAW,EAAE,EAAEJ,OAAO,CAACK,UAAU,EAAE,CAAC,CAAA;AACxF;;;;"}
|