@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,83 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var formatting = require('@transferwise/formatting');
|
|
4
|
+
var reactIntl = require('react-intl');
|
|
5
|
+
var getFocusableTime = require('../../getFocusableTime/getFocusableTime.js');
|
|
6
|
+
var TableLink = require('../../tableLink/TableLink.js');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
const ROWS = 5;
|
|
10
|
+
const COLS = 4;
|
|
11
|
+
const YEAR_ONLY_FORMAT = {
|
|
12
|
+
year: 'numeric'
|
|
13
|
+
};
|
|
14
|
+
const YearCalendarTable = ({
|
|
15
|
+
selectedDate,
|
|
16
|
+
min,
|
|
17
|
+
max,
|
|
18
|
+
viewYear,
|
|
19
|
+
placeholder,
|
|
20
|
+
onSelect
|
|
21
|
+
}) => {
|
|
22
|
+
const {
|
|
23
|
+
locale
|
|
24
|
+
} = reactIntl.useIntl();
|
|
25
|
+
const startYear = viewYear - viewYear % 20;
|
|
26
|
+
const getLink = year => {
|
|
27
|
+
return /*#__PURE__*/jsxRuntime.jsx(TableLink, {
|
|
28
|
+
item: year,
|
|
29
|
+
type: "year",
|
|
30
|
+
title: formatting.formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT),
|
|
31
|
+
active: isActive(year),
|
|
32
|
+
disabled: isDisabled(year),
|
|
33
|
+
today: isThisYear(year),
|
|
34
|
+
autofocus: autofocusYear === year,
|
|
35
|
+
onClick: onSelect
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const isActive = year => {
|
|
39
|
+
return !!(selectedDate && year === selectedDate.getFullYear());
|
|
40
|
+
};
|
|
41
|
+
const isThisYear = year => {
|
|
42
|
+
return year === new Date().getFullYear();
|
|
43
|
+
};
|
|
44
|
+
const isDisabled = year => {
|
|
45
|
+
return !!(min && year < min.getFullYear() || max && year > max.getFullYear());
|
|
46
|
+
};
|
|
47
|
+
const autofocusYear = (() => {
|
|
48
|
+
const years = Array.from({
|
|
49
|
+
length: ROWS * COLS
|
|
50
|
+
}, (_, index) => startYear + index);
|
|
51
|
+
return getFocusableTime.getFocusableTime({
|
|
52
|
+
isActive,
|
|
53
|
+
isNow: isThisYear,
|
|
54
|
+
isDisabled,
|
|
55
|
+
timeSpan: years
|
|
56
|
+
});
|
|
57
|
+
})();
|
|
58
|
+
return /*#__PURE__*/jsxRuntime.jsxs("table", {
|
|
59
|
+
className: "table table-condensed table-bordered tw-date-lookup-calendar m-b-0",
|
|
60
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("thead", {
|
|
61
|
+
className: "sr-only",
|
|
62
|
+
children: /*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
63
|
+
children: /*#__PURE__*/jsxRuntime.jsx("th", {
|
|
64
|
+
colSpan: COLS,
|
|
65
|
+
children: placeholder
|
|
66
|
+
})
|
|
67
|
+
})
|
|
68
|
+
}), /*#__PURE__*/jsxRuntime.jsx("tbody", {
|
|
69
|
+
children: Array.from({
|
|
70
|
+
length: ROWS
|
|
71
|
+
}, (_, rowIndex) => /*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
72
|
+
children: Array.from({
|
|
73
|
+
length: COLS
|
|
74
|
+
}, (_, colIndex) => /*#__PURE__*/jsxRuntime.jsx("td", {
|
|
75
|
+
children: getLink(startYear + rowIndex * COLS + colIndex)
|
|
76
|
+
}, colIndex))
|
|
77
|
+
}, rowIndex))
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
module.exports = YearCalendarTable;
|
|
83
|
+
//# sourceMappingURL=YearCalendarTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YearCalendarTable.js","sources":["../../../../src/dateLookup/yearCalendar/table/YearCalendarTable.tsx"],"sourcesContent":["import { formatDate } from '@transferwise/formatting';\nimport { useIntl } from 'react-intl';\n\nimport { getFocusableTime } from '../../getFocusableTime/getFocusableTime';\nimport TableLink from '../../tableLink';\n\ninterface YearCalendarTableProps {\n selectedDate: Date | null;\n min: Date | null;\n max: Date | null;\n viewYear: number;\n placeholder: string;\n onSelect: (year: number) => void;\n}\n\nconst ROWS = 5;\nconst COLS = 4;\nconst YEAR_ONLY_FORMAT: Intl.DateTimeFormatOptions = { year: 'numeric' };\n\nconst YearCalendarTable = ({\n selectedDate,\n min,\n max,\n viewYear,\n placeholder,\n onSelect,\n}: YearCalendarTableProps) => {\n const { locale } = useIntl();\n const startYear = viewYear - (viewYear % 20);\n const getLink = (year: number) => {\n return (\n <TableLink\n item={year}\n type=\"year\"\n title={formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT)}\n active={isActive(year)}\n disabled={isDisabled(year)}\n today={isThisYear(year)}\n autofocus={autofocusYear === year}\n onClick={onSelect}\n />\n );\n };\n\n const isActive = (year: number) => {\n return !!(selectedDate && year === selectedDate.getFullYear());\n };\n\n const isThisYear = (year: number) => {\n return year === new Date().getFullYear();\n };\n\n const isDisabled = (year: number) => {\n return !!((min && year < min.getFullYear()) || (max && year > max.getFullYear()));\n };\n\n const autofocusYear = (() => {\n const years = Array.from({ length: ROWS * COLS }, (_, index) => startYear + index);\n return getFocusableTime({ isActive, isNow: isThisYear, isDisabled, timeSpan: years });\n })();\n\n return (\n <table className=\"table table-condensed table-bordered tw-date-lookup-calendar m-b-0\">\n <thead className=\"sr-only\">\n <tr>\n <th colSpan={COLS}>{placeholder}</th>\n </tr>\n </thead>\n <tbody>\n {Array.from({ length: ROWS }, (_, rowIndex) => (\n <tr key={rowIndex}>\n {Array.from({ length: COLS }, (_, colIndex) => (\n <td key={colIndex}>{getLink(startYear + rowIndex * COLS + colIndex)}</td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nexport default YearCalendarTable;\n"],"names":["ROWS","COLS","YEAR_ONLY_FORMAT","year","YearCalendarTable","selectedDate","min","max","viewYear","placeholder","onSelect","locale","useIntl","startYear","getLink","_jsx","TableLink","item","type","title","formatDate","Date","active","isActive","disabled","isDisabled","today","isThisYear","autofocus","autofocusYear","onClick","getFullYear","years","Array","from","length","_","index","getFocusableTime","isNow","timeSpan","_jsxs","className","children","colSpan","rowIndex","colIndex"],"mappings":";;;;;;;;AAeA,MAAMA,IAAI,GAAG,CAAC,CAAA;AACd,MAAMC,IAAI,GAAG,CAAC,CAAA;AACd,MAAMC,gBAAgB,GAA+B;AAAEC,EAAAA,IAAI,EAAE,SAAA;CAAW,CAAA;AAElEC,MAAAA,iBAAiB,GAAGA,CAAC;EACzBC,YAAY;EACZC,GAAG;EACHC,GAAG;EACHC,QAAQ;EACRC,WAAW;AACXC,EAAAA,QAAAA;AAAQ,CACe,KAAI;EAC3B,MAAM;AAAEC,IAAAA,MAAAA;GAAQ,GAAGC,iBAAO,EAAE,CAAA;AAC5B,EAAA,MAAMC,SAAS,GAAGL,QAAQ,GAAIA,QAAQ,GAAG,EAAG,CAAA;EAC5C,MAAMM,OAAO,GAAIX,IAAY,IAAI;IAC/B,oBACEY,cAAA,CAACC,SAAS,EAAA;AACRC,MAAAA,IAAI,EAAEd,IAAK;AACXe,MAAAA,IAAI,EAAC,MAAM;AACXC,MAAAA,KAAK,EAAEC,qBAAU,CAAC,IAAIC,IAAI,CAAClB,IAAI,EAAE,CAAC,CAAC,EAAEQ,MAAM,EAAET,gBAAgB,CAAE;AAC/DoB,MAAAA,MAAM,EAAEC,QAAQ,CAACpB,IAAI,CAAE;AACvBqB,MAAAA,QAAQ,EAAEC,UAAU,CAACtB,IAAI,CAAE;AAC3BuB,MAAAA,KAAK,EAAEC,UAAU,CAACxB,IAAI,CAAE;MACxByB,SAAS,EAAEC,aAAa,KAAK1B,IAAK;AAClC2B,MAAAA,OAAO,EAAEpB,QAAAA;AAAS,KAAA,CAClB,CAAA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AClC,CAAA;KACC,CACP,eAAAM,cAAA,CAAA,OAAA,EAAA;AAAA4B,MAAAA,QAAA,EACGV,KAAK,CAACC,IAAI,CAAC;AAAEC,QAAAA,MAAM,EAAEnC,IAAAA;AAAI,OAAE,EAAE,CAACoC,CAAC,EAAES,QAAQ,kBACxC9B,cAAA,CAAA,IAAA,EAAA;AAAA4B,QAAAA,QAAA,EACGV,KAAK,CAACC,IAAI,CAAC;AAAEC,UAAAA,MAAM,EAAElC,IAAAA;AAAM,SAAA,EAAE,CAACmC,CAAC,EAAEU,QAAQ,kBACxC/B,cAAA,CAAA,IAAA,EAAA;UAAA4B,QAAA,EAAoB7B,OAAO,CAACD,SAAS,GAAGgC,QAAQ,GAAG5C,IAAI,GAAG6C,QAAQ,CAAA;AAAC,SAAA,EAA1DA,QAA+D,CACzE,CAAA;AAAC,OAAA,EAHKD,QAIL,CACL,CAAA;AAAC,KACG,CACT,CAAA;AAAA,GAAO,CAAC,CAAA;AAEZ;;;;"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { formatDate } from '@transferwise/formatting';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
import { getFocusableTime } from '../../getFocusableTime/getFocusableTime.mjs';
|
|
4
|
+
import TableLink from '../../tableLink/TableLink.mjs';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
const ROWS = 5;
|
|
8
|
+
const COLS = 4;
|
|
9
|
+
const YEAR_ONLY_FORMAT = {
|
|
10
|
+
year: 'numeric'
|
|
11
|
+
};
|
|
12
|
+
const YearCalendarTable = ({
|
|
13
|
+
selectedDate,
|
|
14
|
+
min,
|
|
15
|
+
max,
|
|
16
|
+
viewYear,
|
|
17
|
+
placeholder,
|
|
18
|
+
onSelect
|
|
19
|
+
}) => {
|
|
20
|
+
const {
|
|
21
|
+
locale
|
|
22
|
+
} = useIntl();
|
|
23
|
+
const startYear = viewYear - viewYear % 20;
|
|
24
|
+
const getLink = year => {
|
|
25
|
+
return /*#__PURE__*/jsx(TableLink, {
|
|
26
|
+
item: year,
|
|
27
|
+
type: "year",
|
|
28
|
+
title: formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT),
|
|
29
|
+
active: isActive(year),
|
|
30
|
+
disabled: isDisabled(year),
|
|
31
|
+
today: isThisYear(year),
|
|
32
|
+
autofocus: autofocusYear === year,
|
|
33
|
+
onClick: onSelect
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const isActive = year => {
|
|
37
|
+
return !!(selectedDate && year === selectedDate.getFullYear());
|
|
38
|
+
};
|
|
39
|
+
const isThisYear = year => {
|
|
40
|
+
return year === new Date().getFullYear();
|
|
41
|
+
};
|
|
42
|
+
const isDisabled = year => {
|
|
43
|
+
return !!(min && year < min.getFullYear() || max && year > max.getFullYear());
|
|
44
|
+
};
|
|
45
|
+
const autofocusYear = (() => {
|
|
46
|
+
const years = Array.from({
|
|
47
|
+
length: ROWS * COLS
|
|
48
|
+
}, (_, index) => startYear + index);
|
|
49
|
+
return getFocusableTime({
|
|
50
|
+
isActive,
|
|
51
|
+
isNow: isThisYear,
|
|
52
|
+
isDisabled,
|
|
53
|
+
timeSpan: years
|
|
54
|
+
});
|
|
55
|
+
})();
|
|
56
|
+
return /*#__PURE__*/jsxs("table", {
|
|
57
|
+
className: "table table-condensed table-bordered tw-date-lookup-calendar m-b-0",
|
|
58
|
+
children: [/*#__PURE__*/jsx("thead", {
|
|
59
|
+
className: "sr-only",
|
|
60
|
+
children: /*#__PURE__*/jsx("tr", {
|
|
61
|
+
children: /*#__PURE__*/jsx("th", {
|
|
62
|
+
colSpan: COLS,
|
|
63
|
+
children: placeholder
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
}), /*#__PURE__*/jsx("tbody", {
|
|
67
|
+
children: Array.from({
|
|
68
|
+
length: ROWS
|
|
69
|
+
}, (_, rowIndex) => /*#__PURE__*/jsx("tr", {
|
|
70
|
+
children: Array.from({
|
|
71
|
+
length: COLS
|
|
72
|
+
}, (_, colIndex) => /*#__PURE__*/jsx("td", {
|
|
73
|
+
children: getLink(startYear + rowIndex * COLS + colIndex)
|
|
74
|
+
}, colIndex))
|
|
75
|
+
}, rowIndex))
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { YearCalendarTable as default };
|
|
81
|
+
//# sourceMappingURL=YearCalendarTable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YearCalendarTable.mjs","sources":["../../../../src/dateLookup/yearCalendar/table/YearCalendarTable.tsx"],"sourcesContent":["import { formatDate } from '@transferwise/formatting';\nimport { useIntl } from 'react-intl';\n\nimport { getFocusableTime } from '../../getFocusableTime/getFocusableTime';\nimport TableLink from '../../tableLink';\n\ninterface YearCalendarTableProps {\n selectedDate: Date | null;\n min: Date | null;\n max: Date | null;\n viewYear: number;\n placeholder: string;\n onSelect: (year: number) => void;\n}\n\nconst ROWS = 5;\nconst COLS = 4;\nconst YEAR_ONLY_FORMAT: Intl.DateTimeFormatOptions = { year: 'numeric' };\n\nconst YearCalendarTable = ({\n selectedDate,\n min,\n max,\n viewYear,\n placeholder,\n onSelect,\n}: YearCalendarTableProps) => {\n const { locale } = useIntl();\n const startYear = viewYear - (viewYear % 20);\n const getLink = (year: number) => {\n return (\n <TableLink\n item={year}\n type=\"year\"\n title={formatDate(new Date(year, 0), locale, YEAR_ONLY_FORMAT)}\n active={isActive(year)}\n disabled={isDisabled(year)}\n today={isThisYear(year)}\n autofocus={autofocusYear === year}\n onClick={onSelect}\n />\n );\n };\n\n const isActive = (year: number) => {\n return !!(selectedDate && year === selectedDate.getFullYear());\n };\n\n const isThisYear = (year: number) => {\n return year === new Date().getFullYear();\n };\n\n const isDisabled = (year: number) => {\n return !!((min && year < min.getFullYear()) || (max && year > max.getFullYear()));\n };\n\n const autofocusYear = (() => {\n const years = Array.from({ length: ROWS * COLS }, (_, index) => startYear + index);\n return getFocusableTime({ isActive, isNow: isThisYear, isDisabled, timeSpan: years });\n })();\n\n return (\n <table className=\"table table-condensed table-bordered tw-date-lookup-calendar m-b-0\">\n <thead className=\"sr-only\">\n <tr>\n <th colSpan={COLS}>{placeholder}</th>\n </tr>\n </thead>\n <tbody>\n {Array.from({ length: ROWS }, (_, rowIndex) => (\n <tr key={rowIndex}>\n {Array.from({ length: COLS }, (_, colIndex) => (\n <td key={colIndex}>{getLink(startYear + rowIndex * COLS + colIndex)}</td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n};\n\nexport default YearCalendarTable;\n"],"names":["ROWS","COLS","YEAR_ONLY_FORMAT","year","YearCalendarTable","selectedDate","min","max","viewYear","placeholder","onSelect","locale","useIntl","startYear","getLink","_jsx","TableLink","item","type","title","formatDate","Date","active","isActive","disabled","isDisabled","today","isThisYear","autofocus","autofocusYear","onClick","getFullYear","years","Array","from","length","_","index","getFocusableTime","isNow","timeSpan","_jsxs","className","children","colSpan","rowIndex","colIndex"],"mappings":";;;;;;AAeA,MAAMA,IAAI,GAAG,CAAC,CAAA;AACd,MAAMC,IAAI,GAAG,CAAC,CAAA;AACd,MAAMC,gBAAgB,GAA+B;AAAEC,EAAAA,IAAI,EAAE,SAAA;CAAW,CAAA;AAElEC,MAAAA,iBAAiB,GAAGA,CAAC;EACzBC,YAAY;EACZC,GAAG;EACHC,GAAG;EACHC,QAAQ;EACRC,WAAW;AACXC,EAAAA,QAAAA;AAAQ,CACe,KAAI;EAC3B,MAAM;AAAEC,IAAAA,MAAAA;GAAQ,GAAGC,OAAO,EAAE,CAAA;AAC5B,EAAA,MAAMC,SAAS,GAAGL,QAAQ,GAAIA,QAAQ,GAAG,EAAG,CAAA;EAC5C,MAAMM,OAAO,GAAIX,IAAY,IAAI;IAC/B,oBACEY,GAAA,CAACC,SAAS,EAAA;AACRC,MAAAA,IAAI,EAAEd,IAAK;AACXe,MAAAA,IAAI,EAAC,MAAM;AACXC,MAAAA,KAAK,EAAEC,UA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AEJ,EAAA,oBACES,IAAA,CAAA,OAAA,EAAA;AAAOC,IAAAA,SAAS,EAAC,oEAAoE;AAAAC,IAAAA,QAAA,gBACnF5B,GAAA,CAAA,OAAA,EAAA;AAAO2B,MAAAA,SAAS,EAAC,SAAS;AAAAC,MAAAA,QAAA,eACxB5B,GAAA,CAAA,IAAA,EAAA;AAAA4B,QAAAA,QAAA,eACE5B,GAAA,CAAA,IAAA,EAAA;AAAI6B,UAAAA,OAAO,EAAE3C,IAAK;AAAA0C,UAAAA,QAAA,EAAElC,WAAAA;SAAgB,CAAA;OAClC,CAAA;KACC,CACP,eAAAM,GAAA,CAAA,OAAA,EAAA;AAAA4B,MAAAA,QAAA,EACGV,KAAK,CAACC,IAAI,CAAC;AAAEC,QAAAA,MAAM,EAAEnC,IAAAA;AAAI,OAAE,EAAE,CAACoC,CAAC,EAAES,QAAQ,kBACxC9B,GAAA,CAAA,IAAA,EAAA;AAAA4B,QAAAA,QAAA,EACGV,KAAK,CAACC,IAAI,CAAC;AAAEC,UAAAA,MAAM,EAAElC,IAAAA;AAAM,SAAA,EAAE,CAACmC,CAAC,EAAEU,QAAQ,kBACxC/B,GAAA,CAAA,IAAA,EAAA;UAAA4B,QAAA,EAAoB7B,OAAO,CAACD,SAAS,GAAGgC,QAAQ,GAAG5C,IAAI,GAAG6C,QAAQ,CAAA;AAAC,SAAA,EAA1DA,QAA+D,CACzE,CAAA;AAAC,OAAA,EAHKD,QAIL,CACL,CAAA;AAAC,KACG,CACT,CAAA;AAAA,GAAO,CAAC,CAAA;AAEZ;;;;"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var classNames = require('classnames');
|
|
6
|
+
var useScreenSize = require('../common/hooks/useScreenSize.js');
|
|
7
|
+
var NavigationOption = require('../navigationOption/NavigationOption.js');
|
|
8
|
+
var Tile = require('../tile/Tile.js');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
+
var breakpoint = require('../common/propsValues/breakpoint.js');
|
|
11
|
+
var size = require('../common/propsValues/size.js');
|
|
12
|
+
|
|
13
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
|
|
15
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
16
|
+
|
|
17
|
+
exports.DecisionPresentation = void 0;
|
|
18
|
+
(function (DecisionPresentation) {
|
|
19
|
+
DecisionPresentation["LIST"] = "LIST";
|
|
20
|
+
DecisionPresentation["LIST_BLOCK"] = "LIST_BLOCK";
|
|
21
|
+
DecisionPresentation["LIST_BLOCK_GRID"] = "LIST_BLOCK_GRID";
|
|
22
|
+
})(exports.DecisionPresentation || (exports.DecisionPresentation = {}));
|
|
23
|
+
exports.DecisionType = void 0;
|
|
24
|
+
(function (DecisionType) {
|
|
25
|
+
DecisionType["NAVIGATION"] = "NAVIGATION";
|
|
26
|
+
})(exports.DecisionType || (exports.DecisionType = {}));
|
|
27
|
+
const Decision = ({
|
|
28
|
+
options,
|
|
29
|
+
presentation = exports.DecisionPresentation.LIST,
|
|
30
|
+
size: size$1 = size.Size.MEDIUM,
|
|
31
|
+
type = exports.DecisionType.NAVIGATION,
|
|
32
|
+
showMediaCircleInList = true,
|
|
33
|
+
isContainerAligned = false
|
|
34
|
+
}) => {
|
|
35
|
+
const screenXs = useScreenSize.useScreenSize(breakpoint.Breakpoint.EXTRA_SMALL);
|
|
36
|
+
const screenSm = useScreenSize.useScreenSize(breakpoint.Breakpoint.SMALL);
|
|
37
|
+
if (type === exports.DecisionType.NAVIGATION) {
|
|
38
|
+
const renderedOptions = options.map(({
|
|
39
|
+
title,
|
|
40
|
+
description,
|
|
41
|
+
disabled,
|
|
42
|
+
href,
|
|
43
|
+
target,
|
|
44
|
+
media: {
|
|
45
|
+
list
|
|
46
|
+
},
|
|
47
|
+
onClick
|
|
48
|
+
}, key) => /*#__PURE__*/jsxRuntime.jsx(NavigationOption
|
|
49
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
50
|
+
, {
|
|
51
|
+
complex: false,
|
|
52
|
+
content: description,
|
|
53
|
+
disabled: disabled,
|
|
54
|
+
href: href,
|
|
55
|
+
target: target,
|
|
56
|
+
media: list,
|
|
57
|
+
showMediaAtAllSizes: true,
|
|
58
|
+
showMediaCircle: showMediaCircleInList,
|
|
59
|
+
isContainerAligned: isContainerAligned,
|
|
60
|
+
title: title,
|
|
61
|
+
onClick: onClick
|
|
62
|
+
}, `nav-${key}`));
|
|
63
|
+
if (presentation === exports.DecisionPresentation.LIST_BLOCK || presentation === exports.DecisionPresentation.LIST_BLOCK_GRID) {
|
|
64
|
+
const isSmall = size$1 === size.Size.SMALL;
|
|
65
|
+
const breakpoint = isSmall ? screenXs : screenSm;
|
|
66
|
+
const isGrid = presentation === exports.DecisionPresentation.LIST_BLOCK_GRID;
|
|
67
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
68
|
+
className: classNames__default.default('np-decision d-flex', {
|
|
69
|
+
'np-decision--small': isSmall,
|
|
70
|
+
'np-decision--grid': isGrid
|
|
71
|
+
}, breakpoint ? isGrid && 'flex-wrap' : 'flex-column'),
|
|
72
|
+
children: breakpoint ? options.map(({
|
|
73
|
+
description,
|
|
74
|
+
disabled,
|
|
75
|
+
href,
|
|
76
|
+
target,
|
|
77
|
+
media: {
|
|
78
|
+
block
|
|
79
|
+
},
|
|
80
|
+
onClick,
|
|
81
|
+
title
|
|
82
|
+
}, key) => /*#__PURE__*/jsxRuntime.jsx(Tile
|
|
83
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
84
|
+
, {
|
|
85
|
+
className: classNames__default.default(`np-decision__tile${isSmall ? '--small' : ''}`, {
|
|
86
|
+
'np-decision__tile--fixed-width': isGrid
|
|
87
|
+
}),
|
|
88
|
+
description: description,
|
|
89
|
+
disabled: disabled,
|
|
90
|
+
href: href,
|
|
91
|
+
target: target,
|
|
92
|
+
media: block,
|
|
93
|
+
size: isSmall ? size.Size.SMALL : size.Size.MEDIUM,
|
|
94
|
+
title: title,
|
|
95
|
+
onClick: onClick
|
|
96
|
+
}, `tile-${key}`)) : renderedOptions
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
// LIST
|
|
100
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
101
|
+
children: renderedOptions
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return null;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
exports.default = Decision;
|
|
108
|
+
//# sourceMappingURL=Decision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Decision.js","sources":["../../src/decision/Decision.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport { Size, Breakpoint, SizeSmall, SizeMedium } from '../common';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport NavigationOption from '../navigationOption';\nimport Tile from '../tile';\n\ninterface DecisionOption {\n description?: React.ReactNode;\n disabled?: boolean;\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n media: {\n block: React.ReactNode;\n list: React.ReactNode;\n };\n onClick?: (event?: React.MouseEvent<HTMLElement>) => void;\n title: React.ReactNode;\n}\n\nexport enum DecisionPresentation {\n LIST = 'LIST',\n LIST_BLOCK = 'LIST_BLOCK',\n LIST_BLOCK_GRID = 'LIST_BLOCK_GRID',\n}\n\nexport enum DecisionType {\n NAVIGATION = 'NAVIGATION',\n}\n\nexport interface DecisionProps {\n /** A list of elements to be rendered */\n options: readonly DecisionOption[];\n /** Handles the display mode of the component */\n presentation?: `${DecisionPresentation}`;\n /** Size currently affects only Tile dimension */\n size?: SizeSmall | SizeMedium;\n /** Decide which kind of element type needs to be rendered ex: Navigation Options or in the future Radio or Checkbox Options */\n type?: `${DecisionType}`;\n\n /** Display media in a circle in list presentation */\n showMediaCircleInList?: boolean;\n\n /** Sets navigation options to be aligned with the parent container */\n isContainerAligned?: boolean;\n}\n\nconst Decision = ({\n options,\n presentation = DecisionPresentation.LIST,\n size = Size.MEDIUM,\n type = DecisionType.NAVIGATION,\n showMediaCircleInList = true,\n isContainerAligned = false,\n}: DecisionProps) => {\n const screenXs = useScreenSize(Breakpoint.EXTRA_SMALL);\n const screenSm = useScreenSize(Breakpoint.SMALL);\n\n if (type === DecisionType.NAVIGATION) {\n const renderedOptions = options.map(\n ({ title, description, disabled, href, target, media: { list }, onClick }, key) => (\n <NavigationOption\n // eslint-disable-next-line react/no-array-index-key\n key={`nav-${key}`}\n complex={false}\n content={description}\n disabled={disabled}\n href={href}\n target={target}\n media={list}\n showMediaAtAllSizes\n showMediaCircle={showMediaCircleInList}\n isContainerAligned={isContainerAligned}\n title={title}\n onClick={onClick}\n />\n ),\n );\n\n if (\n presentation === DecisionPresentation.LIST_BLOCK ||\n presentation === DecisionPresentation.LIST_BLOCK_GRID\n ) {\n const isSmall = size === Size.SMALL;\n const breakpoint = isSmall ? screenXs : screenSm;\n\n const isGrid = presentation === DecisionPresentation.LIST_BLOCK_GRID;\n\n return (\n <div\n className={classNames(\n 'np-decision d-flex',\n {\n 'np-decision--small': isSmall,\n 'np-decision--grid': isGrid,\n },\n breakpoint ? isGrid && 'flex-wrap' : 'flex-column',\n )}\n >\n {breakpoint\n ? options.map(\n (\n { description, disabled, href, target, media: { block }, onClick, title },\n key,\n ) => (\n <Tile\n // eslint-disable-next-line react/no-array-index-key\n key={`tile-${key}`}\n className={classNames(`np-decision__tile${isSmall ? '--small' : ''}`, {\n 'np-decision__tile--fixed-width': isGrid,\n })}\n description={description}\n disabled={disabled}\n href={href}\n target={target}\n media={block}\n size={isSmall ? Size.SMALL : Size.MEDIUM}\n title={title}\n onClick={onClick}\n />\n ),\n )\n : renderedOptions}\n </div>\n );\n }\n // LIST\n return <>{renderedOptions}</>;\n }\n return null;\n};\n\nexport default Decision;\n"],"names":["DecisionPresentation","DecisionType","Decision","options","presentation","LIST","size","Size","MEDIUM","type","NAVIGATION","showMediaCircleInList","isContainerAligned","screenXs","useScreenSize","Breakpoint","EXTRA_SMALL","screenSm","SMALL","renderedOptions","map","title","description","disabled","href","target","media","list","onClick","key","_jsx","NavigationOption","complex","content","showMediaAtAllSizes","showMediaCircle","LIST_BLOCK","LIST_BLOCK_GRID","isSmall","breakpoint","isGrid","className","classNames","children","block","Tile","_Fragment"],"mappings":";;;;;;;;;;;;;;;;AAoBYA,sCAIX;AAJD,CAAA,UAAYA,oBAAoB,EAAA;AAC9BA,EAAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACbA,EAAAA,oBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzBA,EAAAA,oBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC,CAAA;AACrC,CAAC,EAJWA,4BAAoB,KAApBA,4BAAoB,GAI/B,EAAA,CAAA,CAAA,CAAA;AAEWC,8BAEX;AAFD,CAAA,UAAYA,YAAY,EAAA;AACtBA,EAAAA,YAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AAC3B,CAAC,EAFWA,oBAAY,KAAZA,oBAAY,GAEvB,EAAA,CAAA,CAAA,CAAA;AAmBKC,MAAAA,QAAQ,GAAGA,CAAC;EAChBC,OAAO;EACPC,YAAY,GAAGJ,4BAAoB,CAACK,IAAI;QACxCC,MAAI,GAAGC,SAAI,CAACC,MAAM;EAClBC,IAAI,GAAGR,oBAAY,CAACS,UAAU;AAC9BC,EAAAA,qBAAqB,GAAG,IAAI;AAC5BC,EAAAA,kBAAkB,GAAG,KAAA;AAAK,CACZ,KAAI;AAClB,EAAA,MAAMC,QAAQ,GAAGC,2BAAa,CAACC,qBAAU,CAACC,WAAW,CAAC,CAAA;AACtD,EAAA,MAAMC,QAAQ,GAAGH,2BAAa,CAACC,qBAAU,CAACG,KAAK,CAAC,CAAA;AAEhD,EAAA,IAAIT,IAAI,KAAKR,oBAAY,CAACS,UAAU,EAAE;AACpC,IAAA,MAAMS,e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AAG,aAAa,CAClD;AAAAG,QAAAA,QAAA,EAEDJ,UAAU,GACPpC,OAAO,CAACiB,GAAG,CACT,CACE;UAAEE,WAAW;UAAEC,QAAQ;UAAEC,IAAI;UAAEC,MAAM;AAAEC,UAAAA,KAAK,EAAE;AAAEkB,YAAAA,KAAAA;WAAO;UAAEhB,OAAO;AAAEP,UAAAA,KAAAA;AAAK,SAAE,EACzEQ,GAAG,kBAEHC,cAAA,CAACe,IAAAA;AACC;AAAA,UAAA;UAEAJ,SAAS,EAAEC,2BAAU,CAAqB,CAAAJ,iBAAAA,EAAAA,OAAO,GAAG,SAAS,GAAG,EAAE,CAAA,CAAE,EAAE;AACpE,YAAA,gCAAgC,EAAEE,MAAAA;AACnC,WAAA,CAAE;AACHlB,UAAAA,WAAW,EAAEA,WAAY;AACzBC,UAAAA,QAAQ,EAAEA,QAAS;AACnBC,UAAAA,IAAI,EAAEA,IAAK;AACXC,UAAAA,MAAM,EAAEA,MAAO;AACfC,UAAAA,KAAK,EAAEkB,KAAM;UACbtC,IAAI,EAAEgC,OAAO,GAAG/B,SAAI,CAACW,KAAK,GAAGX,SAAI,CAACC,MAAO;AACzCa,UAAAA,KAAK,EAAEA,KAAM;AACbO,UAAAA,OAAO,EAAEA,OAAAA;AAAQ,SAAA,EAXJ,CAAAC,KAAAA,EAAAA,IAWI,CAAA,CAEpB,CACF,GACDV,eAAAA;AAAe,OAChB,CAAC,CAAA;AAEV,KAAA;AACA;IACA,oBAAOW,cAAA,CAAAgB,mBAAA,EAAA;AAAAH,MAAAA,QAAA,EAAGxB,eAAAA;AAAe,MAAI,CAAA;AAC/B,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb;;;;"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { useScreenSize } from '../common/hooks/useScreenSize.mjs';
|
|
3
|
+
import NavigationOption from '../navigationOption/NavigationOption.mjs';
|
|
4
|
+
import Tile from '../tile/Tile.mjs';
|
|
5
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
import { Breakpoint } from '../common/propsValues/breakpoint.mjs';
|
|
7
|
+
import { Size } from '../common/propsValues/size.mjs';
|
|
8
|
+
|
|
9
|
+
var DecisionPresentation;
|
|
10
|
+
(function (DecisionPresentation) {
|
|
11
|
+
DecisionPresentation["LIST"] = "LIST";
|
|
12
|
+
DecisionPresentation["LIST_BLOCK"] = "LIST_BLOCK";
|
|
13
|
+
DecisionPresentation["LIST_BLOCK_GRID"] = "LIST_BLOCK_GRID";
|
|
14
|
+
})(DecisionPresentation || (DecisionPresentation = {}));
|
|
15
|
+
var DecisionType;
|
|
16
|
+
(function (DecisionType) {
|
|
17
|
+
DecisionType["NAVIGATION"] = "NAVIGATION";
|
|
18
|
+
})(DecisionType || (DecisionType = {}));
|
|
19
|
+
const Decision = ({
|
|
20
|
+
options,
|
|
21
|
+
presentation = DecisionPresentation.LIST,
|
|
22
|
+
size = Size.MEDIUM,
|
|
23
|
+
type = DecisionType.NAVIGATION,
|
|
24
|
+
showMediaCircleInList = true,
|
|
25
|
+
isContainerAligned = false
|
|
26
|
+
}) => {
|
|
27
|
+
const screenXs = useScreenSize(Breakpoint.EXTRA_SMALL);
|
|
28
|
+
const screenSm = useScreenSize(Breakpoint.SMALL);
|
|
29
|
+
if (type === DecisionType.NAVIGATION) {
|
|
30
|
+
const renderedOptions = options.map(({
|
|
31
|
+
title,
|
|
32
|
+
description,
|
|
33
|
+
disabled,
|
|
34
|
+
href,
|
|
35
|
+
target,
|
|
36
|
+
media: {
|
|
37
|
+
list
|
|
38
|
+
},
|
|
39
|
+
onClick
|
|
40
|
+
}, key) => /*#__PURE__*/jsx(NavigationOption
|
|
41
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
42
|
+
, {
|
|
43
|
+
complex: false,
|
|
44
|
+
content: description,
|
|
45
|
+
disabled: disabled,
|
|
46
|
+
href: href,
|
|
47
|
+
target: target,
|
|
48
|
+
media: list,
|
|
49
|
+
showMediaAtAllSizes: true,
|
|
50
|
+
showMediaCircle: showMediaCircleInList,
|
|
51
|
+
isContainerAligned: isContainerAligned,
|
|
52
|
+
title: title,
|
|
53
|
+
onClick: onClick
|
|
54
|
+
}, `nav-${key}`));
|
|
55
|
+
if (presentation === DecisionPresentation.LIST_BLOCK || presentation === DecisionPresentation.LIST_BLOCK_GRID) {
|
|
56
|
+
const isSmall = size === Size.SMALL;
|
|
57
|
+
const breakpoint = isSmall ? screenXs : screenSm;
|
|
58
|
+
const isGrid = presentation === DecisionPresentation.LIST_BLOCK_GRID;
|
|
59
|
+
return /*#__PURE__*/jsx("div", {
|
|
60
|
+
className: classNames('np-decision d-flex', {
|
|
61
|
+
'np-decision--small': isSmall,
|
|
62
|
+
'np-decision--grid': isGrid
|
|
63
|
+
}, breakpoint ? isGrid && 'flex-wrap' : 'flex-column'),
|
|
64
|
+
children: breakpoint ? options.map(({
|
|
65
|
+
description,
|
|
66
|
+
disabled,
|
|
67
|
+
href,
|
|
68
|
+
target,
|
|
69
|
+
media: {
|
|
70
|
+
block
|
|
71
|
+
},
|
|
72
|
+
onClick,
|
|
73
|
+
title
|
|
74
|
+
}, key) => /*#__PURE__*/jsx(Tile
|
|
75
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
76
|
+
, {
|
|
77
|
+
className: classNames(`np-decision__tile${isSmall ? '--small' : ''}`, {
|
|
78
|
+
'np-decision__tile--fixed-width': isGrid
|
|
79
|
+
}),
|
|
80
|
+
description: description,
|
|
81
|
+
disabled: disabled,
|
|
82
|
+
href: href,
|
|
83
|
+
target: target,
|
|
84
|
+
media: block,
|
|
85
|
+
size: isSmall ? Size.SMALL : Size.MEDIUM,
|
|
86
|
+
title: title,
|
|
87
|
+
onClick: onClick
|
|
88
|
+
}, `tile-${key}`)) : renderedOptions
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// LIST
|
|
92
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
93
|
+
children: renderedOptions
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return null;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { DecisionPresentation, DecisionType, Decision as default };
|
|
100
|
+
//# sourceMappingURL=Decision.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Decision.mjs","sources":["../../src/decision/Decision.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport { Size, Breakpoint, SizeSmall, SizeMedium } from '../common';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport NavigationOption from '../navigationOption';\nimport Tile from '../tile';\n\ninterface DecisionOption {\n description?: React.ReactNode;\n disabled?: boolean;\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n media: {\n block: React.ReactNode;\n list: React.ReactNode;\n };\n onClick?: (event?: React.MouseEvent<HTMLElement>) => void;\n title: React.ReactNode;\n}\n\nexport enum DecisionPresentation {\n LIST = 'LIST',\n LIST_BLOCK = 'LIST_BLOCK',\n LIST_BLOCK_GRID = 'LIST_BLOCK_GRID',\n}\n\nexport enum DecisionType {\n NAVIGATION = 'NAVIGATION',\n}\n\nexport interface DecisionProps {\n /** A list of elements to be rendered */\n options: readonly DecisionOption[];\n /** Handles the display mode of the component */\n presentation?: `${DecisionPresentation}`;\n /** Size currently affects only Tile dimension */\n size?: SizeSmall | SizeMedium;\n /** Decide which kind of element type needs to be rendered ex: Navigation Options or in the future Radio or Checkbox Options */\n type?: `${DecisionType}`;\n\n /** Display media in a circle in list presentation */\n showMediaCircleInList?: boolean;\n\n /** Sets navigation options to be aligned with the parent container */\n isContainerAligned?: boolean;\n}\n\nconst Decision = ({\n options,\n presentation = DecisionPresentation.LIST,\n size = Size.MEDIUM,\n type = DecisionType.NAVIGATION,\n showMediaCircleInList = true,\n isContainerAligned = false,\n}: DecisionProps) => {\n const screenXs = useScreenSize(Breakpoint.EXTRA_SMALL);\n const screenSm = useScreenSize(Breakpoint.SMALL);\n\n if (type === DecisionType.NAVIGATION) {\n const renderedOptions = options.map(\n ({ title, description, disabled, href, target, media: { list }, onClick }, key) => (\n <NavigationOption\n // eslint-disable-next-line react/no-array-index-key\n key={`nav-${key}`}\n complex={false}\n content={description}\n disabled={disabled}\n href={href}\n target={target}\n media={list}\n showMediaAtAllSizes\n showMediaCircle={showMediaCircleInList}\n isContainerAligned={isContainerAligned}\n title={title}\n onClick={onClick}\n />\n ),\n );\n\n if (\n presentation === DecisionPresentation.LIST_BLOCK ||\n presentation === DecisionPresentation.LIST_BLOCK_GRID\n ) {\n const isSmall = size === Size.SMALL;\n const breakpoint = isSmall ? screenXs : screenSm;\n\n const isGrid = presentation === DecisionPresentation.LIST_BLOCK_GRID;\n\n return (\n <div\n className={classNames(\n 'np-decision d-flex',\n {\n 'np-decision--small': isSmall,\n 'np-decision--grid': isGrid,\n },\n breakpoint ? isGrid && 'flex-wrap' : 'flex-column',\n )}\n >\n {breakpoint\n ? options.map(\n (\n { description, disabled, href, target, media: { block }, onClick, title },\n key,\n ) => (\n <Tile\n // eslint-disable-next-line react/no-array-index-key\n key={`tile-${key}`}\n className={classNames(`np-decision__tile${isSmall ? '--small' : ''}`, {\n 'np-decision__tile--fixed-width': isGrid,\n })}\n description={description}\n disabled={disabled}\n href={href}\n target={target}\n media={block}\n size={isSmall ? Size.SMALL : Size.MEDIUM}\n title={title}\n onClick={onClick}\n />\n ),\n )\n : renderedOptions}\n </div>\n );\n }\n // LIST\n return <>{renderedOptions}</>;\n }\n return null;\n};\n\nexport default Decision;\n"],"names":["DecisionPresentation","DecisionType","Decision","options","presentation","LIST","size","Size","MEDIUM","type","NAVIGATION","showMediaCircleInList","isContainerAligned","screenXs","useScreenSize","Breakpoint","EXTRA_SMALL","screenSm","SMALL","renderedOptions","map","title","description","disabled","href","target","media","list","onClick","key","_jsx","NavigationOption","complex","content","showMediaAtAllSizes","showMediaCircle","LIST_BLOCK","LIST_BLOCK_GRID","isSmall","breakpoint","isGrid","className","classNames","children","block","Tile","_Fragment"],"mappings":";;;;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C,GAAA,CAACe,IAAAA;AACC;AAAA,UAAA;UAEAJ,SAAS,EAAEC,UAAU,CAAqB,CAAAJ,iBAAAA,EAAAA,OAAO,GAAG,SAAS,GAAG,EAAE,CAAA,CAAE,EAAE;AACpE,YAAA,gCAAgC,EAAEE,MAAAA;AACnC,WAAA,CAAE;AACHlB,UAAAA,WAAW,EAAEA,WAAY;AACzBC,UAAAA,QAAQ,EAAEA,QAAS;AACnBC,UAAAA,IAAI,EAAEA,IAAK;AACXC,UAAAA,MAAM,EAAEA,MAAO;AACfC,UAAAA,KAAK,EAAEkB,KAAM;UACbtC,IAAI,EAAEgC,OAAO,GAAG/B,IAAI,CAACW,KAAK,GAAGX,IAAI,CAACC,MAAO;AACzCa,UAAAA,KAAK,EAAEA,KAAM;AACbO,UAAAA,OAAO,EAAEA,OAAAA;AAAQ,SAAA,EAXJ,CAAAC,KAAAA,EAAAA,IAWI,CAAA,CAEpB,CACF,GACDV,eAAAA;AAAe,OAChB,CAAC,CAAA;AAEV,KAAA;AACA;IACA,oBAAOW,GAAA,CAAAgB,QAAA,EAAA;AAAAH,MAAAA,QAAA,EAAGxB,eAAAA;AAAe,MAAI,CAAA;AAC/B,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classNames = require('classnames');
|
|
4
|
+
var ActionButton = require('../actionButton/ActionButton.js');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var layouts = require('../common/propsValues/layouts.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
|
|
10
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
11
|
+
|
|
12
|
+
const isLayoutHorizontal = layout => layout === layouts.Layout.HORIZONTAL_LEFT_ALIGNED || layout === layouts.Layout.HORIZONTAL_RIGHT_ALIGNED || layout === layouts.Layout.HORIZONTAL_JUSTIFIED;
|
|
13
|
+
const getAlignmentClasses = (layout, action) => {
|
|
14
|
+
const classes = ['d-flex'];
|
|
15
|
+
if (action) {
|
|
16
|
+
if (isLayoutHorizontal(layout)) {
|
|
17
|
+
classes.push('align-items-center');
|
|
18
|
+
} else {
|
|
19
|
+
classes.push('align-items-start');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (layout === layouts.Layout.HORIZONTAL_RIGHT_ALIGNED) {
|
|
23
|
+
classes.push('text-sm-right tw-definition-list--right-aligned-desktop');
|
|
24
|
+
} else {
|
|
25
|
+
classes.push('justify-content-between');
|
|
26
|
+
}
|
|
27
|
+
if (layout === layouts.Layout.HORIZONTAL_JUSTIFIED) {
|
|
28
|
+
classes.push('text-sm-justify');
|
|
29
|
+
}
|
|
30
|
+
return classes;
|
|
31
|
+
};
|
|
32
|
+
const defaultDefinitions = [];
|
|
33
|
+
function DefinitionList({
|
|
34
|
+
definitions = defaultDefinitions,
|
|
35
|
+
layout = 'VERTICAL_TWO_COLUMN',
|
|
36
|
+
muted
|
|
37
|
+
}) {
|
|
38
|
+
return /*#__PURE__*/jsxRuntime.jsx("dl", {
|
|
39
|
+
className: classNames__default.default('tw-definition-list d-flex ', {
|
|
40
|
+
'text-muted': muted,
|
|
41
|
+
'flex-column': layout === layouts.Layout.VERTICAL_ONE_COLUMN,
|
|
42
|
+
'tw-definition-list--columns flex-column flex-row--sm': layout === layouts.Layout.VERTICAL_TWO_COLUMN,
|
|
43
|
+
'tw-definition-list--horizontal flex-column': isLayoutHorizontal(layout)
|
|
44
|
+
}),
|
|
45
|
+
children: definitions.filter(definition => definition).map(({
|
|
46
|
+
action,
|
|
47
|
+
title,
|
|
48
|
+
value,
|
|
49
|
+
key
|
|
50
|
+
}) => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
51
|
+
className: "tw-definition-list__item",
|
|
52
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("dt", {
|
|
53
|
+
children: title
|
|
54
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("dd", {
|
|
55
|
+
className: classNames__default.default(...getAlignmentClasses(layout, action)),
|
|
56
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
57
|
+
children: value
|
|
58
|
+
}), action ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
59
|
+
className: classNames__default.default(isLayoutHorizontal(layout) ? 'p-l-2' : 'p-x-2', 'tw-definition-list__action'),
|
|
60
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ActionButton, {
|
|
61
|
+
className: "tw-definition-list__button",
|
|
62
|
+
onClick: action.onClick,
|
|
63
|
+
children: action.label
|
|
64
|
+
})
|
|
65
|
+
}) : null]
|
|
66
|
+
})]
|
|
67
|
+
}, key))
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
module.exports = DefinitionList;
|
|
72
|
+
//# sourceMappingURL=DefinitionList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefinitionList.js","sources":["../../src/definitionList/DefinitionList.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport ActionButton from '../actionButton';\nimport { Layout } from '../common';\n\nexport interface DefinitionListDefinition {\n action?: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n title: React.ReactNode;\n value: React.ReactNode;\n key: string;\n}\n\ntype DefinitionListLayout =\n `${Layout.VERTICAL_TWO_COLUMN | Layout.VERTICAL_ONE_COLUMN | Layout.HORIZONTAL_JUSTIFIED | Layout.HORIZONTAL_LEFT_ALIGNED | Layout.HORIZONTAL_RIGHT_ALIGNED}`;\n\nexport interface DefinitionListProps {\n definitions?: DefinitionListDefinition[];\n layout?: DefinitionListLayout;\n muted?: boolean;\n}\n\nconst isLayoutHorizontal = (layout: DefinitionListLayout) =>\n layout === Layout.HORIZONTAL_LEFT_ALIGNED ||\n layout === Layout.HORIZONTAL_RIGHT_ALIGNED ||\n layout === Layout.HORIZONTAL_JUSTIFIED;\n\nconst getAlignmentClasses = (\n layout: DefinitionListLayout,\n action: DefinitionListDefinition['action'],\n) => {\n const classes = ['d-flex'];\n\n if (action) {\n if (isLayoutHorizontal(layout)) {\n classes.push('align-items-center');\n } else {\n classes.push('align-items-start');\n }\n }\n\n if (layout === Layout.HORIZONTAL_RIGHT_ALIGNED) {\n classes.push('text-sm-right tw-definition-list--right-aligned-desktop');\n } else {\n classes.push('justify-content-between');\n }\n\n if (layout === Layout.HORIZONTAL_JUSTIFIED) {\n classes.push('text-sm-justify');\n }\n\n return classes;\n};\n\nconst defaultDefinitions = [] satisfies DefinitionListProps['definitions'];\n\nexport default function DefinitionList({\n definitions = defaultDefinitions,\n layout = 'VERTICAL_TWO_COLUMN',\n muted,\n}: DefinitionListProps) {\n return (\n <dl\n className={classNames('tw-definition-list d-flex ', {\n 'text-muted': muted,\n 'flex-column': layout === Layout.VERTICAL_ONE_COLUMN,\n 'tw-definition-list--columns flex-column flex-row--sm':\n layout === Layout.VERTICAL_TWO_COLUMN,\n 'tw-definition-list--horizontal flex-column': isLayoutHorizontal(layout),\n })}\n >\n {definitions\n .filter((definition) => definition)\n .map(({ action, title, value, key }) => (\n <div key={key} className=\"tw-definition-list__item\">\n <dt>{title}</dt>\n <dd className={classNames(...getAlignmentClasses(layout, action))}>\n <div>{value}</div>\n {action ? (\n <div\n className={classNames(\n isLayoutHorizontal(layout) ? 'p-l-2' : 'p-x-2',\n 'tw-definition-list__action',\n )}\n >\n <ActionButton className=\"tw-definition-list__button\" onClick={action.onClick}>\n {action.label}\n </ActionButton>\n </div>\n ) : null}\n </dd>\n </div>\n ))}\n </dl>\n );\n}\n"],"names":["isLayoutHorizontal","layout","Layout","HORIZONTAL_LEFT_ALIGNED","HORIZONTAL_RIGHT_ALIGNED","HORIZONTAL_JUSTIFIED","getAlignmentClasses","action","classes","push","defaultDefinitions","DefinitionList","definitions","muted","_jsx","className","classNames","VERTICAL_ONE_COLUMN","VERTICAL_TWO_COLUMN","children","filter","definition","map","title","value","key","_jsxs","ActionButton","onClick","label"],"mappings":";;;;;;;;;;;AAwBA,MAAMA,kBAAkB,GAAIC,MAA4B,IACtDA,MAAM,KAAKC,cAAM,CAACC,uBAAuB,IACzCF,MAAM,KAAKC,cAAM,CAACE,wBAAwB,IAC1CH,MAAM,KAAKC,cAAM,CAACG,oBAAoB,CAAA;AAExC,MAAMC,mBAAmB,GAAGA,CAC1BL,MAA4B,EAC5BM,MAA0C,KACxC;AACF,EAAA,MAAMC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAA;AAE1B,EAAA,IAAID,MAAM,EAAE;AACV,IAAA,IAAIP,kBAAkB,CAACC,MAAM,CAAC,EAAE;AAC9BO,MAAAA,OAAO,CAACC,IAAI,CAAC,oBAAoB,CAAC,CAAA;AACpC,KAAC,MAAM;AACLD,MAAAA,OAAO,CAACC,IAAI,CAAC,mBAAmB,CAAC,CAAA;AACnC,KAAA;AACF,GAAA;AAEA,EAAA,IAAIR,MAAM,KAAKC,cAAM,CAACE,wBAAwB,EAAE;AAC9CI,IAAAA,OAAO,CAACC,IAAI,CAAC,yDAAyD,CAAC,CAAA;AACzE,GAAC,MAAM;AACLD,IAAAA,OAAO,CAACC,IAAI,CAAC,yBAAyB,CAAC,CAAA;AACzC,GAAA;AAEA,EAAA,IAAIR,MAAM,KAAKC,cAAM,CAACG,oBAAoB,EAAE;AAC1CG,IAAAA,OAAO,CAACC,IAAI,CAAC,iBAAiB,CAAC,CAAA;AACjC,GAAA;AAEA,EAAA,OAAOD,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAME,kBAAkB,GAAG,EAA+C,CAAA;AAElD,SAAAC,cAAcA,CAAC;AACrCC,EAAAA,WAAW,GAAGF,kBAAkB;AAChCT,EAAAA,MAAM,GAAG,qBAAqB;AAC9BY,EAAAA,KAAAA;AACoB,CAAA,EAAA;AACpB,EAAA,oBACEC,cAAA,CAAA,IAAA,EAAA;AACEC,IAAAA,SAAS,EAAEC,2BA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N,CAAA;AAAC,GACF,CAAC,CAAA;AAET;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import ActionButton from '../actionButton/ActionButton.mjs';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { Layout } from '../common/propsValues/layouts.mjs';
|
|
5
|
+
|
|
6
|
+
const isLayoutHorizontal = layout => layout === Layout.HORIZONTAL_LEFT_ALIGNED || layout === Layout.HORIZONTAL_RIGHT_ALIGNED || layout === Layout.HORIZONTAL_JUSTIFIED;
|
|
7
|
+
const getAlignmentClasses = (layout, action) => {
|
|
8
|
+
const classes = ['d-flex'];
|
|
9
|
+
if (action) {
|
|
10
|
+
if (isLayoutHorizontal(layout)) {
|
|
11
|
+
classes.push('align-items-center');
|
|
12
|
+
} else {
|
|
13
|
+
classes.push('align-items-start');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
if (layout === Layout.HORIZONTAL_RIGHT_ALIGNED) {
|
|
17
|
+
classes.push('text-sm-right tw-definition-list--right-aligned-desktop');
|
|
18
|
+
} else {
|
|
19
|
+
classes.push('justify-content-between');
|
|
20
|
+
}
|
|
21
|
+
if (layout === Layout.HORIZONTAL_JUSTIFIED) {
|
|
22
|
+
classes.push('text-sm-justify');
|
|
23
|
+
}
|
|
24
|
+
return classes;
|
|
25
|
+
};
|
|
26
|
+
const defaultDefinitions = [];
|
|
27
|
+
function DefinitionList({
|
|
28
|
+
definitions = defaultDefinitions,
|
|
29
|
+
layout = 'VERTICAL_TWO_COLUMN',
|
|
30
|
+
muted
|
|
31
|
+
}) {
|
|
32
|
+
return /*#__PURE__*/jsx("dl", {
|
|
33
|
+
className: classNames('tw-definition-list d-flex ', {
|
|
34
|
+
'text-muted': muted,
|
|
35
|
+
'flex-column': layout === Layout.VERTICAL_ONE_COLUMN,
|
|
36
|
+
'tw-definition-list--columns flex-column flex-row--sm': layout === Layout.VERTICAL_TWO_COLUMN,
|
|
37
|
+
'tw-definition-list--horizontal flex-column': isLayoutHorizontal(layout)
|
|
38
|
+
}),
|
|
39
|
+
children: definitions.filter(definition => definition).map(({
|
|
40
|
+
action,
|
|
41
|
+
title,
|
|
42
|
+
value,
|
|
43
|
+
key
|
|
44
|
+
}) => /*#__PURE__*/jsxs("div", {
|
|
45
|
+
className: "tw-definition-list__item",
|
|
46
|
+
children: [/*#__PURE__*/jsx("dt", {
|
|
47
|
+
children: title
|
|
48
|
+
}), /*#__PURE__*/jsxs("dd", {
|
|
49
|
+
className: classNames(...getAlignmentClasses(layout, action)),
|
|
50
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
51
|
+
children: value
|
|
52
|
+
}), action ? /*#__PURE__*/jsx("div", {
|
|
53
|
+
className: classNames(isLayoutHorizontal(layout) ? 'p-l-2' : 'p-x-2', 'tw-definition-list__action'),
|
|
54
|
+
children: /*#__PURE__*/jsx(ActionButton, {
|
|
55
|
+
className: "tw-definition-list__button",
|
|
56
|
+
onClick: action.onClick,
|
|
57
|
+
children: action.label
|
|
58
|
+
})
|
|
59
|
+
}) : null]
|
|
60
|
+
})]
|
|
61
|
+
}, key))
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { DefinitionList as default };
|
|
66
|
+
//# sourceMappingURL=DefinitionList.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefinitionList.mjs","sources":["../../src/definitionList/DefinitionList.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport ActionButton from '../actionButton';\nimport { Layout } from '../common';\n\nexport interface DefinitionListDefinition {\n action?: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n title: React.ReactNode;\n value: React.ReactNode;\n key: string;\n}\n\ntype DefinitionListLayout =\n `${Layout.VERTICAL_TWO_COLUMN | Layout.VERTICAL_ONE_COLUMN | Layout.HORIZONTAL_JUSTIFIED | Layout.HORIZONTAL_LEFT_ALIGNED | Layout.HORIZONTAL_RIGHT_ALIGNED}`;\n\nexport interface DefinitionListProps {\n definitions?: DefinitionListDefinition[];\n layout?: DefinitionListLayout;\n muted?: boolean;\n}\n\nconst isLayoutHorizontal = (layout: DefinitionListLayout) =>\n layout === Layout.HORIZONTAL_LEFT_ALIGNED ||\n layout === Layout.HORIZONTAL_RIGHT_ALIGNED ||\n layout === Layout.HORIZONTAL_JUSTIFIED;\n\nconst getAlignmentClasses = (\n layout: DefinitionListLayout,\n action: DefinitionListDefinition['action'],\n) => {\n const classes = ['d-flex'];\n\n if (action) {\n if (isLayoutHorizontal(layout)) {\n classes.push('align-items-center');\n } else {\n classes.push('align-items-start');\n }\n }\n\n if (layout === Layout.HORIZONTAL_RIGHT_ALIGNED) {\n classes.push('text-sm-right tw-definition-list--right-aligned-desktop');\n } else {\n classes.push('justify-content-between');\n }\n\n if (layout === Layout.HORIZONTAL_JUSTIFIED) {\n classes.push('text-sm-justify');\n }\n\n return classes;\n};\n\nconst defaultDefinitions = [] satisfies DefinitionListProps['definitions'];\n\nexport default function DefinitionList({\n definitions = defaultDefinitions,\n layout = 'VERTICAL_TWO_COLUMN',\n muted,\n}: DefinitionListProps) {\n return (\n <dl\n className={classNames('tw-definition-list d-flex ', {\n 'text-muted': muted,\n 'flex-column': layout === Layout.VERTICAL_ONE_COLUMN,\n 'tw-definition-list--columns flex-column flex-row--sm':\n layout === Layout.VERTICAL_TWO_COLUMN,\n 'tw-definition-list--horizontal flex-column': isLayoutHorizontal(layout),\n })}\n >\n {definitions\n .filter((definition) => definition)\n .map(({ action, title, value, key }) => (\n <div key={key} className=\"tw-definition-list__item\">\n <dt>{title}</dt>\n <dd className={classNames(...getAlignmentClasses(layout, action))}>\n <div>{value}</div>\n {action ? (\n <div\n className={classNames(\n isLayoutHorizontal(layout) ? 'p-l-2' : 'p-x-2',\n 'tw-definition-list__action',\n )}\n >\n <ActionButton className=\"tw-definition-list__button\" onClick={action.onClick}>\n {action.label}\n </ActionButton>\n </div>\n ) : null}\n </dd>\n </div>\n ))}\n </dl>\n );\n}\n"],"names":["isLayoutHorizontal","layout","Layout","HORIZONTAL_LEFT_ALIGNED","HORIZONTAL_RIGHT_ALIGNED","HORIZONTAL_JUSTIFIED","getAlignmentClasses","action","classes","push","defaultDefinitions","DefinitionList","definitions","muted","_jsx","className","classNames","VERTICAL_ONE_COLUMN","VERTICAL_TWO_COLUMN","children","filter","definition","map","title","value","key","_jsxs","ActionButton","onClick","label"],"mappings":";;;;;AAwBA,MAAMA,kBAAkB,GAAIC,MAA4B,IACtDA,MAAM,KAAKC,MAAM,CAACC,uBAAuB,IACzCF,MAAM,KAAKC,MAAM,CAACE,wBAAwB,IAC1CH,MAAM,KAAKC,MAAM,CAACG,oBAAoB,CAAA;AAExC,MAAMC,mBAAmB,GAAGA,CAC1BL,MAA4B,EAC5BM,MAA0C,KACxC;AACF,EAAA,MAAMC,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAA;AAE1B,EAAA,IAAID,MAAM,EAAE;AACV,IAAA,IAAIP,kBAAkB,CAACC,MAAM,CAAC,EAAE;AAC9BO,MAAAA,OAAO,CAACC,IAAI,CAAC,oBAAoB,CAAC,CAAA;AACpC,KAAC,MAAM;AACLD,MAAAA,OAAO,CAACC,IAAI,CAAC,mBAAmB,CAAC,CAAA;AACnC,KAAA;AACF,GAAA;AAEA,EAAA,IAAIR,MAAM,KAAKC,MAAM,CAACE,wBAAwB,EAAE;AAC9CI,IAAAA,OAAO,CAACC,IAAI,CAAC,yDAAyD,CAAC,CAAA;AACzE,GAAC,MAAM;AACLD,IAAAA,OAAO,CAACC,IAAI,CAAC,yBAAyB,CAAC,CAAA;AACzC,GAAA;AAEA,EAAA,IAAIR,MAAM,KAAKC,MAAM,CAACG,oBAAoB,EAAE;AAC1CG,IAAAA,OAAO,CAACC,IAAI,CAAC,iBAAiB,CAAC,CAAA;AACjC,GAAA;AAEA,EAAA,OAAOD,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,MAAME,kBAAkB,G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