@vibe/core 4.6.0-alpha-8cfcb.0 → 4.6.0-alpha-3c271.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base/dist/BaseInput/BaseInput.module.scss.js +1 -1
- package/dist/components/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
- package/dist/components/AlertBanner/AlertBannerLink/AlertBannerLink.d.ts +1 -1
- package/dist/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.d.ts +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -2
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +1 -1
- package/dist/components/AvatarGroup/AvatarGroupCounter.d.ts +1 -2
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipContainer.d.ts +1 -2
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipContent.d.ts +1 -2
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.d.ts +1 -2
- package/dist/components/AvatarGroup/AvatarGroupCounterTooltipHelper.d.ts +1 -2
- package/dist/components/AvatarGroup/AvatarGroupHelper.d.ts +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Chips/Chips.d.ts +1 -1
- package/dist/components/EmptyState/EmptyState.types.d.ts +1 -1
- package/dist/components/Info/components/InfoLink/InfoLink.d.ts +1 -1
- package/dist/components/Menu/MenuItem/AvatarMenuItem.d.ts +1 -1
- package/dist/components/Menu/MenuItem/MenuItem.d.ts +1 -1
- package/dist/components/Modal/footers/utils/getPropsForButton.d.ts +1 -0
- package/dist/components/TextField/TextField.d.ts +7 -6
- package/dist/components/Toast/ToastLink/ToastLink.d.ts +1 -1
- package/dist/components/avatar/dist/Avatar/Avatar.js +2 -0
- package/dist/components/avatar/dist/Avatar/Avatar.js.map +1 -0
- package/dist/components/avatar/dist/Avatar/Avatar.module.scss.js +2 -0
- package/dist/components/avatar/dist/Avatar/AvatarBadge.js +2 -0
- package/dist/components/avatar/dist/Avatar/AvatarBadge.js.map +1 -0
- package/dist/components/avatar/dist/Avatar/AvatarBadge.module.scss.js +2 -0
- package/dist/components/avatar/dist/Avatar/AvatarContent.js +2 -0
- package/dist/components/avatar/dist/Avatar/AvatarContent.js.map +1 -0
- package/dist/components/avatar/dist/Avatar/AvatarContent.module.scss.js +2 -0
- package/dist/components/avatar/dist/_virtual/_tslib.js +2 -0
- package/dist/components/avatar/dist/_virtual/_tslib.js.map +1 -0
- package/dist/components/button/dist/Button/Button.module.scss.js +1 -1
- package/dist/components/button-group/dist/ButtonGroup/ButtonGroup.js +2 -0
- package/dist/components/button-group/dist/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/components/button-group/dist/ButtonGroup/ButtonGroup.module.scss.js +2 -0
- package/dist/components/button-group/dist/ButtonGroup/ButtonWrapper.js +2 -0
- package/dist/components/button-group/dist/ButtonGroup/ButtonWrapper.js.map +1 -0
- package/dist/components/button-group/dist/_virtual/_tslib.js +2 -0
- package/dist/components/button-group/dist/_virtual/_tslib.js.map +1 -0
- package/dist/components/checkbox/dist/Checkbox/Checkbox.js +2 -0
- package/dist/components/checkbox/dist/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/checkbox/dist/Checkbox/Checkbox.module.scss.js +2 -0
- package/dist/components/checkbox/dist/Checkbox/hooks/useSupportFirefoxLabelClick.js +2 -0
- package/dist/components/checkbox/dist/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +1 -0
- package/dist/components/clickable/dist/Clickable/Clickable.module.scss.js +1 -1
- package/dist/components/counter/dist/Counter/Counter.js +2 -0
- package/dist/components/counter/dist/Counter/Counter.js.map +1 -0
- package/dist/components/counter/dist/Counter/Counter.module.scss.js +2 -0
- package/dist/components/dialog/dist/Dialog/Dialog.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.module.scss.js +1 -1
- package/dist/components/dialog/dist/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
- package/dist/components/divider/dist/Divider/Divider.js +2 -0
- package/dist/components/divider/dist/Divider/Divider.js.map +1 -0
- package/dist/components/divider/dist/Divider/Divider.module.scss.js +2 -0
- package/dist/components/editable/dist/EditableHeading/EditableHeading.js +2 -0
- package/dist/components/editable/dist/EditableHeading/EditableHeading.js.map +1 -0
- package/dist/components/editable/dist/EditableHeading/EditableHeading.module.scss.js +2 -0
- package/dist/components/editable/dist/EditableText/EditableText.js +2 -0
- package/dist/components/editable/dist/EditableText/EditableText.js.map +1 -0
- package/dist/components/editable/dist/EditableText/EditableText.module.scss.js +2 -0
- package/dist/components/editable/dist/EditableTypography/EditableTypography.js +2 -0
- package/dist/components/editable/dist/EditableTypography/EditableTypography.js.map +1 -0
- package/dist/components/editable/dist/EditableTypography/EditableTypography.module.scss.js +2 -0
- package/dist/components/editable/dist/_virtual/_tslib.js +2 -0
- package/dist/components/editable/dist/_virtual/_tslib.js.map +1 -0
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.js +2 -0
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.js.map +1 -0
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.module.scss.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumber.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumber.js.map +1 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumber.module.scss.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumberHelpers.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumberHelpers.js.map +1 -0
- package/dist/components/formatted-number/dist/FormattedNumber/textManipulations.js +2 -0
- package/dist/components/formatted-number/dist/FormattedNumber/textManipulations.js.map +1 -0
- package/dist/components/icon-button/dist/IconButton/IconButton.module.scss.js +1 -1
- package/dist/components/index.d.ts +12 -13
- package/dist/components/label/dist/Label/Label.js +2 -0
- package/dist/components/label/dist/Label/Label.js.map +1 -0
- package/dist/components/label/dist/Label/Label.module.scss.js +2 -0
- package/dist/components/label/dist/Label/LabelCelebrationAnimation.js +2 -0
- package/dist/components/label/dist/Label/LabelCelebrationAnimation.js.map +1 -0
- package/dist/components/label/dist/Label/LabelCelebrationAnimation.module.scss.js +2 -0
- package/dist/components/label/dist/Label/LabelConstants.js +2 -0
- package/dist/components/label/dist/Label/LabelConstants.js.map +1 -0
- package/dist/components/label/dist/Label/Leg.js.map +1 -0
- 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/link/dist/Link/Link.js +2 -0
- package/dist/components/link/dist/Link/Link.js.map +1 -0
- package/dist/components/link/dist/Link/Link.module.scss.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/PercentageLabel/PercentageLabel.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/PercentageLabel/PercentageLabel.js.map +1 -0
- package/dist/components/progress-bars/dist/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/Bar/Bar.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/Bar/Bar.js.map +1 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBar.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBar.module.scss.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBarHelpers.js +2 -0
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBarHelpers.js.map +1 -0
- package/dist/components/radio-button/dist/RadioButton/RadioButton.js +2 -0
- package/dist/components/radio-button/dist/RadioButton/RadioButton.js.map +1 -0
- package/dist/components/radio-button/dist/RadioButton/RadioButton.module.scss.js +2 -0
- 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/hooks/dist/useAfterFirstRender/index.js.map +1 -0
- package/dist/hooks/dist/usePrevious/index.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -3
- package/dist/metadata/components.json +59 -36
- package/dist/metadata.json +59 -36
- package/dist/mocked_classnames/components/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
- package/dist/mocked_classnames/components/AlertBanner/AlertBannerLink/AlertBannerLink.d.ts +1 -1
- package/dist/mocked_classnames/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.d.ts +1 -1
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroup.d.ts +1 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroup.types.d.ts +1 -1
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounter.d.ts +1 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipContainer.d.ts +1 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipContent.d.ts +1 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.d.ts +1 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupCounterTooltipHelper.d.ts +1 -2
- package/dist/mocked_classnames/components/AvatarGroup/AvatarGroupHelper.d.ts +1 -1
- package/dist/mocked_classnames/components/Badge/Badge.d.ts +1 -1
- package/dist/mocked_classnames/components/Chips/Chips.d.ts +1 -1
- package/dist/mocked_classnames/components/EmptyState/EmptyState.types.d.ts +1 -1
- package/dist/mocked_classnames/components/Info/components/InfoLink/InfoLink.d.ts +1 -1
- package/dist/mocked_classnames/components/Menu/MenuItem/AvatarMenuItem.d.ts +1 -1
- package/dist/mocked_classnames/components/Menu/MenuItem/MenuItem.d.ts +1 -1
- package/dist/mocked_classnames/components/Modal/footers/utils/getPropsForButton.d.ts +1 -0
- package/dist/mocked_classnames/components/TextField/TextField.d.ts +7 -6
- package/dist/mocked_classnames/components/Toast/ToastLink/ToastLink.d.ts +1 -1
- package/dist/mocked_classnames/components/index.d.ts +12 -13
- package/dist/mocked_classnames/hooks/index.d.ts +1 -3
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Accordion/AccordionItem/AccordionItem.js +1 -1
- package/dist/mocked_classnames/src/components/Accordion/AccordionItem/AccordionItem.js.map +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.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.js.map +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.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.js.map +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/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.js.map +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.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.js.map +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipHelper.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipHelper.js.map +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupHelper.js.map +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.js.map +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/BaseItem/utils.js +1 -1
- package/dist/mocked_classnames/src/components/BaseItem/utils.js.map +1 -1
- package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +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/Chips/Chips.js +1 -1
- package/dist/mocked_classnames/src/components/Chips/Chips.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/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 +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.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/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/Dropdown/components/DropdownBase/DropdownBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.js.map +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/DropdownPopup/DropdownPopup.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownPopup/DropdownPopup.js.map +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/Trigger.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EmptyState/EmptyState.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/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/Info.js +1 -1
- package/dist/mocked_classnames/src/components/Info/Info.js.map +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.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoLink/InfoLink.js.map +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/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/ListItem/ListItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemAvatar/ListItemAvatar.js.map +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.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/Menu.js.map +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/useMouseLeave.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/hooks/useMouseLeave.js.map +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.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/AvatarMenuItem.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/AvatarMenuItem.js.map +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.js.map +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/MenuItemSubMenuIcon/MenuItemSubMenuIcon.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.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/useMenuItemMouseEvents.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/hooks/useMenuItemMouseEvents.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.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/layouts/ModalBasicLayout/ModalBasicLayout.js +1 -1
- package/dist/mocked_classnames/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.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/MultiStepIndicator/MultiStepIndicator.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/MultiStepIndicator.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.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +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/Search/Search.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/SegmentedControl/SegmentedControl.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/SliderInfix.module.scss.js +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.module.scss.js +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/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.js.map +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 +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 +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.module.scss.js +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.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/Toast.js.map +1 -1
- package/dist/mocked_classnames/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.js.map +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 +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 +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/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.js +1 -1
- package/dist/mocked_classnames/src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.js.map +1 -1
- package/dist/mocked_classnames/src/hooks/useSetFocus/index.js +1 -1
- package/dist/mocked_classnames/src/hooks/useSetFocus/index.js.map +1 -1
- package/dist/mocked_classnames/src/index.js +1 -1
- package/dist/mocked_classnames/src/types/Colors.js +1 -1
- package/dist/mocked_classnames/src/types/Colors.js.map +1 -1
- package/dist/mocked_classnames/src/utils/colors-vars-map.js +1 -1
- package/dist/mocked_classnames/src/utils/colors-vars-map.js.map +1 -1
- package/dist/mocked_classnames/types/Colors.d.ts +16 -2
- package/dist/mocked_classnames/utils/colors-vars-map.d.ts +0 -2
- package/dist/shared/dist/types/Colors.js +2 -0
- package/dist/shared/dist/types/Colors.js.map +1 -0
- package/dist/shared/dist/utils/colors-vars-map.js +2 -0
- package/dist/shared/dist/utils/colors-vars-map.js.map +1 -0
- package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/src/components/Accordion/AccordionItem/AccordionItem.js +1 -1
- package/dist/src/components/Accordion/AccordionItem/AccordionItem.js.map +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.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.js.map +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.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.js.map +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/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.js.map +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.js.map +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.js.map +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipHelper.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipHelper.js.map +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupHelper.js.map +1 -1
- package/dist/src/components/Badge/Badge.js +1 -1
- package/dist/src/components/Badge/Badge.js.map +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/BaseItem/utils.js +1 -1
- package/dist/src/components/BaseItem/utils.js.map +1 -1
- package/dist/src/components/BaseList/BaseList.module.scss.js +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/Chips/Chips.js +1 -1
- package/dist/src/components/Chips/Chips.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/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 +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.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/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePickerHeader.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.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBaseList/DropdownBaseList.js.map +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/DropdownPopup/DropdownPopup.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownPopup/DropdownPopup.js.map +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/Trigger.module.scss.js +1 -1
- package/dist/src/components/EmptyState/EmptyState.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/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/src/components/Info/Info.js +1 -1
- package/dist/src/components/Info/Info.js.map +1 -1
- package/dist/src/components/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoLink/InfoLink.js +1 -1
- package/dist/src/components/Info/components/InfoLink/InfoLink.js.map +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/List/List.module.scss.js +1 -1
- package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/src/components/ListItem/ListItem.module.scss.js +1 -1
- package/dist/src/components/ListItemAvatar/ListItemAvatar.js +1 -1
- package/dist/src/components/ListItemAvatar/ListItemAvatar.js.map +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.js +1 -1
- package/dist/src/components/Menu/Menu/Menu.js.map +1 -1
- package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/hooks/useMouseLeave.js +1 -1
- package/dist/src/components/Menu/Menu/hooks/useMouseLeave.js.map +1 -1
- package/dist/src/components/Menu/MenuDivider/MenuDivider.js +1 -1
- package/dist/src/components/Menu/MenuDivider/MenuDivider.js.map +1 -1
- package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/AvatarMenuItem.js +1 -1
- package/dist/src/components/Menu/MenuItem/AvatarMenuItem.js.map +1 -1
- package/dist/src/components/Menu/MenuItem/MenuItem.js +1 -1
- package/dist/src/components/Menu/MenuItem/MenuItem.js.map +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/MenuItemSubMenuIcon/MenuItemSubMenuIcon.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.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/useMenuItemMouseEvents.js +1 -1
- package/dist/src/components/Menu/MenuItem/hooks/useMenuItemMouseEvents.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.js +1 -1
- package/dist/src/components/MenuButton/MenuButton.module.scss.js +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/layouts/ModalBasicLayout/ModalBasicLayout.js +1 -1
- package/dist/src/components/Modal/layouts/ModalBasicLayout/ModalBasicLayout.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/MultiStepIndicator/MultiStepIndicator.js +1 -1
- package/dist/src/components/MultiStepIndicator/MultiStepIndicator.js.map +1 -1
- package/dist/src/components/MultiStepIndicator/MultiStepIndicator.module.scss.js +1 -1
- package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js +1 -1
- package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.js.map +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/Search/Search.module.scss.js +1 -1
- package/dist/src/components/SegmentedControl/SegmentedControl.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/SliderInfix.module.scss.js +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.module.scss.js +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/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabList/TabList.js +1 -1
- package/dist/src/components/Tabs/TabList/TabList.js.map +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 +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 +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.module.scss.js +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.js +1 -1
- package/dist/src/components/Toast/Toast.js.map +1 -1
- package/dist/src/components/Toast/Toast.module.scss.js +1 -1
- package/dist/src/components/Toast/ToastLink/ToastLink.js +1 -1
- package/dist/src/components/Toast/ToastLink/ToastLink.js.map +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 +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 +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/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.js +1 -1
- package/dist/src/hooks/useActiveDescendantListFocus/useActiveDescendantListFocusHooks.js.map +1 -1
- package/dist/src/hooks/useSetFocus/index.js +1 -1
- package/dist/src/hooks/useSetFocus/index.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/types/Colors.js +1 -1
- package/dist/src/types/Colors.js.map +1 -1
- package/dist/src/utils/colors-vars-map.js +1 -1
- package/dist/src/utils/colors-vars-map.js.map +1 -1
- package/dist/style/dist/index.min.css.js +1 -1
- package/dist/tokens/tokens.css +1 -1
- package/dist/types/Colors.d.ts +16 -2
- package/dist/utils/colors-vars-map.d.ts +0 -2
- package/package.json +31 -19
- package/dist/components/Avatar/Avatar.d.ts +0 -107
- package/dist/components/Avatar/Avatar.types.d.ts +0 -2
- package/dist/components/Avatar/AvatarBadge.d.ts +0 -28
- package/dist/components/Avatar/AvatarContent.d.ts +0 -40
- package/dist/components/Avatar/index.d.ts +0 -2
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +0 -85
- package/dist/components/ButtonGroup/ButtonGroupConstants.d.ts +0 -1
- package/dist/components/ButtonGroup/ButtonWrapper.d.ts +0 -35
- package/dist/components/ButtonGroup/index.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -67
- package/dist/components/Checkbox/hooks/useSupportFirefoxLabelClick.d.ts +0 -6
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/Counter/Counter.d.ts +0 -51
- package/dist/components/Counter/Counter.types.d.ts +0 -3
- package/dist/components/Counter/index.d.ts +0 -2
- package/dist/components/Divider/Divider.d.ts +0 -15
- package/dist/components/Divider/Divider.types.d.ts +0 -1
- package/dist/components/Divider/index.d.ts +0 -2
- package/dist/components/EditableHeading/EditableHeading.d.ts +0 -16
- package/dist/components/EditableHeading/index.d.ts +0 -1
- package/dist/components/EditableText/EditableText.d.ts +0 -20
- package/dist/components/EditableText/index.d.ts +0 -1
- package/dist/components/EditableTypography/EditableTypography.d.ts +0 -79
- package/dist/components/EditableTypography/index.d.ts +0 -1
- package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +0 -59
- package/dist/components/ExpandCollapse/ExpandCollapse.types.d.ts +0 -1
- package/dist/components/ExpandCollapse/index.d.ts +0 -1
- package/dist/components/FormattedNumber/FormattedNumber.d.ts +0 -38
- package/dist/components/FormattedNumber/FormattedNumberHelpers.d.ts +0 -4
- package/dist/components/FormattedNumber/index.d.ts +0 -1
- package/dist/components/Label/Label.d.ts +0 -40
- package/dist/components/Label/Label.types.d.ts +0 -5
- package/dist/components/Label/LabelCelebrationAnimation.d.ts +0 -13
- package/dist/components/Label/LabelConstants.d.ts +0 -3
- package/dist/components/Label/Leg.d.ts +0 -6
- package/dist/components/Label/index.d.ts +0 -2
- package/dist/components/Link/Link.d.ts +0 -70
- package/dist/components/Link/Link.types.d.ts +0 -3
- package/dist/components/Link/LinkConsts.d.ts +0 -16
- package/dist/components/Link/index.d.ts +0 -2
- package/dist/components/ProgressBars/PercentageLabel/PercentageLabel.d.ts +0 -13
- package/dist/components/ProgressBars/ProgressBar/Bar/Bar.d.ts +0 -48
- package/dist/components/ProgressBars/ProgressBar/ProgressBar.d.ts +0 -69
- package/dist/components/ProgressBars/ProgressBar/ProgressBar.types.d.ts +0 -3
- package/dist/components/ProgressBars/ProgressBar/ProgressBarHelpers.d.ts +0 -4
- package/dist/components/ProgressBars/index.d.ts +0 -2
- package/dist/components/RadioButton/RadioButton.d.ts +0 -74
- package/dist/components/RadioButton/index.d.ts +0 -1
- package/dist/helpers/textManipulations.d.ts +0 -10
- package/dist/hooks/useAfterFirstRender/index.d.ts +0 -2
- package/dist/hooks/usePrevious/index.d.ts +0 -1
- package/dist/mocked_classnames/components/Avatar/Avatar.d.ts +0 -107
- package/dist/mocked_classnames/components/Avatar/Avatar.types.d.ts +0 -2
- package/dist/mocked_classnames/components/Avatar/AvatarBadge.d.ts +0 -28
- package/dist/mocked_classnames/components/Avatar/AvatarContent.d.ts +0 -40
- package/dist/mocked_classnames/components/Avatar/index.d.ts +0 -2
- package/dist/mocked_classnames/components/ButtonGroup/ButtonGroup.d.ts +0 -85
- package/dist/mocked_classnames/components/ButtonGroup/ButtonGroupConstants.d.ts +0 -1
- package/dist/mocked_classnames/components/ButtonGroup/ButtonWrapper.d.ts +0 -35
- package/dist/mocked_classnames/components/ButtonGroup/index.d.ts +0 -1
- package/dist/mocked_classnames/components/Checkbox/Checkbox.d.ts +0 -67
- package/dist/mocked_classnames/components/Checkbox/hooks/useSupportFirefoxLabelClick.d.ts +0 -6
- package/dist/mocked_classnames/components/Checkbox/index.d.ts +0 -1
- package/dist/mocked_classnames/components/Counter/Counter.d.ts +0 -51
- package/dist/mocked_classnames/components/Counter/Counter.types.d.ts +0 -3
- package/dist/mocked_classnames/components/Counter/index.d.ts +0 -2
- package/dist/mocked_classnames/components/Divider/Divider.d.ts +0 -15
- package/dist/mocked_classnames/components/Divider/Divider.types.d.ts +0 -1
- package/dist/mocked_classnames/components/Divider/index.d.ts +0 -2
- package/dist/mocked_classnames/components/EditableHeading/EditableHeading.d.ts +0 -16
- package/dist/mocked_classnames/components/EditableHeading/index.d.ts +0 -1
- package/dist/mocked_classnames/components/EditableText/EditableText.d.ts +0 -20
- package/dist/mocked_classnames/components/EditableText/index.d.ts +0 -1
- package/dist/mocked_classnames/components/EditableTypography/EditableTypography.d.ts +0 -79
- package/dist/mocked_classnames/components/EditableTypography/index.d.ts +0 -1
- package/dist/mocked_classnames/components/ExpandCollapse/ExpandCollapse.d.ts +0 -59
- package/dist/mocked_classnames/components/ExpandCollapse/ExpandCollapse.types.d.ts +0 -1
- package/dist/mocked_classnames/components/ExpandCollapse/index.d.ts +0 -1
- package/dist/mocked_classnames/components/FormattedNumber/FormattedNumber.d.ts +0 -38
- package/dist/mocked_classnames/components/FormattedNumber/FormattedNumberHelpers.d.ts +0 -4
- package/dist/mocked_classnames/components/FormattedNumber/index.d.ts +0 -1
- package/dist/mocked_classnames/components/Label/Label.d.ts +0 -40
- package/dist/mocked_classnames/components/Label/Label.types.d.ts +0 -5
- package/dist/mocked_classnames/components/Label/LabelCelebrationAnimation.d.ts +0 -13
- package/dist/mocked_classnames/components/Label/LabelConstants.d.ts +0 -3
- package/dist/mocked_classnames/components/Label/Leg.d.ts +0 -6
- package/dist/mocked_classnames/components/Label/index.d.ts +0 -2
- package/dist/mocked_classnames/components/Link/Link.d.ts +0 -70
- package/dist/mocked_classnames/components/Link/Link.types.d.ts +0 -3
- package/dist/mocked_classnames/components/Link/LinkConsts.d.ts +0 -16
- package/dist/mocked_classnames/components/Link/index.d.ts +0 -2
- package/dist/mocked_classnames/components/ProgressBars/PercentageLabel/PercentageLabel.d.ts +0 -13
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/Bar/Bar.d.ts +0 -48
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBar.d.ts +0 -69
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBar.types.d.ts +0 -3
- package/dist/mocked_classnames/components/ProgressBars/ProgressBar/ProgressBarHelpers.d.ts +0 -4
- package/dist/mocked_classnames/components/ProgressBars/index.d.ts +0 -2
- package/dist/mocked_classnames/components/RadioButton/RadioButton.d.ts +0 -74
- package/dist/mocked_classnames/components/RadioButton/index.d.ts +0 -1
- package/dist/mocked_classnames/helpers/textManipulations.d.ts +0 -10
- package/dist/mocked_classnames/hooks/useAfterFirstRender/index.d.ts +0 -2
- package/dist/mocked_classnames/hooks/usePrevious/index.d.ts +0 -1
- package/dist/mocked_classnames/src/components/Avatar/Avatar.js +0 -2
- package/dist/mocked_classnames/src/components/Avatar/Avatar.js.map +0 -1
- package/dist/mocked_classnames/src/components/Avatar/Avatar.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.js +0 -2
- package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.js.map +0 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Avatar/AvatarContent.js +0 -2
- package/dist/mocked_classnames/src/components/Avatar/AvatarContent.js.map +0 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarContent.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js +0 -2
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js.map +0 -1
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonWrapper.js +0 -2
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonWrapper.js.map +0 -1
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js +0 -2
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js +0 -2
- package/dist/mocked_classnames/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +0 -1
- package/dist/mocked_classnames/src/components/Counter/Counter.js +0 -2
- package/dist/mocked_classnames/src/components/Counter/Counter.js.map +0 -1
- package/dist/mocked_classnames/src/components/Counter/Counter.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Divider/Divider.js +0 -2
- package/dist/mocked_classnames/src/components/Divider/Divider.js.map +0 -1
- package/dist/mocked_classnames/src/components/Divider/Divider.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.js +0 -2
- package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.js.map +0 -1
- package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/EditableText/EditableText.js +0 -2
- package/dist/mocked_classnames/src/components/EditableText/EditableText.js.map +0 -1
- package/dist/mocked_classnames/src/components/EditableText/EditableText.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.js +0 -2
- package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.js.map +0 -1
- package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.js +0 -2
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.js.map +0 -1
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.js.map +0 -1
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumberHelpers.js +0 -2
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumberHelpers.js.map +0 -1
- package/dist/mocked_classnames/src/components/Label/Label.js +0 -2
- package/dist/mocked_classnames/src/components/Label/Label.js.map +0 -1
- package/dist/mocked_classnames/src/components/Label/Label.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.js +0 -2
- package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.js.map +0 -1
- package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Label/LabelConstants.js +0 -2
- package/dist/mocked_classnames/src/components/Label/LabelConstants.js.map +0 -1
- package/dist/mocked_classnames/src/components/Label/Leg.js.map +0 -1
- package/dist/mocked_classnames/src/components/Link/Link.js +0 -2
- package/dist/mocked_classnames/src/components/Link/Link.js.map +0 -1
- package/dist/mocked_classnames/src/components/Link/Link.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.js.map +0 -1
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.js.map +0 -1
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js +0 -2
- package/dist/mocked_classnames/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js.map +0 -1
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.js +0 -2
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.js.map +0 -1
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.module.scss.js +0 -2
- package/dist/mocked_classnames/src/helpers/textManipulations.js +0 -2
- package/dist/mocked_classnames/src/helpers/textManipulations.js.map +0 -1
- package/dist/mocked_classnames/src/hooks/useAfterFirstRender/index.js.map +0 -1
- package/dist/mocked_classnames/src/hooks/usePrevious/index.js +0 -2
- package/dist/mocked_classnames/src/hooks/usePrevious/index.js.map +0 -1
- package/dist/mocked_classnames/src/services/themes.js +0 -2
- package/dist/mocked_classnames/src/services/themes.js.map +0 -1
- package/dist/src/components/Avatar/Avatar.js +0 -2
- package/dist/src/components/Avatar/Avatar.js.map +0 -1
- package/dist/src/components/Avatar/Avatar.module.scss.js +0 -2
- package/dist/src/components/Avatar/Avatar.module.scss.js.map +0 -1
- package/dist/src/components/Avatar/AvatarBadge.js +0 -2
- package/dist/src/components/Avatar/AvatarBadge.js.map +0 -1
- package/dist/src/components/Avatar/AvatarBadge.module.scss.js +0 -2
- package/dist/src/components/Avatar/AvatarBadge.module.scss.js.map +0 -1
- package/dist/src/components/Avatar/AvatarContent.js +0 -2
- package/dist/src/components/Avatar/AvatarContent.js.map +0 -1
- package/dist/src/components/Avatar/AvatarContent.module.scss.js +0 -2
- package/dist/src/components/Avatar/AvatarContent.module.scss.js.map +0 -1
- package/dist/src/components/ButtonGroup/ButtonGroup.js +0 -2
- package/dist/src/components/ButtonGroup/ButtonGroup.js.map +0 -1
- package/dist/src/components/ButtonGroup/ButtonGroup.module.scss.js +0 -2
- package/dist/src/components/ButtonGroup/ButtonGroup.module.scss.js.map +0 -1
- package/dist/src/components/ButtonGroup/ButtonWrapper.js +0 -2
- package/dist/src/components/ButtonGroup/ButtonWrapper.js.map +0 -1
- package/dist/src/components/Checkbox/Checkbox.js +0 -2
- package/dist/src/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/src/components/Checkbox/Checkbox.module.scss.js +0 -2
- package/dist/src/components/Checkbox/Checkbox.module.scss.js.map +0 -1
- package/dist/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js +0 -2
- package/dist/src/components/Checkbox/hooks/useSupportFirefoxLabelClick.js.map +0 -1
- package/dist/src/components/Counter/Counter.js +0 -2
- package/dist/src/components/Counter/Counter.js.map +0 -1
- package/dist/src/components/Counter/Counter.module.scss.js +0 -2
- package/dist/src/components/Counter/Counter.module.scss.js.map +0 -1
- package/dist/src/components/Divider/Divider.js +0 -2
- package/dist/src/components/Divider/Divider.js.map +0 -1
- package/dist/src/components/Divider/Divider.module.scss.js +0 -2
- package/dist/src/components/Divider/Divider.module.scss.js.map +0 -1
- package/dist/src/components/EditableHeading/EditableHeading.js +0 -2
- package/dist/src/components/EditableHeading/EditableHeading.js.map +0 -1
- package/dist/src/components/EditableHeading/EditableHeading.module.scss.js +0 -2
- package/dist/src/components/EditableHeading/EditableHeading.module.scss.js.map +0 -1
- package/dist/src/components/EditableText/EditableText.js +0 -2
- package/dist/src/components/EditableText/EditableText.js.map +0 -1
- package/dist/src/components/EditableText/EditableText.module.scss.js +0 -2
- package/dist/src/components/EditableText/EditableText.module.scss.js.map +0 -1
- package/dist/src/components/EditableTypography/EditableTypography.js +0 -2
- package/dist/src/components/EditableTypography/EditableTypography.js.map +0 -1
- package/dist/src/components/EditableTypography/EditableTypography.module.scss.js +0 -2
- package/dist/src/components/EditableTypography/EditableTypography.module.scss.js.map +0 -1
- package/dist/src/components/ExpandCollapse/ExpandCollapse.js +0 -2
- package/dist/src/components/ExpandCollapse/ExpandCollapse.js.map +0 -1
- package/dist/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +0 -2
- package/dist/src/components/ExpandCollapse/ExpandCollapse.module.scss.js.map +0 -1
- package/dist/src/components/FormattedNumber/FormattedNumber.js +0 -2
- package/dist/src/components/FormattedNumber/FormattedNumber.js.map +0 -1
- package/dist/src/components/FormattedNumber/FormattedNumber.module.scss.js +0 -2
- package/dist/src/components/FormattedNumber/FormattedNumber.module.scss.js.map +0 -1
- package/dist/src/components/FormattedNumber/FormattedNumberHelpers.js +0 -2
- package/dist/src/components/FormattedNumber/FormattedNumberHelpers.js.map +0 -1
- package/dist/src/components/Label/Label.js +0 -2
- package/dist/src/components/Label/Label.js.map +0 -1
- package/dist/src/components/Label/Label.module.scss.js +0 -2
- package/dist/src/components/Label/Label.module.scss.js.map +0 -1
- package/dist/src/components/Label/LabelCelebrationAnimation.js +0 -2
- package/dist/src/components/Label/LabelCelebrationAnimation.js.map +0 -1
- package/dist/src/components/Label/LabelCelebrationAnimation.module.scss.js +0 -2
- package/dist/src/components/Label/LabelCelebrationAnimation.module.scss.js.map +0 -1
- package/dist/src/components/Label/LabelConstants.js +0 -2
- package/dist/src/components/Label/LabelConstants.js.map +0 -1
- package/dist/src/components/Label/Leg.js +0 -2
- package/dist/src/components/Label/Leg.js.map +0 -1
- package/dist/src/components/Link/Link.js +0 -2
- package/dist/src/components/Link/Link.js.map +0 -1
- package/dist/src/components/Link/Link.module.scss.js +0 -2
- package/dist/src/components/Link/Link.module.scss.js.map +0 -1
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.js +0 -2
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.js.map +0 -1
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +0 -2
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/Bar/Bar.module.scss.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBar.module.scss.js.map +0 -1
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js +0 -2
- package/dist/src/components/ProgressBars/ProgressBar/ProgressBarHelpers.js.map +0 -1
- package/dist/src/components/RadioButton/RadioButton.js +0 -2
- package/dist/src/components/RadioButton/RadioButton.js.map +0 -1
- package/dist/src/components/RadioButton/RadioButton.module.scss.js +0 -2
- package/dist/src/components/RadioButton/RadioButton.module.scss.js.map +0 -1
- package/dist/src/helpers/textManipulations.js +0 -2
- package/dist/src/helpers/textManipulations.js.map +0 -1
- package/dist/src/hooks/useAfterFirstRender/index.js +0 -2
- package/dist/src/hooks/useAfterFirstRender/index.js.map +0 -1
- package/dist/src/hooks/usePrevious/index.js.map +0 -1
- package/dist/src/services/themes.js +0 -2
- package/dist/src/services/themes.js.map +0 -1
- /package/dist/{mocked_classnames/src/components → components/avatar/dist}/Avatar/Avatar.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/avatar/dist}/Avatar/AvatarBadge.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/avatar/dist}/Avatar/AvatarContent.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/button-group/dist}/ButtonGroup/ButtonGroup.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/checkbox/dist}/Checkbox/Checkbox.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/counter/dist}/Counter/Counter.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/divider/dist}/Divider/Divider.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/editable/dist}/EditableHeading/EditableHeading.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/editable/dist}/EditableText/EditableText.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/editable/dist}/EditableTypography/EditableTypography.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/expand-collapse/dist}/ExpandCollapse/ExpandCollapse.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/formatted-number/dist}/FormattedNumber/FormattedNumber.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/label/dist}/Label/Label.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/label/dist}/Label/LabelCelebrationAnimation.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/label/dist}/Label/Leg.js +0 -0
- /package/dist/{mocked_classnames/src/components → components/link/dist}/Link/Link.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/progress-bars/dist}/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/progress-bars/dist}/ProgressBars/ProgressBar/Bar/Bar.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/progress-bars/dist}/ProgressBars/ProgressBar/ProgressBar.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/radio-button/dist}/RadioButton/RadioButton.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/hooks → hooks/dist}/useAfterFirstRender/index.js +0 -0
- /package/dist/{src/hooks → hooks/dist}/usePrevious/index.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={title:"
|
|
1
|
+
var e={title:"title_246e666853"};!function(e){const t="s_id-c12c5d8f6c34_4_5_10";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_246e666853 {\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:"
|
|
1
|
+
var e={tipseenWizard:"tipseenWizard_27f98d38d9",tipseenWizardWizard:"tipseenWizardWizard_13d3be3d0a"};!function(e){const d="s_id-98eba0c83d1f_4_5_10";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+d))return;const t=document.createElement("style");t.id=d,i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[d]=e)}(".tipseenWizard_27f98d38d9 {\n display: flex;\n flex-direction: column;\n}\n.tipseenWizardWizard_13d3be3d0a {\n width: 100%;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TipseenWizard.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as t,defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as o}from"../../../_virtual/_tslib.js";import{camelCase as i}from"es-toolkit";import{getTestId as n,ComponentDefaultTestId as r}from"../../tests/testIds.js";import s from"classnames";import a,{useRef as l,useState as c,useMemo as m,useCallback as u,useEffect as d}from"react";import{createPortal as p}from"react-dom";import{CSSTransition as f}from"react-transition-group";import v from"./ToastLink/ToastLink.js";import y from"./ToastButton/ToastButton.js";import{getIcon as T}from"./ToastHelpers.js";import h from"./Toast.module.scss.js";import j from"
|
|
1
|
+
import{slicedToArray as t,defineProperty as e}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as o}from"../../../_virtual/_tslib.js";import{camelCase as i}from"es-toolkit";import{getTestId as n,ComponentDefaultTestId as r}from"../../tests/testIds.js";import s from"classnames";import a,{useRef as l,useState as c,useMemo as m,useCallback as u,useEffect as d}from"react";import{createPortal as p}from"react-dom";import{CSSTransition as f}from"react-transition-group";import v from"./ToastLink/ToastLink.js";import y from"./ToastButton/ToastButton.js";import{getIcon as T}from"./ToastHelpers.js";import h from"./Toast.module.scss.js";import j from"../../../hooks/dist/usePrevious/index.js";import g from"../../../components/tooltip/dist/Tooltip/Tooltip.js";import x from"../../../components/typography/dist/Text/Text.js";import E from"../../../components/layout/dist/Flex/Flex.js";import k from"../../../components/loader/dist/Loader/Loader.js";import N from"../../../components/icon-button/dist/IconButton/IconButton.js";import b from"../../../icons/dist/react/CloseSmall.js";import{getStyle as A}from"../../../shared/dist/utils/typesciptCssModulesHelper.js";import{NOOP as B}from"../../../shared/dist/utils/function-utils.js";var C=function(C){var O=C.open,L=void 0!==O&&O,_=C.loading,w=void 0!==_&&_,S=C.autoHideDuration,H=void 0===S?null:S,I=C.type,P=void 0===I?"normal":I,z=C.icon,F=C.hideIcon,W=void 0!==F&&F,D=C.action,M=C.actions,R=C.children,U=C.closeable,q=void 0===U||U,G=C.onClose,J=void 0===G?B:G,K=C.className,Q=C.id,V=C.closeButtonAriaLabel,X=void 0===V?"Close":V,Y=C.inline,Z=void 0!==Y&&Y,$=C["data-testid"],tt=l(null),et=l(null),ot=l(null),it=c(!1),nt=t(it,2),rt=nt[0],st=nt[1],at=j(null==M?void 0:M.length),lt=m((function(){return M?M.filter((function(t){return"link"===t.type})).map((function(t){var e=o(t,["type"]);return a.createElement(v,Object.assign({key:e.href,className:h.actionLink},e))})):null}),[M]),ct=m((function(){return void 0!==at&&(null==M?void 0:M.length)!==at}),[M,at]),mt=m((function(){return M?M.filter((function(t){return"button"===t.type})).map((function(t,i){var n=t.content,r=o(t,["type","content"]);return a.createElement(y,Object.assign({key:"alert-button-".concat(i),className:s(h.actionButton,e({},h.withTransition,ct)),color:"dark"===P?"fixed-light":"primary"},r),n)})):null}),[M,ct,P]),ut=m((function(){return s(h.toast,A(h,i("type-"+P)),e({},h.inline,Z),K)}),[P,Z,K]),dt=u((function(){J&&J()}),[J]),pt=l(),ft=u((function(t){J&&null!=t&&(clearTimeout(pt.current),pt.current=setTimeout((function(){dt()}),t))}),[dt,J]);d((function(){return L&&H>0&&ft(H),function(){clearTimeout(pt.current)}}),[L,H,ft]),d((function(){var t=ot.current;t&&st(t.scrollWidth>t.clientWidth)}),[R,L]);var vt=!W&&T(P,z),yt=u((function(t){var e=t.style.width;t.style.width="auto";var o=getComputedStyle(t).width;t.style.width=e,t.style.width=o}),[]);d((function(){tt.current&&yt(tt.current)}),[R,yt]);var Tt=a.createElement(g,{content:rt&&"string"==typeof R?R:void 0,position:"top"},a.createElement(x,{ref:et,id:Q,"data-testid":$||n(r.TOAST,Q),type:"text2",element:"div",color:"dark"===P?"fixedLight":"primary",className:ut,role:"alert","aria-live":"polite"},vt&&a.createElement("div",{className:s(h.icon)},vt),a.createElement(E,{align:"center",gap:"medium",className:h.content},a.createElement(E,{gap:"medium","data-testid":n(r.TOAST_CONTENT),className:h.textContent},a.createElement("span",{ref:ot,className:h.message},R),lt),(mt||D)&&(mt||D),w&&a.createElement(k,{size:"xs"})),q&&a.createElement(N,{className:s(h.closeButton),onClick:dt,size:"xs",kind:"tertiary",color:"dark"===P?"fixed-light":"primary","aria-label":X,"data-testid":n(r.TOAST_CLOSE_BUTTON),icon:b,hideTooltip:!0})));return Z?L?Tt:null:p(a.createElement(f,{in:L,nodeRef:et,classNames:{enterActive:h.enterActive,exitActive:h.exitActive},timeout:400,unmountOnExit:!0},Tt),document.body)};export{C as default};
|
|
2
2
|
//# sourceMappingURL=Toast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sources":["../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { type ReactElement, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { type IconSubComponentProps } from \"@vibe/icon\";\nimport { Text } from \"@vibe/typography\";\nimport { Loader } from \"@vibe/loader\";\nimport { Flex } from \"@vibe/layout\";\nimport { CloseSmall } from \"@vibe/icons\";\nimport ToastLink from \"./ToastLink/ToastLink\";\nimport ToastButton from \"./ToastButton/ToastButton\";\nimport { type ToastType, type ToastAction } from \"./Toast.types\";\nimport { getIcon } from \"./ToastHelpers\";\nimport { NOOP, getStyle } from \"@vibe/shared\";\n\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./Toast.module.scss\";\nimport { IconButton } from \"@vibe/icon-button\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport usePrevious from \"../../hooks/usePrevious\";\n\nexport interface ToastProps extends VibeComponentProps {\n /**\n * The actions available in the toast.\n */\n actions?: ToastAction[];\n /**\n * If true, the toast is open (visible).\n */\n open?: boolean;\n /**\n * If true, displays a loading indicator inside the toast.\n */\n loading?: boolean;\n /**\n * The type of toast.\n */\n type?: ToastType;\n /**\n * The icon displayed in the toast.\n */\n icon?: string | React.FC<IconSubComponentProps> | null;\n /**\n * If true, hides the toast icon.\n */\n hideIcon?: boolean;\n /**\n * The action element displayed in the toast.\n */\n action?: JSX.Element;\n /**\n * If false, hides the close button.\n */\n closeable?: boolean;\n /**\n * Callback fired when the toast is closed.\n */\n onClose?: () => void;\n /**\n * The number of milliseconds before the toast automatically closes.\n * (0 or null disables auto-close behavior).\n */\n autoHideDuration?: number;\n /**\n * The content displayed inside the toast.\n */\n children?: ReactElement | ReactElement[] | string;\n /**\n * The aria-label for the close button.\n */\n closeButtonAriaLabel?: string;\n /**\n * If true, renders the toast in place (for gallery previews) instead of fixed at the top.\n */\n inline?: boolean;\n}\n\nconst Toast = ({\n open = false,\n loading = false,\n autoHideDuration = null,\n type = \"normal\",\n icon,\n hideIcon = false,\n action: deprecatedAction,\n actions,\n children,\n closeable = true,\n onClose = NOOP,\n className,\n id,\n closeButtonAriaLabel = \"Close\",\n inline = false,\n \"data-testid\": dataTestId\n}: ToastProps) => {\n const ref = useRef(null);\n const nodeRef = useRef<HTMLDivElement>(null);\n const messageRef = useRef<HTMLSpanElement>(null);\n const [isMessageTruncated, setIsMessageTruncated] = useState(false);\n const prevActions = usePrevious(actions?.length);\n const toastLinks = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"link\")\n .map(({ type: _type, ...otherProps }) => (\n <ToastLink key={otherProps.href} className={styles.actionLink} {...otherProps} />\n ))\n : null;\n }, [actions]);\n\n const shouldShowButtonTransition = useMemo(() => {\n return prevActions !== undefined && actions?.length !== prevActions;\n }, [actions, prevActions]);\n\n const toastButtons: JSX.Element[] | null = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"button\")\n .map(({ type: _type, content, ...otherProps }, index) => (\n <ToastButton\n key={`alert-button-${index}`}\n className={cx(styles.actionButton, { [styles.withTransition]: shouldShowButtonTransition })}\n color={type === \"dark\" ? \"fixed-light\" : \"primary\"}\n {...otherProps}\n >\n {content}\n </ToastButton>\n ))\n : null;\n }, [actions, shouldShowButtonTransition, type]);\n\n const classNames = useMemo(\n () => cx(styles.toast, getStyle(styles, camelCase(\"type-\" + type)), { [styles.inline]: inline }, className),\n [type, inline, className]\n );\n\n const handleClose = useCallback(() => {\n if (onClose) {\n onClose();\n }\n }, [onClose]);\n\n /* Timer */\n const timerAutoHide = useRef<NodeJS.Timeout>();\n const setAutoHideTimer = useCallback(\n (duration: number) => {\n if (!onClose || duration == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose();\n }, duration);\n },\n [handleClose, onClose]\n );\n\n useEffect(() => {\n if (open && autoHideDuration > 0) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n useEffect(() => {\n const el = messageRef.current;\n if (el) {\n setIsMessageTruncated(el.scrollWidth > el.clientWidth);\n }\n }, [children, open]);\n\n const iconElement = !hideIcon && getIcon(type, icon);\n\n // https://n12v.com/css-transition-to-from-auto/\n const recalculateElementWidth = useCallback((element: HTMLElement) => {\n const prevWidth = element.style.width;\n element.style.width = \"auto\";\n const endWidth = getComputedStyle(element).width;\n element.style.width = prevWidth;\n element.offsetWidth; // force repaint\n element.style.width = endWidth;\n }, []);\n\n useEffect(() => {\n if (ref.current) {\n recalculateElementWidth(ref.current);\n }\n }, [children, recalculateElementWidth]);\n\n const tooltipContent = isMessageTruncated && typeof children === \"string\" ? children : undefined;\n\n const toastElement = (\n <Tooltip content={tooltipContent} position=\"top\">\n <Text\n ref={nodeRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TOAST, id)}\n type=\"text2\"\n element=\"div\"\n color={type === \"dark\" ? \"fixedLight\" : \"primary\"}\n className={classNames}\n role=\"alert\"\n aria-live=\"polite\"\n >\n {iconElement && <div className={cx(styles.icon)}>{iconElement}</div>}\n <Flex align=\"center\" gap=\"medium\" className={styles.content}>\n <Flex\n gap=\"medium\"\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CONTENT)}\n className={styles.textContent}\n >\n <span ref={messageRef} className={styles.message}>\n {children}\n </span>\n {toastLinks}\n </Flex>\n {(toastButtons || deprecatedAction) && (toastButtons || deprecatedAction)}\n {loading && <Loader size=\"xs\" />}\n </Flex>\n {closeable && (\n <IconButton\n className={cx(styles.closeButton)}\n onClick={handleClose}\n size=\"xs\"\n kind=\"tertiary\"\n color={type === \"dark\" ? \"fixed-light\" : \"primary\"}\n aria-label={closeButtonAriaLabel}\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CLOSE_BUTTON)}\n icon={CloseSmall}\n hideTooltip\n />\n )}\n </Text>\n </Tooltip>\n );\n\n // Gallery / static previews: render in place, skip enter/exit animation.\n if (inline) {\n return open ? toastElement : null;\n }\n\n // Portal to body so Toast always stacks above app chrome (search, sticky headers).\n return createPortal(\n <CSSTransition\n in={open}\n nodeRef={nodeRef}\n classNames={{ enterActive: styles.enterActive, exitActive: styles.exitActive }}\n timeout={400}\n unmountOnExit\n >\n {toastElement}\n </CSSTransition>,\n document.body\n );\n};\n\nexport default Toast;\n"],"names":["Toast","_ref","_ref$open","open","_ref$loading","loading","_ref$autoHideDuration","autoHideDuration","_ref$type","type","icon","_ref$hideIcon","hideIcon","deprecatedAction","action","actions","children","_ref$closeable","closeable","_ref$onClose","onClose","NOOP","className","id","_ref$closeButtonAriaL","closeButtonAriaLabel","_ref$inline","inline","dataTestId","ref","useRef","nodeRef","messageRef","_useState","useState","_useState2","_slicedToArray","isMessageTruncated","setIsMessageTruncated","prevActions","usePrevious","length","toastLinks","useMemo","filter","map","_a","otherProps","__rest","React","createElement","ToastLink","key","href","styles","actionLink","shouldShowButtonTransition","undefined","toastButtons","index","content","ToastButton","Object","assign","concat","cx","actionButton","_defineProperty","withTransition","color","classNames","toast","getStyle","camelCase","handleClose","useCallback","timerAutoHide","setAutoHideTimer","duration","clearTimeout","current","setTimeout","useEffect","el","scrollWidth","clientWidth","iconElement","getIcon","recalculateElementWidth","element","prevWidth","style","width","endWidth","getComputedStyle","toastElement","Tooltip","position","Text","getTestId","ComponentDefaultTestId","TOAST","role","Flex","align","gap","TOAST_CONTENT","textContent","message","Loader","size","IconButton","closeButton","onClick","kind","TOAST_CLOSE_BUTTON","CloseSmall","hideTooltip","createPortal","CSSTransition","in","enterActive","exitActive","timeout","unmountOnExit","document","body"],"mappings":"qtCA+EA,IAAMA,EAAQ,SAAHC,GAiBM,IAAAC,EAAAD,EAhBfE,KAAAA,OAAO,IAAHD,GAAQA,EAAAE,EAAAH,EACZI,QAAAA,OAAU,IAAHD,GAAQA,EAAAE,EAAAL,EACfM,iBAAAA,OAAmB,IAAHD,EAAG,KAAIA,EAAAE,EAAAP,EACvBQ,KAAAA,OAAO,IAAHD,EAAG,SAAQA,E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EAAO,CAACpC,QAHYvB,IAA0C,iBAAbrB,EAAwBA,OAAWyC,EAGnDwC,SAAS,OACzChD,EAACC,cAAAgD,GACCrE,IAAKE,GACLR,GAAIA,EACS,cAAAK,GAAcuE,EAAUC,EAAuBC,MAAO9E,GACnEd,KAAK,QACLgF,QAAQ,MACRpB,MAAgB,SAAT5D,EAAkB,aAAe,UACxCa,UAAWgD,GACXgC,KAAK,QAAO,YACF,UAEThB,IAAerC,EAAAC,cAAA,MAAA,CAAK5B,UAAW2C,EAAGX,EAAO5C,OAAQ4E,IAClDrC,EAAAC,cAACqD,EAAI,CAACC,MAAM,SAASC,IAAI,SAASnF,UAAWgC,EAAOM,SAClDX,EAAAC,cAACqD,EACC,CAAAE,IAAI,uBACSN,EAAUC,EAAuBM,eAC9CpF,UAAWgC,EAAOqD,aAElB1D,EAAMC,cAAA,OAAA,CAAArB,IAAKG,GAAYV,UAAWgC,EAAOsD,SACtC5F,GAEF0B,KAEDgB,IAAgB7C,KAAsB6C,IAAgB7C,GACvDR,GAAW4C,gBAAC4D,EAAM,CAACC,KAAK,QAE1B5F,GACC+B,EAAAC,cAAC6D,EAAU,CACTzF,UAAW2C,EAAGX,EAAO0D,aACrBC,QAASvC,GACToC,KAAK,KACLI,KAAK,WACL7C,MAAgB,SAAT5D,EAAkB,cAAgB,UAC7B,aAAAgB,EACC,cAAA0E,EAAUC,EAAuBe,oBAC9CzG,KAAM0G,EACNC,aAAW,MAQrB,OAAI1F,EACKxB,EAAO4F,GAAe,KAIxBuB,EACLrE,EAAAC,cAACqE,EACC,CAAAC,GAAIrH,EACJ4B,QAASA,GACTuC,WAAY,CAAEmD,YAAanE,EAAOmE,YAAaC,WAAYpE,EAAOoE,YAClEC,QAAS,IACTC,eAAa,GAEZ7B,IAEH8B,SAASC,KAEb"}
|
|
1
|
+
{"version":3,"file":"Toast.js","sources":["../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { type ReactElement, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { CSSTransition } from \"react-transition-group\";\nimport { type IconSubComponentProps } from \"@vibe/icon\";\nimport { Text } from \"@vibe/typography\";\nimport { Loader } from \"@vibe/loader\";\nimport { Flex } from \"@vibe/layout\";\nimport { CloseSmall } from \"@vibe/icons\";\nimport ToastLink from \"./ToastLink/ToastLink\";\nimport ToastButton from \"./ToastButton/ToastButton\";\nimport { type ToastType, type ToastAction } from \"./Toast.types\";\nimport { getIcon } from \"./ToastHelpers\";\nimport { NOOP, getStyle } from \"@vibe/shared\";\n\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./Toast.module.scss\";\nimport { IconButton } from \"@vibe/icon-button\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport { usePrevious } from \"@vibe/hooks\";\n\nexport interface ToastProps extends VibeComponentProps {\n /**\n * The actions available in the toast.\n */\n actions?: ToastAction[];\n /**\n * If true, the toast is open (visible).\n */\n open?: boolean;\n /**\n * If true, displays a loading indicator inside the toast.\n */\n loading?: boolean;\n /**\n * The type of toast.\n */\n type?: ToastType;\n /**\n * The icon displayed in the toast.\n */\n icon?: string | React.FC<IconSubComponentProps> | null;\n /**\n * If true, hides the toast icon.\n */\n hideIcon?: boolean;\n /**\n * The action element displayed in the toast.\n */\n action?: JSX.Element;\n /**\n * If false, hides the close button.\n */\n closeable?: boolean;\n /**\n * Callback fired when the toast is closed.\n */\n onClose?: () => void;\n /**\n * The number of milliseconds before the toast automatically closes.\n * (0 or null disables auto-close behavior).\n */\n autoHideDuration?: number;\n /**\n * The content displayed inside the toast.\n */\n children?: ReactElement | ReactElement[] | string;\n /**\n * The aria-label for the close button.\n */\n closeButtonAriaLabel?: string;\n /**\n * If true, renders the toast in place (for gallery previews) instead of fixed at the top.\n */\n inline?: boolean;\n}\n\nconst Toast = ({\n open = false,\n loading = false,\n autoHideDuration = null,\n type = \"normal\",\n icon,\n hideIcon = false,\n action: deprecatedAction,\n actions,\n children,\n closeable = true,\n onClose = NOOP,\n className,\n id,\n closeButtonAriaLabel = \"Close\",\n inline = false,\n \"data-testid\": dataTestId\n}: ToastProps) => {\n const ref = useRef(null);\n const nodeRef = useRef<HTMLDivElement>(null);\n const messageRef = useRef<HTMLSpanElement>(null);\n const [isMessageTruncated, setIsMessageTruncated] = useState(false);\n const prevActions = usePrevious(actions?.length);\n const toastLinks = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"link\")\n .map(({ type: _type, ...otherProps }) => (\n <ToastLink key={otherProps.href} className={styles.actionLink} {...otherProps} />\n ))\n : null;\n }, [actions]);\n\n const shouldShowButtonTransition = useMemo(() => {\n return prevActions !== undefined && actions?.length !== prevActions;\n }, [actions, prevActions]);\n\n const toastButtons: JSX.Element[] | null = useMemo(() => {\n return actions\n ? actions\n .filter(action => action.type === \"button\")\n .map(({ type: _type, content, ...otherProps }, index) => (\n <ToastButton\n key={`alert-button-${index}`}\n className={cx(styles.actionButton, { [styles.withTransition]: shouldShowButtonTransition })}\n color={type === \"dark\" ? \"fixed-light\" : \"primary\"}\n {...otherProps}\n >\n {content}\n </ToastButton>\n ))\n : null;\n }, [actions, shouldShowButtonTransition, type]);\n\n const classNames = useMemo(\n () => cx(styles.toast, getStyle(styles, camelCase(\"type-\" + type)), { [styles.inline]: inline }, className),\n [type, inline, className]\n );\n\n const handleClose = useCallback(() => {\n if (onClose) {\n onClose();\n }\n }, [onClose]);\n\n /* Timer */\n const timerAutoHide = useRef<NodeJS.Timeout>();\n const setAutoHideTimer = useCallback(\n (duration: number) => {\n if (!onClose || duration == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(() => {\n handleClose();\n }, duration);\n },\n [handleClose, onClose]\n );\n\n useEffect(() => {\n if (open && autoHideDuration > 0) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return () => {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]);\n\n useEffect(() => {\n const el = messageRef.current;\n if (el) {\n setIsMessageTruncated(el.scrollWidth > el.clientWidth);\n }\n }, [children, open]);\n\n const iconElement = !hideIcon && getIcon(type, icon);\n\n // https://n12v.com/css-transition-to-from-auto/\n const recalculateElementWidth = useCallback((element: HTMLElement) => {\n const prevWidth = element.style.width;\n element.style.width = \"auto\";\n const endWidth = getComputedStyle(element).width;\n element.style.width = prevWidth;\n element.offsetWidth; // force repaint\n element.style.width = endWidth;\n }, []);\n\n useEffect(() => {\n if (ref.current) {\n recalculateElementWidth(ref.current);\n }\n }, [children, recalculateElementWidth]);\n\n const tooltipContent = isMessageTruncated && typeof children === \"string\" ? children : undefined;\n\n const toastElement = (\n <Tooltip content={tooltipContent} position=\"top\">\n <Text\n ref={nodeRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TOAST, id)}\n type=\"text2\"\n element=\"div\"\n color={type === \"dark\" ? \"fixedLight\" : \"primary\"}\n className={classNames}\n role=\"alert\"\n aria-live=\"polite\"\n >\n {iconElement && <div className={cx(styles.icon)}>{iconElement}</div>}\n <Flex align=\"center\" gap=\"medium\" className={styles.content}>\n <Flex\n gap=\"medium\"\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CONTENT)}\n className={styles.textContent}\n >\n <span ref={messageRef} className={styles.message}>\n {children}\n </span>\n {toastLinks}\n </Flex>\n {(toastButtons || deprecatedAction) && (toastButtons || deprecatedAction)}\n {loading && <Loader size=\"xs\" />}\n </Flex>\n {closeable && (\n <IconButton\n className={cx(styles.closeButton)}\n onClick={handleClose}\n size=\"xs\"\n kind=\"tertiary\"\n color={type === \"dark\" ? \"fixed-light\" : \"primary\"}\n aria-label={closeButtonAriaLabel}\n data-testid={getTestId(ComponentDefaultTestId.TOAST_CLOSE_BUTTON)}\n icon={CloseSmall}\n hideTooltip\n />\n )}\n </Text>\n </Tooltip>\n );\n\n // Gallery / static previews: render in place, skip enter/exit animation.\n if (inline) {\n return open ? toastElement : null;\n }\n\n // Portal to body so Toast always stacks above app chrome (search, sticky headers).\n return createPortal(\n <CSSTransition\n in={open}\n nodeRef={nodeRef}\n classNames={{ enterActive: styles.enterActive, exitActive: styles.exitActive }}\n timeout={400}\n unmountOnExit\n >\n {toastElement}\n </CSSTransition>,\n document.body\n );\n};\n\nexport default Toast;\n"],"names":["Toast","_ref","_ref$open","open","_ref$loading","loading","_ref$autoHideDuration","autoHideDuration","_ref$type","type","icon","_ref$hideIcon","hideIcon","deprecatedAction","action","actions","children","_ref$closeable","closeable","_ref$onClose","onClose","NOOP","className","id","_ref$closeButtonAriaL","closeButtonAriaLabel","_ref$inline","inline","dataTestId","ref","useRef","nodeRef","messageRef","_useState","useState","_useState2","_slicedToArray","isMessageTruncated","setIsMessageTruncated","prevActions","usePrevious","length","toastLinks","useMemo","filter","map","_a","otherProps","__rest","React","createElement","ToastLink","key","href","styles","actionLink","shouldShowButtonTransition","undefined","toastButtons","index","content","ToastButton","Object","assign","concat","cx","actionButton","_defineProperty","withTransition","color","classNames","toast","getStyle","camelCase","handleClose","useCallback","timerAutoHide","setAutoHideTimer","duration","clearTimeout","current","setTimeout","useEffect","el","scrollWidth","clientWidth","iconElement","getIcon","recalculateElementWidth","element","prevWidth","style","width","endWidth","getComputedStyle","toastElement","Tooltip","position","Text","getTestId","ComponentDefaultTestId","TOAST","role","Flex","align","gap","TOAST_CONTENT","textContent","message","Loader","size","IconButton","closeButton","onClick","kind","TOAST_CLOSE_BUTTON","CloseSmall","hideTooltip","createPortal","CSSTransition","in","enterActive","exitActive","timeout","unmountOnExit","document","body"],"mappings":"6tCA+EA,IAAMA,EAAQ,SAAHC,GAiBM,IAAAC,EAAAD,EAhBfE,KAAAA,OAAO,IAAHD,GAAQA,EAAAE,EAAAH,EACZI,QAAAA,OAAU,IAAHD,GAAQA,EAAAE,EAAAL,EACfM,iBAAAA,OAAmB,IAAHD,EAAG,KAAIA,EAAAE,E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:"toast_66896b3600",typeNormal:"typeNormal_f26786f3c5",typePositive:"typePositive_199ef0b44c",typeNegative:"typeNegative_199ef0b44c",typeWarning:"typeWarning_c1850b2df8",typeDark:"typeDark_69ed6fffa2",closeButton:"closeButton_d734f1e7af",actionButton:"actionButton_0d993d3be3",actionLink:"actionLink_06d2b02063",inline:"inline_ac855d3020",icon:"icon_9ccfaedede",withTransition:"withTransition_f99541b575",bounceIn:"bounceIn_7bb98f1d27",content:"content_f83a12be76",textContent:"textContent_525a1053e1",message:"message_c144e9ac89",enterActive:"enterActive_0269bf0142",slideIn:"slideIn_569d5cad70",exitActive:"exitActive_0b88ba48e1",slideOut:"slideOut_d4196c2731"};!function(n){const e="s_id-ab40fcaec88b_4_5_10";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)}(".toast_66896b3600 {\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-12);\n align-items: center;\n display: flex;\n gap: var(--space-12);\n min-width: 200px;\n max-width: 700px;\n width: auto;\n border-radius: var(--border-radius-medium);\n color: var(--primary-text-color);\n background-color: var(--primary-background-color);\n z-index: 100000;\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_66896b3600.typeNormal_f26786f3c5, .toast_66896b3600.typePositive_199ef0b44c, .toast_66896b3600.typeNegative_199ef0b44c, .toast_66896b3600.typeWarning_c1850b2df8 {\n background-color: var(--primary-background-color);\n color: var(--primary-text-color);\n}\n.toast_66896b3600.typeDark_69ed6fffa2 {\n background-color: var(--inverted-color-background);\n color: var(--text-color-on-inverted);\n}\n.toast_66896b3600.typeDark_69ed6fffa2 .closeButton_d734f1e7af {\n color: var(--text-color-on-inverted);\n}\n.toast_66896b3600.typeDark_69ed6fffa2 .actionButton_0d993d3be3,\n.toast_66896b3600.typeDark_69ed6fffa2 .actionLink_06d2b02063 {\n color: var(--text-color-on-inverted);\n border-color: var(--text-color-on-inverted);\n}\n.toast_66896b3600.inline_ac855d3020 {\n position: relative;\n left: auto;\n top: auto;\n transform: none;\n margin: 0;\n max-width: 100%;\n width: 100%;\n}\n\n.icon_9ccfaedede {\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--space-24);\n height: var(--space-24);\n min-width: var(--space-24);\n min-height: var(--space-24);\n border-radius: 50%;\n overflow: hidden;\n background-color: var(--allgrey-background-color);\n color: var(--primary-text-color);\n}\n.icon_9ccfaedede svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n fill: currentColor;\n}\n\n.typePositive_199ef0b44c .icon_9ccfaedede {\n background-color: var(--positive-color);\n color: var(--text-color-on-primary);\n}\n\n.typeNegative_199ef0b44c .icon_9ccfaedede {\n background-color: var(--negative-color);\n color: var(--text-color-on-primary);\n}\n\n.typeWarning_c1850b2df8 .icon_9ccfaedede {\n background-color: var(--warning-color);\n color: var(--text-color-on-primary);\n}\n\n.typeDark_69ed6fffa2 .icon_9ccfaedede {\n background-color: var(--inverted-color-background);\n color: var(--text-color-on-inverted);\n}\n\n.actionButton_0d993d3be3 {\n flex-shrink: 0;\n}\n\n.actionButton_0d993d3be3.withTransition_f99541b575 {\n opacity: 0;\n animation: bounceIn_7bb98f1d27 150ms cubic-bezier(0, 0, 0.4, 1);\n animation-delay: 300ms;\n animation-fill-mode: forwards;\n}\n\n.actionLink_06d2b02063 {\n flex-shrink: 0;\n}\n\n.content_f83a12be76 {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n}\n\n.textContent_525a1053e1 {\n display: flex;\n flex: 1 1 0;\n min-width: 0;\n overflow: hidden;\n align-items: center;\n}\n\n.message_c144e9ac89 {\n flex: 1 1 0;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.enterActive_0269bf0142 {\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n animation-name: slideIn_569d5cad70;\n animation-duration: 350ms;\n animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1);\n}\n\n.exitActive_0b88ba48e1 {\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n animation-name: slideOut_d4196c2731;\n animation-duration: 350ms;\n animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1);\n}\n\n.closeButton_d734f1e7af {\n flex-shrink: 0;\n margin: 0;\n}\n\n@keyframes slideIn_569d5cad70 {\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_d4196c2731 {\n 0% {\n transform: translate(-50%, 0);\n }\n 100% {\n transform: translate(-50%, -100px);\n opacity: 0;\n }\n}\n@keyframes bounceIn_7bb98f1d27 {\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
|
-
import{__rest as t}from"../../../../_virtual/_tslib.js";import{getTestId as s,ComponentDefaultTestId as a}from"../../../tests/testIds.js";import i from"classnames";import
|
|
1
|
+
import{__rest as t}from"../../../../_virtual/_tslib.js";import{getTestId as s,ComponentDefaultTestId as a}from"../../../tests/testIds.js";import i from"classnames";import e from"react";import r from"./ToastLink.module.scss.js";import m from"../../../../components/link/dist/Link/Link.js";var o=function(o){var n=o.className,d=o.id,c=o["data-testid"],l=t(o,["className","id","data-testid"]),f=i(r.actionLink,n);return e.createElement(m,Object.assign({},l,{className:f,id:d,"data-testid":c||s(a.TOAST_LINK,d)}))};export{o as default};
|
|
2
2
|
//# sourceMappingURL=ToastLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastLink.js","sources":["../../../../../src/components/Toast/ToastLink/ToastLink.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { ComponentDefaultTestId, getTestId } from \"../../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { type FC } from \"react\";\nimport Link,
|
|
1
|
+
{"version":3,"file":"ToastLink.js","sources":["../../../../../src/components/Toast/ToastLink/ToastLink.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { ComponentDefaultTestId, getTestId } from \"../../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { type FC } from \"react\";\nimport { Link, type LinkProps } from \"@vibe/link\";\nimport styles from \"./ToastLink.module.scss\";\n\nexport type ToastLinkProps = LinkProps;\n\nconst ToastLink: FC<ToastLinkProps> = ({ className, id, \"data-testid\": dataTestId, ...linkProps }) => {\n const classNames = cx(styles.actionLink, className);\n return (\n <Link\n {...linkProps}\n className={classNames}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TOAST_LINK, id)}\n />\n );\n};\n\nexport default ToastLink;\n"],"names":["ToastLink","_a","className","id","dataTestId","linkProps","__rest","classNames","cx","styles","actionLink","React","createElement","Link","Object","assign","getTestId","ComponentDefaultTestId","TOAST_LINK"],"mappings":"gSASA,IAAMA,EAAgC,SAACC,GAAA,IAAEC,EAAwCD,EAAxCC,UAAWC,EAA6BF,EAA7BE,GAAmBC,EAAUH,EAAzB,eAA8BI,EAA/CC,EAAAL,EAAA,CAAA,YAAA,KAAA,gBAC/BM,EAAaC,EAAGC,EAAOC,WAAYR,GACzC,OACES,EAACC,cAAAC,EACKC,OAAAC,OAAA,CAAA,EAAAV,EACJ,CAAAH,UAAWK,EACXJ,GAAIA,gBACSC,GAAcY,EAAUC,EAAuBC,WAAYf,KAG9E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={actionLink:"
|
|
1
|
+
var e={actionLink:"actionLink_c488f2211d"};!function(e){const t="s_id-db91e2844cab_4_5_10";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_c488f2211d {\n color: var(--link-color);\n -webkit-font-smoothing: auto;\n -moz-osx-font-smoothing: auto;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ToastLink.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={toggle:"
|
|
1
|
+
var e={toggle:"toggle_97a3ab0164","focus-visible":"focus-visible_8345afc3b6",selected:"selected_ef5d848750",notSelected:"notSelected_4fcadc605d",disabled:"disabled_2ed245a7c2",medium:"medium_cbf3de7bb2",small:"small_be8ff60746",noSpacing:"noSpacing_0ad2698902"};!function(e){const n="s_id-5e47b8a7e8fd_4_5_10";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const o=document.createElement("style");o.id=n,t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}('/* stylelint-disable */\n/* stylelint-enable */\n.toggle_97a3ab0164 {\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_97a3ab0164:focus-visible, .toggle_97a3ab0164.focus-visible_8345afc3b6 {\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_97a3ab0164:focus:not(.focus-visible_8345afc3b6) {\n outline: none;\n}\n.toggle_97a3ab0164::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_97a3ab0164.selected_ef5d848750 {\n background-color: var(--primary-color);\n}\n.toggle_97a3ab0164.selected_ef5d848750::after {\n inset-inline-start: 20px;\n}\n.toggle_97a3ab0164.notSelected_4fcadc605d {\n background-color: var(--ui-border-color);\n}\n.toggle_97a3ab0164.notSelected_4fcadc605d::after {\n inset-inline-start: 3px;\n}\n.toggle_97a3ab0164.disabled_2ed245a7c2 {\n opacity: var(--disabled-component-opacity);\n cursor: not-allowed;\n}\n.toggle_97a3ab0164.medium_cbf3de7bb2 {\n --toggle-width: 41px;\n --toggle-height: 24px;\n}\n.toggle_97a3ab0164.medium_cbf3de7bb2::after {\n --circle-size: 18px;\n}\n.toggle_97a3ab0164.small_be8ff60746 {\n --toggle-width: 28px;\n --toggle-height: 16px;\n}\n.toggle_97a3ab0164.small_be8ff60746::after {\n --circle-size: 12px;\n top: calc(50% - 6px);\n inset-inline-start: 14px;\n}\n.toggle_97a3ab0164.small_be8ff60746.notSelected_4fcadc605d::after {\n inset-inline-start: 2px;\n}\n.toggle_97a3ab0164.noSpacing_0ad2698902 {\n margin: 0;\n}');export{e as default};
|
|
2
2
|
//# sourceMappingURL=MockToggle.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={toggleInput:"
|
|
1
|
+
var e={toggleInput:"toggleInput_830e1bbba0","focus-visible":"focus-visible_a9525a31ca",toggleFocusTarget:"toggleFocusTarget_8345afc3b6",wrapper:"wrapper_981c23e9d8"};!function(e){const t="s_id-679f544f6e7c_4_5_10";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable selector-class-pattern */\n.toggleInput_830e1bbba0:focus-visible, .toggleInput_830e1bbba0.focus-visible_a9525a31ca { /* stylelint-disable-line selector-class-pattern */ }\n.toggleInput_830e1bbba0:focus-visible ~ .toggleFocusTarget_8345afc3b6, .toggleInput_830e1bbba0.focus-visible_a9525a31ca ~ .toggleFocusTarget_8345afc3b6 {\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\n.wrapper_981c23e9d8 {\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:"
|
|
1
|
+
var e={text:"text_5c1e2a2082",disabled:"disabled_825aef32ab"};!function(e){const t="s_id-1dee71639eb3_4_5_10";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_5c1e2a2082 {\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_825aef32ab {\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:"
|
|
1
|
+
var e={slideshow:"slideshow_18591d9093"};!function(e){const t="s_id-1d828e3be878_4_5_10";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_18591d9093 {\n width: 100%;\n height: 100%;\n min-height: 0;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=TransitionView.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e,{forwardRef as t,useState as o,useRef as n,useCallback as i,useMemo as l,useEffect as s}from"react";import u from"classnames";import{VariableSizeGrid as c}from"react-window";import a from"react-virtualized-auto-sizer";import{getNormalizedItems as d,getOnItemsRenderedData as m,isLayoutDirectionScrollbarVisible as f}from"../../services/virtualized-service.js";import v from"../../hooks/
|
|
1
|
+
import{slicedToArray as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e,{forwardRef as t,useState as o,useRef as n,useCallback as i,useMemo as l,useEffect as s}from"react";import u from"classnames";import{VariableSizeGrid as c}from"react-window";import a from"react-virtualized-auto-sizer";import{getNormalizedItems as d,getOnItemsRenderedData as m,isLayoutDirectionScrollbarVisible as f}from"../../services/virtualized-service.js";import v from"../../hooks/useThrottledCallback.js";import{getTestId as h,ComponentDefaultTestId as I}from"../../tests/testIds.js";import p from"./VirtualizedGrid.module.scss.js";import g from"../../../hooks/dist/usePrevious/index.js";import{useMergeRef as w}from"../../../shared/dist/hooks/useMergeRef.js";import{NOOP as R}from"../../../shared/dist/utils/function-utils.js";var x=t((function(t,x){var T=t.className,S=t.id,b=t.items,j=void 0===b?[]:b,C=t.itemRenderer,z=t.getRowHeight,N=void 0===z?function(){return 50}:z,M=t.getColumnWidth,k=void 0===M?function(){return 100}:M,E=t.getItemId,V=void 0===E?function(r,e){return r.id}:E,W=t.onScroll,y=t.scrollToId,A=void 0===y?null:y,D=t.onScrollToFinished,G=void 0===D?R:D,H=t.onItemsRendered,O=void 0===H?null:H,U=t.onItemsRenderedThrottleMs,_=void 0===U?200:U,F=t.onSizeUpdate,P=void 0===F?R:F,q=t.onVerticalScrollbarVisiblityChange,B=void 0===q?null:q,L=t.scrollableClassName,Z=t["data-testid"],J=o(0),K=r(J,2),Q=K[0],X=K[1],Y=o(0),$=r(Y,2),rr=$[0],er=$[1],tr=g(A),or=n(null),nr=n(null),ir=n(null),lr=n(0),sr=n({scrollOffsetInitial:0,scrollOffsetFinal:0,animationStartTime:0}),ur=w(x,or),cr=sr.current,ar=i((function(r){var e=N();return e&&!Number.isNaN(e)||console.error("Couldn't get height for item: ",r),e}),[N]),dr=i((function(r,e){var t=V(r,e);return void 0===t&&console.error("Couldn't get id for item: ",r),t}),[V]),mr=l((function(){return d(j,dr,ar)}),[j,dr,ar]),fr=l((function(){return Math.min(j.length,Math.floor(rr/k()))}),[j,rr,k]),vr=l((function(){return fr>0?Math.ceil(j.length/fr):0}),[j,fr]),hr=l((function(){return A%fr}),[A,fr]),Ir=l((function(){return Math.floor(A/fr)}),[A,fr]),pr=i((function(r){var e=r.horizontalScrollDirection,t=r.scrollTop,o=r.scrollUpdateWasRequested;lr.current=t,o||(cr.scrollOffsetInitial=t),W&&W(e,t,o)}),[W,lr,cr]),gr=i((function(r){var e=r.rowIndex*fr+r.columnIndex;return C(j[e],e,r.style)}),[j,C,fr]),wr=i((function(r,e){e===Q&&r===rr||setTimeout((function(){X(e),er(r),P(r,e)}),0)}),[Q,rr,P]),Rr=v((function(r){if(O){var e=m(j,mr,dr,r.visibleRowStartIndex,r.visibleRowStopIndex,Q,lr.current);O(e)}}),{wait:_,trailing:!0},[O,j,mr,dr,Q]);return s((function(){A&&tr!==A&&(ir.current.scrollToItem({align:"center",columnIndex:hr,rowIndex:Ir}),G())}),[A,tr,ir,hr,Ir,G]),s((function(){ir.current&&ir.current.resetAfterIndices({columnIndex:0,rowIndex:0})}),[mr]),s((function(){if(B){var r=f(j,mr,dr,Q);nr.current!==r&&(nr.current=r,B(r))}}),[B,j,mr,Q,dr]),e.createElement("div",{ref:ur,className:u(p.virtualizedGridWrapper,T),id:S,"data-testid":Z||h(I.VIRTUALIZED_GRID,S)},e.createElement(a,null,(function(r){var t=r.height,o=r.width;return wr(o,t),e.createElement(c,{ref:ir,height:t,width:o,columnWidth:k,columnCount:fr,rowHeight:N,rowCount:vr,onScroll:pr,onItemsRendered:Rr,className:L},gr)})))}));export{x as default};
|
|
2
2
|
//# sourceMappingURL=VirtualizedGrid.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, NOOP } from \"@vibe/shared\";\nimport { type VibeComponentProps } from \"../../types\";\n\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":"8yBAsGMA,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,EAAAT,EACvBU,eAAAA,OAAiB,IAAHD,EAAG,WAAA,OAAM,GAAG,EAAAA,EAAAE,EAAAX,EAC1BY,UAAAA,OAAS,IAAAD,EAAG,SAACE,EAAgBC,GAAc,OAAKD,EAAKV,EAAE,EAAAQ,EACvDI,EAAQf,EAARe,SAAQC,EAAAhB,EACRiB,WAAAA,OAAa,IAAHD,EAAG,KAAIA,EAAAE,EAAAlB,EACjBmB,mBAAAA,OAAqBC,IAAHF,EAAGE,EAAIF,EAAAG,EAAArB,EACzBsB,gBAAAA,OAAkB,IAAHD,EAAG,KAAIA,EAAAE,EAAAvB,EACtBwB,0BAAAA,OAA4B,IAAHD,EAAG,IAAGA,EAAAE,EAAAzB,EAC/B0B,aAAAA,OAAeN,IAAHK,EAAGL,EAAIK,EAAAE,EAAA3B,EACnB4B,mCAAAA,OAAqC,IAAHD,EAAG,KAAIA,EACzCE,EAAmB7B,EAAnB6B,oBACeC,EAAU9B,EAAzB,eAKF+B,EAAoCC,EAAS,GAAEC,EAAAC,EAAAH,EAAA,GAAxC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,GAA8BU,QAAUkD,EACxC7E,EAAmC6E,GAEvC,CACF,GAAG,CAAC7E,EAAoCvB,EAAO8D,GAAiBhC,EAAY4B,KAG1E4C,EAAAC,cAAA,MAAA,CACE3G,IAAKmD,GACLlD,UAAW2G,EAAGC,EAAOC,uBAAwB7G,GAC7CC,GAAIA,EAAE,cACO2B,GAAckF,EAAUC,EAAuBC,iBAAkB/G,IAE9EwG,EAACC,cAAAO,QACE,SAAAC,GAAyD,IAAtD1D,EAAM0D,EAAN1D,OAAQgC,EAAK0B,EAAL1B,MAEV,OADAD,GAAeC,EAAOhC,GAEpBiD,gBAACU,EAAI,CACHpH,IAAK6C,GACLY,OAAQA,EACRgC,MAAOA,EACP4B,YAAa5G,EACb6G,YAAajD,GACbkD,UAAWhH,EACXiH,SAAU9C,GACV5D,SAAUgE,GACVzD,gBAAiBsE,GACjB1F,UAAW2B,GAEVuD,GAGN,IAIT"}
|
|
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 \"@vibe/hooks\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport { useMergeRef, NOOP } from \"@vibe/shared\";\nimport { type VibeComponentProps } from \"../../types\";\n\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":"szBAsGMA,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,EAAAT,EACvBU,eAAAA,OAAiB,IAAHD,EAAG,WAAA,OAAM,GAAG,EAAAA,EAAAE,EAAAX,EAC1BY,UAAAA,OAAS,IAAAD,EAAG,SAACE,EAAgBC,GAAc,OAAKD,EAAKV,EAAE,EAAAQ,EACvDI,EAAQf,EAARe,SAAQC,EAAAhB,EACRiB,WAAAA,OAAa,IAAHD,EAAG,KAAIA,EAAAE,EAAAlB,EACjBmB,mBAAAA,OAAqBC,IAAHF,EAAGE,EAAIF,EAAAG,EAAArB,EACzBsB,gBAAAA,OAAkB,IAAHD,EAAG,KAAIA,EAAAE,EAAAvB,EACtBwB,0BAAAA,OAA4B,IAAHD,EAAG,IAAGA,EAAAE,EAAAzB,EAC/B0B,aAAAA,OAAeN,IAAHK,EAAGL,EAAIK,EAAAE,EAAA3B,EACnB4B,mCAAAA,OAAqC,IAAHD,EAAG,KAAIA,EACzCE,EAAmB7B,EAAnB6B,oBACeC,EAAU9B,EAAzB,eAKF+B,EAAoCC,EAAS,GAAEC,EAAAC,EAAAH,EAAA,GAAxCI,EAAUF,EAAA,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D,EACxC7E,EAAmC6E,GAEvC,CACF,GAAG,CAAC7E,EAAoCvB,EAAO8D,GAAiBhC,EAAY4B,KAG1E4C,EAAAC,cAAA,MAAA,CACE3G,IAAKmD,GACLlD,UAAW2G,EAAGC,EAAOC,uBAAwB7G,GAC7CC,GAAIA,EAAE,cACO2B,GAAckF,EAAUC,EAAuBC,iBAAkB/G,IAE9EwG,EAACC,cAAAO,QACE,SAAAC,GAAyD,IAAtD1D,EAAM0D,EAAN1D,OAAQgC,EAAK0B,EAAL1B,MAEV,OADAD,GAAeC,EAAOhC,GAEpBiD,gBAACU,EAAI,CACHpH,IAAK6C,GACLY,OAAQA,EACRgC,MAAOA,EACP4B,YAAa5G,EACb6G,YAAajD,GACbkD,UAAWhH,EACXiH,SAAU9C,GACV5D,SAAUgE,GACVzD,gBAAiBsE,GACjB1F,UAAW2B,GAEVuD,GAGN,IAIT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={virtualizedGridWrapper:"
|
|
1
|
+
var e={virtualizedGridWrapper:"virtualizedGridWrapper_ed90ba68ea"};!function(e){const t="s_id-03a8eed790d8_4_5_10";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_ed90ba68ea {\n height: 100%;\n width: 100%;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=VirtualizedGrid.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e from"classnames";import i,{forwardRef as r,useState as o,useMemo as n,useRef as l,useCallback as a,useEffect as s}from"react";import{noop as c}from"es-toolkit";import{VariableSizeList as u}from"react-window";import f from"react-virtualized-auto-sizer";import d from"../../hooks/
|
|
1
|
+
import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e from"classnames";import i,{forwardRef as r,useState as o,useMemo as n,useRef as l,useCallback as a,useEffect as s}from"react";import{noop as c}from"es-toolkit";import{VariableSizeList as u}from"react-window";import f from"react-virtualized-auto-sizer";import d from"../../hooks/useThrottledCallback.js";import{getNormalizedItems as m,getMaxOffset as v,getOnItemsRenderedData as p,isLayoutDirectionScrollbarVisible as h,easeInOutQuint as I}from"../../services/virtualized-service.js";import{getTestId as S}from"../../tests/testIds.js";import{ComponentDefaultTestId as T}from"../../tests/constants.js";import O from"./VirtualizedList.module.scss.js";import g from"../../../hooks/dist/usePrevious/index.js";import{useMergeRef as z}from"../../../shared/dist/hooks/useMergeRef.js";var b=r((function(r,b){var j=r.className,y=r.id,C=r.items,R=void 0===C?[]:C,w=r.itemRenderer,F=void 0===w?function(t,e,i){return t}:w,x=r.getItemSize,L=void 0===x?function(t,e){return t.height}:x,k=r.layout,A=void 0===k?"vertical":k,D=r.onScroll,E=r.overscanCount,M=void 0===E?0:E,N=r.getItemId,U=void 0===N?function(t,e){return t.id}:N,V=r.scrollToId,_=r.scrollDuration,q=void 0===_?200:_,P=r.onScrollToFinished,W=void 0===P?c:P,B=r.onItemsRendered,H=r.onItemsRenderedThrottleMs,Z=void 0===H?200:H,G=r.onSizeUpdate,J=void 0===G?c:G,K=r.onLayoutDirectionScrollbarVisibilityChange,Q=void 0===K?null:K,X=r.virtualListRef,Y=r.scrollableClassName,$=r.role,tt=r["aria-label"],et=r.style,it=r["data-testid"],rt=o(0),ot=t(rt,2),nt=ot[0],lt=ot[1],at=o(0),st=t(at,2),ct=st[0],ut=st[1],ft="horizontal"!==A,dt=n((function(){return ft?nt:ct}),[ft,nt,ct]),mt=g(V),vt=l(null),pt=l(null),ht=l(null),It=l(0),St=l({initialized:!1,scrollOffsetInitial:0,scrollOffsetFinal:0,animationStartTime:0}),Tt=z(b,vt),Ot=z(X,ht),gt=St.current;gt.initialized||(gt.initialized=!0,gt.scrollOffsetInitial=0,gt.scrollOffsetFinal=0,gt.animationStartTime=0);var zt=a((function(t,e){var i=L(t,e);return void 0===i&&console.error("Couldn't get height for item: ",t),i}),[L]),bt=a((function(t,e){var i=U(t,e);return void 0===i&&console.error("Couldn't get id for item: ",t),i}),[U]),jt=n((function(){return m(R,bt,zt)}),[R,bt,zt]),yt=n((function(){return v(dt,jt)}),[dt,jt]),Ct=a((function(t){var e=t.scrollDirection,i=t.scrollOffset,r=t.scrollUpdateWasRequested;It.current=i,r||(gt.scrollOffsetInitial=i),D&&D(e,i,r)}),[D,It,gt]),Rt=a((function(){requestAnimationFrame((function(){var t,e=performance.now()-gt.animationStartTime,i=gt.scrollOffsetFinal-gt.scrollOffsetInitial,r=I(Math.min(1,e/q)),o=Math.min(yt,gt.scrollOffsetInitial+i*r);It.current=o,null===(t=ht.current)||void 0===t||t.scrollTo(o),q>e?Rt():(gt.animationStartTime=void 0,W&&W())}))}),[q,gt,ht,yt,W]),wt=a((function(t){var e,i,r,o,n=t.offsetTop;gt.animationStartTime?gt.scrollOffsetFinal=n:(null!==(null===(i=null===(e=ht.current)||void 0===e?void 0:e.state)||void 0===i?void 0:i.scrollOffset)&&(gt.scrollOffsetInitial=null===(o=null===(r=ht.current)||void 0===r?void 0:r.state)||void 0===o?void 0:o.scrollOffset),gt.scrollOffsetInitial!==n?(gt.scrollOffsetFinal=n,gt.animationStartTime=performance.now(),Rt()):W&&W())}),[gt,Rt,W]),Ft=a((function(t){var e=t.index;return F(R[e],e,t.style)}),[R,F]),xt=a((function(t){return zt(R[t],t)}),[R,zt]),Lt=a((function(t,e){e===nt&&t===ct||setTimeout((function(){lt(e),ut(t),J(t,e)}),0)}),[nt,ct,J]),kt=d((function(t){if(B){var e=p(R,jt,bt,t.visibleStartIndex,t.visibleStopIndex,dt,It.current);B(e)}}),{wait:Z,trailing:!0},[B,R,jt,bt,dt]);return s((function(){if(V&&mt!==V){var t=h(R,jt,bt,dt),e=jt[V];t&&e&&wt(e)}}),[mt,V,wt,jt,R,bt,dt]),s((function(){ht.current&&ht.current.resetAfterIndex(0)}),[jt]),s((function(){if(Q){var t=h(R,jt,bt,dt);pt.current!==t&&(pt.current=t,Q(t))}}),[Q,R,jt,dt,bt]),i.createElement("div",{ref:Tt,className:e(O.virtualizedListWrapper,j),id:y,role:$,"aria-label":tt,"data-testid":it||S(T.VIRTUALIZED_LIST,y),style:et},i.createElement(f,null,(function(t){var e=t.height,r=t.width;return Lt(r,e),i.createElement(u,{ref:Ot,height:e,width:r,itemCount:R.length,itemSize:xt,onScroll:Ct,layout:A,overscanCount:M,onItemsRendered:kt,className:Y},Ft)})))}));export{b as default};
|
|
2
2
|
//# sourceMappingURL=VirtualizedList.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 \"@vibe/shared\";\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":"w1BA2IMA,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,OAAgB,IAAHD,EAAG,EAACA,EAAAE,EAAAnB,EACjBoB,UAAAA,OAAS,IAAAD,EAAG,SAACX,EAA2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OyE,GAAiBF,GAAUzB,IACnF3C,EAAOsE,GAAgBzD,GAC7BqG,GAAgBlH,GAAQ4F,GAAqB5F,EAC/C,CACF,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,GAE/C,CACF,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 \"@vibe/hooks\";\nimport useThrottledCallback from \"../../hooks/useThrottledCallback\";\nimport { useMergeRef } from \"@vibe/shared\";\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":"g2BA2IMA,IAAAA,EAAkBC,GACtB,SAAAC,EAyBEC,GACE,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AAKyB,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,2 +1,2 @@
|
|
|
1
|
-
var e={virtualizedListWrapper:"
|
|
1
|
+
var e={virtualizedListWrapper:"virtualizedListWrapper_ed90ba68ea"};!function(e){const t="s_id-9250e4cf6c59_4_5_10";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,i.firstChild?i.insertBefore(d,i.firstChild):i.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.virtualizedListWrapper_ed90ba68ea {\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:"
|
|
1
|
+
var e={list:"list_4f6d081b3d"};!function(e){const t="s_id-39e4d9ed645a_4_5_10";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)}(".list_4f6d081b3d {\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:"
|
|
1
|
+
var e={listTitle:"listTitle_0362d296fe",small:"small_d1c36d0782",medium:"medium_a730168b97",large:"large_a730168b97",sticky:"sticky_a128cf6bb3"};!function(e){const n="s_id-7bd0f1d1374d_4_5_10";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_0362d296fe {\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\n.small_d1c36d0782 {\n padding: var(--space-16) var(--space-8) var(--space-8);\n}\n\n.medium_a730168b97 {\n padding: var(--space-16) 12px var(--space-8);\n}\n\n.large_a730168b97 {\n padding: var(--space-16) 12px var(--space-8);\n}\n\n.sticky_a128cf6bb3 {\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,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as e,useMemo as t,useEffect as n,useRef as s}from"react";import
|
|
1
|
+
import{useCallback as e,useMemo as t,useEffect as n,useRef as s}from"react";import{getNextSelectableIndex as o,getPreviousSelectableIndex as i}from"./useActiveDescendantListFocusHelpers.js";import u from"../useListenFocusTriggers/index.js";import c from"../../../hooks/dist/usePrevious/index.js";import{useKeyEvent as r}from"../../../shared/dist/hooks/useKeyEvent.js";import{useEventListener as l}from"../../../shared/dist/hooks/useEventListener.js";var a;!function(e){e.UP="ArrowUp",e.DOWN="ArrowDown",e.RIGHT="ArrowRight",e.LEFT="ArrowLeft"}(a||(a={}));var m="Enter";function d(t){var n=t.itemsCount,s=t.focusedElementRef,u=t.visualFocusItemIndex,c=t.setVisualFocusItemIndex,l=t.isHorizontalList,m=t.isItemSelectable,d=t.listenerOptions,I=t.triggeredByKeyboard,f=l?a.RIGHT:a.DOWN,v=l?a.LEFT:a.UP,F=e((function(e){var t;document.activeElement===s.current&&(!I.current&&(I.current=!0,u>-1)||(e===f?t=o({isItemSelectable:m,visualFocusItemIndex:u,itemsCount:n}):e===v&&(t=i({isItemSelectable:m,visualFocusItemIndex:u,itemsCount:n})),t>-1&&t!==u&&c(t)))}),[s,I,f,v,u,c,m,n]),b=e((function(){F(v)}),[v,F]),x=e((function(){F(f)}),[f,F]);r(Object.assign({keys:[f],callback:x},d)),r(Object.assign({keys:[v],callback:b},d))}function I(n){var s=n.visualFocusItemIndex,o=n.focusedElementRef,i=n.itemsCount,u=n.setVisualFocusItemIndex,c=n.onItemClick,l=n.isItemSelectable,a=n.listenerOptions,d=void 0===a?void 0:a,I=n.isIgnoreSpaceAsItemSelection,f=void 0!==I&&I,v=t((function(){return f?[m]:[m," "]}),[f]),F=e((function(e,t){c&&(t>=0&&i>t)&&l(t)&&(s!==t&&u(t),c(e,t))}),[i,c,l,s,u]),b=e((function(e){o.current.contains(document.activeElement)&&F(e,s)}),[F,o,s]);r(Object.assign({keys:v,callback:b},d))}function f(t){var s=t.focusedElementRef,o=t.visualFocusItemIndex,i=t.setVisualFocusItemIndex,u=c(s),r=e((function(){-1!==o&&i(-1)}),[i,o]);n((function(){null===(null==s?void 0:s.current)&&null!==(null==u?void 0:u.current)&&r()}),[s.current,u,r]),l({eventName:"blur",ref:s,callback:r})}function v(t){var n=t.focusedElementRef,i=t.isItemSelectable,c=t.visualFocusItemIndex,r=t.setVisualFocusItemIndex,l=t.itemsCount,a=t.defaultVisualFocusItemIndex,m=void 0===a?-1:a,d=s(!1),I=e((function(){var e;(d.current=!0,c!==m)&&(e=i(m)?m:o({isItemSelectable:i,itemsCount:l,visualFocusItemIndex:m}),r(e))}),[m,i,l,r,d,c]),f=e((function(){d.current=!1}),[d]);return u({ref:n,onFocusByKeyboard:I,onFocusByMouse:f}),{triggeredByKeyboard:d}}function F(e){var t=e.visualFocusItemIndex,s=e.itemsIds,i=e.isItemSelectable,u=e.setVisualFocusItemIndex,r=c(s);n((function(){var e;void 0!==r&&r!==s&&void 0!==r&&-1!==t?e=s.indexOf(r[t]):e=t;if(e!==t)if(i(e))u(e);else{var n=o({isItemSelectable:i,visualFocusItemIndex:e,itemsCount:s.length});u(n)}}),[t,s,i,u,r])}export{f as useCleanVisualFocusOnBlur,F as useKeepFocusOnItemWhenListChanged,v as useSetDefaultItemOnFocusEvent,d as useSupportArrowsKeyboardNavigation,I as useSupportPressItemKeyboardNavigation};
|
|
2
2
|
//# sourceMappingURL=useActiveDescendantListFocusHooks.js.map
|