@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":"Dropdown.js","sources":["../../../../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { DropdownContext } from './useDropdown';\nimport type { DropdownContextType } from './useDropdown';\nimport type { DropdownProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useId } from '~utils/useId';\nimport { ComponentIds as bottomSheetComponentIds } from '~components/BottomSheet/componentIds';\nimport { BottomSheetAndDropdownGlueContext } from '~components/BottomSheet/BottomSheetContext';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\nimport type { BladeElementRef, ContainerElementType } from '~utils/types';\nimport { useControllableState } from '~utils/useControllable';\nimport { mergeRefs } from '~utils/useMergeRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst validDropdownChildren = [\n // TODO: Remove Box once CountrySelector's button sizing is fixed\n dropdownComponentIds.BaseBox,\n dropdownComponentIds.triggers.SelectInput,\n dropdownComponentIds.triggers.SearchInput,\n dropdownComponentIds.triggers.DropdownButton,\n dropdownComponentIds.triggers.DropdownIconButton,\n dropdownComponentIds.triggers.DropdownLink,\n dropdownComponentIds.DropdownOverlay,\n dropdownComponentIds.triggers.AutoComplete,\n bottomSheetComponentIds.BottomSheet,\n dropdownComponentIds.triggers.FilterChipSelectInput,\n dropdownComponentIds.triggers.InputDropdownButton,\n];\n\n/**\n * ### Dropdown component\n *\n * Dropdown component is generic component that controls the dropdown functionality.\n * It can be used with multiple triggers and mostly contains ActionList component inside it\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown selectionType=\"single\">\n * <SelectInput />\n * <DropdownOverlay>\n * <ActionList>\n * <ActionListItem />\n * <ActionListItem />\n * </ActionList>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}\n */\nconst _Dropdown = (\n {\n children,\n isOpen: isOpenControlled,\n onOpenChange,\n selectionType = 'single',\n testID,\n _width,\n ...rest\n }: DropdownProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const [options, setOptions] = React.useState<DropdownContextType['options']>([]);\n const [filteredValues, setFilteredValues] = React.useState<string[]>([]);\n const [selectedIndices, setSelectedIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [controlledValueIndices, setControlledValueIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [activeIndex, setActiveIndex] = React.useState(-1);\n const [activeTagIndex, setActiveTagIndex] = React.useState(-1);\n const [shouldIgnoreBlurAnimation, setShouldIgnoreBlurAnimation] = React.useState(false);\n const [hasFooterAction, setHasFooterAction] = React.useState(false);\n const [hasAutoCompleteInHeader, setHasAutoCompleteInHeader] = React.useState(false);\n const [isKeydownPressed, setIsKeydownPressed] = React.useState(false);\n const [changeCallbackTriggerer, setChangeCallbackTriggerer] = React.useState<\n DropdownContextType['changeCallbackTriggerer']\n >(0);\n const [isControlled, setIsControlled] = React.useState(false);\n // keep track if dropdown contains bottomsheet\n const [dropdownHasBottomSheet, setDropdownHasBottomSheet] = React.useState(false);\n\n /**\n * In inputs, actual input is smaller than the visible input wrapper.\n * You can set this reference in such cases so floating ui calculations happen correctly\n * */\n const triggererWrapperRef = React.useRef<ContainerElementType>(null);\n const triggererRef = React.useRef<HTMLButtonElement>(null);\n const headerAutoCompleteRef = React.useRef<HTMLButtonElement>(null);\n const actionListItemRef = React.useRef<HTMLDivElement>(null);\n const dropdownTriggerer = React.useRef<DropdownContextType['dropdownTriggerer']>();\n const isTagDismissedRef = React.useRef<{ value: boolean } | null>({ value: false });\n const visibleTagsCountRef = React.useRef<{ value: number }>({ value: 0 });\n const dropdownContainerRef = React.useRef<HTMLDivElement>(null);\n\n const dropdownBaseId = useId('dropdown');\n const isDropdownOpenRef = React.useRef(isOpenControlled);\n\n const [isDropdownOpen, setIsDropdownOpen] = useControllableState({\n value: isOpenControlled,\n defaultValue: false,\n onChange: (isOpenControlledValue) => {\n isDropdownOpenRef.current = isOpenControlledValue;\n onOpenChange?.(isOpenControlledValue);\n },\n });\n\n isDropdownOpenRef.current = isDropdownOpen;\n\n const setIsOpen = (isOpenValue: boolean): void => {\n isDropdownOpenRef.current = isOpenValue;\n setIsDropdownOpen(() => isOpenValue);\n };\n\n const close = React.useCallback(() => {\n setActiveTagIndex(-1);\n setIsOpen(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n if (__DEV__) {\n if (!validDropdownChildren.includes(getComponentId(child) ?? '')) {\n throwBladeError({\n message: `Dropdown can only have one of following elements as children - \\n\\n ${validDropdownChildren.join(\n ', ',\n )} \\n\\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,\n moduleName: 'Dropdown',\n });\n }\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SelectInput)) {\n dropdownTriggerer.current = 'SelectInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SearchInput)) {\n dropdownTriggerer.current = 'SearchInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownButton)) {\n dropdownTriggerer.current = 'DropdownButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownIconButton)) {\n dropdownTriggerer.current = 'DropdownIconButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.AutoComplete)) {\n dropdownTriggerer.current = 'AutoComplete';\n }\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.FilterChipSelectInput)) {\n dropdownTriggerer.current = 'FilterChipSelectInput';\n }\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.InputDropdownButton)) {\n dropdownTriggerer.current = 'InputDropdownButton';\n }\n }\n });\n\n const contextValue = React.useMemo<DropdownContextType>(\n () => ({\n isOpen: isDropdownOpen,\n setIsOpen,\n close,\n selectedIndices,\n setSelectedIndices,\n controlledValueIndices,\n setControlledValueIndices,\n options,\n setOptions,\n filteredValues,\n setFilteredValues,\n activeIndex,\n setActiveIndex,\n activeTagIndex,\n setActiveTagIndex,\n visibleTagsCountRef,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n isKeydownPressed,\n setIsKeydownPressed,\n dropdownBaseId,\n triggererRef,\n headerAutoCompleteRef,\n triggererWrapperRef,\n actionListItemRef,\n selectionType,\n hasFooterAction,\n setHasFooterAction,\n hasAutoCompleteInHeader,\n setHasAutoCompleteInHeader,\n dropdownTriggerer: dropdownTriggerer.current,\n changeCallbackTriggerer,\n setChangeCallbackTriggerer,\n isControlled,\n setIsControlled,\n isTagDismissedRef,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n isDropdownOpen,\n isOpenControlled,\n selectedIndices,\n controlledValueIndices,\n options,\n filteredValues,\n activeIndex,\n activeTagIndex,\n shouldIgnoreBlurAnimation,\n selectionType,\n hasFooterAction,\n isKeydownPressed,\n changeCallbackTriggerer,\n isControlled,\n ],\n );\n\n const BottomSheetAndDropdownGlueContextValue = React.useMemo((): BottomSheetAndDropdownGlueContext => {\n return {\n isOpen: isDropdownOpen,\n dropdownHasBottomSheet,\n hasAutoCompleteInHeader,\n setDropdownHasBottomSheet,\n // This is the dismiss function which will be injected into the BottomSheet\n // Basically <BottomSheet onDismiss={onBottomSheetDismiss} />\n onBottomSheetDismiss: close,\n };\n }, [dropdownHasBottomSheet, hasAutoCompleteInHeader, isDropdownOpen, close]);\n\n return (\n <BottomSheetAndDropdownGlueContext.Provider value={BottomSheetAndDropdownGlueContextValue}>\n <DropdownContext.Provider value={contextValue}>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={mergeRefs(ref, dropdownContainerRef as any)}\n {...metaAttribute({ name: MetaConstants.Dropdown, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n width={_width}\n >\n <BaseBox position=\"relative\" textAlign={'left' as never}>\n {children}\n </BaseBox>\n </BaseBox>\n </DropdownContext.Provider>\n </BottomSheetAndDropdownGlueContext.Provider>\n );\n};\n\nconst Dropdown = assignWithoutSideEffects(React.forwardRef(_Dropdown), {\n componentId: dropdownComponentIds.Dropdown,\n});\n\nexport { Dropdown };\n"],"names":["validDropdownChildren","dropdownComponentIds","BaseBox","triggers","SelectInput","SearchInput","DropdownButton","DropdownIconButton","DropdownLink","DropdownOverlay","AutoComplete","bottomSheetComponentIds","BottomSheet","FilterChipSelectInput","InputDropdownButton","_Dropdown","_ref","ref","children","isOpenControlled","isOpen","onOpenChange","_ref$selectionType","selectionType","testID","_width","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","options","setOptions","_React$useState3","_React$useState4","filteredValues","setFilteredValues","_React$useState5","_React$useState6","selectedIndices","setSelectedIndices","_React$useState7","_React$useState8","controlledValueIndices","setControlledValueIndices","_React$useState9","_React$useState10","activeIndex","setActiveIndex","_React$useState11","_React$useState12","activeTagIndex","setActiveTagIndex","_React$useState13","_React$useState14","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","_React$useState15","_React$useState16","hasFooterAction","setHasFooterAction","_React$useState17","_React$useState18","hasAutoCompleteInHeader","setHasAutoCompleteInHeader","_React$useState19","_React$useState20","isKeydownPressed","setIsKeydownPressed","_React$useState21","_React$useState22","changeCallbackTriggerer","setChangeCallbackTriggerer","_React$useState23","_React$useState24","isControlled","setIsControlled","_React$useState25","_React$useState26","dropdownHasBottomSheet","setDropdownHasBottomSheet","triggererWrapperRef","useRef","triggererRef","headerAutoCompleteRef","actionListItemRef","dropdownTriggerer","isTagDismissedRef","value","visibleTagsCountRef","dropdownContainerRef","dropdownBaseId","useId","isDropdownOpenRef","_useControllableState","useControllableState","defaultValue","onChange","isOpenControlledValue","current","_useControllableState2","isDropdownOpen","setIsDropdownOpen","setIsOpen","isOpenValue","close","useCallback","Children","map","child","isValidElement","_getComponentId","includes","getComponentId","throwBladeError","message","concat","join","moduleName","isValidAllowedChildren","contextValue","useMemo","BottomSheetAndDropdownGlueContextValue","onBottomSheetDismiss","_jsx","BottomSheetAndDropdownGlueContext","Provider","DropdownContext","_objectSpread","mergeRefs","metaAttribute","name","MetaConstants","Dropdown","getStyledProps","makeAnalyticsAttribute","width","position","textAlign","assignWithoutSideEffects","forwardRef","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,qBAAqB,GAAG;AAC5B;AACAC,oBAAoB,CAACC,OAAO,EAC5BD,oBAAoB,CAACE,QAAQ,CAACC,WAAW,EACzCH,oBAAoB,CAACE,QAAQ,CAACE,WAAW,EACzCJ,oBAAoB,CAACE,QAAQ,CAACG,cAAc,EAC5CL,oBAAoB,CAACE,QAAQ,CAACI,kBAAkB,EAChDN,oBAAoB,CAACE,QAAQ,CAACK,YAAY,EAC1CP,oBAAoB,CAACQ,eAAe,EACpCR,oBAAoB,CAACE,QAAQ,CAACO,YAAY,EAC1CC,YAAuB,CAACC,WAAW,EACnCX,oBAAoB,CAACE,QAAQ,CAACU,qBAAqB,EACnDZ,oBAAoB,CAACE,QAAQ,CAACW,mBAAmB,CAClD,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAUbC,GAA+B,EACR;AAAA,EAAA,IATrBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACAC,gBAAgB,GAAAH,IAAA,CAAxBI,MAAM;IACNC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IAAAC,kBAAA,GAAAN,IAAA,CACZO,aAAa;AAAbA,IAA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AAgB;AAAA3H,UAAAA,QAAA,EACrDA,QAAAA;SACM,CAAA;OACF,CAAA,CAAA;KACe,CAAA;AAAC,GACe,CAAC,CAAA;AAEjD,CAAC,CAAA;AAEKsH,IAAAA,QAAQ,gBAAGM,wBAAwB,eAAChH,cAAK,CAACiH,UAAU,CAAChI,SAAS,CAAC,EAAE;EACrEiI,WAAW,EAAE/I,oBAAoB,CAACuI,QAAAA;AACpC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../../../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { DropdownContext } from './useDropdown';\nimport type { DropdownContextType } from './useDropdown';\nimport type { DropdownProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useId } from '~utils/useId';\nimport { ComponentIds as bottomSheetComponentIds } from '~components/BottomSheet/componentIds';\nimport { BottomSheetAndDropdownGlueContext } from '~components/BottomSheet/BottomSheetContext';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\nimport type { BladeElementRef, ContainerElementType } from '~utils/types';\nimport { useControllableState } from '~utils/useControllable';\nimport { mergeRefs } from '~utils/useMergeRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst validDropdownChildren = [\n // TODO: Remove Box once CountrySelector's button sizing is fixed\n dropdownComponentIds.BaseBox,\n dropdownComponentIds.triggers.SelectInput,\n dropdownComponentIds.triggers.SearchInput,\n dropdownComponentIds.triggers.DropdownButton,\n dropdownComponentIds.triggers.DropdownIconButton,\n dropdownComponentIds.triggers.DropdownLink,\n dropdownComponentIds.DropdownOverlay,\n dropdownComponentIds.triggers.AutoComplete,\n bottomSheetComponentIds.BottomSheet,\n dropdownComponentIds.triggers.FilterChipSelectInput,\n dropdownComponentIds.triggers.InputDropdownButton,\n];\n\n/**\n * ### Dropdown component\n *\n * Dropdown component is generic component that controls the dropdown functionality.\n * It can be used with multiple triggers and mostly contains ActionList component inside it\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown selectionType=\"single\">\n * <SelectInput />\n * <DropdownOverlay>\n * <ActionList>\n * <ActionListItem />\n * <ActionListItem />\n * </ActionList>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}\n */\nconst _Dropdown = (\n {\n children,\n isOpen: isOpenControlled,\n onOpenChange,\n selectionType = 'single',\n testID,\n _width,\n ...rest\n }: DropdownProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const [options, setOptions] = React.useState<DropdownContextType['options']>([]);\n const [filteredValues, setFilteredValues] = React.useState<string[]>([]);\n const [selectedIndices, setSelectedIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [controlledValueIndices, setControlledValueIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [activeIndex, setActiveIndex] = React.useState(-1);\n const [activeTagIndex, setActiveTagIndex] = React.useState(-1);\n const [shouldIgnoreBlurAnimation, setShouldIgnoreBlurAnimation] = React.useState(false);\n const [hasFooterAction, setHasFooterAction] = React.useState(false);\n const [hasAutoCompleteInHeader, setHasAutoCompleteInHeader] = React.useState(false);\n const [isKeydownPressed, setIsKeydownPressed] = React.useState(false);\n const [changeCallbackTriggerer, setChangeCallbackTriggerer] = React.useState<\n DropdownContextType['changeCallbackTriggerer']\n >(0);\n const [isControlled, setIsControlled] = React.useState(false);\n // keep track if dropdown contains bottomsheet\n const [dropdownHasBottomSheet, setDropdownHasBottomSheet] = React.useState(false);\n\n /**\n * In inputs, actual input is smaller than the visible input wrapper.\n * You can set this reference in such cases so floating ui calculations happen correctly\n * */\n const triggererWrapperRef = React.useRef<ContainerElementType>(null);\n const triggererRef = React.useRef<HTMLButtonElement>(null);\n const headerAutoCompleteRef = React.useRef<HTMLButtonElement>(null);\n const actionListItemRef = React.useRef<HTMLDivElement>(null);\n const dropdownTriggerer = React.useRef<DropdownContextType['dropdownTriggerer']>();\n const isTagDismissedRef = React.useRef<{ value: boolean } | null>({ value: false });\n const visibleTagsCountRef = React.useRef<{ value: number }>({ value: 0 });\n const dropdownContainerRef = React.useRef<HTMLDivElement>(null);\n\n const dropdownBaseId = useId('dropdown');\n const isDropdownOpenRef = React.useRef(isOpenControlled);\n\n const [isDropdownOpen, setIsDropdownOpen] = useControllableState({\n value: isOpenControlled,\n defaultValue: false,\n onChange: (isOpenControlledValue) => {\n isDropdownOpenRef.current = isOpenControlledValue;\n onOpenChange?.(isOpenControlledValue);\n },\n });\n\n isDropdownOpenRef.current = isDropdownOpen;\n\n const setIsOpen = (isOpenValue: boolean): void => {\n isDropdownOpenRef.current = isOpenValue;\n setIsDropdownOpen(() => isOpenValue);\n };\n\n const close = React.useCallback(() => {\n setActiveTagIndex(-1);\n setIsOpen(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n if (__DEV__) {\n if (!validDropdownChildren.includes(getComponentId(child) ?? '')) {\n throwBladeError({\n message: `Dropdown can only have one of following elements as children - \\n\\n ${validDropdownChildren.join(\n ', ',\n )} \\n\\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,\n moduleName: 'Dropdown',\n });\n }\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SelectInput)) {\n dropdownTriggerer.current = 'SelectInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SearchInput)) {\n dropdownTriggerer.current = 'SearchInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownButton)) {\n dropdownTriggerer.current = 'DropdownButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownIconButton)) {\n dropdownTriggerer.current = 'DropdownIconButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.AutoComplete)) {\n dropdownTriggerer.current = 'AutoComplete';\n }\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.FilterChipSelectInput)) {\n dropdownTriggerer.current = 'FilterChipSelectInput';\n }\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.InputDropdownButton)) {\n dropdownTriggerer.current = 'InputDropdownButton';\n }\n }\n });\n\n const contextValue = React.useMemo<DropdownContextType>(\n () => ({\n isOpen: isDropdownOpen,\n setIsOpen,\n close,\n selectedIndices,\n setSelectedIndices,\n controlledValueIndices,\n setControlledValueIndices,\n options,\n setOptions,\n filteredValues,\n setFilteredValues,\n activeIndex,\n setActiveIndex,\n activeTagIndex,\n setActiveTagIndex,\n visibleTagsCountRef,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n isKeydownPressed,\n setIsKeydownPressed,\n dropdownBaseId,\n triggererRef,\n headerAutoCompleteRef,\n triggererWrapperRef,\n actionListItemRef,\n selectionType,\n hasFooterAction,\n setHasFooterAction,\n hasAutoCompleteInHeader,\n setHasAutoCompleteInHeader,\n dropdownTriggerer: dropdownTriggerer.current,\n changeCallbackTriggerer,\n setChangeCallbackTriggerer,\n isControlled,\n setIsControlled,\n isTagDismissedRef,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n isDropdownOpen,\n isOpenControlled,\n selectedIndices,\n controlledValueIndices,\n options,\n filteredValues,\n activeIndex,\n activeTagIndex,\n shouldIgnoreBlurAnimation,\n selectionType,\n hasFooterAction,\n isKeydownPressed,\n changeCallbackTriggerer,\n isControlled,\n ],\n );\n\n const BottomSheetAndDropdownGlueContextValue = React.useMemo((): BottomSheetAndDropdownGlueContext => {\n return {\n isOpen: isDropdownOpen,\n dropdownHasBottomSheet,\n hasAutoCompleteInHeader,\n setDropdownHasBottomSheet,\n // This is the dismiss function which will be injected into the BottomSheet\n // Basically <BottomSheet onDismiss={onBottomSheetDismiss} />\n onBottomSheetDismiss: close,\n };\n }, [dropdownHasBottomSheet, hasAutoCompleteInHeader, isDropdownOpen, close]);\n\n return (\n <BottomSheetAndDropdownGlueContext.Provider value={BottomSheetAndDropdownGlueContextValue}>\n <DropdownContext.Provider value={contextValue}>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={mergeRefs(ref, dropdownContainerRef as any)}\n {...metaAttribute({ name: MetaConstants.Dropdown, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n width={_width}\n >\n <BaseBox position=\"relative\" textAlign={'left' as never}>\n {children}\n </BaseBox>\n </BaseBox>\n </DropdownContext.Provider>\n </BottomSheetAndDropdownGlueContext.Provider>\n );\n};\n\nconst Dropdown = assignWithoutSideEffects(React.forwardRef(_Dropdown), {\n componentId: dropdownComponentIds.Dropdown,\n});\n\nexport { Dropdown };\n"],"names":["validDropdownChildren","dropdownComponentIds","BaseBox","triggers","SelectInput","SearchInput","DropdownButton","DropdownIconButton","DropdownLink","DropdownOverlay","AutoComplete","bottomSheetComponentIds","BottomSheet","FilterChipSelectInput","InputDropdownButton","_Dropdown","_ref","ref","children","isOpenControlled","isOpen","onOpenChange","_ref$selectionType","selectionType","testID","_width","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","options","setOptions","_React$useState3","_React$useState4","filteredValues","setFilteredValues","_React$useState5","_React$useState6","selectedIndices","setSelectedIndices","_React$useState7","_React$useState8","controlledValueIndices","setControlledValueIndices","_React$useState9","_React$useState0","activeIndex","setActiveIndex","_React$useState1","_React$useState10","activeTagIndex","setActiveTagIndex","_React$useState11","_React$useState12","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","_React$useState13","_React$useState14","hasFooterAction","setHasFooterAction","_React$useState15","_React$useState16","hasAutoCompleteInHeader","setHasAutoCompleteInHeader","_React$useState17","_React$useState18","isKeydownPressed","setIsKeydownPressed","_React$useState19","_React$useState20","changeCallbackTriggerer","setChangeCallbackTriggerer","_React$useState21","_React$useState22","isControlled","setIsControlled","_React$useState23","_React$useState24","dropdownHasBottomSheet","setDropdownHasBottomSheet","triggererWrapperRef","useRef","triggererRef","headerAutoCompleteRef","actionListItemRef","dropdownTriggerer","isTagDismissedRef","value","visibleTagsCountRef","dropdownContainerRef","dropdownBaseId","useId","isDropdownOpenRef","_useControllableState","useControllableState","defaultValue","onChange","isOpenControlledValue","current","_useControllableState2","isDropdownOpen","setIsDropdownOpen","setIsOpen","isOpenValue","close","useCallback","Children","map","child","isValidElement","_getComponentId","includes","getComponentId","throwBladeError","message","concat","join","moduleName","isValidAllowedChildren","contextValue","useMemo","BottomSheetAndDropdownGlueContextValue","onBottomSheetDismiss","_jsx","BottomSheetAndDropdownGlueContext","Provider","DropdownContext","_objectSpread","mergeRefs","metaAttribute","name","MetaConstants","Dropdown","getStyledProps","makeAnalyticsAttribute","width","position","textAlign","assignWithoutSideEffects","forwardRef","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,qBAAqB,GAAG;AAC5B;AACAC,oBAAoB,CAACC,OAAO,EAC5BD,oBAAoB,CAACE,QAAQ,CAACC,WAAW,EACzCH,oBAAoB,CAACE,QAAQ,CAACE,WAAW,EACzCJ,oBAAoB,CAACE,QAAQ,CAACG,cAAc,EAC5CL,oBAAoB,CAACE,QAAQ,CAACI,kBAAkB,EAChDN,oBAAoB,CAACE,QAAQ,CAACK,YAAY,EAC1CP,oBAAoB,CAACQ,eAAe,EACpCR,oBAAoB,CAACE,QAAQ,CAACO,YAAY,EAC1CC,YAAuB,CAACC,WAAW,EACnCX,oBAAoB,CAACE,QAAQ,CAACU,qBAAqB,EACnDZ,oBAAoB,CAACE,QAAQ,CAACW,mBAAmB,CAClD,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AAAEhH,QAAAA,MAAM,EAANA,MAAAA;OAAQ,CAAC,CACvDiH,EAAAA,cAAc,CAAC/G,IAAI,CAAC,CACpBgH,EAAAA,sBAAsB,CAAChH,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAChCiH,QAAAA,KAAK,EAAElH,MAAO;QAAAP,QAAA,eAEd6G,GAAA,CAAC7H,OAAO,EAAA;AAAC0I,UAAAA,QAAQ,EAAC,UAAU;AAACC,UAAAA,SAAS,EAAE,MAAgB;AAAA3H,UAAAA,QAAA,EACrDA,QAAAA;SACM,CAAA;OACF,CAAA,CAAA;KACe,CAAA;AAAC,GACe,CAAC,CAAA;AAEjD,CAAC,CAAA;AAEKsH,IAAAA,QAAQ,gBAAGM,wBAAwB,cAAChH,cAAK,CAACiH,UAAU,CAAChI,SAAS,CAAC,EAAE;EACrEiI,WAAW,EAAE/I,oBAAoB,CAACuI,QAAAA;AACpC,CAAC;;;;"}
|
|
@@ -76,19 +76,19 @@ var _DropdownButton = function _DropdownButton(_ref) {
|
|
|
76
76
|
onClick: function onClick(e) {
|
|
77
77
|
onTriggerClick();
|
|
78
78
|
// Setting it for web fails it on native typecheck and vice versa
|
|
79
|
-
_onClick === null || _onClick === void 0
|
|
79
|
+
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
80
80
|
},
|
|
81
81
|
onBlur: function onBlur(e) {
|
|
82
82
|
// With button trigger, there is no "value" as such. It's just clickable items
|
|
83
83
|
// Setting it for web fails it on native typecheck and vice versa
|
|
84
|
-
_onBlur === null || _onBlur === void 0
|
|
84
|
+
_onBlur === null || _onBlur === void 0 || _onBlur(e);
|
|
85
85
|
},
|
|
86
86
|
onKeyDown: function onKeyDown(e) {
|
|
87
|
-
onTriggerKeydown === null || onTriggerKeydown === void 0
|
|
87
|
+
onTriggerKeydown === null || onTriggerKeydown === void 0 || onTriggerKeydown({
|
|
88
88
|
event: e
|
|
89
89
|
});
|
|
90
90
|
// Setting it for web fails it on native typecheck and vice versa
|
|
91
|
-
_onKeyDown === null || _onKeyDown === void 0
|
|
91
|
+
_onKeyDown === null || _onKeyDown === void 0 || _onKeyDown(e);
|
|
92
92
|
}
|
|
93
93
|
}))
|
|
94
94
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownButton.js","sources":["../../../../../../src/components/Dropdown/DropdownButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport BaseButton from '~components/Button/BaseButton';\nimport type { ButtonProps } from '~components/Button';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype DropdownButtonProps = ButtonProps & {\n onBlur?: BaseButtonProps['onBlur'];\n onKeyDown?: BaseButtonProps['onKeyDown'];\n};\n\nconst _DropdownButton = ({\n children,\n icon,\n iconPosition = 'left',\n isDisabled = false,\n isFullWidth = false,\n isLoading = false,\n onClick,\n onBlur,\n onKeyDown,\n size = 'medium',\n type = 'button',\n variant = 'primary',\n color = 'primary',\n accessibilityLabel,\n testID,\n ...rest\n}: DropdownButtonProps): 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 <BaseButton\n {...rest}\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isLoading={isLoading}\n size={size}\n type={type}\n variant={variant}\n testID={testID}\n ref={triggererRef as any}\n color={color}\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 // With button trigger, there is no \"value\" as such. It's just clickable items\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 DropdownButton = assignWithoutSideEffects(_DropdownButton, {\n componentId: dropdownComponentIds.triggers.DropdownButton,\n});\n\nexport { DropdownButton };\n"],"names":["_DropdownButton","_ref","children","icon","_ref$iconPosition","iconPosition","_ref$isDisabled","isDisabled","_ref$isFullWidth","isFullWidth","_ref$isLoading","isLoading","onClick","onBlur","onKeyDown","_ref$size","size","_ref$type","type","_ref$variant","variant","_ref$color","color","accessibilityLabel","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseButton","_objectSpread","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","concat","activeDescendant","undefined","e","event","DropdownButton","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;AAiBA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAiB0B;AAAA,EAAA,IAhB7CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,iBAAA,GAAAH,IAAA,CACJI,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,iBAAA;IAAAE,eAAA,G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AA,SAAAA;OAC1E;AACFrC,MAAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DropdownButton.js","sources":["../../../../../../src/components/Dropdown/DropdownButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport BaseButton from '~components/Button/BaseButton';\nimport type { ButtonProps } from '~components/Button';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype DropdownButtonProps = ButtonProps & {\n onBlur?: BaseButtonProps['onBlur'];\n onKeyDown?: BaseButtonProps['onKeyDown'];\n};\n\nconst _DropdownButton = ({\n children,\n icon,\n iconPosition = 'left',\n isDisabled = false,\n isFullWidth = false,\n isLoading = false,\n onClick,\n onBlur,\n onKeyDown,\n size = 'medium',\n type = 'button',\n variant = 'primary',\n color = 'primary',\n accessibilityLabel,\n testID,\n ...rest\n}: DropdownButtonProps): 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 <BaseButton\n {...rest}\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isLoading={isLoading}\n size={size}\n type={type}\n variant={variant}\n testID={testID}\n ref={triggererRef as any}\n color={color}\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 // With button trigger, there is no \"value\" as such. It's just clickable items\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 DropdownButton = assignWithoutSideEffects(_DropdownButton, {\n componentId: dropdownComponentIds.triggers.DropdownButton,\n});\n\nexport { DropdownButton };\n"],"names":["_DropdownButton","_ref","children","icon","_ref$iconPosition","iconPosition","_ref$isDisabled","isDisabled","_ref$isFullWidth","isFullWidth","_ref$isLoading","isLoading","onClick","onBlur","onKeyDown","_ref$size","size","_ref$type","type","_ref$variant","variant","_ref$color","color","accessibilityLabel","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseButton","_objectSpread","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","concat","activeDescendant","undefined","e","event","DropdownButton","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;AAiBA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAiB0B;AAAA,EAAA,IAhB7CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,iBAAA,GAAAH,IAAA,CACJI,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,iBAAA;IAAAE,eAAA,GAAAL,IAAA,CACrBM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;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E,CAAA;AAChB;AACAlB,QAAAA,QAAO,aAAPA,QAAO,KAAA,KAAA,CAAA,IAAPA,QAAO,CAAGsC,CAAQ,CAAC,CAAA;OACnB;AACFrC,MAAAA,MAAM,EAAE,SAARA,MAAMA,CAAGqC,CAAC,EAAK;AACb;AACA;AACArC,QAAAA,OAAM,aAANA,OAAM,KAAA,KAAA,CAAA,IAANA,OAAM,CAAGqC,CAAQ,CAAC,CAAA;OAClB;AACFpC,MAAAA,SAAS,EAAE,SAAXA,SAASA,CAAGoC,CAAC,EAAK;AAChBnB,QAAAA,gBAAgB,KAAhBA,IAAAA,IAAAA,gBAAgB,KAAhBA,KAAAA,CAAAA,IAAAA,gBAAgB,CAAG;AAAEoB,UAAAA,KAAK,EAAED,CAAAA;AAAS,SAAC,CAAC,CAAA;AACvC;AACApC,QAAAA,UAAS,aAATA,UAAS,KAAA,KAAA,CAAA,IAATA,UAAS,CAAGoC,CAAQ,CAAC,CAAA;AACvB,OAAA;KACD,CAAA,CAAA;AAAC,IAAA;AAEN,CAAC,CAAA;AAED,IAAME,cAAc,gBAAGC,wBAAwB,CAACrD,eAAe,EAAE;AAC/DsD,EAAAA,WAAW,EAAEC,oBAAoB,CAACC,QAAQ,CAACJ,cAAAA;AAC7C,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownHeaderFooter.js","sources":["../../../../../../src/components/Dropdown/DropdownHeaderFooter.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { BaseFooter } from '~components/BaseHeaderFooter/BaseFooter';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseFooterProps } from '~components/BaseHeaderFooter/BaseFooter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { isReactNative } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { MetaConstants } from '~utils/metaAttribute/metaConstants';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype DropdownHeaderProps = Pick<\n BaseHeaderProps,\n | 'title'\n | 'subtitle'\n | 'leading'\n | 'trailing'\n | 'titleSuffix'\n | 'testID'\n | 'children'\n | keyof DataAnalyticsAttribute\n>;\n\nconst _DropdownHeader = ({\n title,\n subtitle,\n leading,\n titleSuffix,\n trailing,\n testID,\n children,\n ...rest\n}: DropdownHeaderProps): React.ReactElement => {\n const { hasAutoCompleteInHeader, setShouldIgnoreBlurAnimation } = useDropdown();\n\n return (\n <BaseBox\n flexShrink={0}\n {...(isReactNative()\n ? {}\n : {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onMouseDown: (e: any) => {\n // we don't want focus to ever move on header because its static element except when autocomplete is present\n if (!hasAutoCompleteInHeader) {\n e.preventDefault();\n } else {\n setShouldIgnoreBlurAnimation(false);\n }\n },\n })}\n >\n <BaseHeader\n title={title}\n subtitle={subtitle}\n leading={leading}\n trailing={trailing}\n titleSuffix={titleSuffix}\n metaComponentName={MetaConstants.DropdownHeader}\n testID={testID}\n // back button\n showBackButton={false}\n // close button\n showCloseButton={false}\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </BaseHeader>\n </BaseBox>\n );\n};\n\nconst DropdownHeader = assignWithoutSideEffects(_DropdownHeader, {\n componentId: 'DropdownHeader',\n});\n\ntype DropdownFooter = Pick<BaseFooterProps, 'children' | 'testID'>;\n\nconst _DropdownFooter = ({ children, testID }: DropdownFooter): React.ReactElement => {\n const { setHasFooterAction, isOpen } = useDropdown();\n const footerRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n setHasFooterAction(true);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={footerRef as any}\n {...makeAccessible({\n role: isReactNative() ? undefined : 'group',\n })}\n >\n <BaseFooter metaComponentName={MetaConstants.DropdownFooter} testID={testID}>\n {/* We don't want any of the interactive children to get focussed on TAB when dropdown is closed so we remove them from DOM itself */}\n {isOpen ? children : null}\n </BaseFooter>\n </BaseBox>\n );\n};\n\nconst DropdownFooter = assignWithoutSideEffects(_DropdownFooter, {\n componentId: 'DropdownFooter',\n});\n\nexport { DropdownHeader, DropdownFooter };\n"],"names":["_DropdownHeader","_ref","title","subtitle","leading","titleSuffix","trailing","testID","children","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInHeader","setShouldIgnoreBlurAnimation","_jsx","BaseBox","_objectSpread","flexShrink","isReactNative","onMouseDown","e","preventDefault","BaseHeader","metaComponentName","MetaConstants","DropdownHeader","showBackButton","showCloseButton","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","_DropdownFooter","_ref2","_useDropdown2","setHasFooterAction","isOpen","footerRef","React","useRef","useEffect","ref","makeAccessible","role","undefined","BaseFooter","DropdownFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAS0B;AAAA,EAAA,IAR7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IACPC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACRC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;AACLC,IAAAA,IAAI,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,YAAA,GAAkEC,WAAW,EAAE;IAAvEC,uBAAuB,GAAAF,YAAA,CAAvBE,uBAAuB;IAAEC,4BAA4B,GAAAH,YAAA,CAA5BG,4BAA4B,CAAA;AAE7D,EAAA,oBACEC,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACNC,IAAAA,UAAU,EAAE,CAAA;AAAE,GAAA,EACTC,aAAa,EAAE,GAChB,EAAE,GACF;AACE;AACAC,IAAAA,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"DropdownHeaderFooter.js","sources":["../../../../../../src/components/Dropdown/DropdownHeaderFooter.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { BaseFooter } from '~components/BaseHeaderFooter/BaseFooter';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseFooterProps } from '~components/BaseHeaderFooter/BaseFooter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { isReactNative } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { MetaConstants } from '~utils/metaAttribute/metaConstants';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype DropdownHeaderProps = Pick<\n BaseHeaderProps,\n | 'title'\n | 'subtitle'\n | 'leading'\n | 'trailing'\n | 'titleSuffix'\n | 'testID'\n | 'children'\n | keyof DataAnalyticsAttribute\n>;\n\nconst _DropdownHeader = ({\n title,\n subtitle,\n leading,\n titleSuffix,\n trailing,\n testID,\n children,\n ...rest\n}: DropdownHeaderProps): React.ReactElement => {\n const { hasAutoCompleteInHeader, setShouldIgnoreBlurAnimation } = useDropdown();\n\n return (\n <BaseBox\n flexShrink={0}\n {...(isReactNative()\n ? {}\n : {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onMouseDown: (e: any) => {\n // we don't want focus to ever move on header because its static element except when autocomplete is present\n if (!hasAutoCompleteInHeader) {\n e.preventDefault();\n } else {\n setShouldIgnoreBlurAnimation(false);\n }\n },\n })}\n >\n <BaseHeader\n title={title}\n subtitle={subtitle}\n leading={leading}\n trailing={trailing}\n titleSuffix={titleSuffix}\n metaComponentName={MetaConstants.DropdownHeader}\n testID={testID}\n // back button\n showBackButton={false}\n // close button\n showCloseButton={false}\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </BaseHeader>\n </BaseBox>\n );\n};\n\nconst DropdownHeader = assignWithoutSideEffects(_DropdownHeader, {\n componentId: 'DropdownHeader',\n});\n\ntype DropdownFooter = Pick<BaseFooterProps, 'children' | 'testID'>;\n\nconst _DropdownFooter = ({ children, testID }: DropdownFooter): React.ReactElement => {\n const { setHasFooterAction, isOpen } = useDropdown();\n const footerRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n setHasFooterAction(true);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={footerRef as any}\n {...makeAccessible({\n role: isReactNative() ? undefined : 'group',\n })}\n >\n <BaseFooter metaComponentName={MetaConstants.DropdownFooter} testID={testID}>\n {/* We don't want any of the interactive children to get focussed on TAB when dropdown is closed so we remove them from DOM itself */}\n {isOpen ? children : null}\n </BaseFooter>\n </BaseBox>\n );\n};\n\nconst DropdownFooter = assignWithoutSideEffects(_DropdownFooter, {\n componentId: 'DropdownFooter',\n});\n\nexport { DropdownHeader, DropdownFooter };\n"],"names":["_DropdownHeader","_ref","title","subtitle","leading","titleSuffix","trailing","testID","children","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInHeader","setShouldIgnoreBlurAnimation","_jsx","BaseBox","_objectSpread","flexShrink","isReactNative","onMouseDown","e","preventDefault","BaseHeader","metaComponentName","MetaConstants","DropdownHeader","showBackButton","showCloseButton","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","_DropdownFooter","_ref2","_useDropdown2","setHasFooterAction","isOpen","footerRef","React","useRef","useEffect","ref","makeAccessible","role","undefined","BaseFooter","DropdownFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAS0B;AAAA,EAAA,IAR7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IACPC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACRC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;AACLC,IAAAA,IAAI,GAAAC,wBAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,YAAA,GAAkEC,WAAW,EAAE;IAAvEC,uBAAuB,GAAAF,YAAA,CAAvBE,uBAAuB;IAAEC,4BAA4B,GAAAH,YAAA,CAA5BG,4BAA4B,CAAA;AAE7D,EAAA,oBACEC,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACNC,IAAAA,UAAU,EAAE,CAAA;AAAE,GAAA,EACTC,aAAa,EAAE,GAChB,EAAE,GACF;AACE;AACAC,IAAAA,WAAW,EAAE,SAAbA,WAAWA,CAAGC,CAAM,EAAK;AACvB;MACA,IAAI,CAACR,uBAAuB,EAAE;QAC5BQ,CAAC,CAACC,cAAc,EAAE,CAAA;AACpB,OAAC,MAAM;QACLR,4BAA4B,CAAC,KAAK,CAAC,CAAA;AACrC,OAAA;AACF,KAAA;GACD,CAAA,EAAA,EAAA,EAAA;AAAAP,IAAAA,QAAA,eAELQ,GAAA,CAACQ,UAAU,EAAAN,aAAA,CAAAA,aAAA,CAAA;AACThB,MAAAA,KAAK,EAAEA,KAAM;AACbC,MAAAA,QAAQ,EAAE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,GAAGyB,SAAS,GAAG,OAAA;AACtC,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAAArC,QAAA,eAEFQ,GAAA,CAAC8B,UAAU,EAAA;MAACrB,iBAAiB,EAAEC,aAAa,CAACqB,cAAe;AAACxC,MAAAA,MAAM,EAAEA,MAAO;AAAAC,MAAAA,QAAA,EAEzE6B,MAAM,GAAG7B,QAAQ,GAAG,IAAA;KACX,CAAA;AAAC,GAAA,CACN,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMuC,cAAc,gBAAGhB,wBAAwB,CAACE,eAAe,EAAE;AAC/DD,EAAAA,WAAW,EAAE,gBAAA;AACf,CAAC;;;;"}
|
|
@@ -53,19 +53,19 @@ var _DropdownIconButton = function _DropdownIconButton(_ref) {
|
|
|
53
53
|
onClick: function onClick(e) {
|
|
54
54
|
onTriggerClick();
|
|
55
55
|
// Setting it for web fails it on native typecheck and vice versa
|
|
56
|
-
_onClick === null || _onClick === void 0
|
|
56
|
+
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
57
57
|
},
|
|
58
58
|
onBlur: function onBlur(e) {
|
|
59
59
|
// With button trigger, there is no "value" as such. It's just clickable items
|
|
60
60
|
// Setting it for web fails it on native typecheck and vice versa
|
|
61
|
-
_onBlur === null || _onBlur === void 0
|
|
61
|
+
_onBlur === null || _onBlur === void 0 || _onBlur(e);
|
|
62
62
|
},
|
|
63
63
|
onKeyDown: function onKeyDown(e) {
|
|
64
|
-
onTriggerKeydown === null || onTriggerKeydown === void 0
|
|
64
|
+
onTriggerKeydown === null || onTriggerKeydown === void 0 || onTriggerKeydown({
|
|
65
65
|
event: e
|
|
66
66
|
});
|
|
67
67
|
// Setting it for web fails it on native typecheck and vice versa
|
|
68
|
-
_onKeyDown === null || _onKeyDown === void 0
|
|
68
|
+
_onKeyDown === null || _onKeyDown === void 0 || _onKeyDown(e);
|
|
69
69
|
}
|
|
70
70
|
}))
|
|
71
71
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownIconButton.js","sources":["../../../../../../src/components/Dropdown/DropdownIconButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { IconButtonProps } from '~components/Button/IconButton';\nimport StyledIconButton from '~components/Button/IconButton/StyledIconButton';\n\ntype DropdownIconButtonProps = Omit<IconButtonProps, 'onClick'> & {\n onBlur?: BaseButtonProps['onBlur'];\n onKeyDown?: BaseButtonProps['onKeyDown'];\n onClick?: IconButtonProps['onClick'];\n};\n\nconst _DropdownIconButton = ({\n icon,\n isDisabled = false,\n onClick,\n onBlur,\n onKeyDown,\n size = 'medium',\n accessibilityLabel,\n emphasis = 'intense',\n ...rest\n}: DropdownIconButtonProps): 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 StyledIconButton here to avoid exporting onKeydown, and accessibiltiyProps object\n <StyledIconButton\n {...rest}\n icon={icon}\n isDisabled={isDisabled}\n size={size}\n emphasis={emphasis}\n ref={triggererRef as any}\n accessibilityLabel={accessibilityLabel}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownIconButton'),\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 // With button trigger, there is no \"value\" as such. It's just clickable items\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 DropdownIconButton = assignWithoutSideEffects(_DropdownIconButton, {\n componentId: dropdownComponentIds.triggers.DropdownIconButton,\n});\n\nexport { DropdownIconButton };\n"],"names":["_DropdownIconButton","_ref","icon","_ref$isDisabled","isDisabled","onClick","onBlur","onKeyDown","_ref$size","size","accessibilityLabel","_ref$emphasis","emphasis","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","StyledIconButton","_objectSpread","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","concat","activeDescendant","undefined","e","event","DropdownIconButton","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;AAkBA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAU0B;AAAA,EAAA,IATjDC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAC,eAAA,GAAAF,IAAA,CACJG,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAClBE,QAAO,GAAAJ,IAAA,CAAPI,OAAO;IACPC,OAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,UAAS,GAAAN,IAAA,CAATM,SAAS;IAAAC,SAAA,GAAAP,IAAA,CACTQ,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IACfE,kBAAkB,GAAAT,IAAA,CAAlBS,kBAAkB;IAAAC,aAAA,GAAAV,IAAA,CAClBW,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KA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":3,"file":"DropdownIconButton.js","sources":["../../../../../../src/components/Dropdown/DropdownIconButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { IconButtonProps } from '~components/Button/IconButton';\nimport StyledIconButton from '~components/Button/IconButton/StyledIconButton';\n\ntype DropdownIconButtonProps = Omit<IconButtonProps, 'onClick'> & {\n onBlur?: BaseButtonProps['onBlur'];\n onKeyDown?: BaseButtonProps['onKeyDown'];\n onClick?: IconButtonProps['onClick'];\n};\n\nconst _DropdownIconButton = ({\n icon,\n isDisabled = false,\n onClick,\n onBlur,\n onKeyDown,\n size = 'medium',\n accessibilityLabel,\n emphasis = 'intense',\n ...rest\n}: DropdownIconButtonProps): 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 StyledIconButton here to avoid exporting onKeydown, and accessibiltiyProps object\n <StyledIconButton\n {...rest}\n icon={icon}\n isDisabled={isDisabled}\n size={size}\n emphasis={emphasis}\n ref={triggererRef as any}\n accessibilityLabel={accessibilityLabel}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownIconButton'),\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 // With button trigger, there is no \"value\" as such. It's just clickable items\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 DropdownIconButton = assignWithoutSideEffects(_DropdownIconButton, {\n componentId: dropdownComponentIds.triggers.DropdownIconButton,\n});\n\nexport { DropdownIconButton };\n"],"names":["_DropdownIconButton","_ref","icon","_ref$isDisabled","isDisabled","onClick","onBlur","onKeyDown","_ref$size","size","accessibilityLabel","_ref$emphasis","emphasis","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","StyledIconButton","_objectSpread","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","concat","activeDescendant","undefined","e","event","DropdownIconButton","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;AAkBA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAU0B;AAAA,EAAA,IATjDC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAC,eAAA,GAAAF,IAAA,CACJG,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAAA;IAClBE,QAAO,GAAAJ,IAAA,CAAPI,OAAO;IACPC,OAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,UAAS,GAAAN,IAAA,CAATM,SAAS;IAAAC,SAAA,GAAAP,IAAA,CACTQ,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IACfE,kBAAkB,GAAAT,IAAA,CAAlBS,kBAAkB;IAAAC,aAAA,GAAAV,IAAA,CAClBW,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,G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EAAK;AACdpB,QAAAA,cAAc,EAAE,CAAA;AAChB;AACAb,QAAAA,QAAO,aAAPA,QAAO,KAAA,KAAA,CAAA,IAAPA,QAAO,CAAGiC,CAAQ,CAAC,CAAA;OACnB;AACFhC,MAAAA,MAAM,EAAE,SAARA,MAAMA,CAAGgC,CAAC,EAAK;AACb;AACA;AACAhC,QAAAA,OAAM,aAANA,OAAM,KAAA,KAAA,CAAA,IAANA,OAAM,CAAGgC,CAAQ,CAAC,CAAA;OAClB;AACF/B,MAAAA,SAAS,EAAE,SAAXA,SAASA,CAAG+B,CAAC,EAAK;AAChBnB,QAAAA,gBAAgB,KAAhBA,IAAAA,IAAAA,gBAAgB,KAAhBA,KAAAA,CAAAA,IAAAA,gBAAgB,CAAG;AAAEoB,UAAAA,KAAK,EAAED,CAAAA;AAAS,SAAC,CAAC,CAAA;AACvC;AACA/B,QAAAA,UAAS,aAATA,UAAS,KAAA,KAAA,CAAA,IAATA,UAAS,CAAG+B,CAAQ,CAAC,CAAA;AACvB,OAAA;KACD,CAAA,CAAA;AAAC,IAAA;AAEN,CAAC,CAAA;AAED,IAAME,kBAAkB,gBAAGC,wBAAwB,CAACzC,mBAAmB,EAAE;AACvE0C,EAAAA,WAAW,EAAEC,oBAAoB,CAACC,QAAQ,CAACJ,kBAAAA;AAC7C,CAAC;;;;"}
|
|
@@ -72,18 +72,18 @@ var _DropdownLink = function _DropdownLink(_ref) {
|
|
|
72
72
|
onClick: function onClick(e) {
|
|
73
73
|
onTriggerClick();
|
|
74
74
|
// Setting it for web fails it on native typecheck and vice versa
|
|
75
|
-
_onClick === null || _onClick === void 0
|
|
75
|
+
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
76
76
|
},
|
|
77
77
|
onBlur: function onBlur(e) {
|
|
78
78
|
// Setting it for web fails it on native typecheck and vice versa
|
|
79
|
-
_onBlur === null || _onBlur === void 0
|
|
79
|
+
_onBlur === null || _onBlur === void 0 || _onBlur(e);
|
|
80
80
|
},
|
|
81
81
|
onKeyDown: function onKeyDown(e) {
|
|
82
|
-
onTriggerKeydown === null || onTriggerKeydown === void 0
|
|
82
|
+
onTriggerKeydown === null || onTriggerKeydown === void 0 || onTriggerKeydown({
|
|
83
83
|
event: e
|
|
84
84
|
});
|
|
85
85
|
// Setting it for web fails it on native typecheck and vice versa
|
|
86
|
-
_onKeyDown === null || _onKeyDown === void 0
|
|
86
|
+
_onKeyDown === null || _onKeyDown === void 0 || _onKeyDown(e);
|
|
87
87
|
}
|
|
88
88
|
}))
|
|
89
89
|
);
|
|
@@ -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","_objectSpread","variant","makeAnalyticsAttribute","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","concat","activeDescendant","undefined","e","event","DropdownLink","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAiB0B;AAAA,EAAA,IAhB3CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACR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OAAO,EAAC,QAAA;AAAQ,KAAA,EACX/B,IAAI,GAAG;AAAEA,MAAAA,IAAI,EAAJA,IAAI;AAAED,MAAAA,QAAQ,EAARA,QAAAA;AAAS,KAAC,GAAG;AAAEA,MAAAA,QAAQ,EAARA,QAAAA;KAAU,CAAA,EAAA,EAAA,EAAA;AAC7CG,MAAAA,YAAY,EAAEA,YAAa;AAC3BU,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,MAAM,EAAEA,MAAO;AACfC,MAAAA,OAAO,EAAEA,OAAQ;AACjBC,MAAAA,SAAS,EAAEA,SAAU;AACrBT,MAAAA,UAAU,EAAEA,UAAAA;AAAW,KAAA,EACnBU,KAAK,CAAA,EACLgB,sBAAsB,CAAChB,KAAK,CAAC,CAAA,EAAA,EAAA,EAAA;AACjCiB,MAAAA,GAAG,EAAEN,YAAoB;AACzBO,MAAAA,kBAAkB,EAAE;AAClBC,QAAAA,KAAK,EAAEzB,kBAAkB;AACzB0B,QAAAA,QAAQ,EAAEC,0BAA0B,CAACX,eAAe,EAAE,gBAAgB,CAAC;AACvEY,QAAAA,QAAQ,EAAEd,MAAM;AAChBe,QAAAA,QAAQ,EAAAC,EAAAA,CAAAA,MAAA,CAAKjB,cAAc,EAAa,aAAA,CAAA;AACxCkB,QAAAA,gBAAgB,EAAEhB,WAAW,IAAI,CAAC,GAAAe,EAAAA,CAAAA,MAAA,CAAMjB,cAAc,EAAAiB,GAAAA,CAAAA,CAAAA,MAAA,CAAIf,WAAW,CAAKiB,GAAAA,SAAAA;OAC1E;AACFvC,MAAAA,OAAO,EAAE,
|
|
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","_objectSpread","variant","makeAnalyticsAttribute","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","concat","activeDescendant","undefined","e","event","DropdownLink","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAiB0B;AAAA,EAAA,IAhB3CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,iBAAA,GAAAH,IAAA,CACJI,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,iBAAA;IACrBE,QAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,OAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,UAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;IACVC,IAAI,GAAAT,IAAA,CAAJS,IAAI;IACJC,MAAM,GAAAV,IAAA,CAANU,MAAM;IACNC,GAAG,GAAAX,IAAA,CAAHW,GAAG;IACHC,kBAAkB,GAAAZ,IAAA,CAAlBY,kBAAkB;IAAAC,SAAA,GAAAb,IAAA,CAClBc,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IACfE,MAAM,G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
|
@@ -110,7 +110,7 @@ var _DropdownOverlay = function _DropdownOverlay(_ref) {
|
|
|
110
110
|
if (isOpen) {
|
|
111
111
|
var _triggererRef$current;
|
|
112
112
|
// On Safari clicking on a non input element doesn't focuses it https://bugs.webkit.org/show_bug.cgi?id=22261
|
|
113
|
-
(_triggererRef$current = triggererRef.current) === null || _triggererRef$current === void 0
|
|
113
|
+
(_triggererRef$current = triggererRef.current) === null || _triggererRef$current === void 0 || _triggererRef$current.focus();
|
|
114
114
|
}
|
|
115
115
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
116
116
|
}, [isOpen]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownOverlay.web.js","sources":["../../../../../../src/components/Dropdown/DropdownOverlay.web.tsx"],"sourcesContent":["import React from 'react';\nimport {\n autoUpdate,\n offset,\n size as sizeMiddleware,\n useFloating,\n useTransitionStyles,\n flip,\n FloatingPortal,\n useDismiss,\n useInteractions,\n} from '@floating-ui/react';\nimport { useDropdown } from './useDropdown';\nimport { StyledDropdownOverlay } from './StyledDropdownOverlay';\nimport type { DropdownOverlayProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useTheme } from '~components/BladeProvider';\n// Reading directly because its not possible to get theme object on top level to be used in keyframes\nimport { size } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useBottomSheetAndDropdownGlue } from '~components/BottomSheet/BottomSheetContext';\nimport BaseBox from '~components/Box/BaseBox';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { OVERLAY_OFFSET, OVERLAY_TRANSITION_OFFSET } from '~components/BaseMenu/tokens';\n\nconst OVERLAY_PADDING: number = size['12']; // doesn't have to be exact. Just rough padding for floating ui to decide to show overlay on top or bottom\n\n/**\n * Overlay of dropdown\n *\n * Wrap your ActionList within this component\n */\nconst _DropdownOverlay = ({\n children,\n testID,\n zIndex = componentZIndices.dropdownOverlay,\n width,\n minWidth,\n maxWidth,\n referenceRef,\n defaultPlacement = 'bottom-start',\n _isNestedDropdown = false,\n}: DropdownOverlayProps): React.ReactElement | null => {\n const { isOpen, triggererRef, triggererWrapperRef, dropdownTriggerer, setIsOpen } = useDropdown();\n const { theme } = useTheme();\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n\n const isMenu =\n (dropdownTriggerer !== dropdownComponentIds.triggers.SelectInput &&\n dropdownTriggerer !== dropdownComponentIds.triggers.SearchInput &&\n dropdownTriggerer !== dropdownComponentIds.triggers.AutoComplete &&\n referenceRef == undefined) ||\n _isNestedDropdown;\n\n const { refs, floatingStyles, context } = useFloating({\n open: isOpen,\n onOpenChange: setIsOpen,\n strategy: 'fixed',\n placement: defaultPlacement,\n elements: {\n // Input triggers have their ref on internal input element but we want width height of overall visible input hence wrapperRef is needed\n // We fallback to use `triggererRef` for triggers like button and link where wrapper is not needed\n // Checkout: https://github.com/razorpay/blade/pull/1559#discussion_r1305438920\n reference: (referenceRef?.current ??\n triggererWrapperRef.current ??\n triggererRef.current) as Element,\n },\n middleware: [\n offset({\n mainAxis: OVERLAY_OFFSET,\n }),\n flip({\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n padding: OVERLAY_OFFSET + OVERLAY_PADDING,\n }),\n sizeMiddleware({\n apply({ rects, elements }) {\n const overlayWidth = isMenu ? undefined : makeSize(rects.reference.width);\n const overlayMinWidth = isMenu ? makeSize(size['240']) : undefined;\n const overlayMaxWidth = isMenu ? makeSize(size['400']) : undefined;\n\n Object.assign(elements.floating.style, {\n // in menu, we have flexible width between min and max\n // in input triggers, we just take width of trigger\n width: width ?? overlayWidth,\n minWidth: minWidth ?? overlayMinWidth,\n maxWidth: maxWidth ?? overlayMaxWidth,\n });\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context);\n const { getFloatingProps } = useInteractions([dismiss]);\n\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: () => ({\n transform: `translateY(-${makeSize(OVERLAY_TRANSITION_OFFSET)})`,\n opacity: 0,\n }),\n });\n\n React.useEffect(() => {\n if (isOpen) {\n // On Safari clicking on a non input element doesn't focuses it https://bugs.webkit.org/show_bug.cgi?id=22261\n triggererRef.current?.focus();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen]);\n\n return (\n <FloatingPortal>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={refs.setFloating as any}\n style={floatingStyles}\n zIndex={zIndex}\n display={isMounted ? 'flex' : 'none'}\n {...getFloatingProps()}\n >\n <StyledDropdownOverlay\n isInBottomSheet={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet}\n elevation={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet ? undefined : 'midRaised'}\n style={{ ...styles }}\n width={width ? width : '100%'}\n minWidth={minWidth}\n maxWidth={maxWidth}\n {...metaAttribute({ name: MetaConstants.DropdownOverlay, testID })}\n >\n {children}\n </StyledDropdownOverlay>\n </BaseBox>\n </FloatingPortal>\n );\n};\n\nconst DropdownOverlay = assignWithoutSideEffects(_DropdownOverlay, {\n componentId: dropdownComponentIds.DropdownOverlay,\n});\n\nexport { DropdownOverlay };\n"],"names":["OVERLAY_PADDING","size","_DropdownOverlay","_ref","_ref2","_referenceRef$current","children","testID","_ref$zIndex","zIndex","componentZIndices","dropdownOverlay","width","minWidth","maxWidth","referenceRef","_ref$defaultPlacement","defaultPlacement","_ref$_isNestedDropdow","_isNestedDropdown","_useDropdown","useDropdown","isOpen","triggererRef","triggererWrapperRef","dropdownTriggerer","setIsOpen","_useTheme","useTheme","theme","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","isMenu","dropdownComponentIds","triggers","SelectInput","SearchInput","AutoComplete","undefined","_useFloating","useFloating","open","onOpenChange","strategy","placement","elements","reference","current","middleware","offset","mainAxis","OVERLAY_OFFSET","flip","padding","sizeMiddleware","apply","_ref3","rects","overlayWidth","makeSize","overlayMinWidth","overlayMaxWidth","Object","assign","floating","style","whileElementsMounted","autoUpdate","refs","floatingStyles","context","dismiss","useDismiss","_useInteractions","useInteractions","getFloatingProps","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","transform","concat","OVERLAY_TRANSITION_OFFSET","opacity","isMounted","styles","React","useEffect","_triggererRef$current","focus","_jsx","FloatingPortal","BaseBox","_objectSpread","ref","setFloating","display","StyledDropdownOverlay","isInBottomSheet","dropdownHasBottomSheet","elevation","metaAttribute","name","MetaConstants","DropdownOverlay","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAMA,eAAuB,GAAGC,IAAI,CAAC,IAAI,CAAC,CAAC;;AAE3C;AACA;AACA;AACA;AACA;AACA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAUiC;EAAA,IAAAC,KAAA,EAAAC,qBAAA,CAAA;AAAA,EAAA,IATrDC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAAC,WAAA,GAAAL,IAAA,CACNM,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAA,KAAA,CAAA,GAAGE,iBAAiB,CAACC,eAAe,GAAAH,WAAA;IAC1CI,KAAK,GAAAT,IAAA,CAALS,KAAK;IACLC,QAAQ,GAAAV,IAAA,CAARU,QAAQ;IACRC,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IACRC,YAAY,GAAAZ,IAAA,CAAZY,YAAY;IAAAC,qBAAA,GAAAb,IAAA,CACZc,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,cAAc,GAAAA,qBAAA;IAAAE,qBAAA,GAAAf,IAAA,CACjCgB,iBAAiB;AAAjBA,IAAAA,iBAAiB,GAAAD,qBAAA,KAAG,KAA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ropdown/DropdownOverlay.web.tsx"],"sourcesContent":["import React from 'react';\nimport {\n autoUpdate,\n offset,\n size as sizeMiddleware,\n useFloating,\n useTransitionStyles,\n flip,\n FloatingPortal,\n useDismiss,\n useInteractions,\n} from '@floating-ui/react';\nimport { useDropdown } from './useDropdown';\nimport { StyledDropdownOverlay } from './StyledDropdownOverlay';\nimport type { DropdownOverlayProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useTheme } from '~components/BladeProvider';\n// Reading directly because its not possible to get theme object on top level to be used in keyframes\nimport { size } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useBottomSheetAndDropdownGlue } from '~components/BottomSheet/BottomSheetContext';\nimport BaseBox from '~components/Box/BaseBox';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { OVERLAY_OFFSET, OVERLAY_TRANSITION_OFFSET } from '~components/BaseMenu/tokens';\n\nconst OVERLAY_PADDING: number = size['12']; // doesn't have to be exact. Just rough padding for floating ui to decide to show overlay on top or bottom\n\n/**\n * Overlay of dropdown\n *\n * Wrap your ActionList within this component\n */\nconst _DropdownOverlay = ({\n children,\n testID,\n zIndex = componentZIndices.dropdownOverlay,\n width,\n minWidth,\n maxWidth,\n referenceRef,\n defaultPlacement = 'bottom-start',\n _isNestedDropdown = false,\n}: DropdownOverlayProps): React.ReactElement | null => {\n const { isOpen, triggererRef, triggererWrapperRef, dropdownTriggerer, setIsOpen } = useDropdown();\n const { theme } = useTheme();\n const bottomSheetAndDropdownGlue = useBottomSheetAndDropdownGlue();\n\n const isMenu =\n (dropdownTriggerer !== dropdownComponentIds.triggers.SelectInput &&\n dropdownTriggerer !== dropdownComponentIds.triggers.SearchInput &&\n dropdownTriggerer !== dropdownComponentIds.triggers.AutoComplete &&\n referenceRef == undefined) ||\n _isNestedDropdown;\n\n const { refs, floatingStyles, context } = useFloating({\n open: isOpen,\n onOpenChange: setIsOpen,\n strategy: 'fixed',\n placement: defaultPlacement,\n elements: {\n // Input triggers have their ref on internal input element but we want width height of overall visible input hence wrapperRef is needed\n // We fallback to use `triggererRef` for triggers like button and link where wrapper is not needed\n // Checkout: https://github.com/razorpay/blade/pull/1559#discussion_r1305438920\n reference: (referenceRef?.current ??\n triggererWrapperRef.current ??\n triggererRef.current) as Element,\n },\n middleware: [\n offset({\n mainAxis: OVERLAY_OFFSET,\n }),\n flip({\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n padding: OVERLAY_OFFSET + OVERLAY_PADDING,\n }),\n sizeMiddleware({\n apply({ rects, elements }) {\n const overlayWidth = isMenu ? undefined : makeSize(rects.reference.width);\n const overlayMinWidth = isMenu ? makeSize(size['240']) : undefined;\n const overlayMaxWidth = isMenu ? makeSize(size['400']) : undefined;\n\n Object.assign(elements.floating.style, {\n // in menu, we have flexible width between min and max\n // in input triggers, we just take width of trigger\n width: width ?? overlayWidth,\n minWidth: minWidth ?? overlayMinWidth,\n maxWidth: maxWidth ?? overlayMaxWidth,\n });\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context);\n const { getFloatingProps } = useInteractions([dismiss]);\n\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: () => ({\n transform: `translateY(-${makeSize(OVERLAY_TRANSITION_OFFSET)})`,\n opacity: 0,\n }),\n });\n\n React.useEffect(() => {\n if (isOpen) {\n // On Safari clicking on a non input element doesn't focuses it https://bugs.webkit.org/show_bug.cgi?id=22261\n triggererRef.current?.focus();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen]);\n\n return (\n <FloatingPortal>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={refs.setFloating as any}\n style={floatingStyles}\n zIndex={zIndex}\n display={isMounted ? 'flex' : 'none'}\n {...getFloatingProps()}\n >\n <StyledDropdownOverlay\n isInBottomSheet={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet}\n elevation={bottomSheetAndDropdownGlue?.dropdownHasBottomSheet ? undefined : 'midRaised'}\n style={{ ...styles }}\n width={width ? width : '100%'}\n minWidth={minWidth}\n maxWidth={maxWidth}\n {...metaAttribute({ name: MetaConstants.DropdownOverlay, testID })}\n >\n {children}\n </StyledDropdownOverlay>\n </BaseBox>\n </FloatingPortal>\n );\n};\n\nconst DropdownOverlay = assignWithoutSideEffects(_DropdownOverlay, {\n componentId: dropdownComponentIds.DropdownOverlay,\n});\n\nexport { DropdownOverlay };\n"],"names":["OVERLAY_PADDING","size","_DropdownOverlay","_ref","_ref2","_referenceRef$current","children","testID","_ref$zIndex","zIndex","componentZIndices","dropdownOverlay","width","minWidth","maxWidth","referenceRef","_ref$defaultPlacement","defaultPlacement","_ref$_isNestedDropdow","_isNestedDropdown","_useDropdown","useDropdown","isOpen","triggererRef","triggererWrapperRef","dropdownTriggerer","setIsOpen","_useTheme","useTheme","theme","bottomSheetAndDropdownGlue","useBottomSheetAndDropdownGlue","isMenu","dropdownComponentIds","triggers","SelectInput","SearchInput","AutoComplete","undefined","_useFloating","useFloating","open","onOpenChange","strategy","placement","elements","reference","current","middleware","offset","mainAxis","OVERLAY_OFFSET","flip","padding","sizeMiddleware","apply","_ref3","rects","overlayWidth","makeSize","overlayMinWidth","overlayMaxWidth","Object","assign","floating","style","whileElementsMounted","autoUpdate","refs","floatingStyles","context","dismiss","useDismiss","_useInteractions","useInteractions","getFloatingProps","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","transform","concat","OVERLAY_TRANSITION_OFFSET","opacity","isMounted","styles","React","useEffect","_triggererRef$current","focus","_jsx","FloatingPortal","BaseBox","_objectSpread","ref","setFloating","display","StyledDropdownOverlay","isInBottomSheet","dropdownHasBottomSheet","elevation","metaAttribute","name","MetaConstants","DropdownOverlay","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAMA,eAA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,0BAA0B,KAAA,IAAA,IAA1BA,0BAA0B,KAAA,KAAA,CAAA,IAA1BA,0BAA0B,CAAEuE,sBAAsB,GAAG/D,SAAS,GAAG,WAAY;AACxF2B,QAAAA,KAAK,EAAA8B,aAAA,CAAOR,EAAAA,EAAAA,MAAM,CAAG;AACrB3E,QAAAA,KAAK,EAAEA,KAAK,GAAGA,KAAK,GAAG,MAAO;AAC9BC,QAAAA,QAAQ,EAAEA,QAAS;AACnBC,QAAAA,QAAQ,EAAEA,QAAAA;AAAS,OAAA,EACfyF,aAAa,CAAC;QAAEC,IAAI,EAAEC,aAAa,CAACC,eAAe;AAAEnG,QAAAA,MAAM,EAANA,MAAAA;AAAO,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAD,QAAAA,QAAA,EAEjEA,QAAAA;OACoB,CAAA,CAAA;KAChB,CAAA,CAAA;AAAC,GACI,CAAC,CAAA;AAErB,CAAC,CAAA;AAED,IAAMoG,eAAe,gBAAGC,wBAAwB,CAACzG,gBAAgB,EAAE;EACjE0G,WAAW,EAAE3E,oBAAoB,CAACyE,eAAAA;AACpC,CAAC;;;;"}
|
|
@@ -37,7 +37,7 @@ var FilterChipGroup = function FilterChipGroup(_ref) {
|
|
|
37
37
|
selectedFiltersCount = _useListViewFilterCon.selectedFiltersCount,
|
|
38
38
|
setListViewSelectedFilters = _useListViewFilterCon.setListViewSelectedFilters;
|
|
39
39
|
var handleClearButtonClick = function handleClearButtonClick() {
|
|
40
|
-
onClearButtonClick === null || onClearButtonClick === void 0
|
|
40
|
+
onClearButtonClick === null || onClearButtonClick === void 0 || onClearButtonClick();
|
|
41
41
|
setListViewSelectedFilters({});
|
|
42
42
|
setFilterChipGroupSelectedFilters([]);
|
|
43
43
|
setClearFilterCallbackTriggerer(function (prev) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChipGroup.web.js","sources":["../../../../../../src/components/Dropdown/FilterChipGroup.web.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useListViewFilterContext } from '../ListView/ListViewFiltersContext.web';\nimport type { FilterChipGroupProps } from './types';\nimport { FilterChipGroupProvider } from './FilterChipGroupContext.web';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { Link } from '~components/Link';\n\nconst FilterChipGroup = ({\n testID,\n children,\n showClearButton = true,\n onClearButtonClick,\n ...rest\n}: FilterChipGroupProps): React.ReactElement => {\n const [filterChipGroupSelectedFilters, setFilterChipGroupSelectedFilters] = useState<string[]>(\n [],\n );\n const [clearFilterCallbackTriggerer, setClearFilterCallbackTriggerer] = useState<number>(0);\n const { selectedFiltersCount, setListViewSelectedFilters } = useListViewFilterContext();\n const handleClearButtonClick = (): void => {\n onClearButtonClick?.();\n setListViewSelectedFilters({});\n setFilterChipGroupSelectedFilters([]);\n setClearFilterCallbackTriggerer((prev) => prev + 1);\n };\n return (\n <FilterChipGroupProvider\n value={{\n filterChipGroupSelectedFilters,\n setFilterChipGroupSelectedFilters,\n clearFilterCallbackTriggerer,\n setClearFilterCallbackTriggerer,\n }}\n >\n <BaseBox\n {...metaAttribute({ name: MetaConstants.FilterChipGroup, testID })}\n {...makeAnalyticsAttribute(rest)}\n display=\"flex\"\n padding=\"spacing.4\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n width=\"100%\"\n gap=\"spacing.3\"\n flexWrap=\"wrap\"\n >\n {children}\n {showClearButton &&\n (filterChipGroupSelectedFilters.length > 0 || selectedFiltersCount > 0) ? (\n <Link onClick={handleClearButtonClick}>{`Clear Filter${\n filterChipGroupSelectedFilters.length > 1 || selectedFiltersCount > 1 ? 's' : ''\n }`}</Link>\n ) : null}\n </BaseBox>\n </FilterChipGroupProvider>\n );\n};\n\nexport { FilterChipGroup };\n"],"names":["FilterChipGroup","_ref","testID","children","_ref$showClearButton","showClearButton","onClearButtonClick","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","filterChipGroupSelectedFilters","setFilterChipGroupSelectedFilters","_useState3","_useState4","clearFilterCallbackTriggerer","setClearFilterCallbackTriggerer","_useListViewFilterCon","useListViewFilterContext","selectedFiltersCount","setListViewSelectedFilters","handleClearButtonClick","prev","_jsx","FilterChipGroupProvider","value","_jsxs","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","display","padding","alignItems","justifyContent","width","gap","flexWrap","length","Link","onClick","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAM2B;AAAA,EAAA,IAL9CC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,oBAAA,GAAAH,IAAA,CACRI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA;IACtBE,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB;AACfC,IAAAA,IAAI,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAA4EC,QAAQ,CAClF,EACF,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAFMI,IAAAA,8BAA8B,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,iCAAiC,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAGxE,EAAA,IAAAI,UAAA,GAAwEL,QAAQ,CAAS,CAAC,CAAC;IAAAM,UAAA,GAAAJ,cAAA,CAAAG,UAAA,EAAA,CAAA,CAAA;AAApFE,IAAAA,4BAA4B,GAAAD,UAAA,CAAA,CAAA,CAAA;AAAEE,IAAAA,+BAA+B,GAAAF,UAAA,CAAA,CAAA,CAAA,CAAA;AACpE,EAAA,IAAAG,qBAAA,GAA6DC,wBAAwB,EAAE;IAA/EC,oBAAoB,GAAAF,qBAAA,CAApBE,oBAAoB;IAAEC,0BAA0B,GAAAH,qBAAA,CAA1BG,0BAA0B,CAAA;AACxD,EAAA,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAsBA,GAAe;AACzClB,IAAAA,kBAAkB,KAAlBA,IAAAA,IAAAA,kBAAkB,KAAlBA,KAAAA,CAAAA,
|
|
1
|
+
{"version":3,"file":"FilterChipGroup.web.js","sources":["../../../../../../src/components/Dropdown/FilterChipGroup.web.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useListViewFilterContext } from '../ListView/ListViewFiltersContext.web';\nimport type { FilterChipGroupProps } from './types';\nimport { FilterChipGroupProvider } from './FilterChipGroupContext.web';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { Link } from '~components/Link';\n\nconst FilterChipGroup = ({\n testID,\n children,\n showClearButton = true,\n onClearButtonClick,\n ...rest\n}: FilterChipGroupProps): React.ReactElement => {\n const [filterChipGroupSelectedFilters, setFilterChipGroupSelectedFilters] = useState<string[]>(\n [],\n );\n const [clearFilterCallbackTriggerer, setClearFilterCallbackTriggerer] = useState<number>(0);\n const { selectedFiltersCount, setListViewSelectedFilters } = useListViewFilterContext();\n const handleClearButtonClick = (): void => {\n onClearButtonClick?.();\n setListViewSelectedFilters({});\n setFilterChipGroupSelectedFilters([]);\n setClearFilterCallbackTriggerer((prev) => prev + 1);\n };\n return (\n <FilterChipGroupProvider\n value={{\n filterChipGroupSelectedFilters,\n setFilterChipGroupSelectedFilters,\n clearFilterCallbackTriggerer,\n setClearFilterCallbackTriggerer,\n }}\n >\n <BaseBox\n {...metaAttribute({ name: MetaConstants.FilterChipGroup, testID })}\n {...makeAnalyticsAttribute(rest)}\n display=\"flex\"\n padding=\"spacing.4\"\n alignItems=\"center\"\n justifyContent=\"flex-start\"\n width=\"100%\"\n gap=\"spacing.3\"\n flexWrap=\"wrap\"\n >\n {children}\n {showClearButton &&\n (filterChipGroupSelectedFilters.length > 0 || selectedFiltersCount > 0) ? (\n <Link onClick={handleClearButtonClick}>{`Clear Filter${\n filterChipGroupSelectedFilters.length > 1 || selectedFiltersCount > 1 ? 's' : ''\n }`}</Link>\n ) : null}\n </BaseBox>\n </FilterChipGroupProvider>\n );\n};\n\nexport { FilterChipGroup };\n"],"names":["FilterChipGroup","_ref","testID","children","_ref$showClearButton","showClearButton","onClearButtonClick","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","filterChipGroupSelectedFilters","setFilterChipGroupSelectedFilters","_useState3","_useState4","clearFilterCallbackTriggerer","setClearFilterCallbackTriggerer","_useListViewFilterCon","useListViewFilterContext","selectedFiltersCount","setListViewSelectedFilters","handleClearButtonClick","prev","_jsx","FilterChipGroupProvider","value","_jsxs","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","display","padding","alignItems","justifyContent","width","gap","flexWrap","length","Link","onClick","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAM2B;AAAA,EAAA,IAL9CC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,oBAAA,GAAAH,IAAA,CACRI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA;IACtBE,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB;AACfC,IAAAA,IAAI,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAA4EC,QAAQ,CAClF,EACF,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAFMI,IAAAA,8BAA8B,GAAAF,UAAA,CAAA,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AO,KAAC,CAAC,CAAA,EAC9DiC,sBAAsB,CAAC5B,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAChC6B,MAAAA,OAAO,EAAC,MAAM;AACdC,MAAAA,OAAO,EAAC,WAAW;AACnBC,MAAAA,UAAU,EAAC,QAAQ;AACnBC,MAAAA,cAAc,EAAC,YAAY;AAC3BC,MAAAA,KAAK,EAAC,MAAM;AACZC,MAAAA,GAAG,EAAC,WAAW;AACfC,MAAAA,QAAQ,EAAC,MAAM;AAAAvC,MAAAA,QAAA,GAEdA,QAAQ,EACRE,eAAe,KACfS,8BAA8B,CAAC6B,MAAM,GAAG,CAAC,IAAIrB,oBAAoB,GAAG,CAAC,CAAC,gBACrEI,GAAA,CAACkB,IAAI,EAAA;AAACC,QAAAA,OAAO,EAAErB,sBAAuB;AAAArB,QAAAA,QAAA,EAAA2C,cAAAA,CAAAA,MAAA,CACpChC,8BAA8B,CAAC6B,MAAM,GAAG,CAAC,IAAIrB,oBAAoB,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,CAAA;OACzE,CAAC,GACR,IAAI,CAAA;KACD,CAAA,CAAA;AAAC,GACa,CAAC,CAAA;AAE9B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterChipGroupContext.web.js","sources":["../../../../../../src/components/Dropdown/FilterChipGroupContext.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { FilterChipGroupContextType } from './types';\n\nconst FilterChipGroupContext = React.createContext<FilterChipGroupContextType>({\n filterChipGroupSelectedFilters: [],\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setFilterChipGroupSelectedFilters: () => {},\n clearFilterCallbackTriggerer: 0,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setClearFilterCallbackTriggerer: () => {},\n});\nconst FilterChipGroupProvider = FilterChipGroupContext.Provider;\n\nconst useFilterChipGroupContext = (): FilterChipGroupContextType => {\n const context = React.useContext(FilterChipGroupContext);\n return context;\n};\n\nexport { useFilterChipGroupContext, FilterChipGroupProvider };\n"],"names":["FilterChipGroupContext","React","createContext","filterChipGroupSelectedFilters","setFilterChipGroupSelectedFilters","clearFilterCallbackTriggerer","setClearFilterCallbackTriggerer","FilterChipGroupProvider","Provider","useFilterChipGroupContext","context","useContext"],"mappings":";;AAGA,IAAMA,sBAAsB,gBAAGC,cAAK,CAACC,aAAa,CAA6B;AAC7EC,EAAAA,8BAA8B,EAAE,EAAE;AAClC;AACAC,EAAAA,iCAAiC,EAAE,
|
|
1
|
+
{"version":3,"file":"FilterChipGroupContext.web.js","sources":["../../../../../../src/components/Dropdown/FilterChipGroupContext.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { FilterChipGroupContextType } from './types';\n\nconst FilterChipGroupContext = React.createContext<FilterChipGroupContextType>({\n filterChipGroupSelectedFilters: [],\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setFilterChipGroupSelectedFilters: () => {},\n clearFilterCallbackTriggerer: 0,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n setClearFilterCallbackTriggerer: () => {},\n});\nconst FilterChipGroupProvider = FilterChipGroupContext.Provider;\n\nconst useFilterChipGroupContext = (): FilterChipGroupContextType => {\n const context = React.useContext(FilterChipGroupContext);\n return context;\n};\n\nexport { useFilterChipGroupContext, FilterChipGroupProvider };\n"],"names":["FilterChipGroupContext","React","createContext","filterChipGroupSelectedFilters","setFilterChipGroupSelectedFilters","clearFilterCallbackTriggerer","setClearFilterCallbackTriggerer","FilterChipGroupProvider","Provider","useFilterChipGroupContext","context","useContext"],"mappings":";;AAGA,IAAMA,sBAAsB,gBAAGC,cAAK,CAACC,aAAa,CAA6B;AAC7EC,EAAAA,8BAA8B,EAAE,EAAE;AAClC;AACAC,EAAAA,iCAAiC,EAAE,SAAnCA,iCAAiCA,GAAQ,EAAE;AAC3CC,EAAAA,4BAA4B,EAAE,CAAC;AAC/B;AACAC,EAAAA,+BAA+B,EAAE,SAAjCA,+BAA+BA,GAAQ,EAAC;AAC1C,CAAC,CAAC,CAAA;AACF,IAAMC,uBAAuB,GAAGP,sBAAsB,CAACQ,SAAQ;AAE/D,IAAMC,yBAAyB,GAAG,SAA5BA,yBAAyBA,GAAqC;AAClE,EAAA,IAAMC,OAAO,GAAGT,cAAK,CAACU,UAAU,CAACX,sBAAsB,CAAC,CAAA;AACxD,EAAA,OAAOU,OAAO,CAAA;AAChB;;;;"}
|
|
@@ -127,11 +127,11 @@ var _FilterChipSelectInput = function _FilterChipSelectInput(props) {
|
|
|
127
127
|
};
|
|
128
128
|
var handleClearButtonClick = function handleClearButtonClick() {
|
|
129
129
|
var _props$onClearButtonC, _props$onChange;
|
|
130
|
-
(_props$onClearButtonC = props.onClearButtonClick) === null || _props$onClearButtonC === void 0
|
|
130
|
+
(_props$onClearButtonC = props.onClearButtonClick) === null || _props$onClearButtonC === void 0 || _props$onClearButtonC.call(props, {
|
|
131
131
|
name: name !== null && name !== void 0 ? name : idBase,
|
|
132
132
|
values: getValuesArrayFromIndices()
|
|
133
133
|
});
|
|
134
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
|
134
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
|
|
135
135
|
name: name !== null && name !== void 0 ? name : idBase,
|
|
136
136
|
values: []
|
|
137
137
|
});
|
|
@@ -160,7 +160,7 @@ var _FilterChipSelectInput = function _FilterChipSelectInput(props) {
|
|
|
160
160
|
useEffect(function () {
|
|
161
161
|
if (!isFirstRender) {
|
|
162
162
|
var _props$onChange2;
|
|
163
|
-
(_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0
|
|
163
|
+
(_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0 || _props$onChange2.call(props, {
|
|
164
164
|
name: props.name || idBase,
|
|
165
165
|
values: getValuesArrayFromIndices()
|
|
166
166
|
});
|
|
@@ -194,8 +194,8 @@ var _FilterChipSelectInput = function _FilterChipSelectInput(props) {
|
|
|
194
194
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
195
195
|
}, [changeCallbackTriggerer]);
|
|
196
196
|
var handleKeyDown = function handleKeyDown(e) {
|
|
197
|
-
onKeyDown === null || onKeyDown === void 0
|
|
198
|
-
onTriggerKeydown === null || onTriggerKeydown === void 0
|
|
197
|
+
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
|
|
198
|
+
onTriggerKeydown === null || onTriggerKeydown === void 0 || onTriggerKeydown({
|
|
199
199
|
event: e
|
|
200
200
|
});
|
|
201
201
|
if (e.key === 'Escape') {
|
|
@@ -225,10 +225,10 @@ var _FilterChipSelectInput = function _FilterChipSelectInput(props) {
|
|
|
225
225
|
},
|
|
226
226
|
onClick: function onClick(e) {
|
|
227
227
|
onTriggerClick();
|
|
228
|
-
_onClick === null || _onClick === void 0
|
|
228
|
+
_onClick === null || _onClick === void 0 || _onClick(e);
|
|
229
229
|
},
|
|
230
230
|
onBlur: function onBlur(e) {
|
|
231
|
-
_onBlur === null || _onBlur === void 0
|
|
231
|
+
_onBlur === null || _onBlur === void 0 || _onBlur(e);
|
|
232
232
|
},
|
|
233
233
|
isDisabled: isDisabled
|
|
234
234
|
}));
|