@vibe/core 4.5.12 → 4.5.14
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/Table/Table/tableHelpers.d.ts +1 -1
- package/dist/components/a11y/dist/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/components/a11y/dist/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js +2 -0
- package/dist/components/a11y/dist/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js.map +1 -0
- package/dist/components/a11y/dist/useGridKeyboardNavigation/useGridKeyboardNavigation.js +2 -0
- package/dist/components/a11y/dist/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map +1 -0
- package/dist/components/avatar/dist/Avatar/Avatar.module.scss.js +1 -1
- package/dist/components/avatar/dist/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/components/avatar/dist/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/components/button/dist/Button/Button.module.scss.js +1 -1
- package/dist/components/button-group/dist/ButtonGroup/ButtonGroup.module.scss.js +1 -1
- package/dist/components/checkbox/dist/Checkbox/Checkbox.module.scss.js +1 -1
- package/dist/components/clickable/dist/Clickable/Clickable.module.scss.js +1 -1
- package/dist/components/color-picker/dist/ColorPicker/ColorPicker.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/color-picker/dist/ColorPicker/ColorPicker.module.scss.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/ColorPickerConstants.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/ColorPickerConstants.js.map +1 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js.map +1 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js.map +1 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +1 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js.map +1 -0
- package/dist/components/color-picker/dist/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/services/ColorPickerStyleService.js +2 -0
- package/dist/components/color-picker/dist/ColorPicker/services/ColorPickerStyleService.js.map +1 -0
- package/dist/components/counter/dist/Counter/Counter.module.scss.js +1 -1
- package/dist/components/dialog/dist/Dialog/Dialog.module.scss.js +1 -1
- package/dist/components/dialog/dist/Dialog/components/DialogContent/DialogContent.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.module.scss.js +1 -1
- package/dist/components/editable/dist/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/components/editable/dist/EditableText/EditableText.module.scss.js +1 -1
- package/dist/components/editable/dist/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/components/expand-collapse/dist/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
- package/dist/components/formatted-number/dist/FormattedNumber/FormattedNumber.module.scss.js +1 -1
- package/dist/components/icon/dist/Icon/Icon.module.scss.js +1 -1
- package/dist/components/icon-button/dist/IconButton/IconButton.module.scss.js +1 -1
- package/dist/components/index.d.ts +3 -3
- package/dist/components/label/dist/Label/Label.module.scss.js +1 -1
- package/dist/components/label/dist/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- 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.module.scss.js +1 -1
- package/dist/components/loader/dist/Loader/Loader.module.scss.js +1 -1
- package/dist/components/progress-bars/dist/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/Bar/Bar.module.scss.js +1 -1
- package/dist/components/progress-bars/dist/ProgressBars/ProgressBar/ProgressBar.module.scss.js +1 -1
- package/dist/components/radio-button/dist/RadioButton/RadioButton.module.scss.js +1 -1
- package/dist/components/skeleton/dist/Skeleton/Skeleton.js +2 -0
- package/dist/components/skeleton/dist/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/skeleton/dist/Skeleton/Skeleton.module.scss.js +2 -0
- package/dist/components/skeleton/dist/Skeleton/SkeletonConstants.js +2 -0
- package/dist/components/skeleton/dist/Skeleton/SkeletonConstants.js.map +1 -0
- package/dist/components/tabs/dist/Tab/Tab.js +2 -0
- package/dist/components/tabs/dist/Tab/Tab.js.map +1 -0
- package/dist/components/tabs/dist/Tab/Tab.module.scss.js +2 -0
- package/dist/components/tabs/dist/TabList/TabList.js +2 -0
- package/dist/components/tabs/dist/TabList/TabList.js.map +1 -0
- package/dist/components/tabs/dist/TabList/TabList.module.scss.js +2 -0
- package/dist/components/tabs/dist/TabPanel/TabPanel.js +2 -0
- package/dist/components/tabs/dist/TabPanel/TabPanel.js.map +1 -0
- package/dist/components/tabs/dist/TabPanel/TabPanel.module.scss.js +2 -0
- package/dist/components/tabs/dist/TabPanels/TabPanels.js +2 -0
- package/dist/components/tabs/dist/TabPanels/TabPanels.js.map +1 -0
- package/dist/components/tabs/dist/TabPanels/TabPanels.module.scss.js +2 -0
- package/dist/components/tabs/dist/TabsContext/TabsContext.js +2 -0
- package/dist/components/tabs/dist/TabsContext/TabsContext.js.map +1 -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/index.d.ts +1 -1
- package/dist/metadata/components.json +132 -13
- package/dist/metadata.json +132 -13
- package/dist/mocked_classnames/components/Table/Table/tableHelpers.d.ts +1 -1
- package/dist/mocked_classnames/components/index.d.ts +3 -3
- package/dist/mocked_classnames/hooks/index.d.ts +1 -1
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/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.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.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.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +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/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/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.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/hooks/useMenuKeyboardNavigation.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/Menu/hooks/useMenuKeyboardNavigation.js.map +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +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.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.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Search/Search.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/Table/tableHelpers.js.map +1 -1
- package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.js.map +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/TextArea/TextArea.module.scss.js +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.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/MockToggle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/Toggle.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/ToggleText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +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/index.js +1 -1
- package/dist/mocked_classnames/src/utils/colors-utils.js.map +1 -1
- package/dist/shared/dist/constants/keyCodes.js +1 -1
- package/dist/shared/dist/constants/keyCodes.js.map +1 -1
- package/dist/shared/dist/hooks/useFullKeyboardListeners.js +2 -0
- package/dist/shared/dist/hooks/useFullKeyboardListeners.js.map +1 -0
- package/dist/shared/dist/hooks/useLastNavigationDirection.js +1 -1
- package/dist/shared/dist/utils/colors-utils.js +2 -0
- package/dist/shared/dist/utils/colors-utils.js.map +1 -0
- package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxCloseButton/AttentionBoxCloseButton.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLeadingIcon/AttentionBoxLeadingIcon.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/components/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxCompact/AttentionBoxCompact.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/layouts/AttentionBoxDefault/AttentionBoxDefault.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounterTooltipContentVirtualizedList.module.scss.js +1 -1
- package/dist/src/components/Badge/Badge.module.scss.js +1 -1
- package/dist/src/components/Badge/Indicator/Indicator.module.scss.js +1 -1
- package/dist/src/components/BaseItem/BaseItem.module.scss.js +1 -1
- package/dist/src/components/BaseList/BaseList.module.scss.js +1 -1
- package/dist/src/components/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.module.scss.js +1 -1
- package/dist/src/components/Combobox/Combobox.module.scss.js +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.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/DropdownBoxMode/DropdownBoxMode.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/MultiSelectedValues/MultiSelectedValues.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/Trigger/Trigger.module.scss.js +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/Info/components/InfoDialogContent/InfoDialogContent.module.scss.js +1 -1
- package/dist/src/components/Info/components/InfoLink/InfoLink.module.scss.js +1 -1
- package/dist/src/components/InfoText/InfoText.module.scss.js +1 -1
- package/dist/src/components/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.module.scss.js +1 -1
- package/dist/src/components/ListItemIcon/ListItemIcon.module.scss.js +1 -1
- package/dist/src/components/ListTitle/ListTitle.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/Menu.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/hooks/useMenuKeyboardNavigation.js +1 -1
- package/dist/src/components/Menu/Menu/hooks/useMenuKeyboardNavigation.js.map +1 -1
- package/dist/src/components/Menu/MenuDivider/MenuDivider.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/MenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemIcon/MenuItemIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/MenuItemSubMenuIcon/MenuItemSubMenuIcon.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuItemButton/MenuItemButton.module.scss.js +1 -1
- package/dist/src/components/Menu/MenuTitle/MenuTitle.module.scss.js +1 -1
- package/dist/src/components/MenuButton/MenuButton.module.scss.js +1 -1
- package/dist/src/components/Modal/Modal/Modal.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.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.module.scss.js +1 -1
- package/dist/src/components/MultiStepIndicator/components/StepIndicator/StepIndicator.module.scss.js +1 -1
- package/dist/src/components/NumberField/NumberField.module.scss.js +1 -1
- package/dist/src/components/NumberField/components/NumberFieldSpinButton/NumberFieldSpinButton.module.scss.js +1 -1
- package/dist/src/components/Search/Search.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/Table/tableHelpers.js.map +1 -1
- package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.js +1 -1
- package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.js.map +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/TextArea/TextArea.module.scss.js +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.module.scss.js +1 -1
- package/dist/src/components/Toast/ToastLink/ToastLink.module.scss.js +1 -1
- package/dist/src/components/Toggle/MockToggle.module.scss.js +1 -1
- package/dist/src/components/Toggle/Toggle.module.scss.js +1 -1
- package/dist/src/components/Toggle/ToggleText.module.scss.js +1 -1
- package/dist/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/src/components/VirtualizedGrid/VirtualizedGrid.module.scss.js +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/index.js +1 -1
- package/dist/src/utils/colors-utils.js.map +1 -1
- package/dist/style/dist/index.min.css.js +1 -1
- package/package.json +31 -28
- package/dist/components/ColorPicker/ColorPicker.d.ts +0 -80
- package/dist/components/ColorPicker/ColorPicker.types.d.ts +0 -6
- package/dist/components/ColorPicker/ColorPickerConstants.d.ts +0 -5
- package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.d.ts +0 -19
- package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.d.ts +0 -63
- package/dist/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.d.ts +0 -84
- package/dist/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.d.ts +0 -57
- package/dist/components/ColorPicker/index.d.ts +0 -3
- package/dist/components/ColorPicker/services/ColorPickerStyleService.d.ts +0 -3
- package/dist/components/Skeleton/Skeleton.d.ts +0 -31
- package/dist/components/Skeleton/SkeletonConstants.d.ts +0 -1
- package/dist/components/Skeleton/Skelton.types.d.ts +0 -4
- package/dist/components/Skeleton/index.d.ts +0 -2
- package/dist/components/Tabs/Tab/Tab.d.ts +0 -64
- package/dist/components/Tabs/TabList/TabList.d.ts +0 -35
- package/dist/components/Tabs/TabPanel/TabPanel.d.ts +0 -14
- package/dist/components/Tabs/TabPanels/TabPanels.d.ts +0 -20
- package/dist/components/Tabs/TabPanels/TabPanels.types.d.ts +0 -1
- package/dist/components/Tabs/TabsContext/TabsContext.d.ts +0 -14
- package/dist/components/Tabs/index.d.ts +0 -6
- package/dist/hooks/useFullKeyboardListeners.d.ts +0 -20
- package/dist/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.d.ts +0 -20
- package/dist/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.d.ts +0 -42
- package/dist/mocked_classnames/components/ColorPicker/ColorPicker.d.ts +0 -80
- package/dist/mocked_classnames/components/ColorPicker/ColorPicker.types.d.ts +0 -6
- package/dist/mocked_classnames/components/ColorPicker/ColorPickerConstants.d.ts +0 -5
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.d.ts +0 -19
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.d.ts +0 -63
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.d.ts +0 -84
- package/dist/mocked_classnames/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.d.ts +0 -57
- package/dist/mocked_classnames/components/ColorPicker/index.d.ts +0 -3
- package/dist/mocked_classnames/components/ColorPicker/services/ColorPickerStyleService.d.ts +0 -3
- package/dist/mocked_classnames/components/Skeleton/Skeleton.d.ts +0 -31
- package/dist/mocked_classnames/components/Skeleton/SkeletonConstants.d.ts +0 -1
- package/dist/mocked_classnames/components/Skeleton/Skelton.types.d.ts +0 -4
- package/dist/mocked_classnames/components/Skeleton/index.d.ts +0 -2
- package/dist/mocked_classnames/components/Tabs/Tab/Tab.d.ts +0 -64
- package/dist/mocked_classnames/components/Tabs/TabList/TabList.d.ts +0 -35
- package/dist/mocked_classnames/components/Tabs/TabPanel/TabPanel.d.ts +0 -14
- package/dist/mocked_classnames/components/Tabs/TabPanels/TabPanels.d.ts +0 -20
- package/dist/mocked_classnames/components/Tabs/TabPanels/TabPanels.types.d.ts +0 -1
- package/dist/mocked_classnames/components/Tabs/TabsContext/TabsContext.d.ts +0 -14
- package/dist/mocked_classnames/components/Tabs/index.d.ts +0 -6
- package/dist/mocked_classnames/hooks/useFullKeyboardListeners.d.ts +0 -20
- package/dist/mocked_classnames/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.d.ts +0 -20
- package/dist/mocked_classnames/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.d.ts +0 -42
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.js.map +0 -1
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPickerConstants.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPickerConstants.js.map +0 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js.map +0 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js.map +0 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +0 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js.map +0 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/services/ColorPickerStyleService.js +0 -2
- package/dist/mocked_classnames/src/components/ColorPicker/services/ColorPickerStyleService.js.map +0 -1
- package/dist/mocked_classnames/src/components/Skeleton/Skeleton.js +0 -2
- package/dist/mocked_classnames/src/components/Skeleton/Skeleton.js.map +0 -1
- package/dist/mocked_classnames/src/components/Skeleton/Skeleton.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Skeleton/SkeletonConstants.js +0 -2
- package/dist/mocked_classnames/src/components/Skeleton/SkeletonConstants.js.map +0 -1
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js.map +0 -1
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.js.map +0 -1
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.js.map +0 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.js.map +0 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.module.scss.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabsContext/TabsContext.js +0 -2
- package/dist/mocked_classnames/src/components/Tabs/TabsContext/TabsContext.js.map +0 -1
- package/dist/mocked_classnames/src/hooks/useFullKeyboardListeners.js +0 -2
- package/dist/mocked_classnames/src/hooks/useFullKeyboardListeners.js.map +0 -1
- package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js +0 -2
- package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js.map +0 -1
- package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js +0 -2
- package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map +0 -1
- package/dist/src/components/ColorPicker/ColorPicker.js +0 -2
- package/dist/src/components/ColorPicker/ColorPicker.js.map +0 -1
- package/dist/src/components/ColorPicker/ColorPicker.module.scss.js +0 -2
- package/dist/src/components/ColorPicker/ColorPicker.module.scss.js.map +0 -1
- package/dist/src/components/ColorPicker/ColorPickerConstants.js +0 -2
- package/dist/src/components/ColorPicker/ColorPickerConstants.js.map +0 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js +0 -2
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js.map +0 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +0 -2
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js.map +0 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js +0 -2
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js.map +0 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +0 -2
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js.map +0 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js +0 -2
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map +0 -1
- package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js +0 -2
- package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.js.map +0 -1
- package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +0 -2
- package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js.map +0 -1
- package/dist/src/components/ColorPicker/services/ColorPickerStyleService.js +0 -2
- package/dist/src/components/ColorPicker/services/ColorPickerStyleService.js.map +0 -1
- package/dist/src/components/Skeleton/Skeleton.js +0 -2
- package/dist/src/components/Skeleton/Skeleton.js.map +0 -1
- package/dist/src/components/Skeleton/Skeleton.module.scss.js +0 -2
- package/dist/src/components/Skeleton/Skeleton.module.scss.js.map +0 -1
- package/dist/src/components/Skeleton/SkeletonConstants.js +0 -2
- package/dist/src/components/Skeleton/SkeletonConstants.js.map +0 -1
- package/dist/src/components/Tabs/Tab/Tab.js +0 -2
- package/dist/src/components/Tabs/Tab/Tab.js.map +0 -1
- package/dist/src/components/Tabs/Tab/Tab.module.scss.js +0 -2
- package/dist/src/components/Tabs/Tab/Tab.module.scss.js.map +0 -1
- package/dist/src/components/Tabs/TabList/TabList.js +0 -2
- package/dist/src/components/Tabs/TabList/TabList.js.map +0 -1
- package/dist/src/components/Tabs/TabList/TabList.module.scss.js +0 -2
- package/dist/src/components/Tabs/TabList/TabList.module.scss.js.map +0 -1
- package/dist/src/components/Tabs/TabPanel/TabPanel.js +0 -2
- package/dist/src/components/Tabs/TabPanel/TabPanel.js.map +0 -1
- package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js +0 -2
- package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js.map +0 -1
- package/dist/src/components/Tabs/TabPanels/TabPanels.js +0 -2
- package/dist/src/components/Tabs/TabPanels/TabPanels.js.map +0 -1
- package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js +0 -2
- package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js.map +0 -1
- package/dist/src/components/Tabs/TabsContext/TabsContext.js +0 -2
- package/dist/src/components/Tabs/TabsContext/TabsContext.js.map +0 -1
- package/dist/src/hooks/useFullKeyboardListeners.js +0 -2
- package/dist/src/hooks/useFullKeyboardListeners.js.map +0 -1
- package/dist/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js +0 -2
- package/dist/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js.map +0 -1
- package/dist/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js +0 -2
- package/dist/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map +0 -1
- /package/dist/{mocked_classnames/src/components → components/color-picker/dist}/ColorPicker/ColorPicker.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/color-picker/dist}/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/color-picker/dist}/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/color-picker/dist}/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components → components/skeleton/dist}/Skeleton/Skeleton.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components/Tabs → components/tabs/dist}/Tab/Tab.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components/Tabs → components/tabs/dist}/TabList/TabList.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components/Tabs → components/tabs/dist}/TabPanel/TabPanel.module.scss.js.map +0 -0
- /package/dist/{mocked_classnames/src/components/Tabs → components/tabs/dist}/TabPanels/TabPanels.module.scss.js.map +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerItemComponent.js","sources":["../../../../../../../src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { getStyle } from \"@vibe/shared\";\nimport cx from \"classnames\";\nimport React, { useRef, useCallback, useMemo, forwardRef, useEffect } from \"react\";\nimport { contentColors } from \"../../../../utils/colors-vars-map\";\nimport ColorUtils from \"../../../../utils/colors-utils\";\nimport { Icon } from \"@vibe/icon\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport { Clickable } from \"@vibe/clickable\";\nimport { type ColorPickerValueOnly } from \"../../ColorPicker.types\";\nimport { type ColorShapes, type ColorPickerSizes } from \"../../ColorPicker.types\";\nimport { getTestId } from \"../../../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../../../tests/constants\";\nimport { type VibeComponentProps, type ElementContent, type ColorStyle } from \"../../../../types\";\nimport { type SubIcon } from \"@vibe/icon\";\nimport styles from \"./ColorPickerItemComponent.module.scss\";\n\nexport interface ColorPickerItemComponentProps extends VibeComponentProps {\n /**\n * The color value of the item.\n */\n color: ColorPickerValueOnly;\n /**\n * Callback fired when the color is clicked.\n */\n onColorClicked: (color: ColorPickerValueOnly) => void;\n /**\n * The style applied to the color.\n */\n colorStyle: ColorStyle;\n /**\n * If true, renders the color indicator without a background.\n */\n shouldRenderIndicatorWithoutBackground: boolean;\n /**\n * Icon displayed inside the color item.\n */\n ColorIndicatorIcon: SubIcon;\n /**\n * Icon displayed when the color is selected.\n */\n SelectedIndicatorIcon: SubIcon;\n /**\n * If true, the color is marked as selected.\n */\n isSelected: boolean;\n /**\n * The size of the color item.\n */\n colorSize: ColorPickerSizes;\n /**\n * Tooltip content for the color item.\n */\n tooltipContent: ElementContent;\n /**\n * If true, the color item is currently active.\n */\n isActive: boolean;\n /**\n * The shape of the color item.\n */\n colorShape: ColorShapes;\n /**\n * Human-readable label for the color, used for screen reader announcements.\n */\n colorAriaLabel: string;\n}\n\nconst ColorPickerItemComponent = forwardRef(\n (\n {\n color,\n onColorClicked,\n colorStyle = \"regular\",\n shouldRenderIndicatorWithoutBackground,\n ColorIndicatorIcon,\n SelectedIndicatorIcon = ColorIndicatorIcon,\n isSelected,\n colorSize,\n tooltipContent,\n isActive,\n colorShape,\n colorAriaLabel,\n id,\n \"data-testid\": dataTestId\n }: ColorPickerItemComponentProps,\n _ref: React.ForwardedRef<HTMLElement>\n ) => {\n const isMondayColor = useMemo(() => (contentColors as readonly string[]).includes(color), [color]); // casting to any since color can be one of the system content colors but can also be a custom one\n const colorAsStyle = isMondayColor ? ColorUtils.getMondayColorAsStyle(color, colorStyle) : color;\n const itemRef = useRef<HTMLDivElement>(null);\n\n const onClick = useCallback(() => onColorClicked(color), [onColorClicked, color]);\n\n useEffect(() => {\n if (!itemRef?.current || shouldRenderIndicatorWithoutBackground || !isMondayColor) return;\n const item = itemRef.current;\n const setHoverColor = (e: MouseEvent) => {\n if (colorStyle === \"selected\") {\n (e.target as HTMLDivElement).style.background = ColorUtils.getMondayColorAsStyle(color, \"regular\");\n } else {\n (e.target as HTMLDivElement).style.background = ColorUtils.getMondayColorAsStyle(color, \"hover\");\n }\n };\n const restoreToOriginalColor = (e: MouseEvent) => {\n (e.target as HTMLDivElement).style.background = colorAsStyle;\n };\n item.addEventListener(\"mouseenter\", setHoverColor, false);\n item.addEventListener(\"mouseleave\", restoreToOriginalColor, false);\n\n return () => {\n item.removeEventListener(\"mouseenter\", setHoverColor, false);\n item.removeEventListener(\"mouseleave\", restoreToOriginalColor, false);\n };\n }, [color, colorAsStyle, colorStyle, isMondayColor, itemRef, shouldRenderIndicatorWithoutBackground]);\n\n const shouldRenderIcon = isSelected || ColorIndicatorIcon;\n const colorIndicatorWrapperStyle = shouldRenderIndicatorWithoutBackground ? { color: colorAsStyle } : {};\n return (\n <Tooltip content={tooltipContent}>\n <li\n id={id}\n role=\"option\"\n aria-selected={isSelected}\n className={cx(styles.itemWrapper, {\n [styles.selectedColor]: isSelected,\n [styles.active]: isActive,\n [styles.circle]: colorShape === \"circle\"\n })}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.COLOR_PICKER_ITEM, color)}\n >\n <div className={cx(styles.feedbackIndicator)} />\n <Clickable\n ref={itemRef}\n role=\"presentation\"\n aria-label={colorAriaLabel}\n className={cx(styles.colorItem, getStyle(styles, camelCase(\"color-item-size-\" + colorSize)), {\n [styles.colorItemTextMode]: shouldRenderIndicatorWithoutBackground\n })}\n style={{ background: shouldRenderIndicatorWithoutBackground ? \"transparent\" : colorAsStyle }}\n onClick={onClick}\n tabIndex={-1}\n onMouseDown={e => e.preventDefault()} // this is for quill to not lose the selection\n >\n <div className={cx(styles.colorIndicatorWrapper)} style={colorIndicatorWrapperStyle}>\n {shouldRenderIcon && (\n <Icon\n icon={isSelected ? SelectedIndicatorIcon : ColorIndicatorIcon}\n className={cx({\n [styles.colorIconWhite]: !shouldRenderIndicatorWithoutBackground\n })}\n ignoreFocusStyle\n />\n )}\n </div>\n </Clickable>\n </li>\n </Tooltip>\n );\n }\n);\n\nexport default ColorPickerItemComponent;\n"],"names":["ColorPickerItemComponent","forwardRef","_ref2","_ref","color","onColorClicked","_ref2$colorStyle","colorStyle","shouldRenderIndicatorWithoutBackground","ColorIndicatorIcon","_ref2$SelectedIndicat","SelectedIndicatorIcon","isSelected","colorSize","tooltipContent","isActive","colorShape","colorAriaLabel","id","dataTestId","isMondayColor","useMemo","contentColors","includes","colorAsStyle","ColorUtils","getMondayColorAsStyle","itemRef","useRef","onClick","useCallback","useEffect","current","item","setHoverColor","e","target","style","background","restoreToOriginalColor","addEventListener","removeEventListener","shouldRenderIcon","colorIndicatorWrapperStyle","React","createElement","Tooltip","content","role","className","cx","styles","itemWrapper","_defineProperty","selectedColor","active","circle","getTestId","ComponentDefaultTestId","COLOR_PICKER_ITEM","feedbackIndicator","Clickable","ref","colorItem","getStyle","camelCase","colorItemTextMode","tabIndex","onMouseDown","preventDefault","colorIndicatorWrapper","Icon","icon","colorIconWhite","ignoreFocusStyle"],"mappings":"uvBAoEMA,IAAAA,EAA2BC,GAC/B,SAAAC,EAiBEC,GACE,IAhBAC,EAAKF,EAALE,MACAC,EAAcH,EAAdG,eAAcC,EAAAJ,EACdK,WAAAA,OAAa,IAAHD,EAAG,UAASA,EACtBE,EAAsCN,EAAtCM,uCACAC,EAAkBP,EAAlBO,mBAAkBC,EAAAR,EAClBS,sBAAAA,OAAwBF,IAAHC,EAAGD,EAAkBC,EAC1CE,EAAUV,EAAVU,WACAC,EAASX,EAATW,UACAC,EAAcZ,EAAdY,eACAC,EAAQb,EAARa,SACAC,EAAUd,EAAVc,WACAC,EAAcf,EAAde,eACAC,EAAEhB,EAAFgB,GACeC,EAAUjB,EAAzB,eAIIkB,EAAgBC,GAAQ,WAAA,OAAOC,EAAoCC,SAASnB,EAAM,GAAE,CAACA,IACrFoB,EAAeJ,EAAgBK,EAAWC,sBAAsBtB,EAAOG,GAAcH,EACrFuB,EAAUC,EAAuB,MAEjCC,EAAUC,GAAY,WAAA,OAAMzB,EAAeD,EAAM,GAAE,CAACC,EAAgBD,IAE1E2B,GAAU,WACR,IAAKJ,aAAA,EAAAA,EAASK,WAAWxB,GAA2CY,EAApE,CACA,IAAMa,EAAON,EAAQK,QACfE,EAAgB,SAACC,GAElBA,EAAEC,OAA0BC,MAAMC,WAAab,EAAWC,sBAAsBtB,EADhE,aAAfG,EACsF,UAEA,UAGtFgC,EAAyB,SAACJ,GAC7BA,EAAEC,OAA0BC,MAAMC,WAAad,GAKlD,OAHAS,EAAKO,iBAAiB,aAAcN,GAAe,GACnDD,EAAKO,iBAAiB,aAAcD,GAAwB,GAErD,WACLN,EAAKQ,oBAAoB,aAAcP,GAAe,GACtDD,EAAKQ,oBAAoB,aAAcF,GAAwB,GAjBkB,CAmBrF,GAAG,CAACnC,EAAOoB,EAAcjB,EAAYa,EAAeO,EAASnB,IAE7D,IAAMkC,EAAmB9B,GAAcH,EACjCkC,EAA6BnC,EAAyC,CAAEJ,MAAOoB,GAAiB,GACtG,OACEoB,EAACC,cAAAC,EAAQ,CAAAC,QAASjC,GAChB8B,EAAAC,cAAA,KAAA,CACE3B,GAAIA,EACJ8B,KAAK,SAAQ,gBACEpC,EACfqC,UAAWC,EAAGC,EAAOC,YAAWC,EAAAA,EAAAA,EAAA,CAAA,EAC7BF,EAAOG,cAAgB1C,GACvBuC,EAAOI,OAASxC,GAChBoC,EAAOK,OAAwB,WAAfxC,IACjB,cACWG,GAAcsC,EAAUC,EAAuBC,kBAAmBvD,IAE/EwC,EAAKC,cAAA,MAAA,CAAAI,UAAWC,EAAGC,EAAOS,qBAC1BhB,EAAAC,cAACgB,EAAS,CACRC,IAAKnC,EACLqB,KAAK,eAAc,aACP/B,EACZgC,UAAWC,EAAGC,EAAOY,UAAWC,EAASb,EAAQc,EAAU,mBAAqBpD,IAAWwC,EAAA,CAAA,EACxFF,EAAOe,kBAAoB1D,IAE9B6B,MAAO,CAAEC,WAAY9B,EAAyC,cAAgBgB,GAC9EK,QAASA,EACTsC,UAAW,EACXC,YAAa,SAAAjC,GAAC,OAAIA,EAAEkC,gBAAgB,GAEpCzB,EAAAC,cAAA,MAAA,CAAKI,UAAWC,EAAGC,EAAOmB,uBAAwBjC,MAAOM,GACtDD,GACCE,EAAAC,cAAC0B,EAAI,CACHC,KAAM5D,EAAaD,EAAwBF,EAC3CwC,UAAWC,EAAEG,EACVF,CAAAA,EAAAA,EAAOsB,gBAAkBjE,IAE5BkE,kBACA,OAOhB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={itemWrapper:"itemWrapper",circle:"circle",feedbackIndicator:"feedbackIndicator",active:"active",selectedColor:"selectedColor",colorItem:"colorItem",colorIndicatorWrapper:"colorIndicatorWrapper",colorItemSizeSmall:"colorItemSizeSmall",colorItemSizeMedium:"colorItemSizeMedium",colorItemSizeLarge:"colorItemSizeLarge",colorItemTextMode:"colorItemTextMode",colorIconWhite:"colorIconWhite"};!function(e){const r="s_id-4f41e3ef6859_4_5_11";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+r))return;const o=document.createElement("style");o.id=r,n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[r]=e)}('.itemWrapper.circle {\n --border-radius-multiplier: 99999;\n}\n\n/* stylelint-disable scss/operator-no-unspaced */\n\n.itemWrapper {\n --border-radius-multiplier: 1;\n margin: 4px;\n display: flex;\n list-style-type: none;\n position: relative;\n}\n\n.itemWrapper .feedbackIndicator {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.itemWrapper:focus,\n.itemWrapper:focus-visible,\n.itemWrapper.active {\n outline: none;\n}\n\n.itemWrapper:focus .feedbackIndicator:before,\n.itemWrapper:focus-visible .feedbackIndicator:before,\n.itemWrapper.active .feedbackIndicator:before {\n content: " ";\n position: absolute;\n border-radius: calc(7px * var(--border-radius-multiplier, 1));\n inset: -4px;\n border: 4px solid;\n border-color: var(--primary-selected-color);\n pointer-events: none;\n}\n\n.itemWrapper:focus .feedbackIndicator:after,\n.itemWrapper:focus-visible .feedbackIndicator:after,\n.itemWrapper.active .feedbackIndicator:after {\n content: " ";\n position: absolute;\n border-radius: calc(7px * var(--border-radius-multiplier, 1));\n inset: -1px;\n border: 1px solid;\n border-color: var(--primary-color);\n pointer-events: none;\n}\n\n/* active elements have no "hover feedback" */\n\n.itemWrapper:hover:not(.active):not(.selectedColor) .feedbackIndicator {\n content: " ";\n position: absolute;\n border-radius: calc(8px * var(--border-radius-multiplier, 1));\n inset: -4px;\n border: 4px solid;\n border-color: var(--primary-background-hover-color);\n pointer-events: none;\n}\n\n.itemWrapper .colorItem {\n display: flex;\n justify-content: center;\n align-items: center;\n border: 2px solid transparent;\n border-radius: calc(4px * var(--border-radius-multiplier, 1));\n cursor: pointer;\n}\n\n.itemWrapper .colorItem .colorIndicatorWrapper {\n display: flex;\n}\n\n.itemWrapper .colorItem.colorItemSizeSmall {\n width: 24px;\n height: 24px;\n}\n\n.itemWrapper .colorItem.colorItemSizeMedium {\n width: 32px;\n height: 32px;\n}\n\n.itemWrapper .colorItem.colorItemSizeLarge {\n width: 40px;\n height: 40px;\n}\n\n.itemWrapper.selectedColor {\n position: relative;\n}\n\n.itemWrapper.selectedColor:before {\n content: " ";\n position: absolute;\n border-radius: calc(7px * var(--border-radius-multiplier, 1));\n inset: -4px;\n border: 2px solid;\n border-color: var(--primary-color);\n pointer-events: none;\n}\n\n.itemWrapper.selectedColor .feedbackIndicator:before {\n /* hide the outer border from the "active" feedback indicator */\n display: none;\n}\n\n.itemWrapper .colorItemTextMode:hover {\n background-color: var(--primary-background-hover-color) !important;\n}\n\n.itemWrapper .colorIconWhite {\n color: var(--color-snow_white);\n}');export{e as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerItemComponent.module.scss.js.map
|
package/dist/mocked_classnames/src/components/ColorPicker/services/ColorPickerStyleService.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{COLOR_SIZES as r,COLOR_PADDING as n,DIALOG_WIDTH_PADDING as o}from"../ColorPickerConstants.js";var t=function(o,t){return t*(r[o]+n)},e=function(r,n){return t(r,n)+o};export{e as calculateColorPickerDialogWidth,t as calculateColorPickerWidth};
|
|
2
|
-
//# sourceMappingURL=ColorPickerStyleService.js.map
|
package/dist/mocked_classnames/src/components/ColorPicker/services/ColorPickerStyleService.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerStyleService.js","sources":["../../../../../../src/components/ColorPicker/services/ColorPickerStyleService.ts"],"sourcesContent":["import { DIALOG_WIDTH_PADDING, COLOR_SIZES, COLOR_PADDING } from \"../ColorPickerConstants\";\nimport { type BaseSizes } from \"../../../constants/sizes\";\n\nexport const calculateColorPickerWidth = (colorSize: BaseSizes, numberOfColorsInLine: number) => {\n return numberOfColorsInLine * (COLOR_SIZES[colorSize] + COLOR_PADDING);\n};\n\nexport const calculateColorPickerDialogWidth = (colorSize: BaseSizes, numberOfColorsInLine: number) => {\n return calculateColorPickerWidth(colorSize, numberOfColorsInLine) + DIALOG_WIDTH_PADDING;\n};\n"],"names":["calculateColorPickerWidth","colorSize","numberOfColorsInLine","COLOR_SIZES","COLOR_PADDING","calculateColorPickerDialogWidth","DIALOG_WIDTH_PADDING"],"mappings":"sGAGO,IAAMA,EAA4B,SAACC,EAAsBC,GAC9D,OAAOA,GAAwBC,EAAYF,GAAaG,EAC1D,EAEaC,EAAkC,SAACJ,EAAsBC,GACpE,OAAOF,EAA0BC,EAAWC,GAAwBI,CACtE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e from"react";import{camelCase as s}from"es-toolkit";import{getTestId as r,ComponentDefaultTestId as i}from"../../tests/testIds.js";import o from"classnames";import{SKELETON_CUSTOM_SIZE as a}from"./SkeletonConstants.js";import{getStyle as l}from"@vibe/shared";import m from"./Skeleton.module.scss.js";var d=function(d){var n=d.type,p=d.size,f=d.className,c=d.width,u=d.height,h=d.fullWidth,v=void 0!==h&&h,g=d.id,N=d["data-testid"],j=(void 0===n?"rectangle":n)||"rectangle",k=(void 0===p?"custom":p)||a;return e.createElement("div",{id:g,className:o(m.skeleton,d.wrapperClassName,t({},m.fullWidth,v)),"data-testid":N||r(i.SKELETON,g)},e.createElement("div",{className:o(m[j],l(m,s(j+"-"+k)),f,t({},m.fullWidth,v)),style:{width:c,height:u}}))};export{d as default};
|
|
2
|
-
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sources":["../../../../../src/components/Skeleton/Skeleton.tsx"],"sourcesContent":["import React from \"react\";\nimport { camelCase } from \"es-toolkit\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport { SKELETON_CUSTOM_SIZE } from \"./SkeletonConstants\";\nimport { type SkeletonType, type SkeletonSizeType } from \"./Skelton.types\";\nimport { getStyle } from \"@vibe/shared\";\nimport { type VibeComponentProps } from \"../../types\";\nimport styles from \"./Skeleton.module.scss\";\n\nexport interface SkeletonProps extends VibeComponentProps {\n /**\n * The type of skeleton.\n */\n type?: SkeletonType;\n /**\n * The predefined size of the skeleton.\n */\n size?: SkeletonSizeType;\n /**\n * The width of the skeleton in pixels.\n */\n width?: number;\n /**\n * The height of the skeleton in pixels.\n */\n height?: number;\n /**\n * Class name applied to the wrapper element.\n */\n wrapperClassName?: string;\n /**\n * If true, the skeleton will take up the full width of its container.\n */\n fullWidth?: boolean;\n}\n\nconst Skeleton = ({\n type = \"rectangle\",\n size = \"custom\",\n className,\n wrapperClassName,\n width,\n height,\n fullWidth = false,\n id,\n \"data-testid\": dataTestId\n}: SkeletonProps) => {\n const skeletonType = type || \"rectangle\";\n\n // Skeleton has sizes only for text type, other types support only custom size\n const skeletonSize = size || SKELETON_CUSTOM_SIZE;\n\n return (\n <div\n id={id}\n className={cx(styles.skeleton, wrapperClassName, { [styles.fullWidth]: fullWidth })}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.SKELETON, id)}\n >\n <div\n className={cx(styles[skeletonType], getStyle(styles, camelCase(skeletonType + \"-\" + skeletonSize)), className, {\n [styles.fullWidth]: fullWidth\n })}\n style={{ width, height }}\n />\n </div>\n );\n};\n\nexport default Skeleton;\n"],"names":["Skeleton","_ref","_ref$type","type","_ref$size","size","className","width","height","_ref$fullWidth","fullWidth","id","dataTestId","skeletonType","skeletonSize","SKELETON_CUSTOM_SIZE","React","createElement","cx","styles","skeleton","wrapperClassName","_defineProperty","getTestId","ComponentDefaultTestId","SKELETON","getStyle","camelCase","style"],"mappings":"oYAqCA,IAAMA,EAAW,SAAHC,GAUM,IAAAC,EAAAD,EATlBE,KAAkBC,EAAAH,EAClBI,KACAC,EAASL,EAATK,UAEAC,EAAKN,EAALM,MACAC,EAAMP,EAANO,OAAMC,EAAAR,EACNS,UAAAA,OAAY,IAAHD,GAAQA,EACjBE,EAAEV,EAAFU,GACeC,EAAUX,EAAzB,eAEMY,QAVC,IAAHX,EAAG,YAAWA,IAUW,YAGvBY,QAZC,IAAHV,EAAG,SAAQA,IAYcW,EAE7B,OACEC,EACEC,cAAA,MAAA,CAAAN,GAAIA,EACJL,UAAWY,EAAGC,EAAOC,SAfTnB,EAAhBoB,iBAemDC,KAAKH,EAAOT,UAAYA,IAC1D,cAAAE,GAAcW,EAAUC,EAAuBC,SAAUd,IAEtEK,EACEC,cAAA,MAAA,CAAAX,UAAWY,EAAGC,EAAON,GAAea,EAASP,EAAQQ,EAAUd,EAAe,IAAMC,IAAgBR,EAASgB,EAC1GH,CAAAA,EAAAA,EAAOT,UAAYA,IAEtBkB,MAAO,CAAErB,MAAAA,EAAOC,OAAAA,KAIxB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={skeleton:"skeleton",rectangle:"rectangle",shine:"shine",circle:"circle",text:"text",textH1:"textH1",textH2:"textH2",textH3:"textH3",textH4:"textH4",textH5:"textH5",textH6:"textH6",textSmall:"textSmall",textCustom:"textCustom",fullWidth:"fullWidth"};!function(n){const t="s_id-41cda04b2bc0_4_5_11";if("undefined"!=typeof document){const e=document.head||document.getElementsByTagName("head")[0];if(e.querySelector("#"+t))return;const i=document.createElement("style");i.id=t,e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i),i.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=n)}(".skeleton {\n display: flex;\n}\n\n.rectangle {\n height: 160px;\n background: var(--ui-background-color);\n border-radius: var(--border-radius-small);\n overflow: hidden;\n animation-duration: 0.8s;\n animation-direction: alternate;\n animation-iteration-count: infinite;\n animation-name: shine;\n animation-timing-function: steps(10, end);\n}\n\n@keyframes shine {\n 0% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.circle {\n height: 40px;\n background: var(--ui-background-color);\n border-radius: 50%;\n overflow: hidden;\n animation-duration: 0.8s;\n animation-direction: alternate;\n animation-iteration-count: infinite;\n animation-name: shine;\n animation-timing-function: steps(10, end);\n}\n\n@keyframes shine {\n 0% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.text {\n background: var(--ui-background-color);\n border-radius: var(--border-radius-small);\n overflow: hidden;\n animation-duration: 0.8s;\n animation-direction: alternate;\n animation-iteration-count: infinite;\n animation-name: shine;\n animation-timing-function: steps(10, end);\n}\n\n@keyframes shine {\n 0% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.textH1 {\n height: 32px;\n}\n\n.textH2 {\n height: 24px;\n}\n\n.textH3 {\n height: 24px;\n}\n\n.textH4 {\n height: 21px;\n}\n\n.textH5 {\n height: 16px;\n}\n\n.textH6 {\n height: 12px;\n}\n\n.textSmall,\n.textCustom {\n height: 12px;\n}\n\n.fullWidth {\n width: 100%;\n}\n\n.skeleton:not(.fullWidth) .text {\n width: 162px;\n}\n\n.skeleton:not(.fullWidth) .circle {\n width: 40px;\n}\n\n.skeleton:not(.fullWidth) .rectangle {\n width: 160px;\n}");export{n as default};
|
|
2
|
-
//# sourceMappingURL=Skeleton.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonConstants.js","sources":["../../../../../src/components/Skeleton/SkeletonConstants.ts"],"sourcesContent":["// Fixed names\nexport const SKELETON_CUSTOM_SIZE = \"custom\";\n"],"names":["SKELETON_CUSTOM_SIZE"],"mappings":"AACO,IAAMA,EAAuB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as e,toConsumableArray as t}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import o from"classnames";import a,{forwardRef as r,useRef as i}from"react";import{noop as s}from"es-toolkit";import{useMergeRef as n,getStyle as c}from"@vibe/shared";import{Icon as l}from"@vibe/icon/mockedClassNames";import{getTestId as d,ComponentDefaultTestId as m}from"../../../tests/testIds.js";import p from"./Tab.module.scss.js";import{Tooltip as f}from"@vibe/tooltip/mockedClassNames";import{ComponentVibeId as v}from"../../../tests/constants.js";import{keyCodes as b}from"../../../constants/keyCodes.js";import"../../../constants/sizes.js";var u=r((function(r,u){var y=r.className,k=r.tabInnerClassName,C=r.id,N=r.value,j=void 0===N?0:N,E=r.disabled,I=void 0!==E&&E,h=r.active,A=void 0!==h&&h,T=r.focus,P=void 0!==T&&T,g=r.stretchedUnderline,x=void 0!==g&&g,B=r.onClick,S=void 0===B?s:B,z=r.tooltipProps,D=void 0===z?{}:z,F=r.icon,U=r.iconType,_=r.iconSide,w=void 0===_?"left":_,H=r.children,K=r["data-testid"],O=r.tabIndex,R=r["aria-controls"],V=i(null),W=n(u,V);return a.createElement(f,Object.assign({},D,{content:D.content}),a.createElement("li",{ref:W,key:C,className:o(p.tabWrapper,y,e(e(e(e({},p.active,A),p.disabled,I),p.tabFocusVisibleInset,P),p.stretchedUnderline,x)),id:C,role:"tab","aria-selected":A,"aria-disabled":I,"aria-controls":R||void 0,tabIndex:O,"data-testid":K||d(m.TAB,C),"data-vibe":v.TAB,onClick:function(){return!I&&S(j)},onKeyDown:function(e){e.key!==b.ENTER&&e.key!==b.SPACE||(e.preventDefault(),!I&&S(j))}},a.createElement("div",{className:o(p.tabInner,k)},function(){if(!F)return H;var e=a.createElement(l,{"aria-hidden":!0,type:U,icon:F,className:o(p.tabIcon,c(p,w)),size:18,ignoreFocusStyle:!0}),r=a.Children.toArray(H);return"left"===w?[e].concat(t(r)):[].concat(t(r),[e])}())))}));export{u as default};
|
|
2
|
-
//# sourceMappingURL=Tab.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","sources":["../../../../../../src/components/Tabs/Tab/Tab.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { type FC, forwardRef, type ReactElement, useRef } from \"react\";\nimport { noop as NOOP } from \"es-toolkit\";\nimport { useMergeRef, getStyle } from \"@vibe/shared\";\n\nimport { Icon, type IconType, type SubIcon } from \"@vibe/icon\";\nimport type VibeComponentProps from \"../../../types/VibeComponentProps\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../tests/test-ids-utils\";\nimport styles from \"./Tab.module.scss\";\nimport { Tooltip, type TooltipProps } from \"@vibe/tooltip\";\nimport { ComponentVibeId } from \"../../../tests/constants\";\nimport { keyCodes } from \"../../../constants\";\n\nexport interface TabProps extends VibeComponentProps {\n /**\n * Class name applied to the inner tab content.\n */\n tabInnerClassName?: string;\n /**\n * The index value of the tab.\n */\n value?: number;\n /**\n * If true, disables the tab.\n */\n disabled?: boolean;\n /**\n * If true, marks the tab as active.\n */\n active?: boolean;\n /**\n * If true, applies focus styles to the tab.\n */\n focus?: boolean;\n /**\n * If true, hides the individual tab border when using stretched underline.\n */\n stretchedUnderline?: boolean;\n /**\n * The icon displayed in the tab.\n */\n icon?: SubIcon;\n /**\n * The type of icon.\n */\n iconType?: IconType;\n /**\n * The position of the icon relative to the text.\n */\n iconSide?: string;\n /**\n * Callback fired when the tab is clicked.\n */\n onClick?: (value: number) => void;\n /**\n * Props passed to the tab's tooltip.\n */\n tooltipProps?: Partial<TooltipProps>;\n /**\n * The content displayed inside the tab.\n */\n children?: string | ReactElement | ReactElement[];\n /**\n * Tab index for focus management.\n */\n tabIndex?: number;\n /**\n * The id of the associated TabPanel for aria-controls attribute.\n */\n \"aria-controls\"?: string;\n}\n\nconst Tab: FC<TabProps> = forwardRef(\n (\n {\n className,\n tabInnerClassName,\n id,\n value = 0,\n disabled = false,\n active = false,\n focus = false,\n stretchedUnderline = false,\n onClick = NOOP,\n tooltipProps = {} as TooltipProps,\n icon,\n iconType,\n iconSide = \"left\",\n children,\n \"data-testid\": dataTestId,\n tabIndex,\n \"aria-controls\": ariaControls\n }: TabProps,\n ref\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n function renderIconAndChildren() {\n if (!icon) return children;\n\n const iconElement = (\n <Icon\n aria-hidden={true}\n type={iconType}\n icon={icon}\n className={cx(styles.tabIcon, getStyle(styles, iconSide))}\n size={18}\n ignoreFocusStyle\n />\n );\n\n const childrenArray = React.Children.toArray(children);\n\n if (iconSide === \"left\") {\n return [iconElement, ...childrenArray];\n }\n\n return [...childrenArray, iconElement];\n }\n\n function handleKeyDown(event: React.KeyboardEvent) {\n if (event.key === keyCodes.ENTER || event.key === keyCodes.SPACE) {\n event.preventDefault();\n !disabled && onClick(value);\n }\n }\n\n return (\n <Tooltip {...tooltipProps} content={tooltipProps.content}>\n <li\n ref={mergedRef}\n key={id}\n className={cx(styles.tabWrapper, className, {\n [styles.active]: active,\n [styles.disabled]: disabled,\n [styles.tabFocusVisibleInset]: focus,\n [styles.stretchedUnderline]: stretchedUnderline\n })}\n id={id}\n role=\"tab\"\n aria-selected={active}\n aria-disabled={disabled}\n aria-controls={ariaControls || undefined}\n tabIndex={tabIndex}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TAB, id)}\n data-vibe={ComponentVibeId.TAB}\n onClick={() => !disabled && onClick(value)}\n onKeyDown={handleKeyDown}\n >\n <div className={cx(styles.tabInner, tabInnerClassName)}>{renderIconAndChildren()}</div>\n </li>\n </Tooltip>\n );\n }\n);\n\nexport default Tab;\n"],"names":["Tab","forwardRef","_ref","ref","className","tabInnerClassName","id","_ref$value","value","_ref$disabled","disabled","_ref$active","active","_ref$focus","focus","_ref$stretchedUnderli","stretchedUnderline","_ref$onClick","onClick","NOOP","_ref$tooltipProps","tooltipProps","icon","iconType","_ref$iconSide","iconSide","children","dataTestId","tabIndex","ariaControls","componentRef","useRef","mergedRef","useMergeRef","React","createElement","Tooltip","Object","assign","content","key","cx","styles","tabWrapper","_defineProperty","tabFocusVisibleInset","role","undefined","getTestId","ComponentDefaultTestId","TAB","ComponentVibeId","onKeyDown","event","keyCodes","ENTER","SPACE","preventDefault","tabInner","iconElement","Icon","type","tabIcon","getStyle","size","ignoreFocusStyle","childrenArray","Children","toArray","concat","_toConsumableArray","renderIconAndChildren"],"mappings":"+oBAwEMA,IAAAA,EAAoBC,GACxB,SAAAC,EAoBEC,GACE,IAnBAC,EAASF,EAATE,UACAC,EAAiBH,EAAjBG,kBACAC,EAAEJ,EAAFI,GAAEC,EAAAL,EACFM,MAAAA,OAAQ,IAAHD,EAAG,EAACA,EAAAE,EAAAP,EACTQ,SAAAA,OAAW,IAAHD,GAAQA,EAAAE,EAAAT,EAChBU,OAAAA,OAAS,IAAHD,GAAQA,EAAAE,EAAAX,EACdY,MAAAA,OAAQ,IAAHD,GAAQA,EAAAE,EAAAb,EACbc,mBAAAA,OAAqB,IAAHD,GAAQA,EAAAE,EAAAf,EAC1BgB,QAAAA,OAAUC,IAAHF,EAAGE,EAAIF,EAAAG,EAAAlB,EACdmB,aAAAA,OAAY,IAAAD,EAAG,CAAkB,EAAAA,EACjCE,EAAIpB,EAAJoB,KACAC,EAAQrB,EAARqB,SAAQC,EAAAtB,EACRuB,SAAAA,OAAW,IAAHD,EAAG,OAAMA,EACjBE,EAAQxB,EAARwB,SACeC,EAAUzB,EAAzB,eACA0B,EAAQ1B,EAAR0B,SACiBC,EAAY3B,EAA7B,iBAII4B,EAAeC,EAAO,MACtBC,EAAYC,EAAY9B,EAAK2B,GAgCnC,OACEI,EAACC,cAAAC,EAAYC,OAAAC,OAAA,CAAA,EAAAjB,GAAckB,QAASlB,EAAakB,UAC/CL,EAAAC,cAAA,KAAA,CACEhC,IAAK6B,EACLQ,IAAKlC,EACLF,UAAWqC,EAAGC,EAAOC,WAAYvC,EAASwC,EAAAA,EAAAA,EAAAA,EAAA,CAAA,EACvCF,EAAO9B,OAASA,GAChB8B,EAAOhC,SAAWA,GAClBgC,EAAOG,qBAAuB/B,GAC9B4B,EAAO1B,mBAAqBA,IAE/BV,GAAIA,EACJwC,KAAK,MAAK,gBACKlC,EAAM,gBACNF,EACA,gBAAAmB,QAAgBkB,EAC/BnB,SAAUA,EAAQ,cACLD,GAAcqB,EAAUC,EAAuBC,IAAK5C,GAAG,YACzD6C,EAAgBD,IAC3BhC,QAAS,WAAA,OAAOR,GAAYQ,EAAQV,EAAM,EAC1C4C,UA3BN,SAAuBC,GACjBA,EAAMb,MAAQc,EAASC,OAASF,EAAMb,MAAQc,EAASE,QACzDH,EAAMI,kBACL/C,GAAYQ,EAAQV,GAEzB,GAwBM0B,EAAAC,cAAA,MAAA,CAAK/B,UAAWqC,EAAGC,EAAOgB,SAAUrD,IApD1C,WACE,IAAKiB,EAAM,OAAOI,EAElB,IAAMiC,EACJzB,EAACC,cAAAyB,kBACc,EACbC,KAAMtC,EACND,KAAMA,EACNlB,UAAWqC,EAAGC,EAAOoB,QAASC,EAASrB,EAAQjB,IAC/CuC,KAAM,GACNC,kBAAgB,IAIdC,EAAgBhC,EAAMiC,SAASC,QAAQ1C,GAE7C,MAAiB,SAAbD,EACF,CAAQkC,GAAWU,OAAAC,EAAKJ,IAG1B,GAAAG,OAAAC,EAAWJ,IAAeP,GAC5B,CA+B+DY,KAIjE"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={tabWrapper:"tabWrapper",stretchedUnderline:"stretchedUnderline",tabInner:"tabInner",tabIcon:"tabIcon",right:"right",tabFocusVisibleInset:"tabFocusVisibleInset",active:"active",disabled:"disabled"};!function(n){const e="s_id-bfaa9c7255c3_4_5_11";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+e))return;const r=document.createElement("style");r.id=e,t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r),r.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}('/* stylelint-disable */\n/* stylelint-enable */\n/* stylelint-disable selector-class-pattern */\n/* stylelint-disable */\n/* stylelint-enable */\n.tabWrapper {\n position: relative;\n display: inline-block;\n padding-inline: 1px;\n border-top: 1px solid transparent;\n border-bottom: 2px solid;\n border-bottom-color: var(--ui-background-color);\n color: var(--primary-text-color);\n text-align: center;\n height: 100%;\n margin: 0;\n}\n.tabWrapper.stretchedUnderline {\n border-bottom: 0;\n}\n.tabWrapper:after {\n display: block;\n position: absolute;\n inset-inline: 0;\n content: "";\n border-bottom: solid 2px;\n border-bottom-color: var(--primary-color);\n transform: scaleX(0);\n z-index: 0;\n}\n.tabWrapper .tabInner {\n height: calc(100% - 1px);\n display: flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n padding: 4px 16px;\n font: var(--font-text1-normal);\n user-select: none;\n margin-bottom: 1px;\n cursor: pointer;\n color: var(--primary-text-color);\n}\n.tabWrapper .tabInner:focus {\n outline: none;\n}\n.tabWrapper .tabInner .tabIcon {\n color: var(--icon-color);\n margin-inline-end: var(--space-8);\n}\n.tabWrapper .tabInner .tabIcon.right {\n margin-inline-end: 0;\n margin-inline-start: var(--space-8);\n}\n.tabWrapper.tabFocusVisibleInset {\n outline: none;\n z-index: 11;\n border-radius: 3px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5) inset, 0 0 0 1px var(--primary-hover-color) inset;\n position: relative;\n}\n.tabWrapper.active:after {\n transform: scaleX(1);\n transition: transform var(--motion-productive-medium) var(--motion-timing-enter);\n}\n.tabWrapper.disabled .tabInner {\n color: var(--disabled-text-color);\n cursor: not-allowed;\n}\n.tabWrapper:not(.disabled) .tabInner:hover {\n border-radius: 4px;\n background-color: var(--primary-background-hover-color);\n}');export{n as default};
|
|
2
|
-
//# sourceMappingURL=Tab.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as e,defineProperty as r}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import t from"classnames";import{camelCase as n}from"es-toolkit";import a,{forwardRef as i,useRef as o,useState as s,useEffect as l,useMemo as d,useCallback as c}from"react";import u from"../../../hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js";import{useMergeRef as m,getStyle as f,NOOP as v}from"@vibe/shared";import{usePrevious as p}from"@vibe/hooks";import{getTestId as b,ComponentDefaultTestId as h}from"../../../tests/testIds.js";import I from"./TabList.module.scss.js";var C=i((function(i,C){var N=i.className,T=i.id,g=i.onTabChange,y=void 0===g?v:g,L=i.activeTabId,k=void 0===L?0:L,j=i.tabType,x=void 0===j?"Compact":j,A=i.size,E=i.stretchedUnderline,B=void 0!==E&&E,P=i.tabPanelIds,S=void 0===P?[]:P,U=i.children,_=i["data-testid"],G=o(null),K=m(C,G),O=o({}),W=s(k),w=e(W,2),z=w[0],H=w[1],q=p(k),D=p(z);l((function(){k!==q&&k!==z&&H(k)}),[k,q,z,H]),l((function(){var e;void 0!==D&&D!==z&&O.current[z]&&(null===(e=O.current[z])||void 0===e||e.focus())}),[z,D]);var F=d((function(){var e=new Set;return a.Children.forEach(U,(function(r,t){r.props.disabled&&e.add(t)})),e}),[U]),J=c((function(e){F.has(e)||(H(e),y&&y(e))}),[y,F]),M=c((function(e,r){var t,n=null===(t=U[r].props)||void 0===t?void 0:t.onClick;F.has(r)||(n&&n(r),J(r))}),[U,F,J]),Q=c((function(e){return U[e]}),[U]),R=d((function(){return Array.from(F)}),[F]),V=o(),X=u({ref:V,numberOfItemsInLine:null==U?void 0:U.length,itemsCount:null==U?void 0:U.length,getItemByIndex:Q,onItemClicked:M,disabledIndexes:R,circularNavigation:!0}),Y=X.activeIndex,Z=X.onSelectionAction,$=p(Y);l((function(){var e;void 0!==Y&&Y>=0&&$!==Y&&O.current[Y]&&(null===(e=O.current[Y])||void 0===e||e.focus())}),[Y,$]);var ee=d((function(){return a.Children.map(U,(function(e,r){var n=z===r,i=void 0===Y||0>Y?n:Y===r;return a.cloneElement(e,{value:r,active:n,focus:Y===r,onClick:Z,stretchedUnderline:B,className:t(I.tabListTabWrapper,e.props.className),tabInnerClassName:t(I.tabListTabInner,e.props.tabInnerClassName),tabIndex:i?0:-1,"aria-controls":S[r],ref:function(e){O.current[r]=e}})}))}),[U,z,Y,Z,B,S,T]);return a.createElement("div",{ref:K,className:t(I.tabsWrapper,N,[f(I,n(x))],r({},I.stretchedUnderline,B)),id:T,"data-testid":_||b(h.TAB_LIST,T)},a.createElement("ul",{ref:V,className:t(I.tabsList,[f(I,A)]),role:"tablist"},ee))}));Object.assign(C,{isTabList:!0});export{C as default};
|
|
2
|
-
//# sourceMappingURL=TabList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.js","sources":["../../../../../../src/components/Tabs/TabList/TabList.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport { camelCase } from \"es-toolkit\";\nimport React, {\n type FC,\n forwardRef,\n type ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport useGridKeyboardNavigation from \"../../../hooks/useGridKeyboardNavigation/useGridKeyboardNavigation\";\nimport { useMergeRef, NOOP, getStyle } from \"@vibe/shared\";\nimport { usePrevious } from \"@vibe/hooks\";\nimport type VibeComponentProps from \"../../../types/VibeComponentProps\";\n\nimport { type TabProps } from \"../Tab/Tab\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../tests/test-ids-utils\";\n\nimport styles from \"./TabList.module.scss\";\n\nexport interface TabListProps extends VibeComponentProps {\n /**\n * Callback fired when the active tab changes.\n */\n onTabChange?: (tabId: number) => void;\n /**\n * The index of the currently active tab.\n */\n activeTabId?: number;\n /**\n * The type of tab style.\n */\n tabType?: string;\n /**\n * The size of the tab list.\n */\n size?: string;\n /**\n * If true, Sets an E2E underline under the whole tabs component.\n */\n stretchedUnderline?: boolean;\n /**\n * Array of corresponding TabPanel ids for aria-controls relationship.\n */\n tabPanelIds?: string[];\n /**\n * The child elements representing tabs.\n */\n children?: ReactElement<TabProps>[];\n}\nconst TabList: FC<TabListProps> = forwardRef(\n (\n {\n className,\n id,\n onTabChange = NOOP,\n activeTabId = 0,\n tabType = \"Compact\",\n size,\n stretchedUnderline = false,\n tabPanelIds = [],\n children,\n \"data-testid\": dataTestId\n },\n ref\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n const tabRefs = useRef<Record<number, HTMLElement | null>>({});\n\n const [activeTabState, setActiveTabState] = useState<number>(activeTabId);\n\n const prevActiveTabIdProp = usePrevious(activeTabId);\n const prevActiveTabState = usePrevious(activeTabState);\n\n useEffect(() => {\n // Update active tab if changed from props\n\n if (activeTabId !== prevActiveTabIdProp && activeTabId !== activeTabState) {\n setActiveTabState(activeTabId);\n }\n }, [activeTabId, prevActiveTabIdProp, activeTabState, setActiveTabState]);\n\n // Focus management: when activeTabState changes, focus the active tab\n useEffect(() => {\n if (\n prevActiveTabState !== undefined &&\n prevActiveTabState !== activeTabState &&\n tabRefs.current[activeTabState]\n ) {\n tabRefs.current[activeTabState]?.focus();\n }\n }, [activeTabState, prevActiveTabState]);\n\n const disabledTabIds = useMemo(() => {\n const disabledIds = new Set<number>();\n React.Children.forEach(children, (child, index) => {\n if (child.props.disabled) {\n disabledIds.add(index);\n }\n });\n return disabledIds;\n }, [children]);\n const onTabSelect = useCallback(\n (tabId: number) => {\n if (disabledTabIds.has(tabId)) return;\n setActiveTabState(tabId);\n onTabChange && onTabChange(tabId);\n },\n [onTabChange, disabledTabIds]\n );\n const onTabClick = useCallback(\n (value: HTMLElement | void, tabId: number) => {\n const tabCallbackFunc = children[tabId].props?.onClick;\n if (disabledTabIds.has(tabId)) return;\n if (tabCallbackFunc) tabCallbackFunc(tabId);\n onTabSelect(tabId);\n },\n [children, disabledTabIds, onTabSelect]\n );\n const getItemByIndex = useCallback((index: number): ReactElement<TabProps> => children[index], [children]);\n const disabledIndexes = useMemo(() => Array.from(disabledTabIds), [disabledTabIds]);\n const ulRef = useRef();\n const { activeIndex: focusIndex, onSelectionAction } = useGridKeyboardNavigation({\n ref: ulRef,\n numberOfItemsInLine: children?.length,\n itemsCount: children?.length,\n getItemByIndex,\n onItemClicked: onTabClick,\n disabledIndexes,\n circularNavigation: true\n });\n\n // Focus management: when focusIndex changes during keyboard navigation, focus the focused tab\n const prevFocusIndex = usePrevious(focusIndex);\n useEffect(() => {\n if (focusIndex !== undefined && focusIndex >= 0 && prevFocusIndex !== focusIndex && tabRefs.current[focusIndex]) {\n tabRefs.current[focusIndex]?.focus();\n }\n }, [focusIndex, prevFocusIndex]);\n\n const tabsToRender = useMemo(() => {\n const childrenToRender = React.Children.map(children, (child, index) => {\n const isActive = activeTabState === index;\n\n const shouldBeFocusable = focusIndex !== undefined && focusIndex >= 0 ? focusIndex === index : isActive;\n\n return React.cloneElement(child, {\n value: index,\n active: isActive,\n focus: focusIndex === index,\n onClick: onSelectionAction,\n stretchedUnderline,\n className: cx(styles.tabListTabWrapper, child.props.className),\n tabInnerClassName: cx(styles.tabListTabInner, child.props.tabInnerClassName),\n tabIndex: shouldBeFocusable ? 0 : -1,\n \"aria-controls\": tabPanelIds[index],\n ref: (element: HTMLElement | null) => {\n tabRefs.current[index] = element;\n }\n } as Partial<TabProps> & { ref: React.Ref<HTMLElement>; tabInnerLabelId?: string });\n });\n return childrenToRender;\n }, [children, activeTabState, focusIndex, onSelectionAction, stretchedUnderline, tabPanelIds, id]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.tabsWrapper, className, [getStyle(styles, camelCase(tabType))], {\n [styles.stretchedUnderline]: stretchedUnderline\n })}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TAB_LIST, id)}\n >\n <ul ref={ulRef} className={cx(styles.tabsList, [getStyle(styles, size)])} role=\"tablist\">\n {tabsToRender}\n </ul>\n </div>\n );\n }\n);\nObject.assign(TabList, {\n isTabList: true\n});\n\nexport default TabList;\n"],"names":["TabList","forwardRef","_ref","ref","className","id","_ref$onTabChange","onTabChange","NOOP","_ref$activeTabId","activeTabId","_ref$tabType","tabType","size","_ref$stretchedUnderli","stretchedUnderline","_ref$tabPanelIds","tabPanelIds","children","dataTestId","componentRef","useRef","mergedRef","useMergeRef","tabRefs","_useState","useState","_useState2","_slicedToArray","activeTabState","setActiveTabState","prevActiveTabIdProp","usePrevious","prevActiveTabState","useEffect","undefined","current","_a","focus","disabledTabIds","useMemo","disabledIds","Set","React","Children","forEach","child","index","props","disabled","add","onTabSelect","useCallback","tabId","has","onTabClick","value","tabCallbackFunc","onClick","getItemByIndex","disabledIndexes","Array","from","ulRef","_useGridKeyboardNavig","useGridKeyboardNavigation","numberOfItemsInLine","length","itemsCount","onItemClicked","circularNavigation","focusIndex","activeIndex","onSelectionAction","prevFocusIndex","tabsToRender","map","isActive","shouldBeFocusable","cloneElement","active","cx","styles","tabListTabWrapper","tabInnerClassName","tabListTabInner","tabIndex","element","createElement","tabsWrapper","getStyle","camelCase","_defineProperty","getTestId","ComponentDefaultTestId","TAB_LIST","tabsList","role","Object","assign","isTabList"],"mappings":"glBAoDMA,IAAAA,EAA4BC,GAChC,SAAAC,EAaEC,GACE,IAZAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,YAAAA,OAAcC,IAAHF,EAAGE,EAAIF,EAAAG,EAAAP,EAClBQ,YAAAA,OAAc,IAAHD,EAAG,EAACA,EAAAE,EAAAT,EACfU,QAAAA,OAAU,IAAHD,EAAG,UAASA,EACnBE,EAAIX,EAAJW,KAAIC,EAAAZ,EACJa,mBAAAA,OAAqB,IAAHD,GAAQA,EAAAE,EAAAd,EAC1Be,YAAAA,OAAc,IAAHD,EAAG,GAAEA,EAChBE,EAAQhB,EAARgB,SACeC,EAAUjB,EAAzB,eAIIkB,EAAeC,EAAO,MACtBC,EAAYC,EAAYpB,EAAKiB,GAC7BI,EAAUH,EAA2C,CAAA,GAE3DI,EAA4CC,EAAiBhB,GAAYiB,EAAAC,EAAAH,EAAA,GAAlEI,EAAcF,EAAA,GAAEG,EAAiBH,EAAA,GAElCI,EAAsBC,EAAYtB,GAClCuB,EAAqBD,EAAYH,GAEvCK,GAAU,WAGJxB,IAAgBqB,GAAuBrB,IAAgBmB,GACzDC,EAAkBpB,EAErB,GAAE,CAACA,EAAaqB,EAAqBF,EAAgBC,IAGtDI,GAAU,sBAEiBC,IAAvBF,GACAA,IAAuBJ,GACvBL,EAAQY,QAAQP,KAEe,QAA/BQ,EAAAb,EAAQY,QAAQP,UAAe,IAAAQ,GAAAA,EAAEC,QAErC,GAAG,CAACT,EAAgBI,IAEpB,IAAMM,EAAiBC,GAAQ,WAC7B,IAAMC,EAAc,IAAIC,IAMxB,OALAC,EAAMC,SAASC,QAAQ3B,GAAU,SAAC4B,EAAOC,GACnCD,EAAME,MAAMC,UACdR,EAAYS,IAAIH,EAEpB,IACON,CACT,GAAG,CAACvB,IACEiC,EAAcC,GAClB,SAACC,GACKd,EAAee,IAAID,KACvBvB,EAAkBuB,GAClB9C,GAAeA,EAAY8C,GAC7B,GACA,CAAC9C,EAAagC,IAEVgB,EAAaH,GACjB,SAACI,EAA2BH,SACpBI,EAAyC,QAAvBpB,EAAAnB,EAASmC,GAAOL,aAAO,IAAAX,OAAA,EAAAA,EAAAqB,QAC3CnB,EAAee,IAAID,KACnBI,GAAiBA,EAAgBJ,GACrCF,EAAYE,GACb,GACD,CAACnC,EAAUqB,EAAgBY,IAEvBQ,EAAiBP,GAAY,SAACL,GAAa,OAA6B7B,EAAS6B,KAAQ,CAAC7B,IAC1F0C,EAAkBpB,GAAQ,WAAA,OAAMqB,MAAMC,KAAKvB,KAAiB,CAACA,IAC7DwB,EAAQ1C,IACd2C,EAAuDC,EAA0B,CAC/E9D,IAAK4D,EACLG,oBAAqBhD,aAAA,EAAAA,EAAUiD,OAC/BC,WAAYlD,aAAA,EAAAA,EAAUiD,OACtBR,eAAAA,EACAU,cAAed,EACfK,gBAAAA,EACAU,oBAAoB,IAPDC,EAAUP,EAAvBQ,YAAyBC,EAAiBT,EAAjBS,kBAW3BC,EAAiB1C,EAAYuC,GACnCrC,GAAU,sBACWC,IAAfoC,GAA4BA,GAAc,GAAKG,IAAmBH,GAAc/C,EAAQY,QAAQmC,KACvE,QAA3BlC,EAAAb,EAAQY,QAAQmC,UAAW,IAAAlC,GAAAA,EAAEC,QAEjC,GAAG,CAACiC,EAAYG,IAEhB,IAAMC,GAAenC,GAAQ,WAqB3B,OApByBG,EAAMC,SAASgC,IAAI1D,GAAU,SAAC4B,EAAOC,GAC5D,IAAM8B,EAAWhD,IAAmBkB,EAE9B+B,OAAmC3C,IAAfoC,GAA0C,EAAdA,EAAyCM,EAAvBN,IAAexB,EAEvF,OAAOJ,EAAMoC,aAAajC,EAAO,CAC/BU,MAAOT,EACPiC,OAAQH,EACRvC,MAAOiC,IAAexB,EACtBW,QAASe,EACT1D,mBAAAA,EACAX,UAAW6E,EAAGC,EAAOC,kBAAmBrC,EAAME,MAAM5C,WACpDgF,kBAAmBH,EAAGC,EAAOG,gBAAiBvC,EAAME,MAAMoC,mBAC1DE,SAAUR,EAAoB,GAAK,EACnC,gBAAiB7D,EAAY8B,GAC7B5C,IAAK,SAACoF,GACJ/D,EAAQY,QAAQW,GAASwC,CAC3B,GAEJ,GAEF,GAAG,CAACrE,EAAUW,EAAgB0C,EAAYE,EAAmB1D,EAAoBE,EAAaZ,IAE9F,OACEsC,EACE6C,cAAA,MAAA,CAAArF,IAAKmB,EACLlB,UAAW6E,EAAGC,EAAOO,YAAarF,EAAW,CAACsF,EAASR,EAAQS,EAAU/E,KAAUgF,EAChFV,CAAAA,EAAAA,EAAOnE,mBAAqBA,IAE/BV,GAAIA,gBACSc,GAAc0E,EAAUC,EAAuBC,SAAU1F,IAEtEsC,EAAA6C,cAAA,KAAA,CAAIrF,IAAK4D,EAAO3D,UAAW6E,EAAGC,EAAOc,SAAU,CAACN,EAASR,EAAQrE,KAASoF,KAAK,WAC5EtB,IAIT,IAEFuB,OAAOC,OAAOnG,EAAS,CACrBoG,WAAW"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={tabsWrapper:"tabsWrapper",tabsList:"tabsList",sm:"sm",lg:"lg",stretched:"stretched",tabListTabWrapper:"tabListTabWrapper",tabListTabInner:"tabListTabInner",disabled:"disabled",stretchedUnderline:"stretchedUnderline"};!function(e){const t="s_id-1dd2e005bc2f_4_5_11";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const s=document.createElement("style");s.id=t,n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}("/* stylelint-disable */\n/* stylelint-enable */\n.tabsWrapper .tabsList {\n display: flex;\n flex-direction: row;\n list-style-type: none;\n font-size: 0;\n position: relative;\n height: 40px;\n outline: none;\n padding: 0;\n}\n.tabsWrapper .tabsList.sm {\n height: 32px;\n}\n.tabsWrapper .tabsList.lg {\n height: 48px;\n}\n.tabsWrapper.stretched .tabsList {\n width: 100%;\n}\n.tabsWrapper.stretched .tabsList .tabListTabWrapper {\n width: 100%;\n}\n.tabsWrapper.stretched .tabsList .tabListTabWrapper .tabListTabInner {\n width: 100%;\n}\n.tabsWrapper.disabled {\n opacity: 0;\n height: 0;\n padding-bottom: 5px;\n pointer-events: none;\n}\n.tabsWrapper.stretchedUnderline {\n border-bottom: 2px solid var(--ui-background-color);\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=TabList.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e,{forwardRef as a,useRef as t}from"react";import r from"classnames";import{useMergeRef as s}from"@vibe/shared";import{getTestId as o,ComponentDefaultTestId as m}from"../../../tests/testIds.js";import i from"./TabPanel.module.scss.js";var d=a((function(a,d){var l=a.className,n=a.id,c=a.children,p=a.index,f=a["data-testid"],u=t(null),b=s(d,u);return e.createElement("div",{key:"".concat(n,"_").concat(p),ref:b,className:r(i.tabPanelWrapper,l),id:n,"data-testid":f||o(m.TAB_PANEL,n),role:"tabpanel"},c)}));export{d as default};
|
|
2
|
-
//# sourceMappingURL=TabPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanel.js","sources":["../../../../../../src/components/Tabs/TabPanel/TabPanel.tsx"],"sourcesContent":["import React, { type FC, forwardRef, type ReactElement, useRef } from \"react\";\nimport cx from \"classnames\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport type VibeComponentProps from \"../../../types/VibeComponentProps\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../tests/test-ids-utils\";\nimport styles from \"./TabPanel.module.scss\";\n\nexport interface TabPanelProps extends VibeComponentProps {\n /**\n * The content inside the tab panel.\n */\n children?: ReactElement | ReactElement[] | string;\n /**\n * The index of the tab panel.\n */\n index?: number;\n}\n\nconst TabPanel: FC<TabPanelProps> = forwardRef(({ className, id, children, index, \"data-testid\": dataTestId }, ref) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n return (\n <div\n key={`${id}_${index}`}\n ref={mergedRef}\n className={cx(styles.tabPanelWrapper, className)}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TAB_PANEL, id)}\n role=\"tabpanel\"\n >\n {children}\n </div>\n );\n});\n\nexport default TabPanel;\n"],"names":["TabPanel","forwardRef","_ref","ref","className","id","children","index","dataTestId","componentRef","useRef","mergedRef","useMergeRef","React","key","concat","cx","styles","tabPanelWrapper","getTestId","ComponentDefaultTestId","TAB_PANEL","role"],"mappings":"kPAkBMA,IAAAA,EAA8BC,GAAW,SAAAC,EAAgEC,GAAO,IAApEC,EAASF,EAATE,UAAWC,EAAEH,EAAFG,GAAIC,EAAQJ,EAARI,SAAUC,EAAKL,EAALK,MAAsBC,EAAUN,EAAzB,eAC1EO,EAAeC,EAAO,MACtBC,EAAYC,EAAYT,EAAKM,GAEnC,OACEI,uBACEC,IAAG,GAAAC,OAAKV,OAAEU,OAAIR,GACdJ,IAAKQ,EACLP,UAAWY,EAAGC,EAAOC,gBAAiBd,GACtCC,GAAIA,EAAE,cACOG,GAAcW,EAAUC,EAAuBC,UAAWhB,GACvEiB,KAAK,YAEJhB,EAGP"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={tabPanelWrapper:"tabPanelWrapper"};!function(e){const t="s_id-82244d4a2f7b_4_5_11";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)}(".tabPanelWrapper {\n color: var(--primary-text-color);\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=TabPanel.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import a from"classnames";import{camelCase as e}from"es-toolkit";import t,{forwardRef as r,useRef as i,useMemo as s}from"react";import{useMergeRef as n,getStyle as o}from"@vibe/shared";import{getTestId as l,ComponentDefaultTestId as c}from"../../../tests/testIds.js";import m from"./TabPanels.module.scss.js";var d=r((function(r,d){var p=r.className,f=r.id,u=r.activeTabId,v=void 0===u?0:u,b=r.animationDirection,j=void 0===b?"rtl":b,N=r.children,P=r["data-testid"],T=i(null),g=n(d,T),h=s((function(){return t.Children.map(N,(function(r,i){var s=v===i;if(!s)return null;var n=s?"active":"non-active",l=s?"animation-direction-".concat(j):"";return t.cloneElement(r,Object.assign(Object.assign({index:i},r.props),{className:a(m.tabPanel,[o(m,n)],[o(m,e(l))],r.props.className)}))})).filter(Boolean)}),[N,v,j]);return t.createElement("div",{ref:g,className:a(m.tabPanelsWrapper,p),id:f,"data-testid":P||l(c.TAB_PANELS,f)},h)}));Object.assign(d,{isTabPanels:!0});export{d as default};
|
|
2
|
-
//# sourceMappingURL=TabPanels.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabPanels.js","sources":["../../../../../../src/components/Tabs/TabPanels/TabPanels.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport { camelCase } from \"es-toolkit\";\nimport React, { forwardRef, type ReactElement, useMemo, useRef } from \"react\";\nimport { useMergeRef, getStyle } from \"@vibe/shared\";\nimport { type TabPanelsAnimationDirection } from \"./TabPanels.types\";\nimport { type TabPanelProps } from \"../TabPanel/TabPanel\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../tests/test-ids-utils\";\n\nimport { type VibeComponentProps } from \"../../../types\";\nimport styles from \"./TabPanels.module.scss\";\n\nexport interface TabPanelsProps extends VibeComponentProps {\n /**\n * The index of the currently active tab panel.\n */\n activeTabId?: number;\n /**\n * The animation direction when switching between tab panels.\n */\n animationDirection?: TabPanelsAnimationDirection;\n /**\n * The child elements representing tab panels.\n */\n children?: ReactElement<TabPanelProps> | ReactElement<TabPanelProps>[];\n}\n\nconst TabPanels = forwardRef(\n (\n { className, id, activeTabId = 0, animationDirection = \"rtl\", children, \"data-testid\": dataTestId }: TabPanelsProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n const renderedTabs = useMemo(() => {\n return React.Children.map(children, (child, index) => {\n const isActiveTab = activeTabId === index;\n if (!isActiveTab) return null;\n const activeClass = isActiveTab ? \"active\" : \"non-active\";\n const animationClass = isActiveTab ? `animation-direction-${animationDirection}` : \"\";\n return React.cloneElement(child, {\n index,\n ...child.props,\n className: cx(\n styles.tabPanel,\n [getStyle(styles, activeClass)],\n [getStyle(styles, camelCase(animationClass))],\n child.props.className\n )\n });\n }).filter(Boolean);\n }, [children, activeTabId, animationDirection]);\n\n return (\n <div\n ref={mergedRef}\n className={cx(styles.tabPanelsWrapper, className)}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TAB_PANELS, id)}\n >\n {renderedTabs}\n </div>\n );\n }\n);\n\nObject.assign(TabPanels, {\n isTabPanels: true\n});\n\nexport default TabPanels;\n"],"names":["TabPanels","forwardRef","_ref","ref","className","id","_ref$activeTabId","activeTabId","_ref$animationDirecti","animationDirection","children","dataTestId","componentRef","useRef","mergedRef","useMergeRef","renderedTabs","useMemo","React","Children","map","child","index","isActiveTab","activeClass","animationClass","concat","cloneElement","Object","assign","props","cx","styles","tabPanel","getStyle","camelCase","filter","Boolean","createElement","tabPanelsWrapper","getTestId","ComponentDefaultTestId","TAB_PANELS","isTabPanels"],"mappings":"qTA0BMA,IAAAA,EAAYC,GAChB,SAAAC,EAEEC,GACE,IAFAC,EAASF,EAATE,UAAWC,EAAEH,EAAFG,GAAEC,EAAAJ,EAAEK,YAAAA,OAAc,IAAHD,EAAG,EAACA,EAAAE,EAAAN,EAAEO,mBAAAA,OAAqB,IAAHD,EAAG,MAAKA,EAAEE,EAAQR,EAARQ,SAAyBC,EAAUT,EAAzB,eAGlEU,EAAeC,EAAO,MACtBC,EAAYC,EAAYZ,EAAKS,GAC7BI,EAAeC,GAAQ,WAC3B,OAAOC,EAAMC,SAASC,IAAIV,GAAU,SAACW,EAAOC,GAC1C,IAAMC,EAAchB,IAAgBe,EACpC,IAAKC,EAAa,OAAO,KACzB,IAAMC,EAAcD,EAAc,SAAW,aACvCE,EAAiBF,EAAW,uBAAAG,OAA0BjB,GAAuB,GACnF,OAAOS,EAAMS,aAAaN,EACxBO,OAAAC,OAAAD,OAAAC,OAAA,CAAAP,MAAAA,GACGD,EAAMS,QACT1B,UAAW2B,EACTC,EAAOC,SACP,CAACC,EAASF,EAAQR,IAClB,CAACU,EAASF,EAAQG,EAAUV,KAC5BJ,EAAMS,MAAM1B,aAGlB,IAAGgC,OAAOC,QACX,GAAE,CAAC3B,EAAUH,EAAaE,IAE3B,OACES,EAAAoB,cAAA,MAAA,CACEnC,IAAKW,EACLV,UAAW2B,EAAGC,EAAOO,iBAAkBnC,GACvCC,GAAIA,EACS,cAAAM,GAAc6B,EAAUC,EAAuBC,WAAYrC,IAEvEW,EAGP,IAGFY,OAAOC,OAAO7B,EAAW,CACvB2C,aAAa"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var n={tabPanelsWrapper:"tabPanelsWrapper",tabPanel:"tabPanel",animationDirectionRtl:"animationDirectionRtl",animationDirectionLtr:"animationDirectionLtr",active:"active",panelSlideIn:"panelSlideIn"};!function(n){const e="s_id-078bacbdb1e4_4_5_11";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+e))return;const t=document.createElement("style");t.id=e,a.firstChild?a.insertBefore(t,a.firstChild):a.appendChild(t),t.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}("/* stylelint-disable */\n/* stylelint-enable */\n.tabPanelsWrapper .tabPanel {\n display: none;\n}\n.tabPanelsWrapper .tabPanel.animationDirectionRtl {\n transform: translateX(8px);\n}\n.tabPanelsWrapper .tabPanel.animationDirectionLtr {\n transform: translateX(-8px);\n}\n.tabPanelsWrapper .tabPanel.active {\n display: block;\n animation: panelSlideIn var(--motion-productive-long) forwards var(--motion-timing-enter);\n}\n@keyframes panelSlideIn {\n 100% {\n transform: translateX(0%);\n }\n}");export{n as default};
|
|
2
|
-
//# sourceMappingURL=TabPanels.module.scss.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import t,{forwardRef as r,useRef as a,useState as n,useEffect as i,useCallback as o,useMemo as l}from"react";import{useMergeRef as s}from"@vibe/shared";import{usePrevious as c}from"@vibe/hooks";import{getTestId as d,ComponentDefaultTestId as f}from"../../../tests/testIds.js";var p=r((function(r,p){var u=r.className,m=r.id,v=r.activeTabId,b=void 0===v?0:v,T=r.children,h=r["data-testid"],C=a(null),E=s(p,C),I=n(b),y=e(I,2),P=y[0],g=y[1],N=n(b),_=e(N,2),j=_[0],A=_[1],B=c(b);i((function(){b!==B&&b!==j&&(g(j),A(b))}),[b,j,B]);var k=o((function(e){g(j),A(e)}),[j]),x=l((function(){var e=[];return t.Children.forEach(T,(function(r){r.type.isTabPanels&&t.Children.forEach(r.props.children,(function(t,r){e[r]=t.props.id}))})),e}),[T]);return t.createElement("div",{ref:E,className:u,id:m,"data-testid":h||d(f.TABS_CONTEXT,m)},t.Children.map(T,(function(e){if(e.type.isTabList){var r=e.props.onTabChange;return t.cloneElement(e,{activeTabId:j,onTabChange:function(e){k(e),null==r||r(e)},tabPanelIds:x})}return e.type.isTabPanels?t.cloneElement(e,{activeTabId:j,animationDirection:j>P?"ltr":"rtl"}):e})))}));export{p as default};
|
|
2
|
-
//# sourceMappingURL=TabsContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TabsContext.js","sources":["../../../../../../src/components/Tabs/TabsContext/TabsContext.tsx"],"sourcesContent":["import React, {\n type FC,\n forwardRef,\n type ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n useMemo\n} from \"react\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { usePrevious } from \"@vibe/hooks\";\nimport type VibeComponentProps from \"../../../types/VibeComponentProps\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../tests/test-ids-utils\";\n\nexport interface TabsContextProps extends VibeComponentProps {\n /**\n * The index of the currently active tab.\n */\n activeTabId?: number;\n /**\n * The child elements representing the tab list and tab panels.\n */\n children?: ReactElement | ReactElement[];\n}\n\ntype TabsChild = ReactElement & {\n type: Record<string, unknown>;\n};\n\nconst TabsContext: FC<TabsContextProps> = forwardRef(\n ({ className, id, activeTabId = 0, children, \"data-testid\": dataTestId }, ref) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n const [previousActiveTabIdState, setPreviousActiveTabIdState] = useState(activeTabId);\n const [activeTabIdState, setActiveTabIdState] = useState(activeTabId);\n const prevActiveTabIdProp = usePrevious(activeTabId);\n\n useEffect(() => {\n // Update active tab if changed from props\n if (activeTabId !== prevActiveTabIdProp && activeTabId !== activeTabIdState) {\n setPreviousActiveTabIdState(activeTabIdState);\n setActiveTabIdState(activeTabId);\n }\n }, [activeTabId, activeTabIdState, prevActiveTabIdProp]);\n\n const onTabClick = useCallback(\n (tabId: number) => {\n setPreviousActiveTabIdState(activeTabIdState);\n setActiveTabIdState(tabId);\n },\n [activeTabIdState]\n );\n\n // Collect TabPanel ids for aria-controls relationship\n const tabPanelIds = useMemo(() => {\n const ids: string[] = [];\n React.Children.forEach(children, (child: TabsChild) => {\n if (child.type.isTabPanels) {\n React.Children.forEach(child.props.children, (panelChild: ReactElement, index: number) => {\n ids[index] = panelChild.props.id;\n });\n }\n });\n return ids;\n }, [children]);\n\n return (\n <div\n ref={mergedRef}\n className={className}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.TABS_CONTEXT, id)}\n >\n {React.Children.map(children, (child: TabsChild) => {\n if (child.type.isTabList) {\n const originalOnTabChange = child.props.onTabChange;\n const onTabChange = (tabId: number) => {\n onTabClick(tabId);\n originalOnTabChange?.(tabId);\n };\n return React.cloneElement(child, { activeTabId: activeTabIdState, onTabChange, tabPanelIds });\n }\n if (child.type.isTabPanels) {\n const animationDirection = previousActiveTabIdState < activeTabIdState ? \"ltr\" : \"rtl\";\n return React.cloneElement(child, { activeTabId: activeTabIdState, animationDirection });\n }\n return child;\n })}\n </div>\n );\n }\n);\n\nexport default TabsContext;\n"],"names":["TabsContext","forwardRef","_ref","ref","className","id","_ref$activeTabId","activeTabId","children","dataTestId","componentRef","useRef","mergedRef","useMergeRef","_useState","useState","_useState2","_slicedToArray","previousActiveTabIdState","setPreviousActiveTabIdState","_useState3","_useState4","activeTabIdState","setActiveTabIdState","prevActiveTabIdProp","usePrevious","useEffect","onTabClick","useCallback","tabId","tabPanelIds","useMemo","ids","React","Children","forEach","child","type","isTabPanels","props","panelChild","index","createElement","getTestId","ComponentDefaultTestId","TABS_CONTEXT","map","isTabList","originalOnTabChange","onTabChange","cloneElement","animationDirection"],"mappings":"sWA8BMA,IAAAA,EAAoCC,GACxC,SAAAC,EAA0EC,GAAO,IAA9EC,EAASF,EAATE,UAAWC,EAAEH,EAAFG,GAAEC,EAAAJ,EAAEK,YAAAA,OAAc,IAAHD,EAAG,EAACA,EAAEE,EAAQN,EAARM,SAAyBC,EAAUP,EAAzB,eACrCQ,EAAeC,EAAO,MACtBC,EAAYC,EAAYV,EAAKO,GAEnCI,EAAgEC,EAASR,GAAYS,EAAAC,EAAAH,EAAA,GAA9EI,EAAwBF,EAAA,GAAEG,EAA2BH,EAAA,GAC5DI,EAAgDL,EAASR,GAAYc,EAAAJ,EAAAG,EAAA,GAA9DE,EAAgBD,EAAA,GAAEE,EAAmBF,EAAA,GACtCG,EAAsBC,EAAYlB,GAExCmB,GAAU,WAEJnB,IAAgBiB,GAAuBjB,IAAgBe,IACzDH,EAA4BG,GAC5BC,EAAoBhB,GAEvB,GAAE,CAACA,EAAae,EAAkBE,IAEnC,IAAMG,EAAaC,GACjB,SAACC,GACCV,EAA4BG,GAC5BC,EAAoBM,EACtB,GACA,CAACP,IAIGQ,EAAcC,GAAQ,WAC1B,IAAMC,EAAgB,GAQtB,OAPAC,EAAMC,SAASC,QAAQ3B,GAAU,SAAC4B,GAC5BA,EAAMC,KAAKC,aACbL,EAAMC,SAASC,QAAQC,EAAMG,MAAM/B,UAAU,SAACgC,EAA0BC,GACtET,EAAIS,GAASD,EAAWD,MAAMlC,EAChC,GAEJ,IACO2B,CACT,GAAG,CAACxB,IAEJ,OACEyB,EACES,cAAA,MAAA,CAAAvC,IAAKS,EACLR,UAAWA,EACXC,GAAIA,EACS,cAAAI,GAAckC,EAAUC,EAAuBC,aAAcxC,IAEzE4B,EAAMC,SAASY,IAAItC,GAAU,SAAC4B,GAC7B,GAAIA,EAAMC,KAAKU,UAAW,CACxB,IAAMC,EAAsBZ,EAAMG,MAAMU,YAKxC,OAAOhB,EAAMiB,aAAad,EAAO,CAAE7B,YAAae,EAAkB2B,YAJ9C,SAACpB,GACnBF,EAAWE,GACXmB,SAAAA,EAAsBnB,IAEuDC,YAAAA,GACjF,CACA,OAAIM,EAAMC,KAAKC,YAENL,EAAMiB,aAAad,EAAO,CAAE7B,YAAae,EAAkB6B,mBADZ7B,EAA3BJ,EAA8C,MAAQ,QAG5EkB,CACR,IAGP"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useMemo as e,useCallback as n,useEffect as o}from"react";import{noop as t}from"es-toolkit";import{NavDirections as a,useKeyEvent as c,ARROW_DOWN_KEYS as i,ARROW_UP_KEYS as r,ARROW_RIGHT_KEYS as s,ARROW_LEFT_KEYS as l}from"@vibe/shared";export{ARROW_DOWN_KEYS,ARROW_LEFT_KEYS,ARROW_RIGHT_KEYS,ARROW_UP_KEYS,NavDirections}from"@vibe/shared";var u=["Enter"," "],b=["Enter"],f=["Escape"],v=["End"],k=["Home"];function O(b){var O=b.ref,d=b.onSelectionKey,E=void 0===d?t:d,g=b.onArrowNavigation,m=void 0===g?t:g,p=b.onEscape,R=void 0===p?t:p,y=b.onHome,j=void 0===y?t:y,_=b.onEnd,W=void 0===_?t:_,A=b.useDocumentEventListeners,D=void 0!==A&&A,K=b.focusOnMount,S=void 0!==K&&K,H=e((function(){if(!D)return{ref:O,preventDefault:!0,stopPropagation:!0}}),[D,O]),N=n((function(){return m(a.DOWN)}),[m]),T=n((function(){return m(a.UP)}),[m]),Y=n((function(){return m(a.RIGHT)}),[m]),L=n((function(){return m(a.LEFT)}),[m]);c(Object.assign({keys:i,callback:N},H)),c(Object.assign({keys:r,callback:T},H)),c(Object.assign({keys:s,callback:Y},H)),c(Object.assign({keys:l,callback:L},H)),c(Object.assign({keys:u,callback:E},H)),c(Object.assign({keys:f,callback:R},H)),c(Object.assign({keys:k,callback:j},H)),c(Object.assign({keys:v,callback:W},H)),o((function(){var e;S&&!D&&(null===(e=null==O?void 0:O.current)||void 0===e||e.focus())}),[S,O,D])}export{v as END_KEYS,b as ENTER_KEYS,f as ESCAPE_KEYS,k as HOME_KEYS,u as SELECTION_KEYS,O as default};
|
|
2
|
-
//# sourceMappingURL=useFullKeyboardListeners.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFullKeyboardListeners.js","sources":["../../../../src/hooks/useFullKeyboardListeners.ts"],"sourcesContent":["import { type MutableRefObject, useCallback, useEffect, useMemo } from \"react\";\nimport { noop } from \"es-toolkit\";\nimport useKeyEvent from \"./useKeyEvent\";\nimport { type KeyboardEventCallback } from \"../types/events\";\nimport { NavDirections, ARROW_DOWN_KEYS, ARROW_UP_KEYS, ARROW_RIGHT_KEYS, ARROW_LEFT_KEYS } from \"@vibe/shared\";\n\nexport { NavDirections, ARROW_DOWN_KEYS, ARROW_UP_KEYS, ARROW_RIGHT_KEYS, ARROW_LEFT_KEYS };\n\nexport const SELECTION_KEYS = [\"Enter\", \" \"];\nexport const ENTER_KEYS = [\"Enter\"];\nexport const ESCAPE_KEYS = [\"Escape\"];\nexport const END_KEYS = [\"End\"];\nexport const HOME_KEYS = [\"Home\"];\n\nexport default function useFullKeyboardListeners({\n ref, // the reference for the component that listens to keyboard\n onSelectionKey = noop,\n onArrowNavigation = noop,\n onEscape = noop,\n onHome = noop,\n onEnd = noop,\n useDocumentEventListeners = false,\n focusOnMount = false\n}: {\n ref: MutableRefObject<HTMLElement>;\n onSelectionKey: KeyboardEventCallback;\n onArrowNavigation: (type: NavDirections) => void;\n onEscape: KeyboardEventCallback;\n onHome?: KeyboardEventCallback;\n onEnd?: KeyboardEventCallback;\n useDocumentEventListeners?: boolean;\n focusOnMount: boolean;\n}) {\n const listenerOptions = useMemo(() => {\n if (useDocumentEventListeners) return undefined;\n\n return {\n ref,\n preventDefault: true,\n stopPropagation: true\n };\n }, [useDocumentEventListeners, ref]);\n\n const onArrowDown = useCallback(() => onArrowNavigation(NavDirections.DOWN), [onArrowNavigation]);\n const onArrowUp = useCallback(() => onArrowNavigation(NavDirections.UP), [onArrowNavigation]);\n const onArrowRight = useCallback(() => onArrowNavigation(NavDirections.RIGHT), [onArrowNavigation]);\n const onArrowLeft = useCallback(() => onArrowNavigation(NavDirections.LEFT), [onArrowNavigation]);\n\n useKeyEvent({\n keys: ARROW_DOWN_KEYS,\n callback: onArrowDown,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_UP_KEYS,\n callback: onArrowUp,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_RIGHT_KEYS,\n callback: onArrowRight,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ARROW_LEFT_KEYS,\n callback: onArrowLeft,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: SELECTION_KEYS,\n callback: onSelectionKey,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: ESCAPE_KEYS,\n callback: onEscape,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: HOME_KEYS,\n callback: onHome,\n ...listenerOptions\n });\n\n useKeyEvent({\n keys: END_KEYS,\n callback: onEnd,\n ...listenerOptions\n });\n\n useEffect(() => {\n if (!focusOnMount || useDocumentEventListeners) return;\n ref?.current?.focus();\n }, [focusOnMount, ref, useDocumentEventListeners]);\n}\n"],"names":["SELECTION_KEYS","ENTER_KEYS","ESCAPE_KEYS","END_KEYS","HOME_KEYS","useFullKeyboardListeners","_ref","ref","_ref$onSelectionKey","onSelectionKey","noop","_ref$onArrowNavigatio","onArrowNavigation","_ref$onEscape","onEscape","_ref$onHome","onHome","_ref$onEnd","onEnd","_ref$useDocumentEvent","useDocumentEventListeners","_ref$focusOnMount","focusOnMount","listenerOptions","useMemo","preventDefault","stopPropagation","onArrowDown","useCallback","NavDirections","DOWN","onArrowUp","UP","onArrowRight","RIGHT","onArrowLeft","LEFT","useKeyEvent","Object","assign","keys","ARROW_DOWN_KEYS","callback","ARROW_UP_KEYS","ARROW_RIGHT_KEYS","ARROW_LEFT_KEYS","useEffect","_a","current","focus"],"mappings":"8VAQaA,EAAiB,CAAC,QAAS,KAC3BC,EAAa,CAAC,SACdC,EAAc,CAAC,UACfC,EAAW,CAAC,OACZC,EAAY,CAAC,QAEF,SAAAC,EAAwBC,GAkB/C,IAjBCC,EAAGD,EAAHC,IAAGC,EAAAF,EACHG,eAAAA,OAAiBC,IAAHF,EAAGE,EAAIF,EAAAG,EAAAL,EACrBM,kBAAAA,OAAoBF,IAAHC,EAAGD,EAAIC,EAAAE,EAAAP,EACxBQ,SAAAA,OAAWJ,IAAHG,EAAGH,EAAIG,EAAAE,EAAAT,EACfU,OAAAA,OAASN,IAAHK,EAAGL,EAAIK,EAAAE,EAAAX,EACbY,MAAAA,OAAQR,IAAHO,EAAGP,EAAIO,EAAAE,EAAAb,EACZc,0BAAAA,OAA4B,IAAHD,GAAQA,EAAAE,EAAAf,EACjCgB,aAAAA,OAAe,IAAHD,GAAQA,EAWdE,EAAkBC,GAAQ,WAC9B,IAAIJ,EAEJ,MAAO,CACLb,IAAAA,EACAkB,gBAAgB,EAChBC,iBAAiB,EAErB,GAAG,CAACN,EAA2Bb,IAEzBoB,EAAcC,GAAY,WAAA,OAAMhB,EAAkBiB,EAAcC,QAAO,CAAClB,IACxEmB,EAAYH,GAAY,WAAA,OAAMhB,EAAkBiB,EAAcG,MAAK,CAACpB,IACpEqB,EAAeL,GAAY,WAAA,OAAMhB,EAAkBiB,EAAcK,SAAQ,CAACtB,IAC1EuB,EAAcP,GAAY,WAAA,OAAMhB,EAAkBiB,EAAcO,QAAO,CAACxB,IAE9EyB,EAAWC,OAAAC,OAAA,CACTC,KAAMC,EACNC,SAAUf,GACPJ,IAGLc,EAAWC,OAAAC,OAAA,CACTC,KAAMG,EACND,SAAUX,GACPR,IAGLc,EAAWC,OAAAC,OAAA,CACTC,KAAMI,EACNF,SAAUT,GACPV,IAGLc,EAAWC,OAAAC,OAAA,CACTC,KAAMK,EACNH,SAAUP,GACPZ,IAGLc,EAAWC,OAAAC,OAAA,CACTC,KAAMxC,EACN0C,SAAUjC,GACPc,IAGLc,EAAWC,OAAAC,OAAA,CACTC,KAAMtC,EACNwC,SAAU5B,GACPS,IAGLc,EAAWC,OAAAC,OAAA,CACTC,KAAMpC,EACNsC,SAAU1B,GACPO,IAGLc,EAAWC,OAAAC,OAAA,CACTC,KAAMrC,EACNuC,SAAUxB,GACPK,IAGLuB,GAAU,iBACHxB,IAAgBF,IACT,QAAZ2B,EAAAxC,aAAA,EAAAA,EAAKyC,eAAO,IAAAD,GAAAA,EAAEE,QACf,GAAE,CAAC3B,EAAcf,EAAKa,GACzB"}
|
package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"react";import"es-toolkit";import{NavDirections as n}from"@vibe/shared";function t(t){var e=t.direction,i=t.numberOfItemsInLine,r=t.itemsCount,u=function(){var t=Math.floor(i/2);if(e===n.UP)return(Math.ceil(r/i)-1)*i+t;if(e===n.DOWN)return t;if(e===n.LEFT){for(var u=i-1,o=Math.floor((r-1)/2);o>u;)u+=i;return u}if(e===n.RIGHT){for(var a=0,c=Math.floor((r-1)/2);c>a+i;)a+=i;return a}}();return Math.max(0,Math.min(u,r-1))}function e(t){var e=t.activeIndex,i=t.itemsCount,r=t.numberOfItemsInLine,u=t.circularNavigation,o=void 0!==u&&u,a=function(n){return Math.ceil((n+1)/r)},c=function(n){var t=e+(n?1:-1);if(0>t||t>=i){if(!o)return{isOutbound:!0};0>t?t=i-1:i>t||(t=0)}return a(e)!==a(t)?{isOutbound:!0}:{isOutbound:!1,nextIndex:t}},d=function(n){var t=e+r*(n?1:-1);return 0>t||t>=i?{isOutbound:!0}:{isOutbound:!1,nextIndex:t}};switch(t.direction){case n.RIGHT:return c(!0);case n.LEFT:return c(!1);case n.DOWN:return d(!0);case n.UP:return d(!1)}}function i(n){for(var t=n.itemsCount,i=n.numberOfItemsInLine,r=n.direction,u=n.disabledIndexes,o=void 0===u?[]:u,a=n.circularNavigation,c=void 0!==a&&a,d=e({activeIndex:n.activeIndex,itemsCount:t,numberOfItemsInLine:i,direction:r,circularNavigation:c});!d.isOutbound&&o.includes(d.nextIndex);)d=e({activeIndex:d.nextIndex,itemsCount:t,numberOfItemsInLine:i,direction:r,circularNavigation:c});return d}export{i as calcActiveIndexAfterArrowNavigation,t as getActiveIndexFromInboundNavigation};
|
|
2
|
-
//# sourceMappingURL=gridKeyboardNavigationHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gridKeyboardNavigationHelper.js","sources":["../../../../../src/hooks/useGridKeyboardNavigation/gridKeyboardNavigationHelper.ts"],"sourcesContent":["import { NavDirections } from \"../useFullKeyboardListeners\";\n\nexport function getActiveIndexFromInboundNavigation({\n direction,\n numberOfItemsInLine,\n itemsCount\n}: {\n direction: NavDirections;\n numberOfItemsInLine: number;\n itemsCount: number;\n}) {\n const getRawIndex = () => {\n const firstLineMiddleIndex = Math.floor(numberOfItemsInLine / 2);\n if (direction === NavDirections.UP) {\n // last line, middle\n const rowCount = Math.ceil(itemsCount / numberOfItemsInLine);\n return (rowCount - 1) * numberOfItemsInLine + firstLineMiddleIndex;\n }\n if (direction === NavDirections.DOWN) {\n // first line, middle\n return firstLineMiddleIndex;\n }\n if (direction === NavDirections.LEFT) {\n // middle line, last item\n let result = numberOfItemsInLine - 1;\n const midIndex = Math.floor((itemsCount - 1) / 2);\n while (result < midIndex) {\n result += numberOfItemsInLine;\n }\n return result;\n }\n if (direction === NavDirections.RIGHT) {\n // middle line, first item\n let result = 0;\n const midIndex = Math.floor((itemsCount - 1) / 2);\n while (result + numberOfItemsInLine < midIndex) {\n result += numberOfItemsInLine;\n }\n return result;\n }\n };\n\n const rawIndex = getRawIndex();\n return Math.max(0, Math.min(rawIndex, itemsCount - 1));\n}\n\nfunction calcRawNewIndexAfterArrowNavigation({\n activeIndex,\n itemsCount,\n numberOfItemsInLine,\n direction,\n circularNavigation = false\n}: {\n activeIndex: number;\n itemsCount: number;\n numberOfItemsInLine: number;\n direction: NavDirections;\n circularNavigation?: boolean;\n}) {\n const getIndexLine = (index: number) => Math.ceil((index + 1) / numberOfItemsInLine);\n\n const horizontalChange = (isIndexIncrease: boolean) => {\n let nextIndex = activeIndex + (isIndexIncrease ? 1 : -1);\n\n if (nextIndex < 0 || nextIndex >= itemsCount) {\n if (circularNavigation) {\n if (nextIndex < 0) {\n nextIndex = itemsCount - 1;\n } else if (nextIndex >= itemsCount) {\n nextIndex = 0;\n }\n } else {\n return { isOutbound: true };\n }\n }\n\n const currentLine = getIndexLine(activeIndex);\n const nextIndexLine = getIndexLine(nextIndex);\n if (currentLine !== nextIndexLine) {\n return { isOutbound: true };\n }\n\n return { isOutbound: false, nextIndex };\n };\n\n const verticalChange = (isIndexIncrease: boolean) => {\n const nextIndex = activeIndex + numberOfItemsInLine * (isIndexIncrease ? 1 : -1);\n if (nextIndex < 0 || itemsCount <= nextIndex) {\n return { isOutbound: true };\n }\n return { isOutbound: false, nextIndex };\n };\n\n switch (direction) {\n case NavDirections.RIGHT:\n return horizontalChange(true);\n case NavDirections.LEFT:\n return horizontalChange(false);\n case NavDirections.DOWN:\n return verticalChange(true);\n case NavDirections.UP:\n return verticalChange(false);\n }\n}\n\nexport function calcActiveIndexAfterArrowNavigation({\n activeIndex,\n itemsCount,\n numberOfItemsInLine,\n direction,\n disabledIndexes = [],\n circularNavigation = false\n}: {\n activeIndex: number;\n itemsCount: number;\n numberOfItemsInLine: number;\n direction: NavDirections;\n disabledIndexes?: number[];\n circularNavigation?: boolean;\n}) {\n let result = calcRawNewIndexAfterArrowNavigation({\n activeIndex,\n itemsCount,\n numberOfItemsInLine,\n direction,\n circularNavigation\n });\n while (!result.isOutbound && disabledIndexes.includes(result.nextIndex)) {\n result = calcRawNewIndexAfterArrowNavigation({\n activeIndex: result.nextIndex,\n itemsCount,\n numberOfItemsInLine,\n direction,\n circularNavigation\n });\n }\n\n return result;\n}\n"],"names":["getActiveIndexFromInboundNavigation","_ref","direction","numberOfItemsInLine","itemsCount","rawIndex","firstLineMiddleIndex","Math","floor","NavDirections","UP","ceil","DOWN","LEFT","result","midIndex","RIGHT","getRawIndex","max","min","calcRawNewIndexAfterArrowNavigation","_ref2","activeIndex","_ref2$circularNavigat","circularNavigation","getIndexLine","index","horizontalChange","isIndexIncrease","nextIndex","isOutbound","verticalChange","calcActiveIndexAfterArrowNavigation","_ref3","_ref3$disabledIndexes","disabledIndexes","_ref3$circularNavigat","includes"],"mappings":"8EAEM,SAAUA,EAAmCC,GAQlD,IAPCC,EAASD,EAATC,UACAC,EAAmBF,EAAnBE,oBACAC,EAAUH,EAAVG,WAqCMC,EA/Bc,WAClB,IAAMC,EAAuBC,KAAKC,MAAML,EAAsB,GAC9D,GAAID,IAAcO,EAAcC,GAG9B,OADiBH,KAAKI,KAAKP,EAAaD,GACrB,GAAKA,EAAsBG,EAEhD,GAAIJ,IAAcO,EAAcG,KAE9B,OAAON,EAET,GAAIJ,IAAcO,EAAcI,KAAM,CAIpC,IAFA,IAAIC,EAASX,EAAsB,EAC7BY,EAAWR,KAAKC,OAAOJ,EAAa,GAAK,GAC/BW,EAATD,GACLA,GAAUX,EAEZ,OAAOW,CACT,CACA,GAAIZ,IAAcO,EAAcO,MAAO,CAIrC,IAFA,IAAIF,EAAS,EACPC,EAAWR,KAAKC,OAAOJ,EAAa,GAAK,GACTW,EAA/BD,EAASX,GACdW,GAAUX,EAEZ,OAAOW,CACT,EAGeG,GACjB,OAAOV,KAAKW,IAAI,EAAGX,KAAKY,IAAId,EAAUD,EAAa,GACrD,CAEA,SAASgB,EAAmCC,GAY3C,IAXCC,EAAWD,EAAXC,YACAlB,EAAUiB,EAAVjB,WACAD,EAAmBkB,EAAnBlB,oBACSoB,EAAAF,EACTG,mBAAAA,OAAqB,IAAHD,GAAQA,EAQpBE,EAAe,SAACC,GAAa,OAAKnB,KAAKI,MAAMe,EAAQ,GAAKvB,EAAoB,EAE9EwB,EAAmB,SAACC,GACxB,IAAIC,EAAYP,GAAeM,EAAkB,GAAK,GAEtD,GAAgB,EAAZC,GAAiBA,GAAazB,EAAY,CAC5C,IAAIoB,EAOF,MAAO,CAAEM,YAAY,GANL,EAAZD,EACFA,EAAYzB,EAAa,EACHA,EAAbyB,IACTA,EAAY,EAKlB,CAIA,OAFoBJ,EAAaH,KACXG,EAAaI,GAE1B,CAAEC,YAAY,GAGhB,CAAEA,YAAY,EAAOD,UAAAA,IAGxBE,EAAiB,SAACH,GACtB,IAAMC,EAAYP,EAAcnB,GAAuByB,EAAkB,GAAK,GAC9E,OAAgB,EAAZC,GAA+BA,GAAdzB,EACZ,CAAE0B,YAAY,GAEhB,CAAEA,YAAY,EAAOD,UAAAA,IAG9B,OA3CSR,EAATnB,WA4CE,KAAKO,EAAcO,MACjB,OAAOW,GAAiB,GAC1B,KAAKlB,EAAcI,KACjB,OAAOc,GAAiB,GAC1B,KAAKlB,EAAcG,KACjB,OAAOmB,GAAe,GACxB,KAAKtB,EAAcC,GACjB,OAAOqB,GAAe,GAE5B,UAEgBC,EAAmCC,GAsBjD,IARD,IAZC7B,EAAU6B,EAAV7B,WACAD,EAAmB8B,EAAnB9B,oBACAD,EAAS+B,EAAT/B,UAASgC,EAAAD,EACTE,gBAAAA,OAAkB,IAAHD,EAAG,GAAEA,EAAAE,EAAAH,EACpBT,mBAAAA,OAAqB,IAAHY,GAAQA,EAStBtB,EAASM,EAAoC,CAC/CE,YAfSW,EAAXX,YAgBElB,WAAAA,EACAD,oBAAAA,EACAD,UAAAA,EACAsB,mBAAAA,KAEMV,EAAOgB,YAAcK,EAAgBE,SAASvB,EAAOe,YAC3Df,EAASM,EAAoC,CAC3CE,YAAaR,EAAOe,UACpBzB,WAAAA,EACAD,oBAAAA,EACAD,UAAAA,EACAsB,mBAAAA,IAIJ,OAAOV,CACT"}
|
package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{useState as e,useRef as i,useContext as t,useCallback as r,useEffect as o}from"react";import{GridKeyboardNavigationContext as u}from"@vibe/a11y/mockedClassNames";import a from"../useFullKeyboardListeners.js";import{useLastNavigationDirection as c,useEventListener as l}from"@vibe/shared";import{getActiveIndexFromInboundNavigation as d,calcActiveIndexAfterArrowNavigation as f}from"./gridKeyboardNavigationHelper.js";var s=-1;function v(v){var m=v.ref,b=v.itemsCount,I=v.numberOfItemsInLine,g=v.onItemClicked,p=v.entryFocusStrategy,y=void 0===p?"directional":p,N=v.getItemByIndex,x=void 0===N?function(n){}:N,O=v.focusOnMount,h=void 0!==O&&O,A=v.focusItemIndexOnMount,k=void 0===A?s:A,C=v.disabledIndexes,L=void 0===C?[]:C,S=v.circularNavigation,j=void 0!==S&&S,H=e(h&&k!==s),K=n(H,2),M=K[0],w=K[1],B=i(!1),E=e(M?k:s),F=n(E,2),_=F[0],D=F[1],P=e(!0),R=n(P,2),T=R[0],q=R[1],z=t(u),G=r((function(){var n;q(!0);var e=L.includes(0)&&b>L.length&&null!==(n=Array.from({length:b},(function(n,e){return e})).find((function(n){return!L.includes(n)})))&&void 0!==n?n:0;D(e)}),[L,b]),J=r((function(){var n;q(!0);var e=L.includes(b-1)&&b>L.length&&null!==(n=Array.from({length:b},(function(n,e){return b-1-e})).find((function(n){return!L.includes(n)})))&&void 0!==n?n:b-1;D(e)}),[L,b]);o((function(){B.current?w(!1):B.current=!0}),[_]);var Q=r((function(){var n;return null===(n=m.current)||void 0===n?void 0:n.blur()}),[m]),U=c().lastNavigationDirectionRef,V=r((function(){if(_===s){var n=U.current;D("directional"===y&&n?d({direction:n,numberOfItemsInLine:I,itemsCount:b}):0),q(!0)}else q(!0)}),[_,y,b,U,I,D,q]),W=r((function(){q(!1)}),[q]),X=r((function(){q(!0),D(s)}),[D]);l({eventName:"focus",callback:V,ref:m}),l({eventName:"mousedown",callback:W,ref:m}),l({eventName:"blur",callback:X,ref:m}),o((function(){var n;_>-1&&(null===(n=m.current)||void 0===n||n.focus())}),[_,m]);var Y=r((function(n){q(arguments.length>1&&void 0!==arguments[1]&&arguments[1]),D(n),g(x(n),n)}),[D,g,x]),Z=r((function(){if(T)return Y(_,!0)}),[T,Y,_]);return a({ref:m,onSelectionKey:Z,onArrowNavigation:function(n){if(q(!0),_!==s){var e=f({activeIndex:_,itemsCount:b,numberOfItemsInLine:I,direction:n,disabledIndexes:L,circularNavigation:j}),i=e.nextIndex;e.isOutbound?null==z||z.onOutboundNavigation(m,n):D(i)}else D(0)},onEscape:Q,onHome:G,onEnd:J,focusOnMount:h}),{activeIndex:T?_:s,onSelectionAction:Y,isInitialActiveState:M}}export{v as default};
|
|
2
|
-
//# sourceMappingURL=useGridKeyboardNavigation.js.map
|
package/dist/mocked_classnames/src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useGridKeyboardNavigation.js","sources":["../../../../../src/hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.ts"],"sourcesContent":["import { type MutableRefObject, type ReactElement, useCallback, useContext, useEffect, useRef, useState } from \"react\";\nimport { GridKeyboardNavigationContext } from \"@vibe/a11y\";\nimport useFullKeyboardListeners, { type NavDirections } from \"../../hooks/useFullKeyboardListeners\";\nimport { useEventListener, useLastNavigationDirection } from \"@vibe/shared\";\nimport {\n calcActiveIndexAfterArrowNavigation,\n getActiveIndexFromInboundNavigation\n} from \"./gridKeyboardNavigationHelper\";\n\nconst NO_ACTIVE_INDEX = -1;\n\n/**\n * A hook which is used for accessible keyboard navigation. Useful for components rendering a list of items that can be navigated and selected with a keyboard.\n * @param {Object} options\n * @param {React.MutableRefObject} options.ref - the reference for the component that listens to keyboard\n * @param {number} options.itemsCount - the number of items\n * @param {number} options.numberOfItemsInLine - the number of items on each line of the grid\n * @param {function} options.onItemClicked - the callback for selecting an item. It will be called when an active item is selected, for example with \"Enter\".\n * @param {function} options.getItemByIndex - a function which gets an index as a param, and returns the item on that index\n * @param {\"directional\" | \"first\"} options.entryFocusStrategy - Determines how the first item is focused when entering the grid via keyboard.\n * - \"directional\": Tries to focus based on the entry direction (Tab vs Shift+Tab). This is the default.\n * - \"first\": Always focuses the first item.\n * @param {boolean=} options.focusOnMount - if true, the referenced element will be focused when mounted\n * @param {number=} options.focusItemIndexOnMount - optional item index to focus when mounted. Only works with \"options.focusOnMount\".\n * @param {number[]=} options.disabledIndexes - optional array of disabled indices, which will be skipped while navigating.\n * @param {boolean=} options.circularNavigation - if true, the navigation will wrap around the grid\n * @returns {useGridKeyboardNavigationResult}\n *\n * @typedef useGridKeyboardNavigationResult\n * @property {number} activeIndex - the currently active index\n * @property {boolean} isInitialActiveState - if true, the currently active element was due to an initial mounting index option. See \"options.focusItemIndexOnMount\".\n * @property {(index: number, isKeyboardAction?: boolean) => void} onSelectionAction - the callback which should be used to select an item.\n * It should be called with the selected item's index. Use this callback for onClick handlers, for example.\n * The \"isKeyboardAction\" can be used to indicate a keyboard selection, which will affect the currently active index.\n */\nexport default function useGridKeyboardNavigation({\n ref,\n itemsCount,\n numberOfItemsInLine,\n onItemClicked, // the callback to call when an item is selected\n entryFocusStrategy = \"directional\",\n getItemByIndex = (_index: number) => {},\n focusOnMount = false,\n focusItemIndexOnMount = NO_ACTIVE_INDEX,\n disabledIndexes = [],\n circularNavigation = false\n}: {\n ref: MutableRefObject<HTMLElement>;\n itemsCount: number;\n numberOfItemsInLine: number;\n onItemClicked: (element: HTMLElement | ReactElement | void | string, index: number) => void;\n entryFocusStrategy?: \"directional\" | \"first\";\n getItemByIndex: (index: number | void) => HTMLElement | ReactElement | void | string;\n focusOnMount?: boolean;\n focusItemIndexOnMount?: number;\n disabledIndexes?: number[];\n circularNavigation?: boolean;\n}) {\n const [isInitialActiveState, setIsInitialActiveState] = useState(\n focusOnMount && focusItemIndexOnMount !== NO_ACTIVE_INDEX\n );\n const skippedInitialActiveIndexChange = useRef(false);\n const [activeIndex, setActiveIndex] = useState(isInitialActiveState ? focusItemIndexOnMount : NO_ACTIVE_INDEX);\n const [isUsingKeyboardNav, setIsUsingKeyboardNav] = useState(true);\n\n const keyboardContext = useContext(GridKeyboardNavigationContext);\n\n const onArrowNavigation = (direction: NavDirections) => {\n setIsUsingKeyboardNav(true);\n if (activeIndex === NO_ACTIVE_INDEX) {\n setActiveIndex(0);\n return;\n }\n\n const { isOutbound, nextIndex } = calcActiveIndexAfterArrowNavigation({\n activeIndex,\n itemsCount,\n numberOfItemsInLine,\n direction,\n disabledIndexes,\n circularNavigation\n });\n if (isOutbound) {\n keyboardContext?.onOutboundNavigation(ref, direction);\n } else {\n setActiveIndex(nextIndex);\n }\n };\n\n const onHomeNavigation = useCallback(() => {\n setIsUsingKeyboardNav(true);\n const firstEnabledIndex = disabledIndexes.includes(0)\n ? disabledIndexes.length < itemsCount\n ? Array.from({ length: itemsCount }, (_, i) => i).find(i => !disabledIndexes.includes(i)) ?? 0\n : 0\n : 0;\n setActiveIndex(firstEnabledIndex);\n }, [disabledIndexes, itemsCount]);\n\n const onEndNavigation = useCallback(() => {\n setIsUsingKeyboardNav(true);\n const lastEnabledIndex = disabledIndexes.includes(itemsCount - 1)\n ? disabledIndexes.length < itemsCount\n ? Array.from({ length: itemsCount }, (_, i) => itemsCount - 1 - i).find(i => !disabledIndexes.includes(i)) ??\n itemsCount - 1\n : itemsCount - 1\n : itemsCount - 1;\n setActiveIndex(lastEnabledIndex);\n }, [disabledIndexes, itemsCount]);\n\n useEffect(() => {\n if (!skippedInitialActiveIndexChange.current) {\n skippedInitialActiveIndexChange.current = true;\n return;\n }\n // if the active state changes, this is no longer the initial active state\n setIsInitialActiveState(false);\n }, [activeIndex]);\n\n const blurTargetElement = useCallback(() => ref.current?.blur(), [ref]);\n\n const { lastNavigationDirectionRef } = useLastNavigationDirection();\n const onFocus = useCallback(() => {\n if (activeIndex !== NO_ACTIVE_INDEX) {\n setIsUsingKeyboardNav(true);\n return;\n }\n\n const direction = lastNavigationDirectionRef.current;\n setActiveIndex(\n entryFocusStrategy === \"directional\" && direction\n ? getActiveIndexFromInboundNavigation({ direction, numberOfItemsInLine, itemsCount })\n : 0\n );\n setIsUsingKeyboardNav(true);\n }, [\n activeIndex,\n entryFocusStrategy,\n itemsCount,\n lastNavigationDirectionRef,\n numberOfItemsInLine,\n setActiveIndex,\n setIsUsingKeyboardNav\n ]);\n\n const onMouseDown = useCallback(() => {\n // If the user clicked on the grid element we assume that that what will caused the focus\n setIsUsingKeyboardNav(false);\n }, [setIsUsingKeyboardNav]);\n\n const onBlur = useCallback(() => {\n // If we lose focus we will return to isUsingKeyboardNav default mode which is that any interaction\n // with the grid always done by keyboard, unless we clicked on the grid element before that with a mouse\n setIsUsingKeyboardNav(true);\n setActiveIndex(NO_ACTIVE_INDEX);\n }, [setActiveIndex]);\n\n useEventListener({ eventName: \"focus\", callback: onFocus, ref });\n useEventListener({ eventName: \"mousedown\", callback: onMouseDown, ref });\n useEventListener({ eventName: \"blur\", callback: onBlur, ref });\n\n useEffect(() => {\n if (activeIndex > -1) {\n ref.current?.focus();\n }\n }, [activeIndex, ref]);\n\n const onSelectionAction = useCallback(\n (index: number, isKeyboardAction = false) => {\n setIsUsingKeyboardNav(isKeyboardAction);\n setActiveIndex(index);\n\n onItemClicked(getItemByIndex(index), index);\n },\n [setActiveIndex, onItemClicked, getItemByIndex]\n );\n\n const onKeyboardSelection = useCallback(() => {\n if (!isUsingKeyboardNav) {\n return;\n }\n return onSelectionAction(activeIndex, true);\n }, [isUsingKeyboardNav, onSelectionAction, activeIndex]);\n\n useFullKeyboardListeners({\n ref,\n onSelectionKey: onKeyboardSelection,\n onArrowNavigation,\n onEscape: blurTargetElement,\n onHome: onHomeNavigation,\n onEnd: onEndNavigation,\n focusOnMount\n });\n\n // if the user is not using keyboard nav, the consumers should not treat the index as active\n const externalActiveIndex = isUsingKeyboardNav ? activeIndex : NO_ACTIVE_INDEX;\n return {\n activeIndex: externalActiveIndex,\n onSelectionAction,\n isInitialActiveState\n };\n}\n"],"names":["NO_ACTIVE_INDEX","useGridKeyboardNavigation","_ref","ref","itemsCount","numberOfItemsInLine","onItemClicked","_ref$entryFocusStrate","entryFocusStrategy","_ref$getItemByIndex","getItemByIndex","_index","_ref$focusOnMount","focusOnMount","_ref$focusItemIndexOn","focusItemIndexOnMount","_ref$disabledIndexes","disabledIndexes","_ref$circularNavigati","circularNavigation","_useState","useState","_useState2","_slicedToArray","isInitialActiveState","setIsInitialActiveState","skippedInitialActiveIndexChange","useRef","_useState3","_useState4","activeIndex","setActiveIndex","_useState5","_useState6","isUsingKeyboardNav","setIsUsingKeyboardNav","keyboardContext","useContext","GridKeyboardNavigationContext","onHomeNavigation","useCallback","firstEnabledIndex","includes","length","_a","Array","from","_","i","find","onEndNavigation","lastEnabledIndex","useEffect","current","blurTargetElement","blur","lastNavigationDirectionRef","useLastNavigationDirection","onFocus","direction","getActiveIndexFromInboundNavigation","onMouseDown","onBlur","useEventListener","eventName","callback","focus","onSelectionAction","index","arguments","undefined","onKeyboardSelection","useFullKeyboardListeners","onSelectionKey","onArrowNavigation","_calcActiveIndexAfter","calcActiveIndexAfterArrowNavigation","nextIndex","isOutbound","onOutboundNavigation","onEscape","onHome","onEnd"],"mappings":"ufASA,IAAMA,GAAmB,EA0BD,SAAAC,EAAyBC,GAsBhD,IArBCC,EAAGD,EAAHC,IACAC,EAAUF,EAAVE,WACAC,EAAmBH,EAAnBG,oBACAC,EAAaJ,EAAbI,cAAaC,EAAAL,EACbM,mBAAAA,OAAqB,IAAHD,EAAG,cAAaA,EAAAE,EAAAP,EAClCQ,eAAAA,OAAiB,IAAHD,EAAG,SAACE,GAAqB,EAAAF,EAAAG,EAAAV,EACvCW,aAAAA,OAAe,IAAHD,GAAQA,EAAAE,EAAAZ,EACpBa,sBAAAA,OAAwBf,IAAHc,EAAGd,EAAec,EAAAE,EAAAd,EACvCe,gBAAAA,OAAkB,IAAHD,EAAG,GAAEA,EAAAE,EAAAhB,EACpBiB,mBAAAA,OAAqB,IAAHD,GAAQA,EAa1BE,EAAwDC,EACtDR,GAAgBE,IAA0Bf,GAC3CsB,EAAAC,EAAAH,EAAA,GAFMI,EAAoBF,EAAA,GAAEG,EAAuBH,EAAA,GAG9CI,EAAkCC,GAAO,GAC/CC,EAAsCP,EAASG,EAAuBT,EAAwBf,GAAgB6B,EAAAN,EAAAK,EAAA,GAAvGE,EAAWD,EAAA,GAAEE,EAAcF,EAAA,GAClCG,EAAoDX,GAAS,GAAKY,EAAAV,EAAAS,EAAA,GAA3DE,EAAkBD,EAAA,GAAEE,EAAqBF,EAAA,GAE1CG,EAAkBC,EAAWC,GAwB7BC,EAAmBC,GAAY,iBACnCL,GAAsB,GACtB,IAAMM,EAAoBxB,EAAgByB,SAAS,IACtBtC,EAAzBa,EAAgB0B,gBACdC,EAAAC,MAAMC,KAAK,CAAEH,OAAQvC,IAAc,SAAC2C,EAAGC,GAAC,OAAKA,CAAC,IAAEC,MAAK,SAAAD,GAAC,OAAK/B,EAAgByB,SAASM,EAAE,mBAExF,EACJjB,EAAeU,EACjB,GAAG,CAACxB,EAAiBb,IAEf8C,EAAkBV,GAAY,iBAClCL,GAAsB,GACtB,IAAMgB,EAAmBlC,EAAgByB,SAAStC,EAAa,IAClCA,EAAzBa,EAAgB0B,QAEd,QADAC,EAAAC,MAAMC,KAAK,CAAEH,OAAQvC,IAAc,SAAC2C,EAAGC,GAAC,OAAK5C,EAAa,EAAI4C,CAAC,IAAEC,MAAK,SAAAD,GAAC,OAAK/B,EAAgByB,SAASM,EAAG,WACxG,IAAAJ,EAAAA,EAEFxC,EAAa,EACjB2B,EAAeoB,EACjB,GAAG,CAAClC,EAAiBb,IAErBgD,GAAU,WACH1B,EAAgC2B,QAKrC5B,GAAwB,GAJtBC,EAAgC2B,SAAU,CAK9C,GAAG,CAACvB,IAEJ,IAAMwB,EAAoBd,GAAY,WAAK,IAAAI,EAAC,OAAa,QAAbA,EAAAzC,EAAIkD,eAAS,IAAAT,OAAA,EAAAA,EAAAW,MAAM,GAAE,CAACpD,IAE1DqD,EAA+BC,IAA/BD,2BACFE,EAAUlB,GAAY,WAC1B,GAAIV,IAAgB9B,EAApB,CAKA,IAAM2D,EAAYH,EAA2BH,QAC7CtB,EACyB,gBAAvBvB,GAAwCmD,EACpCC,EAAoC,CAAED,UAAAA,EAAWtD,oBAAAA,EAAqBD,WAAAA,IACtE,GAEN+B,GAAsB,EARtB,MAFEA,GAAsB,EAW1B,GAAG,CACDL,EACAtB,EACAJ,EACAoD,EACAnD,EACA0B,EACAI,IAGI0B,EAAcrB,GAAY,WAE9BL,GAAsB,EACxB,GAAG,CAACA,IAEE2B,EAAStB,GAAY,WAGzBL,GAAsB,GACtBJ,EAAe/B,EACjB,GAAG,CAAC+B,IAEJgC,EAAiB,CAAEC,UAAW,QAASC,SAAUP,EAASvD,IAAAA,IAC1D4D,EAAiB,CAAEC,UAAW,YAAaC,SAAUJ,EAAa1D,IAAAA,IAClE4D,EAAiB,CAAEC,UAAW,OAAQC,SAAUH,EAAQ3D,IAAAA,IAExDiD,GAAU,iBACJtB,GAAe,IACJ,QAAbc,EAAAzC,EAAIkD,eAAS,IAAAT,GAAAA,EAAAsB,QAEjB,GAAG,CAACpC,EAAa3B,IAEjB,IAAMgE,EAAoB3B,GACxB,SAAC4B,GACCjC,EAD8BkC,UAAA1B,OAAA,QAAA2B,IAAAD,UAAA,IAAAA,UAAA,IAE9BtC,EAAeqC,GAEf9D,EAAcI,EAAe0D,GAAQA,EACtC,GACD,CAACrC,EAAgBzB,EAAeI,IAG5B6D,EAAsB/B,GAAY,WACtC,GAAKN,EAGL,OAAOiC,EAAkBrC,GAAa,EACvC,GAAE,CAACI,EAAoBiC,EAAmBrC,IAc3C,OAZA0C,EAAyB,CACvBrE,IAAAA,EACAsE,eAAgBF,EAChBG,kBAxHwB,SAACf,GAEzB,GADAxB,GAAsB,GAClBL,IAAgB9B,EAApB,CAKA,IAAA2E,EAAkCC,EAAoC,CACpE9C,YAAAA,EACA1B,WAAAA,EACAC,oBAAAA,EACAsD,UAAAA,EACA1C,gBAAAA,EACAE,mBAAAA,IANkB0D,EAASF,EAATE,UAAFF,EAAVG,WASN1C,SAAAA,EAAiB2C,qBAAqB5E,EAAKwD,GAE3C5B,EAAe8C,EAbjB,MAFE9C,EAAe,IAsHjBiD,SAAU1B,EACV2B,OAAQ1C,EACR2C,MAAOhC,EACPrC,aAAAA,IAKK,CACLiB,YAF0BI,EAAqBJ,EAAc9B,EAG7DmE,kBAAAA,EACA3C,qBAAAA,EAEJ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import o from"classnames";import e,{forwardRef as r,useRef as t,useCallback as i}from"react";import s from"./components/ColorPickerContent/ColorPickerContent.js";import{DEFAULT_NUMBER_OF_COLORS_IN_LINE as l}from"./ColorPickerConstants.js";import{calculateColorPickerDialogWidth as n}from"./services/ColorPickerStyleService.js";import{getTestId as c,ComponentDefaultTestId as a}from"../../tests/testIds.js";import d from"./ColorPicker.module.scss.js";import{ComponentVibeId as m}from"../../tests/constants.js";import C from"../../../components/dialog/dist/DialogContentContainer/DialogContentContainer.js";import u from"../../../icons/dist/react/NoColor.js";import{useMergeRef as f}from"../../../shared/dist/hooks/useMergeRef.js";import{NOOP as p}from"../../../shared/dist/utils/function-utils.js";var v=r((function(r,v){var I=r.className,k=r.onSave,h=void 0===k?p:k,P=r.value,S=void 0===P?"":P,g=r.noColorText,j=r.colorStyle,L=void 0===j?"regular":j,R=r.ColorIndicatorIcon,O=r.SelectedIndicatorIcon,b=r.shouldRenderIndicatorWithoutBackground,M=r.NoColorIcon,N=void 0===M?u:M,y=r.isBlackListMode,w=void 0===y||y,B=r.colorsList,D=void 0===B?[]:B,E=r.isMultiselect,T=r.colorSize,x=void 0===T?"medium":T,z=r.numberOfColorsInLine,K=void 0===z?l:z,U=r.focusOnMount,W=r.colorShape,_=void 0===W?"square":W,q=r.forceUseRawColorList,V=r.showColorNameTooltip,A=r.id,F=r["data-testid"],G=t(null),H=f(v,G),J=i(h,[h]),Q=n(x,K);return e.createElement(C,{ref:H,className:o(d.colorPicker,d.colorPickerDialogContent,I),"aria-labelledby":"Color Picker Dialog","aria-describedby":"Pick color",style:{width:Q},"data-vibe":m.COLOR_PICKER},e.createElement(s,{onValueChange:J,value:S,noColorText:g,shouldRenderIndicatorWithoutBackground:R&&b,colorStyle:L,ColorIndicatorIcon:R,SelectedIndicatorIcon:O,NoColorIcon:N,colorsList:D,isBlackListMode:w,isMultiselect:E,colorSize:x,numberOfColorsInLine:K,focusOnMount:U,colorShape:_,forceUseRawColorList:q,showColorNameTooltip:V,id:A,"data-testid":F||c(a.COLOR_PICKER,A)}))}));export{v as default};
|
|
2
|
-
//# sourceMappingURL=ColorPicker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sources":["../../../../src/components/ColorPicker/ColorPicker.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, { forwardRef, useCallback, useRef } from \"react\";\nimport { type BaseSizes } from \"../../constants\";\nimport { useMergeRef, NOOP } from \"@vibe/shared\";\nimport { DialogContentContainer } from \"@vibe/dialog\";\nimport { NoColor } from \"@vibe/icons\";\nimport ColorPickerContent from \"./components/ColorPickerContent/ColorPickerContent\";\nimport { DEFAULT_NUMBER_OF_COLORS_IN_LINE } from \"./ColorPickerConstants\";\nimport {\n type ColorShapes,\n type ColorPickerSizes,\n type ColorPickerValue,\n type ColorPickerArrayValueOnly\n} from \"./ColorPicker.types\";\nimport { calculateColorPickerDialogWidth } from \"./services/ColorPickerStyleService\";\nimport { type VibeComponentProps } from \"../../types\";\nimport { type SubIcon } from \"@vibe/icon\";\n\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport styles from \"./ColorPicker.module.scss\";\nimport { type ColorStyle } from \"../../types/Colors\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface ColorPickerProps extends VibeComponentProps {\n /**\n * The selected color(s).\n */\n value?: ColorPickerValue;\n /**\n * Callback fired when the selected color(s) change.\n */\n onSave?: (value: ColorPickerArrayValueOnly) => void;\n /**\n * Icon displayed as an indicator inside the color.\n */\n ColorIndicatorIcon?: SubIcon;\n /**\n * Icon displayed when a color is selected.\n */\n SelectedIndicatorIcon?: SubIcon;\n /**\n * Icon used for clearing the color selection.\n */\n NoColorIcon?: SubIcon;\n /**\n * The style applied to the colors.\n */\n colorStyle?: ColorStyle;\n /**\n * Text displayed for the \"no color\" option.\n */\n noColorText?: string;\n /**\n * If true, renders the color indicator without a background.\n */\n shouldRenderIndicatorWithoutBackground?: boolean;\n /**\n * If true, treats the color list as a blacklist rather than a whitelist.\n */\n isBlackListMode?: boolean;\n /**\n * The list of colors available for selection.\n */\n colorsList?: ColorPickerArrayValueOnly;\n /**\n * If true, allows selecting multiple colors.\n */\n isMultiselect?: boolean;\n /**\n * The size of the color items.\n */\n colorSize?: ColorPickerSizes;\n /**\n * The number of colors displayed per row.\n */\n numberOfColorsInLine?: number;\n /**\n * If true, the first color is focused when the component mounts.\n */\n focusOnMount?: boolean;\n /**\n * The shape of the color items.\n */\n colorShape?: ColorShapes;\n /**\n * Used to force the component render the colorList prop as is. Usually, this flag should not be used. It's intended only for edge cases.\n * Usually, only \"monday colors\" will be rendered (unless blacklist mode is used). This flag will override this behavior.\n */\n forceUseRawColorList?: boolean;\n /**\n * Used to enable color name tooltip on each color in the component.\n * When \"tooltipContentByColor\" is supplied, it will override the color name tooltip.\n *\n */\n showColorNameTooltip?: boolean;\n}\n\nconst ColorPicker = forwardRef(\n (\n {\n className,\n onSave = NOOP,\n value = \"\",\n noColorText,\n colorStyle = \"regular\",\n ColorIndicatorIcon,\n SelectedIndicatorIcon,\n shouldRenderIndicatorWithoutBackground,\n NoColorIcon = NoColor,\n isBlackListMode = true,\n colorsList = [],\n isMultiselect,\n colorSize = \"medium\",\n numberOfColorsInLine = DEFAULT_NUMBER_OF_COLORS_IN_LINE,\n focusOnMount,\n colorShape = \"square\",\n forceUseRawColorList,\n showColorNameTooltip,\n id,\n \"data-testid\": dataTestId\n }: ColorPickerProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n const onChange = useCallback(onSave, [onSave]);\n\n const width = calculateColorPickerDialogWidth(colorSize as BaseSizes, numberOfColorsInLine);\n\n return (\n <DialogContentContainer\n ref={mergedRef}\n className={cx(styles.colorPicker, styles.colorPickerDialogContent, className)}\n aria-labelledby=\"Color Picker Dialog\"\n aria-describedby=\"Pick color\"\n style={{ width }}\n data-vibe={ComponentVibeId.COLOR_PICKER}\n >\n <ColorPickerContent\n onValueChange={onChange}\n value={value}\n noColorText={noColorText}\n shouldRenderIndicatorWithoutBackground={ColorIndicatorIcon && shouldRenderIndicatorWithoutBackground}\n colorStyle={colorStyle}\n ColorIndicatorIcon={ColorIndicatorIcon}\n SelectedIndicatorIcon={SelectedIndicatorIcon}\n NoColorIcon={NoColorIcon}\n colorsList={colorsList}\n isBlackListMode={isBlackListMode}\n isMultiselect={isMultiselect}\n colorSize={colorSize}\n numberOfColorsInLine={numberOfColorsInLine}\n focusOnMount={focusOnMount}\n colorShape={colorShape}\n forceUseRawColorList={forceUseRawColorList}\n showColorNameTooltip={showColorNameTooltip}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.COLOR_PICKER, id)}\n />\n </DialogContentContainer>\n );\n }\n);\n\nexport default ColorPicker;\n"],"names":["ColorPicker","forwardRef","_ref","ref","className","_ref$onSave","onSave","NOOP","_ref$value","value","noColorText","_ref$colorStyle","colorStyle","ColorIndicatorIcon","SelectedIndicatorIcon","shouldRenderIndicatorWithoutBackground","_ref$NoColorIcon","NoColorIcon","NoColor","_ref$isBlackListMode","isBlackListMode","_ref$colorsList","colorsList","isMultiselect","_ref$colorSize","colorSize","_ref$numberOfColorsIn","numberOfColorsInLine","DEFAULT_NUMBER_OF_COLORS_IN_LINE","focusOnMount","_ref$colorShape","colorShape","forceUseRawColorList","showColorNameTooltip","id","dataTestId","componentRef","useRef","mergedRef","useMergeRef","onChange","useCallback","width","calculateColorPickerDialogWidth","React","createElement","DialogContentContainer","cx","styles","colorPicker","colorPickerDialogContent","style","ComponentVibeId","COLOR_PICKER","ColorPickerContent","onValueChange","getTestId","ComponentDefaultTestId"],"mappings":"6xBAiGMA,IAAAA,EAAcC,GAClB,SAAAC,EAuBEC,GACE,IAtBAC,EAASF,EAATE,UAASC,EAAAH,EACTI,OAAAA,OAASC,IAAHF,EAAGE,EAAIF,EAAAG,EAAAN,EACbO,MAAAA,OAAQ,IAAHD,EAAG,GAAEA,EACVE,EAAWR,EAAXQ,YAAWC,EAAAT,EACXU,WAAAA,OAAa,IAAHD,EAAG,UAASA,EACtBE,EAAkBX,EAAlBW,mBACAC,EAAqBZ,EAArBY,sBACAC,EAAsCb,EAAtCa,uCAAsCC,EAAAd,EACtCe,YAAAA,OAAcC,IAAHF,EAAGE,EAAOF,EAAAG,EAAAjB,EACrBkB,gBAAAA,OAAkB,IAAHD,GAAOA,EAAAE,EAAAnB,EACtBoB,WAAAA,OAAa,IAAHD,EAAG,GAAEA,EACfE,EAAarB,EAAbqB,cAAaC,EAAAtB,EACbuB,UAAAA,OAAY,IAAHD,EAAG,SAAQA,EAAAE,EAAAxB,EACpByB,qBAAAA,OAAuBC,IAAHF,EAAGE,EAAgCF,EACvDG,EAAY3B,EAAZ2B,aAAYC,EAAA5B,EACZ6B,WAAAA,OAAa,IAAHD,EAAG,SAAQA,EACrBE,EAAoB9B,EAApB8B,qBACAC,EAAoB/B,EAApB+B,qBACAC,EAAEhC,EAAFgC,GACeC,EAAUjC,EAAzB,eAIIkC,EAAeC,EAAO,MACtBC,EAAYC,EAAYpC,EAAKiC,GAE7BI,EAAWC,EAAYnC,EAAQ,CAACA,IAEhCoC,EAAQC,EAAgClB,EAAwBE,GAEtE,OACEiB,EAAAC,cAACC,EAAsB,CACrB3C,IAAKmC,EACLlC,UAAW2C,EAAGC,EAAOC,YAAaD,EAAOE,yBAA0B9C,GACnD,kBAAA,yCACC,aACjB+C,MAAO,CAAET,MAAAA,GACE,YAAAU,EAAgBC,cAE3BT,EAAAC,cAACS,EACC,CAAAC,cAAef,EACf/B,MAAOA,EACPC,YAAaA,EACbK,uCAAwCF,GAAsBE,EAC9DH,WAAYA,EACZC,mBAAoBA,EACpBC,sBAAuBA,EACvBG,YAAaA,EACbK,WAAYA,EACZF,gBAAiBA,EACjBG,cAAeA,EACfE,UAAWA,EACXE,qBAAsBA,EACtBE,aAAcA,EACdE,WAAYA,EACZC,qBAAsBA,EACtBC,qBAAsBA,EACtBC,GAAIA,EAAE,cACOC,GAAcqB,EAAUC,EAAuBJ,aAAcnB,KAIlF"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={colorPicker:"colorPicker_3985f2c06f",colorPickerDialogContent:"colorPickerDialogContent_9e80ddd6ea"};!function(e){const t="s_id-ffacbf9b6446_4_5_11";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)}(".colorPicker_3985f2c06f.colorPickerDialogContent_9e80ddd6ea {\n z-index: 1;\n padding: 12px;\n display: flex;\n justify-content: center;\n align-items: center;\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=ColorPicker.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as r}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{SIZES as e}from"../../constants/sizes.js";var o=5,s=r(r(r({},e.SMALL,24),e.MEDIUM,32),e.LARGE,40),t=8,i=24;export{t as COLOR_PADDING,s as COLOR_SIZES,o as DEFAULT_NUMBER_OF_COLORS_IN_LINE,i as DIALOG_WIDTH_PADDING};
|
|
2
|
-
//# sourceMappingURL=ColorPickerConstants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerConstants.js","sources":["../../../../src/components/ColorPicker/ColorPickerConstants.ts"],"sourcesContent":["import { type BaseSizes, SIZES } from \"../../constants/sizes\";\n\nexport const DEFAULT_NUMBER_OF_COLORS_IN_LINE = 5;\n\nexport const COLOR_SIZES: Record<BaseSizes, number> = {\n [SIZES.SMALL]: 24,\n [SIZES.MEDIUM]: 32,\n [SIZES.LARGE]: 40\n};\n\nexport const COLOR_PADDING = 8;\nexport const DIALOG_WIDTH_PADDING = 24;\n"],"names":["DEFAULT_NUMBER_OF_COLORS_IN_LINE","COLOR_SIZES","_defineProperty","SIZES","SMALL","MEDIUM","LARGE","COLOR_PADDING","DIALOG_WIDTH_PADDING"],"mappings":"iIAEO,IAAMA,EAAmC,EAEnCC,EAAWC,EAAAA,EAAAA,EAAA,CAAA,EACrBC,EAAMC,MAAQ,IACdD,EAAME,OAAS,IACfF,EAAMG,MAAQ,IAGJC,EAAgB,EAChBC,EAAuB"}
|
package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import t,{forwardRef as e}from"react";import o from"../../../../hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js";import r from"./ColorPickerClearButton.module.scss.js";import n from"../../../../../components/button/dist/Button/Button.js";import{NOOP as i}from"../../../../../shared/dist/utils/function-utils.js";var s=e((function(e,s){var a=e.text,l=e.Icon,m=o({ref:s,itemsCount:1,numberOfItemsInLine:1,onItemClicked:e.onClick,getItemByIndex:i}).onSelectionAction;return t.createElement(n,{ref:s,size:"small",kind:"tertiary",onClick:function(){return m(-1)},blurOnMouseUp:!1,className:r.clearColorButton},t.createElement(l,{size:"16",className:r.clearColorIcon}),a||"Clear")}));export{s as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerClearButton.js.map
|
package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerClearButton.js","sources":["../../../../../../src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\nimport useGridKeyboardNavigation from \"../../../../hooks/useGridKeyboardNavigation/useGridKeyboardNavigation\";\nimport { Button } from \"@vibe/button\";\nimport { type VibeComponentProps } from \"../../../../types\";\nimport { type SubIcon } from \"@vibe/icon\";\nimport { NOOP } from \"@vibe/shared\";\nimport styles from \"./ColorPickerClearButton.module.scss\";\n\nexport interface ColorPickerClearButtonProps extends VibeComponentProps {\n /**\n * Callback fired when the clear button is clicked.\n */\n onClick: () => void;\n /**\n * The text displayed inside the button.\n */\n text?: string;\n /**\n * The icon displayed inside the button.\n */\n Icon: SubIcon;\n}\n\nconst ColorPickerClearButton = forwardRef(\n ({ onClick, text, Icon }: ColorPickerClearButtonProps, ref: React.ForwardedRef<HTMLButtonElement>) => {\n const { onSelectionAction } = useGridKeyboardNavigation({\n ref: ref as React.MutableRefObject<HTMLElement>,\n itemsCount: 1,\n numberOfItemsInLine: 1,\n onItemClicked: onClick,\n getItemByIndex: NOOP //hack - we don't really have a grid, it's just for keyboard navigation outside the clear button\n });\n\n return (\n <Button\n ref={ref}\n size=\"small\"\n kind=\"tertiary\"\n onClick={() => onSelectionAction(-1)} //hack - we don't really have a grid, it's just for keyboard navigation outside the clear button\n blurOnMouseUp={false}\n className={styles.clearColorButton}\n >\n <Icon size=\"16\" className={styles.clearColorIcon} />\n {text || \"Clear\"}\n </Button>\n );\n }\n);\n\nexport default ColorPickerClearButton;\n"],"names":["ColorPickerClearButton","forwardRef","_ref","ref","text","Icon","onSelectionAction","useGridKeyboardNavigation","itemsCount","numberOfItemsInLine","onItemClicked","onClick","getItemByIndex","NOOP","React","createElement","Button","size","kind","blurOnMouseUp","className","styles","clearColorButton","clearColorIcon"],"mappings":"qUAuBMA,IAAAA,EAAyBC,GAC7B,SAAAC,EAAuDC,GAA8C,IAAzFC,EAAIF,EAAJE,KAAMC,EAAIH,EAAJG,KACRC,EAAsBC,EAA0B,CACtDJ,IAAKA,EACLK,WAAY,EACZC,oBAAqB,EACrBC,cALMR,EAAPS,QAMCC,eAAgBC,IALVP,kBAQR,OACEQ,EAAAC,cAACC,EAAM,CACLb,IAAKA,EACLc,KAAK,QACLC,KAAK,WACLP,QAAS,WAAA,OAAML,GAAmB,EAAE,EACpCa,eAAe,EACfC,UAAWC,EAAOC,kBAElBR,EAACC,cAAAV,EAAK,CAAAY,KAAK,KAAKG,UAAWC,EAAOE,iBACjCnB,GAAQ,QAGf"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={clearColorIcon:"clearColorIcon_711e9724b5",clearColorButton:"clearColorButton_2832b1cc8e"};!function(e){const n="s_id-745441469971_4_5_11";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+n))return;const t=document.createElement("style");t.id=n,o.firstChild?o.insertBefore(t,o.firstChild):o.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".clearColorIcon_711e9724b5 {\n margin-inline-end: var(--space-8);\n}\n\n.clearColorButton_2832b1cc8e {\n margin-top: var(--space-8);\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerClearButton.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerClearButton.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{slicedToArray as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import e,{forwardRef as r,useCallback as t,useState as n}from"react";import i from"../../../../hooks/useGridKeyboardNavigation/useGridKeyboardNavigation.js";import c from"../ColorPickerItemComponent/ColorPickerItemComponent.js";import l from"./ColorPickerColorsGrid.module.scss.js";import{useIsomorphicLayoutEffect as a}from"../../../../../shared/dist/hooks/ssr/useIsomorphicLayoutEffect.js";var d=0,s=function(e){var r=n(),t=o(r,2),i=t[0],c=t[1];return a((function(){c(e||"color-picker-grid-".concat(d++))}),[e]),i},u=function(o,e){return e&&e[o]?e[o]:function(o){return o.replace(/-|_/g," ").replace(/(?:^|\s)\S/g,(function(o){return o.toUpperCase()}))}(o)},m=r((function(o,r){var n=o.onColorClicked,a=o.colorsToRender,d=o.numberOfColorsInLine,m=o.focusOnMount,f=o.value,p=o.colorStyle,I=o.ColorIndicatorIcon,C=o.shouldRenderIndicatorWithoutBackground,v=o.SelectedIndicatorIcon,y=o.colorSize,h=o.tooltipContentByColor,k=o.colorShape,S=o.showColorNameTooltip,g=o.id,b=o["data-testid"],A=t((function(o){return a[o]}),[a]),j=i({focusOnMount:m,ref:r,onItemClicked:n,itemsCount:a.length,numberOfItemsInLine:d,entryFocusStrategy:"first",getItemByIndex:A}),x=j.activeIndex,B=j.onSelectionAction,G=s(g),L=function(o){return G?"".concat(G,"-item-").concat(o):void 0},N=0>x?void 0:L(x);return e.createElement("ul",{className:l.colorsGrid,ref:r,tabIndex:0,id:g,"data-testid":b,role:"listbox","aria-activedescendant":N},a.map((function(o,r){return e.createElement(c,{key:o,id:L(r),color:o,colorAriaLabel:u(o,h),onColorClicked:function(){return B(r)},shouldRenderIndicatorWithoutBackground:I&&C,colorStyle:p,ColorIndicatorIcon:I,SelectedIndicatorIcon:v,isSelected:Array.isArray(f)?f.includes(o):f===o,isActive:r===x,colorSize:y,tooltipContent:S?u(o,h):void 0,colorShape:k})})))}));export{m as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerColorsGrid.js.map
|
package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerColorsGrid.js","sources":["../../../../../../src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useState } from \"react\";\nimport { useIsomorphicLayoutEffect } from \"@vibe/shared\";\nimport useGridKeyboardNavigation from \"../../../../hooks/useGridKeyboardNavigation/useGridKeyboardNavigation\";\nimport ColorPickerItemComponent from \"../ColorPickerItemComponent/ColorPickerItemComponent\";\nimport { type CONTENT_COLORS_VALUES } from \"../../../../utils/colors-vars-map\";\nimport { type ColorPickerArrayValueOnly, type ColorPickerValueOnly } from \"../../ColorPicker.types\";\nimport { type ColorShapes, type ColorPickerSizes } from \"../../ColorPicker.types\";\nimport { type VibeComponentProps } from \"../../../../types\";\nimport { type SubIcon } from \"@vibe/icon\";\nimport styles from \"./ColorPickerColorsGrid.module.scss\";\nimport { type ColorStyle } from \"../../../../types\";\n\nlet colorPickerGridIdCounter = 0;\nconst generateColorPickerGridId = () => `color-picker-grid-${colorPickerGridIdCounter++}`;\n\nconst useColorPickerGridId = (id: string) => {\n const [gridId, setGridId] = useState<string>();\n useIsomorphicLayoutEffect(() => {\n setGridId(id || generateColorPickerGridId());\n }, [id]);\n return gridId;\n};\n\nconst formatColorNameForTooltip = (color: ColorPickerValueOnly) => {\n return color.replace(/-|_/g, \" \").replace(/(?:^|\\s)\\S/g, function (a) {\n return a.toUpperCase();\n });\n};\n\nconst calculateColorTooltip = (\n color: ColorPickerValueOnly,\n tooltipContentByColor?: Partial<Record<CONTENT_COLORS_VALUES, string> & Record<string, string>>\n) => {\n if (tooltipContentByColor && tooltipContentByColor[color]) {\n return tooltipContentByColor[color];\n } else {\n return formatColorNameForTooltip(color);\n }\n};\n\nexport interface ColorPickerColorsGridProps extends VibeComponentProps {\n /**\n * Callback fired when a color is clicked.\n */\n onColorClicked?: (color: ColorPickerValueOnly) => void;\n /**\n * The list of colors to be displayed.\n */\n colorsToRender?: ColorPickerArrayValueOnly;\n /**\n * Icon displayed as an indicator inside the color.\n */\n ColorIndicatorIcon?: SubIcon;\n /**\n * Icon displayed when a color is selected.\n */\n SelectedIndicatorIcon?: SubIcon;\n /**\n * The style applied to the colors.\n */\n colorStyle?: ColorStyle;\n /**\n * The currently selected color or colors.\n */\n value?: string | string[];\n /**\n * If true, renders the color indicator without a background.\n */\n shouldRenderIndicatorWithoutBackground?: boolean;\n /**\n * The size of the color items.\n */\n colorSize?: ColorPickerSizes;\n /**\n * The number of colors per row.\n */\n numberOfColorsInLine?: number;\n /**\n * Custom tooltip content for specific colors.\n */\n tooltipContentByColor?: Partial<Record<CONTENT_COLORS_VALUES, string> & Record<string, string>>;\n /**\n * If true, the first color is focused when the component mounts.\n */\n focusOnMount?: boolean;\n /**\n * The shape of the color items.\n */\n colorShape?: ColorShapes;\n /**\n * If true, displays a tooltip with the color name.\n */\n showColorNameTooltip?: boolean;\n}\n\nconst ColorPickerColorsGrid = forwardRef(\n (\n {\n onColorClicked,\n colorsToRender,\n numberOfColorsInLine,\n focusOnMount,\n value,\n colorStyle,\n ColorIndicatorIcon,\n shouldRenderIndicatorWithoutBackground,\n SelectedIndicatorIcon,\n colorSize,\n tooltipContentByColor,\n colorShape,\n showColorNameTooltip: showColorNameTooltip,\n id,\n \"data-testid\": dataTestId\n }: ColorPickerColorsGridProps,\n ref: React.ForwardedRef<HTMLUListElement>\n ) => {\n const getItemByIndex = useCallback((index: number) => colorsToRender[index], [colorsToRender]);\n\n const { activeIndex, onSelectionAction } = useGridKeyboardNavigation({\n focusOnMount,\n ref: ref as React.MutableRefObject<HTMLUListElement>,\n onItemClicked: onColorClicked,\n itemsCount: colorsToRender.length,\n numberOfItemsInLine: numberOfColorsInLine,\n entryFocusStrategy: \"first\",\n getItemByIndex\n });\n\n const gridId = useColorPickerGridId(id);\n const getColorItemId = (index: number) => (gridId ? `${gridId}-item-${index}` : undefined);\n const activeDescendantId = activeIndex >= 0 ? getColorItemId(activeIndex) : undefined;\n\n return (\n <ul\n className={styles.colorsGrid}\n ref={ref}\n tabIndex={0}\n id={id}\n data-testid={dataTestId}\n role=\"listbox\"\n aria-activedescendant={activeDescendantId}\n >\n {colorsToRender.map((color, index) => {\n return (\n <ColorPickerItemComponent\n key={color}\n id={getColorItemId(index)}\n color={color}\n colorAriaLabel={calculateColorTooltip(color, tooltipContentByColor)}\n onColorClicked={() => onSelectionAction(index)}\n shouldRenderIndicatorWithoutBackground={ColorIndicatorIcon && shouldRenderIndicatorWithoutBackground}\n colorStyle={colorStyle}\n ColorIndicatorIcon={ColorIndicatorIcon}\n SelectedIndicatorIcon={SelectedIndicatorIcon}\n isSelected={Array.isArray(value) ? value.includes(color) : value === color}\n isActive={index === activeIndex}\n colorSize={colorSize}\n tooltipContent={showColorNameTooltip ? calculateColorTooltip(color, tooltipContentByColor) : undefined}\n colorShape={colorShape}\n />\n );\n })}\n </ul>\n );\n }\n);\n\nexport default ColorPickerColorsGrid;\n"],"names":["colorPickerGridIdCounter","useColorPickerGridId","id","_useState","useState","_useState2","_slicedToArray","gridId","setGridId","useIsomorphicLayoutEffect","concat","calculateColorTooltip","color","tooltipContentByColor","replace","a","toUpperCase","formatColorNameForTooltip","ColorPickerColorsGrid","forwardRef","_ref","ref","onColorClicked","colorsToRender","numberOfColorsInLine","focusOnMount","value","colorStyle","ColorIndicatorIcon","shouldRenderIndicatorWithoutBackground","SelectedIndicatorIcon","colorSize","colorShape","showColorNameTooltip","dataTestId","getItemByIndex","useCallback","index","_useGridKeyboardNavig","useGridKeyboardNavigation","onItemClicked","itemsCount","length","numberOfItemsInLine","entryFocusStrategy","activeIndex","onSelectionAction","getColorItemId","undefined","activeDescendantId","React","createElement","className","styles","colorsGrid","tabIndex","role","map","ColorPickerItemComponent","key","colorAriaLabel","isSelected","Array","isArray","includes","isActive","tooltipContent"],"mappings":"6dAYA,IAAIA,EAA2B,EAGzBC,EAAuB,SAACC,GAC5B,IAAAC,EAA4BC,IAAkBC,EAAAC,EAAAH,EAAA,GAAvCI,EAAMF,EAAA,GAAEG,EAASH,EAAA,GAIxB,OAHAI,GAA0B,WACxBD,EAAUN,GALiBQ,qBAAAA,OAA8BV,KAM3D,GAAG,CAACE,IACGK,CACT,EAQMI,EAAwB,SAC5BC,EACAC,GAEA,OAAIA,GAAyBA,EAAsBD,GAC1CC,EAAsBD,GAXC,SAACA,GACjC,OAAOA,EAAME,QAAQ,OAAQ,KAAKA,QAAQ,eAAe,SAAUC,GACjE,OAAOA,EAAEC,aACX,GACF,CASWC,CAA0BL,EAErC,EAyDMM,EAAwBC,GAC5B,SAAAC,EAkBEC,GACE,IAjBAC,EAAcF,EAAdE,eACAC,EAAcH,EAAdG,eACAC,EAAoBJ,EAApBI,qBACAC,EAAYL,EAAZK,aACAC,EAAKN,EAALM,MACAC,EAAUP,EAAVO,WACAC,EAAkBR,EAAlBQ,mBACAC,EAAsCT,EAAtCS,uCACAC,EAAqBV,EAArBU,sBACAC,EAASX,EAATW,UACAlB,EAAqBO,EAArBP,sBACAmB,EAAUZ,EAAVY,WACsBC,EAAoBb,EAA1Ca,qBACA/B,EAAEkB,EAAFlB,GACegC,EAAUd,EAAzB,eAIIe,EAAiBC,GAAY,SAACC,GAAa,OAAKd,EAAec,KAAQ,CAACd,IAE9Ee,EAA2CC,EAA0B,CACnEd,aAAAA,EACAJ,IAAKA,EACLmB,cAAelB,EACfmB,WAAYlB,EAAemB,OAC3BC,oBAAqBnB,EACrBoB,mBAAoB,QACpBT,eAAAA,IAPMU,EAAWP,EAAXO,YAAaC,EAAiBR,EAAjBQ,kBAUfvC,EAASN,EAAqBC,GAC9B6C,EAAiB,SAACV,GAAa,OAAM9B,EAAMG,GAAAA,OAAMH,YAAMG,OAAS2B,QAAUW,GAC1EC,EAAoC,EAAfJ,OAAiDG,EAA9BD,EAAeF,GAE7D,OACEK,EACEC,cAAA,KAAA,CAAAC,UAAWC,EAAOC,WAClBjC,IAAKA,EACLkC,SAAU,EACVrD,GAAIA,EAAE,cACOgC,EACbsB,KAAK,kCACkBP,GAEtB1B,EAAekC,KAAI,SAAC7C,EAAOyB,GAC1B,OACEa,EAACC,cAAAO,EACC,CAAAC,IAAK/C,EACLV,GAAI6C,EAAeV,GACnBzB,MAAOA,EACPgD,eAAgBjD,EAAsBC,EAAOC,GAC7CS,eAAgB,WAAA,OAAMwB,EAAkBT,EAAM,EAC9CR,uCAAwCD,GAAsBC,EAC9DF,WAAYA,EACZC,mBAAoBA,EACpBE,sBAAuBA,EACvB+B,WAAYC,MAAMC,QAAQrC,GAASA,EAAMsC,SAASpD,GAASc,IAAUd,EACrEqD,SAAU5B,IAAUQ,EACpBd,UAAWA,EACXmC,eAAgBjC,EAAuBtB,EAAsBC,EAAOC,QAAyBmC,EAC7FhB,WAAYA,GAGjB,IAGP"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={colorsGrid:"colorsGrid_49b4d39908"};!function(e){const d="s_id-0a5f0eb78ee4_4_5_11";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+d))return;const t=document.createElement("style");t.id=d,n.firstChild?n.insertBefore(t,n.firstChild):n.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[d]=e)}(".colorsGrid_49b4d39908 {\n padding: 0;\n outline: none;\n display: flex;\n flex-wrap: wrap;\n}");export{e as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerColorsGrid.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerColorsGrid.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{toConsumableArray as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{difference as e,intersection as r}from"es-toolkit";import t,{forwardRef as i,useRef as l,useCallback as n,useMemo as a}from"react";import{BaseSizes as s}from"../../../../constants/sizes.js";import{contentColors as c}from"../../../../utils/colors-vars-map.js";import{DEFAULT_NUMBER_OF_COLORS_IN_LINE as d}from"../../ColorPickerConstants.js";import{calculateColorPickerWidth as u}from"../../services/ColorPickerStyleService.js";import m from"./ColorPickerClearButton.js";import f from"./ColorPickerColorsGrid.js";import{useGridKeyboardNavigationContext as C,GridKeyboardNavigationContext as p}from"../../../../../components/a11y/dist/GridKeyboardNavigationContext/GridKeyboardNavigationContext.js";import v from"../../../../../icons/dist/react/NoColor.js";import{useMergeRef as I}from"../../../../../shared/dist/hooks/useMergeRef.js";var h=i((function(i,h){var y=i.className,k=i.onValueChange,b=i.value,g=i.noColorText,j=i.colorStyle,N=void 0===j?"regular":j,S=i.ColorIndicatorIcon,x=i.SelectedIndicatorIcon,B=i.shouldRenderIndicatorWithoutBackground,E=i.NoColorIcon,M=void 0===E?v:E,P=i.isBlackListMode,G=void 0===P||P,L=i.colorsList,O=i.isMultiselect,R=i.colorSize,w=void 0===R?s.MEDIUM:R,K=i.numberOfColorsInLine,T=void 0===K?d:K,z=i.tooltipContentByColor,U=void 0===z?{}:z,W=i.focusOnMount,_=i.colorShape,q=void 0===_?"square":_,A=i.forceUseRawColorList,D=i.showColorNameTooltip,H=i.id,V=i["data-testid"],F=l(null),J=I(h,F),Q=l(null),X=l(null),Y=n((function(){k(null)}),[k]),Z=a((function(){return A?L:G?e(c,L):r(c,L)}),[A,G,L]),$=n((function(e){if(O){var r=o(b);if(r.includes(e)){var t=r.indexOf(e);t>-1&&r.splice(t,1)}else r.push(e);k(r)}else k([e])}),[O,k,b]),oo=a((function(){return[{topElement:Q,bottomElement:X}]}),[]),eo=C(oo,F),ro=u(w,T);return t.createElement("div",{className:y,style:{width:ro},ref:J,tabIndex:-1},t.createElement(p.Provider,{value:eo},t.createElement(f,{ref:Q,onColorClicked:$,colorsToRender:Z,numberOfColorsInLine:T,focusOnMount:W,value:b,colorStyle:N,ColorIndicatorIcon:S,shouldRenderIndicatorWithoutBackground:B,SelectedIndicatorIcon:x,colorSize:w,tooltipContentByColor:U,colorShape:q,showColorNameTooltip:D,id:H,"data-testid":V}),g&&t.createElement(m,{Icon:M,onClick:Y,text:g,ref:X})))}));export{h as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerContent.js.map
|
package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerContent.js","sources":["../../../../../../src/components/ColorPicker/components/ColorPickerContent/ColorPickerContent.tsx"],"sourcesContent":["import { difference as _difference, intersection as _intersection } from \"es-toolkit\";\nimport React, { forwardRef, useCallback, useMemo, useRef } from \"react\";\nimport { BaseSizes } from \"../../../../constants\";\nimport { type CONTENT_COLORS_VALUES, contentColors } from \"../../../../utils/colors-vars-map\";\nimport { NoColor } from \"@vibe/icons\";\nimport { DEFAULT_NUMBER_OF_COLORS_IN_LINE } from \"../../ColorPickerConstants\";\nimport {\n type ColorShapes,\n type ColorPickerSizes,\n type ColorPickerValue,\n type ColorPickerArrayValueOnly\n} from \"../../ColorPicker.types\";\nimport { calculateColorPickerWidth } from \"../../services/ColorPickerStyleService\";\nimport { GridKeyboardNavigationContext, useGridKeyboardNavigationContext } from \"@vibe/a11y\";\nimport ColorPickerClearButton from \"./ColorPickerClearButton\";\nimport ColorPickerColorsGrid from \"./ColorPickerColorsGrid\";\nimport { type VibeComponentProps } from \"../../../../types\";\nimport { type SubIcon } from \"@vibe/icon\";\nimport { useMergeRef } from \"@vibe/shared\";\nimport { type ColorStyle } from \"../../../../types\";\n\nexport interface ColorPickerContentProps extends VibeComponentProps {\n /**\n * The selected color(s).\n */\n value: ColorPickerValue;\n /**\n * Callback fired when the selected color(s) change.\n */\n onValueChange: (value: ColorPickerArrayValueOnly) => void;\n /**\n * The list of colors available for selection.\n */\n colorsList: ColorPickerArrayValueOnly;\n /**\n * Icon displayed as an indicator inside the color.\n */\n ColorIndicatorIcon?: SubIcon;\n /**\n * Icon displayed when a color is selected.\n */\n SelectedIndicatorIcon?: SubIcon;\n /**\n * Icon used for clearing the color selection.\n */\n NoColorIcon?: SubIcon;\n /**\n * The style applied to the colors.\n */\n colorStyle?: ColorStyle;\n /**\n * The size of the color items.\n */\n colorSize?: ColorPickerSizes;\n /**\n * The shape of the color items.\n */\n colorShape?: ColorShapes;\n /**\n * Custom tooltip content for specific colors.\n */\n tooltipContentByColor?: Partial<Record<CONTENT_COLORS_VALUES, string>>;\n /**\n * Text displayed for the \"no color\" option.\n */\n noColorText?: string;\n /**\n * If true, renders the color indicator without a background.\n */\n shouldRenderIndicatorWithoutBackground?: boolean;\n /**\n * If true, treats the color list as a blacklist rather than a whitelist.\n */\n isBlackListMode?: boolean;\n /**\n * The number of colors displayed per row.\n */\n numberOfColorsInLine?: number;\n /**\n * If true, the first color is focused when the component mounts.\n */\n focusOnMount?: boolean;\n /**\n * If true, allows selecting multiple colors.\n */\n isMultiselect?: boolean;\n /**\n * Used to force the component render the colorList prop as is. Usually, this flag should not be used. It's intended only for edge cases.\n * Usually, only \"monday colors\" will be rendered (unless blacklist mode is used). This flag will override this behavior.\n */\n forceUseRawColorList?: boolean;\n /**\n * Used to enable color name tooltip on each color in the component.\n * When \"tooltipContentByColor\" is supplied, it will override the color name tooltip.\n */\n showColorNameTooltip?: boolean;\n}\n\nconst ColorPickerContent = forwardRef(\n (\n {\n className,\n onValueChange,\n value,\n noColorText,\n colorStyle = \"regular\",\n ColorIndicatorIcon,\n SelectedIndicatorIcon,\n shouldRenderIndicatorWithoutBackground,\n NoColorIcon = NoColor,\n isBlackListMode = true,\n colorsList,\n isMultiselect,\n colorSize = BaseSizes.MEDIUM,\n numberOfColorsInLine = DEFAULT_NUMBER_OF_COLORS_IN_LINE,\n tooltipContentByColor = {},\n focusOnMount,\n colorShape = \"square\",\n forceUseRawColorList,\n showColorNameTooltip,\n id,\n \"data-testid\": dataTestId\n }: ColorPickerContentProps,\n ref: React.ForwardedRef<HTMLDivElement>\n ) => {\n const gridRef = useRef(null);\n const mergedRef = useMergeRef(ref, gridRef);\n const colorsRef = useRef(null);\n const buttonRef = useRef(null);\n\n const onClearButton = useCallback(() => {\n onValueChange(null);\n }, [onValueChange]);\n\n const colorsToRender = useMemo(() => {\n if (forceUseRawColorList) {\n return colorsList;\n }\n return isBlackListMode ? _difference(contentColors, colorsList) : _intersection(contentColors, colorsList);\n }, [forceUseRawColorList, isBlackListMode, colorsList]);\n\n const onColorClicked = useCallback(\n (color: CONTENT_COLORS_VALUES) => {\n if (!isMultiselect) {\n onValueChange([color]);\n return;\n }\n const colors = [...value];\n if (colors.includes(color)) {\n const indexInSelected = colors.indexOf(color);\n if (indexInSelected > -1) {\n colors.splice(indexInSelected, 1);\n }\n } else {\n colors.push(color);\n }\n onValueChange(colors);\n },\n [isMultiselect, onValueChange, value]\n );\n\n const positions = useMemo(() => [{ topElement: colorsRef, bottomElement: buttonRef }], []);\n const keyboardContext = useGridKeyboardNavigationContext(positions, gridRef);\n const width = calculateColorPickerWidth(colorSize as BaseSizes, numberOfColorsInLine);\n\n return (\n <div className={className} style={{ width }} ref={mergedRef} tabIndex={-1}>\n <GridKeyboardNavigationContext.Provider value={keyboardContext}>\n <ColorPickerColorsGrid\n ref={colorsRef}\n onColorClicked={onColorClicked}\n colorsToRender={colorsToRender}\n numberOfColorsInLine={numberOfColorsInLine}\n focusOnMount={focusOnMount}\n value={value}\n colorStyle={colorStyle}\n ColorIndicatorIcon={ColorIndicatorIcon}\n shouldRenderIndicatorWithoutBackground={shouldRenderIndicatorWithoutBackground}\n SelectedIndicatorIcon={SelectedIndicatorIcon}\n colorSize={colorSize}\n tooltipContentByColor={tooltipContentByColor}\n colorShape={colorShape}\n showColorNameTooltip={showColorNameTooltip}\n id={id}\n data-testid={dataTestId}\n />\n {noColorText && (\n <ColorPickerClearButton Icon={NoColorIcon} onClick={onClearButton} text={noColorText} ref={buttonRef} />\n )}\n </GridKeyboardNavigationContext.Provider>\n </div>\n );\n }\n);\n\nexport default ColorPickerContent;\n"],"names":["ColorPickerContent","forwardRef","_ref","ref","className","onValueChange","value","noColorText","_ref$colorStyle","colorStyle","ColorIndicatorIcon","SelectedIndicatorIcon","shouldRenderIndicatorWithoutBackground","_ref$NoColorIcon","NoColorIcon","NoColor","_ref$isBlackListMode","isBlackListMode","colorsList","isMultiselect","_ref$colorSize","colorSize","BaseSizes","MEDIUM","_ref$numberOfColorsIn","numberOfColorsInLine","DEFAULT_NUMBER_OF_COLORS_IN_LINE","_ref$tooltipContentBy","tooltipContentByColor","focusOnMount","_ref$colorShape","colorShape","forceUseRawColorList","showColorNameTooltip","id","dataTestId","gridRef","useRef","mergedRef","useMergeRef","colorsRef","buttonRef","onClearButton","useCallback","colorsToRender","useMemo","_difference","contentColors","_intersection","onColorClicked","color","colors","_toConsumableArray","includes","indexInSelected","indexOf","splice","push","positions","topElement","bottomElement","keyboardContext","useGridKeyboardNavigationContext","width","calculateColorPickerWidth","React","createElement","style","tabIndex","GridKeyboardNavigationContext","Provider","ColorPickerColorsGrid","ColorPickerClearButton","Icon","onClick","text"],"mappings":"g6BAkGMA,IAAAA,EAAqBC,GACzB,SAAAC,EAwBEC,GACE,IAvBAC,EAASF,EAATE,UACAC,EAAaH,EAAbG,cACAC,EAAKJ,EAALI,MACAC,EAAWL,EAAXK,YAAWC,EAAAN,EACXO,WAAAA,OAAa,IAAHD,EAAG,UAASA,EACtBE,EAAkBR,EAAlBQ,mBACAC,EAAqBT,EAArBS,sBACAC,EAAsCV,EAAtCU,uCAAsCC,EAAAX,EACtCY,YAAAA,OAAcC,IAAHF,EAAGE,EAAOF,EAAAG,EAAAd,EACrBe,gBAAAA,OAAkB,IAAHD,GAAOA,EACtBE,EAAUhB,EAAVgB,WACAC,EAAajB,EAAbiB,cAAaC,EAAAlB,EACbmB,UAAAA,OAAS,IAAAD,EAAGE,EAAUC,OAAMH,EAAAI,EAAAtB,EAC5BuB,qBAAAA,OAAuBC,IAAHF,EAAGE,EAAgCF,EAAAG,EAAAzB,EACvD0B,sBAAAA,OAAqB,IAAAD,EAAG,CAAE,EAAAA,EAC1BE,EAAY3B,EAAZ2B,aAAYC,EAAA5B,EACZ6B,WAAAA,OAAa,IAAHD,EAAG,SAAQA,EACrBE,EAAoB9B,EAApB8B,qBACAC,EAAoB/B,EAApB+B,qBACAC,EAAEhC,EAAFgC,GACeC,EAAUjC,EAAzB,eAIIkC,EAAUC,EAAO,MACjBC,EAAYC,EAAYpC,EAAKiC,GAC7BI,EAAYH,EAAO,MACnBI,EAAYJ,EAAO,MAEnBK,EAAgBC,GAAY,WAChCtC,EAAc,KAChB,GAAG,CAACA,IAEEuC,EAAiBC,GAAQ,WAC7B,OAAIb,EACKd,EAEFD,EAAkB6B,EAAYC,EAAe7B,GAAc8B,EAAcD,EAAe7B,EAChG,GAAE,CAACc,EAAsBf,EAAiBC,IAErC+B,EAAiBN,GACrB,SAACO,GACC,GAAK/B,EAAL,CAIA,IAAMgC,EAAMC,EAAO9C,GACnB,GAAI6C,EAAOE,SAASH,GAAQ,CAC1B,IAAMI,EAAkBH,EAAOI,QAAQL,GACnCI,GAAmB,GACrBH,EAAOK,OAAOF,EAAiB,EAEnC,MACEH,EAAOM,KAAKP,GAEd7C,EAAc8C,EAVd,MAFE9C,EAAc,CAAC6C,GAalB,GACD,CAAC/B,EAAed,EAAeC,IAG3BoD,GAAYb,GAAQ,WAAA,MAAM,CAAC,CAAEc,WAAYnB,EAAWoB,cAAenB,GAAY,GAAE,IACjFoB,GAAkBC,EAAiCJ,GAAWtB,GAC9D2B,GAAQC,EAA0B3C,EAAwBI,GAEhE,OACEwC,EAAKC,cAAA,MAAA,CAAA9D,UAAWA,EAAW+D,MAAO,CAAEJ,MAAAA,IAAS5D,IAAKmC,EAAW8B,UAAW,GACtEH,EAAAC,cAACG,EAA8BC,SAAS,CAAAhE,MAAOuD,IAC7CI,EAAAC,cAACK,EAAqB,CACpBpE,IAAKqC,EACLS,eAAgBA,EAChBL,eAAgBA,EAChBnB,qBAAsBA,EACtBI,aAAcA,EACdvB,MAAOA,EACPG,WAAYA,EACZC,mBAAoBA,EACpBE,uCAAwCA,EACxCD,sBAAuBA,EACvBU,UAAWA,EACXO,sBAAuBA,EACvBG,WAAYA,EACZE,qBAAsBA,EACtBC,GAAIA,EAAE,cACOC,IAEd5B,GACC0D,EAAAC,cAACM,EAAsB,CAACC,KAAM3D,EAAa4D,QAAShC,EAAeiC,KAAMpE,EAAaJ,IAAKsC,KAKrG"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{camelCase as o}from"es-toolkit";import t from"classnames";import r,{forwardRef as l,useMemo as n,useRef as i,useCallback as s,useEffect as c}from"react";import{contentColors as a}from"../../../../utils/colors-vars-map.js";import m from"../../../../utils/colors-utils.js";import{getTestId as d}from"../../../../tests/testIds.js";import{ComponentDefaultTestId as u}from"../../../../tests/constants.js";import p from"./ColorPickerItemComponent.module.scss.js";import f from"../../../../../components/tooltip/dist/Tooltip/Tooltip.js";import v from"../../../../../components/clickable/dist/Clickable/Clickable.js";import I from"../../../../../components/icon/dist/Icon/Icon.js";import{getStyle as C}from"../../../../../shared/dist/utils/typesciptCssModulesHelper.js";var g=l((function(l,g){var k=l.color,y=l.onColorClicked,E=l.colorStyle,b=void 0===E?"regular":E,j=l.shouldRenderIndicatorWithoutBackground,S=l.ColorIndicatorIcon,h=l.SelectedIndicatorIcon,L=void 0===h?S:h,M=l.isSelected,N=l.colorSize,A=l.tooltipContent,P=l.isActive,T=l.colorShape,W=l.colorAriaLabel,_=l.id,x=l["data-testid"],R=n((function(){return a.includes(k)}),[k]),z=R?m.getMondayColorAsStyle(k,b):k,B=i(null),D=s((function(){return y(k)}),[y,k]);c((function(){if((null==B?void 0:B.current)&&!j&&R){var e=B.current,o=function(e){e.target.style.background=m.getMondayColorAsStyle(k,"selected"===b?"regular":"hover")},t=function(e){e.target.style.background=z};return e.addEventListener("mouseenter",o,!1),e.addEventListener("mouseleave",t,!1),function(){e.removeEventListener("mouseenter",o,!1),e.removeEventListener("mouseleave",t,!1)}}}),[k,z,b,R,B,j]);var H=M||S,O=j?{color:z}:{};return r.createElement(f,{content:A},r.createElement("li",{id:_,role:"option","aria-selected":M,className:t(p.itemWrapper,e(e(e({},p.selectedColor,M),p.active,P),p.circle,"circle"===T)),"data-testid":x||d(u.COLOR_PICKER_ITEM,k)},r.createElement("div",{className:t(p.feedbackIndicator)}),r.createElement(v,{ref:B,role:"presentation","aria-label":W,className:t(p.colorItem,C(p,o("color-item-size-"+N)),e({},p.colorItemTextMode,j)),style:{background:j?"transparent":z},onClick:D,tabIndex:-1,onMouseDown:function(e){return e.preventDefault()}},r.createElement("div",{className:t(p.colorIndicatorWrapper),style:O},H&&r.createElement(I,{icon:M?L:S,className:t(e({},p.colorIconWhite,!j)),ignoreFocusStyle:!0})))))}));export{g as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerItemComponent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerItemComponent.js","sources":["../../../../../../src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.tsx"],"sourcesContent":["import { camelCase } from \"es-toolkit\";\nimport { getStyle } from \"@vibe/shared\";\nimport cx from \"classnames\";\nimport React, { useRef, useCallback, useMemo, forwardRef, useEffect } from \"react\";\nimport { contentColors } from \"../../../../utils/colors-vars-map\";\nimport ColorUtils from \"../../../../utils/colors-utils\";\nimport { Icon } from \"@vibe/icon\";\nimport { Tooltip } from \"@vibe/tooltip\";\nimport { Clickable } from \"@vibe/clickable\";\nimport { type ColorPickerValueOnly } from \"../../ColorPicker.types\";\nimport { type ColorShapes, type ColorPickerSizes } from \"../../ColorPicker.types\";\nimport { getTestId } from \"../../../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../../../tests/constants\";\nimport { type VibeComponentProps, type ElementContent, type ColorStyle } from \"../../../../types\";\nimport { type SubIcon } from \"@vibe/icon\";\nimport styles from \"./ColorPickerItemComponent.module.scss\";\n\nexport interface ColorPickerItemComponentProps extends VibeComponentProps {\n /**\n * The color value of the item.\n */\n color: ColorPickerValueOnly;\n /**\n * Callback fired when the color is clicked.\n */\n onColorClicked: (color: ColorPickerValueOnly) => void;\n /**\n * The style applied to the color.\n */\n colorStyle: ColorStyle;\n /**\n * If true, renders the color indicator without a background.\n */\n shouldRenderIndicatorWithoutBackground: boolean;\n /**\n * Icon displayed inside the color item.\n */\n ColorIndicatorIcon: SubIcon;\n /**\n * Icon displayed when the color is selected.\n */\n SelectedIndicatorIcon: SubIcon;\n /**\n * If true, the color is marked as selected.\n */\n isSelected: boolean;\n /**\n * The size of the color item.\n */\n colorSize: ColorPickerSizes;\n /**\n * Tooltip content for the color item.\n */\n tooltipContent: ElementContent;\n /**\n * If true, the color item is currently active.\n */\n isActive: boolean;\n /**\n * The shape of the color item.\n */\n colorShape: ColorShapes;\n /**\n * Human-readable label for the color, used for screen reader announcements.\n */\n colorAriaLabel: string;\n}\n\nconst ColorPickerItemComponent = forwardRef(\n (\n {\n color,\n onColorClicked,\n colorStyle = \"regular\",\n shouldRenderIndicatorWithoutBackground,\n ColorIndicatorIcon,\n SelectedIndicatorIcon = ColorIndicatorIcon,\n isSelected,\n colorSize,\n tooltipContent,\n isActive,\n colorShape,\n colorAriaLabel,\n id,\n \"data-testid\": dataTestId\n }: ColorPickerItemComponentProps,\n _ref: React.ForwardedRef<HTMLElement>\n ) => {\n const isMondayColor = useMemo(() => (contentColors as readonly string[]).includes(color), [color]); // casting to any since color can be one of the system content colors but can also be a custom one\n const colorAsStyle = isMondayColor ? ColorUtils.getMondayColorAsStyle(color, colorStyle) : color;\n const itemRef = useRef<HTMLDivElement>(null);\n\n const onClick = useCallback(() => onColorClicked(color), [onColorClicked, color]);\n\n useEffect(() => {\n if (!itemRef?.current || shouldRenderIndicatorWithoutBackground || !isMondayColor) return;\n const item = itemRef.current;\n const setHoverColor = (e: MouseEvent) => {\n if (colorStyle === \"selected\") {\n (e.target as HTMLDivElement).style.background = ColorUtils.getMondayColorAsStyle(color, \"regular\");\n } else {\n (e.target as HTMLDivElement).style.background = ColorUtils.getMondayColorAsStyle(color, \"hover\");\n }\n };\n const restoreToOriginalColor = (e: MouseEvent) => {\n (e.target as HTMLDivElement).style.background = colorAsStyle;\n };\n item.addEventListener(\"mouseenter\", setHoverColor, false);\n item.addEventListener(\"mouseleave\", restoreToOriginalColor, false);\n\n return () => {\n item.removeEventListener(\"mouseenter\", setHoverColor, false);\n item.removeEventListener(\"mouseleave\", restoreToOriginalColor, false);\n };\n }, [color, colorAsStyle, colorStyle, isMondayColor, itemRef, shouldRenderIndicatorWithoutBackground]);\n\n const shouldRenderIcon = isSelected || ColorIndicatorIcon;\n const colorIndicatorWrapperStyle = shouldRenderIndicatorWithoutBackground ? { color: colorAsStyle } : {};\n return (\n <Tooltip content={tooltipContent}>\n <li\n id={id}\n role=\"option\"\n aria-selected={isSelected}\n className={cx(styles.itemWrapper, {\n [styles.selectedColor]: isSelected,\n [styles.active]: isActive,\n [styles.circle]: colorShape === \"circle\"\n })}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.COLOR_PICKER_ITEM, color)}\n >\n <div className={cx(styles.feedbackIndicator)} />\n <Clickable\n ref={itemRef}\n role=\"presentation\"\n aria-label={colorAriaLabel}\n className={cx(styles.colorItem, getStyle(styles, camelCase(\"color-item-size-\" + colorSize)), {\n [styles.colorItemTextMode]: shouldRenderIndicatorWithoutBackground\n })}\n style={{ background: shouldRenderIndicatorWithoutBackground ? \"transparent\" : colorAsStyle }}\n onClick={onClick}\n tabIndex={-1}\n onMouseDown={e => e.preventDefault()} // this is for quill to not lose the selection\n >\n <div className={cx(styles.colorIndicatorWrapper)} style={colorIndicatorWrapperStyle}>\n {shouldRenderIcon && (\n <Icon\n icon={isSelected ? SelectedIndicatorIcon : ColorIndicatorIcon}\n className={cx({\n [styles.colorIconWhite]: !shouldRenderIndicatorWithoutBackground\n })}\n ignoreFocusStyle\n />\n )}\n </div>\n </Clickable>\n </li>\n </Tooltip>\n );\n }\n);\n\nexport default ColorPickerItemComponent;\n"],"names":["ColorPickerItemComponent","forwardRef","_ref2","_ref","color","onColorClicked","_ref2$colorStyle","colorStyle","shouldRenderIndicatorWithoutBackground","ColorIndicatorIcon","_ref2$SelectedIndicat","SelectedIndicatorIcon","isSelected","colorSize","tooltipContent","isActive","colorShape","colorAriaLabel","id","dataTestId","isMondayColor","useMemo","contentColors","includes","colorAsStyle","ColorUtils","getMondayColorAsStyle","itemRef","useRef","onClick","useCallback","useEffect","current","item","setHoverColor","e","target","style","background","restoreToOriginalColor","addEventListener","removeEventListener","shouldRenderIcon","colorIndicatorWrapperStyle","React","createElement","Tooltip","content","role","className","cx","styles","itemWrapper","_defineProperty","selectedColor","active","circle","getTestId","ComponentDefaultTestId","COLOR_PICKER_ITEM","feedbackIndicator","Clickable","ref","colorItem","getStyle","camelCase","colorItemTextMode","tabIndex","onMouseDown","preventDefault","colorIndicatorWrapper","Icon","icon","colorIconWhite","ignoreFocusStyle"],"mappings":"u1BAoEMA,IAAAA,EAA2BC,GAC/B,SAAAC,EAiBEC,GACE,IAhBAC,EAAKF,EAALE,MACAC,EAAcH,EAAdG,eAAcC,EAAAJ,EACdK,WAAAA,OAAa,IAAHD,EAAG,UAASA,EACtBE,EAAsCN,EAAtCM,uCACAC,EAAkBP,EAAlBO,mBAAkBC,EAAAR,EAClBS,sBAAAA,OAAwBF,IAAHC,EAAGD,EAAkBC,EAC1CE,EAAUV,EAAVU,WACAC,EAASX,EAATW,UACAC,EAAcZ,EAAdY,eACAC,EAAQb,EAARa,SACAC,EAAUd,EAAVc,WACAC,EAAcf,EAAde,eACAC,EAAEhB,EAAFgB,GACeC,EAAUjB,EAAzB,eAIIkB,EAAgBC,GAAQ,WAAA,OAAOC,EAAoCC,SAASnB,EAAM,GAAE,CAACA,IACrFoB,EAAeJ,EAAgBK,EAAWC,sBAAsBtB,EAAOG,GAAcH,EACrFuB,EAAUC,EAAuB,MAEjCC,EAAUC,GAAY,WAAA,OAAMzB,EAAeD,EAAM,GAAE,CAACC,EAAgBD,IAE1E2B,GAAU,WACR,IAAKJ,aAAA,EAAAA,EAASK,WAAWxB,GAA2CY,EAApE,CACA,IAAMa,EAAON,EAAQK,QACfE,EAAgB,SAACC,GAElBA,EAAEC,OAA0BC,MAAMC,WAAab,EAAWC,sBAAsBtB,EADhE,aAAfG,EACsF,UAEA,UAGtFgC,EAAyB,SAACJ,GAC7BA,EAAEC,OAA0BC,MAAMC,WAAad,GAKlD,OAHAS,EAAKO,iBAAiB,aAAcN,GAAe,GACnDD,EAAKO,iBAAiB,aAAcD,GAAwB,GAErD,WACLN,EAAKQ,oBAAoB,aAAcP,GAAe,GACtDD,EAAKQ,oBAAoB,aAAcF,GAAwB,GAjBkB,CAmBrF,GAAG,CAACnC,EAAOoB,EAAcjB,EAAYa,EAAeO,EAASnB,IAE7D,IAAMkC,EAAmB9B,GAAcH,EACjCkC,EAA6BnC,EAAyC,CAAEJ,MAAOoB,GAAiB,GACtG,OACEoB,EAACC,cAAAC,EAAQ,CAAAC,QAASjC,GAChB8B,EAAAC,cAAA,KAAA,CACE3B,GAAIA,EACJ8B,KAAK,SAAQ,gBACEpC,EACfqC,UAAWC,EAAGC,EAAOC,YAAWC,EAAAA,EAAAA,EAAA,CAAA,EAC7BF,EAAOG,cAAgB1C,GACvBuC,EAAOI,OAASxC,GAChBoC,EAAOK,OAAwB,WAAfxC,IACjB,cACWG,GAAcsC,EAAUC,EAAuBC,kBAAmBvD,IAE/EwC,EAAKC,cAAA,MAAA,CAAAI,UAAWC,EAAGC,EAAOS,qBAC1BhB,EAAAC,cAACgB,EAAS,CACRC,IAAKnC,EACLqB,KAAK,eAAc,aACP/B,EACZgC,UAAWC,EAAGC,EAAOY,UAAWC,EAASb,EAAQc,EAAU,mBAAqBpD,IAAWwC,EAAA,CAAA,EACxFF,EAAOe,kBAAoB1D,IAE9B6B,MAAO,CAAEC,WAAY9B,EAAyC,cAAgBgB,GAC9EK,QAASA,EACTsC,UAAW,EACXC,YAAa,SAAAjC,GAAC,OAAIA,EAAEkC,gBAAgB,GAEpCzB,EAAAC,cAAA,MAAA,CAAKI,UAAWC,EAAGC,EAAOmB,uBAAwBjC,MAAOM,GACtDD,GACCE,EAAAC,cAAC0B,EAAI,CACHC,KAAM5D,EAAaD,EAAwBF,EAC3CwC,UAAWC,EAAEG,EACVF,CAAAA,EAAAA,EAAOsB,gBAAkBjE,IAE5BkE,kBACA,OAOhB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={itemWrapper:"itemWrapper_0e529adade",circle:"circle_e1305bf343",feedbackIndicator:"feedbackIndicator_05aa38a23f",active:"active_d1c18dd4f9",selectedColor:"selectedColor_2f5fb6ac92",colorItem:"colorItem_95febf7da9",colorIndicatorWrapper:"colorIndicatorWrapper_b450f348cf",colorItemSizeSmall:"colorItemSizeSmall_117b6ac09f",colorItemSizeMedium:"colorItemSizeMedium_41a10329c3",colorItemSizeLarge:"colorItemSizeLarge_7e84fa5592",colorItemTextMode:"colorItemTextMode_0320f27174",colorIconWhite:"colorIconWhite_62821d6e9d"};!function(e){const r="s_id-4f41e3ef6859_4_5_11";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+r))return;const n=document.createElement("style");n.id=r,a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[r]=e)}('.itemWrapper_0e529adade.circle_e1305bf343 {\n --border-radius-multiplier: 99999;\n}\n\n/* stylelint-disable scss/operator-no-unspaced */\n\n.itemWrapper_0e529adade {\n --border-radius-multiplier: 1;\n margin: 4px;\n display: flex;\n list-style-type: none;\n position: relative;\n}\n\n.itemWrapper_0e529adade .feedbackIndicator_05aa38a23f {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n\n.itemWrapper_0e529adade:focus,\n.itemWrapper_0e529adade:focus-visible,\n.itemWrapper_0e529adade.active_d1c18dd4f9 {\n outline: none;\n}\n\n.itemWrapper_0e529adade:focus .feedbackIndicator_05aa38a23f:before,\n.itemWrapper_0e529adade:focus-visible .feedbackIndicator_05aa38a23f:before,\n.itemWrapper_0e529adade.active_d1c18dd4f9 .feedbackIndicator_05aa38a23f:before {\n content: " ";\n position: absolute;\n border-radius: calc(7px * var(--border-radius-multiplier, 1));\n inset: -4px;\n border: 4px solid;\n border-color: var(--primary-selected-color);\n pointer-events: none;\n}\n\n.itemWrapper_0e529adade:focus .feedbackIndicator_05aa38a23f:after,\n.itemWrapper_0e529adade:focus-visible .feedbackIndicator_05aa38a23f:after,\n.itemWrapper_0e529adade.active_d1c18dd4f9 .feedbackIndicator_05aa38a23f:after {\n content: " ";\n position: absolute;\n border-radius: calc(7px * var(--border-radius-multiplier, 1));\n inset: -1px;\n border: 1px solid;\n border-color: var(--primary-color);\n pointer-events: none;\n}\n\n/* active elements have no "hover feedback" */\n\n.itemWrapper_0e529adade:hover:not(.active_d1c18dd4f9):not(.selectedColor_2f5fb6ac92) .feedbackIndicator_05aa38a23f {\n content: " ";\n position: absolute;\n border-radius: calc(8px * var(--border-radius-multiplier, 1));\n inset: -4px;\n border: 4px solid;\n border-color: var(--primary-background-hover-color);\n pointer-events: none;\n}\n\n.itemWrapper_0e529adade .colorItem_95febf7da9 {\n display: flex;\n justify-content: center;\n align-items: center;\n border: 2px solid transparent;\n border-radius: calc(4px * var(--border-radius-multiplier, 1));\n cursor: pointer;\n}\n\n.itemWrapper_0e529adade .colorItem_95febf7da9 .colorIndicatorWrapper_b450f348cf {\n display: flex;\n}\n\n.itemWrapper_0e529adade .colorItem_95febf7da9.colorItemSizeSmall_117b6ac09f {\n width: 24px;\n height: 24px;\n}\n\n.itemWrapper_0e529adade .colorItem_95febf7da9.colorItemSizeMedium_41a10329c3 {\n width: 32px;\n height: 32px;\n}\n\n.itemWrapper_0e529adade .colorItem_95febf7da9.colorItemSizeLarge_7e84fa5592 {\n width: 40px;\n height: 40px;\n}\n\n.itemWrapper_0e529adade.selectedColor_2f5fb6ac92 {\n position: relative;\n}\n\n.itemWrapper_0e529adade.selectedColor_2f5fb6ac92:before {\n content: " ";\n position: absolute;\n border-radius: calc(7px * var(--border-radius-multiplier, 1));\n inset: -4px;\n border: 2px solid;\n border-color: var(--primary-color);\n pointer-events: none;\n}\n\n.itemWrapper_0e529adade.selectedColor_2f5fb6ac92 .feedbackIndicator_05aa38a23f:before {\n /* hide the outer border from the "active" feedback indicator */\n display: none;\n}\n\n.itemWrapper_0e529adade .colorItemTextMode_0320f27174:hover {\n background-color: var(--primary-background-hover-color) !important;\n}\n\n.itemWrapper_0e529adade .colorIconWhite_62821d6e9d {\n color: var(--color-snow_white);\n}');export{e as default};
|
|
2
|
-
//# sourceMappingURL=ColorPickerItemComponent.module.scss.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerItemComponent.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{COLOR_SIZES as r,COLOR_PADDING as n,DIALOG_WIDTH_PADDING as o}from"../ColorPickerConstants.js";var t=function(o,t){return t*(r[o]+n)},e=function(r,n){return t(r,n)+o};export{e as calculateColorPickerDialogWidth,t as calculateColorPickerWidth};
|
|
2
|
-
//# sourceMappingURL=ColorPickerStyleService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerStyleService.js","sources":["../../../../../src/components/ColorPicker/services/ColorPickerStyleService.ts"],"sourcesContent":["import { DIALOG_WIDTH_PADDING, COLOR_SIZES, COLOR_PADDING } from \"../ColorPickerConstants\";\nimport { type BaseSizes } from \"../../../constants/sizes\";\n\nexport const calculateColorPickerWidth = (colorSize: BaseSizes, numberOfColorsInLine: number) => {\n return numberOfColorsInLine * (COLOR_SIZES[colorSize] + COLOR_PADDING);\n};\n\nexport const calculateColorPickerDialogWidth = (colorSize: BaseSizes, numberOfColorsInLine: number) => {\n return calculateColorPickerWidth(colorSize, numberOfColorsInLine) + DIALOG_WIDTH_PADDING;\n};\n"],"names":["calculateColorPickerWidth","colorSize","numberOfColorsInLine","COLOR_SIZES","COLOR_PADDING","calculateColorPickerDialogWidth","DIALOG_WIDTH_PADDING"],"mappings":"sGAGO,IAAMA,EAA4B,SAACC,EAAsBC,GAC9D,OAAOA,GAAwBC,EAAYF,GAAaG,EAC1D,EAEaC,EAAkC,SAACJ,EAAsBC,GACpE,OAAOF,EAA0BC,EAAWC,GAAwBI,CACtE"}
|