@razorpay/blade 12.49.4 → 12.49.5
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/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/Badge/Badge.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BladeProvider/useBladeProvider.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.js +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/native/components/Box/Box.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/native/components/Button/IconButton/StyledIconButton.native.js.map +1 -1
- package/build/lib/native/components/Card/CardContext.js.map +1 -1
- package/build/lib/native/components/Card/CardFooter.js.map +1 -1
- package/build/lib/native/components/Card/CardHeader.js.map +1 -1
- package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
- package/build/lib/native/components/Card/CardSurface.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
- package/build/lib/native/components/Carousel/CarouselItem.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/Indicators.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/build/lib/native/components/Checkbox/useCheckbox.js.map +1 -1
- package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/native/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleChevronIcon.native.js.map +1 -1
- package/build/lib/native/components/Collapsible/CollapsibleContext.js.map +1 -1
- package/build/lib/native/components/Counter/Counter.js.map +1 -1
- package/build/lib/native/components/Divider/Divider.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownButton.js +1 -1
- package/build/lib/native/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownIconButton.js +1 -1
- package/build/lib/native/components/Dropdown/DropdownIconButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownLink.js +1 -1
- package/build/lib/native/components/Dropdown/DropdownLink.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownOverlay.native.js.map +1 -1
- package/build/lib/native/components/Dropdown/dropdownUtils.js.map +1 -1
- package/build/lib/native/components/Form/useFormId.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
- package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js.map +1 -1
- package/build/lib/native/components/List/ListItem.js.map +1 -1
- package/build/lib/native/components/List/getOrderedListItemBullet.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverContext.js.map +1 -1
- package/build/lib/native/components/PopupArrow/PopupArrow.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBarFilled.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/progressBarTokens.js.map +1 -1
- package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
- package/build/lib/native/components/Radio/RadioGroup/useRadioGroup.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
- package/build/lib/native/components/Radio/useRadio.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/SpinningBox.native.js.map +1 -1
- package/build/lib/native/components/StepGroup/StepItemMarker.js.map +1 -1
- package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
- package/build/lib/native/components/Tabs/SafeSceneMap.native.js.map +1 -1
- package/build/lib/native/components/Tabs/utils.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tag/getTagsGroup.js.map +1 -1
- package/build/lib/native/components/Tooltip/TooltipContext.js.map +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/native/components/Typography/utils.js.map +1 -1
- package/build/lib/native/components/VisuallyHidden/ScreenReaderStyles.js.map +1 -1
- package/build/lib/native/tokens/global/colors.js.map +1 -1
- package/build/lib/native/tokens/global/elevation/elevation.native.js.map +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/native/utils/getMediaQuery/getMediaQuery.js.map +1 -1
- package/build/lib/native/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js.map +1 -1
- package/build/lib/native/utils/logger/logger.js.map +1 -1
- package/build/lib/native/utils/makeAccessible/makeAccessible.native.js.map +1 -1
- package/build/lib/native/utils/makeBorderSize/makeBorderSize.js.map +1 -1
- package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -1
- package/build/lib/native/utils/makeSize/makeSize.js.map +1 -1
- package/build/lib/native/utils/makeSpace/makeSpace.js.map +1 -1
- package/build/lib/native/utils/makeTypographySize/makeTypographySize.native.js.map +1 -1
- package/build/lib/native/utils/metaAttribute/metaAttribute.native.js.map +1 -1
- package/build/lib/native/utils/useColorScheme/useColorScheme.js.map +1 -1
- package/build/lib/native/utils/useId.js.map +1 -1
- package/build/lib/native/utils/useMergeRefs.js.map +1 -1
- package/build/lib/native/utils/useVerifyAllowedChildren/useVerifyAllowedChildren.js.map +1 -1
- package/build/lib/web/development/components/Accordion/Accordion.js +2 -2
- package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionList.js +1 -1
- package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js +7 -7
- package/build/lib/web/development/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js +4 -4
- package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/development/components/ActionList/actionListUtils.js +4 -4
- package/build/lib/web/development/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +2 -2
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractions.web.js.map +1 -1
- package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js +2 -2
- package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js.map +1 -1
- package/build/lib/web/development/components/Avatar/Avatar.web.js +1 -1
- package/build/lib/web/development/components/Avatar/Avatar.web.js.map +1 -1
- package/build/lib/web/development/components/Badge/Badge.js +1 -1
- package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +2 -2
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +2 -2
- package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -1
- package/build/lib/web/development/components/BladeProvider/useTheme.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +19 -19
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetContext.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetStack.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +27 -27
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/Box.js +1 -1
- package/build/lib/web/development/components/Box/Box.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +5 -5
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/development/components/Button/Button/Button.js +2 -2
- package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/IconButton.js +1 -1
- package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +1 -1
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js.map +1 -1
- package/build/lib/web/development/components/Card/CardFooter.js +2 -2
- package/build/lib/web/development/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -6
- package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/CarouselItem.web.js +2 -2
- package/build/lib/web/development/components/Carousel/CarouselItem.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/Indicators.js +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/Indicators.js.map +1 -1
- package/build/lib/web/development/components/ChatMessage/ChatMessage.web.js +1 -1
- package/build/lib/web/development/components/ChatMessage/ChatMessage.web.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/Checkbox.js +5 -5
- package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxGroup/useCheckboxGroup.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/useCheckbox.js +1 -1
- package/build/lib/web/development/components/Checkbox/useCheckbox.js.map +1 -1
- package/build/lib/web/development/components/Chip/Chip.js +5 -5
- package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/development/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/Collapsible.js +3 -3
- package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleButton.js +1 -1
- package/build/lib/web/development/components/Collapsible/CollapsibleButton.js.map +1 -1
- package/build/lib/web/development/components/Counter/Counter.js +1 -1
- package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js +13 -13
- package/build/lib/web/development/components/DatePicker/BaseDatePicker.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/Calendar.web.js +7 -7
- package/build/lib/web/development/components/DatePicker/Calendar.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/CalendarHeader.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/DateInput.web.js +4 -4
- package/build/lib/web/development/components/DatePicker/DateInput.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/QuickSelection/PresetDropdown.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/QuickSelection/PresetSideBar.web.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/useControlledDates.js +1 -1
- package/build/lib/web/development/components/DatePicker/useControlledDates.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/useDatesState.js +1 -1
- package/build/lib/web/development/components/DatePicker/useDatesState.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/usePopup.js +2 -2
- package/build/lib/web/development/components/DatePicker/usePopup.js.map +1 -1
- package/build/lib/web/development/components/DatePicker/utils.js +1 -1
- package/build/lib/web/development/components/DatePicker/utils.js.map +1 -1
- package/build/lib/web/development/components/Drawer/Drawer.web.js +2 -2
- package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/development/components/Drawer/DrawerContext.js.map +1 -1
- package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
- package/build/lib/web/development/components/Drawer/StackProvider.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +28 -28
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownButton.js +4 -4
- package/build/lib/web/development/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownIconButton.js +4 -4
- package/build/lib/web/development/components/Dropdown/DropdownIconButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownLink.js +4 -4
- package/build/lib/web/development/components/Dropdown/DropdownLink.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipGroupContext.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js +7 -7
- package/build/lib/web/development/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js +8 -8
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/useDropdown.js +4 -4
- package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/development/components/EmptyState/EmptyState.web.js +1 -1
- package/build/lib/web/development/components/EmptyState/EmptyState.web.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +14 -14
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/FileUploadItem.js +1 -1
- package/build/lib/web/development/components/FileUpload/FileUploadItem.js.map +1 -1
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js +3 -3
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/development/components/InfoGroup/InfoGroup.web.js +6 -6
- package/build/lib/web/development/components/InfoGroup/InfoGroup.web.js.map +1 -1
- package/build/lib/web/development/components/InfoGroup/InfoGroupContext.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +110 -110
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +8 -8
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +7 -7
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js +4 -4
- package/build/lib/web/development/components/Input/BaseInput/useTaggedInput.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/AutoComplete.js +8 -8
- package/build/lib/web/development/components/Input/DropdownInputTriggers/AutoComplete.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +4 -4
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js +3 -3
- package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +14 -14
- package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +1 -1
- package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +5 -5
- package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js +5 -5
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/web/development/components/Input/TextArea/TextArea.js +7 -7
- package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +7 -7
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/useFormattedInput.js +2 -2
- package/build/lib/web/development/components/Input/TextInput/useFormattedInput.js.map +1 -1
- package/build/lib/web/development/components/InputGroup/InputGroup.web.js +1 -1
- package/build/lib/web/development/components/InputGroup/InputGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +3 -3
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/development/components/Link/Link/Link.js +1 -1
- package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/development/components/List/List.js +1 -1
- package/build/lib/web/development/components/List/List.js.map +1 -1
- package/build/lib/web/development/components/List/getOrderedListItemBullet.js +3 -3
- package/build/lib/web/development/components/List/getOrderedListItemBullet.js.map +1 -1
- package/build/lib/web/development/components/ListView/ListViewFilters.web.js.map +1 -1
- package/build/lib/web/development/components/ListView/ListViewFiltersContext.web.js.map +1 -1
- package/build/lib/web/development/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
- package/build/lib/web/development/components/Menu/Menu.web.js.map +1 -1
- package/build/lib/web/development/components/Menu/MenuItem.web.js +3 -3
- package/build/lib/web/development/components/Menu/MenuItem.web.js.map +1 -1
- package/build/lib/web/development/components/Menu/useMenu.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalContext.js.map +1 -1
- package/build/lib/web/development/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/development/components/Preview/Preview.web.js +29 -30
- package/build/lib/web/development/components/Preview/Preview.web.js.map +1 -1
- package/build/lib/web/development/components/QuickFilters/QuickFilterGroup/QuickFilterGroup.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +4 -4
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioGroup/useRadioGroup.js +1 -1
- package/build/lib/web/development/components/Radio/RadioGroup/useRadioGroup.js.map +1 -1
- package/build/lib/web/development/components/Radio/useRadio.js +1 -1
- package/build/lib/web/development/components/Radio/useRadio.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNav.web.js +19 -19
- package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js +6 -6
- package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/SideNavLevel.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js +7 -7
- package/build/lib/web/development/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourStep.web.js +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourStep.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js +6 -6
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
- package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepLine.web.js +13 -13
- package/build/lib/web/development/components/StepGroup/StepLine.web.js.map +1 -1
- package/build/lib/web/development/components/Switch/Switch.js +1 -1
- package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +10 -10
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +6 -6
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TablePagination.web.js +2 -2
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabList.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/Tabs.web.js +1 -1
- package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/utils.js +2 -2
- package/build/lib/web/development/components/Tabs/utils.js.map +1 -1
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
- package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js +1 -1
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
- package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TabNav/utils.js +2 -2
- package/build/lib/web/development/components/TopNav/TabNav/utils.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/development/tokens/theme/overrideTheme.js +2 -2
- package/build/lib/web/development/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/web/development/utils/bladeCoverage.js +9 -10
- package/build/lib/web/development/utils/bladeCoverage.js.map +1 -1
- package/build/lib/web/development/utils/fireNativeEvent/fireNativeEvent.web.js +1 -1
- package/build/lib/web/development/utils/fireNativeEvent/fireNativeEvent.web.js.map +1 -1
- package/build/lib/web/development/utils/hasSameObjectStructure/hasSameObjectStructure.js +6 -6
- package/build/lib/web/development/utils/hasSameObjectStructure/hasSameObjectStructure.js.map +1 -1
- package/build/lib/web/development/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js +3 -3
- package/build/lib/web/development/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js.map +1 -1
- package/build/lib/web/development/utils/isValidAllowedChildren/isValidAllowedChildren.js +2 -2
- package/build/lib/web/development/utils/isValidAllowedChildren/isValidAllowedChildren.js.map +1 -1
- package/build/lib/web/development/utils/lodashButBetter/cloneDeep.js +3 -3
- package/build/lib/web/development/utils/lodashButBetter/get.js +3 -3
- package/build/lib/web/development/utils/useControllable.js +1 -1
- package/build/lib/web/development/utils/useControllable.js.map +1 -1
- package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js +2 -2
- package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
- package/build/lib/web/development/utils/useScrollLock.js.map +1 -1
- package/build/lib/web/production/components/Accordion/Accordion.js +2 -2
- package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionList.js +1 -1
- package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js +7 -7
- package/build/lib/web/production/components/ActionList/ActionListBox.web.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js +4 -4
- package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/production/components/ActionList/actionListUtils.js +4 -4
- package/build/lib/web/production/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +2 -2
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractions.web.js.map +1 -1
- package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js +2 -2
- package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js.map +1 -1
- package/build/lib/web/production/components/Avatar/Avatar.web.js +1 -1
- package/build/lib/web/production/components/Avatar/Avatar.web.js.map +1 -1
- package/build/lib/web/production/components/Badge/Badge.js +1 -1
- package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +2 -2
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +2 -2
- package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -1
- package/build/lib/web/production/components/BladeProvider/useTheme.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +19 -19
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetContext.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetStack.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +27 -27
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/Box.js +1 -1
- package/build/lib/web/production/components/Box/Box.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +5 -5
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/production/components/Button/Button/Button.js +2 -2
- package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/IconButton.js +1 -1
- package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +1 -1
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js.map +1 -1
- package/build/lib/web/production/components/Card/CardFooter.js +2 -2
- package/build/lib/web/production/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -6
- package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/CarouselItem.web.js +2 -2
- package/build/lib/web/production/components/Carousel/CarouselItem.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/Indicators.js +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/Indicators.js.map +1 -1
- package/build/lib/web/production/components/ChatMessage/ChatMessage.web.js +1 -1
- package/build/lib/web/production/components/ChatMessage/ChatMessage.web.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/Checkbox.js +5 -5
- package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxGroup/useCheckboxGroup.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/useCheckbox.js +1 -1
- package/build/lib/web/production/components/Checkbox/useCheckbox.js.map +1 -1
- package/build/lib/web/production/components/Chip/Chip.js +5 -5
- package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/production/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/Collapsible.js +3 -3
- package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleButton.js +1 -1
- package/build/lib/web/production/components/Collapsible/CollapsibleButton.js.map +1 -1
- package/build/lib/web/production/components/Counter/Counter.js +1 -1
- package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js +13 -13
- package/build/lib/web/production/components/DatePicker/BaseDatePicker.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/Calendar.web.js +7 -7
- package/build/lib/web/production/components/DatePicker/Calendar.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/CalendarHeader.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/DateInput.web.js +4 -4
- package/build/lib/web/production/components/DatePicker/DateInput.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/QuickSelection/PresetDropdown.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/QuickSelection/PresetSideBar.web.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/useControlledDates.js +1 -1
- package/build/lib/web/production/components/DatePicker/useControlledDates.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/useDatesState.js +1 -1
- package/build/lib/web/production/components/DatePicker/useDatesState.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/usePopup.js +2 -2
- package/build/lib/web/production/components/DatePicker/usePopup.js.map +1 -1
- package/build/lib/web/production/components/DatePicker/utils.js +1 -1
- package/build/lib/web/production/components/DatePicker/utils.js.map +1 -1
- package/build/lib/web/production/components/Drawer/Drawer.web.js +2 -2
- package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/production/components/Drawer/DrawerContext.js.map +1 -1
- package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
- package/build/lib/web/production/components/Drawer/StackProvider.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +28 -28
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownButton.js +4 -4
- package/build/lib/web/production/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownIconButton.js +4 -4
- package/build/lib/web/production/components/Dropdown/DropdownIconButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownLink.js +4 -4
- package/build/lib/web/production/components/Dropdown/DropdownLink.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipGroupContext.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js +7 -7
- package/build/lib/web/production/components/Dropdown/FilterChipSelectInput.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js +8 -8
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/useDropdown.js +4 -4
- package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/production/components/EmptyState/EmptyState.web.js +1 -1
- package/build/lib/web/production/components/EmptyState/EmptyState.web.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +14 -14
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/FileUploadItem.js +1 -1
- package/build/lib/web/production/components/FileUpload/FileUploadItem.js.map +1 -1
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js +3 -3
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/production/components/InfoGroup/InfoGroup.web.js +6 -6
- package/build/lib/web/production/components/InfoGroup/InfoGroup.web.js.map +1 -1
- package/build/lib/web/production/components/InfoGroup/InfoGroupContext.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +110 -110
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +8 -8
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +7 -7
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js +4 -4
- package/build/lib/web/production/components/Input/BaseInput/useTaggedInput.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/AutoComplete.js +8 -8
- package/build/lib/web/production/components/Input/DropdownInputTriggers/AutoComplete.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +4 -4
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js +3 -3
- package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +14 -14
- package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +1 -1
- package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +5 -5
- package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js +5 -5
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/web/production/components/Input/TextArea/TextArea.js +7 -7
- package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +7 -7
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/useFormattedInput.js +2 -2
- package/build/lib/web/production/components/Input/TextInput/useFormattedInput.js.map +1 -1
- package/build/lib/web/production/components/InputGroup/InputGroup.web.js +1 -1
- package/build/lib/web/production/components/InputGroup/InputGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +3 -3
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/production/components/Link/Link/Link.js +1 -1
- package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/production/components/List/List.js +1 -1
- package/build/lib/web/production/components/List/List.js.map +1 -1
- package/build/lib/web/production/components/List/getOrderedListItemBullet.js +3 -3
- package/build/lib/web/production/components/List/getOrderedListItemBullet.js.map +1 -1
- package/build/lib/web/production/components/ListView/ListViewFilters.web.js.map +1 -1
- package/build/lib/web/production/components/ListView/ListViewFiltersContext.web.js.map +1 -1
- package/build/lib/web/production/components/LiveAnnouncer/LiveAnnouncer.web.js.map +1 -1
- package/build/lib/web/production/components/Menu/Menu.web.js.map +1 -1
- package/build/lib/web/production/components/Menu/MenuItem.web.js +3 -3
- package/build/lib/web/production/components/Menu/MenuItem.web.js.map +1 -1
- package/build/lib/web/production/components/Menu/useMenu.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalContext.js.map +1 -1
- package/build/lib/web/production/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/production/components/Preview/Preview.web.js +29 -30
- package/build/lib/web/production/components/Preview/Preview.web.js.map +1 -1
- package/build/lib/web/production/components/QuickFilters/QuickFilterGroup/QuickFilterGroup.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +4 -4
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioGroup/useRadioGroup.js +1 -1
- package/build/lib/web/production/components/Radio/RadioGroup/useRadioGroup.js.map +1 -1
- package/build/lib/web/production/components/Radio/useRadio.js +1 -1
- package/build/lib/web/production/components/Radio/useRadio.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNav.web.js +19 -19
- package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js +6 -6
- package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/SideNavLevel.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js +7 -7
- package/build/lib/web/production/components/SpotlightPopoverTour/Tour.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourStep.web.js +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourStep.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js +6 -6
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
- package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepLine.web.js +13 -13
- package/build/lib/web/production/components/StepGroup/StepLine.web.js.map +1 -1
- package/build/lib/web/production/components/Switch/Switch.js +1 -1
- package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +10 -10
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +6 -6
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TablePagination.web.js +2 -2
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabList.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/Tabs.web.js +1 -1
- package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/utils.js +2 -2
- package/build/lib/web/production/components/Tabs/utils.js.map +1 -1
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
- package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js +1 -1
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
- package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TabNav/utils.js +2 -2
- package/build/lib/web/production/components/TopNav/TabNav/utils.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/production/tokens/theme/overrideTheme.js +2 -2
- package/build/lib/web/production/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/web/production/utils/bladeCoverage.js +9 -10
- package/build/lib/web/production/utils/bladeCoverage.js.map +1 -1
- package/build/lib/web/production/utils/fireNativeEvent/fireNativeEvent.web.js +1 -1
- package/build/lib/web/production/utils/fireNativeEvent/fireNativeEvent.web.js.map +1 -1
- package/build/lib/web/production/utils/hasSameObjectStructure/hasSameObjectStructure.js +6 -6
- package/build/lib/web/production/utils/hasSameObjectStructure/hasSameObjectStructure.js.map +1 -1
- package/build/lib/web/production/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js +3 -3
- package/build/lib/web/production/utils/isPartialMatchObjectKeys/isPartialMatchObjectKeys.js.map +1 -1
- package/build/lib/web/production/utils/isValidAllowedChildren/isValidAllowedChildren.js +2 -2
- package/build/lib/web/production/utils/isValidAllowedChildren/isValidAllowedChildren.js.map +1 -1
- package/build/lib/web/production/utils/lodashButBetter/cloneDeep.js +3 -3
- package/build/lib/web/production/utils/lodashButBetter/get.js +3 -3
- package/build/lib/web/production/utils/useControllable.js +1 -1
- package/build/lib/web/production/utils/useControllable.js.map +1 -1
- package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js +2 -2
- package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -1
- package/build/lib/web/production/utils/useScrollLock.js.map +1 -1
- package/package.json +15 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownLink.js","sources":["../../../../../src/components/Dropdown/DropdownLink.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport { getActionListContainerRole } from '../ActionList/getA11yRoles';\nimport { BaseLink } from '../Link/BaseLink';\nimport type { BaseLinkProps } from '../Link/BaseLink';\nimport type { LinkButtonVariantProps } from '../Link';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { assignWithoutSideEffects } from '~src/utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype DropdownLinkProps = LinkButtonVariantProps & {\n onBlur?: BaseLinkProps['onBlur'];\n onKeyDown?: BaseLinkProps['onKeyDown'];\n};\n\nconst _DropdownLink = ({\n children,\n icon,\n iconPosition = 'left',\n onClick,\n onBlur,\n onKeyDown,\n isDisabled,\n href,\n target,\n rel,\n accessibilityLabel,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n ...props\n}: DropdownLinkProps): React.ReactElement => {\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n } = useDropdown();\n\n return (\n // Using BaseButton here to avoid exporting onBlur and onKeyDown from Button\n // If in future we decide to export onBlur and onKeyDown on Button, this can be replaced with Button\n <BaseLink\n variant=\"button\"\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n size={size}\n testID={testID}\n hitSlop={hitSlop}\n htmlTitle={htmlTitle}\n isDisabled={isDisabled}\n {...props}\n {...makeAnalyticsAttribute(props)}\n ref={triggererRef as any}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n }}\n onClick={(e) => {\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n onClick?.(e as any);\n }}\n onBlur={(e) => {\n // Setting it for web fails it on native typecheck and vice versa\n onBlur?.(e as any);\n }}\n onKeyDown={(e) => {\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n onKeyDown?.(e as any);\n }}\n />\n );\n};\n\nconst DropdownLink = assignWithoutSideEffects(_DropdownLink, {\n componentId: dropdownComponentIds.triggers.DropdownLink,\n});\n\nexport { DropdownLink };\n"],"names":["_DropdownLink","_ref","children","icon","_ref$iconPosition","iconPosition","onClick","onBlur","onKeyDown","isDisabled","href","target","rel","accessibilityLabel","_ref$size","size","testID","hitSlop","htmlTitle","props","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseLink","Object","assign","variant","makeAnalyticsAttribute","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","e","event","DropdownLink","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;8KAkBA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAiB0B,CAhB3C,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAAAC,iBAAA,CAAAH,IAAA,CACJI,YAAY,CAAZA,YAAY,CAAAD,iBAAA,GAAG,KAAA,CAAA,CAAA,MAAM,CAAAA,iBAAA,CACrBE,QAAO,CAAAL,IAAA,CAAPK,OAAO,CACPC,OAAM,CAAAN,IAAA,CAANM,MAAM,CACNC,UAAS,CAAAP,IAAA,CAATO,SAAS,CACTC,UAAU,CAAAR,IAAA,CAAVQ,UAAU,CACNR,IAAA,CAAJS,IAAI,CACET,IAAA,CAANU,MAAM,CACHV,IAAA,CAAHW,GAAG,KACHC,kBAAkB,CAAAZ,IAAA,CAAlBY,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version":3,"file":"DropdownLink.js","sources":["../../../../../src/components/Dropdown/DropdownLink.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport { getActionListContainerRole } from '../ActionList/getA11yRoles';\nimport { BaseLink } from '../Link/BaseLink';\nimport type { BaseLinkProps } from '../Link/BaseLink';\nimport type { LinkButtonVariantProps } from '../Link';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { assignWithoutSideEffects } from '~src/utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype DropdownLinkProps = LinkButtonVariantProps & {\n onBlur?: BaseLinkProps['onBlur'];\n onKeyDown?: BaseLinkProps['onKeyDown'];\n};\n\nconst _DropdownLink = ({\n children,\n icon,\n iconPosition = 'left',\n onClick,\n onBlur,\n onKeyDown,\n isDisabled,\n href,\n target,\n rel,\n accessibilityLabel,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n ...props\n}: DropdownLinkProps): React.ReactElement => {\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n } = useDropdown();\n\n return (\n // Using BaseButton here to avoid exporting onBlur and onKeyDown from Button\n // If in future we decide to export onBlur and onKeyDown on Button, this can be replaced with Button\n <BaseLink\n variant=\"button\"\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n size={size}\n testID={testID}\n hitSlop={hitSlop}\n htmlTitle={htmlTitle}\n isDisabled={isDisabled}\n {...props}\n {...makeAnalyticsAttribute(props)}\n ref={triggererRef as any}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n }}\n onClick={(e) => {\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n onClick?.(e as any);\n }}\n onBlur={(e) => {\n // Setting it for web fails it on native typecheck and vice versa\n onBlur?.(e as any);\n }}\n onKeyDown={(e) => {\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n onKeyDown?.(e as any);\n }}\n />\n );\n};\n\nconst DropdownLink = assignWithoutSideEffects(_DropdownLink, {\n componentId: dropdownComponentIds.triggers.DropdownLink,\n});\n\nexport { DropdownLink };\n"],"names":["_DropdownLink","_ref","children","icon","_ref$iconPosition","iconPosition","onClick","onBlur","onKeyDown","isDisabled","href","target","rel","accessibilityLabel","_ref$size","size","testID","hitSlop","htmlTitle","props","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseLink","Object","assign","variant","makeAnalyticsAttribute","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","e","event","DropdownLink","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;8KAkBA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAiB0B,CAhB3C,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAAAC,iBAAA,CAAAH,IAAA,CACJI,YAAY,CAAZA,YAAY,CAAAD,iBAAA,GAAG,KAAA,CAAA,CAAA,MAAM,CAAAA,iBAAA,CACrBE,QAAO,CAAAL,IAAA,CAAPK,OAAO,CACPC,OAAM,CAAAN,IAAA,CAANM,MAAM,CACNC,UAAS,CAAAP,IAAA,CAATO,SAAS,CACTC,UAAU,CAAAR,IAAA,CAAVQ,UAAU,CACNR,IAAA,CAAJS,IAAI,CACET,IAAA,CAANU,MAAM,CACHV,IAAA,CAAHW,GAAG,KACHC,kBAAk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B,QAAQ,CAAE,GAAGjB,cAAc,CAAA,WAAA,CAAa,CACxCkB,gBAAgB,CAAEhB,WAAW,EAAI,CAAC,CAAG,GAAGF,cAAc,CAAA,CAAA,EAAIE,WAAW,CAAE,CAAA,CAAGiB,SAC5E,CAAE,CACFvC,OAAO,CAAE,SAAAA,QAACwC,CAAC,CAAK,CACdtB,cAAc,EAAE,CAEhBlB,QAAO,EAAA,IAAA,CAAA,KAAA,CAAA,CAAPA,QAAO,CAAGwC,CAAQ,CAAC,CACrB,CAAE,CACFvC,MAAM,CAAE,SAAAA,MAACuC,CAAAA,CAAC,CAAK,CAEbvC,OAAM,cAANA,OAAM,CAAGuC,CAAQ,CAAC,CACpB,CAAE,CACFtC,SAAS,CAAE,SAAAA,SAACsC,CAAAA,CAAC,CAAK,CAChBrB,gBAAgB,cAAhBA,gBAAgB,CAAG,CAAEsB,KAAK,CAAED,CAAS,CAAC,CAAC,CAEvCtC,UAAS,EAAA,IAAA,CAAA,KAAA,CAAA,CAATA,UAAS,CAAGsC,CAAQ,CAAC,CACvB,CAAE,CAAA,CACH,CAAC,EAEN,CAAC,CAEK,IAAAE,YAAY,CAAGC,wBAAwB,CAACjD,aAAa,CAAE,CAC3DkD,WAAW,CAAEC,oBAAoB,CAACC,QAAQ,CAACJ,YAC7C,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownOverlay.native.js","sources":["../../../../../src/components/Dropdown/DropdownOverlay.native.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable } from 'react-native';\nimport styled from 'styled-components/native';\nimport { useDropdown } from './useDropdown';\nimport { StyledDropdownOverlay } from './StyledDropdownOverlay';\nimport type { DropdownOverlayProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useBottomSheetAndDropdownGlue } from '~components/BottomSheet/BottomSheetContext';\n\nconst AnimatedDropdownOverlay = styled(StyledDropdownOverlay)<{ testID: 'dropdown-overlay' }>(\n (props) => ({\n transform: `translateY(${makeSize(props.theme.spacing[3])})`,\n }),\n);\n\nconst StyledCloseableArea = styled(Pressable)<{ display: 'flex' | 'none' }>((props) => ({\n position: 'static',\n height: '100%',\n width: '100%',\n display: props.display,\n}));\n\n/**\n * Overlay of dropdown\n *\n * Wrap your ActionList within this component\n */\nconst _DropdownOverlay = ({ children, testID }: DropdownOverlayProps): React.ReactElement => {\n const { isOpen, close } = useDropdown();\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n\n return (\n <BaseBox position=\"relative\">\n <StyledCloseableArea\n display={isOpen ? 'flex' : 'none'}\n onPress={() => {\n close();\n }}\n testID=\"closeable-area\"\n >\n <AnimatedDropdownOverlay\n isInBottomSheet={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet}\n display={isOpen ? 'flex' : 'none'}\n position=\"absolute\"\n width=\"100%\"\n testID=\"dropdown-overlay\"\n elevation={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet ? undefined : 'midRaised'}\n {...metaAttribute({ name: MetaConstants.DropdownOverlay, testID })}\n >\n {children}\n </AnimatedDropdownOverlay>\n </StyledCloseableArea>\n </BaseBox>\n );\n};\n\nconst DropdownOverlay = assignWithoutSideEffects(_DropdownOverlay, {\n componentId: dropdownComponentIds.DropdownOverlay,\n});\n\nexport { DropdownOverlay };\n"],"names":["AnimatedDropdownOverlay","styled","StyledDropdownOverlay","props","transform","makeSize","theme","spacing","StyledCloseableArea","Pressable","position","height","width","display","_DropdownOverlay","_ref","children","testID","_useDropdown","useDropdown","isOpen","close","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","_jsx","BaseBox","onPress","Object","assign","isInBottomSheet","dropdownHasBottomSheet","elevation","undefined","metaAttribute","name","MetaConstants","DropdownOverlay","assignWithoutSideEffects","componentId","dropdownComponentIds"],"mappings":";;;;;;;;;;;;;;;;AAaA,IAAMA,uBAAuB,CAAGC,MAAM,CAACC,qBAAqB,CAAC,CAC3D,SAACC,KAAK,CAAM,CAAA,OAAA,CACVC,SAAS,
|
|
1
|
+
{"version":3,"file":"DropdownOverlay.native.js","sources":["../../../../../src/components/Dropdown/DropdownOverlay.native.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable } from 'react-native';\nimport styled from 'styled-components/native';\nimport { useDropdown } from './useDropdown';\nimport { StyledDropdownOverlay } from './StyledDropdownOverlay';\nimport type { DropdownOverlayProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useBottomSheetAndDropdownGlue } from '~components/BottomSheet/BottomSheetContext';\n\nconst AnimatedDropdownOverlay = styled(StyledDropdownOverlay)<{ testID: 'dropdown-overlay' }>(\n (props) => ({\n transform: `translateY(${makeSize(props.theme.spacing[3])})`,\n }),\n);\n\nconst StyledCloseableArea = styled(Pressable)<{ display: 'flex' | 'none' }>((props) => ({\n position: 'static',\n height: '100%',\n width: '100%',\n display: props.display,\n}));\n\n/**\n * Overlay of dropdown\n *\n * Wrap your ActionList within this component\n */\nconst _DropdownOverlay = ({ children, testID }: DropdownOverlayProps): React.ReactElement => {\n const { isOpen, close } = useDropdown();\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n\n return (\n <BaseBox position=\"relative\">\n <StyledCloseableArea\n display={isOpen ? 'flex' : 'none'}\n onPress={() => {\n close();\n }}\n testID=\"closeable-area\"\n >\n <AnimatedDropdownOverlay\n isInBottomSheet={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet}\n display={isOpen ? 'flex' : 'none'}\n position=\"absolute\"\n width=\"100%\"\n testID=\"dropdown-overlay\"\n elevation={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet ? undefined : 'midRaised'}\n {...metaAttribute({ name: MetaConstants.DropdownOverlay, testID })}\n >\n {children}\n </AnimatedDropdownOverlay>\n </StyledCloseableArea>\n </BaseBox>\n );\n};\n\nconst DropdownOverlay = assignWithoutSideEffects(_DropdownOverlay, {\n componentId: dropdownComponentIds.DropdownOverlay,\n});\n\nexport { DropdownOverlay };\n"],"names":["AnimatedDropdownOverlay","styled","StyledDropdownOverlay","props","transform","makeSize","theme","spacing","StyledCloseableArea","Pressable","position","height","width","display","_DropdownOverlay","_ref","children","testID","_useDropdown","useDropdown","isOpen","close","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","_jsx","BaseBox","onPress","Object","assign","isInBottomSheet","dropdownHasBottomSheet","elevation","undefined","metaAttribute","name","MetaConstants","DropdownOverlay","assignWithoutSideEffects","componentId","dropdownComponentIds"],"mappings":";;;;;;;;;;;;;;;;AAaA,IAAMA,uBAAuB,CAAGC,MAAM,CAACC,qBAAqB,CAAC,CAC3D,SAACC,KAAK,CAAM,CAAA,OAAA,CACVC,SAAS,CAAE,CAAA,WAAA,EAAcC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA,CAAA,CAC3D,CAAC,CAAA,CACH,CAAC,CAED,IAAMC,mBAAmB,CAAGP,MAAM,CAACQ,SAAS,CAAC,CAA+B,SAACN,KAAK,CAAM,CAAA,OAAA,CACtFO,QAAQ,CAAE,QAAQ,CAClBC,MAAM,CAAE,MAAM,CACdC,KAAK,CAAE,MAAM,CACbC,OAAO,CAAEV,KAAK,CAACU,OACjB,CAAC,CAAA,CAAC,CAAC,CAOH,IAAMC,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAAuE,CAAjE,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CAC1C,IAAAC,YAAA,CAA0BC,WAAW,EAAE,CAA/BC,MAAM,CAAAF,YAAA,CAANE,MAAM,CAAEC,KAAK,CAAAH,YAAA,CAALG,KAAK,CACrB,IAAMC,0BAA0B,CAAGC,6BAA6B,EAAE,CAElE,OACEC,GAAA,CAACC,OAAO,CAAA,CAACf,QAAQ,CAAC,UAAU,CAAAM,QAAA,CAC1BQ,GAAA,CAAChB,mBAAmB,EAClBK,OAAO,CAAEO,MAAM,CAAG,MAAM,CAAG,MAAO,CAClCM,OAAO,CAAE,SAAAA,OAAA,EAAM,CACbL,KAAK,EAAE,CACT,CAAE,CACFJ,MAAM,CAAC,gBAAgB,CAAAD,QAAA,CAEvBQ,GAAA,CAACxB,uBAAuB,CAAA2B,MAAA,CAAAC,MAAA,CACtBC,CAAAA,eAAe,CAAEP,0BAA0B,cAA1BA,0BAA0B,CAAEQ,sBAAuB,CACpEjB,OAAO,CAAEO,MAAM,CAAG,MAAM,CAAG,MAAO,CAClCV,QAAQ,CAAC,UAAU,CACnBE,KAAK,CAAC,MAAM,CACZK,MAAM,CAAC,kBAAkB,CACzBc,SAAS,CAAET,0BAA0B,EAAA,IAAA,EAA1BA,0BAA0B,CAAEQ,sBAAsB,CAAGE,SAAS,CAAG,WAAY,CACpFC,CAAAA,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,eAAe,CAAEnB,MAAM,CAANA,MAAO,CAAC,CAAC,CAAA,CAAAD,QAAA,CAEjEA,QAAQ,CACc,CAAA,CAAC,CACP,CAAC,CACf,CAAC,CAEd,CAAC,CAEK,IAAAoB,eAAe,CAAGC,wBAAwB,CAACvB,gBAAgB,CAAE,CACjEwB,WAAW,CAAEC,oBAAoB,CAACH,eACpC,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdownUtils.js","sources":["../../../../../src/components/Dropdown/dropdownUtils.ts"],"sourcesContent":["/*\n * This content is licensed according to the W3C Software License at\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n * This software or document includes material copied from or derived from\n * https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html.\n * Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang)\n */\n\nimport type { DropdownContextType, OptionsType } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport type { SpacingValueType } from '~components/Box/BaseBox';\n\nexport type SelectActionsType =\n | 'Close'\n | 'CloseSelect'\n | 'First'\n | 'Last'\n | 'Next'\n | 'Open'\n | 'PageDown'\n | 'PageUp'\n | 'Previous'\n | 'Select'\n | 'Type';\n\n// Save a list of named combobox actions, for future readability\nconst SelectActions: Record<SelectActionsType, SelectActionsType> = {\n Close: 'Close',\n CloseSelect: 'CloseSelect',\n First: 'First',\n Last: 'Last',\n Next: 'Next',\n Open: 'Open',\n PageDown: 'PageDown',\n PageUp: 'PageUp',\n Previous: 'Previous',\n Select: 'Select',\n Type: 'Type',\n};\n\n/**\n * Filter an array of options against an input string\n * returns an array of options that begin with the filter string, case-independent\n *\n */\nexport function filterOptions(\n options: string[] = [],\n filter: string,\n exclude: string[] = [],\n): string[] {\n return options.filter((option) => {\n const matches = option.toLowerCase().startsWith(filter.toLowerCase());\n return matches && !exclude.includes(option);\n });\n}\n\n/**\n * Map a keypress to action\n */\nexport function getActionFromKey(\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n isOpen: boolean,\n dropdownTriggerer: DropdownContextType['dropdownTriggerer'],\n): SelectActionsType | undefined {\n if (!e) {\n return undefined;\n }\n\n const { altKey, ctrlKey, metaKey } = e;\n let key = '';\n if ('key' in e) {\n key = e.key;\n }\n const openKeys = ['ArrowDown', 'ArrowUp', 'Enter', ' ']; // all keys that will do the default open action\n if (!key) return undefined;\n // handle opening when closed\n if (!isOpen && key && openKeys.includes(key)) {\n return SelectActions.Open;\n }\n\n // home and end move the selected option when open or closed\n if (key === 'Home') {\n return SelectActions.First;\n }\n if (key === 'End') {\n return SelectActions.Last;\n }\n\n // handle typing characters when open or closed\n if (\n key === 'Backspace' ||\n key === 'Clear' ||\n (key.length === 1 && key !== ' ' && !altKey && !ctrlKey && !metaKey)\n ) {\n return SelectActions.Type;\n }\n\n // handle keys when open\n if (isOpen) {\n if (key === 'ArrowUp' && altKey) {\n return SelectActions.CloseSelect;\n } else if (key === 'ArrowDown' && !altKey) {\n return SelectActions.Next;\n } else if (key === 'ArrowUp') {\n return SelectActions.Previous;\n } else if (key === 'PageUp') {\n return SelectActions.PageUp;\n } else if (key === 'PageDown') {\n return SelectActions.PageDown;\n } else if (key === 'Escape') {\n return SelectActions.Close;\n } else if (\n key === 'Enter' ||\n // we ignore the spacebar select in autocomplete since hitting spacebar might be expected while typing\n (dropdownTriggerer !== dropdownComponentIds.triggers.AutoComplete &&\n dropdownTriggerer !== dropdownComponentIds.triggers.SearchInput &&\n key === ' ')\n ) {\n return SelectActions.CloseSelect;\n }\n }\n\n return undefined;\n}\n\n/**\n * Return the index of an option from an array of options, based on a search string\n *\n * if the filter is multiple iterations of the same letter (e.g \"aaa\"), then cycle through first-letter matches\n **/\nexport function getIndexByLetter(options: string[], filter: string, startIndex = 0): number {\n const orderedOptions = [...options.slice(startIndex), ...options.slice(0, startIndex)];\n const firstMatch = filterOptions(orderedOptions, filter)[0];\n const allSameLetter = (array: string[]): boolean => array.every((letter) => letter === array[0]);\n\n // first check if there is an exact match for the typed string\n if (firstMatch) {\n return options.indexOf(firstMatch);\n }\n\n // if the same letter is being repeated, cycle through first-letter matches\n else if (allSameLetter(filter.split(''))) {\n const matches = filterOptions(orderedOptions, filter[0]);\n return options.indexOf(matches[0]);\n }\n\n // if no matches, return -1\n else {\n return -1;\n }\n}\n\n/**\n * This functions makes sure the optionsIndex is not going out of possible options\n */\nexport function getUpdatedIndex({\n currentIndex,\n maxIndex,\n actionType,\n}: {\n currentIndex: number;\n maxIndex: number;\n actionType: SelectActionsType;\n}): number {\n // On PageUP or PageDown, we jump focus by 10 items or to the first or last element\n // Details: https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html#:~:text=PageUp,to%20last%20option).\n const pageSize = 10;\n\n switch (actionType) {\n case SelectActions.First:\n return 0;\n case SelectActions.Last:\n return maxIndex;\n case SelectActions.Previous:\n return Math.max(0, currentIndex - 1);\n case SelectActions.Next:\n return Math.min(maxIndex, currentIndex + 1);\n case SelectActions.PageUp:\n return Math.max(0, currentIndex - pageSize);\n case SelectActions.PageDown:\n return Math.min(maxIndex, currentIndex + pageSize);\n default:\n return currentIndex;\n }\n}\n\n/**\n * Checks if the given HTML element is visible on screen\n */\nexport function isElementVisibleOnScreen(element: HTMLElement): boolean {\n const bounding = element.getBoundingClientRect();\n\n return (\n bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n}\n\n/**\n * Checks if element is visible inside the given container\n */\nfunction isElementVisible(container: HTMLElement, element: HTMLElement): boolean {\n const containerRect = container.getBoundingClientRect();\n const elementRect = element.getBoundingClientRect();\n\n const isVerticalVisible =\n elementRect.top >= containerRect.top && elementRect.bottom <= containerRect.bottom;\n\n return isVerticalVisible;\n}\n\n/**\n * Checks if the dropdown is scrollable\n */\nexport function isScrollable(element: HTMLElement): boolean {\n return element && element.clientHeight < element.scrollHeight;\n}\n\ntype ActionsType = {\n setIsOpen: DropdownContextType['setIsOpen'];\n close: DropdownContextType['close'];\n selectCurrentOption: () => void;\n onOptionChange: (action: SelectActionsType) => void;\n onComboType: (letter: string, action: SelectActionsType) => void;\n};\n/**\n * Performs the action when actionType is passed\n *\n * This function handles all the keydown actions.\n */\nexport const performAction = (\n action: SelectActionsType,\n payload: {\n event: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>;\n },\n actions: ActionsType,\n): boolean => {\n const { event } = payload;\n\n switch (action) {\n case SelectActions.Last:\n // @ts-expect-error: intentional fallthrough, ignoring the warning\n case SelectActions.First:\n actions.setIsOpen(true);\n // intentional fallthrough\n case SelectActions.Next:\n case SelectActions.Previous:\n case SelectActions.PageUp:\n case SelectActions.PageDown:\n event.preventDefault();\n actions.onOptionChange(action);\n return true;\n case SelectActions.CloseSelect:\n event.preventDefault();\n actions.selectCurrentOption();\n return true;\n case SelectActions.Close:\n event.preventDefault();\n actions.close();\n return true;\n case SelectActions.Type:\n actions.onComboType(event.key, action);\n return true;\n case SelectActions.Open:\n event.preventDefault();\n actions.setIsOpen(true);\n return true;\n\n default:\n break;\n }\n\n return false;\n};\n\n/**\n * When options list is large, it can have a scrollbar.\n *\n * This function ensures the active option is always in the viewport\n */\nexport const ensureScrollVisiblity = (\n newActiveIndex: number,\n containerElement: HTMLElement | null,\n options: string[],\n): void => {\n // ensure the new option is in view\n if (containerElement) {\n if (isScrollable(containerElement)) {\n const optionEl = containerElement.querySelectorAll<HTMLElement>(\n '[role=\"option\"], [role=\"menuitem\"]',\n );\n // Making sure its the same element as the one from options state\n if (\n newActiveIndex >= 0 &&\n optionEl[newActiveIndex].dataset.value === options[newActiveIndex]\n ) {\n const activeElement = optionEl[newActiveIndex];\n\n if (!isElementVisible(containerElement, activeElement)) {\n activeElement.scrollIntoView({ inline: 'nearest' });\n }\n\n if (!isElementVisibleOnScreen(optionEl[newActiveIndex])) {\n activeElement.scrollIntoView({ behavior: 'smooth' });\n }\n }\n }\n }\n};\n\n/**\n * value that is set in the actual form input\n */\nexport const makeInputValue = (selectedIndices: number[], options: OptionsType): string => {\n if (options.length === 0) {\n return '';\n }\n return selectedIndices.map((selectedIndex) => options[selectedIndex]?.value).join(', ');\n};\n\n/**\n * Value that is displayed inside the select field\n */\nexport const makeInputDisplayValue = (selectedIndices: number[], options: OptionsType): string => {\n // When no item is selected or no item is present\n if (options.length === 0 || selectedIndices.length === 0) {\n return '';\n }\n\n // When one item is selected, we display that item's title in input\n if (selectedIndices.length === 1) {\n return options[selectedIndices[0]]?.title;\n }\n\n // When more than one item is selected, we display the count of items\n return `${selectedIndices.length} items selected`;\n};\n\nexport type DropdownPosition = {\n top?: SpacingValueType;\n bottom?: SpacingValueType;\n left?: SpacingValueType;\n right?: SpacingValueType;\n};\n"],"names":["SelectActions","Close","CloseSelect","First","Last","Next","Open","PageDown","PageUp","Previous","Select","Type","filterOptions","options","arguments","length","undefined","filter","exclude","option","matches","toLowerCase","startsWith","includes","getActionFromKey","e","isOpen","dropdownTriggerer","altKey","ctrlKey","metaKey","key","openKeys","dropdownComponentIds","triggers","AutoComplete","SearchInput","getIndexByLetter","startIndex","orderedOptions","concat","_toConsumableArray","slice","firstMatch","allSameLetter","array","every","letter","indexOf","split","getUpdatedIndex","_ref","currentIndex","maxIndex","actionType","pageSize","Math","max","min","isElementVisibleOnScreen","element","bounding","getBoundingClientRect","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","isElementVisible","container","containerRect","elementRect","isVerticalVisible","isScrollable","scrollHeight","performAction","action","payload","actions","event","setIsOpen","preventDefault","onOptionChange","selectCurrentOption","close","onComboType","ensureScrollVisiblity","newActiveIndex","containerElement","optionEl","querySelectorAll","dataset","value","activeElement","scrollIntoView","inline","behavior","makeInputValue","selectedIndices","map","selectedIndex","_options$selectedInde","join","makeInputDisplayValue","_options$selectedIndi","title"],"mappings":";;;AA2BA,IAAMA,aAA2D,CAAG,CAClEC,KAAK,CAAE,OAAO,CACdC,WAAW,CAAE,aAAa,CAC1BC,KAAK,CAAE,OAAO,CACdC,IAAI,CAAE,MAAM,CACZC,IAAI,CAAE,MAAM,CACZC,IAAI,CAAE,MAAM,CACZC,QAAQ,CAAE,UAAU,CACpBC,MAAM,CAAE,QAAQ,CAChBC,QAAQ,CAAE,UAAU,CACpBC,MAAM,CAAE,QAAQ,CAChBC,IAAI,CAAE,MACR,CAAC,CAOe,SAAAC,aAAaA,EAIjB,CAHV,IAAAC,OAAiB,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,GAAAE,SAAA,CAAAF,SAAA,CAAG,CAAA,CAAA,CAAA,EAAE,C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,CAAC2F,eAAe,CAAC,CAAC,CAAC,CAAC,GAAA,IAAA,CAAA,KAAA,CAAA,CAA3BM,qBAAA,CAA6BC,KAAK,CAC3C,CAGA,OAAQ,CAAEP,EAAAA,eAAe,CAACzF,MAAO,CAAA,eAAA,CAAgB,CACnD;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdownUtils.js","sources":["../../../../../src/components/Dropdown/dropdownUtils.ts"],"sourcesContent":["/*\n * This content is licensed according to the W3C Software License at\n * https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n * This software or document includes material copied from or derived from\n * https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html.\n * Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang)\n */\n\nimport type { DropdownContextType, OptionsType } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport type { SpacingValueType } from '~components/Box/BaseBox';\n\nexport type SelectActionsType =\n | 'Close'\n | 'CloseSelect'\n | 'First'\n | 'Last'\n | 'Next'\n | 'Open'\n | 'PageDown'\n | 'PageUp'\n | 'Previous'\n | 'Select'\n | 'Type';\n\n// Save a list of named combobox actions, for future readability\nconst SelectActions: Record<SelectActionsType, SelectActionsType> = {\n Close: 'Close',\n CloseSelect: 'CloseSelect',\n First: 'First',\n Last: 'Last',\n Next: 'Next',\n Open: 'Open',\n PageDown: 'PageDown',\n PageUp: 'PageUp',\n Previous: 'Previous',\n Select: 'Select',\n Type: 'Type',\n};\n\n/**\n * Filter an array of options against an input string\n * returns an array of options that begin with the filter string, case-independent\n *\n */\nexport function filterOptions(\n options: string[] = [],\n filter: string,\n exclude: string[] = [],\n): string[] {\n return options.filter((option) => {\n const matches = option.toLowerCase().startsWith(filter.toLowerCase());\n return matches && !exclude.includes(option);\n });\n}\n\n/**\n * Map a keypress to action\n */\nexport function getActionFromKey(\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n isOpen: boolean,\n dropdownTriggerer: DropdownContextType['dropdownTriggerer'],\n): SelectActionsType | undefined {\n if (!e) {\n return undefined;\n }\n\n const { altKey, ctrlKey, metaKey } = e;\n let key = '';\n if ('key' in e) {\n key = e.key;\n }\n const openKeys = ['ArrowDown', 'ArrowUp', 'Enter', ' ']; // all keys that will do the default open action\n if (!key) return undefined;\n // handle opening when closed\n if (!isOpen && key && openKeys.includes(key)) {\n return SelectActions.Open;\n }\n\n // home and end move the selected option when open or closed\n if (key === 'Home') {\n return SelectActions.First;\n }\n if (key === 'End') {\n return SelectActions.Last;\n }\n\n // handle typing characters when open or closed\n if (\n key === 'Backspace' ||\n key === 'Clear' ||\n (key.length === 1 && key !== ' ' && !altKey && !ctrlKey && !metaKey)\n ) {\n return SelectActions.Type;\n }\n\n // handle keys when open\n if (isOpen) {\n if (key === 'ArrowUp' && altKey) {\n return SelectActions.CloseSelect;\n } else if (key === 'ArrowDown' && !altKey) {\n return SelectActions.Next;\n } else if (key === 'ArrowUp') {\n return SelectActions.Previous;\n } else if (key === 'PageUp') {\n return SelectActions.PageUp;\n } else if (key === 'PageDown') {\n return SelectActions.PageDown;\n } else if (key === 'Escape') {\n return SelectActions.Close;\n } else if (\n key === 'Enter' ||\n // we ignore the spacebar select in autocomplete since hitting spacebar might be expected while typing\n (dropdownTriggerer !== dropdownComponentIds.triggers.AutoComplete &&\n dropdownTriggerer !== dropdownComponentIds.triggers.SearchInput &&\n key === ' ')\n ) {\n return SelectActions.CloseSelect;\n }\n }\n\n return undefined;\n}\n\n/**\n * Return the index of an option from an array of options, based on a search string\n *\n * if the filter is multiple iterations of the same letter (e.g \"aaa\"), then cycle through first-letter matches\n **/\nexport function getIndexByLetter(options: string[], filter: string, startIndex = 0): number {\n const orderedOptions = [...options.slice(startIndex), ...options.slice(0, startIndex)];\n const firstMatch = filterOptions(orderedOptions, filter)[0];\n const allSameLetter = (array: string[]): boolean => array.every((letter) => letter === array[0]);\n\n // first check if there is an exact match for the typed string\n if (firstMatch) {\n return options.indexOf(firstMatch);\n }\n\n // if the same letter is being repeated, cycle through first-letter matches\n else if (allSameLetter(filter.split(''))) {\n const matches = filterOptions(orderedOptions, filter[0]);\n return options.indexOf(matches[0]);\n }\n\n // if no matches, return -1\n else {\n return -1;\n }\n}\n\n/**\n * This functions makes sure the optionsIndex is not going out of possible options\n */\nexport function getUpdatedIndex({\n currentIndex,\n maxIndex,\n actionType,\n}: {\n currentIndex: number;\n maxIndex: number;\n actionType: SelectActionsType;\n}): number {\n // On PageUP or PageDown, we jump focus by 10 items or to the first or last element\n // Details: https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html#:~:text=PageUp,to%20last%20option).\n const pageSize = 10;\n\n switch (actionType) {\n case SelectActions.First:\n return 0;\n case SelectActions.Last:\n return maxIndex;\n case SelectActions.Previous:\n return Math.max(0, currentIndex - 1);\n case SelectActions.Next:\n return Math.min(maxIndex, currentIndex + 1);\n case SelectActions.PageUp:\n return Math.max(0, currentIndex - pageSize);\n case SelectActions.PageDown:\n return Math.min(maxIndex, currentIndex + pageSize);\n default:\n return currentIndex;\n }\n}\n\n/**\n * Checks if the given HTML element is visible on screen\n */\nexport function isElementVisibleOnScreen(element: HTMLElement): boolean {\n const bounding = element.getBoundingClientRect();\n\n return (\n bounding.top >= 0 &&\n bounding.left >= 0 &&\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n}\n\n/**\n * Checks if element is visible inside the given container\n */\nfunction isElementVisible(container: HTMLElement, element: HTMLElement): boolean {\n const containerRect = container.getBoundingClientRect();\n const elementRect = element.getBoundingClientRect();\n\n const isVerticalVisible =\n elementRect.top >= containerRect.top && elementRect.bottom <= containerRect.bottom;\n\n return isVerticalVisible;\n}\n\n/**\n * Checks if the dropdown is scrollable\n */\nexport function isScrollable(element: HTMLElement): boolean {\n return element && element.clientHeight < element.scrollHeight;\n}\n\ntype ActionsType = {\n setIsOpen: DropdownContextType['setIsOpen'];\n close: DropdownContextType['close'];\n selectCurrentOption: () => void;\n onOptionChange: (action: SelectActionsType) => void;\n onComboType: (letter: string, action: SelectActionsType) => void;\n};\n/**\n * Performs the action when actionType is passed\n *\n * This function handles all the keydown actions.\n */\nexport const performAction = (\n action: SelectActionsType,\n payload: {\n event: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>;\n },\n actions: ActionsType,\n): boolean => {\n const { event } = payload;\n\n switch (action) {\n case SelectActions.Last:\n // @ts-expect-error: intentional fallthrough, ignoring the warning\n case SelectActions.First:\n actions.setIsOpen(true);\n // intentional fallthrough\n case SelectActions.Next:\n case SelectActions.Previous:\n case SelectActions.PageUp:\n case SelectActions.PageDown:\n event.preventDefault();\n actions.onOptionChange(action);\n return true;\n case SelectActions.CloseSelect:\n event.preventDefault();\n actions.selectCurrentOption();\n return true;\n case SelectActions.Close:\n event.preventDefault();\n actions.close();\n return true;\n case SelectActions.Type:\n actions.onComboType(event.key, action);\n return true;\n case SelectActions.Open:\n event.preventDefault();\n actions.setIsOpen(true);\n return true;\n\n default:\n break;\n }\n\n return false;\n};\n\n/**\n * When options list is large, it can have a scrollbar.\n *\n * This function ensures the active option is always in the viewport\n */\nexport const ensureScrollVisiblity = (\n newActiveIndex: number,\n containerElement: HTMLElement | null,\n options: string[],\n): void => {\n // ensure the new option is in view\n if (containerElement) {\n if (isScrollable(containerElement)) {\n const optionEl = containerElement.querySelectorAll<HTMLElement>(\n '[role=\"option\"], [role=\"menuitem\"]',\n );\n // Making sure its the same element as the one from options state\n if (\n newActiveIndex >= 0 &&\n optionEl[newActiveIndex].dataset.value === options[newActiveIndex]\n ) {\n const activeElement = optionEl[newActiveIndex];\n\n if (!isElementVisible(containerElement, activeElement)) {\n activeElement.scrollIntoView({ inline: 'nearest' });\n }\n\n if (!isElementVisibleOnScreen(optionEl[newActiveIndex])) {\n activeElement.scrollIntoView({ behavior: 'smooth' });\n }\n }\n }\n }\n};\n\n/**\n * value that is set in the actual form input\n */\nexport const makeInputValue = (selectedIndices: number[], options: OptionsType): string => {\n if (options.length === 0) {\n return '';\n }\n return selectedIndices.map((selectedIndex) => options[selectedIndex]?.value).join(', ');\n};\n\n/**\n * Value that is displayed inside the select field\n */\nexport const makeInputDisplayValue = (selectedIndices: number[], options: OptionsType): string => {\n // When no item is selected or no item is present\n if (options.length === 0 || selectedIndices.length === 0) {\n return '';\n }\n\n // When one item is selected, we display that item's title in input\n if (selectedIndices.length === 1) {\n return options[selectedIndices[0]]?.title;\n }\n\n // When more than one item is selected, we display the count of items\n return `${selectedIndices.length} items selected`;\n};\n\nexport type DropdownPosition = {\n top?: SpacingValueType;\n bottom?: SpacingValueType;\n left?: SpacingValueType;\n right?: SpacingValueType;\n};\n"],"names":["SelectActions","Close","CloseSelect","First","Last","Next","Open","PageDown","PageUp","Previous","Select","Type","filterOptions","options","arguments","length","undefined","filter","exclude","option","matches","toLowerCase","startsWith","includes","getActionFromKey","e","isOpen","dropdownTriggerer","altKey","ctrlKey","metaKey","key","openKeys","dropdownComponentIds","triggers","AutoComplete","SearchInput","getIndexByLetter","startIndex","orderedOptions","concat","_toConsumableArray","slice","firstMatch","allSameLetter","array","every","letter","indexOf","split","getUpdatedIndex","_ref","currentIndex","maxIndex","actionType","pageSize","Math","max","min","isElementVisibleOnScreen","element","bounding","getBoundingClientRect","top","left","bottom","window","innerHeight","document","documentElement","clientHeight","right","innerWidth","clientWidth","isElementVisible","container","containerRect","elementRect","isVerticalVisible","isScrollable","scrollHeight","performAction","action","payload","actions","event","setIsOpen","preventDefault","onOptionChange","selectCurrentOption","close","onComboType","ensureScrollVisiblity","newActiveIndex","containerElement","optionEl","querySelectorAll","dataset","value","activeElement","scrollIntoView","inline","behavior","makeInputValue","selectedIndices","map","selectedIndex","_options$selectedInde","join","makeInputDisplayValue","_options$selectedIndi","title"],"mappings":";;;AA2BA,IAAMA,aAA2D,CAAG,CAClEC,KAAK,CAAE,OAAO,CACdC,WAAW,CAAE,aAAa,CAC1BC,KAAK,CAAE,OAAO,CACdC,IAAI,CAAE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A,CAAA,CAACU,IAAI,CAAC,IAAI,CAAC,CACzF,EAKa,IAAAC,qBAAqB,CAAG,SAAxBA,qBAAqBA,CAAIL,eAAyB,CAAE3F,OAAoB,CAAa,CAEhG,GAAIA,OAAO,CAACE,MAAM,GAAK,CAAC,EAAIyF,eAAe,CAACzF,MAAM,GAAK,CAAC,CAAE,CACxD,OAAO,EAAE,CACX,CAGA,GAAIyF,eAAe,CAACzF,MAAM,GAAK,CAAC,CAAE,CAAA+F,IAAAA,qBAAA,CAChC,OAAA,CAAAA,qBAAA,CAAOjG,OAAO,CAAC2F,eAAe,CAAC,CAAC,CAAC,CAAC,GAAA,IAAA,CAAA,KAAA,CAAA,CAA3BM,qBAAA,CAA6BC,KAAK,CAC3C,CAGA,OAAO,CAAGP,EAAAA,eAAe,CAACzF,MAAM,CAAA,eAAA,CAAiB,CACnD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormId.js","sources":["../../../../../src/components/Form/useFormId.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport { useId } from '~utils/useId';\n\n/**\n * hook to generate unique ids for a form element\n *\n * @param prefix prefix to append before the id\n */\nconst useFormId = (prefix: string) => {\n const baseId = useId(prefix);\n const inputId = useId(`${baseId}-input`);\n const errorTextId = useId(`${baseId}-errortext`);\n const helpTextId = useId(`${baseId}-helptext`);\n const successTextId = useId(`${baseId}-successtext`);\n const labelId = useId(`${baseId}-label`);\n\n return {\n baseId,\n inputId,\n errorTextId,\n helpTextId,\n successTextId,\n labelId,\n };\n};\n\nexport { useFormId };\n"],"names":["useFormId","prefix","baseId","useId","inputId","errorTextId","helpTextId","successTextId","labelId"],"mappings":";;AASM,IAAAA,SAAS,CAAG,SAAZA,SAASA,CAAIC,MAAc,CAAK,CACpC,IAAMC,MAAM,CAAGC,KAAK,CAACF,MAAM,CAAC,CAC5B,IAAMG,OAAO,CAAGD,KAAK,
|
|
1
|
+
{"version":3,"file":"useFormId.js","sources":["../../../../../src/components/Form/useFormId.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport { useId } from '~utils/useId';\n\n/**\n * hook to generate unique ids for a form element\n *\n * @param prefix prefix to append before the id\n */\nconst useFormId = (prefix: string) => {\n const baseId = useId(prefix);\n const inputId = useId(`${baseId}-input`);\n const errorTextId = useId(`${baseId}-errortext`);\n const helpTextId = useId(`${baseId}-helptext`);\n const successTextId = useId(`${baseId}-successtext`);\n const labelId = useId(`${baseId}-label`);\n\n return {\n baseId,\n inputId,\n errorTextId,\n helpTextId,\n successTextId,\n labelId,\n };\n};\n\nexport { useFormId };\n"],"names":["useFormId","prefix","baseId","useId","inputId","errorTextId","helpTextId","successTextId","labelId"],"mappings":";;AASM,IAAAA,SAAS,CAAG,SAAZA,SAASA,CAAIC,MAAc,CAAK,CACpC,IAAMC,MAAM,CAAGC,KAAK,CAACF,MAAM,CAAC,CAC5B,IAAMG,OAAO,CAAGD,KAAK,CAAC,CAAGD,EAAAA,MAAM,CAAQ,MAAA,CAAA,CAAC,CACxC,IAAMG,WAAW,CAAGF,KAAK,CAAC,GAAGD,MAAM,CAAA,UAAA,CAAY,CAAC,CAChD,IAAMI,UAAU,CAAGH,KAAK,CAAC,CAAA,EAAGD,MAAM,CAAA,SAAA,CAAW,CAAC,CAC9C,IAAMK,aAAa,CAAGJ,KAAK,CAAC,CAAGD,EAAAA,MAAM,CAAc,YAAA,CAAA,CAAC,CACpD,IAAMM,OAAO,CAAGL,KAAK,CAAC,CAAGD,EAAAA,MAAM,QAAQ,CAAC,CAExC,OAAO,CACLA,MAAM,CAANA,MAAM,CACNE,OAAO,CAAPA,OAAO,CACPC,WAAW,CAAXA,WAAW,CACXC,UAAU,CAAVA,UAAU,CACVC,aAAa,CAAbA,aAAa,CACbC,OAAO,CAAPA,OACF,CAAC,CACH;;;;"}
|
|
@@ -41,7 +41,7 @@ import { getOuterMotionRef, getInnerMotionRef } from '../../../utils/getMotionRe
|
|
|
41
41
|
import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
42
42
|
import { useInputGroupContext } from '../../InputGroup/InputGroupContext.js';
|
|
43
43
|
|
|
44
|
-
var _excluded=["as","label","labelPosition","placeholder","type","defaultValue","tags","showAllTags","activeTagIndex","setActiveTagIndex","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","size","trailingButton","valueComponentType","isTableInputCell","showHintsAsTooltip","_motionMeta","role","tabIndex","leadingDropDown","trailingDropDown","labelSuffix","labelTrailing"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useTags=function useTags(tags,activeTagIndex,setActiveTagIndex){var visibleTagsCountRef=React__default.useRef(0);React__default.useEffect(function(){if(tags&&activeTagIndex>=0&&activeTagIndex<tags.length){var _tags$activeTagIndex,_tags$activeTagIndex$;var tagTitle=(_tags$activeTagIndex=tags[activeTagIndex])==null?void 0:(_tags$activeTagIndex$=_tags$activeTagIndex.props)==null?void 0:_tags$activeTagIndex$.children;if(tagTitle){announce(`Close ${tagTitle} Tag`);}}},[activeTagIndex,tags==null?void 0:tags.length]);var onTagLeft=function onTagLeft(){if(activeTagIndex<0){setActiveTagIndex==null?void 0:setActiveTagIndex(visibleTagsCountRef.current-1);}if(activeTagIndex>0){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex-1);}};var onTagRight=function onTagRight(){if(activeTagIndex<visibleTagsCountRef.current-1){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex+1);}};var onTagRemove=function onTagRemove(){if(activeTagIndex>=0&&activeTagIndex<visibleTagsCountRef.current&&tags){tags[activeTagIndex].props.onDismiss({tagIndex:activeTagIndex});}};var onInputKeydownTagHandler=function onInputKeydownTagHandler(key){if(tags&&tags.length>0){if(key==='ArrowRight'){onTagRight();}if(key==='ArrowLeft'){onTagLeft();}if(key==='Backspace'){onTagRemove();}}};return {onInputKeydownTagHandler:onInputKeydownTagHandler,visibleTagsCountRef:visibleTagsCountRef};};var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown,onInputKeydownTagHandler=_ref.onInputKeydownTagHandler;if(__DEV__){if(value&&defaultValue){throwBladeError({message:`Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,moduleName:'Input'});}}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onInputKeydownTagHandler(key);onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref10){var validationState=_ref10.validationState,hasErrorText=_ref10.hasErrorText,hasSuccessText=_ref10.hasSuccessText,hasHelpText=_ref10.hasHelpText,errorTextId=_ref10.errorTextId,successTextId=_ref10.successTextId,helpTextId=_ref10.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var FocusRingWrapper=styled(BaseBox)(function(_ref11){var theme=_ref11.theme,currentInteraction=_ref11.currentInteraction,isTableInputCell=_ref11.isTableInputCell;return {borderRadius:makeBorderSize(isTableInputCell?theme.border.radius.none:theme.border.radius.medium),width:'100%','&:focus-within':!isTableInputCell?Object.assign({},getFocusRingStyles(),{transitionDuration:castWebType(makeMotionTime(getIn(theme.motion.duration,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].duration))),transitionTimingFunction:castWebType(theme.motion.easing[baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].easing])}):{}};});var _BaseInput=function _BaseInput(_ref12,ref){var _inputGroupProps$isDi,_inputGroupProps$size;var _ref12$as=_ref12.as,as=_ref12$as===void 0?'input':_ref12$as,label=_ref12.label,_ref12$labelPosition=_ref12.labelPosition,labelPosition=_ref12$labelPosition===void 0?'top':_ref12$labelPosition,placeholder=_ref12.placeholder,_ref12$type=_ref12.type,type=_ref12$type===void 0?'text':_ref12$type,defaultValue=_ref12.defaultValue,tags=_ref12.tags,_ref12$showAllTags=_ref12.showAllTags,showAllTags=_ref12$showAllTags===void 0?false:_ref12$showAllTags,_ref12$activeTagIndex=_ref12.activeTagIndex,activeTagIndex=_ref12$activeTagIndex===void 0?-1:_ref12$activeTagIndex,setActiveTagIndex=_ref12.setActiveTagIndex,name=_ref12.name,value=_ref12.value,onFocus=_ref12.onFocus,onChange=_ref12.onChange,onInput=_ref12.onInput,onBlur=_ref12.onBlur,onSubmit=_ref12.onSubmit,onClick=_ref12.onClick,onKeyDown=_ref12.onKeyDown,isDisabled=_ref12.isDisabled,necessityIndicator=_ref12.necessityIndicator,validationState=_ref12.validationState,errorText=_ref12.errorText,helpText=_ref12.helpText,successText=_ref12.successText,isRequired=_ref12.isRequired,leadingIcon=_ref12.leadingIcon,prefix=_ref12.prefix,trailingInteractionElement=_ref12.trailingInteractionElement,onTrailingInteractionElementClick=_ref12.onTrailingInteractionElementClick,leadingInteractionElement=_ref12.leadingInteractionElement,suffix=_ref12.suffix,trailingIcon=_ref12.trailingIcon,maxCharacters=_ref12.maxCharacters,textAlign=_ref12.textAlign,autoFocus=_ref12.autoFocus,keyboardReturnKeyType=_ref12.keyboardReturnKeyType,keyboardType=_ref12.keyboardType,autoCompleteSuggestionType=_ref12.autoCompleteSuggestionType,trailingHeaderSlot=_ref12.trailingHeaderSlot,trailingFooterSlot=_ref12.trailingFooterSlot,numberOfLines=_ref12.numberOfLines,id=_ref12.id,componentName=_ref12.componentName,accessibilityLabel=_ref12.accessibilityLabel,labelId=_ref12.labelId,activeDescendant=_ref12.activeDescendant,hideLabelText=_ref12.hideLabelText,hideFormHint=_ref12.hideFormHint,hasPopup=_ref12.hasPopup,popupId=_ref12.popupId,isPopupExpanded=_ref12.isPopupExpanded,maxTagRows=_ref12.maxTagRows,shouldIgnoreBlurAnimation=_ref12.shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation=_ref12.setShouldIgnoreBlurAnimation,autoCapitalize=_ref12.autoCapitalize,setInputWrapperRef=_ref12.setInputWrapperRef,testID=_ref12.testID,isDropdownTrigger=_ref12.isDropdownTrigger,isLabelInsideInput=_ref12.isLabelInsideInput,_ref12$size=_ref12.size,size=_ref12$size===void 0?'medium':_ref12$size,trailingButton=_ref12.trailingButton,_ref12$valueComponent=_ref12.valueComponentType,valueComponentType=_ref12$valueComponent===void 0?'text':_ref12$valueComponent,_ref12$isTableInputCe=_ref12.isTableInputCell,isTableInputCell=_ref12$isTableInputCe===void 0?false:_ref12$isTableInputCe,_ref12$showHintsAsToo=_ref12.showHintsAsTooltip,showHintsAsTooltip=_ref12$showHintsAsToo===void 0?false:_ref12$showHintsAsToo,_motionMeta=_ref12._motionMeta,role=_ref12.role,tabIndex=_ref12.tabIndex,leadingDropDown=_ref12.leadingDropDown,trailingDropDown=_ref12.trailingDropDown,labelSuffix=_ref12.labelSuffix,labelTrailing=_ref12.labelTrailing,rest=_objectWithoutProperties(_ref12,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var inputRef=React__default.useRef(null);var mergedInputRef=useMergeRefs(ref,inputRef);var inputWrapperRef=React__default.useRef(null);var _useTags=useTags(tags,activeTagIndex,setActiveTagIndex),onInputKeydownTagHandler=_useTags.onInputKeydownTagHandler,visibleTagsCountRef=_useTags.visibleTagsCountRef;var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),showAllTagsWithAnimation=_React$useState4[0],setShowAllTagsWithAnimation=_React$useState4[1];var isReactNative=getPlatformType()==='react-native';var defaultRole=hasPopup?'combobox':undefined;var inputGroupProps=useInputGroupContext();var isInsideInputGroup=inputGroupProps.isInsideInputGroup;var _isDisabled=(_inputGroupProps$isDi=inputGroupProps.isDisabled)!=null?_inputGroupProps$isDi:isDisabled;var _size=(_inputGroupProps$size=inputGroupProps.size)!=null?_inputGroupProps$size:size;React__default.useEffect(function(){if(showAllTags){setShowAllTagsWithAnimation(true);}else if(maxTagRows!=='expandable'){setShowAllTagsWithAnimation(false);}},[showAllTags,maxTagRows]);var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown,onInputKeydownTagHandler:onInputKeydownTagHandler}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var _isRequired=isRequired||necessityIndicator==='required';var accessibilityProps=makeAccessible({required:Boolean(_isRequired),disabled:Boolean(_isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:role!=null?role:defaultRole,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||validationState==='success'&&Boolean(successText)||validationState==='error'&&Boolean(errorText);if(__DEV__){if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throwBladeError({message:`Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(', ')} but received ${autoCompleteSuggestionType}`,moduleName:'Input'});}}var isTextArea=as==='textarea';return jsxs(BaseBox,Object.assign({ref:getOuterMotionRef({_motionMeta:_motionMeta,ref:ref})},metaAttribute({name:componentName,testID:testID}),getStyledProps(rest),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",width:"100%",children:[!hideLabelText&&!isLabelInsideInput&&label&&!isInsideInputGroup&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea&&isLabelLeftPositioned?'flex-start':undefined,marginY:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,size:_size,labelSuffix:labelSuffix,labelTrailing:labelTrailing,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(value!=null?value:inputValue)]}),jsx(FocusRingWrapper,{currentInteraction:currentInteraction,isTableInputCell:isTableInputCell,className:"focus-ring-wrapper",children:jsxs(BaseInputWrapper,{isDropdownTrigger:isDropdownTrigger,isTextArea:isTextArea,isDisabled:_isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,showAllTags:showAllTags,setShowAllTagsWithAnimation:setShowAllTagsWithAnimation,ref:function ref(refNode){if(refNode){setInputWrapperRef==null?void 0:setInputWrapperRef(refNode);inputWrapperRef.current=refNode;}},maxTagRows:maxTagRows,size:_size,numberOfLines:numberOfLines,onClick:function onClick(){if(!isReactNative){var _inputRef$current;(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus();}},isTableInputCell:isTableInputCell,children:[jsx(BaseInputVisuals,{size:_size,leadingIcon:leadingIcon,prefix:prefix,isDisabled:_isDisabled,leadingInteractionElement:leadingInteractionElement,leadingDropDown:leadingDropDown}),jsx(BaseInputTagSlot,{renderAs:as,tags:tags,isDisabled:_isDisabled,showAllTags:showAllTagsWithAnimation,setFocusOnInput:function setFocusOnInput(){var innerRef=getInnerMotionRef({_motionMeta:_motionMeta,ref:ref});if(innerRef&&!isReactNative&&'current'in innerRef){var _innerRef$current;(_innerRef$current=innerRef.current)==null?void 0:_innerRef$current.focus();}},labelPrefix:isLabelInsideInput?label:undefined,isDropdownTrigger:isDropdownTrigger,visibleTagsCountRef:visibleTagsCountRef,handleOnInputClick:function handleOnInputClick(e){handleOnClick({name:name,value:isReactNative?value:e});},setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,maxTagRows:maxTagRows,inputWrapperRef:inputWrapperRef,size:_size,numberOfLines:numberOfLines,isTextArea:isTextArea,hasLeadingDropDown:Boolean(leadingDropDown),children:jsx(StyledBaseInput,Object.assign({as:as,id:inputId,ref:getInnerMotionRef({_motionMeta:_motionMeta,ref:mergedInputRef}),name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:_isDisabled,validationState:validationState,isRequired:_isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea||maxTagRows==='multiple'||maxTagRows==='expandable',hasPopup:hasPopup,hasTags:!!(tags&&tags.length>0),shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize,isDropdownTrigger:isDropdownTrigger,$size:_size,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell,tabIndex:tabIndex,hasLeadingDropdown:Boolean(leadingDropDown)},metaAttribute({name:MetaConstants.StyledBaseInput}),makeAnalyticsAttribute(rest)))}),jsx(BaseInputVisuals,{trailingInteractionElement:trailingInteractionElement,onTrailingInteractionElementClick:onTrailingInteractionElementClick,suffix:suffix,trailingIcon:trailingIcon,isDisabled:_isDisabled,validationState:validationState,trailingButton:trailingButton,size:_size,errorText:errorText,successText:successText,showHintsAsTooltip:showHintsAsTooltip,trailingDropDown:trailingDropDown})]})})]}),hideFormHint||showHintsAsTooltip||isInsideInputGroup?null:jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned&&!hideLabelText?formHintLeftLabelMarginLeft[_size]:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:_size}),trailingFooterSlot==null?void 0:trailingFooterSlot(value!=null?value:inputValue)]})})]}));};var BaseInputWithRef=React__default.forwardRef(_BaseInput);var BaseInput=assignWithoutSideEffects(BaseInputWithRef,{displayName:'BaseInput'});
|
|
44
|
+
var _excluded=["as","label","labelPosition","placeholder","type","defaultValue","tags","showAllTags","activeTagIndex","setActiveTagIndex","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","size","trailingButton","valueComponentType","isTableInputCell","showHintsAsTooltip","_motionMeta","role","tabIndex","leadingDropDown","trailingDropDown","labelSuffix","labelTrailing"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useTags=function useTags(tags,activeTagIndex,setActiveTagIndex){var visibleTagsCountRef=React__default.useRef(0);React__default.useEffect(function(){if(tags&&activeTagIndex>=0&&activeTagIndex<tags.length){var _tags$activeTagIndex,_tags$activeTagIndex$;var tagTitle=(_tags$activeTagIndex=tags[activeTagIndex])==null?void 0:(_tags$activeTagIndex$=_tags$activeTagIndex.props)==null?void 0:_tags$activeTagIndex$.children;if(tagTitle){announce(`Close ${tagTitle} Tag`);}}},[activeTagIndex,tags==null?void 0:tags.length]);var onTagLeft=function onTagLeft(){if(activeTagIndex<0){setActiveTagIndex==null?void 0:setActiveTagIndex(visibleTagsCountRef.current-1);}if(activeTagIndex>0){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex-1);}};var onTagRight=function onTagRight(){if(activeTagIndex<visibleTagsCountRef.current-1){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex+1);}};var onTagRemove=function onTagRemove(){if(activeTagIndex>=0&&activeTagIndex<visibleTagsCountRef.current&&tags){tags[activeTagIndex].props.onDismiss({tagIndex:activeTagIndex});}};var onInputKeydownTagHandler=function onInputKeydownTagHandler(key){if(tags&&tags.length>0){if(key==='ArrowRight'){onTagRight();}if(key==='ArrowLeft'){onTagLeft();}if(key==='Backspace'){onTagRemove();}}};return {onInputKeydownTagHandler:onInputKeydownTagHandler,visibleTagsCountRef:visibleTagsCountRef};};var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown,onInputKeydownTagHandler=_ref.onInputKeydownTagHandler;if(__DEV__){if(value&&defaultValue){throwBladeError({message:`Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,moduleName:'Input'});}}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onInputKeydownTagHandler(key);onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref0){var validationState=_ref0.validationState,hasErrorText=_ref0.hasErrorText,hasSuccessText=_ref0.hasSuccessText,hasHelpText=_ref0.hasHelpText,errorTextId=_ref0.errorTextId,successTextId=_ref0.successTextId,helpTextId=_ref0.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var FocusRingWrapper=styled(BaseBox)(function(_ref1){var theme=_ref1.theme,currentInteraction=_ref1.currentInteraction,isTableInputCell=_ref1.isTableInputCell;return {borderRadius:makeBorderSize(isTableInputCell?theme.border.radius.none:theme.border.radius.medium),width:'100%','&:focus-within':!isTableInputCell?Object.assign({},getFocusRingStyles(),{transitionDuration:castWebType(makeMotionTime(getIn(theme.motion.duration,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].duration))),transitionTimingFunction:castWebType(theme.motion.easing[baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].easing])}):{}};});var _BaseInput=function _BaseInput(_ref10,ref){var _inputGroupProps$isDi,_inputGroupProps$size;var _ref10$as=_ref10.as,as=_ref10$as===void 0?'input':_ref10$as,label=_ref10.label,_ref10$labelPosition=_ref10.labelPosition,labelPosition=_ref10$labelPosition===void 0?'top':_ref10$labelPosition,placeholder=_ref10.placeholder,_ref10$type=_ref10.type,type=_ref10$type===void 0?'text':_ref10$type,defaultValue=_ref10.defaultValue,tags=_ref10.tags,_ref10$showAllTags=_ref10.showAllTags,showAllTags=_ref10$showAllTags===void 0?false:_ref10$showAllTags,_ref10$activeTagIndex=_ref10.activeTagIndex,activeTagIndex=_ref10$activeTagIndex===void 0?-1:_ref10$activeTagIndex,setActiveTagIndex=_ref10.setActiveTagIndex,name=_ref10.name,value=_ref10.value,onFocus=_ref10.onFocus,onChange=_ref10.onChange,onInput=_ref10.onInput,onBlur=_ref10.onBlur,onSubmit=_ref10.onSubmit,onClick=_ref10.onClick,onKeyDown=_ref10.onKeyDown,isDisabled=_ref10.isDisabled,necessityIndicator=_ref10.necessityIndicator,validationState=_ref10.validationState,errorText=_ref10.errorText,helpText=_ref10.helpText,successText=_ref10.successText,isRequired=_ref10.isRequired,leadingIcon=_ref10.leadingIcon,prefix=_ref10.prefix,trailingInteractionElement=_ref10.trailingInteractionElement,onTrailingInteractionElementClick=_ref10.onTrailingInteractionElementClick,leadingInteractionElement=_ref10.leadingInteractionElement,suffix=_ref10.suffix,trailingIcon=_ref10.trailingIcon,maxCharacters=_ref10.maxCharacters,textAlign=_ref10.textAlign,autoFocus=_ref10.autoFocus,keyboardReturnKeyType=_ref10.keyboardReturnKeyType,keyboardType=_ref10.keyboardType,autoCompleteSuggestionType=_ref10.autoCompleteSuggestionType,trailingHeaderSlot=_ref10.trailingHeaderSlot,trailingFooterSlot=_ref10.trailingFooterSlot,numberOfLines=_ref10.numberOfLines,id=_ref10.id,componentName=_ref10.componentName,accessibilityLabel=_ref10.accessibilityLabel,labelId=_ref10.labelId,activeDescendant=_ref10.activeDescendant,hideLabelText=_ref10.hideLabelText,hideFormHint=_ref10.hideFormHint,hasPopup=_ref10.hasPopup,popupId=_ref10.popupId,isPopupExpanded=_ref10.isPopupExpanded,maxTagRows=_ref10.maxTagRows,shouldIgnoreBlurAnimation=_ref10.shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation=_ref10.setShouldIgnoreBlurAnimation,autoCapitalize=_ref10.autoCapitalize,setInputWrapperRef=_ref10.setInputWrapperRef,testID=_ref10.testID,isDropdownTrigger=_ref10.isDropdownTrigger,isLabelInsideInput=_ref10.isLabelInsideInput,_ref10$size=_ref10.size,size=_ref10$size===void 0?'medium':_ref10$size,trailingButton=_ref10.trailingButton,_ref10$valueComponent=_ref10.valueComponentType,valueComponentType=_ref10$valueComponent===void 0?'text':_ref10$valueComponent,_ref10$isTableInputCe=_ref10.isTableInputCell,isTableInputCell=_ref10$isTableInputCe===void 0?false:_ref10$isTableInputCe,_ref10$showHintsAsToo=_ref10.showHintsAsTooltip,showHintsAsTooltip=_ref10$showHintsAsToo===void 0?false:_ref10$showHintsAsToo,_motionMeta=_ref10._motionMeta,role=_ref10.role,tabIndex=_ref10.tabIndex,leadingDropDown=_ref10.leadingDropDown,trailingDropDown=_ref10.trailingDropDown,labelSuffix=_ref10.labelSuffix,labelTrailing=_ref10.labelTrailing,rest=_objectWithoutProperties(_ref10,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var inputRef=React__default.useRef(null);var mergedInputRef=useMergeRefs(ref,inputRef);var inputWrapperRef=React__default.useRef(null);var _useTags=useTags(tags,activeTagIndex,setActiveTagIndex),onInputKeydownTagHandler=_useTags.onInputKeydownTagHandler,visibleTagsCountRef=_useTags.visibleTagsCountRef;var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),showAllTagsWithAnimation=_React$useState4[0],setShowAllTagsWithAnimation=_React$useState4[1];var isReactNative=getPlatformType()==='react-native';var defaultRole=hasPopup?'combobox':undefined;var inputGroupProps=useInputGroupContext();var isInsideInputGroup=inputGroupProps.isInsideInputGroup;var _isDisabled=(_inputGroupProps$isDi=inputGroupProps.isDisabled)!=null?_inputGroupProps$isDi:isDisabled;var _size=(_inputGroupProps$size=inputGroupProps.size)!=null?_inputGroupProps$size:size;React__default.useEffect(function(){if(showAllTags){setShowAllTagsWithAnimation(true);}else if(maxTagRows!=='expandable'){setShowAllTagsWithAnimation(false);}},[showAllTags,maxTagRows]);var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown,onInputKeydownTagHandler:onInputKeydownTagHandler}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var _isRequired=isRequired||necessityIndicator==='required';var accessibilityProps=makeAccessible({required:Boolean(_isRequired),disabled:Boolean(_isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:role!=null?role:defaultRole,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||validationState==='success'&&Boolean(successText)||validationState==='error'&&Boolean(errorText);if(__DEV__){if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throwBladeError({message:`Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(', ')} but received ${autoCompleteSuggestionType}`,moduleName:'Input'});}}var isTextArea=as==='textarea';return jsxs(BaseBox,Object.assign({ref:getOuterMotionRef({_motionMeta:_motionMeta,ref:ref})},metaAttribute({name:componentName,testID:testID}),getStyledProps(rest),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",width:"100%",children:[!hideLabelText&&!isLabelInsideInput&&label&&!isInsideInputGroup&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea&&isLabelLeftPositioned?'flex-start':undefined,marginY:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,size:_size,labelSuffix:labelSuffix,labelTrailing:labelTrailing,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(value!=null?value:inputValue)]}),jsx(FocusRingWrapper,{currentInteraction:currentInteraction,isTableInputCell:isTableInputCell,className:"focus-ring-wrapper",children:jsxs(BaseInputWrapper,{isDropdownTrigger:isDropdownTrigger,isTextArea:isTextArea,isDisabled:_isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,showAllTags:showAllTags,setShowAllTagsWithAnimation:setShowAllTagsWithAnimation,ref:function ref(refNode){if(refNode){setInputWrapperRef==null?void 0:setInputWrapperRef(refNode);inputWrapperRef.current=refNode;}},maxTagRows:maxTagRows,size:_size,numberOfLines:numberOfLines,onClick:function onClick(){if(!isReactNative){var _inputRef$current;(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus();}},isTableInputCell:isTableInputCell,children:[jsx(BaseInputVisuals,{size:_size,leadingIcon:leadingIcon,prefix:prefix,isDisabled:_isDisabled,leadingInteractionElement:leadingInteractionElement,leadingDropDown:leadingDropDown}),jsx(BaseInputTagSlot,{renderAs:as,tags:tags,isDisabled:_isDisabled,showAllTags:showAllTagsWithAnimation,setFocusOnInput:function setFocusOnInput(){var innerRef=getInnerMotionRef({_motionMeta:_motionMeta,ref:ref});if(innerRef&&!isReactNative&&'current'in innerRef){var _innerRef$current;(_innerRef$current=innerRef.current)==null?void 0:_innerRef$current.focus();}},labelPrefix:isLabelInsideInput?label:undefined,isDropdownTrigger:isDropdownTrigger,visibleTagsCountRef:visibleTagsCountRef,handleOnInputClick:function handleOnInputClick(e){handleOnClick({name:name,value:isReactNative?value:e});},setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,maxTagRows:maxTagRows,inputWrapperRef:inputWrapperRef,size:_size,numberOfLines:numberOfLines,isTextArea:isTextArea,hasLeadingDropDown:Boolean(leadingDropDown),children:jsx(StyledBaseInput,Object.assign({as:as,id:inputId,ref:getInnerMotionRef({_motionMeta:_motionMeta,ref:mergedInputRef}),name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:_isDisabled,validationState:validationState,isRequired:_isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea||maxTagRows==='multiple'||maxTagRows==='expandable',hasPopup:hasPopup,hasTags:!!(tags&&tags.length>0),shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize,isDropdownTrigger:isDropdownTrigger,$size:_size,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell,tabIndex:tabIndex,hasLeadingDropdown:Boolean(leadingDropDown)},metaAttribute({name:MetaConstants.StyledBaseInput}),makeAnalyticsAttribute(rest)))}),jsx(BaseInputVisuals,{trailingInteractionElement:trailingInteractionElement,onTrailingInteractionElementClick:onTrailingInteractionElementClick,suffix:suffix,trailingIcon:trailingIcon,isDisabled:_isDisabled,validationState:validationState,trailingButton:trailingButton,size:_size,errorText:errorText,successText:successText,showHintsAsTooltip:showHintsAsTooltip,trailingDropDown:trailingDropDown})]})})]}),hideFormHint||showHintsAsTooltip||isInsideInputGroup?null:jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned&&!hideLabelText?formHintLeftLabelMarginLeft[_size]:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:_size}),trailingFooterSlot==null?void 0:trailingFooterSlot(value!=null?value:inputValue)]})})]}));};var BaseInputWithRef=React__default.forwardRef(_BaseInput);var BaseInput=assignWithoutSideEffects(BaseInputWithRef,{displayName:'BaseInput'});
|
|
45
45
|
|
|
46
46
|
export { BaseInput, getHintType };
|
|
47
47
|
//# sourceMappingURL=BaseInput.js.map
|