@transferwise/components 46.45.0 → 46.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/accordion/Accordion.js +40 -0
- package/build/accordion/Accordion.js.map +1 -0
- package/build/accordion/Accordion.mjs +38 -0
- package/build/accordion/Accordion.mjs.map +1 -0
- package/build/accordion/AccordionItem/AccordionItem.js +70 -0
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -0
- package/build/accordion/AccordionItem/AccordionItem.mjs +64 -0
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -0
- package/build/actionButton/ActionButton.js +31 -0
- package/build/actionButton/ActionButton.js.map +1 -0
- package/build/actionButton/ActionButton.mjs +25 -0
- package/build/actionButton/ActionButton.mjs.map +1 -0
- package/build/actionOption/ActionOption.js +61 -0
- package/build/actionOption/ActionOption.js.map +1 -0
- package/build/actionOption/ActionOption.mjs +55 -0
- package/build/actionOption/ActionOption.mjs.map +1 -0
- package/build/alert/Alert.js +159 -0
- package/build/alert/Alert.js.map +1 -0
- package/build/alert/Alert.mjs +151 -0
- package/build/alert/Alert.mjs.map +1 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.js +18 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +16 -0
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -0
- package/build/avatar/Avatar.js +54 -0
- package/build/avatar/Avatar.js.map +1 -0
- package/build/avatar/Avatar.mjs +48 -0
- package/build/avatar/Avatar.mjs.map +1 -0
- package/build/avatar/avatarTypes.js +11 -0
- package/build/avatar/avatarTypes.js.map +1 -0
- package/build/avatar/avatarTypes.mjs +11 -0
- package/build/avatar/avatarTypes.mjs.map +1 -0
- package/build/avatar/colors/colors.js +31 -0
- package/build/avatar/colors/colors.js.map +1 -0
- package/build/avatar/colors/colors.mjs +29 -0
- package/build/avatar/colors/colors.mjs.map +1 -0
- package/build/avatarWrapper/AvatarWrapper.js +120 -0
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -0
- package/build/avatarWrapper/AvatarWrapper.mjs +118 -0
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -0
- package/build/avatarWrapper/index.js +8 -0
- package/build/avatarWrapper/index.js.map +1 -0
- package/build/avatarWrapper/index.mjs +6 -0
- package/build/avatarWrapper/index.mjs.map +1 -0
- package/build/badge/Badge.js +36 -0
- package/build/badge/Badge.js.map +1 -0
- package/build/badge/Badge.mjs +30 -0
- package/build/badge/Badge.mjs.map +1 -0
- package/build/body/Body.js +31 -0
- package/build/body/Body.js.map +1 -0
- package/build/body/Body.mjs +25 -0
- package/build/body/Body.mjs.map +1 -0
- package/build/button/Button.js +86 -0
- package/build/button/Button.js.map +1 -0
- package/build/button/Button.messages.js +12 -0
- package/build/button/Button.messages.js.map +1 -0
- package/build/button/Button.messages.mjs +10 -0
- package/build/button/Button.messages.mjs.map +1 -0
- package/build/button/Button.mjs +80 -0
- package/build/button/Button.mjs.map +1 -0
- package/build/button/classMap.js +18 -0
- package/build/button/classMap.js.map +1 -0
- package/build/button/classMap.mjs +15 -0
- package/build/button/classMap.mjs.map +1 -0
- package/build/button/legacyUtils/legacyUtils.js +54 -0
- package/build/button/legacyUtils/legacyUtils.js.map +1 -0
- package/build/button/legacyUtils/legacyUtils.mjs +50 -0
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -0
- package/build/card/Card.js +65 -0
- package/build/card/Card.js.map +1 -0
- package/build/card/Card.mjs +59 -0
- package/build/card/Card.mjs.map +1 -0
- package/build/carousel/Carousel.js +283 -0
- package/build/carousel/Carousel.js.map +1 -0
- package/build/carousel/Carousel.mjs +277 -0
- package/build/carousel/Carousel.mjs.map +1 -0
- package/build/checkbox/Checkbox.js +64 -0
- package/build/checkbox/Checkbox.js.map +1 -0
- package/build/checkbox/Checkbox.mjs +58 -0
- package/build/checkbox/Checkbox.mjs.map +1 -0
- package/build/checkboxButton/CheckboxButton.js +40 -0
- package/build/checkboxButton/CheckboxButton.js.map +1 -0
- package/build/checkboxButton/CheckboxButton.mjs +34 -0
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -0
- package/build/checkboxOption/CheckboxOption.js +27 -0
- package/build/checkboxOption/CheckboxOption.js.map +1 -0
- package/build/checkboxOption/CheckboxOption.mjs +25 -0
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -0
- package/build/chevron/Chevron.js +60 -0
- package/build/chevron/Chevron.js.map +1 -0
- package/build/chevron/Chevron.mjs +54 -0
- package/build/chevron/Chevron.mjs.map +1 -0
- package/build/chips/Chip.js +71 -0
- package/build/chips/Chip.js.map +1 -0
- package/build/chips/Chip.mjs +65 -0
- package/build/chips/Chip.mjs.map +1 -0
- package/build/chips/Chips.js +62 -0
- package/build/chips/Chips.js.map +1 -0
- package/build/chips/Chips.messages.js +12 -0
- package/build/chips/Chips.messages.js.map +1 -0
- package/build/chips/Chips.messages.mjs +10 -0
- package/build/chips/Chips.messages.mjs.map +1 -0
- package/build/chips/Chips.mjs +56 -0
- package/build/chips/Chips.mjs.map +1 -0
- package/build/circularButton/CircularButton.js +46 -0
- package/build/circularButton/CircularButton.js.map +1 -0
- package/build/circularButton/CircularButton.mjs +40 -0
- package/build/circularButton/CircularButton.mjs.map +1 -0
- package/build/common/DOMOperations/DOMOperations.js +24 -0
- package/build/common/DOMOperations/DOMOperations.js.map +1 -0
- package/build/common/DOMOperations/DOMOperations.mjs +21 -0
- package/build/common/DOMOperations/DOMOperations.mjs.map +1 -0
- package/build/common/Option/Option.js +71 -0
- package/build/common/Option/Option.js.map +1 -0
- package/build/common/Option/Option.mjs +65 -0
- package/build/common/Option/Option.mjs.map +1 -0
- package/build/common/RadioButton/RadioButton.js +46 -0
- package/build/common/RadioButton/RadioButton.js.map +1 -0
- package/build/common/RadioButton/RadioButton.mjs +40 -0
- package/build/common/RadioButton/RadioButton.mjs.map +1 -0
- package/build/common/action/Action.js +37 -0
- package/build/common/action/Action.js.map +1 -0
- package/build/common/action/Action.mjs +31 -0
- package/build/common/action/Action.mjs.map +1 -0
- package/build/common/bottomSheet/BottomSheet.js +194 -0
- package/build/common/bottomSheet/BottomSheet.js.map +1 -0
- package/build/common/bottomSheet/BottomSheet.mjs +188 -0
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -0
- package/build/common/card/Card.js +49 -0
- package/build/common/card/Card.js.map +1 -0
- package/build/common/card/Card.mjs +43 -0
- package/build/common/card/Card.mjs.map +1 -0
- package/build/common/closeButton/CloseButton.js +46 -0
- package/build/common/closeButton/CloseButton.js.map +1 -0
- package/build/common/closeButton/CloseButton.messages.js +12 -0
- package/build/common/closeButton/CloseButton.messages.js.map +1 -0
- package/build/common/closeButton/CloseButton.messages.mjs +10 -0
- package/build/common/closeButton/CloseButton.messages.mjs.map +1 -0
- package/build/common/closeButton/CloseButton.mjs +40 -0
- package/build/common/closeButton/CloseButton.mjs.map +1 -0
- package/build/common/dateUtils/getDayNames/getDayNames.js +18 -0
- package/build/common/dateUtils/getDayNames/getDayNames.js.map +1 -0
- package/build/common/dateUtils/getDayNames/getDayNames.mjs +16 -0
- package/build/common/dateUtils/getDayNames/getDayNames.mjs.map +1 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.js +8 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.js.map +1 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.mjs +5 -0
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.mjs.map +1 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.js +19 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.js.map +1 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.mjs +17 -0
- package/build/common/dateUtils/getMonthNames/getMonthNames.mjs.map +1 -0
- package/build/common/dateUtils/isDateValid/isDateValid.js +17 -0
- package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -0
- package/build/common/dateUtils/isDateValid/isDateValid.mjs +14 -0
- package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +8 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js.map +1 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.mjs +6 -0
- package/build/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.mjs.map +1 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.js +8 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.js.map +1 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.mjs +6 -0
- package/build/common/dateUtils/isWithinRange/isWithinRange.mjs.map +1 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js +15 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js.map +1 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs +13 -0
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs.map +1 -0
- package/build/common/deviceDetection/deviceDetection.js +11 -0
- package/build/common/deviceDetection/deviceDetection.js.map +1 -0
- package/build/common/deviceDetection/deviceDetection.mjs +9 -0
- package/build/common/deviceDetection/deviceDetection.mjs.map +1 -0
- package/build/common/direction.js +9 -0
- package/build/common/direction.js.map +1 -0
- package/build/common/direction.mjs +9 -0
- package/build/common/direction.mjs.map +1 -0
- package/build/common/domHelpers/documentIosClick.js +39 -0
- package/build/common/domHelpers/documentIosClick.js.map +1 -0
- package/build/common/domHelpers/documentIosClick.mjs +33 -0
- package/build/common/domHelpers/documentIosClick.mjs.map +1 -0
- package/build/common/fileType.js +10 -0
- package/build/common/fileType.js.map +1 -0
- package/build/common/fileType.mjs +10 -0
- package/build/common/fileType.mjs.map +1 -0
- package/build/common/flowHeader/FlowHeader.js +53 -0
- package/build/common/flowHeader/FlowHeader.js.map +1 -0
- package/build/common/flowHeader/FlowHeader.mjs +28 -0
- package/build/common/flowHeader/FlowHeader.mjs.map +1 -0
- package/build/common/focusBoundary/FocusBoundary.js +28 -0
- package/build/common/focusBoundary/FocusBoundary.js.map +1 -0
- package/build/common/focusBoundary/FocusBoundary.mjs +26 -0
- package/build/common/focusBoundary/FocusBoundary.mjs.map +1 -0
- package/build/common/historyNavigator/historyNavigator.js +39 -0
- package/build/common/historyNavigator/historyNavigator.js.map +1 -0
- package/build/common/historyNavigator/historyNavigator.mjs +37 -0
- package/build/common/historyNavigator/historyNavigator.mjs.map +1 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.js +25 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.js.map +1 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.mjs +23 -0
- package/build/common/hooks/useConditionalListener/useConditionalListener.mjs.map +1 -0
- package/build/common/hooks/useDirection/useDirection.js +15 -0
- package/build/common/hooks/useDirection/useDirection.js.map +1 -0
- package/build/common/hooks/useDirection/useDirection.mjs +13 -0
- package/build/common/hooks/useDirection/useDirection.mjs.map +1 -0
- package/build/common/hooks/useEffectEvent.js +22 -0
- package/build/common/hooks/useEffectEvent.js.map +1 -0
- package/build/common/hooks/useEffectEvent.mjs +20 -0
- package/build/common/hooks/useEffectEvent.mjs.map +1 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.js +64 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs +62 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -0
- package/build/common/hooks/useLayout/useLayout.js +26 -0
- package/build/common/hooks/useLayout/useLayout.js.map +1 -0
- package/build/common/hooks/useLayout/useLayout.mjs +24 -0
- package/build/common/hooks/useLayout/useLayout.mjs.map +1 -0
- package/build/common/hooks/useMedia.js +16 -0
- package/build/common/hooks/useMedia.js.map +1 -0
- package/build/common/hooks/useMedia.mjs +14 -0
- package/build/common/hooks/useMedia.mjs.map +1 -0
- package/build/common/hooks/useResizeObserver.js +25 -0
- package/build/common/hooks/useResizeObserver.js.map +1 -0
- package/build/common/hooks/useResizeObserver.mjs +23 -0
- package/build/common/hooks/useResizeObserver.mjs.map +1 -0
- package/build/common/hooks/useScreenSize.js +10 -0
- package/build/common/hooks/useScreenSize.js.map +1 -0
- package/build/common/hooks/useScreenSize.mjs +8 -0
- package/build/common/hooks/useScreenSize.mjs.map +1 -0
- package/build/common/hooks/useVirtualKeyboard.js +26 -0
- package/build/common/hooks/useVirtualKeyboard.js.map +1 -0
- package/build/common/hooks/useVirtualKeyboard.mjs +24 -0
- package/build/common/hooks/useVirtualKeyboard.mjs.map +1 -0
- package/build/common/locale/index.js +85 -0
- package/build/common/locale/index.js.map +1 -0
- package/build/common/locale/index.mjs +76 -0
- package/build/common/locale/index.mjs.map +1 -0
- package/build/common/panel/Panel.js +133 -0
- package/build/common/panel/Panel.js.map +1 -0
- package/build/common/panel/Panel.mjs +127 -0
- package/build/common/panel/Panel.mjs.map +1 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.js +21 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.js.map +1 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.mjs +19 -0
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.mjs.map +1 -0
- package/build/common/preventScroll/PreventScroll.js +11 -0
- package/build/common/preventScroll/PreventScroll.js.map +1 -0
- package/build/common/preventScroll/PreventScroll.mjs +9 -0
- package/build/common/preventScroll/PreventScroll.mjs.map +1 -0
- package/build/common/propsValues/breakpoint.js +12 -0
- package/build/common/propsValues/breakpoint.js.map +1 -0
- package/build/common/propsValues/breakpoint.mjs +12 -0
- package/build/common/propsValues/breakpoint.mjs.map +1 -0
- package/build/common/propsValues/control.js +15 -0
- package/build/common/propsValues/control.js.map +1 -0
- package/build/common/propsValues/control.mjs +15 -0
- package/build/common/propsValues/control.mjs.map +1 -0
- package/build/common/propsValues/dateMode.js +8 -0
- package/build/common/propsValues/dateMode.js.map +1 -0
- package/build/common/propsValues/dateMode.mjs +8 -0
- package/build/common/propsValues/dateMode.mjs.map +1 -0
- package/build/common/propsValues/layouts.js +13 -0
- package/build/common/propsValues/layouts.js.map +1 -0
- package/build/common/propsValues/layouts.mjs +13 -0
- package/build/common/propsValues/layouts.mjs.map +1 -0
- package/build/common/propsValues/markdownNodeType.js +22 -0
- package/build/common/propsValues/markdownNodeType.js.map +1 -0
- package/build/common/propsValues/markdownNodeType.mjs +22 -0
- package/build/common/propsValues/markdownNodeType.mjs.map +1 -0
- package/build/common/propsValues/monthFormat.js +8 -0
- package/build/common/propsValues/monthFormat.js.map +1 -0
- package/build/common/propsValues/monthFormat.mjs +8 -0
- package/build/common/propsValues/monthFormat.mjs.map +1 -0
- package/build/common/propsValues/position.js +15 -0
- package/build/common/propsValues/position.js.map +1 -0
- package/build/common/propsValues/position.mjs +15 -0
- package/build/common/propsValues/position.mjs.map +1 -0
- package/build/common/propsValues/profileType.js +8 -0
- package/build/common/propsValues/profileType.js.map +1 -0
- package/build/common/propsValues/profileType.mjs +8 -0
- package/build/common/propsValues/profileType.mjs.map +1 -0
- package/build/common/propsValues/scroll.js +8 -0
- package/build/common/propsValues/scroll.js.map +1 -0
- package/build/common/propsValues/scroll.mjs +8 -0
- package/build/common/propsValues/scroll.mjs.map +1 -0
- package/build/common/propsValues/sentiment.js +23 -0
- package/build/common/propsValues/sentiment.js.map +1 -0
- package/build/common/propsValues/sentiment.mjs +23 -0
- package/build/common/propsValues/sentiment.mjs.map +1 -0
- package/build/common/propsValues/size.js +11 -0
- package/build/common/propsValues/size.js.map +1 -0
- package/build/common/propsValues/size.mjs +11 -0
- package/build/common/propsValues/size.mjs.map +1 -0
- package/build/common/propsValues/status.js +13 -0
- package/build/common/propsValues/status.js.map +1 -0
- package/build/common/propsValues/status.mjs +13 -0
- package/build/common/propsValues/status.mjs.map +1 -0
- package/build/common/propsValues/type.js +17 -0
- package/build/common/propsValues/type.js.map +1 -0
- package/build/common/propsValues/type.mjs +17 -0
- package/build/common/propsValues/type.mjs.map +1 -0
- package/build/common/propsValues/typography.js +25 -0
- package/build/common/propsValues/typography.js.map +1 -0
- package/build/common/propsValues/typography.mjs +25 -0
- package/build/common/propsValues/typography.mjs.map +1 -0
- package/build/common/propsValues/variant.js +8 -0
- package/build/common/propsValues/variant.js.map +1 -0
- package/build/common/propsValues/variant.mjs +8 -0
- package/build/common/propsValues/variant.mjs.map +1 -0
- package/build/common/propsValues/width.js +8 -0
- package/build/common/propsValues/width.js.map +1 -0
- package/build/common/propsValues/width.mjs +8 -0
- package/build/common/propsValues/width.mjs.map +1 -0
- package/build/common/responsivePanel/ResponsivePanel.js +45 -0
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -0
- package/build/common/responsivePanel/ResponsivePanel.mjs +43 -0
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js +27 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js.map +1 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs +25 -0
- package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs.map +1 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +8 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js.map +1 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.mjs +6 -0
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.mjs.map +1 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +30 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js.map +1 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs +28 -0
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs.map +1 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +32 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js.map +1 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs +29 -0
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs.map +1 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +18 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js.map +1 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs +16 -0
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs.map +1 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js +14 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js.map +1 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs +12 -0
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs.map +1 -0
- package/build/common/theme.js +13 -0
- package/build/common/theme.js.map +1 -0
- package/build/common/theme.mjs +13 -0
- package/build/common/theme.mjs.map +1 -0
- package/build/criticalBanner/CriticalCommsBanner.js +77 -0
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -0
- package/build/criticalBanner/CriticalCommsBanner.mjs +71 -0
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -0
- package/build/dateInput/DateInput.js +329 -0
- package/build/dateInput/DateInput.js.map +1 -0
- package/build/dateInput/DateInput.messages.js +24 -0
- package/build/dateInput/DateInput.messages.js.map +1 -0
- package/build/dateInput/DateInput.messages.mjs +22 -0
- package/build/dateInput/DateInput.messages.mjs.map +1 -0
- package/build/dateInput/DateInput.mjs +323 -0
- package/build/dateInput/DateInput.mjs.map +1 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +9 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js.map +1 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs +7 -0
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs.map +1 -0
- package/build/dateLookup/DateLookup.js +339 -0
- package/build/dateLookup/DateLookup.js.map +1 -0
- package/build/dateLookup/DateLookup.messages.js +33 -0
- package/build/dateLookup/DateLookup.messages.js.map +1 -0
- package/build/dateLookup/DateLookup.messages.mjs +31 -0
- package/build/dateLookup/DateLookup.messages.mjs.map +1 -0
- package/build/dateLookup/DateLookup.mjs +333 -0
- package/build/dateLookup/DateLookup.mjs.map +1 -0
- package/build/dateLookup/dateHeader/DateHeader.js +73 -0
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -0
- package/build/dateLookup/dateHeader/DateHeader.mjs +67 -0
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.js +70 -0
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js +12 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs +10 -0
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs.map +1 -0
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +68 -0
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -0
- package/build/dateLookup/dayCalendar/DayCalendar.js +71 -0
- package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -0
- package/build/dateLookup/dayCalendar/DayCalendar.mjs +69 -0
- package/build/dateLookup/dayCalendar/DayCalendar.mjs.map +1 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +150 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +148 -0
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.js +8 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.js.map +1 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.mjs +6 -0
- package/build/dateLookup/getFocusableTime/getFocusableTime.mjs.map +1 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.js +15 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.js.map +1 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.mjs +13 -0
- package/build/dateLookup/getStartOfDay/getStartOfDay.mjs.map +1 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.js +64 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.mjs +62 -0
- package/build/dateLookup/monthCalendar/MonthCalendar.mjs.map +1 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js +83 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs +81 -0
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -0
- package/build/dateLookup/tableLink/TableLink.js +65 -0
- package/build/dateLookup/tableLink/TableLink.js.map +1 -0
- package/build/dateLookup/tableLink/TableLink.mjs +59 -0
- package/build/dateLookup/tableLink/TableLink.mjs.map +1 -0
- package/build/dateLookup/yearCalendar/YearCalendar.js +57 -0
- package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -0
- package/build/dateLookup/yearCalendar/YearCalendar.mjs +55 -0
- package/build/dateLookup/yearCalendar/YearCalendar.mjs.map +1 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js +83 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs +81 -0
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -0
- package/build/decision/Decision.js +108 -0
- package/build/decision/Decision.js.map +1 -0
- package/build/decision/Decision.mjs +100 -0
- package/build/decision/Decision.mjs.map +1 -0
- package/build/definitionList/DefinitionList.js +72 -0
- package/build/definitionList/DefinitionList.js.map +1 -0
- package/build/definitionList/DefinitionList.mjs +66 -0
- package/build/definitionList/DefinitionList.mjs.map +1 -0
- package/build/dimmer/Dimmer.js +184 -0
- package/build/dimmer/Dimmer.js.map +1 -0
- package/build/dimmer/Dimmer.mjs +172 -0
- package/build/dimmer/Dimmer.mjs.map +1 -0
- package/build/dimmer/dimmerManager/DimmerManager.js +36 -0
- package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -0
- package/build/dimmer/dimmerManager/DimmerManager.mjs +34 -0
- package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -0
- package/build/display/Display.js +26 -0
- package/build/display/Display.js.map +1 -0
- package/build/display/Display.mjs +20 -0
- package/build/display/Display.mjs.map +1 -0
- package/build/drawer/Drawer.js +68 -0
- package/build/drawer/Drawer.js.map +1 -0
- package/build/drawer/Drawer.mjs +62 -0
- package/build/drawer/Drawer.mjs.map +1 -0
- package/build/dropFade/DropFade.js +48 -0
- package/build/dropFade/DropFade.js.map +1 -0
- package/build/dropFade/DropFade.mjs +42 -0
- package/build/dropFade/DropFade.mjs.map +1 -0
- package/build/emphasis/Emphasis.js +24 -0
- package/build/emphasis/Emphasis.js.map +1 -0
- package/build/emphasis/Emphasis.mjs +22 -0
- package/build/emphasis/Emphasis.mjs.map +1 -0
- package/build/emphasis/EmphasisHtmlTransformer.js +39 -0
- package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -0
- package/build/emphasis/EmphasisHtmlTransformer.mjs +37 -0
- package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -0
- package/build/field/Field.js +63 -0
- package/build/field/Field.js.map +1 -0
- package/build/field/Field.mjs +57 -0
- package/build/field/Field.mjs.map +1 -0
- package/build/flowNavigation/FlowNavigation.js +80 -0
- package/build/flowNavigation/FlowNavigation.js.map +1 -0
- package/build/flowNavigation/FlowNavigation.messages.js +12 -0
- package/build/flowNavigation/FlowNavigation.messages.js.map +1 -0
- package/build/flowNavigation/FlowNavigation.messages.mjs +10 -0
- package/build/flowNavigation/FlowNavigation.messages.mjs.map +1 -0
- package/build/flowNavigation/FlowNavigation.mjs +74 -0
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js +34 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs +28 -0
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -0
- package/build/flowNavigation/backButton/BackButton.js +34 -0
- package/build/flowNavigation/backButton/BackButton.js.map +1 -0
- package/build/flowNavigation/backButton/BackButton.mjs +28 -0
- package/build/flowNavigation/backButton/BackButton.mjs.map +1 -0
- package/build/header/Header.js +87 -0
- package/build/header/Header.js.map +1 -0
- package/build/header/Header.mjs +78 -0
- package/build/header/Header.mjs.map +1 -0
- package/build/i18n/cs.json.js +61 -0
- package/build/i18n/cs.json.js.map +1 -0
- package/build/i18n/cs.json.mjs +59 -0
- package/build/i18n/cs.json.mjs.map +1 -0
- package/build/i18n/de.json.js +62 -0
- package/build/i18n/de.json.js.map +1 -0
- package/build/i18n/de.json.mjs +60 -0
- package/build/i18n/de.json.mjs.map +1 -0
- package/build/i18n/en.json.js +62 -0
- package/build/i18n/en.json.js.map +1 -0
- package/build/i18n/en.json.mjs +60 -0
- package/build/i18n/en.json.mjs.map +1 -0
- package/build/i18n/es.json.js +62 -0
- package/build/i18n/es.json.js.map +1 -0
- package/build/i18n/es.json.mjs +60 -0
- package/build/i18n/es.json.mjs.map +1 -0
- package/build/i18n/fr.json.js +62 -0
- package/build/i18n/fr.json.js.map +1 -0
- package/build/i18n/fr.json.mjs +60 -0
- package/build/i18n/fr.json.mjs.map +1 -0
- package/build/i18n/hu.json.js +62 -0
- package/build/i18n/hu.json.js.map +1 -0
- package/build/i18n/hu.json.mjs +60 -0
- package/build/i18n/hu.json.mjs.map +1 -0
- package/build/i18n/id.json.js +62 -0
- package/build/i18n/id.json.js.map +1 -0
- package/build/i18n/id.json.mjs +60 -0
- package/build/i18n/id.json.mjs.map +1 -0
- package/build/i18n/index.js +45 -0
- package/build/i18n/index.js.map +1 -0
- package/build/i18n/index.mjs +43 -0
- package/build/i18n/index.mjs.map +1 -0
- package/build/i18n/it.json.js +62 -0
- package/build/i18n/it.json.js.map +1 -0
- package/build/i18n/it.json.mjs +60 -0
- package/build/i18n/it.json.mjs.map +1 -0
- package/build/i18n/ja.json.js +62 -0
- package/build/i18n/ja.json.js.map +1 -0
- package/build/i18n/ja.json.mjs +60 -0
- package/build/i18n/ja.json.mjs.map +1 -0
- package/build/i18n/pl.json.js +62 -0
- package/build/i18n/pl.json.js.map +1 -0
- package/build/i18n/pl.json.mjs +60 -0
- package/build/i18n/pl.json.mjs.map +1 -0
- package/build/i18n/pt.json.js +62 -0
- package/build/i18n/pt.json.js.map +1 -0
- package/build/i18n/pt.json.mjs +60 -0
- package/build/i18n/pt.json.mjs.map +1 -0
- package/build/i18n/ro.json.js +62 -0
- package/build/i18n/ro.json.js.map +1 -0
- package/build/i18n/ro.json.mjs +60 -0
- package/build/i18n/ro.json.mjs.map +1 -0
- package/build/i18n/ru.json.js +62 -0
- package/build/i18n/ru.json.js.map +1 -0
- package/build/i18n/ru.json.mjs +60 -0
- package/build/i18n/ru.json.mjs.map +1 -0
- package/build/i18n/th.json.js +62 -0
- package/build/i18n/th.json.js.map +1 -0
- package/build/i18n/th.json.mjs +60 -0
- package/build/i18n/th.json.mjs.map +1 -0
- package/build/i18n/tr.json.js +62 -0
- package/build/i18n/tr.json.js.map +1 -0
- package/build/i18n/tr.json.mjs +60 -0
- package/build/i18n/tr.json.mjs.map +1 -0
- package/build/i18n/uk.json.js +61 -0
- package/build/i18n/uk.json.js.map +1 -0
- package/build/i18n/uk.json.mjs +59 -0
- package/build/i18n/uk.json.mjs.map +1 -0
- package/build/i18n/zh-CN.json.js +62 -0
- package/build/i18n/zh-CN.json.js.map +1 -0
- package/build/i18n/zh-CN.json.mjs +60 -0
- package/build/i18n/zh-CN.json.mjs.map +1 -0
- package/build/i18n/zh-HK.json.js +62 -0
- package/build/i18n/zh-HK.json.js.map +1 -0
- package/build/i18n/zh-HK.json.mjs +60 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -0
- package/build/image/Image.js +55 -0
- package/build/image/Image.js.map +1 -0
- package/build/image/Image.mjs +46 -0
- package/build/image/Image.mjs.map +1 -0
- package/build/index.js +278 -14434
- package/build/index.js.map +1 -1
- package/build/index.mjs +118 -14359
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +80 -0
- package/build/info/Info.js.map +1 -0
- package/build/info/Info.messages.js +12 -0
- package/build/info/Info.messages.js.map +1 -0
- package/build/info/Info.messages.mjs +10 -0
- package/build/info/Info.messages.mjs.map +1 -0
- package/build/info/Info.mjs +74 -0
- package/build/info/Info.mjs.map +1 -0
- package/build/info/infoPresentations.js +9 -0
- package/build/info/infoPresentations.js.map +1 -0
- package/build/info/infoPresentations.mjs +9 -0
- package/build/info/infoPresentations.mjs.map +1 -0
- package/build/inlineAlert/InlineAlert.js +35 -0
- package/build/inlineAlert/InlineAlert.js.map +1 -0
- package/build/inlineAlert/InlineAlert.mjs +29 -0
- package/build/inlineAlert/InlineAlert.mjs.map +1 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js +15 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js.map +1 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.mjs +13 -0
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.mjs.map +1 -0
- package/build/inputs/Input.js +39 -0
- package/build/inputs/Input.js.map +1 -0
- package/build/inputs/Input.mjs +33 -0
- package/build/inputs/Input.mjs.map +1 -0
- package/build/inputs/InputGroup.js +116 -0
- package/build/inputs/InputGroup.js.map +1 -0
- package/build/inputs/InputGroup.mjs +109 -0
- package/build/inputs/InputGroup.mjs.map +1 -0
- package/build/inputs/SearchInput.js +38 -0
- package/build/inputs/SearchInput.js.map +1 -0
- package/build/inputs/SearchInput.mjs +36 -0
- package/build/inputs/SearchInput.mjs.map +1 -0
- package/build/inputs/SelectInput.js +585 -0
- package/build/inputs/SelectInput.js.map +1 -0
- package/build/inputs/SelectInput.messages.js +12 -0
- package/build/inputs/SelectInput.messages.js.map +1 -0
- package/build/inputs/SelectInput.messages.mjs +10 -0
- package/build/inputs/SelectInput.messages.mjs.map +1 -0
- package/build/inputs/SelectInput.mjs +576 -0
- package/build/inputs/SelectInput.mjs.map +1 -0
- package/build/inputs/TextArea.js +27 -0
- package/build/inputs/TextArea.js.map +1 -0
- package/build/inputs/TextArea.mjs +21 -0
- package/build/inputs/TextArea.mjs.map +1 -0
- package/build/inputs/_BottomSheet.js +115 -0
- package/build/inputs/_BottomSheet.js.map +1 -0
- package/build/inputs/_BottomSheet.mjs +109 -0
- package/build/inputs/_BottomSheet.mjs.map +1 -0
- package/build/inputs/_ButtonInput.js +37 -0
- package/build/inputs/_ButtonInput.js.map +1 -0
- package/build/inputs/_ButtonInput.mjs +31 -0
- package/build/inputs/_ButtonInput.mjs.map +1 -0
- package/build/inputs/_Popover.js +120 -0
- package/build/inputs/_Popover.js.map +1 -0
- package/build/inputs/_Popover.mjs +114 -0
- package/build/inputs/_Popover.mjs.map +1 -0
- package/build/inputs/_common.js +23 -0
- package/build/inputs/_common.js.map +1 -0
- package/build/inputs/_common.mjs +17 -0
- package/build/inputs/_common.mjs.map +1 -0
- package/build/inputs/contexts.js +42 -0
- package/build/inputs/contexts.js.map +1 -0
- package/build/inputs/contexts.mjs +35 -0
- package/build/inputs/contexts.mjs.map +1 -0
- package/build/instructionsList/InstructionsList.js +66 -0
- package/build/instructionsList/InstructionsList.js.map +1 -0
- package/build/instructionsList/InstructionsList.mjs +60 -0
- package/build/instructionsList/InstructionsList.mjs.map +1 -0
- package/build/label/Label.js +25 -0
- package/build/label/Label.js.map +1 -0
- package/build/label/Label.mjs +19 -0
- package/build/label/Label.mjs.map +1 -0
- package/build/link/Link.js +42 -0
- package/build/link/Link.js.map +1 -0
- package/build/link/Link.messages.js +12 -0
- package/build/link/Link.messages.js.map +1 -0
- package/build/link/Link.messages.mjs +10 -0
- package/build/link/Link.messages.mjs.map +1 -0
- package/build/link/Link.mjs +36 -0
- package/build/link/Link.mjs.map +1 -0
- package/build/listItem/ListItem.js +50 -0
- package/build/listItem/ListItem.js.map +1 -0
- package/build/listItem/ListItem.mjs +44 -0
- package/build/listItem/ListItem.mjs.map +1 -0
- package/build/loader/Loader.js +68 -0
- package/build/loader/Loader.js.map +1 -0
- package/build/loader/Loader.mjs +62 -0
- package/build/loader/Loader.mjs.map +1 -0
- package/build/logo/Logo.js +176 -0
- package/build/logo/Logo.js.map +1 -0
- package/build/logo/Logo.mjs +168 -0
- package/build/logo/Logo.mjs.map +1 -0
- package/build/markdown/Markdown.js +75 -0
- package/build/markdown/Markdown.js.map +1 -0
- package/build/markdown/Markdown.mjs +69 -0
- package/build/markdown/Markdown.mjs.map +1 -0
- package/build/modal/Modal.js +113 -0
- package/build/modal/Modal.js.map +1 -0
- package/build/modal/Modal.mjs +107 -0
- package/build/modal/Modal.mjs.map +1 -0
- package/build/money/Money.js +20 -0
- package/build/money/Money.js.map +1 -0
- package/build/money/Money.mjs +18 -0
- package/build/money/Money.mjs.map +1 -0
- package/build/moneyInput/MoneyInput.js +369 -0
- package/build/moneyInput/MoneyInput.js.map +1 -0
- package/build/moneyInput/MoneyInput.messages.js +12 -0
- package/build/moneyInput/MoneyInput.messages.js.map +1 -0
- package/build/moneyInput/MoneyInput.messages.mjs +10 -0
- package/build/moneyInput/MoneyInput.messages.mjs.map +1 -0
- package/build/moneyInput/MoneyInput.mjs +363 -0
- package/build/moneyInput/MoneyInput.mjs.map +1 -0
- package/build/moneyInput/currencyFormatting.js +70 -0
- package/build/moneyInput/currencyFormatting.js.map +1 -0
- package/build/moneyInput/currencyFormatting.mjs +64 -0
- package/build/moneyInput/currencyFormatting.mjs.map +1 -0
- package/build/navigationOption/NavigationOption.js +48 -0
- package/build/navigationOption/NavigationOption.js.map +1 -0
- package/build/navigationOption/NavigationOption.mjs +42 -0
- package/build/navigationOption/NavigationOption.mjs.map +1 -0
- package/build/navigationOptionsList/NavigationOptionsList.js +19 -0
- package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -0
- package/build/navigationOptionsList/NavigationOptionsList.mjs +17 -0
- package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -0
- package/build/nudge/Nudge.js +121 -0
- package/build/nudge/Nudge.js.map +1 -0
- package/build/nudge/Nudge.mjs +112 -0
- package/build/nudge/Nudge.mjs.map +1 -0
- package/build/overlayHeader/OverlayHeader.js +40 -0
- package/build/overlayHeader/OverlayHeader.js.map +1 -0
- package/build/overlayHeader/OverlayHeader.mjs +34 -0
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.js +161 -0
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.js +12 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.js.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs +10 -0
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -0
- package/build/phoneNumberInput/PhoneNumberInput.mjs +159 -0
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -0
- package/build/phoneNumberInput/data/countries.js +1278 -0
- package/build/phoneNumberInput/data/countries.js.map +1 -0
- package/build/phoneNumberInput/data/countries.mjs +1276 -0
- package/build/phoneNumberInput/data/countries.mjs.map +1 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.js +7 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.js.map +1 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.mjs +5 -0
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.mjs.map +1 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.js +19 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.js.map +1 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.mjs +17 -0
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.mjs.map +1 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.js +21 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.js.map +1 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs +19 -0
- package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.js +17 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.js.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.mjs +15 -0
- package/build/phoneNumberInput/utils/findCountryByCode/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js +17 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js.map +1 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs +15 -0
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +12 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js.map +1 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs +10 -0
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs.map +1 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +11 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js.map +1 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.mjs +9 -0
- package/build/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.mjs.map +1 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.js +6 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.js.map +1 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.mjs +4 -0
- package/build/phoneNumberInput/utils/longestMatchingPrefix/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.js +22 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.js.map +1 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.mjs +20 -0
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.mjs.map +1 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +8 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js.map +1 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs +6 -0
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs.map +1 -0
- package/build/popover/Popover.js +79 -0
- package/build/popover/Popover.js.map +1 -0
- package/build/popover/Popover.mjs +73 -0
- package/build/popover/Popover.mjs.map +1 -0
- package/build/processIndicator/ProcessIndicator.js +120 -0
- package/build/processIndicator/ProcessIndicator.js.map +1 -0
- package/build/processIndicator/ProcessIndicator.mjs +114 -0
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -0
- package/build/progress/Progress.js +24 -0
- package/build/progress/Progress.js.map +1 -0
- package/build/progress/Progress.mjs +18 -0
- package/build/progress/Progress.mjs.map +1 -0
- package/build/progressBar/ProgressBar.js +51 -0
- package/build/progressBar/ProgressBar.js.map +1 -0
- package/build/progressBar/ProgressBar.mjs +45 -0
- package/build/progressBar/ProgressBar.mjs.map +1 -0
- package/build/promoCard/PromoCard.js +189 -0
- package/build/promoCard/PromoCard.js.map +1 -0
- package/build/promoCard/PromoCard.mjs +182 -0
- package/build/promoCard/PromoCard.mjs.map +1 -0
- package/build/promoCard/PromoCardContext.js +33 -0
- package/build/promoCard/PromoCardContext.js.map +1 -0
- package/build/promoCard/PromoCardContext.mjs +27 -0
- package/build/promoCard/PromoCardContext.mjs.map +1 -0
- package/build/promoCard/PromoCardGroup.js +80 -0
- package/build/promoCard/PromoCardGroup.js.map +1 -0
- package/build/promoCard/PromoCardGroup.mjs +73 -0
- package/build/promoCard/PromoCardGroup.mjs.map +1 -0
- package/build/promoCard/PromoCardIndicator.js +53 -0
- package/build/promoCard/PromoCardIndicator.js.map +1 -0
- package/build/promoCard/PromoCardIndicator.mjs +47 -0
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -0
- package/build/provider/Provider.js +53 -0
- package/build/provider/Provider.js.map +1 -0
- package/build/provider/Provider.mjs +51 -0
- package/build/provider/Provider.mjs.map +1 -0
- package/build/provider/direction/DirectionProvider.js +20 -0
- package/build/provider/direction/DirectionProvider.js.map +1 -0
- package/build/provider/direction/DirectionProvider.mjs +17 -0
- package/build/provider/direction/DirectionProvider.mjs.map +1 -0
- package/build/provider/language/LanguageProvider.js +20 -0
- package/build/provider/language/LanguageProvider.js.map +1 -0
- package/build/provider/language/LanguageProvider.mjs +17 -0
- package/build/provider/language/LanguageProvider.mjs.map +1 -0
- package/build/radio/Radio.js +63 -0
- package/build/radio/Radio.js.map +1 -0
- package/build/radio/Radio.mjs +57 -0
- package/build/radio/Radio.mjs.map +1 -0
- package/build/radioGroup/RadioGroup.js +40 -0
- package/build/radioGroup/RadioGroup.js.map +1 -0
- package/build/radioGroup/RadioGroup.mjs +38 -0
- package/build/radioGroup/RadioGroup.mjs.map +1 -0
- package/build/radioOption/RadioOption.js +46 -0
- package/build/radioOption/RadioOption.js.map +1 -0
- package/build/radioOption/RadioOption.mjs +44 -0
- package/build/radioOption/RadioOption.mjs.map +1 -0
- package/build/section/Section.js +24 -0
- package/build/section/Section.js.map +1 -0
- package/build/section/Section.mjs +18 -0
- package/build/section/Section.mjs.map +1 -0
- package/build/segmentedControl/SegmentedControl.js +115 -0
- package/build/segmentedControl/SegmentedControl.js.map +1 -0
- package/build/segmentedControl/SegmentedControl.mjs +109 -0
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -0
- package/build/select/Select.js +579 -0
- package/build/select/Select.js.map +1 -0
- package/build/select/Select.messages.js +12 -0
- package/build/select/Select.messages.js.map +1 -0
- package/build/select/Select.messages.mjs +10 -0
- package/build/select/Select.messages.mjs.map +1 -0
- package/build/select/Select.mjs +572 -0
- package/build/select/Select.mjs.map +1 -0
- package/build/select/index.js +8 -0
- package/build/select/index.js.map +1 -0
- package/build/select/index.mjs +6 -0
- package/build/select/index.mjs.map +1 -0
- package/build/select/option/Option.js +58 -0
- package/build/select/option/Option.js.map +1 -0
- package/build/select/option/Option.mjs +52 -0
- package/build/select/option/Option.mjs.map +1 -0
- package/build/select/option/index.js +8 -0
- package/build/select/option/index.js.map +1 -0
- package/build/select/option/index.mjs +6 -0
- package/build/select/option/index.mjs.map +1 -0
- package/build/select/searchBox/SearchBox.js +54 -0
- package/build/select/searchBox/SearchBox.js.map +1 -0
- package/build/select/searchBox/SearchBox.mjs +48 -0
- package/build/select/searchBox/SearchBox.mjs.map +1 -0
- package/build/slidingPanel/SlidingPanel.js +51 -0
- package/build/slidingPanel/SlidingPanel.js.map +1 -0
- package/build/slidingPanel/SlidingPanel.mjs +42 -0
- package/build/slidingPanel/SlidingPanel.mjs.map +1 -0
- package/build/snackbar/Snackbar.js +128 -0
- package/build/snackbar/Snackbar.js.map +1 -0
- package/build/snackbar/Snackbar.mjs +123 -0
- package/build/snackbar/Snackbar.mjs.map +1 -0
- package/build/snackbar/SnackbarContext.js +12 -0
- package/build/snackbar/SnackbarContext.js.map +1 -0
- package/build/snackbar/SnackbarContext.mjs +9 -0
- package/build/snackbar/SnackbarContext.mjs.map +1 -0
- package/build/snackbar/SnackbarProvider.js +48 -0
- package/build/snackbar/SnackbarProvider.js.map +1 -0
- package/build/snackbar/SnackbarProvider.mjs +46 -0
- package/build/snackbar/SnackbarProvider.mjs.map +1 -0
- package/build/snackbar/useSnackbar.js +14 -0
- package/build/snackbar/useSnackbar.js.map +1 -0
- package/build/snackbar/useSnackbar.mjs +12 -0
- package/build/snackbar/useSnackbar.mjs.map +1 -0
- package/build/statusIcon/StatusIcon.js +37 -0
- package/build/statusIcon/StatusIcon.js.map +1 -0
- package/build/statusIcon/StatusIcon.mjs +31 -0
- package/build/statusIcon/StatusIcon.mjs.map +1 -0
- package/build/stepper/Stepper.js +80 -0
- package/build/stepper/Stepper.js.map +1 -0
- package/build/stepper/Stepper.mjs +74 -0
- package/build/stepper/Stepper.mjs.map +1 -0
- package/build/stepper/deviceDetection.js +22 -0
- package/build/stepper/deviceDetection.js.map +1 -0
- package/build/stepper/deviceDetection.mjs +20 -0
- package/build/stepper/deviceDetection.mjs.map +1 -0
- package/build/sticky/Sticky.js +24 -0
- package/build/sticky/Sticky.js.map +1 -0
- package/build/sticky/Sticky.mjs +22 -0
- package/build/sticky/Sticky.mjs.map +1 -0
- package/build/summary/Summary.js +119 -0
- package/build/summary/Summary.js.map +1 -0
- package/build/summary/Summary.messages.js +18 -0
- package/build/summary/Summary.messages.js.map +1 -0
- package/build/summary/Summary.messages.mjs +16 -0
- package/build/summary/Summary.messages.mjs.map +1 -0
- package/build/summary/Summary.mjs +113 -0
- package/build/summary/Summary.mjs.map +1 -0
- package/build/switch/Switch.js +82 -0
- package/build/switch/Switch.js.map +1 -0
- package/build/switch/Switch.mjs +76 -0
- package/build/switch/Switch.mjs.map +1 -0
- package/build/switchOption/SwitchOption.js +59 -0
- package/build/switchOption/SwitchOption.js.map +1 -0
- package/build/switchOption/SwitchOption.mjs +57 -0
- package/build/switchOption/SwitchOption.mjs.map +1 -0
- package/build/tabs/Tab.js +81 -0
- package/build/tabs/Tab.js.map +1 -0
- package/build/tabs/Tab.mjs +74 -0
- package/build/tabs/Tab.mjs.map +1 -0
- package/build/tabs/TabList.js +24 -0
- package/build/tabs/TabList.js.map +1 -0
- package/build/tabs/TabList.mjs +18 -0
- package/build/tabs/TabList.mjs.map +1 -0
- package/build/tabs/TabPanel.js +35 -0
- package/build/tabs/TabPanel.js.map +1 -0
- package/build/tabs/TabPanel.mjs +29 -0
- package/build/tabs/TabPanel.mjs.map +1 -0
- package/build/tabs/Tabs.js +541 -0
- package/build/tabs/Tabs.js.map +1 -0
- package/build/tabs/Tabs.mjs +533 -0
- package/build/tabs/Tabs.mjs.map +1 -0
- package/build/tabs/utils.js +50 -0
- package/build/tabs/utils.js.map +1 -0
- package/build/tabs/utils.mjs +42 -0
- package/build/tabs/utils.mjs.map +1 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +15 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js.map +1 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.mjs +13 -0
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.mjs.map +1 -0
- package/build/tile/Tile.js +58 -0
- package/build/tile/Tile.js.map +1 -0
- package/build/tile/Tile.mjs +52 -0
- package/build/tile/Tile.mjs.map +1 -0
- package/build/title/Title.js +42 -0
- package/build/title/Title.js.map +1 -0
- package/build/title/Title.mjs +36 -0
- package/build/title/Title.mjs.map +1 -0
- package/build/tooltip/Tooltip.js +103 -0
- package/build/tooltip/Tooltip.js.map +1 -0
- package/build/tooltip/Tooltip.mjs +97 -0
- package/build/tooltip/Tooltip.mjs.map +1 -0
- package/build/typeahead/Typeahead.js +468 -0
- package/build/typeahead/Typeahead.js.map +1 -0
- package/build/typeahead/Typeahead.mjs +460 -0
- package/build/typeahead/Typeahead.mjs.map +1 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.js +120 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +114 -0
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.js +49 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs +43 -0
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -0
- package/build/typeahead/util/highlight.js +21 -0
- package/build/typeahead/util/highlight.js.map +1 -0
- package/build/typeahead/util/highlight.mjs +19 -0
- package/build/typeahead/util/highlight.mjs.map +1 -0
- package/build/upload/Upload.js +366 -0
- package/build/upload/Upload.js.map +1 -0
- package/build/upload/Upload.messages.js +39 -0
- package/build/upload/Upload.messages.js.map +1 -0
- package/build/upload/Upload.messages.mjs +37 -0
- package/build/upload/Upload.messages.mjs.map +1 -0
- package/build/upload/Upload.mjs +356 -0
- package/build/upload/Upload.mjs.map +1 -0
- package/build/upload/steps/completeStep/completeStep.js +65 -0
- package/build/upload/steps/completeStep/completeStep.js.map +1 -0
- package/build/upload/steps/completeStep/completeStep.mjs +63 -0
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -0
- package/build/upload/steps/processingStep/processingStep.js +50 -0
- package/build/upload/steps/processingStep/processingStep.js.map +1 -0
- package/build/upload/steps/processingStep/processingStep.mjs +48 -0
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +88 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +86 -0
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.js +17 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.js.map +1 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.mjs +15 -0
- package/build/upload/utils/asyncFileRead/asyncFileRead.mjs.map +1 -0
- package/build/upload/utils/getFileType/getFileType.js +18 -0
- package/build/upload/utils/getFileType/getFileType.js.map +1 -0
- package/build/upload/utils/getFileType/getFileType.mjs +16 -0
- package/build/upload/utils/getFileType/getFileType.mjs.map +1 -0
- package/build/upload/utils/isSizeValid/isSizeValid.js +8 -0
- package/build/upload/utils/isSizeValid/isSizeValid.js.map +1 -0
- package/build/upload/utils/isSizeValid/isSizeValid.mjs +6 -0
- package/build/upload/utils/isSizeValid/isSizeValid.mjs.map +1 -0
- package/build/upload/utils/isTypeValid/isTypeValid.js +21 -0
- package/build/upload/utils/isTypeValid/isTypeValid.js.map +1 -0
- package/build/upload/utils/isTypeValid/isTypeValid.mjs +19 -0
- package/build/upload/utils/isTypeValid/isTypeValid.mjs.map +1 -0
- package/build/upload/utils/postData/postData.js +31 -0
- package/build/upload/utils/postData/postData.js.map +1 -0
- package/build/upload/utils/postData/postData.mjs +28 -0
- package/build/upload/utils/postData/postData.mjs.map +1 -0
- package/build/uploadInput/UploadInput.js +259 -0
- package/build/uploadInput/UploadInput.js.map +1 -0
- package/build/uploadInput/UploadInput.messages.js +30 -0
- package/build/uploadInput/UploadInput.messages.js.map +1 -0
- package/build/uploadInput/UploadInput.messages.mjs +28 -0
- package/build/uploadInput/UploadInput.messages.mjs.map +1 -0
- package/build/uploadInput/UploadInput.mjs +253 -0
- package/build/uploadInput/UploadInput.mjs.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.js +186 -0
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.js +24 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.js.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.mjs +22 -0
- package/build/uploadInput/uploadButton/UploadButton.messages.mjs.map +1 -0
- package/build/uploadInput/uploadButton/UploadButton.mjs +178 -0
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -0
- package/build/uploadInput/uploadButton/defaults.js +10 -0
- package/build/uploadInput/uploadButton/defaults.js.map +1 -0
- package/build/uploadInput/uploadButton/defaults.mjs +7 -0
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js +8 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs +6 -0
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.js +174 -0
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.js +27 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.js.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.mjs +25 -0
- package/build/uploadInput/uploadItem/UploadItem.messages.mjs.map +1 -0
- package/build/uploadInput/uploadItem/UploadItem.mjs +166 -0
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -0
- package/build/uploadInput/uploadItem/UploadItemBody.js +27 -0
- package/build/uploadInput/uploadItem/UploadItemBody.js.map +1 -0
- package/build/uploadInput/uploadItem/UploadItemBody.mjs +25 -0
- package/build/uploadInput/uploadItem/UploadItemBody.mjs.map +1 -0
- package/build/utilities/cssValueWithUnit.js +8 -0
- package/build/utilities/cssValueWithUnit.js.map +1 -0
- package/build/utilities/cssValueWithUnit.mjs +6 -0
- package/build/utilities/cssValueWithUnit.mjs.map +1 -0
- package/build/utilities/logActionRequired.js +17 -0
- package/build/utilities/logActionRequired.js.map +1 -0
- package/build/utilities/logActionRequired.mjs +14 -0
- package/build/utilities/logActionRequired.mjs.map +1 -0
- package/build/withDisplayFormat/WithDisplayFormat.js +304 -0
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -0
- package/build/withDisplayFormat/WithDisplayFormat.mjs +282 -0
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -0
- package/build/withNextPortal/withNextPortal.js +20 -0
- package/build/withNextPortal/withNextPortal.js.map +1 -0
- package/build/withNextPortal/withNextPortal.mjs +18 -0
- package/build/withNextPortal/withNextPortal.mjs.map +1 -0
- package/package.json +3 -2
- package/src/common/hooks/useVirtualKeyboard.ts +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var icons = require('@transferwise/icons');
|
|
4
|
+
var classNames = require('classnames');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactIntl = require('react-intl');
|
|
7
|
+
var Modal = require('../modal/Modal.js');
|
|
8
|
+
var Popover = require('../popover/Popover.js');
|
|
9
|
+
var Info_messages = require('./Info.messages.js');
|
|
10
|
+
var infoPresentations = require('./infoPresentations.js');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
var size = require('../common/propsValues/size.js');
|
|
13
|
+
var position = require('../common/propsValues/position.js');
|
|
14
|
+
|
|
15
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
18
|
+
|
|
19
|
+
const Info = ({
|
|
20
|
+
className = undefined,
|
|
21
|
+
content = undefined,
|
|
22
|
+
onClick = undefined,
|
|
23
|
+
presentation = infoPresentations.InfoPresentation.POPOVER,
|
|
24
|
+
size: size$1 = size.Size.SMALL,
|
|
25
|
+
title = undefined,
|
|
26
|
+
'aria-label': ariaLabel,
|
|
27
|
+
preferredPlacement = position.Position.BOTTOM
|
|
28
|
+
}) => {
|
|
29
|
+
const intl = reactIntl.useIntl();
|
|
30
|
+
const [open, setOpen] = React.useState(false);
|
|
31
|
+
ariaLabel ??= intl.formatMessage(Info_messages.ariaLabel);
|
|
32
|
+
const isModal = presentation === infoPresentations.InfoPresentation.MODAL;
|
|
33
|
+
const isSmall = size$1 === size.Size.SMALL;
|
|
34
|
+
const buttonProps = {
|
|
35
|
+
'aria-label': ariaLabel,
|
|
36
|
+
className: 'btn-unstyled',
|
|
37
|
+
children: /*#__PURE__*/jsxRuntime.jsx(icons.QuestionMarkCircle, {
|
|
38
|
+
size: isSmall ? 16 : 24
|
|
39
|
+
})
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
42
|
+
className: classNames__default.default(className, 'np-info', {
|
|
43
|
+
'np-info__small': isSmall,
|
|
44
|
+
'np-info__large': !isSmall
|
|
45
|
+
}),
|
|
46
|
+
children: isModal ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
47
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("button", {
|
|
48
|
+
type: "button",
|
|
49
|
+
onClick: () => {
|
|
50
|
+
setOpen(!open);
|
|
51
|
+
if (onClick) {
|
|
52
|
+
onClick();
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
...buttonProps
|
|
56
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
57
|
+
body: content,
|
|
58
|
+
open: open,
|
|
59
|
+
title: title,
|
|
60
|
+
onClose: () => setOpen(false)
|
|
61
|
+
})]
|
|
62
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Popover, {
|
|
63
|
+
content: content,
|
|
64
|
+
preferredPlacement: preferredPlacement,
|
|
65
|
+
title: title,
|
|
66
|
+
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
67
|
+
type: "button",
|
|
68
|
+
...buttonProps,
|
|
69
|
+
onClick: () => {
|
|
70
|
+
if (onClick) {
|
|
71
|
+
onClick();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
module.exports = Info;
|
|
80
|
+
//# sourceMappingURL=Info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Info.js","sources":["../../src/info/Info.tsx"],"sourcesContent":["import { QuestionMarkCircle as HelpCircleIcon } from '@transferwise/icons';\nimport classNames from 'classnames';\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { Size, Position, SizeSmall, SizeLarge } from '../common';\nimport Modal from '../modal';\nimport Popover, { PopoverPreferredPlacement } from '../popover';\n\nimport messages from './Info.messages';\nimport { InfoPresentation } from './infoPresentations';\n\nexport interface InfoProps {\n 'aria-label'?: string;\n /**\n * Extra classes applied to Info\n */\n className?: string;\n /**\n * Content displayed inside a Popover a Modal\n */\n content?: React.ReactNode;\n onClick?: () => void;\n /**\n * Decides whether to display content in a Popover or a Modal\n */\n presentation?: 'MODAL' | 'POPOVER';\n /**\n * Decides the size of help Icon\n */\n size?: SizeSmall | SizeLarge;\n /**\n * Title displayed inside a Popover a Modal\n */\n title?: React.ReactNode;\n /**\n * Prferred placement of the Popover, does not apply to Modal\n */\n preferredPlacement?: PopoverPreferredPlacement;\n}\n\nconst Info = ({\n className = undefined,\n content = undefined,\n onClick = undefined,\n presentation = InfoPresentation.POPOVER,\n size = Size.SMALL,\n title = undefined,\n 'aria-label': ariaLabel,\n preferredPlacement = Position.BOTTOM,\n}: InfoProps) => {\n const intl = useIntl();\n const [open, setOpen] = useState(false);\n ariaLabel ??= intl.formatMessage(messages.ariaLabel);\n const isModal = presentation === InfoPresentation.MODAL;\n const isSmall = size === Size.SMALL;\n\n const buttonProps = {\n 'aria-label': ariaLabel,\n className: 'btn-unstyled',\n children: <HelpCircleIcon size={isSmall ? 16 : 24} />,\n };\n\n return (\n <span\n className={classNames(className, 'np-info', {\n 'np-info__small': isSmall,\n 'np-info__large': !isSmall,\n })}\n >\n {isModal ? (\n <>\n <button\n type=\"button\"\n onClick={() => {\n setOpen(!open);\n if (onClick) {\n onClick();\n }\n }}\n {...buttonProps}\n />\n <Modal body={content} open={open} title={title} onClose={() => setOpen(false)} />\n </>\n ) : (\n <Popover content={content} preferredPlacement={preferredPlacement} title={title}>\n <button\n type=\"button\"\n {...buttonProps}\n onClick={() => {\n if (onClick) {\n onClick();\n }\n }}\n />\n </Popover>\n )}\n </span>\n );\n};\n\nexport default Info;\n"],"names":["Info","className","undefined","content","onClick","presentation","InfoPresentation","POPOVER","size","Size","SMALL","title","ariaLabel","preferredPlacement","Position","BOTTOM","intl","useIntl","open","setOpen","useState","formatMessage","messages","isModal","MODAL","isSmall","buttonProps","children","_jsx","HelpCircleIcon","classNames","_jsxs","_Fragment","type","Modal","body","onClose","Popover"],"mappings":";;;;;;;;;;;;;;;;;;AAyCMA,MAAAA,IAAI,GAAGA,CAAC;AACZC,EAAAA,SAAS,GAAGC,SAAS;AACrBC,EAAAA,OAAO,GAAGD,SAAS;AACnBE,EAAAA,OAAO,GAAGF,SAAS;EACnBG,YAAY,GAAGC,kCAAgB,CAACC,OAAO;QACvCC,MAAI,GAAGC,SAAI,CAACC,KAAK;AACjBC,EAAAA,KAAK,GAAGT,SAAS;AACjB,EAAA,YAAY,EAAEU,SAAS;EACvBC,kBAAkB,GAAGC,iBAAQ,CAACC,MAAAA;AAAM,CAC1B,KAAI;AACd,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE,CAAA;EACtB,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC,CAAA;EACvCR,SAAS,KAAKI,IAAI,CAACK,aAAa,CAACC,aAAQ,CAACV,SAAS,CAAC,CAAA;AACpD,EAAA,MAAMW,OAAO,GAAGlB,YAAY,KAAKC,kCAAgB,CAACkB,KAAK,CAAA;AACvD,EAAA,MAAMC,OAAO,GAAGjB,MAAI,KAAKC,SAAI,CAACC,KAAK,CAAA;AAEnC,EAAA,MAAMgB,WAAW,GAAG;AAClB,IAAA,YAAY,EAAEd,SAAS;AACvBX,IAAAA,SAAS,EAAE,cAAc;IACzB0B,QAAQ,eAAEC,cAAA,CAACC,wBAAc,EAAA;AAACrB,MAAAA,IAAI,EAAEiB,OAAO,GAAG,EAAE,GAAG,EAAA;KAAM,CAAA;GACtD,CAAA;AAED,EAAA,oBACEG,cAAA,CAAA,MAAA,EAAA;AACE3B,IAAAA,SAAS,EAAE6B,2BAAU,CAAC7B,SAAS,EAAE,SAAS,EAAE;AAC1C,MAAA,gBAAgB,EAAEwB,OAAO;AACzB,MAAA,gBAAgB,EAAE,CAACA,OAAAA;AACpB,KAAA,CAAE;AAAAE,IAAAA,QAAA,EAEFJ,OAAO,gBACNQ,eAAA,CAAAC,mBAAA,EAAA;AAAAL,MAAAA,QAAA,gBACEC,cAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;QACb7B,OAAO,EAAEA,MAAK;UACZe,OAAO,CAAC,CAACD,IAAI,CAAC,CAAA;AACd,UAAA,IAAId,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;SACA;QAAA,GACEsB,WAAAA;AAAW,OAEjB,CAAA,eAAAE,cAAA,CAACM,KAAK,EAAA;AAACC,QAAAA,IAAI,EAAEhC,OAAQ;AAACe,QAAAA,IAAI,EAAEA,IAAK;AAACP,QAAAA,KAAK,EAAEA,KAAM;AAACyB,QAAAA,OAAO,EAAEA,MAAMjB,OAAO,CAAC,KAAK,CAAA;AAAE,OAChF,CAAA,CAAA;AAAA,KAAG,CAAA,gBAEHS,cAAA,CAACS,OAAO,EAAA;AAAClC,MAAAA,OAAO,EAAEA,OAAQ;AAACU,MAAAA,kBAAkB,EAAEA,kBAAmB;AAACF,MAAAA,KAAK,EAAEA,KAAM;AAAAgB,MAAAA,QAAA,eAC9EC,cAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;AAAA,QAAA,GACTP,WAAW;QACftB,OAAO,EAAEA,MAAK;AACZ,UAAA,IAAIA,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;AACF,SAAA;OAEJ,CAAA;KAAS,CAAA;AACV,GACG,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Info.messages.js","sources":["../../src/info/Info.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n ariaLabel: {\n id: 'neptune.Info.ariaLabel',\n defaultMessage: 'More information',\n },\n});\n"],"names":["defineMessages","ariaLabel","id"],"mappings":";;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,SAAS,EAAE;IACTC,EAAE,EAAA,wBAAA;AAEH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Info.messages.mjs","sources":["../../src/info/Info.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n ariaLabel: {\n id: 'neptune.Info.ariaLabel',\n defaultMessage: 'More information',\n },\n});\n"],"names":["defineMessages","ariaLabel","id"],"mappings":";;AAEA,eAAeA,cAAc,CAAC;AAC5BC,EAAAA,SAAS,EAAE;IACTC,EAAE,EAAA,wBAAA;AAEH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { QuestionMarkCircle } from '@transferwise/icons';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useIntl } from 'react-intl';
|
|
5
|
+
import Modal from '../modal/Modal.mjs';
|
|
6
|
+
import Popover from '../popover/Popover.mjs';
|
|
7
|
+
import messages from './Info.messages.mjs';
|
|
8
|
+
import { InfoPresentation } from './infoPresentations.mjs';
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
import { Size } from '../common/propsValues/size.mjs';
|
|
11
|
+
import { Position } from '../common/propsValues/position.mjs';
|
|
12
|
+
|
|
13
|
+
const Info = ({
|
|
14
|
+
className = undefined,
|
|
15
|
+
content = undefined,
|
|
16
|
+
onClick = undefined,
|
|
17
|
+
presentation = InfoPresentation.POPOVER,
|
|
18
|
+
size = Size.SMALL,
|
|
19
|
+
title = undefined,
|
|
20
|
+
'aria-label': ariaLabel,
|
|
21
|
+
preferredPlacement = Position.BOTTOM
|
|
22
|
+
}) => {
|
|
23
|
+
const intl = useIntl();
|
|
24
|
+
const [open, setOpen] = useState(false);
|
|
25
|
+
ariaLabel ??= intl.formatMessage(messages.ariaLabel);
|
|
26
|
+
const isModal = presentation === InfoPresentation.MODAL;
|
|
27
|
+
const isSmall = size === Size.SMALL;
|
|
28
|
+
const buttonProps = {
|
|
29
|
+
'aria-label': ariaLabel,
|
|
30
|
+
className: 'btn-unstyled',
|
|
31
|
+
children: /*#__PURE__*/jsx(QuestionMarkCircle, {
|
|
32
|
+
size: isSmall ? 16 : 24
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
return /*#__PURE__*/jsx("span", {
|
|
36
|
+
className: classNames(className, 'np-info', {
|
|
37
|
+
'np-info__small': isSmall,
|
|
38
|
+
'np-info__large': !isSmall
|
|
39
|
+
}),
|
|
40
|
+
children: isModal ? /*#__PURE__*/jsxs(Fragment, {
|
|
41
|
+
children: [/*#__PURE__*/jsx("button", {
|
|
42
|
+
type: "button",
|
|
43
|
+
onClick: () => {
|
|
44
|
+
setOpen(!open);
|
|
45
|
+
if (onClick) {
|
|
46
|
+
onClick();
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
...buttonProps
|
|
50
|
+
}), /*#__PURE__*/jsx(Modal, {
|
|
51
|
+
body: content,
|
|
52
|
+
open: open,
|
|
53
|
+
title: title,
|
|
54
|
+
onClose: () => setOpen(false)
|
|
55
|
+
})]
|
|
56
|
+
}) : /*#__PURE__*/jsx(Popover, {
|
|
57
|
+
content: content,
|
|
58
|
+
preferredPlacement: preferredPlacement,
|
|
59
|
+
title: title,
|
|
60
|
+
children: /*#__PURE__*/jsx("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
...buttonProps,
|
|
63
|
+
onClick: () => {
|
|
64
|
+
if (onClick) {
|
|
65
|
+
onClick();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { Info as default };
|
|
74
|
+
//# sourceMappingURL=Info.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Info.mjs","sources":["../../src/info/Info.tsx"],"sourcesContent":["import { QuestionMarkCircle as HelpCircleIcon } from '@transferwise/icons';\nimport classNames from 'classnames';\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { Size, Position, SizeSmall, SizeLarge } from '../common';\nimport Modal from '../modal';\nimport Popover, { PopoverPreferredPlacement } from '../popover';\n\nimport messages from './Info.messages';\nimport { InfoPresentation } from './infoPresentations';\n\nexport interface InfoProps {\n 'aria-label'?: string;\n /**\n * Extra classes applied to Info\n */\n className?: string;\n /**\n * Content displayed inside a Popover a Modal\n */\n content?: React.ReactNode;\n onClick?: () => void;\n /**\n * Decides whether to display content in a Popover or a Modal\n */\n presentation?: 'MODAL' | 'POPOVER';\n /**\n * Decides the size of help Icon\n */\n size?: SizeSmall | SizeLarge;\n /**\n * Title displayed inside a Popover a Modal\n */\n title?: React.ReactNode;\n /**\n * Prferred placement of the Popover, does not apply to Modal\n */\n preferredPlacement?: PopoverPreferredPlacement;\n}\n\nconst Info = ({\n className = undefined,\n content = undefined,\n onClick = undefined,\n presentation = InfoPresentation.POPOVER,\n size = Size.SMALL,\n title = undefined,\n 'aria-label': ariaLabel,\n preferredPlacement = Position.BOTTOM,\n}: InfoProps) => {\n const intl = useIntl();\n const [open, setOpen] = useState(false);\n ariaLabel ??= intl.formatMessage(messages.ariaLabel);\n const isModal = presentation === InfoPresentation.MODAL;\n const isSmall = size === Size.SMALL;\n\n const buttonProps = {\n 'aria-label': ariaLabel,\n className: 'btn-unstyled',\n children: <HelpCircleIcon size={isSmall ? 16 : 24} />,\n };\n\n return (\n <span\n className={classNames(className, 'np-info', {\n 'np-info__small': isSmall,\n 'np-info__large': !isSmall,\n })}\n >\n {isModal ? (\n <>\n <button\n type=\"button\"\n onClick={() => {\n setOpen(!open);\n if (onClick) {\n onClick();\n }\n }}\n {...buttonProps}\n />\n <Modal body={content} open={open} title={title} onClose={() => setOpen(false)} />\n </>\n ) : (\n <Popover content={content} preferredPlacement={preferredPlacement} title={title}>\n <button\n type=\"button\"\n {...buttonProps}\n onClick={() => {\n if (onClick) {\n onClick();\n }\n }}\n />\n </Popover>\n )}\n </span>\n );\n};\n\nexport default Info;\n"],"names":["Info","className","undefined","content","onClick","presentation","InfoPresentation","POPOVER","size","Size","SMALL","title","ariaLabel","preferredPlacement","Position","BOTTOM","intl","useIntl","open","setOpen","useState","formatMessage","messages","isModal","MODAL","isSmall","buttonProps","children","_jsx","HelpCircleIcon","classNames","_jsxs","_Fragment","type","Modal","body","onClose","Popover"],"mappings":";;;;;;;;;;;;AAyCMA,MAAAA,IAAI,GAAGA,CAAC;AACZC,EAAAA,SAAS,GAAGC,SAAS;AACrBC,EAAAA,OAAO,GAAGD,SAAS;AACnBE,EAAAA,OAAO,GAAGF,SAAS;EACnBG,YAAY,GAAGC,gBAAgB,CAACC,OAAO;EACvCC,IAAI,GAAGC,IAAI,CAACC,KAAK;AACjBC,EAAAA,KAAK,GAAGT,SAAS;AACjB,EAAA,YAAY,EAAEU,SAAS;EACvBC,kBAAkB,GAAGC,QAAQ,CAACC,MAAAA;AAAM,CAC1B,KAAI;AACd,EAAA,MAAMC,IAAI,GAAGC,OAAO,EAAE,CAAA;EACtB,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC,CAAA;EACvCR,SAAS,KAAKI,IAAI,CAACK,aAAa,CAACC,QAAQ,CAACV,SAAS,CAAC,CAAA;AACpD,EAAA,MAAMW,OAAO,GAAGlB,YAAY,KAAKC,gBAAgB,CAACkB,KAAK,CAAA;AACvD,EAAA,MAAMC,OAAO,GAAGjB,IAAI,KAAKC,IAAI,CAACC,KAAK,CAAA;AAEnC,EAAA,MAAMgB,WAAW,GAAG;AAClB,IAAA,YAAY,EAAEd,SAAS;AACvBX,IAAAA,SAAS,EAAE,cAAc;IACzB0B,QAAQ,eAAEC,GAAA,CAACC,kBAAc,EAAA;AAACrB,MAAAA,IAAI,EAAEiB,OAAO,GAAG,EAAE,GAAG,EAAA;KAAM,CAAA;GACtD,CAAA;AAED,EAAA,oBACEG,GAAA,CAAA,MAAA,EAAA;AACE3B,IAAAA,SAAS,EAAE6B,UAAU,CAAC7B,SAAS,EAAE,SAAS,EAAE;AAC1C,MAAA,gBAAgB,EAAEwB,OAAO;AACzB,MAAA,gBAAgB,EAAE,CAACA,OAAAA;AACpB,KAAA,CAAE;AAAAE,IAAAA,QAAA,EAEFJ,OAAO,gBACNQ,IAAA,CAAAC,QAAA,EAAA;AAAAL,MAAAA,QAAA,gBACEC,GAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;QACb7B,OAAO,EAAEA,MAAK;UACZe,OAAO,CAAC,CAACD,IAAI,CAAC,CAAA;AACd,UAAA,IAAId,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;SACA;QAAA,GACEsB,WAAAA;AAAW,OAEjB,CAAA,eAAAE,GAAA,CAACM,KAAK,EAAA;AAACC,QAAAA,IAAI,EAAEhC,OAAQ;AAACe,QAAAA,IAAI,EAAEA,IAAK;AAACP,QAAAA,KAAK,EAAEA,KAAM;AAACyB,QAAAA,OAAO,EAAEA,MAAMjB,OAAO,CAAC,KAAK,CAAA;AAAE,OAChF,CAAA,CAAA;AAAA,KAAG,CAAA,gBAEHS,GAAA,CAACS,OAAO,EAAA;AAAClC,MAAAA,OAAO,EAAEA,OAAQ;AAACU,MAAAA,kBAAkB,EAAEA,kBAAmB;AAACF,MAAAA,KAAK,EAAEA,KAAM;AAAAgB,MAAAA,QAAA,eAC9EC,GAAA,CAAA,QAAA,EAAA;AACEK,QAAAA,IAAI,EAAC,QAAQ;AAAA,QAAA,GACTP,WAAW;QACftB,OAAO,EAAEA,MAAK;AACZ,UAAA,IAAIA,OAAO,EAAE;AACXA,YAAAA,OAAO,EAAE,CAAA;AACX,WAAA;AACF,SAAA;OAEJ,CAAA;KAAS,CAAA;AACV,GACG,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
|
|
4
|
+
exports.InfoPresentation = void 0;
|
|
5
|
+
(function (InfoPresentation) {
|
|
6
|
+
InfoPresentation["POPOVER"] = "POPOVER";
|
|
7
|
+
InfoPresentation["MODAL"] = "MODAL";
|
|
8
|
+
})(exports.InfoPresentation || (exports.InfoPresentation = {}));
|
|
9
|
+
//# sourceMappingURL=infoPresentations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoPresentations.js","sources":["../../src/info/infoPresentations.ts"],"sourcesContent":["// TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum\nexport enum InfoPresentation {\n POPOVER = 'POPOVER',\n MODAL = 'MODAL',\n}\n"],"names":["InfoPresentation"],"mappings":";;AAAA;AACYA,kCAGX;AAHD,CAAA,UAAYA,gBAAgB,EAAA;AAC1BA,EAAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnBA,EAAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACjB,CAAC,EAHWA,wBAAgB,KAAhBA,wBAAgB,GAG3B,EAAA,CAAA,CAAA;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
|
|
2
|
+
var InfoPresentation;
|
|
3
|
+
(function (InfoPresentation) {
|
|
4
|
+
InfoPresentation["POPOVER"] = "POPOVER";
|
|
5
|
+
InfoPresentation["MODAL"] = "MODAL";
|
|
6
|
+
})(InfoPresentation || (InfoPresentation = {}));
|
|
7
|
+
|
|
8
|
+
export { InfoPresentation };
|
|
9
|
+
//# sourceMappingURL=infoPresentations.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoPresentations.mjs","sources":["../../src/info/infoPresentations.ts"],"sourcesContent":["// TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum\nexport enum InfoPresentation {\n POPOVER = 'POPOVER',\n MODAL = 'MODAL',\n}\n"],"names":["InfoPresentation"],"mappings":"AAAA;IACYA,iBAGX;AAHD,CAAA,UAAYA,gBAAgB,EAAA;AAC1BA,EAAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnBA,EAAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACjB,CAAC,EAHWA,gBAAgB,KAAhBA,gBAAgB,GAG3B,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classNames = require('classnames');
|
|
4
|
+
var StatusIcon = require('../statusIcon/StatusIcon.js');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var sentiment = require('../common/propsValues/sentiment.js');
|
|
7
|
+
var size = require('../common/propsValues/size.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
12
|
+
|
|
13
|
+
const iconTypes = new Set([sentiment.Sentiment.NEGATIVE, sentiment.Sentiment.ERROR, sentiment.Sentiment.POSITIVE, sentiment.Sentiment.SUCCESS, sentiment.Sentiment.WARNING]);
|
|
14
|
+
function InlineAlert({
|
|
15
|
+
id,
|
|
16
|
+
type = 'neutral',
|
|
17
|
+
className,
|
|
18
|
+
children
|
|
19
|
+
}) {
|
|
20
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
21
|
+
role: "alert",
|
|
22
|
+
id: id,
|
|
23
|
+
className: classNames__default.default('alert alert-detach', `alert-${type === sentiment.Sentiment.NEGATIVE || type === sentiment.Sentiment.ERROR ? 'danger' : type}`, className),
|
|
24
|
+
children: [iconTypes.has(type) && /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
25
|
+
sentiment: type,
|
|
26
|
+
size: size.Size.SMALL
|
|
27
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
28
|
+
className: "np-text-body-default",
|
|
29
|
+
children: children
|
|
30
|
+
})]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
module.exports = InlineAlert;
|
|
35
|
+
//# sourceMappingURL=InlineAlert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineAlert.js","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n className?: string;\n children: ReactNode;\n}\n\nconst iconTypes = new Set<NonNullable<InlineAlertProps['type']>>([\n Sentiment.NEGATIVE,\n Sentiment.ERROR,\n Sentiment.POSITIVE,\n Sentiment.SUCCESS,\n Sentiment.WARNING,\n]);\n\nexport default function InlineAlert({\n id,\n type = 'neutral',\n className,\n children,\n}: InlineAlertProps) {\n return (\n <div\n role=\"alert\"\n id={id}\n className={classNames(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n className,\n )}\n >\n {iconTypes.has(type) && <StatusIcon sentiment={type} size={Size.SMALL} />}\n <div className=\"np-text-body-default\">{children}</div>\n </div>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","className","children","_jsxs","role","classNames","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;;;;;;;AAaA,MAAMA,SAAS,GAAG,IAAIC,GAAG,CAAwC,CAC/DC,mBAAS,CAACC,QAAQ,EAClBD,mBAAS,CAACE,KAAK,EACfF,mBAAS,CAACG,QAAQ,EAClBH,mBAAS,CAACI,OAAO,EACjBJ,mBAAS,CAACK,OAAO,CAClB,CAAC,CAAA;AAEsB,SAAAC,WAAWA,CAAC;EAClCC,EAAE;AACFC,EAAAA,IAAI,GAAG,SAAS;EAChBC,SAAS;AACTC,EAAAA,QAAAA;AACiB,CAAA,EAAA;AACjB,EAAA,oBACEC,eAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,OAAO;AACZL,IAAAA,EAAE,EAAEA,EAAG;IACPE,SAAS,EAAEI,2BAAU,CACnB,oBAAoB,EACX,SAAAL,IAAI,KAAKR,mBAAS,CAACC,QAAQ,IAAIO,IAAI,KAAKR,mBAAS,CAACE,KAAK,GAAG,QAAQ,GAAGM,MAAM,EACpFC,SAAS,CACT;IAAAC,QAAA,EAAA,CAEDZ,SAAS,CAACgB,GAAG,CAACN,IAAI,CAAC,iBAAIO,cAAA,CAACC,UAAU,EAAA;AAACC,MAAAA,SAAS,EAAET,IAAK;MAACU,IAAI,EAAEC,SAAI,CAACC,KAAAA;KAAM,CAAG,eACzEL,cAAA,CAAA,KAAA,EAAA;AAAKN,MAAAA,SAAS,EAAC,sBAAsB;AAAAC,MAAAA,QAAA,EAAEA,QAAAA;AAAQ,KAAM,CACvD,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import StatusIcon from '../statusIcon/StatusIcon.mjs';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { Sentiment } from '../common/propsValues/sentiment.mjs';
|
|
5
|
+
import { Size } from '../common/propsValues/size.mjs';
|
|
6
|
+
|
|
7
|
+
const iconTypes = new Set([Sentiment.NEGATIVE, Sentiment.ERROR, Sentiment.POSITIVE, Sentiment.SUCCESS, Sentiment.WARNING]);
|
|
8
|
+
function InlineAlert({
|
|
9
|
+
id,
|
|
10
|
+
type = 'neutral',
|
|
11
|
+
className,
|
|
12
|
+
children
|
|
13
|
+
}) {
|
|
14
|
+
return /*#__PURE__*/jsxs("div", {
|
|
15
|
+
role: "alert",
|
|
16
|
+
id: id,
|
|
17
|
+
className: classNames('alert alert-detach', `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`, className),
|
|
18
|
+
children: [iconTypes.has(type) && /*#__PURE__*/jsx(StatusIcon, {
|
|
19
|
+
sentiment: type,
|
|
20
|
+
size: Size.SMALL
|
|
21
|
+
}), /*#__PURE__*/jsx("div", {
|
|
22
|
+
className: "np-text-body-default",
|
|
23
|
+
children: children
|
|
24
|
+
})]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { InlineAlert as default };
|
|
29
|
+
//# sourceMappingURL=InlineAlert.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineAlert.mjs","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n className?: string;\n children: ReactNode;\n}\n\nconst iconTypes = new Set<NonNullable<InlineAlertProps['type']>>([\n Sentiment.NEGATIVE,\n Sentiment.ERROR,\n Sentiment.POSITIVE,\n Sentiment.SUCCESS,\n Sentiment.WARNING,\n]);\n\nexport default function InlineAlert({\n id,\n type = 'neutral',\n className,\n children,\n}: InlineAlertProps) {\n return (\n <div\n role=\"alert\"\n id={id}\n className={classNames(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n className,\n )}\n >\n {iconTypes.has(type) && <StatusIcon sentiment={type} size={Size.SMALL} />}\n <div className=\"np-text-body-default\">{children}</div>\n </div>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","className","children","_jsxs","role","classNames","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;AAaA,MAAMA,SAAS,GAAG,IAAIC,GAAG,CAAwC,CAC/DC,SAAS,CAACC,QAAQ,EAClBD,SAAS,CAACE,KAAK,EACfF,SAAS,CAACG,QAAQ,EAClBH,SAAS,CAACI,OAAO,EACjBJ,SAAS,CAACK,OAAO,CAClB,CAAC,CAAA;AAEsB,SAAAC,WAAWA,CAAC;EAClCC,EAAE;AACFC,EAAAA,IAAI,GAAG,SAAS;EAChBC,SAAS;AACTC,EAAAA,QAAAA;AACiB,CAAA,EAAA;AACjB,EAAA,oBACEC,IAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,OAAO;AACZL,IAAAA,EAAE,EAAEA,EAAG;IACPE,SAAS,EAAEI,UAAU,CACnB,oBAAoB,EACX,SAAAL,IAAI,KAAKR,SAAS,CAACC,QAAQ,IAAIO,IAAI,KAAKR,SAAS,CAACE,KAAK,GAAG,QAAQ,GAAGM,MAAM,EACpFC,SAAS,CACT;IAAAC,QAAA,EAAA,CAEDZ,SAAS,CAACgB,GAAG,CAACN,IAAI,CAAC,iBAAIO,GAAA,CAACC,UAAU,EAAA;AAACC,MAAAA,SAAS,EAAET,IAAK;MAACU,IAAI,EAAEC,IAAI,CAACC,KAAAA;KAAM,CAAG,eACzEL,GAAA,CAAA,KAAA,EAAA;AAAKN,MAAAA,SAAS,EAAC,sBAAsB;AAAAC,MAAAA,QAAA,EAAEA,QAAAA;AAAQ,KAAM,CACvD,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Input = require('../inputs/Input.js');
|
|
4
|
+
var WithDisplayFormat = require('../withDisplayFormat/WithDisplayFormat.js');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
const InputWithDisplayFormat = props => /*#__PURE__*/jsxRuntime.jsx(WithDisplayFormat, {
|
|
8
|
+
...props,
|
|
9
|
+
render: renderProps => /*#__PURE__*/jsxRuntime.jsx(Input.Input, {
|
|
10
|
+
...renderProps
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
module.exports = InputWithDisplayFormat;
|
|
15
|
+
//# sourceMappingURL=InputWithDisplayFormat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputWithDisplayFormat.js","sources":["../../src/inputWithDisplayFormat/InputWithDisplayFormat.tsx"],"sourcesContent":["import { Input, type InputProps } from '../inputs/Input';\nimport WithDisplayFormat, { type WithDisplayFormatProps } from '../withDisplayFormat';\n\nexport interface InputWithDisplayFormatProps extends Omit<WithDisplayFormatProps, 'render'> {}\n\nconst InputWithDisplayFormat = (props: InputWithDisplayFormatProps) => (\n <WithDisplayFormat<InputProps> {...props} render={(renderProps) => <Input {...renderProps} />} />\n);\n\nexport default InputWithDisplayFormat;\n"],"names":["InputWithDisplayFormat","props","_jsx","WithDisplayFormat","render","renderProps","Input"],"mappings":";;;;;;AAKA,MAAMA,sBAAsB,GAAIC,KAAkC,iBAChEC,cAAA,CAACC,iBAAiB,EAAA;AAAA,EAAA,GAAiBF,KAAK;AAAEG,EAAAA,MAAM,EAAGC,WAAW,iBAAKH,cAAA,CAACI,WAAK,EAAA;IAAA,GAAKD,WAAAA;GAAY,CAAA;AAAI,CAAA;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Input } from '../inputs/Input.mjs';
|
|
2
|
+
import WithDisplayFormat from '../withDisplayFormat/WithDisplayFormat.mjs';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const InputWithDisplayFormat = props => /*#__PURE__*/jsx(WithDisplayFormat, {
|
|
6
|
+
...props,
|
|
7
|
+
render: renderProps => /*#__PURE__*/jsx(Input, {
|
|
8
|
+
...renderProps
|
|
9
|
+
})
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { InputWithDisplayFormat as default };
|
|
13
|
+
//# sourceMappingURL=InputWithDisplayFormat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputWithDisplayFormat.mjs","sources":["../../src/inputWithDisplayFormat/InputWithDisplayFormat.tsx"],"sourcesContent":["import { Input, type InputProps } from '../inputs/Input';\nimport WithDisplayFormat, { type WithDisplayFormatProps } from '../withDisplayFormat';\n\nexport interface InputWithDisplayFormatProps extends Omit<WithDisplayFormatProps, 'render'> {}\n\nconst InputWithDisplayFormat = (props: InputWithDisplayFormatProps) => (\n <WithDisplayFormat<InputProps> {...props} render={(renderProps) => <Input {...renderProps} />} />\n);\n\nexport default InputWithDisplayFormat;\n"],"names":["InputWithDisplayFormat","props","_jsx","WithDisplayFormat","render","renderProps","Input"],"mappings":";;;;AAKA,MAAMA,sBAAsB,GAAIC,KAAkC,iBAChEC,GAAA,CAACC,iBAAiB,EAAA;AAAA,EAAA,GAAiBF,KAAK;AAAEG,EAAAA,MAAM,EAAGC,WAAW,iBAAKH,GAAA,CAACI,KAAK,EAAA;IAAA,GAAKD,WAAAA;GAAY,CAAA;AAAI,CAAA;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classNames = require('classnames');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var _common = require('./_common.js');
|
|
6
|
+
var contexts = require('./contexts.js');
|
|
7
|
+
var InputGroup = require('./InputGroup.js');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
13
|
+
|
|
14
|
+
const Input = /*#__PURE__*/React.forwardRef(function Input({
|
|
15
|
+
size = 'auto',
|
|
16
|
+
shape = 'rectangle',
|
|
17
|
+
className,
|
|
18
|
+
...restProps
|
|
19
|
+
}, reference) {
|
|
20
|
+
const inputAttributes = contexts.useInputAttributes();
|
|
21
|
+
const inputPaddings = InputGroup.useInputPaddings();
|
|
22
|
+
return /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
23
|
+
ref: reference,
|
|
24
|
+
className: classNames__default.default(className, _common.inputClassNameBase({
|
|
25
|
+
size
|
|
26
|
+
}), 'np-input', {
|
|
27
|
+
'np-input--shape-rectangle': shape === 'rectangle',
|
|
28
|
+
'np-input--shape-pill': shape === 'pill'
|
|
29
|
+
})
|
|
30
|
+
// eslint-disable-next-line react/forbid-dom-props
|
|
31
|
+
,
|
|
32
|
+
style: inputPaddings,
|
|
33
|
+
...inputAttributes,
|
|
34
|
+
...restProps
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
exports.Input = Input;
|
|
39
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../src/inputs/Input.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { forwardRef } from 'react';\n\nimport { SizeLarge, SizeMedium, SizeSmall } from '../common';\nimport { Merge } from '../utils';\nimport { inputClassNameBase } from './_common';\nimport { useInputAttributes } from './contexts';\nimport { useInputPaddings } from './InputGroup';\n\nexport interface InputProps\n extends Merge<\n React.ComponentPropsWithRef<'input'>,\n {\n size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;\n shape?: 'rectangle' | 'pill';\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const Input = forwardRef(function Input(\n { size = 'auto', shape = 'rectangle', className, ...restProps }: InputProps,\n reference: React.ForwardedRef<HTMLInputElement | null>,\n) {\n const inputAttributes = useInputAttributes();\n const inputPaddings = useInputPaddings();\n\n return (\n <input\n ref={reference}\n className={classNames(className, inputClassNameBase({ size }), 'np-input', {\n 'np-input--shape-rectangle': shape === 'rectangle',\n 'np-input--shape-pill': shape === 'pill',\n })}\n // eslint-disable-next-line react/forbid-dom-props\n style={inputPaddings}\n {...inputAttributes}\n {...restProps}\n />\n );\n});\n"],"names":["Input","forwardRef","size","shape","className","restProps","reference","inputAttributes","useInputAttributes","inputPaddings","useInputPaddings","_jsx","ref","classNames","inputClassNameBase","style"],"mappings":";;;;;;;;;;;;;MAmBaA,KAAK,gBAAGC,gBAAU,CAAC,SAASD,KAAKA,CAC5C;AAAEE,EAAAA,IAAI,GAAG,MAAM;AAAEC,EAAAA,KAAK,GAAG,WAAW;EAAEC,SAAS;EAAE,GAAGC,SAAAA;AAAuB,CAAA,EAC3EC,SAAsD,EAAA;AAEtD,EAAA,MAAMC,eAAe,GAAGC,2BAAkB,EAAE,CAAA;AAC5C,EAAA,MAAMC,aAAa,GAAGC,2BAAgB,EAAE,CAAA;AAExC,EAAA,oBACEC,cAAA,CAAA,OAAA,EAAA;AACEC,IAAAA,GAAG,EAAEN,SAAU;AACfF,IAAAA,SAAS,EAAES,2BAAU,CAACT,SAAS,EAAEU,0BAAkB,CAAC;AAAEZ,MAAAA,IAAAA;KAAM,CAAC,EAAE,UAAU,EAAE;MACzE,2BAA2B,EAAEC,KAAK,KAAK,WAAW;MAClD,sBAAsB,EAAEA,KAAK,KAAK,MAAA;KACnC,CAAA;AACD;AAAA;AACAY,IAAAA,KAAK,EAAEN,aAAc;AAAA,IAAA,GACjBF,eAAe;IAAA,GACfF,SAAAA;AAAS,GAAC,CACd,CAAA;AAEN,CAAC;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { inputClassNameBase } from './_common.mjs';
|
|
4
|
+
import { useInputAttributes } from './contexts.mjs';
|
|
5
|
+
import { useInputPaddings } from './InputGroup.mjs';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
const Input = /*#__PURE__*/forwardRef(function Input({
|
|
9
|
+
size = 'auto',
|
|
10
|
+
shape = 'rectangle',
|
|
11
|
+
className,
|
|
12
|
+
...restProps
|
|
13
|
+
}, reference) {
|
|
14
|
+
const inputAttributes = useInputAttributes();
|
|
15
|
+
const inputPaddings = useInputPaddings();
|
|
16
|
+
return /*#__PURE__*/jsx("input", {
|
|
17
|
+
ref: reference,
|
|
18
|
+
className: classNames(className, inputClassNameBase({
|
|
19
|
+
size
|
|
20
|
+
}), 'np-input', {
|
|
21
|
+
'np-input--shape-rectangle': shape === 'rectangle',
|
|
22
|
+
'np-input--shape-pill': shape === 'pill'
|
|
23
|
+
})
|
|
24
|
+
// eslint-disable-next-line react/forbid-dom-props
|
|
25
|
+
,
|
|
26
|
+
style: inputPaddings,
|
|
27
|
+
...inputAttributes,
|
|
28
|
+
...restProps
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export { Input };
|
|
33
|
+
//# sourceMappingURL=Input.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.mjs","sources":["../../src/inputs/Input.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { forwardRef } from 'react';\n\nimport { SizeLarge, SizeMedium, SizeSmall } from '../common';\nimport { Merge } from '../utils';\nimport { inputClassNameBase } from './_common';\nimport { useInputAttributes } from './contexts';\nimport { useInputPaddings } from './InputGroup';\n\nexport interface InputProps\n extends Merge<\n React.ComponentPropsWithRef<'input'>,\n {\n size?: 'auto' | SizeSmall | SizeMedium | SizeLarge;\n shape?: 'rectangle' | 'pill';\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const Input = forwardRef(function Input(\n { size = 'auto', shape = 'rectangle', className, ...restProps }: InputProps,\n reference: React.ForwardedRef<HTMLInputElement | null>,\n) {\n const inputAttributes = useInputAttributes();\n const inputPaddings = useInputPaddings();\n\n return (\n <input\n ref={reference}\n className={classNames(className, inputClassNameBase({ size }), 'np-input', {\n 'np-input--shape-rectangle': shape === 'rectangle',\n 'np-input--shape-pill': shape === 'pill',\n })}\n // eslint-disable-next-line react/forbid-dom-props\n style={inputPaddings}\n {...inputAttributes}\n {...restProps}\n />\n );\n});\n"],"names":["Input","forwardRef","size","shape","className","restProps","reference","inputAttributes","useInputAttributes","inputPaddings","useInputPaddings","_jsx","ref","classNames","inputClassNameBase","style"],"mappings":";;;;;;;MAmBaA,KAAK,gBAAGC,UAAU,CAAC,SAASD,KAAKA,CAC5C;AAAEE,EAAAA,IAAI,GAAG,MAAM;AAAEC,EAAAA,KAAK,GAAG,WAAW;EAAEC,SAAS;EAAE,GAAGC,SAAAA;AAAuB,CAAA,EAC3EC,SAAsD,EAAA;AAEtD,EAAA,MAAMC,eAAe,GAAGC,kBAAkB,EAAE,CAAA;AAC5C,EAAA,MAAMC,aAAa,GAAGC,gBAAgB,EAAE,CAAA;AAExC,EAAA,oBACEC,GAAA,CAAA,OAAA,EAAA;AACEC,IAAAA,GAAG,EAAEN,SAAU;AACfF,IAAAA,SAAS,EAAES,UAAU,CAACT,SAAS,EAAEU,kBAAkB,CAAC;AAAEZ,MAAAA,IAAAA;KAAM,CAAC,EAAE,UAAU,EAAE;MACzE,2BAA2B,EAAEC,KAAK,KAAK,WAAW;MAClD,sBAAsB,EAAEA,KAAK,KAAK,MAAA;KACnC,CAAA;AACD;AAAA;AACAY,IAAAA,KAAK,EAAEN,aAAc;AAAA,IAAA,GACjBF,eAAe;IAAA,GACfF,SAAAA;AAAS,GAAC,CACd,CAAA;AAEN,CAAC;;;;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classNames = require('classnames');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var useResizeObserver = require('../common/hooks/useResizeObserver.js');
|
|
6
|
+
var cssValueWithUnit = require('../utilities/cssValueWithUnit.js');
|
|
7
|
+
var contexts = require('./contexts.js');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var classNames__default = /*#__PURE__*/_interopDefault(classNames);
|
|
13
|
+
|
|
14
|
+
const InputPaddingStartContext = /*#__PURE__*/React.createContext([undefined, () => {}]);
|
|
15
|
+
const InputPaddingEndContext = /*#__PURE__*/React.createContext([undefined, () => {}]);
|
|
16
|
+
function useInputPaddings() {
|
|
17
|
+
const [paddingStart] = React.useContext(InputPaddingStartContext);
|
|
18
|
+
const [paddingEnd] = React.useContext(InputPaddingEndContext);
|
|
19
|
+
return {
|
|
20
|
+
paddingInlineStart: paddingStart,
|
|
21
|
+
paddingInlineEnd: paddingEnd
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function inputPaddingInitialState({
|
|
25
|
+
initialContentWidth,
|
|
26
|
+
padding = inputAddonDefaultPadding
|
|
27
|
+
} = {}) {
|
|
28
|
+
return () => initialContentWidth != null ? `calc(${cssValueWithUnit.cssValueWithUnit(initialContentWidth)} + ${cssValueWithUnit.cssValueWithUnit(inputAddonContentWidthAddendByPadding[padding])})` : undefined;
|
|
29
|
+
}
|
|
30
|
+
function InputGroup({
|
|
31
|
+
addonStart,
|
|
32
|
+
addonEnd,
|
|
33
|
+
disabled,
|
|
34
|
+
className,
|
|
35
|
+
children
|
|
36
|
+
}) {
|
|
37
|
+
const inputAttributes = contexts.useInputAttributes({
|
|
38
|
+
nonLabelable: true
|
|
39
|
+
});
|
|
40
|
+
const [paddingStart, setPaddingStart] = React.useState(inputPaddingInitialState(addonStart));
|
|
41
|
+
const [paddingEnd, setPaddingEnd] = React.useState(inputPaddingInitialState(addonEnd));
|
|
42
|
+
return (
|
|
43
|
+
/*#__PURE__*/
|
|
44
|
+
/* Prevent nested controls from being labeled redundantly */
|
|
45
|
+
jsxRuntime.jsx(contexts.FieldLabelIdContextProvider, {
|
|
46
|
+
value: undefined,
|
|
47
|
+
children: /*#__PURE__*/jsxRuntime.jsx(contexts.InputIdContextProvider, {
|
|
48
|
+
value: undefined,
|
|
49
|
+
children: /*#__PURE__*/jsxRuntime.jsx(contexts.InputDescribedByProvider, {
|
|
50
|
+
value: undefined,
|
|
51
|
+
children: /*#__PURE__*/jsxRuntime.jsx(contexts.InputInvalidProvider, {
|
|
52
|
+
value: undefined,
|
|
53
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputPaddingStartContext.Provider, {
|
|
54
|
+
value: React.useMemo(() => [paddingStart, setPaddingStart], [paddingStart]),
|
|
55
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputPaddingEndContext.Provider, {
|
|
56
|
+
value: React.useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd]),
|
|
57
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("fieldset", {
|
|
58
|
+
...inputAttributes,
|
|
59
|
+
disabled: disabled,
|
|
60
|
+
className: classNames__default.default(className, 'np-input-group'),
|
|
61
|
+
children: [addonStart != null ? /*#__PURE__*/jsxRuntime.jsx(InputAddon, {
|
|
62
|
+
placement: "start",
|
|
63
|
+
...addonStart
|
|
64
|
+
}) : null, children, addonEnd != null ? /*#__PURE__*/jsxRuntime.jsx(InputAddon, {
|
|
65
|
+
placement: "end",
|
|
66
|
+
...addonEnd
|
|
67
|
+
}) : null]
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
})
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
const inputAddonContentWidthAddendByPadding = {
|
|
78
|
+
none: 0,
|
|
79
|
+
sm: '1rem',
|
|
80
|
+
md: '1.5rem'
|
|
81
|
+
};
|
|
82
|
+
const inputAddonDefaultPadding = 'md';
|
|
83
|
+
function InputAddon({
|
|
84
|
+
placement,
|
|
85
|
+
content,
|
|
86
|
+
interactive,
|
|
87
|
+
padding = inputAddonDefaultPadding
|
|
88
|
+
}) {
|
|
89
|
+
const [, setInputPadding] = React.useContext(placement === 'start' ? InputPaddingStartContext : InputPaddingEndContext);
|
|
90
|
+
const ref = React.useRef(null);
|
|
91
|
+
useResizeObserver.useResizeObserver(ref, entry => {
|
|
92
|
+
// TODO: Remove fallback once most browsers support `borderBoxSize`
|
|
93
|
+
const inlineSize = entry.borderBoxSize?.[0]?.inlineSize;
|
|
94
|
+
if (inlineSize != null) {
|
|
95
|
+
setInputPadding(inlineSize);
|
|
96
|
+
} else {
|
|
97
|
+
const targetStyle = getComputedStyle(entry.target);
|
|
98
|
+
setInputPadding(entry.contentRect.width + Number.parseFloat(targetStyle.paddingInlineStart) + Number.parseFloat(targetStyle.paddingInlineEnd));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
102
|
+
ref: ref,
|
|
103
|
+
className: classNames__default.default('np-input-addon', {
|
|
104
|
+
'np-input-addon--placement-start': placement === 'start',
|
|
105
|
+
'np-input-addon--placement-end': placement === 'end'
|
|
106
|
+
}, interactive && 'np-input-addon--interactive', {
|
|
107
|
+
'np-input-addon--padding-sm': padding === 'sm',
|
|
108
|
+
'np-input-addon--padding-md': padding === 'md'
|
|
109
|
+
}),
|
|
110
|
+
children: content
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
exports.InputGroup = InputGroup;
|
|
115
|
+
exports.useInputPaddings = useInputPaddings;
|
|
116
|
+
//# sourceMappingURL=InputGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputGroup.js","sources":["../../src/inputs/InputGroup.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { createContext, useContext, useMemo, useRef, useState } from 'react';\n\nimport { useResizeObserver } from '../common/hooks/useResizeObserver';\nimport { cssValueWithUnit } from '../utilities/cssValueWithUnit';\nimport {\n FieldLabelIdContextProvider,\n InputDescribedByProvider,\n InputIdContextProvider,\n InputInvalidProvider,\n useInputAttributes,\n} from './contexts';\n\ntype InputPaddingContextType = [\n number | string | undefined,\n React.Dispatch<React.SetStateAction<number | string | undefined>>,\n];\n\nconst InputPaddingStartContext = createContext<InputPaddingContextType>([undefined, () => {}]);\n\nconst InputPaddingEndContext = createContext<InputPaddingContextType>([undefined, () => {}]);\n\nexport function useInputPaddings() {\n const [paddingStart] = useContext(InputPaddingStartContext);\n const [paddingEnd] = useContext(InputPaddingEndContext);\n\n return {\n paddingInlineStart: paddingStart,\n paddingInlineEnd: paddingEnd,\n } satisfies React.CSSProperties;\n}\n\ninterface InputGroupAddon {\n content: React.ReactNode;\n initialContentWidth?: number | string;\n interactive?: boolean;\n padding?: 'none' | 'sm' | 'md';\n}\n\nexport interface InputGroupProps {\n addonStart?: InputGroupAddon;\n addonEnd?: InputGroupAddon;\n disabled?: boolean;\n className?: string;\n children?: React.ReactNode;\n}\n\nfunction inputPaddingInitialState({\n initialContentWidth,\n padding = inputAddonDefaultPadding,\n}: Pick<\n InputGroupAddon,\n 'initialContentWidth' | 'padding'\n> = {}): () => InputPaddingContextType[0] {\n return () =>\n initialContentWidth != null\n ? `calc(${cssValueWithUnit(initialContentWidth)} + ${cssValueWithUnit(\n inputAddonContentWidthAddendByPadding[padding],\n )})`\n : undefined;\n}\n\nexport function InputGroup({\n addonStart,\n addonEnd,\n disabled,\n className,\n children,\n}: InputGroupProps) {\n const inputAttributes = useInputAttributes({ nonLabelable: true });\n\n const [paddingStart, setPaddingStart] = useState(inputPaddingInitialState(addonStart));\n const [paddingEnd, setPaddingEnd] = useState(inputPaddingInitialState(addonEnd));\n\n return (\n /* Prevent nested controls from being labeled redundantly */\n <FieldLabelIdContextProvider value={undefined}>\n <InputIdContextProvider value={undefined}>\n <InputDescribedByProvider value={undefined}>\n <InputInvalidProvider value={undefined}>\n <InputPaddingStartContext.Provider\n value={useMemo(() => [paddingStart, setPaddingStart], [paddingStart])}\n >\n <InputPaddingEndContext.Provider\n value={useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd])}\n >\n <fieldset\n {...inputAttributes}\n disabled={disabled}\n className={classNames(className, 'np-input-group')}\n >\n {addonStart != null ? <InputAddon placement=\"start\" {...addonStart} /> : null}\n {children}\n {addonEnd != null ? <InputAddon placement=\"end\" {...addonEnd} /> : null}\n </fieldset>\n </InputPaddingEndContext.Provider>\n </InputPaddingStartContext.Provider>\n </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelIdContextProvider>\n );\n}\n\ninterface InputAddonProps extends Omit<InputGroupAddon, 'initialContentWidth'> {\n placement: 'start' | 'end';\n}\n\nconst inputAddonContentWidthAddendByPadding = {\n none: 0,\n sm: '1rem',\n md: '1.5rem',\n} satisfies {\n [key in NonNullable<InputAddonProps['padding']>]: InputPaddingContextType[0];\n};\n\nconst inputAddonDefaultPadding = 'md' satisfies InputAddonProps['padding'];\n\nfunction InputAddon({\n placement,\n content,\n interactive,\n padding = inputAddonDefaultPadding,\n}: InputAddonProps) {\n const [, setInputPadding] = useContext(\n placement === 'start' ? InputPaddingStartContext : InputPaddingEndContext,\n );\n\n const ref = useRef<HTMLSpanElement>(null);\n useResizeObserver(ref, (entry) => {\n // TODO: Remove fallback once most browsers support `borderBoxSize`\n const inlineSize = entry.borderBoxSize?.[0]?.inlineSize;\n if (inlineSize != null) {\n setInputPadding(inlineSize);\n } else {\n const targetStyle = getComputedStyle(entry.target);\n setInputPadding(\n entry.contentRect.width +\n Number.parseFloat(targetStyle.paddingInlineStart) +\n Number.parseFloat(targetStyle.paddingInlineEnd),\n );\n }\n });\n\n return (\n <span\n ref={ref}\n className={classNames(\n 'np-input-addon',\n {\n 'np-input-addon--placement-start': placement === 'start',\n 'np-input-addon--placement-end': placement === 'end',\n },\n interactive && 'np-input-addon--interactive',\n {\n 'np-input-addon--padding-sm': padding === 'sm',\n 'np-input-addon--padding-md': padding === 'md',\n },\n )}\n >\n {content}\n </span>\n );\n}\n"],"names":["InputPaddingStartContext","createContext","undefined","InputPaddingEndContext","useInputPaddings","paddingStart","useContext","paddingEnd","paddingInlineStart","paddingInlineEnd","inputPaddingInitialState","initialContentWidth","padding","inputAddonDefaultPadding","cssValueWithUnit","inputAddonContentWidthAddendByPadding","InputGroup","addonStart","addonEnd","disabled","className","children","inputAttributes","useInputAttributes","nonLabelable","setPaddingStart","useState","setPaddingEnd","_jsx","FieldLabelIdContextProvider","value","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider","Provider","useMemo","_jsxs","classNames","InputAddon","placement","none","sm","md","content","interactive","setInputPadding","ref","useRef","useResizeObserver","entry","inlineSize","borderBoxSize","targetStyle","getComputedStyle","target","contentRect","width","Number","parseFloat"],"mappings":";;;;;;;;;;;;;AAkBA,MAAMA,wBAAwB,gBAAGC,mBAAa,CAA0B,CAACC,SAAS,EAAE,MAAK,EAAG,CAAC,CAAC,CAAA;AAE9F,MAAMC,sBAAsB,gBAAGF,mBAAa,CAA0B,CAACC,SAAS,EAAE,MAAK,EAAG,CAAC,CAAC,CAAA;SAE5EE,gBAAgBA,GAAA;AAC9B,EAAA,MAAM,CAACC,YAAY,CAAC,GAAGC,gBAAU,CAACN,wBAAwB,CAAC,CAAA;AAC3D,EAAA,MAAM,CAACO,UAAU,CAAC,GAAGD,gBAAU,CAACH,sBAAsB,CAAC,CAAA;EAEvD,OAAO;AACLK,IAAAA,kBAAkB,EAAEH,YAAY;AAChCI,IAAAA,gBAAgB,EAAEF,UAAAA;GACW,CAAA;AACjC,CAAA;AAiBA,SAASG,wBAAwBA,CAAC;EAChCC,mBAAmB;AACnBC,EAAAA,OAAO,GAAGC,wBAAAA;AAAwB,CAAA,GAIhC,EAAE,EAAA;EACJ,OAAO,MACLF,mBAAmB,IAAI,IAAI,GACvB,CAAQG,KAAAA,EAAAA,iCAAgB,CAACH,mBAAmB,CAAC,MAAMG,iCAAgB,CACjEC,qCAAqC,CAACH,OAAO,CAAC,CAC5C,CAAA,CAAA,CAAA,GACJV,SAAS,CAAA;AACjB,CAAA;AAEgB,SAAAc,UAAUA,CAAC;EACzBC,UAAU;EACVC,QAAQ;EACRC,QAAQ;EACRC,SAAS;AACTC,EAAAA,QAAAA;AACgB,CAAA,EAAA;EAChB,MAAMC,eAAe,GAAGC,2BAAkB,CAAC;AAAEC,IAAAA,YAAY,EAAE,IAAA;AAAM,GAAA,CAAC,CAAA;AAElE,EAAA,MAAM,CAACnB,YAAY,EAAEoB,eAAe,CAAC,GAAGC,cAAQ,CAAChB,wBAAwB,CAACO,UAAU,CAAC,CAAC,CAAA;AACtF,EAAA,MAAM,CAACV,UAAU,EAAEoB,aAAa,CAAC,GAAGD,cAAQ,CAAChB,wBAAwB,CAACQ,QAAQ,CAAC,CAAC,CAAA;AAEhF,EAAA;AAAA;AACE;AACAU,IAAAA,cAAA,CAACC,oCAA2B,EAAA;AAACC,MAAAA,KAAK,EAAE5B,SAAU;MAAAmB,QAAA,eAC5CO,cAAA,CAACG,+BAAsB,EAAA;AAACD,QAAAA,KAAK,EAAE5B,SAAU;QAAAmB,QAAA,eACvCO,cAAA,CAACI,iCAAwB,EAAA;AAACF,UAAAA,KAAK,EAAE5B,SAAU;UAAAmB,QAAA,eACzCO,cAAA,CAACK,6BAAoB,EAAA;AAACH,YAAAA,KAAK,EAAE5B,SAAU;AAAAmB,YAAAA,QAAA,eACrCO,cAAA,CAAC5B,wBAAwB,CAACkC,QAAQ,EAAA;AAChCJ,cAAAA,KAAK,EAAEK,aAAO,CAAC,MAAM,CAAC9B,YAAY,EAAEoB,eAAe,CAAC,EAAE,CAACpB,YAAY,CAAC,CAAE;AAAAgB,cAAAA,QAAA,eAEtEO,cAAA,CAACzB,sBAAsB,CAAC+B,QAAQ,EAAA;AAC9BJ,gBAAAA,KAAK,EAAEK,aAAO,CAAC,MAAM,CAAC5B,UAAU,EAAEoB,aAAa,CAAC,EAAE,CAACpB,UAAU,CAAC,CAAE;AAAAc,gBAAAA,QAAA,eAEhEe,eAAA,CAAA,UAAA,EAAA;AAAA,kBAAA,GACMd,eAAe;AACnBH,kBAAAA,QAAQ,EAAEA,QAAS;AACnBC,kBAAAA,SAAS,EAAEiB,2BAAU,CAACjB,SAAS,EAAE,gBAAgB,CAAE;AAAAC,kBAAAA,QAAA,GAElDJ,UAAU,IAAI,IAAI,gBAAGW,cAAA,CAACU,UAAU,EAAA;AAACC,oBAAAA,SAAS,EAAC,OAAO;oBAAA,GAAKtB,UAAAA;AAAU,oBAAI,GAAG,IAAI,EAC5EI,QAAQ,EACRH,QAAQ,IAAI,IAAI,gBAAGU,cAAA,CAACU,UAAU,EAAA;AAACC,oBAAAA,SAAS,EAAC,KAAK;oBAAA,GAAKrB,QAAAA;oBAAY,GAAG,IAAI,CAAA;iBAC/D,CAAA;eACqB,CAAA;aACA,CAAA;WACf,CAAA;SACE,CAAA;OACJ,CAAA;KACG,CAAA;AAAC,IAAA;AAElC,CAAA;AAMA,MAAMH,qCAAqC,GAAG;AAC5CyB,EAAAA,IAAI,EAAE,CAAC;AACPC,EAAAA,EAAE,EAAE,MAAM;AACVC,EAAAA,EAAE,EAAE,QAAA;CAGL,CAAA;AAED,MAAM7B,wBAAwB,GAAG,IAAyC,CAAA;AAE1E,SAASyB,UAAUA,CAAC;EAClBC,SAAS;EACTI,OAAO;EACPC,WAAW;AACXhC,EAAAA,OAAO,GAAGC,wBAAAA;AACM,CAAA,EAAA;AAChB,EAAA,MAAM,GAAGgC,eAAe,CAAC,GAAGvC,gBAAU,CACpCiC,SAAS,KAAK,OAAO,GAAGvC,wBAAwB,GAAGG,sBAAsB,CAC1E,CAAA;AAED,EAAA,MAAM2C,GAAG,GAAGC,YAAM,CAAkB,IAAI,CAAC,CAAA;AACzCC,EAAAA,mCAAiB,CAACF,GAAG,EAAGG,KAAK,IAAI;AAC/B;IACA,MAAMC,UAAU,GAAGD,KAAK,CAACE,aAAa,GAAG,CAAC,CAAC,EAAED,UAAU,CAAA;IACvD,IAAIA,UAAU,IAAI,IAAI,EAAE;MACtBL,eAAe,CAACK,UAAU,CAAC,CAAA;AAC7B,KAAC,MAAM;AACL,MAAA,MAAME,WAAW,GAAGC,gBAAgB,CAACJ,KAAK,CAACK,MAAM,CAAC,CAAA;MAClDT,eAAe,CACbI,KAAK,CAACM,WAAW,CAACC,KAAK,GACrBC,MAAM,CAACC,UAAU,CAACN,WAAW,CAAC5C,kBAAkB,CAAC,GACjDiD,MAAM,CAACC,UAAU,CAACN,WAAW,CAAC3C,gBAAgB,CAAC,CAClD,CAAA;AACH,KAAA;AACF,GAAC,CAAC,CAAA;AAEF,EAAA,oBACEmB,cAAA,CAAA,MAAA,EAAA;AACEkB,IAAAA,GAAG,EAAEA,GAAI;AACT1B,IAAAA,SAAS,EAAEiB,2BAAU,CACnB,gBAAgB,EAChB;MACE,iCAAiC,EAAEE,SAAS,KAAK,OAAO;MACxD,+BAA+B,EAAEA,SAAS,KAAK,KAAA;KAChD,EACDK,WAAW,IAAI,6BAA6B,EAC5C;MACE,4BAA4B,EAAEhC,OAAO,KAAK,IAAI;MAC9C,4BAA4B,EAAEA,OAAO,KAAK,IAAA;AAC3C,KAAA,CACD;AAAAS,IAAAA,QAAA,EAEDsB,OAAAA;AAAO,GACJ,CAAC,CAAA;AAEX;;;;;"}
|