@vibe/core 3.34.2 → 3.36.0-alpha-94da6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/usePopover.d.ts +2 -1
- package/dist/mocked_classnames/hooks/usePopover.d.ts +2 -1
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.js +1 -1
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.js.map +1 -1
- package/dist/mocked_classnames/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AttentionBox/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/Avatar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/AvatarGroup/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/BaseInput/BaseInput.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Box/Box.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/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Button/Button.js +1 -1
- package/dist/mocked_classnames/src/components/Button/Button.js.map +1 -1
- package/dist/mocked_classnames/src/components/Button/Button.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/mocked_classnames/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js +1 -1
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/mocked_classnames/src/components/Checkbox/Checkbox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Clickable/Clickable.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.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/Counter/Counter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/DateNavigationItem/DateNavigationItem.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/DatePickerHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/YearPicker/YearPicker.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DatePicker/external_datepicker.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dialog/Dialog.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dialog/DialogContent/DialogContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Divider/Divider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/Dropdown.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/Dropdown.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/ChildrenContent/ChildrenContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.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/option/option.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Dropdown/components/singleValue/singleValue.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableText/EditableText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Flex/Flex.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Heading/Heading.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js +1 -1
- package/dist/mocked_classnames/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js.map +1 -1
- package/dist/mocked_classnames/src/components/Icon/FontIcon/FontIcon.js +1 -1
- package/dist/mocked_classnames/src/components/Icon/FontIcon/FontIcon.js.map +1 -1
- package/dist/mocked_classnames/src/components/Icon/Icon.js +1 -1
- package/dist/mocked_classnames/src/components/Icon/Icon.js.map +1 -1
- package/dist/mocked_classnames/src/components/Icon/Icon.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/IconButton/IconButton.js +1 -1
- package/dist/mocked_classnames/src/components/IconButton/IconButton.js.map +1 -1
- package/dist/mocked_classnames/src/components/IconButton/IconButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Label/Label.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/LegacyModal/LegacyModal.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalContent/LegacyModalContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooter.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Link/Link.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/List.js +1 -1
- package/dist/mocked_classnames/src/components/List/List.js.map +1 -1
- package/dist/mocked_classnames/src/components/List/List.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/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/Loader/Loader.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/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.js +1 -1
- package/dist/mocked_classnames/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.js.map +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.js +1 -1
- package/dist/mocked_classnames/src/components/MenuButton/MenuButton.js.map +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/ProgressBars/LinearProgressBar/Bar/Bar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/RadioButton/RadioButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Search/Search.js +1 -1
- package/dist/mocked_classnames/src/components/Search/Search.js.map +1 -1
- package/dist/mocked_classnames/src/components/Search/Search.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Skeleton/Skeleton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/SplitButton/SplitButton.js +1 -1
- package/dist/mocked_classnames/src/components/SplitButton/SplitButton.js.map +1 -1
- package/dist/mocked_classnames/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Switch/Switch.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.js.map +1 -1
- package/dist/mocked_classnames/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Text/Text.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextArea/TextArea.js +1 -1
- package/dist/mocked_classnames/src/components/TextArea/TextArea.js.map +1 -1
- package/dist/mocked_classnames/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextField/TextField.js +1 -1
- package/dist/mocked_classnames/src/components/TextField/TextField.js.map +1 -1
- package/dist/mocked_classnames/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Tipseen/TipseenImage.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.js +1 -1
- package/dist/mocked_classnames/src/components/Toggle/Toggle.js.map +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/Tooltip/Tooltip.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/mocked_classnames/src/components/Typography/Typography.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/hooks/usePopover.js +1 -1
- package/dist/mocked_classnames/src/hooks/usePopover.js.map +1 -1
- package/dist/mocked_classnames/src/tests/constants.js +1 -1
- package/dist/mocked_classnames/src/tests/constants.js.map +1 -1
- package/dist/mocked_classnames/style/dist/index.min.css.js +1 -1
- package/dist/mocked_classnames/tests/constants.d.ts +56 -0
- package/dist/src/components/Accordion/Accordion/Accordion.js +1 -1
- package/dist/src/components/Accordion/Accordion/Accordion.js.map +1 -1
- package/dist/src/components/Accordion/Accordion/Accordion.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBanner.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerButton/AlertBannerButton.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerLink/AlertBannerLink.module.scss.js +1 -1
- package/dist/src/components/AlertBanner/AlertBannerText/AlertBannerText.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/AttentionBox.module.scss.js +1 -1
- package/dist/src/components/AttentionBox/AttentionBoxLink/AttentionBoxLink.module.scss.js +1 -1
- package/dist/src/components/Avatar/Avatar.module.scss.js +1 -1
- package/dist/src/components/Avatar/AvatarBadge.module.scss.js +1 -1
- package/dist/src/components/Avatar/AvatarContent.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroup.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/AvatarGroupCounter.module.scss.js +1 -1
- package/dist/src/components/AvatarGroup/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/BaseInput/BaseInput.module.scss.js +1 -1
- package/dist/src/components/Box/Box.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/BreadcrumbsBar.module.scss.js +1 -1
- package/dist/src/components/Button/Button.js +1 -1
- package/dist/src/components/Button/Button.js.map +1 -1
- package/dist/src/components/Button/Button.module.scss.js +1 -1
- package/dist/src/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/src/components/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist/src/components/ButtonGroup/ButtonGroup.module.scss.js +1 -1
- package/dist/src/components/Checkbox/Checkbox.js +1 -1
- package/dist/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/src/components/Checkbox/Checkbox.module.scss.js +1 -1
- package/dist/src/components/Chips/Chips.module.scss.js +1 -1
- package/dist/src/components/Clickable/Clickable.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/src/components/ColorPicker/ColorPicker.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerClearButton.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerContent/ColorPickerColorsGrid.module.scss.js +1 -1
- package/dist/src/components/ColorPicker/components/ColorPickerItemComponent/ColorPickerItemComponent.module.scss.js +1 -1
- package/dist/src/components/Combobox/Combobox.module.scss.js +1 -1
- package/dist/src/components/Combobox/ComboboxHelpers/ComboboxHelpers.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/Counter/Counter.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DateNavigationItem/DateNavigationItem.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePicker.module.scss.js +1 -1
- package/dist/src/components/DatePicker/DatePickerHeader/DatePickerHeader.module.scss.js +1 -1
- package/dist/src/components/DatePicker/YearPicker/YearPicker.module.scss.js +1 -1
- package/dist/src/components/DatePicker/external_datepicker.scss.js +1 -1
- package/dist/src/components/Dialog/Dialog.module.scss.js +1 -1
- package/dist/src/components/Dialog/DialogContent/DialogContent.module.scss.js +1 -1
- package/dist/src/components/DialogContentContainer/DialogContentContainer.module.scss.js +1 -1
- package/dist/src/components/Divider/Divider.module.scss.js +1 -1
- package/dist/src/components/Dropdown/Dropdown.js +1 -1
- package/dist/src/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/src/components/Dropdown/Dropdown.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/ChildrenContent/ChildrenContent.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/MultiValueContainer/MultiValueContainer.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/menu/menu.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/option/option.module.scss.js +1 -1
- package/dist/src/components/Dropdown/components/singleValue/singleValue.module.scss.js +1 -1
- package/dist/src/components/EditableHeading/EditableHeading.module.scss.js +1 -1
- package/dist/src/components/EditableText/EditableText.module.scss.js +1 -1
- package/dist/src/components/EditableTypography/EditableTypography.module.scss.js +1 -1
- package/dist/src/components/ExpandCollapse/ExpandCollapse.module.scss.js +1 -1
- package/dist/src/components/FieldLabel/FieldLabel.module.scss.js +1 -1
- package/dist/src/components/Flex/Flex.module.scss.js +1 -1
- package/dist/src/components/FormattedNumber/FormattedNumber.module.scss.js +1 -1
- package/dist/src/components/Heading/Heading.module.scss.js +1 -1
- package/dist/src/components/HiddenText/HiddenText.module.scss.js +1 -1
- package/dist/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js +1 -1
- package/dist/src/components/Icon/CustomSvgIcon/CustomSvgIcon.js.map +1 -1
- package/dist/src/components/Icon/FontIcon/FontIcon.js +1 -1
- package/dist/src/components/Icon/FontIcon/FontIcon.js.map +1 -1
- package/dist/src/components/Icon/Icon.js +1 -1
- package/dist/src/components/Icon/Icon.js.map +1 -1
- package/dist/src/components/Icon/Icon.module.scss.js +1 -1
- package/dist/src/components/IconButton/IconButton.js +1 -1
- package/dist/src/components/IconButton/IconButton.js.map +1 -1
- package/dist/src/components/IconButton/IconButton.module.scss.js +1 -1
- package/dist/src/components/Label/Label.module.scss.js +1 -1
- package/dist/src/components/Label/LabelCelebrationAnimation.module.scss.js +1 -1
- package/dist/src/components/LegacyModal/LegacyModal.module.scss.js +1 -1
- package/dist/src/components/LegacyModal/LegacyModalContent/LegacyModalContent.module.scss.js +1 -1
- package/dist/src/components/LegacyModal/LegacyModalFooter/LegacyModalFooter.module.scss.js +1 -1
- package/dist/src/components/LegacyModal/LegacyModalHeader/LegacyModalHeader.module.scss.js +1 -1
- package/dist/src/components/Link/Link.module.scss.js +1 -1
- package/dist/src/components/List/List.js +1 -1
- package/dist/src/components/List/List.js.map +1 -1
- package/dist/src/components/List/List.module.scss.js +1 -1
- package/dist/src/components/List/VirtualizedListItems/VirtualizedListItems.module.scss.js +1 -1
- package/dist/src/components/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/Loader/Loader.module.scss.js +1 -1
- package/dist/src/components/Menu/Menu/Menu.module.scss.js +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.js +1 -1
- package/dist/src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.js.map +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.js +1 -1
- package/dist/src/components/MenuButton/MenuButton.js.map +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/ProgressBars/LinearProgressBar/Bar/Bar.module.scss.js +1 -1
- package/dist/src/components/ProgressBars/LinearProgressBar/LinearProgressBar.module.scss.js +1 -1
- package/dist/src/components/ProgressBars/PercentageLabel/PercentageLabel.module.scss.js +1 -1
- package/dist/src/components/RadioButton/RadioButton.module.scss.js +1 -1
- package/dist/src/components/Search/Search.js +1 -1
- package/dist/src/components/Search/Search.js.map +1 -1
- package/dist/src/components/Search/Search.module.scss.js +1 -1
- package/dist/src/components/Skeleton/Skeleton.module.scss.js +1 -1
- package/dist/src/components/SlideTransition/SlideTransition.module.scss.js +1 -1
- package/dist/src/components/Slider/SelectionIndicator.module.scss.js +1 -1
- package/dist/src/components/Slider/Slider.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderBase.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderFilledTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderRail.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderThumb.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderBase/SliderTrack.module.scss.js +1 -1
- package/dist/src/components/Slider/SliderInfix.module.scss.js +1 -1
- package/dist/src/components/SplitButton/SplitButton.js +1 -1
- package/dist/src/components/SplitButton/SplitButton.js.map +1 -1
- package/dist/src/components/SplitButton/SplitButton.module.scss.js +1 -1
- package/dist/src/components/Steps/Steps.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsCommand.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsDot.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsGalleryHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsHeader.module.scss.js +1 -1
- package/dist/src/components/Steps/StepsNumbersHeader.module.scss.js +1 -1
- package/dist/src/components/Switch/Switch.module.scss.js +1 -1
- package/dist/src/components/Table/Table/Table.module.scss.js +1 -1
- package/dist/src/components/Table/TableBody/TableBody.module.scss.js +1 -1
- package/dist/src/components/Table/TableCell/TableCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableCellSkeleton/TableCellSkeleton.module.scss.js +1 -1
- package/dist/src/components/Table/TableContainer/TableContainer.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeader/TableHeader.module.scss.js +1 -1
- package/dist/src/components/Table/TableHeaderCell/TableHeaderCell.module.scss.js +1 -1
- package/dist/src/components/Table/TableRow/TableRow.module.scss.js +1 -1
- package/dist/src/components/Table/TableRowMenu/TableRowMenu.module.scss.js +1 -1
- package/dist/src/components/Table/TableVirtualizedBody/TableVirtualizedBody.module.scss.js +1 -1
- package/dist/src/components/Tabs/Tab/Tab.js +1 -1
- package/dist/src/components/Tabs/Tab/Tab.js.map +1 -1
- package/dist/src/components/Tabs/Tab/Tab.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabList/TabList.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabPanel/TabPanel.module.scss.js +1 -1
- package/dist/src/components/Tabs/TabPanels/TabPanels.module.scss.js +1 -1
- package/dist/src/components/Text/Text.module.scss.js +1 -1
- package/dist/src/components/TextArea/TextArea.js +1 -1
- package/dist/src/components/TextArea/TextArea.js.map +1 -1
- package/dist/src/components/TextArea/TextArea.module.scss.js +1 -1
- package/dist/src/components/TextField/TextField.js +1 -1
- package/dist/src/components/TextField/TextField.js.map +1 -1
- package/dist/src/components/TextField/TextField.module.scss.js +1 -1
- package/dist/src/components/TextWithHighlight/TextWithHighlight.module.scss.js +1 -1
- package/dist/src/components/Tipseen/Tipseen.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenBasicContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenContent.module.scss.js +1 -1
- package/dist/src/components/Tipseen/TipseenImage.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.js +1 -1
- package/dist/src/components/Toggle/Toggle.js.map +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/Tooltip/Tooltip.module.scss.js +1 -1
- package/dist/src/components/TransitionView/TransitionView.module.scss.js +1 -1
- package/dist/src/components/Typography/Typography.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/hooks/usePopover.js +1 -1
- package/dist/src/hooks/usePopover.js.map +1 -1
- package/dist/src/tests/constants.js +1 -1
- package/dist/src/tests/constants.js.map +1 -1
- package/dist/style/dist/index.min.css.js +1 -1
- package/dist/tests/constants.d.ts +56 -0
- package/package.json +14 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontIcon.js","sources":["../../../../../src/components/Icon/FontIcon/FontIcon.tsx"],"sourcesContent":["import React, { AriaRole, forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { SubIcon, VibeComponent, VibeComponentProps } from \"../../../types\";\n\nexport interface FontIconProps extends VibeComponentProps {\n onClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;\n \"aria-label\"?: string;\n tabIndex?: number;\n icon?: SubIcon;\n role?: AriaRole;\n \"aria-hidden\"?: boolean;\n}\n\nconst FontIcon: VibeComponent<FontIconProps, HTMLElement> = forwardRef(\n (\n {\n id,\n className,\n onClick,\n \"aria-label\": iconLabel,\n tabIndex,\n icon: Icon,\n role = \"img\",\n \"aria-hidden\": ariaHidden,\n \"data-testid\": dataTestId\n }: FontIconProps,\n iconRef\n ) => {\n const isIconFunction = typeof Icon === \"function\";\n const iconClassName = isIconFunction ? \"\" : Icon;\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span\n aria-hidden={ariaHidden}\n className={classNames(className, \"fa\", iconClassName)}\n onClick={onClick}\n ref={iconRef}\n aria-label={iconLabel}\n tabIndex={tabIndex}\n role={role}\n id={id}\n data-testid={dataTestId}\n >\n {isIconFunction && <Icon />}\n </span>\n );\n }\n);\nexport default FontIcon;\n"],"names":["FontIcon","forwardRef","_ref","iconRef","id","onClick","iconLabel","tabIndex","Icon","icon","_ref$role","role","dataTestId","isIconFunction","React","createElement","className","classNames","ref"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FontIcon.js","sources":["../../../../../src/components/Icon/FontIcon/FontIcon.tsx"],"sourcesContent":["import React, { AriaRole, forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { SubIcon, VibeComponent, VibeComponentProps } from \"../../../types\";\nimport { ComponentVibeId } from \"../../../tests/constants\";\n\nexport interface FontIconProps extends VibeComponentProps {\n onClick?: (event: React.MouseEvent<HTMLSpanElement>) => void;\n \"aria-label\"?: string;\n tabIndex?: number;\n icon?: SubIcon;\n role?: AriaRole;\n \"aria-hidden\"?: boolean;\n}\n\nconst FontIcon: VibeComponent<FontIconProps, HTMLElement> = forwardRef(\n (\n {\n id,\n className,\n onClick,\n \"aria-label\": iconLabel,\n tabIndex,\n icon: Icon,\n role = \"img\",\n \"aria-hidden\": ariaHidden,\n \"data-testid\": dataTestId\n }: FontIconProps,\n iconRef\n ) => {\n const isIconFunction = typeof Icon === \"function\";\n const iconClassName = isIconFunction ? \"\" : Icon;\n return (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events\n <span\n aria-hidden={ariaHidden}\n className={classNames(className, \"fa\", iconClassName)}\n onClick={onClick}\n ref={iconRef}\n aria-label={iconLabel}\n tabIndex={tabIndex}\n role={role}\n id={id}\n data-testid={dataTestId}\n data-vibe={ComponentVibeId.ICON}\n >\n {isIconFunction && <Icon />}\n </span>\n );\n }\n);\nexport default FontIcon;\n"],"names":["FontIcon","forwardRef","_ref","iconRef","id","onClick","iconLabel","tabIndex","Icon","icon","_ref$role","role","dataTestId","isIconFunction","React","createElement","className","classNames","ref","ComponentVibeId","ICON"],"mappings":"8HAcMA,IAAAA,EAAsDC,GAC1D,SAAAC,EAYEC,GACE,IAXAC,EAAEF,EAAFE,GAEAC,EAAOH,EAAPG,QACcC,EAASJ,EAAvB,cACAK,EAAQL,EAARK,SACMC,EAAIN,EAAVO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EAEGE,EAAUV,EAAzB,eAIIW,EAAiC,mBAATL,EAE9B,OAEEM,EACeC,cAAA,OAAA,CAAA,cAVUb,EAAzB,eAWEc,UAAWC,EAjBJf,EAATc,UAiBmC,KALfH,EAAiB,GAAKL,GAMxCH,QAASA,EACTa,IAAKf,EACO,aAAAG,EACZC,SAAUA,EACVI,KAAMA,EACNP,GAAIA,EAAE,cACOQ,EAAU,YACZO,EAAgBC,MAE1BP,GAAkBC,gBAACN,EAAI,MAG9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{typeof as
|
|
1
|
+
import{typeof as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{getTestId as o,ComponentDefaultTestId as e}from"../../tests/testIds.js";import s from"classnames";import r,{forwardRef as i}from"react";import a from"../../hooks/useMergeRef.js";import{IconType as n}from"./IconConstants.js";import c from"./CustomSvgIcon/CustomSvgIcon.js";import l from"./FontIcon/FontIcon.js";import m from"./hooks/useIconProps.js";import{withStaticProps as d}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import{ComponentVibeId as p}from"../../tests/constants.js";var u=d(i((function(i,n){var d=i.id,u=i.icon,f=void 0===u?"":u,C=i.iconType,j=void 0===C?"svg":C,v=i.iconSize,b=void 0===v?16:v,g=i.ignoreFocusStyle,I=i.tabindex,y=i.style,N=i.useCurrentColor,O=void 0!==N&&N,k=i.customColor,S=i["data-testid"],x=m({iconLabel:i.iconLabel,className:i.className,isDecorationOnly:i.ariaHidden,ignoreFocusStyle:void 0!==g&&g,externalTabIndex:I&&+I}),F=x.screenReaderAccessProps,P=x.onClickCallback,h=x.computedClassName,E=a(n,x.iconRef);if(!f)return null;var R="function"==typeof f,T=S||o(e.ICON,d);return"svg"===j||R||"object"===t(f)?function(t,s){return r.createElement(t,Object.assign({},s,{"data-testid":s["data-testid"]||o(e.ICON,s.id),"data-vibe":p.ICON}))}(f,Object.assign(Object.assign({id:d},F),{ref:R?void 0:E,size:""+b,className:h,style:y,"data-testid":T})):"src"===j?r.createElement(c,Object.assign({id:d,src:f},F,{className:s(h),onClick:P,replaceToCurrentColor:O,customColor:k,"data-testid":T})):r.createElement(l,Object.assign({id:d},F,{className:s(h),onClick:P,ref:E,icon:f,"data-testid":T}))})),{type:n});export{u as default};
|
|
2
2
|
//# sourceMappingURL=Icon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { CSSProperties, forwardRef, Ref } from \"react\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport { IconType as IconTypeEnum } from \"./IconConstants\";\nimport { IconType } from \"./Icon.types\";\nimport CustomSvgIcon from \"./CustomSvgIcon/CustomSvgIcon\";\nimport FontIcon from \"./FontIcon/FontIcon\";\nimport useIconProps from \"./hooks/useIconProps\";\nimport { VibeComponentProps, VibeComponent, SubIcon, withStaticProps } from \"../../types\";\n\nexport interface IconSubComponentProps {\n ref?: Ref<HTMLElement>;\n id?: string;\n size?: string | number;\n className?: string;\n style?: CSSProperties;\n \"data-testid\"?: string;\n}\n\nfunction renderIcon(Icon: SubIcon, props: IconSubComponentProps) {\n const dataTestId = props[\"data-testid\"];\n return <Icon
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport React, { CSSProperties, forwardRef, Ref } from \"react\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport { IconType as IconTypeEnum } from \"./IconConstants\";\nimport { IconType } from \"./Icon.types\";\nimport CustomSvgIcon from \"./CustomSvgIcon/CustomSvgIcon\";\nimport FontIcon from \"./FontIcon/FontIcon\";\nimport useIconProps from \"./hooks/useIconProps\";\nimport { VibeComponentProps, VibeComponent, SubIcon, withStaticProps } from \"../../types\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface IconSubComponentProps {\n ref?: Ref<HTMLElement>;\n id?: string;\n size?: string | number;\n className?: string;\n style?: CSSProperties;\n \"data-testid\"?: string;\n}\n\nfunction renderIcon(Icon: SubIcon, props: IconSubComponentProps) {\n const dataTestId = props[\"data-testid\"];\n return (\n <Icon\n {...props}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.ICON, props.id)}\n data-vibe={ComponentVibeId.ICON}\n />\n );\n}\n\nexport interface IconProps extends VibeComponentProps {\n /**\n * We support three types of icons - SVG, FONT and SRC (classname) so this prop is either the name of the icon or the component\n */\n icon: SubIcon;\n /**\n * Icon aria label [aria label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)\n */\n iconLabel?: string;\n /**\n * The type of the component - svg, font or custom svg (using [`react-inlinesvg`](https://github.com/gilbarbara/react-inlinesvg#readme))\n */\n iconType?: IconType;\n /**\n * Size for font icon\n */\n iconSize?: number | string;\n /**\n * Remove focus style\n */\n ignoreFocusStyle?: boolean;\n tabindex?: number | string;\n /**\n * Hide icon asset from screen reader. No need to set value for this prop when `clickable` is false\n */\n ariaHidden?: boolean;\n style?: React.CSSProperties;\n /**\n * When using svg from src (Icon.type.SRC) this boolean will transform the \"fill\" property to \"currentColor\"\n */\n useCurrentColor?: boolean;\n /**\n * Override the default color with a custom one\n */\n customColor?: string;\n}\n\nconst Icon: VibeComponent<IconProps, HTMLElement> & { type?: typeof IconTypeEnum } = forwardRef(\n (\n {\n /**\n * component id\n */\n id,\n className,\n icon = \"\",\n iconLabel,\n iconType = \"svg\",\n iconSize = 16,\n ignoreFocusStyle = false,\n tabindex: externalTabIndex,\n ariaHidden,\n style,\n useCurrentColor = false,\n customColor,\n \"data-testid\": dataTestId\n }: IconProps,\n ref\n ) => {\n const overrideExternalTabIndex = externalTabIndex && +externalTabIndex;\n const { screenReaderAccessProps, onClickCallback, computedClassName, iconRef } = useIconProps({\n iconLabel,\n className,\n isDecorationOnly: ariaHidden,\n ignoreFocusStyle,\n externalTabIndex: overrideExternalTabIndex\n });\n\n const mergedRef = useMergeRef(ref, iconRef);\n\n if (!icon) {\n return null;\n }\n\n // TODO: [breaking] make more accurate check\n const isFunctionType = typeof icon === \"function\";\n\n const overrideDataTestId = dataTestId || getTestId(ComponentDefaultTestId.ICON, id);\n\n // TODO: [breaking] make more accurate check\n if (iconType === \"svg\" || isFunctionType || typeof icon === \"object\") {\n return renderIcon(icon, {\n id,\n ...screenReaderAccessProps,\n ref: isFunctionType ? undefined : mergedRef,\n size: iconSize.toString(),\n className: computedClassName,\n style,\n \"data-testid\": overrideDataTestId\n });\n }\n if (iconType === \"src\") {\n return (\n <CustomSvgIcon\n id={id}\n src={icon}\n {...screenReaderAccessProps}\n className={cx(computedClassName)}\n onClick={onClickCallback}\n replaceToCurrentColor={useCurrentColor}\n customColor={customColor}\n data-testid={overrideDataTestId}\n />\n );\n }\n return (\n <FontIcon\n id={id}\n {...screenReaderAccessProps}\n className={cx(computedClassName)}\n onClick={onClickCallback}\n ref={mergedRef}\n icon={icon}\n data-testid={overrideDataTestId}\n />\n );\n }\n);\n\nexport default withStaticProps(Icon, {\n type: IconTypeEnum\n});\n"],"names":["withStaticProps","forwardRef","_ref","ref","id","_ref$icon","icon","_ref$iconType","iconType","_ref$iconSize","iconSize","_ref$ignoreFocusStyle","ignoreFocusStyle","externalTabIndex","tabindex","style","_ref$useCurrentColor","useCurrentColor","customColor","dataTestId","_useIconProps","useIconProps","iconLabel","className","isDecorationOnly","ariaHidden","screenReaderAccessProps","onClickCallback","computedClassName","mergedRef","useMergeRef","iconRef","isFunctionType","overrideDataTestId","getTestId","ComponentDefaultTestId","ICON","_typeof","Icon","props","React","createElement","Object","assign","ComponentVibeId","renderIcon","undefined","size","CustomSvgIcon","src","cx","onClick","replaceToCurrentColor","FontIcon","type","IconTypeEnum"],"mappings":"+kBAqEA,IAkFeA,EAAAA,EAlFsEC,GACnF,SAAAC,EAmBEC,GACE,IAfAC,EAAEF,EAAFE,GACSC,EAAAH,EACTI,KAAAA,OAA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vBC,YAAaA,EAAW,cACXe,KAKjBO,EAAAC,cAACY,EAAQX,OAAAC,OAAA,CACPvC,GAAIA,GACAsB,EACJ,CAAAH,UAAW2B,EAAGtB,GACduB,QAASxB,EACTxB,IAAK0B,EACLvB,KAAMA,EAAI,cACG2B,IAGnB,IAGmC,CACnCqB,KAAMC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={icon:"
|
|
1
|
+
var e={icon:"icon_24cf8b9c4c",noFocusStyle:"noFocusStyle_e6a70bec4e",clickable:"clickable_ea8f1836f3"};!function(e){const n="s_id-039c30c54242_3_35_0";if("undefined"!=typeof document){const c=document.head||document.getElementsByTagName("head")[0];if(c.querySelector("#"+n))return;const t=document.createElement("style");t.id=n,c.firstChild?c.insertBefore(t,c.firstChild):c.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".icon_24cf8b9c4c {\n position: relative;\n}\n\n.icon_24cf8b9c4c:before {\n text-decoration: none !important;\n}\n\n.noFocusStyle_e6a70bec4e:focus {\n outline: none;\n}\n\n.clickable_ea8f1836f3 {\n cursor: pointer;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=Icon.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{forwardRef as t,useRef as o,useMemo as s,Fragment as r}from"react";import a from"classnames";import{noop as i}from"lodash-es";import n from"../../hooks/useMergeRef.js";import d from"../Tooltip/Tooltip.js";import c from"../Icon/Icon.js";import{getWidthHeight as l}from"./services/IconButton-helpers.js";import{withStaticProps as m}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import{getTestId as p}from"../../tests/testIds.js";import{ComponentDefaultTestId as u}from"../../tests/constants.js";import
|
|
1
|
+
import e,{forwardRef as t,useRef as o,useMemo as s,Fragment as r}from"react";import a from"classnames";import{noop as i}from"lodash-es";import n from"../../hooks/useMergeRef.js";import d from"../Tooltip/Tooltip.js";import c from"../Icon/Icon.js";import{getWidthHeight as l}from"./services/IconButton-helpers.js";import{withStaticProps as m}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import{getTestId as p}from"../../tests/testIds.js";import{ComponentDefaultTestId as u,ComponentVibeId as f}from"../../tests/constants.js";import v from"../Button/Button.js";import{BUTTON_ICON_SIZE as b,SMALL_BUTTON_ICON_SIZE as j}from"../Button/ButtonConstants.js";import{getStyle as g}from"../../helpers/typesciptCssModulesHelper.js";import C from"./IconButton.module.scss.js";import y from"../../../icons/dist/react/AddSmall.js";var N=m(t((function(t,m){var N=t.className,B=t.wrapperClassName,I=t.iconClassName,h=t.id,x=t.icon,O=void 0===x?y:x,T=t.size,k=void 0===T?"medium":T,E=t.tooltipProps,P=void 0===E?{}:E,S=t.tooltipContent,w=t.ariaLabeledBy,z=t.ariaLabel,L=t.ariaHasPopup,F=t.ariaExpanded,H=t.ariaControls,M=t["aria-describedby"],R=t["aria-hidden"],U=t["aria-pressed"],W=t.hideTooltip,_=void 0!==W&&W,A=t.kind,q=void 0===A?"tertiary":A,D=t.active,G=t.disabled,J=void 0!==G&&G,K=t.disabledReason,Q=t.onClick,V=void 0===Q?i:Q,X=t.color,Y=t["data-testid"],Z=t.insetFocus,$=void 0!==Z&&Z,ee=t.tabIndex,te=t.loading,oe=void 0!==te&&te,se=o(null),re=n(m,se),ae=s((function(){return(null==P?void 0:P.content)||S}),[null==P?void 0:P.content,S]),ie=s((function(){return z||("string"==typeof ae?ae:void 0)}),[z,ae]),ne=s((function(){switch(k){case"xxs":case"xs":return j;case"small":case"medium":case"large":return b;default:return 24}}),[k]),de=s((function(){var e={justifyContent:"center",alignItems:"center",padding:0};return k&&(e=Object.assign(Object.assign({},e),l(k))),e}),[k]),ce=s((function(){return _?null:J&&K?K:ae||z}),[_,J,K,ae,z]),le=B?"div":r,me=s((function(){return B?{className:a(B,C.wrapper)}:{}}),[B]);return e.createElement(le,Object.assign({},me),e.createElement(d,Object.assign({},P,{content:ce,referenceWrapperClassName:C.referenceWrapper}),e.createElement(v,{onClick:V,disabled:J,color:X,kind:q,ariaLabeledBy:w,ariaLabel:ie,ariaHasPopup:L,ariaExpanded:F,ariaControls:H,"aria-describedby":M,"aria-hidden":R,"aria-pressed":U,ref:re,id:h,"data-testid":Y||p(u.ICON_BUTTON,h),"data-vibe":f.ICON_BUTTON,noSidePadding:!0,active:D,className:N,style:de,insetFocus:$,tabIndex:ee,loading:oe,loaderClassName:a(C.loader,g(C,k))},e.createElement(c,{icon:O,iconType:"svg",iconSize:ne,ignoreFocusStyle:!0,className:I}))))})),{sizes:v.sizes,kinds:v.kinds,colors:v.colors});export{N as default};
|
|
2
2
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import React, { AriaAttributes, forwardRef, Fragment, useMemo, useRef } from \"react\";\nimport cx from \"classnames\";\nimport { noop as NOOP } from \"lodash-es\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport Tooltip, { TooltipProps } from \"../Tooltip/Tooltip\";\nimport Icon from \"../Icon/Icon\";\nimport { AddSmall } from \"@vibe/icons\";\nimport { getWidthHeight, Size } from \"./services/IconButton-helpers\";\nimport { SubIcon, VibeComponent, VibeComponentProps, withStaticProps } from \"../../types\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId } from \"../../tests/constants\";\nimport Button from \"../Button/Button\";\nimport { BUTTON_ICON_SIZE, SMALL_BUTTON_ICON_SIZE } from \"../Button/ButtonConstants\";\nimport { ButtonColor, ButtonType } from \"../Button/Button.types\";\nimport { getStyle } from \"../../helpers/typesciptCssModulesHelper\";\nimport styles from \"./IconButton.module.scss\";\n\nexport interface IconButtonProps extends VibeComponentProps {\n /**\n * id to be added to the element\n */\n id?: string;\n /**\n * callback function when clicking the icon button\n */\n onClick?: (event: React.MouseEvent) => void;\n /**\n * the class name of the button wrapper\n */\n wrapperClassName?: string;\n /**\n * the class name of the button icon\n */\n iconClassName?: string;\n /**\n * Icon to be rendered\n */\n icon?: SubIcon;\n /**\n * element id to describe the button accordingly\n * */\n ariaLabeledBy?: string;\n /**\n * a11y property to be added, used for screen reader to know what kind of button it is\n */\n ariaLabel?: string;\n /**\n * aria for a button popup\n */\n ariaHasPopup?: React.HTMLProps<HTMLButtonElement>[\"aria-haspopup\"];\n /**\n * a11y property to be added, used for screen reader to know if the button is expanded\n */\n ariaExpanded?: boolean;\n /**\n * aria controls - receives id for the controlled region\n */\n ariaControls?: string;\n \"aria-describedby\"?: AriaAttributes[\"aria-describedby\"];\n /**\n * a11y property to be added, used for screen reader to know if the button is hidden\n */\n \"aria-hidden\"?: AriaAttributes[\"aria-hidden\"];\n /**\n * Indicates the current \"pressed\" state of toggle buttons\n */\n \"aria-pressed\"?: AriaAttributes[\"aria-pressed\"];\n /**\n * Size of the icon\n */\n size?: Size;\n /**\n * Whether the tooltip should be displayed or not\n */\n hideTooltip?: boolean;\n /**\n * Props for Tooltip component\n */\n tooltipProps?: Partial<TooltipProps>;\n /**\n * Tooltip wraps the button icon, it will display in the tooltip, if not present the aria label will be shown\n */\n tooltipContent?: string;\n /**\n * Kind of button - like Button\n */\n kind?: ButtonType;\n active?: boolean;\n /** The button's color */\n color?: ButtonColor;\n /**\n * disabled state\n */\n disabled?: boolean;\n /**\n * if disabled - this will be shown in the tooltip\n */\n disabledReason?: string;\n /** Change the focus indicator from around the button to within it */\n insetFocus?: boolean;\n /** Specifies the tab order of an element */\n tabIndex?: number;\n /** Show a loader instead of the icon */\n loading?: boolean;\n}\n\nconst IconButton: VibeComponent<IconButtonProps> & {\n sizes?: typeof Button.sizes;\n kinds?: typeof Button.kinds;\n colors?: typeof Button.colors;\n} = forwardRef(\n (\n {\n className,\n wrapperClassName,\n iconClassName,\n id,\n icon = AddSmall,\n size = \"medium\",\n tooltipProps = {} as TooltipProps,\n tooltipContent,\n ariaLabeledBy,\n ariaLabel,\n ariaHasPopup,\n ariaExpanded,\n ariaControls,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-hidden\": ariaHidden,\n \"aria-pressed\": ariaPressed,\n hideTooltip = false,\n kind = \"tertiary\",\n active,\n disabled = false,\n disabledReason,\n onClick = NOOP,\n color,\n \"data-testid\": dataTestId,\n insetFocus = false,\n tabIndex,\n loading = false\n }: IconButtonProps,\n ref\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n const overrideTooltipContent = useMemo(\n () => tooltipProps?.content || tooltipContent,\n [tooltipProps?.content, tooltipContent]\n );\n\n const buttonAriaLabel = useMemo(() => {\n if (ariaLabel) return ariaLabel;\n if (typeof overrideTooltipContent === \"string\") return overrideTooltipContent;\n return undefined;\n }, [ariaLabel, overrideTooltipContent]);\n\n const iconSize = useMemo(() => {\n switch (size) {\n case \"xxs\":\n case \"xs\":\n return SMALL_BUTTON_ICON_SIZE;\n case \"small\":\n case \"medium\":\n case \"large\":\n return BUTTON_ICON_SIZE;\n default:\n return 24;\n }\n }, [size]);\n\n const overrideStyle = useMemo(() => {\n let style = {\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 0\n } as React.CSSProperties;\n\n if (size) {\n style = { ...style, ...getWidthHeight(size) };\n }\n return style;\n }, [size]);\n\n const calculatedTooltipContent = useMemo(() => {\n if (hideTooltip) return null;\n if (disabled && disabledReason) return disabledReason;\n if (overrideTooltipContent) return overrideTooltipContent as never;\n return ariaLabel;\n }, [hideTooltip, disabled, disabledReason, overrideTooltipContent, ariaLabel]);\n\n const IconButtonWrapper = wrapperClassName ? \"div\" : Fragment;\n const iconButtonWrapperProps = useMemo(() => {\n return wrapperClassName ? { className: cx(wrapperClassName, styles.wrapper) } : {};\n }, [wrapperClassName]);\n\n return (\n <IconButtonWrapper {...iconButtonWrapperProps}>\n <Tooltip\n {...tooltipProps}\n content={calculatedTooltipContent}\n referenceWrapperClassName={styles.referenceWrapper}\n >\n <Button\n onClick={onClick}\n disabled={disabled}\n color={color}\n kind={kind}\n ariaLabeledBy={ariaLabeledBy}\n ariaLabel={buttonAriaLabel}\n ariaHasPopup={ariaHasPopup}\n ariaExpanded={ariaExpanded}\n ariaControls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-hidden={ariaHidden}\n aria-pressed={ariaPressed}\n ref={mergedRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.ICON_BUTTON, id)}\n noSidePadding\n active={active}\n className={className}\n style={overrideStyle}\n insetFocus={insetFocus}\n tabIndex={tabIndex}\n loading={loading}\n loaderClassName={cx(styles.loader, getStyle(styles, size))}\n >\n <Icon icon={icon} iconType=\"svg\" iconSize={iconSize} ignoreFocusStyle className={iconClassName} />\n </Button>\n </Tooltip>\n </IconButtonWrapper>\n );\n }\n);\n\nexport default withStaticProps(IconButton, {\n sizes: Button.sizes,\n kinds: Button.kinds,\n colors: Button.colors\n});\n"],"names":["withStaticProps","forwardRef","_ref","ref","className","wrapperClassName","iconClassName","id","_ref$icon","icon","AddSmall","_ref$size","size","_ref$tooltipProps","tooltipProps","tooltipContent","ariaLabeledBy","ariaLabel","ariaHasPopup","ariaExpanded","ariaControls","ariaDescribedBy","ariaHidden","ariaPressed","_ref$hideTooltip","hideTooltip","_ref$kind","kind","active","_ref$disabled","disabled","disabledReason","_ref$onClick","onClick","NOOP","color","dataTestId","_ref$insetFocus","insetFocus","tabIndex","_ref$loading","loading","componentRef","useRef","mergedRef","useMergeRef","overrideTooltipContent","useMemo","content","buttonAriaLabel","iconSize","SMALL_BUTTON_ICON_SIZE","BUTTON_ICON_SIZE","overrideStyle","style","justifyContent","alignItems","padding","Object","assign","getWidthHeight","calculatedTooltipContent","IconButtonWrapper","Fragment","iconButtonWrapperProps","cx","styles","wrapper","React","createElement","Tooltip","referenceWrapperClassName","referenceWrapper","Button","getTestId","ComponentDefaultTestId","ICON_BUTTON","noSidePadding","loaderClassName","loader","getStyle","Icon","iconType","ignoreFocusStyle","sizes","kinds","colors"],"mappings":"0zBA0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iC,kBAAiB,EAAA/E,UAAWE,MAK3F,IAGyC,CACzC8E,MAAOX,EAAOW,MACdC,MAAOZ,EAAOY,MACdC,OAAQb,EAAOa"}
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import React, { AriaAttributes, forwardRef, Fragment, useMemo, useRef } from \"react\";\nimport cx from \"classnames\";\nimport { noop as NOOP } from \"lodash-es\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport Tooltip, { TooltipProps } from \"../Tooltip/Tooltip\";\nimport Icon from \"../Icon/Icon\";\nimport { AddSmall } from \"@vibe/icons\";\nimport { getWidthHeight, Size } from \"./services/IconButton-helpers\";\nimport { SubIcon, VibeComponent, VibeComponentProps, withStaticProps } from \"../../types\";\nimport { getTestId } from \"../../tests/test-ids-utils\";\nimport { ComponentDefaultTestId, ComponentVibeId } from \"../../tests/constants\";\nimport Button from \"../Button/Button\";\nimport { BUTTON_ICON_SIZE, SMALL_BUTTON_ICON_SIZE } from \"../Button/ButtonConstants\";\nimport { ButtonColor, ButtonType } from \"../Button/Button.types\";\nimport { getStyle } from \"../../helpers/typesciptCssModulesHelper\";\nimport styles from \"./IconButton.module.scss\";\n\nexport interface IconButtonProps extends VibeComponentProps {\n /**\n * id to be added to the element\n */\n id?: string;\n /**\n * callback function when clicking the icon button\n */\n onClick?: (event: React.MouseEvent) => void;\n /**\n * the class name of the button wrapper\n */\n wrapperClassName?: string;\n /**\n * the class name of the button icon\n */\n iconClassName?: string;\n /**\n * Icon to be rendered\n */\n icon?: SubIcon;\n /**\n * element id to describe the button accordingly\n * */\n ariaLabeledBy?: string;\n /**\n * a11y property to be added, used for screen reader to know what kind of button it is\n */\n ariaLabel?: string;\n /**\n * aria for a button popup\n */\n ariaHasPopup?: React.HTMLProps<HTMLButtonElement>[\"aria-haspopup\"];\n /**\n * a11y property to be added, used for screen reader to know if the button is expanded\n */\n ariaExpanded?: boolean;\n /**\n * aria controls - receives id for the controlled region\n */\n ariaControls?: string;\n \"aria-describedby\"?: AriaAttributes[\"aria-describedby\"];\n /**\n * a11y property to be added, used for screen reader to know if the button is hidden\n */\n \"aria-hidden\"?: AriaAttributes[\"aria-hidden\"];\n /**\n * Indicates the current \"pressed\" state of toggle buttons\n */\n \"aria-pressed\"?: AriaAttributes[\"aria-pressed\"];\n /**\n * Size of the icon\n */\n size?: Size;\n /**\n * Whether the tooltip should be displayed or not\n */\n hideTooltip?: boolean;\n /**\n * Props for Tooltip component\n */\n tooltipProps?: Partial<TooltipProps>;\n /**\n * Tooltip wraps the button icon, it will display in the tooltip, if not present the aria label will be shown\n */\n tooltipContent?: string;\n /**\n * Kind of button - like Button\n */\n kind?: ButtonType;\n active?: boolean;\n /** The button's color */\n color?: ButtonColor;\n /**\n * disabled state\n */\n disabled?: boolean;\n /**\n * if disabled - this will be shown in the tooltip\n */\n disabledReason?: string;\n /** Change the focus indicator from around the button to within it */\n insetFocus?: boolean;\n /** Specifies the tab order of an element */\n tabIndex?: number;\n /** Show a loader instead of the icon */\n loading?: boolean;\n}\n\nconst IconButton: VibeComponent<IconButtonProps> & {\n sizes?: typeof Button.sizes;\n kinds?: typeof Button.kinds;\n colors?: typeof Button.colors;\n} = forwardRef(\n (\n {\n className,\n wrapperClassName,\n iconClassName,\n id,\n icon = AddSmall,\n size = \"medium\",\n tooltipProps = {} as TooltipProps,\n tooltipContent,\n ariaLabeledBy,\n ariaLabel,\n ariaHasPopup,\n ariaExpanded,\n ariaControls,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-hidden\": ariaHidden,\n \"aria-pressed\": ariaPressed,\n hideTooltip = false,\n kind = \"tertiary\",\n active,\n disabled = false,\n disabledReason,\n onClick = NOOP,\n color,\n \"data-testid\": dataTestId,\n insetFocus = false,\n tabIndex,\n loading = false\n }: IconButtonProps,\n ref\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n\n const overrideTooltipContent = useMemo(\n () => tooltipProps?.content || tooltipContent,\n [tooltipProps?.content, tooltipContent]\n );\n\n const buttonAriaLabel = useMemo(() => {\n if (ariaLabel) return ariaLabel;\n if (typeof overrideTooltipContent === \"string\") return overrideTooltipContent;\n return undefined;\n }, [ariaLabel, overrideTooltipContent]);\n\n const iconSize = useMemo(() => {\n switch (size) {\n case \"xxs\":\n case \"xs\":\n return SMALL_BUTTON_ICON_SIZE;\n case \"small\":\n case \"medium\":\n case \"large\":\n return BUTTON_ICON_SIZE;\n default:\n return 24;\n }\n }, [size]);\n\n const overrideStyle = useMemo(() => {\n let style = {\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 0\n } as React.CSSProperties;\n\n if (size) {\n style = { ...style, ...getWidthHeight(size) };\n }\n return style;\n }, [size]);\n\n const calculatedTooltipContent = useMemo(() => {\n if (hideTooltip) return null;\n if (disabled && disabledReason) return disabledReason;\n if (overrideTooltipContent) return overrideTooltipContent as never;\n return ariaLabel;\n }, [hideTooltip, disabled, disabledReason, overrideTooltipContent, ariaLabel]);\n\n const IconButtonWrapper = wrapperClassName ? \"div\" : Fragment;\n const iconButtonWrapperProps = useMemo(() => {\n return wrapperClassName ? { className: cx(wrapperClassName, styles.wrapper) } : {};\n }, [wrapperClassName]);\n\n return (\n <IconButtonWrapper {...iconButtonWrapperProps}>\n <Tooltip\n {...tooltipProps}\n content={calculatedTooltipContent}\n referenceWrapperClassName={styles.referenceWrapper}\n >\n <Button\n onClick={onClick}\n disabled={disabled}\n color={color}\n kind={kind}\n ariaLabeledBy={ariaLabeledBy}\n ariaLabel={buttonAriaLabel}\n ariaHasPopup={ariaHasPopup}\n ariaExpanded={ariaExpanded}\n ariaControls={ariaControls}\n aria-describedby={ariaDescribedBy}\n aria-hidden={ariaHidden}\n aria-pressed={ariaPressed}\n ref={mergedRef}\n id={id}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.ICON_BUTTON, id)}\n data-vibe={ComponentVibeId.ICON_BUTTON}\n noSidePadding\n active={active}\n className={className}\n style={overrideStyle}\n insetFocus={insetFocus}\n tabIndex={tabIndex}\n loading={loading}\n loaderClassName={cx(styles.loader, getStyle(styles, size))}\n >\n <Icon icon={icon} iconType=\"svg\" iconSize={iconSize} ignoreFocusStyle className={iconClassName} />\n </Button>\n </Tooltip>\n </IconButtonWrapper>\n );\n }\n);\n\nexport default withStaticProps(IconButton, {\n sizes: Button.sizes,\n kinds: Button.kinds,\n colors: Button.colors\n});\n"],"names":["withStaticProps","forwardRef","_ref","ref","className","wrapperClassName","iconClassName","id","_ref$icon","icon","AddSmall","_ref$size","size","_ref$tooltipProps","tooltipProps","tooltipContent","ariaLabeledBy","ariaLabel","ariaHasPopup","ariaExpanded","ariaControls","ariaDescribedBy","ariaHidden","ariaPressed","_ref$hideTooltip","hideTooltip","_ref$kind","kind","active","_ref$disabled","disabled","disabledReason","_ref$onClick","onClick","NOOP","color","dataTestId","_ref$insetFocus","insetFocus","tabIndex","_ref$loading","loading","componentRef","useRef","mergedRef","useMergeRef","overrideTooltipContent","useMemo","content","buttonAriaLabel","iconSize","SMALL_BUTTON_ICON_SIZE","BUTTON_ICON_SIZE","overrideStyle","style","justifyContent","alignItems","padding","Object","assign","getWidthHeight","calculatedTooltipContent","IconButtonWrapper","Fragment","iconButtonWrapperProps","cx","styles","wrapper","React","createElement","Tooltip","referenceWrapperClassName","referenceWrapper","Button","getTestId","ComponentDefaultTestId","ICON_BUTTON","ComponentVibeId","noSidePadding","loaderClassName","loader","getStyle","Icon","iconType","ignoreFocusStyle","sizes","kinds","colors"],"mappings":"+0BA0GA,IAmIeA,EAAAA,EA/HXC,GACF,SAAAC,EA8BEC,GACE,IA7BAC,EAASF,EAATE,UACAC,EAAgBH,EAAhBG,iBACAC,EAAaJ,EAAbI,cACAC,EAAEL,EAAFK,GAAEC,EAAAN,EACFO,KAAAA,OAAOC,IAAHF,EAAGE,EAAQF,EAAAG,EAAAT,EACfU,KAAAA,OAAO,IAAHD,EAAG,SAAQA,EAAAE,EAAAX,EACfY,aAAAA,OAA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xxs:"xxs_df0007d5b4"};!function(e){const n="s_id-8d1605f1f87b_3_35_0";if("undefined"!=typeof document){const r=document.head||document.getElementsByTagName("head")[0];if(r.querySelector("#"+n))return;const c=document.createElement("style");c.id=n,r.firstChild?r.insertBefore(c,r.firstChild):r.appendChild(c),c.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".wrapper_e2e9ebc10c {\n width: fit-content;\n height: fit-content;\n display: inline-flex;\n}\n\n.referenceWrapper_cb8cc1a489 {\n display: inline-flex;\n}\n\n.referenceWrapper_cb8cc1a489 button .loader_a029e813c1 {\n width: 16px;\n height: 16px;\n}\n\n.referenceWrapper_cb8cc1a489 button .loader_a029e813c1.xxs_df0007d5b4 {\n width: 10px;\n height: 10px;\n}\n\n.referenceWrapper_cb8cc1a489 button .loader_a029e813c1.xxs_df0007d5b4 svg {\n display: block;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=IconButton.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={clickable:"
|
|
1
|
+
var e={clickable:"clickable_ea8f1836f3","focus-visible":"focus-visible_eb6b496cf8",disabled:"disabled_12d0f15ef4",disableTextSelection:"disableTextSelection_3f06344baf",clickableWrapper:"clickableWrapper_ea8f1836f3",label:"label_5bce4618dc",small:"small_8205ee42c5",withLeg:"withLeg_4e034afbef",legWrapper:"legWrapper_528ef44602",kindFill:"kindFill_17071c1e95",colorPrimary:"colorPrimary_3f157c15ac",colorDark:"colorDark_c8869fa30c",colorNegative:"colorNegative_435dbf5ce4",colorPositive:"colorPositive_b60a785725",kindLine:"kindLine_8a11ff7ecd",smallText:"smallText_bd45f4b980"};!function(e){const n="s_id-4bcc4b0ff746_3_35_0";if("undefined"!=typeof document){const o=document.head||document.getElementsByTagName("head")[0];if(o.querySelector("#"+n))return;const a=document.createElement("style");a.id=n,o.firstChild?o.insertBefore(a,o.firstChild):o.appendChild(a),a.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".clickable_ea8f1836f3 {\n cursor: pointer;\n}\n.clickable_ea8f1836f3:focus-visible, .clickable_ea8f1836f3.focus-visible_eb6b496cf8 {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.clickable_ea8f1836f3:focus:not(.focus-visible_eb6b496cf8) {\n outline: none;\n}\n.clickable_ea8f1836f3.disabled_12d0f15ef4 {\n cursor: default;\n}\n.disableTextSelection_3f06344baf {\n -webkit-touch-callout: none; /* iOS Safari */ /* Safari */ /* Konqueror HTML */ /* Old versions of Firefox */ /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */\n}\n.clickableWrapper_ea8f1836f3 {\n cursor: pointer;\n}\n.clickableWrapper_ea8f1836f3:focus-visible, .clickableWrapper_ea8f1836f3.focus-visible_eb6b496cf8 {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.clickableWrapper_ea8f1836f3:focus:not(.focus-visible_eb6b496cf8) {\n outline: none;\n}\n.clickableWrapper_ea8f1836f3:active {\n transform: scale(0.95) translate3d(0, 0, 0);\n transition: var(--motion-productive-short) transform;\n}\n.label_5bce4618dc {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--border-radius-small);\n padding: 2px var(--spacing-small);\n position: relative;\n}\n.label_5bce4618dc.small_8205ee42c5 {\n padding: 0 var(--spacing-xs);\n border-radius: 2px;\n}\n.withLeg_4e034afbef {\n border-radius: var(--border-radius-small) var(--border-radius-small) var(--border-radius-small) 0;\n}\n.legWrapper_528ef44602 {\n position: absolute;\n height: 8px;\n top: 100%;\n left: 0;\n display: inline-flex;\n}\n.kindFill_17071c1e95.colorPrimary_3f157c15ac {\n background-color: var(--primary-color);\n}\n.kindFill_17071c1e95.colorPrimary_3f157c15ac svg path {\n fill: var(--primary-color);\n}\n.kindFill_17071c1e95.colorPrimary_3f157c15ac.clickable_ea8f1836f3:hover, .kindFill_17071c1e95.colorPrimary_3f157c15ac.clickable_ea8f1836f3:active {\n background-color: var(--primary-hover-color);\n}\n.kindFill_17071c1e95.colorDark_c8869fa30c {\n background-color: var(--inverted-color-background);\n}\n.kindFill_17071c1e95.colorDark_c8869fa30c svg path {\n fill: var(--inverted-color-background);\n}\n.kindFill_17071c1e95.colorNegative_435dbf5ce4 {\n background-color: var(--negative-color);\n}\n.kindFill_17071c1e95.colorNegative_435dbf5ce4 svg path {\n fill: var(--negative-color);\n}\n.kindFill_17071c1e95.colorNegative_435dbf5ce4.clickable_ea8f1836f3:hover, .kindFill_17071c1e95.colorNegative_435dbf5ce4.clickable_ea8f1836f3:active {\n background-color: var(--negative-color-hover);\n}\n.kindFill_17071c1e95.colorPositive_b60a785725 {\n background-color: var(--positive-color);\n}\n.kindFill_17071c1e95.colorPositive_b60a785725 svg path {\n fill: var(--positive-color);\n}\n.kindFill_17071c1e95.colorPositive_b60a785725.clickable_ea8f1836f3:hover, .kindFill_17071c1e95.colorPositive_b60a785725.clickable_ea8f1836f3:active {\n background-color: var(--positive-color-hover);\n}\n.kindLine_8a11ff7ecd {\n border: 1px solid currentColor;\n padding: 1px var(--spacing-small);\n}\n.kindLine_8a11ff7ecd .legWrapper_528ef44602 {\n left: -1px;\n top: calc(100% + 1px);\n}\n.kindLine_8a11ff7ecd.colorPrimary_3f157c15ac {\n color: var(--primary-color);\n}\n.kindLine_8a11ff7ecd.colorPrimary_3f157c15ac svg path {\n fill: var(--primary-color);\n}\n.kindLine_8a11ff7ecd.colorPrimary_3f157c15ac.clickable_ea8f1836f3:hover, .kindLine_8a11ff7ecd.colorPrimary_3f157c15ac.clickable_ea8f1836f3:active {\n background-color: var(--primary-background-hover-color);\n}\n.kindLine_8a11ff7ecd.colorDark_c8869fa30c {\n color: var(--inverted-color-background);\n}\n.kindLine_8a11ff7ecd.colorDark_c8869fa30c svg path {\n fill: var(--inverted-color-background);\n}\n.kindLine_8a11ff7ecd.colorDark_c8869fa30c.clickable_ea8f1836f3:hover, .kindLine_8a11ff7ecd.colorDark_c8869fa30c.clickable_ea8f1836f3:active {\n background-color: var(--primary-background-hover-color);\n}\n.kindLine_8a11ff7ecd.colorNegative_435dbf5ce4 {\n color: var(--negative-color);\n}\n.kindLine_8a11ff7ecd.colorNegative_435dbf5ce4 svg path {\n fill: var(--negative-color);\n}\n.kindLine_8a11ff7ecd.colorNegative_435dbf5ce4.clickable_ea8f1836f3:hover, .kindLine_8a11ff7ecd.colorNegative_435dbf5ce4.clickable_ea8f1836f3:active {\n background-color: var(--negative-color-selected);\n}\n.kindLine_8a11ff7ecd.colorPositive_b60a785725 {\n color: var(--positive-color);\n}\n.kindLine_8a11ff7ecd.colorPositive_b60a785725 svg path {\n fill: var(--positive-color);\n}\n.kindLine_8a11ff7ecd.colorPositive_b60a785725.clickable_ea8f1836f3:hover, .kindLine_8a11ff7ecd.colorPositive_b60a785725.clickable_ea8f1836f3:active {\n background-color: var(--positive-color-selected);\n}\n.kindLine_8a11ff7ecd .smallText_bd45f4b980 {\n line-height: 14px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=Label.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={celebration:"
|
|
1
|
+
var e={celebration:"celebration_27f3b26387",svg:"svg_da41159a2f",stroke:"stroke_275590381e","stroke-rotate":"stroke-rotate_3dff3e8a20",base:"base_42fc58dc01",fade:"fade_da0ad7f568",first:"first_c30fa69dc5",second:"second_24455b5417",third:"third_d278365f25","gradient-text-fill":"gradient-text-fill_ff2045c6e5"};!function(e){const n="s_id-cc5df975abc6_3_35_0";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+n))return;const t=document.createElement("style");t.id=n,a.firstChild?a.insertBefore(t,a.firstChild):a.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".celebration_27f3b26387 {\n --container-perimeter: 840;\n position: relative;\n}\n.celebration_27f3b26387 .svg_da41159a2f {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n}\n.celebration_27f3b26387 .svg_da41159a2f .stroke_275590381e {\n fill: none;\n stroke-width: 1;\n stroke-linecap: round;\n stroke-linejoin: round;\n animation: stroke-rotate_3dff3e8a20 cubic-bezier(0.33, 0, 0.67, 1) forwards;\n stroke-dasharray: var(--container-perimeter);\n stroke-dashoffset: var(--container-perimeter);\n}\n.celebration_27f3b26387 .svg_da41159a2f .stroke_275590381e.base_42fc58dc01 {\n stroke: var(--color-egg_yolk);\n animation: fade_da0ad7f568 200ms linear forwards;\n animation-delay: 80ms;\n stroke-dasharray: 0;\n stroke-dashoffset: 0;\n opacity: 0;\n}\n.celebration_27f3b26387 .svg_da41159a2f .stroke_275590381e.first_c30fa69dc5 {\n stroke: var(--color-done-green);\n animation-delay: 80ms;\n animation-duration: 320ms;\n}\n.celebration_27f3b26387 .svg_da41159a2f .stroke_275590381e.second_24455b5417 {\n stroke: var(--color-stuck-red);\n animation-delay: 200ms;\n animation-duration: 320ms;\n}\n.celebration_27f3b26387 .svg_da41159a2f .stroke_275590381e.third_d278365f25 {\n stroke: var(--primary-color);\n animation-delay: 360ms;\n animation-duration: 320ms;\n}\n.celebration_27f3b26387.celebration_27f3b26387 [data-celebration-text] {\n background-size: 300% 100%;\n background-repeat: no-repeat;\n background-clip: text;\n -webkit-background-clip: text;\n color: transparent;\n animation: gradient-text-fill_ff2045c6e5 680ms linear forwards;\n background-image: linear-gradient(to right, var(--primary-color) 30%, var(--color-stuck-red) 40%, var(--color-done-green) 60%, var(--color-egg_yolk) 85%, transparent 90%);\n}\n@keyframes fade_da0ad7f568 {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes stroke-rotate_3dff3e8a20 {\n to {\n stroke-dashoffset: 0;\n }\n}\n@keyframes gradient-text-fill_ff2045c6e5 {\n from {\n background-position: 150% 0;\n }\n to {\n background-position: 0% 0;\n }\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=LabelCelebrationAnimation.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var n={container:"
|
|
1
|
+
var n={container:"container_3892b25086",overlay:"overlay_56b3744fcf","overlay-fade-out":"overlay-fade-out_c215973e51","overlay-fade-in":"overlay-fade-in_da0ad7f568",dialog:"dialog_74b23e926a",default:"default_1e498694d9",full:"full_0937788ceb",spacing:"spacing_342851ec25"};!function(n){const e="s_id-fe267e23c74c_3_35_0";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+e))return;const o=document.createElement("style");o.id=e,a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}(".container_3892b25086,\n.overlay_56b3744fcf {\n position: fixed;\n inset: 0;\n}\n\n.container_3892b25086 {\n --monday-modal-z-index: 10000;\n z-index: var(--monday-modal-z-index);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.container_3892b25086[aria-hidden=true] {\n display: none;\n}\n\n.container_3892b25086[aria-hidden=true] .overlay_56b3744fcf {\n background-color: transparent;\n animation: overlay-fade-out_c215973e51 70ms var(--motion-timing-enter);\n}\n\n.overlay_56b3744fcf {\n background-color: rgba(41, 47, 76, 0.7);\n animation: overlay-fade-in_da0ad7f568 70ms var(--motion-timing-enter);\n}\n\n.dialog_74b23e926a {\n display: flex;\n position: relative;\n flex-direction: column;\n padding-block: var(--spacing-large);\n padding-inline: var(--spacing-xl);\n border-radius: var(--border-radius-big);\n box-shadow: var(--box-shadow-large);\n background-color: var(--secondary-background-color);\n max-height: 90vh;\n max-width: 90vw;\n}\n\n.dialog_74b23e926a.default_1e498694d9 {\n width: 520px;\n}\n\n.dialog_74b23e926a.full_0937788ceb {\n width: 100vw;\n}\n\n.dialog_74b23e926a.spacing_342851ec25 {\n gap: var(--spacing-medium);\n}\n\n@keyframes overlay-fade-in_da0ad7f568 {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes overlay-fade-out_c215973e51 {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}");export{n as default};
|
|
2
2
|
//# sourceMappingURL=LegacyModal.module.scss.js.map
|
package/dist/src/components/LegacyModal/LegacyModalContent/LegacyModalContent.module.scss.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={container:"
|
|
1
|
+
var e={container:"container_c4c2f825ec"};!function(e){const n="s_id-40a1f8a37338_3_35_0";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const c=document.createElement("style");c.id=n,t.firstChild?t.insertBefore(c,t.firstChild):t.appendChild(c),c.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".container_c4c2f825ec {\n flex-grow: 1;\n overflow: auto;\n}\n.container_c4c2f825ec::-webkit-scrollbar {\n width: 4px;\n height: 6px;\n}\n.container_c4c2f825ec::-webkit-scrollbar-thumb {\n background-color: var(--ui-border-color);\n border-radius: 4px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=LegacyModalContent.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={container:"
|
|
1
|
+
var e={container:"container_ef87c6010d"};!function(e){const t="s_id-9ff7e713f88b_3_35_0";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,n.firstChild?n.insertBefore(d,n.firstChild):n.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".container_ef87c6010d {\n margin-block-start: var(--spacing-large);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=LegacyModalFooter.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e={container:"container_b937cf24a7",icon:"icon_4b4f8ae184",description:"description_c8ece0d2b9",closeButton:"closeButton_94471bef24"};!function(e){const n="s_id-f34f7b91e8f3_3_35_0";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const o=document.createElement("style");o.id=n,t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".container_b937cf24a7 {\n margin-block-start: var(--spacing-medium);\n}\n.container_b937cf24a7 .icon_4b4f8ae184 {\n margin-top: var(--spacing-xs);\n flex-shrink: 0;\n color: var(--primary-text-color);\n}\n.container_b937cf24a7 .description_c8ece0d2b9 {\n margin-block-start: var(--spacing-small);\n color: var(--secondary-text-color);\n}\n.container_b937cf24a7 .closeButton_94471bef24 {\n position: absolute;\n right: 20px;\n top: 20px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=LegacyModalHeader.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var n={link:"
|
|
1
|
+
var n={link:"link_b9a2918068","focus-visible":"focus-visible_eb6b496cf8",colorOnPrimary:"colorOnPrimary_5744ef2742",colorOnInverted:"colorOnInverted_4db6d8f7b0",text:"text_f837cf49c7",inlineText:"inlineText_d6ee4f3511",inheritFontSize:"inheritFontSize_fc32c2006c",iconStart:"iconStart_6d54e4fcc5",iconEnd:"iconEnd_529f7f1654"};!function(n){const e="s_id-6fcc93dacbaa_3_35_0";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+e))return;const t=document.createElement("style");t.id=e,i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t),t.appendChild(document.createTextNode(n))}else globalThis.injectedStyles&&(globalThis.injectedStyles[e]=n)}(".link_b9a2918068 {\n display: flex;\n align-items: center;\n color: var(--link-color);\n font: var(--font-text2-normal);\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n text-decoration: none;\n writing-mode: horizontal-tb;\n}\n.link_b9a2918068:focus-visible, .link_b9a2918068.focus-visible_eb6b496cf8 {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5), 0 0 0 1px var(--primary-hover-color) inset;\n}\n.link_b9a2918068:focus:not(.focus-visible_eb6b496cf8) {\n outline: none;\n}\n.link_b9a2918068.colorOnPrimary_5744ef2742 {\n color: var(--text-color-on-primary);\n}\n.link_b9a2918068.colorOnInverted_4db6d8f7b0 {\n color: var(--text-color-on-inverted);\n}\n.link_b9a2918068:hover .text_f837cf49c7 {\n text-decoration: underline;\n color: inherit;\n}\n.link_b9a2918068.inlineText_d6ee4f3511 {\n display: inline-flex;\n align-items: unset;\n}\n.link_b9a2918068.inheritFontSize_fc32c2006c {\n font-size: inherit;\n line-height: inherit;\n}\n.iconStart_6d54e4fcc5 {\n line-height: 24px;\n margin-right: var(--spacing-small);\n}\n.iconEnd_529f7f1654 {\n line-height: 24px;\n margin-left: var(--spacing-small);\n}\n@supports (margin-inline-start: initial) {\n .iconStart_6d54e4fcc5 {\n line-height: 24px;\n margin-right: 0;\n margin-inline-end: var(--spacing-xs);\n }\n .iconEnd_529f7f1654 {\n line-height: 24px;\n margin-left: 0;\n margin-inline-start: var(--spacing-xs);\n }\n}");export{n as default};
|
|
2
2
|
//# sourceMappingURL=Link.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{slicedToArray as
|
|
1
|
+
import{slicedToArray as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import e from"classnames";import r,{forwardRef as i,useRef as o,useState as n,useCallback as s,useEffect as a,useMemo as l}from"react";import c from"../../hooks/useMergeRef.js";import u from"../../hooks/useKeyEvent/index.js";import{VirtualizedListItems as m}from"./VirtualizedListItems/VirtualizedListItems.js";import{keyCodes as d,UP_DOWN_ARROWS as f}from"../../constants/keyCodes.js";import{withStaticProps as p}from"../../types/withStaticProps.js";import"../../utils/colors-vars-map.js";import{ListWrapperComponentType as v}from"./ListConstants.js";import{getTestId as b,ComponentDefaultTestId as y}from"../../tests/testIds.js";import{ListContext as j}from"./utils/ListContext.js";import{useListId as I,getListItemIndexById as L,getNextListItemIndex as x,getPrevListItemIndex as h,getListItemIdByIndex as k,isListItem as A,getListItemComponentType as E}from"./utils/ListUtils.js";import g from"./List.module.scss.js";import{ComponentVibeId as R}from"../../tests/constants.js";var C=i((function(i,p){var v=i.className,O=i.id,P=i.component,T=void 0===P?C.components.UL:P,V=i.children,_=i.ariaLabel,D=i.ariaDescribedBy,N=i["aria-controls"],S=i.renderOnlyVisibleItems,U=void 0!==S&&S,W=i.style,z=i.role,B=void 0===z?"listbox":z,H=i["data-testid"],M=o(null),w=c(p,M),F=o([]),K=I(O),q=n(0),G=t(q,2),J=G[0],Q=G[1],X=T,Y=s((function(t){var e;Q(L(F,t)),null===(e=null==M?void 0:M.current)||void 0===e||e.setAttribute("aria-activedescendant",t)}),[]),Z=s((function(t){if(!U){t.preventDefault();var e=t.key===d.UP_ARROW,r=void 0;t.key===d.DOWN_ARROW&&F.current.length>J+1?r=x(J,F):e&&J>0&&(r=h(J,F)),void 0!==r&&(Y(k(F,r)),F.current[r].focus())}}),[J,U,Y]);u({keys:f,callback:Z,ref:M}),a((function(){var t=F.current.findIndex((function(t){return t instanceof HTMLElement&&A(t)&&"true"===(null==t?void 0:t.getAttribute("aria-selected"))}));if(-1!==t)Y(k(F,t));else{var e=F.current.findIndex((function(t){return A(t)}));-1!==e&&Y(k(F,e))}}),[Y]);var $=l((function(){var t=Array.isArray(V)?V:[V];return U?t=r.createElement(m,null,t):(F.current=F.current.slice(0,t.length),t=r.Children.map(t,(function(t,e){if(!r.isValidElement(t))return t;var i=t.props.id||"".concat(K,"-item-").concat(e),o=F.current[e],n=null==o||A(o);return r.cloneElement(t,{ref:function(t){return F.current[e]=t},tabIndex:J===e&&n?0:-1,id:i,component:E(T),role:t.props.role})}))),t}),[V,T,J,K,U]);return r.createElement(j.Provider,{value:{updateFocusedItem:Y}},r.createElement(X,{"data-testid":H||b(y.LIST,O),"data-vibe":R.LIST,ref:w,style:W,className:e(g.list,v),id:K,"aria-label":_,"aria-describedby":D,"aria-controls":N,tabIndex:-1,role:B},$))})),O=p(C,{components:v});export{O as default};
|
|
2
2
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../src/components/List/List.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n AriaAttributes,\n AriaRole,\n CSSProperties,\n forwardRef,\n ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport useKeyEvent from \"../../hooks/useKeyEvent\";\nimport { VirtualizedListItems } from \"./VirtualizedListItems/VirtualizedListItems\";\nimport { keyCodes, UP_DOWN_ARROWS } from \"../../constants/keyCodes\";\nimport { VibeComponent, withStaticProps, VibeComponentProps } from \"../../types\";\nimport { ListItemProps } from \"../ListItem/ListItem\";\nimport { ListTitleProps } from \"../ListTitle/ListTitle\";\nimport { ListWrapperComponentType as ListWrapperComponentTypeEnum } from \"./ListConstants\";\nimport { ListElement } from \"./List.types\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport { ListContext } from \"./utils/ListContext\";\nimport {\n getListItemComponentType,\n getListItemIdByIndex,\n getListItemIndexById,\n getNextListItemIndex,\n getPrevListItemIndex,\n isListItem,\n useListId\n} from \"./utils/ListUtils\";\nimport styles from \"./List.module.scss\";\n\nexport interface ListProps extends VibeComponentProps {\n /**\n * the wrapping component to wrap the List Items [div, nav, ul, ol]\n */\n component?: ListElement;\n /**\n * ARIA label string to describe to list\n */\n ariaLabel?: string;\n /**\n * ARIA described by string to reference an id to describe by\n */\n ariaDescribedBy?: string;\n \"aria-controls\"?: AriaAttributes[\"aria-controls\"];\n children?: ReactElement<ListItemProps | ListTitleProps> | ReactElement<ListItemProps | ListTitleProps>[];\n /**\n * Using virtualized list for rendering only the items which visible to the user in any given user (performance optimization)\n */\n renderOnlyVisibleItems?: boolean;\n style?: CSSProperties;\n /**\n * ARIA role for the list.\n */\n role?: AriaRole;\n}\n\nconst List: VibeComponent<ListProps> & {\n components?: typeof ListWrapperComponentTypeEnum;\n} = forwardRef(\n (\n {\n className,\n id,\n component = List.components.UL,\n children,\n ariaLabel,\n ariaDescribedBy,\n \"aria-controls\": ariaControls,\n renderOnlyVisibleItems = false,\n style,\n role = \"listbox\",\n \"data-testid\": dataTestId\n }: ListProps,\n ref\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n const childrenRefs: React.MutableRefObject<HTMLElement[]> = useRef([]);\n\n const overrideId = useListId(id);\n const [focusIndex, setFocusIndex] = useState(0);\n const Component = component;\n\n const updateFocusedItem = useCallback((id: string) => {\n setFocusIndex(getListItemIndexById(childrenRefs, id));\n componentRef?.current?.setAttribute(\"aria-activedescendant\", id);\n }, []);\n\n const onUpDownArrows = useCallback(\n (event: KeyboardEvent) => {\n if (renderOnlyVisibleItems) {\n return;\n }\n event.preventDefault();\n\n const isUpKey = event.key === keyCodes.UP_ARROW;\n const isDownKey = event.key === keyCodes.DOWN_ARROW;\n let overrideFocusIndex = undefined;\n\n if (isDownKey && focusIndex + 1 < childrenRefs.current.length) {\n overrideFocusIndex = getNextListItemIndex(focusIndex, childrenRefs);\n } else if (isUpKey && focusIndex > 0) {\n overrideFocusIndex = getPrevListItemIndex(focusIndex, childrenRefs);\n }\n if (overrideFocusIndex !== undefined) {\n updateFocusedItem(getListItemIdByIndex(childrenRefs, overrideFocusIndex));\n childrenRefs.current[overrideFocusIndex].focus();\n }\n },\n [focusIndex, renderOnlyVisibleItems, updateFocusedItem]\n );\n\n useKeyEvent({\n keys: UP_DOWN_ARROWS,\n callback: onUpDownArrows,\n ref: componentRef\n });\n\n useEffect(() => {\n const selectedItemIndex = childrenRefs.current.findIndex(\n child => child instanceof HTMLElement && isListItem(child) && child?.getAttribute(\"aria-selected\") === \"true\"\n );\n if (selectedItemIndex !== -1) {\n updateFocusedItem(getListItemIdByIndex(childrenRefs, selectedItemIndex));\n } else {\n const firstFocusableIndex = childrenRefs.current.findIndex(child => isListItem(child));\n if (firstFocusableIndex !== -1) {\n updateFocusedItem(getListItemIdByIndex(childrenRefs, firstFocusableIndex));\n }\n }\n }, [updateFocusedItem]);\n\n const overrideChildren = useMemo(() => {\n let override: ReactElement | ReactElement[] = Array.isArray(children) ? children : [children];\n if (renderOnlyVisibleItems) {\n override = <VirtualizedListItems>{override}</VirtualizedListItems>;\n } else {\n childrenRefs.current = childrenRefs.current.slice(0, override.length);\n override = React.Children.map(override, (child, index) => {\n if (!React.isValidElement(child)) {\n return child;\n }\n const id = (child.props as ListItemProps).id || `${overrideId}-item-${index}`;\n const currentRef = childrenRefs.current[index];\n const isFocusableItem = currentRef === undefined || currentRef === null || isListItem(currentRef);\n return React.cloneElement(child, {\n // @ts-ignore not sure how to deal with ref here\n ref: ref => (childrenRefs.current[index] = ref),\n tabIndex: focusIndex === index && isFocusableItem ? 0 : -1,\n id,\n component: getListItemComponentType(component),\n role: (child.props as ListItemProps).role\n });\n });\n }\n\n return override;\n }, [children, component, focusIndex, overrideId, renderOnlyVisibleItems]);\n\n return (\n <ListContext.Provider value={{ updateFocusedItem }}>\n <Component\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.LIST, id)}\n ref={mergedRef}\n style={style}\n className={cx(styles.list, className)}\n id={overrideId}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n aria-controls={ariaControls}\n tabIndex={-1}\n role={role}\n >\n {overrideChildren}\n </Component>\n </ListContext.Provider>\n );\n }\n);\n\nexport default withStaticProps(List, {\n components: ListWrapperComponentTypeEnum\n});\n"],"names":["List","forwardRef","_ref","ref","className","id","_ref$component","component","components","UL","children","ariaLabel","ariaDescribedBy","ariaControls","_ref$renderOnlyVisibl","renderOnlyVisibleItems","style","_ref$role","role","dataTestId","componentRef","useRef","mergedRef","useMergeRef","childrenRefs","overrideId","useListId","_useState","useState","_useState2","_slicedToArray","focusIndex","setFocusIndex","Component","updateFocusedItem","useCallback","getListItemIndexById","_a","current","setAttribute","onUpDownArrows","event","preventDefault","isUpKey","key","keyCodes","UP_ARROW","overrideFocusIndex","undefined","DOWN_ARROW","length","getNextListItemIndex","getPrevListItemIndex","getListItemIdByIndex","focus","useKeyEvent","keys","UP_DOWN_ARROWS","callback","useEffect","selectedItemIndex","findIndex","child","HTMLElement","isListItem","getAttribute","firstFocusableIndex","overrideChildren","useMemo","override","Array","isArray","React","createElement","VirtualizedListItems","slice","Children","map","index","isValidElement","props","concat","currentRef","isFocusableItem","cloneElement","_ref2","tabIndex","getListItemComponentType","ListContext","Provider","value","getTestId","ComponentDefaultTestId","LIST","cx","styles","list","withStaticProps","ListWrapperComponentTypeEnum"],"mappings":"u+BA6DA,IAAMA,EAEFC,GACF,SAAAC,EAcEC,GACE,IAbAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,UAAAA,OAAYP,IAAHM,EAAGN,EAAKQ,WAAWC,GAAEH,EAC9BI,EAAQR,EAARQ,SACAC,EAAST,EAATS,UACAC,EAAeV,EAAfU,gBACiBC,EAAYX,EAA7B,iBAAeY,EAAAZ,EACfa,uBAAAA,OAAyB,IAAHD,GAAQA,EAC9BE,EAAKd,EAALc,MAAKC,EAAAf,EACLgB,KAAAA,OAAO,IAAHD,EAAG,UAASA,EACDE,EAAUjB,EAAzB,eAIIkB,EAAeC,EAAO,MACtBC,EAAYC,EAAYpB,EAAKiB,GAC7BI,EAAsDH,EAAO,IAE7DI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WG,EAACC,cAAAC,EAAsB,KAAAL,IAElC7C,EAAac,QAAUd,EAAac,QAAQqC,MAAM,EAAGN,EAASnB,QAC9DmB,EAAWG,EAAMI,SAASC,IAAIR,GAAU,SAACP,EAAOgB,GAC9C,IAAKN,EAAMO,eAAejB,GACxB,OAAOA,EAET,IAAMzD,EAAMyD,EAAMkB,MAAwB3E,IAAE4E,GAAAA,OAAOxD,EAAU,UAAAwD,OAASH,GAChEI,EAAa1D,EAAac,QAAQwC,GAClCK,EAAkBD,SAAmDlB,EAAWkB,GACtF,OAAOV,EAAMY,aAAatB,EAAO,CAE/B3D,IAAK,SAAGkF,GAAA,OAAK7D,EAAac,QAAQwC,GAAS3E,CAAI,EAC/CmF,SAAUvD,IAAe+C,GAASK,EAAkB,GAAK,EACzD9E,GAAAA,EACAE,UAAWgF,EAAyBhF,GACpCW,KAAO4C,EAAMkB,MAAwB9D,MAEzC,KAGKmD,CACT,GAAG,CAAC3D,EAAUH,EAAWwB,EAAYN,EAAYV,IAEjD,OACEyD,EAACC,cAAAe,EAAYC,UAASC,MAAO,CAAExD,kBAAAA,IAC7BsC,EAACC,cAAAxC,EACc,CAAA,cAAAd,GAAcwE,EAAUC,EAAuBC,KAAMxF,GAClEF,IAAKmB,EACLN,MAAOA,EACPZ,UAAW0F,EAAGC,EAAOC,KAAM5F,GAC3BC,GAAIoB,EAAU,aACFd,EAAS,mBACHC,EAAe,gBAClBC,EACfyE,UAAW,EACXpE,KAAMA,GAELiD,GAIT,IAGa8B,EAAAA,EAAgBjG,EAAM,CACnCQ,WAAY0F"}
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../src/components/List/List.tsx"],"sourcesContent":["import cx from \"classnames\";\nimport React, {\n AriaAttributes,\n AriaRole,\n CSSProperties,\n forwardRef,\n ReactElement,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState\n} from \"react\";\nimport useMergeRef from \"../../hooks/useMergeRef\";\nimport useKeyEvent from \"../../hooks/useKeyEvent\";\nimport { VirtualizedListItems } from \"./VirtualizedListItems/VirtualizedListItems\";\nimport { keyCodes, UP_DOWN_ARROWS } from \"../../constants/keyCodes\";\nimport { VibeComponent, withStaticProps, VibeComponentProps } from \"../../types\";\nimport { ListItemProps } from \"../ListItem/ListItem\";\nimport { ListTitleProps } from \"../ListTitle/ListTitle\";\nimport { ListWrapperComponentType as ListWrapperComponentTypeEnum } from \"./ListConstants\";\nimport { ListElement } from \"./List.types\";\nimport { ComponentDefaultTestId, getTestId } from \"../../tests/test-ids-utils\";\nimport { ListContext } from \"./utils/ListContext\";\nimport {\n getListItemComponentType,\n getListItemIdByIndex,\n getListItemIndexById,\n getNextListItemIndex,\n getPrevListItemIndex,\n isListItem,\n useListId\n} from \"./utils/ListUtils\";\nimport styles from \"./List.module.scss\";\nimport { ComponentVibeId } from \"../../tests/constants\";\n\nexport interface ListProps extends VibeComponentProps {\n /**\n * the wrapping component to wrap the List Items [div, nav, ul, ol]\n */\n component?: ListElement;\n /**\n * ARIA label string to describe to list\n */\n ariaLabel?: string;\n /**\n * ARIA described by string to reference an id to describe by\n */\n ariaDescribedBy?: string;\n \"aria-controls\"?: AriaAttributes[\"aria-controls\"];\n children?: ReactElement<ListItemProps | ListTitleProps> | ReactElement<ListItemProps | ListTitleProps>[];\n /**\n * Using virtualized list for rendering only the items which visible to the user in any given user (performance optimization)\n */\n renderOnlyVisibleItems?: boolean;\n style?: CSSProperties;\n /**\n * ARIA role for the list.\n */\n role?: AriaRole;\n}\n\nconst List: VibeComponent<ListProps> & {\n components?: typeof ListWrapperComponentTypeEnum;\n} = forwardRef(\n (\n {\n className,\n id,\n component = List.components.UL,\n children,\n ariaLabel,\n ariaDescribedBy,\n \"aria-controls\": ariaControls,\n renderOnlyVisibleItems = false,\n style,\n role = \"listbox\",\n \"data-testid\": dataTestId\n }: ListProps,\n ref\n ) => {\n const componentRef = useRef(null);\n const mergedRef = useMergeRef(ref, componentRef);\n const childrenRefs: React.MutableRefObject<HTMLElement[]> = useRef([]);\n\n const overrideId = useListId(id);\n const [focusIndex, setFocusIndex] = useState(0);\n const Component = component;\n\n const updateFocusedItem = useCallback((id: string) => {\n setFocusIndex(getListItemIndexById(childrenRefs, id));\n componentRef?.current?.setAttribute(\"aria-activedescendant\", id);\n }, []);\n\n const onUpDownArrows = useCallback(\n (event: KeyboardEvent) => {\n if (renderOnlyVisibleItems) {\n return;\n }\n event.preventDefault();\n\n const isUpKey = event.key === keyCodes.UP_ARROW;\n const isDownKey = event.key === keyCodes.DOWN_ARROW;\n let overrideFocusIndex = undefined;\n\n if (isDownKey && focusIndex + 1 < childrenRefs.current.length) {\n overrideFocusIndex = getNextListItemIndex(focusIndex, childrenRefs);\n } else if (isUpKey && focusIndex > 0) {\n overrideFocusIndex = getPrevListItemIndex(focusIndex, childrenRefs);\n }\n if (overrideFocusIndex !== undefined) {\n updateFocusedItem(getListItemIdByIndex(childrenRefs, overrideFocusIndex));\n childrenRefs.current[overrideFocusIndex].focus();\n }\n },\n [focusIndex, renderOnlyVisibleItems, updateFocusedItem]\n );\n\n useKeyEvent({\n keys: UP_DOWN_ARROWS,\n callback: onUpDownArrows,\n ref: componentRef\n });\n\n useEffect(() => {\n const selectedItemIndex = childrenRefs.current.findIndex(\n child => child instanceof HTMLElement && isListItem(child) && child?.getAttribute(\"aria-selected\") === \"true\"\n );\n if (selectedItemIndex !== -1) {\n updateFocusedItem(getListItemIdByIndex(childrenRefs, selectedItemIndex));\n } else {\n const firstFocusableIndex = childrenRefs.current.findIndex(child => isListItem(child));\n if (firstFocusableIndex !== -1) {\n updateFocusedItem(getListItemIdByIndex(childrenRefs, firstFocusableIndex));\n }\n }\n }, [updateFocusedItem]);\n\n const overrideChildren = useMemo(() => {\n let override: ReactElement | ReactElement[] = Array.isArray(children) ? children : [children];\n if (renderOnlyVisibleItems) {\n override = <VirtualizedListItems>{override}</VirtualizedListItems>;\n } else {\n childrenRefs.current = childrenRefs.current.slice(0, override.length);\n override = React.Children.map(override, (child, index) => {\n if (!React.isValidElement(child)) {\n return child;\n }\n const id = (child.props as ListItemProps).id || `${overrideId}-item-${index}`;\n const currentRef = childrenRefs.current[index];\n const isFocusableItem = currentRef === undefined || currentRef === null || isListItem(currentRef);\n return React.cloneElement(child, {\n // @ts-ignore not sure how to deal with ref here\n ref: ref => (childrenRefs.current[index] = ref),\n tabIndex: focusIndex === index && isFocusableItem ? 0 : -1,\n id,\n component: getListItemComponentType(component),\n role: (child.props as ListItemProps).role\n });\n });\n }\n\n return override;\n }, [children, component, focusIndex, overrideId, renderOnlyVisibleItems]);\n\n return (\n <ListContext.Provider value={{ updateFocusedItem }}>\n <Component\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.LIST, id)}\n data-vibe={ComponentVibeId.LIST}\n ref={mergedRef}\n style={style}\n className={cx(styles.list, className)}\n id={overrideId}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n aria-controls={ariaControls}\n tabIndex={-1}\n role={role}\n >\n {overrideChildren}\n </Component>\n </ListContext.Provider>\n );\n }\n);\n\nexport default withStaticProps(List, {\n components: ListWrapperComponentTypeEnum\n});\n"],"names":["List","forwardRef","_ref","ref","className","id","_ref$component","component","components","UL","children","ariaLabel","ariaDescribedBy","ariaControls","_ref$renderOnlyVisibl","renderOnlyVisibleItems","style","_ref$role","role","dataTestId","componentRef","useRef","mergedRef","useMergeRef","childrenRefs","overrideId","useListId","_useState","useState","_useState2","_slicedToArray","focusIndex","setFocusIndex","Component","updateFocusedItem","useCallback","getListItemIndexById","_a","current","setAttribute","onUpDownArrows","event","preventDefault","isUpKey","key","keyCodes","UP_ARROW","overrideFocusIndex","undefined","DOWN_ARROW","length","getNextListItemIndex","getPrevListItemIndex","getListItemIdByIndex","focus","useKeyEvent","keys","UP_DOWN_ARROWS","callback","useEffect","selectedItemIndex","findIndex","child","HTMLElement","isListItem","getAttribute","firstFocusableIndex","overrideChildren","useMemo","override","Array","isArray","React","createElement","VirtualizedListItems","slice","Children","map","index","isValidElement","props","concat","currentRef","isFocusableItem","cloneElement","_ref2","tabIndex","getListItemComponentType","ListContext","Provider","value","getTestId","ComponentDefaultTestId","LIST","ComponentVibeId","cx","styles","list","withStaticProps","ListWrapperComponentTypeEnum"],"mappings":"kiCA8DA,IAAMA,EAEFC,GACF,SAAAC,EAcEC,GACE,IAbAC,EAASF,EAATE,UACAC,EAAEH,EAAFG,GAAEC,EAAAJ,EACFK,UAAAA,OAAYP,IAAHM,EAAGN,EAAKQ,WAAWC,GAAEH,EAC9BI,EAAQR,EAARQ,SACAC,EAAST,EAATS,UACAC,EAAeV,EAAfU,gBACiBC,EAAYX,EAA7B,iBAAeY,EAAAZ,EACfa,uBAAAA,OAAyB,IAAHD,GAAQA,EAC9BE,EAAKd,EAALc,MAAKC,EAAAf,EACLgB,KAAAA,OAAO,IAAHD,EAAG,UAASA,EACDE,EAAUjB,EAAzB,eAIIkB,EAAeC,EAAO,MACtBC,EAAYC,EAAYpB,EAAKiB,GAC7BI,EAAsDH,EAAO,IAE7DI,EAAaC,EAAUrB,GAC7BsB,EAAoCC,EAAS,GAAEC,EAAAC,EAAAH,EAAA,GAAxCI,EAAUF,EAAA,GAAEG,EAAaH,EAAA,GAC1BI,EAAY1B,EAEZ2B,EAAoBC,GAAY,SAAC9B,SACrC2B,EAAcI,EAAqBZ,EAAcnB,IAC1B,QAAvBgC,EAAAjB,aAAY,EAAZA,EAAckB,eAAS,IAAAD,GAAAA,EAAAE,aAAa,wBAAyBlC,EAC9D,GAAE,IAEGmC,EAAiBL,GACrB,SAACM,GACC,IAAI1B,EAAJ,CAGA0B,EAAMC,iBAEN,IAAMC,EAAUF,EAAMG,MAAQC,EAASC,SAEnCC,OAAqBC,EADPP,EAAMG,MAAQC,EAASI,YAGPzB,EAAac,QAAQY,OAAtCnB,EAAa,EAC5BgB,EAAqBI,EAAqBpB,EAAYP,GAC7CmB,GAAWZ,EAAa,IACjCgB,EAAqBK,EAAqBrB,EAAYP,SAE7BwB,IAAvBD,IACFb,EAAkBmB,EAAqB7B,E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AEjD,OACEyD,EAACC,cAAAe,EAAYC,UAASC,MAAO,CAAExD,kBAAAA,IAC7BsC,EAACC,cAAAxC,EACc,CAAA,cAAAd,GAAcwE,EAAUC,EAAuBC,KAAMxF,GAAG,YAC1DyF,EAAgBD,KAC3B1F,IAAKmB,EACLN,MAAOA,EACPZ,UAAW2F,EAAGC,EAAOC,KAAM7F,GAC3BC,GAAIoB,EACQ,aAAAd,EACM,mBAAAC,EACH,gBAAAC,EACfyE,UAAW,EACXpE,KAAMA,GAELiD,GAIT,IAGa+B,EAAAA,EAAgBlG,EAAM,CACnCQ,WAAY2F"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={list:"
|
|
1
|
+
var e={list:"list_d96ab67778"};!function(e){const t="s_id-ed9bf484fec4_3_35_0";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)}(".list_d96ab67778 {\n margin: 0;\n padding: 0;\n overflow: auto;\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n}\n.list_d96ab67778::-webkit-scrollbar {\n width: 4px;\n height: 6px;\n}\n.list_d96ab67778::-webkit-scrollbar-thumb {\n background-color: var(--ui-border-color);\n border-radius: 4px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=List.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={scrollableContainer:"
|
|
1
|
+
var e={scrollableContainer:"scrollableContainer_90319bcbaa"};!function(e){const n="s_id-6ed55dee5450_3_35_0";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+n))return;const t=document.createElement("style");t.id=n,a.firstChild?a.insertBefore(t,a.firstChild):a.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".scrollableContainer_90319bcbaa {\n margin: 0;\n padding: 0;\n overflow: auto;\n}\n.scrollableContainer_90319bcbaa::-webkit-scrollbar {\n width: 4px;\n height: 6px;\n}\n.scrollableContainer_90319bcbaa::-webkit-scrollbar-thumb {\n background-color: var(--ui-border-color);\n border-radius: 4px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=VirtualizedListItems.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={listItem:"
|
|
1
|
+
var e={listItem:"listItem_b67dfae78a","focus-visible":"focus-visible_3de0700038",disabled:"disabled_84a88df534",selected:"selected_f1b85b2ff8",small:"small_53f9147c9a",medium:"medium_15f8ceff72",large:"large_b4185f36ac"};!function(e){const n="s_id-8402a299d384_3_35_0";if("undefined"!=typeof document){const a=document.head||document.getElementsByTagName("head")[0];if(a.querySelector("#"+n))return;const d=document.createElement("style");d.id=n,a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".listItem_b67dfae78a {\n display: flex;\n align-items: center;\n padding: 8px 16px;\n border-radius: 4px;\n cursor: pointer;\n}\n.listItem_b67dfae78a:focus-visible, .listItem_b67dfae78a.focus-visible_3de0700038 {\n outline: none;\n z-index: 11;\n border-radius: 4px;\n box-shadow: 0 0 0 3px hsla(209, 100%, 50%, 0.5) inset, 0 0 0 1px var(--primary-hover-color) inset;\n}\n.listItem_b67dfae78a:focus:not(.focus-visible_3de0700038) {\n outline: none;\n}\n.listItem_b67dfae78a:hover {\n background-color: var(--primary-background-hover-color);\n}\n.disabled_84a88df534 {\n cursor: not-allowed;\n}\n.disabled_84a88df534:hover {\n background-color: transparent;\n}\n.selected_f1b85b2ff8 {\n background-color: var(--primary-selected-color);\n}\n.selected_f1b85b2ff8:hover {\n background-color: var(--primary-selected-color);\n}\n.small_53f9147c9a {\n height: 32px;\n}\n.medium_15f8ceff72 {\n height: 40px;\n}\n.large_b4185f36ac {\n height: 48px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ListItem.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={listItemAvatar:"
|
|
1
|
+
var e={listItemAvatar:"listItemAvatar_0b82eee542",avatar:"avatar_5aaf8ea0ad"};!function(e){const t="s_id-64054545c9e6_3_35_0";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)}(".listItemAvatar_0b82eee542 {\n display: flex;\n align-items: center;\n color: var(--primary-text-color);\n}\n\n.avatar_5aaf8ea0ad {\n width: 22px;\n height: 22px;\n margin-right: var(--spacing-small);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ListItemAvatar.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={listItemIcon:"
|
|
1
|
+
var e={listItemIcon:"listItemIcon_0b82eee542",start:"start_2e6da877c0",end:"end_3863072f51"};!function(e){const t="s_id-0831d1bc0202_3_35_0";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const a=document.createElement("style");a.id=t,n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".listItemIcon_0b82eee542 {\n display: flex;\n align-items: center;\n color: var(--primary-text-color);\n}\n\n.start_2e6da877c0 {\n margin-right: var(--spacing-small);\n}\n\n.end_3863072f51 {\n margin-left: var(--spacing-small);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ListItemIcon.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={listTitle:"
|
|
1
|
+
var e={listTitle:"listTitle_e9364c4878"};!function(e){const t="s_id-d4e0bfe7508e_3_35_0";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+t))return;const n=document.createElement("style");n.id=t,i.firstChild?i.insertBefore(n,i.firstChild):i.appendChild(n),n.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".listTitle_e9364c4878 {\n -webkit-font-smoothing: var(--font-smoothing-webkit);\n -moz-osx-font-smoothing: var(--font-smoothing-moz);\n padding: var(--spacing-medium) var(--spacing-medium) var(--spacing-small);\n border-radius: var(--border-radius-small);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=ListTitle.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={loaderContainer:"
|
|
1
|
+
var e={loaderContainer:"loaderContainer_200344b240",circleLoaderSpinnerBackground:"circleLoaderSpinnerBackground_f6c8f6268c",circleLoaderSpinner:"circleLoaderSpinner_bba0602495",rotate:"rotate_26394be9fb",circleLoaderSpinnerPath:"circleLoaderSpinnerPath_29cf3de708",dash:"dash_6f2b3b75d0"};!function(e){const n="s_id-dcd4d8f866fa_3_35_0";if("undefined"!=typeof document){const r=document.head||document.getElementsByTagName("head")[0];if(r.querySelector("#"+n))return;const a=document.createElement("style");a.id=n,r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".loaderContainer_200344b240 {\n position: relative;\n height: 100%;\n width: 100%;\n}\n.loaderContainer_200344b240 .circleLoaderSpinnerBackground_f6c8f6268c {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -50%;\n margin-left: -50%;\n stroke: var(--ui-background-color);\n}\n.loaderContainer_200344b240 .circleLoaderSpinner_bba0602495 {\n animation: rotate_26394be9fb 1s linear infinite;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-top: -50%;\n margin-left: -50%;\n stroke: currentColor;\n stroke-linecap: round;\n}\n.loaderContainer_200344b240 .circleLoaderSpinner_bba0602495 .circleLoaderSpinnerPath_29cf3de708 {\n animation: dash_6f2b3b75d0 1s infinite;\n}\n@keyframes rotate_26394be9fb {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash_6f2b3b75d0 {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=Loader.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={menu:"
|
|
1
|
+
var e={menu:"menu_1ed81102c3",small:"small_6c0f016577",medium:"medium_c08733d881",large:"large_988ff337f2"};!function(e){const n="s_id-1599ba0bb296_3_35_0";if("undefined"!=typeof document){const t=document.head||document.getElementsByTagName("head")[0];if(t.querySelector("#"+n))return;const d=document.createElement("style");d.id=n,t.firstChild?t.insertBefore(d,t.firstChild):t.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[n]=e)}(".menu_1ed81102c3 {\n margin: unset;\n padding: unset;\n position: relative;\n}\n\n.menu_1ed81102c3:focus {\n outline: none;\n}\n\n.small_6c0f016577 {\n width: 200px;\n}\n\n.medium_c08733d881 {\n width: 220px;\n}\n\n.large_988ff337f2 {\n width: 240px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=Menu.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={menuChildDivider:"
|
|
1
|
+
var e={menuChildDivider:"menuChildDivider_fd837481a9"};!function(e){const d="s_id-d277a91266dd_3_35_0";if("undefined"!=typeof document){const i=document.head||document.getElementsByTagName("head")[0];if(i.querySelector("#"+d))return;const t=document.createElement("style");t.id=d,i.firstChild?i.insertBefore(t,i.firstChild):i.appendChild(t),t.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[d]=e)}(".menuChildDivider_fd837481a9 {\n width: 100%;\n padding: 0 var(--spacing-small);\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=MenuDivider.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={title:"
|
|
1
|
+
var e={title:"title_454e458ebe"};!function(e){const t="s_id-b06386a2bb6c_3_35_0";if("undefined"!=typeof document){const n=document.head||document.getElementsByTagName("head")[0];if(n.querySelector("#"+t))return;const d=document.createElement("style");d.id=t,n.firstChild?n.insertBefore(d,n.firstChild):n.appendChild(d),d.appendChild(document.createTextNode(e))}else globalThis.injectedStyles&&(globalThis.injectedStyles[t]=e)}(".title_454e458ebe {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-grow: 1;\n padding-block: 1px;\n}");export{e as default};
|
|
2
2
|
//# sourceMappingURL=MenuItem.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineProperty as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import t,{forwardRef as n,useRef as o,useEffect as s,useCallback as u}from"react";import i from"../../../../Text/Text.js";import{getTestId as r,ComponentDefaultTestId as l}from"../../../../../tests/testIds.js";import a from"classnames";import{TAB_INDEX_FOCUS_WITH_JS_ONLY as m}from"../../MenuItemConstants.js";import d from"../MenuItemSubMenuIcon/MenuItemSubMenuIcon.js";import c from"../MenuItemSubMenu/MenuItemSubMenu.js";import M from"../../hooks/useMenuItemMouseEvents.js";import I from"../../hooks/useMenuItemKeyboardEvents.js";import p from"../../../../../hooks/useMergeRef.js";import v from"../../../../../hooks/useIsMouseEnter.js";import f from"./BaseMenuItem.module.scss.js";var b=n((function(n,b){var h=n.subMenu,S=n.className,x=n.menuRef,E=n.disabled,j=void 0!==E&&E,C=n.selected,k=void 0!==C&&C,O=n.onClick,A=n.activeItemIndex,B=n.setActiveItemIndex,R=n.index,g=n.id,y=n.isParentMenuVisible,
|
|
1
|
+
import{defineProperty as e}from"../../../../../../_virtual/_rollupPluginBabelHelpers.js";import t,{forwardRef as n,useRef as o,useEffect as s,useCallback as u}from"react";import i from"../../../../Text/Text.js";import{getTestId as r,ComponentDefaultTestId as l}from"../../../../../tests/testIds.js";import a from"classnames";import{TAB_INDEX_FOCUS_WITH_JS_ONLY as m}from"../../MenuItemConstants.js";import d from"../MenuItemSubMenuIcon/MenuItemSubMenuIcon.js";import c from"../MenuItemSubMenu/MenuItemSubMenu.js";import M from"../../hooks/useMenuItemMouseEvents.js";import I from"../../hooks/useMenuItemKeyboardEvents.js";import p from"../../../../../hooks/useMergeRef.js";import v from"../../../../../hooks/useIsMouseEnter.js";import f from"./BaseMenuItem.module.scss.js";var b=n((function(n,b){var h=n.subMenu,S=n.className,x=n.menuRef,E=n.disabled,j=void 0!==E&&E,C=n.selected,k=void 0!==C&&C,O=n.onClick,A=n.activeItemIndex,B=n.setActiveItemIndex,R=n.index,g=n.id,y=n.isParentMenuVisible,w=n.resetOpenSubMenuIndex,N=n.hasOpenSubMenu,P=n.setSubMenuIsOpenByIndex,L=n.closeMenu,T=n.useDocumentEventListeners,V=void 0!==T&&T,_=n.isInitialSelectedState,z=n.onMouseEnter,D=n.onMouseLeave,F=n.shouldScrollMenu,H=n["data-testid"],K=n.splitMenuItem,U=void 0!==K&&K,q=n.children,G=n.submenuPosition,J=void 0===G?"right":G,Q=n.autoAdjustOnSubMenuContentResize,W=(void 0===A?-1:A)===R,X=!j&&!!h&&(void 0!==y&&y)&&(W&&(void 0!==N&&N)),Y=o(null),Z=o(null),$=p(b,Y),ee=v({ref:Y}),te=v({ref:Z});s((function(){var e,t=Y.current;W&&F&&t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded({behaviour:"smooth"}):null===(e=t.scrollIntoView)||void 0===e||e.call(t,{behavior:"smooth",block:"center"}))}),[W,F]),s((function(){var e=Y.current;V||W&&(null==e||e.focus())}),[W,V]);var ne=M({ref:Y,splitMenuItemIconButtonRef:Z,resetOpenSubMenuIndex:w,setSubMenuIsOpenByIndex:P,isActive:W,setActiveItemIndex:B,index:R,hasChildren:!!h,splitMenuItem:U}),oe=I({onClick:O,disabled:j,isActive:W,index:R,setActiveItemIndex:B,hasChildren:!!h,shouldShowSubMenu:X,setSubMenuIsOpenByIndex:P,menuRef:x,isMouseEnter:ne,closeMenu:L,useDocumentEventListeners:V,splitMenuItem:U,isMouseEnterMenuItem:ee,isMouseEnterIconButton:te}).onClickCallback,se=u((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};P(R,!1),e.propagate&&L(e)}),[P,R,L]);return t.createElement(i,{id:g,element:"li",type:"text2","aria-haspopup":!!h||void 0,"aria-expanded":h?X:void 0,"data-testid":H||r(l.MENU_ITEM,R),className:a(f.item,S,e(e(e(e(e({},f.disabled,j),f.focused,W),f.selected,k),f.initialSelected,_),f.splitMenuItem,U)),ref:$,onClick:oe,role:"menuitem","aria-current":W,onMouseLeave:D,onMouseEnter:z,tabIndex:m,withoutTooltip:!0},q,!!h&&t.createElement(t.Fragment,null,t.createElement(d,{ref:Z,isSplit:U,active:X,disabled:j}),t.createElement(c,{anchorRef:Y,open:X,onClose:se,autoFocusOnMount:!V,submenuPosition:J,autoAdjustOnSubMenuContentResize:Q},h)))}));export{b as default};
|
|
2
2
|
//# sourceMappingURL=BaseMenuItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseMenuItem.js","sources":["../../../../../../../src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useEffect, useRef } from \"react\";\nimport Text from \"../../../../Text/Text\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport { TAB_INDEX_FOCUS_WITH_JS_ONLY } from \"../../MenuItemConstants\";\nimport MenuItemSubMenuIcon from \"../MenuItemSubMenuIcon/MenuItemSubMenuIcon\";\nimport MenuItemSubMenu from \"../MenuItemSubMenu/MenuItemSubMenu\";\nimport { CloseMenuOption } from \"../../../Menu/MenuConstants\";\nimport useMenuItemMouseEvents from \"../../hooks/useMenuItemMouseEvents\";\nimport useMenuItemKeyboardEvents from \"../../hooks/useMenuItemKeyboardEvents\";\nimport useMergeRef from \"../../../../../hooks/useMergeRef\";\nimport useIsMouseEnter from \"../../../../../hooks/useIsMouseEnter\";\nimport styles from \"./BaseMenuItem.module.scss\";\nimport { BaseMenuItemProps } from \"./BaseMenuItem.types\";\n\nconst BaseMenuItem = forwardRef(\n (\n {\n subMenu,\n className,\n menuRef,\n disabled = false,\n selected = false,\n onClick,\n activeItemIndex = -1,\n setActiveItemIndex,\n index,\n id,\n isParentMenuVisible = false,\n resetOpenSubMenuIndex,\n hasOpenSubMenu = false,\n setSubMenuIsOpenByIndex,\n closeMenu,\n useDocumentEventListeners = false,\n isInitialSelectedState,\n onMouseEnter,\n onMouseLeave,\n shouldScrollMenu,\n \"data-testid\": dataTestId,\n splitMenuItem = false,\n children,\n submenuPosition = \"right\",\n autoAdjustOnSubMenuContentResize\n }: BaseMenuItemProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n const isActive = activeItemIndex === index;\n const isSubMenuOpen = isActive && hasOpenSubMenu;\n const shouldShowSubMenu = !disabled && Boolean(subMenu) && isParentMenuVisible && isSubMenuOpen;\n\n const anchorRef = useRef(null);\n const splitMenuItemIconButtonRef = useRef(null);\n\n const mergedRef = useMergeRef(ref, anchorRef);\n\n const isMouseEnterMenuItem = useIsMouseEnter({ ref: anchorRef });\n const isMouseEnterIconButton = useIsMouseEnter({ ref: splitMenuItemIconButtonRef });\n\n useEffect(() => {\n const anchorElement = anchorRef.current;\n if (!isActive || !shouldScrollMenu || !anchorElement) {\n return;\n }\n if (anchorElement.scrollIntoViewIfNeeded) {\n anchorElement.scrollIntoViewIfNeeded({ behaviour: \"smooth\" });\n return;\n }\n anchorElement.scrollIntoView?.({ behavior: \"smooth\", block: \"center\" });\n }, [isActive, shouldScrollMenu]);\n\n useEffect(() => {\n const anchorElement = anchorRef.current;\n if (useDocumentEventListeners) return;\n if (isActive) {\n anchorElement?.focus();\n }\n }, [isActive, useDocumentEventListeners]);\n\n const isMouseEnter = useMenuItemMouseEvents({\n ref: anchorRef,\n splitMenuItemIconButtonRef,\n resetOpenSubMenuIndex,\n setSubMenuIsOpenByIndex,\n isActive,\n setActiveItemIndex,\n index,\n hasChildren: Boolean(subMenu),\n splitMenuItem\n });\n\n const { onClickCallback } = useMenuItemKeyboardEvents({\n onClick,\n disabled,\n isActive,\n index,\n setActiveItemIndex,\n hasChildren: Boolean(subMenu),\n shouldShowSubMenu,\n setSubMenuIsOpenByIndex,\n menuRef,\n isMouseEnter,\n closeMenu,\n useDocumentEventListeners,\n splitMenuItem,\n isMouseEnterMenuItem,\n isMouseEnterIconButton\n });\n\n const closeSubMenu = useCallback(\n (option: CloseMenuOption = {}) => {\n setSubMenuIsOpenByIndex(index, false);\n if (option.propagate) {\n closeMenu(option);\n }\n },\n [setSubMenuIsOpenByIndex, index, closeMenu]\n );\n\n return (\n <Text\n id={id}\n element=\"li\"\n type=\"text2\"\n aria-haspopup={subMenu ? true : undefined}\n aria-expanded={subMenu ? shouldShowSubMenu : undefined}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.MENU_ITEM, index)}\n className={cx(styles.item, className, {\n [styles.disabled]: disabled,\n [styles.focused]: isActive,\n [styles.selected]: selected,\n [styles.initialSelected]: isInitialSelectedState,\n [styles.splitMenuItem]: splitMenuItem\n })}\n ref={mergedRef}\n onClick={onClickCallback}\n role=\"menuitem\"\n aria-current={isActive}\n onMouseLeave={onMouseLeave}\n onMouseEnter={onMouseEnter}\n tabIndex={TAB_INDEX_FOCUS_WITH_JS_ONLY}\n >\n {children}\n {Boolean(subMenu) && (\n <>\n <MenuItemSubMenuIcon\n ref={splitMenuItemIconButtonRef}\n isSplit={splitMenuItem}\n active={shouldShowSubMenu}\n disabled={disabled}\n />\n <MenuItemSubMenu\n anchorRef={anchorRef}\n open={shouldShowSubMenu}\n onClose={closeSubMenu}\n autoFocusOnMount={!useDocumentEventListeners}\n submenuPosition={submenuPosition}\n autoAdjustOnSubMenuContentResize={autoAdjustOnSubMenuContentResize}\n >\n {subMenu}\n </MenuItemSubMenu>\n </>\n )}\n </Text>\n );\n }\n);\n\nexport default BaseMenuItem;\n"],"names":["BaseMenuItem","forwardRef","_ref","ref","subMenu","className","menuRef","_ref$disabled","disabled","_ref$selected","selected","onClick","_ref$activeItemIndex","activeItemIndex","setActiveItemIndex","index","id","_ref$isParentMenuVisi","isParentMenuVisible","resetOpenSubMenuIndex","_ref$hasOpenSubMenu","hasOpenSubMenu","setSubMenuIsOpenByIndex","closeMenu","_ref$useDocumentEvent","useDocumentEventListeners","isInitialSelectedState","onMouseEnter","onMouseLeave","shouldScrollMenu","dataTestId","_ref$splitMenuItem","splitMenuItem","children","_ref$submenuPosition","submenuPosition","autoAdjustOnSubMenuContentResize","isActive","shouldShowSubMenu","anchorRef","useRef","splitMenuItemIconButtonRef","mergedRef","useMergeRef","isMouseEnterMenuItem","useIsMouseEnter","isMouseEnterIconButton","useEffect","anchorElement","current","scrollIntoViewIfNeeded","behaviour","_a","scrollIntoView","call","behavior","block","focus","isMouseEnter","useMenuItemMouseEvents","hasChildren","onClickCallback","useMenuItemKeyboardEvents","closeSubMenu","useCallback","option","arguments","length","undefined","propagate","React","createElement","Text","element","type","getTestId","ComponentDefaultTestId","MENU_ITEM","cx","styles","item","_defineProperty","focused","initialSelected","role","tabIndex","TAB_INDEX_FOCUS_WITH_JS_ONLY","Fragment","MenuItemSubMenuIcon","isSplit","active","MenuItemSubMenu","open","onClose","autoFocusOnMount"],"mappings":"qwBAeMA,IAAAA,EAAeC,GACnB,SAAAC,EA4BEC,GACE,IA3BAC,EAAOF,EAAPE,QACAC,EAASH,EAATG,UACAC,EAAOJ,EAAPI,QAAOC,EAAAL,EACPM,SA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ACFW,SAAAA,EAAeS,QAEnB,GAAG,CAACpB,EAAUZ,IAEd,IAAMiC,GAAeC,EAAuB,CAC1CxD,IAAKoC,EACLE,2BAAAA,EACAtB,sBAAAA,EACAG,wBAAAA,EACAe,SAAAA,EACAvB,mBAAAA,EACAC,MAAAA,EACA6C,cAAqBxD,EACrB4B,cAAAA,IAGM6B,GAAoBC,EAA0B,CACpDnD,QAAAA,EACAH,SAAAA,EACA6B,SAAAA,EACAtB,MAAAA,EACAD,mBAAAA,EACA8C,cAAqBxD,EACrBkC,kBAAAA,EACAhB,wBAAAA,EACAhB,QAAAA,EACAoD,aAAAA,GACAnC,UAAAA,EACAE,0BAAAA,EACAO,cAAAA,EACAY,qBAAAA,GACAE,uBAAAA,KAfMe,gBAkBFE,GAAeC,GACnB,WAAiC,IAAhCC,EAA0BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAA,CAAA,EACzB5C,EAAwBP,GAAO,GAC3BkD,EAAOI,WACT9C,EAAU0C,EAEb,GACD,CAAC3C,EAAyBP,EAAOQ,IAGnC,OACE+C,EAACC,cAAAC,EACC,CAAAxD,GAAIA,EACJyD,QAAQ,KACRC,KAAK,QAAO,kBACGtE,QAAiBgE,EAAS,gBAC1BhE,EAAUkC,OAAoB8B,EAChC,cAAAtC,GAAc6C,EAAUC,EAAuBC,UAAW9D,GACvEV,UAAWyE,EAAGC,EAAOC,KAAM3E,EAAS4E,EAAAA,EAAAA,EAAAA,EAAAA,EACjCF,CAAAA,EAAAA,EAAOvE,SAAWA,GAClBuE,EAAOG,QAAU7C,GACjB0C,EAAOrE,SAAWA,GAClBqE,EAAOI,gBAAkBzD,GACzBqD,EAAO/C,cAAgBA,IAE1B7B,IAAKuC,EACL/B,QAASkD,GACTuB,KAAK,
|
|
1
|
+
{"version":3,"file":"BaseMenuItem.js","sources":["../../../../../../../src/components/Menu/MenuItem/components/BaseMenuItem/BaseMenuItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useEffect, useRef } from \"react\";\nimport Text from \"../../../../Text/Text\";\nimport { ComponentDefaultTestId, getTestId } from \"../../../../../tests/test-ids-utils\";\nimport cx from \"classnames\";\nimport { TAB_INDEX_FOCUS_WITH_JS_ONLY } from \"../../MenuItemConstants\";\nimport MenuItemSubMenuIcon from \"../MenuItemSubMenuIcon/MenuItemSubMenuIcon\";\nimport MenuItemSubMenu from \"../MenuItemSubMenu/MenuItemSubMenu\";\nimport { CloseMenuOption } from \"../../../Menu/MenuConstants\";\nimport useMenuItemMouseEvents from \"../../hooks/useMenuItemMouseEvents\";\nimport useMenuItemKeyboardEvents from \"../../hooks/useMenuItemKeyboardEvents\";\nimport useMergeRef from \"../../../../../hooks/useMergeRef\";\nimport useIsMouseEnter from \"../../../../../hooks/useIsMouseEnter\";\nimport styles from \"./BaseMenuItem.module.scss\";\nimport { BaseMenuItemProps } from \"./BaseMenuItem.types\";\n\nconst BaseMenuItem = forwardRef(\n (\n {\n subMenu,\n className,\n menuRef,\n disabled = false,\n selected = false,\n onClick,\n activeItemIndex = -1,\n setActiveItemIndex,\n index,\n id,\n isParentMenuVisible = false,\n resetOpenSubMenuIndex,\n hasOpenSubMenu = false,\n setSubMenuIsOpenByIndex,\n closeMenu,\n useDocumentEventListeners = false,\n isInitialSelectedState,\n onMouseEnter,\n onMouseLeave,\n shouldScrollMenu,\n \"data-testid\": dataTestId,\n splitMenuItem = false,\n children,\n submenuPosition = \"right\",\n autoAdjustOnSubMenuContentResize\n }: BaseMenuItemProps,\n ref: React.ForwardedRef<HTMLElement>\n ) => {\n const isActive = activeItemIndex === index;\n const isSubMenuOpen = isActive && hasOpenSubMenu;\n const shouldShowSubMenu = !disabled && Boolean(subMenu) && isParentMenuVisible && isSubMenuOpen;\n\n const anchorRef = useRef(null);\n const splitMenuItemIconButtonRef = useRef(null);\n\n const mergedRef = useMergeRef(ref, anchorRef);\n\n const isMouseEnterMenuItem = useIsMouseEnter({ ref: anchorRef });\n const isMouseEnterIconButton = useIsMouseEnter({ ref: splitMenuItemIconButtonRef });\n\n useEffect(() => {\n const anchorElement = anchorRef.current;\n if (!isActive || !shouldScrollMenu || !anchorElement) {\n return;\n }\n if (anchorElement.scrollIntoViewIfNeeded) {\n anchorElement.scrollIntoViewIfNeeded({ behaviour: \"smooth\" });\n return;\n }\n anchorElement.scrollIntoView?.({ behavior: \"smooth\", block: \"center\" });\n }, [isActive, shouldScrollMenu]);\n\n useEffect(() => {\n const anchorElement = anchorRef.current;\n if (useDocumentEventListeners) return;\n if (isActive) {\n anchorElement?.focus();\n }\n }, [isActive, useDocumentEventListeners]);\n\n const isMouseEnter = useMenuItemMouseEvents({\n ref: anchorRef,\n splitMenuItemIconButtonRef,\n resetOpenSubMenuIndex,\n setSubMenuIsOpenByIndex,\n isActive,\n setActiveItemIndex,\n index,\n hasChildren: Boolean(subMenu),\n splitMenuItem\n });\n\n const { onClickCallback } = useMenuItemKeyboardEvents({\n onClick,\n disabled,\n isActive,\n index,\n setActiveItemIndex,\n hasChildren: Boolean(subMenu),\n shouldShowSubMenu,\n setSubMenuIsOpenByIndex,\n menuRef,\n isMouseEnter,\n closeMenu,\n useDocumentEventListeners,\n splitMenuItem,\n isMouseEnterMenuItem,\n isMouseEnterIconButton\n });\n\n const closeSubMenu = useCallback(\n (option: CloseMenuOption = {}) => {\n setSubMenuIsOpenByIndex(index, false);\n if (option.propagate) {\n closeMenu(option);\n }\n },\n [setSubMenuIsOpenByIndex, index, closeMenu]\n );\n\n return (\n <Text\n id={id}\n element=\"li\"\n type=\"text2\"\n aria-haspopup={subMenu ? true : undefined}\n aria-expanded={subMenu ? shouldShowSubMenu : undefined}\n data-testid={dataTestId || getTestId(ComponentDefaultTestId.MENU_ITEM, index)}\n className={cx(styles.item, className, {\n [styles.disabled]: disabled,\n [styles.focused]: isActive,\n [styles.selected]: selected,\n [styles.initialSelected]: isInitialSelectedState,\n [styles.splitMenuItem]: splitMenuItem\n })}\n ref={mergedRef}\n onClick={onClickCallback}\n role=\"menuitem\"\n aria-current={isActive}\n onMouseLeave={onMouseLeave}\n onMouseEnter={onMouseEnter}\n tabIndex={TAB_INDEX_FOCUS_WITH_JS_ONLY}\n withoutTooltip\n >\n {children}\n {Boolean(subMenu) && (\n <>\n <MenuItemSubMenuIcon\n ref={splitMenuItemIconButtonRef}\n isSplit={splitMenuItem}\n active={shouldShowSubMenu}\n disabled={disabled}\n />\n <MenuItemSubMenu\n anchorRef={anchorRef}\n open={shouldShowSubMenu}\n onClose={closeSubMenu}\n autoFocusOnMount={!useDocumentEventListeners}\n submenuPosition={submenuPosition}\n autoAdjustOnSubMenuContentResize={autoAdjustOnSubMenuContentResize}\n >\n {subMenu}\n </MenuItemSubMenu>\n </>\n )}\n </Text>\n );\n }\n);\n\nexport default BaseMenuItem;\n"],"names":["BaseMenuItem","forwardRef","_ref","ref","subMenu","className","menuRef","_ref$disabled","disabled","_ref$selected","selected","onClick","_ref$activeItemIndex","activeItemIndex","setActiveItemIndex","index","id","_ref$isParentMenuVisi","isParentMenuVisible","resetOpenSubMenuIndex","_ref$hasOpenSubMenu","hasOpenSubMenu","setSubMenuIsOpenByIndex","closeMenu","_ref$useDocumentEvent","useDocumentEventListeners","isInitialSelectedState","onMouseEnter","onMouseLeave","shouldScrollMenu","dataTestId","_ref$splitMenuItem","splitMenuItem","children","_ref$submenuPosition","submenuPosition","autoAdjustOnSubMenuContentResize","isActive","shouldShowSubMenu","anchorRef","useRef","splitMenuItemIconButtonRef","mergedRef","useMergeRef","isMouseEnterMenuItem","useIsMouseEnter","isMouseEnterIconButton","useEffect","anchorElement","current","scrollIntoViewIfNeeded","behaviour","_a","scrollIntoView","call","behavior","block","focus","isMouseEnter","useMenuItemMouseEvents","hasChildren","onClickCallback","useMenuItemKeyboardEvents","closeSubMenu","useCallback","option","arguments","length","undefined","propagate","React","createElement","Text","element","type","getTestId","ComponentDefaultTestId","MENU_ITEM","cx","styles","item","_defineProperty","focused","initialSelected","role","tabIndex","TAB_INDEX_FOCUS_WITH_JS_ON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