@vibe/core 4.0.0-alpha.1 → 4.0.0-alpha.2
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/dist/base/dist/BaseInput/BaseInput.module.scss.js +1 -1
- package/dist/components/Accordion/Accordion/Accordion.d.ts +18 -18
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +51 -51
- package/dist/components/Accordion/index.d.ts +2 -2
- package/dist/components/AlertBanner/AlertBanner.d.ts +35 -35
- package/dist/components/AlertBanner/AlertBanner.types.d.ts +1 -1
- package/dist/components/AlertBanner/AlertBannerButton/AlertBannerButton.d.ts +10 -10
- package/dist/components/AlertBanner/AlertBannerContext.d.ts +7 -7
- package/dist/components/AlertBanner/AlertBannerLink/AlertBannerLink.d.ts +10 -10
- package/dist/components/AlertBanner/AlertBannerText/AlertBannerText.d.ts +18 -18
- package/dist/components/AlertBanner/index.d.ts +5 -5
- package/dist/components/AttentionBox/AttentionBox.d.ts +4 -4
- package/dist/components/AttentionBox/AttentionBox.types.d.ts +70 -70
- package/dist/components/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.d.ts +7 -7
- package/dist/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.d.ts +8 -8
- package/dist/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.d.ts +9 -9
- package/dist/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.d.ts +5 -5
- package/dist/components/AttentionBox/consts/icons.d.ts +3 -3
- package/dist/components/AttentionBox/index.d.ts +2 -2
- package/dist/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.d.ts +5 -5
- package/dist/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.d.ts +5 -5
- package/dist/components/AttentionBox/utils/iconUtils.d.ts +3 -3
- package/dist/components/Avatar/Avatar.d.ts +107 -107
- package/dist/components/Avatar/Avatar.types.d.ts +2 -2
- package/dist/components/Avatar/AvatarBadge.d.ts +28 -28
- package/dist/components/Avatar/AvatarContent.d.ts +40 -40
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +46 -46
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +14 -14
- package/dist/components/AvatarGroup/AvatarGroupConstants.d.ts +2 -2
- package/dist/components/AvatarGroup/AvatarGroupCounter.d.ts +42 -42
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipContainer.d.ts +41 -41
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipContent.d.ts +24 -24
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.d.ts +34 -34
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipHelper.d.ts +17 -17
- package/dist/components/AvatarGroup/AvatarGroupHelper.d.ts +3 -3
- package/dist/components/AvatarGroup/index.d.ts +2 -2
- package/dist/components/Badge/Badge.d.ts +34 -34
- package/dist/components/Badge/Badge.types.d.ts +3 -3
- package/dist/components/Badge/Indicator/Indicator.d.ts +11 -11
- package/dist/components/Badge/Indicator/Indicator.types.d.ts +1 -1
- package/dist/components/Badge/index.d.ts +2 -2
- package/dist/components/BaseItem/BaseItem.d.ts +6 -6
- package/dist/components/BaseItem/BaseItem.types.d.ts +110 -110
- package/dist/components/BaseItem/hooks/useListItemProps.d.ts +20 -20
- package/dist/components/BaseItem/index.d.ts +2 -2
- package/dist/components/BaseItem/utils.d.ts +4 -4
- package/dist/components/BaseList/BaseList.d.ts +4 -4
- package/dist/components/BaseList/BaseList.types.d.ts +60 -60
- package/dist/components/BaseList/context/BaseListContext.d.ts +66 -66
- package/dist/components/BaseList/hooks/useBaseListFocus.d.ts +41 -42
- package/dist/components/BaseList/hooks/useBaseListKeyboard.d.ts +27 -28
- package/dist/components/BaseList/index.d.ts +3 -3
- package/dist/components/BaseList/utils/baseListUtils.d.ts +10 -10
- package/dist/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.d.ts +38 -38
- package/dist/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.d.ts +39 -39
- package/dist/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbMenu.d.ts +7 -7
- package/dist/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbMenuItem/BreadcrumbMenuItem.d.ts +12 -12
- package/dist/components/BreadcrumbsBar/Breadcrumbs.types.d.ts +1 -1
- package/dist/components/BreadcrumbsBar/BreadcrumbsBar.d.ts +17 -17
- package/dist/components/BreadcrumbsBar/index.d.ts +5 -5
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +85 -85
- package/dist/components/ButtonGroup/ButtonGroupConstants.d.ts +1 -1
- package/dist/components/ButtonGroup/ButtonWrapper.d.ts +35 -35
- package/dist/components/ButtonGroup/index.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +67 -67
- package/dist/components/Checkbox/hooks/useSupportFirefoxLabelClick.d.ts +6 -6
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Chips/Chips.d.ts +109 -109
- package/dist/components/Chips/index.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +80 -80
- package/dist/components/ColorPicker/ColorPicker.types.d.ts +6 -6
- package/dist/components/ColorPicker/ColorPickerConstants.d.ts +5 -5
- package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.d.ts +19 -19
- package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.d.ts +63 -63
- package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.d.ts +84 -84
- package/dist/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.d.ts +53 -53
- package/dist/components/ColorPicker/index.d.ts +3 -3
- package/dist/components/ColorPicker/services/ColorPickerStyleService.d.ts +3 -3
- package/dist/components/Combobox/Combobox.d.ts +163 -163
- package/dist/components/Combobox/Combobox.types.d.ts +3 -3
- package/dist/components/Combobox/ComboboxHelpers/ComboboxHelpers.d.ts +62 -62
- package/dist/components/Combobox/ComboboxService.d.ts +7 -7
- package/dist/components/Combobox/components/ComboboxCategory/ComboboxCategory.d.ts +14 -14
- package/dist/components/Combobox/components/ComboboxConstants.d.ts +239 -239
- package/dist/components/Combobox/components/ComboboxItems/ComboboxItems.d.ts +65 -65
- package/dist/components/Combobox/components/ComboboxOption/ComboboxOption.d.ts +46 -46
- package/dist/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.d.ts +6 -6
- package/dist/components/Combobox/helpers.d.ts +1 -1
- package/dist/components/Combobox/index.d.ts +2 -2
- package/dist/components/Counter/Counter.d.ts +51 -51
- package/dist/components/Counter/Counter.types.d.ts +3 -3
- package/dist/components/Counter/index.d.ts +2 -2
- package/dist/components/DatePicker/DateContentHoverContext.d.ts +12 -12
- package/dist/components/DatePicker/DatePicker.d.ts +8 -8
- package/dist/components/DatePicker/DatePicker.types.d.ts +34 -34
- package/dist/components/DatePicker/DatePickerHeader.d.ts +17 -17
- package/dist/components/DatePicker/RangeDayContent.d.ts +3 -3
- package/dist/components/DatePicker/SingleDayContent.d.ts +3 -3
- package/dist/components/DatePicker/datePickerHooks.d.ts +18 -18
- package/dist/components/DatePicker/index.d.ts +2 -2
- package/dist/components/DatePicker/utils.d.ts +13 -13
- package/dist/components/Divider/Divider.d.ts +15 -15
- package/dist/components/Divider/Divider.types.d.ts +1 -1
- package/dist/components/Divider/index.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.d.ts +7 -7
- package/dist/components/Dropdown/Dropdown.types.d.ts +268 -268
- package/dist/components/Dropdown/components/DropdownBase/DropdownBase.d.ts +7 -7
- package/dist/components/Dropdown/components/DropdownBaseList/DropdownBaseList.d.ts +6 -6
- package/dist/components/Dropdown/components/DropdownBaseList/DropdownBaseList.types.d.ts +86 -86
- package/dist/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.d.ts +3 -3
- package/dist/components/Dropdown/components/DropdownPopup/DropdownPopup.d.ts +3 -3
- package/dist/components/Dropdown/components/DropdownWrapperUI.d.ts +9 -9
- package/dist/components/Dropdown/components/Menu/Menu.d.ts +4 -4
- package/dist/components/Dropdown/components/Menu/MenuList.d.ts +4 -4
- package/dist/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.d.ts +12 -12
- package/dist/components/Dropdown/components/Trigger/DropdownChip.d.ts +11 -11
- package/dist/components/Dropdown/components/Trigger/DropdownInput.d.ts +6 -6
- package/dist/components/Dropdown/components/Trigger/MultiSelectTrigger.d.ts +3 -3
- package/dist/components/Dropdown/components/Trigger/SingleSelectTrigger.d.ts +3 -3
- package/dist/components/Dropdown/components/Trigger/TriggerActions.d.ts +3 -3
- package/dist/components/Dropdown/context/DropdownContext.d.ts +59 -59
- package/dist/components/Dropdown/context/DropdownContext.types.d.ts +34 -34
- package/dist/components/Dropdown/hooks/useDropdownCombobox.d.ts +390 -391
- package/dist/components/Dropdown/hooks/useDropdownFiltering.d.ts +9 -10
- package/dist/components/Dropdown/hooks/useDropdownMultiCombobox.d.ts +23 -23
- package/dist/components/Dropdown/hooks/useDropdownMultiSelect.d.ts +23 -23
- package/dist/components/Dropdown/hooks/useDropdownSelect.d.ts +19 -19
- package/dist/components/Dropdown/index.d.ts +2 -2
- package/dist/components/Dropdown/modes/DropdownComboboxController.d.ts +5 -5
- package/dist/components/Dropdown/modes/DropdownMultiComboboxController.d.ts +5 -5
- package/dist/components/Dropdown/modes/DropdownMultiSelectController.d.ts +5 -5
- package/dist/components/Dropdown/modes/DropdownSelectController.d.ts +5 -5
- package/dist/components/Dropdown/utils/dropdown-modifiers.d.ts +2 -2
- package/dist/components/Dropdown/utils/dropdownUtils.d.ts +3 -3
- package/dist/components/EditableHeading/EditableHeading.d.ts +16 -16
- package/dist/components/EditableHeading/index.d.ts +1 -1
- package/dist/components/EditableText/EditableText.d.ts +20 -20
- package/dist/components/EditableText/index.d.ts +1 -1
- package/dist/components/EditableTypography/EditableTypography.d.ts +79 -79
- package/dist/components/EditableTypography/index.d.ts +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +4 -4
- package/dist/components/EmptyState/EmptyState.types.d.ts +27 -27
- package/dist/components/EmptyState/index.d.ts +2 -2
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +59 -59
- package/dist/components/ExpandCollapse/ExpandCollapse.types.d.ts +1 -1
- package/dist/components/ExpandCollapse/index.d.ts +1 -1
- package/dist/components/FieldLabel/FieldLabel.d.ts +34 -34
- package/dist/components/FieldLabel/index.d.ts +1 -1
- package/dist/components/FormattedNumber/FormattedNumber.d.ts +38 -38
- package/dist/components/FormattedNumber/FormattedNumberHelpers.d.ts +4 -4
- package/dist/components/FormattedNumber/index.d.ts +1 -1
- package/dist/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.d.ts +15 -15
- package/dist/components/GridKeyboardNavigationContext/GridKeyboardNavigationContextConstants.d.ts +25 -25
- package/dist/components/GridKeyboardNavigationContext/helper.d.ts +6 -6
- package/dist/components/GridKeyboardNavigationContext/index.d.ts +1 -1
- package/dist/components/HiddenText/HiddenText.d.ts +10 -10
- package/dist/components/HiddenText/index.d.ts +1 -1
- package/dist/components/Info/Info.d.ts +4 -4
- package/dist/components/Info/Info.types.d.ts +60 -60
- package/dist/components/Info/components/InfoDialogContent/InfoDialogContent.d.ts +4 -4
- package/dist/components/Info/components/InfoDialogContent/InfoDialogContent.types.d.ts +16 -16
- package/dist/components/Info/components/InfoLink/InfoLink.d.ts +5 -5
- package/dist/components/Info/components/index.d.ts +3 -3
- package/dist/components/Info/index.d.ts +2 -2
- package/dist/components/InfoText/InfoText.d.ts +4 -4
- package/dist/components/InfoText/InfoText.types.d.ts +26 -26
- package/dist/components/InfoText/index.d.ts +2 -2
- package/dist/components/Label/Label.d.ts +40 -40
- package/dist/components/Label/Label.types.d.ts +5 -5
- package/dist/components/Label/LabelCelebrationAnimation.d.ts +13 -13
- package/dist/components/Label/LabelConstants.d.ts +3 -3
- package/dist/components/Label/Leg.d.ts +6 -6
- package/dist/components/Label/index.d.ts +2 -2
- package/dist/components/Link/Link.d.ts +70 -70
- package/dist/components/Link/Link.types.d.ts +3 -3
- package/dist/components/Link/LinkConsts.d.ts +16 -16
- package/dist/components/Link/index.d.ts +2 -2
- package/dist/components/List/List.d.ts +41 -41
- package/dist/components/List/List.types.d.ts +1 -1
- package/dist/components/List/VirtualizedListItems/VirtualizedListItems.d.ts +11 -11
- package/dist/components/List/index.d.ts +2 -2
- package/dist/components/List/utils/ListContext.d.ts +10 -10
- package/dist/components/List/utils/ListUtils.d.ts +11 -11
- package/dist/components/ListItem/ListItem.d.ts +52 -52
- package/dist/components/ListItem/ListItem.types.d.ts +3 -3
- package/dist/components/ListItem/index.d.ts +2 -2
- package/dist/components/ListItemAvatar/ListItemAvatar.d.ts +19 -19
- package/dist/components/ListItemAvatar/index.d.ts +1 -1
- package/dist/components/ListItemIcon/ListItemIcon.d.ts +22 -22
- package/dist/components/ListItemIcon/ListItemIcon.types.d.ts +1 -1
- package/dist/components/ListItemIcon/index.d.ts +2 -2
- package/dist/components/ListTitle/ListTitle.d.ts +14 -14
- package/dist/components/ListTitle/index.d.ts +1 -1
- package/dist/components/Menu/Menu/Menu.d.ts +64 -64
- package/dist/components/Menu/Menu/MenuConstants.d.ts +12 -12
- package/dist/components/Menu/Menu/hooks/useAdjacentSelectableMenuIndex.d.ts +7 -7
- package/dist/components/Menu/Menu/hooks/useCloseMenuOnKeyEvent.d.ts +10 -10
- package/dist/components/Menu/Menu/hooks/useFocusOnMount.d.ts +9 -9
- package/dist/components/Menu/Menu/hooks/useLastNavigationDirection.d.ts +4 -5
- package/dist/components/Menu/Menu/hooks/useMenuId.d.ts +2 -2
- package/dist/components/Menu/Menu/hooks/useMenuKeyboardNavigation.d.ts +11 -11
- package/dist/components/Menu/Menu/hooks/useMouseLeave.d.ts +7 -7
- package/dist/components/Menu/Menu/hooks/useOnCloseMenu.d.ts +6 -6
- package/dist/components/Menu/Menu/hooks/useSubMenuIndex.d.ts +7 -8
- package/dist/components/Menu/Menu/utils/utils.d.ts +4 -4
- package/dist/components/Menu/MenuDivider/MenuDivider.d.ts +5 -5
- package/dist/components/Menu/MenuGridItem/MenuGridItem.d.ts +51 -51
- package/dist/components/Menu/MenuGridItem/useFocusGridItemByActiveStatus.d.ts +8 -8
- package/dist/components/Menu/MenuGridItem/useMenuGridItemNavContext.d.ts +15 -15
- package/dist/components/Menu/MenuItem/AvatarMenuItem.d.ts +22 -22
- package/dist/components/Menu/MenuItem/MenuItem.d.ts +169 -169
- package/dist/components/Menu/MenuItem/MenuItem.types.d.ts +1 -1
- package/dist/components/Menu/MenuItem/MenuItemConstants.d.ts +1 -1
- package/dist/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.d.ts +4 -4
- package/dist/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.types.d.ts +15 -15
- package/dist/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.d.ts +4 -4
- package/dist/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.d.ts +32 -32
- package/dist/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.d.ts +4 -4
- package/dist/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.types.d.ts +33 -33
- package/dist/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.d.ts +4 -4
- package/dist/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.types.d.ts +31 -31
- package/dist/components/Menu/MenuItem/hooks/useMenuItemKeyboardEvents.d.ts +21 -21
- package/dist/components/Menu/MenuItem/hooks/useMenuItemMouseEvents.d.ts +12 -12
- package/dist/components/Menu/MenuItemButton/MenuItemButton.d.ts +77 -77
- package/dist/components/Menu/MenuTitle/MenuTitle.d.ts +15 -15
- package/dist/components/Menu/MenuTitle/MenuTitle.type.d.ts +1 -1
- package/dist/components/Menu/index.d.ts +7 -7
- package/dist/components/MenuButton/MenuButton.d.ts +146 -146
- package/dist/components/MenuButton/MenuButton.types.d.ts +2 -2
- package/dist/components/MenuButton/index.d.ts +2 -2
- package/dist/components/Modal/Modal/Modal.d.ts +4 -4
- package/dist/components/Modal/Modal/Modal.types.d.ts +114 -114
- package/dist/components/Modal/Modal/index.d.ts +2 -2
- package/dist/components/Modal/ModalContent/ModalContent.d.ts +4 -4
- package/dist/components/Modal/ModalContent/ModalContent.types.d.ts +8 -8
- package/dist/components/Modal/ModalContent/index.d.ts +2 -2
- package/dist/components/Modal/ModalHeader/ModalHeader.d.ts +4 -4
- package/dist/components/Modal/ModalHeader/ModalHeader.types.d.ts +42 -42
- package/dist/components/Modal/ModalHeader/index.d.ts +2 -2
- package/dist/components/Modal/ModalMedia/ModalMedia.d.ts +4 -4
- package/dist/components/Modal/ModalMedia/ModalMedia.types.d.ts +8 -8
- package/dist/components/Modal/ModalMedia/index.d.ts +2 -2
- package/dist/components/Modal/ModalTopActions/ModalTopActions.d.ts +4 -4
- package/dist/components/Modal/ModalTopActions/ModalTopActions.types.d.ts +25 -25
- package/dist/components/Modal/context/ModalContext.d.ts +4 -4
- package/dist/components/Modal/context/ModalContext.types.d.ts +32 -32
- package/dist/components/Modal/footers/ModalFooter/ModalFooter.d.ts +4 -4
- package/dist/components/Modal/footers/ModalFooter/ModalFooter.types.d.ts +8 -8
- package/dist/components/Modal/footers/ModalFooterBase/ModalFooterBase.d.ts +4 -4
- package/dist/components/Modal/footers/ModalFooterBase/ModalFooterBase.types.d.ts +28 -28
- package/dist/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.d.ts +4 -4
- package/dist/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.types.d.ts +18 -18
- package/dist/components/Modal/footers/index.d.ts +4 -4
- package/dist/components/Modal/footers/utils/getPropsForButton.d.ts +116 -133
- package/dist/components/Modal/hooks/useFocusEscapeTargets/index.d.ts +2 -2
- package/dist/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.d.ts +10 -10
- package/dist/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.types.d.ts +2 -2
- package/dist/components/Modal/hooks/usePortalTarget/usePortalTarget.d.ts +3 -3
- package/dist/components/Modal/hooks/usePortalTarget/usePortalTarget.types.d.ts +2 -2
- package/dist/components/Modal/index.d.ts +6 -6
- package/dist/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.d.ts +4 -4
- package/dist/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.types.d.ts +10 -10
- package/dist/components/Modal/layouts/ModalFooterShadow.d.ts +4 -4
- package/dist/components/Modal/layouts/ModalFooterShadow.types.d.ts +6 -6
- package/dist/components/Modal/layouts/ModalLayoutScrollableContent.d.ts +4 -4
- package/dist/components/Modal/layouts/ModalLayoutScrollableContent.types.d.ts +15 -15
- package/dist/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.d.ts +4 -4
- package/dist/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.types.d.ts +11 -11
- package/dist/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.d.ts +4 -4
- package/dist/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.types.d.ts +11 -11
- package/dist/components/Modal/layouts/index.d.ts +6 -6
- package/dist/components/Modal/layouts/useLayoutScrolledContent.d.ts +9 -9
- package/dist/components/MultiStepIndicator/MultiStep.types.d.ts +9 -9
- package/dist/components/MultiStepIndicator/MultiStepIndicator.d.ts +48 -48
- package/dist/components/MultiStepIndicator/components/StepIndicator/StepIndicator.d.ts +86 -86
- package/dist/components/MultiStepIndicator/index.d.ts +2 -2
- package/dist/components/NumberField/NumberField.d.ts +4 -4
- package/dist/components/NumberField/NumberField.types.d.ts +80 -80
- package/dist/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.d.ts +4 -4
- package/dist/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.types.d.ts +9 -10
- package/dist/components/NumberField/hooks/useNumberFieldState.d.ts +11 -11
- package/dist/components/NumberField/hooks/useSpinButtonHandlers.d.ts +9 -10
- package/dist/components/NumberField/index.d.ts +2 -2
- package/dist/components/NumberField/utils/calcValue.d.ts +6 -6
- package/dist/components/ProgressBars/PercentageLabel/PercentageLabel.d.ts +13 -13
- package/dist/components/ProgressBars/ProgressBar/Bar/Bar.d.ts +48 -48
- package/dist/components/ProgressBars/ProgressBar/ProgressBar.d.ts +69 -69
- package/dist/components/ProgressBars/ProgressBar/ProgressBar.types.d.ts +3 -3
- package/dist/components/ProgressBars/ProgressBar/ProgressBarHelpers.d.ts +4 -4
- package/dist/components/ProgressBars/index.d.ts +2 -2
- package/dist/components/RadioButton/RadioButton.d.ts +74 -74
- package/dist/components/RadioButton/index.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +4 -4
- package/dist/components/Search/Search.types.d.ts +104 -104
- package/dist/components/Search/index.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.d.ts +31 -31
- package/dist/components/Skeleton/SkeletonConstants.d.ts +1 -1
- package/dist/components/Skeleton/Skelton.types.d.ts +4 -4
- package/dist/components/Skeleton/index.d.ts +2 -2
- package/dist/components/SlideTransition/SlideTransition.d.ts +4 -4
- package/dist/components/SlideTransition/SlideTransition.types.d.ts +20 -20
- package/dist/components/Slider/SelectionIndicator.d.ts +15 -15
- package/dist/components/Slider/Slider.d.ts +120 -120
- package/dist/components/Slider/Slider.types.d.ts +8 -8
- package/dist/components/Slider/SliderBase/SliderBase.d.ts +5 -5
- package/dist/components/Slider/SliderBase/SliderFilledTrack.d.ts +23 -23
- package/dist/components/Slider/SliderBase/SliderRail.d.ts +19 -19
- package/dist/components/Slider/SliderBase/SliderThumb.d.ts +27 -27
- package/dist/components/Slider/SliderBase/SliderTrack.d.ts +11 -11
- package/dist/components/Slider/SliderConstants.d.ts +64 -64
- package/dist/components/Slider/SliderContext.d.ts +43 -43
- package/dist/components/Slider/SliderHelpers.d.ts +14 -14
- package/dist/components/Slider/SliderHooks.d.ts +25 -26
- package/dist/components/Slider/SliderInfix.d.ts +11 -11
- package/dist/components/Slider/SliderInfixHooks.d.ts +3 -3
- package/dist/components/Slider/index.d.ts +2 -2
- package/dist/components/SplitButton/SplitButton.d.ts +44 -44
- package/dist/components/SplitButton/SplitButtonConstants.d.ts +22 -22
- package/dist/components/SplitButton/SplitButtonMenu/SplitButtonMenu.d.ts +9 -9
- package/dist/components/SplitButton/index.d.ts +2 -2
- package/dist/components/Steps/Steps.d.ts +56 -56
- package/dist/components/Steps/Steps.types.d.ts +3 -3
- package/dist/components/Steps/StepsCommand.d.ts +35 -35
- package/dist/components/Steps/StepsConstants.d.ts +3 -3
- package/dist/components/Steps/StepsDot.d.ts +26 -26
- package/dist/components/Steps/StepsGalleryHeader.d.ts +26 -26
- package/dist/components/Steps/StepsHeader.d.ts +51 -51
- package/dist/components/Steps/StepsNumbersHeader.d.ts +18 -18
- package/dist/components/Steps/index.d.ts +2 -2
- package/dist/components/Switch/Switch.d.ts +59 -59
- package/dist/components/Switch/index.d.ts +1 -1
- package/dist/components/Table/Table/Table.d.ts +76 -76
- package/dist/components/Table/Table/Table.types.d.ts +1 -1
- package/dist/components/Table/Table/TableConsts.d.ts +14 -14
- package/dist/components/Table/Table/tableHelpers.d.ts +12 -12
- package/dist/components/Table/TableBody/TableBody.d.ts +12 -12
- package/dist/components/Table/TableCell/TableCell.d.ts +14 -14
- package/dist/components/Table/TableCellSkeleton/TableCellSkeleton.d.ts +15 -15
- package/dist/components/Table/TableContainer/TableContainer.d.ts +4 -4
- package/dist/components/Table/TableContainer/TableContainer.types.d.ts +12 -12
- package/dist/components/Table/TableHeader/TableHeader.d.ts +11 -11
- package/dist/components/Table/TableHeaderCell/TableHeaderCell.d.ts +35 -35
- package/dist/components/Table/TableRow/TableRow.d.ts +19 -19
- package/dist/components/Table/TableRowMenu/TableRowMenu.d.ts +4 -4
- package/dist/components/Table/TableRowMenu/TableRowMenu.types.d.ts +12 -12
- package/dist/components/Table/TableVirtualizedBody/TableVirtualizedBody.d.ts +35 -35
- package/dist/components/Table/context/TableContainerContext/TableContainerContext.d.ts +4 -4
- package/dist/components/Table/context/TableContainerContext/TableContainerContext.types.d.ts +9 -9
- package/dist/components/Table/context/TableContext/TableContext.d.ts +4 -4
- package/dist/components/Table/context/TableContext/TableContext.types.d.ts +27 -27
- package/dist/components/Table/context/TableRowMenuContext/TableRowMenuContext.d.ts +4 -4
- package/dist/components/Table/context/TableRowMenuContext/TableRowMenuContext.types.d.ts +23 -23
- package/dist/components/Table/index.d.ts +12 -12
- package/dist/components/Tabs/Tab/Tab.d.ts +64 -64
- package/dist/components/Tabs/TabList/TabList.d.ts +35 -35
- package/dist/components/Tabs/TabPanel/TabPanel.d.ts +14 -14
- package/dist/components/Tabs/TabPanels/TabPanels.d.ts +20 -20
- package/dist/components/Tabs/TabPanels/TabPanels.types.d.ts +1 -1
- package/dist/components/Tabs/TabsContext/TabsContext.d.ts +14 -14
- package/dist/components/Tabs/index.d.ts +6 -6
- package/dist/components/TextArea/TextArea.d.ts +4 -4
- package/dist/components/TextArea/TextArea.types.d.ts +67 -67
- package/dist/components/TextArea/index.d.ts +2 -2
- package/dist/components/TextField/TextField.d.ts +186 -186
- package/dist/components/TextField/TextField.types.d.ts +3 -3
- package/dist/components/TextField/TextFieldConstants.d.ts +21 -21
- package/dist/components/TextField/index.d.ts +2 -2
- package/dist/components/TextWithHighlight/TextWithHighlight.d.ts +51 -51
- package/dist/components/TextWithHighlight/index.d.ts +1 -1
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +30 -30
- package/dist/components/ThemeProvider/ThemeProvider.types.d.ts +5 -5
- package/dist/components/ThemeProvider/ThemeProviderConstants.d.ts +23 -23
- package/dist/components/ThemeProvider/ThemeProviderUtils.d.ts +10 -10
- package/dist/components/ThemeProvider/index.d.ts +2 -2
- package/dist/components/Tipseen/Tipseen.d.ts +109 -109
- package/dist/components/Tipseen/Tipseen.types.d.ts +2 -2
- package/dist/components/Tipseen/TipseenBasicContent.d.ts +19 -19
- package/dist/components/Tipseen/TipseenConstants.d.ts +4 -4
- package/dist/components/Tipseen/TipseenContent.d.ts +48 -48
- package/dist/components/Tipseen/TipseenMedia/TipseenMedia.d.ts +10 -10
- package/dist/components/Tipseen/TipseenTitle.d.ts +10 -10
- package/dist/components/Tipseen/TipseenWizard.d.ts +18 -18
- package/dist/components/Tipseen/index.d.ts +5 -5
- package/dist/components/Toast/Toast.d.ts +57 -57
- package/dist/components/Toast/Toast.types.d.ts +9 -9
- package/dist/components/Toast/ToastButton/ToastButton.d.ts +5 -5
- package/dist/components/Toast/ToastConstants.d.ts +7 -8
- package/dist/components/Toast/ToastHelpers.d.ts +4 -4
- package/dist/components/Toast/ToastLink/ToastLink.d.ts +5 -5
- package/dist/components/Toast/index.d.ts +4 -4
- package/dist/components/Toggle/MockToggle.d.ts +34 -34
- package/dist/components/Toggle/Toggle.d.ts +59 -59
- package/dist/components/Toggle/Toggle.types.d.ts +1 -1
- package/dist/components/Toggle/ToggleConstants.d.ts +1 -1
- package/dist/components/Toggle/ToggleText.d.ts +14 -14
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/TransitionView/TransitionView.d.ts +4 -4
- package/dist/components/TransitionView/TransitionView.types.d.ts +18 -18
- package/dist/components/TransitionView/index.d.ts +2 -2
- package/dist/components/VirtualizedGrid/VirtualizedGrid.d.ts +67 -67
- package/dist/components/VirtualizedGrid/VirtualizedGrid.types.d.ts +6 -6
- package/dist/components/VirtualizedGrid/index.d.ts +2 -2
- package/dist/components/VirtualizedList/VirtualizedList.d.ts +90 -90
- package/dist/components/VirtualizedList/VirtualizedList.types.d.ts +8 -8
- package/dist/components/VirtualizedList/index.d.ts +2 -2
- package/dist/components/button/dist/Button/Button.js.map +1 -1
- package/dist/components/button/dist/Button/Button.module.scss.js +1 -1
- package/dist/components/clickable/dist/Clickable/Clickable.module.scss.js +1 -1
- package/dist/components/dialog/dist/Dialog/Dialog.js.map +1 -1
- package/dist/components/dialog/dist/Dialog/Dialog.module.scss.js +1 -1
- package/dist/components/dialog/dist/Dialog/components/DialogContent/DialogContent.js.map +1 -1
- package/dist/components/dialog/dist/Dialog/components/DialogContent/DialogContent.module.scss.js +1 -1
- package/dist/components/dialog/dist/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
- package/dist/components/icon/dist/Icon/Icon.module.scss.js +1 -1
- package/dist/components/icon-button/dist/IconButton/IconButton.js.map +1 -1
- package/dist/components/icon-button/dist/IconButton/IconButton.module.scss.js +1 -1
- package/dist/components/index.d.ts +68 -68
- package/dist/components/layout/dist/Box/Box.module.scss.js +1 -1
- package/dist/components/layout/dist/Flex/Flex.module.scss.js +1 -1
- package/dist/components/loader/dist/Loader/Loader.module.scss.js +1 -1
- package/dist/components/next/List/List.d.ts +4 -4
- package/dist/components/next/List/List.types.d.ts +47 -47
- package/dist/components/next/List/ListItem/ListItem.d.ts +4 -4
- package/dist/components/next/List/ListItem/ListItem.types.d.ts +44 -44
- package/dist/components/next/List/ListItem/index.d.ts +2 -2
- package/dist/components/next/List/ListTitle/ListTitle.d.ts +4 -4
- package/dist/components/next/List/ListTitle/ListTitle.types.d.ts +16 -16
- package/dist/components/next/List/ListTitle/index.d.ts +2 -2
- package/dist/components/next/List/index.d.ts +6 -6
- package/dist/components/next/index.d.ts +1 -1
- package/dist/components/next.d.ts +1 -1
- package/dist/components/tooltip/dist/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/tooltip/dist/Tooltip/Tooltip.module.scss.js +1 -1
- package/dist/components/typography/dist/Heading/Heading.module.scss.js +1 -1
- package/dist/components/typography/dist/Text/Text.module.scss.js +1 -1
- package/dist/components/typography/dist/Typography/Typography.module.scss.js +1 -1
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/keyCodes.d.ts +16 -16
- package/dist/constants/sizes.d.ts +25 -25
- package/dist/helpers/screenReaderAccessHelper.d.ts +31 -31
- package/dist/helpers/testid-helper.d.ts +1 -1
- package/dist/helpers/textManipulations.d.ts +10 -10
- package/dist/helpers/typesciptCssModulesHelper.d.ts +6 -6
- package/dist/hooks/createEventHandler.d.ts +1 -1
- package/dist/hooks/dist/useResizeObserver/index.js.map +1 -1
- package/dist/hooks/index.d.ts +17 -17
- package/dist/hooks/ssr/useIsMounted.d.ts +1 -1
- package/dist/hooks/ssr/useIsomorphicLayoutEffect.d.ts +3 -3
- package/dist/hooks/useActiveDescendantListFocus/index.d.ts +35 -35
- package/dist/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHelpers.d.ts +8 -8
- package/dist/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.d.ts +44 -44
- package/dist/hooks/useAfterFirstRender/index.d.ts +2 -2
- package/dist/hooks/useDebounceEvent/index.d.ts +18 -18
- package/dist/hooks/useElementsOverflowingIndex.d.ts +9 -9
- package/dist/hooks/useEventListener/index.d.ts +8 -8
- package/dist/hooks/useFocusWithin.d.ts +14 -14
- package/dist/hooks/useFullKeyboardListeners.d.ts +28 -28
- package/dist/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.d.ts +20 -20
- package/dist/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.d.ts +42 -42
- package/dist/hooks/useHover/useHover.d.ts +2 -2
- package/dist/hooks/useIsMouseEnter.d.ts +4 -4
- package/dist/hooks/useIsMouseOver.d.ts +4 -4
- package/dist/hooks/useItemsOverflow/useItemsOverflow.d.ts +15 -15
- package/dist/hooks/useKeyEvent/index.d.ts +56 -56
- package/dist/hooks/useKeyboard.d.ts +14 -14
- package/dist/hooks/useListenFocusTriggers/index.d.ts +6 -6
- package/dist/hooks/useMediaQuery/index.d.ts +2 -2
- package/dist/hooks/useMergeRef.d.ts +7 -7
- package/dist/hooks/usePrevious/index.d.ts +1 -1
- package/dist/hooks/useRefWithCallback.d.ts +2 -2
- package/dist/hooks/useSetFocus/index.d.ts +10 -10
- package/dist/hooks/useStyle.d.ts +2 -2
- package/dist/hooks/useSwitch/index.d.ts +31 -31
- package/dist/hooks/useThrottledCallback.d.ts +4 -4
- package/dist/hooks/useTimeout/index.d.ts +6 -6
- package/dist/hooks/useVibeMediaQuery/index.d.ts +12 -12
- package/dist/hooks/useWizard/useWizard.d.ts +3 -3
- package/dist/hooks/useWizard/useWizard.types.d.ts +49 -49
- package/dist/index.d.ts +4 -4
- package/dist/metadata.json +2 -2
- package/dist/mocked_classnames/components/Accordion/Accordion/Accordion.d.ts +18 -18
- package/dist/mocked_classnames/components/Accordion/AccordionItem/AccordionItem.d.ts +51 -51
- package/dist/mocked_classnames/components/Accordion/index.d.ts +2 -2
- package/dist/mocked_classnames/components/AlertBanner/AlertBanner.d.ts +35 -35
- package/dist/mocked_classnames/components/AlertBanner/AlertBanner.types.d.ts +1 -1
- package/dist/mocked_classnames/components/AlertBanner/AlertBannerButton/AlertBannerButton.d.ts +10 -10
- package/dist/mocked_classnames/components/AlertBanner/AlertBannerContext.d.ts +7 -7
- package/dist/mocked_classnames/components/AlertBanner/AlertBannerLink/AlertBannerLink.d.ts +10 -10
- package/dist/mocked_classnames/components/AlertBanner/AlertBannerText/AlertBannerText.d.ts +18 -18
- package/dist/mocked_classnames/components/AlertBanner/index.d.ts +5 -5
- package/dist/mocked_classnames/components/AttentionBox/AttentionBox.d.ts +4 -4
- package/dist/mocked_classnames/components/AttentionBox/AttentionBox.types.d.ts +70 -70
- package/dist/mocked_classnames/components/AttentionBox/components/AttentionBoxButton/AttentionBoxButton.d.ts +7 -7
- package/dist/mocked_classnames/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.d.ts +8 -8
- package/dist/mocked_classnames/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.d.ts +9 -9
- package/dist/mocked_classnames/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.d.ts +5 -5
- package/dist/mocked_classnames/components/AttentionBox/consts/icons.d.ts +3 -3
- package/dist/mocked_classnames/components/AttentionBox/index.d.ts +2 -2
- package/dist/mocked_classnames/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.d.ts +5 -5
- package/dist/mocked_classnames/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.d.ts +5 -5
- package/dist/mocked_classnames/components/AttentionBox/utils/iconUtils.d.ts +3 -3
- package/dist/mocked_classnames/components/Avatar/Avatar.d.ts +107 -107
- package/dist/mocked_classnames/components/Avatar/Avatar.types.d.ts +2 -2
- package/dist/mocked_classnames/components/Avatar/AvatarBadge.d.ts +28 -28
- package/dist/mocked_classnames/components/Avatar/AvatarContent.d.ts +40 -40
- package/dist/mocked_classnames/components/Avatar/index.d.ts +2 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroup.d.ts +46 -46
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroup.types.d.ts +14 -14
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupConstants.d.ts +2 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounter.d.ts +42 -42
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipContainer.d.ts +41 -41
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipContent.d.ts +24 -24
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.d.ts +34 -34
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipHelper.d.ts +17 -17
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupHelper.d.ts +3 -3
- package/dist/mocked_classnames/components/AvatarGroup/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Badge/Badge.d.ts +34 -34
- package/dist/mocked_classnames/components/Badge/Badge.types.d.ts +3 -3
- package/dist/mocked_classnames/components/Badge/Indicator/Indicator.d.ts +11 -11
- package/dist/mocked_classnames/components/Badge/Indicator/Indicator.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Badge/index.d.ts +2 -2
- package/dist/mocked_classnames/components/BaseItem/BaseItem.d.ts +6 -6
- package/dist/mocked_classnames/components/BaseItem/BaseItem.types.d.ts +110 -110
- package/dist/mocked_classnames/components/BaseItem/hooks/useListItemProps.d.ts +20 -20
- package/dist/mocked_classnames/components/BaseItem/index.d.ts +2 -2
- package/dist/mocked_classnames/components/BaseItem/utils.d.ts +4 -4
- package/dist/mocked_classnames/components/BaseList/BaseList.d.ts +4 -4
- package/dist/mocked_classnames/components/BaseList/BaseList.types.d.ts +60 -60
- package/dist/mocked_classnames/components/BaseList/context/BaseListContext.d.ts +66 -66
- package/dist/mocked_classnames/components/BaseList/hooks/useBaseListFocus.d.ts +41 -42
- package/dist/mocked_classnames/components/BaseList/hooks/useBaseListKeyboard.d.ts +27 -28
- package/dist/mocked_classnames/components/BaseList/index.d.ts +3 -3
- package/dist/mocked_classnames/components/BaseList/utils/baseListUtils.d.ts +10 -10
- package/dist/mocked_classnames/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.d.ts +38 -38
- package/dist/mocked_classnames/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.d.ts +39 -39
- package/dist/mocked_classnames/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbMenu.d.ts +7 -7
- package/dist/mocked_classnames/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbMenuItem/BreadcrumbMenuItem.d.ts +12 -12
- package/dist/mocked_classnames/components/BreadcrumbsBar/Breadcrumbs.types.d.ts +1 -1
- package/dist/mocked_classnames/components/BreadcrumbsBar/BreadcrumbsBar.d.ts +17 -17
- package/dist/mocked_classnames/components/BreadcrumbsBar/index.d.ts +5 -5
- package/dist/mocked_classnames/components/ButtonGroup/ButtonGroup.d.ts +85 -85
- package/dist/mocked_classnames/components/ButtonGroup/ButtonGroupConstants.d.ts +1 -1
- package/dist/mocked_classnames/components/ButtonGroup/ButtonWrapper.d.ts +35 -35
- package/dist/mocked_classnames/components/ButtonGroup/index.d.ts +1 -1
- package/dist/mocked_classnames/components/Checkbox/Checkbox.d.ts +67 -67
- package/dist/mocked_classnames/components/Checkbox/hooks/useSupportFirefoxLabelClick.d.ts +6 -6
- package/dist/mocked_classnames/components/Checkbox/index.d.ts +1 -1
- package/dist/mocked_classnames/components/Chips/Chips.d.ts +109 -109
- package/dist/mocked_classnames/components/Chips/index.d.ts +1 -1
- package/dist/mocked_classnames/components/ColorPicker/ColorPicker.d.ts +80 -80
- package/dist/mocked_classnames/components/ColorPicker/ColorPicker.types.d.ts +6 -6
- package/dist/mocked_classnames/components/ColorPicker/ColorPickerConstants.d.ts +5 -5
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.d.ts +19 -19
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.d.ts +63 -63
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.d.ts +84 -84
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.d.ts +53 -53
- package/dist/mocked_classnames/components/ColorPicker/index.d.ts +3 -3
- package/dist/mocked_classnames/components/ColorPicker/services/ColorPickerStyleService.d.ts +3 -3
- package/dist/mocked_classnames/components/Combobox/Combobox.d.ts +163 -163
- package/dist/mocked_classnames/components/Combobox/Combobox.types.d.ts +3 -3
- package/dist/mocked_classnames/components/Combobox/ComboboxHelpers/ComboboxHelpers.d.ts +62 -62
- package/dist/mocked_classnames/components/Combobox/ComboboxService.d.ts +7 -7
- package/dist/mocked_classnames/components/Combobox/components/ComboboxCategory/ComboboxCategory.d.ts +14 -14
- package/dist/mocked_classnames/components/Combobox/components/ComboboxConstants.d.ts +239 -239
- package/dist/mocked_classnames/components/Combobox/components/ComboboxItems/ComboboxItems.d.ts +65 -65
- package/dist/mocked_classnames/components/Combobox/components/ComboboxOption/ComboboxOption.d.ts +46 -46
- package/dist/mocked_classnames/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.d.ts +6 -6
- package/dist/mocked_classnames/components/Combobox/helpers.d.ts +1 -1
- package/dist/mocked_classnames/components/Combobox/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Counter/Counter.d.ts +51 -51
- package/dist/mocked_classnames/components/Counter/Counter.types.d.ts +3 -3
- package/dist/mocked_classnames/components/Counter/index.d.ts +2 -2
- package/dist/mocked_classnames/components/DatePicker/DateContentHoverContext.d.ts +12 -12
- package/dist/mocked_classnames/components/DatePicker/DatePicker.d.ts +8 -8
- package/dist/mocked_classnames/components/DatePicker/DatePicker.types.d.ts +34 -34
- package/dist/mocked_classnames/components/DatePicker/DatePickerHeader.d.ts +17 -17
- package/dist/mocked_classnames/components/DatePicker/RangeDayContent.d.ts +3 -3
- package/dist/mocked_classnames/components/DatePicker/SingleDayContent.d.ts +3 -3
- package/dist/mocked_classnames/components/DatePicker/datePickerHooks.d.ts +18 -18
- package/dist/mocked_classnames/components/DatePicker/index.d.ts +2 -2
- package/dist/mocked_classnames/components/DatePicker/utils.d.ts +13 -13
- package/dist/mocked_classnames/components/Divider/Divider.d.ts +15 -15
- package/dist/mocked_classnames/components/Divider/Divider.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Divider/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Dropdown/Dropdown.d.ts +7 -7
- package/dist/mocked_classnames/components/Dropdown/Dropdown.types.d.ts +268 -268
- package/dist/mocked_classnames/components/Dropdown/components/DropdownBase/DropdownBase.d.ts +7 -7
- package/dist/mocked_classnames/components/Dropdown/components/DropdownBaseList/DropdownBaseList.d.ts +6 -6
- package/dist/mocked_classnames/components/Dropdown/components/DropdownBaseList/DropdownBaseList.types.d.ts +86 -86
- package/dist/mocked_classnames/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.d.ts +3 -3
- package/dist/mocked_classnames/components/Dropdown/components/DropdownPopup/DropdownPopup.d.ts +3 -3
- package/dist/mocked_classnames/components/Dropdown/components/DropdownWrapperUI.d.ts +9 -9
- package/dist/mocked_classnames/components/Dropdown/components/Menu/Menu.d.ts +4 -4
- package/dist/mocked_classnames/components/Dropdown/components/Menu/MenuList.d.ts +4 -4
- package/dist/mocked_classnames/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.d.ts +12 -12
- package/dist/mocked_classnames/components/Dropdown/components/Trigger/DropdownChip.d.ts +11 -11
- package/dist/mocked_classnames/components/Dropdown/components/Trigger/DropdownInput.d.ts +6 -6
- package/dist/mocked_classnames/components/Dropdown/components/Trigger/MultiSelectTrigger.d.ts +3 -3
- package/dist/mocked_classnames/components/Dropdown/components/Trigger/SingleSelectTrigger.d.ts +3 -3
- package/dist/mocked_classnames/components/Dropdown/components/Trigger/TriggerActions.d.ts +3 -3
- package/dist/mocked_classnames/components/Dropdown/context/DropdownContext.d.ts +59 -59
- package/dist/mocked_classnames/components/Dropdown/context/DropdownContext.types.d.ts +34 -34
- package/dist/mocked_classnames/components/Dropdown/hooks/useDropdownCombobox.d.ts +390 -391
- package/dist/mocked_classnames/components/Dropdown/hooks/useDropdownFiltering.d.ts +9 -10
- package/dist/mocked_classnames/components/Dropdown/hooks/useDropdownMultiCombobox.d.ts +23 -23
- package/dist/mocked_classnames/components/Dropdown/hooks/useDropdownMultiSelect.d.ts +23 -23
- package/dist/mocked_classnames/components/Dropdown/hooks/useDropdownSelect.d.ts +19 -19
- package/dist/mocked_classnames/components/Dropdown/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Dropdown/modes/DropdownComboboxController.d.ts +5 -5
- package/dist/mocked_classnames/components/Dropdown/modes/DropdownMultiComboboxController.d.ts +5 -5
- package/dist/mocked_classnames/components/Dropdown/modes/DropdownMultiSelectController.d.ts +5 -5
- package/dist/mocked_classnames/components/Dropdown/modes/DropdownSelectController.d.ts +5 -5
- package/dist/mocked_classnames/components/Dropdown/utils/dropdown-modifiers.d.ts +2 -2
- package/dist/mocked_classnames/components/Dropdown/utils/dropdownUtils.d.ts +3 -3
- package/dist/mocked_classnames/components/EditableHeading/EditableHeading.d.ts +16 -16
- package/dist/mocked_classnames/components/EditableHeading/index.d.ts +1 -1
- package/dist/mocked_classnames/components/EditableText/EditableText.d.ts +20 -20
- package/dist/mocked_classnames/components/EditableText/index.d.ts +1 -1
- package/dist/mocked_classnames/components/EditableTypography/EditableTypography.d.ts +79 -79
- package/dist/mocked_classnames/components/EditableTypography/index.d.ts +1 -1
- package/dist/mocked_classnames/components/EmptyState/EmptyState.d.ts +4 -4
- package/dist/mocked_classnames/components/EmptyState/EmptyState.types.d.ts +27 -27
- package/dist/mocked_classnames/components/EmptyState/index.d.ts +2 -2
- package/dist/mocked_classnames/components/ExpandCollapse/ExpandCollapse.d.ts +59 -59
- package/dist/mocked_classnames/components/ExpandCollapse/ExpandCollapse.types.d.ts +1 -1
- package/dist/mocked_classnames/components/ExpandCollapse/index.d.ts +1 -1
- package/dist/mocked_classnames/components/FieldLabel/FieldLabel.d.ts +34 -34
- package/dist/mocked_classnames/components/FieldLabel/index.d.ts +1 -1
- package/dist/mocked_classnames/components/FormattedNumber/FormattedNumber.d.ts +38 -38
- package/dist/mocked_classnames/components/FormattedNumber/FormattedNumberHelpers.d.ts +4 -4
- package/dist/mocked_classnames/components/FormattedNumber/index.d.ts +1 -1
- package/dist/mocked_classnames/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.d.ts +15 -15
- package/dist/mocked_classnames/components/GridKeyboardNavigationContext/GridKeyboardNavigationContextConstants.d.ts +25 -25
- package/dist/mocked_classnames/components/GridKeyboardNavigationContext/helper.d.ts +6 -6
- package/dist/mocked_classnames/components/GridKeyboardNavigationContext/index.d.ts +1 -1
- package/dist/mocked_classnames/components/HiddenText/HiddenText.d.ts +10 -10
- package/dist/mocked_classnames/components/HiddenText/index.d.ts +1 -1
- package/dist/mocked_classnames/components/Info/Info.d.ts +4 -4
- package/dist/mocked_classnames/components/Info/Info.types.d.ts +60 -60
- package/dist/mocked_classnames/components/Info/components/InfoDialogContent/InfoDialogContent.d.ts +4 -4
- package/dist/mocked_classnames/components/Info/components/InfoDialogContent/InfoDialogContent.types.d.ts +16 -16
- package/dist/mocked_classnames/components/Info/components/InfoLink/InfoLink.d.ts +5 -5
- package/dist/mocked_classnames/components/Info/components/index.d.ts +3 -3
- package/dist/mocked_classnames/components/Info/index.d.ts +2 -2
- package/dist/mocked_classnames/components/InfoText/InfoText.d.ts +4 -4
- package/dist/mocked_classnames/components/InfoText/InfoText.types.d.ts +26 -26
- package/dist/mocked_classnames/components/InfoText/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Label/Label.d.ts +40 -40
- package/dist/mocked_classnames/components/Label/Label.types.d.ts +5 -5
- package/dist/mocked_classnames/components/Label/LabelCelebrationAnimation.d.ts +13 -13
- package/dist/mocked_classnames/components/Label/LabelConstants.d.ts +3 -3
- package/dist/mocked_classnames/components/Label/Leg.d.ts +6 -6
- package/dist/mocked_classnames/components/Label/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Link/Link.d.ts +70 -70
- package/dist/mocked_classnames/components/Link/Link.types.d.ts +3 -3
- package/dist/mocked_classnames/components/Link/LinkConsts.d.ts +16 -16
- package/dist/mocked_classnames/components/Link/index.d.ts +2 -2
- package/dist/mocked_classnames/components/List/List.d.ts +41 -41
- package/dist/mocked_classnames/components/List/List.types.d.ts +1 -1
- package/dist/mocked_classnames/components/List/VirtualizedListItems/VirtualizedListItems.d.ts +11 -11
- package/dist/mocked_classnames/components/List/index.d.ts +2 -2
- package/dist/mocked_classnames/components/List/utils/ListContext.d.ts +10 -10
- package/dist/mocked_classnames/components/List/utils/ListUtils.d.ts +11 -11
- package/dist/mocked_classnames/components/ListItem/ListItem.d.ts +52 -52
- package/dist/mocked_classnames/components/ListItem/ListItem.types.d.ts +3 -3
- package/dist/mocked_classnames/components/ListItem/index.d.ts +2 -2
- package/dist/mocked_classnames/components/ListItemAvatar/ListItemAvatar.d.ts +19 -19
- package/dist/mocked_classnames/components/ListItemAvatar/index.d.ts +1 -1
- package/dist/mocked_classnames/components/ListItemIcon/ListItemIcon.d.ts +22 -22
- package/dist/mocked_classnames/components/ListItemIcon/ListItemIcon.types.d.ts +1 -1
- package/dist/mocked_classnames/components/ListItemIcon/index.d.ts +2 -2
- package/dist/mocked_classnames/components/ListTitle/ListTitle.d.ts +14 -14
- package/dist/mocked_classnames/components/ListTitle/index.d.ts +1 -1
- package/dist/mocked_classnames/components/Menu/Menu/Menu.d.ts +64 -64
- package/dist/mocked_classnames/components/Menu/Menu/MenuConstants.d.ts +12 -12
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useAdjacentSelectableMenuIndex.d.ts +7 -7
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useCloseMenuOnKeyEvent.d.ts +10 -10
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useFocusOnMount.d.ts +9 -9
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useLastNavigationDirection.d.ts +4 -5
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useMenuId.d.ts +2 -2
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useMenuKeyboardNavigation.d.ts +11 -11
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useMouseLeave.d.ts +7 -7
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useOnCloseMenu.d.ts +6 -6
- package/dist/mocked_classnames/components/Menu/Menu/hooks/useSubMenuIndex.d.ts +7 -8
- package/dist/mocked_classnames/components/Menu/Menu/utils/utils.d.ts +4 -4
- package/dist/mocked_classnames/components/Menu/MenuDivider/MenuDivider.d.ts +5 -5
- package/dist/mocked_classnames/components/Menu/MenuGridItem/MenuGridItem.d.ts +51 -51
- package/dist/mocked_classnames/components/Menu/MenuGridItem/useFocusGridItemByActiveStatus.d.ts +8 -8
- package/dist/mocked_classnames/components/Menu/MenuGridItem/useMenuGridItemNavContext.d.ts +15 -15
- package/dist/mocked_classnames/components/Menu/MenuItem/AvatarMenuItem.d.ts +22 -22
- package/dist/mocked_classnames/components/Menu/MenuItem/MenuItem.d.ts +169 -169
- package/dist/mocked_classnames/components/Menu/MenuItem/MenuItem.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Menu/MenuItem/MenuItemConstants.d.ts +1 -1
- package/dist/mocked_classnames/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.d.ts +4 -4
- package/dist/mocked_classnames/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.types.d.ts +15 -15
- package/dist/mocked_classnames/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.d.ts +4 -4
- package/dist/mocked_classnames/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.types.d.ts +32 -32
- package/dist/mocked_classnames/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.d.ts +4 -4
- package/dist/mocked_classnames/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.types.d.ts +33 -33
- package/dist/mocked_classnames/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.d.ts +4 -4
- package/dist/mocked_classnames/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.types.d.ts +31 -31
- package/dist/mocked_classnames/components/Menu/MenuItem/hooks/useMenuItemKeyboardEvents.d.ts +21 -21
- package/dist/mocked_classnames/components/Menu/MenuItem/hooks/useMenuItemMouseEvents.d.ts +12 -12
- package/dist/mocked_classnames/components/Menu/MenuItemButton/MenuItemButton.d.ts +77 -77
- package/dist/mocked_classnames/components/Menu/MenuTitle/MenuTitle.d.ts +15 -15
- package/dist/mocked_classnames/components/Menu/MenuTitle/MenuTitle.type.d.ts +1 -1
- package/dist/mocked_classnames/components/Menu/index.d.ts +7 -7
- package/dist/mocked_classnames/components/MenuButton/MenuButton.d.ts +146 -146
- package/dist/mocked_classnames/components/MenuButton/MenuButton.types.d.ts +2 -2
- package/dist/mocked_classnames/components/MenuButton/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/Modal/Modal.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/Modal/Modal.types.d.ts +114 -114
- package/dist/mocked_classnames/components/Modal/Modal/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/ModalContent/ModalContent.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/ModalContent/ModalContent.types.d.ts +8 -8
- package/dist/mocked_classnames/components/Modal/ModalContent/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/ModalHeader/ModalHeader.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/ModalHeader/ModalHeader.types.d.ts +42 -42
- package/dist/mocked_classnames/components/Modal/ModalHeader/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/ModalMedia/ModalMedia.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/ModalMedia/ModalMedia.types.d.ts +8 -8
- package/dist/mocked_classnames/components/Modal/ModalMedia/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/ModalTopActions/ModalTopActions.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/ModalTopActions/ModalTopActions.types.d.ts +25 -25
- package/dist/mocked_classnames/components/Modal/context/ModalContext.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/context/ModalContext.types.d.ts +32 -32
- package/dist/mocked_classnames/components/Modal/footers/ModalFooter/ModalFooter.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/footers/ModalFooter/ModalFooter.types.d.ts +8 -8
- package/dist/mocked_classnames/components/Modal/footers/ModalFooterBase/ModalFooterBase.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/footers/ModalFooterBase/ModalFooterBase.types.d.ts +28 -28
- package/dist/mocked_classnames/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.types.d.ts +18 -18
- package/dist/mocked_classnames/components/Modal/footers/index.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/footers/utils/getPropsForButton.d.ts +116 -133
- package/dist/mocked_classnames/components/Modal/hooks/useFocusEscapeTargets/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.d.ts +10 -10
- package/dist/mocked_classnames/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.types.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/hooks/usePortalTarget/usePortalTarget.d.ts +3 -3
- package/dist/mocked_classnames/components/Modal/hooks/usePortalTarget/usePortalTarget.types.d.ts +2 -2
- package/dist/mocked_classnames/components/Modal/index.d.ts +6 -6
- package/dist/mocked_classnames/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.types.d.ts +10 -10
- package/dist/mocked_classnames/components/Modal/layouts/ModalFooterShadow.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/layouts/ModalFooterShadow.types.d.ts +6 -6
- package/dist/mocked_classnames/components/Modal/layouts/ModalLayoutScrollableContent.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/layouts/ModalLayoutScrollableContent.types.d.ts +15 -15
- package/dist/mocked_classnames/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.types.d.ts +11 -11
- package/dist/mocked_classnames/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.d.ts +4 -4
- package/dist/mocked_classnames/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.types.d.ts +11 -11
- package/dist/mocked_classnames/components/Modal/layouts/index.d.ts +6 -6
- package/dist/mocked_classnames/components/Modal/layouts/useLayoutScrolledContent.d.ts +9 -9
- package/dist/mocked_classnames/components/MultiStepIndicator/MultiStep.types.d.ts +9 -9
- package/dist/mocked_classnames/components/MultiStepIndicator/MultiStepIndicator.d.ts +48 -48
- package/dist/mocked_classnames/components/MultiStepIndicator/components/StepIndicator/StepIndicator.d.ts +86 -86
- package/dist/mocked_classnames/components/MultiStepIndicator/index.d.ts +2 -2
- package/dist/mocked_classnames/components/NumberField/NumberField.d.ts +4 -4
- package/dist/mocked_classnames/components/NumberField/NumberField.types.d.ts +80 -80
- package/dist/mocked_classnames/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.d.ts +4 -4
- package/dist/mocked_classnames/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.types.d.ts +9 -10
- package/dist/mocked_classnames/components/NumberField/hooks/useNumberFieldState.d.ts +11 -11
- package/dist/mocked_classnames/components/NumberField/hooks/useSpinButtonHandlers.d.ts +9 -10
- package/dist/mocked_classnames/components/NumberField/index.d.ts +2 -2
- package/dist/mocked_classnames/components/NumberField/utils/calcValue.d.ts +6 -6
- package/dist/mocked_classnames/components/ProgressBars/PercentageLabel/PercentageLabel.d.ts +13 -13
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/Bar/Bar.d.ts +48 -48
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBar.d.ts +69 -69
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBar.types.d.ts +3 -3
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBarHelpers.d.ts +4 -4
- package/dist/mocked_classnames/components/ProgressBars/index.d.ts +2 -2
- package/dist/mocked_classnames/components/RadioButton/RadioButton.d.ts +74 -74
- package/dist/mocked_classnames/components/RadioButton/index.d.ts +1 -1
- package/dist/mocked_classnames/components/Search/Search.d.ts +4 -4
- package/dist/mocked_classnames/components/Search/Search.types.d.ts +104 -104
- package/dist/mocked_classnames/components/Search/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Skeleton/Skeleton.d.ts +31 -31
- package/dist/mocked_classnames/components/Skeleton/SkeletonConstants.d.ts +1 -1
- package/dist/mocked_classnames/components/Skeleton/Skelton.types.d.ts +4 -4
- package/dist/mocked_classnames/components/Skeleton/index.d.ts +2 -2
- package/dist/mocked_classnames/components/SlideTransition/SlideTransition.d.ts +4 -4
- package/dist/mocked_classnames/components/SlideTransition/SlideTransition.types.d.ts +20 -20
- package/dist/mocked_classnames/components/Slider/SelectionIndicator.d.ts +15 -15
- package/dist/mocked_classnames/components/Slider/Slider.d.ts +120 -120
- package/dist/mocked_classnames/components/Slider/Slider.types.d.ts +8 -8
- package/dist/mocked_classnames/components/Slider/SliderBase/SliderBase.d.ts +5 -5
- package/dist/mocked_classnames/components/Slider/SliderBase/SliderFilledTrack.d.ts +23 -23
- package/dist/mocked_classnames/components/Slider/SliderBase/SliderRail.d.ts +19 -19
- package/dist/mocked_classnames/components/Slider/SliderBase/SliderThumb.d.ts +27 -27
- package/dist/mocked_classnames/components/Slider/SliderBase/SliderTrack.d.ts +11 -11
- package/dist/mocked_classnames/components/Slider/SliderConstants.d.ts +64 -64
- package/dist/mocked_classnames/components/Slider/SliderContext.d.ts +43 -43
- package/dist/mocked_classnames/components/Slider/SliderHelpers.d.ts +14 -14
- package/dist/mocked_classnames/components/Slider/SliderHooks.d.ts +25 -26
- package/dist/mocked_classnames/components/Slider/SliderInfix.d.ts +11 -11
- package/dist/mocked_classnames/components/Slider/SliderInfixHooks.d.ts +3 -3
- package/dist/mocked_classnames/components/Slider/index.d.ts +2 -2
- package/dist/mocked_classnames/components/SplitButton/SplitButton.d.ts +44 -44
- package/dist/mocked_classnames/components/SplitButton/SplitButtonConstants.d.ts +22 -22
- package/dist/mocked_classnames/components/SplitButton/SplitButtonMenu/SplitButtonMenu.d.ts +9 -9
- package/dist/mocked_classnames/components/SplitButton/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Steps/Steps.d.ts +56 -56
- package/dist/mocked_classnames/components/Steps/Steps.types.d.ts +3 -3
- package/dist/mocked_classnames/components/Steps/StepsCommand.d.ts +35 -35
- package/dist/mocked_classnames/components/Steps/StepsConstants.d.ts +3 -3
- package/dist/mocked_classnames/components/Steps/StepsDot.d.ts +26 -26
- package/dist/mocked_classnames/components/Steps/StepsGalleryHeader.d.ts +26 -26
- package/dist/mocked_classnames/components/Steps/StepsHeader.d.ts +51 -51
- package/dist/mocked_classnames/components/Steps/StepsNumbersHeader.d.ts +18 -18
- package/dist/mocked_classnames/components/Steps/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Switch/Switch.d.ts +59 -59
- package/dist/mocked_classnames/components/Switch/index.d.ts +1 -1
- package/dist/mocked_classnames/components/Table/Table/Table.d.ts +76 -76
- package/dist/mocked_classnames/components/Table/Table/Table.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Table/Table/TableConsts.d.ts +14 -14
- package/dist/mocked_classnames/components/Table/Table/tableHelpers.d.ts +12 -12
- package/dist/mocked_classnames/components/Table/TableBody/TableBody.d.ts +12 -12
- package/dist/mocked_classnames/components/Table/TableCell/TableCell.d.ts +14 -14
- package/dist/mocked_classnames/components/Table/TableCellSkeleton/TableCellSkeleton.d.ts +15 -15
- package/dist/mocked_classnames/components/Table/TableContainer/TableContainer.d.ts +4 -4
- package/dist/mocked_classnames/components/Table/TableContainer/TableContainer.types.d.ts +12 -12
- package/dist/mocked_classnames/components/Table/TableHeader/TableHeader.d.ts +11 -11
- package/dist/mocked_classnames/components/Table/TableHeaderCell/TableHeaderCell.d.ts +35 -35
- package/dist/mocked_classnames/components/Table/TableRow/TableRow.d.ts +19 -19
- package/dist/mocked_classnames/components/Table/TableRowMenu/TableRowMenu.d.ts +4 -4
- package/dist/mocked_classnames/components/Table/TableRowMenu/TableRowMenu.types.d.ts +12 -12
- package/dist/mocked_classnames/components/Table/TableVirtualizedBody/TableVirtualizedBody.d.ts +35 -35
- package/dist/mocked_classnames/components/Table/context/TableContainerContext/TableContainerContext.d.ts +4 -4
- package/dist/mocked_classnames/components/Table/context/TableContainerContext/TableContainerContext.types.d.ts +9 -9
- package/dist/mocked_classnames/components/Table/context/TableContext/TableContext.d.ts +4 -4
- package/dist/mocked_classnames/components/Table/context/TableContext/TableContext.types.d.ts +27 -27
- package/dist/mocked_classnames/components/Table/context/TableRowMenuContext/TableRowMenuContext.d.ts +4 -4
- package/dist/mocked_classnames/components/Table/context/TableRowMenuContext/TableRowMenuContext.types.d.ts +23 -23
- package/dist/mocked_classnames/components/Table/index.d.ts +12 -12
- package/dist/mocked_classnames/components/Tabs/Tab/Tab.d.ts +64 -64
- package/dist/mocked_classnames/components/Tabs/TabList/TabList.d.ts +35 -35
- package/dist/mocked_classnames/components/Tabs/TabPanel/TabPanel.d.ts +14 -14
- package/dist/mocked_classnames/components/Tabs/TabPanels/TabPanels.d.ts +20 -20
- package/dist/mocked_classnames/components/Tabs/TabPanels/TabPanels.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Tabs/TabsContext/TabsContext.d.ts +14 -14
- package/dist/mocked_classnames/components/Tabs/index.d.ts +6 -6
- package/dist/mocked_classnames/components/TextArea/TextArea.d.ts +4 -4
- package/dist/mocked_classnames/components/TextArea/TextArea.types.d.ts +67 -67
- package/dist/mocked_classnames/components/TextArea/index.d.ts +2 -2
- package/dist/mocked_classnames/components/TextField/TextField.d.ts +186 -186
- package/dist/mocked_classnames/components/TextField/TextField.types.d.ts +3 -3
- package/dist/mocked_classnames/components/TextField/TextFieldConstants.d.ts +21 -21
- package/dist/mocked_classnames/components/TextField/index.d.ts +2 -2
- package/dist/mocked_classnames/components/TextWithHighlight/TextWithHighlight.d.ts +51 -51
- package/dist/mocked_classnames/components/TextWithHighlight/index.d.ts +1 -1
- package/dist/mocked_classnames/components/ThemeProvider/ThemeProvider.d.ts +30 -30
- package/dist/mocked_classnames/components/ThemeProvider/ThemeProvider.types.d.ts +5 -5
- package/dist/mocked_classnames/components/ThemeProvider/ThemeProviderConstants.d.ts +23 -23
- package/dist/mocked_classnames/components/ThemeProvider/ThemeProviderUtils.d.ts +10 -10
- package/dist/mocked_classnames/components/ThemeProvider/index.d.ts +2 -2
- package/dist/mocked_classnames/components/Tipseen/Tipseen.d.ts +109 -109
- package/dist/mocked_classnames/components/Tipseen/Tipseen.types.d.ts +2 -2
- package/dist/mocked_classnames/components/Tipseen/TipseenBasicContent.d.ts +19 -19
- package/dist/mocked_classnames/components/Tipseen/TipseenConstants.d.ts +4 -4
- package/dist/mocked_classnames/components/Tipseen/TipseenContent.d.ts +48 -48
- package/dist/mocked_classnames/components/Tipseen/TipseenMedia/TipseenMedia.d.ts +10 -10
- package/dist/mocked_classnames/components/Tipseen/TipseenTitle.d.ts +10 -10
- package/dist/mocked_classnames/components/Tipseen/TipseenWizard.d.ts +18 -18
- package/dist/mocked_classnames/components/Tipseen/index.d.ts +5 -5
- package/dist/mocked_classnames/components/Toast/Toast.d.ts +57 -57
- package/dist/mocked_classnames/components/Toast/Toast.types.d.ts +9 -9
- package/dist/mocked_classnames/components/Toast/ToastButton/ToastButton.d.ts +5 -5
- package/dist/mocked_classnames/components/Toast/ToastConstants.d.ts +7 -8
- package/dist/mocked_classnames/components/Toast/ToastHelpers.d.ts +4 -4
- package/dist/mocked_classnames/components/Toast/ToastLink/ToastLink.d.ts +5 -5
- package/dist/mocked_classnames/components/Toast/index.d.ts +4 -4
- package/dist/mocked_classnames/components/Toggle/MockToggle.d.ts +34 -34
- package/dist/mocked_classnames/components/Toggle/Toggle.d.ts +59 -59
- package/dist/mocked_classnames/components/Toggle/Toggle.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Toggle/ToggleConstants.d.ts +1 -1
- package/dist/mocked_classnames/components/Toggle/ToggleText.d.ts +14 -14
- package/dist/mocked_classnames/components/Toggle/index.d.ts +1 -1
- package/dist/mocked_classnames/components/TransitionView/TransitionView.d.ts +4 -4
- package/dist/mocked_classnames/components/TransitionView/TransitionView.types.d.ts +18 -18
- package/dist/mocked_classnames/components/TransitionView/index.d.ts +2 -2
- package/dist/mocked_classnames/components/VirtualizedGrid/VirtualizedGrid.d.ts +67 -67
- package/dist/mocked_classnames/components/VirtualizedGrid/VirtualizedGrid.types.d.ts +6 -6
- package/dist/mocked_classnames/components/VirtualizedGrid/index.d.ts +2 -2
- package/dist/mocked_classnames/components/VirtualizedList/VirtualizedList.d.ts +90 -90
- package/dist/mocked_classnames/components/VirtualizedList/VirtualizedList.types.d.ts +8 -8
- package/dist/mocked_classnames/components/VirtualizedList/index.d.ts +2 -2
- package/dist/mocked_classnames/components/index.d.ts +68 -68
- package/dist/mocked_classnames/components/next/List/List.d.ts +4 -4
- package/dist/mocked_classnames/components/next/List/List.types.d.ts +47 -47
- package/dist/mocked_classnames/components/next/List/ListItem/ListItem.d.ts +4 -4
- package/dist/mocked_classnames/components/next/List/ListItem/ListItem.types.d.ts +44 -44
- package/dist/mocked_classnames/components/next/List/ListItem/index.d.ts +2 -2
- package/dist/mocked_classnames/components/next/List/ListTitle/ListTitle.d.ts +4 -4
- package/dist/mocked_classnames/components/next/List/ListTitle/ListTitle.types.d.ts +16 -16
- package/dist/mocked_classnames/components/next/List/ListTitle/index.d.ts +2 -2
- package/dist/mocked_classnames/components/next/List/index.d.ts +6 -6
- package/dist/mocked_classnames/components/next/index.d.ts +1 -1
- package/dist/mocked_classnames/components/next.d.ts +1 -1
- package/dist/mocked_classnames/constants/index.d.ts +2 -2
- package/dist/mocked_classnames/constants/keyCodes.d.ts +16 -16
- package/dist/mocked_classnames/constants/sizes.d.ts +25 -25
- package/dist/mocked_classnames/helpers/screenReaderAccessHelper.d.ts +31 -31
- package/dist/mocked_classnames/helpers/testid-helper.d.ts +1 -1
- package/dist/mocked_classnames/helpers/textManipulations.d.ts +10 -10
- package/dist/mocked_classnames/helpers/typesciptCssModulesHelper.d.ts +6 -6
- package/dist/mocked_classnames/hooks/createEventHandler.d.ts +1 -1
- package/dist/mocked_classnames/hooks/index.d.ts +17 -17
- package/dist/mocked_classnames/hooks/ssr/useIsMounted.d.ts +1 -1
- package/dist/mocked_classnames/hooks/ssr/useIsomorphicLayoutEffect.d.ts +3 -3
- package/dist/mocked_classnames/hooks/useActiveDescendantListFocus/index.d.ts +35 -35
- package/dist/mocked_classnames/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHelpers.d.ts +8 -8
- package/dist/mocked_classnames/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.d.ts +44 -44
- package/dist/mocked_classnames/hooks/useAfterFirstRender/index.d.ts +2 -2
- package/dist/mocked_classnames/hooks/useDebounceEvent/index.d.ts +18 -18
- package/dist/mocked_classnames/hooks/useElementsOverflowingIndex.d.ts +9 -9
- package/dist/mocked_classnames/hooks/useEventListener/index.d.ts +8 -8
- package/dist/mocked_classnames/hooks/useFocusWithin.d.ts +14 -14
- package/dist/mocked_classnames/hooks/useFullKeyboardListeners.d.ts +28 -28
- package/dist/mocked_classnames/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.d.ts +20 -20
- package/dist/mocked_classnames/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.d.ts +42 -42
- package/dist/mocked_classnames/hooks/useHover/useHover.d.ts +2 -2
- package/dist/mocked_classnames/hooks/useIsMouseEnter.d.ts +4 -4
- package/dist/mocked_classnames/hooks/useIsMouseOver.d.ts +4 -4
- package/dist/mocked_classnames/hooks/useItemsOverflow/useItemsOverflow.d.ts +15 -15
- package/dist/mocked_classnames/hooks/useKeyEvent/index.d.ts +56 -56
- package/dist/mocked_classnames/hooks/useKeyboard.d.ts +14 -14
- package/dist/mocked_classnames/hooks/useListenFocusTriggers/index.d.ts +6 -6
- package/dist/mocked_classnames/hooks/useMediaQuery/index.d.ts +2 -2
- package/dist/mocked_classnames/hooks/useMergeRef.d.ts +7 -7
- package/dist/mocked_classnames/hooks/usePrevious/index.d.ts +1 -1
- package/dist/mocked_classnames/hooks/useRefWithCallback.d.ts +2 -2
- package/dist/mocked_classnames/hooks/useSetFocus/index.d.ts +10 -10
- package/dist/mocked_classnames/hooks/useStyle.d.ts +2 -2
- package/dist/mocked_classnames/hooks/useSwitch/index.d.ts +31 -31
- package/dist/mocked_classnames/hooks/useThrottledCallback.d.ts +4 -4
- package/dist/mocked_classnames/hooks/useTimeout/index.d.ts +6 -6
- package/dist/mocked_classnames/hooks/useVibeMediaQuery/index.d.ts +12 -12
- package/dist/mocked_classnames/hooks/useWizard/useWizard.d.ts +3 -3
- package/dist/mocked_classnames/hooks/useWizard/useWizard.types.d.ts +49 -49
- package/dist/mocked_classnames/index.d.ts +4 -4
- package/dist/mocked_classnames/scripts/generate-metadata.d.ts +1 -1
- package/dist/mocked_classnames/services/themes.d.ts +3 -3
- package/dist/mocked_classnames/services/virtualized-service.d.ts +27 -27
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.js.map +1 -1
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/Avatar.js.map +1 -1
- package/dist/mocked_classnames/src/components/Avatar/Avatar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContainer.js.map +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseList/hooks/useBaseListFocus.js.map +1 -1
- package/dist/mocked_classnames/src/components/BaseList/hooks/useBaseListKeyboard.js.map +1 -1
- package/dist/mocked_classnames/src/components/BaseList/utils/baseListUtils.js.map +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +1 -1
- package/dist/mocked_classnames/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.js.map +1 -1
- package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.js.map +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Counter/Counter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/utils.js.map +1 -1
- package/dist/mocked_classnames/src/components/Divider/Divider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Trigger/DropdownChip.js.map +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableText/EditableText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.js.map +1 -1
- package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/mocked_classnames/src/components/EmptyState/EmptyState.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js.map +1 -1
- package/dist/mocked_classnames/src/components/GridKeyboardNavigationContext/helper.js.map +1 -1
- package/dist/mocked_classnames/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Label/Label.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.js.map +1 -1
- package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Link/Link.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/List.js.map +1 -1
- package/dist/mocked_classnames/src/components/List/List.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/utils/ListUtils.js.map +1 -1
- package/dist/mocked_classnames/src/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/hooks/useFocusOnMount.js.map +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.js.map +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/hooks/useMenuItemKeyboardEvents.js.map +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MenuButton/MenuButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/Modal/Modal.js.map +1 -1
- package/dist/mocked_classnames/src/components/Modal/Modal/Modal.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.js.map +1 -1
- package/dist/mocked_classnames/src/components/Modal/hooks/usePortalTarget/usePortalTarget.js.map +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/useLayoutScrolledContent.js.map +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/hooks/useNumberFieldState.js.map +1 -1
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Search/Search.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Skeleton/Skeleton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderHelpers.js.map +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderHooks.js.map +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderInfixHooks.js.map +1 -1
- package/dist/mocked_classnames/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Switch/Switch.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/Table/Table.js.map +1 -1
- package/dist/mocked_classnames/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/Table/tableHelpers.js.map +1 -1
- package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/context/TableRowMenuContext/TableRowMenuContext.js.map +1 -1
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabsContext/TabsContext.js.map +1 -1
- package/dist/mocked_classnames/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextField/TextField.js.map +1 -1
- package/dist/mocked_classnames/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextWithHighlight/TextWithHighlight.js.map +1 -1
- package/dist/mocked_classnames/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/mocked_classnames/src/components/ThemeProvider/ThemeProviderUtils.js.map +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/MockToggle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/Toggle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/ToggleText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.js.map +1 -1
- package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.js.map +1 -1
- package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/next/List/List.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/helpers/textManipulations.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHelpers.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useElementsOverflowingIndex.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useItemsOverflow/useItemsOverflow.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useSwitch/index.js.map +1 -1
- package/dist/mocked_classnames/src/services/themes.js.map +1 -1
- package/dist/mocked_classnames/src/services/virtualized-service.js.map +1 -1
- package/dist/mocked_classnames/src/tests/interactionsTests.js +1 -1
- package/dist/mocked_classnames/src/tests/interactionsTests.js.map +1 -1
- package/dist/mocked_classnames/src/utils/dom-utils.js.map +1 -1
- package/dist/mocked_classnames/src/utils/warn-deprecated.js.map +1 -1
- package/dist/mocked_classnames/style-imports.d.ts +1 -1
- package/dist/mocked_classnames/tests/constants.d.ts +201 -201
- package/dist/mocked_classnames/tests/interactions-utils.d.ts +57 -57
- package/dist/mocked_classnames/tests/test-ids-utils.d.ts +3 -3
- package/dist/mocked_classnames/types/ArrayLastElement.d.ts +1 -1
- package/dist/mocked_classnames/types/Colors.d.ts +22 -22
- package/dist/mocked_classnames/types/ElementContent.d.ts +2 -2
- package/dist/mocked_classnames/types/FormElement.d.ts +40 -40
- package/dist/mocked_classnames/types/MoveBy.d.ts +4 -4
- package/dist/mocked_classnames/types/SplitString.d.ts +1 -1
- package/dist/mocked_classnames/types/VibeComponentProps.d.ts +14 -14
- package/dist/mocked_classnames/types/events.d.ts +6 -6
- package/dist/mocked_classnames/types/index.d.ts +6 -6
- package/dist/mocked_classnames/utils/colors-utils.d.ts +8 -8
- package/dist/mocked_classnames/utils/colors-vars-map.d.ts +132 -132
- package/dist/mocked_classnames/utils/dom-event-utils.d.ts +16 -16
- package/dist/mocked_classnames/utils/dom-utils.d.ts +2 -2
- package/dist/mocked_classnames/utils/function-utils.d.ts +5 -5
- package/dist/mocked_classnames/utils/media-query-utils.d.ts +23 -23
- package/dist/mocked_classnames/utils/ssr-utils.d.ts +2 -2
- package/dist/mocked_classnames/utils/user-agent-utils.d.ts +2 -2
- package/dist/mocked_classnames/utils/warn-deprecated.d.ts +10 -10
- package/dist/scripts/generate-metadata.d.ts +1 -1
- package/dist/services/themes.d.ts +3 -3
- package/dist/services/virtualized-service.d.ts +27 -27
- package/dist/shared/dist/utils/dom-utils.js.map +1 -1
- package/dist/shared/dist/utils/function-utils.js.map +1 -1
- package/dist/src/components/Accordion/Accordion/Accordion.js.map +1 -1
- package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/src/components/Avatar/Avatar.js.map +1 -1
- package/dist/src/components/Avatar/Avatar.module.scss.js +1 -1
- package/dist/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/src/components/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContainer.js.map +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/src/components/BaseList/hooks/useBaseListFocus.js.map +1 -1
- package/dist/src/components/BaseList/hooks/useBaseListKeyboard.js.map +1 -1
- package/dist/src/components/BaseList/utils/baseListUtils.js.map +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbContent/BreadcrumbContent.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbItem/BreadcrumbItem.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbMenu/BreadcrumbsMenu.module.scss.js +1 -1
- package/dist/src/components/BreadcrumbsBar/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
- package/dist/src/components/Checkbox/Checkbox.module.scss.js +1 -1
- package/dist/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +1 -1
- package/dist/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
- package/dist/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.js.map +1 -1
- package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxCategory/ComboboxCategory.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.js.map +1 -1
- package/dist/src/components/Combobox/components/ComboboxItems/ComboboxItems.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/ComboboxOption/ComboboxOption.module.scss.js +1 -1
- package/dist/src/components/Combobox/components/StickyCategoryHeader/StickyCategoryHeader.module.scss.js +1 -1
- package/dist/src/components/Counter/Counter.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/src/components/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePickerHeader.module.scss.js +1 -1
- package/dist/src/components/DatePicker/utils.js.map +1 -1
- package/dist/src/components/Divider/Divider.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Trigger/DropdownChip.js.map +1 -1
- package/dist/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +1 -1
- package/dist/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/src/components/EditableText/EditableText.module.scss.js +1 -1
- package/dist/src/components/EditableTypography/EditableTypography.js.map +1 -1
- package/dist/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/src/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/src/components/EmptyState/EmptyState.module.scss.js +1 -1
- package/dist/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
- package/dist/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
- package/dist/src/components/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js.map +1 -1
- package/dist/src/components/GridKeyboardNavigationContext/helper.js.map +1 -1
- package/dist/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/src/components/Label/Label.module.scss.js +1 -1
- package/dist/src/components/Label/LabelCelebrationAnimation.js.map +1 -1
- package/dist/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/src/components/Link/Link.module.scss.js +1 -1
- package/dist/src/components/List/List.js.map +1 -1
- package/dist/src/components/List/List.module.scss.js +1 -1
- package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/src/components/List/utils/ListUtils.js.map +1 -1
- package/dist/src/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/src/components/ListItemAvatar/ListItemAvatar.module.scss.js +1 -1
- package/dist/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/hooks/useFocusOnMount.js.map +1 -1
- package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenu/MenuItemSubMenu.js.map +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/hooks/useMenuItemKeyboardEvents.js.map +1 -1
- package/dist/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
- package/dist/src/components/MenuButton/MenuButton.module.scss.js +1 -1
- package/dist/src/components/Modal/Modal/Modal.js.map +1 -1
- package/dist/src/components/Modal/Modal/Modal.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalHeader/ModalHeader.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalMedia/ModalMedia.module.scss.js +1 -1
- package/dist/src/components/Modal/ModalTopActions/ModalTopActions.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooter/ModalFooter.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooterBase/ModalFooterBase.module.scss.js +1 -1
- package/dist/src/components/Modal/footers/ModalFooterWizard/ModalFooterWizard.module.scss.js +1 -1
- package/dist/src/components/Modal/hooks/useFocusEscapeTargets/useFocusEscapeTargets.js.map +1 -1
- package/dist/src/components/Modal/hooks/usePortalTarget/usePortalTarget.js.map +1 -1
- package/dist/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalFooterShadow.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalLayoutScrollableContent.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalMediaLayout/ModalMediaLayout.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/ModalSideBySideLayout/ModalSideBySideLayout.module.scss.js +1 -1
- package/dist/src/components/Modal/layouts/useLayoutScrolledContent.js.map +1 -1
- package/dist/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
- package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/src/components/NumberField/hooks/useNumberFieldState.js.map +1 -1
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +1 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js +1 -1
- package/dist/src/components/RadioButton/RadioButton.module.scss.js +1 -1
- package/dist/src/components/Search/Search.module.scss.js +1 -1
- package/dist/src/components/Skeleton/Skeleton.module.scss.js +1 -1
- package/dist/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
- package/dist/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderHelpers.js.map +1 -1
- package/dist/src/components/Slider/SliderHooks.js.map +1 -1
- package/dist/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderInfixHooks.js.map +1 -1
- package/dist/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/src/components/Switch/Switch.module.scss.js +1 -1
- package/dist/src/components/Table/Table/Table.js.map +1 -1
- package/dist/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/src/components/Table/Table/tableHelpers.js.map +1 -1
- package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/src/components/Table/context/TableRowMenuContext/TableRowMenuContext.js.map +1 -1
- package/dist/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabsContext/TabsContext.js.map +1 -1
- package/dist/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/src/components/TextField/TextField.js.map +1 -1
- package/dist/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/src/components/TextWithHighlight/TextWithHighlight.js.map +1 -1
- package/dist/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
- package/dist/src/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/src/components/ThemeProvider/ThemeProviderUtils.js.map +1 -1
- package/dist/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenTitle.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenWizard.module.scss.js +1 -1
- package/dist/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/src/components/Toggle/MockToggle.module.scss.js +1 -1
- package/dist/src/components/Toggle/Toggle.module.scss.js +1 -1
- package/dist/src/components/Toggle/ToggleText.module.scss.js +1 -1
- package/dist/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.js.map +1 -1
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +1 -1
- package/dist/src/components/VirtualizedList/VirtualizedList.js.map +1 -1
- package/dist/src/components/VirtualizedList/VirtualizedList.module.scss.js +1 -1
- package/dist/src/components/next/List/List.module.scss.js +1 -1
- package/dist/src/components/next/List/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/src/helpers/textManipulations.js.map +1 -1
- package/dist/src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHelpers.js.map +1 -1
- package/dist/src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.js.map +1 -1
- package/dist/src/hooks/useElementsOverflowingIndex.js.map +1 -1
- package/dist/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js.map +1 -1
- package/dist/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map +1 -1
- package/dist/src/hooks/useItemsOverflow/useItemsOverflow.js.map +1 -1
- package/dist/src/hooks/useSwitch/index.js.map +1 -1
- package/dist/src/services/themes.js.map +1 -1
- package/dist/src/services/virtualized-service.js.map +1 -1
- package/dist/src/tests/interactionsTests.js +1 -1
- package/dist/src/tests/interactionsTests.js.map +1 -1
- package/dist/src/utils/dom-utils.js.map +1 -1
- package/dist/src/utils/warn-deprecated.js.map +1 -1
- package/dist/style/dist/index.min.css.js +1 -1
- package/dist/style-imports.d.ts +1 -1
- package/dist/tests/constants.d.ts +201 -201
- package/dist/tests/interactions-utils.d.ts +57 -57
- package/dist/tests/test-ids-utils.d.ts +3 -3
- package/dist/types/ArrayLastElement.d.ts +1 -1
- package/dist/types/Colors.d.ts +22 -22
- package/dist/types/ElementContent.d.ts +2 -2
- package/dist/types/FormElement.d.ts +40 -40
- package/dist/types/MoveBy.d.ts +4 -4
- package/dist/types/SplitString.d.ts +1 -1
- package/dist/types/VibeComponentProps.d.ts +14 -14
- package/dist/types/events.d.ts +6 -6
- package/dist/types/index.d.ts +6 -6
- package/dist/utils/colors-utils.d.ts +8 -8
- package/dist/utils/colors-vars-map.d.ts +132 -132
- package/dist/utils/dom-event-utils.d.ts +16 -16
- package/dist/utils/dom-utils.d.ts +2 -2
- package/dist/utils/function-utils.d.ts +5 -5
- package/dist/utils/media-query-utils.d.ts +23 -23
- package/dist/utils/ssr-utils.d.ts +2 -2
- package/dist/utils/user-agent-utils.d.ts +2 -2
- package/dist/utils/warn-deprecated.d.ts +10 -10
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sources":["../../../../../src/components/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { type ReactElement, useEffect, useMemo, useState } from \"react\";\nimport { type Theme } from \"./ThemeProviderConstants\";\nimport { type SystemTheme } from \"./ThemeProvider.types\";\nimport {\n addSystemThemeClassNameToBody,\n generateRandomAlphaString,\n generateThemeCssOverride,\n isAnySystemThemeClassNameOnBody,\n removeSystemThemeClassNameFromBody,\n shouldGenerateTheme\n} from \"./ThemeProviderUtils\";\nimport useIsomorphicLayoutEffect from \"../../hooks/ssr/useIsomorphicLayoutEffect\";\nexport interface ThemeProviderProps {\n /**\n * The theme configuration to apply. It consists of a `name` (a unique CSS class name added to the children)\n * and an object of color overrides for each system theme.\n */\n themeConfig?: Theme;\n /**\n * The children to be rendered with the applied theme.\n */\n children: ReactElement;\n /**\n * A string added to the theme name selector to make it more specific, in case `themeConfig.name`\n * collides with another class name.\n */\n themeClassSpecifier?: string;\n /**\n * The system theme to apply to the `body` element on mount,\n * if there is no system theme class name on the body already.\n */\n systemTheme?: SystemTheme;\n /**\n * Class name applied to the wrapping `div`.\n */\n className?: string;\n}\n\nconst ThemeProvider = ({\n themeConfig,\n children,\n themeClassSpecifier: customThemeClassSpecifier,\n systemTheme,\n className\n}: ThemeProviderProps) => {\n const [stylesLoaded, setStylesLoaded] = useState(false);\n const themeClassSpecifier = useMemo(\n () => customThemeClassSpecifier || generateRandomAlphaString(),\n [customThemeClassSpecifier]\n );\n\n // Add the systemTheme class name to the body on mount\n useIsomorphicLayoutEffect(() => {\n if (!systemTheme) {\n return;\n }\n\n if (isAnySystemThemeClassNameOnBody()) {\n // If there is already a systemTheme class name on the body, we don't want to override it\n return;\n }\n\n addSystemThemeClassNameToBody(systemTheme);\n\n return () => {\n // Cleanup the systemTheme class name from the body on ThemeProvider unmount\n removeSystemThemeClassNameFromBody(systemTheme);\n };\n }, [systemTheme]);\n\n useEffect(() => {\n if (!shouldGenerateTheme(themeConfig)) {\n return;\n }\n if (document.getElementById(themeConfig.name)) {\n setStylesLoaded(true);\n return;\n }\n\n const styleElement = document.createElement(\"style\");\n styleElement.type = \"text/css\";\n styleElement.id = themeConfig.name;\n const themeCssOverride = generateThemeCssOverride(themeConfig, themeClassSpecifier);\n\n try {\n styleElement.appendChild(document.createTextNode(themeCssOverride));\n document.head.appendChild(styleElement);\n setStylesLoaded(true);\n } catch (error) {\n console.error(\"vibe ThemeProvider: error inserting theme-generated css - \", error);\n }\n\n return () => {\n document.head.removeChild(styleElement);\n };\n }, [themeClassSpecifier, themeConfig]);\n\n if (!stylesLoaded && shouldGenerateTheme(themeConfig)) {\n // Waiting for styles to load before children render\n return null;\n }\n\n // Pass the theme name as a class to the div wrapping children - to scope the effect of the theme\n return <div className={cx(themeConfig?.name, themeClassSpecifier, className)}>{children}</div>;\n};\n\nexport default ThemeProvider;\n"],"names":["ThemeProvider","_ref","themeConfig","children","customThemeClassSpecifier","themeClassSpecifier","systemTheme","className","_useState","useState","_useState2","_slicedToArray","stylesLoaded","setStylesLoaded","useMemo","generateRandomAlphaString","useIsomorphicLayoutEffect","isAnySystemThemeClassNameOnBody","addSystemThemeClassNameToBody","removeSystemThemeClassNameFromBody","useEffect","shouldGenerateTheme","document","getElementById","name","styleElement","createElement","type","id","themeCssOverride","generateThemeCssOverride","appendChild","createTextNode","head","error","console","removeChild","React","cx"],"mappings":"gdAuCA,IAAMA,EAAgB,SAAHC,GAMM,IALvBC,EAAWD,EAAXC,YACAC,EAAQF,EAARE,SACqBC,EAAyBH,EAA9CI,oBACAC,EAAWL,EAAXK,YACAC,EAASN,EAATM,UAEAC,EAAwCC,GAAS,GAAMC,EAAAC,EAAAH,EAAA,GAAhDI,EAAYF,EAAA,GAAEG,EAAeH,EAAA,GAC9BL,EAAsBS,GAC1B,WAAA,OAAMV,GAA6BW,MACnC,CAACX,IAiDH,OA7CAY,GAA0B,WACxB,GAAKV,IAIDW,IAOJ,OAFAC,EAA8BZ,GAEvB,WAELa,EAAmCb,GAEvC,GAAG,CAACA,IAEJc,GAAU,WACR,GAAKC,EAAoBnB,GAAzB,CAGA,IAAIoB,SAASC,eAAerB,EAAYsB,MAAxC,CAKA,IAAMC,EAAeH,SAASI,cAAc,SAC5CD,EAAaE,KAAO,WACpBF,EAAaG,GAAK1B,EAAYsB,KAC9B,IAAMK,EAAmBC,EAAyB5B,EAAaG,GAE/D,IACEoB,EAAaM,YAAYT,SAASU,eAAeH,IACjDP,SAASW,KAAKF,YAAYN,GAC1BZ,GAAgB,EACjB,CAAC,MAAOqB,GACPC,QAAQD,MAAM,6DAA8DA,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","sources":["../../../../../src/components/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { type ReactElement, useEffect, useMemo, useState } from \"react\";\nimport { type Theme } from \"./ThemeProviderConstants\";\nimport { type SystemTheme } from \"./ThemeProvider.types\";\nimport {\n addSystemThemeClassNameToBody,\n generateRandomAlphaString,\n generateThemeCssOverride,\n isAnySystemThemeClassNameOnBody,\n removeSystemThemeClassNameFromBody,\n shouldGenerateTheme\n} from \"./ThemeProviderUtils\";\nimport useIsomorphicLayoutEffect from \"../../hooks/ssr/useIsomorphicLayoutEffect\";\nexport interface ThemeProviderProps {\n /**\n * The theme configuration to apply. It consists of a `name` (a unique CSS class name added to the children)\n * and an object of color overrides for each system theme.\n */\n themeConfig?: Theme;\n /**\n * The children to be rendered with the applied theme.\n */\n children: ReactElement;\n /**\n * A string added to the theme name selector to make it more specific, in case `themeConfig.name`\n * collides with another class name.\n */\n themeClassSpecifier?: string;\n /**\n * The system theme to apply to the `body` element on mount,\n * if there is no system theme class name on the body already.\n */\n systemTheme?: SystemTheme;\n /**\n * Class name applied to the wrapping `div`.\n */\n className?: string;\n}\n\nconst ThemeProvider = ({\n themeConfig,\n children,\n themeClassSpecifier: customThemeClassSpecifier,\n systemTheme,\n className\n}: ThemeProviderProps) => {\n const [stylesLoaded, setStylesLoaded] = useState(false);\n const themeClassSpecifier = useMemo(\n () => customThemeClassSpecifier || generateRandomAlphaString(),\n [customThemeClassSpecifier]\n );\n\n // Add the systemTheme class name to the body on mount\n useIsomorphicLayoutEffect(() => {\n if (!systemTheme) {\n return;\n }\n\n if (isAnySystemThemeClassNameOnBody()) {\n // If there is already a systemTheme class name on the body, we don't want to override it\n return;\n }\n\n addSystemThemeClassNameToBody(systemTheme);\n\n return () => {\n // Cleanup the systemTheme class name from the body on ThemeProvider unmount\n removeSystemThemeClassNameFromBody(systemTheme);\n };\n }, [systemTheme]);\n\n useEffect(() => {\n if (!shouldGenerateTheme(themeConfig)) {\n return;\n }\n if (document.getElementById(themeConfig.name)) {\n setStylesLoaded(true);\n return;\n }\n\n const styleElement = document.createElement(\"style\");\n styleElement.type = \"text/css\";\n styleElement.id = themeConfig.name;\n const themeCssOverride = generateThemeCssOverride(themeConfig, themeClassSpecifier);\n\n try {\n styleElement.appendChild(document.createTextNode(themeCssOverride));\n document.head.appendChild(styleElement);\n setStylesLoaded(true);\n } catch (error) {\n console.error(\"vibe ThemeProvider: error inserting theme-generated css - \", error);\n }\n\n return () => {\n document.head.removeChild(styleElement);\n };\n }, [themeClassSpecifier, themeConfig]);\n\n if (!stylesLoaded && shouldGenerateTheme(themeConfig)) {\n // Waiting for styles to load before children render\n return null;\n }\n\n // Pass the theme name as a class to the div wrapping children - to scope the effect of the theme\n return <div className={cx(themeConfig?.name, themeClassSpecifier, className)}>{children}</div>;\n};\n\nexport default ThemeProvider;\n"],"names":["ThemeProvider","_ref","themeConfig","children","customThemeClassSpecifier","themeClassSpecifier","systemTheme","className","_useState","useState","_useState2","_slicedToArray","stylesLoaded","setStylesLoaded","useMemo","generateRandomAlphaString","useIsomorphicLayoutEffect","isAnySystemThemeClassNameOnBody","addSystemThemeClassNameToBody","removeSystemThemeClassNameFromBody","useEffect","shouldGenerateTheme","document","getElementById","name","styleElement","createElement","type","id","themeCssOverride","generateThemeCssOverride","appendChild","createTextNode","head","error","console","removeChild","React","cx"],"mappings":"gdAuCA,IAAMA,EAAgB,SAAHC,GAMM,IALvBC,EAAWD,EAAXC,YACAC,EAAQF,EAARE,SACqBC,EAAyBH,EAA9CI,oBACAC,EAAWL,EAAXK,YACAC,EAASN,EAATM,UAEAC,EAAwCC,GAAS,GAAMC,EAAAC,EAAAH,EAAA,GAAhDI,EAAYF,EAAA,GAAEG,EAAeH,EAAA,GAC9BL,EAAsBS,GAC1B,WAAA,OAAMV,GAA6BW,MACnC,CAACX,IAiDH,OA7CAY,GAA0B,WACxB,GAAKV,IAIDW,IAOJ,OAFAC,EAA8BZ,GAEvB,WAELa,EAAmCb,GAEvC,GAAG,CAACA,IAEJc,GAAU,WACR,GAAKC,EAAoBnB,GAAzB,CAGA,IAAIoB,SAASC,eAAerB,EAAYsB,MAAxC,CAKA,IAAMC,EAAeH,SAASI,cAAc,SAC5CD,EAAaE,KAAO,WACpBF,EAAaG,GAAK1B,EAAYsB,KAC9B,IAAMK,EAAmBC,EAAyB5B,EAAaG,GAE/D,IACEoB,EAAaM,YAAYT,SAASU,eAAeH,IACjDP,SAASW,KAAKF,YAAYN,GAC1BZ,GAAgB,EACjB,CAAC,MAAOqB,GACPC,QAAQD,MAAM,6DAA8DA,EAC9E,CAEA,OAAO,WACLZ,SAASW,KAAKG,YAAYX,GAhB5B,CAFEZ,GAAgB,EAFlB,CAsBF,GAAG,CAACR,EAAqBH,KAEpBU,GAAgBS,EAAoBnB,GAEhC,KAIFmC,EAAAX,cAAA,MAAA,CAAKnB,UAAW+B,EAAGpC,aAAA,EAAAA,EAAasB,KAAMnB,EAAqBE,IAAaJ,EACjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProviderUtils.js","sources":["../../../../../src/components/ThemeProvider/ThemeProviderUtils.ts"],"sourcesContent":["import { type Theme, type ThemeColorTokenValueMap, SystemThemeClassMap } from \"./ThemeProviderConstants\";\nimport { type SystemTheme } from \"./ThemeProvider.types\";\n\nconst generateCss = (object: ThemeColorTokenValueMap, stack: string, parentSelector: string) => {\n for (const key of Object.keys(object)) {\n if (typeof object[key as keyof ThemeColorTokenValueMap] === \"string\") {\n stack += `--${key}: ${object[key as keyof ThemeColorTokenValueMap]};`;\n }\n }\n\n if (stack !== \"\") {\n stack = parentSelector + \" {\" + stack + \"}\";\n }\n\n for (const key of Object.keys(object)) {\n if (typeof object[key as keyof ThemeColorTokenValueMap] === \"object\") {\n const selector = `${parentSelector} .${key}`;\n stack +=\n \"\\n\" + generateCss(object[key as keyof ThemeColorTokenValueMap] as ThemeColorTokenValueMap, \"\", selector);\n }\n }\n\n return stack;\n};\n\nexport const shouldGenerateTheme = (themeConfig: Theme) => {\n return !!themeConfig?.colors && !!themeConfig?.name;\n};\n\nexport const generateThemeCssOverride = (themeConfig: Theme, themeClassSpecifier: string) => {\n if (!shouldGenerateTheme(themeConfig)) {\n return null;\n }\n\n let css = \"\";\n for (const systemTheme of Object.keys(themeConfig.colors) as SystemTheme[]) {\n css +=\n generateCss(\n themeConfig.colors[systemTheme],\n \"\",\n `.${SystemThemeClassMap[systemTheme]} .${themeClassSpecifier}.${themeConfig.name}`\n ) + \"\\n\";\n }\n\n return css;\n};\n\nexport const generateRandomAlphaString = (length = 6) => {\n let result = \"\";\n const characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * characters.length));\n }\n\n return result;\n};\n\nconst APP_THEME_SUFFIX = \"-app-theme\";\n\nconst isAppThemeClassName = (className: string) => {\n return className.endsWith(APP_THEME_SUFFIX);\n};\n\nexport const addAppThemeSuffix = (systemTheme: SystemTheme) => {\n return `${systemTheme}${APP_THEME_SUFFIX}`;\n};\n\nexport const getBodySystemThemeClassName = () => {\n const classList = document.body.classList;\n for (const className of Array.from(classList)) {\n if (isAppThemeClassName(className)) {\n return className;\n }\n }\n return null;\n};\n\nexport const isAnySystemThemeClassNameOnBody = () => {\n const bodySystemThemeClassName = getBodySystemThemeClassName();\n return !!bodySystemThemeClassName;\n};\n\nexport const addSystemThemeClassNameToBody = (systemTheme: SystemTheme) => {\n document.body.classList.add(addAppThemeSuffix(systemTheme));\n};\n\nexport const removeSystemThemeClassNameFromBody = (systemTheme: SystemTheme) => {\n document.body.classList.remove(addAppThemeSuffix(systemTheme));\n};\n"],"names":["generateCss","object","stack","parentSelector","_i","_Object$keys","Object","keys","length","key","concat","_i2","_Object$keys2","_typeof","selector","shouldGenerateTheme","themeConfig","colors","name","generateThemeCssOverride","themeClassSpecifier","css","_i3","_Object$keys3","systemTheme","SystemThemeClassMap","generateRandomAlphaString","arguments","undefined","result","characters","i","charAt","Math","floor","random","APP_THEME_SUFFIX","isAppThemeClassName","className","endsWith","addAppThemeSuffix","getBodySystemThemeClassName","classList","document","body","_i4","_Array$from","Array","from","isAnySystemThemeClassNameOnBody","addSystemThemeClassNameToBody","add","removeSystemThemeClassNameFromBody","remove"],"mappings":"0IAGA,IAAMA,EAAc,SAAdA,EAAeC,EAAiCC,EAAeC,GACnE,IAAA,IAAAC,EAAAC,EAAAA,EAAkBC,OAAOC,KAAKN,GAAOI,EAAAG,OAAAJ,EAAAA,IAAE,CAAlC,IAAMK,EAAGJ,EAAAD,GACgD,iBAAjDH,EAAOQ,KAChBP,GAAK,KAAAQ,OAASD,EAAG,MAAAC,OAAKT,EAAOQ,GAAwC,
|
|
1
|
+
{"version":3,"file":"ThemeProviderUtils.js","sources":["../../../../../src/components/ThemeProvider/ThemeProviderUtils.ts"],"sourcesContent":["import { type Theme, type ThemeColorTokenValueMap, SystemThemeClassMap } from \"./ThemeProviderConstants\";\nimport { type SystemTheme } from \"./ThemeProvider.types\";\n\nconst generateCss = (object: ThemeColorTokenValueMap, stack: string, parentSelector: string) => {\n for (const key of Object.keys(object)) {\n if (typeof object[key as keyof ThemeColorTokenValueMap] === \"string\") {\n stack += `--${key}: ${object[key as keyof ThemeColorTokenValueMap]};`;\n }\n }\n\n if (stack !== \"\") {\n stack = parentSelector + \" {\" + stack + \"}\";\n }\n\n for (const key of Object.keys(object)) {\n if (typeof object[key as keyof ThemeColorTokenValueMap] === \"object\") {\n const selector = `${parentSelector} .${key}`;\n stack +=\n \"\\n\" + generateCss(object[key as keyof ThemeColorTokenValueMap] as ThemeColorTokenValueMap, \"\", selector);\n }\n }\n\n return stack;\n};\n\nexport const shouldGenerateTheme = (themeConfig: Theme) => {\n return !!themeConfig?.colors && !!themeConfig?.name;\n};\n\nexport const generateThemeCssOverride = (themeConfig: Theme, themeClassSpecifier: string) => {\n if (!shouldGenerateTheme(themeConfig)) {\n return null;\n }\n\n let css = \"\";\n for (const systemTheme of Object.keys(themeConfig.colors) as SystemTheme[]) {\n css +=\n generateCss(\n themeConfig.colors[systemTheme],\n \"\",\n `.${SystemThemeClassMap[systemTheme]} .${themeClassSpecifier}.${themeConfig.name}`\n ) + \"\\n\";\n }\n\n return css;\n};\n\nexport const generateRandomAlphaString = (length = 6) => {\n let result = \"\";\n const characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\n\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * characters.length));\n }\n\n return result;\n};\n\nconst APP_THEME_SUFFIX = \"-app-theme\";\n\nconst isAppThemeClassName = (className: string) => {\n return className.endsWith(APP_THEME_SUFFIX);\n};\n\nexport const addAppThemeSuffix = (systemTheme: SystemTheme) => {\n return `${systemTheme}${APP_THEME_SUFFIX}`;\n};\n\nexport const getBodySystemThemeClassName = () => {\n const classList = document.body.classList;\n for (const className of Array.from(classList)) {\n if (isAppThemeClassName(className)) {\n return className;\n }\n }\n return null;\n};\n\nexport const isAnySystemThemeClassNameOnBody = () => {\n const bodySystemThemeClassName = getBodySystemThemeClassName();\n return !!bodySystemThemeClassName;\n};\n\nexport const addSystemThemeClassNameToBody = (systemTheme: SystemTheme) => {\n document.body.classList.add(addAppThemeSuffix(systemTheme));\n};\n\nexport const removeSystemThemeClassNameFromBody = (systemTheme: SystemTheme) => {\n document.body.classList.remove(addAppThemeSuffix(systemTheme));\n};\n"],"names":["generateCss","object","stack","parentSelector","_i","_Object$keys","Object","keys","length","key","concat","_i2","_Object$keys2","_typeof","selector","shouldGenerateTheme","themeConfig","colors","name","generateThemeCssOverride","themeClassSpecifier","css","_i3","_Object$keys3","systemTheme","SystemThemeClassMap","generateRandomAlphaString","arguments","undefined","result","characters","i","charAt","Math","floor","random","APP_THEME_SUFFIX","isAppThemeClassName","className","endsWith","addAppThemeSuffix","getBodySystemThemeClassName","classList","document","body","_i4","_Array$from","Array","from","isAnyS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EAAa,uDAEVC,EAAI,EAAOvB,EAAJuB,EAAYA,IAC1BF,GAAUC,EAAWE,OAAOC,KAAKC,MAAsBJ,GAAhBG,KAAKE,WAG9C,OAAON,CACT,EAEMO,EAAmB,aAEnBC,EAAsB,SAACC,GAC3B,OAAOA,EAAUC,SAASH,EAC5B,EAEaI,EAAoB,SAAChB,GAChC,MAAA,GAAAd,OAAUc,GAAWd,OAAG0B,EAC1B,EAEaK,EAA8B,WAEzC,IADA,IAAMC,EAAYC,SAASC,KAAKF,UAChCG,EAAAC,EAAAA,EAAwBC,MAAMC,KAAKN,GAAUI,EAAAtC,OAAAqC,EAAAA,IAAE,CAA1C,IAAMP,EAASQ,EAAAD,GAClB,GAAIR,EAAoBC,GACtB,OAAOA,CAEX,CACA,OAAO,IACT,EAEaW,EAAkC,WAE7C,QADiCR,GAEnC,EAEaS,EAAgC,SAAC1B,GAC5CmB,SAASC,KAAKF,UAAUS,IAAIX,EAAkBhB,GAChD,EAEa4B,EAAqC,SAAC5B,GACjDmB,SAASC,KAAKF,UAAUW,OAAOb,EAAkBhB,GACnD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={tipseenWrapper:"tipseenWrapper",tipseenWrapperWithoutCustomWidth:"tipseenWrapperWithoutCustomWidth",floating:"floating",tipseenHeader:"tipseenHeader",tipseenTitle:"tipseenTitle",tipseenContent:"tipseenContent",tipseenCloseButton:"tipseenCloseButton",dark:"dark"};!function(e){const n="s_id-077bfe37a52b_4_0_0-
|
|
1
|
+
var e={tipseenWrapper:"tipseenWrapper",tipseenWrapperWithoutCustomWidth:"tipseenWrapperWithoutCustomWidth",floating:"floating",tipseenHeader:"tipseenHeader",tipseenTitle:"tipseenTitle",tipseenContent:"tipseenContent",tipseenCloseButton:"tipseenCloseButton",dark:"dark"};!function(e){const n="s_id-077bfe37a52b_4_0_0-alpha_1";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const i=document.createElement("style");i.id=n,t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.tipseenWrapper {\n min-width: 100px;\n min-height: 40px;\n --tooltip-padding: 0;\n --tooltip-border-radius: var(--border-radius-medium);\n --tooltip-max-width: initial;\n}\n.tipseenWrapper.tipseenWrapperWithoutCustomWidth {\n --tooltip-max-width: 320px;\n}\n.tipseenWrapper.floating {\n position: fixed;\n bottom: 0;\n inset-inline-end: 0;\n margin-bottom: var(--space-16);\n margin-inline-end: var(--space-16);\n}\n.tipseenWrapper .tipseenHeader {\n display: flex;\n justify-content: flex-start;\n}\n.tipseenWrapper .tipseenTitle {\n padding: var(--space-16) var(--space-32) 0 var(--space-16);\n}\n.tipseenWrapper .tipseenContent {\n margin: 0;\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n}\n.tipseenWrapper .tipseenCloseButton {\n position: absolute;\n top: var(--space-8);\n inset-inline-end: var(--space-8);\n z-index: 2;\n}\n.tipseenWrapper .tipseenCloseButton.dark {\n color: var(--color-asphalt);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=Tipseen.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={tipseenBasicContent:"tipseenBasicContent"};!function(e){const n="s_id-6606edb50944_4_0_0-
|
|
1
|
+
var e={tipseenBasicContent:"tipseenBasicContent"};!function(e){const n="s_id-6606edb50944_4_0_0-alpha_1";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const i=document.createElement("style");i.id=n,t.firstChild?t.insertBefore(i,t.firstChild):t.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".tipseenBasicContent {\n padding: var(--space-16) 20px var(--space-24) 20px;\n display: flex;\n flex-direction: column;\n}\n.tipseenBasicContent:not(:first-child) {\n padding-top: 12px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TipseenBasicContent.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={buttons:"buttons",dismiss:"dismiss"};!function(e){const n="s_id-585bd2f4c510_4_0_0-
|
|
1
|
+
var e={buttons:"buttons",dismiss:"dismiss"};!function(e){const n="s_id-585bd2f4c510_4_0_0-alpha_1";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const s=document.createElement("style");s.id=n,t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s),s.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".buttons {\n margin-top: 20px;\n display: flex;\n justify-content: flex-end;\n}\n\n.dismiss {\n margin-inline-end: var(--space-8);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TipseenContent.module.scss.js.map
|
package/dist/mocked_classnames/src/components/Tipseen/TipseenMedia/TipseenMedia.module.scss.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={tipseenMedia:"tipseenMedia",colorInverted:"colorInverted"};!function(e){const n="s_id-71e151b2b729_4_0_0-
|
|
1
|
+
var e={tipseenMedia:"tipseenMedia",colorInverted:"colorInverted"};!function(e){const n="s_id-71e151b2b729_4_0_0-alpha_1";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+n))return;const r=document.createElement("style");r.id=n,d.firstChild?d.insertBefore(r,d.firstChild):d.appendChild(r),r.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".tipseenMedia {\n width: 100%;\n overflow: hidden;\n display: flex;\n border: 2px solid var(--primary-color);\n border-radius: var(--border-radius-medium);\n position: relative;\n z-index: 1;\n}\n\n.colorInverted {\n border-color: var(--inverted-color-background);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TipseenMedia.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={title:"title"};!function(e){const t="s_id-c12c5d8f6c34_4_0_0-
|
|
1
|
+
var e={title:"title"};!function(e){const t="s_id-c12c5d8f6c34_4_0_0-alpha_1";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,n.firstChild?n.insertBefore(d,n.firstChild):n.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".title {\n padding-inline-end: var(--space-16);\n padding-bottom: var(--space-4);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TipseenTitle.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={tipseenWizard:"tipseenWizard",tipseenWizardWizard:"tipseenWizardWizard"};!function(e){const i="s_id-98eba0c83d1f_4_0_0-
|
|
1
|
+
var e={tipseenWizard:"tipseenWizard",tipseenWizardWizard:"tipseenWizardWizard"};!function(e){const i="s_id-98eba0c83d1f_4_0_0-alpha_1";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+i))return;const d=document.createElement("style");d.id=i,t.firstChild?t.insertBefore(d,t.firstChild):t.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[i]=e)}(".tipseenWizard {\n display: flex;\n flex-direction: column;\n}\n.tipseenWizardWizard {\n width: 100%;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TipseenWizard.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var n={toast:"toast",typeNormal:"typeNormal",typePositive:"typePositive",typeNegative:"typeNegative",typeWarning:"typeWarning",closeButton:"closeButton",actionButton:"actionButton",actionLink:"actionLink",typeDark:"typeDark",icon:"icon",withTransition:"withTransition",bounceIn:"bounceIn",content:"content",textContent:"textContent",enterActive:"enterActive",slideIn:"slideIn",exitActive:"exitActive",slideOut:"slideOut"};!function(n){const t="s_id-da2ee7919891_4_0_0-
|
|
1
|
+
var n={toast:"toast",typeNormal:"typeNormal",typePositive:"typePositive",typeNegative:"typeNegative",typeWarning:"typeWarning",closeButton:"closeButton",actionButton:"actionButton",actionLink:"actionLink",typeDark:"typeDark",icon:"icon",withTransition:"withTransition",bounceIn:"bounceIn",content:"content",textContent:"textContent",enterActive:"enterActive",slideIn:"slideIn",exitActive:"exitActive",slideOut:"slideOut"};!function(n){const t="s_id-da2ee7919891_4_0_0-alpha_1";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+t))return;const e=document.createElement("style");e.id=t,o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=n)}(".toast {\n box-shadow: var(--box-shadow-medium);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n margin: var(--space-16);\n position: fixed;\n left: 50%;\n top: 0;\n margin-inline: auto;\n padding: var(--space-8);\n align-items: center;\n display: flex;\n min-width: 200px;\n width: auto;\n border-radius: var(--border-radius-small);\n color: var(--fixed-light-color);\n transform: translateX(-50%);\n transition: background-color 80ms cubic-bezier(0.6, 0, 0.4, 1), width 200ms cubic-bezier(0, 0, 0.4, 1);\n}\n.toast.typeNormal {\n background-color: var(--primary-color);\n}\n.toast.typePositive {\n background-color: var(--positive-color);\n}\n.toast.typeNegative {\n background-color: var(--negative-color);\n}\n.toast.typeWarning {\n background-color: var(--warning-color);\n color: var(--fixed-dark-color);\n}\n.toast.typeWarning .closeButton {\n color: var(--fixed-dark-color);\n}\n.toast.typeWarning .actionButton,\n.toast.typeWarning .actionLink {\n color: var(--fixed-dark-color);\n border-color: var(--fixed-dark-color);\n}\n.toast.typeDark {\n background-color: var(--inverted-color-background);\n color: var(--text-color-on-inverted);\n}\n.toast.typeDark .closeButton {\n color: var(--text-color-on-inverted);\n}\n.toast.typeDark .actionButton,\n.toast.typeDark .actionLink {\n color: var(--text-color-on-inverted);\n border-color: var(--text-color-on-inverted);\n}\n.icon {\n display: flex;\n margin-inline-start: var(--space-8);\n}\n.actionButton.withTransition {\n opacity: 0;\n animation: bounceIn 150ms cubic-bezier(0, 0, 0.4, 1);\n animation-delay: 300ms;\n animation-fill-mode: forwards;\n}\n.content {\n margin: 0 var(--space-8);\n flex: 1;\n}\n.textContent {\n display: inline-flex;\n flex-grow: 1;\n}\n.enterActive {\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n animation-name: slideIn;\n animation-duration: 350ms;\n animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1);\n}\n.exitActive {\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n animation-name: slideOut;\n animation-duration: 350ms;\n animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1);\n}\n.closeButton {\n margin-inline-start: var(--space-8);\n}\n@keyframes slideIn {\n 0% {\n transform: translate(-50%, -100px);\n }\n 40% {\n transform: translate(-50%, 16px);\n }\n 100% {\n transform: translate(-50%, 0px);\n }\n}\n@keyframes slideOut {\n 0% {\n transform: translate(-50%, 0);\n }\n 100% {\n transform: translate(-50%, -100px);\n opacity: 0;\n }\n}\n@keyframes bounceIn {\n 0% {\n transform: scale(0.8);\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n}");export{n as default};
|
|
2
2
|
//# sourceMappingURL=Toast.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={actionLink:"actionLink"};!function(e){const t="s_id-a224471727c9_4_0_0-
|
|
1
|
+
var e={actionLink:"actionLink"};!function(e){const t="s_id-a224471727c9_4_0_0-alpha_1";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const o=document.createElement("style");o.id=t,n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".actionLink {\n color: var(--text-color-on-primary);\n -webkit-font-smoothing: auto;\n -moz-osx-font-smoothing: auto;\n}\n.actionLink:hover {\n color: inherit;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ToastLink.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var n={toggle:"toggle","focus-visible":"focus-visible",selected:"selected",notSelected:"notSelected",disabled:"disabled",medium:"medium",small:"small",noSpacing:"noSpacing"};!function(n){const e="s_id-5e47b8a7e8fd_4_0_0-
|
|
1
|
+
var n={toggle:"toggle","focus-visible":"focus-visible",selected:"selected",notSelected:"notSelected",disabled:"disabled",medium:"medium",small:"small",noSpacing:"noSpacing"};!function(n){const e="s_id-5e47b8a7e8fd_4_0_0-alpha_1";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+e))return;const o=document.createElement("style");o.id=e,t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}('/* stylelint-disable */\n/* stylelint-enable */\n.toggle {\n border: none;\n margin: 0;\n padding: 0;\n width: auto;\n overflow: visible;\n background: transparent;\n /* inherit font & color from ancestor */\n color: inherit;\n font: inherit;\n /* Normalize `line-height`. Cannot be changed from `normal` in Firefox 4+. */\n line-height: normal;\n /* Corrects font smoothing for webkit */\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n /* Corrects inability to style clickable `input` types in iOS */\n appearance: none;\n transition: background-color var(--motion-productive-medium) var(--motion-timing-transition);\n margin: 0 var(--space-8);\n position: relative;\n height: var(--toggle-height);\n width: var(--toggle-width);\n cursor: pointer;\n border-radius: 100px !important;\n}\n.toggle:focus-visible, .toggle.focus-visible {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.toggle:focus:not(.focus-visible) {\n outline: none;\n}\n.toggle::after {\n background-color: var(--primary-background-color);\n content: " ";\n position: absolute;\n width: var(--circle-size);\n height: var(--circle-size);\n border-radius: 50%;\n top: calc(50% - 9px);\n transition: inset-inline-start var(--motion-productive-medium) var(--motion-timing-transition);\n}\n.toggle.selected {\n background-color: var(--primary-color);\n}\n.toggle.selected::after {\n inset-inline-start: 20px;\n}\n.toggle.notSelected {\n background-color: var(--ui-border-color);\n}\n.toggle.notSelected::after {\n inset-inline-start: 3px;\n}\n.toggle.disabled {\n opacity: var(--disabled-component-opacity);\n cursor: not-allowed;\n}\n.toggle.medium {\n --toggle-width: 41px;\n --toggle-height: 24px;\n}\n.toggle.medium::after {\n --circle-size: 18px;\n}\n.toggle.small {\n --toggle-width: 28px;\n --toggle-height: 16px;\n}\n.toggle.small::after {\n --circle-size: 12px;\n top: calc(50% - 6px);\n inset-inline-start: 14px;\n}\n.toggle.small.notSelected::after {\n inset-inline-start: 2px;\n}\n.toggle.noSpacing {\n margin: 0;\n}');export{n as default};
|
|
2
2
|
//# sourceMappingURL=MockToggle.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={toggleInput:"toggleInput","focus-visible":"focus-visible",wrapper:"wrapper"};!function(e){const t="s_id-4304a18f6620_4_0_0-
|
|
1
|
+
var e={toggleInput:"toggleInput","focus-visible":"focus-visible",wrapper:"wrapper"};!function(e){const t="s_id-4304a18f6620_4_0_0-alpha_1";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const l=document.createElement("style");l.id=t,n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable selector-class-pattern */\n.toggleInput:focus-visible, .toggleInput.focus-visible { /* stylelint-disable-line selector-class-pattern */ }\n.toggleInput:focus-visible ~ div, .toggleInput.focus-visible ~ div {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.wrapper {\n display: flex;\n align-items: center;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=Toggle.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={text:"text",disabled:"disabled"};!function(e){const t="s_id-1dee71639eb3_4_0_0-
|
|
1
|
+
var e={text:"text",disabled:"disabled"};!function(e){const t="s_id-1dee71639eb3_4_0_0-alpha_1";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,n.firstChild?n.insertBefore(d,n.firstChild):n.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".text {\n color: var(--primary-text-color);\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n}\n\n.disabled {\n color: var(--disabled-text-color);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ToggleText.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={slideshow:"slideshow"};!function(e){const t="s_id-1d828e3be878_4_0_0-
|
|
1
|
+
var e={slideshow:"slideshow"};!function(e){const t="s_id-1d828e3be878_4_0_0-alpha_1";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,d.firstChild?d.insertBefore(n,d.firstChild):d.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".slideshow {\n width: 100%;\n height: 100%;\n min-height: 0;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TransitionView.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedGrid.js","sources":["../../../../../src/components/VirtualizedGrid/VirtualizedGrid.tsx"],"sourcesContent":["import React, {\n type CSSProperties,\n type ReactElement,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport cx from \"classnames\";\nimport {\n type GridChildComponentProps,\n type GridOnScrollProps,\n type ScrollDirection,\n VariableSizeGrid as Grid,\n type GridOnItemsRenderedProps\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport {\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport usePrevious from \"../../hooks/usePrevious\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { NOOP } from \"../../utils/function-utils\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./VirtualizedGrid.module.scss\";\nimport { type VirtualizedGridItemType as ItemType } from \"./VirtualizedGrid.types\";\n\nexport interface VirtualizedGridProps extends VibeComponentProps {\n /**\n * The list of items to be rendered in the grid.\n */\n items: ItemType[];\n /**\n * Function that renders each item in the grid.\n */\n itemRenderer: (item: ItemType, index: number, style: CSSProperties) => ReactElement;\n /**\n * Function that returns the row height.\n */\n getRowHeight: () => number;\n /**\n * Function that returns the column width.\n */\n getColumnWidth: () => number;\n /**\n * Function that returns the unique ID of an item.\n */\n getItemId?: (item: ItemType, index: number) => string;\n /**\n * The index of the item to scroll to.\n */\n scrollToId?: number;\n /**\n * Callback fired when the grid is scrolled.\n */\n onScroll?: (horizontalScrollDirection: ScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void;\n /**\n * Callback fired when scrolling has finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Callback fired when items are rendered in the grid.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the grid size is updated.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * Callback fired when the vertical scrollbar visibility changes.\n */\n onVerticalScrollbarVisiblityChange?: (value: boolean) => void;\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n}\n\nconst VirtualizedGrid = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer,\n getRowHeight = () => 50,\n getColumnWidth = () => 100,\n getItemId = (item: ItemType, _index: number) => item.id,\n onScroll,\n scrollToId = null,\n onScrollToFinished = NOOP,\n onItemsRendered = null,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onVerticalScrollbarVisiblityChange = null,\n scrollableClassName,\n \"data-testid\": dataTestId\n }: VirtualizedGridProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [gridHeight, setGridHeight] = useState(0);\n const [gridWidth, setGridWidth] = useState(0);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const gridRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n\n const animationData = animationDataRef.current;\n\n // Callbacks\n const heightGetter = useCallback(\n (item: ItemType) => {\n const height = getRowHeight();\n if (!height || Number.isNaN(height)) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getRowHeight]\n );\n\n const idGetter = useCallback(\n (item: ItemType, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, height, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, heightGetter);\n }, [items, idGetter, heightGetter]);\n\n const calcColumnCount = useMemo(() => {\n return Math.min(items.length, Math.floor(gridWidth / getColumnWidth()));\n }, [items, gridWidth, getColumnWidth]);\n\n const calcRowCount = useMemo(() => {\n return calcColumnCount > 0 ? Math.ceil(items.length / calcColumnCount) : 0;\n }, [items, calcColumnCount]);\n\n const scrollToColumnIndex = useMemo(() => {\n return scrollToId % calcColumnCount;\n }, [scrollToId, calcColumnCount]);\n\n const scrollToRowIndex = useMemo(() => {\n return Math.floor(scrollToId / calcColumnCount);\n }, [scrollToId, calcColumnCount]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({ horizontalScrollDirection, scrollTop, scrollUpdateWasRequested }: GridOnScrollProps) => {\n scrollTopRef.current = scrollTop;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollTop;\n }\n onScroll && onScroll(horizontalScrollDirection, scrollTop, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const cellRenderer = useCallback(\n ({ columnIndex, rowIndex, style }: { columnIndex: number; rowIndex: number; style: CSSProperties }) => {\n const index = rowIndex * calcColumnCount + columnIndex;\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer, calcColumnCount]\n );\n\n const updateGridSize = useCallback(\n (width: number, height: number) => {\n if (height !== gridHeight || width !== gridWidth) {\n setTimeout(() => {\n setGridHeight(height);\n setGridWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [gridHeight, gridWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleRowStartIndex, visibleRowStopIndex }: GridOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleRowStartIndex,\n visibleRowStopIndex,\n gridHeight,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, gridHeight]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n gridRef.current.scrollToItem({\n align: \"center\",\n columnIndex: scrollToColumnIndex,\n rowIndex: scrollToRowIndex\n });\n onScrollToFinished();\n }\n }, [scrollToId, prevScrollToId, gridRef, scrollToColumnIndex, scrollToRowIndex, onScrollToFinished]);\n\n useEffect(() => {\n // recalculate row heights\n if (gridRef.current) {\n gridRef.current.resetAfterIndices({ columnIndex: 0, rowIndex: 0 });\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n if (onVerticalScrollbarVisiblityChange) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, gridHeight);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n onVerticalScrollbarVisiblityChange(isVisible);\n }\n }\n }, [onVerticalScrollbarVisiblityChange, items, normalizedItems, gridHeight, idGetter]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedGridWrapper, className)}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_GRID, id)}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateGridSize(width, height);\n return (\n <Grid\n ref={gridRef}\n height={height}\n width={width}\n columnWidth={getColumnWidth}\n columnCount={calcColumnCount}\n rowHeight={getRowHeight}\n rowCount={calcRowCount}\n onScroll={onScrollCB}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {cellRenderer as unknown as React.ComponentType<GridChildComponentProps>}\n </Grid>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedGrid;\n"],"names":["VirtualizedGrid","forwardRef","_ref","ref","className","id","_ref$items","items","itemRenderer","_ref$getRowHeight","getRowHeight","_ref$getColumnWidth","getColumnWidth","_ref$getItemId","getItemId","item","_index","onScroll","_ref$scrollToId","scrollToId","_ref$onScrollToFinish","onScrollToFinished","NOOP","_ref$onItemsRendered","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onVerticalScroll","onVerticalScrollbarVisiblityChange","scrollableClassName","dataTestId","_useState","useState","_useState2","_slicedToArray","gridHeight","setGridHeight","_useState3","_useState4","gridWidth","setGridWidth","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","gridRef","scrollTopRef","animationDataRef","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","animationData","current","heightGetter","useCallback","height","Number","isNaN","console","error","idGetter","index","itemId","undefined","normalizedItems","useMemo","getNormalizedItems","calcColumnCount","Math","min","length","floor","calcRowCount","ceil","scrollToColumnIndex","scrollToRowIndex","onScrollCB","_ref2","horizontalScrollDirection","scrollTop","scrollUpdateWasRequested","cellRenderer","_ref3","rowIndex","columnIndex","style","updateGridSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleRowStartIndex","visibleRowStopIndex","wait","trailing","useEffect","scrollToItem","align","resetAfterIndices","isVisible","isLayoutDirectionScrollbarVisible","React","createElement","cx","styles","virtualizedGridWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_GRID","AutoSizer","_ref5","Grid","columnWidth","columnCount","rowHeight","rowCount"],"mappings":"iwBAsGMA,IAAAA,EAAkBC,GACtB,SAAAC,EAmBEC,GACE,IAlBAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EACVE,EAAYN,EAAZM,aAAYC,EAAAP,EACZQ,aAAAA,OAAe,IAAHD,EAAG,WAAA,OAAM,EAAE,EAAAA,EAAAE,EAA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version":3,"file":"VirtualizedGrid.js","sources":["../../../../../src/components/VirtualizedGrid/VirtualizedGrid.tsx"],"sourcesContent":["import React, {\n type CSSProperties,\n type ReactElement,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport cx from \"classnames\";\nimport {\n type GridChildComponentProps,\n type GridOnScrollProps,\n type ScrollDirection,\n VariableSizeGrid as Grid,\n type GridOnItemsRenderedProps\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport {\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport usePrevious from \"../../hooks/usePrevious\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { NOOP } from \"../../utils/function-utils\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./VirtualizedGrid.module.scss\";\nimport { type VirtualizedGridItemType as ItemType } from \"./VirtualizedGrid.types\";\n\nexport interface VirtualizedGridProps extends VibeComponentProps {\n /**\n * The list of items to be rendered in the grid.\n */\n items: ItemType[];\n /**\n * Function that renders each item in the grid.\n */\n itemRenderer: (item: ItemType, index: number, style: CSSProperties) => ReactElement;\n /**\n * Function that returns the row height.\n */\n getRowHeight: () => number;\n /**\n * Function that returns the column width.\n */\n getColumnWidth: () => number;\n /**\n * Function that returns the unique ID of an item.\n */\n getItemId?: (item: ItemType, index: number) => string;\n /**\n * The index of the item to scroll to.\n */\n scrollToId?: number;\n /**\n * Callback fired when the grid is scrolled.\n */\n onScroll?: (horizontalScrollDirection: ScrollDirection, scrollTop: number, scrollUpdateWasRequested: boolean) => void;\n /**\n * Callback fired when scrolling has finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Callback fired when items are rendered in the grid.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the grid size is updated.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * Callback fired when the vertical scrollbar visibility changes.\n */\n onVerticalScrollbarVisiblityChange?: (value: boolean) => void;\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n}\n\nconst VirtualizedGrid = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer,\n getRowHeight = () => 50,\n getColumnWidth = () => 100,\n getItemId = (item: ItemType, _index: number) => item.id,\n onScroll,\n scrollToId = null,\n onScrollToFinished = NOOP,\n onItemsRendered = null,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onVerticalScrollbarVisiblityChange = null,\n scrollableClassName,\n \"data-testid\": dataTestId\n }: VirtualizedGridProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [gridHeight, setGridHeight] = useState(0);\n const [gridWidth, setGridWidth] = useState(0);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const gridRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n\n const animationData = animationDataRef.current;\n\n // Callbacks\n const heightGetter = useCallback(\n (item: ItemType) => {\n const height = getRowHeight();\n if (!height || Number.isNaN(height)) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getRowHeight]\n );\n\n const idGetter = useCallback(\n (item: ItemType, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, height, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, heightGetter);\n }, [items, idGetter, heightGetter]);\n\n const calcColumnCount = useMemo(() => {\n return Math.min(items.length, Math.floor(gridWidth / getColumnWidth()));\n }, [items, gridWidth, getColumnWidth]);\n\n const calcRowCount = useMemo(() => {\n return calcColumnCount > 0 ? Math.ceil(items.length / calcColumnCount) : 0;\n }, [items, calcColumnCount]);\n\n const scrollToColumnIndex = useMemo(() => {\n return scrollToId % calcColumnCount;\n }, [scrollToId, calcColumnCount]);\n\n const scrollToRowIndex = useMemo(() => {\n return Math.floor(scrollToId / calcColumnCount);\n }, [scrollToId, calcColumnCount]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({ horizontalScrollDirection, scrollTop, scrollUpdateWasRequested }: GridOnScrollProps) => {\n scrollTopRef.current = scrollTop;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollTop;\n }\n onScroll && onScroll(horizontalScrollDirection, scrollTop, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const cellRenderer = useCallback(\n ({ columnIndex, rowIndex, style }: { columnIndex: number; rowIndex: number; style: CSSProperties }) => {\n const index = rowIndex * calcColumnCount + columnIndex;\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer, calcColumnCount]\n );\n\n const updateGridSize = useCallback(\n (width: number, height: number) => {\n if (height !== gridHeight || width !== gridWidth) {\n setTimeout(() => {\n setGridHeight(height);\n setGridWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [gridHeight, gridWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleRowStartIndex, visibleRowStopIndex }: GridOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleRowStartIndex,\n visibleRowStopIndex,\n gridHeight,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, gridHeight]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n gridRef.current.scrollToItem({\n align: \"center\",\n columnIndex: scrollToColumnIndex,\n rowIndex: scrollToRowIndex\n });\n onScrollToFinished();\n }\n }, [scrollToId, prevScrollToId, gridRef, scrollToColumnIndex, scrollToRowIndex, onScrollToFinished]);\n\n useEffect(() => {\n // recalculate row heights\n if (gridRef.current) {\n gridRef.current.resetAfterIndices({ columnIndex: 0, rowIndex: 0 });\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n if (onVerticalScrollbarVisiblityChange) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, gridHeight);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n onVerticalScrollbarVisiblityChange(isVisible);\n }\n }\n }, [onVerticalScrollbarVisiblityChange, items, normalizedItems, gridHeight, idGetter]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedGridWrapper, className)}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_GRID, id)}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateGridSize(width, height);\n return (\n <Grid\n ref={gridRef}\n height={height}\n width={width}\n columnWidth={getColumnWidth}\n columnCount={calcColumnCount}\n rowHeight={getRowHeight}\n rowCount={calcRowCount}\n onScroll={onScrollCB}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {cellRenderer as unknown as React.ComponentType<GridChildComponentProps>}\n </Grid>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedGrid;\n"],"names":["VirtualizedGrid","forwardRef","_ref","ref","className","id","_ref$items","items","itemRenderer","_ref$getRowHeight","getRowHeight","_ref$getColumnWidth","getColumnWidth","_ref$getItemId","getItemId","item","_index","onScroll","_ref$scrollToId","scrollToId","_ref$onScrollToFinish","onScrollToFinished","NOOP","_ref$onItemsRendered","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onVerticalScroll","onVerticalScrollbarVisiblityChange","scrollableClassName","dataTestId","_useState","useState","_useState2","_slicedToArray","gridHeight","setGridHeight","_useState3","_useState4","gridWidth","setGridWidth","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","gridRef","scrollTopRef","animationDataRef","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","animationData","current","heightGetter","useCallback","height","Number","isNaN","console","error","idGetter","index","itemId","undefined","normalizedItems","useMemo","getNormalizedItems","calcColumnCount","Math","min","length","floor","calcRowCount","ceil","scrollToColumnIndex","scrollToRowIndex","onScrollCB","_ref2","horizontalScrollDirection","scrollTop","scrollUpdateWasRequested","cellRenderer","_ref3","rowIndex","columnIndex","style","updateGridSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleRowStartIndex","visibleRowStopIndex","wait","trailing","useEffect","scrollToItem","align","resetAfterIndices","isVisible","isLayoutDirectionScrollbarVisible","React","createElement","cx","styles","virtualizedGridWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_GRID","AutoSizer","_ref5","Grid","columnWidth","columnCount","rowHeight","rowCount"],"mappings":"iwBAsGMA,IAAAA,EAAkBC,GACtB,SAAAC,EAmBEC,GACE,IAlBAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EACVE,EAAYN,EAAZM,aAAYC,EAAAP,EACZQ,aAAAA,OAAe,IAAHD,EAAG,WAAA,OAAM,EAAE,EAAAA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package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={virtualizedGridWrapper:"virtualizedGridWrapper"};!function(e){const t="s_id-03a8eed790d8_4_0_0-
|
|
1
|
+
var e={virtualizedGridWrapper:"virtualizedGridWrapper"};!function(e){const t="s_id-03a8eed790d8_4_0_0-alpha_1";if("undefined"!=typeof document){const d=document.head||document.getElementsByTagName("head")[0];if(d.querySelector("#"+t))return;const i=document.createElement("style");i.id=t,d.firstChild?d.insertBefore(i,d.firstChild):d.appendChild(i),i.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.virtualizedGridWrapper {\n height: 100%;\n width: 100%;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=VirtualizedGrid.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedList.js","sources":["../../../../../src/components/VirtualizedList/VirtualizedList.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n type CSSProperties,\n type ForwardedRef,\n forwardRef,\n type LegacyRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { noop as NOOP } from \"es-toolkit\";\nimport {\n type ScrollDirection,\n VariableSizeList as List,\n type ListOnItemsRenderedProps,\n type ListChildComponentProps,\n type VariableSizeList\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport usePrevious from \"../../hooks/usePrevious\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport {\n easeInOutQuint,\n getMaxOffset,\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./VirtualizedList.module.scss\";\nimport {\n type VirtualizedListItem,\n type VirtualizedListLayout,\n type VirtualizedListScrollDirection\n} from \"./VirtualizedList.types\";\n\nexport interface VirtualizedListProps extends VibeComponentProps {\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n /**\n * The orientation of the list.\n */\n layout?: VirtualizedListLayout;\n /**\n * The list of items to be rendered.\n */\n items: VirtualizedListItem[];\n /**\n * Function to render each item in the list.\n */\n itemRenderer: (item: VirtualizedListItem, index: number, style: CSSProperties) => ReactElement | JSX.Element;\n /**\n * Function to get the size (height/width) of each item, based on layout.\n */\n getItemSize?: (item: VirtualizedListItem, index: number) => number;\n /**\n * Function to get the unique ID of an item.\n */\n getItemId?: (item: VirtualizedListItem, index: number) => string;\n /**\n * Callback fired when the scroll animation is finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Number of items to render above and below the visible portion.\n */\n overscanCount?: number;\n /**\n * The duration of the scroll animation in milliseconds.\n */\n scrollDuration?: number;\n /**\n * Callback fired when items are rendered.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the list size changes.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * Callback fired when the vertical or horizontal scrollbar visibility changes.\n */\n onLayoutDirectionScrollbarVisibilityChange?: (value: boolean) => void;\n /**\n * The ARIA role attribute applied to the list.\n */\n role?: string;\n /**\n * The ARIA label for the list.\n */\n \"aria-label\"?: string;\n /**\n * Custom inline styles applied to the list.\n */\n style?: CSSProperties;\n /**\n * The ID of the item to scroll to.\n */\n scrollToId?: string;\n /**\n * Reference to the virtualized list component.\n */\n virtualListRef?: ForwardedRef<HTMLElement>;\n /**\n * Callback fired when the list is scrolled.\n */\n onScroll?: (\n horizontalScrollDirection: VirtualizedListScrollDirection,\n scrollTop: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n}\n\nconst VirtualizedList = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer = (item: VirtualizedListItem, _index: number, _style: CSSProperties) => item as ReactElement,\n getItemSize = (item: VirtualizedListItem, _index: number) => item.height,\n layout = \"vertical\",\n onScroll,\n overscanCount = 0,\n getItemId = (item: VirtualizedListItem, _index: number) => item.id,\n scrollToId,\n scrollDuration = 200,\n onScrollToFinished = NOOP,\n onItemsRendered,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onLayoutDirectionScrollbarVisibilityChange = null,\n virtualListRef,\n scrollableClassName,\n role,\n \"aria-label\": ariaLabel,\n style,\n \"data-testid\": dataTestId\n }: VirtualizedListProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [listHeight, setListHeight] = useState(0);\n const [listWidth, setListWidth] = useState(0);\n\n const isVerticalList = layout !== \"horizontal\";\n const listSizeByLayout = useMemo(() => {\n return isVerticalList ? listHeight : listWidth;\n }, [isVerticalList, listHeight, listWidth]);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const listRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n initialized: false,\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n const mergedListRef = useMergeRef(virtualListRef, listRef);\n\n const animationData = animationDataRef.current;\n if (!animationData.initialized) {\n animationData.initialized = true;\n animationData.scrollOffsetInitial = 0;\n animationData.scrollOffsetFinal = 0;\n animationData.animationStartTime = 0;\n }\n\n // Callbacks\n const sizeGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const height = getItemSize(item, index);\n if (height === undefined) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getItemSize]\n );\n\n const idGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, size, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, sizeGetter);\n }, [items, idGetter, sizeGetter]);\n\n const maxListOffset = useMemo(() => {\n return getMaxOffset(listSizeByLayout, normalizedItems);\n }, [listSizeByLayout, normalizedItems]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n }: {\n scrollDirection: ScrollDirection;\n scrollOffset: number;\n scrollUpdateWasRequested: boolean;\n }) => {\n scrollTopRef.current = scrollOffset;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollOffset;\n }\n onScroll && onScroll(scrollDirection, scrollOffset, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const animateScroll = useCallback(() => {\n requestAnimationFrame(() => {\n const now = performance.now();\n const ellapsed = now - animationData.animationStartTime;\n const scrollDelta = animationData.scrollOffsetFinal - animationData.scrollOffsetInitial;\n const easedTime = easeInOutQuint(Math.min(1, ellapsed / scrollDuration));\n const scrollOffset = animationData.scrollOffsetInitial + scrollDelta * easedTime;\n const finalOffsetValue = Math.min(maxListOffset, scrollOffset);\n scrollTopRef.current = finalOffsetValue;\n listRef.current?.scrollTo(finalOffsetValue);\n\n if (ellapsed < scrollDuration) {\n animateScroll();\n } else {\n animationData.animationStartTime = undefined;\n onScrollToFinished && onScrollToFinished();\n }\n });\n }, [scrollDuration, animationData, listRef, maxListOffset, onScrollToFinished]);\n\n const startScrollAnimation = useCallback(\n (item: VirtualizedListItem) => {\n const { offsetTop } = item;\n\n if (animationData.animationStartTime) {\n // animation already in progress\n animationData.scrollOffsetFinal = offsetTop;\n return;\n }\n\n // Update the initial scroll offset with the current scroll position for react 18 batching behavior\n if (listRef.current?.state?.scrollOffset !== null) {\n animationData.scrollOffsetInitial = listRef.current?.state?.scrollOffset;\n }\n\n if (animationData.scrollOffsetInitial === offsetTop) {\n // offset already equals to item offset\n onScrollToFinished && onScrollToFinished();\n return;\n }\n\n animationData.scrollOffsetFinal = offsetTop;\n animationData.animationStartTime = performance.now();\n animateScroll();\n },\n [animationData, animateScroll, onScrollToFinished]\n );\n\n const rowRenderer = useCallback(\n ({ index, style }: { index: number; style: CSSProperties }) => {\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer]\n );\n\n const calcItemSize = useCallback(\n (index: number) => {\n const item = items[index];\n return sizeGetter(item, index);\n },\n [items, sizeGetter]\n );\n\n const updateListSize = useCallback(\n (width: number, height: number) => {\n if (height !== listHeight || width !== listWidth) {\n setTimeout(() => {\n setListHeight(height);\n setListWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [listHeight, listWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleStartIndex, visibleStopIndex }: ListOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleStartIndex,\n visibleStopIndex,\n listSizeByLayout,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, listSizeByLayout]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n const hasScrollbar = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n const item = normalizedItems[scrollToId as keyof typeof normalizedItems];\n hasScrollbar && item && startScrollAnimation(item);\n }\n }, [prevScrollToId, scrollToId, startScrollAnimation, normalizedItems, items, idGetter, listSizeByLayout]);\n\n useEffect(() => {\n // recalculate row heights\n if (listRef.current) {\n listRef.current.resetAfterIndex(0);\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n if (onLayoutDirectionScrollbarVisibilityChange) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n onLayoutDirectionScrollbarVisibilityChange(isVisible);\n }\n }\n }, [onLayoutDirectionScrollbarVisibilityChange, items, normalizedItems, listSizeByLayout, idGetter]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedListWrapper, className)}\n id={id}\n role={role}\n aria-label={ariaLabel}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_LIST, id)}\n style={style}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateListSize(width, height);\n return (\n <List\n ref={mergedListRef as unknown as LegacyRef<VariableSizeList<unknown>>}\n height={height}\n width={width}\n itemCount={items.length}\n itemSize={calcItemSize}\n onScroll={onScrollCB}\n layout={layout}\n overscanCount={overscanCount}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {rowRenderer as React.ComponentType<ListChildComponentProps>}\n </List>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedList;\n"],"names":["VirtualizedList","forwardRef","_ref","ref","className","id","_ref$items","items","_ref$itemRenderer","itemRenderer","item","_index","_style","_ref$getItemSize","getItemSize","height","_ref$layout","layout","onScroll","_ref$overscanCount","overscanCount","_ref$getItemId","getItemId","scrollToId","_ref$scrollDuration","scrollDuration","_ref$onScrollToFinish","onScrollToFinished","NOOP","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onLayoutDirectio","onLayoutDirectionScrollbarVisibilityChange","virtualListRef","scrollableClassName","role","ariaLabel","style","dataTestId","_useState","useState","_useState2","_slicedToArray","listHeight","setListHeight","_useState3","_useState4","listWidth","setListWidth","isVerticalList","listSizeByLayout","useMemo","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","listRef","scrollTopRef","animationDataRef","initialized","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","mergedListRef","animationData","current","sizeGetter","useCallback","index","undefined","console","error","idGetter","itemId","normalizedItems","getNormalizedItems","maxListOffset","getMaxOffset","onScrollCB","_ref2","scrollDirection","scrollOffset","scrollUpdateWasRequested","animateScroll","requestAnimationFrame","ellapsed","performance","now","scrollDelta","easedTime","easeInOutQuint","Math","min","finalOffsetValue","_a","scrollTo","startScrollAnimation","offsetTop","_b","state","_d","_c","rowRenderer","_ref3","calcItemSize","updateListSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleStartIndex","visibleStopIndex","wait","trailing","useEffect","hasScrollbar","isLayoutDirectionScrollbarVisible","resetAfterIndex","isVisible","React","createElement","cx","styles","virtualizedListWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_LIST","AutoSizer","_ref5","List","itemCount","length","itemSize"],"mappings":"0zBA2IMA,IAAAA,EAAkBC,GACtB,SAAAC,EAyBEC,GACE,IAxBAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EAAAE,EAAAN,EACVO,aAAAA,OAAe,IAAHD,EAAG,SAACE,EAA2BC,EAAgBC,GAAqB,OAAKF,CAAoB,EAAAF,EAAAK,EAAAX,EACzGY,YAAAA,OAAW,IAAAD,EAAG,SAACH,EAA2BC,GAAc,OAAKD,EAAKK,MAAM,EAAAF,EAAAG,EAAAd,EACxEe,OAAAA,OAAS,IAAHD,EAAG,WAAUA,EACnBE,EAAQhB,EAARgB,SAAQC,EAAAjB,EACRkB,cAAAA,OA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BAsE,GAAU,WAER,GAAIpG,GAAcgC,KAAmBhC,EAAY,CAC/C,IAAMqG,EAAeC,EAAkCtH,EAAOyE,GAAiBF,GAAUzB,IACnF3C,EAAOsE,GAAgBzD,GAC7BqG,GAAgBlH,GAAQ4F,GAAqB5F,EAC9C,CACH,GAAG,CAAC6C,GAAgBhC,EAAY+E,GAAsBtB,GAAiBzE,EAAOuE,GAAUzB,KAExFsE,GAAU,WAEJ/D,GAAQW,SACVX,GAAQW,QAAQuD,gBAAgB,EAEpC,GAAG,CAAC9C,KAEJ2C,GAAU,WAER,GAAIxF,EAA4C,CAC9C,IAAM4F,EAAYF,EAAkCtH,EAAOyE,GAAiBF,GAAUzB,IAClFM,GAA8BY,UAAYwD,IAC5CpE,GAA8BY,QAAUwD,EACxC5F,EAA2C4F,GAE9C,CACH,GAAG,CAAC5F,EAA4C5B,EAAOyE,GAAiB3B,GAAkByB,KAGxFkD,EACEC,cAAA,MAAA,CAAA9H,IAAKgE,GACL/D,UAAW8H,EAAGC,EAAOC,uBAAwBhI,GAC7CC,GAAIA,EACJiC,KAAMA,EAAI,aACEC,GACC,cAAAE,IAAc4F,EAAUC,EAAuBC,iBAAkBlI,GAC9EmC,MAAOA,IAEPwF,EAACC,cAAAO,QACE,SAAAC,GAAyD,IAAtD1H,EAAM0H,EAAN1H,OAAQiG,EAAKyB,EAALzB,MAEV,OADAD,GAAeC,EAAOjG,GAEpBiH,gBAACU,EAAI,CACHvI,IAAKkE,GACLtD,OAAQA,EACRiG,MAAOA,EACP2B,UAAWpI,EAAMqI,OACjBC,SAAU/B,GACV5F,SAAUkE,GACVnE,OAAQA,EACRG,cAAeA,EACfS,gBAAiBqF,GACjB9G,UAAWiC,GAEVuE,GAGN,IAIT"}
|
|
1
|
+
{"version":3,"file":"VirtualizedList.js","sources":["../../../../../src/components/VirtualizedList/VirtualizedList.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n type CSSProperties,\n type ForwardedRef,\n forwardRef,\n type LegacyRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport { noop as NOOP } from \"es-toolkit\";\nimport {\n type ScrollDirection,\n VariableSizeList as List,\n type ListOnItemsRenderedProps,\n type ListChildComponentProps,\n type VariableSizeList\n} from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\nimport usePrevious from \"../../hooks/usePrevious\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport {\n easeInOutQuint,\n getMaxOffset,\n getNormalizedItems,\n getOnItemsRenderedData,\n isLayoutDirectionScrollbarVisible\n} from \"../../services/virtualized-service\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./VirtualizedList.module.scss\";\nimport {\n type VirtualizedListItem,\n type VirtualizedListLayout,\n type VirtualizedListScrollDirection\n} from \"./VirtualizedList.types\";\n\nexport interface VirtualizedListProps extends VibeComponentProps {\n /**\n * Class name applied to the scrollable container.\n */\n scrollableClassName?: string;\n /**\n * The orientation of the list.\n */\n layout?: VirtualizedListLayout;\n /**\n * The list of items to be rendered.\n */\n items: VirtualizedListItem[];\n /**\n * Function to render each item in the list.\n */\n itemRenderer: (item: VirtualizedListItem, index: number, style: CSSProperties) => ReactElement | JSX.Element;\n /**\n * Function to get the size (height/width) of each item, based on layout.\n */\n getItemSize?: (item: VirtualizedListItem, index: number) => number;\n /**\n * Function to get the unique ID of an item.\n */\n getItemId?: (item: VirtualizedListItem, index: number) => string;\n /**\n * Callback fired when the scroll animation is finished.\n */\n onScrollToFinished?: () => void;\n /**\n * Number of items to render above and below the visible portion.\n */\n overscanCount?: number;\n /**\n * The duration of the scroll animation in milliseconds.\n */\n scrollDuration?: number;\n /**\n * Callback fired when items are rendered.\n */\n onItemsRendered?: ({\n firstItemId,\n secondItemId,\n lastItemId,\n centerItemId,\n firstItemOffsetEnd,\n currentOffsetTop\n }: {\n firstItemId: string;\n secondItemId: string;\n lastItemId: string;\n centerItemId: string;\n firstItemOffsetEnd: number;\n currentOffsetTop: number;\n }) => void;\n /**\n * The delay (in ms) for throttling the `onItemsRendered` callback.\n */\n onItemsRenderedThrottleMs?: number;\n /**\n * Callback fired when the list size changes.\n */\n onSizeUpdate?: (width: number, height: number) => void;\n /**\n * Callback fired when the vertical or horizontal scrollbar visibility changes.\n */\n onLayoutDirectionScrollbarVisibilityChange?: (value: boolean) => void;\n /**\n * The ARIA role attribute applied to the list.\n */\n role?: string;\n /**\n * The ARIA label for the list.\n */\n \"aria-label\"?: string;\n /**\n * Custom inline styles applied to the list.\n */\n style?: CSSProperties;\n /**\n * The ID of the item to scroll to.\n */\n scrollToId?: string;\n /**\n * Reference to the virtualized list component.\n */\n virtualListRef?: ForwardedRef<HTMLElement>;\n /**\n * Callback fired when the list is scrolled.\n */\n onScroll?: (\n horizontalScrollDirection: VirtualizedListScrollDirection,\n scrollTop: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n}\n\nconst VirtualizedList = forwardRef(\n (\n {\n className,\n id,\n items = [],\n itemRenderer = (item: VirtualizedListItem, _index: number, _style: CSSProperties) => item as ReactElement,\n getItemSize = (item: VirtualizedListItem, _index: number) => item.height,\n layout = \"vertical\",\n onScroll,\n overscanCount = 0,\n getItemId = (item: VirtualizedListItem, _index: number) => item.id,\n scrollToId,\n scrollDuration = 200,\n onScrollToFinished = NOOP,\n onItemsRendered,\n onItemsRenderedThrottleMs = 200,\n onSizeUpdate = NOOP,\n onLayoutDirectionScrollbarVisibilityChange = null,\n virtualListRef,\n scrollableClassName,\n role,\n \"aria-label\": ariaLabel,\n style,\n \"data-testid\": dataTestId\n }: VirtualizedListProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n // states\n const [listHeight, setListHeight] = useState(0);\n const [listWidth, setListWidth] = useState(0);\n\n const isVerticalList = layout !== \"horizontal\";\n const listSizeByLayout = useMemo(() => {\n return isVerticalList ? listHeight : listWidth;\n }, [isVerticalList, listHeight, listWidth]);\n\n // prevs\n const prevScrollToId = usePrevious(scrollToId);\n\n // Refs\n const componentRef = useRef(null);\n const isVerticalScrollbarVisibleRef = useRef(null);\n const listRef = useRef(null);\n const scrollTopRef = useRef(0);\n const animationDataRef = useRef({\n initialized: false,\n scrollOffsetInitial: 0,\n scrollOffsetFinal: 0,\n animationStartTime: 0\n });\n const mergedRef = useMergeRef(ref, componentRef);\n const mergedListRef = useMergeRef(virtualListRef, listRef);\n\n const animationData = animationDataRef.current;\n if (!animationData.initialized) {\n animationData.initialized = true;\n animationData.scrollOffsetInitial = 0;\n animationData.scrollOffsetFinal = 0;\n animationData.animationStartTime = 0;\n }\n\n // Callbacks\n const sizeGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const height = getItemSize(item, index);\n if (height === undefined) {\n console.error(\"Couldn't get height for item: \", item);\n }\n return height;\n },\n [getItemSize]\n );\n\n const idGetter = useCallback(\n (item: VirtualizedListItem, index: number) => {\n const itemId = getItemId(item, index);\n if (itemId === undefined) {\n console.error(\"Couldn't get id for item: \", item);\n }\n return itemId;\n },\n [getItemId]\n );\n\n // Memos\n // Creates object of itemId => { item, index, size, offsetTop}\n const normalizedItems = useMemo(() => {\n return getNormalizedItems(items, idGetter, sizeGetter);\n }, [items, idGetter, sizeGetter]);\n\n const maxListOffset = useMemo(() => {\n return getMaxOffset(listSizeByLayout, normalizedItems);\n }, [listSizeByLayout, normalizedItems]);\n\n // Callbacks\n const onScrollCB = useCallback(\n ({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n }: {\n scrollDirection: ScrollDirection;\n scrollOffset: number;\n scrollUpdateWasRequested: boolean;\n }) => {\n scrollTopRef.current = scrollOffset;\n if (!scrollUpdateWasRequested) {\n animationData.scrollOffsetInitial = scrollOffset;\n }\n onScroll && onScroll(scrollDirection, scrollOffset, scrollUpdateWasRequested);\n },\n [onScroll, scrollTopRef, animationData]\n );\n\n const animateScroll = useCallback(() => {\n requestAnimationFrame(() => {\n const now = performance.now();\n const ellapsed = now - animationData.animationStartTime;\n const scrollDelta = animationData.scrollOffsetFinal - animationData.scrollOffsetInitial;\n const easedTime = easeInOutQuint(Math.min(1, ellapsed / scrollDuration));\n const scrollOffset = animationData.scrollOffsetInitial + scrollDelta * easedTime;\n const finalOffsetValue = Math.min(maxListOffset, scrollOffset);\n scrollTopRef.current = finalOffsetValue;\n listRef.current?.scrollTo(finalOffsetValue);\n\n if (ellapsed < scrollDuration) {\n animateScroll();\n } else {\n animationData.animationStartTime = undefined;\n onScrollToFinished && onScrollToFinished();\n }\n });\n }, [scrollDuration, animationData, listRef, maxListOffset, onScrollToFinished]);\n\n const startScrollAnimation = useCallback(\n (item: VirtualizedListItem) => {\n const { offsetTop } = item;\n\n if (animationData.animationStartTime) {\n // animation already in progress\n animationData.scrollOffsetFinal = offsetTop;\n return;\n }\n\n // Update the initial scroll offset with the current scroll position for react 18 batching behavior\n if (listRef.current?.state?.scrollOffset !== null) {\n animationData.scrollOffsetInitial = listRef.current?.state?.scrollOffset;\n }\n\n if (animationData.scrollOffsetInitial === offsetTop) {\n // offset already equals to item offset\n onScrollToFinished && onScrollToFinished();\n return;\n }\n\n animationData.scrollOffsetFinal = offsetTop;\n animationData.animationStartTime = performance.now();\n animateScroll();\n },\n [animationData, animateScroll, onScrollToFinished]\n );\n\n const rowRenderer = useCallback(\n ({ index, style }: { index: number; style: CSSProperties }) => {\n const item = items[index];\n return itemRenderer(item, index, style);\n },\n [items, itemRenderer]\n );\n\n const calcItemSize = useCallback(\n (index: number) => {\n const item = items[index];\n return sizeGetter(item, index);\n },\n [items, sizeGetter]\n );\n\n const updateListSize = useCallback(\n (width: number, height: number) => {\n if (height !== listHeight || width !== listWidth) {\n setTimeout(() => {\n setListHeight(height);\n setListWidth(width);\n onSizeUpdate(width, height);\n }, 0);\n }\n },\n [listHeight, listWidth, onSizeUpdate]\n );\n\n const onItemsRenderedCB = useThrottledCallback(\n ({ visibleStartIndex, visibleStopIndex }: ListOnItemsRenderedProps) => {\n if (!onItemsRendered) return;\n const data = getOnItemsRenderedData(\n items,\n normalizedItems,\n idGetter,\n visibleStartIndex,\n visibleStopIndex,\n listSizeByLayout,\n scrollTopRef.current\n );\n onItemsRendered(data);\n },\n { wait: onItemsRenderedThrottleMs, trailing: true },\n [onItemsRendered, items, normalizedItems, idGetter, listSizeByLayout]\n );\n\n // Effects\n useEffect(() => {\n // scroll to specific item\n if (scrollToId && prevScrollToId !== scrollToId) {\n const hasScrollbar = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n const item = normalizedItems[scrollToId as keyof typeof normalizedItems];\n hasScrollbar && item && startScrollAnimation(item);\n }\n }, [prevScrollToId, scrollToId, startScrollAnimation, normalizedItems, items, idGetter, listSizeByLayout]);\n\n useEffect(() => {\n // recalculate row heights\n if (listRef.current) {\n listRef.current.resetAfterIndex(0);\n }\n }, [normalizedItems]);\n\n useEffect(() => {\n // update vertical scrollbar visibility\n if (onLayoutDirectionScrollbarVisibilityChange) {\n const isVisible = isLayoutDirectionScrollbarVisible(items, normalizedItems, idGetter, listSizeByLayout);\n if (isVerticalScrollbarVisibleRef.current !== isVisible) {\n isVerticalScrollbarVisibleRef.current = isVisible;\n onLayoutDirectionScrollbarVisibilityChange(isVisible);\n }\n }\n }, [onLayoutDirectionScrollbarVisibilityChange, items, normalizedItems, listSizeByLayout, idGetter]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.virtualizedListWrapper, className)}\n id={id}\n role={role}\n aria-label={ariaLabel}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.VIRTUALIZED_LIST, id)}\n style={style}\n >\n <AutoSizer>\n {({ height, width }: { height: number; width: number }) => {\n updateListSize(width, height);\n return (\n <List\n ref={mergedListRef as unknown as LegacyRef<VariableSizeList<unknown>>}\n height={height}\n width={width}\n itemCount={items.length}\n itemSize={calcItemSize}\n onScroll={onScrollCB}\n layout={layout}\n overscanCount={overscanCount}\n onItemsRendered={onItemsRenderedCB}\n className={scrollableClassName}\n >\n {rowRenderer as React.ComponentType<ListChildComponentProps>}\n </List>\n );\n }}\n </AutoSizer>\n </div>\n );\n }\n);\n\nexport default VirtualizedList;\n"],"names":["VirtualizedList","forwardRef","_ref","ref","className","id","_ref$items","items","_ref$itemRenderer","itemRenderer","item","_index","_style","_ref$getItemSize","getItemSize","height","_ref$layout","layout","onScroll","_ref$overscanCount","overscanCount","_ref$getItemId","getItemId","scrollToId","_ref$scrollDuration","scrollDuration","_ref$onScrollToFinish","onScrollToFinished","NOOP","onItemsRendered","_ref$onItemsRenderedT","onItemsRenderedThrottleMs","_ref$onSizeUpdate","onSizeUpdate","_ref$onLayoutDirectio","onLayoutDirectionScrollbarVisibilityChange","virtualListRef","scrollableClassName","role","ariaLabel","style","dataTestId","_useState","useState","_useState2","_slicedToArray","listHeight","setListHeight","_useState3","_useState4","listWidth","setListWidth","isVerticalList","listSizeByLayout","useMemo","prevScrollToId","usePrevious","componentRef","useRef","isVerticalScrollbarVisibleRef","listRef","scrollTopRef","animationDataRef","initialized","scrollOffsetInitial","scrollOffsetFinal","animationStartTime","mergedRef","useMergeRef","mergedListRef","animationData","current","sizeGetter","useCallback","index","undefined","console","error","idGetter","itemId","normalizedItems","getNormalizedItems","maxListOffset","getMaxOffset","onScrollCB","_ref2","scrollDirection","scrollOffset","scrollUpdateWasRequested","animateScroll","requestAnimationFrame","ellapsed","performance","now","scrollDelta","easedTime","easeInOutQuint","Math","min","finalOffsetValue","_a","scrollTo","startScrollAnimation","offsetTop","_b","state","_d","_c","rowRenderer","_ref3","calcItemSize","updateListSize","width","setTimeout","onItemsRenderedCB","useThrottledCallback","_ref4","data","getOnItemsRenderedData","visibleStartIndex","visibleStopIndex","wait","trailing","useEffect","hasScrollbar","isLayoutDirectionScrollbarVisible","resetAfterIndex","isVisible","React","createElement","cx","styles","virtualizedListWrapper","getTestId","ComponentDefaultTestId","VIRTUALIZED_LIST","A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C9EmC,MAAOA,IAEPwF,EAACC,cAAAO,QACE,SAAAC,GAAyD,IAAtD1H,EAAM0H,EAAN1H,OAAQiG,EAAKyB,EAALzB,MAEV,OADAD,GAAeC,EAAOjG,GAEpBiH,gBAACU,EAAI,CACHvI,IAAKkE,GACLtD,OAAQA,EACRiG,MAAOA,EACP2B,UAAWpI,EAAMqI,OACjBC,SAAU/B,GACV5F,SAAUkE,GACVnE,OAAQA,EACRG,cAAeA,EACfS,gBAAiBqF,GACjB9G,UAAWiC,GAEVuE,GAGN,IAIT"}
|
package/dist/mocked_classnames/src/components/VirtualizedList/VirtualizedList.module.scss.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={virtualizedListWrapper:"virtualizedListWrapper"};!function(e){const t="s_id-9250e4cf6c59_4_0_0-
|
|
1
|
+
var e={virtualizedListWrapper:"virtualizedListWrapper"};!function(e){const t="s_id-9250e4cf6c59_4_0_0-alpha_1";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.virtualizedListWrapper {\n height: 100%;\n width: 100%;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=VirtualizedList.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={list:"list"};!function(e){const t="s_id-39e4d9ed645a_4_0_0-
|
|
1
|
+
var e={list:"list"};!function(e){const t="s_id-39e4d9ed645a_4_0_0-alpha_1";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,n.firstChild?n.insertBefore(d,n.firstChild):n.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".list {\n margin: 0;\n padding: 0;\n list-style: none;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=List.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={listTitle:"listTitle",small:"small",medium:"medium",large:"large",sticky:"sticky"};!function(e){const n="s_id-7bd0f1d1374d_4_0_0-
|
|
1
|
+
var e={listTitle:"listTitle",small:"small",medium:"medium",large:"large",sticky:"sticky"};!function(e){const n="s_id-7bd0f1d1374d_4_0_0-alpha_1";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const a=document.createElement("style");a.id=n,t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a),a.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.listTitle {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n border-radius: var(--border-radius-small);\n}\n.small {\n padding: var(--space-16) var(--space-8) var(--space-8);\n}\n.medium {\n padding: var(--space-16) 12px var(--space-8);\n}\n.large {\n padding: var(--space-16) 12px var(--space-8);\n}\n.sticky {\n position: sticky;\n inset-block-start: 0;\n background-color: var(--primary-background-color);\n z-index: 1;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ListTitle.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textManipulations.js","sources":["../../../../src/helpers/textManipulations.ts"],"sourcesContent":["import { convertToArray } from \"../utils/function-utils\";\n\nconst MIN_PRECISION = 0;\nconst MAX_PRECISION = 20;\nconst DEFAULT_LOCAL = \"en-US\";\n\nfunction validateLocalSupported(local: string) {\n let isLocalSupported;\n try {\n const options = { localeMatcher: \"lookup\" as const };\n isLocalSupported = !!Intl.NumberFormat.supportedLocalesOf(convertToArray(local), options).length;\n } catch (err) {\n isLocalSupported = false;\n }\n\n return isLocalSupported;\n}\n\nfunction validatePrecision(precision: number) {\n if (precision < MIN_PRECISION) return MIN_PRECISION;\n if (precision > MAX_PRECISION) return MAX_PRECISION;\n return precision;\n}\n\nexport const formatNumberConsts = Object.freeze({\n MIN_PRECISION,\n MAX_PRECISION,\n DEFAULT_LOCAL\n});\n\nexport function formatNumber(\n value: number,\n {\n local = DEFAULT_LOCAL,\n isCompact = true,\n precision = 2\n }: { local?: Intl.Locale[\"language\"]; isCompact?: boolean; precision?: number } = {}\n) {\n if (value === undefined || value === null) return;\n const isLocalSupported = validateLocalSupported(local);\n const normalizedPrecision = validatePrecision(precision);\n const selectedLocal = isLocalSupported ? local : DEFAULT_LOCAL;\n return new Intl.NumberFormat(selectedLocal, {\n ...(isCompact && { notation: \"compact\" }),\n maximumFractionDigits: normalizedPrecision\n }).format(value);\n}\n"],"names":["MIN_PRECISION","MAX_PRECISION","DEFAULT_LOCAL","formatNumberConsts","Object","freeze","formatNumber","value","_ref","arguments","length","undefined","_ref$local","local","_ref$isCompact","isCompact","_ref$precision","precision","isLocalSupported","Intl","NumberFormat","supportedLocalesOf","convertToArray","localeMatcher","err","validateLocalSupported","normalizedPrecision","validatePrecision","assign","notation","maximumFractionDigits","format"],"mappings":"4DAEA,IAAMA,EAAgB,EAChBC,EAAgB,GAChBC,EAAgB,YAoBTC,EAAqBC,OAAOC,OAAO,CAC9CL,cAAAA,EACAC,cAAAA,EACAC,cAAAA,aAGcI,EACdC,GAKoF,IAAAC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAF,CAAE,EAAAG,EAAAJ,EAHlFK,MAAAA,OAAQX,IAAHU,EAAGV,EAAaU,EAAAE,EAAAN,EACrBO,UAAAA,OAAY,IAAHD,GAAOA,EAAAE,EAAAR,EAChBS,UAAAA,OAAY,IAAHD,EAAG,EAACA,EAGf,GAAIT,QAAJ,CACA,IAAMW,EAjCR,SAAgCL,GAC9B,IAAIK,EACJ,IAEEA,IAAqBC,KAAKC,aAAaC,mBAAmBC,EAAeT,GADzD,CAAEU,cAAe,WACyDb,MAC3F,CAAC,MAAOc,GACPN,GAAmB,
|
|
1
|
+
{"version":3,"file":"textManipulations.js","sources":["../../../../src/helpers/textManipulations.ts"],"sourcesContent":["import { convertToArray } from \"../utils/function-utils\";\n\nconst MIN_PRECISION = 0;\nconst MAX_PRECISION = 20;\nconst DEFAULT_LOCAL = \"en-US\";\n\nfunction validateLocalSupported(local: string) {\n let isLocalSupported;\n try {\n const options = { localeMatcher: \"lookup\" as const };\n isLocalSupported = !!Intl.NumberFormat.supportedLocalesOf(convertToArray(local), options).length;\n } catch (err) {\n isLocalSupported = false;\n }\n\n return isLocalSupported;\n}\n\nfunction validatePrecision(precision: number) {\n if (precision < MIN_PRECISION) return MIN_PRECISION;\n if (precision > MAX_PRECISION) return MAX_PRECISION;\n return precision;\n}\n\nexport const formatNumberConsts = Object.freeze({\n MIN_PRECISION,\n MAX_PRECISION,\n DEFAULT_LOCAL\n});\n\nexport function formatNumber(\n value: number,\n {\n local = DEFAULT_LOCAL,\n isCompact = true,\n precision = 2\n }: { local?: Intl.Locale[\"language\"]; isCompact?: boolean; precision?: number } = {}\n) {\n if (value === undefined || value === null) return;\n const isLocalSupported = validateLocalSupported(local);\n const normalizedPrecision = validatePrecision(precision);\n const selectedLocal = isLocalSupported ? local : DEFAULT_LOCAL;\n return new Intl.NumberFormat(selectedLocal, {\n ...(isCompact && { notation: \"compact\" }),\n maximumFractionDigits: normalizedPrecision\n }).format(value);\n}\n"],"names":["MIN_PRECISION","MAX_PRECISION","DEFAULT_LOCAL","formatNumberConsts","Object","freeze","formatNumber","value","_ref","arguments","length","undefined","_ref$local","local","_ref$isCompact","isCompact","_ref$precision","precision","isLocalSupported","Intl","NumberFormat","supportedLocalesOf","convertToArray","localeMatcher","err","validateLocalSupported","normalizedPrecision","validatePrecision","assign","notation","maximumFractionDigits","format"],"mappings":"4DAEA,IAAMA,EAAgB,EAChBC,EAAgB,GAChBC,EAAgB,YAoBTC,EAAqBC,OAAOC,OAAO,CAC9CL,cAAAA,EACAC,cAAAA,EACAC,cAAAA,aAGcI,EACdC,GAKoF,IAAAC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAF,CAAE,EAAAG,EAAAJ,EAHlFK,MAAAA,OAAQX,IAAHU,EAAGV,EAAaU,EAAAE,EAAAN,EACrBO,UAAAA,OAAY,IAAHD,GAAOA,EAAAE,EAAAR,EAChBS,UAAAA,OAAY,IAAHD,EAAG,EAACA,EAGf,GAAIT,QAAJ,CACA,IAAMW,EAjCR,SAAgCL,GAC9B,IAAIK,EACJ,IAEEA,IAAqBC,KAAKC,aAAaC,mBAAmBC,EAAeT,GADzD,CAAEU,cAAe,WACyDb,MAC3F,CAAC,MAAOc,GACPN,GAAmB,CACrB,CAEA,OAAOA,CACT,CAuB2BO,CAAuBZ,GAC1Ca,EAtBR,SAA2BT,GACzB,OAAgBjB,EAAZiB,EAAkCjB,EAClCiB,EAAYhB,EAAsBA,EAC/BgB,CACT,CAkB8BU,CAAkBV,GAE9C,OAAO,IAAIE,KAAKC,aADMF,EAAmBL,EAAQX,EACPE,OAAAwB,OAAAxB,OAAAwB,OAAA,CAAA,EACpCb,GAAa,CAAEc,SAAU,YAC7B,CAAAC,sBAAuBJ,KACtBK,OAAOxB,EAPiC,CAQ7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveDescendantListFocusHelpers.js","sources":["../../../../../src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHelpers.ts"],"sourcesContent":["type ActiveDependentHelper = {\n isItemSelectable: (index: number) => boolean;\n visualFocusItemIndex: number;\n itemsCount: number;\n};\n\nexport function getNextSelectableIndex({ isItemSelectable, visualFocusItemIndex, itemsCount }: ActiveDependentHelper) {\n if (visualFocusItemIndex > itemsCount - 1) return;\n // Go over all the next items until found one which is selectable\n for (let offset = 1; offset <= itemsCount; offset++) {\n const nextIndex = (visualFocusItemIndex + offset) % itemsCount;\n if (isItemSelectable(nextIndex)) {\n return nextIndex;\n }\n }\n}\nexport function getPreviousSelectableIndex({\n isItemSelectable,\n visualFocusItemIndex,\n itemsCount\n}: ActiveDependentHelper) {\n for (let offset = 1; offset <= itemsCount - 1; offset++) {\n let prevIndex = visualFocusItemIndex - offset;\n if (prevIndex < 0) {\n prevIndex = itemsCount + prevIndex;\n }\n if (isItemSelectable(prevIndex)) {\n return prevIndex;\n }\n }\n}\n"],"names":["getNextSelectableIndex","_ref","isItemSelectable","visualFocusItemIndex","itemsCount","offset","nextIndex","getPreviousSelectableIndex","_ref2","prevIndex"],"mappings":"AAMM,SAAUA,EAAsBC,GAA8E,IAA3EC,EAAgBD,EAAhBC,iBAAkBC,EAAoBF,EAApBE,qBAAsBC,EAAUH,EAAVG,WAC/E,GAA2BA,EAAa,GAApCD,EAEJ,IAAK,IAAIE,EAAS,EAAaD,GAAVC,EAAsBA,IAAU,CACnD,IAAMC,GAAaH,EAAuBE,GAAUD,EACpD,GAAIF,EAAiBI,GACnB,OAAOA,
|
|
1
|
+
{"version":3,"file":"useActiveDescendantListFocusHelpers.js","sources":["../../../../../src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHelpers.ts"],"sourcesContent":["type ActiveDependentHelper = {\n isItemSelectable: (index: number) => boolean;\n visualFocusItemIndex: number;\n itemsCount: number;\n};\n\nexport function getNextSelectableIndex({ isItemSelectable, visualFocusItemIndex, itemsCount }: ActiveDependentHelper) {\n if (visualFocusItemIndex > itemsCount - 1) return;\n // Go over all the next items until found one which is selectable\n for (let offset = 1; offset <= itemsCount; offset++) {\n const nextIndex = (visualFocusItemIndex + offset) % itemsCount;\n if (isItemSelectable(nextIndex)) {\n return nextIndex;\n }\n }\n}\nexport function getPreviousSelectableIndex({\n isItemSelectable,\n visualFocusItemIndex,\n itemsCount\n}: ActiveDependentHelper) {\n for (let offset = 1; offset <= itemsCount - 1; offset++) {\n let prevIndex = visualFocusItemIndex - offset;\n if (prevIndex < 0) {\n prevIndex = itemsCount + prevIndex;\n }\n if (isItemSelectable(prevIndex)) {\n return prevIndex;\n }\n }\n}\n"],"names":["getNextSelectableIndex","_ref","isItemSelectable","visualFocusItemIndex","itemsCount","offset","nextIndex","getPreviousSelectableIndex","_ref2","prevIndex"],"mappings":"AAMM,SAAUA,EAAsBC,GAA8E,IAA3EC,EAAgBD,EAAhBC,iBAAkBC,EAAoBF,EAApBE,qBAAsBC,EAAUH,EAAVG,WAC/E,GAA2BA,EAAa,GAApCD,EAEJ,IAAK,IAAIE,EAAS,EAAaD,GAAVC,EAAsBA,IAAU,CACnD,IAAMC,GAAaH,EAAuBE,GAAUD,EACpD,GAAIF,EAAiBI,GACnB,OAAOA,CAEX,CACF,CACM,SAAUC,EAA0BC,GAKxC,IADsB,IAHtBN,EAAgBM,EAAhBN,iBACAC,EAAoBK,EAApBL,qBACAC,EAAUI,EAAVJ,WAESC,EAAS,EAAaD,EAAa,GAAvBC,EAA0BA,IAAU,CACvD,IAAII,EAAYN,EAAuBE,EAIvC,GAHgB,EAAZI,IACFA,EAAYL,EAAaK,GAEvBP,EAAiBO,GACnB,OAAOA,CAEX,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActiveDescendantListFocusHooks.js","sources":["../../../../../src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.ts"],"sourcesContent":["import { type MutableRefObject } from \"react\";\nimport type React from \"react\";\nimport { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport useKeyEvent, { type UseKeyEventArgs } from \"../useKeyEvent\";\nimport useEventListener from \"../useEventListener\";\nimport usePrevious from \"../usePrevious\";\nimport { getNextSelectableIndex, getPreviousSelectableIndex } from \"./useActiveDescendantListFocusHelpers\";\nimport useListenFocusTriggers from \"../useListenFocusTriggers\";\n\nenum ArrowDirection {\n UP = \"ArrowUp\",\n DOWN = \"ArrowDown\",\n RIGHT = \"ArrowRight\",\n LEFT = \"ArrowLeft\"\n}\n\nconst ENTER_KEY = \"Enter\";\nconst SPACE_KEY = \" \";\n\nexport function useSupportArrowsKeyboardNavigation({\n itemsCount,\n focusedElementRef,\n visualFocusItemIndex,\n setVisualFocusItemIndex,\n isHorizontalList,\n isItemSelectable,\n listenerOptions,\n triggeredByKeyboard\n}: {\n itemsCount: number;\n focusedElementRef: MutableRefObject<HTMLElement>;\n visualFocusItemIndex: number;\n setVisualFocusItemIndex: (index: number) => void;\n isHorizontalList: boolean;\n isItemSelectable: (index: number) => boolean;\n triggeredByKeyboard: MutableRefObject<boolean>;\n listenerOptions: Omit<UseKeyEventArgs, \"keys\" | \"callback\">;\n}) {\n const nextArrow = isHorizontalList ? ArrowDirection.RIGHT : ArrowDirection.DOWN;\n const backArrow = isHorizontalList ? ArrowDirection.LEFT : ArrowDirection.UP;\n\n const onArrowKeyEvent = useCallback(\n (direction: ArrowDirection) => {\n // we desire to change the visual focus item only if the user pressed on the keyboard arrows keys while\n // the focusedElementRef is naturally focus\n if (document.activeElement !== focusedElementRef.current) {\n return;\n }\n\n // If the focusedElementRef is naturally focus but this is the first keyboard interaction of the user, we will mark future user interactions as trigger by keyboard (until the next mouse interaction)\n // that from now on the interactions are trigger by keyboard (until the next mouse interaction)\n if (!triggeredByKeyboard.current) {\n triggeredByKeyboard.current = true;\n\n // If the focusedElementRef is naturally focus but this is the first keyboard interaction of the user, we want only to display the item\n // which right now visually focus without changing it.\n if (visualFocusItemIndex > -1) {\n return;\n }\n }\n\n let newIndex;\n\n // We will change the visual focused item index according to the direction of the pressed arrow\n if (direction === nextArrow) {\n newIndex = getNextSelectableIndex({ isItemSelectable, visualFocusItemIndex, itemsCount });\n } else if (direction === backArrow) {\n newIndex = getPreviousSelectableIndex({ isItemSelectable, visualFocusItemIndex, itemsCount });\n }\n\n if (newIndex > -1 && newIndex !== visualFocusItemIndex) setVisualFocusItemIndex(newIndex);\n },\n [\n focusedElementRef,\n triggeredByKeyboard,\n nextArrow,\n backArrow,\n visualFocusItemIndex,\n setVisualFocusItemIndex,\n isItemSelectable,\n itemsCount\n ]\n );\n const onArrowBack = useCallback(() => {\n onArrowKeyEvent(backArrow);\n }, [backArrow, onArrowKeyEvent]);\n\n const onArrowNext = useCallback(() => {\n onArrowKeyEvent(nextArrow);\n }, [nextArrow, onArrowKeyEvent]);\n\n useKeyEvent({\n keys: [nextArrow],\n callback: onArrowNext,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: [backArrow],\n callback: onArrowBack,\n ...listenerOptions\n });\n}\n\nexport function useSupportPressItemKeyboardNavigation({\n visualFocusItemIndex,\n focusedElementRef,\n itemsCount,\n setVisualFocusItemIndex,\n onItemClick,\n isItemSelectable,\n listenerOptions = undefined,\n isIgnoreSpaceAsItemSelection = false\n}: {\n visualFocusItemIndex: number;\n focusedElementRef: MutableRefObject<HTMLElement>;\n itemsCount: number;\n setVisualFocusItemIndex: (index: number) => void;\n onItemClick: (event: React.MouseEvent | React.KeyboardEvent, index: number) => void;\n isItemSelectable: (index: number) => boolean;\n listenerOptions: Omit<UseKeyEventArgs, \"keys\" | \"callback\">;\n isIgnoreSpaceAsItemSelection: boolean;\n}) {\n const pressKeys = useMemo(\n () => (isIgnoreSpaceAsItemSelection ? [ENTER_KEY] : [ENTER_KEY, SPACE_KEY]),\n [isIgnoreSpaceAsItemSelection]\n );\n\n const baseOnClickCallback = useCallback(\n (event: React.KeyboardEvent, itemIndex: number) => {\n const hasValidIndex = itemIndex >= 0 && itemIndex < itemsCount;\n if (!onItemClick || !hasValidIndex || !isItemSelectable(itemIndex)) return;\n if (visualFocusItemIndex !== itemIndex) setVisualFocusItemIndex(itemIndex);\n onItemClick(event, itemIndex);\n },\n [itemsCount, onItemClick, isItemSelectable, visualFocusItemIndex, setVisualFocusItemIndex]\n );\n\n const keyboardOnSelectCallback = useCallback(\n (event: React.KeyboardEvent) => {\n // we desire to change the trigger the active item on click callback only if the user pressed on the keyboard arrows keys while\n // the focusedElementRef is naturally focus\n if (focusedElementRef.current.contains(document.activeElement)) {\n baseOnClickCallback(event, visualFocusItemIndex);\n }\n },\n [baseOnClickCallback, focusedElementRef, visualFocusItemIndex]\n );\n\n useKeyEvent({\n keys: pressKeys,\n callback: keyboardOnSelectCallback,\n ...listenerOptions\n });\n}\n\nexport function useCleanVisualFocusOnBlur({\n focusedElementRef,\n visualFocusItemIndex,\n setVisualFocusItemIndex\n}: {\n focusedElementRef: MutableRefObject<HTMLElement>;\n visualFocusItemIndex: number;\n setVisualFocusItemIndex: (index: number) => void;\n}) {\n const previousFocusedElementRef = usePrevious(focusedElementRef);\n\n const onBlurCallback = useCallback(() => {\n if (visualFocusItemIndex !== -1) {\n setVisualFocusItemIndex(-1);\n }\n }, [setVisualFocusItemIndex, visualFocusItemIndex]);\n\n // if element unmount act like element got blur event\n useEffect(() => {\n // if element unmount\n if (focusedElementRef?.current === null && previousFocusedElementRef?.current !== null) {\n onBlurCallback();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [focusedElementRef.current, previousFocusedElementRef, onBlurCallback]);\n\n useEventListener({\n eventName: \"blur\",\n ref: focusedElementRef,\n callback: onBlurCallback\n });\n}\n\nexport function useSetDefaultItemOnFocusEvent({\n focusedElementRef,\n isItemSelectable,\n visualFocusItemIndex,\n setVisualFocusItemIndex,\n itemsCount,\n defaultVisualFocusItemIndex = -1\n}: {\n focusedElementRef: MutableRefObject<HTMLElement>;\n isItemSelectable: (index: number) => boolean;\n visualFocusItemIndex: number;\n setVisualFocusItemIndex: (index: number) => void;\n itemsCount: number;\n defaultVisualFocusItemIndex: number;\n}) {\n const triggeredByKeyboard = useRef(false);\n\n const onFocusByKeyboard = useCallback(() => {\n triggeredByKeyboard.current = true;\n if (visualFocusItemIndex !== defaultVisualFocusItemIndex) {\n let newVisualFocusIndex;\n if (isItemSelectable(defaultVisualFocusItemIndex)) {\n newVisualFocusIndex = defaultVisualFocusItemIndex;\n } else {\n newVisualFocusIndex = getNextSelectableIndex({\n isItemSelectable,\n itemsCount,\n visualFocusItemIndex: defaultVisualFocusItemIndex\n });\n }\n setVisualFocusItemIndex(newVisualFocusIndex);\n }\n }, [\n defaultVisualFocusItemIndex,\n isItemSelectable,\n itemsCount,\n setVisualFocusItemIndex,\n triggeredByKeyboard,\n visualFocusItemIndex\n ]);\n const onFocusByMouse = useCallback(() => {\n triggeredByKeyboard.current = false;\n }, [triggeredByKeyboard]);\n useListenFocusTriggers({ ref: focusedElementRef, onFocusByKeyboard, onFocusByMouse });\n\n return { triggeredByKeyboard };\n}\n\nexport function useKeepFocusOnItemWhenListChanged({\n visualFocusItemIndex,\n itemsIds,\n isItemSelectable,\n setVisualFocusItemIndex\n}: {\n visualFocusItemIndex: number;\n itemsIds: string[];\n isItemSelectable: (index: number) => boolean;\n setVisualFocusItemIndex: (index: number) => void;\n}) {\n const prevItemIds = usePrevious(itemsIds);\n\n // When item list changed, keep the focus on the same item\n useEffect(() => {\n // When the list is changing the index of the focused item is point to a different item then before and\n // this is why we want to search for the new index of the item and change the index to point to it.\n let overrideIndexAfterListChanged;\n const isListChanged = prevItemIds !== undefined && prevItemIds !== itemsIds;\n if (isListChanged && prevItemIds !== undefined && visualFocusItemIndex !== -1) {\n const focusedItemId = prevItemIds[visualFocusItemIndex];\n overrideIndexAfterListChanged = itemsIds.indexOf(focusedItemId);\n } else {\n overrideIndexAfterListChanged = visualFocusItemIndex;\n }\n\n if (overrideIndexAfterListChanged !== visualFocusItemIndex) {\n if (isItemSelectable(overrideIndexAfterListChanged)) {\n setVisualFocusItemIndex(overrideIndexAfterListChanged);\n } else {\n const closestSelectableIndex = getNextSelectableIndex({\n isItemSelectable,\n visualFocusItemIndex: overrideIndexAfterListChanged,\n itemsCount: itemsIds.length\n });\n setVisualFocusItemIndex(closestSelectableIndex);\n }\n }\n }, [visualFocusItemIndex, itemsIds, isItemSelectable, setVisualFocusItemIndex, prevItemIds]);\n}\n"],"names":["ArrowDirection","ENTER_KEY","useSupportArrowsKeyboardNavigation","_ref","itemsCount","focusedElementRef","visualFocusItemIndex","setVisualFocusItemIndex","isHorizontalList","isItemSelectable","listenerOptions","triggeredByKeyboard","nextArrow","RIGHT","DOWN","backArrow","LEFT","UP","onArrowKeyEvent","useCallback","direction","newIndex","document","activeElement","current","getNextSelectableIndex","getPreviousSelectableIndex","onArrowBack","onArrowNext","useKeyEvent","Object","assign","keys","callback","useSupportPressItemKeyboardNavigation","_ref2","onItemClick","_ref2$listenerOptions","undefined","_ref2$isIgnoreSpaceAs","isIgnoreSpaceAsItemSelection","pressKeys","useMemo","baseOnClickCallback","event","itemIndex","keyboardOnSelectCallback","contains","useCleanVisualFocusOnBlur","_ref3","previousFocusedElementRef","usePrevious","onBlurCallback","useEffect","useEventListener","eventName","ref","useSetDefaultItemOnFocusEvent","_ref4","_ref4$defaultVisualFo","defaultVisualFocusItemIndex","useRef","onFocusByKeyboard","newVisualFocusIndex","onFocusByMouse","useListenFocusTriggers","useKeepFocusOnItemWhenListChanged","_ref5","itemsIds","prevItemIds","overrideIndexAfterListChanged","indexOf","closestSelectableIndex","length"],"mappings":"0WASA,IAAKA,GAAL,SAAKA,GACHA,EAAA,GAAA,UACAA,EAAA,KAAA,YACAA,EAAA,MAAA,aACAA,EAAA,KAAA,WACD,CALD,CAAKA,IAAAA,EAKJ,CAAA,IAED,IAAMC,EAAY,iBAGFC,EAAkCC,GAkBjD,IAjBCC,EAAUD,EAAVC,WACAC,EAAiBF,EAAjBE,kBACAC,EAAoBH,EAApBG,qBACAC,EAAuBJ,EAAvBI,wBACAC,EAAgBL,EAAhBK,iBACAC,EAAgBN,EAAhBM,iBACAC,EAAeP,EAAfO,gBACAC,EAAmBR,EAAnBQ,oBAWMC,EAAYJ,EAAmBR,EAAea,MAAQb,EAAec,KACrEC,EAAYP,EAAmBR,EAAegB,KAAOhB,EAAeiB,GAEpEC,EAAkBC,GACtB,SAACC,GAmBC,IAAIC,EAhBAC,SAASC,gBAAkBlB,EAAkBmB,WAM5Cb,EAAoBa,UACvBb,EAAoBa,SAAU,EAI1BlB,GAAwB,KAQ1Bc,IAAcR,EAChBS,EAAW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,EAAQD,EAARC,SACA3D,EAAgB0D,EAAhB1D,iBACAF,EAAuB4D,EAAvB5D,wBAOM8D,EAAclB,EAAYiB,GAGhCf,GAAU,WAGR,IAAIiB,OACkChC,IAAhB+B,GAA6BA,IAAgBD,QAC9B9B,IAAhB+B,IAAuD,IAA1B/D,EAEhDgE,EAAgCF,EAASG,QADnBF,EAAY/D,IAGlCgE,EAAgChE,EAGlC,GAAIgE,IAAkChE,EACpC,GAAIG,EAAiB6D,GACnB/D,EAAwB+D,OACnB,CACL,IAAME,EAAyB/C,EAAuB,CACpDhB,iBAAAA,EACAH,qBAAsBgE,EACtBlE,WAAYgE,EAASK,SAEvBlE,EAAwBiE,EACzB,CAEL,GAAG,CAAClE,EAAsB8D,EAAU3D,EAAkBF,EAAyB8D,GACjF"}
|
|
1
|
+
{"version":3,"file":"useActiveDescendantListFocusHooks.js","sources":["../../../../../src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.ts"],"sourcesContent":["import { type MutableRefObject } from \"react\";\nimport type React from \"react\";\nimport { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport useKeyEvent, { type UseKeyEventArgs } from \"../useKeyEvent\";\nimport useEventListener from \"../useEventListener\";\nimport usePrevious from \"../usePrevious\";\nimport { getNextSelectableIndex, getPreviousSelectableIndex } from \"./useActiveDescendantListFocusHelpers\";\nimport useListenFocusTriggers from \"../useListenFocusTriggers\";\n\nenum ArrowDirection {\n UP = \"ArrowUp\",\n DOWN = \"ArrowDown\",\n RIGHT = \"ArrowRight\",\n LEFT = \"ArrowLeft\"\n}\n\nconst ENTER_KEY = \"Enter\";\nconst SPACE_KEY = \" \";\n\nexport function useSupportArrowsKeyboardNavigation({\n itemsCount,\n focusedElementRef,\n visualFocusItemIndex,\n setVisualFocusItemIndex,\n isHorizontalList,\n isItemSelectable,\n listenerOptions,\n triggeredByKeyboard\n}: {\n itemsCount: number;\n focusedElementRef: MutableRefObject<HTMLElement>;\n visualFocusItemIndex: number;\n setVisualFocusItemIndex: (index: number) => void;\n isHorizontalList: boolean;\n isItemSelectable: (index: number) => boolean;\n triggeredByKeyboard: MutableRefObject<boolean>;\n listenerOptions: Omit<UseKeyEventArgs, \"keys\" | \"callback\">;\n}) {\n const nextArrow = isHorizontalList ? ArrowDirection.RIGHT : ArrowDirection.DOWN;\n const backArrow = isHorizontalList ? ArrowDirection.LEFT : ArrowDirection.UP;\n\n const onArrowKeyEvent = useCallback(\n (direction: ArrowDirection) => {\n // we desire to change the visual focus item only if the user pressed on the keyboard arrows keys while\n // the focusedElementRef is naturally focus\n if (document.activeElement !== focusedElementRef.current) {\n return;\n }\n\n // If the focusedElementRef is naturally focus but this is the first keyboard interaction of the user, we will mark future user interactions as trigger by keyboard (until the next mouse interaction)\n // that from now on the interactions are trigger by keyboard (until the next mouse interaction)\n if (!triggeredByKeyboard.current) {\n triggeredByKeyboard.current = true;\n\n // If the focusedElementRef is naturally focus but this is the first keyboard interaction of the user, we want only to display the item\n // which right now visually focus without changing it.\n if (visualFocusItemIndex > -1) {\n return;\n }\n }\n\n let newIndex;\n\n // We will change the visual focused item index according to the direction of the pressed arrow\n if (direction === nextArrow) {\n newIndex = getNextSelectableIndex({ isItemSelectable, visualFocusItemIndex, itemsCount });\n } else if (direction === backArrow) {\n newIndex = getPreviousSelectableIndex({ isItemSelectable, visualFocusItemIndex, itemsCount });\n }\n\n if (newIndex > -1 && newIndex !== visualFocusItemIndex) setVisualFocusItemIndex(newIndex);\n },\n [\n focusedElementRef,\n triggeredByKeyboard,\n nextArrow,\n backArrow,\n visualFocusItemIndex,\n setVisualFocusItemIndex,\n isItemSelectable,\n itemsCount\n ]\n );\n const onArrowBack = useCallback(() => {\n onArrowKeyEvent(backArrow);\n }, [backArrow, onArrowKeyEvent]);\n\n const onArrowNext = useCallback(() => {\n onArrowKeyEvent(nextArrow);\n }, [nextArrow, onArrowKeyEvent]);\n\n useKeyEvent({\n keys: [nextArrow],\n callback: onArrowNext,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: [backArrow],\n callback: onArrowBack,\n ...listenerOptions\n });\n}\n\nexport function useSupportPressItemKeyboardNavigation({\n visualFocusItemIndex,\n focusedElementRef,\n itemsCount,\n setVisualFocusItemIndex,\n onItemClick,\n isItemSelectable,\n listenerOptions = undefined,\n isIgnoreSpaceAsItemSelection = false\n}: {\n visualFocusItemIndex: number;\n focusedElementRef: MutableRefObject<HTMLElement>;\n itemsCount: number;\n setVisualFocusItemIndex: (index: number) => void;\n onItemClick: (event: React.MouseEvent | React.KeyboardEvent, index: number) => void;\n isItemSelectable: (index: number) => boolean;\n listenerOptions: Omit<UseKeyEventArgs, \"keys\" | \"callback\">;\n isIgnoreSpaceAsItemSelection: boolean;\n}) {\n const pressKeys = useMemo(\n () => (isIgnoreSpaceAsItemSelection ? [ENTER_KEY] : [ENTER_KEY, SPACE_KEY]),\n [isIgnoreSpaceAsItemSelection]\n );\n\n const baseOnClickCallback = useCallback(\n (event: React.KeyboardEvent, itemIndex: number) => {\n const hasValidIndex = itemIndex >= 0 && itemIndex < itemsCount;\n if (!onItemClick || !hasValidIndex || !isItemSelectable(itemIndex)) return;\n if (visualFocusItemIndex !== itemIndex) setVisualFocusItemIndex(itemIndex);\n onItemClick(event, itemIndex);\n },\n [itemsCount, onItemClick, isItemSelectable, visualFocusItemIndex, setVisualFocusItemIndex]\n );\n\n const keyboardOnSelectCallback = useCallback(\n (event: React.KeyboardEvent) => {\n // we desire to change the trigger the active item on click callback only if the user pressed on the keyboard arrows keys while\n // the focusedElementRef is naturally focus\n if (focusedElementRef.current.contains(document.activeElement)) {\n baseOnClickCallback(event, visualFocusItemIndex);\n }\n },\n [baseOnClickCallback, focusedElementRef, visualFocusItemIndex]\n );\n\n useKeyEvent({\n keys: pressKeys,\n callback: keyboardOnSelectCallback,\n ...listenerOptions\n });\n}\n\nexport function useCleanVisualFocusOnBlur({\n focusedElementRef,\n visualFocusItemIndex,\n setVisualFocusItemIndex\n}: {\n focusedElementRef: MutableRefObject<HTMLElement>;\n visualFocusItemIndex: number;\n setVisualFocusItemIndex: (index: number) => void;\n}) {\n const previousFocusedElementRef = usePrevious(focusedElementRef);\n\n const onBlurCallback = useCallback(() => {\n if (visualFocusItemIndex !== -1) {\n setVisualFocusItemIndex(-1);\n }\n }, [setVisualFocusItemIndex, visualFocusItemIndex]);\n\n // if element unmount act like element got blur event\n useEffect(() => {\n // if element unmount\n if (focusedElementRef?.current === null && previousFocusedElementRef?.current !== null) {\n onBlurCallback();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [focusedElementRef.current, previousFocusedElementRef, onBlurCallback]);\n\n useEventListener({\n eventName: \"blur\",\n ref: focusedElementRef,\n callback: onBlurCallback\n });\n}\n\nexport function useSetDefaultItemOnFocusEvent({\n focusedElementRef,\n isItemSelectable,\n visualFocusItemIndex,\n setVisualFocusItemIndex,\n itemsCount,\n defaultVisualFocusItemIndex = -1\n}: {\n focusedElementRef: MutableRefObject<HTMLElement>;\n isItemSelectable: (index: number) => boolean;\n visualFocusItemIndex: number;\n setVisualFocusItemIndex: (index: number) => void;\n itemsCount: number;\n defaultVisualFocusItemIndex: number;\n}) {\n const triggeredByKeyboard = useRef(false);\n\n const onFocusByKeyboard = useCallback(() => {\n triggeredByKeyboard.current = true;\n if (visualFocusItemIndex !== defaultVisualFocusItemIndex) {\n let newVisualFocusIndex;\n if (isItemSelectable(defaultVisualFocusItemIndex)) {\n newVisualFocusIndex = defaultVisualFocusItemIndex;\n } else {\n newVisualFocusIndex = getNextSelectableIndex({\n isItemSelectable,\n itemsCount,\n visualFocusItemIndex: defaultVisualFocusItemIndex\n });\n }\n setVisualFocusItemIndex(newVisualFocusIndex);\n }\n }, [\n defaultVisualFocusItemIndex,\n isItemSelectable,\n itemsCount,\n setVisualFocusItemIndex,\n triggeredByKeyboard,\n visualFocusItemIndex\n ]);\n const onFocusByMouse = useCallback(() => {\n triggeredByKeyboard.current = false;\n }, [triggeredByKeyboard]);\n useListenFocusTriggers({ ref: focusedElementRef, onFocusByKeyboard, onFocusByMouse });\n\n return { triggeredByKeyboard };\n}\n\nexport function useKeepFocusOnItemWhenListChanged({\n visualFocusItemIndex,\n itemsIds,\n isItemSelectable,\n setVisualFocusItemIndex\n}: {\n visualFocusItemIndex: number;\n itemsIds: string[];\n isItemSelectable: (index: number) => boolean;\n setVisualFocusItemIndex: (index: number) => void;\n}) {\n const prevItemIds = usePrevious(itemsIds);\n\n // When item list changed, keep the focus on the same item\n useEffect(() => {\n // When the list is changing the index of the focused item is point to a different item then before and\n // this is why we want to search for the new index of the item and change the index to point to it.\n let overrideIndexAfterListChanged;\n const isListChanged = prevItemIds !== undefined && prevItemIds !== itemsIds;\n if (isListChanged && prevItemIds !== undefined && visualFocusItemIndex !== -1) {\n const focusedItemId = prevItemIds[visualFocusItemIndex];\n overrideIndexAfterListChanged = itemsIds.indexOf(focusedItemId);\n } else {\n overrideIndexAfterListChanged = visualFocusItemIndex;\n }\n\n if (overrideIndexAfterListChanged !== visualFocusItemIndex) {\n if (isItemSelectable(overrideIndexAfterListChanged)) {\n setVisualFocusItemIndex(overrideIndexAfterListChanged);\n } else {\n const closestSelectableIndex = getNextSelectableIndex({\n isItemSelectable,\n visualFocusItemIndex: overrideIndexAfterListChanged,\n itemsCount: itemsIds.length\n });\n setVisualFocusItemIndex(closestSelectableIndex);\n }\n }\n }, [visualFocusItemIndex, itemsIds, isItemSelectable, setVisualFocusItemIndex, prevItemIds]);\n}\n"],"names":["ArrowDirection","ENTER_KEY","useSupportArrowsKeyboardNavigation","_ref","itemsCount","focusedElementRef","visualFocusItemIndex","setVisualFocusItemIndex","isHorizontalList","isItemSelectable","listenerOptions","triggeredByKeyboard","nextArrow","RIGHT","DOWN","backArrow","LEFT","UP","onArrowKeyEvent","useCallback","direction","newIndex","document","activeElement","current","getNextSelectableIndex","getPreviousSelectableIndex","onArrowBack","onArrowNext","useKeyEvent","Object","assign","keys","callback","useSupportPressItemKeyboardNavigation","_ref2","onItemClick","_ref2$listenerOptions","undefined","_ref2$isIgnoreSpaceAs","isIgnoreSpaceAsItemSelection","pressKeys","useMemo","baseOnClickCallback","event","itemIndex","keyboardOnSelectCallback","contains","useCleanVisualFocusOnBlur","_ref3","previousFocusedElementRef","usePrevious","onBlurCallback","useEffect","useEventListener","eventName","ref","useSetDefaultItemOnFocusEvent","_ref4","_ref4$defaultVisualFo","defaultVisualFocusItemIndex","useRef","onFocusByKeyboard","newVisualFocusIndex","onFocusByMouse","useListenFocusTriggers","useKeepFocusOnItemWhenListChanged","_ref5","itemsIds","prevItemIds","overrideIndexAfterListChanged","indexOf","closestSelectableIndex","length"],"mappings":"0WASA,IAAKA,GAAL,SAAKA,GACHA,EAAA,GAAA,UACAA,EAAA,KAAA,YACAA,EAAA,MAAA,aACAA,EAAA,KAAA,WACD,CALD,CAAKA,IAAAA,EAKJ,CAAA,IAED,IAAMC,EAAY,iBAGFC,EAAkCC,GAkBjD,IAjBCC,EAAUD,EAAVC,WACAC,EAAiBF,EAAjBE,kBACAC,EAAoBH,EAApBG,qBACAC,EAAuBJ,EAAvBI,wBACAC,EAAgBL,EAAhBK,iBACAC,EAAgBN,EAAhBM,iBACAC,EAAeP,EAAfO,gBACAC,EAAmBR,EAAnBQ,oBAWMC,EAAYJ,EAAmBR,EAAea,MAAQb,EAAec,KACrEC,EAAYP,EAAmBR,EAAegB,KAAOhB,EAAeiB,GAEpEC,EAAkBC,GACtB,SAACC,GAmBC,IAAIC,EAhBAC,SAASC,gBAAkBlB,EAAkBmB,WAM5Cb,EAAoBa,UACvBb,EAAoBa,SAAU,EAI1BlB,GAAwB,KAQ1Bc,IAAcR,EAChBS,EAAWI,EAAuB,CAAEhB,iBAAAA,EAAkBH,qBAAAA,EAAsBF,WAAAA,IACnEgB,IAAcL,IACvBM,EAAWK,EAA2B,CAAEjB,iBAAAA,EAAkBH,qBAAAA,EAAsBF,WAAAA,KAG9EiB,GAAY,GAAKA,IAAaf,GAAsBC,EAAwBc,IAClF,GACA,CACEhB,EACAM,EACAC,EACAG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,IAGlCgE,EAAgChE,EAGlC,GAAIgE,IAAkChE,EACpC,GAAIG,EAAiB6D,GACnB/D,EAAwB+D,OACnB,CACL,IAAME,EAAyB/C,EAAuB,CACpDhB,iBAAAA,EACAH,qBAAsBgE,EACtBlE,WAAYgE,EAASK,SAEvBlE,EAAwBiE,EAC1B,CAEJ,GAAG,CAAClE,EAAsB8D,EAAU3D,EAAkBF,EAAyB8D,GACjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useElementsOverflowingIndex.js","sources":["../../../../src/hooks/useElementsOverflowingIndex.ts"],"sourcesContent":["import { type ReactNode, type RefObject, useCallback, useEffect, useState } from \"react\";\nimport { last } from \"es-toolkit\";\nimport { useResizeObserver } from \"@vibe/hooks\";\n\n// Use this hook when you want to get the index of the child which should be hidden from\ntype AggregatedChildResult = { childLength: number; totalLength: number };\n\nfunction useElementsOverflowingIndex({\n ref,\n children,\n paddingSize,\n resizeDebounceTime,\n ignoreLast\n}: {\n ref: RefObject<HTMLElement>;\n children: ReactNode;\n paddingSize: number;\n resizeDebounceTime: number;\n ignoreLast: boolean;\n}) {\n const [size, setSize] = useState<number>(null);\n\n const onResize = useCallback(\n ({ borderBoxSize }: { borderBoxSize: ResizeObserverSize }) => {\n setSize(borderBoxSize.inlineSize);\n },\n [setSize]\n );\n useResizeObserver({\n ref,\n callback: onResize,\n debounceTime: resizeDebounceTime\n });\n\n const [aggregatedChildLengths, setAggregatedChildLengths] = useState<Array<AggregatedChildResult>>([]);\n const [indexToSplit, setIndexToSplit] = useState<number | null>(null);\n\n useEffect(() => {\n if (ignoreLast) {\n const withoutLast = aggregatedChildLengths.slice(0, -1);\n const allInWithoutLast = !withoutLast.find(({ totalLength }) => totalLength > size - paddingSize);\n if (allInWithoutLast) {\n setIndexToSplit(-1);\n } else {\n const lastSize = aggregatedChildLengths.length > 0 ? last(aggregatedChildLengths).childLength : 0;\n setIndexToSplit(\n aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize - lastSize)\n );\n }\n } else {\n setIndexToSplit(aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize));\n }\n }, [aggregatedChildLengths, size, setIndexToSplit, paddingSize, ignoreLast]);\n\n useEffect(() => {\n if (!ref.current) return;\n const childLengthsArray: Array<AggregatedChildResult> = [];\n let totalLength = 0;\n ref.current.childNodes.forEach((node: HTMLElement) => {\n const childLength = node.clientWidth;\n totalLength += childLength;\n childLengthsArray.push({ childLength, totalLength });\n });\n setAggregatedChildLengths(childLengthsArray);\n }, [children, ref, setAggregatedChildLengths]);\n\n return indexToSplit;\n}\n\nexport default useElementsOverflowingIndex;\n"],"names":["useElementsOverflowingIndex","_ref","ref","children","paddingSize","resizeDebounceTime","ignoreLast","_useState","useState","_useState2","_slicedToArray","size","setSize","onResize","useCallback","_ref2","borderBoxSize","inlineSize","useResizeObserver","callback","debounceTime","_useState3","_useState4","aggregatedChildLengths","setAggregatedChildLengths","_useState5","_useState6","indexToSplit","setIndexToSplit","useEffect","slice","find","_ref3","totalLength","lastSize","length","last","childLength","findIndex","_ref4","_ref5","current","childLengthsArray","childNodes","forEach","node","clientWidth","push"],"mappings":"+NAOA,SAASA,EAA2BC,GAYnC,IAXCC,EAAGD,EAAHC,IACAC,EAAQF,EAARE,SACAC,EAAWH,EAAXG,YACAC,EAAkBJ,EAAlBI,mBACAC,EAAUL,EAAVK,WAQAC,EAAwBC,EAAiB,MAAKC,EAAAC,EAAAH,EAAA,GAAvCI,EAAIF,EAAA,GAAEG,EAAOH,EAAA,GAEdI,EAAWC,GACf,SAAAC,GACEH,EADcG,EAAbC,cACqBC,WACxB,GACA,CAACL,IAEHM,EAAkB,CAChBhB,IAAAA,EACAiB,SAAUN,EACVO,aAAcf,IAGhB,IAAAgB,EAA4Db,EAAuC,IAAGc,EAAAZ,EAAAW,EAAA,GAA/FE,EAAsBD,EAAA,GAAEE,EAAyBF,EAAA,GACxDG,EAAwCjB,EAAwB,MAAKkB,EAAAhB,EAAAe,EAAA,GAA9DE,EAAYD,EAAA,GAAEE,EAAeF,EAAA,GA+BpC,OA7BAG,GAAU,WACR,GAAIvB,EAGF,IAFoBiB,EAAuBO,MAAM,GAAI,GACfC,MAAK,SAAAC,GAAc,OAAAA,EAAXC,YAAgCtB,EAAOP,KAEnFwB,GAAiB,OACZ,CACL,IAAMM,EAAWX,EAAuBY,OAAS,EAAIC,EAAKb,GAAwBc,YAAc,EAChGT,EACEL,EAAuBe,WAAU,SAAAC,GAAc,OAAAA,EAAXN,YAAgCtB,EAAOP,EAAc8B,CAAQ,
|
|
1
|
+
{"version":3,"file":"useElementsOverflowingIndex.js","sources":["../../../../src/hooks/useElementsOverflowingIndex.ts"],"sourcesContent":["import { type ReactNode, type RefObject, useCallback, useEffect, useState } from \"react\";\nimport { last } from \"es-toolkit\";\nimport { useResizeObserver } from \"@vibe/hooks\";\n\n// Use this hook when you want to get the index of the child which should be hidden from\ntype AggregatedChildResult = { childLength: number; totalLength: number };\n\nfunction useElementsOverflowingIndex({\n ref,\n children,\n paddingSize,\n resizeDebounceTime,\n ignoreLast\n}: {\n ref: RefObject<HTMLElement>;\n children: ReactNode;\n paddingSize: number;\n resizeDebounceTime: number;\n ignoreLast: boolean;\n}) {\n const [size, setSize] = useState<number>(null);\n\n const onResize = useCallback(\n ({ borderBoxSize }: { borderBoxSize: ResizeObserverSize }) => {\n setSize(borderBoxSize.inlineSize);\n },\n [setSize]\n );\n useResizeObserver({\n ref,\n callback: onResize,\n debounceTime: resizeDebounceTime\n });\n\n const [aggregatedChildLengths, setAggregatedChildLengths] = useState<Array<AggregatedChildResult>>([]);\n const [indexToSplit, setIndexToSplit] = useState<number | null>(null);\n\n useEffect(() => {\n if (ignoreLast) {\n const withoutLast = aggregatedChildLengths.slice(0, -1);\n const allInWithoutLast = !withoutLast.find(({ totalLength }) => totalLength > size - paddingSize);\n if (allInWithoutLast) {\n setIndexToSplit(-1);\n } else {\n const lastSize = aggregatedChildLengths.length > 0 ? last(aggregatedChildLengths).childLength : 0;\n setIndexToSplit(\n aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize - lastSize)\n );\n }\n } else {\n setIndexToSplit(aggregatedChildLengths.findIndex(({ totalLength }) => totalLength > size - paddingSize));\n }\n }, [aggregatedChildLengths, size, setIndexToSplit, paddingSize, ignoreLast]);\n\n useEffect(() => {\n if (!ref.current) return;\n const childLengthsArray: Array<AggregatedChildResult> = [];\n let totalLength = 0;\n ref.current.childNodes.forEach((node: HTMLElement) => {\n const childLength = node.clientWidth;\n totalLength += childLength;\n childLengthsArray.push({ childLength, totalLength });\n });\n setAggregatedChildLengths(childLengthsArray);\n }, [children, ref, setAggregatedChildLengths]);\n\n return indexToSplit;\n}\n\nexport default useElementsOverflowingIndex;\n"],"names":["useElementsOverflowingIndex","_ref","ref","children","paddingSize","resizeDebounceTime","ignoreLast","_useState","useState","_useState2","_slicedToArray","size","setSize","onResize","useCallback","_ref2","borderBoxSize","inlineSize","useResizeObserver","callback","debounceTime","_useState3","_useState4","aggregatedChildLengths","setAggregatedChildLengths","_useState5","_useState6","indexToSplit","setIndexToSplit","useEffect","slice","find","_ref3","totalLength","lastSize","length","last","childLength","findIndex","_ref4","_ref5","current","childLengthsArray","childNodes","forEach","node","clientWidth","push"],"mappings":"+NAOA,SAASA,EAA2BC,GAYnC,IAXCC,EAAGD,EAAHC,IACAC,EAAQF,EAARE,SACAC,EAAWH,EAAXG,YACAC,EAAkBJ,EAAlBI,mBACAC,EAAUL,EAAVK,WAQAC,EAAwBC,EAAiB,MAAKC,EAAAC,EAAAH,EAAA,GAAvCI,EAAIF,EAAA,GAAEG,EAAOH,EAAA,GAEdI,EAAWC,GACf,SAAAC,GACEH,EADcG,EAAbC,cACqBC,WACxB,GACA,CAACL,IAEHM,EAAkB,CAChBhB,IAAAA,EACAiB,SAAUN,EACVO,aAAcf,IAGhB,IAAAgB,EAA4Db,EAAuC,IAAGc,EAAAZ,EAAAW,EAAA,GAA/FE,EAAsBD,EAAA,G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