@transferwise/components 0.0.0-experimental-010a0a4 → 0.0.0-experimental-666b489
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.map +1 -1
- package/build/accordion/Accordion.mjs.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatar/avatarTypes.js.map +1 -1
- package/build/avatar/avatarTypes.mjs.map +1 -1
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/avatarView/NotificationDot.js.map +1 -1
- package/build/avatarView/NotificationDot.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/badge/BadgeAssets.js.map +1 -1
- package/build/badge/BadgeAssets.mjs.map +1 -1
- package/build/body/Body.js.map +1 -1
- package/build/body/Body.mjs.map +1 -1
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs.map +1 -1
- package/build/button/Button.resolver.js.map +1 -1
- package/build/button/Button.resolver.mjs.map +1 -1
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs +1 -1
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/button/classMap.js.map +1 -1
- package/build/button/classMap.mjs.map +1 -1
- package/build/button/legacyUtils/legacyUtils.js.map +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs.map +1 -1
- package/build/carousel/Carousel.js.map +1 -1
- package/build/carousel/Carousel.mjs.map +1 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chevron/Chevron.mjs.map +1 -1
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chip.mjs.map +1 -1
- package/build/chips/Chips.js.map +1 -1
- package/build/chips/Chips.messages.js.map +1 -1
- package/build/chips/Chips.messages.mjs.map +1 -1
- package/build/chips/Chips.mjs.map +1 -1
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/DOMOperations/DOMOperations.js.map +1 -1
- package/build/common/DOMOperations/DOMOperations.mjs.map +1 -1
- package/build/common/Option/Option.js.map +1 -1
- package/build/common/Option/Option.mjs.map +1 -1
- package/build/common/RadioButton/RadioButton.js.map +1 -1
- package/build/common/RadioButton/RadioButton.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/card/Card.js.map +1 -1
- package/build/common/card/Card.mjs.map +1 -1
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.js.map +1 -1
- package/build/common/closeButton/CloseButton.messages.js.map +1 -1
- package/build/common/closeButton/CloseButton.messages.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.mjs.map +1 -1
- package/build/common/colors.js.map +1 -1
- package/build/common/colors.mjs.map +1 -1
- package/build/common/dateUtils/getDateView/getDateView.js.map +1 -1
- package/build/common/dateUtils/getDateView/getDateView.mjs.map +1 -1
- package/build/common/dateUtils/getDayNames/getDayNames.js.map +1 -1
- package/build/common/dateUtils/getDayNames/getDayNames.mjs.map +1 -1
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.js.map +1 -1
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.mjs.map +1 -1
- package/build/common/dateUtils/getMonthNames/getMonthNames.js.map +1 -1
- package/build/common/dateUtils/getMonthNames/getMonthNames.mjs.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -1
- package/build/common/dateUtils/isWithinRange/isWithinRange.js.map +1 -1
- package/build/common/dateUtils/isWithinRange/isWithinRange.mjs.map +1 -1
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js.map +1 -1
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs.map +1 -1
- package/build/common/deviceDetection/deviceDetection.js.map +1 -1
- package/build/common/deviceDetection/deviceDetection.mjs.map +1 -1
- package/build/common/direction.js.map +1 -1
- package/build/common/direction.mjs.map +1 -1
- package/build/common/domHelpers/documentIosClick.js.map +1 -1
- package/build/common/domHelpers/documentIosClick.mjs.map +1 -1
- package/build/common/fileType.js.map +1 -1
- package/build/common/fileType.mjs.map +1 -1
- package/build/common/flowHeader/FlowHeader.js.map +1 -1
- package/build/common/flowHeader/FlowHeader.mjs.map +1 -1
- package/build/common/focusBoundary/FocusBoundary.js.map +1 -1
- package/build/common/focusBoundary/FocusBoundary.mjs.map +1 -1
- package/build/common/historyNavigator/historyNavigator.js.map +1 -1
- package/build/common/historyNavigator/historyNavigator.mjs.map +1 -1
- package/build/common/hooks/useConditionalListener/useConditionalListener.js.map +1 -1
- package/build/common/hooks/useConditionalListener/useConditionalListener.mjs.map +1 -1
- package/build/common/hooks/useDirection/useDirection.js.map +1 -1
- package/build/common/hooks/useDirection/useDirection.mjs.map +1 -1
- package/build/common/hooks/useEffectEvent.js.map +1 -1
- package/build/common/hooks/useEffectEvent.mjs.map +1 -1
- package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
- package/build/common/hooks/useLayout/useLayout.js.map +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs.map +1 -1
- package/build/common/hooks/useMedia.js.map +1 -1
- package/build/common/hooks/useMedia.mjs.map +1 -1
- package/build/common/hooks/useResizeObserver.js.map +1 -1
- package/build/common/hooks/useResizeObserver.mjs.map +1 -1
- package/build/common/hooks/useScreenSize.js.map +1 -1
- package/build/common/hooks/useScreenSize.mjs.map +1 -1
- package/build/common/hooks/useVirtualKeyboard.js.map +1 -1
- package/build/common/hooks/useVirtualKeyboard.mjs.map +1 -1
- package/build/common/initials.js.map +1 -1
- package/build/common/initials.mjs.map +1 -1
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs.map +1 -1
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.js.map +1 -1
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.mjs.map +1 -1
- package/build/common/preventScroll/PreventScroll.js.map +1 -1
- package/build/common/preventScroll/PreventScroll.mjs.map +1 -1
- package/build/common/propsValues/breakpoint.js.map +1 -1
- package/build/common/propsValues/breakpoint.mjs.map +1 -1
- package/build/common/propsValues/control.js.map +1 -1
- package/build/common/propsValues/control.mjs.map +1 -1
- package/build/common/propsValues/dateMode.js.map +1 -1
- package/build/common/propsValues/dateMode.mjs.map +1 -1
- package/build/common/propsValues/layouts.js.map +1 -1
- package/build/common/propsValues/layouts.mjs.map +1 -1
- package/build/common/propsValues/markdownNodeType.js.map +1 -1
- package/build/common/propsValues/markdownNodeType.mjs.map +1 -1
- package/build/common/propsValues/monthFormat.js.map +1 -1
- package/build/common/propsValues/monthFormat.mjs.map +1 -1
- package/build/common/propsValues/position.js.map +1 -1
- package/build/common/propsValues/position.mjs.map +1 -1
- package/build/common/propsValues/profileType.js.map +1 -1
- package/build/common/propsValues/profileType.mjs.map +1 -1
- package/build/common/propsValues/scroll.js.map +1 -1
- package/build/common/propsValues/scroll.mjs.map +1 -1
- package/build/common/propsValues/sentiment.js.map +1 -1
- package/build/common/propsValues/sentiment.mjs.map +1 -1
- package/build/common/propsValues/size.js.map +1 -1
- package/build/common/propsValues/size.mjs.map +1 -1
- package/build/common/propsValues/status.js.map +1 -1
- package/build/common/propsValues/status.mjs.map +1 -1
- package/build/common/propsValues/type.js.map +1 -1
- package/build/common/propsValues/type.mjs.map +1 -1
- package/build/common/propsValues/typography.js.map +1 -1
- package/build/common/propsValues/typography.mjs.map +1 -1
- package/build/common/propsValues/variant.js.map +1 -1
- package/build/common/propsValues/variant.mjs.map +1 -1
- package/build/common/propsValues/width.js.map +1 -1
- package/build/common/propsValues/width.mjs.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js.map +1 -1
- package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs.map +1 -1
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js.map +1 -1
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs.map +1 -1
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js.map +1 -1
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs.map +1 -1
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js.map +1 -1
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs.map +1 -1
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js.map +1 -1
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs.map +1 -1
- package/build/common/theme.js.map +1 -1
- package/build/common/theme.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.messages.js.map +1 -1
- package/build/dateInput/DateInput.messages.mjs.map +1 -1
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js.map +1 -1
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +4 -4
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.messages.js.map +1 -1
- package/build/dateLookup/DateLookup.messages.mjs.map +1 -1
- package/build/dateLookup/DateLookup.mjs +4 -4
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -1
- package/build/dateLookup/dayCalendar/DayCalendar.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +3 -3
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +3 -3
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
- package/build/dateLookup/getFocusableTime/getFocusableTime.js.map +1 -1
- package/build/dateLookup/getFocusableTime/getFocusableTime.mjs.map +1 -1
- package/build/dateLookup/getStartOfDay/getStartOfDay.js.map +1 -1
- package/build/dateLookup/getStartOfDay/getStartOfDay.mjs.map +1 -1
- package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -1
- package/build/dateLookup/monthCalendar/MonthCalendar.mjs.map +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -1
- package/build/dateLookup/tableLink/TableLink.js.map +1 -1
- package/build/dateLookup/tableLink/TableLink.mjs.map +1 -1
- package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -1
- package/build/dateLookup/yearCalendar/YearCalendar.mjs.map +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -1
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/dimmer/Dimmer.js +67 -41
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs +69 -43
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -1
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs.map +1 -1
- package/build/divider/Divider.js.map +1 -1
- package/build/divider/Divider.mjs.map +1 -1
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/dropFade/DropFade.js.map +1 -1
- package/build/dropFade/DropFade.mjs.map +1 -1
- package/build/emphasis/Emphasis.js.map +1 -1
- package/build/emphasis/Emphasis.mjs.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -1
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.messages.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.messages.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/commonMessages/Button.messages.js.map +1 -1
- package/build/i18n/commonMessages/Button.messages.mjs.map +1 -1
- package/build/i18n/index.js.map +1 -1
- package/build/i18n/index.mjs.map +1 -1
- package/build/iconButton/IconButton.js.map +1 -1
- package/build/iconButton/IconButton.mjs.map +1 -1
- package/build/image/Image.js.map +1 -1
- package/build/image/Image.mjs.map +1 -1
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.messages.js.map +1 -1
- package/build/info/Info.messages.mjs.map +1 -1
- package/build/info/Info.mjs.map +1 -1
- package/build/info/infoPresentations.js.map +1 -1
- package/build/info/infoPresentations.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js.map +1 -1
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.mjs.map +1 -1
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/InputGroup.js +16 -20
- package/build/inputs/InputGroup.js.map +1 -1
- package/build/inputs/InputGroup.mjs +17 -21
- package/build/inputs/InputGroup.mjs.map +1 -1
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/inputs/SelectInput.js +6 -1
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.messages.js.map +1 -1
- package/build/inputs/SelectInput.messages.mjs.map +1 -1
- package/build/inputs/SelectInput.mjs +6 -1
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/TextArea.js.map +1 -1
- package/build/inputs/TextArea.mjs.map +1 -1
- package/build/inputs/_BottomSheet.js +8 -1
- package/build/inputs/_BottomSheet.js.map +1 -1
- package/build/inputs/_BottomSheet.mjs +9 -2
- package/build/inputs/_BottomSheet.mjs.map +1 -1
- package/build/inputs/_ButtonInput.js.map +1 -1
- package/build/inputs/_ButtonInput.mjs.map +1 -1
- package/build/inputs/_Popover.js +8 -1
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +10 -3
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/inputs/_common.js.map +1 -1
- package/build/inputs/_common.mjs.map +1 -1
- package/build/inputs/contexts.js.map +1 -1
- package/build/inputs/contexts.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/label/Label.js.map +1 -1
- package/build/label/Label.messages.js.map +1 -1
- package/build/label/Label.messages.mjs.map +1 -1
- package/build/label/Label.mjs.map +1 -1
- package/build/legacylistItem/LegacyListItem.js.map +1 -1
- package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
- package/build/legacylistItem/List.js.map +1 -1
- package/build/legacylistItem/List.mjs.map +1 -1
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.messages.js.map +1 -1
- package/build/link/Link.messages.mjs.map +1 -1
- package/build/link/Link.mjs.map +1 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs.map +1 -1
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs +1 -1
- package/build/logo/Logo.mjs.map +1 -1
- package/build/logo/logo-assets.js.map +1 -1
- package/build/logo/logo-assets.mjs.map +1 -1
- package/build/markdown/Markdown.js +20 -4
- package/build/markdown/Markdown.js.map +1 -1
- package/build/markdown/Markdown.mjs +1 -1
- package/build/markdown/Markdown.mjs.map +1 -1
- package/build/mocks.js.map +1 -1
- package/build/mocks.mjs.map +1 -1
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs.map +1 -1
- package/build/money/Money.js.map +1 -1
- package/build/money/Money.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +2 -2
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.messages.js.map +1 -1
- package/build/moneyInput/MoneyInput.messages.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +2 -2
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/moneyInput/currencyFormatting.js.map +1 -1
- package/build/moneyInput/currencyFormatting.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/phoneNumberInput/data/countries.js.map +1 -1
- package/build/phoneNumberInput/data/countries.mjs.map +1 -1
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.js.map +1 -1
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.mjs.map +1 -1
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.js.map +1 -1
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.mjs.map +1 -1
- package/build/phoneNumberInput/utils/explodeNumberModel/index.js.map +1 -1
- package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByCode/index.js.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByCode/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js.map +1 -1
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs.map +1 -1
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.js.map +1 -1
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js.map +1 -1
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs.map +1 -1
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs +1 -1
- package/build/popover/Popover.mjs.map +1 -1
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.mjs.map +1 -1
- package/build/primitives/PrimitiveButton/PrimitiveButton.js.map +1 -1
- package/build/primitives/PrimitiveButton/PrimitiveButton.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/progress/Progress.js.map +1 -1
- package/build/progress/Progress.mjs.map +1 -1
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCard.mjs.map +1 -1
- package/build/promoCard/PromoCardContext.js.map +1 -1
- package/build/promoCard/PromoCardContext.mjs.map +1 -1
- package/build/promoCard/PromoCardGroup.js +1 -1
- package/build/promoCard/PromoCardGroup.js.map +1 -1
- package/build/promoCard/PromoCardGroup.mjs +1 -1
- package/build/promoCard/PromoCardGroup.mjs.map +1 -1
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +1 -1
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
- package/build/provider/Provider.js.map +1 -1
- package/build/provider/Provider.mjs.map +1 -1
- package/build/provider/direction/DirectionProvider.js.map +1 -1
- package/build/provider/direction/DirectionProvider.mjs.map +1 -1
- package/build/provider/language/LanguageProvider.js.map +1 -1
- package/build/provider/language/LanguageProvider.mjs.map +1 -1
- package/build/provider/overlay/OverlayIdProvider.js.map +1 -1
- package/build/provider/overlay/OverlayIdProvider.mjs +1 -1
- package/build/provider/overlay/OverlayIdProvider.mjs.map +1 -1
- package/build/radio/Radio.js.map +1 -1
- package/build/radio/Radio.mjs.map +1 -1
- package/build/radioGroup/RadioGroup.js.map +1 -1
- package/build/radioGroup/RadioGroup.mjs.map +1 -1
- package/build/radioOption/RadioOption.js.map +1 -1
- package/build/radioOption/RadioOption.mjs.map +1 -1
- package/build/section/Section.js.map +1 -1
- package/build/section/Section.mjs.map +1 -1
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/select/Select.js +14 -22
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.messages.js.map +1 -1
- package/build/select/Select.messages.mjs.map +1 -1
- package/build/select/Select.mjs +14 -22
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs.map +1 -1
- package/build/select/searchBox/SearchBox.js.map +1 -1
- package/build/select/searchBox/SearchBox.mjs.map +1 -1
- package/build/selectOption/SelectOption.js.map +1 -1
- package/build/selectOption/SelectOption.messages.js.map +1 -1
- package/build/selectOption/SelectOption.messages.mjs.map +1 -1
- package/build/selectOption/SelectOption.mjs +1 -1
- package/build/selectOption/SelectOption.mjs.map +1 -1
- package/build/slidingPanel/SlidingPanel.js.map +1 -1
- package/build/slidingPanel/SlidingPanel.mjs.map +1 -1
- package/build/snackbar/Snackbar.js +1 -1
- package/build/snackbar/Snackbar.js.map +1 -1
- package/build/snackbar/Snackbar.mjs +1 -1
- package/build/snackbar/Snackbar.mjs.map +1 -1
- package/build/snackbar/SnackbarContext.js.map +1 -1
- package/build/snackbar/SnackbarContext.mjs.map +1 -1
- package/build/snackbar/SnackbarProvider.js.map +1 -1
- package/build/snackbar/SnackbarProvider.mjs.map +1 -1
- package/build/snackbar/useSnackbar.js.map +1 -1
- package/build/snackbar/useSnackbar.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +1 -1
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/stepper/deviceDetection.js.map +1 -1
- package/build/stepper/deviceDetection.mjs.map +1 -1
- package/build/sticky/Sticky.js.map +1 -1
- package/build/sticky/Sticky.mjs.map +1 -1
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.messages.js.map +1 -1
- package/build/summary/Summary.messages.mjs.map +1 -1
- package/build/summary/Summary.mjs +1 -1
- package/build/summary/Summary.mjs.map +1 -1
- package/build/switch/Switch.js.map +1 -1
- package/build/switch/Switch.mjs.map +1 -1
- package/build/switchOption/SwitchOption.js.map +1 -1
- package/build/switchOption/SwitchOption.mjs.map +1 -1
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.messages.js.map +1 -1
- package/build/table/Table.messages.mjs.map +1 -1
- package/build/table/Table.mjs.map +1 -1
- package/build/table/TableCell.js.map +1 -1
- package/build/table/TableCell.mjs.map +1 -1
- package/build/table/TableHeader.js.map +1 -1
- package/build/table/TableHeader.mjs.map +1 -1
- package/build/table/TableRow.js.map +1 -1
- package/build/table/TableRow.mjs.map +1 -1
- package/build/table/TableStatusText.js.map +1 -1
- package/build/table/TableStatusText.mjs.map +1 -1
- package/build/tabs/Tab.js.map +1 -1
- package/build/tabs/Tab.mjs.map +1 -1
- package/build/tabs/TabList.js.map +1 -1
- package/build/tabs/TabList.mjs.map +1 -1
- package/build/tabs/TabPanel.js.map +1 -1
- package/build/tabs/TabPanel.mjs.map +1 -1
- package/build/tabs/Tabs.js +3 -3
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +4 -4
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tabs/utils.js +1 -1
- package/build/tabs/utils.js.map +1 -1
- package/build/tabs/utils.mjs +1 -1
- package/build/tabs/utils.mjs.map +1 -1
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js.map +1 -1
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.mjs.map +1 -1
- package/build/tile/Tile.js.map +1 -1
- package/build/tile/Tile.mjs.map +1 -1
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +57 -61
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.messages.js.map +1 -1
- package/build/typeahead/Typeahead.messages.mjs.map +1 -1
- package/build/typeahead/Typeahead.mjs +57 -61
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.js +2 -2
- package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +2 -2
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -1
- package/build/typeahead/util/highlight.js.map +1 -1
- package/build/typeahead/util/highlight.mjs.map +1 -1
- package/build/types/actionOption/ActionOption.d.ts.map +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/chevron/Chevron.d.ts.map +1 -1
- package/build/types/chips/Chip.d.ts.map +1 -1
- package/build/types/chips/Chips.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/colors.d.ts.map +1 -1
- package/build/types/common/dateUtils/getDateView/getDateView.d.ts.map +1 -1
- package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts.map +1 -1
- package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts.map +1 -1
- package/build/types/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.d.ts.map +1 -1
- package/build/types/common/fakeEvents.d.ts.map +1 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
- package/build/types/common/historyNavigator/historyNavigator.d.ts.map +1 -1
- package/build/types/common/hooks/useConditionalListener/useConditionalListener.d.ts.map +1 -1
- package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
- package/build/types/common/textFormat/formatWithPattern/formatWithPattern.d.ts.map +1 -1
- package/build/types/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.d.ts.map +1 -1
- package/build/types/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.d.ts.map +1 -1
- package/build/types/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.d.ts.map +1 -1
- package/build/types/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.d.ts.map +1 -1
- package/build/types/common/textFormat/unformatWithPattern/unformatWithPattern.d.ts.map +1 -1
- package/build/types/common/theme.d.ts.map +1 -1
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -1
- package/build/types/decision/Decision.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/dropFade/DropFade.d.ts.map +1 -1
- package/build/types/emphasis/Emphasis.d.ts.map +1 -1
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts.map +1 -1
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/image/Image.d.ts.map +1 -1
- package/build/types/info/Info.d.ts.map +1 -1
- package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/loader/Loader.d.ts.map +1 -1
- package/build/types/markdown/Markdown.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts.map +1 -1
- package/build/types/money/Money.d.ts.map +1 -1
- package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/cleanNumber/cleanNumber.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/explodeNumberModel/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/findCountryByCode/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/findCountryByPrefix/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/isStringNumeric/isStringNumeric.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/setDefaultPrefix/index.d.ts.map +1 -1
- package/build/types/progress/Progress.d.ts.map +1 -1
- package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
- package/build/types/provider/direction/DirectionProvider.d.ts.map +1 -1
- package/build/types/provider/language/LanguageProvider.d.ts.map +1 -1
- package/build/types/provider/overlay/OverlayIdProvider.d.ts.map +1 -1
- package/build/types/section/Section.d.ts.map +1 -1
- package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/stepper/Stepper.d.ts.map +1 -1
- package/build/types/summary/Summary.d.ts.map +1 -1
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
- package/build/types/table/Table.d.ts.map +1 -1
- package/build/types/table/TableCell.d.ts.map +1 -1
- package/build/types/table/TableHeader.d.ts.map +1 -1
- package/build/types/table/TableRow.d.ts.map +1 -1
- package/build/types/table/TableStatusText.d.ts.map +1 -1
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/tabs/utils.d.ts.map +1 -1
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts.map +1 -1
- package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
- package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
- package/build/upload/Upload.js +2 -2
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.messages.js.map +1 -1
- package/build/upload/Upload.messages.mjs.map +1 -1
- package/build/upload/Upload.mjs +2 -2
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/build/upload/utils/asyncFileRead/asyncFileRead.js.map +1 -1
- package/build/upload/utils/asyncFileRead/asyncFileRead.mjs.map +1 -1
- package/build/upload/utils/getFileType/getFileType.js.map +1 -1
- package/build/upload/utils/getFileType/getFileType.mjs.map +1 -1
- package/build/upload/utils/isSizeValid/isSizeValid.js.map +1 -1
- package/build/upload/utils/isSizeValid/isSizeValid.mjs.map +1 -1
- package/build/upload/utils/isTypeValid/isTypeValid.js.map +1 -1
- package/build/upload/utils/isTypeValid/isTypeValid.mjs.map +1 -1
- package/build/upload/utils/postData/postData.js.map +1 -1
- package/build/upload/utils/postData/postData.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.messages.js.map +1 -1
- package/build/uploadInput/UploadInput.messages.mjs.map +1 -1
- package/build/uploadInput/UploadInput.mjs +2 -2
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.messages.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.messages.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
- package/build/uploadInput/uploadButton/defaults.js.map +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.messages.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.messages.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
- package/build/utilities/cssValueWithUnit.js.map +1 -1
- package/build/utilities/cssValueWithUnit.mjs.map +1 -1
- package/build/utilities/logActionRequired.js.map +1 -1
- package/build/utilities/logActionRequired.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/build/withId/withId.js.map +1 -1
- package/build/withId/withId.mjs.map +1 -1
- package/build/withNextPortal/withNextPortal.js +2 -5
- package/build/withNextPortal/withNextPortal.js.map +1 -1
- package/build/withNextPortal/withNextPortal.mjs +2 -5
- package/build/withNextPortal/withNextPortal.mjs.map +1 -1
- package/package.json +55 -55
- package/src/alert/Alert.spec.tsx +2 -4
- package/src/card/Card.story.tsx +4 -2
- package/src/checkbox/Checkbox.story.tsx +3 -2
- package/src/common/bottomSheet/BottomSheet.spec.tsx +3 -6
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +1 -5
- package/src/dateInput/DateInput.story.tsx +2 -2
- package/src/dateInput/DateInput.tests.story.tsx +11 -10
- package/src/dimmer/Dimmer.tsx +72 -44
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +1 -1
- package/src/inputs/SelectInput.tsx +11 -2
- package/src/inputs/_BottomSheet.tsx +9 -3
- package/src/inputs/_Popover.tsx +10 -4
- package/src/markdown/Markdown.tsx +2 -1
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +3 -2
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +3 -2
- package/src/radioGroup/RadioGroup.story.tsx +2 -2
- package/src/typeahead/Typeahead.story.tsx +3 -2
- package/src/upload/Upload.story.tsx +1 -1
- package/src/withNextPortal/withNextPortal.spec.tsx +1 -1
- package/src/withNextPortal/withNextPortal.tsx +1 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineAlert.js","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\nimport Body from '../body';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n iconLabel?: string;\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\n/**\n * Avoid using `<InlineAlert>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field sentiment={..} message={..}>..</Field>\n * ```\n */\nexport default function InlineAlert({\n id,\n type = 'neutral',\n iconLabel,\n className,\n children,\n}: InlineAlertProps) {\n return (\n <Body\n role=\"alert\"\n id={id}\n className={clsx(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n 'd-flex',\n className,\n )}\n >\n {iconTypes.has(type) && (\n <StatusIcon sentiment={type} size={Size.SMALL} iconLabel={iconLabel} />\n )}\n <div>{children}</div>\n </Body>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","iconLabel","className","children","_jsxs","Body","role","clsx","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,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
|
|
1
|
+
{"version":3,"file":"InlineAlert.js","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\nimport Body from '../body';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n iconLabel?: string;\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\n/**\n * Avoid using `<InlineAlert>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field sentiment={..} message={..}>..</Field>\n * ```\n */\nexport default function InlineAlert({\n id,\n type = 'neutral',\n iconLabel,\n className,\n children,\n}: InlineAlertProps) {\n return (\n <Body\n role=\"alert\"\n id={id}\n className={clsx(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n 'd-flex',\n className,\n )}\n >\n {iconTypes.has(type) && (\n <StatusIcon sentiment={type} size={Size.SMALL} iconLabel={iconLabel} />\n )}\n <div>{children}</div>\n </Body>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","iconLabel","className","children","_jsxs","Body","role","clsx","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,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;AAEF;;;;;;;;AAQG;AACW,SAAUC,WAAWA,CAAC;EAClCC,EAAE;AACFC,EAAAA,IAAI,GAAG,SAAS;EAChBC,SAAS;EACTC,SAAS;AACTC,EAAAA;AACiB,CAAA,EAAA;EACjB,oBACEC,eAAA,CAACC,YAAI,EAAA;AACHC,IAAAA,IAAI,EAAC,OAAO;AACZP,IAAAA,EAAE,EAAEA,EAAG;IACPG,SAAS,EAAEK,SAAI,CACb,oBAAoB,EACpB,CAASP,MAAAA,EAAAA,IAAI,KAAKR,mBAAS,CAACC,QAAQ,IAAIO,IAAI,KAAKR,mBAAS,CAACE,KAAK,GAAG,QAAQ,GAAGM,IAAI,CAAA,CAAE,EACpF,QAAQ,EACRE,SAAS,CACT;IAAAC,QAAA,EAAA,CAEDb,SAAS,CAACkB,GAAG,CAACR,IAAI,CAAC,iBAClBS,cAAA,CAACC,kBAAU,EAAA;AAACC,MAAAA,SAAS,EAAEX,IAAK;MAACY,IAAI,EAAEC,SAAI,CAACC,KAAM;AAACb,MAAAA,SAAS,EAAEA;KAAU,CACrE,eACDQ,cAAA,CAAA,KAAA,EAAA;AAAAN,MAAAA,QAAA,EAAMA;AAAQ,KAAM,CACtB;AAAA,GAAM,CAAC;AAEX;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineAlert.mjs","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\nimport Body from '../body';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n iconLabel?: string;\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\n/**\n * Avoid using `<InlineAlert>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field sentiment={..} message={..}>..</Field>\n * ```\n */\nexport default function InlineAlert({\n id,\n type = 'neutral',\n iconLabel,\n className,\n children,\n}: InlineAlertProps) {\n return (\n <Body\n role=\"alert\"\n id={id}\n className={clsx(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n 'd-flex',\n className,\n )}\n >\n {iconTypes.has(type) && (\n <StatusIcon sentiment={type} size={Size.SMALL} iconLabel={iconLabel} />\n )}\n <div>{children}</div>\n </Body>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","iconLabel","className","children","_jsxs","Body","role","clsx","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,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
|
|
1
|
+
{"version":3,"file":"InlineAlert.mjs","sources":["../../src/inlineAlert/InlineAlert.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport { Sentiment, Size } from '../common';\nimport StatusIcon from '../statusIcon';\nimport Body from '../body';\n\nexport interface InlineAlertProps {\n id?: string;\n type?: `${Sentiment}`;\n iconLabel?: string;\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\n/**\n * Avoid using `<InlineAlert>` component directly\n * it's for edge cases when `<Field />` isn't suitable for some reasons.\n *\n * Example:\n * ```\n * <Field sentiment={..} message={..}>..</Field>\n * ```\n */\nexport default function InlineAlert({\n id,\n type = 'neutral',\n iconLabel,\n className,\n children,\n}: InlineAlertProps) {\n return (\n <Body\n role=\"alert\"\n id={id}\n className={clsx(\n 'alert alert-detach',\n `alert-${type === Sentiment.NEGATIVE || type === Sentiment.ERROR ? 'danger' : type}`,\n 'd-flex',\n className,\n )}\n >\n {iconTypes.has(type) && (\n <StatusIcon sentiment={type} size={Size.SMALL} iconLabel={iconLabel} />\n )}\n <div>{children}</div>\n </Body>\n );\n}\n"],"names":["iconTypes","Set","Sentiment","NEGATIVE","ERROR","POSITIVE","SUCCESS","WARNING","InlineAlert","id","type","iconLabel","className","children","_jsxs","Body","role","clsx","has","_jsx","StatusIcon","sentiment","size","Size","SMALL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,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;AAEF;;;;;;;;AAQG;AACW,SAAUC,WAAWA,CAAC;EAClCC,EAAE;AACFC,EAAAA,IAAI,GAAG,SAAS;EAChBC,SAAS;EACTC,SAAS;AACTC,EAAAA;AACiB,CAAA,EAAA;EACjB,oBACEC,IAAA,CAACC,IAAI,EAAA;AACHC,IAAAA,IAAI,EAAC,OAAO;AACZP,IAAAA,EAAE,EAAEA,EAAG;IACPG,SAAS,EAAEK,IAAI,CACb,oBAAoB,EACpB,CAASP,MAAAA,EAAAA,IAAI,KAAKR,SAAS,CAACC,QAAQ,IAAIO,IAAI,KAAKR,SAAS,CAACE,KAAK,GAAG,QAAQ,GAAGM,IAAI,CAAA,CAAE,EACpF,QAAQ,EACRE,SAAS,CACT;IAAAC,QAAA,EAAA,CAEDb,SAAS,CAACkB,GAAG,CAACR,IAAI,CAAC,iBAClBS,GAAA,CAACC,UAAU,EAAA;AAACC,MAAAA,SAAS,EAAEX,IAAK;MAACY,IAAI,EAAEC,IAAI,CAACC,KAAM;AAACb,MAAAA,SAAS,EAAEA;KAAU,CACrE,eACDQ,GAAA,CAAA,KAAA,EAAA;AAAAN,MAAAA,QAAA,EAAMA;AAAQ,KAAM,CACtB;AAAA,GAAM,CAAC;AAEX;;;;"}
|
|
@@ -1 +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,yBAAiB,EAAA;AAAA,EAAA,GAAiBF,KAAK;AAAEG,EAAAA,MAAM,EAAGC,WAAW,iBAAKH,cAAA,CAACI,WAAK,EAAA;IAAA,GAAKD
|
|
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,yBAAiB,EAAA;AAAA,EAAA,GAAiBF,KAAK;AAAEG,EAAAA,MAAM,EAAGC,WAAW,iBAAKH,cAAA,CAACI,WAAK,EAAA;IAAA,GAAKD;GAAY;AAAI,CAAA;;;;"}
|
|
@@ -1 +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
|
|
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;GAAY;AAAI,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../src/inputs/Input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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={clsx(className, inputClassNameBase({ size }), 'np-input', {\n 'np-input--shape-rectangle': shape === 'rectangle',\n 'np-input--shape-pill': shape === 'pill',\n })}\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","clsx","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
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../src/inputs/Input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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={clsx(className, inputClassNameBase({ size }), 'np-input', {\n 'np-input--shape-rectangle': shape === 'rectangle',\n 'np-input--shape-pill': shape === 'pill',\n })}\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","clsx","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;AAAuB,CAAA,EAC3EC,SAAsD,EAAA;AAEtD,EAAA,MAAMC,eAAe,GAAGC,2BAAkB,EAAE;AAC5C,EAAA,MAAMC,aAAa,GAAGC,2BAAgB,EAAE;AAExC,EAAA,oBACEC,cAAA,CAAA,OAAA,EAAA;AACEC,IAAAA,GAAG,EAAEN,SAAU;AACfF,IAAAA,SAAS,EAAES,SAAI,CAACT,SAAS,EAAEU,0BAAkB,CAAC;AAAEZ,MAAAA;KAAM,CAAC,EAAE,UAAU,EAAE;MACnE,2BAA2B,EAAEC,KAAK,KAAK,WAAW;MAClD,sBAAsB,EAAEA,KAAK,KAAK;AACnC,KAAA,CAAE;AACHY,IAAAA,KAAK,EAAEN,aAAc;AAAA,IAAA,GACjBF,eAAe;IAAA,GACfF;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.mjs","sources":["../../src/inputs/Input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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={clsx(className, inputClassNameBase({ size }), 'np-input', {\n 'np-input--shape-rectangle': shape === 'rectangle',\n 'np-input--shape-pill': shape === 'pill',\n })}\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","clsx","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
|
|
1
|
+
{"version":3,"file":"Input.mjs","sources":["../../src/inputs/Input.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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={clsx(className, inputClassNameBase({ size }), 'np-input', {\n 'np-input--shape-rectangle': shape === 'rectangle',\n 'np-input--shape-pill': shape === 'pill',\n })}\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","clsx","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;AAAuB,CAAA,EAC3EC,SAAsD,EAAA;AAEtD,EAAA,MAAMC,eAAe,GAAGC,kBAAkB,EAAE;AAC5C,EAAA,MAAMC,aAAa,GAAGC,gBAAgB,EAAE;AAExC,EAAA,oBACEC,GAAA,CAAA,OAAA,EAAA;AACEC,IAAAA,GAAG,EAAEN,SAAU;AACfF,IAAAA,SAAS,EAAES,IAAI,CAACT,SAAS,EAAEU,kBAAkB,CAAC;AAAEZ,MAAAA;KAAM,CAAC,EAAE,UAAU,EAAE;MACnE,2BAA2B,EAAEC,KAAK,KAAK,WAAW;MAClD,sBAAsB,EAAEA,KAAK,KAAK;AACnC,KAAA,CAAE;AACHY,IAAAA,KAAK,EAAEN,aAAc;AAAA,IAAA,GACjBF,eAAe;IAAA,GACfF;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
|
|
@@ -74,33 +74,29 @@ function InputAddon({
|
|
|
74
74
|
setInputPadding(entry.contentRect.width + Number.parseFloat(targetStyle.paddingInlineStart) + Number.parseFloat(targetStyle.paddingInlineEnd));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
return (
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
jsxRuntime.jsx(contexts.FieldLabelIdContextProvider, {
|
|
77
|
+
return /*#__PURE__*/ /* Prevent nested controls from being labeled redundantly */jsxRuntime.jsx(contexts.FieldLabelIdContextProvider, {
|
|
78
|
+
value: undefined,
|
|
79
|
+
children: /*#__PURE__*/jsxRuntime.jsx(contexts.InputIdContextProvider, {
|
|
81
80
|
value: undefined,
|
|
82
|
-
children: /*#__PURE__*/jsxRuntime.jsx(contexts.
|
|
81
|
+
children: /*#__PURE__*/jsxRuntime.jsx(contexts.InputDescribedByProvider, {
|
|
83
82
|
value: undefined,
|
|
84
|
-
children: /*#__PURE__*/jsxRuntime.jsx(contexts.
|
|
83
|
+
children: /*#__PURE__*/jsxRuntime.jsx(contexts.InputInvalidProvider, {
|
|
85
84
|
value: undefined,
|
|
86
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}),
|
|
97
|
-
children: content
|
|
98
|
-
})
|
|
85
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
86
|
+
ref: ref,
|
|
87
|
+
className: clsx.clsx('np-input-addon', {
|
|
88
|
+
'np-input-addon--placement-start': placement === 'start',
|
|
89
|
+
'np-input-addon--placement-end': placement === 'end'
|
|
90
|
+
}, interactive && 'np-input-addon--interactive', {
|
|
91
|
+
'np-input-addon--padding-sm': padding === 'sm',
|
|
92
|
+
'np-input-addon--padding-md': padding === 'md'
|
|
93
|
+
}),
|
|
94
|
+
children: content
|
|
99
95
|
})
|
|
100
96
|
})
|
|
101
97
|
})
|
|
102
98
|
})
|
|
103
|
-
);
|
|
99
|
+
});
|
|
104
100
|
}
|
|
105
101
|
|
|
106
102
|
exports.InputGroup = InputGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.js","sources":["../../src/inputs/InputGroup.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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 [paddingStart, setPaddingStart] = useState(inputPaddingInitialState(addonStart));\n const [paddingEnd, setPaddingEnd] = useState(inputPaddingInitialState(addonEnd));\n\n return (\n <InputPaddingStartContext.Provider\n value={useMemo(() => [paddingStart, setPaddingStart], [paddingStart])}\n >\n <InputPaddingEndContext.Provider\n value={useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd])}\n >\n <fieldset disabled={disabled} className={clsx(className, 'np-input-group')}>\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 );\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 /* Prevent nested controls from being labeled redundantly */\n <FieldLabelIdContextProvider value={undefined}>\n <InputIdContextProvider value={undefined}>\n <InputDescribedByProvider value={undefined}>\n <InputInvalidProvider value={undefined}>\n <span\n ref={ref}\n className={clsx(\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 </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelIdContextProvider>\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","setPaddingStart","useState","setPaddingEnd","_jsx","Provider","value","useMemo","_jsxs","clsx","InputAddon","placement","none","sm","md","content","interactive","setInputPadding","ref","useRef","useResizeObserver","entry","inlineSize","borderBoxSize","targetStyle","getComputedStyle","target","contentRect","width","Number","parseFloat","FieldLabelIdContextProvider","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider"],"mappings":";;;;;;;;;AAkBA,MAAMA,wBAAwB,gBAAGC,mBAAa,CAA0B,CAACC,SAAS,EAAE,MAAK,EAAG,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"InputGroup.js","sources":["../../src/inputs/InputGroup.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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 [paddingStart, setPaddingStart] = useState(inputPaddingInitialState(addonStart));\n const [paddingEnd, setPaddingEnd] = useState(inputPaddingInitialState(addonEnd));\n\n return (\n <InputPaddingStartContext.Provider\n value={useMemo(() => [paddingStart, setPaddingStart], [paddingStart])}\n >\n <InputPaddingEndContext.Provider\n value={useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd])}\n >\n <fieldset disabled={disabled} className={clsx(className, 'np-input-group')}>\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 );\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 /* Prevent nested controls from being labeled redundantly */\n <FieldLabelIdContextProvider value={undefined}>\n <InputIdContextProvider value={undefined}>\n <InputDescribedByProvider value={undefined}>\n <InputInvalidProvider value={undefined}>\n <span\n ref={ref}\n className={clsx(\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 </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelIdContextProvider>\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","setPaddingStart","useState","setPaddingEnd","_jsx","Provider","value","useMemo","_jsxs","clsx","InputAddon","placement","none","sm","md","content","interactive","setInputPadding","ref","useRef","useResizeObserver","entry","inlineSize","borderBoxSize","targetStyle","getComputedStyle","target","contentRect","width","Number","parseFloat","FieldLabelIdContextProvider","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
|
-
import {
|
|
2
|
+
import { useContext, createContext, useState, useMemo, useRef } from 'react';
|
|
3
3
|
import { useResizeObserver } from '../common/hooks/useResizeObserver.mjs';
|
|
4
4
|
import { cssValueWithUnit } from '../utilities/cssValueWithUnit.mjs';
|
|
5
5
|
import { FieldLabelIdContextProvider, InputIdContextProvider, InputDescribedByProvider, InputInvalidProvider } from './contexts.mjs';
|
|
@@ -72,33 +72,29 @@ function InputAddon({
|
|
|
72
72
|
setInputPadding(entry.contentRect.width + Number.parseFloat(targetStyle.paddingInlineStart) + Number.parseFloat(targetStyle.paddingInlineEnd));
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
|
-
return (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
jsx(FieldLabelIdContextProvider, {
|
|
75
|
+
return /*#__PURE__*/ /* Prevent nested controls from being labeled redundantly */jsx(FieldLabelIdContextProvider, {
|
|
76
|
+
value: undefined,
|
|
77
|
+
children: /*#__PURE__*/jsx(InputIdContextProvider, {
|
|
79
78
|
value: undefined,
|
|
80
|
-
children: /*#__PURE__*/jsx(
|
|
79
|
+
children: /*#__PURE__*/jsx(InputDescribedByProvider, {
|
|
81
80
|
value: undefined,
|
|
82
|
-
children: /*#__PURE__*/jsx(
|
|
81
|
+
children: /*#__PURE__*/jsx(InputInvalidProvider, {
|
|
83
82
|
value: undefined,
|
|
84
|
-
children: /*#__PURE__*/jsx(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}),
|
|
95
|
-
children: content
|
|
96
|
-
})
|
|
83
|
+
children: /*#__PURE__*/jsx("span", {
|
|
84
|
+
ref: ref,
|
|
85
|
+
className: clsx('np-input-addon', {
|
|
86
|
+
'np-input-addon--placement-start': placement === 'start',
|
|
87
|
+
'np-input-addon--placement-end': placement === 'end'
|
|
88
|
+
}, interactive && 'np-input-addon--interactive', {
|
|
89
|
+
'np-input-addon--padding-sm': padding === 'sm',
|
|
90
|
+
'np-input-addon--padding-md': padding === 'md'
|
|
91
|
+
}),
|
|
92
|
+
children: content
|
|
97
93
|
})
|
|
98
94
|
})
|
|
99
95
|
})
|
|
100
96
|
})
|
|
101
|
-
);
|
|
97
|
+
});
|
|
102
98
|
}
|
|
103
99
|
|
|
104
100
|
export { InputGroup, useInputPaddings };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputGroup.mjs","sources":["../../src/inputs/InputGroup.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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 [paddingStart, setPaddingStart] = useState(inputPaddingInitialState(addonStart));\n const [paddingEnd, setPaddingEnd] = useState(inputPaddingInitialState(addonEnd));\n\n return (\n <InputPaddingStartContext.Provider\n value={useMemo(() => [paddingStart, setPaddingStart], [paddingStart])}\n >\n <InputPaddingEndContext.Provider\n value={useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd])}\n >\n <fieldset disabled={disabled} className={clsx(className, 'np-input-group')}>\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 );\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 /* Prevent nested controls from being labeled redundantly */\n <FieldLabelIdContextProvider value={undefined}>\n <InputIdContextProvider value={undefined}>\n <InputDescribedByProvider value={undefined}>\n <InputInvalidProvider value={undefined}>\n <span\n ref={ref}\n className={clsx(\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 </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelIdContextProvider>\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","setPaddingStart","useState","setPaddingEnd","_jsx","Provider","value","useMemo","_jsxs","clsx","InputAddon","placement","none","sm","md","content","interactive","setInputPadding","ref","useRef","useResizeObserver","entry","inlineSize","borderBoxSize","targetStyle","getComputedStyle","target","contentRect","width","Number","parseFloat","FieldLabelIdContextProvider","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider"],"mappings":";;;;;;;AAkBA,MAAMA,wBAAwB,gBAAGC,aAAa,CAA0B,CAACC,SAAS,EAAE,MAAK,EAAG,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"InputGroup.mjs","sources":["../../src/inputs/InputGroup.tsx"],"sourcesContent":["import { clsx } from 'clsx';\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 [paddingStart, setPaddingStart] = useState(inputPaddingInitialState(addonStart));\n const [paddingEnd, setPaddingEnd] = useState(inputPaddingInitialState(addonEnd));\n\n return (\n <InputPaddingStartContext.Provider\n value={useMemo(() => [paddingStart, setPaddingStart], [paddingStart])}\n >\n <InputPaddingEndContext.Provider\n value={useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd])}\n >\n <fieldset disabled={disabled} className={clsx(className, 'np-input-group')}>\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 );\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 /* Prevent nested controls from being labeled redundantly */\n <FieldLabelIdContextProvider value={undefined}>\n <InputIdContextProvider value={undefined}>\n <InputDescribedByProvider value={undefined}>\n <InputInvalidProvider value={undefined}>\n <span\n ref={ref}\n className={clsx(\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 </InputInvalidProvider>\n </InputDescribedByProvider>\n </InputIdContextProvider>\n </FieldLabelIdContextProvider>\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","setPaddingStart","useState","setPaddingEnd","_jsx","Provider","value","useMemo","_jsxs","clsx","InputAddon","placement","none","sm","md","content","interactive","setInputPadding","ref","useRef","useResizeObserver","entry","inlineSize","borderBoxSize","targetStyle","getComputedStyle","target","contentRect","width","Number","parseFloat","FieldLabelIdContextProvider","InputIdContextProvider","InputDescribedByProvider","InputInvalidProvider"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.js","sources":["../../src/inputs/SearchInput.tsx"],"sourcesContent":["import { Search } from '@transferwise/icons';\nimport { forwardRef } from 'react';\n\nimport { Size } from '../common';\nimport { Merge } from '../utils';\n\nimport { Input } from './Input';\nimport { InputGroup } from './InputGroup';\n\nexport interface SearchInputProps\n extends Merge<\n React.ComponentPropsWithRef<'input'>,\n {\n size?: Size.SMALL | Size.MEDIUM;\n shape?: 'rectangle' | 'pill';\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const SearchInput = forwardRef(function SearchInput(\n { shape = 'pill', size = Size.MEDIUM, disabled, className, ...restProps }: SearchInputProps,\n ref: React.ForwardedRef<HTMLInputElement | null>,\n) {\n return (\n <InputGroup\n addonStart={{\n content: <Search size={size === Size.SMALL ? 16 : 24} />,\n initialContentWidth: size === Size.SMALL ? 16 : 24,\n }}\n disabled={disabled}\n className={className}\n >\n <Input\n ref={ref}\n role=\"searchbox\"\n inputMode=\"search\"\n shape={shape}\n size={size}\n {...restProps}\n />\n </InputGroup>\n );\n});\n"],"names":["SearchInput","forwardRef","shape","size","Size","MEDIUM","disabled","className","restProps","ref","_jsx","InputGroup","addonStart","content","Search","SMALL","initialContentWidth","children","Input","role","inputMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBaA,WAAW,gBAAGC,gBAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,KAAK,GAAG,MAAM;QAAEC,MAAI,GAAGC,SAAI,CAACC,MAAM;EAAEC,QAAQ;EAAEC,SAAS;EAAE,GAAGC
|
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../src/inputs/SearchInput.tsx"],"sourcesContent":["import { Search } from '@transferwise/icons';\nimport { forwardRef } from 'react';\n\nimport { Size } from '../common';\nimport { Merge } from '../utils';\n\nimport { Input } from './Input';\nimport { InputGroup } from './InputGroup';\n\nexport interface SearchInputProps\n extends Merge<\n React.ComponentPropsWithRef<'input'>,\n {\n size?: Size.SMALL | Size.MEDIUM;\n shape?: 'rectangle' | 'pill';\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const SearchInput = forwardRef(function SearchInput(\n { shape = 'pill', size = Size.MEDIUM, disabled, className, ...restProps }: SearchInputProps,\n ref: React.ForwardedRef<HTMLInputElement | null>,\n) {\n return (\n <InputGroup\n addonStart={{\n content: <Search size={size === Size.SMALL ? 16 : 24} />,\n initialContentWidth: size === Size.SMALL ? 16 : 24,\n }}\n disabled={disabled}\n className={className}\n >\n <Input\n ref={ref}\n role=\"searchbox\"\n inputMode=\"search\"\n shape={shape}\n size={size}\n {...restProps}\n />\n </InputGroup>\n );\n});\n"],"names":["SearchInput","forwardRef","shape","size","Size","MEDIUM","disabled","className","restProps","ref","_jsx","InputGroup","addonStart","content","Search","SMALL","initialContentWidth","children","Input","role","inputMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBaA,WAAW,gBAAGC,gBAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,KAAK,GAAG,MAAM;QAAEC,MAAI,GAAGC,SAAI,CAACC,MAAM;EAAEC,QAAQ;EAAEC,SAAS;EAAE,GAAGC;AAA6B,CAAA,EAC3FC,GAAgD,EAAA;EAEhD,oBACEC,cAAA,CAACC,qBAAU,EAAA;AACTC,IAAAA,UAAU,EAAE;MACVC,OAAO,eAAEH,cAAA,CAACI,YAAM,EAAA;QAACX,IAAI,EAAEA,MAAI,KAAKC,SAAI,CAACW,KAAK,GAAG,EAAE,GAAG;AAAG,OAAG,CAAA;MACxDC,mBAAmB,EAAEb,MAAI,KAAKC,SAAI,CAACW,KAAK,GAAG,EAAE,GAAG;KAChD;AACFT,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,SAAS,EAAEA,SAAU;IAAAU,QAAA,eAErBP,cAAA,CAACQ,WAAK,EAAA;AACJT,MAAAA,GAAG,EAAEA,GAAI;AACTU,MAAAA,IAAI,EAAC,WAAW;AAChBC,MAAAA,SAAS,EAAC,QAAQ;AAClBlB,MAAAA,KAAK,EAAEA,KAAM;AACbC,MAAAA,IAAI,EAAEA,MAAK;MAAA,GACPK;KAER;AAAA,GAAY,CAAC;AAEjB,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.mjs","sources":["../../src/inputs/SearchInput.tsx"],"sourcesContent":["import { Search } from '@transferwise/icons';\nimport { forwardRef } from 'react';\n\nimport { Size } from '../common';\nimport { Merge } from '../utils';\n\nimport { Input } from './Input';\nimport { InputGroup } from './InputGroup';\n\nexport interface SearchInputProps\n extends Merge<\n React.ComponentPropsWithRef<'input'>,\n {\n size?: Size.SMALL | Size.MEDIUM;\n shape?: 'rectangle' | 'pill';\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const SearchInput = forwardRef(function SearchInput(\n { shape = 'pill', size = Size.MEDIUM, disabled, className, ...restProps }: SearchInputProps,\n ref: React.ForwardedRef<HTMLInputElement | null>,\n) {\n return (\n <InputGroup\n addonStart={{\n content: <Search size={size === Size.SMALL ? 16 : 24} />,\n initialContentWidth: size === Size.SMALL ? 16 : 24,\n }}\n disabled={disabled}\n className={className}\n >\n <Input\n ref={ref}\n role=\"searchbox\"\n inputMode=\"search\"\n shape={shape}\n size={size}\n {...restProps}\n />\n </InputGroup>\n );\n});\n"],"names":["SearchInput","forwardRef","shape","size","Size","MEDIUM","disabled","className","restProps","ref","_jsx","InputGroup","addonStart","content","Search","SMALL","initialContentWidth","children","Input","role","inputMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBaA,WAAW,gBAAGC,UAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,KAAK,GAAG,MAAM;EAAEC,IAAI,GAAGC,IAAI,CAACC,MAAM;EAAEC,QAAQ;EAAEC,SAAS;EAAE,GAAGC
|
|
1
|
+
{"version":3,"file":"SearchInput.mjs","sources":["../../src/inputs/SearchInput.tsx"],"sourcesContent":["import { Search } from '@transferwise/icons';\nimport { forwardRef } from 'react';\n\nimport { Size } from '../common';\nimport { Merge } from '../utils';\n\nimport { Input } from './Input';\nimport { InputGroup } from './InputGroup';\n\nexport interface SearchInputProps\n extends Merge<\n React.ComponentPropsWithRef<'input'>,\n {\n size?: Size.SMALL | Size.MEDIUM;\n shape?: 'rectangle' | 'pill';\n 'aria-invalid'?: boolean;\n }\n > {}\n\nexport const SearchInput = forwardRef(function SearchInput(\n { shape = 'pill', size = Size.MEDIUM, disabled, className, ...restProps }: SearchInputProps,\n ref: React.ForwardedRef<HTMLInputElement | null>,\n) {\n return (\n <InputGroup\n addonStart={{\n content: <Search size={size === Size.SMALL ? 16 : 24} />,\n initialContentWidth: size === Size.SMALL ? 16 : 24,\n }}\n disabled={disabled}\n className={className}\n >\n <Input\n ref={ref}\n role=\"searchbox\"\n inputMode=\"search\"\n shape={shape}\n size={size}\n {...restProps}\n />\n </InputGroup>\n );\n});\n"],"names":["SearchInput","forwardRef","shape","size","Size","MEDIUM","disabled","className","restProps","ref","_jsx","InputGroup","addonStart","content","Search","SMALL","initialContentWidth","children","Input","role","inputMode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmBaA,WAAW,gBAAGC,UAAU,CAAC,SAASD,WAAWA,CACxD;AAAEE,EAAAA,KAAK,GAAG,MAAM;EAAEC,IAAI,GAAGC,IAAI,CAACC,MAAM;EAAEC,QAAQ;EAAEC,SAAS;EAAE,GAAGC;AAA6B,CAAA,EAC3FC,GAAgD,EAAA;EAEhD,oBACEC,GAAA,CAACC,UAAU,EAAA;AACTC,IAAAA,UAAU,EAAE;MACVC,OAAO,eAAEH,GAAA,CAACI,MAAM,EAAA;QAACX,IAAI,EAAEA,IAAI,KAAKC,IAAI,CAACW,KAAK,GAAG,EAAE,GAAG;AAAG,OAAG,CAAA;MACxDC,mBAAmB,EAAEb,IAAI,KAAKC,IAAI,CAACW,KAAK,GAAG,EAAE,GAAG;KAChD;AACFT,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,SAAS,EAAEA,SAAU;IAAAU,QAAA,eAErBP,GAAA,CAACQ,KAAK,EAAA;AACJT,MAAAA,GAAG,EAAEA,GAAI;AACTU,MAAAA,IAAI,EAAC,WAAW;AAChBC,MAAAA,SAAS,EAAC,QAAQ;AAClBlB,MAAAA,KAAK,EAAEA,KAAM;AACbC,MAAAA,IAAI,EAAEA,IAAK;MAAA,GACPK;KAER;AAAA,GAAY,CAAC;AAEjB,CAAC;;;;"}
|
|
@@ -390,6 +390,7 @@ function SelectInputOptions({
|
|
|
390
390
|
listBoxLabelledBy
|
|
391
391
|
}) {
|
|
392
392
|
const intl = reactIntl.useIntl();
|
|
393
|
+
const virtualiserHandlerRef = React.useRef(null);
|
|
393
394
|
const controllerRef = filterable ? searchInputRef : listboxRef;
|
|
394
395
|
const [initialRender, setInitialRender] = React.useState(true);
|
|
395
396
|
const needle = React.useMemo(() => {
|
|
@@ -516,11 +517,15 @@ function SelectInputOptions({
|
|
|
516
517
|
tabIndex: 0,
|
|
517
518
|
className: "np-select-input-listbox",
|
|
518
519
|
children: !virtualized ? filteredItems.map((_, index) => getItemNode(index)) : /*#__PURE__*/jsxRuntime.jsx(virtua.Virtualizer, {
|
|
520
|
+
ref: virtualiserHandlerRef,
|
|
519
521
|
count: filteredItems.length,
|
|
520
522
|
keepMounted: mountedIndexes,
|
|
521
523
|
scrollRef: listboxRef // `VList` doesn't expose this
|
|
522
524
|
,
|
|
523
|
-
|
|
525
|
+
onScroll: async () => {
|
|
526
|
+
if (!virtualiserHandlerRef.current) return;
|
|
527
|
+
const startIndex = virtualiserHandlerRef.current.findStartIndex();
|
|
528
|
+
const endIndex = virtualiserHandlerRef.current.findStartIndex();
|
|
524
529
|
setMountedIndexes(prevMountedIndexes => {
|
|
525
530
|
const indexes = new Set(prevMountedIndexes);
|
|
526
531
|
for (let index = startIndex; index <= endIndex; index += 1) {
|