@lumx/react 4.17.1-alpha.2 → 4.17.1-alpha.3
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/_internal/_virtual/_rolldown/runtime.js +34 -0
- package/_internal/components/alert-dialog/AlertDialog.d.ts +30 -0
- package/_internal/components/alert-dialog/AlertDialog.js +49 -0
- package/_internal/components/alert-dialog/index.d.ts +1 -0
- package/_internal/components/autocomplete/Autocomplete.d.ts +181 -0
- package/_internal/components/autocomplete/Autocomplete.js +92 -0
- package/_internal/components/autocomplete/AutocompleteMultiple.d.ts +28 -0
- package/_internal/components/autocomplete/AutocompleteMultiple.js +95 -0
- package/_internal/components/autocomplete/index.d.ts +2 -0
- package/_internal/components/avatar/Avatar.d.ts +39 -0
- package/_internal/components/avatar/Avatar.js +46 -0
- package/_internal/components/avatar/index.d.ts +2 -0
- package/_internal/components/badge/Badge.d.ts +24 -0
- package/_internal/components/badge/Badge.js +21 -0
- package/_internal/components/badge/BadgeWrapper.d.ts +16 -0
- package/_internal/components/badge/BadgeWrapper.js +13 -0
- package/_internal/components/badge/index.d.ts +2 -0
- package/_internal/components/button/Button.d.ts +22 -0
- package/_internal/components/button/Button.js +49 -0
- package/_internal/components/button/ButtonGroup.d.ts +17 -0
- package/_internal/components/button/ButtonGroup.js +21 -0
- package/_internal/components/button/ButtonRoot.d.ts +1 -0
- package/_internal/components/button/IconButton.d.ts +30 -0
- package/_internal/components/button/IconButton.js +40 -0
- package/_internal/components/button/index.d.ts +5 -0
- package/_internal/components/checkbox/Checkbox.d.ts +24 -0
- package/_internal/components/checkbox/Checkbox.js +58 -0
- package/_internal/components/checkbox/index.d.ts +1 -0
- package/_internal/components/chip/Chip.d.ts +34 -0
- package/_internal/components/chip/Chip.js +43 -0
- package/_internal/components/chip/ChipGroup.d.ts +20 -0
- package/_internal/components/chip/ChipGroup.js +25 -0
- package/_internal/components/chip/SelectionChipGroup.d.ts +43 -0
- package/_internal/components/chip/SelectionChipGroup.js +78 -0
- package/_internal/components/chip/index.d.ts +3 -0
- package/_internal/components/combobox/ComboboxButton.d.ts +17 -0
- package/_internal/components/combobox/ComboboxButton.js +59 -0
- package/_internal/components/combobox/ComboboxInput.d.ts +19 -0
- package/_internal/components/combobox/ComboboxInput.js +79 -0
- package/_internal/components/combobox/ComboboxList.d.ts +8 -0
- package/_internal/components/combobox/ComboboxList.js +64 -0
- package/_internal/components/combobox/ComboboxOption.d.ts +36 -0
- package/_internal/components/combobox/ComboboxOption.js +76 -0
- package/_internal/components/combobox/ComboboxOptionAction.d.ts +18 -0
- package/_internal/components/combobox/ComboboxOptionAction.js +38 -0
- package/_internal/components/combobox/ComboboxOptionMoreInfo.d.ts +19 -0
- package/_internal/components/combobox/ComboboxOptionMoreInfo.js +49 -0
- package/_internal/components/combobox/ComboboxOptionSkeleton.d.ts +19 -0
- package/_internal/components/combobox/ComboboxOptionSkeleton.js +38 -0
- package/_internal/components/combobox/ComboboxPopover.d.ts +18 -0
- package/_internal/components/combobox/ComboboxPopover.js +32 -0
- package/_internal/components/combobox/ComboboxProvider.d.ts +27 -0
- package/_internal/components/combobox/ComboboxProvider.js +41 -0
- package/_internal/components/combobox/ComboboxSection.d.ts +15 -0
- package/_internal/components/combobox/ComboboxSection.js +47 -0
- package/_internal/components/combobox/ComboboxState.d.ts +14 -0
- package/_internal/components/combobox/ComboboxState.js +70 -0
- package/_internal/components/combobox/context/ComboboxContext.js +15 -0
- package/_internal/components/combobox/context/ComboboxListContext.js +12 -0
- package/_internal/components/combobox/context/ComboboxOptionContext.js +16 -0
- package/_internal/components/combobox/context/useComboboxEvent.d.ts +10 -0
- package/_internal/components/combobox/context/useComboboxEvent.js +17 -0
- package/_internal/components/combobox/context/useComboboxOpen.js +13 -0
- package/_internal/components/combobox/index.d.ts +73 -0
- package/_internal/components/combobox/index.js +47 -0
- package/_internal/components/combobox/wrapRenderOption.js +38 -0
- package/_internal/components/comment-block/CommentBlock.d.ts +68 -0
- package/_internal/components/comment-block/CommentBlock.js +109 -0
- package/_internal/components/comment-block/index.d.ts +1 -0
- package/_internal/components/date-picker/DatePicker.d.ts +14 -0
- package/_internal/components/date-picker/DatePicker.js +45 -0
- package/_internal/components/date-picker/DatePickerControlled.d.ts +26 -0
- package/_internal/components/date-picker/DatePickerControlled.js +177 -0
- package/_internal/components/date-picker/DatePickerField.d.ts +38 -0
- package/_internal/components/date-picker/DatePickerField.js +83 -0
- package/_internal/components/date-picker/constants.js +11 -0
- package/_internal/components/date-picker/index.d.ts +4 -0
- package/_internal/components/date-picker/types.d.ts +30 -0
- package/_internal/components/dialog/Dialog.d.ts +47 -0
- package/_internal/components/dialog/Dialog.js +110 -0
- package/_internal/components/dialog/index.d.ts +2 -0
- package/_internal/components/divider/Divider.d.ts +20 -0
- package/_internal/components/divider/Divider.js +30 -0
- package/_internal/components/divider/index.d.ts +1 -0
- package/_internal/components/drag-handle/DragHandle.d.ts +20 -0
- package/_internal/components/drag-handle/DragHandle.js +29 -0
- package/_internal/components/drag-handle/index.d.ts +1 -0
- package/_internal/components/dropdown/Dropdown.d.ts +89 -0
- package/_internal/components/dropdown/Dropdown.js +89 -0
- package/_internal/components/dropdown/index.d.ts +1 -0
- package/_internal/components/expansion-panel/ExpansionPanel.d.ts +31 -0
- package/_internal/components/expansion-panel/ExpansionPanel.js +80 -0
- package/_internal/components/expansion-panel/index.d.ts +1 -0
- package/_internal/components/flag/Flag.d.ts +20 -0
- package/_internal/components/flag/Flag.js +28 -0
- package/_internal/components/flag/index.d.ts +1 -0
- package/_internal/components/flex-box/FlexBox.d.ts +25 -0
- package/_internal/components/flex-box/FlexBox.js +24 -0
- package/_internal/components/flex-box/index.d.ts +2 -0
- package/_internal/components/generic-block/GenericBlock.d.ts +51 -0
- package/_internal/components/generic-block/GenericBlock.js +90 -0
- package/_internal/components/generic-block/index.d.ts +2 -0
- package/_internal/components/grid/Grid.d.ts +33 -0
- package/_internal/components/grid/Grid.js +48 -0
- package/_internal/components/grid/GridItem.d.ts +29 -0
- package/_internal/components/grid/GridItem.js +37 -0
- package/_internal/components/grid/index.d.ts +2 -0
- package/_internal/components/grid-column/GridColumn.d.ts +24 -0
- package/_internal/components/grid-column/GridColumn.js +27 -0
- package/_internal/components/grid-column/index.d.ts +2 -0
- package/_internal/components/heading/Heading.d.ts +14 -0
- package/_internal/components/heading/Heading.js +25 -0
- package/_internal/components/heading/HeadingLevelProvider.d.ts +15 -0
- package/_internal/components/heading/HeadingLevelProvider.js +22 -0
- package/_internal/components/heading/context.js +6 -0
- package/_internal/components/heading/index.d.ts +3 -0
- package/_internal/components/heading/useHeadingLevel.d.ts +7 -0
- package/_internal/components/heading/useHeadingLevel.js +12 -0
- package/_internal/components/icon/Icon.d.ts +17 -0
- package/_internal/components/icon/Icon.js +24 -0
- package/_internal/components/icon/index.d.ts +2 -0
- package/_internal/components/image-block/ImageBlock.d.ts +29 -0
- package/_internal/components/image-block/ImageBlock.js +30 -0
- package/_internal/components/image-block/ImageCaption.d.ts +13 -0
- package/_internal/components/image-block/ImageCaption.js +18 -0
- package/_internal/components/image-block/index.d.ts +2 -0
- package/_internal/components/image-lightbox/ImageLightbox.d.ts +17 -0
- package/_internal/components/image-lightbox/ImageLightbox.js +66 -0
- package/_internal/components/image-lightbox/constants.js +11 -0
- package/_internal/components/image-lightbox/index.d.ts +2 -0
- package/_internal/components/image-lightbox/internal/ImageSlide.js +81 -0
- package/_internal/components/image-lightbox/internal/ImageSlideshow.js +112 -0
- package/_internal/components/image-lightbox/internal/useAnimateScroll.js +40 -0
- package/_internal/components/image-lightbox/internal/usePointerZoom.js +98 -0
- package/_internal/components/image-lightbox/types.d.ts +33 -0
- package/_internal/components/image-lightbox/useImageLightbox.d.ts +29 -0
- package/_internal/components/image-lightbox/useImageLightbox.js +102 -0
- package/_internal/components/inline-list/InlineList.d.ts +25 -0
- package/_internal/components/inline-list/InlineList.js +24 -0
- package/_internal/components/inline-list/index.d.ts +1 -0
- package/_internal/components/input-helper/InputHelper.d.ts +17 -0
- package/_internal/components/input-helper/InputHelper.js +25 -0
- package/_internal/components/input-helper/index.d.ts +1 -0
- package/_internal/components/input-label/InputLabel.d.ts +17 -0
- package/_internal/components/input-label/InputLabel.js +25 -0
- package/_internal/components/input-label/index.d.ts +1 -0
- package/_internal/components/lightbox/Lightbox.d.ts +33 -0
- package/_internal/components/lightbox/Lightbox.js +69 -0
- package/_internal/components/lightbox/index.d.ts +1 -0
- package/_internal/components/link/Link.d.ts +35 -0
- package/_internal/components/link/Link.js +45 -0
- package/_internal/components/link/index.d.ts +1 -0
- package/_internal/components/link-preview/LinkPreview.d.ts +25 -0
- package/_internal/components/link-preview/LinkPreview.js +31 -0
- package/_internal/components/link-preview/index.d.ts +1 -0
- package/_internal/components/list/List.d.ts +27 -0
- package/_internal/components/list/List.js +28 -0
- package/_internal/components/list/ListDivider.d.ts +21 -0
- package/_internal/components/list/ListDivider.js +22 -0
- package/_internal/components/list/ListItem.d.ts +47 -0
- package/_internal/components/list/ListItem.js +39 -0
- package/_internal/components/list/ListItemAction.js +30 -0
- package/_internal/components/list/ListSection.d.ts +24 -0
- package/_internal/components/list/ListSection.js +26 -0
- package/_internal/components/list/ListSubheader.d.ts +23 -0
- package/_internal/components/list/ListSubheader.js +33 -0
- package/_internal/components/list/index.d.ts +6 -0
- package/_internal/components/menu-button/MenuButton.d.ts +34 -0
- package/_internal/components/menu-button/MenuButton.js +48 -0
- package/_internal/components/menu-button/MenuItem.d.ts +46 -0
- package/_internal/components/menu-button/MenuItem.js +62 -0
- package/_internal/components/menu-button/MenuList.js +39 -0
- package/_internal/components/menu-button/MenuPopover.d.ts +13 -0
- package/_internal/components/menu-button/MenuPopover.js +31 -0
- package/_internal/components/menu-button/MenuProvider.js +45 -0
- package/_internal/components/menu-button/MenuTrigger.js +40 -0
- package/_internal/components/menu-button/context/MenuContext.js +11 -0
- package/_internal/components/menu-button/context/useMenuEvent.js +21 -0
- package/_internal/components/menu-button/context/useMenuOpen.js +15 -0
- package/_internal/components/menu-button/index.d.ts +3 -0
- package/_internal/components/message/Message.d.ts +17 -0
- package/_internal/components/message/Message.js +20 -0
- package/_internal/components/message/index.d.ts +1 -0
- package/_internal/components/mosaic/Mosaic.d.ts +25 -0
- package/_internal/components/mosaic/Mosaic.js +29 -0
- package/_internal/components/mosaic/index.d.ts +1 -0
- package/_internal/components/navigation/Navigation.d.ts +18 -0
- package/_internal/components/navigation/Navigation.js +51 -0
- package/_internal/components/navigation/NavigationItem.d.ts +23 -0
- package/_internal/components/navigation/NavigationItem.js +52 -0
- package/_internal/components/navigation/NavigationSection.d.ts +15 -0
- package/_internal/components/navigation/NavigationSection.js +100 -0
- package/_internal/components/navigation/constants.js +11 -0
- package/_internal/components/navigation/context.js +6 -0
- package/_internal/components/navigation/index.d.ts +1 -0
- package/_internal/components/notification/Notification.d.ts +36 -0
- package/_internal/components/notification/Notification.js +97 -0
- package/_internal/components/notification/constants.js +28 -0
- package/_internal/components/notification/index.d.ts +1 -0
- package/_internal/components/popover/Popover.d.ts +43 -0
- package/_internal/components/popover/Popover.js +86 -0
- package/_internal/components/popover/index.d.ts +3 -0
- package/_internal/components/popover/usePopoverStyle.js +82 -0
- package/_internal/components/popover-dialog/PopoverDialog.d.ts +22 -0
- package/_internal/components/popover-dialog/PopoverDialog.js +42 -0
- package/_internal/components/popover-dialog/index.d.ts +1 -0
- package/_internal/components/post-block/PostBlock.d.ts +44 -0
- package/_internal/components/post-block/PostBlock.js +92 -0
- package/_internal/components/post-block/index.d.ts +1 -0
- package/_internal/components/progress/Progress.d.ts +30 -0
- package/_internal/components/progress/Progress.js +54 -0
- package/_internal/components/progress/ProgressCircular.d.ts +20 -0
- package/_internal/components/progress/ProgressCircular.js +31 -0
- package/_internal/components/progress/ProgressLinear.d.ts +20 -0
- package/_internal/components/progress/ProgressLinear.js +26 -0
- package/_internal/components/progress/index.d.ts +4 -0
- package/_internal/components/progress-tracker/ProgressTracker.d.ts +26 -0
- package/_internal/components/progress-tracker/ProgressTracker.js +75 -0
- package/_internal/components/progress-tracker/ProgressTrackerProvider.d.ts +29 -0
- package/_internal/components/progress-tracker/ProgressTrackerProvider.js +45 -0
- package/_internal/components/progress-tracker/ProgressTrackerStep.d.ts +37 -0
- package/_internal/components/progress-tracker/ProgressTrackerStep.js +107 -0
- package/_internal/components/progress-tracker/ProgressTrackerStepPanel.d.ts +27 -0
- package/_internal/components/progress-tracker/ProgressTrackerStepPanel.js +47 -0
- package/_internal/components/progress-tracker/index.d.ts +4 -0
- package/_internal/components/radio-button/RadioButton.d.ts +23 -0
- package/_internal/components/radio-button/RadioButton.js +50 -0
- package/_internal/components/radio-button/RadioGroup.d.ts +20 -0
- package/_internal/components/radio-button/RadioGroup.js +23 -0
- package/_internal/components/radio-button/index.d.ts +2 -0
- package/_internal/components/select/Select.d.ts +20 -0
- package/_internal/components/select/Select.js +130 -0
- package/_internal/components/select/SelectMultiple.d.ts +24 -0
- package/_internal/components/select/SelectMultiple.js +128 -0
- package/_internal/components/select/WithSelectContext.js +96 -0
- package/_internal/components/select/constants.d.ts +59 -0
- package/_internal/components/select/constants.js +10 -0
- package/_internal/components/select/index.d.ts +3 -0
- package/_internal/components/select-button/SelectButton.d.ts +93 -0
- package/_internal/components/select-button/SelectButton.js +73 -0
- package/_internal/components/select-button/index.d.ts +18 -0
- package/_internal/components/select-button/index.js +11 -0
- package/_internal/components/select-text-field/SelectTextField.d.ts +80 -0
- package/_internal/components/select-text-field/SelectTextField.js +167 -0
- package/_internal/components/select-text-field/index.d.ts +33 -0
- package/_internal/components/select-text-field/index.js +24 -0
- package/_internal/components/side-navigation/SideNavigation.d.ts +22 -0
- package/_internal/components/side-navigation/SideNavigation.js +39 -0
- package/_internal/components/side-navigation/SideNavigationItem.d.ts +44 -0
- package/_internal/components/side-navigation/SideNavigationItem.js +111 -0
- package/_internal/components/side-navigation/index.d.ts +2 -0
- package/_internal/components/skeleton/SkeletonCircle.d.ts +19 -0
- package/_internal/components/skeleton/SkeletonCircle.js +30 -0
- package/_internal/components/skeleton/SkeletonRectangle.d.ts +19 -0
- package/_internal/components/skeleton/SkeletonRectangle.js +33 -0
- package/_internal/components/skeleton/SkeletonTypography.d.ts +19 -0
- package/_internal/components/skeleton/SkeletonTypography.js +31 -0
- package/_internal/components/skeleton/index.d.ts +4 -0
- package/_internal/components/slider/Slider.d.ts +44 -0
- package/_internal/components/slider/Slider.js +232 -0
- package/_internal/components/slider/index.d.ts +2 -0
- package/_internal/components/slideshow/Slides.d.ts +49 -0
- package/_internal/components/slideshow/Slides.js +86 -0
- package/_internal/components/slideshow/Slideshow.d.ts +35 -0
- package/_internal/components/slideshow/Slideshow.js +104 -0
- package/_internal/components/slideshow/SlideshowControls.d.ts +65 -0
- package/_internal/components/slideshow/SlideshowControls.js +139 -0
- package/_internal/components/slideshow/SlideshowItem.d.ts +23 -0
- package/_internal/components/slideshow/SlideshowItem.js +32 -0
- package/_internal/components/slideshow/SlideshowItemGroup.js +44 -0
- package/_internal/components/slideshow/constants.d.ts +13 -0
- package/_internal/components/slideshow/constants.js +16 -0
- package/_internal/components/slideshow/index.d.ts +4 -0
- package/_internal/components/slideshow/usePaginationVisibleRange.js +41 -0
- package/_internal/components/slideshow/useSlideFocusManagement.js +64 -0
- package/_internal/components/slideshow/useSlideScroll.js +57 -0
- package/_internal/components/slideshow/useSwipeNavigate.js +21 -0
- package/_internal/components/switch/Switch.d.ts +24 -0
- package/_internal/components/switch/Switch.js +54 -0
- package/_internal/components/switch/index.d.ts +1 -0
- package/_internal/components/table/Table.d.ts +20 -0
- package/_internal/components/table/Table.js +28 -0
- package/_internal/components/table/TableBody.d.ts +20 -0
- package/_internal/components/table/TableBody.js +22 -0
- package/_internal/components/table/TableCell.d.ts +23 -0
- package/_internal/components/table/TableCell.js +23 -0
- package/_internal/components/table/TableHeader.d.ts +20 -0
- package/_internal/components/table/TableHeader.js +23 -0
- package/_internal/components/table/TableRow.d.ts +23 -0
- package/_internal/components/table/TableRow.js +28 -0
- package/_internal/components/table/index.d.ts +6 -0
- package/_internal/components/tabs/Tab.d.ts +39 -0
- package/_internal/components/tabs/Tab.js +39 -0
- package/_internal/components/tabs/TabList.d.ts +22 -0
- package/_internal/components/tabs/TabList.js +37 -0
- package/_internal/components/tabs/TabPanel.d.ts +25 -0
- package/_internal/components/tabs/TabPanel.js +30 -0
- package/_internal/components/tabs/TabProvider.d.ts +27 -0
- package/_internal/components/tabs/TabProvider.js +51 -0
- package/_internal/components/tabs/index.d.ts +5 -0
- package/_internal/components/tabs/state.js +55 -0
- package/_internal/components/text/Text.d.ts +17 -0
- package/_internal/components/text/Text.js +33 -0
- package/_internal/components/text/index.d.ts +1 -0
- package/_internal/components/text-field/RawInputText.d.ts +20 -0
- package/_internal/components/text-field/RawInputText.js +23 -0
- package/_internal/components/text-field/RawInputTextarea.d.ts +21 -0
- package/_internal/components/text-field/RawInputTextarea.js +34 -0
- package/_internal/components/text-field/TextField.d.ts +46 -0
- package/_internal/components/text-field/TextField.js +122 -0
- package/_internal/components/text-field/index.d.ts +3 -0
- package/_internal/components/text-field/useFitRowsToContent.js +27 -0
- package/_internal/components/thumbnail/Thumbnail.d.ts +31 -0
- package/_internal/components/thumbnail/Thumbnail.js +45 -0
- package/_internal/components/thumbnail/index.d.ts +3 -0
- package/_internal/components/thumbnail/types.d.ts +49 -0
- package/_internal/components/thumbnail/types.js +23 -0
- package/_internal/components/thumbnail/useFocusPointStyle.d.ts +15 -0
- package/_internal/components/thumbnail/useFocusPointStyle.js +53 -0
- package/_internal/components/thumbnail/useImageLoad.js +23 -0
- package/_internal/components/time-picker-field/TimePickerField.d.ts +38 -0
- package/_internal/components/time-picker-field/TimePickerField.js +103 -0
- package/_internal/components/time-picker-field/index.d.ts +2 -0
- package/_internal/components/toolbar/Toolbar.d.ts +28 -0
- package/_internal/components/toolbar/Toolbar.js +21 -0
- package/_internal/components/toolbar/index.d.ts +1 -0
- package/_internal/components/tooltip/Tooltip.d.ts +23 -0
- package/_internal/components/tooltip/Tooltip.js +69 -0
- package/_internal/components/tooltip/context.js +15 -0
- package/_internal/components/tooltip/index.d.ts +2 -0
- package/_internal/components/tooltip/useInjectTooltipRef.js +43 -0
- package/_internal/components/tooltip/useTooltipOpen.js +36 -0
- package/_internal/components/uploader/Uploader.d.ts +29 -0
- package/_internal/components/uploader/Uploader.js +71 -0
- package/_internal/components/uploader/index.d.ts +2 -0
- package/_internal/components/user-block/UserBlock.d.ts +33 -0
- package/_internal/components/user-block/UserBlock.js +88 -0
- package/_internal/components/user-block/index.d.ts +2 -0
- package/_internal/constants.js +2 -0
- package/_internal/hooks/useBooleanState.js +13 -0
- package/_internal/hooks/useCallbackOnEscape.js +30 -0
- package/_internal/hooks/useChipGroupNavigation.d.ts +12 -0
- package/_internal/hooks/useChipGroupNavigation.js +49 -0
- package/_internal/hooks/useClickAway.d.ts +16 -0
- package/_internal/hooks/useClickAway.js +20 -0
- package/_internal/hooks/useDisableBodyScroll.js +25 -0
- package/_internal/hooks/useEventCallback.js +21 -0
- package/_internal/hooks/useFocus.js +19 -0
- package/_internal/hooks/useFocusTrap.js +28 -0
- package/_internal/hooks/useFocusWithin.js +27 -0
- package/_internal/hooks/useId.js +16 -0
- package/_internal/hooks/useImageSize.js +19 -0
- package/_internal/hooks/useInfiniteScroll.js +36 -0
- package/_internal/hooks/useIntersectionObserver.js +24 -0
- package/_internal/hooks/useInterval.js +26 -0
- package/_internal/hooks/useIsomorphicLayoutEffect.js +9 -0
- package/_internal/hooks/useKeyboardListNavigation.d.ts +17 -0
- package/_internal/hooks/useKeyboardListNavigation.js +136 -0
- package/_internal/hooks/useListenFocus.js +23 -0
- package/_internal/hooks/useOverflowTooltipLabel.js +27 -0
- package/_internal/hooks/usePreviousValue.js +15 -0
- package/_internal/hooks/useRestoreFocusOnClose.js +47 -0
- package/_internal/hooks/useRovingTabIndexContainer.js +31 -0
- package/_internal/hooks/useSizeOnWindowResize.js +26 -0
- package/_internal/hooks/useSlideshowControls.d.ts +63 -0
- package/_internal/hooks/useSlideshowControls.js +105 -0
- package/_internal/hooks/useStopPropagation.js +18 -0
- package/_internal/hooks/useTransitionVisibility.js +41 -0
- package/_internal/node_modules/@floating-ui/core/dist/floating-ui.core.js +536 -0
- package/_internal/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +528 -0
- package/_internal/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +209 -0
- package/_internal/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -0
- package/_internal/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +135 -0
- package/_internal/node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js +114 -0
- package/_internal/node_modules/classnames/index.js +45 -0
- package/_internal/packages/lumx-core/src/js/components/AlertDialog/index.d.ts +15 -0
- package/_internal/packages/lumx-core/src/js/components/AlertDialog/index.js +116 -0
- package/_internal/packages/lumx-core/src/js/components/Avatar/index.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/Avatar/index.js +49 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/BadgeWrapper.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/BadgeWrapper.js +21 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/index.d.ts +18 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/index.js +38 -0
- package/_internal/packages/lumx-core/src/js/components/Button/Button.d.ts +41 -0
- package/_internal/packages/lumx-core/src/js/components/Button/Button.js +46 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonGroup.d.ts +17 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonGroup.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonRoot.d.ts +46 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonRoot.js +75 -0
- package/_internal/packages/lumx-core/src/js/components/Button/IconButton.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/Button/IconButton.js +46 -0
- package/_internal/packages/lumx-core/src/js/components/Checkbox/index.d.ts +35 -0
- package/_internal/packages/lumx-core/src/js/components/Checkbox/index.js +83 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/ChipGroup.d.ts +21 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/ChipGroup.js +32 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/SelectionChipGroup.d.ts +29 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/SelectionChipGroup.js +66 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/index.d.ts +63 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/index.js +78 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/setupSelectionChipGroupEvents.js +97 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxButton.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxButton.js +51 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxInput.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxInput.js +56 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxList.d.ts +36 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxList.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOption.d.ts +53 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOption.js +73 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionAction.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.d.ts +29 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.js +53 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.d.ts +32 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.js +44 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxPopover.js +47 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxSection.d.ts +36 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxSection.js +36 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxState.d.ts +64 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxState.js +86 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/constants.js +4 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupCombobox.js +350 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupComboboxButton.js +84 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupComboboxInput.js +95 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupListbox.js +84 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/subscribeComboboxState.js +43 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/types.d.ts +59 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/utils.js +63 -0
- package/_internal/packages/lumx-core/src/js/components/Dialog/index.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/components/Dialog/index.js +93 -0
- package/_internal/packages/lumx-core/src/js/components/Divider/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/Divider/index.js +29 -0
- package/_internal/packages/lumx-core/src/js/components/DragHandle/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/DragHandle/index.js +37 -0
- package/_internal/packages/lumx-core/src/js/components/ExpansionPanel/index.d.ts +51 -0
- package/_internal/packages/lumx-core/src/js/components/ExpansionPanel/index.js +92 -0
- package/_internal/packages/lumx-core/src/js/components/Flag/index.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/Flag/index.js +41 -0
- package/_internal/packages/lumx-core/src/js/components/FlexBox/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/FlexBox/index.js +39 -0
- package/_internal/packages/lumx-core/src/js/components/FlexBox/types.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/constants.d.ts +22 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/constants.js +15 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/index.d.ts +66 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/index.js +63 -0
- package/_internal/packages/lumx-core/src/js/components/GridColumn/GridColumn.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/GridColumn/GridColumn.js +44 -0
- package/_internal/packages/lumx-core/src/js/components/GridColumn/index.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/constants.js +19 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/index.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/index.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/utils.js +14 -0
- package/_internal/packages/lumx-core/src/js/components/Icon/constants.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/components/Icon/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Icon/index.js +66 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/ImageCaption.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/ImageCaption.js +61 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/index.d.ts +52 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/index.js +80 -0
- package/_internal/packages/lumx-core/src/js/components/InlineList/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/InlineList/index.js +48 -0
- package/_internal/packages/lumx-core/src/js/components/InputHelper/constants.js +9 -0
- package/_internal/packages/lumx-core/src/js/components/InputHelper/index.d.ts +21 -0
- package/_internal/packages/lumx-core/src/js/components/InputHelper/index.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/InputLabel/index.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/InputLabel/index.js +31 -0
- package/_internal/packages/lumx-core/src/js/components/Lightbox/index.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/components/Lightbox/index.js +70 -0
- package/_internal/packages/lumx-core/src/js/components/Link/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Link/index.js +40 -0
- package/_internal/packages/lumx-core/src/js/components/LinkPreview/index.d.ts +36 -0
- package/_internal/packages/lumx-core/src/js/components/LinkPreview/index.js +94 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListDivider.d.ts +12 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListDivider.js +36 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListItem.d.ts +41 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListItem.js +66 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListItemAction.d.ts +10 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListItemAction.js +36 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListSection.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListSection.js +51 -0
- package/_internal/packages/lumx-core/src/js/components/List/index.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/components/List/index.js +37 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuButton.d.ts +28 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuButton.js +29 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuItem.d.ts +30 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuItem.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuList.js +20 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuPopover.d.ts +12 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuPopover.js +32 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuTrigger.js +20 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/setupMenu.js +256 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/utils.js +16 -0
- package/_internal/packages/lumx-core/src/js/components/Message/index.d.ts +31 -0
- package/_internal/packages/lumx-core/src/js/components/Message/index.js +85 -0
- package/_internal/packages/lumx-core/src/js/components/Mosaic/index.d.ts +18 -0
- package/_internal/packages/lumx-core/src/js/components/Mosaic/index.js +70 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/constants.d.ts +39 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/constants.js +37 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/index.d.ts +65 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/index.js +74 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/types.d.ts +39 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/buildPopoverMiddleware.js +53 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/computeArrowStyles.js +13 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/getFloatingPlacement.js +10 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/parseAutoPlacement.js +21 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/parseFitWidth.js +12 -0
- package/_internal/packages/lumx-core/src/js/components/PopoverDialog/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/PopoverDialog/index.js +15 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressCircular/index.d.ts +32 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressCircular/index.js +57 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressLinear/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressLinear/index.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/RadioButton/index.d.ts +35 -0
- package/_internal/packages/lumx-core/src/js/components/RadioButton/index.js +71 -0
- package/_internal/packages/lumx-core/src/js/components/RadioGroup/index.d.ts +15 -0
- package/_internal/packages/lumx-core/src/js/components/RadioGroup/index.js +35 -0
- package/_internal/packages/lumx-core/src/js/components/RawClickable/index.d.ts +17 -0
- package/_internal/packages/lumx-core/src/js/components/RawClickable/index.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/SelectButton/index.d.ts +58 -0
- package/_internal/packages/lumx-core/src/js/components/SelectButton/index.js +85 -0
- package/_internal/packages/lumx-core/src/js/components/SelectTextField/index.js +78 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonCircle.d.ts +18 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonCircle.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonRectangle.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonRectangle.js +49 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonTypography.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonTypography.js +38 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/index.d.ts +3 -0
- package/_internal/packages/lumx-core/src/js/components/Switch/index.d.ts +37 -0
- package/_internal/packages/lumx-core/src/js/components/Switch/index.js +78 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableBody.d.ts +15 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableBody.js +29 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableCell.d.ts +42 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableCell.js +101 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableHeader.d.ts +15 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableHeader.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableRow.d.ts +22 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableRow.js +42 -0
- package/_internal/packages/lumx-core/src/js/components/Table/constants.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/Table/constants.js +11 -0
- package/_internal/packages/lumx-core/src/js/components/Table/index.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/components/Table/index.js +31 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/Tab.d.ts +54 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/Tab.js +69 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabList.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabList.js +52 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabPanel.d.ts +26 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabPanel.js +41 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/constants.js +7 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/state.js +53 -0
- package/_internal/packages/lumx-core/src/js/components/Text/index.d.ts +55 -0
- package/_internal/packages/lumx-core/src/js/components/Text/index.js +50 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputText.d.ts +21 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputText.js +40 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputTextarea.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputTextarea.js +40 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/TextField.d.ts +70 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/TextField.js +143 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/constants.js +15 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/index.d.ts +60 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/index.js +114 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/types.d.ts +39 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/utils.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/utils.js +76 -0
- package/_internal/packages/lumx-core/src/js/components/TimePickerField/index.d.ts +70 -0
- package/_internal/packages/lumx-core/src/js/components/TimePickerField/index.js +53 -0
- package/_internal/packages/lumx-core/src/js/components/Toolbar/index.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/components/Toolbar/index.js +51 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/constants.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/constants.js +8 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/index.d.ts +25 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/index.js +55 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/tooltipOpenManager.js +93 -0
- package/_internal/packages/lumx-core/src/js/components/Uploader/index.d.ts +59 -0
- package/_internal/packages/lumx-core/src/js/components/Uploader/index.js +79 -0
- package/_internal/packages/lumx-core/src/js/components/UserBlock/index.d.ts +124 -0
- package/_internal/packages/lumx-core/src/js/components/UserBlock/index.js +101 -0
- package/_internal/packages/lumx-core/src/js/constants/browser/index.js +7 -0
- package/_internal/packages/lumx-core/src/js/constants/components/index.js +19 -0
- package/_internal/packages/lumx-core/src/js/constants/enums/index.d.ts +184 -0
- package/_internal/packages/lumx-core/src/js/constants/enums/index.js +140 -0
- package/_internal/packages/lumx-core/src/js/constants/index.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/types/AriaAttributes.d.ts +32 -0
- package/_internal/packages/lumx-core/src/js/types/Booleanish.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/types/CommonRef.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/types/GenericProps.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/types/HasAriaDisabled.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasAriaLabelOrLabelledBy.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/types/HasChecked.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasClassName.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasCloseMode.d.ts +10 -0
- package/_internal/packages/lumx-core/src/js/types/HasDisabled.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasPolymorphicAs.d.ts +12 -0
- package/_internal/packages/lumx-core/src/js/types/HasRequiredLinkHref.d.ts +6 -0
- package/_internal/packages/lumx-core/src/js/types/HasTheme.d.ts +10 -0
- package/_internal/packages/lumx-core/src/js/types/HeadingElement.d.ts +5 -0
- package/_internal/packages/lumx-core/src/js/types/JSXElement.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/types/KebabCase.d.ts +5 -0
- package/_internal/packages/lumx-core/src/js/types/LumxClassName.d.ts +7 -0
- package/_internal/packages/lumx-core/src/js/types/Selector.d.ts +11 -0
- package/_internal/packages/lumx-core/src/js/types/TextElement.d.ts +7 -0
- package/_internal/packages/lumx-core/src/js/types/ValueOf.d.ts +5 -0
- package/_internal/packages/lumx-core/src/js/types/index.d.ts +18 -0
- package/_internal/packages/lumx-core/src/js/utils/ClickAway/index.js +37 -0
- package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/index.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/index.js +21 -0
- package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/setupInfiniteScrollObserver.js +18 -0
- package/_internal/packages/lumx-core/src/js/utils/Portal/index.d.ts +28 -0
- package/_internal/packages/lumx-core/src/js/utils/_internal/color/resolveColorWithVariants.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/createSelectorTreeWalker.js +20 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/css/combineSize.js +14 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/css/resolveCssSize.js +8 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/css/types.d.ts +7 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/isFocusVisible.js +11 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/isHoverNotSupported.js +5 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/isPrintableKey.js +12 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/lastDescendant.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/querySelectorInclusive.js +18 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/trackContainerFocus.js +28 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/action-area/index.js +22 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/block.js +18 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/element.js +7 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/index.js +22 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/modifier.js +19 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/color/index.js +38 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/index.js +12 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/spacing/index.js +31 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/typography/index.js +10 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/visually-hidden/index.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/disabledState/index.js +13 -0
- package/_internal/packages/lumx-core/src/js/utils/events/keyboard.js +15 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/constants.js +13 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/getFirstAndLastFocusable.js +20 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/getFocusableElements.js +8 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/setupFocusTrap.js +83 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createActiveItemState.js +38 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createGridFocusNavigation.js +182 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createListFocusNavigation.js +151 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createPendingNavigation.js +23 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/setupRovingTabIndex.js +167 -0
- package/_internal/packages/lumx-core/src/js/utils/function/listenerTower.js +25 -0
- package/_internal/packages/lumx-core/src/js/utils/iterable/first.js +8 -0
- package/_internal/packages/lumx-core/src/js/utils/locale/getCurrentLocale.js +10 -0
- package/_internal/packages/lumx-core/src/js/utils/select/findOptionById.js +19 -0
- package/_internal/packages/lumx-core/src/js/utils/select/getOptionDisplayName.js +19 -0
- package/_internal/packages/lumx-core/src/js/utils/select/renderSelectOptions.js +51 -0
- package/_internal/packages/lumx-core/src/js/utils/select/toggleSelection.js +39 -0
- package/_internal/packages/lumx-core/src/js/utils/select/types.d.ts +203 -0
- package/_internal/packages/lumx-core/src/js/utils/selectors/getWithSelector.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/selectors/groupBySelector.js +21 -0
- package/_internal/packages/lumx-core/src/js/utils/time/buildTimeList.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/utils/time/buildTimeList.js +36 -0
- package/_internal/packages/lumx-core/src/js/utils/time/formatTime.js +14 -0
- package/_internal/packages/lumx-core/src/js/utils/time/getDateAtTime.js +12 -0
- package/_internal/packages/lumx-core/src/js/utils/time/isDateOnTime.js +10 -0
- package/_internal/packages/lumx-core/src/js/utils/time/parseTimeInput.js +46 -0
- package/_internal/packages/lumx-core/src/js/utils/time/snapTimeToBounds.js +21 -0
- package/_internal/packages/lumx-core/src/js/utils/time/timeOfDayMinutes.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/typeahead/index.js +77 -0
- package/_internal/utils/A11YLiveMessage/index.d.ts +50 -0
- package/_internal/utils/A11YLiveMessage/index.js +28 -0
- package/_internal/utils/ClickAwayProvider/ClickAwayProvider.d.ts +23 -0
- package/_internal/utils/ClickAwayProvider/ClickAwayProvider.js +46 -0
- package/_internal/utils/ClickAwayProvider/index.d.ts +1 -0
- package/_internal/utils/InfiniteScroll/InfiniteScroll.d.ts +10 -0
- package/_internal/utils/InfiniteScroll/InfiniteScroll.js +18 -0
- package/_internal/utils/InfiniteScroll/index.d.ts +2 -0
- package/_internal/utils/Portal/Portal.d.ts +15 -0
- package/_internal/utils/Portal/Portal.js +23 -0
- package/_internal/utils/Portal/PortalProvider.d.ts +14 -0
- package/_internal/utils/Portal/PortalProvider.js +9 -0
- package/_internal/utils/Portal/index.d.ts +3 -0
- package/_internal/utils/browser/DOM/findImage.js +5 -0
- package/_internal/utils/browser/DOM/startViewTransition.js +47 -0
- package/_internal/utils/browser/isReducedMotion.js +8 -0
- package/_internal/utils/browser/isScrollSnapSupported.js +8 -0
- package/_internal/utils/browser/onScrollEnd.js +25 -0
- package/_internal/utils/date/addMonthResetDay.js +12 -0
- package/_internal/utils/date/formatDayNumber.js +8 -0
- package/_internal/utils/date/getFirstDayOfWeek.js +42 -0
- package/_internal/utils/date/getMonthCalendar.js +43 -0
- package/_internal/utils/date/getWeekDays.js +25 -0
- package/_internal/utils/date/getYearDisplayName.js +12 -0
- package/_internal/utils/date/isDateValid.js +7 -0
- package/_internal/utils/date/isSameDay.js +8 -0
- package/_internal/utils/disabled/DisabledStateContext.d.ts +21 -0
- package/_internal/utils/disabled/DisabledStateContext.js +22 -0
- package/_internal/utils/disabled/index.d.ts +1 -0
- package/_internal/utils/disabled/useDisableStateProps.d.ts +1 -0
- package/_internal/utils/disabled/useDisableStateProps.js +29 -0
- package/_internal/utils/locale/parseLocale.js +26 -0
- package/_internal/utils/moving-focus/components/MovingFocusProvider/context.d.ts +14 -0
- package/_internal/utils/moving-focus/components/MovingFocusProvider/context.js +10 -0
- package/_internal/utils/moving-focus/components/MovingFocusProvider/index.d.ts +21 -0
- package/_internal/utils/moving-focus/components/MovingFocusProvider/index.js +58 -0
- package/_internal/utils/moving-focus/constants.d.ts +19 -0
- package/_internal/utils/moving-focus/constants.js +25 -0
- package/_internal/utils/moving-focus/ducks/keyboard-navigation.js +453 -0
- package/_internal/utils/moving-focus/ducks/slice.js +50 -0
- package/_internal/utils/moving-focus/ducks/tab-stop.js +109 -0
- package/_internal/utils/moving-focus/hooks/useRovingTabIndex/index.d.ts +1 -0
- package/_internal/utils/moving-focus/hooks/useRovingTabIndex/useRovingTabIndex.d.ts +19 -0
- package/_internal/utils/moving-focus/hooks/useRovingTabIndex/useRovingTabIndex.js +81 -0
- package/_internal/utils/moving-focus/hooks/useVirtualFocus/index.d.ts +2 -0
- package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocus.d.ts +15 -0
- package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocus.js +83 -0
- package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocusParent.d.ts +10 -0
- package/_internal/utils/moving-focus/hooks/useVirtualFocus/useVirtualFocusParent.js +47 -0
- package/_internal/utils/moving-focus/index.d.ts +5 -0
- package/_internal/utils/moving-focus/types.d.ts +177 -0
- package/_internal/utils/moving-focus/utils/buildLoopAroundObject.js +22 -0
- package/_internal/utils/moving-focus/utils/createGridMap.js +17 -0
- package/_internal/utils/moving-focus/utils/getCell.js +94 -0
- package/_internal/utils/moving-focus/utils/getCellCoordinates.js +16 -0
- package/_internal/utils/moving-focus/utils/getPointerTypeFromEvent.js +11 -0
- package/_internal/utils/moving-focus/utils/shouldLoopListHorizontally.js +7 -0
- package/_internal/utils/moving-focus/utils/shouldLoopListVertically.js +7 -0
- package/_internal/utils/moving-focus/utils/tabStopIsEnabled.js +5 -0
- package/_internal/utils/number/clamp.d.ts +12 -0
- package/_internal/utils/number/clamp.js +16 -0
- package/_internal/utils/object/isEqual.js +14 -0
- package/_internal/utils/partitionMulti.js +24 -0
- package/_internal/utils/react/OnBeforeUnmount.js +17 -0
- package/_internal/utils/react/forwardRef.js +8 -0
- package/_internal/utils/react/forwardRefPolymorphic.js +6 -0
- package/_internal/utils/react/mergeRefs.js +22 -0
- package/_internal/utils/react/skipRender.js +19 -0
- package/_internal/utils/react/unref.js +8 -0
- package/_internal/utils/react/wrapChildrenIconWithSpaces.js +19 -0
- package/_internal/utils/theme/ThemeContext.d.ts +14 -0
- package/_internal/utils/theme/ThemeContext.js +11 -0
- package/_internal/utils/type/Comp.d.ts +15 -0
- package/_internal/utils/type/ComponentRef.d.ts +15 -0
- package/_internal/utils/type/HasPolymorphicAs.d.ts +9 -0
- package/_internal/utils/type/MaybeElementOrRef.d.ts +9 -0
- package/_internal/utils/type/ReactToJSX.d.ts +13 -0
- package/_internal/utils/type/index.d.ts +15 -0
- package/_internal/utils/type/isComponent.d.ts +13 -0
- package/_internal/utils/type/isComponent.js +27 -0
- package/_internal/utils/type/isComponentType.d.ts +9 -0
- package/_internal/utils/type/isComponentType.js +8 -0
- package/index.d.ts +150 -5788
- package/index.js +247 -22493
- package/package.json +8 -21
- package/utils/index.d.ts +14 -413
- package/utils/index.js +12 -1440
- package/_internal/BvaFEHZn.js +0 -262
- package/_internal/BvaFEHZn.js.map +0 -1
- package/index.js.map +0 -1
- package/utils/index.js.map +0 -1
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/hooks/useId.ts","../src/utils/react/forwardRef.ts","../../lumx-core/src/js/constants/components/index.ts","../../lumx-core/src/js/constants/enums/index.ts","../../lumx-core/src/js/constants/browser/index.ts","../../../node_modules/classnames/index.js","../../lumx-core/src/js/utils/classNames/bem/modifier.ts","../../lumx-core/src/js/utils/classNames/bem/block.ts","../../lumx-core/src/js/utils/classNames/action-area/index.ts","../../lumx-core/src/js/utils/_internal/color/resolveColorWithVariants.ts","../../lumx-core/src/js/utils/classNames/color/index.ts","../../lumx-core/src/js/utils/classNames/typography/index.ts","../../lumx-core/src/js/utils/classNames/spacing/index.ts","../../lumx-core/src/js/utils/classNames/visually-hidden/index.ts","../../lumx-core/src/js/utils/classNames/bem/element.ts","../../lumx-core/src/js/utils/classNames/bem/index.ts","../../lumx-core/src/js/utils/events/keyboard.ts","../../lumx-core/src/js/utils/selectors/getWithSelector.ts","../../lumx-core/src/js/utils/selectors/groupBySelector.ts","../../lumx-core/src/js/components/AlertDialog/index.tsx","../src/components/alert-dialog/AlertDialog.tsx","../src/hooks/useFocus.tsx","../src/utils/react/mergeRefs.ts","../src/utils/theme/ThemeContext.ts","../src/utils/disabled/useDisableStateProps.tsx","../src/components/autocomplete/Autocomplete.tsx","../src/components/autocomplete/AutocompleteMultiple.tsx","../../lumx-core/src/js/components/Avatar/index.tsx","../src/components/avatar/Avatar.tsx","../../lumx-core/src/js/components/Badge/index.tsx","../src/components/badge/Badge.tsx","../../lumx-core/src/js/components/Badge/BadgeWrapper.tsx","../src/components/badge/BadgeWrapper.tsx","../../lumx-core/src/js/components/RawClickable/index.tsx","../../lumx-core/src/js/components/Button/ButtonRoot.tsx","../../lumx-core/src/js/components/Button/Button.tsx","../src/utils/type/isComponent.ts","../src/components/button/Button.tsx","../../lumx-core/src/js/components/Icon/index.tsx","../../lumx-core/src/js/components/Button/IconButton.tsx","../src/components/button/IconButton.tsx","../../lumx-core/src/js/components/Button/ButtonGroup.tsx","../src/components/button/ButtonGroup.tsx","../../lumx-core/src/js/components/InputLabel/index.tsx","../../lumx-core/src/js/components/InputHelper/constants.ts","../../lumx-core/src/js/components/InputHelper/index.tsx","../../lumx-core/src/js/components/Checkbox/index.tsx","../src/components/checkbox/Checkbox.tsx","../src/hooks/useStopPropagation.ts","../../lumx-core/src/js/components/Chip/index.tsx","../src/components/chip/Chip.tsx","../../lumx-core/src/js/components/Chip/ChipGroup.tsx","../src/hooks/useChipGroupNavigation.tsx","../src/components/chip/ChipGroup.tsx","../../lumx-core/src/js/components/Chip/SelectionChipGroup.tsx","../../lumx-core/src/js/utils/browser/createSelectorTreeWalker.ts","../../lumx-core/src/js/components/Chip/setupSelectionChipGroupEvents.ts","../src/components/icon/Icon.tsx","../src/components/tooltip/context.tsx","../src/hooks/useOverflowTooltipLabel.tsx","../src/utils/type/isComponentType.ts","../src/utils/react/wrapChildrenIconWithSpaces.tsx","../../lumx-core/src/js/components/Text/index.tsx","../src/components/text/Text.tsx","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../../lumx-core/src/js/components/Tooltip/constants.ts","../../lumx-core/src/js/components/Tooltip/index.tsx","../src/components/tooltip/useInjectTooltipRef.tsx","../../lumx-core/src/js/utils/function/listenerTower.ts","../src/hooks/useCallbackOnEscape.ts","../../lumx-core/src/js/utils/browser/isFocusVisible.ts","../../lumx-core/src/js/utils/browser/isHoverNotSupported.ts","../../lumx-core/src/js/components/Tooltip/tooltipOpenManager.ts","../src/components/tooltip/useTooltipOpen.tsx","../src/components/tooltip/Tooltip.tsx","../../lumx-core/src/js/utils/focusNavigation/createPendingNavigation.ts","../../lumx-core/src/js/utils/focusNavigation/createListFocusNavigation.ts","../../lumx-core/src/js/utils/focusNavigation/createActiveItemState.ts","../../lumx-core/src/js/utils/browser/lastDescendant.ts","../../lumx-core/src/js/utils/iterable/first.ts","../../lumx-core/src/js/utils/focusNavigation/createGridFocusNavigation.ts","../../lumx-core/src/js/utils/browser/querySelectorInclusive.ts","../../lumx-core/src/js/utils/browser/trackContainerFocus.ts","../../lumx-core/src/js/utils/focusNavigation/setupRovingTabIndex.ts","../src/hooks/useIsomorphicLayoutEffect.tsx","../src/hooks/useEventCallback.tsx","../src/utils/react/unref.ts","../src/hooks/useRovingTabIndexContainer.tsx","../src/components/chip/SelectionChipGroup.tsx","../../lumx-core/src/js/components/Combobox/utils.ts","../../lumx-core/src/js/components/Combobox/setupListbox.ts","../../lumx-core/src/js/components/Combobox/setupCombobox.ts","../../lumx-core/src/js/utils/typeahead/index.ts","../../lumx-core/src/js/utils/browser/isPrintableKey.ts","../../lumx-core/src/js/components/Combobox/setupComboboxButton.ts","../../lumx-core/src/js/components/Combobox/ComboboxButton.tsx","../src/utils/react/forwardRefPolymorphic.ts","../src/components/combobox/context/ComboboxContext.ts","../src/components/combobox/context/useComboboxEvent.ts","../src/components/combobox/context/useComboboxOpen.ts","../src/components/combobox/ComboboxButton.tsx","../../lumx-core/src/js/components/Combobox/setupComboboxInput.ts","../../lumx-core/src/js/utils/disabledState/index.ts","../../lumx-core/src/js/components/Combobox/ComboboxInput.tsx","../../lumx-core/src/js/components/TextField/constants.ts","../../lumx-core/src/js/components/TextField/TextField.tsx","../../lumx-core/src/js/components/TextField/RawInputText.tsx","../src/components/text-field/RawInputText.tsx","../../lumx-core/src/js/components/TextField/RawInputTextarea.tsx","../src/components/text-field/useFitRowsToContent.ts","../src/components/text-field/RawInputTextarea.tsx","../src/components/text-field/TextField.tsx","../src/components/combobox/ComboboxInput.tsx","../../lumx-core/src/js/components/List/index.tsx","../../lumx-core/src/js/components/Combobox/ComboboxList.tsx","../src/components/combobox/context/ComboboxListContext.ts","../src/components/combobox/ComboboxList.tsx","../../lumx-core/src/js/components/List/ListItem.tsx","../../lumx-core/src/js/components/List/ListItemAction.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOption.tsx","../src/components/combobox/context/ComboboxOptionContext.ts","../src/components/combobox/ComboboxOption.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOptionAction.tsx","../src/components/combobox/ComboboxOptionAction.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.tsx","../../lumx-core/src/js/utils/focus/constants.ts","../../lumx-core/src/js/utils/focus/getFocusableElements.ts","../../lumx-core/src/js/utils/focus/getFirstAndLastFocusable.ts","../../lumx-core/src/js/utils/focus/setupFocusTrap.ts","../src/hooks/useFocusTrap.ts","../src/utils/react/skipRender.tsx","../../lumx-core/src/js/components/Popover/constants.ts","../../lumx-core/src/js/components/Popover/index.tsx","../src/utils/react/OnBeforeUnmount.tsx","../src/hooks/useRestoreFocusOnClose.tsx","../../lumx-core/src/js/components/Popover/utils/parseAutoPlacement.ts","../../lumx-core/src/js/components/Popover/utils/parseFitWidth.ts","../../lumx-core/src/js/utils/browser/css/resolveCssSize.ts","../../lumx-core/src/js/utils/browser/css/combineSize.ts","../../lumx-core/src/js/components/Popover/utils/buildPopoverMiddleware.ts","../../lumx-core/src/js/components/Popover/utils/computeArrowStyles.ts","../../lumx-core/src/js/components/Popover/utils/getFloatingPlacement.ts","../src/components/popover/usePopoverStyle.tsx","../src/components/popover/Popover.tsx","../src/components/combobox/ComboboxOptionMoreInfo.tsx","../../lumx-core/src/js/components/Skeleton/SkeletonTypography.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.tsx","../src/components/combobox/ComboboxOptionSkeleton.tsx","../../lumx-core/src/js/components/Combobox/constants.ts","../../lumx-core/src/js/components/Combobox/ComboboxPopover.tsx","../../lumx-core/src/js/components/FlexBox/index.tsx","../src/components/flex-box/FlexBox.tsx","../src/components/combobox/ComboboxPopover.tsx","../src/components/combobox/ComboboxProvider.tsx","../../lumx-core/src/js/components/Combobox/ComboboxSection.tsx","../../lumx-core/src/js/components/List/ListSection.tsx","../src/components/list/ListSection.tsx","../src/components/combobox/ComboboxSection.tsx","../../lumx-core/src/js/components/Combobox/ComboboxState.tsx","../../lumx-core/src/js/components/Combobox/subscribeComboboxState.ts","../src/utils/partitionMulti.ts","../../lumx-core/src/js/components/GenericBlock/index.tsx","../src/components/generic-block/GenericBlock.tsx","../../lumx-core/src/js/components/GenericBlock/constants.ts","../src/components/combobox/ComboboxState.tsx","../../lumx-core/src/js/components/List/ListDivider.tsx","../src/components/list/ListDivider.tsx","../src/components/combobox/index.ts","../src/components/comment-block/CommentBlock.tsx","../src/utils/date/addMonthResetDay.ts","../src/utils/date/isDateValid.ts","../src/components/date-picker/constants.ts","../src/utils/date/getFirstDayOfWeek.ts","../src/utils/date/getWeekDays.ts","../src/utils/date/getMonthCalendar.ts","../src/utils/date/isSameDay.ts","../../lumx-core/src/js/utils/locale/getCurrentLocale.ts","../src/utils/locale/parseLocale.ts","../src/hooks/usePreviousValue.ts","../src/utils/date/getYearDisplayName.ts","../src/utils/date/formatDayNumber.ts","../src/components/date-picker/DatePickerControlled.tsx","../src/components/date-picker/DatePicker.tsx","../src/hooks/useBooleanState.tsx","../src/components/date-picker/DatePickerField.tsx","../src/hooks/useIntersectionObserver.tsx","../../../node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js","../src/hooks/useDisableBodyScroll.ts","../src/utils/browser/isReducedMotion.ts","../src/hooks/useTransitionVisibility.ts","../../lumx-core/src/js/components/Dialog/index.tsx","../src/components/dialog/Dialog.tsx","../../lumx-core/src/js/components/Divider/index.tsx","../src/components/divider/Divider.tsx","../../lumx-core/src/js/components/DragHandle/index.tsx","../src/components/drag-handle/DragHandle.tsx","../src/hooks/useKeyboardListNavigation.tsx","../src/components/list/List.tsx","../src/hooks/useInfiniteScroll.tsx","../src/components/dropdown/Dropdown.tsx","../../lumx-core/src/js/components/ExpansionPanel/index.tsx","../src/components/expansion-panel/ExpansionPanel.tsx","../../lumx-core/src/js/components/Flag/index.tsx","../src/components/flag/Flag.tsx","../../lumx-core/src/js/components/Heading/constants.ts","../../lumx-core/src/js/components/Heading/index.ts","../src/components/heading/context.tsx","../src/components/heading/useHeadingLevel.tsx","../src/components/heading/Heading.tsx","../../lumx-core/src/js/components/Heading/utils.ts","../src/components/heading/HeadingLevelProvider.tsx","../src/components/grid/Grid.tsx","../src/components/grid/GridItem.tsx","../../lumx-core/src/js/components/GridColumn/GridColumn.tsx","../src/components/grid-column/GridColumn.tsx","../../lumx-core/src/js/components/ImageBlock/index.tsx","../../lumx-core/src/js/components/ImageBlock/ImageCaption.tsx","../src/components/image-block/ImageCaption.tsx","../src/components/image-block/ImageBlock.tsx","../src/components/image-lightbox/constants.ts","../src/hooks/useSizeOnWindowResize.ts","../src/hooks/useImageSize.ts","../src/utils/object/isEqual.ts","../src/components/image-lightbox/internal/usePointerZoom.ts","../src/components/image-lightbox/internal/useAnimateScroll.ts","../src/components/image-lightbox/internal/ImageSlide.tsx","../src/components/image-lightbox/internal/ImageSlideshow.tsx","../src/utils/browser/DOM/startViewTransition.ts","../src/utils/browser/DOM/findImage.tsx","../src/components/image-lightbox/useImageLightbox.tsx","../src/components/image-lightbox/ImageLightbox.tsx","../../lumx-core/src/js/components/InlineList/index.tsx","../src/components/inline-list/InlineList.tsx","../src/components/input-helper/InputHelper.tsx","../src/components/input-label/InputLabel.tsx","../../lumx-core/src/js/components/Lightbox/index.tsx","../src/components/lightbox/Lightbox.tsx","../../lumx-core/src/js/components/Link/index.tsx","../src/components/link/Link.tsx","../../lumx-core/src/js/components/LinkPreview/index.tsx","../src/components/link-preview/LinkPreview.tsx","../src/components/list/ListItemAction.tsx","../src/components/list/ListItem.tsx","../src/components/list/ListSubheader.tsx","../../lumx-core/src/js/components/Menu/MenuButton.tsx","../../lumx-core/src/js/components/Menu/utils.ts","../../lumx-core/src/js/components/Menu/setupMenu.ts","../src/components/menu-button/context/MenuContext.ts","../src/components/menu-button/MenuProvider.tsx","../../lumx-core/src/js/components/Menu/MenuTrigger.tsx","../src/components/menu-button/context/useMenuEvent.ts","../src/components/menu-button/context/useMenuOpen.ts","../src/components/menu-button/MenuTrigger.tsx","../../lumx-core/src/js/components/Menu/MenuPopover.tsx","../src/components/menu-button/MenuPopover.tsx","../../lumx-core/src/js/components/Menu/MenuList.tsx","../src/components/menu-button/MenuList.tsx","../src/components/menu-button/MenuButton.tsx","../../lumx-core/src/js/components/Menu/MenuItem.tsx","../src/components/menu-button/MenuItem.tsx","../../lumx-core/src/js/components/Message/index.tsx","../src/components/message/Message.tsx","../../lumx-core/src/js/components/Mosaic/index.tsx","../src/components/mosaic/Mosaic.tsx","../src/components/navigation/context.tsx","../src/components/navigation/constants.ts","../src/components/navigation/NavigationSection.tsx","../src/components/navigation/NavigationItem.tsx","../src/components/navigation/Navigation.tsx","../src/components/notification/constants.ts","../src/components/notification/Notification.tsx","../../lumx-core/src/js/components/PopoverDialog/index.tsx","../src/components/popover-dialog/PopoverDialog.tsx","../src/components/post-block/PostBlock.tsx","../../lumx-core/src/js/components/ProgressLinear/index.tsx","../src/components/progress/ProgressLinear.tsx","../../lumx-core/src/js/components/ProgressCircular/index.tsx","../src/components/progress/ProgressCircular.tsx","../src/components/progress/Progress.tsx","../../lumx-core/src/js/components/Tabs/state.ts","../src/components/tabs/state.ts","../src/components/progress-tracker/ProgressTrackerProvider.tsx","../src/components/progress-tracker/ProgressTracker.tsx","../src/components/progress-tracker/ProgressTrackerStep.tsx","../src/components/progress-tracker/ProgressTrackerStepPanel.tsx","../../lumx-core/src/js/components/RadioButton/index.tsx","../src/components/radio-button/RadioButton.tsx","../../lumx-core/src/js/components/RadioGroup/index.tsx","../src/components/radio-button/RadioGroup.tsx","../src/hooks/useListenFocus.tsx","../src/components/select/WithSelectContext.tsx","../src/components/select/constants.ts","../src/components/select/Select.tsx","../src/components/select/SelectMultiple.tsx","../../lumx-core/src/js/utils/select/findOptionById.ts","../../lumx-core/src/js/utils/select/toggleSelection.ts","../../lumx-core/src/js/utils/select/getOptionDisplayName.ts","../../lumx-core/src/js/utils/select/renderSelectOptions.tsx","../../lumx-core/src/js/components/SelectButton/index.tsx","../src/components/combobox/wrapRenderOption.tsx","../src/components/select-button/SelectButton.tsx","../src/components/select-button/index.ts","../../lumx-core/src/js/components/SelectTextField/index.tsx","../src/components/select-text-field/SelectTextField.tsx","../src/components/select-text-field/index.ts","../src/components/side-navigation/SideNavigation.tsx","../src/components/side-navigation/SideNavigationItem.tsx","../../lumx-core/src/js/components/Skeleton/SkeletonCircle.tsx","../../lumx-core/src/js/components/Skeleton/SkeletonRectangle.tsx","../src/components/skeleton/SkeletonCircle.tsx","../src/components/skeleton/SkeletonRectangle.tsx","../src/components/skeleton/SkeletonTypography.tsx","../src/utils/number/clamp.ts","../src/components/slider/Slider.tsx","../src/hooks/useInterval.tsx","../src/components/slideshow/constants.ts","../src/hooks/useSlideshowControls.ts","../src/hooks/useFocusWithin.ts","../src/utils/browser/isScrollSnapSupported.ts","../src/components/slideshow/useSlideFocusManagement.tsx","../src/components/slideshow/SlideshowItemGroup.tsx","../src/components/slideshow/Slideshow.tsx","../src/components/slideshow/SlideshowItem.tsx","../src/components/slideshow/useSwipeNavigate.ts","../src/components/slideshow/usePaginationVisibleRange.ts","../src/components/slideshow/SlideshowControls.tsx","../src/utils/browser/onScrollEnd.ts","../src/components/slideshow/useSlideScroll.ts","../src/components/slideshow/Slides.tsx","../../lumx-core/src/js/components/Switch/index.tsx","../src/components/switch/Switch.tsx","../../lumx-core/src/js/components/Table/constants.ts","../../lumx-core/src/js/components/Table/index.tsx","../src/components/table/Table.tsx","../../lumx-core/src/js/components/Table/TableBody.tsx","../src/components/table/TableBody.tsx","../../lumx-core/src/js/components/Table/TableCell.tsx","../src/components/table/TableCell.tsx","../../lumx-core/src/js/components/Table/TableHeader.tsx","../src/components/table/TableHeader.tsx","../../lumx-core/src/js/components/Table/TableRow.tsx","../src/components/table/TableRow.tsx","../src/components/tabs/TabProvider.tsx","../../lumx-core/src/js/components/Tabs/constants.ts","../../lumx-core/src/js/components/Tabs/TabList.tsx","../src/components/tabs/TabList.tsx","../../lumx-core/src/js/components/Tabs/Tab.tsx","../src/components/tabs/Tab.tsx","../../lumx-core/src/js/components/Tabs/TabPanel.tsx","../src/components/tabs/TabPanel.tsx","../../lumx-core/src/js/components/Thumbnail/utils.ts","../../lumx-core/src/js/components/Thumbnail/index.tsx","../src/components/thumbnail/useImageLoad.ts","../src/components/thumbnail/useFocusPointStyle.tsx","../src/components/thumbnail/Thumbnail.tsx","../src/components/thumbnail/types.ts","../../lumx-core/src/js/components/TimePickerField/index.tsx","../../lumx-core/src/js/utils/time/formatTime.ts","../../lumx-core/src/js/utils/time/getDateAtTime.ts","../../lumx-core/src/js/utils/time/timeOfDayMinutes.ts","../../lumx-core/src/js/utils/time/buildTimeList.ts","../../lumx-core/src/js/utils/time/parseTimeInput.ts","../../lumx-core/src/js/utils/time/snapTimeToBounds.ts","../../lumx-core/src/js/utils/time/isDateOnTime.ts","../src/components/time-picker-field/TimePickerField.tsx","../../lumx-core/src/js/components/Toolbar/index.tsx","../src/components/toolbar/Toolbar.tsx","../../lumx-core/src/js/components/Uploader/index.tsx","../src/components/uploader/Uploader.tsx","../../lumx-core/src/js/components/UserBlock/index.tsx","../src/components/user-block/UserBlock.tsx"],"sourcesContent":["import React from 'react';\n\nlet i = 0;\n\n/**\n * Generate a unique id (for use in a11y or other id based DOM linking).\n *\n * (Tries to emulate React 18 useId hook, to remove once we upgrade React)\n */\nexport function useId() {\n return React.useMemo(() => {\n i += 1;\n return `:lumx${i}:`;\n }, []);\n}\n","import React, { type ReactNode, type ForwardedRef } from 'react';\nimport type { Comp } from '../type';\n\ntype ForwardRef = <P, T = HTMLElement, A = unknown>(\n render: (props: P, ref: ForwardedRef<T>) => ReactNode,\n) => Comp<P, T> & A;\n\n/**\n * React.forwardRef but re-typed to attach some custom metadata on our components.\n */\nexport const forwardRef = React.forwardRef as ForwardRef;\n","/**\n * Animation duration constants. Take into consideration that if you change one of these variables,\n * you need to update their scss counterpart as well\n */\nexport const DIALOG_TRANSITION_DURATION = 400;\nexport const EXPANSION_PANEL_TRANSITION_DURATION = 400;\nexport const NOTIFICATION_TRANSITION_DURATION = 200;\nexport const SLIDESHOW_TRANSITION_DURATION = 5000;\n\n/**\n * Delay on hover after which we open or close the tooltip.\n * Only applies to devices supporting pointer hover.\n */\nexport const TOOLTIP_HOVER_DELAY = {\n open: 500,\n close: 500,\n};\n\n/**\n * Delay on long press after which we open or close the tooltip.\n * Only applies to devices not supporting pointer hover.\n */\nexport const TOOLTIP_LONG_PRESS_DELAY = {\n open: 250,\n close: 3000,\n};\n","import type { ValueOf } from '@lumx/core/js/types';\n\n/**\n * Alignments.\n */\nexport const Alignment = {\n bottom: 'bottom',\n center: 'center',\n end: 'end',\n left: 'left',\n right: 'right',\n spaceAround: 'space-around',\n spaceBetween: 'space-between',\n spaceEvenly: 'space-evenly',\n start: 'start',\n top: 'top',\n} as const;\nexport type Alignment = ValueOf<typeof Alignment>;\nexport type VerticalAlignment = Extract<Alignment, 'top' | 'center' | 'bottom'>;\nexport type HorizontalAlignment = Extract<Alignment, 'right' | 'center' | 'left'>;\n\nexport const Theme = {\n light: 'light',\n dark: 'dark',\n} as const;\nexport type Theme = ValueOf<typeof Theme>;\n\nexport const Size = {\n xxs: 'xxs',\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'l',\n xl: 'xl',\n xxl: 'xxl',\n tiny: 'tiny',\n regular: 'regular',\n medium: 'medium',\n big: 'big',\n huge: 'huge',\n} as const;\nexport type Size = ValueOf<typeof Size>;\nexport type GlobalSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;\nexport type AbstractSize = Extract<Size, 'tiny' | 'regular' | 'medium' | 'big' | 'huge'>;\n\nexport const Orientation = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n} as const;\nexport type Orientation = ValueOf<typeof Orientation>;\n\nexport const Emphasis = {\n low: 'low',\n medium: 'medium',\n high: 'high',\n} as const;\nexport type Emphasis = ValueOf<typeof Emphasis>;\n\n/**\n * List of typographies that can't be customized.\n */\nexport const TypographyInterface = {\n overline: 'overline',\n caption: 'caption',\n body1: 'body1',\n body2: 'body2',\n subtitle1: 'subtitle1',\n subtitle2: 'subtitle2',\n title: 'title',\n headline: 'headline',\n display1: 'display1',\n} as const;\nexport type TypographyInterface = ValueOf<typeof TypographyInterface>;\n\n/**\n * List of title typographies that can be customized (via CSS variables).\n */\nexport const TypographyTitleCustom = {\n title1: 'custom-title1',\n title2: 'custom-title2',\n title3: 'custom-title3',\n title4: 'custom-title4',\n title5: 'custom-title5',\n title6: 'custom-title6',\n} as const;\nexport type TypographyTitleCustom = ValueOf<typeof TypographyTitleCustom>;\n\n/**\n * List of typographies that can be customized (via CSS variables).\n */\nexport const TypographyCustom = {\n ...TypographyTitleCustom,\n intro: 'custom-intro',\n 'body-large': 'custom-body-large',\n body: 'custom-body',\n quote: 'custom-quote',\n 'publish-info': 'custom-publish-info',\n button: 'custom-button',\n} as const;\nexport type TypographyCustom = ValueOf<typeof TypographyCustom>;\n\n/**\n * List of all typographies.\n */\nexport const Typography = {\n ...TypographyInterface,\n custom: TypographyCustom,\n} as const;\nexport type Typography = TypographyInterface | TypographyCustom;\n\n/**\n * All available aspect ratios.\n */\nexport const AspectRatio = {\n /** Intrinsic content ratio. */\n original: 'original',\n /** Ratio 3:1 */\n panoramic: 'panoramic',\n /** Ratio 16:9 */\n wide: 'wide',\n /** Ratio 3:2 */\n horizontal: 'horizontal',\n /** Ratio 3:2 */\n vertical: 'vertical',\n /** Ratio 1:1 */\n square: 'square',\n /** Ratio constrained by the parent. */\n free: 'free',\n} as const;\nexport type AspectRatio = ValueOf<typeof AspectRatio>;\n\n/**\n * Semantic info about the purpose of the component\n */\nexport const Kind = {\n info: 'info',\n success: 'success',\n warning: 'warning',\n error: 'error',\n} as const;\nexport type Kind = ValueOf<typeof Kind>;\n\n/**\n * All available white-space values\n * */\nexport const WhiteSpace = {\n normal: 'normal',\n nowrap: 'nowrap',\n pre: 'pre',\n 'pre-wrap': 'pre-wrap',\n 'pre-line': 'pre-line',\n 'break-spaces': 'break-spaces',\n};\nexport type WhiteSpace = ValueOf<typeof WhiteSpace>;\n\n/**\n * See SCSS variable $lumx-color-palette\n */\nexport const ColorPalette = {\n primary: 'primary',\n secondary: 'secondary',\n blue: 'blue',\n dark: 'dark',\n green: 'green',\n yellow: 'yellow',\n red: 'red',\n light: 'light',\n grey: 'grey',\n} as const;\nexport type ColorPalette = ValueOf<typeof ColorPalette>;\nexport type Color = ColorPalette | string;\n\n/**\n * See SCSS variable $lumx-color-variants\n */\nexport const ColorVariant = {\n D1: 'D1',\n D2: 'D2',\n L1: 'L1',\n L2: 'L2',\n L3: 'L3',\n L4: 'L4',\n L5: 'L5',\n L6: 'L6',\n N: 'N',\n} as const;\nexport type ColorVariant = ValueOf<typeof ColorVariant>;\n\n/** ColorPalette with all possible color variant combination */\nexport type ColorWithVariants =\n | ColorPalette\n | Exclude<\n `${ColorPalette}-${ColorVariant}`,\n // No dark variant for light and dark\n `light-D${number}` | `dark-D${number}`\n >;\n\nexport const REAL_SIZE_FOR_LUMX_SIZE = {\n [Size.xxs]: 14,\n [Size.xs]: 20,\n [Size.s]: 24,\n [Size.m]: 36,\n [Size.l]: 64,\n [Size.xl]: 128,\n [Size.xxl]: 256,\n};\n","/**\n * Check if we are running in a true browser (not SSR and not jsdom test environment).\n */\nexport const IS_BROWSER = typeof window !== 'undefined' && !window.navigator.userAgent.includes('jsdom');\n\n/**\n * Optional global `window` instance (not defined when running SSR).\n */\nexport const WINDOW = typeof window !== 'undefined' ? window : undefined;\n\n/**\n * Optional global `document` instance (not defined when running SSR).\n */\nexport const DOCUMENT = typeof document !== 'undefined' ? document : undefined;\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import type { Modifier } from './types';\n\n/**\n * Generates BEM modifier class names.\n *\n * @param baseName The base BEM class to attach modifiers to.\n * @param modifiers Map of modifier names to boolean values.\n * @returns Combined modifier class names string.\n *\n * @example\n * modifier('button', { active: true }); // 'button--active'\n * modifier('button', { active: true, disabled: false }); // 'button--active'\n */\nexport function modifier(baseName: string, modifiers: Modifier) {\n const modifierClasses = [];\n for (const [key, value] of Object.entries(modifiers)) {\n if (value) modifierClasses.push(`${baseName}--${key}`);\n }\n return modifierClasses.join(' ');\n}\n","import classnames from 'classnames';\nimport { modifier } from './modifier';\nimport type { AdditionalClasses, Modifier } from './types';\n\n/**\n * Generates a BEM block + modifier class name string.\n * Combines a base class with optional modifiers and additional classes.\n *\n * @param baseName The base BEM class\n * @param modifier Optional modifiers\n * @returns Combined class name string\n *\n * @example\n * block('button'); // 'button'\n * block('button', { active: true, disabled: false }); // 'button button--active'\n */\nexport function block(baseName: string, additionalClasses: AdditionalClasses): string;\nexport function block(baseName: string, modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;\nexport function block(\n baseName: string,\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n) {\n let modifiers: Modifier | undefined;\n let classes: AdditionalClasses | undefined;\n\n if (typeof modifiersOrAdditionalClasses === 'string' || Array.isArray(modifiersOrAdditionalClasses)) {\n classes = modifiersOrAdditionalClasses;\n } else {\n modifiers = modifiersOrAdditionalClasses;\n classes = additionalClasses;\n }\n\n if (!modifiers && !classes) {\n return baseName;\n }\n\n return classnames(\n // Additional classes\n classes,\n // Base class\n baseName,\n // Modifier(s)\n modifiers ? modifier(baseName, modifiers) : null,\n );\n}\n","import { block } from '../bem/block';\n\nconst PREFIX = 'lumx-action-area';\nconst ACTION_ELEMENT = `${PREFIX}__action`;\n\ntype ActionModifiers = Partial<\n Record<'has-overlay' | 'focus-outset' | 'focus-inset' | 'theme-dark' | 'theme-light', boolean>\n>;\n\n/**\n * Action area CSS utility.\n *\n * Apply `actionArea()` to the container element to make it a positioning context\n * for the action's expanded click area.\n *\n * Apply `actionArea.action()` to the primary interactive element (link or button)\n * whose click area should expand to fill the entire container.\n */\nexport const actionArea = Object.assign(\n /** Action area container class. Sets `position: relative`. */\n () => PREFIX,\n {\n /** Action element class. Adds a `::before` pseudo-element with `position: absolute; inset: 0` to expand the click area. */\n action: (modifiers?: ActionModifiers) => block(ACTION_ELEMENT, modifiers),\n },\n);\n","import type { ColorPalette, ColorVariant, ColorWithVariants } from '@lumx/core/js/constants';\n\n/** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */\nexport function resolveColorWithVariants(\n colorWithVariants?: ColorWithVariants,\n colorVariant?: ColorVariant,\n): [color?: ColorPalette, colorVariant?: ColorVariant] {\n if (!colorWithVariants) return [undefined, colorVariant];\n const [color, baseColorVariant] = colorWithVariants.split('-');\n return [color as ColorPalette, (colorVariant || baseColorVariant) as ColorVariant];\n}\n","import { ColorVariant, ColorWithVariants } from '@lumx/core/js/constants';\nimport { resolveColorWithVariants } from '@lumx/core/js/utils/_internal/color';\n\n/**\n * Generates a Lumx color class name for the given type, color and variant.\n * This is the base function used by font() and background() utilities.\n *\n * @param type - The color class type ('font' or 'background')\n * @param propColor - The color palette name (e.g., 'primary', 'dark') with optional variant suffix (e.g., 'primary-L2')\n * @param propColorVariant - Optional color variant override (e.g., 'L1', 'L2', 'D1', 'N')\n * @returns The Lumx color class name or undefined if no color is provided\n *\n * @example\n * color('font', 'dark', 'L2'); // 'lumx-color-font-dark-L2'\n * color('background', 'primary'); // 'lumx-color-background-primary-N'\n * color('font', 'primary-L2'); // 'lumx-color-font-primary-L2'\n * color('font', undefined); // undefined\n */\nexport function color(\n type: 'font' | 'background',\n propColor: ColorWithVariants,\n propColorVariant?: ColorVariant,\n): string {\n const [cColor, cColorVariant = ColorVariant.N] = resolveColorWithVariants(propColor, propColorVariant);\n return `lumx-color-${type}-${cColor}-${cColorVariant}`;\n}\n\n/**\n * Generates a Lumx background color class name for the given color and variant.\n *\n * @param propColor - The color palette name (e.g., 'primary', 'dark', 'light')\n * @param propColorVariant - The color variant (e.g., 'L1', 'L2', 'D1', 'N')\n * @returns The Lumx background color class name\n *\n * @example\n * background('dark', 'L2'); // 'lumx-color-background-dark-L2'\n * background('primary', 'N'); // 'lumx-color-background-primary-N'\n */\nexport const background = (propColor: ColorWithVariants, propColorVariant?: ColorVariant) =>\n color('background', propColor, propColorVariant);\n\n/**\n * Generates a Lumx font color class name for the given color and variant.\n *\n * @param propColor - The color palette name (e.g., 'primary', 'dark') with optional variant suffix (e.g., 'primary-L2')\n * @param propColorVariant - Optional color variant override (e.g., 'L1', 'L2', 'D1', 'N')\n * @returns The Lumx font color class name or undefined if no color is provided\n *\n * @example\n * font('dark', 'L2'); // 'lumx-color-font-dark-L2'\n * font('primary-L2'); // 'lumx-color-font-primary-L2'\n * font('primary'); // 'lumx-color-font-primary-N'\n * font(undefined); // undefined\n */\nexport const font = (propColor: ColorWithVariants, propColorVariant?: ColorVariant) =>\n color('font', propColor, propColorVariant);\n","import type { Typography } from '@lumx/core/js/constants';\n\n/**\n * Returns the classname associated to the given typography. For example, for Typography.title it returns\n * lumx-typography-title\n */\nexport function typography(typo: Typography) {\n return `lumx-typography-${typo}`;\n}\n","import classnames from 'classnames';\n\nimport type { Direction, Spacing } from '@lumx/core/js/types';\nimport { Size, type AbstractSize } from '@lumx/core/js/constants';\n\n/** Set of valid AbstractSize values for runtime detection. */\nconst ABSTRACT_SIZES: ReadonlySet<string> = new Set([Size.tiny, Size.regular, Size.medium, Size.big, Size.huge]);\n\nfunction isAbstractSize(value: unknown): value is AbstractSize {\n return typeof value === 'string' && ABSTRACT_SIZES.has(value);\n}\n\n/**\n * Returns a lumx classname for the given type, direction and size. For example, for\n * arguments type='padding', direction='right', size='regular' it returns lumx-spacing-padding-right-regular\n * @param type - margin or padding\n * @param direction - Direction\n * @param size - Size\n * @returns string\n */\nexport function spacing(type: Spacing, size: AbstractSize | null): string;\nexport function spacing(type: Spacing, direction?: Direction, size?: AbstractSize | null): string;\nexport function spacing(\n type: Spacing,\n directionOrSize?: Direction | AbstractSize | null,\n size?: AbstractSize | null,\n): string {\n // Resolve shorthand: spacing(type, size) => spacing(type, undefined, size)\n const isShorthand = isAbstractSize(directionOrSize) || (directionOrSize === null && size === undefined);\n const direction: Direction | undefined = isShorthand ? undefined : directionOrSize ?? undefined;\n const resolvedSize: AbstractSize | null | undefined = isShorthand ? directionOrSize : size;\n\n let baseClass = `lumx-spacing-${type}`;\n\n if (direction && direction !== 'all') {\n baseClass = `${baseClass}-${direction}`;\n }\n\n if (resolvedSize) {\n baseClass = `${baseClass}-${resolvedSize}`;\n } else if (resolvedSize === null) {\n baseClass = `${baseClass}-none`;\n }\n\n return baseClass;\n}\n\n/**\n * Returns a list of lumx classnames for the given types, directions and sizes. For example, for\n * arguments [\n * { type: 'padding', direction: 'right', size: 'regular'},\n * { type: 'margin', direction: 'left', size: 'big'},\n * ]\n * it returns lumx-spacing-padding-right-regular lumx-spacing-margin-left-big\n * @param spacingConfigs - Array of spacing configurations with direction and size\n * @returns string\n */\nexport const spacings = (spacingConfigs: { type: Spacing; direction?: Direction; size?: AbstractSize | null }[]) =>\n classnames(spacingConfigs.map((spa) => spacing(spa.type, spa.direction, spa.size)));\n\n/**\n * Returns a lumx margin classname for the given direction and size. For example, for\n * arguments direction='right', size='regular' it returns lumx-spacing-margin-right-regular\n *\n * Can also be called with just a size: margin('regular') is equivalent to margin('all', 'regular').\n * @param direction - Direction\n * @param size - Size\n * @returns string\n */\nexport function margin(size: AbstractSize | null): string;\nexport function margin(direction?: Direction, size?: AbstractSize | null): string;\nexport function margin(directionOrSize?: Direction | AbstractSize | null, size?: AbstractSize | null): string {\n if (isAbstractSize(directionOrSize) || (directionOrSize === null && size === undefined)) {\n return spacing('margin', directionOrSize);\n }\n return spacing('margin', directionOrSize ?? undefined, size);\n}\n\n/**\n * Returns a list of lumx margin classnames for the given directions and sizes. For example, for\n * arguments [\n * { direction: 'right', size: 'regular'},\n * { direction: 'left', size: 'big'},\n * ]\n * it returns lumx-spacing-margin-right-regular lumx-spacing-margin-left-big\n * @param marginConfigs - Array of padding configurations with direction and size\n * @returns string\n */\nexport const margins = (marginConfigs: { direction?: Direction; size?: AbstractSize | null }[]) =>\n spacings(marginConfigs.map(({ direction, size }) => ({ type: 'margin', direction, size })));\n\n/**\n * Returns a lumx padding classname for the given direction and size. For example, for\n * arguments direction='right', size='regular' it returns lumx-spacing-padding-right-regular\n *\n * Can also be called with just a size: padding('regular') is equivalent to padding('all', 'regular').\n * @param direction - Direction\n * @param size - Size\n * @returns string\n */\nexport function padding(size: AbstractSize | null): string;\nexport function padding(direction?: Direction, size?: AbstractSize | null): string;\nexport function padding(directionOrSize?: Direction | AbstractSize | null, size?: AbstractSize | null): string {\n if (isAbstractSize(directionOrSize) || (directionOrSize === null && size === undefined)) {\n return spacing('padding', directionOrSize);\n }\n return spacing('padding', directionOrSize ?? undefined, size);\n}\n\n/**\n * Returns a list of lumx padding classnames for the given directions and sizes. For example, for\n * arguments [\n * { direction: 'right', size: 'regular'},\n * { direction: 'left', size: 'big'},\n * ]\n * it returns lumx-spacing-padding-right-regular lumx-spacing-padding-left-big\n * @param paddingConfigs - Array of padding configurations with direction and size\n * @returns Combined padding classnames as a string\n */\nexport const paddings = (paddingConfigs: { direction?: Direction; size?: AbstractSize | null }[]) =>\n spacings(paddingConfigs.map(({ direction, size }) => ({ type: 'padding', direction, size })));\n","import { VISUALLY_HIDDEN } from '@lumx/core/js/constants';\n\n/**\n * Visually hidden class name.\n * Used to hide elements from view but keep them readable from screen readers\n */\nexport const visuallyHidden = () => VISUALLY_HIDDEN;\n","import { block } from './block';\nimport type { AdditionalClasses, Modifier } from './types';\n\n/**\n * Creates a BEM element class generator function for the given base class.\n * Returns a function that generates BEM element class names with optional modifiers.\n *\n * @param baseClass The base BEM block class name (e.g., 'button', 'card')\n * @param elem The BEM element name (e.g., 'icon', 'title')\n * @param modifier Optional BEM modifier ()\n * @returns combined BEM element class name\n *\n * @example\n * element('my-button', 'icon'); // 'my-button__icon'\n * element('my-button', 'icon', { active: true }); // 'my-button__icon my-button__icon--active'\n */\nexport function element(baseClass: string, elem: string, additionalClasses: AdditionalClasses): string;\nexport function element(\n baseClass: string,\n elem: string,\n modifiers?: Modifier,\n additionalClasses?: AdditionalClasses,\n): string;\nexport function element(\n baseClass: string,\n elem: string,\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n) {\n return block(`${baseClass}__${elem}`, modifiersOrAdditionalClasses as Modifier, additionalClasses);\n}\n","import { block } from './block';\nimport { element } from './element';\nimport { modifier } from './modifier';\nimport type { AdditionalClasses, Modifier } from './types';\n\n/**\n * Setup BEM block & element generation for a given base name.\n */\nexport function bem(baseName: string) {\n function blockFn(additionalClasses: AdditionalClasses): string;\n function blockFn(modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;\n function blockFn(\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n ) {\n return block(baseName, modifiersOrAdditionalClasses as Modifier, additionalClasses);\n }\n\n function elementFn(elem: string, additionalClasses: AdditionalClasses): string;\n function elementFn(elem: string, modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;\n function elementFn(\n elem: string,\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n ) {\n return element(baseName, elem, modifiersOrAdditionalClasses as Modifier, additionalClasses);\n }\n\n return {\n block: blockFn,\n element: elementFn,\n modifier: (modifiers: Modifier) => modifier(baseName, modifiers),\n };\n}\n\nexport { block, element };\n","type KeyboardEvent = { key: string };\ntype KeyboardEventHandler<E extends KeyboardEvent> = (event: E) => void;\n\n/**\n * Make sure the pressed key is the enter key before calling the callback.\n *\n * @param handler The handler to call on enter/return press.\n * @return The decorated function.\n */\nexport function onEnterPressed<E extends KeyboardEvent>(handler: KeyboardEventHandler<E>): KeyboardEventHandler<E> {\n return (evt) => {\n if (evt.key !== 'Enter') {\n return;\n }\n handler(evt);\n };\n}\n\n/**\n * Make sure the pressed key is the escape key before calling the callback.\n *\n * @param handler The handler to call on enter/return press.\n * @return The decorated function.\n */\nexport function onEscapePressed<E extends KeyboardEvent>(handler: KeyboardEventHandler<E>): KeyboardEventHandler<E> {\n return (evt) => {\n if (evt.key !== 'Escape') {\n return;\n }\n handler(evt);\n };\n}\n\n/**\n * Handle button key pressed (Enter + Space).\n *\n * @param handler The handler to call.\n * @return The decorated function.\n */\nexport function onButtonPressed<E extends KeyboardEvent>(handler: KeyboardEventHandler<E>): KeyboardEventHandler<E> {\n return (evt) => {\n if (evt.key !== 'Enter' && evt.key !== ' ') {\n return;\n }\n handler(evt);\n };\n}\n","import { Selector } from '../../types';\n\n/** Get value with a string of function selector */\nexport const getWithSelector = <TObject, TValue>(\n selector: Selector<TObject, TValue> | undefined,\n object: TObject,\n): TValue => {\n // Use the provided selector function\n if (typeof selector === 'function') {\n return selector(object);\n }\n // Use the provided selector as a property name\n if (typeof selector === 'string') {\n return object[selector] as TValue;\n }\n return String(object) as TValue;\n};\n","import { getWithSelector } from './getWithSelector';\nimport { Selector } from '../../types';\n\n/**\n * Equivalent to `lodash/groupBy` but returns a `Map` of groups items (instead of an object)\n * (has the major advantage to not forcing the keys to be string!)\n */\nexport function groupBySelector<TObject, TValue>(\n array: TObject[],\n selector: Selector<TObject, TValue>,\n): Map<TValue, TObject[]> {\n const groups = new Map<TValue, TObject[]>();\n\n for (const item of array) {\n const key = getWithSelector(selector, item);\n let group = groups.get(key);\n if (!group) {\n group = [];\n groups.set(key, group);\n }\n group.push(item);\n }\n\n return groups;\n}\n","import { mdiAlert, mdiAlertCircle, mdiCheckCircle, mdiInformation } from '@lumx/icons';\nimport { ColorPalette, Emphasis, Kind, Size } from '../../constants';\nimport type { LumxClassName, JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { DialogProps } from '../Dialog';\n\nexport interface BaseAlertDialogProps {\n /** Message variant. */\n kind?: Kind;\n /** Dialog title. */\n title?: string;\n /**\n * Children\n */\n children?: JSXElement;\n}\n\nexport interface AlertDialogProps extends HasClassName, BaseAlertDialogProps, Pick<DialogProps, 'size'> {\n /** Props forwarded to the confirm button */\n confirmProps: any;\n /**\n * Props forwarded to the cancel button.\n * Will not render a cancel button if undefined.\n */\n cancelProps?: any;\n /** Props forwarded to the dialog wrapper element. */\n dialogProps?: any;\n /** Ref forwarded to the dialog root element. */\n ref?: CommonRef;\n /** Ref forwarded to the cancel button element. */\n cancelButtonRef?: CommonRef;\n /** Ref forwarded to the confirm button element. */\n confirmationButtonRef?: CommonRef;\n /** Element used to wrap the description (children). */\n DescriptionElement: any;\n /** Dialog component injected by the framework wrapper. */\n Dialog: any;\n /** Toolbar component injected by the framework wrapper. */\n Toolbar: any;\n /** Button component injected by the framework wrapper. */\n Button: any;\n /** Icon component injected by the framework wrapper. */\n Icon: any;\n /** Unique identifier for the dialog (used for aria-labelledby / aria-describedby). */\n id: string;\n /**\n * Pre-computed focus element.\n * Allows framework wrappers to pass the actual DOM element directly when ref-on-component\n * does not yield a DOM node (e.g. Vue). Falls back to cancelButtonRef / confirmationButtonRef.\n */\n focusElement?: any;\n}\n\n/**\n * Associative map from message kind to color and icon.\n */\nexport const CONFIG = {\n [Kind.error]: { color: ColorPalette.red, icon: mdiAlert },\n [Kind.info]: { color: ColorPalette.blue, icon: mdiInformation },\n [Kind.success]: { color: ColorPalette.green, icon: mdiCheckCircle },\n [Kind.warning]: { color: ColorPalette.yellow, icon: mdiAlertCircle },\n};\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'AlertDialog';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-alert-dialog';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<AlertDialogProps> = {\n size: Size.tiny,\n kind: Kind.info,\n};\n\n/**\n * AlertDialog component.\n *\n * An alert dialog is a modal dialog that interrupts the user's workflow to\n * communicate an important message and acquire a response.\n *\n * It should not have a complex content.\n * Children of this component should only be strings, paragraphs or links.\n */\nexport const AlertDialog = (props: AlertDialogProps) => {\n const {\n id,\n title,\n className,\n cancelProps,\n confirmProps,\n ref,\n kind = DEFAULT_PROPS.kind,\n size = DEFAULT_PROPS.size,\n dialogProps,\n children,\n DescriptionElement,\n cancelButtonRef,\n confirmationButtonRef,\n focusElement,\n Dialog,\n Toolbar,\n Button,\n Icon,\n ...forwardedProps\n } = props;\n const { color, icon } = CONFIG[kind as Kind] || {};\n\n const titleId = `${id}-title`;\n const descriptionId = `${id}-description`;\n\n const { label: confirmLabel, onClick: confirmOnClick, ...forwardedConfirmProps } = confirmProps;\n const { label: cancelLabel, onClick: cancelOnClick, ...forwardedCancelProps } = cancelProps || {};\n\n return (\n <Dialog\n ref={ref}\n focusElement={focusElement ?? (cancelProps ? cancelButtonRef : confirmationButtonRef)}\n size={size}\n dialogProps={{\n id,\n role: 'alertdialog',\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n ...dialogProps,\n }}\n className={classNames.join(\n className,\n block({\n [`kind-${kind}`]: Boolean(kind),\n }),\n )}\n {...forwardedProps}\n >\n <header>\n <Toolbar\n className=\"lumx-spacing-margin-horizontal\"\n before={<Icon icon={icon} size={Size.s} color={color} />}\n label={\n <h2 id={titleId} className=\"lumx-typography-title\">\n {title}\n </h2>\n }\n />\n </header>\n\n {children && (\n <DescriptionElement\n id={descriptionId}\n className=\"lumx-typography-body2 lumx-spacing-padding-vertical-big lumx-spacing-padding-horizontal-huge\"\n >\n {children}\n </DescriptionElement>\n )}\n\n <footer>\n <Toolbar\n className=\"lumx-spacing-margin-horizontal\"\n after={\n <>\n {cancelProps && (\n <Button\n {...forwardedCancelProps}\n ref={cancelButtonRef}\n emphasis={Emphasis.medium}\n onClick={cancelOnClick}\n >\n {cancelLabel}\n </Button>\n )}\n <Button\n {...forwardedConfirmProps}\n ref={confirmationButtonRef}\n color={color}\n className=\"lumx-spacing-margin-left-regular\"\n onClick={confirmOnClick}\n >\n {confirmLabel}\n </Button>\n </>\n }\n />\n </footer>\n </Dialog>\n );\n};\n","import React from 'react';\n\nimport { DialogProps, Dialog, Button, Icon, Toolbar, ButtonProps } from '@lumx/react';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n AlertDialog as UI,\n BaseAlertDialogProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/AlertDialog';\n\nexport interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'>, UIProps {\n /** Props forwarded to the confirm button */\n confirmProps: ButtonProps & {\n label: string;\n };\n /**\n * Props forwarded to the cancel button.\n * Will not render a cancel button if undefined.\n */\n cancelProps?: ButtonProps & {\n label: string;\n };\n}\n\n/**\n * AlertDialog component.\n *\n * An alert dialog is a modal dialog that interrupts the user's workflow to\n * communicate an important message and acquire a response.\n *\n * It should not have a complex content.\n * Children of this component should only be strings, paragraphs or links.\n */\nexport const AlertDialog = forwardRef<AlertDialogProps, HTMLDivElement>((props, ref) => {\n const { id, title, className, cancelProps, confirmProps, kind, size, dialogProps, children, ...forwardedProps } =\n props;\n\n const cancelButtonRef = React.useRef(null);\n const confirmationButtonRef = React.useRef(null);\n\n // Define a unique ID to target title and description for aria attributes.\n const generatedId = useId();\n const uniqueId = id || generatedId;\n\n // If content is a string, set in a paragraph.\n const DescriptionElement = typeof children === 'string' ? 'p' : 'div';\n\n return UI({\n Button,\n confirmProps,\n DescriptionElement,\n Dialog,\n Icon,\n id: uniqueId,\n Toolbar,\n cancelButtonRef,\n cancelProps,\n children,\n className,\n confirmationButtonRef,\n dialogProps,\n kind,\n ref,\n size,\n title,\n ...forwardedProps,\n });\n});\n\nAlertDialog.displayName = COMPONENT_NAME;\nAlertDialog.className = CLASSNAME;\nAlertDialog.defaultProps = DEFAULT_PROPS;\n","import { useEffect, useState } from 'react';\n\n/**\n * Hook focusing an element when defined and `focus` boolean `true`.\n *\n * @param element Element to focus.\n * @param shouldFocus Boolean flag to trigger the focus\n */\nexport function useFocus(element: HTMLElement | null | undefined, shouldFocus = true): void {\n const [wasFocus, setWasFocus] = useState(false);\n useEffect(\n () => {\n if (shouldFocus && wasFocus !== shouldFocus && element) {\n element.focus();\n setWasFocus(shouldFocus);\n }\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [element, shouldFocus],\n );\n}\n","import { Falsy } from '@lumx/react/utils/type';\nimport { MutableRefObject, useMemo } from 'react';\n\ntype FnRef<T> = (value: T) => void;\n\n/**\n * Merge refs into a single function ref.\n *\n * @param refs React references to merge.\n * @return the merged ref.\n */\nexport function mergeRefs<T>(...refs: Array<MutableRefObject<T | null> | FnRef<T> | Falsy>): FnRef<T> {\n return (value) =>\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n // eslint-disable-next-line no-param-reassign\n (ref as MutableRefObject<T>).current = value;\n }\n });\n}\n\n/**\n * Same as `mergeRefs` but memoized\n */\nexport const useMergeRefs = <T>(...refs: Array<MutableRefObject<T | null> | FnRef<T> | Falsy>) => {\n return useMemo(\n () => mergeRefs(...refs),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n refs,\n );\n};\n","import React from 'react';\nimport type { Theme } from '@lumx/react';\n\ntype ThemeContextValue = Theme | undefined;\nexport const ThemeContext = React.createContext<ThemeContextValue>(undefined);\n\n/** Provide a theme context to all children. */\nexport const ThemeProvider = ThemeContext.Provider as React.FC<{\n value: ThemeContextValue;\n children?: React.ReactNode;\n}>;\n\n/** Get the theme in the current context. */\nexport function useTheme(): ThemeContextValue {\n return React.useContext(ThemeContext);\n}\n","import { getDisabledState, DisabledProps, DisabledState } from '@lumx/core/js/utils/disabledState';\nimport { useDisabledStateContext } from './DisabledStateContext';\n\ninterface Output<TProps extends DisabledProps> {\n /** Is disabled or aria-disabled */\n isAnyDisabled?: boolean;\n disabledStateProps: DisabledState;\n otherProps: TProps & { disabled: never; 'aria-disabled': never; isDisabled: never };\n}\n\n/**\n * Resolve disabled state from props.\n * (handles `disabled`, `isDisabled` and `aria-disabled`)\n *\n * @params component props\n */\nexport function useDisableStateProps<TProps extends DisabledProps>(props: TProps): Output<TProps> {\n const { disabled, isDisabled, 'aria-disabled': ariaDisabled, onClick, onChange, ...otherProps } = props;\n const disabledStateContext = useDisabledStateContext();\n const disabledStateProps = getDisabledState(disabledStateContext, {\n disabled,\n isDisabled,\n 'aria-disabled': ariaDisabled,\n });\n const isAnyDisabled = disabledStateProps['aria-disabled'] || disabledStateProps.disabled || undefined;\n if (!isAnyDisabled) {\n (otherProps as any).onClick = onClick;\n (otherProps as any).onChange = onChange;\n }\n return { disabledStateProps, otherProps: otherProps as Output<TProps>['otherProps'], isAnyDisabled };\n}\n","import { ReactNode, SyntheticEvent, useRef } from 'react';\n\nimport { Dropdown, DropdownProps, IconButtonProps, Offset, Placement, TextField, TextFieldProps } from '@lumx/react';\n\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useFocus } from '@lumx/react/hooks/useFocus';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\n\n/**\n * Defines the props of the component.\n */\nexport interface AutocompleteProps extends GenericProps, HasTheme {\n /**\n * Whether the suggestions list should display anchored to the input or to the wrapper.\n * @see {@link DropdownProps#anchorToInput}\n */\n anchorToInput?: boolean;\n /**\n * Props to pass to the clear button (minus those already set by the TextField props).\n * If not specified, the button won't be displayed.\n * @see {@link TextFieldProps#clearButtonProps}\n */\n clearButtonProps?: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /**\n * Reference to the <input> or <textarea> element.\n * @see {@link TextFieldProps#inputRef}\n */\n inputRef?: TextFieldProps['inputRef'];\n /**\n * The offset that will be applied to the Dropdown position.\n * @see {@link DropdownProps#offset}\n */\n offset?: Offset;\n /**\n * The preferred Dropdown location against the anchor element.\n * @see {@link DropdownProps#placement}\n */\n placement?: Placement;\n /**\n * Manage dropdown width:\n * - `maxWidth`: dropdown not bigger than anchor\n * - `minWidth` or `true`: dropdown not smaller than anchor\n * - `width`: dropdown equal to the anchor.\n * @see {@link DropdownProps#fitToAnchorWidth}\n */\n fitToAnchorWidth?: DropdownProps['fitToAnchorWidth'];\n /**\n * The error related to the component.\n * @see {@link TextFieldProps#error}\n */\n error?: string | ReactNode;\n /**\n * Whether the text field is displayed with error style or not.\n * @see {@link TextFieldProps#hasError}\n */\n hasError?: boolean;\n /**\n * Whether the text box should be focused upon closing the suggestions or not.\n */\n shouldFocusOnClose?: boolean;\n /**\n * The helper message of the text field.\n * @see {@link TextFieldProps#helper}\n */\n helper?: string;\n /**\n * The icon of the text field (SVG path).\n * @see {@link TextFieldProps#icon}\n */\n icon?: string;\n /**\n * Whether the component is disabled or not.\n * @see {@link TextFieldProps#isDisabled}\n */\n isDisabled?: boolean;\n /**\n * Whether the component is required or not.\n * @see {@link TextFieldProps#isRequired}\n */\n isRequired?: boolean;\n /**\n * Whether the text field is displayed with valid style or not.\n * @see {@link TextFieldProps#isValid}\n */\n isValid?: boolean;\n /**\n * The label of the text field displayed in a label tag.\n * @see {@link TextFieldProps#label}\n */\n label?: string;\n /**\n * The placeholder message of the text field.\n * @see {@link TextFieldProps#placeholder}\n */\n placeholder?: string;\n /** List of suggestions to display during autocomplete. */\n children: React.ReactNode;\n /**\n * The list of chips to be displayed before the text field input.\n */\n chips?: React.ReactNode;\n /**\n * The value of the text field.\n * @see {@link TextFieldProps#value}\n */\n value: string;\n /**\n * Whether the suggestions from the autocomplete should be displayed or not.\n * @see {@link DropdownProps#isOpen}\n */\n isOpen: boolean;\n /**\n * The native input name property.\n * @see {@link TextFieldProps#name}\n */\n name?: string;\n /**\n * Whether a click in the Autocomplete dropdown would close it or not.\n * @see {@link DropdownProps#closeOnClick}\n */\n closeOnClick?: boolean;\n /**\n * Whether a click anywhere out of the Autocomplete would close it or not.\n * @see {@link DropdownProps#closeOnClickAway}\n */\n closeOnClickAway?: boolean;\n /**\n * Whether an escape key press would close the Autocomplete or not.\n * @see {@link DropdownProps#closeOnEscape}\n */\n closeOnEscape?: boolean;\n /**\n * Whether the focus should go back on the anchor when dropdown closes and focus is within.\n * @see {@link DropdownProps#focusAnchorOnClose}\n */\n focusAnchorOnClose?: DropdownProps['focusAnchorOnClose'];\n /**\n * The function called on blur.\n * @see {@link TextFieldProps#onBlur}\n */\n onBlur?(event: React.FocusEvent): void;\n /**\n * On change callback.\n * @see {@link TextFieldProps#onChange}\n */\n onChange(value: string, name?: string, event?: SyntheticEvent): void;\n /**\n * The function called on close.\n * @see {@link DropdownProps#onClose}\n */\n onClose?(): void;\n /**\n * The function called on focus.\n * @see {@link TextFieldProps#onFocus}\n */\n onFocus?(event: React.FocusEvent): void;\n /**\n * The function called when the bottom of the dropdown is reached.\n * @see {@link DropdownProps#onInfiniteScroll}\n */\n onInfiniteScroll?(): void;\n /**\n * Props forwarded to the underlying TextField component.\n * Only the props not managed by the Autocomplete can be set.\n * @see {@link TextFieldProps}\n */\n textFieldProps?: Partial<TextFieldProps>;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Autocomplete';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-autocomplete';\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<AutocompleteProps> = {\n anchorToInput: false,\n closeOnClick: false,\n closeOnClickAway: true,\n closeOnEscape: true,\n shouldFocusOnClose: false,\n};\n\n/**\n * Autocomplete component.\n *\n * @deprecated use `SelectTextField` instead\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Autocomplete = forwardRef<AutocompleteProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme();\n const { disabledStateProps, otherProps } = useDisableStateProps(props);\n const {\n anchorToInput = DEFAULT_PROPS.anchorToInput,\n children,\n chips,\n className,\n closeOnClick = DEFAULT_PROPS.closeOnClick,\n closeOnClickAway = DEFAULT_PROPS.closeOnClickAway,\n closeOnEscape = DEFAULT_PROPS.closeOnEscape,\n error,\n fitToAnchorWidth,\n hasError,\n helper,\n icon,\n inputRef,\n clearButtonProps,\n isRequired,\n isOpen,\n isValid,\n label,\n name,\n offset,\n onBlur,\n onChange,\n onClose,\n onFocus,\n onInfiniteScroll,\n placeholder,\n placement,\n shouldFocusOnClose = DEFAULT_PROPS.shouldFocusOnClose,\n theme = defaultTheme,\n value,\n textFieldProps = {},\n focusAnchorOnClose,\n ...forwardedProps\n } = otherProps;\n const inputAnchorRef = useRef<HTMLElement>(null);\n const textFieldRef = useRef(null);\n useFocus(inputAnchorRef.current, !isOpen && shouldFocusOnClose);\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n <TextField\n {...textFieldProps}\n chips={chips}\n error={error}\n hasError={hasError}\n helper={helper}\n icon={icon}\n inputRef={mergeRefs(inputAnchorRef as React.RefObject<HTMLInputElement>, inputRef)}\n clearButtonProps={clearButtonProps}\n {...disabledStateProps}\n isRequired={isRequired}\n isValid={isValid}\n label={label}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n textFieldRef={textFieldRef}\n theme={theme}\n value={value}\n />\n <Dropdown\n anchorRef={anchorToInput ? inputAnchorRef : textFieldRef}\n closeOnClick={closeOnClick}\n closeOnClickAway={closeOnClickAway}\n closeOnEscape={closeOnEscape}\n focusAnchorOnClose={focusAnchorOnClose}\n fitToAnchorWidth={fitToAnchorWidth}\n isOpen={isOpen}\n offset={offset}\n onClose={onClose}\n onInfiniteScroll={onInfiniteScroll}\n placement={placement}\n shouldFocusOnOpen={false}\n theme={theme}\n >\n {children}\n </Dropdown>\n </div>\n );\n});\nAutocomplete.displayName = COMPONENT_NAME;\nAutocomplete.className = CLASSNAME;\nAutocomplete.defaultProps = DEFAULT_PROPS;\n","import { ReactNode } from 'react';\n\nimport { mdiClose } from '@lumx/icons';\n\nimport { Autocomplete, AutocompleteProps, Chip, HorizontalAlignment, Icon, Size } from '@lumx/react';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\n\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\n\n/**\n * Defines the props of the component.\n */\nexport interface AutocompleteMultipleProps extends AutocompleteProps {\n /** Selected values. */\n values: any[];\n /** Alignment of the chips in the autocomplete. */\n chipsAlignment?: HorizontalAlignment;\n /** Selected value render function. Default: Renders the value inside of a Chip. */\n selectedChipRender(\n choice: any,\n index: number,\n onClear?: (event?: React.MouseEvent, val?: any) => void,\n isDisabled?: boolean,\n ): ReactNode | string;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'AutocompleteMultiple';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-autocomplete-multiple';\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<AutocompleteMultipleProps> = {\n closeOnClickAway: true,\n closeOnEscape: true,\n selectedChipRender(choice, index, onClear, isDisabled) {\n const onClick = (event?: React.MouseEvent) => onClear && onClear(event, choice);\n return (\n <Chip\n key={index}\n after={onClear && <Icon icon={mdiClose} size={Size.xxs} />}\n isDisabled={isDisabled}\n size={Size.s}\n onAfterClick={onClick}\n onClick={onClick}\n >\n {choice}\n </Chip>\n );\n },\n values: [],\n};\n\n/**\n * AutocompleteMultiple component.\n\n * @deprecated use `SelectTextField` instead\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const AutocompleteMultiple = forwardRef<AutocompleteMultipleProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme();\n const { disabledStateProps, otherProps } = useDisableStateProps(props);\n const {\n anchorToInput,\n children,\n // `chipsAlignment` needs to be here to remove it from `forwardedProps`.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n chipsAlignment,\n className,\n closeOnClickAway = DEFAULT_PROPS.closeOnClickAway,\n closeOnEscape = DEFAULT_PROPS.closeOnEscape,\n fitToAnchorWidth,\n hasError,\n helper,\n icon,\n inputRef,\n clearButtonProps,\n isRequired,\n isOpen,\n isValid,\n label,\n name,\n offset,\n onBlur,\n onChange,\n onClear,\n onClose,\n onFocus,\n onInfiniteScroll,\n onKeyDown,\n placeholder,\n placement,\n selectedChipRender = DEFAULT_PROPS.selectedChipRender,\n shouldFocusOnClose,\n theme = defaultTheme,\n type,\n value,\n values = DEFAULT_PROPS.values,\n ...forwardedProps\n } = otherProps;\n\n return (\n <Autocomplete\n ref={ref}\n {...forwardedProps}\n anchorToInput={anchorToInput}\n className={classNames.join(className, CLASSNAME)}\n name={name}\n value={value}\n onChange={onChange}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n shouldFocusOnClose={shouldFocusOnClose}\n onFocus={onFocus}\n hasError={hasError}\n helper={helper}\n icon={icon}\n inputRef={inputRef}\n chips={values && values.map((chip: any, index: number) => selectedChipRender?.(chip, index, onClear))}\n {...disabledStateProps}\n isRequired={isRequired}\n clearButtonProps={clearButtonProps}\n isValid={isValid}\n label={label}\n placeholder={placeholder}\n theme={theme}\n type={type}\n isOpen={isOpen}\n closeOnClick={false}\n closeOnClickAway={closeOnClickAway}\n closeOnEscape={closeOnEscape}\n onClose={onClose}\n offset={offset}\n placement={placement}\n fitToAnchorWidth={fitToAnchorWidth}\n onInfiniteScroll={onInfiniteScroll}\n >\n {children}\n </Autocomplete>\n );\n});\nAutocompleteMultiple.displayName = COMPONENT_NAME;\nAutocompleteMultiple.className = CLASSNAME;\nAutocompleteMultiple.defaultProps = DEFAULT_PROPS;\n","import type { HasClassName, JSXElement, LumxClassName, HasTheme, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\n/**\n * Avatar sizes.\n */\nexport type AvatarSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface AvatarProps extends HasTheme, HasClassName {\n /** Action toolbar content. */\n actions?: JSXElement;\n /** Badge. */\n badge?: JSXElement;\n /** Image URL. */\n image: JSXElement;\n /** Size variant. */\n size?: AvatarSize;\n /** Props to pass to the thumbnail (minus those already set by the Avatar props). */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Avatar';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-avatar';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {\n size: Size.m,\n} as const;\n\n/**\n * Avatar component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Avatar = (props: AvatarProps) => {\n const { actions, badge, className, image, size = DEFAULT_PROPS.size, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {image}\n {actions && <div className={element('actions')}>{actions}</div>}\n {badge && <div className={element('badge')}>{badge}</div>}\n </div>\n );\n};\n","import React, { KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';\n\nimport { AspectRatio, Theme, Thumbnail, ThumbnailProps } from '@lumx/react';\n\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n Avatar as UI,\n AvatarProps as UIProps,\n AvatarSize,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n element,\n} from '@lumx/core/js/components/Avatar';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Avatar sizes.\n */\nexport type { AvatarSize };\n\n/**\n * Defines the props of the component.\n */\nexport interface AvatarProps extends GenericProps, ReactToJSX<UIProps, 'actions' | 'badge' | 'image'> {\n /** Action toolbar content. */\n actions?: ReactNode;\n /** Image URL. */\n image: string;\n /** Props to pass to the link wrapping the thumbnail. */\n linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;\n /** Custom react component for the link (can be used to inject react router Link). */\n linkAs?: 'a' | any;\n /** On click callback. */\n onClick?: MouseEventHandler<HTMLDivElement>;\n /** On key press callback. */\n onKeyPress?: KeyboardEventHandler<HTMLDivElement>;\n /** Image alternative text. */\n alt: string;\n /** Props to pass to the thumbnail (minus those already set by the Avatar props). */\n thumbnailProps?: Omit<\n ThumbnailProps,\n 'image' | 'alt' | 'size' | 'theme' | 'align' | 'fillHeight' | 'variant' | 'aspectRatio'\n >;\n}\n\n/**\n * Avatar component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Avatar = forwardRef<AvatarProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n actions,\n alt,\n badge,\n className,\n image,\n linkProps,\n linkAs,\n onClick,\n onKeyPress,\n size = DEFAULT_PROPS.size,\n theme = defaultTheme,\n thumbnailProps,\n ...forwardedProps\n } = props;\n\n return UI({\n ...forwardedProps,\n className,\n theme,\n ref,\n actions,\n badge,\n size,\n image: (\n <Thumbnail\n linkProps={linkProps}\n linkAs={linkAs}\n className={element('thumbnail')}\n onClick={onClick}\n onKeyPress={onKeyPress}\n {...thumbnailProps}\n aspectRatio={AspectRatio.square}\n size={size}\n image={image}\n alt={alt}\n theme={theme}\n />\n ),\n });\n});\n\nAvatar.displayName = COMPONENT_NAME;\nAvatar.className = CLASSNAME;\nAvatar.defaultProps = DEFAULT_PROPS;\n","import { ColorPalette } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface BadgeProps extends HasClassName {\n /** Badge content. */\n children?: JSXElement;\n /** Color variant. */\n color?: ColorPalette;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Badge';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-badge';\n\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<BadgeProps> = {\n color: ColorPalette.primary,\n};\n\n/**\n * Badge component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Badge = (props: BadgeProps) => {\n const { children, className, color = DEFAULT_PROPS.color, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n }),\n )}\n >\n {children}\n </div>\n );\n};\n\nBadge.displayName = COMPONENT_NAME;\nBadge.className = CLASSNAME;\nBadge.defaultProps = DEFAULT_PROPS;\n","import { ReactNode } from 'react';\n\nimport { Badge as UI, BadgeProps as UIProps } from '@lumx/core/js/components/Badge';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface BadgeProps extends ReactToJSX<UIProps>, GenericProps {\n /** Badge content. */\n children?: ReactNode;\n}\n\n/**\n * Badge component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Badge = forwardRef<BadgeProps, HTMLDivElement>((props, ref) => {\n return UI({ ...props, ref });\n});\n\nBadge.displayName = UI.displayName;\nBadge.className = UI.className;\nBadge.defaultProps = UI.defaultProps;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\nexport interface BadgeWrapperProps extends HasClassName {\n /** Badge element to display */\n badge?: JSXElement;\n /** Content to wrap with badge */\n children?: JSXElement;\n /** Ref forwarding */\n ref?: CommonRef;\n}\n\nexport const COMPONENT_NAME = 'BadgeWrapper';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-badge-wrapper';\nexport const DEFAULT_PROPS: Partial<BadgeWrapperProps> = {};\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\nexport const BadgeWrapper = (props: BadgeWrapperProps) => {\n const { badge, children, className, ref, ...forwardedProps } = props;\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames.join(className, block())}>\n {children}\n {badge && <div className={element('badge')}>{badge}</div>}\n </div>\n );\n};\n","import { ReactElement, ReactNode } from 'react';\n\nimport {\n BadgeWrapper as UI,\n BadgeWrapperProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/Badge/BadgeWrapper';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface BadgeWrapperProps extends GenericProps, ReactToJSX<UIProps, 'children' | 'badge'> {\n /** Badge element to display */\n badge: ReactElement;\n /** Content to wrap with badge */\n children: ReactNode;\n}\n\nexport const BadgeWrapper = forwardRef<BadgeWrapperProps, HTMLDivElement>((props, ref) => {\n return UI({ ...props, ref });\n});\nBadgeWrapper.displayName = COMPONENT_NAME;\nBadgeWrapper.className = CLASSNAME;\n","import {\n CommonRef,\n HasPolymorphicAs,\n HasRequiredLinkHref,\n HasDisabled,\n JSXElement,\n ElementType,\n HasAriaDisabled,\n} from '../../types';\n\nexport type ClickableElement = 'a' | 'button' | ElementType;\n\nexport interface BaseClickableProps extends HasDisabled, HasAriaDisabled {\n children?: JSXElement;\n handleClick?: (event?: any) => void;\n handleKeyPress?: (event?: any) => void;\n ref?: CommonRef;\n}\n\nexport type RawClickableProps<E extends ClickableElement> = HasPolymorphicAs<E> &\n HasRequiredLinkHref<E> &\n BaseClickableProps;\n\n/**\n * Render clickable element (link, button or custom element)\n * (also does some basic disabled state handling)\n */\nexport const RawClickable = <E extends ClickableElement>(props: RawClickableProps<E>) => {\n const {\n children,\n handleClick,\n handleKeyPress,\n disabled,\n isDisabled = disabled,\n 'aria-disabled': ariaDisabled,\n as,\n ...forwardedProps\n } = props;\n\n const isAnyDisabled = isDisabled || ariaDisabled === 'true' || ariaDisabled === true;\n\n const Component = as as any;\n let clickableProps;\n if (Component === 'button') {\n clickableProps = { type: forwardedProps.type || 'button', disabled: isDisabled };\n } else {\n clickableProps = { tabIndex: isDisabled ? '-1' : forwardedProps.tabIndex };\n }\n\n return (\n <Component\n aria-disabled={isAnyDisabled || undefined}\n {...forwardedProps}\n {...clickableProps}\n onKeyPress={handleKeyPress}\n onClick={(event: any) => {\n if (isAnyDisabled) {\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n handleClick?.(event);\n }}\n >\n {children}\n </Component>\n );\n};\n","import { ColorPalette, Emphasis, Size, Theme } from '../../constants';\nimport { classNames } from '../../utils';\nimport { HasTheme, HasAriaDisabled, AriaAttributes, CommonRef, HasClassName } from '../../types';\nimport { RawClickable, BaseClickableProps } from '../RawClickable';\n\n/**\n * Button size definition.\n */\nexport type ButtonSize = Extract<Size, 's' | 'm'>;\n\nexport interface BaseButtonProps\n extends Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'>,\n HasClassName,\n HasTheme,\n HasAriaDisabled,\n BaseClickableProps {\n /** Color variant. */\n color?: ColorPalette;\n /** Emphasis variant. */\n emphasis?: Emphasis;\n /** Whether or not the button has a background color in low emphasis. */\n hasBackground?: boolean;\n /** Native anchor href property. It determines whether the Button will be a <button> or an <a>. */\n href?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is selected or not (unsupported in `high` emphasis). */\n isSelected?: boolean;\n /** Native button name property. */\n name?: string;\n /** Size variant. */\n size?: ButtonSize;\n /** Native anchor target property. */\n target?: '_self' | '_blank' | '_parent' | '_top';\n /** Native button type. */\n type?: 'submit' | 'reset' | 'button' | undefined;\n /** Custom component for the link (can be used to inject router Link). */\n linkAs?: 'a' | any;\n /** whether the button is dispalyed in full width or not */\n fullWidth?: boolean;\n /** whether the button is currently active or not */\n isActive?: boolean;\n /** whether the button is currently focused or not */\n isFocused?: boolean;\n /** whether the button is currently focused or not */\n isHovered?: boolean;\n}\n\nexport interface ButtonRootProps extends BaseButtonProps {\n variant: 'button' | 'icon';\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ButtonRoot';\n\nexport const BUTTON_WRAPPER_CLASSNAME = `lumx-button-wrapper`;\nconst { block: buttonWrapperBlock } = classNames.bem(BUTTON_WRAPPER_CLASSNAME);\n\nexport const BUTTON_CLASSNAME = `lumx-button`;\nconst { block: buttonBlock } = classNames.bem(BUTTON_CLASSNAME);\n\n/**\n * Render a button wrapper with the ButtonRoot inside.\n *\n * @param props Component props.\n * @return JSX element.\n */\nconst renderButtonWrapper = (props: ButtonRootProps) => {\n const { color, emphasis, variant, fullWidth } = props;\n\n const adaptedColor =\n emphasis === Emphasis.low && (color === ColorPalette.light ? ColorPalette.dark : ColorPalette.light);\n\n const wrapperClassName = buttonWrapperBlock({\n [`color-${adaptedColor}`]: Boolean(adaptedColor),\n [`variant-${variant}`]: Boolean(variant),\n 'is-full-width': fullWidth,\n });\n const buttonProps = { ...props, hasBackground: false };\n\n return (\n <div className={wrapperClassName}>\n {/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}\n {ButtonRoot(buttonProps)}\n </div>\n );\n};\n\n/**\n * ButtonRoot component.\n *\n * @param props Component props.\n * @return JSX Element.\n */\nexport const ButtonRoot = (props: ButtonRootProps) => {\n const {\n 'aria-label': ariaLabel,\n 'aria-disabled': ariaDisabled,\n children,\n className,\n color,\n emphasis,\n hasBackground,\n isSelected,\n isActive,\n isFocused,\n isHovered,\n linkAs,\n size,\n theme = Theme.light,\n variant,\n fullWidth,\n ref,\n ...forwardedProps\n } = props;\n\n const adaptedColor =\n color ||\n (emphasis !== Emphasis.high && theme === Theme.dark && ColorPalette.light) ||\n (emphasis === Emphasis.high && ColorPalette.primary) ||\n ColorPalette.dark;\n\n if (hasBackground) {\n return renderButtonWrapper({ ...props, ref, variant, color: adaptedColor });\n }\n\n const buttonClassName = classNames.join(\n className,\n buttonBlock({\n [`color-${adaptedColor}`]: Boolean(adaptedColor),\n [`emphasis-${emphasis}`]: Boolean(emphasis),\n 'is-selected': isSelected,\n 'is-disabled': Boolean(props.isDisabled || props['aria-disabled']),\n 'is-active': isActive,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(emphasis === Emphasis.high && theme),\n [`variant-${variant}`]: Boolean(variant),\n 'is-full-width': fullWidth,\n }),\n );\n\n return RawClickable({\n as: linkAs || (forwardedProps.href ? 'a' : 'button'),\n ...forwardedProps,\n 'aria-disabled': ariaDisabled,\n 'aria-label': ariaLabel,\n ref: ref as CommonRef,\n className: buttonClassName,\n children,\n });\n};\nButtonRoot.displayName = COMPONENT_NAME;\nButtonRoot.defaultProps = {};\n","import { Emphasis, Size } from '../../constants';\nimport type { JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { BaseButtonProps, ButtonRoot } from './ButtonRoot';\n\n/**\n * Button emphasis definition.\n * @deprecated Use Emphasis instead.\n */\nexport const ButtonEmphasis = Emphasis;\n\n/**\n * Defines the props of the component.\n */\nexport interface ButtonProps extends BaseButtonProps {\n /** Left icon (SVG path). */\n leftIcon?: string;\n /** Right icon (SVG path). */\n rightIcon?: string;\n /** When `true`, the button gets as large as possible. */\n fullWidth?: boolean;\n /** Children */\n children?: JSXElement;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Button';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-button';\nconst { modifier } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ButtonProps> = {\n emphasis: Emphasis.high,\n size: Size.m,\n};\n\n/**\n * Button component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Button = (props: ButtonProps) => {\n const {\n className,\n emphasis = DEFAULT_PROPS.emphasis,\n leftIcon,\n rightIcon,\n size = DEFAULT_PROPS.size,\n ...forwardedProps\n } = props;\n\n const buttonClassName = classNames.join(\n className,\n modifier({\n 'has-left-icon': Boolean(leftIcon),\n 'has-right-icon': Boolean(rightIcon),\n }),\n );\n\n return ButtonRoot({\n emphasis,\n size,\n ...forwardedProps,\n className: buttonClassName,\n variant: 'button',\n });\n};\n\nButton.displayName = COMPONENT_NAME;\nButton.className = CLASSNAME;\nButton.defaultProps = DEFAULT_PROPS;\n","import type { ReactElement, ReactNode } from 'react';\nimport get from 'lodash/get';\nimport type { Comp } from './Comp';\n\n/**\n * Properties of a component to use to determine it's name.\n * In the order of preference.\n */\nconst NAME_PROPERTIES: string[] = [\n 'type',\n 'type.displayName',\n 'displayName',\n 'name',\n 'type.name',\n 'props.mdxType',\n '_reactInternalFiber.elementType.name',\n];\n/**\n * Create a predicate function that checks if a ReactNode is a react element from the given component.\n *\n * @param component React function component or the component name\n * @return predicate returning true if value is instance of the component\n */\nexport const isComponent =\n <C>(component: Comp<C, any> | string) =>\n (instance: ReactNode): instance is ReactElement => {\n const componentName = typeof component === 'string' ? component : component.displayName;\n\n return (\n !!get(instance, '$$typeof') &&\n NAME_PROPERTIES.some((nameProperty: string): boolean => get(instance, nameProperty) === componentName)\n );\n };\n","import isEmpty from 'lodash/isEmpty';\n\nimport { Icon, Theme, Text, ThemeProvider } from '@lumx/react';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled';\nimport {\n Button as UI,\n ButtonProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ButtonEmphasis,\n} from '@lumx/core/js/components/Button/Button';\nimport { isComponent } from '@lumx/react/utils/type/isComponent';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport type { ButtonEmphasis };\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\nexport interface ButtonProps extends GenericProps, ReactToJSX<UIProps> {\n /** callback for clicking on the button */\n onClick?: (event: React.MouseEvent) => void;\n /** callback for pressing a key on the button */\n onKeyPress?: (event: React.KeyboardEvent) => void;\n}\n\n/**\n * Button component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Button = forwardRef<ButtonProps, HTMLButtonElement | HTMLAnchorElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(props);\n const { onClick, onKeyPress, ...restOfOtherProps } = otherProps;\n const { leftIcon, rightIcon, children } = props;\n\n return UI({\n ref,\n theme: defaultTheme,\n ...disabledStateProps,\n ...restOfOtherProps,\n 'aria-disabled': isAnyDisabled,\n handleClick: onClick,\n handleKeyPress: onKeyPress,\n children: (\n <>\n {leftIcon && !isEmpty(leftIcon) && (\n // Theme is handled in the button scss\n <ThemeProvider value={undefined}>\n <Icon icon={leftIcon} />\n </ThemeProvider>\n )}\n {children && (isComponent(Text)(children) ? children : <span>{children}</span>)}\n {rightIcon && !isEmpty(rightIcon) && (\n // Theme is handled in the button scss\n <ThemeProvider value={undefined}>\n <Icon icon={rightIcon} />\n </ThemeProvider>\n )}\n </>\n ),\n });\n});\n\nButton.displayName = COMPONENT_NAME;\nButton.className = CLASSNAME;\nButton.defaultProps = DEFAULT_PROPS;\n","import { mdiAlertCircle } from '@lumx/icons';\n\nimport { resolveColorWithVariants } from '@lumx/core/js/utils/_internal/color';\nimport { classNames } from '../../utils';\n\nimport { ColorPalette, Size, Theme, ColorWithVariants, ColorVariant } from '../../constants';\nimport type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { ICON_SIZES } from './constants';\n\nexport const COMPONENT_NAME = 'Icon';\nexport const IconClassName: LumxClassName<typeof COMPONENT_NAME> = 'lumx-icon';\n\nexport type IconSizes = (typeof ICON_SIZES)[number];\n\n/**\n * Defines the props of the component.\n */\nexport interface IconProps extends HasClassName, HasTheme {\n /** Color variant. */\n color?: ColorWithVariants;\n /** Lightened or darkened variant of the selected icon color. */\n colorVariant?: ColorVariant;\n /** Whether the icon has a shape. */\n hasShape?: boolean;\n /**\n * Icon (SVG path) draw code (`d` property of the `<path>` SVG element).\n * See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths\n */\n icon: string;\n /** Size variant. */\n size?: IconSizes;\n /** Sets an alternative text on the svg. Will set an `img` role to the svg. */\n alt?: string;\n /** Vertical alignment of the icon (only applies for icons nested in Text/Heading). */\n verticalAlign?: null | 'middle';\n /** reference to the root element */\n ref?: CommonRef;\n}\n\nconst CLASSNAME = IconClassName;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<IconProps> = {};\n\n/**\n * Icon component.\n *\n * @param props Component props.\n */\nexport const Icon = (props: IconProps) => {\n const {\n className,\n color: propColor,\n colorVariant: propColorVariant,\n hasShape,\n icon,\n size,\n ref,\n theme,\n alt,\n verticalAlign,\n ...forwardedProps\n } = props;\n\n const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);\n\n // Color\n let iconColor = color;\n if (!iconColor && (hasShape || theme)) {\n iconColor = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;\n }\n\n // Color variant\n let iconColorVariant = colorVariant;\n if (!iconColorVariant && hasShape && iconColor === ColorPalette.dark) {\n iconColorVariant = 'L2';\n }\n\n // Size\n let iconSize = size;\n if (size && hasShape) {\n if (size === Size.xxs || size === Size.xs) {\n iconSize = Size.s;\n } else if (size === Size.xxl) {\n iconSize = Size.xl;\n }\n } else if (hasShape) {\n iconSize = Size.m;\n }\n\n return (\n <i\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${iconColor}`]: Boolean(iconColor),\n [`color-variant-${iconColorVariant}`]: Boolean(iconColorVariant),\n 'has-shape': hasShape,\n [`theme-${theme}`]: Boolean(theme),\n [`size-${iconSize}`]: Boolean(iconSize),\n 'no-shape': !hasShape,\n 'has-dark-layer': Boolean(\n !hasShape && iconColor === ColorPalette.yellow && icon === mdiAlertCircle,\n ),\n path: true,\n 'vertical-align-middle': verticalAlign === 'middle',\n }),\n )}\n >\n <svg\n aria-hidden={alt ? undefined : 'true'}\n role={alt ? 'img' : undefined}\n aria-label={alt}\n height=\"1em\"\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ verticalAlign: verticalAlign ? undefined : '-0.125em' }}\n viewBox=\"0 0 24 24\"\n width=\"1em\"\n >\n <path d={icon} fill=\"currentColor\" />\n </svg>\n </i>\n );\n};\n\nIcon.displayName = COMPONENT_NAME;\nIcon.className = CLASSNAME;\nIcon.defaultProps = DEFAULT_PROPS;\n","import { Emphasis, Size } from '../../constants';\nimport { BaseButtonProps, ButtonRoot } from './ButtonRoot';\nimport { Icon } from '../Icon';\nimport type { LumxClassName, JSXElement } from '../../types';\n\nexport interface IconButtonProps extends BaseButtonProps {\n /**\n * Icon (SVG path).\n * If `image` is also set, `image` will be used instead.\n */\n icon?: string;\n /**\n * Image (image url).\n * Has priority over `icon`.\n */\n image?: string;\n /**\n * Label text (required for a11y purpose).\n * If you really don't want an aria-label, you can set an empty label (this is not recommended).\n */\n label: string;\n /** text to be displayed on hover */\n title?: string;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'IconButton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-icon-button';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<IconButtonProps> = {\n emphasis: Emphasis.high,\n size: Size.m,\n};\n\n/**\n * IconButton component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const IconButton = (props: IconButtonProps) => {\n const {\n emphasis = DEFAULT_PROPS.emphasis,\n image,\n icon,\n label,\n size = DEFAULT_PROPS.size,\n ...forwardedProps\n } = props;\n\n const defaultChildren = (image ? (\n <img\n // no need to set alt as an aria-label is already set on the button\n alt=\"\"\n src={image}\n />\n ) : (\n Icon({ icon: icon as string })\n )) as unknown as JSXElement;\n\n return ButtonRoot({\n emphasis,\n size,\n ...forwardedProps,\n 'aria-label': label,\n variant: 'icon',\n children: defaultChildren,\n });\n};\n\nIconButton.displayName = COMPONENT_NAME;\nIconButton.className = CLASSNAME;\nIconButton.defaultProps = DEFAULT_PROPS;\n","import { Theme, Tooltip, TooltipProps } from '@lumx/react';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled';\nimport {\n IconButton as UI,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n IconButtonProps as UIProps,\n} from '@lumx/core/js/components/Button/IconButton';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface IconButtonProps extends GenericProps, ReactToJSX<UIProps, 'title' | 'children'> {\n /**\n * Props to pass to the tooltip.\n * If undefined or if tooltipProps.label is undefined, the label prop will be used as tooltip label.\n * */\n tooltipProps?: Partial<TooltipProps>;\n /** Whether the tooltip should be hidden or not. */\n hideTooltip?: boolean;\n /** callback for clicking on the button */\n onClick?: (event: React.MouseEvent) => void;\n /** callback for pressing a key on the button */\n onKeyPress?: (event: React.KeyboardEvent) => void;\n}\n\n/**\n * IconButton component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const IconButton = forwardRef<IconButtonProps, HTMLButtonElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { tooltipProps, hideTooltip, label, theme = defaultTheme, ...forwardedProps } = props;\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(forwardedProps);\n const { onClick, onKeyPress, ...restOfOtherProps } = otherProps;\n\n return (\n <Tooltip label={hideTooltip ? '' : label} {...tooltipProps}>\n {UI({\n ref,\n theme,\n ...disabledStateProps,\n ...restOfOtherProps,\n handleClick: onClick,\n handleKeyPress: onKeyPress,\n 'aria-disabled': isAnyDisabled,\n label,\n })}\n </Tooltip>\n );\n});\n\nIconButton.displayName = COMPONENT_NAME;\nIconButton.className = CLASSNAME;\nIconButton.defaultProps = DEFAULT_PROPS;\n","import type { LumxClassName, HasClassName, JSXElement, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component\n */\nexport interface ButtonGroupProps extends HasClassName {\n /**\n * Children\n */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ButtonGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-button-group';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ButtonGroupProps> = {};\n\n/**\n * ButtonGroup component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ButtonGroup = (props: ButtonGroupProps) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <div {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </div>\n );\n};\n\nButtonGroup.displayName = COMPONENT_NAME;\nButtonGroup.className = CLASSNAME;\nButtonGroup.defaultProps = DEFAULT_PROPS;\n","import { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport {\n ButtonGroup as UI,\n ButtonGroupProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Button/ButtonGroup';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface ButtonGroupProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * ButtonGroup component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ButtonGroup = forwardRef<ButtonGroupProps, HTMLDivElement>((props, ref) => {\n return UI({ ref, ...props });\n});\n\nButtonGroup.displayName = COMPONENT_NAME;\nButtonGroup.className = CLASSNAME;\nButtonGroup.defaultProps = DEFAULT_PROPS;\n","import { classNames } from '../../utils';\nimport { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';\nimport { Typography } from '../../constants';\n\nexport const COMPONENT_NAME = 'InputLabel';\nexport const InputLabelClassName: LumxClassName<typeof COMPONENT_NAME> = 'lumx-input-label';\n\nexport interface InputLabelProps extends HasClassName, HasTheme {\n /** Typography variant. */\n typography?: Typography;\n /** Label content. */\n children: JSXElement;\n /** Native htmlFor property. */\n htmlFor: string;\n /** Native id property. */\n id?: string;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** ref to the root element */\n ref?: CommonRef;\n /** HTML tag for rendering the label, defaults to `label` */\n as?: 'label' | 'legend';\n}\n\nconst CLASSNAME = InputLabelClassName;\nconst { block } = classNames.bem(CLASSNAME);\n\nconst DEFAULT_PROPS: Partial<InputLabelProps> = {};\n\n/**\n * InputLabel component.\n */\nexport function InputLabel(props: InputLabelProps) {\n const { children, className, htmlFor, isRequired, theme, as, typography, ref, ...forwardedProps } = props;\n const ComponentToUse = as || 'label';\n\n return (\n <ComponentToUse\n ref={ref}\n {...forwardedProps}\n htmlFor={htmlFor}\n className={classNames.join(\n className,\n block({\n 'is-required': isRequired,\n [`theme-${theme}`]: Boolean(theme),\n 'has-custom-typography': Boolean(typography),\n }),\n typography && classNames.typography(typography),\n )}\n >\n {children}\n </ComponentToUse>\n );\n}\n\nInputLabel.displayName = COMPONENT_NAME;\nInputLabel.className = CLASSNAME;\nInputLabel.defaultProps = DEFAULT_PROPS;\n","import { Kind } from '../../constants';\n\nexport const INPUT_HELPER_CONFIGURATION: Record<string, { color: string }> = {\n [Kind.error]: { color: 'red' },\n [Kind.success]: { color: 'green' },\n [Kind.warning]: { color: 'yellow' },\n};\n","import { classNames } from '../../utils';\nimport { Kind } from '../../constants';\nimport { INPUT_HELPER_CONFIGURATION } from './constants';\nimport type { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';\n\nexport const COMPONENT_NAME = 'InputHelper';\nexport const InputHelperClassName: LumxClassName<typeof COMPONENT_NAME> = 'lumx-input-helper';\n\n/**\n * Defines the props of the component.\n */\nexport interface InputHelperProps extends HasClassName, HasTheme {\n /** Helper content. */\n children: JSXElement;\n /** Helper variant. */\n kind?: Kind;\n /** ref to the root element `p` */\n ref?: CommonRef;\n /** id for the input helper */\n id?: string;\n}\n\nconst CLASSNAME = InputHelperClassName;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<InputHelperProps> = {\n kind: Kind.info,\n};\n\n/**\n * InputHelper component.\n */\nexport function InputHelper(props: InputHelperProps) {\n const { children, className, kind = DEFAULT_PROPS.kind, theme, ref, ...forwardedProps } = props;\n const { color } = INPUT_HELPER_CONFIGURATION[kind as string] || {};\n\n return (\n <p\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {children}\n </p>\n );\n}\n\nInputHelper.displayName = COMPONENT_NAME;\nInputHelper.className = CLASSNAME;\nInputHelper.defaultProps = DEFAULT_PROPS;\n","import { mdiCheck, mdiMinus } from '@lumx/icons';\n\nimport type {\n JSXElement,\n LumxClassName,\n HasTheme,\n HasAriaDisabled,\n HasDisabled,\n HasClassName,\n HasChecked,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { InputLabel } from '../InputLabel';\nimport { InputHelper } from '../InputHelper';\n\n/**\n * Intermediate state of checkbox.\n */\nexport const INTERMEDIATE_STATE = 'intermediate';\n\n/**\n * Defines the props of the component.\n */\nexport interface CheckboxProps\n extends HasTheme,\n HasClassName,\n HasAriaDisabled,\n HasDisabled,\n HasChecked<boolean | 'intermediate'> {\n /** Helper text. */\n helper?: string;\n /** Native input id property. */\n id?: string;\n /** Label text. */\n label?: JSXElement;\n /** Native input name property. */\n name?: string;\n /** Native input value property. */\n value?: string;\n /** optional props for input */\n inputProps?: Record<string, any>;\n /** Native input ref. */\n inputRef?: CommonRef;\n /** Native input id. */\n inputId: string;\n /** On change callback. */\n handleChange?(isChecked: boolean, value?: string, name?: string, event?: any): void;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Checkbox';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-checkbox';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<CheckboxProps> = {};\n\n/**\n * Checkbox component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Checkbox = (props: CheckboxProps) => {\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n ref,\n handleChange,\n theme,\n value,\n inputProps = {},\n isDisabled,\n inputId,\n ...forwardedProps\n } = props;\n\n const intermediateState = isChecked === INTERMEDIATE_STATE;\n\n const handleOnChange = (event: any) => {\n if (handleChange) {\n handleChange(!isChecked, value, name, event);\n }\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n // Whether state is intermediate class name will \"-checked\"\n 'is-checked': intermediateState ? true : isChecked,\n 'is-disabled': isDisabled,\n 'is-unchecked': !isChecked,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('input-wrapper')}>\n <input\n ref={inputRef}\n type=\"checkbox\"\n id={inputId}\n className={element('input-native')}\n name={name}\n value={value}\n checked={isChecked as boolean}\n onChange={handleOnChange}\n aria-describedby={helper ? `${inputId}-helper` : undefined}\n aria-checked={intermediateState ? 'mixed' : Boolean(isChecked)}\n {...(inputProps?.readOnly ? { readOnly: inputProps.readOnly } : {})}\n {...inputProps}\n />\n\n <div className={element('input-placeholder')}>\n <div className={element('input-background')} />\n\n <div className={element('input-indicator')}>\n {Icon({ icon: intermediateState ? mdiMinus : mdiCheck })}\n </div>\n </div>\n </div>\n\n <div className={element('content')}>\n {label && InputLabel({ htmlFor: inputId, className: element('label'), theme, children: label })}\n {helper &&\n InputHelper({ id: `${inputId}-helper`, className: element('helper'), theme, children: helper })}\n </div>\n </div>\n );\n};\n","import React from 'react';\n\nimport { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n Checkbox as UI,\n CheckboxProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n INTERMEDIATE_STATE,\n} from '@lumx/core/js/components/Checkbox';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface CheckboxProps extends GenericProps, ReactToJSX<UIProps, 'inputId'> {\n /** On change callback. */\n onChange?(isChecked: boolean, value?: string, name?: string, event?: React.ChangeEvent): void;\n}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<CheckboxProps> = {};\n\n/**\n * Checkbox component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Checkbox = forwardRef<CheckboxProps, HTMLDivElement>((props, ref) => {\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(props);\n const defaultTheme = useTheme() || Theme.light;\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n onChange,\n theme = defaultTheme,\n value,\n inputProps = {},\n ...forwardedProps\n } = otherProps;\n const localInputRef = React.useRef<HTMLInputElement>(null);\n const generatedInputId = useId();\n const inputId = id || generatedInputId;\n\n const intermediateState = isChecked === INTERMEDIATE_STATE;\n\n React.useEffect(() => {\n const input = localInputRef.current;\n if (input) input.indeterminate = intermediateState;\n }, [intermediateState]);\n\n return UI({\n ref,\n className,\n helper,\n inputRef: useMergeRefs(inputRef, localInputRef),\n isChecked,\n label,\n name,\n handleChange: onChange,\n theme,\n value,\n inputProps: {\n ...inputProps,\n ...disabledStateProps,\n readOnly: inputProps.readOnly || disabledStateProps['aria-disabled'],\n },\n ...forwardedProps,\n isDisabled: isAnyDisabled,\n inputId,\n });\n});\nCheckbox.displayName = COMPONENT_NAME;\nCheckbox.className = CLASSNAME;\nCheckbox.defaultProps = DEFAULT_PROPS;\n","import isFunction from 'lodash/isFunction';\nimport { MouseEventHandler, useCallback } from 'react';\n\n/**\n * Wrap mouse event handler to stop event propagation.\n *\n * @param handler The mouse handler to wrap.\n * @return Mouse handler stopping propagation.\n */\nexport function useStopPropagation(handler?: MouseEventHandler): MouseEventHandler {\n return useCallback(\n (evt) => {\n if (!evt || !isFunction(handler)) {\n return;\n }\n handler(evt);\n evt.stopPropagation();\n },\n [handler],\n );\n}\n","import { ColorPalette, Size, Theme } from '../../constants';\nimport {\n HasTheme,\n HasAriaDisabled,\n JSXElement,\n LumxClassName,\n HasClassName,\n HasDisabled,\n CommonRef,\n GenericProps,\n} from '../../types';\nimport { classNames, onEnterPressed } from '../../utils';\n\n/**\n * Chip sizes.\n */\nexport type ChipSize = Extract<Size, 's' | 'm'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipProps extends HasClassName, HasDisabled, HasTheme, HasAriaDisabled {\n /** A component to be rendered after the content. */\n after?: JSXElement;\n /** A component to be rendered before the content. */\n before?: JSXElement;\n /** Color variant. */\n color?: ColorPalette;\n /** Whether the component is clickable or not. */\n isClickable?: boolean;\n /** Whether the chip is currently in a highlighted state or not. */\n isHighlighted?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Size variant. */\n size?: ChipSize;\n /** href for the chip if it is a link */\n href?: string;\n /** reference to the root element */\n ref?: CommonRef;\n /** On \"after\" element clicked callback. */\n handleAfterClick?: (event: any) => void;\n /** On element key down callback. */\n handleKeyDown?: (event: any) => void;\n /** On \"before\" element clicked callback. */\n handleBeforeClick?: (event: any) => void;\n /** On element clicked callback. */\n handleClick?: (event: any) => void;\n /** name of the prop for handling key down events */\n keyDownProp?: string;\n /** name of the prop for tab index */\n tabIndexProp?: string;\n /** Children */\n children?: JSXElement;\n /** Props to apply when the component is in a disabled state. */\n disabledStateProps: GenericProps;\n /** Whether the \"after\" element has a click handler. */\n hasAfterClick?: boolean;\n /** Whether the \"before\" element has a click handler. */\n hasBeforeClick?: boolean;\n /** Whether the component has a main click handler. */\n hasOnClick?: boolean;\n /** Whether any part of the component is disabled. */\n isAnyDisabled?: boolean;\n}\n\nexport type ChipPropsToOverride =\n | 'disabledStateProps'\n | 'hasOnClick'\n | 'hasBeforeClick'\n | 'hasAfterClick'\n | 'before'\n | 'after'\n | 'keyDownProp'\n | 'tabIndexProp'\n | 'isAnyDisabled';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Chip';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-chip';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ChipProps> = {\n size: Size.m,\n};\n\n/**\n * Chip component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Chip = (props: ChipProps) => {\n const {\n after,\n before,\n children,\n className,\n color,\n isClickable: propIsClickable,\n isHighlighted,\n isSelected,\n handleAfterClick,\n handleBeforeClick,\n handleClick,\n hasAfterClick,\n hasBeforeClick,\n hasOnClick,\n size = DEFAULT_PROPS.size,\n theme,\n ref,\n href,\n handleKeyDown,\n disabledStateProps,\n isAnyDisabled,\n keyDownProp = 'onKeyDown',\n tabIndexProp = 'tabIndex',\n ...forwardedProps\n } = props;\n const isButton = hasOnClick && !href;\n const isClickable = Boolean(hasOnClick) || Boolean(href) || propIsClickable;\n\n // Adapt color to the theme.\n const chipColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);\n\n const handleOnKeyDown = (evt: any) => {\n handleKeyDown?.(evt);\n\n if (hasOnClick && handleClick) {\n onEnterPressed(handleClick)(evt);\n }\n };\n\n const compatibilityProps = {\n [keyDownProp]: handleOnKeyDown,\n [tabIndexProp]: isClickable && !disabledStateProps.disabled ? 0 : undefined,\n };\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <a\n role={isButton ? 'button' : undefined}\n {...compatibilityProps}\n {...forwardedProps}\n href={!disabledStateProps.disabled ? href : undefined}\n ref={ref}\n className={classNames.join(\n className,\n block({\n 'is-clickable': isClickable,\n [`color-${chipColor}`]: Boolean(chipColor),\n 'is-disabled': isAnyDisabled,\n 'has-after': Boolean(after),\n 'has-before': Boolean(before),\n 'is-highlighted': Boolean(isHighlighted),\n 'is-selected': Boolean(isSelected),\n [`size-${size}`]: Boolean(size),\n 'is-unselected': Boolean(!isSelected),\n }),\n )}\n aria-disabled={(isClickable && isAnyDisabled) || undefined}\n onClick={hasOnClick ? handleClick : undefined}\n >\n {before && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <div\n className={element('before', {\n 'is-clickable': hasBeforeClick,\n })}\n onClick={handleBeforeClick}\n >\n {before}\n </div>\n )}\n <div className={element('label')}>{children}</div>\n {after && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <div\n className={element('after', {\n 'is-clickable': hasAfterClick,\n })}\n onClick={handleAfterClick}\n >\n {after}\n </div>\n )}\n </a>\n );\n};\n","import { ReactNode } from 'react';\n\nimport isFunction from 'lodash/isFunction';\n\nimport { Theme } from '@lumx/core/js/constants';\nimport { useStopPropagation } from '@lumx/react/hooks/useStopPropagation';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport {\n Chip as UI,\n ChipProps as UIProps,\n ChipPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Chip';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipProps extends GenericProps, ReactToJSX<UIProps, ChipPropsToOverride> {\n /** A component to be rendered after the content. */\n after?: ReactNode;\n /** A component to be rendered before the content. */\n before?: ReactNode;\n /** On \"after\" element clicked callback. */\n onAfterClick?: (event: React.MouseEvent) => void;\n /** On \"before\" element clicked callback. */\n onBeforeClick?: (event: React.MouseEvent) => void;\n /** On element clicked callback. */\n onClick?: (event: React.MouseEvent) => void;\n /** On element key down callback. */\n onKeyDown?: (event: React.KeyboardEvent) => void;\n}\n\n/**\n * Chip component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Chip = forwardRef<ChipProps, HTMLAnchorElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(props);\n const { onAfterClick, onBeforeClick, onClick, theme = defaultTheme, onKeyDown, ...forwardedProps } = otherProps;\n const hasAfterClick = isFunction(onAfterClick);\n const hasBeforeClick = isFunction(onBeforeClick);\n const hasOnClick = isFunction(props.onClick);\n\n const handleOnBeforeClick = useStopPropagation(onBeforeClick);\n const handleOnAfterClick = useStopPropagation(onAfterClick);\n\n return UI({\n hasAfterClick,\n hasBeforeClick,\n hasOnClick,\n handleAfterClick: handleOnAfterClick,\n handleBeforeClick: handleOnBeforeClick,\n handleClick: onClick,\n handleKeyDown: onKeyDown,\n theme,\n disabledStateProps,\n isAnyDisabled,\n ref,\n ...forwardedProps,\n });\n});\n\nChip.displayName = COMPONENT_NAME;\nChip.className = CLASSNAME;\nChip.defaultProps = DEFAULT_PROPS;\n","import { HorizontalAlignment } from '../../constants';\nimport type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipGroupProps extends HasClassName {\n /**\n * Chip horizontal alignment.\n * @deprecated\n */\n align?: HorizontalAlignment;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ChipGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-chip-group';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ChipGroupProps> = {};\n\n/**\n * ChipGroup component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ChipGroup = (props: ChipGroupProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </div>\n );\n};\n","import { useState } from 'react';\n\ninterface UseChipGroupNavigation {\n /** the current active chip index */\n activeChip: number;\n\n /** callback to be executed when the backspace was pressed */\n onBackspacePressed(): void;\n\n /** function that allows to reset the navigation */\n resetChipNavigation(): void;\n}\n\nexport type useChipGroupNavigationType<C = any> = (\n chips: C[],\n onChipDeleted: (chip: C) => void,\n initialActiveChip?: number,\n) => UseChipGroupNavigation;\n\nconst INITIAL_STATE_ACTIVE_CHIP = -1;\n\n/**\n * Hook that provides the necessary information to manage chips navigation.\n * @param chips List of chips selected.\n * @param onChipDeleted Callback executed when a chip must be eliminated.\n * @param initialActiveChip Initial active chip index.\n *\n * @return chip navigation tools.\n */\nexport const useChipGroupNavigation: useChipGroupNavigationType = (\n chips,\n onChipDeleted,\n initialActiveChip = INITIAL_STATE_ACTIVE_CHIP,\n) => {\n const [wasBackspacePressed, setWasBackspacePressed] = useState(false);\n const [activeChip, setActiveChip] = useState(initialActiveChip);\n\n /**\n * Resets the active index and backspace control to their initial state\n */\n const resetChipNavigation = () => {\n setWasBackspacePressed(false);\n setActiveChip(initialActiveChip);\n };\n\n /**\n * Callback to be executed when the backspace was pressed. If there are no chips\n * selected, it will return immediately. If there are it will check if the\n * backspace was already pressed. if it was, it means that the user wants to eliminate\n * the chip, so we execute the `onChipDeleted` function and reset internal state.\n *\n * If it was not pressed before, we set the `wasBackspacePressed` flag to true and\n * highlight the last chip.\n */\n const onBackspacePressed = () => {\n if (chips.length === 0) {\n return;\n }\n\n if (wasBackspacePressed) {\n const chipDeleted: any = chips[chips.length - 1];\n onChipDeleted(chipDeleted);\n resetChipNavigation();\n } else {\n setActiveChip(chips.length - 1);\n setWasBackspacePressed(true);\n }\n };\n\n return {\n activeChip,\n onBackspacePressed,\n resetChipNavigation,\n };\n};\n","import { ReactNode } from 'react';\n\nimport {\n ChipGroup as UI,\n ChipGroupProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Chip/ChipGroup';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useChipGroupNavigation } from '@lumx/react/hooks/useChipGroupNavigation';\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipGroupProps extends GenericProps, ReactToJSX<UIProps, never> {\n /** List of Chip. */\n children: ReactNode;\n}\n\n/**\n * ChipGroup component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nconst InternalChipGroup = forwardRef<ChipGroupProps, HTMLDivElement>((props, ref) => {\n const { children, ...forwardedProps } = props;\n\n return UI({\n ref,\n children,\n ...forwardedProps,\n });\n});\nInternalChipGroup.displayName = COMPONENT_NAME;\nInternalChipGroup.className = CLASSNAME;\nInternalChipGroup.defaultProps = DEFAULT_PROPS;\n\nexport const ChipGroup = Object.assign(InternalChipGroup, { useChipGroupNavigation });\n","import { mdiClose } from '@lumx/icons';\n\nimport type { LumxClassName, HasClassName, HasTheme } from '../../types';\nimport type { Selector } from '../../types/Selector';\nimport { classNames } from '../../utils';\nimport { getWithSelector } from '../../utils/selectors';\nimport type { ChipProps } from '.';\n\n/**\n * Framework-specific components injected by React/Vue wrappers.\n */\nexport interface SelectionChipGroupComponents {\n Chip: any;\n ChipGroup: any;\n Icon: any;\n Text: any;\n Tooltip: any;\n}\n\n/**\n * Props that consumers can override per chip via getChipProps.\n * Excludes internal/framework props that the core always controls.\n */\nexport type ChipOverrideProps = Pick<\n ChipProps,\n 'isDisabled' | 'color' | 'isHighlighted' | 'isSelected' | 'className' | 'before' | 'after'\n>;\n\n/**\n * Defines the props of the component.\n */\nexport interface SelectionChipGroupProps<O> extends HasClassName, HasTheme {\n /** Option object id selector (either a property name or a function to get the id) */\n getOptionId: Selector<O>;\n /** Option object name selector. Falls back to the id if not defined */\n getOptionName?: Selector<O, string | undefined | null>;\n /** Selected options array */\n value?: O[];\n /** Label for accessibility (aria-label on the listbox) */\n label: string;\n /** Label for the remove action (visually hidden text appended to each chip) */\n chipRemoveLabel?: string;\n /** Disabled state for all chips */\n isDisabled?: boolean;\n /** Customize chip props per option */\n getChipProps?: (option: O) => Partial<ChipProps>;\n /** Ref for the container element */\n ref?: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SelectionChipGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-selection-chip-group';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * SelectionChipGroup component.\n * Renders a listbox of removable selection chips using component injection for framework-agnostic rendering.\n *\n * @param props Component props.\n * @param components Framework-specific components injected by the wrapper (Chip, ChipGroup, Icon, Tooltip).\n * @return JSX element, or null when value is empty.\n */\nexport const SelectionChipGroup = <O,>(\n props: SelectionChipGroupProps<O>,\n { Chip, ChipGroup, Icon, Text, Tooltip }: SelectionChipGroupComponents,\n) => {\n const {\n value,\n getOptionId,\n getOptionName,\n label,\n chipRemoveLabel,\n isDisabled,\n theme,\n className,\n getChipProps,\n ref,\n ...forwardedProps\n } = props;\n\n if (!value || value.length === 0) return null;\n\n return (\n <ChipGroup\n {...forwardedProps}\n ref={ref}\n role=\"listbox\"\n aria-label={label}\n aria-multiselectable=\"true\"\n aria-orientation=\"horizontal\"\n className={block([className])}\n >\n {value.map((v) => {\n const name = (getOptionName && getWithSelector(getOptionName, v)) || getWithSelector(getOptionId, v);\n const id = getWithSelector(getOptionId, v);\n\n // Merge custom overrides with defaults\n const customProps = getChipProps?.(v) || {};\n const chipIsDisabled = customProps.isDisabled || isDisabled;\n const chipName = typeof customProps.children === 'string' ? customProps.children : name;\n const ariaLabel = chipRemoveLabel ? `${chipName} - ${chipRemoveLabel}` : chipName;\n\n return (\n <Tooltip key={id} label={!chipIsDisabled ? ariaLabel : undefined}>\n <Chip\n aria-label={ariaLabel}\n {...customProps}\n size=\"s\"\n after={<Icon icon={mdiClose} />}\n className={element('chip', [customProps.className])}\n data-option-id={id}\n isClickable\n role=\"option\"\n aria-selected=\"true\"\n theme={theme}\n isDisabled={chipIsDisabled}\n >\n <Text as=\"span\" truncate>\n {customProps.children || name}\n </Text>\n </Chip>\n </Tooltip>\n );\n })}\n </ChipGroup>\n );\n};\n","/**\n * Create a TreeWalker that iterates over elements matching a CSS selector\n * within a container.\n *\n * Uses `NodeFilter.SHOW_ELEMENT` and accepts nodes that match the given\n * selector, skipping everything else. The returned walker can be used with\n * `nextNode()` / `previousNode()` for lazy, sequential DOM traversal.\n *\n * @param container The root element to walk within.\n * @param selector CSS selector that items must match.\n * @returns A TreeWalker scoped to the container and filtered by the selector.\n */\nexport function createSelectorTreeWalker(container: HTMLElement, selector: string): TreeWalker {\n return document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Node) {\n return (node as HTMLElement).matches(selector) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n}\n","import { CLASSNAME as CHIP_CLASSNAME } from '.';\nimport type { Selector } from '../../types/Selector';\nimport { createSelectorTreeWalker } from '../../utils/browser/createSelectorTreeWalker';\nimport { getWithSelector } from '../../utils/selectors';\n\n/** CSS selector for enabled chips (not aria-disabled). */\nconst ENABLED_CHIP_SELECTOR = `.${CHIP_CLASSNAME}:not([aria-disabled=\"true\"])`;\n\n/** Find the closest chip element from an event target. */\nconst getChip = (target: EventTarget | null) =>\n (target as HTMLElement | null)?.closest?.<HTMLElement>(`.${CHIP_CLASSNAME}`) || null;\n\n/** Whether the chip is marked as disabled via aria-disabled. */\nconst isChipDisabled = (chip: HTMLElement | null) => chip?.getAttribute('aria-disabled') === 'true';\n\n/**\n * Options for setting up selection chip group event handlers.\n * All option accessors are wrapped in getters so that React/Vue can provide\n * reactive values without the core needing to know about reactivity systems.\n */\nexport interface SetupSelectionChipGroupEventsOptions<O> {\n /** Getter for the current selected options array. */\n getValue: () => O[] | undefined;\n /** Getter for the option id selector. */\n getOptionId: Selector<O>;\n /** Callback when the option array changes. */\n onChange: (newValue?: O[]) => void;\n /** Getter for the chip group container element. */\n getContainer: () => HTMLElement | null | undefined;\n /** Getter for the associated input element (optional). */\n getInput?: () => HTMLInputElement | null | undefined;\n}\n\n/**\n * Find the nearest enabled chip in the given direction relative to `anchor`.\n *\n * - When `anchor` is provided, walks one step in `direction` from it.\n * - When `anchor` is omitted, returns the first enabled chip from the matching\n * end of the container (last chip for 'previous', first for 'next').\n */\nfunction findSiblingChip(\n container: HTMLElement,\n direction: 'next' | 'previous',\n anchor?: Element | null,\n): HTMLElement | undefined {\n const walker = createSelectorTreeWalker(container, ENABLED_CHIP_SELECTOR);\n\n if (anchor) {\n walker.currentNode = anchor;\n const node = direction === 'next' ? walker.nextNode() : walker.previousNode();\n return (node as HTMLElement) || undefined;\n }\n\n // No anchor: walk from the matching end of the container.\n if (direction === 'previous') {\n let last: HTMLElement | undefined;\n while (walker.nextNode()) {\n last = walker.currentNode as HTMLElement;\n }\n return last;\n }\n return (walker.nextNode() as HTMLElement) || undefined;\n}\n\n/** Remove an option by its id and call onChange. */\nfunction removeOption<O>(options: SetupSelectionChipGroupEventsOptions<O>, optionId: string) {\n const value = options.getValue();\n if (!value) return;\n\n const index = value.findIndex((item) => String(getWithSelector(options.getOptionId, item)) === optionId);\n if (index === -1) return;\n\n const newValue = [...value];\n newValue.splice(index, 1);\n options.onChange(newValue);\n}\n\n/**\n * Attach delegated click and keydown event listeners on the chip group container,\n * and optionally an input backspace handler.\n *\n * Uses addEventListener on the container element. Events bubble up from individual\n * chips, so there is no need to re-attach listeners when chips change.\n *\n * @returns A cleanup function that removes all attached event listeners.\n */\nexport function setupSelectionChipGroupEvents<O>(options: SetupSelectionChipGroupEventsOptions<O>): () => void {\n const container = options.getContainer();\n if (!container) return () => {};\n\n // Delegated click handler on the chip group container.\n const handleClick = (evt: Event) => {\n const chip = getChip(evt.target);\n const optionId = chip?.dataset.optionId;\n if (optionId == null || isChipDisabled(chip)) {\n return;\n }\n\n evt.stopImmediatePropagation();\n removeOption(options, optionId);\n };\n\n // Delegated keydown handler on the chip group container.\n const handleKeyDown = (evt: KeyboardEvent) => {\n const chip = getChip(evt.target);\n const optionId = chip?.dataset.optionId;\n const activatingKey = evt.key === 'Enter' || evt.key === ' ' || evt.key === 'Backspace';\n if (optionId == null || !activatingKey || isChipDisabled(chip)) {\n return;\n }\n\n // Compute focus fallback target before removing the chip.\n let focusTarget: HTMLElement | undefined;\n if (evt.key === 'Backspace') {\n // Custom behavior (not WAI-ARIA recommendation) => focus the previous chip, fallback on input (no more chips)\n focusTarget = findSiblingChip(container, 'previous', chip) || options.getInput?.() || undefined;\n } else {\n // WAI-ARIA recommendation when removing an option in a listbox => focus the next chip, fallback on previous chip\n // (bonus: we fallback on input when there is no more chips)\n focusTarget =\n findSiblingChip(container, 'next', chip) ||\n findSiblingChip(container, 'previous', chip) ||\n options.getInput?.() ||\n undefined;\n }\n if (focusTarget) {\n focusTarget.focus();\n focusTarget.setAttribute('tabindex', '0');\n }\n\n evt.preventDefault();\n removeOption(options, optionId);\n };\n\n container.addEventListener('click', handleClick);\n container.addEventListener('keydown', handleKeyDown);\n\n // Attach input backspace handler if an input is provided.\n const input = options.getInput?.();\n let inputHandler: ((evt: KeyboardEvent) => void) | undefined;\n if (input) {\n inputHandler = (evt: KeyboardEvent) => {\n const backspacePressed = evt.key === 'Backspace';\n const cursorAtStart = input.selectionStart === 0 && input.selectionEnd === 0;\n\n if (!backspacePressed || !cursorAtStart) return;\n\n evt.stopPropagation();\n evt.preventDefault();\n\n const lastChip = findSiblingChip(container, 'previous');\n lastChip?.focus();\n };\n input.addEventListener('keydown', inputHandler);\n }\n\n // Return cleanup function.\n return () => {\n container.removeEventListener('click', handleClick);\n container.removeEventListener('keydown', handleKeyDown);\n if (input && inputHandler) {\n input.removeEventListener('keydown', inputHandler);\n }\n };\n}\n","import { Icon as UI, IconProps as UIProps, IconSizes } from '@lumx/core/js/components/Icon';\nimport { GenericProps } from '@lumx/core/js/types';\n\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport type { IconSizes };\n\nexport interface IconProps extends ReactToJSX<UIProps>, GenericProps {}\n\n/**\n * Icon component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Icon = forwardRef<IconProps, HTMLElement>((props, ref) => {\n const defaultTheme = useTheme();\n\n return UI({ ...props, ref, theme: props.theme || defaultTheme });\n});\n\nIcon.displayName = UI.displayName;\nIcon.className = UI.className;\nIcon.defaultProps = UI.defaultProps;\n","import React from 'react';\n\n/** Empty object */\ntype TooltipContextValue = NonNullable<unknown>;\n\nconst DEFAULT_VALUE = {};\n\n/**\n * Tooltip react context simply used as a marker to know when parent react node have a tooltip\n */\nconst TooltipContext = React.createContext<TooltipContextValue | undefined>(undefined);\n\nexport const TooltipContextProvider: React.FC<{ children?: React.ReactNode }> = ({ children }) => (\n <TooltipContext.Provider value={DEFAULT_VALUE}>{children}</TooltipContext.Provider>\n);\n\nexport const useTooltipContext = () => React.useContext(TooltipContext);\n","import React from 'react';\nimport { useTooltipContext } from '@lumx/react/components/tooltip/context';\nimport { classNames } from '@lumx/core/js/utils';\n\n/**\n * Compute a tooltip label based on a label element `innerText` if the text overflows.\n * Updates dynamically on content changes (but not on resize!)\n */\nexport const useOverflowTooltipLabel = (content: React.ReactNode) => {\n const parentTooltip = useTooltipContext();\n const [tooltipLabel, setTooltipLabel] = React.useState<string | undefined>(undefined);\n const [labelElement, setLabelElement] = React.useState<HTMLElement | null>(null);\n\n React.useLayoutEffect(() => {\n if (\n // Not inside a tooltip\n !parentTooltip &&\n labelElement &&\n // Not inside a visually hidden\n !labelElement?.closest(`.${classNames.visuallyHidden()}`) &&\n // Text overflows\n labelElement.offsetWidth < labelElement.scrollWidth\n ) {\n // Set tooltip label\n setTooltipLabel(labelElement.innerText);\n } else {\n setTooltipLabel(undefined);\n }\n }, [labelElement, parentTooltip, content]);\n\n return { labelRef: setLabelElement, tooltipLabel };\n};\n","import React, { ReactElement, ReactNode } from 'react';\n\n/**\n * Similar to `isComponent` but more precise as it's not based on the component `displayName` but on the component function reference.\n */\nexport const isComponentType =\n (type: ReactElement['type']) =>\n (node: ReactNode): node is ReactElement =>\n React.isValidElement(node) && node.type === type;\n","import React, { Children } from 'react';\nimport { isComponentType } from '@lumx/react/utils/type';\nimport { Icon } from '@lumx/react/components/icon';\n\n/** Force wrap spaces around icons to make sure they are never stuck against text. */\nexport function wrapChildrenIconWithSpaces(children: React.ReactNode): React.ReactNode {\n if (children === null || children === undefined) return undefined;\n return Children.toArray(children).flatMap((child) => {\n if (isComponentType(Icon)(child)) {\n return [' ', child, ' '];\n }\n if (\n React.isValidElement(child) &&\n child.props &&\n typeof child.props === 'object' &&\n 'children' in child.props\n ) {\n return React.cloneElement(\n child,\n undefined,\n wrapChildrenIconWithSpaces(child.props.children as React.ReactNode),\n );\n }\n return child;\n });\n}\n","import type { CSSProperties } from 'react';\n\nimport { classNames } from '../../utils';\nimport type { TextElement, LumxClassName, JSXElement, HasClassName } from '../../types';\nimport { ColorWithVariants, ColorVariant, Typography, WhiteSpace } from '../../constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TextProps extends HasClassName {\n /**\n * Color variant.\n */\n color?: ColorWithVariants;\n /**\n * Lightened or darkened variant of the selected color.\n */\n colorVariant?: ColorVariant;\n /**\n * Typography variant.\n */\n typography?: Typography;\n /**\n * Custom component to render the text.\n */\n as: TextElement;\n /**\n * Control whether the text should truncate or not.\n * Setting as `true` will make the text truncate on a single line.\n * Setting as `{ lines: number }` will make the text truncate on a multiple lines.\n */\n truncate?: boolean | { lines: number };\n /**\n * Prevents text to wrap on multiple lines\n * (automatically activated when single line text truncate is activated).\n */\n noWrap?: boolean;\n /**\n * WhiteSpace variant\n * Ignored when `noWrap` is set to true\n * Ignored when `truncate` is set to true or lines: 1\n * */\n whiteSpace?: WhiteSpace;\n /**\n * Children\n */\n children?: JSXElement;\n /** list of styles to apply */\n style?: CSSProperties;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Text';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-text';\nexport const { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {} as const;\n\n/**\n * Text component common props\n *\n * @param props Component props.\n * @return Common Props\n */\nexport const getTextProps = (props: Omit<TextProps, 'as'>) => {\n const { className, color, colorVariant, noWrap, typography, truncate, whiteSpace, style } = props;\n\n // Truncate mode\n const truncateLinesStyle = typeof truncate === 'object' &&\n truncate.lines > 1 && { '--lumx-text-truncate-lines': truncate.lines };\n const isTruncatedMultiline = !!truncateLinesStyle;\n const isTruncated = !!truncate;\n\n /**\n * Add custom white-space style if specified\n * Disabled if noWrap is specified\n * Disabled if truncated on one-line\n * */\n const whiteSpaceStyle = !noWrap &&\n !(isTruncated && !isTruncatedMultiline) &&\n whiteSpace && { '--lumx-text-white-space': whiteSpace };\n\n return {\n className: classNames.join(\n className,\n block({\n 'is-truncated': isTruncated && !isTruncatedMultiline,\n 'is-truncated-multiline': isTruncatedMultiline,\n 'no-wrap': noWrap,\n }),\n typography && classNames.typography(typography),\n color && classNames.font(color, colorVariant),\n ),\n style: { ...truncateLinesStyle, ...whiteSpaceStyle, ...style },\n };\n};\n","import React from 'react';\n\nimport { useOverflowTooltipLabel } from '@lumx/react/hooks/useOverflowTooltipLabel';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { wrapChildrenIconWithSpaces } from '@lumx/react/utils/react/wrapChildrenIconWithSpaces';\nimport {\n getTextProps,\n TextProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Text';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface TextProps extends ReactToJSX<UIProps>, GenericProps {}\n\n/**\n * Text component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Text = forwardRef<TextProps>((props, ref) => {\n const {\n as: Component,\n children,\n color,\n colorVariant,\n noWrap,\n typography,\n truncate,\n whiteSpace,\n ...forwardedProps\n } = props;\n\n const { tooltipLabel, labelRef } = useOverflowTooltipLabel(children);\n const { className, style } = React.useMemo(() => getTextProps(props), [props]);\n\n return (\n <Component\n ref={useMergeRefs(ref as React.Ref<any>, labelRef)}\n title={tooltipLabel}\n {...forwardedProps}\n className={className}\n style={style}\n >\n {wrapChildrenIconWithSpaces(children)}\n </Component>\n );\n});\n\nText.displayName = COMPONENT_NAME;\nText.className = CLASSNAME;\nText.defaultProps = DEFAULT_PROPS;\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n var _platform$detectOverf;\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: {\n ...platform,\n detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow\n },\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","export const ARIA_LINK_MODES = ['aria-describedby', 'aria-labelledby'] as const;\n\n/**\n * Arrow size (in pixel).\n */\nexport const ARROW_SIZE = 8;\n\n/**\n * Make sure tooltip appear above popovers.\n * Hardcoded as POPOVER_ZINDEX (9999) + 1.\n */\nexport const TOOLTIP_ZINDEX = 10000;\n","import type { CommonRef, HasClassName, HasCloseMode, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ARIA_LINK_MODES, TOOLTIP_ZINDEX } from './constants';\n\n/** Position of the tooltip relative to the anchor element. */\nexport type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';\n\n/**\n * Framework-agnostic tooltip props (shared between React and Vue wrappers).\n */\nexport interface TooltipProps extends HasCloseMode {\n /** Delay (in ms) before closing the tooltip. */\n delay?: number;\n /** Whether the tooltip is displayed even without the mouse hovering the anchor. */\n forceOpen?: boolean;\n /** Label text. */\n label?: string | null | false;\n /** Placement of the tooltip relative to the anchor. */\n placement?: TooltipPlacement;\n /** Choose how the tooltip text should link to the anchor */\n ariaLinkMode?: (typeof ARIA_LINK_MODES)[number];\n /** Z-index for the tooltip */\n zIndex?: number;\n}\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TooltipProps> = {\n placement: 'bottom',\n closeMode: 'unmount',\n ariaLinkMode: 'aria-describedby',\n zIndex: TOOLTIP_ZINDEX,\n};\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Tooltip';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-tooltip';\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Props for the TooltipPopup rendering component.\n */\nexport interface TooltipPopupProps extends HasClassName {\n /** Unique ID for the tooltip (used for ARIA linking) */\n id: string;\n /** Label text to display in the tooltip */\n label: string;\n /** Resolved placement position from floating-ui */\n position: string;\n /** Whether the tooltip is visually hidden (closeMode=\"hide\") */\n isHidden: boolean;\n /** Positioning styles from floating-ui */\n style?: any;\n /** Z-index for the tooltip */\n zIndex?: number;\n /** Reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Tooltip popup rendering component.\n * Pure JSX template for the tooltip popup element (arrow + inner text + BEM classes).\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const TooltipPopup = (props: TooltipPopupProps) => {\n const { id, label, position, isHidden, style, zIndex = TOOLTIP_ZINDEX, className, ref, ...forwardedProps } = props;\n\n const labelLines = label ? label.split('\\n') : [];\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n id={id}\n role=\"tooltip\"\n className={classNames.join(\n className,\n block({\n [`position-${position}`]: Boolean(position),\n }),\n isHidden && classNames.visuallyHidden(),\n )}\n style={{ ...(isHidden ? undefined : style), zIndex }}\n data-popper-placement={position}\n >\n <div className={element('arrow')} />\n <div className={element('inner')}>\n {labelLines.map((line, index) => (\n <p key={index}>{line}</p>\n ))}\n </div>\n </div>\n );\n};\n\nTooltipPopup.displayName = COMPONENT_NAME;\nTooltipPopup.className = CLASSNAME;\n\nexport { ARIA_LINK_MODES, ARROW_SIZE, TOOLTIP_ZINDEX } from './constants';\n","import React, { cloneElement, ReactNode, useMemo } from 'react';\n\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\n\ninterface Options {\n /** Original tooltip anchor */\n children: ReactNode;\n /** Set tooltip anchor element */\n setAnchorElement: (e: HTMLDivElement) => void;\n /** Whether the tooltip is open or not */\n isMounted: boolean | undefined;\n /** Tooltip id */\n id: string;\n /** Tooltip label*/\n label?: string | null | false;\n /** Choose how the tooltip text should link to the anchor */\n ariaLinkMode: 'aria-describedby' | 'aria-labelledby';\n}\n\n/**\n * Add ref and ARIA attribute(s) in tooltip children or wrapped children.\n * Button, IconButton, Icon and React HTML elements don't need to be wrapped but any other kind of children (array, fragment, custom components)\n * will be wrapped in a <span>.\n */\nexport const useInjectTooltipRef = (options: Options): ReactNode => {\n const { children, setAnchorElement, isMounted, id, label, ariaLinkMode } = options;\n // Only add link when mounted\n const linkId = isMounted ? id : undefined;\n\n return useMemo(() => {\n if (!label) return children;\n\n // Non-disabled element\n if (React.isValidElement(children) && children.props.disabled !== true && children.props.isDisabled !== true) {\n const ref = mergeRefs((children as any).ref, setAnchorElement);\n const props = { ...children.props, ref };\n\n // Do not add label/description if the tooltip label is already in aria-label\n if (linkId && label !== props['aria-label']) {\n if (props[ariaLinkMode]) props[ariaLinkMode] += ' ';\n else props[ariaLinkMode] = '';\n props[ariaLinkMode] += linkId;\n }\n\n return cloneElement(children, props);\n }\n\n const aria = linkId ? { [ariaLinkMode]: linkId } : undefined;\n return (\n <div className=\"lumx-tooltip-anchor-wrapper\" ref={setAnchorElement} {...aria}>\n {children}\n </div>\n );\n }, [label, children, setAnchorElement, linkId, ariaLinkMode]);\n};\n","import last from 'lodash/last';\nimport pull from 'lodash/pull';\n\nexport type Listener = { enable(): void; disable(): void };\n\n/**\n * Keep track of listeners, only the last registered listener gets activated at any point (previously registered\n * listener are disabled).\n * When a listener gets unregistered, the previously registered listener gets enabled again.\n */\nexport function makeListenerTowerContext() {\n const LISTENERS: Listener[] = [];\n\n return {\n register(listener: Listener) {\n // Disable previous listener.\n last(LISTENERS)?.disable();\n // Keep track of current listener.\n LISTENERS.push(listener);\n // Enable current listener.\n listener.enable();\n },\n unregister(listener: Listener) {\n // Disable current listener.\n listener.disable();\n // Remove current listener.\n pull(LISTENERS, listener);\n // Enable previous listener.\n last(LISTENERS)?.enable();\n },\n };\n}\n","import { DOCUMENT } from '@lumx/react/constants';\nimport { Callback } from '@lumx/react/utils/type';\nimport { onEscapePressed } from '@lumx/core/js/utils';\nimport { useEffect } from 'react';\nimport { Listener, makeListenerTowerContext } from '@lumx/core/js/utils/function/listenerTower';\n\nconst LISTENERS = makeListenerTowerContext();\n\n/**\n * Register a global listener on 'Escape' key pressed.\n *\n * If multiple listener are registered, only the last one is maintained. When a listener is unregistered, the previous\n * one gets activated again.\n *\n * @param callback Callback\n * @param closeOnEscape Disables the hook when false\n */\nexport function useCallbackOnEscape(callback: Callback | undefined, closeOnEscape = true) {\n useEffect(() => {\n const rootElement = DOCUMENT?.body;\n if (!closeOnEscape || !callback || !rootElement) {\n return undefined;\n }\n const onKeyDown = onEscapePressed(callback);\n\n const listener: Listener = {\n enable: () => rootElement.addEventListener('keydown', onKeyDown),\n disable: () => rootElement.removeEventListener('keydown', onKeyDown),\n };\n\n LISTENERS.register(listener);\n return () => LISTENERS.unregister(listener);\n }, [callback, closeOnEscape]);\n}\n","/** Check if the focus is visible on the given element */\nexport const isFocusVisible = (element?: HTMLElement) => {\n try {\n return element?.matches?.(':focus-visible, [data-focus-visible-added]');\n } catch (_ignored) {\n // Can fail on non browser env\n return true;\n }\n};\n","/** Return true if the browser does not support pointer hover */\nexport const isHoverNotSupported = (): boolean => !!window.matchMedia?.('(hover: none)').matches;\n","import { IS_BROWSER, TOOLTIP_HOVER_DELAY, TOOLTIP_LONG_PRESS_DELAY } from '../../constants';\nimport { isFocusVisible } from '../../utils/browser/isFocusVisible';\nimport { isHoverNotSupported } from '../../utils/browser/isHoverNotSupported';\n\nexport interface TooltipOpenManagerOptions {\n /** Delay in millisecond to display the tooltip. */\n delay?: number;\n /** Callback to update the open state. */\n onStateChange: (isOpen: boolean) => void;\n}\n\nexport interface TooltipOpenManager {\n /** Attach event listeners to the anchor element. */\n attachAnchor(anchorElement: HTMLElement): void;\n /** Attach event listeners to the popper element (for hover support). */\n attachPopper(popperElement: HTMLElement | null): void;\n /** Close the tooltip immediately (for escape key integration). */\n close(): void;\n /** Destroy the manager, clearing all timers and detaching events. */\n destroy(): void;\n}\n\n/**\n * Framework-agnostic open/close state machine for tooltip.\n * Manages hover, touch, focus, timers, and escape key behavior.\n */\nexport function createTooltipOpenManager(options: TooltipOpenManagerOptions): TooltipOpenManager {\n const { delay, onStateChange } = options;\n\n let timer: ReturnType<typeof setTimeout> | undefined;\n let openStartTime: number | undefined;\n let shouldOpen: boolean | undefined;\n let anchorController: AbortController | undefined;\n let popperController: AbortController | undefined;\n\n // Run timer to defer updating the isOpen state.\n const deferUpdate = (duration: number) => {\n if (timer) clearTimeout(timer);\n const update = () => {\n onStateChange(!!shouldOpen);\n };\n // Skip timeout in fake browsers\n if (!IS_BROWSER) update();\n else timer = setTimeout(update, duration);\n };\n\n const hoverNotSupported = isHoverNotSupported();\n const hasTouch = typeof window !== 'undefined' && 'ontouchstart' in window;\n\n // Adapt open/close delay\n const openDelay = delay || (hoverNotSupported ? TOOLTIP_LONG_PRESS_DELAY.open : TOOLTIP_HOVER_DELAY.open);\n const closeDelay = hoverNotSupported ? TOOLTIP_LONG_PRESS_DELAY.close : TOOLTIP_HOVER_DELAY.close;\n\n // Open (or/and cancel closing) of tooltip.\n const open = () => {\n if (shouldOpen && !timer) return;\n shouldOpen = true;\n openStartTime = Date.now();\n deferUpdate(openDelay);\n };\n\n // Close or cancel opening of tooltip\n const getClose = (overrideDelay: number) => {\n if (!shouldOpen && !timer) return;\n shouldOpen = false;\n deferUpdate(overrideDelay);\n };\n const close = () => getClose(closeDelay);\n const closeImmediately = () => getClose(0);\n\n return {\n attachAnchor(anchorElement: HTMLElement): void {\n anchorController = new AbortController();\n const { signal } = anchorController;\n\n if (hoverNotSupported) {\n /**\n * Handle touchend event.\n * If end comes before the open delay => cancel tooltip (close immediate).\n * Else if end comes after the open delay => tooltip takes priority, the anchor's default touch end event is prevented.\n */\n const longPressEnd = (evt: Event) => {\n if (!openStartTime) return;\n if (Date.now() - openStartTime >= openDelay) {\n // Tooltip take priority, event prevented.\n evt.stopPropagation();\n evt.preventDefault();\n anchorElement.focus();\n // Close with delay.\n close();\n } else {\n // Close immediately.\n closeImmediately();\n }\n };\n\n anchorElement.addEventListener(hasTouch ? 'touchstart' : 'mousedown', open, { signal });\n anchorElement.addEventListener(hasTouch ? 'touchend' : 'mouseup', longPressEnd, { signal });\n } else {\n anchorElement.addEventListener('mouseenter', open, { signal });\n anchorElement.addEventListener('mouseleave', close, { signal });\n anchorElement.addEventListener('mouseup', closeImmediately, { signal });\n }\n\n // Events always applied no matter the browser:\n // Open on focus (only if focus is visible).\n anchorElement.addEventListener(\n 'focusin',\n (e: Event) => {\n // Skip if focus is not visible\n if (!isFocusVisible(e.target as HTMLElement)) return;\n open();\n },\n { signal },\n );\n // Close on lost focus.\n anchorElement.addEventListener('focusout', closeImmediately, { signal });\n },\n\n attachPopper(popperElement: HTMLElement | null): void {\n popperController?.abort();\n if (!popperElement || hoverNotSupported) return;\n popperController = new AbortController();\n const { signal } = popperController;\n // Popper element hover\n popperElement.addEventListener('mouseenter', open, { signal });\n popperElement.addEventListener('mouseleave', close, { signal });\n },\n\n close(): void {\n closeImmediately();\n },\n\n destroy(): void {\n if (timer) clearTimeout(timer);\n anchorController?.abort();\n popperController?.abort();\n },\n };\n}\n","import { MutableRefObject, useEffect, useRef, useState } from 'react';\nimport { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';\nimport { createTooltipOpenManager, TooltipOpenManager } from '@lumx/core/js/components/Tooltip/tooltipOpenManager';\n\n/**\n * Hook controlling tooltip visibility using mouse hover the anchor and delay.\n *\n * @param delay Delay in millisecond to display the tooltip.\n * @param anchorElement Tooltip anchor element.\n * @return whether or not to show the tooltip.\n */\nexport function useTooltipOpen(delay: number | undefined, anchorElement: HTMLElement | null) {\n const [isOpen, setIsOpen] = useState(false);\n\n const onPopperMount = useRef<any>(null) as MutableRefObject<(elem: HTMLElement | null) => void>;\n const managerRef = useRef<TooltipOpenManager | null>(null);\n\n // Global close on escape\n useCallbackOnEscape(isOpen ? () => managerRef.current?.close() : undefined);\n\n useEffect(() => {\n if (!anchorElement) {\n return undefined;\n }\n\n const manager = createTooltipOpenManager({\n delay,\n onStateChange: setIsOpen,\n });\n\n managerRef.current = manager;\n onPopperMount.current = (el: HTMLElement | null) => manager.attachPopper(el);\n\n manager.attachAnchor(anchorElement);\n return () => {\n manager.destroy();\n };\n }, [anchorElement, delay]);\n\n return { isOpen, onPopperMount: onPopperMount.current };\n}\n","/* eslint-disable react-hooks/rules-of-hooks */\nimport { ReactNode, useState } from 'react';\n\nimport { useFloating, offset, autoUpdate, type Placement as FloatingPlacement } from '@floating-ui/react-dom';\n\nimport { DOCUMENT, IS_BROWSER } from '@lumx/react/constants';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\n\nimport { TooltipContextProvider } from '@lumx/react/components/tooltip/context';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport {\n TooltipPopup,\n type TooltipProps as CoreTooltipProps,\n type TooltipPlacement,\n DEFAULT_PROPS,\n CLASSNAME as CORE_CLASSNAME,\n COMPONENT_NAME as CORE_COMPONENT_NAME,\n ARROW_SIZE,\n} from '@lumx/core/js/components/Tooltip';\nimport { Portal } from '@lumx/react/utils';\nimport { useInjectTooltipRef } from './useInjectTooltipRef';\nimport { useTooltipOpen } from './useTooltipOpen';\n\nexport type { TooltipPlacement };\n\n/**\n * Defines the props of the component.\n */\nexport interface TooltipProps extends GenericProps, CoreTooltipProps {\n /** Anchor (element on which we activate the tooltip). */\n children: ReactNode;\n}\n\n/**\n * Tooltip component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Tooltip = forwardRef<TooltipProps, HTMLDivElement>((props, ref) => {\n const {\n label,\n children,\n className,\n delay,\n placement = DEFAULT_PROPS.placement,\n forceOpen,\n closeMode = DEFAULT_PROPS.closeMode,\n ariaLinkMode = DEFAULT_PROPS.ariaLinkMode,\n zIndex = DEFAULT_PROPS.zIndex,\n ...forwardedProps\n } = props;\n // Disable in SSR.\n if (!DOCUMENT) {\n return <>{children}</>;\n }\n\n const id = useId();\n\n const [popperElement, setPopperElement] = useState<null | HTMLElement>(null);\n const [anchorElement, setAnchorElement] = useState<null | HTMLElement>(null);\n const { floatingStyles, placement: resolvedPlacement } = useFloating({\n placement: placement as FloatingPlacement,\n // Disable autoUpdate and element refs in non-browser environments (e.g. jsdom) to avoid\n // flushSync act() warnings from @floating-ui/react-dom (positioning is not meaningful in jsdom anyway).\n ...(IS_BROWSER\n ? {\n whileElementsMounted: autoUpdate,\n elements: { reference: anchorElement, floating: popperElement },\n }\n : {}),\n middleware: [offset(ARROW_SIZE)],\n });\n\n const position = resolvedPlacement ?? placement;\n const { isOpen: isActivated, onPopperMount } = useTooltipOpen(delay, anchorElement);\n const isOpen = (isActivated || forceOpen) && !!label;\n const isMounted = !!label && (isOpen || closeMode === 'hide');\n const isHidden = !isOpen && closeMode === 'hide';\n const wrappedChildren = useInjectTooltipRef({\n children,\n setAnchorElement,\n isMounted,\n id,\n label,\n ariaLinkMode: ariaLinkMode as any,\n });\n\n const tooltipRef = useMergeRefs(ref, setPopperElement, onPopperMount);\n\n return (\n <>\n <TooltipContextProvider>{wrappedChildren}</TooltipContextProvider>\n {isMounted && (\n <Portal>\n {TooltipPopup({\n ref: tooltipRef,\n ...forwardedProps,\n id,\n label: label as string,\n position: position!,\n isHidden,\n style: isHidden ? undefined : floatingStyles,\n zIndex,\n className,\n })}\n </Portal>\n )}\n </>\n );\n});\nTooltip.displayName = CORE_COMPONENT_NAME;\nTooltip.className = CORE_CLASSNAME;\nTooltip.defaultProps = DEFAULT_PROPS;\n","/** Create a pending navigation store; discards intent on abort. */\nexport function createPendingNavigation(signal: AbortSignal) {\n let pending: (() => boolean) | null = null;\n const clear = () => {\n pending = null;\n };\n signal.addEventListener('abort', clear);\n return {\n get hasPending() {\n return pending !== null;\n },\n defer(navigate: () => boolean) {\n pending = navigate;\n },\n flush() {\n if (pending?.()) pending = null;\n },\n clear,\n };\n}\n","import { createPendingNavigation } from './createPendingNavigation';\nimport type {\n FocusNavigationCallbacks,\n ListFocusNavigationController,\n ListFocusNavigationSelectors,\n ListNavigationOptions,\n} from './types';\nimport { createSelectorTreeWalker } from '../browser/createSelectorTreeWalker';\n\n/**\n * Create a focus navigation controller for a 1D list.\n *\n * This controller is **stateless** — it does not maintain an internal reference to\n * the active item. Instead it reads the active item from the DOM each time via the\n * `getActiveItem` callback provided in the options. This avoids any desync between\n * the controller's internal state and the actual DOM.\n *\n * @param options List navigation options (container, itemSelector, direction, wrap, getActiveItem).\n * @param callbacks Callbacks for focus state changes.\n * @param signal AbortSignal for cleanup.\n * @returns ListFocusNavigationController instance.\n */\nexport function createListFocusNavigation(\n options: ListNavigationOptions,\n callbacks: FocusNavigationCallbacks,\n signal: AbortSignal,\n): ListFocusNavigationController {\n const {\n container,\n itemSelector,\n direction = 'vertical',\n wrap = false,\n itemDisabledSelector,\n getActiveItem = () => null,\n } = options;\n\n /** Combined CSS selector matching enabled (non-disabled) items. */\n const enabledItemSelector = itemDisabledSelector ? `${itemSelector}:not(${itemDisabledSelector})` : itemSelector;\n\n /** Create a TreeWalker over items in the container. */\n function createItemWalker(enabledOnly = true): TreeWalker {\n const selector = enabledOnly ? enabledItemSelector : itemSelector;\n return createSelectorTreeWalker(container, selector);\n }\n\n /** Find the first enabled item in the container. */\n function findFirstEnabled(): HTMLElement | null {\n return container.querySelector<HTMLElement>(enabledItemSelector);\n }\n\n /** Find the last enabled item in the container. */\n function findLastEnabled(): HTMLElement | null {\n const items = container.querySelectorAll<HTMLElement>(enabledItemSelector);\n return items.length > 0 ? items[items.length - 1] : null;\n }\n\n // Deferred navigation intent (replayed once items are committed to the DOM)\n const pending = createPendingNavigation(signal);\n\n /** Find item at offset (lazily walk nodes) */\n function findAtOffset(offset: number): HTMLElement | null {\n const forward = offset > 0;\n const stepsNeeded = Math.abs(offset);\n const active = getActiveItem();\n\n const walker = createItemWalker();\n const step = forward ? () => walker.nextNode() : () => walker.previousNode();\n\n let target: HTMLElement | null = null;\n let remaining = stepsNeeded;\n\n if (active) {\n // Walk from the active item.\n walker.currentNode = active;\n } else if (!forward) {\n // Walking backward with no active item: position at the last enabled item\n target = walker.lastChild() as HTMLElement | null;\n if (!target) return null;\n remaining -= 1;\n }\n\n for (let i = 0; i < remaining; i++) {\n const next = step() as HTMLElement | null;\n if (next) {\n target = next;\n } else if (active && wrap) {\n // Hit boundary with an active item — wrap around to the opposite end.\n const wrapped = forward ? findFirstEnabled() : findLastEnabled();\n if (!wrapped || wrapped === active) break;\n target = wrapped;\n walker.currentNode = wrapped;\n } else {\n break;\n }\n }\n return target;\n }\n\n function findMatching(predicate: (item: HTMLElement) => boolean): HTMLElement | null {\n const walker = createItemWalker(false);\n let node = walker.nextNode() as HTMLElement | null;\n while (node) {\n if (predicate(node)) return node;\n node = walker.nextNode() as HTMLElement | null;\n }\n return null;\n }\n\n /** Clear the active item and discard any pending navigation intent. */\n function clear(): void {\n const current = getActiveItem();\n if (current) {\n callbacks.onDeactivate(current);\n }\n pending.clear();\n callbacks.onClear?.();\n }\n\n // Cleanup on abort.\n signal.addEventListener('abort', clear);\n\n const selectors: ListFocusNavigationSelectors = {\n enabledItemSelector,\n\n get activeItem() {\n return getActiveItem();\n },\n get hasNavigableItems() {\n return container.querySelector(enabledItemSelector) !== null;\n },\n\n getFirst: findFirstEnabled,\n getLast: findLastEnabled,\n getMatching: findMatching,\n findNearestEnabled(anchor: Node): HTMLElement | null {\n if (!container.contains(anchor)) return findFirstEnabled();\n\n // If the anchor itself is an enabled item, return it directly.\n if (anchor instanceof HTMLElement && anchor.matches(enabledItemSelector)) {\n return anchor;\n }\n\n // Walk forward from the anchor for the nearest enabled item.\n const walker = createItemWalker();\n walker.currentNode = anchor;\n const next = walker.nextNode();\n if (next instanceof HTMLElement) return next;\n\n // No enabled item after anchor — walk backward (reuse same walker).\n walker.currentNode = anchor;\n return walker.previousNode() as HTMLElement | null;\n },\n };\n\n /**\n * Navigate via a resolver. The resolver receives the selectors to find the target.\n * If the target is valid, focus is committed (deactivate current, activate target).\n * If the target is not resolvable yet, the intent is deferred for later replay.\n */\n function goTo(resolve: (selectors: ListFocusNavigationSelectors) => HTMLElement | null): boolean {\n const target = resolve(selectors);\n if (target && target.matches(itemSelector) && container.contains(target)) {\n const current = getActiveItem();\n if (current !== target) {\n if (current) callbacks.onDeactivate(current);\n callbacks.onActivate(target);\n }\n pending.clear();\n return true;\n }\n // Target not resolvable yet (e.g. items not committed to the DOM) — defer\n pending.defer(() => goTo(resolve));\n return false;\n }\n\n /** Go to the item at the given offset from the active item. */\n function goToOffset(offset: number): boolean {\n if (offset === 0) return getActiveItem() !== null;\n const target = findAtOffset(offset);\n if (!target) return false;\n return goTo(() => target);\n }\n\n return {\n type: 'list',\n selectors,\n\n goToOffset,\n\n clear,\n\n goTo,\n\n flushPendingNavigation(): void {\n pending.flush();\n },\n\n goUp(): boolean {\n return direction === 'vertical' ? goToOffset(-1) : false;\n },\n\n goDown(): boolean {\n return direction === 'vertical' ? goToOffset(1) : false;\n },\n\n goLeft(): boolean {\n return direction === 'horizontal' ? goToOffset(-1) : false;\n },\n\n goRight(): boolean {\n return direction === 'horizontal' ? goToOffset(1) : false;\n },\n };\n}\n","import type { FocusNavigationCallbacks } from './types';\n\n/**\n * Internal state for tracking the active (focused) item.\n * Shared by both list and grid navigation implementations.\n */\nexport interface ActiveItemState {\n /** Get the currently active item. */\n readonly active: HTMLElement | null;\n /** Set the active item (handles deactivate/activate callbacks). */\n setActive(item: HTMLElement | null): void;\n /** Clear the active item (deactivate + clear callbacks). */\n clear(): void;\n}\n\n/**\n * Create shared active item state with cleanup on abort.\n *\n * Callback invocation:\n * - `setActive(item)`: calls `onDeactivate(previous)` then `onActivate(item)`.\n * - `clear()`: calls `onDeactivate(current)` then `onClear()`.\n * - On `signal.abort()`: same as `clear()`.\n *\n * @param callbacks Focus state change callbacks.\n * @param signal AbortSignal for cleanup.\n * @param initialItem Optional item to silently pre-select on creation (no callbacks fired).\n */\nexport function createActiveItemState(\n callbacks: FocusNavigationCallbacks,\n signal: AbortSignal,\n initialItem?: HTMLElement | null,\n): ActiveItemState {\n let activeItem: HTMLElement | null = initialItem ?? null;\n function clear() {\n if (activeItem) {\n callbacks.onDeactivate(activeItem);\n activeItem = null;\n }\n callbacks.onClear?.();\n }\n signal.addEventListener('abort', clear);\n\n return {\n get active() {\n return activeItem;\n },\n setActive(item: HTMLElement | null): void {\n if (activeItem === item) return;\n if (activeItem) {\n callbacks.onDeactivate(activeItem);\n }\n activeItem = item;\n if (item) {\n callbacks.onActivate(item);\n }\n },\n clear,\n };\n}\n","/** Deepest last-child descendant of `el` (or `el` itself if it has no children). */\nexport function lastDescendant(element: HTMLElement): HTMLElement {\n let node: Element = element;\n while (node.lastElementChild) node = node.lastElementChild;\n return node as HTMLElement;\n}\n","/** Return the first item of an iterable, or `null` if it is empty. */\nexport function first<T>(iterable: Iterable<T>): T | null {\n const { value, done } = iterable[Symbol.iterator]().next();\n return done ? null : value;\n}\n","import { createActiveItemState } from './createActiveItemState';\nimport { createPendingNavigation } from './createPendingNavigation';\nimport type {\n FocusNavigationCallbacks,\n FocusNavigationController,\n FocusNavigationSelectors,\n GridNavigationOptions,\n} from './types';\nimport { lastDescendant } from '../browser/lastDescendant';\nimport { createSelectorTreeWalker } from '../browser/createSelectorTreeWalker';\nimport { first } from '../iterable/first';\n\n/**\n * Create a focus navigation controller for a 2D grid.\n *\n * Resolves rows and cells by querying the DOM and commits focus by updating the\n * active-item state (which fires {@link FocusNavigationCallbacks}).\n *\n * Supports Up/Down between rows (with column memory) and Left/Right between cells\n * (with wrapping across rows).\n *\n * @param options Grid navigation options (container, rowSelector, cellSelector, wrap).\n * @param callbacks Callbacks for focus state changes.\n * @param signal AbortSignal for cleanup.\n * @returns FocusNavigationController instance.\n */\nexport function createGridFocusNavigation(\n options: GridNavigationOptions,\n callbacks: FocusNavigationCallbacks,\n signal: AbortSignal,\n): FocusNavigationController {\n const { container, rowSelector, cellSelector, wrap = false } = options;\n const state = createActiveItemState(callbacks, signal);\n\n const isNavigableRow = (row: HTMLElement) => row.querySelector(cellSelector) !== null;\n const getFirstCell = (row: HTMLElement) => row.querySelector<HTMLElement>(cellSelector);\n const getRowCells = (row: HTMLElement) => Array.from(row.querySelectorAll<HTMLElement>(cellSelector));\n\n /** Lazily walk navigable rows from `start` in a `direction`, projecting each row through `dive`. */\n function* findRows(\n start: HTMLElement | 'first' | 'last' = 'first',\n direction: 'next' | 'prev' = 'next',\n dive?: (row: HTMLElement) => HTMLElement | undefined | null,\n ) {\n // Tree walker\n const walker = createSelectorTreeWalker(container, rowSelector);\n\n // Start at a specific row\n if (start instanceof HTMLElement) walker.currentNode = start;\n // Start from the last\n else if (start === 'last') walker.currentNode = lastDescendant(container);\n\n // Walk nodes\n let node: HTMLElement | null;\n do {\n node = (direction === 'next' ? walker.nextNode() : walker.previousNode()) as HTMLElement | null;\n if (node && isNavigableRow(node)) {\n const result = dive ? dive(node) : node;\n if (result) yield result;\n }\n } while (node);\n }\n\n const findFirstVisibleRow = () => first(findRows());\n const findLastVisibleRow = () => first(findRows('last', 'prev'));\n\n function findParentRow(cell: HTMLElement): HTMLElement | null {\n const row = cell.closest<HTMLElement>(rowSelector);\n return row && container.contains(row) ? row : null;\n }\n\n /** Deferred navigation intent (replayed once cells are committed to the DOM). */\n const pending = createPendingNavigation(signal);\n /** Remembered column index for Up/Down navigation (column memory). */\n let rememberedCol = 0;\n\n /** Activate the cell at the given column in a row element. */\n function focusCellInRow(row: HTMLElement, col: number): boolean {\n const cells = getRowCells(row);\n if (cells.length === 0) return false;\n const clampedCol = Math.min(col, cells.length - 1);\n state.setActive(cells[clampedCol]);\n return true;\n }\n\n /** Activate the given cell (validates it is in the grid, updates column memory). */\n function activateCell(item: HTMLElement): boolean {\n const row = findParentRow(item);\n if (!row) return false;\n const cells = getRowCells(row);\n const col = cells.indexOf(item);\n if (col === -1) return false;\n rememberedCol = col;\n state.setActive(item);\n return true;\n }\n\n /** Got to first cell in first row */\n function goToFirst(): boolean {\n const row = findFirstVisibleRow();\n if (!row) return false;\n rememberedCol = 0;\n return focusCellInRow(row, 0);\n }\n\n /** Got to first cell in last row */\n function goToLast(): boolean {\n const row = findLastVisibleRow();\n if (!row) return false;\n rememberedCol = 0;\n return focusCellInRow(row, 0);\n }\n\n /** Navigate horizontally (left or right) within cells, wrapping across rows. */\n function goHorizontal(step: -1 | 1): boolean {\n if (!state.active) return false;\n\n const currentRow = findParentRow(state.active);\n if (!currentRow) return false;\n\n const cells = getRowCells(currentRow);\n const col = cells.indexOf(state.active);\n if (col === -1) return false;\n\n const nextCol = col + step;\n if (nextCol >= 0 && nextCol < cells.length) {\n rememberedCol = nextCol;\n state.setActive(cells[nextCol]);\n return true;\n }\n\n if (!wrap) return false;\n\n // Wrap to the adjacent row (or opposite boundary row), activating the first or last cell.\n const rowDirection = step > 0 ? 'next' : 'prev';\n const adjacentRow = first(findRows(currentRow, rowDirection));\n const targetRow = adjacentRow ?? (step > 0 ? findFirstVisibleRow() : findLastVisibleRow());\n if (!targetRow) return false;\n\n const targetCells = getRowCells(targetRow);\n if (targetCells.length === 0) return false;\n const targetCol = step > 0 ? 0 : targetCells.length - 1;\n rememberedCol = targetCol;\n state.setActive(targetCells[targetCol]);\n return true;\n }\n\n /** Navigate vertically (up or down) between rows with column memory. */\n function goVertical(direction: 'next' | 'prev'): boolean {\n if (!state.active) {\n // No active cell — go to the boundary row.\n return direction === 'next' ? goToFirst() : goToLast();\n }\n\n const currentRow = findParentRow(state.active);\n if (!currentRow) return false;\n\n const adjacentRow = first(findRows(currentRow, direction));\n if (adjacentRow) return focusCellInRow(adjacentRow, rememberedCol);\n\n if (wrap) {\n // Wrap to the opposite boundary row.\n const wrapRow = direction === 'next' ? findFirstVisibleRow() : findLastVisibleRow();\n if (wrapRow) return focusCellInRow(wrapRow, rememberedCol);\n }\n return false;\n }\n\n const selectors: FocusNavigationSelectors = {\n get activeItem() {\n return state.active;\n },\n get hasNavigableItems() {\n return first(findRows()) !== null;\n },\n // First cell in first row\n getFirst: () => first(findRows('first', 'next', getFirstCell)),\n // First cell in last row\n getLast: () => first(findRows('last', 'prev', getFirstCell)),\n // First cell matching predicate\n getMatching: (predicate) => first(findRows('first', 'next', (row) => getRowCells(row).find(predicate))),\n };\n\n return {\n type: 'grid',\n selectors,\n\n goToOffset(offset: number): boolean {\n if (offset === 0) return state.active !== null;\n const visibleRows = Array.from(findRows());\n if (visibleRows.length === 0) return false;\n\n if (!state.active) {\n // No active item: jump to first or last row, then apply remaining offset.\n const startIdx = offset > 0 ? 0 : visibleRows.length - 1;\n const remainingOffset = offset > 0 ? offset - 1 : offset + 1;\n const targetIdx = Math.max(0, Math.min(startIdx + remainingOffset, visibleRows.length - 1));\n return focusCellInRow(visibleRows[targetIdx], rememberedCol);\n }\n\n // Find current row in the visible rows list.\n const currentRow = findParentRow(state.active);\n if (!currentRow) return false;\n const rowIdx = visibleRows.indexOf(currentRow);\n if (rowIdx === -1) return false;\n\n const targetIdx = Math.max(0, Math.min(rowIdx + offset, visibleRows.length - 1));\n if (targetIdx === rowIdx) return false;\n return focusCellInRow(visibleRows[targetIdx], rememberedCol);\n },\n\n clear(): void {\n state.clear();\n pending.clear();\n },\n\n goTo(resolve: (selectors: FocusNavigationSelectors) => HTMLElement | null): boolean {\n const target = resolve(selectors);\n if (target && activateCell(target)) {\n pending.clear();\n return true;\n }\n // Target not resolvable yet (e.g. cells not committed to the DOM) — defer\n pending.defer(() => this.goTo(resolve));\n return false;\n },\n\n flushPendingNavigation(): void {\n pending.flush();\n },\n\n goUp(): boolean {\n return goVertical('prev');\n },\n\n goDown(): boolean {\n return goVertical('next');\n },\n\n goLeft(): boolean {\n return goHorizontal(-1);\n },\n\n goRight(): boolean {\n return goHorizontal(1);\n },\n };\n}\n","/**\n * Like `querySelectorAll`, but also tests the root node itself.\n *\n * Yields the root element first (if it matches), then all matching descendants\n * in document order. Being a generator, callers that only need the first match\n * can break early without collecting the full list.\n *\n * @param node The starting DOM node.\n * @param selector CSS selector to match against.\n */\nexport function* querySelectorInclusive(node: Node, selector: string): Generator<HTMLElement> {\n if (!(node instanceof HTMLElement)) return;\n if (node.matches(selector)) yield node;\n yield* node.querySelectorAll<HTMLElement>(selector);\n}\n","/**\n * Track whether the container currently has focus.\n *\n * We can't rely on `document.activeElement` inside MutationObserver callbacks because\n * the browser moves focus to `<body>` before they fire. focusout with `relatedTarget === null`\n * (element removed from DOM) keeps the flag true so the observer can move focus to a fallback.\n */\nexport function trackContainerFocus(container: HTMLElement, signal: AbortSignal) {\n let hasFocus = container.contains(document.activeElement);\n container.addEventListener(\n 'focusin',\n () => {\n hasFocus = true;\n },\n { signal },\n );\n container.addEventListener(\n 'focusout',\n (evt: FocusEvent) => {\n const newTarget = evt.relatedTarget as Node | null;\n if (newTarget && !container.contains(newTarget)) {\n hasFocus = false;\n }\n },\n { signal },\n );\n return {\n get hasFocus() {\n return hasFocus;\n },\n reset() {\n hasFocus = false;\n },\n };\n}\n","import { querySelectorInclusive } from '../browser/querySelectorInclusive';\nimport { trackContainerFocus } from '../browser/trackContainerFocus';\nimport { createListFocusNavigation } from './createListFocusNavigation';\nimport type { FocusNavigationController } from './types';\n\n/** Options for {@link setupRovingTabIndex}. */\nexport interface RovingTabIndexOptions {\n /** Container element holding the focusable items. */\n container: HTMLElement;\n /** CSS selector identifying focusable items within the container. */\n itemSelector: string;\n /**\n * Navigation axis — determines which arrow keys navigate.\n * - `'horizontal'` (default): Left/Right navigate.\n * - `'vertical'`: Up/Down navigate.\n */\n direction?: 'horizontal' | 'vertical';\n /** CSS selector matching disabled items (skipped during navigation). */\n itemDisabledSelector?: string;\n /**\n * Attribute name indicating the selected item (e.g. `'aria-selected'`, `'aria-checked'`).\n * When set, the roving tabindex will observe changes to this attribute and keep\n * `tabindex=\"0\"` in sync with the item whose attribute value is `\"true\"`.\n * Default: `'aria-selected'`.\n */\n itemSelectedAttr?: string;\n /** Called when an item receives focus via keyboard navigation. */\n onItemFocused?: (item: HTMLElement) => void;\n}\n\n/**\n * Set up the roving tabindex pattern on a container element.\n *\n * - Keyboard navigation (Arrow keys, Home, End)\n * - tabindex management (`0` on active, `-1` on others)\n * - Mount normalization (single-tabstop invariant)\n * - DOM mutation handling via MutationObserver:\n * removal recovery, insertion normalization, disabled-state changes\n *\n * Torn down when `signal` is aborted.\n */\nexport function setupRovingTabIndex(options: RovingTabIndexOptions, signal: AbortSignal): FocusNavigationController {\n const {\n container,\n itemSelector,\n direction = 'horizontal',\n itemDisabledSelector,\n itemSelectedAttr = 'aria-selected',\n onItemFocused,\n } = options;\n\n const itemActiveSelector = `${itemSelector}[tabindex=\"0\"]`;\n\n // Item selected selector\n let itemSelectedSelector = `${itemSelector}[${itemSelectedAttr}=true]`;\n if (itemDisabledSelector) itemSelectedSelector += `:not(${itemDisabledSelector})`;\n\n // Track focus inside container\n const containerFocus = trackContainerFocus(container, signal);\n\n const nav = createListFocusNavigation(\n {\n type: 'list',\n container,\n itemSelector,\n direction,\n wrap: true,\n itemDisabledSelector,\n getActiveItem: () => container.querySelector<HTMLElement>(itemActiveSelector),\n },\n {\n onActivate(item: HTMLElement) {\n item.setAttribute('tabindex', '0');\n item.focus();\n onItemFocused?.(item);\n },\n onDeactivate(item: HTMLElement) {\n item.setAttribute('tabindex', '-1');\n },\n },\n signal,\n );\n\n // ─── tabindex normalization ────────────────────────────────────\n\n /** Set tabindex only when the value actually changes to avoid unnecessary DOM mutations. */\n function setTabIndex(item: HTMLElement, value: '0' | '-1'): void {\n if (item.getAttribute('tabindex') !== value) {\n item.setAttribute('tabindex', value);\n }\n }\n\n /** Assign tabindex across `items`, ensuring at most one `tabindex=\"0\"` */\n function normalizeItems(items: HTMLElement[], hasExistingTabStop: boolean): void {\n let hasTabStop = hasExistingTabStop;\n\n for (const item of items) {\n if (!container.contains(item)) continue;\n const isDisabled = itemDisabledSelector ? item.matches(itemDisabledSelector) : false;\n\n if (!isDisabled && !hasTabStop) {\n setTabIndex(item, '0');\n hasTabStop = true;\n } else {\n setTabIndex(item, '-1');\n }\n }\n\n if (!hasTabStop) {\n const fallback = container.querySelector<HTMLElement>(nav.selectors.enabledItemSelector);\n if (fallback) setTabIndex(fallback, '0');\n }\n }\n\n /** Enforce the single-tabstop invariant across all items. */\n function normalizeAllItems(): void {\n const items = Array.from(container.querySelectorAll<HTMLElement>(itemSelector));\n const { activeItem } = nav.selectors;\n\n // Prefer either the current active item (from DOM) or the current selected item\n let preferredTabStopIndex = activeItem && items.indexOf(activeItem);\n if (!preferredTabStopIndex || preferredTabStopIndex === -1) {\n preferredTabStopIndex = items.findIndex((item) => item.matches(itemSelectedSelector));\n }\n if (preferredTabStopIndex && preferredTabStopIndex > 0) {\n const [preferredItem] = items.splice(preferredTabStopIndex, 1);\n items.unshift(preferredItem);\n }\n normalizeItems(items, false);\n }\n\n /** Ensure a tab stop exists; find a fallback near `anchor` and optionally move focus to it. */\n function ensureTabStop(shouldFocus: boolean, anchor?: Node | null): void {\n if (container.querySelector(itemActiveSelector)) return;\n const fallback =\n (anchor && nav.selectors.findNearestEnabled(anchor)) ??\n container.querySelector<HTMLElement>(nav.selectors.enabledItemSelector);\n if (!fallback) return;\n if (shouldFocus) {\n nav.goTo(() => fallback);\n } else {\n setTabIndex(fallback, '0');\n }\n }\n\n normalizeAllItems();\n\n // ─── MutationObserver ──────────────────────────────────────────\n\n const observer = new MutationObserver((mutations) => {\n // Track removed\n let removedActiveItem: HTMLElement | null = null;\n let removalAnchor: Node | null = null;\n // Track selected\n let newSelectedItem: HTMLElement | null = null;\n // Track disabled\n const disabledTargets: HTMLElement[] = [];\n // Track added\n const insertedItems: HTMLElement[] = [];\n\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n // Track removed — scan removed nodes for the active item (tabindex=\"0\").\n // We cannot gate this on a live DOM query because the item is already removed.\n if (!removedActiveItem) {\n for (const removedNode of mutation.removedNodes) {\n const { value: firstMatch } = querySelectorInclusive(removedNode, itemActiveSelector).next();\n if (firstMatch) {\n removedActiveItem = firstMatch;\n removalAnchor = mutation.nextSibling ?? mutation.previousSibling ?? null;\n break;\n }\n }\n }\n\n // Track added\n for (const addedNode of mutation.addedNodes) {\n for (const item of querySelectorInclusive(addedNode, itemSelector)) {\n insertedItems.push(item);\n }\n }\n }\n\n const target = mutation.target as HTMLElement;\n if (mutation.type === 'attributes' && target.matches(itemSelector)) {\n if (mutation.attributeName === itemSelectedAttr && target.getAttribute(itemSelectedAttr) === 'true') {\n // Track selected item\n newSelectedItem = target;\n } else if (itemDisabledSelector && target.matches(itemDisabledSelector)) {\n // Track disabled items\n disabledTargets.push(target);\n }\n }\n }\n\n // Handle removed item\n if (removedActiveItem) {\n const shouldMoveFocus = containerFocus.hasFocus;\n containerFocus.reset();\n ensureTabStop(shouldMoveFocus, removalAnchor);\n }\n\n // Handle inserted items\n if (insertedItems.length > 0) {\n const hasTabStop = container.querySelector<HTMLElement>(itemActiveSelector) !== null;\n normalizeItems(insertedItems, hasTabStop);\n }\n\n // Handle disabled\n if (disabledTargets.length > 0) {\n const currentActive = nav.selectors.activeItem;\n for (const target of disabledTargets) {\n setTabIndex(target, '-1');\n }\n\n const activeItemDisabled = currentActive && disabledTargets.includes(currentActive);\n const shouldFocus = !!(activeItemDisabled && containerFocus.hasFocus);\n ensureTabStop(shouldFocus);\n }\n\n // Handle selected\n if (newSelectedItem) {\n // Demote previous item\n const currentTabStop = container.querySelector<HTMLElement>(itemActiveSelector);\n if (currentTabStop && currentTabStop !== newSelectedItem) {\n setTabIndex(currentTabStop, '-1');\n }\n // Selected item is the new default focuable item\n setTabIndex(newSelectedItem, '0');\n }\n });\n\n observer.observe(container, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-disabled', 'disabled', itemSelectedAttr],\n });\n signal.addEventListener('abort', () => observer.disconnect());\n\n // ─── Keyboard navigation ───────────────────────────────────────\n\n container.addEventListener(\n 'keydown',\n (evt: KeyboardEvent) => {\n // Adopt focus target if nothing is active yet.\n if (!nav.selectors.activeItem) {\n const target = evt.target as HTMLElement;\n if (target.matches(itemSelector) && container.contains(target)) {\n nav.goTo(() => target);\n }\n }\n\n let handled = false;\n switch (evt.key) {\n case 'ArrowRight':\n handled = nav.goRight();\n break;\n case 'ArrowLeft':\n handled = nav.goLeft();\n break;\n case 'ArrowDown':\n handled = nav.goDown();\n break;\n case 'ArrowUp':\n handled = nav.goUp();\n break;\n case 'Home':\n handled = nav.goTo((s) => s.getFirst());\n break;\n case 'End':\n handled = nav.goTo((s) => s.getLast());\n break;\n default:\n break;\n }\n\n if (handled) {\n evt.preventDefault();\n evt.stopPropagation();\n }\n },\n { signal },\n );\n\n return nav;\n}\n","import { useEffect, useLayoutEffect } from 'react';\n\n/**\n * SSR-safe version of `useLayoutEffect`.\n * Uses `useLayoutEffect` on the client and `useEffect` on the server to avoid React SSR warnings.\n */\nexport const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n","import React from 'react';\n\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';\n\n/**\n * Returns a stable callback that always calls the latest version of `fn`.\n * Useful to avoid re-running effects when a callback prop changes reference.\n *\n * https://github.com/facebook/react/issues/14099#issuecomment-440013892\n *\n * @param fn A function to stabilize.\n * @return A stable function with the same signature.\n */\nexport function useEventCallback<T extends ((...args: any[]) => any) | undefined>(\n fn: T,\n): T extends (...args: any[]) => any ? T : (...args: any[]) => undefined {\n const ref = React.useRef(fn);\n useIsomorphicLayoutEffect(() => {\n ref.current = fn;\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback((...args: any[]) => ref.current?.(...args), []) as any;\n}\n","import { MaybeElementOrRef } from '@lumx/react/utils/type';\n\n/** Unref a react ref or element */\nexport function unref(maybeElement: MaybeElementOrRef<HTMLElement>) {\n if (maybeElement instanceof HTMLElement) return maybeElement;\n return maybeElement?.current;\n}\n","import { RefObject } from 'react';\n\nimport { setupRovingTabIndex } from '@lumx/core/js/utils/focusNavigation';\n\nimport { useEventCallback } from './useEventCallback';\nimport { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';\nimport { unref } from '../utils/react/unref';\n\nexport interface UseRovingTabIndexContainerOptions {\n /** Container element or ref to the container element holding the focusable items. */\n containerRef: RefObject<HTMLElement> | HTMLElement | null;\n /** CSS selector to identify focusable items within the container. */\n itemSelector: string;\n /** Callback invoked when an item receives focus via keyboard navigation. */\n onItemFocused?: (item: HTMLElement) => void;\n /**\n * Primary navigation axis — determines which arrow keys navigate.\n * Default: 'horizontal' (ArrowLeft/ArrowRight).\n */\n direction?: 'horizontal' | 'vertical';\n /**\n * CSS selector matching disabled items within the container.\n * Disabled items are skipped during keyboard navigation.\n */\n itemDisabledSelector?: string;\n /**\n * Attribute name indicating the selected item (e.g. `'aria-selected'`, `'aria-checked'`).\n * When set, the roving tabindex will keep `tabindex=\"0\"` in sync with the item\n * whose attribute value is `\"true\"`.\n * Default: `'aria-selected'`.\n */\n itemSelectedAttr?: string;\n}\n\nexport const useRovingTabIndexContainer = ({\n containerRef,\n itemSelector,\n onItemFocused: unstableOnItemFocused,\n direction,\n itemDisabledSelector,\n itemSelectedAttr,\n}: UseRovingTabIndexContainerOptions): void => {\n const onItemFocused = useEventCallback(unstableOnItemFocused);\n\n useIsomorphicLayoutEffect(() => {\n const container = unref(containerRef);\n if (!container) {\n return undefined;\n }\n\n const abortController = new AbortController();\n setupRovingTabIndex(\n { container, itemSelector, direction, itemDisabledSelector, itemSelectedAttr, onItemFocused },\n abortController.signal,\n );\n return () => abortController.abort();\n }, [containerRef, itemSelector, direction, itemDisabledSelector, itemSelectedAttr, onItemFocused]);\n};\n","import React from 'react';\n\nimport { CLASSNAME as CHIP_CLASSNAME } from '@lumx/core/js/components/Chip';\nimport {\n SelectionChipGroup as UI,\n CLASSNAME,\n COMPONENT_NAME,\n type SelectionChipGroupProps as UIProps,\n} from '@lumx/core/js/components/Chip/SelectionChipGroup';\nimport { setupSelectionChipGroupEvents } from '@lumx/core/js/components/Chip/setupSelectionChipGroupEvents';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport { Chip } from './Chip';\nimport { ChipGroup } from './ChipGroup';\nimport { Icon } from '../icon';\nimport { Text } from '../text';\nimport { Tooltip } from '../tooltip';\nimport { isComponentType } from '../../utils/type/isComponentType';\nimport { useRovingTabIndexContainer } from '../../hooks/useRovingTabIndexContainer';\n\n/**\n * Defines the props of the component.\n */\nexport interface SelectionChipGroupProps<O> extends GenericProps, ReactToJSX<UIProps<O>> {\n /** Callback on option array selected */\n onChange?(newValue?: O[]): void;\n /** Input ref to restore focus */\n inputRef?: React.RefObject<HTMLInputElement>;\n /** Customize how chips should render (return a <Chip> element to override chip props) */\n renderChip?: (option: O) => React.ReactNode;\n}\n\n/**\n * SelectionChipGroup component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const SelectionChipGroup = <O,>({\n onChange,\n value,\n getOptionId,\n getOptionName,\n inputRef,\n renderChip,\n getChipProps: getChipPropsProp,\n theme,\n isDisabled,\n label,\n chipRemoveLabel,\n ...forwardedProps\n}: SelectionChipGroupProps<O>) => {\n const [container, setContainer] = React.useState<HTMLDivElement | null>(null);\n\n // Store latest values in refs so the event handlers always access current state.\n const valueRef = React.useRef(value);\n valueRef.current = value;\n const onChangeRef = React.useRef(onChange);\n onChangeRef.current = onChange;\n\n // Attach event listeners. Re-runs when the container mounts/unmounts, inputRef or getOptionId change.\n React.useEffect(() => {\n return setupSelectionChipGroupEvents({\n getContainer: () => container,\n getInput: () => inputRef?.current,\n onChange: (newValue) => onChangeRef.current?.(newValue),\n getValue: () => valueRef.current,\n getOptionId,\n });\n }, [container, inputRef, getOptionId]);\n\n useRovingTabIndexContainer({\n containerRef: container,\n itemSelector: `.${CHIP_CLASSNAME}`,\n itemDisabledSelector: `.${CHIP_CLASSNAME}[aria-disabled=\"true\"]`,\n });\n\n // Merge getChipProps and renderChip: getChipProps provides base props, renderChip overrides them,\n // and the core JSX template props take final priority (applied in the core component).\n const getChipProps = (option: O) => {\n const chipProps = getChipPropsProp?.(option) || {};\n let renderChipProps: Record<string, any> = {};\n if (renderChip) {\n const customChip = renderChip(option);\n if (isComponentType(Chip)(customChip)) {\n renderChipProps = customChip.props || {};\n }\n }\n // Filter out undefined values from renderChipProps so they don't override chipProps\n const definedRenderChipProps = Object.fromEntries(\n Object.entries(renderChipProps).filter(([, v]) => v !== undefined),\n );\n return { ...chipProps, ...definedRenderChipProps };\n };\n\n return UI(\n {\n ...forwardedProps,\n value,\n getOptionId,\n getOptionName,\n theme,\n isDisabled,\n label,\n chipRemoveLabel,\n getChipProps,\n ref: setContainer,\n },\n { Chip, ChipGroup, Icon, Text, Tooltip },\n );\n};\nSelectionChipGroup.displayName = COMPONENT_NAME;\nSelectionChipGroup.className = CLASSNAME;\n","import type { OptionRegistration, SectionRegistration, SectionState } from './types';\n\n/**\n * Get the value for a combobox option element.\n * Uses `data-value` when set; falls back to the element's trimmed `textContent`.\n *\n * This is the *selection* value , which may differ from the visible label\n */\nexport function getOptionValue(option: HTMLElement): string {\n if (option.dataset.value !== undefined) return option.dataset.value;\n return option.textContent?.trim() ?? '';\n}\n\n/**\n * Get the visible label for a combobox option element (its trimmed `textContent`).\n *\n * Used for typeahead matching: the user types the characters they see, which is the\n * option's label — not its `data-value` (which can be an unrelated id).\n */\nexport function getOptionLabel(option: HTMLElement): string {\n return option.textContent?.trim() ?? '';\n}\n\n/** Returns true when an option carries aria-disabled=\"true\". */\nexport function isOptionDisabled(option: HTMLElement): boolean {\n return option.getAttribute('aria-disabled') === 'true';\n}\n\n/** Returns true when the cell is NOT the first gridcell in its row (i.e., it's an action cell). */\nexport function isActionCell(cell: HTMLElement): boolean {\n const row = cell.closest('[role=\"row\"]');\n if (!row) return false;\n return row.querySelector('[role=\"gridcell\"]') !== cell;\n}\n\nexport const isSelected = (el: Element) => el.getAttribute('aria-selected') === 'true';\n\n/**\n * Compute the current state of a section and notify when it changed.\n *\n * Section state:\n * - `hidden`: true when the section has registered options but all are filtered out.\n * - `aria-hidden`: true when the section has no registered options at all (skeleton-only).\n *\n * At most one of `hidden` / `aria-hidden` is true at a time.\n */\nexport function notifySection(\n sectionElement: HTMLElement,\n sectionRegistrations: Map<HTMLElement, SectionRegistration>,\n optionRegistrations: Map<HTMLElement, OptionRegistration>,\n force?: boolean,\n): void {\n const reg = sectionRegistrations.get(sectionElement);\n if (!reg) return;\n let hasOptions = false;\n let hasVisibleOption = false;\n for (const [optionElement, optionReg] of optionRegistrations) {\n if (sectionElement.contains(optionElement)) {\n hasOptions = true;\n if (!optionReg.lastFiltered) {\n hasVisibleOption = true;\n break;\n }\n }\n }\n const state: SectionState = {\n hidden: hasOptions && !hasVisibleOption,\n 'aria-hidden': !hasOptions,\n };\n if (force || state.hidden !== reg.last.hidden || state['aria-hidden'] !== reg.last['aria-hidden']) {\n reg.last = state;\n reg.callback(state);\n }\n}\n","import {\n createGridFocusNavigation,\n createListFocusNavigation,\n type FocusNavigationController,\n} from '../../utils/focusNavigation';\nimport { isActionCell, isOptionDisabled } from './utils';\nimport type { ComboboxEventMap, ComboboxHandle } from './types';\n\n/**\n * Set up focus navigation and delegated event listeners on a listbox element.\n *\n * This merges two concerns:\n * 1. Creating the appropriate {@link FocusNavigationController} (grid or list mode)\n * with callbacks that manage `aria-activedescendant` and visual focus indicators.\n * 2. Attaching delegated `click` and `mousedown` listeners to the listbox for\n * option selection and blur prevention.\n *\n * The caller is responsible for guarding against duplicate calls (i.e., checking\n * that a focus navigation controller does not already exist before calling)\n * and ensuring `handle.trigger` and `handle.listbox` are non-null.\n *\n * @param handle The combobox handle (provides trigger, listbox, select, etc.).\n * @param signal Abort signal used to clean up all attached listeners.\n * @param notify Notify subscribers of combobox events.\n * @returns The created focus navigation controller.\n */\nexport function setupListbox(\n handle: ComboboxHandle,\n signal: AbortSignal,\n notify: <K extends keyof ComboboxEventMap>(event: K, value: ComboboxEventMap[K]) => void,\n options?: { wrapNavigation?: boolean },\n): FocusNavigationController {\n const trigger = handle.trigger!;\n const listbox = handle.listbox!;\n const isGrid = listbox.getAttribute('role') === 'grid';\n const itemSelector = '[role=\"option\"]';\n\n // ── Focus navigation ──────────────────────────────────────\n\n const focusCallbacks = {\n onActivate: (item: HTMLElement) => {\n item.setAttribute('data-focus-visible-added', 'true');\n trigger.setAttribute('aria-activedescendant', item.id);\n notify('activeDescendantChange', item.id);\n\n requestAnimationFrame(() => {\n // Last item in listbox\n const lastItem =\n !isGrid &&\n // Last item: find last element containing itemSelector and not followed by elements containing itemSelector and then get the itemSelector inside\n listbox.querySelector(\n `:scope > :has(${itemSelector}):not(:has(~ * ${itemSelector})) ${itemSelector}`,\n );\n if (item === lastItem) {\n // Scroll to the end of the listbox (shouldsnap to the end of the scroll container thanks to CSS scroll snap)\n listbox.lastElementChild?.scrollIntoView({ block: 'nearest' });\n } else {\n // Scroll to the element in listbox or else the item\n const toScrollTo = item.closest('[role=listbox] > *') || item;\n toScrollTo.scrollIntoView({ block: 'nearest' });\n }\n });\n },\n onDeactivate: (item: HTMLElement) => {\n item.removeAttribute('data-focus-visible-added');\n },\n onClear: () => {\n trigger.setAttribute('aria-activedescendant', '');\n notify('activeDescendantChange', null);\n },\n };\n\n let focusNav: FocusNavigationController;\n\n if (isGrid) {\n focusNav = createGridFocusNavigation(\n {\n type: 'grid',\n container: listbox,\n rowSelector: '[role=\"row\"]',\n cellSelector: '[role=\"gridcell\"]',\n wrap: true,\n },\n focusCallbacks,\n signal,\n );\n trigger.setAttribute('aria-haspopup', 'grid');\n } else {\n focusNav = createListFocusNavigation(\n {\n type: 'list',\n container: listbox,\n itemSelector,\n wrap: options?.wrapNavigation,\n getActiveItem: () => {\n const id = trigger.getAttribute('aria-activedescendant');\n return (id && listbox.querySelector<HTMLElement>(`#${CSS.escape(id)}`)) || null;\n },\n },\n focusCallbacks,\n signal,\n );\n }\n\n // ── Delegated listbox listeners ───────────────────────────\n\n const cellSelector = isGrid ? '[role=\"gridcell\"]' : '[role=\"option\"]';\n\n listbox.addEventListener(\n 'click',\n (event) => {\n const cell = (event.target as HTMLElement).closest(cellSelector) as HTMLElement | null;\n if (!cell) return;\n // Do not select disabled cells.\n if (isOptionDisabled(cell)) {\n event.stopPropagation();\n return;\n }\n\n if (isGrid && isActionCell(cell)) {\n // Action cell — skip option selection, let its own handler fire.\n return;\n }\n\n handle.select(cell);\n trigger.focus();\n },\n { signal },\n );\n\n // Prevent mousedown on cells to avoid blurring the trigger before click fires.\n listbox.addEventListener(\n 'mousedown',\n (event) => {\n if ((event.target as HTMLElement).closest(cellSelector)) {\n event.preventDefault();\n }\n },\n { signal },\n );\n\n return focusNav;\n}\n","import { type FocusNavigationController } from '../../utils/focusNavigation';\nimport { getOptionValue, isOptionDisabled, isSelected, notifySection } from './utils';\nimport { setupListbox } from './setupListbox';\nimport type {\n ComboboxCallbacks,\n ComboboxEventMap,\n ComboboxHandle,\n OnTriggerAttach,\n OptionRegistration,\n SectionRegistration,\n} from './types';\n\n/** Options for configuring the shared combobox behavior. */\ninterface ComboboxOptions {\n /** When true, ArrowDown/ArrowUp wrap around in listbox mode (input pattern). Default: false. */\n wrapNavigation?: boolean;\n}\n\n/**\n * Set up combobox behavior (WAI-ARIA combobox pattern) on a trigger + listbox pair.\n *\n * The trigger and listbox are registered separately via the returned handle,\n * allowing framework components to register them on mount. The behavior is\n * fully attached once both are registered.\n *\n * @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/\n *\n * @param callbacks Callbacks invoked on combobox events (e.g. option selection).\n * @param options Options for configuring the shared combobox behavior.\n * @param onTriggerAttach Optional callback invoked when the trigger is registered and the signal is ready.\n * Used by mode-specific wrappers (setupComboboxInput/Button) to automatically\n * attach the appropriate controller.\n * @returns A ComboboxHandle for interacting with the combobox.\n */\nexport function setupCombobox(\n callbacks: ComboboxCallbacks,\n options?: ComboboxOptions,\n onTriggerAttach?: OnTriggerAttach,\n): ComboboxHandle {\n const { wrapNavigation = false } = options ?? {};\n\n let trigger: HTMLInputElement | HTMLButtonElement | null = null;\n let listbox: HTMLElement | null = null;\n let focusNav: FocusNavigationController | null = null;\n let isOpenState = false;\n\n /** Current filter value (empty string = no filtering). */\n let filterValue = '';\n\n /** Registered options: maps DOM element → { callback, last notified state }. */\n const optionRegistrations = new Map<HTMLElement, OptionRegistration>();\n\n /** Registered sections: maps DOM element → { callback, last notified state }. */\n const sectionRegistrations = new Map<HTMLElement, SectionRegistration>();\n\n /** AbortController for all structural event listeners. */\n let abortController: AbortController | null = null;\n\n /** Last notified visible option count, to avoid redundant `optionsChange` notifications. */\n let lastOptionsLength = 0;\n\n /** Last notified input value, to re-fire `optionsChange` when the user keeps typing while empty. */\n let lastInputValue = '';\n\n /** Last notified loading state, used to replay current state to late subscribers. */\n let lastLoadingState = false;\n\n /** Number of currently mounted skeleton placeholders. */\n let skeletonCount = 0;\n\n /** Event subscribers managed by the handle. */\n const subscribers: { [K in keyof ComboboxEventMap]: Set<(value: ComboboxEventMap[K]) => void> } = {\n open: new Set(),\n activeDescendantChange: new Set(),\n optionsChange: new Set(),\n loadingChange: new Set(),\n loadingAnnouncement: new Set(),\n };\n\n /** Notify all subscribers for a given event. */\n function notify<K extends keyof ComboboxEventMap>(event: K, value: ComboboxEventMap[K]) {\n subscribers[event].forEach((cb) => cb(value));\n }\n\n /** Count visible (non-filtered) options. */\n function getVisibleOptionCount(): number {\n let count = 0;\n for (const reg of optionRegistrations.values()) {\n if (!reg.lastFiltered) count += 1;\n }\n return count;\n }\n\n /** True when the popup has visible content (options or skeletons). */\n function hasVisibleContent(): boolean {\n return getVisibleOptionCount() > 0 || skeletonCount > 0;\n }\n\n /**\n * Notify all registered sections and fire `optionsChange` if the visible option count changed\n * or if the input value changed while the list is empty (so `emptyMessage` callbacks get\n * the updated query string).\n * Called whenever the set of visible options may have changed (option register/unregister, filter change).\n */\n function notifyVisibilityChange() {\n for (const [sectionElement] of sectionRegistrations) {\n notifySection(sectionElement, sectionRegistrations, optionRegistrations);\n }\n\n const visibleCount = getVisibleOptionCount();\n const inputValue = trigger?.value ?? '';\n const isEmpty = visibleCount === 0;\n if (visibleCount !== lastOptionsLength || (isEmpty && inputValue !== lastInputValue)) {\n lastOptionsLength = visibleCount;\n lastInputValue = inputValue;\n notify('optionsChange', { optionsLength: visibleCount, inputValue });\n }\n\n // Re-evaluate aria-expanded when the combobox is open — visible content may have\n // changed due to filtering, option register/unregister, or skeleton transitions.\n if (isOpenState) {\n trigger?.setAttribute('aria-expanded', String(hasVisibleContent()));\n }\n }\n\n // ── Skeleton loading tracking ──────────────────────────────\n\n /** Delay before announcing loading in the live region (ms). */\n const LOADING_ANNOUNCEMENT_DELAY = 500;\n\n /** Timer for debounced loading announcement. */\n let loadingTimer: ReturnType<typeof setTimeout> | undefined;\n\n /** Whether a loading announcement has been sent since the last open. */\n let announcementSent = false;\n\n /** Start or restart the debounced loading announcement timer if conditions are met. */\n function startLoadingAnnouncementTimer() {\n clearTimeout(loadingTimer);\n if (skeletonCount > 0 && isOpenState) {\n loadingTimer = setTimeout(() => {\n if (skeletonCount > 0 && isOpenState) {\n announcementSent = true;\n notify('loadingAnnouncement', true);\n }\n }, LOADING_ANNOUNCEMENT_DELAY);\n }\n }\n\n /**\n * Called when the skeleton count transitions between 0 and >0 (or vice versa).\n * Fires `loadingChange` immediately and manages the debounced `loadingAnnouncement`.\n */\n function onSkeletonCountChange() {\n const isLoading = skeletonCount > 0;\n lastLoadingState = isLoading;\n notify('loadingChange', isLoading);\n\n if (isLoading) {\n startLoadingAnnouncementTimer();\n } else {\n clearTimeout(loadingTimer);\n if (announcementSent) {\n announcementSent = false;\n notify('loadingAnnouncement', false);\n }\n }\n }\n\n // Forward-declared so internal helpers (keydown handler, listbox listeners, etc.)\n // can reference `handle` before the object is fully constructed (via closure).\n // The handle is assigned immediately below and is always available by the time these helpers run.\n let handle!: ComboboxHandle;\n\n /** Detach everything (abort all listeners, clear state). */\n function detach() {\n abortController?.abort();\n abortController = null;\n focusNav = null;\n }\n\n /**\n * Attach the shared keydown listener to the trigger.\n *\n * Handles: Enter, ArrowDown, ArrowUp, Escape (2-tier), PageUp, PageDown.\n * Mode-specific keys (Space, Home, End, ArrowLeft/Right, printable chars, etc.)\n * are delegated to the `onKeydown` hook provided by the mode controller.\n */\n function attachTriggerKeydown(\n triggerEl: HTMLInputElement | HTMLButtonElement,\n signal: AbortSignal,\n onKeydown?: (event: KeyboardEvent) => boolean,\n ) {\n function handleKeydown(event: KeyboardEvent) {\n // Let the mode-specific handler run first.\n if (onKeydown?.(event)) {\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n\n let flag = false;\n const { altKey } = event;\n const nav = handle.focusNav;\n\n switch (event.key) {\n case 'Enter':\n if (handle.isOpen && nav?.selectors.activeItem) {\n // Capture activeItem before click — the click handler may close\n // the popover and clear the focus navigation state.\n const { activeItem } = nav.selectors;\n // \"Click\" on active option\n if (!isOptionDisabled(activeItem)) {\n activeItem.click();\n }\n flag = true;\n } else if (handle.isOpen && !handle.isMultiSelect) {\n // Open with no active item (single select) => close the popup,\n // but let Enter propagate so it can submit a surrounding form.\n handle.setIsOpen(false);\n }\n // Otherwise (closed popup, or multi-select with no active item),\n // let Enter pass through so it can submit a surrounding form\n break;\n\n // Open if closed, else move focus within listbox (wrap if enabled).\n case 'ArrowDown':\n if (!handle.isOpen) {\n handle.setIsOpen(true);\n // Focus first or selected item on open.\n if (!altKey) nav?.goTo((s) => s.getMatching(isSelected) ?? s.getFirst());\n } else if (nav?.selectors.hasNavigableItems && !altKey) {\n if (nav.selectors.activeItem) {\n // Go down\n nav.goDown();\n } else {\n // Focus first or selected item when no active item.\n nav.goTo((s) => s.getMatching(isSelected) ?? s.getFirst());\n }\n }\n flag = true;\n break;\n\n // Open if closed, else move focus within listbox (wrap if enabled).\n case 'ArrowUp':\n if (!handle.isOpen && !altKey) {\n handle.setIsOpen(true);\n // Focus last or selected item on open.\n nav?.goTo((s) => s.getMatching(isSelected) ?? s.getLast());\n } else if (handle.isOpen && nav?.selectors.hasNavigableItems) {\n if (nav.selectors.activeItem) {\n // Go up\n nav.goUp();\n } else if (!altKey) {\n // Focus last or selected item when no active item.\n nav.goTo((s) => s.getMatching(isSelected) ?? s.getLast());\n }\n }\n flag = true;\n break;\n\n case 'Escape':\n // 2-tier: close if open, otherwise clear value.\n if (handle.isOpen) {\n handle.setIsOpen(false);\n } else {\n handle.select(null);\n }\n flag = true;\n break;\n\n case 'PageUp':\n if (handle.isOpen && nav?.selectors.activeItem) {\n nav.goToOffset(-10);\n }\n flag = true;\n break;\n\n case 'PageDown':\n if (handle.isOpen && nav?.selectors.activeItem) {\n nav.goToOffset(10);\n }\n flag = true;\n break;\n\n default:\n break;\n }\n\n if (flag) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n triggerEl.addEventListener('keydown', (e) => handleKeydown(e as KeyboardEvent), { signal });\n }\n\n /** Try to fully attach when both trigger and listbox are available. */\n function tryAttach() {\n if (!trigger) return;\n\n // Create a fresh abort controller if needed\n const isNewController = !abortController;\n if (!abortController) {\n abortController = new AbortController();\n }\n\n // Initialize ARIA on trigger\n if (!trigger.getAttribute('aria-activedescendant')) {\n trigger.setAttribute('aria-activedescendant', '');\n }\n trigger.setAttribute('aria-expanded', String(isOpenState));\n\n // On first attach, wire up the mode-specific controller, shared keydown, and focusout handlers.\n if (isNewController) {\n const onKeydown = onTriggerAttach?.(handle, abortController.signal) || undefined;\n attachTriggerKeydown(trigger, abortController.signal, onKeydown);\n\n // Close the popup when the trigger loses focus\n trigger.addEventListener(\n 'focusout',\n () => {\n handle.setIsOpen(false);\n },\n { signal: abortController.signal },\n );\n }\n\n if (listbox && !focusNav) {\n focusNav = setupListbox(handle, abortController.signal, notify, { wrapNavigation });\n }\n }\n\n handle = {\n get trigger() {\n return trigger;\n },\n get listbox() {\n return listbox;\n },\n get focusNav() {\n return focusNav;\n },\n get isOpen() {\n return isOpenState;\n },\n get isMultiSelect() {\n return listbox?.getAttribute('aria-multiselectable') === 'true';\n },\n get isLoading() {\n return skeletonCount > 0;\n },\n\n setIsOpen(isOpen: boolean) {\n if (isOpenState === isOpen) return;\n isOpenState = isOpen;\n if (!isOpen) {\n focusNav?.clear();\n // Reset announcement state so it retriggers on next open\n clearTimeout(loadingTimer);\n if (announcementSent) {\n announcementSent = false;\n notify('loadingAnnouncement', false);\n }\n } else if (skeletonCount > 0) {\n // Opening while already loading — start the announcement timer\n startLoadingAnnouncementTimer();\n }\n\n // Update aria-expanded on trigger (false when no visible options or skeletons)\n trigger?.setAttribute('aria-expanded', String(isOpen && hasVisibleContent()));\n notify('open', isOpen);\n },\n\n select(option: HTMLElement | null) {\n callbacks.onSelect?.({ value: option ? getOptionValue(option) : '' });\n\n // Close on selection (when not multiselectable)\n if (option && !handle.isMultiSelect) {\n handle.focusNav?.clear();\n // Defer the close to the next frame (to make sure all other click handler resolve).\n requestAnimationFrame(() => {\n handle.setIsOpen(false);\n });\n }\n },\n\n flushPendingNavigation() {\n // Do navigations actions we could not do because the combobox items were not mounted yet\n focusNav?.flushPendingNavigation();\n },\n\n registerOption(element: HTMLElement, callback: (isFiltered: boolean) => void): () => void {\n const filterLower = filterValue.toLowerCase();\n const text = getOptionValue(element).toLowerCase();\n const isFiltered = filterLower.length > 0 && !text.includes(filterLower);\n optionRegistrations.set(element, { callback, lastFiltered: isFiltered });\n // Notify immediately with current state so the option renders correctly.\n callback(isFiltered);\n notifyVisibilityChange();\n return () => {\n optionRegistrations.delete(element);\n notifyVisibilityChange();\n };\n },\n\n setFilter(newFilter: string) {\n filterValue = newFilter;\n const filterLower = newFilter.toLowerCase();\n for (const [element, reg] of optionRegistrations) {\n const text = getOptionValue(element).toLowerCase();\n const isFiltered = filterLower.length > 0 && !text.includes(filterLower);\n // Only notify when state actually changes to avoid unnecessary re-renders.\n if (isFiltered !== reg.lastFiltered) {\n reg.lastFiltered = isFiltered;\n reg.callback(isFiltered);\n }\n }\n notifyVisibilityChange();\n },\n\n refilterOption(element: HTMLElement) {\n const reg = optionRegistrations.get(element);\n if (!reg) return;\n const filterLower = filterValue.toLowerCase();\n const text = getOptionValue(element).toLowerCase();\n const isFiltered = filterLower.length > 0 && !text.includes(filterLower);\n if (isFiltered !== reg.lastFiltered) {\n reg.lastFiltered = isFiltered;\n reg.callback(isFiltered);\n notifyVisibilityChange();\n }\n },\n\n registerSection(\n element: HTMLElement,\n callback: (state: { hidden: boolean; 'aria-hidden': boolean }) => void,\n ): () => void {\n sectionRegistrations.set(element, { callback, last: { hidden: false, 'aria-hidden': false } });\n // Compute and notify initial state immediately (force to ensure callback fires).\n notifySection(element, sectionRegistrations, optionRegistrations, true);\n return () => {\n sectionRegistrations.delete(element);\n };\n },\n\n registerSkeleton(): () => void {\n const wasLoading = skeletonCount > 0;\n skeletonCount += 1;\n if (!wasLoading) {\n onSkeletonCountChange();\n }\n return () => {\n skeletonCount -= 1;\n if (skeletonCount === 0) {\n onSkeletonCountChange();\n }\n };\n },\n\n registerTrigger(newTrigger: HTMLInputElement | HTMLButtonElement): () => void {\n // If replacing a trigger, detach first\n if (trigger && trigger !== newTrigger) {\n detach();\n }\n trigger = newTrigger;\n tryAttach();\n\n return () => {\n if (trigger === newTrigger) {\n detach();\n trigger = null;\n }\n };\n },\n\n registerListbox(newListbox: HTMLElement): () => void {\n // If we already have the same listbox, nothing to do\n if (listbox === newListbox) return () => {};\n\n // Store the listbox. If trigger is already attached, we need to\n // create focus nav and attach listbox listeners.\n const hadListbox = !!listbox;\n listbox = newListbox;\n\n if (trigger && abortController) {\n if (!hadListbox) {\n // First listbox — set up focus nav and listbox listeners\n focusNav = setupListbox(handle, abortController.signal, notify, { wrapNavigation });\n } else {\n // Replacing listbox — full re-attach\n detach();\n tryAttach();\n }\n }\n\n return () => {\n if (listbox === newListbox) {\n listbox = null;\n focusNav = null;\n // Don't full detach — trigger and mode controller stay alive\n // The listbox may reappear (e.g., popover re-render)\n }\n };\n },\n\n subscribe<K extends keyof ComboboxEventMap>(\n event: K,\n callback: (value: ComboboxEventMap[K]) => void,\n ): () => void {\n subscribers[event].add(callback);\n // Replay current loading state to late subscribers so that framework wrappers\n // that subscribe after initial mount (e.g. async Vue watchers) don't miss the\n // initial events fired during mount.\n if (event === 'open' && isOpenState) {\n (callback as (value: boolean) => void)(true);\n }\n if (event === 'loadingChange' && lastLoadingState) {\n (callback as (value: boolean) => void)(true);\n }\n\n // Cleanup function\n return () => {\n subscribers[event].delete(callback);\n };\n },\n\n destroy() {\n detach();\n trigger = null;\n listbox = null;\n filterValue = '';\n lastOptionsLength = 0;\n lastInputValue = '';\n lastLoadingState = false;\n optionRegistrations.clear();\n sectionRegistrations.clear();\n skeletonCount = 0;\n clearTimeout(loadingTimer);\n announcementSent = false;\n // Clear all subscribers\n for (const set of Object.values(subscribers)) {\n set.clear();\n }\n },\n };\n\n return handle;\n}\n","/** Typeahead interface. */\nexport interface Typeahead {\n /**\n * Handle a printable character keypress.\n * @param key The character typed.\n * @param currentItem The currently active item.\n * @returns The matched item, or null.\n */\n handle(key: string, currentItem: HTMLElement | null): HTMLElement | null;\n\n /**\n * Re-run the match for the *current* accumulated search string against the\n * live DOM, without appending a new character or resetting the timeout.\n\n * @param currentItem The currently active item.\n * @returns The matched item, or null.\n */\n rematch(currentItem: HTMLElement | null): HTMLElement | null;\n\n /** Reset the accumulated search string. */\n reset(): void;\n}\n\n/** Timeout in ms after which the accumulated search string is cleared. */\nconst SEARCH_TIMEOUT = 500;\n\n/**\n * Create a typeahead controller for keyboard navigation in list-like widgets\n * (combobox, menu, listbox, tree, etc.).\n *\n * Accumulates typed characters and matches them against item labels.\n * Supports single-char cycling (e.g. pressing \"a\" repeatedly cycles through\n * items starting with \"a\") and multi-char prefix matching.\n *\n * Uses a {@link TreeWalker} for lazy DOM traversal — items are visited one\n * at a time without materializing the full list.\n *\n * @param getWalker Callback returning a fresh TreeWalker over navigable items, or null if unavailable.\n * @param getItemValue Callback extracting the text label from an item element.\n * @param signal AbortSignal for cleanup.\n * @returns Typeahead instance.\n */\nexport function createTypeahead(\n getWalker: () => TreeWalker | null,\n getItemValue: (item: HTMLElement) => string,\n signal: AbortSignal,\n): Typeahead {\n let searchString = '';\n let searchTimeout: ReturnType<typeof setTimeout> | undefined;\n\n // Reset timeout\n function reset() {\n searchString = '';\n if (searchTimeout !== undefined) {\n clearTimeout(searchTimeout);\n searchTimeout = undefined;\n }\n }\n signal.addEventListener('abort', reset);\n\n // Match the current accumulated search string against the live DOM.\n function match(currentItem: HTMLElement | null): HTMLElement | null {\n if (!searchString) return null;\n\n const walker = getWalker();\n if (!walker) return null;\n\n // Check if the walker has any items at all.\n const firstItem = walker.nextNode() as HTMLElement | null;\n if (!firstItem) return null;\n\n // Determine if all typed characters are the same (e.g. \"aaa\").\n const allSameChar = searchString.split('').every((ch) => ch === searchString[0]);\n\n // When all characters are the same, search by single char and cycle.\n // Otherwise, search by the full accumulated string.\n const searchText = allSameChar ? searchString[0] : searchString;\n\n // Position the walker at the starting point for the search.\n // For same-char cycling, start from the item AFTER currentItem.\n // For multi-char matching, start from currentItem's position.\n // If currentItem is not within the walker's root, treat as null.\n const validCurrent = currentItem && (walker.root as HTMLElement).contains(currentItem) ? currentItem : null;\n let startItem: HTMLElement;\n if (validCurrent) {\n walker.currentNode = validCurrent;\n if (allSameChar) {\n // Advance past current for cycling; if at end, wrap to first.\n const next = walker.nextNode() as HTMLElement | null;\n startItem = next ?? firstItem;\n } else {\n startItem = validCurrent;\n }\n } else {\n startItem = firstItem;\n }\n\n // Walk forward from startItem, wrapping around, until we either\n // find a match or complete a full cycle back to startItem.\n walker.currentNode = startItem;\n let candidate: HTMLElement = startItem;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const itemText = getItemValue(candidate).toLowerCase();\n if (itemText.startsWith(searchText)) {\n return candidate;\n }\n\n const next = walker.nextNode() as HTMLElement | null;\n if (next) {\n candidate = next;\n } else {\n // Wrap around to the first item.\n walker.currentNode = walker.root;\n const wrapped = walker.nextNode() as HTMLElement | null;\n if (!wrapped) return null;\n candidate = wrapped;\n }\n\n // Full cycle — no match found.\n if (candidate === startItem) {\n return null;\n }\n }\n }\n\n // Handle typeahead keys\n function handle(key: string, currentItem: HTMLElement | null): HTMLElement | null {\n // Clear any pending reset timeout.\n if (searchTimeout !== undefined) {\n clearTimeout(searchTimeout);\n }\n\n // Accumulate the character.\n searchString += key.toLowerCase();\n\n // Schedule clearing the search string after inactivity.\n searchTimeout = setTimeout(reset, SEARCH_TIMEOUT);\n\n return match(currentItem);\n }\n\n // Re-run the match for the current buffer without mutating it.\n function rematch(currentItem: HTMLElement | null): HTMLElement | null {\n return match(currentItem);\n }\n\n return { handle, rematch, reset };\n}\n","/**\n * Is the key a single printable character (not Space, no modifier keys)?\n *\n * Used by typeahead-style keyboard handlers (menu, combobox) to detect when a\n * keypress should start/continue a type-to-search rather than trigger navigation.\n */\nexport function isPrintableKey({ key, altKey, ctrlKey, metaKey }: KeyboardEvent): boolean {\n return key.length === 1 && key !== ' ' && !altKey && !ctrlKey && !metaKey;\n}\n","import type { ComboboxCallbacks, ComboboxHandle } from './types';\nimport { setupCombobox } from './setupCombobox';\nimport { createTypeahead } from '../../utils/typeahead';\nimport { createSelectorTreeWalker } from '../../utils/browser/createSelectorTreeWalker';\nimport { isPrintableKey } from '../../utils/browser/isPrintableKey';\nimport { getOptionLabel } from './utils';\n\n/**\n * Set up a combobox with a button trigger (select-only pattern).\n *\n * Creates a full combobox handle with the button-mode controller automatically\n * wired in and the trigger registered. The consumer only needs to call\n * `handle.registerListbox(listbox)`.\n *\n * Handles: Space (select/open), Home/End (listbox navigation),\n * printable characters (typeahead), and click (toggle).\n *\n * @param button The button element to use as the combobox trigger.\n * @param callbacks Callbacks for select and open/close events.\n * @returns A ComboboxHandle for interacting with the combobox.\n */\nexport function setupComboboxButton(button: HTMLButtonElement, callbacks: ComboboxCallbacks): ComboboxHandle {\n const handle = setupCombobox(callbacks, undefined, (combobox, signal) => {\n const typeahead = createTypeahead(\n () => {\n if (!combobox.listbox) return null;\n // In grid mode, walk gridcells (first cell per row is the option cell).\n // In list mode, walk option elements.\n const selector = combobox.focusNav?.type === 'grid' ? '[role=\"gridcell\"]' : '[role=\"option\"]';\n return createSelectorTreeWalker(combobox.listbox, selector);\n },\n getOptionLabel,\n signal,\n );\n\n // Click toggles the listbox.\n button.addEventListener('click', () => combobox.setIsOpen(!combobox.isOpen), { signal });\n\n return (event: KeyboardEvent): boolean => {\n const nav = combobox.focusNav;\n\n switch (event.key) {\n case 'Tab':\n // Selects the focused option\n if (combobox.isOpen && nav?.selectors.activeItem) {\n combobox.select(nav.selectors.activeItem);\n }\n // Return false to continue normal 'Tab' behavior (focus next).\n return false;\n\n case ' ':\n // Space acts like Enter in button mode.\n if (combobox.isOpen && nav?.selectors.activeItem) {\n // Click the active item — delegated handler handles select + close.\n nav.selectors.activeItem.click();\n } else {\n combobox.setIsOpen(true);\n }\n return true;\n\n case 'ArrowUp':\n // Alt+ArrowUp: select the focused option and close.\n if (event.altKey && combobox.isOpen && nav?.selectors.activeItem) {\n combobox.select(nav.selectors.activeItem);\n combobox.setIsOpen(false);\n return true;\n }\n // All other ArrowUp cases handled by base handler.\n return false;\n\n case 'Home':\n // `goTo` focuses the first option immediately when open, or defers\n // until the options commit when opening from closed.\n combobox.setIsOpen(true);\n nav?.goTo((n) => n.getFirst());\n return true;\n\n case 'End':\n combobox.setIsOpen(true);\n nav?.goTo((n) => n.getLast());\n return true;\n\n case 'ArrowLeft':\n // Grid mode: navigate to previous cell.\n if (nav?.type === 'grid' && combobox.isOpen && nav.selectors.activeItem) {\n nav.goLeft();\n return true;\n }\n return false;\n\n case 'ArrowRight':\n // Grid mode: navigate to next cell.\n if (nav?.type === 'grid' && combobox.isOpen && nav.selectors.activeItem) {\n nav.goRight();\n return true;\n }\n return false;\n\n case 'Escape':\n // Close if open; never clear selection (button-mode has no text input).\n if (combobox.isOpen) {\n combobox.setIsOpen(false);\n }\n return true;\n\n default:\n // Printable characters → typeahead.\n if (isPrintableKey(event)) {\n combobox.setIsOpen(true);\n typeahead.handle(event.key, nav?.selectors.activeItem ?? null);\n nav?.goTo((n) => typeahead.rematch(n.activeItem));\n return true;\n }\n return false;\n }\n };\n });\n\n handle.registerTrigger(button);\n return handle;\n}\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport type { ComboboxCallbacks } from './types';\n\n/**\n * Label display mode for the ComboboxButton.\n * - `'show-selection'`: Show the selected value if available, otherwise the label.\n * - `'show-label'`: Always show the label.\n * - `'show-tooltip'`: Show nothing in the button; label appears only in tooltip.\n */\nexport type ComboboxButtonLabelDisplayMode = 'show-selection' | 'show-label' | 'show-tooltip';\n\n/**\n * Defines the props for the core ComboboxButton template.\n */\nexport interface ComboboxButtonProps extends HasClassName, ComboboxCallbacks {\n /** The label for the button (used for ARIA and tooltip). */\n label: string;\n /** The currently selected value to display. */\n value?: string;\n /** Controls how the label/value is displayed. */\n labelDisplayMode?: ComboboxButtonLabelDisplayMode;\n /** The ID of the listbox element (for aria-controls). */\n listboxId?: string;\n /** Whether the combobox is open. */\n isOpen?: boolean;\n /** ref to the root button element. */\n ref?: CommonRef;\n /** Custom render button */\n renderButton?: (buttonProps: Record<string, any>) => JSXElement;\n}\n\n/**\n * Injected framework-specific components for ComboboxButton rendering.\n */\nexport interface ComboboxButtonComponents {\n /** Button component (framework-specific, e.g. React Button with theme/disabled handling). */\n Button: any;\n /** Tooltip wrapper component. */\n Tooltip: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxButton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-button';\n\n/**\n * ComboboxButton core template.\n * Renders a Button with combobox ARIA attributes, wrapped in a Tooltip.\n *\n * Framework-specific components (Tooltip) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxButton = (props: ComboboxButtonProps, { Button, Tooltip }: ComboboxButtonComponents) => {\n const {\n className,\n label,\n value,\n labelDisplayMode = 'show-selection',\n listboxId,\n isOpen,\n ref,\n renderButton,\n ...forwardedProps\n } = props;\n\n // Determine what content to display\n const showSelection = labelDisplayMode === 'show-selection';\n const tooltipOnly = labelDisplayMode === 'show-tooltip';\n\n const selectionLabel = showSelection && value ? value : null;\n const content: JSXElement = tooltipOnly ? null : selectionLabel || label;\n\n // Hide tooltip if the displayed content equals the label or when open\n const hideTooltip = label === content || isOpen;\n\n const componentProps = {\n ref,\n ...forwardedProps,\n className: classNames.join(className, CLASSNAME),\n role: 'combobox',\n 'aria-controls': listboxId,\n 'aria-haspopup': 'listbox',\n 'aria-expanded': isOpen,\n 'aria-activedescendant': '',\n children: content,\n };\n\n return (\n <Tooltip\n className={hideTooltip ? classNames.visuallyHidden() : undefined}\n label={label}\n closeMode=\"hide\"\n ariaLinkMode=\"aria-labelledby\"\n >\n {renderButton ? renderButton(componentProps) : <Button {...componentProps}>{content}</Button>}\n </Tooltip>\n );\n};\n","import React, { type ElementType } from 'react';\nimport type { ComponentRef } from '@lumx/react/utils/type';\n\ntype ForwardRefPolymorphic = <E extends ElementType, P extends { as?: E }>(\n render: (props: P, ref: ComponentRef<E>) => React.ReactNode,\n) => (props: P & React.ComponentProps<E> & { ref?: ComponentRef<E> }) => React.JSX.Element;\n\n/** Same as `React.forwardRef` but inferring Ref type from the `as` prop. */\nexport const forwardRefPolymorphic = React.forwardRef as ForwardRefPolymorphic;\n","import { createContext, Dispatch, RefObject, SetStateAction, useContext } from 'react';\n\nimport type { ComboboxHandle } from '@lumx/core/js/components/Combobox/types';\n\n/** Context value shared between Combobox sub-components. */\nexport interface ComboboxContextValue {\n /** The current ComboboxHandle (set by the trigger sub-component). */\n handle: ComboboxHandle | null;\n /** Setter for the handle (called by trigger on mount/unmount). */\n setHandle: Dispatch<SetStateAction<ComboboxHandle | null>>;\n /** The ID of the listbox element. */\n listboxId: string;\n /** Reference to the anchor element for popover positioning. */\n anchorRef: RefObject<HTMLElement | null>;\n}\n\nexport const ComboboxContext = createContext<ComboboxContextValue | undefined>(undefined);\n\n/**\n * Hook to access the Combobox context.\n * @throws Error if used outside of a Combobox component.\n * @returns The combobox context value.\n */\nexport function useComboboxContext() {\n const context = useContext(ComboboxContext);\n if (!context) {\n throw new Error('Combobox sub-components must be used within a Combobox');\n }\n return context;\n}\n","import { useEffect, useState } from 'react';\n\nimport type { ComboboxEventMap } from '@lumx/core/js/components/Combobox/types';\n\nimport { useComboboxContext } from './ComboboxContext';\n\n/**\n * Hook to subscribe to a combobox event via the handle's subscriber system.\n * Re-subscribes when the handle changes (e.g. trigger mount/unmount).\n */\nexport function useComboboxEvent<K extends keyof ComboboxEventMap>(\n event: K,\n initialValue: ComboboxEventMap[K],\n): ComboboxEventMap[K] {\n const { handle } = useComboboxContext();\n const [value, setValue] = useState(initialValue);\n useEffect(() => {\n return handle?.subscribe(event, setValue);\n }, [handle, event]);\n return value;\n}\n","import { useCallback } from 'react';\n\nimport { useComboboxContext } from './ComboboxContext';\nimport { useComboboxEvent } from './useComboboxEvent';\n\n/**\n * Hook to subscribe to the combobox open/close state.\n */\nexport function useComboboxOpen(): [boolean, (open: boolean) => void] {\n const { handle } = useComboboxContext();\n const isOpen = useComboboxEvent('open', false);\n const setIsOpen = useCallback((open: boolean) => handle?.setIsOpen(open), [handle]);\n return [isOpen, setIsOpen];\n}\n","import { ElementType, useEffect, useRef, useState } from 'react';\n\nimport { setupComboboxButton } from '@lumx/core/js/components/Combobox/setupComboboxButton';\nimport {\n ComboboxButton as UI,\n ComboboxButtonProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxButton';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRefPolymorphic } from '@lumx/react/utils/react/forwardRefPolymorphic';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { ComponentRef, HasPolymorphicAs, HasRequiredLinkHref } from '@lumx/react/utils/type';\nimport { Tooltip } from '../tooltip';\nimport { Button } from '../button';\nimport { useComboboxEvent } from './context/useComboboxEvent';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxOpen } from './context/useComboboxOpen';\n\n/**\n * Props for Combobox.Button component.\n *\n * Polymorphic component — use `as` to render the trigger as a different element or component\n * (e.g., `as=\"a\"`, `as={RouterLink}`). Defaults to the LumX `Button` component.\n */\nexport type ComboboxButtonProps<E extends ElementType = typeof Button> = Omit<\n HasPolymorphicAs<E>,\n 'children' | 'role' | 'aria-controls' | 'aria-haspopup' | 'aria-expanded' | 'aria-activedescendant'\n> &\n HasRequiredLinkHref<E> &\n ReactToJSX<UIProps>;\n\n/**\n * Combobox.Button component - Button trigger for select-only combobox mode.\n *\n * Renders a button with proper ARIA attributes. Registers itself as the\n * combobox trigger on mount for keyboard navigation and typeahead.\n * Polymorphic — use `as` to change the rendered element or component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ComboboxButton = Object.assign(\n forwardRefPolymorphic(\n <E extends ElementType = typeof Button>(props: ComboboxButtonProps<E>, ref: ComponentRef<E>) => {\n const { listboxId, anchorRef, setHandle } = useComboboxContext();\n const [isOpen] = useComboboxOpen();\n const state = useComboboxEvent('optionsChange', { optionsLength: 0 });\n const isLoading = useComboboxEvent('loadingChange', false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { as, label, value, labelDisplayMode = 'show-selection', onSelect, ...buttonProps } = props as any;\n\n // If `as` is provided, use it directly; otherwise use the LumX Button (full theme/disabled behavior).\n const ButtonComp = as ?? Button;\n\n // Track the button DOM element via state (instead of useRef) so it re-triggers the useEffect\n const [buttonElement, setButtonElement] = useState<HTMLButtonElement | null>(null);\n const mergedRef = useMergeRefs(ref as any, setButtonElement, anchorRef as any);\n\n // Keep onSelect in a ref to avoid re-creating the handle on every render\n const onSelectRef = useRef(onSelect);\n onSelectRef.current = onSelect;\n\n // Create the combobox handle with button-mode controller on mount\n useEffect(() => {\n if (!buttonElement) return undefined;\n const handle = setupComboboxButton(buttonElement, {\n onSelect(option) {\n onSelectRef.current?.(option);\n },\n });\n setHandle(handle);\n return () => {\n handle.destroy();\n setHandle(null);\n };\n }, [buttonElement, setHandle]);\n\n return UI(\n {\n ...buttonProps,\n label,\n value,\n labelDisplayMode,\n listboxId,\n isOpen: isOpen && (!!state?.optionsLength || isLoading),\n ref: mergedRef,\n },\n { Button: ButtonComp, Tooltip },\n );\n },\n ),\n { displayName: COMPONENT_NAME, className: CLASSNAME },\n);\n","import type { ComboboxCallbacks, ComboboxHandle, ComboboxInputOptions } from './types';\nimport { setupCombobox } from './setupCombobox';\n\n/** Options for configuring the input-mode combobox controller. */\nexport interface SetupComboboxInputOptions extends ComboboxCallbacks, ComboboxInputOptions {\n /**\n * Called synchronously on every user input event (typing, paste, delete…)\n * (Use this in framework wrappers that maintain controlled input state, like React)\n */\n onInput?(value: string): void;\n}\n\n/**\n * Set up a combobox with an input trigger (autocomplete/filter pattern).\n *\n * Creates a full combobox handle with the input-mode controller automatically\n * wired in and the trigger registered. The consumer only needs to call\n * `handle.registerListbox(listbox)`.\n *\n * Handles: Home/End (text cursor), ArrowLeft/Right (clear active descendant),\n * filtering (on input and on open), and focus behavior.\n *\n * @param input The input element to use as the combobox trigger.\n * @param options Options and callbacks for configuring the input-mode controller.\n * @returns A ComboboxHandle for interacting with the combobox.\n */\nexport function setupComboboxInput(input: HTMLInputElement, options: SetupComboboxInputOptions): ComboboxHandle {\n let handle: ComboboxHandle;\n const { filter = 'auto', selectionMode = 'fill', onSelect: optionOnSelect, onInput: onInputCallback } = options;\n const openOnFocus = options.openOnFocus ?? filter === 'off';\n const autoFilter = filter === 'auto';\n\n /** Check if the input is disabled (native `disabled` attribute or `aria-disabled=\"true\"`). */\n const isDisabled = () => input.disabled || input.getAttribute('aria-disabled') === 'true';\n\n /**\n * True when the current input value came from user typing (real InputEvent).\n * False when the value was set programmatically (select, clear, etc.).\n * Used to decide whether to re-apply the filter when the combobox opens.\n */\n let userHasTyped = false;\n\n /**\n * Wraps the consumer's onSelect to perform input-mode side effects after selection.\n * Filter and typing state are always reset on selection — selectionMode only controls\n * whether onChange is called by the framework wrapper, not the internal filter.\n */\n const onSelect = (option: { value: string }) => {\n optionOnSelect?.(option);\n userHasTyped = false;\n if (autoFilter) handle.setFilter('');\n };\n\n handle = setupCombobox({ onSelect }, { wrapNavigation: true }, (combobox, signal) => {\n signal.addEventListener('abort', () => {\n userHasTyped = false;\n });\n\n // Filter on real user typing (InputEvent with `inputType`).\n input.addEventListener(\n 'input',\n (event) => {\n if (!(event instanceof InputEvent)) return;\n if (isDisabled()) return;\n\n combobox.focusNav?.clear();\n userHasTyped = true;\n\n // Notify the framework wrapper of the new input value synchronously.\n onInputCallback?.(input.value);\n\n combobox.setIsOpen(true);\n\n if (autoFilter) {\n combobox.setFilter(input.value);\n }\n },\n { signal },\n );\n\n // Open on focus (only when openOnFocus is enabled).\n input.addEventListener(\n 'focus',\n () => {\n if (isDisabled()) return;\n combobox.focusNav?.clear();\n if (openOnFocus) {\n combobox.setIsOpen(true);\n }\n },\n { signal },\n );\n\n // Open on click (handles the case where the input is already focused, so focus doesn't re-fire).\n input.addEventListener(\n 'click',\n () => {\n if (isDisabled()) return;\n combobox.setIsOpen(true);\n },\n { signal },\n );\n\n // Re-apply filter when the combobox opens, but only if the current\n // input value came from user typing. After a programmatic change\n // (select, clear), all options should remain visible.\n const unsubscribeOpen = combobox.subscribe('open', (isOpen) => {\n if (isOpen && autoFilter && userHasTyped) {\n combobox.setFilter(input.value);\n }\n });\n signal.addEventListener('abort', unsubscribeOpen);\n\n return (event: KeyboardEvent): boolean => {\n const nav = combobox.focusNav;\n\n switch (event.key) {\n case 'Home':\n input.setSelectionRange(0, 0);\n nav?.clear();\n return true;\n\n case 'End': {\n const len = input.value.length;\n input.setSelectionRange(len, len);\n nav?.clear();\n return true;\n }\n\n case 'ArrowLeft':\n case 'ArrowRight':\n // Grid mode: navigate cells when active item exists.\n if (nav?.type === 'grid' && nav.selectors.activeItem) {\n if (event.key === 'ArrowLeft') nav.goLeft();\n else nav.goRight();\n return true;\n }\n // Listbox mode: clear active item, allow caret movement.\n nav?.clear();\n return false;\n\n default:\n return false;\n }\n };\n });\n\n handle.registerTrigger(input);\n return handle;\n}\n","/** Disable state */\nexport type DisabledStateContextValue =\n | {\n state: 'disabled';\n }\n | { state: undefined | null };\n\nexport type DisabledProps = {\n disabled?: boolean;\n isDisabled?: boolean;\n 'aria-disabled'?: boolean | 'true' | 'false';\n onClick?: any;\n onChange?: any;\n [key: string]: any;\n};\n\nexport type DisabledState = {\n disabled: boolean;\n 'aria-disabled': boolean;\n};\n\n/**\n * Calculate the disabled state based on context and props.\n */\nexport function getDisabledState(context: DisabledStateContextValue | undefined, props: DisabledProps): DisabledState {\n const { disabled, isDisabled = disabled, 'aria-disabled': ariaDisabled } = props;\n return {\n disabled: context?.state === 'disabled' || !!isDisabled,\n 'aria-disabled': ariaDisabled === true || ariaDisabled === 'true',\n };\n}\n","import { mdiChevronUp, mdiChevronDown } from '@lumx/icons';\nimport type { CommonRef, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport { getDisabledState } from '../../utils/disabledState';\nimport type { ComboboxCallbacks, ComboboxInputOptions } from './types';\n\n/**\n * Defines the props for the core ComboboxInput template.\n */\nexport interface ComboboxInputProps extends HasClassName, HasTheme, ComboboxCallbacks, ComboboxInputOptions {\n /** The ID of the listbox element (for aria-controls). */\n listboxId?: string;\n /** Whether the combobox is open. */\n isOpen?: boolean;\n /** ref to the root element. */\n ref?: CommonRef;\n /** Reference to the input element. */\n inputRef?: CommonRef;\n /** Reference to the text field wrapper element. */\n textFieldRef?: CommonRef;\n /** Props for the toggle button (when provided, a chevron button is rendered). */\n toggleButtonProps?: Record<string, any>;\n /** Toggle callback for the chevron button. */\n handleToggle?(): void;\n}\n\n/**\n * Props from the core `ComboboxInputProps` that framework wrappers (React/Vue)\n * are expected to provide internally or re-type with framework-specific equivalents\n * (e.g. React refs, framework-specific button props). Wrappers should omit these\n * keys when exposing the core props to consumers.\n */\nexport type ComboboxInputPropsToOverride =\n | 'listboxId'\n | 'isOpen'\n | 'inputRef'\n | 'textFieldRef'\n | 'toggleButtonProps'\n | 'handleToggle';\n\n/**\n * Injected framework-specific components for ComboboxInput rendering.\n */\nexport interface ComboboxInputComponents {\n /** TextField component (framework-specific, e.g. React TextField with controlled input). */\n TextField: any;\n /** IconButton component (framework-specific, e.g. React IconButton with theme/disabled). */\n IconButton: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxInput';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-input';\n\n/**\n * ComboboxInput core template.\n * Renders a TextField with combobox ARIA attributes and an optional toggle button.\n *\n * Framework-specific components (TextField, IconButton) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxInput = (props: ComboboxInputProps, { TextField, IconButton }: ComboboxInputComponents) => {\n const {\n listboxId,\n isOpen,\n ref,\n inputRef,\n textFieldRef,\n toggleButtonProps,\n handleToggle,\n filter,\n theme,\n ...forwardedProps\n } = props;\n\n // Compute whether the combobox is disabled (native or aria-disabled).\n const disabledState = getDisabledState(undefined, props);\n const isAnyDisabled = disabledState.disabled || disabledState['aria-disabled'] || undefined;\n\n return (\n <TextField\n autoComplete=\"off\"\n readOnly={filter === 'off' || undefined}\n {...forwardedProps}\n ref={ref}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={listboxId}\n aria-expanded={isOpen}\n inputRef={inputRef}\n textFieldRef={textFieldRef}\n theme={theme}\n afterElement={\n toggleButtonProps ? (\n <IconButton\n {...toggleButtonProps}\n theme={theme}\n isDisabled={isAnyDisabled}\n emphasis=\"low\"\n size=\"s\"\n icon={isOpen ? mdiChevronUp : mdiChevronDown}\n tabIndex={-1}\n aria-controls={listboxId}\n aria-expanded={isOpen}\n onClick={handleToggle}\n />\n ) : undefined\n }\n />\n );\n};\n","import { LumxClassName } from '@lumx/core/js/types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TextField';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-text-field';\n\n/**\n * Input native element class name.\n */\nexport const INPUT_NATIVE_CLASSNAME = `${CLASSNAME}__input-native`;\n","import { mdiAlertCircle, mdiCheckCircle, mdiCloseCircle } from '@lumx/icons';\nimport { HasTheme, HasAriaDisabled, HasClassName, JSXElement, CommonRef, GenericProps, HasDisabled } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME } from './constants';\nimport { InputLabel, InputLabelProps } from '../InputLabel';\nimport { Emphasis, Kind, Size, Theme } from '../../constants';\nimport { Icon } from '../Icon';\nimport { InputHelper } from '../InputHelper';\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface TextFieldProps extends HasClassName, HasTheme, HasAriaDisabled, HasDisabled {\n /** Chip Group to be rendered before the main text input. */\n chips?: JSXElement;\n /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */\n clearButtonProps?: GenericProps;\n /** Error message. */\n error?: string | JSXElement;\n /** Whether we force the focus style or not. */\n forceFocusStyle?: boolean;\n /** Whether the text field is displayed with error style or not. */\n hasError?: boolean;\n /** Additional element to put at the end of the text field. */\n afterElement?: JSXElement;\n /** Helper text. */\n helper?: string | JSXElement;\n /** Icon (SVG path). */\n icon?: string;\n /** Native input id property (generated if not provided to link the label element). */\n id?: string;\n /** Generated helper id for accessibility attributes. */\n helperId?: string;\n /** Generated error id for accessibility attributes. */\n errorId?: string;\n /** Generated label id for accessibility attributes (used to link the clear button to the field label). */\n labelId?: string;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** Whether the text field is displayed with valid style or not. */\n isValid?: boolean;\n /** Label text. */\n label?: string;\n /** Additional label props. */\n labelProps?: InputLabelProps;\n /** Max string length the input accepts (constrains the input and displays a character counter). */\n maxLength?: number;\n /** Whether the text field is a textarea or an input. */\n multiline?: boolean;\n /** Placeholder text. */\n placeholder?: string;\n /** Reference to the wrapper. */\n textFieldRef?: CommonRef;\n /** Value. */\n value?: string;\n /** Whether any part is disabled. */\n isAnyDisabled?: boolean;\n /** The input element (input or textarea). */\n input: JSXElement;\n /** Whether the input is focused. */\n isFocus?: boolean;\n /** IconButton component. */\n IconButton: (props: Record<string, any>) => any;\n /** Ref to the component root. */\n ref?: CommonRef;\n}\n\nexport type TextFieldPropsToOverride =\n | 'input'\n | 'IconButton'\n | 'labelProps'\n | 'textFieldRef'\n | 'clearButtonProps'\n | 'helperId'\n | 'errorId'\n | 'labelId'\n | 'isAnyDisabled'\n | 'isFocus';\n\n/**\n * Generate unique accessibility IDs for helper and error texts.\n * Combines them with any existing aria-describedby in priority order (error > helper > existing).\n *\n * @param helper Helper text content\n * @param error Error text content\n * @param generatedId Unique ID for this text field instance\n * @param existingAriaDescribedBy Existing aria-describedby value to merge\n * @return Object containing helperId, errorId, and combined describedById\n */\nexport function generateAccessibilityIds(\n helper: TextFieldProps['helper'],\n error: TextFieldProps['error'],\n generatedId: string,\n existingAriaDescribedBy?: string,\n label?: TextFieldProps['label'],\n): { helperId?: string; errorId?: string; describedById?: string; labelId?: string } {\n const helperId = helper ? `text-field-helper-${generatedId}` : undefined;\n const errorId = error ? `text-field-error-${generatedId}` : undefined;\n const labelId = label ? `text-field-label-${generatedId}` : undefined;\n const describedByIds = [errorId, helperId, existingAriaDescribedBy].filter(Boolean);\n const describedById = describedByIds.length === 0 ? undefined : describedByIds.join(' ');\n\n return { helperId, errorId, describedById, labelId };\n}\n\n/**\n * TextField component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TextField = (props: TextFieldProps) => {\n const {\n chips,\n className,\n clearButtonProps,\n error,\n forceFocusStyle,\n hasError,\n helper,\n icon,\n id: textFieldId,\n isRequired,\n isValid,\n label,\n labelProps,\n isAnyDisabled,\n maxLength,\n multiline,\n placeholder,\n textFieldRef,\n helperId,\n errorId,\n labelId,\n theme,\n value,\n afterElement,\n input,\n isFocus,\n IconButton,\n ref,\n } = props;\n\n const valueLength = (value || '').length;\n const isNotEmpty = valueLength > 0;\n\n return (\n <div\n ref={ref}\n className={classNames.join(\n className,\n block({\n 'has-chips': Boolean(chips),\n 'has-error': !isValid && hasError,\n 'has-icon': Boolean(icon),\n 'has-input': !multiline,\n 'has-input-clear': Boolean(clearButtonProps && isNotEmpty),\n 'has-label': Boolean(label),\n 'has-placeholder': Boolean(placeholder),\n 'has-textarea': multiline,\n 'has-value': Boolean(value),\n 'is-disabled': isAnyDisabled,\n 'is-focus': isFocus || forceFocusStyle,\n 'is-valid': isValid,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {(label || maxLength) && (\n <div className={element('header')}>\n {label &&\n InputLabel({\n ...labelProps,\n id: labelId,\n htmlFor: textFieldId as string,\n className: element('label'),\n isRequired,\n theme,\n children: label,\n })}\n\n {maxLength && (\n <div className={element('char-counter')}>\n <span>{maxLength - valueLength}</span>\n {maxLength - valueLength === 0 && Icon({ icon: mdiAlertCircle, size: Size.xxs })}\n </div>\n )}\n </div>\n )}\n\n <div className={element('wrapper')} ref={textFieldRef}>\n {icon &&\n Icon({\n className: element('input-icon'),\n color: theme === Theme.dark ? 'light' : undefined,\n icon,\n size: Size.xs,\n })}\n\n {chips ? (\n <div className={element('chips')}>\n {chips}\n\n {input}\n </div>\n ) : (\n <div className={element('input-wrapper')}>{input}</div>\n )}\n\n {(isValid || hasError) &&\n Icon({\n className: element('input-validity'),\n color: theme === Theme.dark ? 'light' : undefined,\n icon: isValid ? mdiCheckCircle : mdiAlertCircle,\n size: Size.xxs,\n })}\n\n {clearButtonProps && isNotEmpty && !isAnyDisabled && (\n <IconButton\n aria-describedby={labelId}\n {...clearButtonProps}\n className={element('input-clear')}\n icon={mdiCloseCircle}\n emphasis={Emphasis.low}\n size={Size.s}\n theme={theme}\n type=\"button\"\n />\n )}\n\n {afterElement && <div className={element('after-element')}>{afterElement}</div>}\n </div>\n\n {hasError &&\n error &&\n InputHelper({ children: error, className: element('helper'), kind: Kind.error, theme, id: errorId })}\n\n {helper && InputHelper({ className: element('helper'), theme, id: helperId, children: helper })}\n </div>\n );\n};\n","import type { HTMLInputTypeAttribute } from 'react';\n\nimport { CommonRef, HasClassName, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { INPUT_NATIVE_CLASSNAME } from './constants';\n\nconst { block } = classNames.bem(INPUT_NATIVE_CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface RawInputTextProps extends HasTheme, HasClassName {\n value?: string;\n type?: HTMLInputTypeAttribute;\n name?: string | undefined;\n ref?: CommonRef;\n handleChange?: (value: string, name?: string, event?: any) => void;\n handleInput?: (value: string, name?: string, event?: any) => void;\n handleFocus?: (event?: any) => void;\n handleBlur?: (event?: any) => void;\n}\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RawInputTextProps> = {\n type: 'text',\n};\n\n/**\n * Raw input text component\n * (input element without any decoration)\n */\nexport const RawInputText = (props: RawInputTextProps) => {\n const {\n className,\n theme,\n value,\n handleChange,\n handleInput,\n handleFocus,\n handleBlur,\n type = DEFAULT_PROPS.type,\n name,\n ref,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (evt: any) => {\n handleChange?.(evt.target.value, name, evt);\n };\n\n const handleOnInput = (evt: any) => {\n handleInput?.(evt.target.value, name, evt);\n };\n\n return (\n <input\n {...forwardedProps}\n name={name}\n type={type}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n text: true,\n }),\n )}\n onChange={handleOnChange}\n onInput={handleOnInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n value={value}\n />\n );\n};\n","import { ComponentProps, SyntheticEvent } from 'react';\n\nimport { Theme, useTheme } from '@lumx/react';\n\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n RawInputText as UI,\n RawInputTextProps as UIProps,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/TextField/RawInputText';\n\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\ntype NativeInputProps = Omit<ComponentProps<'input'>, 'value' | 'onChange'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface RawInputTextProps extends NativeInputProps, ReactToJSX<UIProps> {\n onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;\n}\n/**\n * Component default props.\n */\nexport { DEFAULT_PROPS };\n\n/**\n * Raw input text component\n * (input element without any decoration)\n */\nexport const RawInputText = forwardRef<RawInputTextProps, HTMLInputElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, onChange, onFocus, onBlur, ...restOfProps } = props;\n\n return UI({\n ...restOfProps,\n ref,\n theme,\n handleChange: onChange,\n handleFocus: onFocus as any,\n handleBlur: onBlur as any,\n });\n});\n","import { CommonRef, HasClassName, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { INPUT_NATIVE_CLASSNAME } from './constants';\n\nconst { block } = classNames.bem(INPUT_NATIVE_CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface RawInputTextareaProps extends HasTheme, HasClassName {\n value?: string;\n rows?: number;\n name?: string | undefined;\n ref?: CommonRef;\n handleChange?: (value: string, name?: string, event?: any) => void;\n handleInput?: (value: string, name?: string, event?: any) => void;\n handleFocus?: (event?: any) => void;\n handleBlur?: (event?: any) => void;\n}\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RawInputTextareaProps> = {\n rows: 2,\n};\n\n/**\n * Raw input textarea component\n * (textarea element without any decoration)\n */\nexport const RawInputTextarea = (props: RawInputTextareaProps) => {\n const {\n className,\n theme,\n value,\n handleChange,\n handleInput,\n handleFocus,\n handleBlur,\n rows = DEFAULT_PROPS.rows,\n name,\n ref,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (evt: any) => {\n handleChange?.(evt.target.value, name, evt);\n };\n\n const handleOnInput = (evt: any) => {\n handleInput?.(evt.target.value, name, evt);\n };\n\n return (\n <textarea\n {...forwardedProps}\n name={name}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n textarea: true,\n }),\n )}\n onChange={handleOnChange}\n onInput={handleOnInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n value={value}\n rows={rows}\n />\n );\n};\n","import React, { useState } from 'react';\n\n/**\n * Fit textarea rows to its content\n */\nexport function useFitRowsToContent(\n minimumRows: number,\n textareaRef: React.RefObject<HTMLTextAreaElement>,\n value: string | undefined,\n) {\n const [rows, setRows] = useState(minimumRows);\n React.useLayoutEffect(() => {\n const { current: textarea } = textareaRef;\n if (!textarea) {\n return;\n }\n\n // Save the current number of rows to restore it later and avoid a flicker.\n const previousRows = textarea.rows;\n\n // Set the rows to the minimum to get a baseline for row height.\n // This is necessary to get a consistent row height calculation.\n textarea.rows = minimumRows;\n const rowHeight = textarea.clientHeight / minimumRows;\n\n // Set rows to 1 to get the smallest possible textarea, which forces\n // scrollHeight to be the actual content height.\n textarea.rows = 1;\n const { scrollHeight } = textarea;\n\n // Restore the rows to the previous value.\n textarea.rows = previousRows;\n\n // Calculate the number of rows required to display the content.\n // Fallback to `minimumRows` if `rowHeight` is 0.\n const requiredRows = rowHeight > 0 ? Math.ceil(scrollHeight / rowHeight) : minimumRows;\n\n // Update the rows state with the new calculated value.\n setRows(Math.max(requiredRows, minimumRows));\n }, [value, minimumRows, textareaRef]);\n return rows;\n}\n","import { ComponentProps, SyntheticEvent, useRef } from 'react';\n\nimport { Theme, useTheme } from '@lumx/react';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport {\n RawInputTextarea as UI,\n RawInputTextareaProps as UIProps,\n DEFAULT_PROPS as CORE_DEFAULT_PROPS,\n} from '@lumx/core/js/components/TextField/RawInputTextarea';\n\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport { useFitRowsToContent } from './useFitRowsToContent';\n\ntype NativeTextareaProps = Omit<ComponentProps<'textarea'>, 'value' | 'onChange'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface RawInputTextareaProps extends NativeTextareaProps, ReactToJSX<UIProps, 'rows'> {\n minimumRows?: number;\n onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;\n}\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RawInputTextareaProps> = {\n minimumRows: CORE_DEFAULT_PROPS.rows,\n};\n\n/**\n * Raw input text area component\n * (textarea element without any decoration)\n */\nexport const RawInputTextarea = forwardRef<Omit<RawInputTextareaProps, 'type'>, HTMLTextAreaElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n theme = defaultTheme,\n minimumRows = DEFAULT_PROPS.minimumRows as number,\n value,\n onChange,\n onFocus,\n onBlur,\n ...restOfProps\n } = props;\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n const rows = useFitRowsToContent(minimumRows, textareaRef, value);\n\n return UI({\n ...restOfProps,\n ref: useMergeRefs(ref, textareaRef),\n theme,\n value,\n rows,\n handleChange: onChange,\n handleFocus: onFocus as any,\n handleBlur: onBlur as any,\n });\n});\n","import { Ref, RefObject, SyntheticEvent, useRef, useState } from 'react';\n\nimport { Theme } from '@lumx/core/js/constants';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\n\nimport { CLASSNAME, COMPONENT_NAME } from '@lumx/core/js/components/TextField/constants';\n\nimport {\n TextField as UI,\n TextFieldProps as UIProps,\n TextFieldPropsToOverride,\n generateAccessibilityIds,\n} from '@lumx/core/js/components/TextField/TextField';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { type InputLabelProps } from '../input-label';\nimport { IconButton, type IconButtonProps } from '../button';\nimport { RawInputText } from './RawInputText';\nimport { RawInputTextarea } from './RawInputTextarea';\n\n/**\n * Defines the props of the component.\n */\nexport interface TextFieldProps extends GenericProps, ReactToJSX<UIProps, TextFieldPropsToOverride> {\n /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */\n clearButtonProps?: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /** Reference to the <input> or <textarea> element. */\n inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;\n /** Additional label props. */\n labelProps?: InputLabelProps;\n /** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */\n minimumRows?: number;\n /** Native input name property. */\n name?: string;\n /** Reference to the wrapper. */\n textFieldRef?: Ref<HTMLDivElement>;\n /** Native input type (only when `multiline` is disabled). */\n type?: React.ComponentProps<'input'>['type'];\n /** On blur callback. */\n onBlur?(event: React.FocusEvent): void;\n /** On change callback. */\n onChange(value: string, name?: string, event?: SyntheticEvent): void;\n /** On clear callback. */\n onClear?(event?: SyntheticEvent): void;\n /** On focus callback. */\n onFocus?(event: React.FocusEvent): void;\n}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<TextFieldProps> = {\n type: 'text',\n};\n\n/**\n * TextField component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TextField = forwardRef<TextFieldProps, HTMLDivElement>((props, ref) => {\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(props);\n const defaultTheme = useTheme() || Theme.light;\n const {\n chips,\n className,\n clearButtonProps,\n error,\n forceFocusStyle,\n hasError,\n helper,\n icon,\n id,\n inputRef: inputRefProps,\n isRequired,\n isValid,\n label,\n labelProps,\n maxLength,\n minimumRows,\n multiline,\n name,\n onBlur,\n onChange,\n onClear,\n onFocus,\n placeholder,\n textFieldRef,\n theme = defaultTheme,\n type = DEFAULT_PROPS.type,\n value,\n afterElement,\n ...forwardedProps\n } = otherProps;\n const generatedTextFieldId = useId();\n const textFieldId = id || generatedTextFieldId;\n /** Keep a clean local input ref to manage focus */\n const localInputRef = useRef<HTMLInputElement | HTMLTextAreaElement | null>(null);\n /** Merge prop input ref and local input ref */\n const inputRef = mergeRefs(localInputRef, inputRefProps);\n\n const { helperId, errorId, describedById, labelId } = generateAccessibilityIds(\n helper,\n error,\n generatedTextFieldId,\n forwardedProps['aria-describedby'],\n label,\n );\n\n const [isFocus, setFocus] = useState(false);\n\n /**\n * Function triggered when the Clear Button is clicked.\n * The idea is to execute the `onChange` callback with an empty string\n * and remove focus from the clear button.\n * @param evt On clear event.\n */\n const handleClear = (evt?: React.MouseEvent) => {\n evt?.nativeEvent.preventDefault();\n evt?.nativeEvent.stopPropagation();\n (evt?.currentTarget as HTMLElement).blur();\n\n onChange('');\n\n if (onClear) {\n onClear(evt);\n }\n\n /** Use local inputRef in case the prop input ref is a `mergeRefs` function. */\n const inputElement = localInputRef as RefObject<HTMLInputElement | HTMLTextAreaElement>;\n\n if (inputElement && inputElement.current) {\n inputElement.current.focus();\n }\n };\n\n const inputProps = {\n id: textFieldId,\n ref: inputRef as any,\n ...disabledStateProps,\n ...forwardedProps,\n required: isRequired,\n maxLength,\n onBlur(evt: React.FocusEvent) {\n setFocus(false);\n onBlur?.(evt);\n },\n onFocus(evt: React.FocusEvent) {\n setFocus(true);\n onFocus?.(evt);\n },\n placeholder,\n value,\n onChange,\n name,\n 'aria-invalid': hasError || undefined,\n 'aria-describedby': describedById,\n readOnly: forwardedProps.readOnly || disabledStateProps['aria-disabled'],\n theme,\n };\n const input = multiline ? (\n <RawInputTextarea {...inputProps} minimumRows={minimumRows} />\n ) : (\n <RawInputText type={type} {...inputProps} />\n );\n\n return UI({\n ref,\n chips,\n className,\n forceFocusStyle,\n icon,\n isValid,\n label,\n labelProps,\n isAnyDisabled,\n input,\n id: textFieldId,\n afterElement,\n hasError,\n helperId,\n labelId,\n multiline,\n maxLength,\n isRequired,\n errorId,\n placeholder,\n textFieldRef,\n value,\n theme,\n error,\n helper,\n IconButton: IconButton as any,\n isFocus,\n clearButtonProps: clearButtonProps\n ? {\n ...clearButtonProps,\n onClick: handleClear,\n }\n : undefined,\n });\n});\nTextField.displayName = COMPONENT_NAME;\nTextField.className = CLASSNAME;\nTextField.defaultProps = DEFAULT_PROPS;\n","import { type Ref, useCallback, useEffect, useRef } from 'react';\n\nimport { setupComboboxInput } from '@lumx/core/js/components/Combobox/setupComboboxInput';\nimport {\n ComboboxInput as UI,\n ComboboxInputProps as UIProps,\n ComboboxInputPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxInput';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { IconButton, IconButtonProps } from '../button';\nimport { TextField, TextFieldProps } from '../text-field';\nimport { useComboboxEvent } from './context/useComboboxEvent';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxOpen } from './context/useComboboxOpen';\n\n/**\n * Props for Combobox.Input component.\n * Note: role, aria-autocomplete, aria-controls, aria-expanded are set internally and cannot be overridden.\n */\nexport interface ComboboxInputProps extends TextFieldProps, ReactToJSX<UIProps, ComboboxInputPropsToOverride> {\n /**\n * Props for the toggle button.\n * When provided, a chevron button will be rendered in the text field's afterElement\n * to toggle the listbox visibility.\n */\n toggleButtonProps?: Pick<IconButtonProps, 'label'> & Partial<Omit<IconButtonProps, 'label'>>;\n}\n\n/**\n * Combobox.Input component - wraps TextField with combobox ARIA attributes\n * and optionally includes a toggle button.\n *\n * @param props Component props.\n * @param ref Component ref (will be forwarded to the anchor ref for popover positioning).\n * @return React element.\n */\nexport const ComboboxInput = forwardRef<ComboboxInputProps, HTMLDivElement>((props, ref) => {\n const { listboxId, anchorRef, setHandle } = useComboboxContext();\n const [isOpen, setIsOpen] = useComboboxOpen();\n const state = useComboboxEvent('optionsChange', { optionsLength: 0 });\n const isLoading = useComboboxEvent('loadingChange', false);\n const { inputRef: externalInputRef, toggleButtonProps, onSelect, filter, openOnFocus, selectionMode, ...otherProps } = props;\n const internalInputRef = useRef<HTMLInputElement>(null);\n const mergedInputRef = useMergeRefs(externalInputRef, internalInputRef);\n\n // Keep callbacks in refs to avoid re-creating the handle on every render\n const onSelectRef = useRef(onSelect);\n onSelectRef.current = onSelect;\n const onChangeRef = useRef(otherProps.onChange);\n onChangeRef.current = otherProps.onChange;\n\n // Create the combobox handle with input-mode controller on mount\n useEffect(() => {\n const input = internalInputRef.current;\n if (!input) return undefined;\n const handle = setupComboboxInput(input, {\n onSelect(option) {\n onSelectRef.current?.(option);\n // Drive onChange according to selectionMode.\n if (selectionMode === 'keep') {\n // Leave input as-is, no onChange.\n } else if (selectionMode === 'clear') {\n onChangeRef.current?.('');\n } else {\n // 'fill' (default): echo the selected value.\n onChangeRef.current?.(option.value);\n }\n },\n onInput(value) {\n // Keep controlled value in sync.\n onChangeRef.current?.(value);\n },\n selectionMode,\n filter,\n openOnFocus,\n });\n setHandle(handle);\n return () => {\n handle.destroy();\n setHandle(null);\n };\n }, [filter, openOnFocus, selectionMode, setHandle]);\n\n const handleToggle = useCallback(() => {\n setIsOpen(!isOpen);\n internalInputRef.current?.focus();\n }, [internalInputRef, isOpen, setIsOpen]);\n\n return UI(\n {\n ...otherProps,\n ref,\n listboxId,\n isOpen: isOpen && (!!state?.optionsLength || isLoading),\n filter,\n inputRef: mergedInputRef,\n textFieldRef: anchorRef as Ref<HTMLDivElement>,\n toggleButtonProps,\n handleToggle,\n },\n { TextField, IconButton },\n );\n});\n\nComboboxInput.displayName = COMPONENT_NAME;\nComboboxInput.className = CLASSNAME;\n","import { Size } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/** List item padding size. */\nexport type ListItemPadding = Extract<Size, 'big' | 'huge'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ListProps extends HasClassName {\n /** List content (should be ListItem, ListDivider, etc.). */\n children?: JSXElement;\n /** Item padding size. */\n itemPadding?: ListItemPadding;\n /** ref to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'List';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListProps> = {};\n\n/**\n * List component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const List = (props: ListProps) => {\n const { children, className, itemPadding, ref, ...forwardedProps } = props;\n\n return (\n <ul\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`item-padding-${itemPadding}`]: Boolean(itemPadding),\n }),\n )}\n ref={ref}\n >\n {children}\n </ul>\n );\n};\n\nList.displayName = COMPONENT_NAME;\nList.className = CLASSNAME;\nList.defaultProps = DEFAULT_PROPS;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { List } from '../List';\n\n/**\n * Popup type for the combobox listbox.\n * - `'listbox'`: Standard listbox with `role=\"listbox\"` and `role=\"option\"` items.\n * - `'grid'`: Grid mode with `role=\"grid\"` and `role=\"gridcell\"` items, enabling 2D keyboard navigation.\n */\nexport type ComboboxListType = 'listbox' | 'grid';\n\n/**\n * Defines the props for the core ComboboxList template.\n */\nexport interface ComboboxListProps extends HasClassName {\n /** Accessible label for the listbox (required for accessibility). */\n 'aria-label'?: string;\n /**\n * Indicates that the listbox content is incomplete (loading).\n * Set to `true` when skeleton placeholders are present and no real options have loaded yet.\n * Omit (or set to `undefined`) when not loading — the attribute is not rendered as `\"false\"`.\n */\n 'aria-busy'?: boolean;\n /** Content (should be ComboboxOption elements). */\n children?: JSXElement;\n /** The ID of the listbox element. */\n id?: string;\n /** ref to the root element */\n ref?: CommonRef;\n /**\n * The popup type. Set to \"grid\" when options have action buttons.\n * @default 'listbox'\n */\n type?: ComboboxListType;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxList';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-list';\n\n/**\n * ComboboxList core template.\n * Renders a List with combobox-specific ARIA attributes and styling.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxList = (props: ComboboxListProps) => {\n const {\n 'aria-label': ariaLabel,\n 'aria-busy': ariaBusy,\n children,\n className,\n id,\n type = 'listbox',\n ref,\n ...forwardedProps\n } = props;\n\n return List({\n ...forwardedProps,\n className: classNames.join(className, CLASSNAME),\n ref,\n itemPadding: 'big',\n id,\n role: type,\n 'aria-label': ariaLabel,\n 'aria-busy': ariaBusy || undefined,\n children,\n } as any);\n};\n","import { createContext, useContext } from 'react';\n\n/** Context value for the Combobox.List sub-tree. */\nexport interface ComboboxListContextValue {\n /** The popup type. \"grid\" enables 2D keyboard navigation and action buttons on options. */\n type: 'listbox' | 'grid';\n}\n\nexport const ComboboxListContext = createContext<ComboboxListContextValue>({ type: 'listbox' });\n\n/**\n * Hook to access the Combobox.List context (provides the `type`).\n * @returns The list context value.\n */\nexport function useComboboxListContext() {\n return useContext(ComboboxListContext);\n}\n","import { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport {\n ComboboxList as UI,\n ComboboxListProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxList';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { ComboboxListContext } from './context/ComboboxListContext';\nimport { useComboboxOpen } from './context/useComboboxOpen';\nimport { useComboboxEvent } from './context/useComboboxEvent';\n\n/** Props for Combobox.List component. */\nexport interface ComboboxListProps extends ReactToJSX<UIProps, 'aria-busy'> {}\n\n/**\n * Combobox.List component - wraps List with listbox ARIA attributes.\n * Registers itself as the combobox listbox on mount.\n *\n * To render the list inside a popover, wrap it with Combobox.Popover.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ComboboxList = forwardRef<ComboboxListProps, HTMLUListElement>((props, ref) => {\n const { listboxId, handle } = useComboboxContext();\n const { 'aria-label': ariaLabel, type = 'listbox', className, children, ...forwardedProps } = props;\n const internalRef = useRef<HTMLUListElement>(null);\n const mergedRef = useMergeRefs(ref, internalRef);\n const listContextValue = useMemo(() => ({ type }), [type]);\n const [isOpen] = useComboboxOpen();\n const options = useComboboxEvent('optionsChange', undefined);\n const visibleCount = options?.optionsLength ?? 0;\n\n // Register list as listbox when handle is available.\n useEffect(() => {\n const list = internalRef.current;\n if (!list) return undefined;\n return handle?.registerListbox(list);\n }, [handle]);\n\n // Track loading state for aria-busy\n const [isLoading, setIsLoading] = useState(false);\n useEffect(() => {\n if (!handle) return undefined;\n // Read current state synchronously (catches registrations before subscription).\n setIsLoading(handle.isLoading);\n return handle.subscribe('loadingChange', setIsLoading);\n }, [handle]);\n\n // Flush pending keyboard navigation after options commit on open.\n useEffect(() => {\n if (isOpen) handle?.flushPendingNavigation();\n }, [isOpen, visibleCount, handle]);\n\n return (\n <ComboboxListContext.Provider value={listContextValue}>\n {UI({\n ...forwardedProps,\n 'aria-label': ariaLabel,\n 'aria-busy': isLoading || undefined,\n className,\n ref: mergedRef,\n id: listboxId,\n type,\n children: isOpen ? children : null,\n })}\n </ComboboxListContext.Provider>\n );\n});\n\nComboboxList.displayName = COMPONENT_NAME;\nComboboxList.className = CLASSNAME;\n","import { Size } from '../../constants';\nimport type { CommonRef, GenericProps, HasAriaDisabled, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { RawClickable } from '../RawClickable';\n\n/** ListItem size variants. */\nexport type ListItemSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ListItemProps extends HasClassName, HasAriaDisabled {\n /** A component to be rendered after the content. */\n after?: JSXElement;\n /** A component to be rendered before the content. */\n before?: JSXElement;\n /** Content. */\n children?: JSXElement;\n /** Whether the list item should be highlighted or not. */\n isHighlighted?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Whether link/button is disabled or not. */\n isDisabled?: boolean;\n /** Custom component for the link (can be used to inject router Link). */\n linkAs?: 'a' | any;\n /** Props that will be passed on to the Link. */\n linkProps?: GenericProps;\n /** Reference to the link element. */\n linkRef?: CommonRef;\n /** Size variant. */\n size?: ListItemSize;\n /** ref to the root <li> element */\n ref?: CommonRef;\n /** On click callback. */\n handleClick?: (event: any) => void;\n}\n\nexport type ListItemPropsToOverride = 'after' | 'before' | 'children' | 'handleClick';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListItem';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list-item';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListItemProps> = {\n size: Size.regular,\n};\n\n/**\n * ListItem component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ListItem = (props: ListItemProps) => {\n const {\n after,\n before,\n children,\n className,\n isHighlighted,\n isSelected,\n isDisabled,\n 'aria-disabled': ariaDisabled,\n linkAs,\n linkProps = {},\n linkRef,\n handleClick,\n size = DEFAULT_PROPS.size,\n ref,\n ...forwardedProps\n } = props;\n const clickable = !!linkAs || linkProps?.href || handleClick;\n\n return (\n <li\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, block({ [`size-${size}`]: Boolean(size) }))}\n >\n {RawClickable({\n as: clickable ? linkAs || (linkProps.href ? 'a' : 'button') : 'div',\n isDisabled,\n 'aria-disabled': ariaDisabled,\n ...linkProps,\n className: element(clickable ? 'link' : 'wrapper', {\n 'is-highlighted': isHighlighted,\n 'is-selected': isSelected,\n 'is-disabled': isDisabled || ariaDisabled === 'true',\n }),\n handleClick,\n ref: linkRef,\n children: (\n <>\n {before && <div className={element('before')}>{before}</div>}\n <div className={element('content')}>{children}</div>\n {after && <div className={element('after')}>{after}</div>}\n </>\n ) as JSXElement,\n })}\n </li>\n );\n};\n\nListItem.displayName = COMPONENT_NAME;\nListItem.className = CLASSNAME;\nListItem.defaultProps = DEFAULT_PROPS;\n","import type { HasClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ClickableElement, RawClickable, RawClickableProps } from '../RawClickable';\n\n/**\n * ListItemAction props.\n */\nexport type ListItemActionProps<E extends ClickableElement = 'button'> = RawClickableProps<E> & HasClassName;\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListItemAction';\n\n/**\n * Component classname (used by action area CSS pattern).\n */\nexport const CLASSNAME = 'lumx-action-area__action';\n\nexport const DEFAULT_PROPS: Partial<ListItemActionProps> = {};\n\n/**\n * ListItemAction component.\n *\n * Renders a button or link with action area classes.\n * When placed as a child of ListItem, it activates the action area pattern:\n * the entire list item becomes visually clickable, while other interactive\n * elements (in `before`/`after` slots) remain independently clickable.\n */\nexport const ListItemAction = <E extends ClickableElement = 'button'>(props: ListItemActionProps<E>) => {\n const { children, className, as: Element = 'button', handleClick, ...forwardedProps } = props;\n\n return RawClickable({\n as: Element as any,\n ...forwardedProps,\n className: classNames.join(\n className,\n classNames.actionArea.action({ 'has-overlay': true, 'focus-inset': true }),\n ),\n handleClick,\n children,\n });\n};\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ListItem } from '../List/ListItem';\nimport { ListItemAction } from '../List/ListItemAction';\nimport { getTextProps } from '../Text';\n\n/**\n * Injected framework-specific components for ComboboxOption rendering.\n */\nexport interface ComboboxOptionComponents {\n /** Tooltip wrapper component (optional). Used when `tooltipProps` is provided. */\n Tooltip?: any;\n}\n\n/**\n * Defines the props for the core ComboboxOption template.\n */\nexport interface ComboboxOptionProps extends HasClassName {\n /** A component to be rendered before the content (e.g. an icon or avatar). */\n before?: JSXElement;\n /** A component to be rendered after the content (e.g. ComboboxOptionAction elements). */\n after?: JSXElement;\n /** Content (option label). */\n children?: JSXElement;\n /** Props forwarded to a Tooltip wrapping the role=\"option\" / role=\"gridcell\" element. */\n tooltipProps?: Record<string, any>;\n /** Helper description. */\n description?: string;\n /** Unique ID for the option element. */\n id?: string;\n /** Unique ID for the description element (for aria-describedby). */\n descriptionId?: string;\n /** Whether the option is disabled. */\n isDisabled?: boolean;\n /** Whether the option is selected. */\n isSelected?: boolean;\n /** Whether the parent list is in grid mode. */\n isGrid?: boolean;\n /**\n * Whether the option is hidden (filtered out by auto-filter).\n * When true, renders a bare `<li hidden>` with only the children text — no ARIA roles,\n * no classes, no visual structure. This keeps the element in the DOM so its textContent\n * can be read for future filter evaluations, while naturally excluding it from\n * `[role=\"option\"]` queries (focus navigation) and `.lumx-combobox-option` CSS rules\n * (section/popover auto-hide).\n */\n hidden?: boolean;\n /** On click callback. */\n handleClick?(): void;\n /** Extra props forwarded to the inner action element (e.g. link props when as=\"a\"). */\n actionProps?: Record<string, any>;\n /** ref to the root <li> element. */\n ref?: CommonRef;\n /** The value for this option (used for selection). */\n value?: string;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n * Used by `ReactToJSX<ComboboxOptionProps, ComboboxOptionPropsToOverride>`.\n */\nexport type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps' | 'actionProps';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOption';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * ComboboxOption core template.\n * Renders a ListItem with combobox-specific ARIA attributes and structure.\n *\n * In grid mode, the ListItem renders with `role=\"row\"` and the option content\n * uses `role=\"gridcell\"` instead of `role=\"option\"`.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxOption = (props: ComboboxOptionProps, { Tooltip }: ComboboxOptionComponents = {}) => {\n const {\n before,\n after,\n children,\n className,\n description,\n descriptionId,\n hidden,\n id,\n isDisabled,\n isGrid,\n isSelected,\n handleClick,\n actionProps,\n ref,\n tooltipProps,\n value,\n ...forwardedProps\n } = props;\n\n let actionRole;\n let itemRole;\n if (!hidden) {\n actionRole = isGrid ? 'gridcell' : 'option';\n itemRole = isGrid ? 'row' : 'none';\n }\n\n const actionElement = ListItemAction({\n as: 'button',\n ...actionProps,\n id,\n className: element('action'),\n handleClick,\n 'aria-selected': isSelected ? 'true' : 'false',\n 'data-value': value,\n 'aria-describedby':\n [description && descriptionId, id && `${id}-more-info`].filter(Boolean).join(' ') || undefined,\n 'aria-disabled': isDisabled ? 'true' : undefined,\n role: actionRole,\n children,\n } as any);\n\n const wrappedAction =\n Tooltip && tooltipProps && !hidden ? <Tooltip {...tooltipProps}>{actionElement}</Tooltip> : actionElement;\n\n return ListItem({\n ref,\n size: 'tiny',\n ...forwardedProps,\n hidden,\n className: !hidden ? classNames.join(className, block()) : undefined,\n before,\n after,\n role: itemRole,\n children: (\n <>\n {wrappedAction}\n\n {description && (\n <p\n id={descriptionId}\n {...getTextProps({\n className: element('description'),\n typography: 'caption',\n color: 'dark-L2',\n })}\n >\n {description}\n </p>\n )}\n </>\n ),\n } as any);\n};\n","import { createContext, useContext } from 'react';\n\n/** Context value provided by Combobox.Option to its `after` slot children. */\nexport interface ComboboxOptionContextValue {\n /** The ID of the parent option element (matches the aria-activedescendant value when highlighted). */\n optionId: string;\n}\n\nexport const ComboboxOptionContext = createContext<ComboboxOptionContextValue | undefined>(undefined);\n\n/**\n * Hook to access the Combobox.Option context.\n * Must be used within a Combobox.Option's `after` slot.\n * @throws Error if used outside of a Combobox.Option.\n * @returns The option context value.\n */\nexport function useComboboxOptionContext() {\n const context = useContext(ComboboxOptionContext);\n if (!context) {\n throw new Error('Combobox.OptionMoreInfo must be used within a Combobox.Option `after` slot');\n }\n return context;\n}\n","import { ElementType, ReactNode, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { HasPolymorphicAs, HasRequiredLinkHref } from '@lumx/react/utils/type';\nimport { GenericProps } from '@lumx/core/js/types';\nimport {\n ComboboxOption as UI,\n ComboboxOptionProps as UIProps,\n ComboboxOptionPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOption';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { Tooltip, TooltipProps } from '../tooltip';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxListContext } from './context/ComboboxListContext';\nimport { ComboboxOptionContext } from './context/ComboboxOptionContext';\n\n/**\n * Props forwarded to the inner action element (button or link).\n */\nexport type ComboboxOptionActionProps<E extends ElementType = 'button'> = HasPolymorphicAs<E> & HasRequiredLinkHref<E>;\n\n/**\n * Props for Combobox.Option component.\n */\nexport interface ComboboxOptionProps extends GenericProps, ReactToJSX<UIProps, ComboboxOptionPropsToOverride> {\n /** Display label for the option. */\n children?: ReactNode;\n /** On option clicked (or activated with keyboard) */\n onClick?(): void;\n /** Content rendered before the option label (e.g. an icon or avatar). */\n before?: ReactNode;\n /**\n * Content rendered after the option label.\n * In grid mode (`type=\"grid\"` on the parent Combobox.List), use `Combobox.OptionAction` elements here\n * to add secondary action buttons. Each action becomes an independent `role=\"gridcell\"`.\n */\n after?: ReactNode;\n /** Props forwarded to a Tooltip wrapping the role=\"option\" / role=\"gridcell\" trigger element. */\n tooltipProps?: Partial<TooltipProps>;\n /** Props forwarded to the inner action element (e.g. `{ as: 'a', href: '/foo' }`). */\n actionProps?: ComboboxOptionActionProps<any>;\n}\n\n/**\n * Combobox.Option component - wraps ListItem with option role and data-value.\n *\n * When filter=\"auto\" is enabled on the parent Combobox.Input, each option registers itself\n * with the combobox handle (via an internal ref to its root <li>). When the filter changes,\n * the handle calls back with the new match state. When filtered out, the core template renders\n * a bare `<li hidden>` — no ARIA roles, no CSS classes — keeping the element in the DOM so\n * its textContent remains readable for future filter evaluations.\n *\n * In grid mode (`type=\"grid\"` on the parent Combobox.List), the ListItem renders with `role=\"row\"`\n * and the option content uses `role=\"gridcell\"` instead of `role=\"option\"`.\n * Use `after` to pass `Combobox.OptionAction` elements as secondary action gridcells.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ComboboxOption = forwardRef<ComboboxOptionProps, HTMLLIElement>((props, ref) => {\n const {\n value,\n description,\n children,\n isSelected,\n isDisabled,\n before,\n after,\n tooltipProps,\n actionProps,\n onClick,\n ...forwardedProps\n } = props;\n const { type } = useComboboxListContext();\n const { handle } = useComboboxContext();\n const isGrid = type === 'grid';\n const optionId = useId();\n const descriptionId = useId();\n const internalRef = useRef<HTMLLIElement>(null);\n const mergedRef = useMergeRefs(ref, internalRef);\n const [isFiltered, setIsFiltered] = useState(false);\n\n useEffect(() => {\n const element = internalRef.current;\n if (!element || !handle) return undefined;\n return handle.registerOption(element, setIsFiltered);\n }, [handle]);\n\n // Re-evaluate filter state when the option value changes.\n useEffect(() => {\n const element = internalRef.current;\n if (!element || !handle) return;\n handle.refilterOption(element);\n }, [handle, value]);\n\n // Wrap `after` content in an option context so sub-components (e.g. OptionMoreInfo)\n // can access the parent option's ID for keyboard highlight detection.\n const optionContextValue = useMemo(() => ({ optionId }), [optionId]);\n const wrappedAfter = after ? (\n <ComboboxOptionContext.Provider value={optionContextValue}>{after}</ComboboxOptionContext.Provider>\n ) : undefined;\n\n return UI(\n {\n ...forwardedProps,\n ref: mergedRef,\n actionProps,\n hidden: isFiltered,\n value,\n description,\n children,\n isSelected,\n isDisabled,\n isGrid,\n before,\n after: wrappedAfter,\n handleClick: onClick,\n id: optionId,\n descriptionId,\n tooltipProps,\n },\n { Tooltip },\n );\n});\n\nComboboxOption.displayName = COMPONENT_NAME;\nComboboxOption.className = CLASSNAME;\n","import type {\n CommonRef,\n HasClassName,\n HasPolymorphicAs,\n HasRequiredLinkHref,\n JSXElement,\n LumxClassName,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { ClickableElement, RawClickable } from '../RawClickable';\n\n/**\n * Defines the props for the core ComboboxOptionAction template.\n */\nexport type ComboboxOptionActionProps<E extends ClickableElement = 'button'> = HasPolymorphicAs<E> &\n HasClassName &\n HasRequiredLinkHref<E> & {\n /** Content of the action (icon, label, etc.). */\n children?: JSXElement;\n /** Unique ID for the action element. */\n id?: string;\n /** Whether the action is disabled. */\n isDisabled?: boolean;\n /** On click callback. */\n handleClick?(evt: any): void;\n /** ref to the root element. */\n ref?: CommonRef;\n };\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOptionAction';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option-action';\n\n/**\n * ComboboxOptionAction core template.\n * Renders a secondary action button within a combobox option row (grid mode).\n * Each action renders as a `role=\"gridcell\"` element, enabling 2D keyboard\n * navigation (ArrowLeft/Right to move between the option and its actions).\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxOptionAction = <E extends ClickableElement = 'button'>(props: ComboboxOptionActionProps<E>) => {\n const { children, className, as: Element = 'button', handleClick, ...forwardedProps } = props;\n\n return RawClickable({\n as: Element as any,\n ...forwardedProps,\n role: 'gridcell',\n className: classNames.join(className, CLASSNAME),\n handleClick,\n children,\n } as any);\n};\n","import { ElementType, ReactNode, SyntheticEvent } from 'react';\n\nimport { ComponentRef, HasClassName, HasPolymorphicAs, HasRequiredLinkHref } from '@lumx/react/utils/type';\nimport {\n ComboboxOptionAction as UI,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOptionAction';\nimport { forwardRefPolymorphic } from '@lumx/react/utils/react/forwardRefPolymorphic';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\n\n/**\n * Combobox.OptionAction props.\n *\n * Polymorphic component — use `as` to render as a different element or component\n * (e.g., `as={IconButton}`, `as={Button}`). Defaults to `'button'`.\n */\nexport type ComboboxOptionActionProps<E extends ElementType = 'button'> = HasPolymorphicAs<E> &\n HasClassName &\n HasRequiredLinkHref<E> & {\n /** Content of the action (icon, label, etc.). Optional when using a polymorphic `as` that provides its own content (e.g., IconButton). */\n children?: ReactNode;\n /** Whether the action is disabled. */\n isDisabled?: boolean;\n /** On click callback. */\n onClick?(evt: SyntheticEvent): void;\n };\n\n/**\n * Combobox.OptionAction sub-component.\n *\n * Renders a secondary action button within a combobox option row (grid mode).\n * Each action renders as a `role=\"gridcell\"` element, enabling 2D keyboard\n * navigation (ArrowLeft/Right to move between the option and its actions).\n *\n * Uses the same polymorphic pattern as ListItem.Action (forwardRefPolymorphic + RawClickable).\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ComboboxOptionAction = Object.assign(\n forwardRefPolymorphic(\n <E extends ElementType = 'button'>(props: ComboboxOptionActionProps<E>, ref: ComponentRef<E>) => {\n const { disabledStateProps, otherProps } = useDisableStateProps(props as any);\n const { children, className, as: Element = 'button', onClick, ...forwardedProps } = otherProps as any;\n const actionId = useId();\n\n return UI({\n as: Element as any,\n ...forwardedProps,\n ...disabledStateProps,\n id: actionId,\n className,\n handleClick: onClick,\n ref,\n children,\n });\n },\n ),\n { displayName: COMPONENT_NAME, className: CLASSNAME },\n);\n","import { mdiInformationOutline } from '@lumx/icons';\n\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props for the core ComboboxOptionMoreInfo template.\n */\nexport interface ComboboxOptionMoreInfoProps extends HasClassName {\n /** Popover content (additional details about the option). */\n children?: JSXElement;\n /** Whether the popover is open. */\n isOpen?: boolean;\n /** ID for the popover element (used for aria-describedby on the parent option). */\n popoverId: string;\n /** Ref for the anchor element (icon button). */\n ref?: CommonRef;\n /** Mouse enter callback. */\n onMouseEnter?(): void;\n /** Mouse leave callback. */\n onMouseLeave?(): void;\n /** Props forwarded to the IconButton. */\n buttonProps?: Record<string, any>;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n */\nexport type ComboboxOptionMoreInfoPropsToOverride = 'children' | 'popoverId' | 'isOpen';\n\n/**\n * Injected framework-specific components for ComboboxOptionMoreInfo rendering.\n */\nexport interface ComboboxOptionMoreInfoComponents {\n /** IconButton component (framework-specific). */\n IconButton: any;\n /** Popover component (framework-specific). */\n Popover: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOptionMoreInfo';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option-more-info';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * ComboboxOptionMoreInfo core template.\n * Renders an info icon button with a popover that shows additional details about a combobox option.\n * The popover opens on mouse hover or when the parent option is keyboard-highlighted.\n *\n * Framework-specific components (IconButton, Popover) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxOptionMoreInfo = (\n props: ComboboxOptionMoreInfoProps,\n { IconButton, Popover }: ComboboxOptionMoreInfoComponents,\n) => {\n const { children, className, isOpen, popoverId, ref, onMouseEnter, onMouseLeave, buttonProps } = props;\n\n return (\n <>\n <IconButton\n ref={ref}\n icon={mdiInformationOutline}\n size=\"s\"\n {...buttonProps}\n className={block([className, buttonProps?.className])}\n emphasis=\"low\"\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n // Button plays no interactive role — only serves as a hover target and popover anchor.\n // Keyboard accessibility is handled via combobox keyboard highlighting.\n aria-hidden\n label=\"\"\n />\n <Popover\n id={popoverId}\n className={element('popover')}\n anchorRef={ref}\n isOpen={isOpen}\n closeMode=\"unmount\"\n closeOnEscape\n closeOnClickAway\n placement=\"bottom-end\"\n hasArrow\n >\n {children}\n </Popover>\n </>\n );\n};\n","/** CSS selector listing all tabbable elements. */\nexport const TABBABLE_ELEMENTS_SELECTOR =\n 'a[href], button, textarea, input:not([type=\"hidden\"]):not([hidden]), [tabindex]';\n\n/**\n * CSS selector matching elements that should be excluded from focus traversal.\n *\n * Note: `aria-disabled` is intentionally NOT in this list — per ARIA semantics, an `aria-disabled` element\n * remains focusable (and discoverable by assistive tech). To remove an element from the tab order, use\n * `tabindex=\"-1\"` instead.\n */\nexport const DISABLED_SELECTOR = '[hidden], [tabindex=\"-1\"], [disabled]:not([disabled=\"false\"])';\n","import { DISABLED_SELECTOR, TABBABLE_ELEMENTS_SELECTOR } from './constants';\n\nconst isNotDisabled = (element: HTMLElement) => !element.matches(DISABLED_SELECTOR);\n\nexport function getFocusableElements(element: HTMLElement | ShadowRoot): HTMLElement[] {\n return Array.from(element.querySelectorAll<HTMLElement>(TABBABLE_ELEMENTS_SELECTOR)).filter(isNotDisabled);\n}\n","import { getFocusableElements } from './getFocusableElements';\n\n/**\n * Get first and last elements focusable in an element.\n *\n * @param parentElement The element in which to search focusable elements.\n * @return first and last focusable elements\n */\nexport function getFirstAndLastFocusable(parentElement: HTMLElement | ShadowRoot) {\n const focusableElements = getFocusableElements(parentElement);\n\n // First non disabled element.\n const first = focusableElements[0];\n // Last non disabled element.\n const last = focusableElements[focusableElements.length - 1];\n\n if (last && first) {\n return { first, last };\n }\n return {};\n}\n","import { makeListenerTowerContext, type Listener } from '../function/listenerTower';\nimport { getFirstAndLastFocusable } from './getFirstAndLastFocusable';\n\n/**\n * Shared listener tower for focus traps.\n *\n * When multiple traps are activated, only the last registered one is active. When it tears down, the previously\n * registered trap is re-enabled.\n */\nconst FOCUS_TRAPS = makeListenerTowerContext();\n\nexport interface SetupFocusTrapOptions {\n /** The element in which to trap the focus. */\n focusZoneElement: HTMLElement;\n /**\n * The element to focus when the trap is activated.\n * Falls back to the first focusable element inside the zone, then to the zone element itself.\n */\n focusElement?: HTMLElement | null;\n}\n\n/**\n * Trap 'Tab' focus switch inside the `focusZoneElement`.\n *\n * Setup behavior:\n * 1. Focus `focusElement` if provided and contained in the zone.\n * 2. Otherwise focus the first focusable descendant.\n * 3. Otherwise focus the zone element itself (falling back to setting `tabindex=\"-1\"` if needed) so that\n * keyboard users (especially screen reader users) land inside the trapped region (e.g. an empty dialog).\n *\n * Tab key behavior:\n * - With at least one focusable descendant: focus cycles between the first and last focusable in the zone.\n * - With no focusable descendant: Tab is swallowed and focus is restored to the zone element itself.\n *\n * Multiple traps stack — only the latest one is active; previous traps re-enable when the latest is torn down.\n *\n * @param options Trap configuration.\n * @param signal AbortSignal used to tear down the trap.\n */\nexport function setupFocusTrap(options: SetupFocusTrapOptions, signal: AbortSignal): void {\n const { focusZoneElement, focusElement } = options;\n\n if (!focusZoneElement || signal.aborted) {\n return;\n }\n\n // The root node is either the Document (regular DOM) or a ShadowRoot (shadow DOM portal).\n const rootNode = focusZoneElement.getRootNode() as Document | ShadowRoot;\n\n // Track whether we added a `tabindex=\"-1\"` so we can restore the original state on teardown.\n let addedTabIndex = false;\n\n /** Make the zone element programmatically focusable (so we can fall back to it). */\n const ensureZoneIsFocusable = () => {\n if (!focusZoneElement.hasAttribute('tabindex')) {\n focusZoneElement.setAttribute('tabindex', '-1');\n addedTabIndex = true;\n }\n };\n\n /** Focus the zone element itself as a last-resort fallback. */\n const focusZoneFallback = () => {\n ensureZoneIsFocusable();\n focusZoneElement.focus({ preventScroll: true });\n };\n\n // Trap 'Tab' key down focus switch into the focus zone.\n const trapTabFocusInFocusZone = (evt: KeyboardEvent) => {\n if (evt.key !== 'Tab') {\n return;\n }\n\n const focusable = getFirstAndLastFocusable(focusZoneElement);\n\n // Prevent focus switch if no focusable available — pin focus on the zone itself.\n if (!focusable.first) {\n evt.preventDefault();\n focusZoneFallback();\n return;\n }\n\n const { activeElement } = rootNode;\n\n if (\n // No previous focus.\n !activeElement ||\n // Previous focus is at the end of the focus zone.\n (!evt.shiftKey && activeElement === focusable.last) ||\n // Previous focus is outside the focus zone.\n !focusZoneElement.contains(activeElement)\n ) {\n focusable.first.focus();\n evt.preventDefault();\n return;\n }\n\n if (\n // Focus order reversed.\n evt.shiftKey &&\n // Previous focus is at the start of the focus zone.\n activeElement === focusable.first\n ) {\n focusable.last.focus();\n evt.preventDefault();\n }\n };\n\n const keydownHandler = trapTabFocusInFocusZone as EventListener;\n const focusTrap: Listener = {\n enable: () => rootNode.addEventListener('keydown', keydownHandler),\n disable: () => rootNode.removeEventListener('keydown', keydownHandler),\n };\n\n // SETUP: focus initial element.\n if (focusElement && focusZoneElement.contains(focusElement)) {\n // Focus the given element.\n focusElement.focus({ preventScroll: true });\n } else {\n const firstFocusable = getFirstAndLastFocusable(focusZoneElement).first;\n if (firstFocusable) {\n // Focus the first focusable descendant.\n firstFocusable.focus({ preventScroll: true });\n } else {\n // No focusable descendant — fall back to the zone itself (e.g. an empty dialog).\n focusZoneFallback();\n }\n }\n\n FOCUS_TRAPS.register(focusTrap);\n\n // TEARDOWN.\n signal.addEventListener(\n 'abort',\n () => {\n FOCUS_TRAPS.unregister(focusTrap);\n if (addedTabIndex) {\n focusZoneElement.removeAttribute('tabindex');\n }\n },\n { once: true },\n );\n}\n","import { useEffect } from 'react';\n\nimport { setupFocusTrap } from '@lumx/core/js/utils/focus/setupFocusTrap';\nimport { Falsy } from '@lumx/react/utils/type';\n\n/**\n * Trap 'Tab' focus switch inside the `focusZoneElement`.\n *\n * If multiple focus traps are activated, only the last one is maintained and when a focus trap closes, the previous one\n * gets activated again.\n *\n * If the zone has no focusable descendant, the zone element itself receives focus (with a fallback `tabindex=\"-1\"`).\n *\n * @param focusZoneElement The element in which to trap the focus.\n * @param focusElement The element to focus when the focus trap is activated (otherwise the first focusable element\n * will be focused — and finally the zone element itself if no focusable is found).\n */\nexport function useFocusTrap(focusZoneElement: HTMLElement | Falsy, focusElement?: HTMLElement | null): void {\n useEffect(() => {\n if (!focusZoneElement) {\n return undefined;\n }\n\n const controller = new AbortController();\n setupFocusTrap({ focusZoneElement, focusElement }, controller.signal);\n return () => controller.abort();\n }, [focusElement, focusZoneElement]);\n}\n","import React from 'react';\nimport type { Comp } from '@lumx/react/utils/type';\n\n/**\n * HOC component wrapping a component to skip render if predicate return falsy\n */\nexport const skipRender = <P, T>(predicate: (props: P) => any, Component: Comp<P, T>) => {\n const Wrapper = React.forwardRef<T, P>((props: any, ref) => {\n if (!predicate(props)) {\n // Can't render in SSR.\n return null;\n }\n return <Component ref={ref} {...props} />;\n });\n Wrapper.displayName = Component.displayName;\n return Wrapper;\n};\n","import { Size } from '../../constants/enums';\nimport { ValueOf } from '../../types/ValueOf';\n\n/**\n * Different possible placements for the popover.\n */\nexport const Placement = {\n AUTO: 'auto',\n AUTO_END: 'auto-end',\n AUTO_START: 'auto-start',\n\n TOP: 'top',\n TOP_END: 'top-end',\n TOP_START: 'top-start',\n\n RIGHT: 'right',\n RIGHT_END: 'right-end',\n RIGHT_START: 'right-start',\n\n BOTTOM: 'bottom',\n BOTTOM_END: 'bottom-end',\n BOTTOM_START: 'bottom-start',\n\n LEFT: 'left',\n LEFT_END: 'left-end',\n LEFT_START: 'left-start',\n} as const;\nexport type Placement = ValueOf<typeof Placement>;\n\n/**\n * Popover fit anchor width options.\n */\nexport const FitAnchorWidth = {\n MAX_WIDTH: 'maxWidth',\n MIN_WIDTH: 'minWidth',\n WIDTH: 'width',\n} as const;\nexport type FitAnchorWidth = ValueOf<typeof FitAnchorWidth>;\n\n/**\n * Arrow size (in pixel).\n */\nexport const ARROW_SIZE = 14;\n\n/**\n * Popover default z-index\n */\nexport const POPOVER_ZINDEX = 9999;\n\n/**\n * Popover height/width sizes\n */\nexport const POPOVER_SIZES = [Size.m, Size.l, Size.xl, Size.xxl] as const;\n","import type { JSXElement, HasTheme, HasClassName, HasCloseMode, CommonRef, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Placement, FitAnchorWidth, POPOVER_ZINDEX } from './constants';\nimport type { PopoverSizes, Elevation, Offset } from './types';\n\n/**\n * Shared popover props used by both React and Vue wrappers.\n *\n * Framework-specific props (ref types, children, callbacks) are added by each wrapper.\n * The `anchorRef`, `boundaryRef`, `focusElement`, `parentElement`, `focusTrapZoneElement`\n * are typed as `any` here because React uses `RefObject<HTMLElement>` while Vue uses\n * raw `HTMLElement` — each framework narrows the type in its own props definition.\n */\nexport interface PopoverProps extends HasClassName, HasTheme, HasCloseMode {\n /** Reference to the DOM element used to set the position of the popover. */\n anchorRef?: CommonRef;\n /** Customize the root element tag. */\n as?: string;\n /** Element which will act as boundary when opening the popover. */\n boundaryRef?: CommonRef;\n /** Whether a click anywhere out of the popover would close it. */\n closeOnClickAway?: boolean;\n /** Whether an escape key press would close the popover. */\n closeOnEscape?: boolean;\n /** Shadow elevation. */\n elevation?: Elevation;\n /**\n * Manage popover width:\n * - `maxWidth`: popover not bigger than anchor\n * - `minWidth` or `true`: popover not smaller than anchor\n * - `width`: popover equal to the anchor.\n */\n fitToAnchorWidth?: FitAnchorWidth | boolean;\n /** Constrain popover height to avoid overflowing the viewport. */\n fitWithinViewportHeight?: boolean;\n /** Element to focus when opening the popover. */\n focusElement?: CommonRef;\n /** Whether the focus should go back on the anchor when popover closes and focus is within. */\n focusAnchorOnClose?: boolean;\n /** Whether we put an arrow or not. */\n hasArrow?: boolean;\n /** Whether the popover is open or not. */\n isOpen: boolean;\n /** Offset placement relative to anchor. */\n offset?: Offset;\n /** Reference to the parent element that triggered the popover. */\n parentElement?: CommonRef;\n /** Placement relative to anchor. */\n placement?: Placement;\n /** Whether the popover should be rendered into a portal. */\n usePortal?: boolean;\n /** The element in which the focus trap should be set. Default to popover. */\n focusTrapZoneElement?: CommonRef;\n /** Z-axis position. */\n zIndex?: number;\n /** Whether the popover should trap the focus within itself. */\n withFocusTrap?: boolean;\n /** On close callback (on click away or Escape pressed). Framework wrappers provide their own type. */\n handleClose?(): void;\n}\n\n/**\n * Internal UI rendering props for the core Popover component.\n * These are passed by the framework wrappers after processing the behavioral PopoverProps.\n */\nexport interface PopoverUIProps extends HasClassName, HasTheme, HasCloseMode, PopoverSizes {\n /** Customize the root element tag. */\n as?: string;\n /** Content. */\n children: JSXElement;\n /** Shadow elevation. */\n elevation?: Elevation;\n /** Whether we put an arrow or not. */\n hasArrow?: boolean;\n /** Whether the popover is open or not. */\n isOpen: boolean;\n /** Resolved position (from floating UI). */\n position?: Placement;\n /** Computed popover styles (from floating UI). */\n popoverStyle?: any;\n /** Computed arrow styles (from floating UI). */\n arrowStyle?: any;\n /** Ref for the popover root element. */\n ref?: CommonRef;\n /** Ref setter for the arrow element. */\n arrowRef?: CommonRef;\n /** Whether to render into a portal. */\n usePortal?: boolean;\n /** Click-away callback (when closeOnClickAway is true). */\n clickAwayCallback?: any;\n /** Refs for click-away detection. */\n clickAwayRefs?: any;\n /** Unmount sentinel (React-specific, optional). */\n unmountSentinel?: JSXElement;\n}\n\n/** Injected framework-specific components. */\nexport interface PopoverComponents {\n /** Portal component for rendering outside the parent hierarchy. */\n Portal: any;\n /** ClickAwayProvider component for click-away detection. */\n ClickAwayProvider: any;\n /** ThemeProvider component for theme context isolation. */\n ThemeProvider: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Popover';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-popover';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props (used by framework wrappers).\n */\nexport const DEFAULT_PROPS: Partial<PopoverProps> = {\n closeMode: 'unmount',\n elevation: 3 as Elevation,\n placement: Placement.AUTO,\n focusAnchorOnClose: true,\n usePortal: true,\n zIndex: POPOVER_ZINDEX,\n};\n\n/**\n * Popover core UI component.\n *\n * Framework-specific components (Portal, ClickAwayProvider, ThemeProvider) are passed\n * as a second argument by the React/Vue wrappers.\n */\nexport const Popover = (props: PopoverUIProps, { Portal, ClickAwayProvider, ThemeProvider }: PopoverComponents) => {\n const {\n as: asTag = 'div',\n children,\n className,\n closeMode = DEFAULT_PROPS.closeMode,\n elevation = DEFAULT_PROPS.elevation,\n hasArrow,\n isOpen,\n position,\n popoverStyle,\n arrowStyle,\n theme,\n\n // Framework-specific\n ref,\n arrowRef,\n usePortal = DEFAULT_PROPS.usePortal,\n clickAwayCallback,\n clickAwayRefs,\n unmountSentinel,\n\n // Forwarded props\n ...forwardedProps\n } = props;\n\n // Compute hidden/mounted state from closeMode and isOpen.\n const isHidden = !isOpen && closeMode === 'hide';\n const isMounted = isOpen || closeMode === 'hide';\n\n // Cast to `any` to avoid \"union type too complex\" error when using a dynamic tag name in JSX.\n // This is safe because `asTag` is always a valid HTML element tag (e.g. 'div').\n const Component = asTag as any;\n const adjustedElevation = Math.min(elevation || 0, 5);\n\n if (!isMounted) return null;\n\n return (\n <Portal enabled={usePortal}>\n <Component\n {...forwardedProps}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`elevation-${adjustedElevation}`]: Boolean(adjustedElevation),\n [`position-${position}`]: Boolean(position),\n 'is-hidden': Boolean(isHidden),\n }),\n )}\n hidden={isHidden || undefined}\n style={isHidden ? undefined : popoverStyle}\n data-popper-placement={position}\n >\n {unmountSentinel}\n <ClickAwayProvider callback={!isHidden && clickAwayCallback} childrenRefs={clickAwayRefs}>\n {hasArrow && (\n <div ref={arrowRef} className={element('arrow')} style={isHidden ? undefined : arrowStyle}>\n <svg viewBox=\"0 0 14 14\" aria-hidden>\n <path d=\"M8 3.49C7.62 2.82 6.66 2.82 6.27 3.48L.04 14 14.04 14 8 3.49Z\" />\n </svg>\n </div>\n )}\n <ThemeProvider value={theme}>{children}</ThemeProvider>\n </ClickAwayProvider>\n </Component>\n </Portal>\n );\n};\n","import { useLayoutEffect } from 'react';\n\n/**\n * Helper component using useLayoutEffect to trigger a callback on before unmount.\n *\n * The callback must be wrapped in a React ref to avoid updating the `useLayoutEffect` before the un-mount\n */\nexport const OnBeforeUnmount = ({ callbackRef }: { callbackRef: React.RefObject<(() => void) | undefined> }) => {\n useLayoutEffect(\n () => {\n return () => {\n // On unmount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n callbackRef.current?.();\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n return null;\n};\n","import React from 'react';\nimport { getFirstAndLastFocusable } from '@lumx/core/js/utils/focus/getFirstAndLastFocusable';\nimport { OnBeforeUnmount } from '@lumx/react/utils/react/OnBeforeUnmount';\nimport type { PopoverProps } from '../components/popover/Popover';\n\n/**\n * Provides an unmount sentinel to inject in the popover to detect when it closes and restore the focus to the\n * anchor if needed.\n */\nexport function useRestoreFocusOnClose(\n {\n focusAnchorOnClose,\n anchorRef,\n parentElement,\n }: Pick<PopoverProps, 'focusAnchorOnClose' | 'anchorRef' | 'parentElement'>,\n popoverElement?: HTMLElement | null,\n isOpen?: boolean,\n) {\n const onBeforeUnmountRef = React.useRef<(() => void) | undefined>();\n const prevIsOpenRef = React.useRef(isOpen);\n\n const tryRestoreFocus = React.useCallback(() => {\n if (!popoverElement || !focusAnchorOnClose) return;\n const focusedAtClose = document.activeElement;\n const isFocusWithin = popoverElement.contains(focusedAtClose);\n if (!isFocusWithin) return;\n\n // Defer restore: browser may still move focus after close (e.g. click-away on mousedown).\n setTimeout(() => {\n // Skip if focus moved to a real element (user intent). Restore if focus stayed\n // (closeMode=\"hide\") or fell back to body (element removed on unmount).\n const active = document.activeElement;\n const focusMovedAway =\n active && active !== focusedAtClose && active !== document.body && active !== document.documentElement;\n if (focusMovedAway) return;\n\n const anchor = anchorRef.current;\n const elementToFocus =\n // Provided parent element\n parentElement?.current ||\n // Or first focusable element in anchor\n (anchor ? getFirstAndLastFocusable(anchor).first : undefined) ||\n // Fallback to anchor\n anchor;\n\n elementToFocus?.focus({ preventScroll: true });\n }, 0);\n }, [anchorRef, focusAnchorOnClose, parentElement, popoverElement]);\n\n React.useEffect(() => {\n if (!popoverElement || !focusAnchorOnClose) {\n onBeforeUnmountRef.current = undefined;\n return;\n }\n onBeforeUnmountRef.current = tryRestoreFocus;\n }, [focusAnchorOnClose, popoverElement, tryRestoreFocus]);\n\n // Handle closeMode=\"hide\": detect isOpen going from true to false (popover stays mounted).\n React.useEffect(() => {\n if (prevIsOpenRef.current && !isOpen) {\n tryRestoreFocus();\n }\n prevIsOpenRef.current = isOpen;\n }, [isOpen, tryRestoreFocus]);\n\n return <OnBeforeUnmount callbackRef={onBeforeUnmountRef} />;\n}\n","import { type Placement as FloatingPlacement } from '@floating-ui/dom';\nimport { type Placement } from '../constants';\n\n/**\n * Parse a Popover placement into floating-ui placement or auto-placement config.\n */\nexport function parseAutoPlacement(placement?: Placement) {\n if (placement === 'auto') return { isAuto: true as const };\n if (placement === 'auto-start') return { isAuto: true as const, autoAlignment: 'start' as const };\n if (placement === 'auto-end') return { isAuto: true as const, autoAlignment: 'end' as const };\n return { floatingPlacement: placement as FloatingPlacement, isAuto: false as const };\n}\n","import { FitAnchorWidth } from '../constants';\n\n/**\n * Parse the fitToAnchorWidth option into the CSS property name to apply.\n */\nexport function parseFitWidth(fitToAnchorWidth?: string | boolean): string | undefined {\n if (!fitToAnchorWidth) return undefined;\n if (typeof fitToAnchorWidth === 'string') return fitToAnchorWidth;\n return FitAnchorWidth.MIN_WIDTH;\n}\n","import { GlobalSize, Size } from '../../../constants/enums';\nimport type { VarSize } from './types';\n\n/** Resolve a t-shirt size token to its CSS custom property, or pass through as-is. */\nexport function resolveCssSize<V extends string | undefined>(value: V): V extends GlobalSize ? VarSize<V> : V;\nexport function resolveCssSize(value: any) {\n if (value && value in Size) return `var(--lumx-size-${value})`;\n return value;\n}\n","/** Create a CSS min()/max() combiner function. */\nfunction combineSize(combinator: 'min' | 'max') {\n return (size1?: string, size2?: string) => {\n if (size1 && size2) return `${combinator}(${size1}, ${size2})`;\n return size1 || size2 || '';\n };\n}\n\n/** Combine two CSS values with `min()`. */\nexport const cssMin = combineSize('min');\n\n/** Combine two CSS values with `max()`. */\nexport const cssMax = combineSize('max');\n","/* eslint-disable no-param-reassign */\nimport {\n offset as offsetMiddleware,\n flip,\n shift,\n size,\n arrow as arrowMiddleware,\n autoPlacement,\n type Middleware,\n} from '@floating-ui/dom';\n\nimport { ARROW_SIZE } from '../constants';\nimport type { Offset, PopoverSizes } from '../types';\nimport type { PXSize } from '../../../utils/browser/css/types';\nimport { resolveCssSize } from '../../../utils/browser/css/resolveCssSize';\nimport { cssMin, cssMax } from '../../../utils/browser/css/combineSize';\nimport { type parseAutoPlacement } from './parseAutoPlacement';\n\nexport interface BuildPopoverMiddlewareOptions extends PopoverSizes {\n /** Offset from the anchor element. */\n offset?: Offset;\n /** Whether the popover has an arrow. */\n hasArrow?: boolean;\n /** CSS property to fit to anchor width ('minWidth', 'maxWidth', 'width'). Already parsed via `parseFitWidth`. */\n fitWidth?: string;\n /** Constrain popover height to avoid overflowing the viewport. */\n fitWithinViewportHeight?: boolean;\n /** Boundary element for overflow detection. */\n boundary?: HTMLElement;\n /** Parsed placement result from `parseAutoPlacement`. */\n parsedPlacement: ReturnType<typeof parseAutoPlacement>;\n /** Arrow element (required when hasArrow is true). */\n arrowElement?: HTMLElement | null;\n}\n\n/**\n * Build the floating-ui middleware array for popover positioning.\n *\n * Middleware order: offset → flip/autoPlacement → shift → size → arrow\n */\nexport function buildPopoverMiddleware(options: BuildPopoverMiddlewareOptions): Middleware[] {\n const {\n offset,\n hasArrow,\n fitWidth,\n fitWithinViewportHeight,\n width: rawWidth,\n minWidth: rawMinWidth,\n maxWidth: rawMaxWidth,\n height: rawHeight,\n minHeight: rawMinHeight,\n maxHeight: rawMaxHeight,\n boundary,\n parsedPlacement,\n arrowElement,\n } = options;\n\n // Resolve t-shirt sizes to CSS pixel strings for the apply callback.\n const width = resolveCssSize(rawWidth);\n const minWidth = resolveCssSize(rawMinWidth);\n const maxWidth = resolveCssSize(rawMaxWidth);\n const height = resolveCssSize(rawHeight);\n const minHeight = resolveCssSize(rawMinHeight);\n const maxHeight = resolveCssSize(rawMaxHeight);\n\n const middlewares: Middleware[] = [];\n\n // Offset middleware\n const awayOffset = (offset?.away ?? 0) + (hasArrow ? ARROW_SIZE : 0);\n const alongOffset = offset?.along ?? 0;\n middlewares.push(offsetMiddleware({ mainAxis: awayOffset, crossAxis: alongOffset }));\n\n // Positioning middlewares\n if (parsedPlacement.isAuto) {\n middlewares.push(\n autoPlacement({ ...(boundary ? { boundary } : {}), alignment: parsedPlacement.autoAlignment }),\n );\n } else {\n middlewares.push(flip(boundary ? { boundary } : {}));\n middlewares.push(shift(boundary ? { boundary } : {}));\n }\n\n // Size middleware — always required when any sizing constraint is set\n const anySizeConstraint =\n !!fitWidth || !!fitWithinViewportHeight || width || minWidth || maxWidth || height || minHeight || maxHeight;\n\n if (anySizeConstraint) {\n middlewares.push(\n size({\n ...(boundary ? { boundary } : {}),\n apply({ availableHeight, rects, elements }) {\n const anchorWidth: PXSize = `${rects.reference.width}px`;\n\n // Width: explicit width wins, else fitToAnchorWidth.\n elements.floating.style.width = width || (fitWidth === 'width' ? anchorWidth : '');\n // Min-width: anchor constrained by explicit min-width.\n elements.floating.style.minWidth = cssMax(minWidth, fitWidth === 'minWidth' ? anchorWidth : '');\n // Max-width: anchor constrained by explicit max-width.\n elements.floating.style.maxWidth = cssMin(maxWidth, fitWidth === 'maxWidth' ? anchorWidth : '');\n\n // Height: explicit values only.\n elements.floating.style.height = height || '';\n elements.floating.style.minHeight = minHeight || '';\n // Max-height: viewport combined with explicit max-height.\n const adaptedAvailableHeight: PXSize = `${Math.max(0, availableHeight - ARROW_SIZE)}px`;\n elements.floating.style.maxHeight = cssMin(\n maxHeight,\n fitWithinViewportHeight ? adaptedAvailableHeight : '',\n );\n },\n }),\n );\n }\n\n // Arrow middleware\n if (hasArrow && arrowElement) {\n middlewares.push(arrowMiddleware({ element: arrowElement, padding: ARROW_SIZE / 2 }));\n }\n\n return middlewares;\n}\n","import { type MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Compute arrow CSS styles from floating-ui middleware data.\n */\nexport function computeArrowStyles(arrowData?: MiddlewareData['arrow']): Record<string, string> | undefined {\n if (!arrowData) return undefined;\n return {\n left: arrowData.x != null ? `${arrowData.x}px` : '',\n top: arrowData.y != null ? `${arrowData.y}px` : '',\n };\n}\n","import { type Placement as FloatingPlacement } from '@floating-ui/dom';\nimport { type parseAutoPlacement } from './parseAutoPlacement';\n\n/**\n * Get the floating-ui placement from the parsed placement config.\n * Returns undefined for auto-placement (floating-ui handles it via autoPlacement middleware).\n */\nexport function getFloatingPlacement(\n parsedPlacement: ReturnType<typeof parseAutoPlacement>,\n): FloatingPlacement | undefined {\n return parsedPlacement.isAuto ? undefined : parsedPlacement.floatingPlacement;\n}\n","import { useMemo, useState } from 'react';\n\nimport { useFloating, autoUpdate } from '@floating-ui/react-dom';\n\nimport { IS_BROWSER } from '@lumx/react/constants';\nimport { Placement } from '@lumx/core/js/components/Popover/constants';\nimport {\n parseAutoPlacement,\n parseFitWidth,\n buildPopoverMiddleware,\n computeArrowStyles,\n getFloatingPlacement,\n} from '@lumx/core/js/components/Popover/utils';\nimport { PopoverProps } from '@lumx/react/components/popover/Popover';\n\ntype Options = Pick<\n PopoverProps,\n | 'offset'\n | 'hasArrow'\n | 'fitToAnchorWidth'\n | 'fitWithinViewportHeight'\n | 'width'\n | 'minWidth'\n | 'maxWidth'\n | 'height'\n | 'minHeight'\n | 'maxHeight'\n | 'boundaryRef'\n | 'anchorRef'\n | 'placement'\n | 'style'\n | 'zIndex'\n>;\n\ninterface Output {\n styles: { arrow?: React.CSSProperties; popover?: React.CSSProperties };\n isPositioned: boolean;\n position?: Placement;\n setArrowElement?: React.Ref<HTMLDivElement>;\n setPopperElement?: React.Ref<HTMLDivElement>;\n popperElement: HTMLElement | null;\n}\n\nexport function usePopoverStyle({\n offset,\n hasArrow,\n fitToAnchorWidth,\n fitWithinViewportHeight,\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n boundaryRef,\n anchorRef,\n placement,\n style,\n zIndex,\n}: Options): Output {\n const [popperElement, setPopperElement] = useState<null | HTMLElement>(null);\n const [arrowElement, setArrowElement] = useState<null | HTMLElement>(null);\n\n const parsedPlacement = parseAutoPlacement(placement);\n const fitWidth = parseFitWidth(fitToAnchorWidth);\n const boundary = boundaryRef?.current ?? undefined;\n\n const middleware = useMemo(\n () =>\n buildPopoverMiddleware({\n offset,\n hasArrow,\n fitWidth,\n fitWithinViewportHeight,\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n boundary,\n parsedPlacement,\n arrowElement,\n }),\n [\n offset,\n hasArrow,\n fitWidth,\n fitWithinViewportHeight,\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n boundary,\n parsedPlacement,\n arrowElement,\n ],\n );\n\n const anchorElement = anchorRef.current;\n\n const {\n floatingStyles,\n placement: resolvedPlacement,\n isPositioned,\n middlewareData,\n } = useFloating({\n placement: getFloatingPlacement(parsedPlacement),\n // Disable autoUpdate and element refs in non-browser environments (e.g. jsdom) to avoid\n // flushSync act() warnings from @floating-ui/react-dom (positioning is not meaningful in jsdom anyway).\n ...(IS_BROWSER\n ? {\n whileElementsMounted: autoUpdate,\n elements: { reference: anchorElement, floating: popperElement },\n }\n : {}),\n middleware,\n });\n\n const position = resolvedPlacement ?? placement;\n\n // Compute arrow styles from middleware data\n const arrowStyles = useMemo(\n (): React.CSSProperties | undefined => computeArrowStyles(middlewareData.arrow),\n [middlewareData.arrow],\n );\n\n // Merge floating styles with user-provided styles and zIndex\n const popoverStyle = useMemo((): React.CSSProperties => {\n return { ...style, ...floatingStyles, zIndex };\n }, [style, floatingStyles, zIndex]);\n\n return {\n styles: { arrow: arrowStyles, popover: popoverStyle },\n isPositioned,\n position: position as Placement,\n setArrowElement,\n setPopperElement,\n popperElement,\n };\n}\n","import { ReactNode, RefObject, useRef } from 'react';\n\nimport { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';\nimport { useFocus } from '@lumx/react/hooks/useFocus';\nimport { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';\nimport { DOCUMENT } from '@lumx/react/constants';\nimport { Comp, GenericProps } from '@lumx/react/utils/type';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useFocusTrap } from '@lumx/react/hooks/useFocusTrap';\nimport { skipRender } from '@lumx/react/utils/react/skipRender';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport { ThemeProvider } from '@lumx/react/utils/theme/ThemeContext';\nimport { Portal } from '@lumx/react/utils';\nimport {\n Popover as PopoverUI,\n type PopoverProps as CorePopoverProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Popover';\nimport type { PopoverSizes } from '@lumx/core/js/components/Popover/types';\nimport { useRestoreFocusOnClose } from '@lumx/react/hooks/useRestoreFocusOnClose';\nimport { usePopoverStyle } from './usePopoverStyle';\n\n/**\n * Defines the props of the component.\n * Extends core PopoverProps, overriding ref-typed props with React-specific `RefObject` types\n * and replacing `handleClose` with the React-idiomatic `onClose` callback.\n */\nexport interface PopoverProps\n extends GenericProps,\n ReactToJSX<\n CorePopoverProps,\n 'anchorRef' | 'as' | 'boundaryRef' | 'focusElement' | 'parentElement' | 'focusTrapZoneElement' | 'className'\n >,\n PopoverSizes {\n /** Reference to the DOM element used to set the position of the popover. */\n anchorRef: RefObject<HTMLElement>;\n /** Customize the root element. (Must accept ref forwarding and props forwarding!). */\n as?: React.ElementType;\n /** Element which will act as boundary when opening the popover. */\n boundaryRef?: RefObject<HTMLElement>;\n /** Content. */\n children: ReactNode;\n /** Element to focus when opening the popover. */\n focusElement?: RefObject<HTMLElement>;\n /** Reference to the parent element that triggered the popover (will get back focus on close or else fallback on the anchor element). */\n parentElement?: RefObject<HTMLElement>;\n /** Whether the popover should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */\n usePortal?: boolean;\n /** The element in which the focus trap should be set. Default to popover. */\n focusTrapZoneElement?: RefObject<HTMLElement>;\n /** On close callback (on click away or Escape pressed). */\n onClose?(): void;\n}\n\n// Inner component (must be wrapped before export)\nconst _InnerPopover = forwardRef<PopoverProps, HTMLDivElement>((props, ref) => {\n const {\n anchorRef,\n as,\n children,\n className,\n closeMode = DEFAULT_PROPS.closeMode,\n closeOnClickAway,\n closeOnEscape,\n elevation = DEFAULT_PROPS.elevation,\n focusElement,\n hasArrow,\n isOpen,\n onClose,\n parentElement,\n usePortal = DEFAULT_PROPS.usePortal,\n focusAnchorOnClose = DEFAULT_PROPS.focusAnchorOnClose,\n withFocusTrap,\n boundaryRef,\n fitToAnchorWidth,\n fitWithinViewportHeight,\n focusTrapZoneElement,\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n offset,\n placement = DEFAULT_PROPS.placement,\n style,\n theme,\n zIndex = DEFAULT_PROPS.zIndex,\n ...forwardedProps\n } = props;\n\n const popoverRef = useRef<HTMLDivElement>(null);\n\n const { styles, isPositioned, position, setArrowElement, setPopperElement, popperElement } = usePopoverStyle({\n offset,\n hasArrow,\n fitToAnchorWidth,\n fitWithinViewportHeight,\n width,\n minWidth,\n maxWidth,\n height,\n minHeight,\n maxHeight,\n boundaryRef,\n anchorRef,\n placement,\n style,\n zIndex,\n });\n\n const unmountSentinel = useRestoreFocusOnClose(\n { focusAnchorOnClose, anchorRef, parentElement },\n popperElement,\n isOpen,\n );\n const focusZoneElement = focusTrapZoneElement?.current || popoverRef?.current;\n\n useCallbackOnEscape(onClose, isOpen && closeOnEscape);\n\n /** Only set focus within if the focus trap is disabled as they interfere with one another. */\n useFocus(focusElement?.current, !withFocusTrap && isOpen && isPositioned);\n useFocusTrap(withFocusTrap && isOpen && focusZoneElement, focusElement?.current);\n\n const clickAwayRefs = useRef([popoverRef, anchorRef]);\n const mergedRefs = useMergeRefs<HTMLDivElement>(setPopperElement, ref, popoverRef);\n\n return PopoverUI(\n {\n ...forwardedProps,\n as: as as string,\n children,\n className,\n closeMode,\n elevation,\n hasArrow,\n isOpen,\n position,\n popoverStyle: styles.popover,\n arrowStyle: styles.arrow,\n theme,\n ref: mergedRefs,\n arrowRef: setArrowElement,\n usePortal,\n clickAwayCallback: closeOnClickAway && onClose,\n clickAwayRefs,\n unmountSentinel,\n },\n { Portal, ClickAwayProvider, ThemeProvider },\n );\n});\n_InnerPopover.displayName = COMPONENT_NAME;\n\n/**\n * Popover component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Popover = skipRender(\n // Skip render in SSR\n () => Boolean(DOCUMENT),\n _InnerPopover,\n) as Comp<PopoverProps, HTMLDivElement>;\nPopover.displayName = COMPONENT_NAME;\nPopover.className = CLASSNAME;\nPopover.defaultProps = DEFAULT_PROPS as Partial<PopoverProps>;\n","import { ReactNode, useEffect, useRef, useState } from 'react';\n\nimport {\n ComboboxOptionMoreInfo as UI,\n ComboboxOptionMoreInfoProps as UIProps,\n ComboboxOptionMoreInfoPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOptionMoreInfo';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { IconButton, IconButtonProps } from '@lumx/react/components/button';\nimport { Popover } from '@lumx/react/components/popover';\nimport { useComboboxOptionContext } from './context/ComboboxOptionContext';\nimport { useComboboxEvent } from './context/useComboboxEvent';\n\n/**\n * Props for Combobox.OptionMoreInfo component.\n */\nexport interface ComboboxOptionMoreInfoProps extends ReactToJSX<UIProps, ComboboxOptionMoreInfoPropsToOverride> {\n /** Content of the popover (additional details about the option). */\n children?: ReactNode;\n /** Callback when the popover opens or closes. */\n onToggle?(isOpen: boolean): void;\n /** Props forwarded to the IconButton. */\n buttonProps?: Partial<IconButtonProps>;\n}\n\n/**\n * Combobox.OptionMoreInfo component.\n *\n * Displays an info icon button on a combobox option that shows a popover with additional details.\n * The popover opens on mouse hover over the icon or when the parent option is keyboard-highlighted.\n *\n * Must be placed in the `after` slot of a `Combobox.Option`.\n *\n * Please consider using a simpler option `description` prop instead for better UX and a11y.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const ComboboxOptionMoreInfo = (props: ComboboxOptionMoreInfoProps) => {\n const { children, onToggle, buttonProps, ...forwardedProps } = props;\n const ref = useRef<HTMLButtonElement>(null);\n const [isHovered, setIsHovered] = useState(false);\n\n // Get the parent option ID from the option context (provided by Combobox.Option).\n const { optionId } = useComboboxOptionContext();\n\n // Subscribe to active descendant changes to detect keyboard highlight.\n const activeDescendantId = useComboboxEvent('activeDescendantChange', null);\n const isKeyboardHighlighted = activeDescendantId === optionId;\n\n // Open on mouse hover or keyboard highlight.\n const isOpen = isHovered || isKeyboardHighlighted;\n\n useEffect(() => {\n onToggle?.(isOpen);\n }, [isOpen, onToggle]);\n\n // Predictable ID convention: the parent ComboboxOption sets aria-describedby=\"${optionId}-more-info\"\n // on the role=\"option\" element. The Popover uses closeMode=\"hide\" to keep content in the DOM\n // so that screen readers can resolve the aria-describedby reference even when the popover is closed.\n const popoverId = `${optionId}-more-info`;\n\n return UI(\n {\n ...forwardedProps,\n ref,\n isOpen,\n popoverId,\n children,\n buttonProps,\n onMouseEnter: () => setIsHovered(true),\n onMouseLeave: () => setIsHovered(false),\n },\n { IconButton, Popover },\n );\n};\n\nComboboxOptionMoreInfo.displayName = COMPONENT_NAME;\nComboboxOptionMoreInfo.className = CLASSNAME;\n","import type { CSSProperties } from 'react';\nimport type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport type { ColorPalette, TypographyInterface } from '../../constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonTypographyProps extends HasTheme, HasClassName {\n /** Typography variant. */\n typography: TypographyInterface;\n /** Width CSS property. */\n width?: CSSProperties['width'];\n /** The color of the skeleton. */\n color?: ColorPalette;\n /** Reference to the root element. */\n ref?: CommonRef;\n /** Style object. */\n style?: CSSProperties;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SkeletonTypography';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-skeleton-typography';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SkeletonTypographyProps> = {};\n\n/**\n * SkeletonTypography component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const SkeletonTypography = (props: SkeletonTypographyProps) => {\n const { className, theme, typography, width, color, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`typography-${typography}`]: Boolean(typography),\n [`color-${color}`]: Boolean(color),\n }),\n )}\n style={{ ...forwardedProps.style, width }}\n >\n <div className={element('inner')} />\n </div>\n );\n};\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ListItem } from '../List/ListItem';\nimport { SkeletonTypography } from '../Skeleton/SkeletonTypography';\n\n/**\n * Defines the props for the core ComboboxOptionSkeleton template.\n */\nexport interface ComboboxOptionSkeletonProps extends HasClassName {\n /** Content rendered before the skeleton text (e.g. SkeletonCircle for avatar placeholders). */\n before?: JSXElement;\n /** Content rendered after the skeleton text. */\n after?: JSXElement;\n /** Show a secondary skeleton line (mirrors ComboboxOption's `description` prop). */\n hasDescription?: boolean;\n /** Override the default SkeletonTypography content entirely. */\n children?: JSXElement;\n /** ref to the root <li> element. */\n ref?: CommonRef;\n /**\n * Number of skeleton `<li>` elements to render.\n * Each is an independent element with `:nth-child` width cycling applied by SCSS.\n * @default 1\n */\n count?: number;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n * Used by `ReactToJSX<ComboboxOptionSkeletonProps, ComboboxOptionSkeletonPropsToOverride>`.\n */\nexport type ComboboxOptionSkeletonPropsToOverride = 'before' | 'after' | 'children';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOptionSkeleton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option-skeleton';\n\n/**\n * ComboboxOptionSkeleton core template.\n * Renders a skeleton placeholder `<li>` inside a combobox list, styled to match\n * option dimensions. Uses `role=\"none\"` so screen readers ignore it.\n *\n * Width variation across sibling skeletons is handled by SCSS `:nth-child` rules,\n * not by props — the component itself does not need a `width` prop.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxOptionSkeleton = (props: ComboboxOptionSkeletonProps) => {\n const { hasDescription, children, className, ref, count = 1, ...forwardedProps } = props;\n\n const itemProps = {\n ref,\n size: 'tiny' as const,\n role: 'none',\n ...forwardedProps,\n className: classNames.join(className, CLASSNAME),\n children:\n children ||\n ((\n <>\n <SkeletonTypography typography=\"body1\" theme=\"light\" />\n {hasDescription && <SkeletonTypography typography=\"caption\" theme=\"light\" />}\n </>\n ) as JSXElement),\n };\n\n return (\n <>\n {Array.from({ length: count }, (_, i) => (\n <ListItem key={i} {...itemProps} />\n ))}\n </>\n );\n};\n","import { ReactNode, useEffect } from 'react';\n\nimport { GenericProps } from '@lumx/core/js/types';\nimport {\n ComboboxOptionSkeleton as UI,\n ComboboxOptionSkeletonProps as UIProps,\n ComboboxOptionSkeletonPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOptionSkeleton';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { useComboboxContext } from './context/ComboboxContext';\n\n/**\n * Props for Combobox.OptionSkeleton component.\n */\nexport interface ComboboxOptionSkeletonProps\n extends GenericProps,\n ReactToJSX<UIProps, ComboboxOptionSkeletonPropsToOverride> {\n /** Content rendered before the skeleton text (e.g. SkeletonCircle for avatar placeholders). */\n before?: ReactNode;\n /** Content rendered after the skeleton text. */\n after?: ReactNode;\n /** Override the default SkeletonTypography content entirely. */\n children?: ReactNode;\n}\n\n/**\n * Combobox.OptionSkeleton component — renders skeleton placeholder(s) inside a combobox list.\n *\n * Registers once with the combobox handle on mount (regardless of `count`). The handle\n * fires `loadingChange` / `loadingAnnouncement` events, so consumers don't need an\n * explicit `isLoading` prop on `Combobox.List`.\n *\n * Width variation across skeletons is handled by SCSS `:nth-child` rules automatically.\n *\n * @example\n * ```tsx\n * // Basic — 3 plain skeletons\n * <Combobox.List aria-label=\"Users\">\n * {users.map(u => <Combobox.Option key={u.id} value={u.id}>{u.name}</Combobox.Option>)}\n * {isLoading && <Combobox.OptionSkeleton count={3} />}\n * </Combobox.List>\n *\n * // With avatar placeholder\n * {isLoading && <Combobox.OptionSkeleton count={3} before={<SkeletonCircle size=\"s\" />} />}\n * ```\n *\n * @param props Component props.\n * @return React element(s).\n */\nexport const ComboboxOptionSkeleton = (props: ComboboxOptionSkeletonProps) => {\n const { handle } = useComboboxContext();\n useEffect(() => handle?.registerSkeleton(), [handle]);\n\n return <UI {...props} />;\n};\n\nComboboxOptionSkeleton.displayName = COMPONENT_NAME;\nComboboxOptionSkeleton.className = CLASSNAME;\n","import { VHSize } from '../../utils/browser/css/types';\n\nexport const DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT: VHSize = '80vh';\n","import type { HasClassName, JSXElement, LumxClassName } from '../../types';\nimport type { PopoverProps } from '../Popover';\nimport type { PopoverSizes } from '../Popover/types';\nimport { classNames } from '../../utils';\nimport { DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT } from './constants';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxPopover';\n\n/**\n * Component default class name.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-popover';\nconst { block, element } = classNames.bem(CLASSNAME);\n\ntype InheritedPopoverProps = Pick<\n PopoverProps,\n 'closeOnClickAway' | 'closeOnEscape' | 'fitToAnchorWidth' | 'isOpen' | 'anchorRef' | 'placement' | 'handleClose'\n> &\n PopoverSizes;\n\n/**\n * Defines the props for the core ComboboxPopover template.\n */\nexport interface ComboboxPopoverProps extends HasClassName, InheritedPopoverProps {\n /** Content (should contain a ComboboxList). */\n children?: JSXElement;\n}\n\n/**\n * Injected framework-specific components for ComboboxPopover rendering.\n */\nexport interface ComboboxPopoverComponents {\n /** Popover component (framework-specific). */\n Popover: any;\n /** FlexBox component (framework-specific). */\n FlexBox: any;\n}\n\n/**\n * ComboboxPopover core template.\n * Renders a Popover with combobox-specific defaults (className, closeMode, closeOnClickAway, closeOnEscape).\n *\n * Framework-specific components (Popover) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxPopover = (props: ComboboxPopoverProps, { Popover, FlexBox }: ComboboxPopoverComponents) => {\n const {\n children,\n className,\n closeOnClickAway = true,\n closeOnEscape = false,\n fitToAnchorWidth = true,\n isOpen,\n maxHeight = DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT,\n placement = 'bottom-start',\n anchorRef,\n handleClose,\n ...forwardedProps\n } = props;\n\n return (\n <Popover\n {...forwardedProps}\n placement={placement}\n fitToAnchorWidth={fitToAnchorWidth}\n maxHeight={maxHeight}\n className={block([className])}\n anchorRef={anchorRef}\n isOpen={isOpen}\n onClose={handleClose}\n closeOnClickAway={closeOnClickAway}\n closeOnEscape={closeOnEscape}\n closeMode=\"hide\"\n >\n <FlexBox orientation=\"vertical\" className={element('scroll')}>\n {children}\n </FlexBox>\n </Popover>\n );\n};\n","import castArray from 'lodash/castArray';\n\nimport { Orientation } from '../../constants';\nimport { classNames } from '../../utils';\nimport type { LumxClassName, JSXElement, HasClassName, CommonRef } from '../../types';\nimport type { FlexHorizontalAlignment, FlexVerticalAlignment, GapSize, MarginAutoAlignment } from './types';\n\nexport type * from './types';\n\n/**\n * Defines the props of the component.\n */\nexport interface FlexBoxProps extends HasClassName {\n /** Children elements. */\n children?: JSXElement;\n /** Whether the \"content filling space\" is enabled or not. */\n fillSpace?: boolean;\n /** Gap space between flexbox items. */\n gap?: GapSize;\n /** Flex horizontal alignment. */\n hAlign?: FlexVerticalAlignment;\n /** Whether the \"auto margin\" is enabled all around or not. */\n marginAuto?: MarginAutoAlignment | MarginAutoAlignment[];\n /** Whether the \"content shrink\" is disabled or not. */\n noShrink?: boolean;\n /** Flex direction. */\n orientation?: Orientation;\n /** Flex vertical alignment. */\n vAlign?: FlexHorizontalAlignment;\n /** Whether the \"flex wrap\" is enabled or not. */\n wrap?: boolean;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'FlexBox';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-flex-box';\nexport const { block } = classNames.bem(CLASSNAME);\n\n/**\n * Get FlexBox component props (className computation).\n *\n * @param props Component props.\n * @return Computed props with className.\n */\nexport function getFlexBoxProps(props: FlexBoxProps) {\n const { className, fillSpace, gap, hAlign, marginAuto, noShrink, vAlign, wrap, orientation, ...forwardedProps } =\n props;\n\n const adjustedOrientation = orientation ?? (wrap || hAlign || vAlign ? Orientation.horizontal : null);\n\n return {\n ...forwardedProps,\n className: classNames.join(\n className,\n block({\n [`orientation-${adjustedOrientation}`]: Boolean(adjustedOrientation),\n [`v-align-${vAlign}`]: Boolean(vAlign),\n [`h-align-${hAlign}`]: Boolean(hAlign),\n [`gap-${gap}`]: Boolean(gap),\n wrap: Boolean(wrap),\n 'fill-space': fillSpace,\n 'no-shrink': noShrink,\n ...Object.fromEntries(\n castArray(marginAuto)\n .filter(Boolean)\n .map((align) => [`margin-auto-${align}`, true]),\n ),\n }),\n ),\n };\n}\n","import React from 'react';\n\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { getFlexBoxProps, FlexBoxProps as UIProps, CLASSNAME, COMPONENT_NAME } from '@lumx/core/js/components/FlexBox';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport type {\n MarginAutoAlignment,\n GapSize,\n FlexVerticalAlignment,\n FlexHorizontalAlignment,\n} from '@lumx/core/js/components/FlexBox';\n\n/**\n * Defines the props of the component.\n */\nexport interface FlexBoxProps extends GenericProps, ReactToJSX<UIProps> {\n /** Customize the root element. */\n as?: React.ElementType;\n}\n\n/**\n * FlexBox component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const FlexBox = forwardRef<FlexBoxProps, HTMLDivElement>((props, ref) => {\n const { as: Component = 'div', children, ...forwardedProps } = props;\n\n return (\n <Component ref={ref} {...getFlexBoxProps(forwardedProps)}>\n {children}\n </Component>\n );\n});\nFlexBox.displayName = COMPONENT_NAME;\nFlexBox.className = CLASSNAME;\n","import { ReactNode } from 'react';\n\nimport { ComboboxPopover as UI, COMPONENT_NAME, CLASSNAME } from '@lumx/core/js/components/Combobox/ComboboxPopover';\nimport { Popover, PopoverProps } from '@lumx/react/components/popover';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxOpen } from './context/useComboboxOpen';\nimport { FlexBox } from '../flex-box';\n\n/**\n * Props for Popover that can be passed to Combobox.Popover.\n * Excludes isOpen, anchorRef, children, and onClose which are managed internally.\n */\nexport type ComboboxPopoverProps = Partial<Omit<PopoverProps, 'isOpen' | 'anchorRef' | 'children' | 'onClose'>>;\n\n/**\n * Props for the Combobox.Popover component.\n */\nexport interface ComboboxPopoverComponentProps extends ComboboxPopoverProps {\n /** Content (should contain a Combobox.List). */\n children: ReactNode;\n}\n\n/**\n * Combobox.Popover component - renders a Popover connected to the combobox context.\n * Automatically binds to the combobox anchor element and open/close state.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const ComboboxPopover = (props: ComboboxPopoverComponentProps) => {\n const { anchorRef } = useComboboxContext();\n const [isOpen, setIsOpen] = useComboboxOpen();\n const { children, ...popoverProps } = props;\n\n return UI(\n {\n ...popoverProps,\n children,\n isOpen,\n anchorRef: anchorRef as React.RefObject<HTMLElement>,\n handleClose: () => setIsOpen(false),\n },\n { Popover, FlexBox },\n );\n};\n\nComboboxPopover.displayName = COMPONENT_NAME;\nComboboxPopover.className = CLASSNAME;\n","import { ReactNode, useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { ComboboxHandle } from '@lumx/core/js/components/Combobox/types';\nimport { useId } from '@lumx/react/hooks/useId';\n\nimport { ComboboxContext } from './context/ComboboxContext';\n\n/**\n * Defines the props of the component.\n */\nexport interface ComboboxProviderProps {\n /** Combobox content. */\n children?: ReactNode;\n /** Callback fired when the combobox open state changes. */\n onOpen?: (isOpen: boolean) => void;\n}\n\n/**\n * Combobox.Provider component.\n *\n * Provides shared context to sub-components. The vanilla JS combobox handle is\n * created by the trigger sub-component (Combobox.Input or Combobox.Button) on mount.\n *\n * @param props Component props.\n * @return React element.\n */\nexport function ComboboxProvider(props: ComboboxProviderProps) {\n const { children, onOpen } = props;\n const listboxId = useId();\n const anchorRef = useRef<HTMLElement>(null);\n const [handle, setHandle] = useState<ComboboxHandle | null>(null);\n const contextValue = useMemo(() => ({ handle, setHandle, listboxId, anchorRef }), [handle, listboxId]);\n\n // Subscribe to the combobox open event and forward to the onOpen callback.\n const onOpenRef = useRef(onOpen);\n onOpenRef.current = onOpen;\n useEffect(() => {\n if (!handle) return undefined;\n return handle.subscribe('open', (isOpen) => {\n onOpenRef.current?.(isOpen);\n });\n }, [handle]);\n\n return <ComboboxContext.Provider value={contextValue}>{children}</ComboboxContext.Provider>;\n}\n\nComboboxProvider.displayName = 'Combobox.Provider';\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props for the core ComboboxSection template.\n */\nexport interface ComboboxSectionProps extends HasClassName {\n /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */\n label?: string | JSXElement;\n /** Section icon */\n icon?: string;\n /** Section content (should be ComboboxOption elements). */\n children: JSXElement;\n /** ref to the root element. */\n ref?: CommonRef;\n /**\n * When true, the section renders as a bare `<li hidden>` wrapper, keeping children\n * mounted (so option registrations stay alive) but invisible to the user and screen readers.\n * Set automatically by the React/Vue wrapper when all child options are filtered out.\n */\n hidden?: boolean;\n /**\n * When true, the section is visually rendered (label + content) but hidden from assistive\n * technology. Used for skeleton-only sections: the visual skeleton provides feedback to\n * sighted users, while the live region (`ComboboxState`) handles the loading announcement.\n */\n 'aria-hidden'?: boolean;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n * Used by `ReactToJSX<ComboboxSectionProps, ComboboxSectionPropsToOverride>`.\n */\nexport type ComboboxSectionPropsToOverride = 'children';\n\n/**\n * Injected framework-specific components for ComboboxSection rendering.\n */\nexport interface ComboboxSectionComponents {\n /** ListSection component (framework-specific). */\n ListSection: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxSection';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-section';\n\n/**\n * ComboboxSection core template.\n * Renders a ListSection with combobox-specific ARIA roles.\n *\n * Framework-specific components (ListSection) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxSection = (props: ComboboxSectionProps, { ListSection }: ComboboxSectionComponents) => {\n const { children, className, hidden, 'aria-hidden': ariaHidden, ...forwardedProps } = props;\n return (\n <ListSection\n {...forwardedProps}\n hidden={hidden}\n aria-hidden={ariaHidden || undefined}\n className={!hidden ? classNames.join(className, CLASSNAME) : undefined}\n role={!ariaHidden ? 'none' : undefined}\n itemsWrapperProps={{ role: 'group' }}\n >\n {children}\n </ListSection>\n );\n};\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { TextProps } from '../Text';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListSectionProps extends HasClassName {\n /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */\n label?: string | JSXElement;\n /** Section icon */\n icon?: string;\n /** List items (should be ListItem, ListDivider, etc.). */\n children: JSXElement;\n /** Items wrapper forwarded props */\n itemsWrapperProps?: Record<string, any>;\n /** ID for the label element (used for aria-labelledby). */\n id: string;\n /** ref to the root element */\n ref?: CommonRef;\n /** Text component to use for rendering the label */\n Text: (props: TextProps & Record<string, any>) => any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListSection';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list-section';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListSectionProps> = {};\n\n/**\n * ListSection component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ListSection = (props: ListSectionProps) => {\n const { children, className, label, icon, itemsWrapperProps, id, ref, Text, ...forwardedProps } = props;\n const labelId = `${id}-label`;\n const hasHeader = !!label;\n\n return (\n <li ref={ref} {...forwardedProps} className={classNames.join(className, block())}>\n {hasHeader && (\n <Text as=\"p\" typography=\"overline\" className={element('title')} id={labelId}>\n {icon && Icon({ icon })}\n {label}\n </Text>\n )}\n <ul {...itemsWrapperProps} className={element('items')} aria-labelledby={hasHeader ? labelId : undefined}>\n {children}\n </ul>\n </li>\n );\n};\n\nListSection.displayName = COMPONENT_NAME;\nListSection.className = CLASSNAME;\nListSection.defaultProps = DEFAULT_PROPS;\n","import { ReactNode } from 'react';\n\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ListSection as UI,\n ListSectionProps as UIProps,\n} from '@lumx/core/js/components/List/ListSection';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useId } from '@lumx/react/hooks/useId';\n\nimport { Text } from '../text';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListSectionProps extends GenericProps, ReactToJSX<UIProps, 'children' | 'id' | 'Text'> {\n /** Section content */\n children: ReactNode;\n}\n\n/**\n * ListSection component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ListSection = forwardRef<ListSectionProps, HTMLLIElement>((props, ref) => {\n const id = useId();\n return UI({ ...props, ref, id, Text });\n});\n\nListSection.displayName = COMPONENT_NAME;\nListSection.className = CLASSNAME;\nListSection.defaultProps = DEFAULT_PROPS;\n","import { Children, ReactNode, useEffect, useRef, useState } from 'react';\n\nimport {\n ComboboxSection as UI,\n ComboboxSectionProps as UIProps,\n ComboboxSectionPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxSection';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { ListSection } from '../list/ListSection';\nimport { useComboboxContext } from './context/ComboboxContext';\n\n/**\n * Props for Combobox.Section component.\n */\nexport interface ComboboxSectionProps extends GenericProps, ReactToJSX<UIProps, ComboboxSectionPropsToOverride> {\n /** Section content (should be Combobox.Option elements). */\n children: ReactNode;\n}\n\n/**\n * Combobox.Section component - groups Combobox.Option items under a labelled section.\n * Delegates rendering to the core ComboboxSection template, injecting the React ListSection.\n *\n * Returns null when children is empty so the section header is not rendered as an orphan.\n *\n * When filter=\"auto\" is active, the section registers itself with the combobox handle.\n * The handle monitors registered options within this section and notifies when all\n * are filtered out. When hidden, the core template renders a bare `<li hidden>` wrapper\n * so children (options) stay mounted and registered.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ComboboxSection = forwardRef<ComboboxSectionProps, HTMLLIElement>((props, ref) => {\n const { handle } = useComboboxContext();\n const internalRef = useRef<HTMLLIElement>(null);\n const mergedRef = useMergeRefs(ref, internalRef);\n const [sectionState, setSectionState] = useState({ hidden: false, 'aria-hidden': false });\n\n // Register with the combobox handle for section state notifications.\n useEffect(() => {\n const element = internalRef.current;\n if (!element || !handle) return undefined;\n return handle.registerSection(element, setSectionState);\n }, [handle]);\n\n if (Children.count(props.children) === 0) return null;\n\n return UI(\n {\n ...props,\n ref: mergedRef,\n hidden: sectionState.hidden,\n 'aria-hidden': sectionState['aria-hidden'] || undefined,\n },\n { ListSection },\n );\n});\n\nComboboxSection.displayName = COMPONENT_NAME;\nComboboxSection.className = CLASSNAME;\n","import type { LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport type { TextProps } from '../Text';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxState';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-state';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props for the core ComboboxState template.\n */\nexport interface ComboboxStateProps {\n /**\n * Message to display when the list has no visible options.\n * Can be a plain string or a function receiving the current input value (for dynamic messages).\n * When omitted, the empty state is not shown.\n */\n emptyMessage?: string | ((inputValue: string) => string);\n /**\n * Message callback to display the number of available options.\n * Called with the current visible option count and should return a human-readable string\n * (e.g. `(n) => \\`${n} result(s) available\\``).\n * Displayed when the combobox is open, not empty, not loading, and not in error.\n * When omitted, no option count message is shown.\n */\n nbOptionMessage?: (optionsLength: number) => string;\n /**\n * Error state title message.\n * When provided, the error state is active (takes priority over the empty state).\n * When omitted, the error state is not shown.\n */\n errorMessage?: string;\n /**\n * Secondary error message (e.g. \"Please try again\").\n * Only rendered when `errorMessage` is provided.\n */\n errorTryReloadMessage?: string;\n /**\n * Message to announce when loading persists (after a 500ms debounce).\n * When omitted, no loading announcement is made.\n */\n loadingMessage?: string;\n /**\n * List state\n */\n state?: {\n /**\n * The number of currently visible options.\n * Driven by the framework wrapper via the combobox handle's `optionsChange` event.\n */\n optionsLength?: number;\n /**\n * The current value of the combobox input.\n * Passed to `emptyMessage` when it is a function.\n */\n inputValue?: string;\n /**\n * Whether loading is active (immediate, from `loadingChange` event).\n * Used to suppress false \"empty\" state while data is loading.\n */\n isLoading?: boolean;\n /**\n * Whether the combobox popover is open.\n * Used to gate live region content so screen readers announce messages\n * when the popover opens (content insertion triggers `aria-live` announcement).\n */\n isOpen?: boolean;\n };\n}\n\n/**\n * Components injected by the framework wrapper (dependency injection).\n */\nexport interface ComboboxStateComponents {\n /**\n * GenericBlock component (framework-specific, e.g. React GenericBlock with FlexBox handling).\n */\n GenericBlock: any;\n /**\n * Text component (framework-specific, e.g. React Text or Vue Text).\n */\n Text: (props: TextProps) => any;\n}\n\n/**\n * ComboboxState core template.\n * Renders empty/error/option-count state messages inside the combobox popover.\n * The block itself acts as a screen reader live region (`role=\"status\" aria-live=\"polite\"`).\n *\n * Activation rules:\n * - Error state: active when `errorMessage` is provided (presence-based).\n * - Empty state: active when `optionsLength` is 0 and `emptyMessage` is provided, and there is no error.\n * - Option count: active when `nbOptionMessage` is provided, the list is not empty, not loading, and not in error.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element or null when no state is active.\n */\nexport const ComboboxState = (props: ComboboxStateProps, { GenericBlock, Text }: ComboboxStateComponents) => {\n const { emptyMessage, nbOptionMessage, errorMessage, errorTryReloadMessage, loadingMessage, state } = props;\n const isOpen = state?.isOpen ?? true;\n const optionsLength = state?.optionsLength ?? 0;\n const isEmpty = optionsLength === 0;\n const showError = !!errorMessage;\n const resolvedEmptyMessage =\n typeof emptyMessage === 'function' ? emptyMessage(state?.inputValue || '') : emptyMessage;\n // Suppress empty while loading (immediate flag prevents false \"no results\" before data arrives)\n const showEmpty = isEmpty && !showError && !state?.isLoading && !!resolvedEmptyMessage;\n // Show loading message when provided and not in error state.\n // The framework wrapper gates `loadingMessage` via the debounced `loadingAnnouncement` event,\n // passing `undefined` until the 500ms threshold is reached.\n const showLoading = !showError && !!loadingMessage;\n // Show option count message when the list is open, not empty, not loading, and not in error.\n const resolvedNbOptionMessage =\n !isEmpty && !showError && !state?.isLoading && nbOptionMessage ? nbOptionMessage(optionsLength) : undefined;\n const show = showEmpty || showError;\n const alignProps = { hAlign: 'center', vAlign: 'center' };\n\n // Gate message content behind isOpen so that content is *inserted* into the\n // aria-live region when the popover opens, triggering screen reader announcements.\n // Without this gate, content is already present (just hidden via display:none from\n // the popover's closeMode=\"hide\") and revealing it doesn't trigger announcements.\n const renderContent = isOpen;\n\n return (\n <GenericBlock\n className={classNames.join(!show && classNames.visuallyHidden(), block(), classNames.padding('regular'))}\n orientation=\"vertical\"\n {...alignProps}\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic\n >\n {renderContent && showEmpty && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {resolvedEmptyMessage}\n </Text>\n )}\n {renderContent && showLoading && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {loadingMessage}\n </Text>\n )}\n {renderContent && !!resolvedNbOptionMessage && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {resolvedNbOptionMessage}\n </Text>\n )}\n {renderContent && !!errorMessage && (\n <>\n <Text as=\"p\" typography=\"subtitle2\">\n {errorMessage}\n </Text>\n {errorTryReloadMessage && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {errorTryReloadMessage}\n </Text>\n )}\n </>\n )}\n </GenericBlock>\n );\n};\n","import type { ComboboxHandle } from './types';\n\n/**\n * Delay before inserting content into the aria-live region after the popover opens (ms).\n *\n * The popover uses `closeMode=\"hide\"` (`display:none` when closed), so the live region\n * container is not in the accessibility tree until the popover becomes visible.\n * Screen readers only detect content *changes* in live regions that are already visible.\n * This delay ensures the popover's `display:none` is removed and the accessibility tree\n * is updated before content is inserted, so screen readers reliably announce it.\n */\nconst OPEN_ANNOUNCEMENT_DELAY = 100;\n\n/** Setters invoked by `subscribeComboboxState` when handle events fire. */\nexport interface ComboboxStateSetters {\n /** Called immediately with the current loading state, then on every `loadingChange` event. */\n setIsLoading: (value: boolean) => void;\n /** Called on every `loadingAnnouncement` event (debounced 500ms after skeletons mount). */\n setShouldAnnounce: (value: boolean) => void;\n /** Called with `true` after a short delay when the combobox opens, and `false` immediately on close. */\n setIsOpen: (value: boolean) => void;\n}\n\n/**\n * Subscribe to the combobox handle events needed by `ComboboxState`.\n *\n * Manages three subscriptions:\n * - `loadingChange` → `setIsLoading` (+ synchronous initial read of `handle.isLoading`)\n * - `loadingAnnouncement` → `setShouldAnnounce`\n * - `open` → `setIsOpen` (deferred by {@link OPEN_ANNOUNCEMENT_DELAY}ms on open, immediate on close)\n *\n * @param handle The combobox handle to subscribe to.\n * @param setters Framework-specific state setters.\n * @returns A cleanup function that unsubscribes all events and clears timers.\n */\nexport function subscribeComboboxState(handle: ComboboxHandle, setters: ComboboxStateSetters): () => void {\n const { setIsLoading, setShouldAnnounce, setIsOpen } = setters;\n\n // Read current loading state synchronously\n setIsLoading(handle.isLoading);\n\n const unsubLoadingChange = handle.subscribe('loadingChange', setIsLoading);\n const unsubLoadingAnnouncement = handle.subscribe('loadingAnnouncement', setShouldAnnounce);\n\n let openTimer: ReturnType<typeof setTimeout> | undefined;\n const unsubOpen = handle.subscribe('open', (open) => {\n clearTimeout(openTimer);\n if (open) {\n // Delay content insertion so the popover is visible in the\n // accessibility tree before the live region content changes.\n openTimer = setTimeout(() => setIsOpen(true), OPEN_ANNOUNCEMENT_DELAY);\n } else {\n // Reset immediately on close\n setIsOpen(false);\n }\n });\n\n return () => {\n unsubLoadingChange();\n unsubLoadingAnnouncement();\n unsubOpen();\n clearTimeout(openTimer);\n };\n}\n","import concat from 'lodash/concat';\nimport dropRight from 'lodash/dropRight';\nimport last from 'lodash/last';\nimport partition from 'lodash/partition';\nimport reduce from 'lodash/reduce';\n\nimport { Predicate } from '@lumx/core/js/types';\n\n/**\n * Similar to lodash `partition` function but working with multiple predicates.\n *\n * @example\n * const isString = (s) => typeof s === 'string'\n * const isNumber = (s) => typeof s === 'number'\n * const [strings, numbers, others] = partitionMulti(['a', 1, 'b', false], [isString, isNumber])\n * //=> [['a', 'b'], [1], [false]]\n *\n * @param elements array of elements\n * @param predicates array of predicates to apply on elements\n * @return partitioned elements by the given predicates\n */\nexport function partitionMulti<T>(elements: T[], predicates: Array<Predicate<T>>): T[][] {\n return reduce(\n predicates,\n (partitioned: T[][], predicate: Predicate<T>) =>\n concat(dropRight(partitioned), partition(last(partitioned), predicate)),\n [elements],\n );\n}\n","import type { CommonRef, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Orientation, Size } from '../../constants';\n\nimport { GenericBlockGapSize } from './constants';\nimport { FlexBoxProps } from '../FlexBox';\n\nexport interface GenericBlockProps extends FlexBoxProps {\n /**\n * Component to use as visual element.\n */\n figure?: JSXElement;\n /**\n * Main content.\n */\n content?: JSXElement;\n /**\n * Actions to set after the main content.\n */\n actions?: JSXElement;\n /**\n * Orientation of the 3 sections\n */\n orientation?: FlexBoxProps['orientation'];\n /**\n * Horizontal alignment.\n */\n horizontalAlign?: FlexBoxProps['hAlign'];\n /**\n * Vertical alignment.\n */\n verticalAlign?: FlexBoxProps['vAlign'];\n /**\n * The props to forward to the content.\n * By default, the content will have the same alignment as wrapper.\n */\n contentProps?: Omit<FlexBoxProps, 'children'>;\n /**\n * props to forward to the actions element.\n */\n actionsProps?: Omit<FlexBoxProps, 'children'>;\n /**\n * props to forward to the figure element.\n */\n figureProps?: Omit<FlexBoxProps, 'children'>;\n /**\n * FlexBox component\n */\n FlexBox: (props: FlexBoxProps) => any;\n /**\n * Gap space between sections.\n */\n gap?: GenericBlockGapSize;\n /**\n * reference to the root element\n */\n ref?: CommonRef;\n}\n\nexport interface GenericBlockSectionProps extends FlexBoxProps {\n /**\n * Gap space between items.\n */\n gap?: GenericBlockGapSize;\n}\n\nexport type GenericBlockPropsToOverride = 'FlexBox' | 'content';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'GenericBlock';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-generic-block';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<GenericBlockProps> = {\n gap: Size.big,\n orientation: Orientation.horizontal,\n};\n\n/**\n * The GenericBlock is a layout component made of 3 sections that can be\n * displayed either horizontally of vertically with the same gap between each section.\n *\n * The sections are:\n * - `Figure` => A visual element to display before the main content.\n * - `Content` => The main content displayed\n * - `Actions` => One or more actions to set after the element.\n *\n * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076\n */\nexport const GenericBlock = (props: GenericBlockProps) => {\n const {\n className,\n figure,\n figureProps,\n children,\n actions,\n actionsProps,\n gap = DEFAULT_PROPS.gap,\n ref,\n content,\n orientation = DEFAULT_PROPS.orientation,\n contentProps,\n FlexBox,\n ...forwardedProps\n } = props;\n\n return (\n <FlexBox\n ref={ref}\n className={classNames.join(className, block())}\n gap={gap}\n orientation={orientation}\n {...forwardedProps}\n >\n {figure && (\n <FlexBox {...figureProps} className={classNames.join(figureProps?.className, element('figure'))}>\n {figure}\n </FlexBox>\n )}\n\n {content && (\n <FlexBox\n orientation={Orientation.vertical}\n fillSpace\n {...contentProps}\n className={classNames.join(contentProps?.className, element('content'))}\n >\n {content}\n </FlexBox>\n )}\n\n {actions && (\n <FlexBox {...actionsProps} className={classNames.join(actionsProps?.className, element('actions'))}>\n {actions}\n </FlexBox>\n )}\n </FlexBox>\n );\n};\n","import React, { Children, ReactElement, ReactNode } from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\nimport noop from 'lodash/noop';\n\nimport { Comp, GenericProps, isComponentType } from '@lumx/react/utils/type';\nimport { classNames } from '@lumx/core/js/utils';\nimport { partitionMulti } from '@lumx/react/utils/partitionMulti';\nimport { FlexBox, FlexBoxProps } from '@lumx/react';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n GenericBlock as UI,\n GenericBlockProps as UIProps,\n GenericBlockPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n GenericBlockSectionProps as UISectionProps,\n} from '@lumx/core/js/components/GenericBlock';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface GenericBlockProps extends GenericProps, ReactToJSX<UIProps, GenericBlockPropsToOverride> {\n /**\n * Main content to display or sections components\n * ({@see GenericBlock.Figure}, {@see GenericBlock.Content} & {@see GenericBlock.Actions})\n */\n children: ReactNode;\n}\n\nexport interface GenericBlockSectionProps extends GenericProps, ReactToJSX<UISectionProps> {\n /** Customize the root element. */\n as?: React.ElementType;\n}\n\ntype BaseGenericBlock = Comp<GenericBlockProps, HTMLDivElement>;\n\ninterface GenericBlock extends BaseGenericBlock {\n /**\n * Use `GenericBlock.Figure` component as children of the `GenericBlock` component as an alternative way to inject\n * the \"figure\" section of the block (instead of using `figure` and `figureProps` props).\n */\n Figure: Comp<GenericBlockSectionProps>;\n /**\n * Use `GenericBlock.Content` component as children of the `GenericBlock` component as an alternative way to inject\n * the \"content\" section of the block (instead of using `content` and `contentProps` props).\n */\n Content: Comp<GenericBlockSectionProps>;\n /**\n * Use `GenericBlock.Actions` component as children of the `GenericBlock` component as an alternative way to inject\n * the \"actions\" section of the block (instead of using `actions` and `actionsProps` props).\n */\n Actions: Comp<GenericBlockSectionProps>;\n}\n\nconst Figure = noop.bind({}) as Comp<FlexBoxProps>;\nconst isFigure = isComponentType(Figure);\n\nconst Content = noop.bind({}) as Comp<FlexBoxProps>;\nconst isContent = isComponentType(Content);\n\nconst Actions = noop.bind({}) as Comp<FlexBoxProps>;\nconst isActions = isComponentType(Actions);\n\n/**\n * The GenericBlock is a layout component made of 3 sections that can be\n * displayed either horizontally of vertically with the same gap between each section.\n *\n * The sections are:\n * - `Figure` => A visual element to display before the main content.\n * - `Content` => The main content displayed\n * - `Actions` => One or more actions to set after the element.\n *\n * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076\n */\nconst BaseGenericBlock: BaseGenericBlock = forwardRef((props, ref) => {\n const { figure, figureProps, children, actions, actionsProps, contentProps, ...forwardedProps } = props;\n\n const sections = React.useMemo(() => {\n // Split children by section type\n const [[figureChild], [contentChild], [actionsChild], ...otherChildren] = partitionMulti(\n Children.toArray(children),\n [isFigure, isContent, isActions],\n );\n return {\n figureChild,\n figureChildProps: (figureChild as ReactElement)?.props,\n contentChild,\n contentChildProps: (contentChild as ReactElement)?.props,\n actionsChild,\n actionsChildProps: (actionsChild as ReactElement)?.props,\n otherChildren: otherChildren.filter((child) => !isEmpty(child)),\n };\n }, [children]);\n\n const alignProps = {\n vAlign: forwardedProps.vAlign,\n hAlign: forwardedProps.hAlign,\n };\n\n return UI({\n ...forwardedProps,\n ref,\n FlexBox,\n actionsProps: {\n ref: (sections.actionsChild as any)?.ref,\n ...alignProps,\n ...actionsProps,\n ...sections.actionsChildProps,\n className: classNames.join(actionsProps?.className, sections.actionsChildProps?.className),\n },\n actions:\n actions || sections.actionsChildProps?.children ? (\n <>\n {actions}\n {sections.actionsChildProps?.children}\n </>\n ) : undefined,\n contentProps: {\n ref: (sections.contentChild as any)?.ref,\n ...alignProps,\n ...contentProps,\n ...sections.contentChildProps,\n className: classNames.join(contentProps?.className, sections.contentChildProps?.className),\n },\n content:\n sections.contentChildProps?.children || sections.otherChildren.length > 0 ? (\n <>\n {sections.contentChildProps?.children}\n {sections.otherChildren}\n </>\n ) : undefined,\n figureProps: {\n ref: (sections.figureChild as any)?.ref,\n ...alignProps,\n ...figureProps,\n ...sections.figureChildProps,\n className: classNames.join(figureProps?.className, sections.figureChildProps?.className),\n },\n figure:\n figure || sections.figureChildProps?.children ? (\n <>\n {figure}\n {sections.figureChildProps?.children}\n </>\n ) : undefined,\n });\n});\n\nBaseGenericBlock.displayName = COMPONENT_NAME;\nBaseGenericBlock.className = CLASSNAME;\nBaseGenericBlock.defaultProps = DEFAULT_PROPS;\n\nexport const GenericBlock: GenericBlock = Object.assign(BaseGenericBlock, { Figure, Content, Actions });\n","import pick from 'lodash/pick';\nimport { Size } from '../../constants';\nimport { ValueOf } from '../../types';\n\n/**\n * Accepted gap sizes for the generic block.\n */\nexport const GenericBlockGapSize = pick(Size, ['tiny', 'regular', 'medium', 'big', 'huge']);\nexport type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;\n","import { ReactNode, useEffect, useState } from 'react';\n\nimport {\n ComboboxState as UI,\n ComboboxStateProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxState';\nimport { subscribeComboboxState } from '@lumx/core/js/components/Combobox/subscribeComboboxState';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { GenericBlock } from '../generic-block';\nimport { Text } from '../text';\nimport { useComboboxEvent } from './context/useComboboxEvent';\nimport { useComboboxContext } from './context/ComboboxContext';\n\n/**\n * Props for Combobox.State component.\n */\nexport interface ComboboxStateProps extends ReactToJSX<UIProps, 'state'> {\n /** Additional content rendered after the state message. */\n children?: ReactNode;\n}\n\n/**\n * Combobox.State component - displays empty and error states for the combobox list.\n *\n * Place this component as a sibling to `Combobox.List` inside a `Combobox.Popover`:\n *\n * ```tsx\n * <Combobox.Popover>\n * <Combobox.List aria-label=\"Options\">{options}</Combobox.List>\n * <Combobox.State\n * emptyMessage=\"No results\"\n * errorMessage={isError ? 'Service unavailable' : undefined}\n * errorTryReloadMessage=\"Please try again\"\n * />\n * </Combobox.Popover>\n * ```\n *\n * Activation rules (in priority order):\n * - **Error state**: active when `errorMessage` is provided (presence-based).\n * Takes priority over all other states.\n * - **Loading state**: active when `loadingMessage` is provided and skeletons have been\n * mounted for at least 500ms. Suppresses the empty state while loading.\n * - **Empty state**: active when `emptyMessage` is provided and the list has no visible options\n * and is not loading.\n * - **Option count**: active when `nbOptionMessage` is provided and the list is not empty,\n * not loading, and not in error.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const ComboboxState = (props: ComboboxStateProps) => {\n const { handle } = useComboboxContext();\n const optionsState = useComboboxEvent('optionsChange', undefined);\n\n const [isLoading, setIsLoading] = useState(false);\n const [shouldAnnounce, setShouldAnnounce] = useState(false);\n const [isOpen, setIsOpen] = useState(false);\n\n useEffect(() => {\n if (!handle) return undefined;\n return subscribeComboboxState(handle, { setIsLoading, setShouldAnnounce, setIsOpen });\n }, [handle]);\n\n const state = { ...optionsState, isLoading, isOpen };\n\n // Only pass loadingMessage to core after the 500ms debounce threshold\n const loadingMessage = shouldAnnounce ? props.loadingMessage : undefined;\n\n return UI({ ...props, loadingMessage, state }, { GenericBlock, Text });\n};\n\nComboboxState.displayName = COMPONENT_NAME;\nComboboxState.className = CLASSNAME;\n","import type { CommonRef, HasClassName, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListDividerProps extends HasClassName {\n /** ref to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListDivider';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list-divider';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListDividerProps> = {};\n\n/**\n * ListDivider component.\n * Purely decorative, consider a `ListSection` with label for a better list structure.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ListDivider = (props: ListDividerProps) => {\n const { className, ref, ...forwardedProps } = props;\n\n return <li ref={ref} role=\"none\" {...forwardedProps} className={classNames.join(className, CLASSNAME)} />;\n};\n\nListDivider.displayName = COMPONENT_NAME;\nListDivider.className = CLASSNAME;\nListDivider.defaultProps = DEFAULT_PROPS;\n","import { GenericProps } from '@lumx/react/utils/type';\nimport {\n ListDivider as UI,\n ListDividerProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/List/ListDivider';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport type ListDividerProps = GenericProps & ReactToJSX<UIProps>;\n\n/**\n * ListDivider component.\n * Purely decorative, consider a `ListSection` with label for a better list structure.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ListDivider = forwardRef<ListDividerProps, HTMLLIElement>((props, ref) => {\n return UI({ ...props, ref });\n});\nListDivider.displayName = COMPONENT_NAME;\nListDivider.className = CLASSNAME;\nListDivider.defaultProps = DEFAULT_PROPS;\n","import { ComboboxButton } from './ComboboxButton';\nimport { ComboboxInput } from './ComboboxInput';\nimport { ComboboxList } from './ComboboxList';\nimport { ComboboxOption } from './ComboboxOption';\nimport { ComboboxOptionAction } from './ComboboxOptionAction';\nimport { ComboboxOptionMoreInfo } from './ComboboxOptionMoreInfo';\nimport { ComboboxOptionSkeleton } from './ComboboxOptionSkeleton';\nimport { ComboboxPopover } from './ComboboxPopover';\nimport { ComboboxProvider } from './ComboboxProvider';\nimport { ComboboxSection } from './ComboboxSection';\nimport { ComboboxState } from './ComboboxState';\nimport { ListDivider } from '../list/ListDivider';\nimport { useComboboxEvent } from './context/useComboboxEvent';\n\nexport type { ComboboxProviderProps } from './ComboboxProvider';\nexport type { ComboboxListProps } from './ComboboxList';\nexport type { ComboboxPopoverProps, ComboboxPopoverComponentProps } from './ComboboxPopover';\nexport type { ComboboxButtonProps } from './ComboboxButton';\nexport type { ComboboxInputProps } from './ComboboxInput';\nexport type { ComboboxOptionProps } from './ComboboxOption';\nexport type { ComboboxOptionActionProps } from './ComboboxOptionAction';\nexport type { ComboboxOptionMoreInfoProps } from './ComboboxOptionMoreInfo';\nexport type { ComboboxOptionSkeletonProps } from './ComboboxOptionSkeleton';\nexport type { ComboboxSectionProps } from './ComboboxSection';\nexport type { ComboboxStateProps } from './ComboboxState';\n\n/**\n * Combobox compound component namespace.\n */\nexport const Combobox = {\n /** Provides shared combobox context (handle, listbox ID, anchor ref) to all sub-components. */\n Provider: ComboboxProvider,\n /** Button trigger for select-only combobox mode with keyboard navigation and typeahead. */\n Button: ComboboxButton,\n /** Text input trigger for autocomplete combobox mode with optional toggle button and filtering. */\n Input: ComboboxInput,\n /** Listbox container that registers with the combobox handle and tracks loading state. */\n List: ComboboxList,\n /** Selectable option item with filtering and keyboard navigation support. */\n Option: ComboboxOption,\n /** Secondary action button within a grid-mode option row, rendered as an independent gridcell. */\n OptionAction: ComboboxOptionAction,\n /** Info button on an option that shows a popover on hover or keyboard highlight. */\n OptionMoreInfo: ComboboxOptionMoreInfo,\n /** Loading placeholder skeleton(s) that auto-register loading state with the combobox handle. */\n OptionSkeleton: ComboboxOptionSkeleton,\n /** Floating popover container that auto-binds to the combobox anchor and open/close state. */\n Popover: ComboboxPopover,\n /** Labelled group of options that auto-hides when all its child options are filtered out. */\n Section: ComboboxSection,\n /** Displays empty, error, and loading state messages for the combobox list. */\n State: ComboboxState,\n /** Visual separator between option groups (alias for ListDivider). Purely decorative — invisible to screen readers. */\n Divider: ListDivider,\n /** Hook to subscribe to combobox events. Must be used within a Combobox.Provider. */\n useComboboxEvent,\n};\n","import { Children, ReactNode } from 'react';\n\nimport { Avatar, Size, Theme, Tooltip } from '@lumx/react';\nimport { GenericProps, HasTheme, ValueOf } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { AvatarProps } from '../avatar/Avatar';\n\n/**\n * Comment block variants.\n */\nexport const CommentBlockVariant = {\n indented: 'indented',\n linear: 'linear',\n} as const;\nexport type CommentBlockVariant = ValueOf<typeof CommentBlockVariant>;\n\n/**\n * Defines the props of the component.\n */\nexport interface CommentBlockProps extends GenericProps, HasTheme {\n /** Action toolbar content. */\n actions?: ReactNode;\n /** Props to pass to the avatar. */\n avatarProps: AvatarProps;\n /** Comment block replies. */\n children?: ReactNode;\n /** Comment date with the minimal timestamp information (xx minutes, x hours, yesterday, 6 days, Month Day, Month Day Year)*/\n date?: string;\n /** Comment date with the full timestamp information (day, month, year, time) */\n fullDate?: string;\n /** Whether the component has actions to display or not. */\n hasActions?: boolean;\n /** Action toolbar header content. */\n headerActions?: ReactNode;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Whether the comment is relevant or not. */\n isRelevant?: boolean;\n /** Comment author name. */\n name?: React.ReactNode;\n /**\n * On click callback.\n * @deprecated Use avatarProps instead and/or inject a clickable component in `name`\n */\n onClick?(): void;\n /**\n * On mouse enter callback.\n * @deprecated Use avatarProps instead and/or inject a clickable component in `name`\n */\n onMouseEnter?(): void;\n /**\n * On mouse leave callback.\n * @deprecated Use avatarProps instead and/or inject a clickable component in `name`\n */\n onMouseLeave?(): void;\n /** Comment content. */\n text: ReactNode | string;\n /** Comment variant. */\n variant?: CommentBlockVariant;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'CommentBlock';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-comment-block';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<CommentBlockProps> = {\n variant: CommentBlockVariant.indented,\n};\n\n/**\n * CommentBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const CommentBlock = forwardRef<CommentBlockProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n actions,\n avatarProps,\n children,\n className,\n date,\n fullDate,\n hasActions,\n headerActions,\n isOpen,\n isRelevant,\n name,\n onClick,\n onMouseEnter,\n onMouseLeave,\n text,\n theme = defaultTheme,\n variant = DEFAULT_PROPS.variant,\n ...forwardedProps\n } = props;\n const hasChildren = Children.count(children) > 0;\n\n return (\n <div\n ref={ref}\n className={classNames.join(\n className,\n block({\n 'has-children': hasChildren && isOpen,\n 'has-indented-children': hasChildren && variant === CommentBlockVariant.indented,\n 'has-linear-children': hasChildren && variant === CommentBlockVariant.linear,\n 'is-relevant': isRelevant,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n {...forwardedProps}\n >\n <div className={element('wrapper')}>\n <div className={element('avatar')}>\n <Avatar {...avatarProps} size={Size.m} onClick={onClick} />\n </div>\n\n <div className={element('container')}>\n <div className={element('content')}>\n <div className={element('meta')}>\n {name && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <span\n className={element('name')}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n {name}\n </span>\n )}\n {headerActions && <span className={element('header-actions')}>{headerActions}</span>}\n </div>\n\n <div className={element('text')}>{text}</div>\n {date &&\n (fullDate ? (\n <Tooltip label={fullDate} placement=\"top\">\n <span className={element('date')}>{date}</span>\n </Tooltip>\n ) : (\n <span className={element('date')}>{date}</span>\n ))}\n </div>\n {hasActions && <div className={element('actions')}>{actions}</div>}\n </div>\n </div>\n {hasChildren && isOpen && <div className={element('children')}>{children}</div>}\n </div>\n );\n});\nCommentBlock.displayName = COMPONENT_NAME;\nCommentBlock.className = CLASSNAME;\nCommentBlock.defaultProps = DEFAULT_PROPS;\n","/**\n * Add a number of months from a date while resetting the day to prevent month length mismatches.\n */\nexport function addMonthResetDay(date: Date, monthOffset: number) {\n const newDate = new Date(date.getTime());\n newDate.setDate(1);\n newDate.setMonth(date.getMonth() + monthOffset);\n return newDate;\n}\n","/**\n * Check if given date is valid.\n */\nexport const isDateValid = (date?: Date) => date instanceof Date && !Number.isNaN(date.getTime());\n","import type { LumxClassName } from '@lumx/core/js/types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'DatePicker';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-date-picker';\n","import { Locale } from '@lumx/react/utils/locale/types';\n\n/** Get first day of week for locale from the browser API */\nexport const getFromBrowser = (locale: Locale): number | undefined => {\n try {\n const localeMetadata = new Intl.Locale(locale.code) as any;\n const { firstDay } = localeMetadata.getWeekInfo?.() || localeMetadata.weekInfo;\n // Sunday is represented as `0` in Date.getDay()\n if (firstDay === 7) return 0;\n return firstDay;\n } catch (e) {\n return undefined;\n }\n};\n\n/** List first day for each locale (could be removed when all browser implement Locale weekInfo) */\nconst FIRST_DAY_FOR_LOCALES = [\n {\n // Locales with Sunday as the first day of the week\n localeRX: /^(af|ar-(dz|eg|sa)|bn|cy|en-(ca|us|za)|fr-ca|gd|he|hi|ja|km|ko|pt-br|te|th|ug|zh-hk)$/i,\n firstDay: 0,\n },\n {\n // Locales with Monday as the first day of the week\n localeRX:\n /^(ar-(ma|tn)|az|be|bg|bs|ca|cs|da|de|el|en-(au|gb|ie|in|nz)|eo|es|et|eu|fi|fr|fy|gl|gu|hr|ht|hu|hy|id|is|it|ka|kk|kn|lb|lt|lv|mk|mn|ms|mt|nb|nl|nn|oc|pl|pt|ro|ru|sk|sl|sq|sr|sv|ta|tr|uk|uz|vi|zh-(cn|tw))$/i,\n firstDay: 1,\n },\n {\n // Locales with Saturday as the first day of the week\n localeRX: /^(ar|fa-ir)$/i,\n firstDay: 6,\n },\n];\n\n/** Find first day of week for locale from the constant */\nconst getFromConstant = (locale: Locale, searchBy: keyof Locale = 'code'): number | undefined => {\n // Search for locale (lang + region)\n for (const { localeRX, firstDay } of FIRST_DAY_FOR_LOCALES) {\n if (localeRX.test(locale[searchBy] as string)) return firstDay;\n }\n // Fallback search for locale lang\n if (locale.code !== locale.language) {\n return getFromConstant(locale, 'language');\n }\n return undefined;\n};\n\n/**\n * Get first day of the week for the given locale code (language + region).\n */\nexport const getFirstDayOfWeek = (locale: Locale): number | undefined => {\n // Get from browser API\n const firstDay = getFromBrowser(locale);\n if (firstDay !== undefined) return firstDay;\n\n // Get from constant\n return getFromConstant(locale);\n};\n","import { Locale } from '@lumx/react/utils/locale/types';\nimport { getFirstDayOfWeek } from './getFirstDayOfWeek';\n\nexport type WeekDayInfo = { letter: string; number: number; long: string };\n\nexport const DAYS_PER_WEEK = 7;\n\n/**\n * List week days (based on locale) with the week day letter (ex: \"M\" for \"Monday\") and week day number\n * (0-based index starting on Sunday).\n */\nexport const getWeekDays = (locale: Locale): Array<WeekDayInfo> => {\n const iterDate = new Date();\n const firstDay = getFirstDayOfWeek(locale) ?? 1;\n\n // Go to start of the week\n const offset = firstDay - iterDate.getDay();\n iterDate.setDate(iterDate.getDate() + offset);\n\n // Iterate through the days of the week\n const weekDays: Array<WeekDayInfo> = [];\n for (let i = 0; i < DAYS_PER_WEEK; i++) {\n // Single letter week day (ex: \"M\" for \"Monday\", \"L\" for \"Lundi\", etc.)\n const letter = iterDate.toLocaleDateString(locale.code, { weekday: 'narrow' });\n // Weed day long notation\n const long = iterDate.toLocaleDateString(locale.code, { weekday: 'long' });\n // Day number (1-based index starting on Monday)\n const number = iterDate.getDay();\n\n weekDays.push({ letter, number, long });\n iterDate.setDate(iterDate.getDate() + 1);\n }\n return weekDays;\n};\n","import last from 'lodash/last';\n\nimport { getWeekDays, WeekDayInfo } from '@lumx/react/utils/date/getWeekDays';\nimport { Locale } from '@lumx/react/utils/locale/types';\n\ntype AnnotatedDay = { date: Date; isOutOfRange?: boolean };\ntype AnnotatedWeek = Partial<Record<number, AnnotatedDay>>;\n\ninterface MonthCalendar {\n weekDays: Array<WeekDayInfo>;\n weeks: Array<AnnotatedWeek>;\n}\n\n/** Up to 6 rows can appear in a month calendar => 4 weeks + 1 start of month partial week + 1 send of month partial week */\nconst MONTH_ROW_COUNT = 6;\n\n/**\n * Get month calendar.\n * A list of weeks with days indexed by week day number\n */\nexport const getMonthCalendar = (\n locale: Locale,\n referenceDate = new Date(),\n rangeMinDate?: Date,\n rangeMaxDate?: Date,\n): MonthCalendar => {\n const month = referenceDate.getMonth();\n const iterDate = new Date(referenceDate);\n iterDate.setDate(1);\n\n const minDate = rangeMinDate && new Date(rangeMinDate);\n const maxDate = rangeMaxDate && new Date(rangeMaxDate);\n // Reset time to compare dates only.\n iterDate.setUTCHours(0, 0, 0, 0);\n minDate?.setUTCHours(0, 0, 0, 0);\n maxDate?.setUTCHours(0, 0, 0, 0);\n\n const weekDays = getWeekDays(locale);\n const lastDayOfWeek = last(weekDays) as WeekDayInfo;\n\n const weeks: Array<AnnotatedWeek> = [];\n let week: AnnotatedWeek = {};\n let rowCount = 0;\n\n while (rowCount < MONTH_ROW_COUNT) {\n const weekDayNumber = iterDate.getDay();\n const day: AnnotatedDay = { date: new Date(iterDate.getTime()) };\n\n // If a range is specified, check if the day is out of range.\n // min and max date are included within the valid range.\n if ((minDate && iterDate < minDate) || (maxDate && iterDate > maxDate)) {\n day.isOutOfRange = true;\n }\n\n if (iterDate.getMonth() === month) {\n week[weekDayNumber] = day;\n }\n\n if (weekDayNumber === lastDayOfWeek.number) {\n weeks.push(week);\n rowCount += 1;\n week = {};\n }\n iterDate.setDate(iterDate.getDate() + 1);\n }\n if (Object.keys(week).length) weeks.push(week);\n\n return { weeks, weekDays };\n};\n","import { isDateValid } from '@lumx/react/utils/date/isDateValid';\n\n/**\n * Check `date1` is on the same day as `date2`.\n */\nexport const isSameDay = (date1: Date, date2: Date) =>\n isDateValid(date1) &&\n isDateValid(date2) &&\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate();\n","/**\n * Get current browser locale (BCP-47 string).\n *\n * Reads `navigator.languages[0]` (the user's preferred language) with a\n * fallback to `navigator.language`.\n */\nexport const getCurrentLocale = (): string => navigator.languages?.[0] || navigator.language;\n","import { Locale } from '@lumx/react/utils/locale/types';\n\n/**\n * Parse locale code\n * @example\n * parseLocale('EN') // => { code: 'en', language: 'en' }\n * parseLocale('en_us') // => { code: 'en-US', language: 'en', region: 'US' }\n * parseLocale('EN-US') // => { code: 'en-US', language: 'en', region: 'US' }\n */\nexport function parseLocale(locale: string): Locale | undefined {\n const [rawLanguage, rawRegion] = locale.split(/[-_]/);\n if (!rawLanguage) {\n return undefined;\n }\n const language = rawLanguage.toLowerCase();\n let region: string | undefined;\n let code = language;\n if (rawRegion) {\n region = rawRegion.toUpperCase();\n code += `-${region}`;\n }\n return { code, region, language };\n}\n","import React from 'react';\n/**\n * Returns the value from the previous render.\n */\nexport function usePreviousValue<V>(value: V): V | undefined {\n const prevValueRef = React.useRef<V>();\n const prevValue = prevValueRef.current;\n React.useEffect(() => {\n prevValueRef.current = value;\n }, [value]);\n return prevValue;\n}\n","export const getYearDisplayName = (locale: string) => {\n let label: string | undefined;\n try {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const displayNames = new Intl.DisplayNames(locale, { type: 'dateTimeField' });\n label = displayNames.of('year');\n } catch (error) {\n label = '';\n }\n return label;\n};\n","export function formatDayNumber(locale: string, date: Date): string {\n const formattedDate = date.toLocaleDateString(locale, { day: 'numeric' });\n if (formattedDate.match(/\\d/)) return formattedDate.replace(/\\D*(\\d+)\\D*/g, '$1');\n return formattedDate;\n}\n","import React, { KeyboardEventHandler } from 'react';\n\nimport {\n Button,\n DatePickerProps,\n Emphasis,\n FlexBox,\n IconButton,\n Text,\n TextField,\n TextFieldProps,\n Toolbar,\n} from '@lumx/react';\nimport { mdiChevronLeft, mdiChevronRight } from '@lumx/icons';\nimport { getMonthCalendar } from '@lumx/react/utils/date/getMonthCalendar';\nimport { isSameDay } from '@lumx/react/utils/date/isSameDay';\nimport { getCurrentLocale } from '@lumx/core/js/utils/locale/getCurrentLocale';\nimport { parseLocale } from '@lumx/react/utils/locale/parseLocale';\nimport { Locale } from '@lumx/react/utils/locale/types';\nimport { usePreviousValue } from '@lumx/react/hooks/usePreviousValue';\nimport { getYearDisplayName } from '@lumx/react/utils/date/getYearDisplayName';\nimport { classNames, onEnterPressed } from '@lumx/core/js/utils';\nimport { addMonthResetDay } from '@lumx/react/utils/date/addMonthResetDay';\nimport { formatDayNumber } from '@lumx/react/utils/date/formatDayNumber';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { CLASSNAME } from './constants';\n\nconst { element } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface DatePickerControlledProps extends DatePickerProps {\n /** Selected month to display. */\n selectedMonth: Date;\n /** On previous month change callback. */\n onPrevMonthChange(): void;\n /** On next month change callback. */\n onNextMonthChange(): void;\n /** On month/year change callback. */\n onMonthChange?: (newMonth: Date) => void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'DatePickerControlled';\n\n/**\n * DatePickerControlled component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const DatePickerControlled = forwardRef<DatePickerControlledProps, HTMLDivElement>((props, ref) => {\n const {\n locale = getCurrentLocale(),\n maxDate,\n minDate,\n nextButtonProps,\n onChange,\n onNextMonthChange,\n onPrevMonthChange,\n previousButtonProps,\n selectedMonth,\n todayOrSelectedDateRef,\n value,\n onMonthChange,\n style,\n } = props;\n const { weeks, weekDays } = React.useMemo(() => {\n const localeObj = parseLocale(locale) as Locale;\n return getMonthCalendar(localeObj, selectedMonth, minDate, maxDate);\n }, [locale, minDate, maxDate, selectedMonth]);\n\n const selectedYear = selectedMonth.getFullYear();\n const formattedYear = selectedMonth.toLocaleDateString(locale, { year: 'numeric' }).slice(0, 4);\n const [currentYear, setCurrentYear] = React.useState(String(selectedYear));\n\n // Updates month offset when validating year. Adds or removes 12 months per year when updating year value.\n const updateMonthOffset = React.useCallback(\n (newYearValue: string) => {\n const yearNumber = Number(newYearValue);\n if (yearNumber < 0 && yearNumber >= 9999) {\n return;\n }\n\n const previousYearNumber = selectedMonth.getFullYear();\n const offset = (yearNumber - previousYearNumber) * 12;\n onMonthChange?.(addMonthResetDay(selectedMonth, offset));\n },\n [selectedMonth, onMonthChange],\n );\n\n const onYearChange = React.useCallback<TextFieldProps['onChange']>(\n (newYearValue, _, event) => {\n setCurrentYear(newYearValue);\n\n // Detect if change is coming from the spin up/down arrows\n const inputType = (event?.nativeEvent as any)?.inputType;\n if (\n // Chrome/Safari\n !inputType ||\n // Firefox\n inputType === 'insertReplacementText'\n ) {\n updateMonthOffset(newYearValue);\n }\n },\n [updateMonthOffset],\n );\n\n const updateYear = React.useCallback(() => {\n updateMonthOffset(currentYear);\n }, [updateMonthOffset, currentYear]);\n\n const updateYearOnEnterPressed: KeyboardEventHandler = React.useMemo(\n () => onEnterPressed(updateYear),\n [updateYear],\n );\n\n const monthYear = selectedMonth.toLocaleDateString(locale, { year: 'numeric', month: 'long' });\n\n // Update current year when selected year changes\n React.useEffect(() => {\n setCurrentYear(String(selectedYear));\n }, [selectedYear]);\n\n const prevSelectedMonth = usePreviousValue(selectedMonth);\n const monthHasChanged = prevSelectedMonth && !isSameDay(selectedMonth, prevSelectedMonth);\n\n // Only set the aria-live after the month has changed otherwise it can get announced on mount when used in the popover dialog\n const [labelAriaLive, setLabelAriaLive] = React.useState<'polite'>();\n React.useEffect(() => {\n if (monthHasChanged) setLabelAriaLive('polite');\n }, [monthHasChanged]);\n\n const yearLabel = getYearDisplayName(locale);\n\n return (\n <div ref={ref} className={`${CLASSNAME}`} style={style}>\n <Toolbar\n className={element('toolbar')}\n after={\n <IconButton\n {...nextButtonProps}\n emphasis={Emphasis.low}\n icon={mdiChevronRight}\n onClick={onNextMonthChange}\n />\n }\n before={\n <IconButton\n {...previousButtonProps}\n emphasis={Emphasis.low}\n icon={mdiChevronLeft}\n onClick={onPrevMonthChange}\n />\n }\n label={\n <>\n <span\n aria-live={labelAriaLive}\n className={onMonthChange ? classNames.visuallyHidden() : undefined}\n dir=\"auto\"\n >\n {monthYear}\n </span>\n {onMonthChange && (\n <FlexBox\n className={element('month')}\n orientation=\"horizontal\"\n hAlign=\"center\"\n gap=\"regular\"\n vAlign=\"center\"\n dir=\"auto\"\n >\n {RegExp(`(.*)(${formattedYear})(.*)`)\n .exec(monthYear)\n ?.slice(1)\n .filter((part) => part !== '')\n .map((part) =>\n part === formattedYear ? (\n <TextField\n value={currentYear}\n aria-label={yearLabel}\n onChange={onYearChange}\n type=\"number\"\n max={9999}\n min={0}\n onBlur={updateYear}\n onKeyPress={updateYearOnEnterPressed}\n key=\"year\"\n className={element('year')}\n />\n ) : (\n <Text as=\"p\" key={part}>\n {part}\n </Text>\n ),\n )}\n </FlexBox>\n )}\n </>\n }\n />\n <div className={element('calendar')}>\n <div className={classNames.join(element('week-days'), element('days-wrapper'))}>\n {weekDays.map(({ letter, number, long }) => (\n <div key={number} className={element('day-wrapper')}>\n <span className={element('week-day')} aria-hidden>\n {letter.toLocaleUpperCase()}\n </span>\n <span className=\"visually-hidden\">{long}</span>\n </div>\n ))}\n </div>\n\n <div className={classNames.join(element('month-days'), element('days-wrapper'))}>\n {weeks.flatMap((week, weekIndex) => {\n return weekDays.map((weekDay, dayIndex) => {\n const { date, isOutOfRange } = week[weekDay.number] || {};\n const key = `${weekIndex}-${dayIndex}`;\n const isToday = !isOutOfRange && date && isSameDay(date, new Date());\n const isSelected = date && value && isSameDay(value, date);\n\n return (\n <div key={key} className={element('day-wrapper')}>\n {date && (\n <Button\n ref={isSelected || (!value && isToday) ? todayOrSelectedDateRef : null}\n className={element('month-day', {\n 'is-today': isToday,\n })}\n disabled={isOutOfRange}\n isSelected={isSelected}\n emphasis=\"low\"\n onClick={() => onChange(date)}\n >\n <span aria-hidden>{formatDayNumber(locale, date)}</span>\n <span className={classNames.visuallyHidden()}>\n {date.toLocaleDateString(locale, {\n day: 'numeric',\n month: 'long',\n year: 'numeric',\n })}\n </span>\n </Button>\n )}\n </div>\n );\n });\n })}\n </div>\n </div>\n </div>\n );\n});\nDatePickerControlled.displayName = COMPONENT_NAME;\nDatePickerControlled.className = CLASSNAME;\n","import { useState } from 'react';\n\nimport { addMonthResetDay } from '@lumx/react/utils/date/addMonthResetDay';\nimport { isDateValid } from '@lumx/react/utils/date/isDateValid';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { CLASSNAME, COMPONENT_NAME } from './constants';\nimport { DatePickerControlled } from './DatePickerControlled';\nimport { DatePickerProps } from './types';\n\n/**\n * DatePicker component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const DatePicker = forwardRef<DatePickerProps, HTMLDivElement>((props, ref) => {\n const { defaultMonth, locale, value, onChange, ...forwardedProps } = props;\n\n let referenceDate = value || defaultMonth || new Date();\n if (!isDateValid(referenceDate)) {\n // eslint-disable-next-line no-console\n console.warn(`[@lumx/react/DatePicker] Invalid date provided ${referenceDate}`);\n referenceDate = new Date();\n }\n\n const [selectedMonth, setSelectedMonth] = useState(referenceDate);\n const setPrevMonth = () => setSelectedMonth((current) => addMonthResetDay(current, -1));\n const setNextMonth = () => setSelectedMonth((current) => addMonthResetDay(current, +1));\n\n const onDatePickerChange = (newDate?: Date) => {\n onChange(newDate);\n };\n\n return (\n <DatePickerControlled\n ref={ref}\n {...forwardedProps}\n defaultMonth={defaultMonth}\n locale={locale}\n value={value}\n onPrevMonthChange={setPrevMonth}\n onNextMonthChange={setNextMonth}\n selectedMonth={selectedMonth}\n onChange={onDatePickerChange}\n onMonthChange={setSelectedMonth}\n />\n );\n});\nDatePicker.displayName = COMPONENT_NAME;\nDatePicker.className = CLASSNAME;\n","import { useCallback, useState } from 'react';\n\nexport const useBooleanState = (defaultValue: boolean): [boolean, () => void, () => void, () => void] => {\n const [booleanValue, setBoolean] = useState<boolean>(defaultValue);\n\n const setToFalse = useCallback(() => setBoolean(false), []);\n\n const setToTrue = useCallback(() => setBoolean(true), []);\n\n const toggleBoolean = useCallback(() => setBoolean((previousValue) => !previousValue), []);\n\n return [booleanValue, setToFalse, setToTrue, toggleBoolean];\n};\n","import React, { SyntheticEvent, useCallback, useRef } from 'react';\n\nimport { DatePicker, IconButtonProps, Placement, PopoverDialog, TextField, TextFieldProps } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { getCurrentLocale } from '@lumx/core/js/utils/locale/getCurrentLocale';\nimport { useBooleanState } from '@lumx/react/hooks/useBooleanState';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\n\n/**\n * Defines the props of the component.\n */\nexport interface DatePickerFieldProps extends Omit<TextFieldProps, 'value' | 'onChange'>, GenericProps {\n /** Default month. */\n defaultMonth?: Date;\n /** Locale (language or region) to use. */\n locale?: string;\n /** Date after which dates can't be selected. */\n maxDate?: Date;\n /** Date before which dates can't be selected. */\n minDate?: Date;\n /** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */\n nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */\n previousButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /** Currently selected date. */\n value: Date | undefined;\n /** On change callback. */\n onChange(value: Date | undefined, name?: string, event?: SyntheticEvent): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'DatePickerField';\n\n/**\n * DatePickerField component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const DatePickerField = forwardRef<DatePickerFieldProps, HTMLDivElement>((props, ref) => {\n const { disabledStateProps, otherProps } = useDisableStateProps(props);\n const {\n defaultMonth,\n locale = getCurrentLocale(),\n maxDate,\n minDate,\n name,\n nextButtonProps,\n onChange,\n previousButtonProps,\n value,\n ...forwardedProps\n } = otherProps;\n const anchorRef = useRef(null);\n\n const [isOpen, close, , toggleOpen] = useBooleanState(false);\n\n const handleKeyboardNav = useCallback(\n (evt: React.KeyboardEvent) => {\n if (evt.key === 'Enter' || evt.key === ' ') {\n toggleOpen();\n }\n },\n [toggleOpen],\n );\n const onTextFieldChange = useCallback(\n (textFieldValue: string, textFieldName?: string, event?: SyntheticEvent) => {\n if (!textFieldValue) {\n onChange(undefined, textFieldName, event);\n }\n },\n [onChange],\n );\n const onDatePickerChange = useCallback(\n (newDate?: Date) => {\n onChange(newDate, name);\n close();\n },\n [name, onChange, close],\n );\n\n // Format date for text field\n const textFieldValue = value?.toLocaleDateString(locale, { year: 'numeric', month: 'long', day: 'numeric' }) || '';\n\n const todayOrSelectedDateRef = React.useRef(null);\n\n return (\n <>\n <TextField\n ref={ref}\n {...forwardedProps}\n name={name}\n forceFocusStyle={isOpen}\n textFieldRef={anchorRef}\n value={textFieldValue}\n onClick={toggleOpen}\n onChange={onTextFieldChange}\n onKeyPress={handleKeyboardNav}\n {...disabledStateProps}\n readOnly\n aria-haspopup=\"dialog\"\n />\n {isOpen ? (\n <PopoverDialog\n // Can't use `aria-labelledby` targeting the text field label element (not correctly read on some screen readers)\n aria-label={forwardedProps.label}\n anchorRef={anchorRef}\n placement={Placement.BOTTOM_START}\n isOpen={isOpen}\n onClose={close}\n // On open, focus the selected day or today\n focusElement={todayOrSelectedDateRef}\n >\n <DatePicker\n locale={locale}\n maxDate={maxDate}\n minDate={minDate}\n value={value}\n todayOrSelectedDateRef={todayOrSelectedDateRef}\n onChange={onDatePickerChange}\n defaultMonth={defaultMonth}\n nextButtonProps={nextButtonProps}\n previousButtonProps={previousButtonProps}\n />\n </PopoverDialog>\n ) : null}\n </>\n );\n});\nDatePickerField.displayName = COMPONENT_NAME;\n","import { useEffect, useState } from 'react';\n\nexport type Intersections<T> = Map<T, IntersectionObserverEntry>;\n\n/**\n * Convenient hook to create interaction observers.\n *\n * @param elements Elements to observe.\n * @param options IntersectionObserver options.\n * @return Map of intersections.\n */\nexport function useIntersectionObserver<T extends Element>(\n elements: Array<T | null | undefined>,\n options?: IntersectionObserverInit,\n): Intersections<T> {\n const [intersections, setIntersections] = useState<Intersections<T>>(() => new Map());\n\n useEffect(\n () => {\n if (elements.length < 1 || !elements.some(Boolean)) {\n return undefined;\n }\n\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n intersections.set(entry.target as T, entry);\n }\n setIntersections(new Map(intersections));\n }, options);\n\n for (const element of elements) {\n if (element) {\n observer.observe(element);\n }\n }\n return () => observer.disconnect();\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [...elements],\n );\n\n return intersections;\n}\n","function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n// Older browsers don't support event options, feature detect it.\n\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nvar hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n var passiveTestOptions = {\n get passive() {\n hasPassiveEvents = true;\n return undefined;\n }\n };\n window.addEventListener('testPassive', null, passiveTestOptions);\n window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\nvar isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\nvar locks = [];\nvar documentListenerAdded = false;\nvar initialClientY = -1;\nvar previousBodyOverflowSetting = void 0;\nvar previousBodyPaddingRight = void 0;\n\n// returns true if `el` should be allowed to receive touchmove events.\nvar allowTouchMove = function allowTouchMove(el) {\n return locks.some(function (lock) {\n if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n return true;\n }\n\n return false;\n });\n};\n\nvar preventDefault = function preventDefault(rawEvent) {\n var e = rawEvent || window.event;\n\n // For the case whereby consumers adds a touchmove event listener to document.\n // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n // the touchmove event on document will break.\n if (allowTouchMove(e.target)) {\n return true;\n }\n\n // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n if (e.touches.length > 1) return true;\n\n if (e.preventDefault) e.preventDefault();\n\n return false;\n};\n\nvar setOverflowHidden = function setOverflowHidden(options) {\n // If previousBodyPaddingRight is already set, don't set it again.\n if (previousBodyPaddingRight === undefined) {\n var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n if (_reserveScrollBarGap && scrollBarGap > 0) {\n previousBodyPaddingRight = document.body.style.paddingRight;\n document.body.style.paddingRight = scrollBarGap + 'px';\n }\n }\n\n // If previousBodyOverflowSetting is already set, don't set it again.\n if (previousBodyOverflowSetting === undefined) {\n previousBodyOverflowSetting = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n }\n};\n\nvar restoreOverflowSetting = function restoreOverflowSetting() {\n if (previousBodyPaddingRight !== undefined) {\n document.body.style.paddingRight = previousBodyPaddingRight;\n\n // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n // can be set again.\n previousBodyPaddingRight = undefined;\n }\n\n if (previousBodyOverflowSetting !== undefined) {\n document.body.style.overflow = previousBodyOverflowSetting;\n\n // Restore previousBodyOverflowSetting to undefined\n // so setOverflowHidden knows it can be set again.\n previousBodyOverflowSetting = undefined;\n }\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nvar isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n};\n\nvar handleScroll = function handleScroll(event, targetElement) {\n var clientY = event.targetTouches[0].clientY - initialClientY;\n\n if (allowTouchMove(event.target)) {\n return false;\n }\n\n if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n // element is at the top of its scroll.\n return preventDefault(event);\n }\n\n if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n // element is at the bottom of its scroll.\n return preventDefault(event);\n }\n\n event.stopPropagation();\n return true;\n};\n\nexport var disableBodyScroll = function disableBodyScroll(targetElement, options) {\n // targetElement must be provided\n if (!targetElement) {\n // eslint-disable-next-line no-console\n console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n return;\n }\n\n // disableBodyScroll must not have been called on this targetElement before\n if (locks.some(function (lock) {\n return lock.targetElement === targetElement;\n })) {\n return;\n }\n\n var lock = {\n targetElement: targetElement,\n options: options || {}\n };\n\n locks = [].concat(_toConsumableArray(locks), [lock]);\n\n if (isIosDevice) {\n targetElement.ontouchstart = function (event) {\n if (event.targetTouches.length === 1) {\n // detect single touch.\n initialClientY = event.targetTouches[0].clientY;\n }\n };\n targetElement.ontouchmove = function (event) {\n if (event.targetTouches.length === 1) {\n // detect single touch.\n handleScroll(event, targetElement);\n }\n };\n\n if (!documentListenerAdded) {\n document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = true;\n }\n } else {\n setOverflowHidden(options);\n }\n};\n\nexport var clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n if (isIosDevice) {\n // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n locks.forEach(function (lock) {\n lock.targetElement.ontouchstart = null;\n lock.targetElement.ontouchmove = null;\n });\n\n if (documentListenerAdded) {\n document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = false;\n }\n\n // Reset initial clientY.\n initialClientY = -1;\n } else {\n restoreOverflowSetting();\n }\n\n locks = [];\n};\n\nexport var enableBodyScroll = function enableBodyScroll(targetElement) {\n if (!targetElement) {\n // eslint-disable-next-line no-console\n console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');\n return;\n }\n\n locks = locks.filter(function (lock) {\n return lock.targetElement !== targetElement;\n });\n\n if (isIosDevice) {\n targetElement.ontouchstart = null;\n targetElement.ontouchmove = null;\n\n if (documentListenerAdded && locks.length === 0) {\n document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n documentListenerAdded = false;\n }\n } else if (!locks.length) {\n restoreOverflowSetting();\n }\n};\n\n","import { useEffect } from 'react';\nimport { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';\nimport { Falsy } from '@lumx/react/utils/type';\n\n/**\n * Disables the scroll on the body to make it only usable in the current modal element.\n * When the modal element is not provided anymore, the scroll is restored.\n *\n * @param modalElement The modal element.\n */\nexport const useDisableBodyScroll = (modalElement: Element | Falsy): void => {\n useEffect(() => {\n if (!modalElement) {\n return undefined;\n }\n // Fixing the document overflow style to prevent a bug that scrolls the window to the top.\n const previousDocumentOverflow = document.documentElement.style.overflow;\n document.documentElement.style.overflow = 'visible';\n disableBodyScroll(modalElement);\n return () => {\n enableBodyScroll(modalElement);\n // Restore the previous overflow style.\n requestAnimationFrame(() => {\n document.documentElement.style.overflow = previousDocumentOverflow;\n });\n };\n }, [modalElement]);\n};\n","import { WINDOW } from '@lumx/react/constants';\n\n/** Check if user prefers reduced motion */\nexport function isReducedMotion() {\n return WINDOW?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;\n}\n","import { RefObject, useEffect, useRef, useState } from 'react';\nimport { isReducedMotion } from '@lumx/react/utils/browser/isReducedMotion';\n\n/**\n * Returns true if the component is visible tracking the opacity transition.\n *\n * @param ref Element on which to listen the transition event.\n * @param isComponentVisible Whether the component intends to be visible or not.\n * @param onVisibilityChange Callback called when the visibility changes.\n * @return true if the component should be rendered\n */\nexport const useTransitionVisibility = (\n ref: RefObject<HTMLElement>,\n isComponentVisible: boolean,\n timeout: number,\n onVisibilityChange?: (isVisible: boolean) => void,\n) => {\n const [isVisible, setVisible] = useState(isComponentVisible);\n const previousVisibility = useRef(isVisible);\n\n // On component visibility change.\n useEffect(() => {\n if (isComponentVisible) {\n setVisible(true);\n return undefined;\n }\n const { current: element } = ref;\n\n // Transition event is not supported or the user prefers reduced motion.\n // => Skip and set visibility to false directly.\n if (!element || !window.TransitionEvent || isReducedMotion()) {\n setVisible(false);\n return undefined;\n }\n\n const timer = setTimeout(() => setVisible(false), timeout);\n return () => clearTimeout(timer);\n }, [isComponentVisible, ref, timeout]);\n\n useEffect(() => {\n if (onVisibilityChange && previousVisibility.current !== isVisible) {\n onVisibilityChange(isVisible);\n previousVisibility.current = isVisible;\n }\n }, [isVisible, onVisibilityChange]);\n\n return isVisible || isComponentVisible;\n};\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName, GenericProps } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\nexport interface BaseDialogProps {\n /** Footer content. */\n footer?: JSXElement;\n /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */\n forceFooterDivider?: boolean;\n /** Header content. */\n header?: JSXElement;\n /** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */\n forceHeaderDivider?: boolean;\n /** Whether the indefinite progress indicator over the dialog content is displayed or not. */\n isLoading?: boolean;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n}\n\n/**\n * Defines the props of the component.\n */\nexport interface DialogProps extends HasClassName, BaseDialogProps {\n /** Reference to the root element. */\n ref?: CommonRef;\n /** Whether the component is still visible (e.g. during close animation). */\n isVisible?: boolean;\n /** Reference to the dialog content element. */\n contentRef?: CommonRef;\n /** Size variant. */\n size?: DialogSizes;\n /** Z-axis position. */\n zIndex?: number;\n /** Additional props for the dialog container element. */\n dialogProps?: GenericProps;\n /** On close callback. */\n handleClose?(): void;\n /** Whether to prevent closing on click away. */\n shouldPreventCloseOnClickAway?: boolean;\n /** Refs used for click-away detection. */\n clickAwayRefs?: any;\n /** Ref for the root wrapper element. */\n rootRef?: CommonRef;\n /** Ref for the inner section element. */\n wrapperRef?: CommonRef;\n /** Whether the header sentinel is out of view (controls header divider). */\n hasTopIntersection: boolean | null;\n /** Whether the footer sentinel is out of view (controls footer divider). */\n hasBottomIntersection: boolean | null;\n /** Props forwarded from a child <header> element. */\n headerChildProps?: GenericProps;\n /** Content extracted from a child <header> element. */\n headerChildContent?: JSXElement;\n /** Props forwarded from a child <footer> element. */\n footerChildProps?: GenericProps;\n /** Content extracted from a child <footer> element. */\n footerChildContent?: JSXElement;\n /** Dialog body content. */\n content?: JSXElement;\n /** Ref setter for the top scroll sentinel element. */\n setSentinelTop?: any;\n /** Ref setter for the bottom scroll sentinel element. */\n setSentinelBottom?: any;\n /** Portal component for rendering outside the DOM hierarchy. */\n Portal: any;\n /** HeadingLevelProvider component. */\n HeadingLevelProvider: any;\n /** ThemeProvider component. */\n ThemeProvider: any;\n /** ClickAwayProvider component. */\n ClickAwayProvider: any;\n /** ProgressCircular component */\n ProgressCircular: any;\n}\n\nexport type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Dialog';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-dialog';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<DialogProps> = {\n size: Size.big,\n};\n\n/**\n * Dialog component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Dialog = (props: DialogProps) => {\n const {\n className,\n ref,\n header,\n forceFooterDivider,\n forceHeaderDivider,\n footer,\n isLoading,\n isOpen,\n handleClose,\n contentRef,\n size = DEFAULT_PROPS.size,\n zIndex,\n dialogProps,\n headerChildContent,\n isVisible,\n Portal,\n HeadingLevelProvider,\n ThemeProvider,\n ClickAwayProvider,\n shouldPreventCloseOnClickAway,\n clickAwayRefs,\n rootRef,\n wrapperRef,\n hasTopIntersection,\n headerChildProps,\n setSentinelTop,\n content,\n setSentinelBottom,\n footerChildContent,\n footerChildProps,\n ProgressCircular,\n hasBottomIntersection,\n ...forwardedProps\n } = props;\n\n return (\n <Portal>\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-hidden': !isOpen,\n 'is-loading': isLoading,\n 'is-shown': isOpen || isVisible,\n [`size-${size}`]: Boolean(size),\n }),\n )}\n style={{ zIndex }}\n >\n <div className={element('overlay')} />\n\n <HeadingLevelProvider level={2}>\n <ThemeProvider value={undefined}>\n <div className={element('container')} role=\"dialog\" aria-modal=\"true\" {...dialogProps}>\n <ClickAwayProvider\n callback={!shouldPreventCloseOnClickAway && handleClose}\n childrenRefs={clickAwayRefs}\n parentRef={rootRef}\n >\n <section className={element('wrapper')} ref={wrapperRef}>\n {(header || headerChildContent) && (\n <header\n {...headerChildProps}\n className={classNames.join(\n element('header', {\n 'has-divider': Boolean(forceHeaderDivider || hasTopIntersection),\n }),\n headerChildProps?.className,\n )}\n >\n {header}\n {headerChildContent}\n </header>\n )}\n\n <div ref={contentRef} className={element('content')}>\n <div className={element('sentinel', { top: true })} ref={setSentinelTop} />\n\n {content}\n\n <div\n className={element('sentinel', { bottom: true })}\n ref={setSentinelBottom}\n />\n </div>\n\n {(footer || footerChildContent) && (\n <footer\n {...footerChildProps}\n className={classNames.join(\n element('footer', {\n 'has-divider': Boolean(forceFooterDivider || hasBottomIntersection),\n }),\n footerChildProps?.className,\n )}\n >\n {footer}\n {footerChildContent}\n </footer>\n )}\n\n {isLoading && (\n <div className={element('progress-overlay')}>\n <ProgressCircular />\n </div>\n )}\n </section>\n </ClickAwayProvider>\n </div>\n </ThemeProvider>\n </HeadingLevelProvider>\n </div>\n </Portal>\n );\n};\n","import React, { Children, ReactElement, Ref, RefObject, useMemo, useRef, useState } from 'react';\n\nimport { HeadingLevelProvider, ProgressCircular, Size } from '@lumx/react';\n\nimport { DIALOG_TRANSITION_DURATION, DOCUMENT } from '@lumx/react/constants';\nimport { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';\nimport { useFocusTrap } from '@lumx/react/hooks/useFocusTrap';\nimport { useIntersectionObserver } from '@lumx/react/hooks/useIntersectionObserver';\n\nimport { GenericProps, HasCloseMode, isComponent } from '@lumx/react/utils/type';\nimport { partitionMulti } from '@lumx/react/utils/partitionMulti';\nimport { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\n\nimport { useDisableBodyScroll } from '@lumx/react/hooks/useDisableBodyScroll';\nimport { useTransitionVisibility } from '@lumx/react/hooks/useTransitionVisibility';\nimport { ThemeProvider } from '@lumx/react/utils/theme/ThemeContext';\n\nimport { Portal } from '@lumx/react/utils';\nimport {\n Dialog as UI,\n CLASSNAME,\n COMPONENT_NAME,\n type DialogSizes,\n BaseDialogProps as UIProps,\n} from '@lumx/core/js/components/Dialog';\n\nexport type { DialogSizes } from '@lumx/core/js/components/Dialog';\n\n/**\n * Defines the props of the component.\n */\nexport interface DialogProps extends GenericProps, HasCloseMode, UIProps {\n /** Reference to the parent element that triggered modal opening (will get back focus on close). */\n parentElement?: RefObject<HTMLElement>;\n /** Reference to the dialog content element. */\n contentRef?: Ref<HTMLDivElement>;\n /** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */\n focusElement?: RefObject<HTMLElement>;\n /** Whether to keep the dialog open on clickaway or escape press. */\n preventAutoClose?: boolean;\n /** Whether to keep the dialog open on escape press. */\n preventCloseOnEscape?: boolean;\n /** Whether to keep the dialog open on clickaway. */\n preventCloseOnClick?: boolean;\n /** Size variant. */\n size?: DialogSizes;\n /** Z-axis position. */\n zIndex?: number;\n /** Z-axis position. */\n dialogProps?: GenericProps;\n /** On close callback. */\n onClose?(): void;\n /** Callback called when the open animation starts and the close animation finishes. */\n onVisibilityChange?(isVisible: boolean): void;\n /** whether to disable the scroll on the body or not */\n disableBodyScroll?: boolean;\n /** Children */\n children?: React.ReactNode;\n}\n\nconst isHeader = isComponent('header');\nconst isFooter = isComponent('footer');\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DialogProps> = {\n closeMode: 'unmount',\n size: Size.big,\n disableBodyScroll: true,\n};\n\n/**\n * Dialog component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Dialog = forwardRef<DialogProps, HTMLDivElement>((props, ref) => {\n if (!DOCUMENT) {\n // Can't render in SSR.\n return null;\n }\n\n const {\n children,\n className,\n closeMode = DEFAULT_PROPS.closeMode,\n header,\n focusElement,\n forceFooterDivider,\n forceHeaderDivider,\n footer,\n isLoading,\n isOpen,\n onClose,\n parentElement,\n contentRef,\n preventAutoClose,\n size = DEFAULT_PROPS.size,\n zIndex,\n dialogProps,\n onVisibilityChange,\n disableBodyScroll = DEFAULT_PROPS.disableBodyScroll,\n preventCloseOnClick,\n preventCloseOnEscape,\n ...forwardedProps\n } = props;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousOpen = React.useRef(isOpen);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (isOpen !== previousOpen.current) {\n previousOpen.current = isOpen;\n\n // Focus the parent element on close.\n if (!isOpen && parentElement && parentElement.current) {\n parentElement.current.focus();\n }\n }\n }, [isOpen, parentElement]);\n\n const shouldPreventCloseOnEscape = preventAutoClose || preventCloseOnEscape;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useCallbackOnEscape(onClose, isOpen && !shouldPreventCloseOnEscape);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const wrapperRef = useRef<HTMLDivElement>(null);\n /**\n * Since the `contentRef` comes from the parent and is optional,\n * we need to create a stable contentRef that will always be available.\n */\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const localContentRef = useRef<HTMLDivElement>(null);\n // Handle focus trap.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useFocusTrap(isOpen && wrapperRef.current, focusElement?.current);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useDisableBodyScroll(disableBodyScroll && isOpen && localContentRef.current);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [sentinelTop, setSentinelTop] = useState<Element | null>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [sentinelBottom, setSentinelBottom] = useState<Element | null>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const intersections = useIntersectionObserver([sentinelTop, sentinelBottom], {\n threshold: [0, 1],\n });\n\n const hasTopIntersection = sentinelTop && !(intersections.get(sentinelTop)?.isIntersecting ?? true);\n const hasBottomIntersection = sentinelBottom && !(intersections.get(sentinelBottom)?.isIntersecting ?? true);\n\n // Separate header, footer and dialog content from children.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [[headerChild], [footerChild], content] = useMemo(\n () => partitionMulti(Children.toArray(children), [isHeader, isFooter]),\n [children],\n );\n const headerChildProps = (headerChild as ReactElement)?.props;\n const headerChildContent = headerChildProps?.children;\n const footerChildProps = (footerChild as ReactElement)?.props;\n const footerChildContent = footerChildProps?.children;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const clickAwayRefs = useRef([wrapperRef]);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const rootRef = useRef<HTMLDivElement>(null);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const isVisible = useTransitionVisibility(rootRef, Boolean(isOpen), DIALOG_TRANSITION_DURATION, onVisibilityChange);\n\n const shouldPreventCloseOnClickAway = preventAutoClose || preventCloseOnClick;\n\n const isMounted = isOpen || isVisible || closeMode === 'hide';\n\n return isMounted\n ? UI({\n ClickAwayProvider,\n HeadingLevelProvider,\n Portal,\n ThemeProvider,\n className,\n clickAwayRefs,\n content,\n contentRef: mergeRefs(localContentRef, contentRef),\n dialogProps,\n footer,\n footerChildContent,\n footerChildProps,\n forceFooterDivider,\n forceHeaderDivider,\n handleClose: onClose,\n hasBottomIntersection,\n hasTopIntersection,\n header,\n headerChildContent,\n ProgressCircular,\n headerChildProps,\n isLoading,\n isOpen,\n isVisible,\n ref: mergeRefs(rootRef, ref),\n rootRef,\n setSentinelBottom,\n setSentinelTop,\n shouldPreventCloseOnClickAway,\n size,\n wrapperRef,\n zIndex,\n ...forwardedProps,\n })\n : null;\n});\nDialog.displayName = COMPONENT_NAME;\nDialog.className = CLASSNAME;\nDialog.defaultProps = DEFAULT_PROPS;\n","import type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface DividerProps extends HasTheme, HasClassName {\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Divider';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-divider';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<DividerProps> = {};\n\n/**\n * Divider component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Divider = (props: DividerProps) => {\n const { className, theme, ref, ...forwardedProps } = props;\n\n return (\n <hr\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, block({ [`theme-${theme}`]: Boolean(theme) }))}\n />\n );\n};\n","import { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { Divider as UI, DividerProps as UIProps, CLASSNAME, COMPONENT_NAME } from '@lumx/core/js/components/Divider';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface DividerProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DividerProps> = {};\n\n/**\n * Divider component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Divider = forwardRef<DividerProps, HTMLHRElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, ...otherProps } = props;\n\n return UI({\n ref,\n theme,\n ...otherProps,\n });\n});\nDivider.displayName = COMPONENT_NAME;\nDivider.className = CLASSNAME;\nDivider.defaultProps = DEFAULT_PROPS;\n","import { mdiDragVertical } from '@lumx/icons';\nimport type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { ColorPalette, Size, Theme } from '../../constants';\nimport { Icon } from '../Icon';\n\n/**\n * Defines the props of the component.\n */\nexport interface DragHandleProps extends HasTheme, HasClassName {\n /** Reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'DragHandle';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-drag-handle';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<DragHandleProps> = {};\n\n/**\n * DragHandle component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const DragHandle = (props: DragHandleProps) => {\n const { className, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, block({ [`theme-${theme}`]: Boolean(theme) }))}\n >\n {Icon({\n icon: mdiDragVertical,\n color: theme === Theme.dark ? ColorPalette.light : ColorPalette.dark,\n size: Size.xs,\n })}\n </div>\n );\n};\n","import { GenericProps } from '@lumx/react/utils/type';\nimport {\n DragHandle as UI,\n DragHandleProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/DragHandle';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface DragHandleProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DragHandleProps> = {};\n\n/**\n * DragHandle component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const DragHandle = forwardRef<DragHandleProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme();\n const { theme = defaultTheme, ...otherProps } = props;\n\n return UI({\n ref,\n theme,\n ...otherProps,\n });\n});\nDragHandle.displayName = COMPONENT_NAME;\nDragHandle.className = CLASSNAME;\nDragHandle.defaultProps = DEFAULT_PROPS;\n","import { RefObject, SetStateAction, useEffect, useState } from 'react';\n\nimport get from 'lodash/get';\n\ntype Listener = (evt: KeyboardEvent) => void;\n\ninterface UseKeyboardListNavigationType {\n /** the current active index */\n activeItemIndex: number;\n /** callback to be used when a key is pressed. usually used with the native prop `onKeyDown` */\n onKeyboardNavigation: Listener;\n /** Resets the active index to the initial state */\n resetActiveIndex(): void;\n /** Sets the active index to a given value */\n setActiveItemIndex(value: SetStateAction<number>): void;\n}\n\nexport type useKeyboardListNavigationType = <I>(\n items: I[],\n ref: RefObject<HTMLElement>,\n onListItemSelected: (itemSelected: I) => void,\n onListItemNavigated?: (itemSelected: I) => void,\n onEnterPressed?: (itemSelected: string) => void,\n onBackspacePressed?: Listener,\n keepFocusAfterSelection?: boolean,\n initialIndex?: number,\n preventTabOnEnteredValue?: boolean,\n) => UseKeyboardListNavigationType;\n\nconst INITIAL_INDEX = -1;\n\n/**\n * This custom hook provides the necessary set of functions and values to properly navigate\n * a list using the keyboard.\n *\n * @param items the list of items that will be navigated using the keyboard.\n * @param ref A reference to the element that is controlling the navigation.\n * @param onListItemSelected callback to be executed when the ENTER key is pressed on an item.\n * @param onListItemNavigated callback to be executed when the Arrow keys are pressed.\n * @param onEnterPressed callback to be executed when the ENTER key is pressed.\n * @param onBackspacePressed callback to be executed when the BACKSPACE key is pressed.\n * @param keepFocusAfterSelection determines whether after selecting an item, the focus should be maintained on the current target or not.\n * @param initialIndex where should the navigation start from. it defaults to `-1`, so the first item navigated is the item on position `0`.\n * @param preventTabOnEnteredValue determines whether upon TAB, if there is a value entered, the event is prevented or not.\n * @return useKeyboardListNavigation helpers.\n */\nexport const useKeyboardListNavigation: useKeyboardListNavigationType = (\n items,\n ref,\n onListItemSelected,\n onListItemNavigated,\n onEnterPressed,\n onBackspacePressed,\n keepFocusAfterSelection = false,\n initialIndex = INITIAL_INDEX,\n preventTabOnEnteredValue = true,\n) => {\n const [activeItemIndex, setActiveItemIndex] = useState(initialIndex);\n\n /**\n * This function calculates the next index in the list to be highlighted\n * @param key - key code pressed\n * @return next active index\n */\n const calculateActiveIndex = (key: string): number => {\n switch (key) {\n case 'ArrowDown':\n return activeItemIndex + 1 < items.length ? activeItemIndex + 1 : 0;\n case 'ArrowUp':\n return activeItemIndex - 1 >= 0 ? activeItemIndex - 1 : items.length - 1;\n default:\n return initialIndex;\n }\n };\n\n /**\n * Resets the active index to the initial state\n */\n const resetActiveIndex = () => {\n setActiveItemIndex(initialIndex);\n };\n\n /**\n * Prevents the default event and stops the propagation of said event\n * @param evt - key pressed event\n */\n const preventDefaultAndStopPropagation: Listener = (evt) => {\n evt.preventDefault();\n evt.stopPropagation();\n };\n\n /**\n * Handles navigation with the arrows using the keyboard\n * @param evt - key pressed event\n */\n const onArrowPressed: Listener = (evt) => {\n const { key } = evt;\n const nextActiveIndex = calculateActiveIndex(key);\n setActiveItemIndex(nextActiveIndex);\n preventDefaultAndStopPropagation(evt);\n if (onListItemNavigated) {\n const selectedItem = items[nextActiveIndex];\n onListItemNavigated(selectedItem);\n }\n };\n\n /**\n * Handles the event when the backspace key is pressed\n * @param evt - key pressed event\n */\n const onBackspaceKeyPressed: Listener = (evt) => {\n if (onBackspacePressed) {\n onBackspacePressed(evt);\n }\n };\n\n /**\n * Handles when the ENTER key is pressed\n * @param evt - key pressed event\n */\n const onEnterKeyPressed: Listener = (evt) => {\n if (!onListItemSelected) {\n return;\n }\n\n preventDefaultAndStopPropagation(evt);\n\n if (!keepFocusAfterSelection) {\n (evt.currentTarget as HTMLElement).blur();\n }\n\n const selectedItem = items[activeItemIndex];\n\n if (selectedItem) {\n onListItemSelected(selectedItem);\n resetActiveIndex();\n } else if (activeItemIndex === initialIndex && onEnterPressed) {\n const value = get(evt, 'target.value');\n onEnterPressed(value);\n resetActiveIndex();\n }\n };\n\n /**\n * Handles when the TAB key is pressed\n * @param evt - key pressed event\n */\n const onTabKeyPressed: Listener = (evt) => {\n const value = get(evt, 'target.value');\n\n if (preventTabOnEnteredValue && value && value.length > 0) {\n preventDefaultAndStopPropagation(evt);\n }\n };\n\n /**\n * In order to make it easier in the future to add new events depending on the key\n * a map was created to add these handlers. In the future, if there is another event\n * that we need to manage depending on a specific key, we just need to add the key code\n * here, and as a value, the handler for said key.\n */\n const eventsForKeyPressed: Record<string, Listener> = {\n ArrowDown: onArrowPressed,\n Tab: onTabKeyPressed,\n ArrowUp: onArrowPressed,\n Enter: onEnterKeyPressed,\n Backspace: onBackspaceKeyPressed,\n };\n\n /**\n * Calculates the next active item index depending on the key pressed.\n * If the key pressed was ENTER, the function executes the callback `onListItemSelected`\n * and resets the active index, since an item was selected.\n * @param evt - key pressed or key down event\n */\n const onKeyboardNavigation: Listener = (evt) => {\n const { key } = evt;\n const handler = eventsForKeyPressed[key];\n\n if (handler) {\n handler(evt);\n }\n };\n\n useEffect(() => {\n const { current: currentElement } = ref;\n if (!currentElement) {\n return undefined;\n }\n currentElement.addEventListener('focus', resetActiveIndex);\n currentElement.addEventListener('keydown', onKeyboardNavigation);\n return () => {\n currentElement.removeEventListener('focus', resetActiveIndex);\n currentElement.removeEventListener('keydown', onKeyboardNavigation);\n };\n });\n\n return {\n activeItemIndex,\n onKeyboardNavigation,\n resetActiveIndex,\n setActiveItemIndex,\n };\n};\n","import { Key, SyntheticEvent } from 'react';\n\nimport { Size } from '@lumx/react';\nimport { useKeyboardListNavigation } from '@lumx/react/hooks/useKeyboardListNavigation';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n List as UI,\n ListProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/List';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListProps extends GenericProps, ReactToJSX<UIProps> {\n /**\n * Whether the list items are clickable.\n * @deprecated not needed anymore.\n */\n isClickable?: boolean;\n /** Tab index of the list. */\n tabIndex?: number;\n /** @deprecated not supported since v4.0.0 */\n onListItemSelected?(key: Key, index: number, evt: SyntheticEvent): void;\n}\n\n/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\n/**\n * List component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nconst InternalList = forwardRef<ListProps, HTMLUListElement>((props, ref) => {\n const { children, isClickable, onListItemSelected, itemPadding, ...forwardedProps } = props;\n const adjustedItemPadding = itemPadding ?? (isClickable ? Size.big : undefined);\n\n return UI({ ...forwardedProps, ref, children, itemPadding: adjustedItemPadding });\n});\nInternalList.displayName = COMPONENT_NAME;\nInternalList.className = CLASSNAME;\nInternalList.defaultProps = DEFAULT_PROPS;\n\nexport const List = Object.assign(InternalList, { useKeyboardListNavigation });\n","import { useEffect } from 'react';\n\ntype useInfiniteScrollType = (\n ref: React.RefObject<HTMLElement>,\n callback?: EventCallback,\n callbackOnMount?: boolean,\n scrollTriggerMargin?: number,\n) => void;\ntype EventCallback = (evt?: Event) => void;\n\n// The error margin in px we want to have for triggering infinite scroll\nconst SCROLL_TRIGGER_MARGIN = 5;\n\n/**\n * Listen to clicks away from a given element and callback the passed in function.\n *\n * @param ref A reference to the element on which you want to listen scroll event.\n * @param [callback] A callback function to call when the bottom of the reference element is reached.\n * @param [callbackOnMount] A callback function to call when the component is mounted.\n */\nexport const useInfiniteScroll: useInfiniteScrollType = (\n ref,\n callback,\n callbackOnMount = false,\n scrollTriggerMargin = SCROLL_TRIGGER_MARGIN,\n) => {\n useEffect(() => {\n const { current } = ref;\n if (!callback || !current) {\n return undefined;\n }\n\n const isAtBottom = () =>\n Boolean(\n current && current.scrollHeight - (current.scrollTop + current.clientHeight) <= scrollTriggerMargin,\n );\n\n const onScroll = (e?: Event): void => {\n if (isAtBottom()) {\n callback(e);\n }\n };\n\n if (isAtBottom()) {\n onScroll();\n }\n\n current.addEventListener('scroll', onScroll);\n current.addEventListener('resize', onScroll);\n return () => {\n current.removeEventListener('scroll', onScroll);\n current.removeEventListener('resize', onScroll);\n };\n }, [ref, callback, scrollTriggerMargin]);\n\n useEffect(() => {\n if (callback && callbackOnMount) {\n callback();\n }\n }, [callback, callbackOnMount]);\n};\n","import { cloneElement, useMemo, useRef } from 'react';\n\nimport { List, ListProps } from '@lumx/react/components/list/List';\nimport { Popover, PopoverProps } from '@lumx/react/components/popover/Popover';\nimport { useInfiniteScroll } from '@lumx/react/hooks/useInfiniteScroll';\nimport { GenericProps, isComponent } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { Offset, Placement } from '@lumx/react/components/popover';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface DropdownProps extends GenericProps {\n /**\n * Reference to the element around which the dropdown is placed.\n * @see {@link PopoverProps#anchorRef}\n */\n anchorRef: PopoverProps['anchorRef'];\n /** Dropdown content. */\n children: React.ReactNode;\n /**\n * Whether a click anywhere out of the Dropdown would close it or not.\n * @see {@link PopoverProps#closeOnClickAway}\n */\n closeOnClickAway?: boolean;\n /**\n * Whether to close the Dropdown when clicking in it or not.\n */\n closeOnClick?: boolean;\n /**\n * Whether an escape key press would close the Dropdown or not.\n * @see {@link PopoverProps#closeOnEscape}\n */\n closeOnEscape?: boolean;\n /**\n * Manage dropdown width:\n * - `maxWidth`: dropdown not bigger than anchor\n * - `minWidth` or `true`: dropdown not smaller than anchor\n * - `width`: dropdown equal to the anchor.\n * @see {@link PopoverProps#fitToAnchorWidth}\n */\n fitToAnchorWidth?: PopoverProps['fitToAnchorWidth'];\n /**\n * Whether the dropdown should shrink to fit within the viewport height or not.\n * @see {@link PopoverProps#fitWithinViewportHeight}\n */\n fitWithinViewportHeight?: boolean;\n /**\n * Whether the dropdown should be displayed or not. Useful to control the Dropdown from outside the component.\n * @see {@link PopoverProps#isOpen}\n */\n isOpen: boolean;\n /**\n * Offset applied to the Dropdown position.\n * @see {@link PopoverProps#offset}\n */\n offset?: Offset;\n /**\n * Preferred Dropdown placement against the anchor element.\n * @see {@link PopoverProps#placement}\n */\n placement?: Placement;\n /** Whether the focus should be set on the list when the dropdown is open or not. */\n shouldFocusOnOpen?: boolean;\n /** Whether the dropdown should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */\n usePortal?: boolean;\n /** Whether the focus should go back on the anchor when dropdown closes and focus is within. */\n focusAnchorOnClose?: boolean;\n /**\n * Z-axis position.\n * @see {@link PopoverProps#zIndex}\n */\n zIndex?: number;\n /**\n * On close callback.\n * @see {@link PopoverProps#onClose}\n */\n onClose?(): void;\n /** On scroll end callback. */\n onInfiniteScroll?(): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Dropdown';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-dropdown';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DropdownProps> = {\n closeOnClick: true,\n closeOnClickAway: true,\n closeOnEscape: true,\n fitToAnchorWidth: true,\n fitWithinViewportHeight: true,\n placement: Placement.BOTTOM_START,\n shouldFocusOnOpen: true,\n focusAnchorOnClose: true,\n};\n\n/**\n * Dropdown component.\n *\n * @deprecated Use `MenuButton` for action-based dropdowns, `SelectButton` for selection-based dropdowns, or `Popover` for lower-level control.\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Dropdown = forwardRef<DropdownProps, HTMLDivElement>((props, ref) => {\n const {\n anchorRef,\n children,\n className,\n closeOnClick = DEFAULT_PROPS.closeOnClick,\n closeOnClickAway = DEFAULT_PROPS.closeOnClickAway,\n closeOnEscape = DEFAULT_PROPS.closeOnEscape,\n fitToAnchorWidth = DEFAULT_PROPS.fitToAnchorWidth,\n fitWithinViewportHeight = DEFAULT_PROPS.fitWithinViewportHeight,\n isOpen,\n offset,\n focusAnchorOnClose = DEFAULT_PROPS.focusAnchorOnClose,\n onClose,\n onInfiniteScroll,\n placement = DEFAULT_PROPS.placement,\n shouldFocusOnOpen = DEFAULT_PROPS.shouldFocusOnOpen,\n zIndex,\n ...forwardedProps\n } = props;\n const innerRef = useRef<HTMLDivElement>(null);\n const listElement = useRef(null);\n\n useInfiniteScroll(innerRef, onInfiniteScroll);\n\n const popperElement = useMemo(() => {\n return !Array.isArray(children) && isComponent(List)(children)\n ? cloneElement<ListProps>(children, {\n ...children.props,\n ref: listElement,\n onClick(evt: MouseEvent) {\n children.props.onClick?.(evt);\n\n if (closeOnClick) {\n onClose?.();\n }\n },\n isClickable: true,\n })\n : children;\n }, [children, closeOnClick, onClose]);\n\n return isOpen ? (\n <Popover\n ref={ref}\n {...forwardedProps}\n focusAnchorOnClose={focusAnchorOnClose}\n anchorRef={anchorRef}\n className={classNames.join(className, block())}\n elevation={0 as any}\n closeOnClickAway={closeOnClickAway}\n closeOnEscape={closeOnEscape}\n fitToAnchorWidth={fitToAnchorWidth}\n fitWithinViewportHeight={fitWithinViewportHeight}\n focusElement={shouldFocusOnOpen ? listElement : undefined}\n isOpen={isOpen}\n offset={offset}\n onClose={onClose}\n placement={placement}\n zIndex={zIndex}\n >\n <div className={element('menu')} ref={innerRef}>\n {popperElement}\n </div>\n </Popover>\n ) : null;\n});\n\nDropdown.displayName = COMPONENT_NAME;\nDropdown.className = CLASSNAME;\nDropdown.defaultProps = DEFAULT_PROPS;\n","import { mdiChevronDown, mdiChevronUp } from '@lumx/icons';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport { ColorPalette, Emphasis, Theme } from '../../constants';\nimport type {\n HasClassName,\n LumxClassName,\n HasCloseMode,\n HasTheme,\n CommonRef,\n GenericProps,\n JSXElement,\n} from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ExpansionPanelProps extends HasClassName, HasCloseMode, HasTheme {\n /** Whether the expansion panel has a background. */\n hasBackground?: boolean;\n /** Whether the header has a divider. */\n hasHeaderDivider?: boolean;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Label text (overwritten if a `<header>` is provided in the children). */\n label?: string;\n /** On open callback. */\n handleOpen?: (event: any) => void;\n /** On close callback. */\n handleClose?: (event: any) => void;\n /** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */\n toggleButtonProps: any;\n /** On toggle open or close callback. */\n handleToggleOpen?(shouldOpen: boolean, event: any): void;\n /** Children */\n children?: JSXElement;\n /** Ref forwarded to the root `<section>` element. */\n ref?: CommonRef;\n /** Ref forwarded to the collapsible wrapper `<div>`. */\n wrapperRef?: CommonRef;\n /** Props spread onto the header content `<div>` (e.g. `aria-*`, `data-*`). */\n headerProps: GenericProps;\n /** Content rendered inside the header content area. */\n headerContent?: JSXElement;\n /** Optional drag handle element rendered at the start of the header. */\n dragHandle?: JSXElement;\n /** Content rendered inside the collapsible content area. */\n content?: JSXElement;\n /** Optional footer element rendered below the content. */\n footer?: JSXElement;\n /** IconButton component injected by the framework wrapper (React or Vue). */\n IconButton: any;\n /** Whether the children should remain mounted (visible in the DOM) while the panel is closed. */\n isChildrenVisible?: boolean;\n}\n\nexport type ExpansionPanelPropsToOverride =\n | 'handleOpen'\n | 'handleClose'\n | 'toggleButtonProps'\n | 'handleToggleOpen'\n | 'wrapperRef'\n | 'headerProps'\n | 'headerContent'\n | 'dragHandle'\n | 'content'\n | 'IconButton'\n | 'isChildrenVisible'\n | 'footer';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ExpansionPanel';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-expansion-panel';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ExpansionPanelProps> = {\n closeMode: 'unmount',\n};\n\n/**\n * ExpansionPanel component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ExpansionPanel = (props: ExpansionPanelProps) => {\n const {\n className,\n children: anyChildren,\n hasBackground,\n ref,\n hasHeaderDivider,\n isOpen,\n label,\n handleClose,\n handleOpen,\n handleToggleOpen,\n theme,\n toggleButtonProps,\n headerProps,\n headerContent,\n dragHandle,\n wrapperRef,\n content,\n isChildrenVisible,\n IconButton,\n footer,\n closeMode,\n ...forwardedProps\n } = props;\n\n const toggleOpen = (event: any) => {\n const shouldOpen = !isOpen;\n\n if (handleOpen && shouldOpen) {\n handleOpen(event);\n }\n if (handleClose && !shouldOpen) {\n handleClose(event);\n }\n if (handleToggleOpen) {\n handleToggleOpen(shouldOpen, event);\n }\n };\n\n const color = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;\n\n const rootClassName = classNames.join(\n className,\n block({\n 'has-background': hasBackground,\n 'has-header': Boolean(!isEmpty(headerProps.children)),\n 'has-header-divider': hasHeaderDivider,\n 'is-close': !isOpen,\n 'is-draggable': Boolean(dragHandle),\n 'is-open': isOpen,\n [`theme-${theme}`]: Boolean(theme),\n }),\n );\n\n return (\n <section ref={ref} {...forwardedProps} className={rootClassName}>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}\n <header className={element('header')} onClick={toggleOpen}>\n {dragHandle && <div className={element('header-drag')}>{dragHandle}</div>}\n\n <div {...headerProps} className={element('header-content')}>\n {headerContent}\n </div>\n\n <div className={element('header-toggle')}>\n <IconButton\n {...toggleButtonProps}\n color={color}\n emphasis={Emphasis.low}\n icon={isOpen ? mdiChevronUp : mdiChevronDown}\n aria-expanded={isOpen || 'false'}\n />\n </div>\n </header>\n\n <div className={element('wrapper')} ref={wrapperRef}>\n {(isOpen || isChildrenVisible) && (\n <div className={element('container')}>\n <div className={element('content')}>{content}</div>\n\n {footer && <div className={element('footer')}>{footer}</div>}\n </div>\n )}\n </div>\n </section>\n );\n};\n","import React, { Children, PropsWithChildren, ReactNode, useRef } from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport { DragHandle, IconButton, IconButtonProps, Theme } from '@lumx/react';\nimport { GenericProps, isComponent } from '@lumx/react/utils/type';\nimport { partitionMulti } from '@lumx/react/utils/partitionMulti';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { IS_BROWSER } from '@lumx/react/constants';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ExpansionPanel as UI,\n ExpansionPanelProps as UIProps,\n element,\n ExpansionPanelPropsToOverride,\n} from '@lumx/core/js/components/ExpansionPanel';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface ExpansionPanelProps extends GenericProps, ReactToJSX<UIProps, ExpansionPanelPropsToOverride> {\n /** On open callback. */\n onOpen?: (event: React.MouseEvent) => void;\n /** On close callback. */\n onClose?: (event: React.MouseEvent) => void;\n /** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */\n toggleButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;\n /** On toggle open or close callback. */\n onToggleOpen?(shouldOpen: boolean, event: React.MouseEvent): void;\n}\n\nconst isDragHandle = isComponent(DragHandle);\nconst isHeader = isComponent('header');\nconst isFooter = isComponent('footer');\n\n/**\n * ExpansionPanel component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ExpansionPanel = forwardRef<ExpansionPanelProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n closeMode = DEFAULT_PROPS.closeMode,\n children: anyChildren,\n isOpen,\n label,\n onClose,\n onOpen,\n onToggleOpen,\n theme = defaultTheme,\n ...forwardedProps\n } = props;\n\n const children: ReactNode[] = Children.toArray(anyChildren);\n\n // Partition children by types.\n const [[dragHandle], [header], [footer], content] = partitionMulti(children, [isDragHandle, isHeader, isFooter]);\n\n // Either take the header in children or create one with the label.\n const headerProps: PropsWithChildren<any> = React.isValidElement(header) ? header.props : {};\n const headerContent = !isEmpty(headerProps.children) ? (\n headerProps.children\n ) : (\n <span className={element('label')}>{label}</span>\n );\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n // Children stay visible while the open/close transition is running\n const [isChildrenVisible, setChildrenVisible] = React.useState(isOpen);\n\n const isOpenRef = React.useRef(isOpen);\n React.useEffect(() => {\n if (isOpen || closeMode === 'hide') {\n setChildrenVisible(true);\n } else if (!IS_BROWSER) {\n // Outside a browser we can't wait for the transition\n setChildrenVisible(false);\n }\n isOpenRef.current = isOpen;\n }, [closeMode, isOpen]);\n\n // Change children's visibility on the transition end\n React.useEffect(() => {\n const { current: wrapper } = wrapperRef;\n if (!IS_BROWSER || !wrapper) {\n return undefined;\n }\n const onTransitionEnd = () => {\n setChildrenVisible(isOpenRef.current || closeMode === 'hide');\n };\n wrapper.addEventListener('transitionend', onTransitionEnd);\n return () => wrapper.removeEventListener('transitionend', onTransitionEnd);\n }, [closeMode]);\n\n return UI({\n content,\n dragHandle,\n footer,\n headerContent,\n ref,\n headerProps,\n wrapperRef,\n IconButton,\n isOpen,\n handleClose: onClose,\n handleToggleOpen: onToggleOpen,\n handleOpen: onOpen,\n theme,\n isChildrenVisible,\n children,\n closeMode,\n label,\n ...forwardedProps,\n });\n});\nExpansionPanel.displayName = COMPONENT_NAME;\nExpansionPanel.className = CLASSNAME;\nExpansionPanel.defaultProps = DEFAULT_PROPS;\n","import { ColorPalette, Size, Theme } from '../../constants';\nimport type { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { TextProps } from '../Text';\n\nexport interface FlagProps extends HasClassName, HasTheme {\n /** Color of the component. */\n color?: ColorPalette;\n /** Icon to use before the label. */\n icon?: string;\n /** Text label of the flag. */\n children: JSXElement;\n /** Enable text truncate on overflow */\n truncate?: boolean;\n /** ref to the root element */\n ref?: CommonRef;\n /** Text component to use for rendering the label */\n Text: (props: TextProps) => any;\n}\n\nexport const COMPONENT_NAME = 'Flag';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-flag';\nexport const DEFAULT_PROPS: Partial<FlagProps> = {};\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Flag component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Flag = (props: FlagProps) => {\n const { children, icon, color, className, theme, truncate, Text, ...forwardedProps } = props;\n const flagColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);\n const isTruncated = !!truncate;\n\n return (\n <div\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${flagColor}`]: Boolean(flagColor),\n 'is-truncated': isTruncated,\n }),\n )}\n >\n {icon && Icon({ icon, size: Size.xxs, className: element('icon') })}\n <Text as=\"span\" truncate={!!truncate} typography=\"overline\" className={element('label')}>\n {children}\n </Text>\n </div>\n );\n};\n","import { Theme, Text } from '@lumx/react';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n Flag as UI,\n FlagProps as UIProps,\n} from '@lumx/core/js/components/Flag';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface FlagProps extends GenericProps, ReactToJSX<UIProps, 'children' | 'Text'> {\n /** Text label of the flag. */\n label: React.ReactNode;\n}\n\n/**\n * Flag component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Flag = forwardRef<FlagProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n\n return UI({\n ...props,\n theme: props.theme || defaultTheme,\n ref,\n children: props.label,\n Text,\n });\n});\n\nFlag.displayName = COMPONENT_NAME;\nFlag.className = CLASSNAME;\nFlag.defaultProps = DEFAULT_PROPS;\n","import { Typography } from '../../constants';\nimport { HeadingElement } from '../../types';\n\n/** The maximum authorized heading level. */\nexport const MAX_HEADING_LEVEL = 6;\n\n/**\n * Typography to use by default depending on the heading level.\n */\nexport const DEFAULT_TYPOGRAPHY_BY_LEVEL = {\n h1: Typography.display1,\n h2: Typography.headline,\n h3: Typography.title,\n h4: Typography.subtitle2,\n h5: Typography.subtitle1,\n h6: Typography.body2,\n};\n\nexport interface HeadingLevelContext {\n /** The current level */\n level: number;\n /** The heading element matching the current level */\n headingElement: HeadingElement;\n}\n\nexport const defaultContext: HeadingLevelContext = { level: 1, headingElement: 'h1' };\n","import { HeadingElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { TextProps } from '../Text';\nimport { DEFAULT_TYPOGRAPHY_BY_LEVEL } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface HeadingProps extends Partial<TextProps> {\n /**\n * Display a specific heading level instead of the one provided by parent context provider.\n */\n as?: HeadingElement;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Heading';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-heading';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {} as const;\n\n/**\n * Get Heading component common props\n *\n * @param props Component props.\n * @param contextHeadingElement Heading element from context.\n * @return Common Props\n */\nexport const getHeadingProps = (props: HeadingProps, contextHeadingElement?: HeadingElement) => {\n const { as, className, typography, ...otherProps } = props;\n const computedHeadingElement = as || contextHeadingElement || 'h1';\n\n return {\n ...otherProps,\n as: computedHeadingElement,\n className: classNames.join(className, CLASSNAME),\n typography: typography || DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement],\n };\n};\n","import { createContext } from 'react';\n\nimport {\n type HeadingLevelContext as HeadingLevelContextType,\n defaultContext,\n} from '@lumx/core/js/components/Heading/constants';\n\nexport const HeadingLevelContext = createContext<HeadingLevelContextType>(defaultContext);\n","import React from 'react';\nimport { HeadingLevelContext } from './context';\n\nexport const useHeadingLevel = () => {\n const { level = 1, headingElement = 'h1' } = React.useContext(HeadingLevelContext);\n\n return { level, headingElement };\n};\n","import { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n HeadingProps as UIProps,\n getHeadingProps,\n} from '@lumx/core/js/components/Heading';\nimport { GenericProps } from '@lumx/core/js/types';\n\nimport { Text } from '../text';\nimport { useHeadingLevel } from './useHeadingLevel';\n\nexport interface HeadingProps extends GenericProps, UIProps {}\n\n/**\n * Renders a heading component.\n * Extends the `Text` Component with the heading level automatically computed based on\n * the current level provided by the context.\n */\nexport const Heading = forwardRef<HeadingProps>((props, ref) => {\n const { children, ...otherProps } = props;\n const { headingElement } = useHeadingLevel();\n const headingProps = getHeadingProps(otherProps, headingElement);\n\n return (\n <Text ref={ref} {...headingProps}>\n {children}\n </Text>\n );\n});\n\nHeading.displayName = COMPONENT_NAME;\nHeading.className = CLASSNAME;\nHeading.defaultProps = DEFAULT_PROPS;\n","import { MAX_HEADING_LEVEL } from './constants';\n\n/**\n * Computes the next heading level based on the optional prop level or the parent context level.\n *\n * @param levelProp - The explicit level provided via props (optional).\n * @param parentLevel - The level from the parent context.\n * @returns The calculated heading level, clamped to the maximum allowed level.\n */\nexport const computeHeadingLevel = (levelProp: number | undefined, parentLevel: number): number => {\n const nextLevel = levelProp || parentLevel + 1;\n return nextLevel > MAX_HEADING_LEVEL ? MAX_HEADING_LEVEL : nextLevel;\n};\n","import { ReactNode } from 'react';\n\nimport { HeadingElement } from '@lumx/react/utils/type';\n\nimport { computeHeadingLevel } from '@lumx/core/js/components/Heading/utils';\n\nimport { HeadingLevelContext } from './context';\nimport { useHeadingLevel } from './useHeadingLevel';\n\nexport interface HeadingLevelProviderProps {\n /** The heading level to start at. If left undefined, the parent context will be used, if any. */\n level?: number;\n /** The children to display */\n children: ReactNode;\n}\n\n/**\n * Provide a new heading level context.\n */\nexport const HeadingLevelProvider: React.FC<HeadingLevelProviderProps> = ({ children, level }) => {\n const { level: contextLevel } = useHeadingLevel();\n\n const nextLevel = computeHeadingLevel(level, contextLevel);\n const headingElement = `h${nextLevel}` as HeadingElement;\n\n return (\n <HeadingLevelContext.Provider value={{ level: nextLevel, headingElement }}>\n {children}\n </HeadingLevelContext.Provider>\n );\n};\n","import { Alignment, Orientation, Size } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\ntype GridGutterSize = Extract<Size, 'regular' | 'big' | 'huge'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface GridProps extends GenericProps {\n /** Orientation. */\n orientation?: Orientation;\n /** Whether the children are wrapped or not. */\n wrap?: string;\n /** Vertical alignment. */\n vAlign?: Alignment;\n /** Horizontal alignment. */\n hAlign?: Alignment;\n /** Gutter size. */\n gutter?: GridGutterSize;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Grid';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-grid';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<GridProps> = {\n orientation: Orientation.horizontal,\n wrap: 'nowrap',\n};\n\n/**\n * Grid component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Grid = forwardRef<GridProps, HTMLDivElement>((props, ref) => {\n const {\n children,\n className,\n gutter,\n hAlign,\n orientation = DEFAULT_PROPS.orientation,\n vAlign,\n wrap = DEFAULT_PROPS.wrap,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n classNames.bem(`${CLASSNAME}-container`).block(),\n block({\n [`h-align-${hAlign}`]: Boolean(hAlign),\n [`v-align-${vAlign}`]: Boolean(vAlign),\n [`orientation-${orientation}`]: Boolean(orientation),\n [`wrap-${wrap}`]: Boolean(wrap),\n [`gutter-${gutter}`]: Boolean(gutter),\n }),\n )}\n >\n {children}\n </div>\n );\n});\nGrid.displayName = COMPONENT_NAME;\nGrid.className = CLASSNAME;\nGrid.defaultProps = DEFAULT_PROPS;\n","import { Alignment } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\ntype Columns = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';\n\n/**\n * Defines the props of the component.\n */\nexport interface GridItemProps extends GenericProps {\n /** Alignment. */\n align?: Alignment;\n /** Order. */\n order?: Columns;\n /** Width. */\n width?: Columns;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'GridItem';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-grid-item';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * GridItem component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const GridItem = forwardRef<GridItemProps, HTMLDivElement>((props, ref) => {\n const { children, className, width, align, order, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`width-${width}`]: Boolean(width),\n [`order-${order}`]: Boolean(order),\n [`align-${align}`]: Boolean(align),\n }),\n )}\n >\n {children}\n </div>\n );\n});\nGridItem.displayName = COMPONENT_NAME;\nGridItem.className = CLASSNAME;\n","import isInteger from 'lodash/isInteger';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\nexport type GridColumnGapSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface GridColumnProps extends HasClassName {\n /** Customize the root element. */\n as?: any;\n /** Children elements. */\n children?: JSXElement;\n /** Space between columns and rows. */\n gap?: GridColumnGapSize;\n /** Ideal number of columns. */\n maxColumns?: number;\n /** Minimum width for each item, reduce the number of column if there is not enough space. */\n itemMinWidth?: number;\n /** Custom styles. */\n style?: any;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'GridColumn';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-grid-column';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<GridColumnProps> = {};\n\n/**\n * The GridColumn is a layout component that can display children in a grid\n * with custom display properties. It also comes with a responsive design,\n * with a number of column that reduce when there is not enough space for each item.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const GridColumn = (props: GridColumnProps) => {\n const {\n as: Component = 'div',\n gap,\n maxColumns,\n itemMinWidth,\n children,\n className,\n style = {},\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <Component\n {...forwardedProps}\n ref={ref}\n className={classNames.join(className, CLASSNAME)}\n style={{\n ...style,\n ['--lumx-grid-column-item-min-width' as any]: isInteger(itemMinWidth) && `${itemMinWidth}px`,\n ['--lumx-grid-column-columns' as any]: maxColumns,\n ['--lumx-grid-column-gap' as any]: gap && `var(--lumx-spacing-unit-${gap})`,\n }}\n >\n {children}\n </Component>\n );\n};\n\nGridColumn.displayName = COMPONENT_NAME;\nGridColumn.className = CLASSNAME;\nGridColumn.defaultProps = DEFAULT_PROPS;\n","import { ReactElement } from 'react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n GridColumn as UI,\n type GridColumnProps as UIProps,\n type GridColumnGapSize,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/GridColumn';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface GridColumnProps extends GenericProps, ReactToJSX<UIProps> {\n /** Customize the root element. */\n as?: React.ElementType;\n}\n\n// Re-export types for backward compatibility\nexport type { GridColumnGapSize };\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<GridColumnProps> = {};\n\n/**\n * The GridColumn is a layout component that can display children in a grid\n * with custom display properties. It also comes with a responsive design,\n * with a number of column that reduce when there is not enough space for each item.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const GridColumn = forwardRef<GridColumnProps>((props, ref): ReactElement => {\n return UI({\n ref,\n ...props,\n }) as ReactElement;\n});\nGridColumn.displayName = COMPONENT_NAME;\nGridColumn.className = CLASSNAME;\nGridColumn.defaultProps = DEFAULT_PROPS;\n","import { Alignment, HorizontalAlignment, Size } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName, GenericProps, HasTheme, ValueOf } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { ImageCaptionMetadata, ImageCaptionPropsToOverride } from './ImageCaption';\n\n/**\n * Image block variants.\n */\nexport const ImageBlockCaptionPosition = {\n below: 'below',\n over: 'over',\n} as const;\nexport type ImageBlockCaptionPosition = ValueOf<typeof ImageBlockCaptionPosition>;\n\n/**\n * Image block sizes.\n */\nexport type ImageBlockSize = Extract<Size, 'xl' | 'xxl'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ImageBlockProps\n extends HasClassName,\n HasTheme,\n Omit<ImageCaptionMetadata, ImageCaptionPropsToOverride> {\n /** Action toolbar content. */\n actions?: JSXElement;\n /** Alignment. */\n align?: HorizontalAlignment;\n /** Image alternative text. */\n alt: string;\n /** Caption position. */\n captionPosition?: ImageBlockCaptionPosition;\n /** Whether the image has to fill its container height or not. */\n fillHeight?: boolean;\n /** Image URL. */\n image: string;\n /** Size variant. */\n size?: ImageBlockSize;\n /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */\n thumbnailProps?: GenericProps;\n /** reference to the root element */\n ref?: CommonRef;\n /** component for rendering the thumbnail */\n Thumbnail: any;\n /** component for rendering the image caption */\n ImageCaption: any;\n}\n\nexport type ImageBlockPropsToOverride = 'Thumbnail' | 'ImageCaption' | 'thumbnailProps';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ImageBlock';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-image-block';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ImageBlockProps> = {\n captionPosition: ImageBlockCaptionPosition.below,\n align: Alignment.left,\n};\n\n/**\n * ImageBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ImageBlock = (props: ImageBlockProps) => {\n const {\n actions,\n align = DEFAULT_PROPS.align,\n alt,\n captionPosition = DEFAULT_PROPS.captionPosition,\n captionStyle,\n className,\n description,\n descriptionProps,\n fillHeight,\n image,\n size,\n tags,\n ref,\n theme,\n thumbnailProps,\n title,\n titleProps,\n Thumbnail,\n ImageCaption,\n ...forwardedProps\n } = props;\n return (\n <figure\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`caption-position-${captionPosition}`]: Boolean(captionPosition),\n [`align-${align}`]: Boolean(align),\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n 'fill-height': fillHeight,\n }),\n )}\n >\n <Thumbnail\n {...thumbnailProps}\n className={classNames.join(element('image'), thumbnailProps?.className)}\n fillHeight={fillHeight}\n align={align}\n image={image}\n size={size}\n theme={theme}\n alt={(alt || title) as string}\n />\n <ImageCaption\n as=\"figcaption\"\n baseClassName={CLASSNAME}\n theme={theme}\n title={title}\n titleProps={titleProps}\n description={description}\n descriptionProps={descriptionProps}\n tags={tags}\n captionStyle={captionStyle}\n align={align}\n truncate={captionPosition === 'over'}\n />\n {actions && <div className={element('actions')}>{actions}</div>}\n </figure>\n );\n};\n","import { HorizontalAlignment } from '../../constants';\nimport { GenericProps, HasPolymorphicAs, HasTheme, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\n\nexport type As = 'div' | 'figcaption';\n\nexport type ImageCaptionMetadata = {\n /** Image title to display in the caption. */\n title?: string;\n /** Props to pass to the title. */\n titleProps?: GenericProps;\n /** Image description. Can be either a string, ReactNode, or sanitized html object. */\n description?: JSXElement | { __html: string };\n /** Props to pass to the description. */\n descriptionProps?: GenericProps;\n /** Tag content. */\n tags?: JSXElement;\n /** Caption custom CSS style. */\n captionStyle?: GenericProps;\n /** Props to pass to the wrapper FlexBox element. */\n wrapperProps?: GenericProps;\n /** FlexBox component injected by the framework wrapper (React or Vue). */\n FlexBox: any;\n /** Text component injected by the framework wrapper (React or Vue). */\n Text: any;\n};\n\nexport type ImageCaptionPropsToOverride = 'FlexBox' | 'Text' | 'wrapperProps';\n\nexport type ImageCaptionProps<AS extends As = 'figcaption'> = HasTheme &\n HasPolymorphicAs<AS> &\n ImageCaptionMetadata & {\n /** Base className for sub elements */\n baseClassName?: string;\n /** Alignment. */\n align?: HorizontalAlignment;\n /** Truncate text on title & description (no line wrapping). */\n truncate?: boolean;\n };\n\n/** Internal component used to render image captions */\nexport const ImageCaption = <AS extends As>(props: ImageCaptionProps<AS>) => {\n const {\n baseClassName,\n theme,\n as = 'figcaption',\n title,\n titleProps,\n description,\n descriptionProps,\n tags,\n captionStyle,\n align,\n truncate,\n FlexBox,\n Text,\n wrapperProps = { vAlign: align, hAlign: align === 'center' ? align : undefined },\n } = props;\n\n if (!title && !description && !tags) return null;\n\n const titleColor = { color: theme === 'dark' ? 'light' : 'dark' } as const;\n const baseColor = { color: theme === 'dark' ? 'light' : 'dark', colorVariant: 'L2' } as const;\n\n return (\n <FlexBox\n as={as}\n className={classNames.join(baseClassName && `${baseClassName}__wrapper`)}\n style={captionStyle}\n orientation=\"vertical\"\n gap=\"regular\"\n {...wrapperProps}\n >\n {(title || description) && (\n <Text\n as=\"p\"\n className={classNames.join(baseClassName && `${baseClassName}__caption`)}\n truncate={truncate}\n {...baseColor}\n >\n {title && (\n <Text\n {...titleProps}\n as=\"span\"\n className={classNames.join(\n titleProps?.className,\n baseClassName && `${baseClassName}__title`,\n )}\n typography=\"subtitle1\"\n {...titleColor}\n >\n {title}\n </Text>\n )}{' '}\n {description &&\n (typeof description === 'object' && '__html' in description ? (\n <Text\n {...descriptionProps}\n as=\"span\"\n className={classNames.join(\n descriptionProps?.className,\n baseClassName && `${baseClassName}__description`,\n )}\n typography=\"body1\"\n dangerouslySetInnerHTML={description as { __html: string }}\n />\n ) : (\n <Text\n {...descriptionProps}\n as=\"span\"\n className={classNames.join(\n descriptionProps?.className,\n baseClassName && `${baseClassName}__description`,\n )}\n typography=\"body1\"\n >\n {description as any}\n </Text>\n ))}\n </Text>\n )}\n {tags && (\n <FlexBox\n className={classNames.join(baseClassName && `${baseClassName}__tags`)}\n orientation=\"horizontal\"\n vAlign={align}\n >\n {tags}\n </FlexBox>\n )}\n </FlexBox>\n );\n};\n","import { CSSProperties } from 'react';\n\nimport { FlexBox, Text, TextProps, useTheme } from '@lumx/react';\nimport {\n As,\n ImageCaptionPropsToOverride,\n ImageCaption as UI,\n ImageCaptionProps as UIProps,\n ImageCaptionMetadata as UIMetadataProps,\n} from '@lumx/core/js/components/ImageBlock/ImageCaption';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\ntype ForwardedTextProps = Omit<TextProps, 'as' | 'typography' | 'color' | 'colorVariant'>;\n\nexport type ImageCaptionMetadata = Omit<UIMetadataProps, ImageCaptionPropsToOverride> & {\n /** Props to pass to the title. */\n titleProps?: ForwardedTextProps;\n /** Props to pass to the title. */\n descriptionProps?: ForwardedTextProps;\n /** Caption custom CSS style. */\n captionStyle?: CSSProperties;\n};\n\nexport type ImageCaptionProps<AS extends As = 'figcaption'> = ReactToJSX<UIProps<AS>, ImageCaptionPropsToOverride> &\n ImageCaptionMetadata & {\n /** Truncate text on title & description (no line wrapping). */\n truncate?: TextProps['truncate'];\n };\n\n/** Internal component used to render image captions */\nexport const ImageCaption = <AS extends As>(props: ImageCaptionProps<AS>) => {\n const defaultTheme = useTheme();\n const { theme = defaultTheme, ...forwardedProps } = props;\n\n return UI({\n FlexBox,\n Text,\n theme,\n ...forwardedProps,\n });\n};\n","import { Size, Theme, Thumbnail } from '@lumx/react';\n\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ImageBlock as UI,\n ImageBlockProps as UIProps,\n ImageBlockPropsToOverride,\n} from '@lumx/core/js/components/ImageBlock';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { ThumbnailProps } from '../thumbnail/Thumbnail';\nimport { ImageCaption } from './ImageCaption';\n\n/**\n * Image block variants.\n */\nexport { ImageBlockCaptionPosition } from '@lumx/core/js/components/ImageBlock';\n\n/**\n * Image block sizes.\n */\nexport type ImageBlockSize = Extract<Size, 'xl' | 'xxl'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ImageBlockProps extends GenericProps, ReactToJSX<UIProps, ImageBlockPropsToOverride> {\n /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */\n thumbnailProps?: Omit<ThumbnailProps, 'image' | 'size' | 'theme' | 'align' | 'fillHeight'>;\n}\n\n/**\n * ImageBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ImageBlock = forwardRef<ImageBlockProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, ...forwardedProps } = props;\n\n return UI({\n ref,\n theme,\n ...forwardedProps,\n Thumbnail,\n ImageCaption,\n });\n});\n\nImageBlock.displayName = COMPONENT_NAME;\nImageBlock.className = CLASSNAME;\nImageBlock.defaultProps = DEFAULT_PROPS;\n","import type { LumxClassName } from '@lumx/core/js/types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ImageLightbox';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-image-lightbox';\n","import React from 'react';\n\nimport throttle from 'lodash/throttle';\nimport { RectSize } from '@lumx/react/utils/type';\n\n/**\n * Observe element size (only works if it's size depends on the window size).\n *\n * (Not using ResizeObserver for better browser backward compat)\n *\n * @param elementRef Element to observe\n * @return the size and a manual update callback\n */\nexport function useSizeOnWindowResize(elementRef: React.RefObject<HTMLElement>): [RectSize | null, () => void] {\n const [size, setSize] = React.useState<null | RectSize>(null);\n const updateSize = React.useMemo(\n () =>\n throttle(() => {\n const newSize = elementRef.current?.getBoundingClientRect();\n if (newSize) setSize(newSize);\n }, 10),\n [elementRef],\n );\n React.useEffect(() => {\n updateSize();\n window.addEventListener('resize', updateSize);\n return () => window.removeEventListener('resize', updateSize);\n }, [updateSize]);\n return [size, updateSize];\n}\n","import React from 'react';\nimport { RectSize } from '@lumx/react/utils/type';\n\n/** Get natural image size after load. */\nexport function useImageSize(imgRef: React.RefObject<HTMLImageElement>, getInitialSize?: () => RectSize | null) {\n const [imageSize, setImageSize] = React.useState<null | RectSize>(getInitialSize || null);\n React.useEffect(() => {\n const { current: img } = imgRef;\n if (!img) {\n return undefined;\n }\n const onLoad = () => setImageSize({ width: img.naturalWidth, height: img.naturalHeight });\n img.addEventListener('load', onLoad);\n return () => img.removeEventListener('load', onLoad);\n }, [imgRef]);\n return imageSize;\n}\n","/** Minimal recursive deep equal of JS values */\nexport function isEqual(obj1: any, obj2: any): boolean {\n if (obj1 === obj2) return true;\n if (typeof obj1 === 'object' && typeof obj2 === 'object') {\n const keys1 = Object.keys(obj1);\n const keys2 = Object.keys(obj2);\n if (keys1.length !== keys2.length) return false;\n return keys1.every((key1) => isEqual(obj1[key1], obj2[key1]));\n }\n return false;\n}\n","import React from 'react';\nimport type { Point } from '@lumx/react/utils/type';\nimport type { useAnimateScroll } from './useAnimateScroll';\n\n/**\n * Listen to mouse wheel + ctrl and multi-pointer pinch to zoom\n */\nexport function usePointerZoom(\n scrollAreaRef: React.RefObject<HTMLDivElement>,\n onScaleChange: ((value: number) => void) | undefined,\n animateScroll: ReturnType<typeof useAnimateScroll>,\n) {\n const [isPointerZooming, setPointerZooming] = React.useState(false);\n React.useEffect(() => {\n const scrollArea = scrollAreaRef.current as HTMLDivElement;\n if (!scrollArea || !onScaleChange) {\n return undefined;\n }\n\n let animationFrame: number | null;\n let zoomStateTimeoutId: ReturnType<typeof setTimeout> | null;\n\n function updateScaleOnNextFrame(newScale: number, mousePosition: Point): void {\n // Cancel previously scheduled frame\n if (animationFrame) cancelAnimationFrame(animationFrame);\n\n // Cancel previously scheduled zoom state change\n if (zoomStateTimeoutId) clearTimeout(zoomStateTimeoutId);\n\n function nextFrame() {\n setPointerZooming(true);\n onScaleChange?.(newScale);\n\n animationFrame = null;\n // Wait a bit before indicating the pointer zooming is finished\n zoomStateTimeoutId = setTimeout(() => setPointerZooming(false), 100);\n }\n animationFrame = requestAnimationFrame(nextFrame);\n\n // Animate scroll in parallel (centering on the current mouse position)\n animateScroll(mousePosition, {\n width: scrollArea.scrollWidth,\n height: scrollArea.scrollHeight,\n });\n }\n\n function onWheel(event: WheelEvent) {\n if (!event.ctrlKey) {\n return;\n }\n event.preventDefault();\n const newScale = Math.exp(-event.deltaY / 50);\n\n // Update scale on next frame (focused on the mouse position)\n updateScaleOnNextFrame(newScale, {\n x: event.clientX,\n y: event.clientY,\n });\n }\n\n const activePointers: Record<PointerEvent['pointerId'], PointerEvent> = {};\n let prevDistance: number | null = null;\n let previousCenterPoint: Point | null = null;\n\n function onPointerDown(event: PointerEvent) {\n activePointers[event.pointerId] = event;\n }\n function onPointerMove(event: PointerEvent) {\n // Update pointer in cache\n if (activePointers[event.pointerId]) {\n activePointers[event.pointerId] = event;\n }\n\n const pointers = Object.values(activePointers);\n\n // Make sure we run computation on one of the pointer in the group\n if (pointers[0]?.pointerId !== event.pointerId) {\n return;\n }\n\n // Centered point between all pointers\n const centerPoint: Point = {\n x: pointers.reduce((x, { clientX }) => x + clientX, 0) / pointers.length,\n y: pointers.reduce((y, { clientY }) => y + clientY, 0) / pointers.length,\n };\n\n // Movement of the center point\n const deltaCenterPoint = previousCenterPoint && {\n left: previousCenterPoint.x - centerPoint.x,\n top: previousCenterPoint.y - centerPoint.y,\n };\n\n // Pan X & Y\n if (deltaCenterPoint) {\n // Apply movement of the center point to the scroll\n scrollArea.scrollBy({\n top: deltaCenterPoint.top / 2,\n left: deltaCenterPoint.left / 2,\n });\n }\n\n // Pinch to zoom\n if (pointers.length === 2) {\n const [pointer1, pointer2] = pointers;\n const distance = Math.hypot(pointer2.clientX - pointer1.clientX, pointer2.clientY - pointer1.clientY);\n\n if (prevDistance && deltaCenterPoint) {\n const delta = prevDistance - distance;\n const absDelta = Math.abs(delta);\n\n // Zoom only if we are \"pinching\" more than we are moving the pointers\n if (absDelta > Math.abs(deltaCenterPoint.left) && absDelta > Math.abs(deltaCenterPoint.top)) {\n // Update scale on next frame (focused on the center point between the two pointers)\n const newScale = Math.exp(-delta / 100);\n updateScaleOnNextFrame(newScale, centerPoint);\n }\n }\n\n prevDistance = distance;\n }\n\n previousCenterPoint = centerPoint;\n }\n function onPointerUp(event: PointerEvent) {\n prevDistance = null;\n previousCenterPoint = null;\n delete activePointers[event.pointerId];\n }\n\n scrollArea.addEventListener('wheel', onWheel, { passive: false });\n const isMultiTouch = navigator.maxTouchPoints >= 2;\n if (isMultiTouch) {\n scrollArea.addEventListener('pointerdown', onPointerDown);\n scrollArea.addEventListener('pointermove', onPointerMove);\n scrollArea.addEventListener('pointerup', onPointerUp);\n }\n return () => {\n scrollArea.removeEventListener('wheel', onWheel);\n if (isMultiTouch) {\n scrollArea.removeEventListener('pointerdown', onPointerDown);\n scrollArea.removeEventListener('pointermove', onPointerMove);\n scrollArea.removeEventListener('pointerup', onPointerUp);\n }\n };\n }, [animateScroll, onScaleChange, scrollAreaRef]);\n\n return isPointerZooming;\n}\n","import React from 'react';\nimport type { Point, RectSize } from '@lumx/react/utils/type';\n\n/** Maintains the scroll position centered relative to the original scroll area's dimensions when the content scales. */\nexport function useAnimateScroll(scrollAreaRef: React.RefObject<HTMLDivElement>) {\n return React.useMemo(() => {\n let animationFrame: number | null = null;\n\n return function animate(centerPoint?: Point, initialScrollAreaSize?: RectSize) {\n const scrollArea = scrollAreaRef.current as HTMLDivElement;\n if (!scrollArea) {\n return;\n }\n\n // Cancel previously running animation\n if (animationFrame) cancelAnimationFrame(animationFrame);\n\n // Center on the given point or else on the scroll area visual center\n const clientHeightRatio = centerPoint?.y ? centerPoint.y / scrollArea.clientHeight : 0.5;\n const clientWidthRatio = centerPoint?.x ? centerPoint.x / scrollArea.clientWidth : 0.5;\n\n const initialScrollHeight = initialScrollAreaSize?.height || scrollArea.scrollHeight;\n const initialScrollWidth = initialScrollAreaSize?.width || scrollArea.scrollWidth;\n\n const heightCenter = scrollArea.scrollTop + scrollArea.clientHeight * clientHeightRatio;\n const heightRatio = heightCenter / initialScrollHeight;\n\n const widthCenter = scrollArea.scrollLeft + scrollArea.clientWidth * clientWidthRatio;\n const widthRatio = widthCenter / initialScrollWidth;\n\n let prevScrollHeight = 0;\n let prevScrollWidth = 0;\n\n function nextFrame() {\n const { scrollHeight, scrollWidth, clientHeight, clientWidth } = scrollArea;\n\n // Scroll area stopped expanding => stop animation\n if (scrollHeight === prevScrollHeight && scrollWidth === prevScrollWidth) {\n animationFrame = null;\n return;\n }\n\n // Compute next scroll position\n const top = heightRatio * scrollHeight - clientHeight * clientHeightRatio;\n const left = widthRatio * scrollWidth - clientWidth * clientWidthRatio;\n\n scrollArea.scrollTo({ top, left });\n prevScrollHeight = scrollHeight;\n prevScrollWidth = scrollWidth;\n animationFrame = requestAnimationFrame(nextFrame);\n }\n animationFrame = requestAnimationFrame(nextFrame);\n };\n }, [scrollAreaRef]);\n}\n","import React from 'react';\n\nimport { SlideshowItem, Thumbnail } from '@lumx/react';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useSizeOnWindowResize } from '@lumx/react/hooks/useSizeOnWindowResize';\nimport { useImageSize } from '@lumx/react/hooks/useImageSize';\nimport { isReducedMotion } from '@lumx/react/utils/browser/isReducedMotion';\nimport { isEqual } from '@lumx/react/utils/object/isEqual';\n\nimport { classNames } from '@lumx/core/js/utils';\nimport { CLASSNAME } from '../constants';\nimport { usePointerZoom } from './usePointerZoom';\nimport { useAnimateScroll } from './useAnimateScroll';\nimport type { ImageProps } from '../types';\n\nconst { element } = classNames.bem(CLASSNAME);\n\nexport interface ImageSlideProps {\n image: ImageProps;\n isActive?: boolean;\n scale?: number;\n onScaleChange?: (value: number) => void;\n}\n\n/** Internal image slide component for ImageLightbox */\nexport const ImageSlide = React.memo((props: ImageSlideProps) => {\n const {\n isActive,\n scale,\n onScaleChange,\n image: { image, imgRef: propImgRef, imgProps, alt, loadingPlaceholderImageRef },\n } = props;\n\n // Get scroll area size\n const scrollAreaRef = React.useRef<HTMLDivElement>(null);\n const [scrollAreaSize, updateSize] = useSizeOnWindowResize(scrollAreaRef);\n React.useEffect(() => {\n // Update size when active\n if (isActive) updateSize();\n }, [isActive, updateSize]);\n\n // Get image size\n const imgRef = React.useRef<HTMLImageElement>(null);\n const imageSize = useImageSize(imgRef, () => {\n const width = Number.parseInt(imgProps?.width as any, 10);\n const height = Number.parseInt(imgProps?.height as any, 10);\n return width && height ? { width, height } : null;\n });\n\n // Calculate new image size with scale\n const scaledImageSize = React.useMemo(() => {\n if (!scrollAreaSize || !imageSize) {\n return null;\n }\n const horizontalScale = scrollAreaSize.width / imageSize.width;\n const verticalScale = scrollAreaSize.height / imageSize.height;\n const baseScale = Math.min(1, Math.min(horizontalScale, verticalScale));\n return {\n width: imageSize.width * baseScale * (scale ?? 1),\n height: imageSize.height * baseScale * (scale ?? 1),\n };\n }, [scrollAreaSize, imageSize, scale]);\n\n // Animate scroll to preserve the center of the current visible window in the scroll area\n const animateScroll = useAnimateScroll(scrollAreaRef);\n\n // Zoom via mouse wheel or multi-touch pinch zoom\n const isPointerZooming = usePointerZoom(scrollAreaRef, onScaleChange, animateScroll);\n\n // Animate scroll on scale change\n React.useLayoutEffect(() => {\n if (scale && !isPointerZooming) {\n animateScroll();\n }\n }, [isPointerZooming, scale, animateScroll]);\n\n const isScrollable =\n scaledImageSize &&\n scrollAreaSize &&\n (scaledImageSize.width > scrollAreaSize.width || scaledImageSize.height > scrollAreaSize.height);\n\n return (\n <SlideshowItem\n ref={scrollAreaRef}\n // Make it accessible to keyboard nav when the zone is scrollable\n tabIndex={isScrollable ? 0 : undefined}\n className={element('image-slide')}\n >\n <Thumbnail\n imgRef={useMergeRefs(imgRef, propImgRef)}\n image={image}\n alt={alt}\n className={element('thumbnail')}\n imgProps={{\n ...imgProps,\n style: {\n ...imgProps?.style,\n ...(scaledImageSize || {\n maxHeight: scrollAreaSize?.height,\n maxWidth: scrollAreaSize?.width,\n }),\n // Only animate when scale is set, and we are not pointer zooming and the user does not prefer reduced motion\n transition: scale && !isPointerZooming && !isReducedMotion() ? 'all 250ms' : undefined,\n },\n }}\n loadingPlaceholderImageRef={loadingPlaceholderImageRef}\n />\n </SlideshowItem>\n );\n}, isEqual);\n","import React from 'react';\n\nimport { mdiMagnifyMinusOutline, mdiMagnifyPlusOutline } from '@lumx/icons';\nimport { FlexBox, IconButton, Slides, SlideshowControls } from '@lumx/react';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\n\nimport memoize from 'lodash/memoize';\nimport { classNames } from '@lumx/core/js/utils';\nimport { ImageCaption } from '../../image-block/ImageCaption';\nimport { CLASSNAME } from '../constants';\nimport type { ImagesProps, InheritedSlideShowProps, ZoomButtonProps } from '../types';\nimport { ImageSlide } from './ImageSlide';\n\nconst { element } = classNames.bem(CLASSNAME);\n\nexport interface ImageSlideshowProps extends InheritedSlideShowProps, ZoomButtonProps, ImagesProps {\n currentPaginationItemRef?: React.Ref<HTMLButtonElement>;\n footerRef?: React.Ref<HTMLDivElement>;\n}\n\n/** Internal image slideshow component for ImageLightbox */\nexport const ImageSlideshow: React.FC<ImageSlideshowProps> = ({\n activeImageIndex,\n images,\n slideGroupLabel,\n zoomInButtonProps,\n zoomOutButtonProps,\n slideshowControlsProps,\n currentPaginationItemRef,\n footerRef,\n activeImageRef,\n}) => {\n const {\n activeIndex,\n slideshowId,\n setSlideshow,\n slideshowSlidesId,\n slidesCount,\n onNextClick,\n onPaginationClick,\n onPreviousClick,\n toggleAutoPlay,\n } = SlideshowControls.useSlideshowControls({\n itemsCount: images.length,\n activeIndex: activeImageIndex,\n });\n\n // Image metadata (caption)\n const title = images[activeIndex]?.title;\n const description = images[activeIndex]?.description;\n const tags = images[activeIndex]?.tags;\n const metadata =\n title || description || tags ? (\n <ImageCaption as=\"div\" title={title} description={description} tags={tags} align=\"center\" />\n ) : null;\n\n // Slideshow controls\n const slideShowControls =\n slidesCount > 1 && slideshowControlsProps ? (\n <SlideshowControls\n activeIndex={activeIndex}\n slidesCount={slidesCount}\n onNextClick={onNextClick}\n onPreviousClick={onPreviousClick}\n onPaginationClick={onPaginationClick}\n {...slideshowControlsProps}\n paginationItemProps={(index: number) => {\n const props = slideshowControlsProps?.paginationItemProps?.(index) || {};\n return {\n ...props,\n ref: mergeRefs(\n (props as any)?.ref,\n // Focus the active pagination item once on mount\n activeIndex === index ? currentPaginationItemRef : undefined,\n ),\n };\n }}\n />\n ) : null;\n\n // Zoom controls\n const [scale, setScale] = React.useState<number | undefined>(undefined);\n const zoomEnabled = zoomInButtonProps && zoomOutButtonProps;\n const onScaleChange = React.useMemo(() => {\n if (!zoomEnabled) return undefined;\n return (newScale: number) => {\n setScale((prevScale = 1) => Math.max(1, newScale * prevScale));\n };\n }, [zoomEnabled]);\n const zoomIn = React.useCallback(() => onScaleChange?.(1.5), [onScaleChange]);\n const zoomOut = React.useCallback(() => onScaleChange?.(0.5), [onScaleChange]);\n React.useEffect(() => {\n // Reset scale on slide change\n if (typeof activeIndex === 'number') setScale(undefined);\n }, [activeIndex]);\n const zoomControls = zoomEnabled && (\n <>\n <IconButton {...zoomInButtonProps} emphasis=\"low\" icon={mdiMagnifyPlusOutline} onClick={zoomIn} />\n <IconButton\n {...zoomOutButtonProps}\n emphasis=\"low\"\n isDisabled={!scale || scale <= 1}\n icon={mdiMagnifyMinusOutline}\n onClick={zoomOut}\n />\n </>\n );\n\n const getImgRef = React.useMemo(\n () =>\n memoize(\n (index: number, isActive: boolean) => {\n return mergeRefs(images?.[index].imgRef, isActive ? activeImageRef : undefined);\n },\n // memoize based on both arguments\n (...args) => args.join(),\n ),\n [images, activeImageRef],\n );\n\n return (\n <>\n <Slides\n activeIndex={activeIndex}\n slideGroupLabel={slideGroupLabel}\n fillHeight\n id={slideshowId}\n ref={setSlideshow}\n slidesId={slideshowSlidesId}\n toggleAutoPlay={toggleAutoPlay}\n >\n {images.map(({ image, imgRef, ...imageProps }, index) => {\n const isActive = index === activeIndex;\n return (\n <ImageSlide\n isActive={isActive}\n key={image}\n image={{\n ...imageProps,\n image,\n imgRef: getImgRef(index, isActive),\n }}\n scale={isActive ? scale : undefined}\n onScaleChange={onScaleChange}\n />\n );\n })}\n </Slides>\n {(metadata || slideShowControls || zoomControls) && (\n <FlexBox ref={footerRef} className={element('footer')} orientation=\"vertical\" vAlign=\"center\" gap=\"big\">\n {metadata}\n\n <FlexBox className={element('footer-actions')} orientation=\"horizontal\" gap=\"regular\">\n {slideShowControls}\n {zoomControls}\n </FlexBox>\n </FlexBox>\n )}\n </>\n );\n};\n","import ReactDOM from 'react-dom';\n\nimport { MaybeElementOrRef } from '@lumx/react/utils/type';\n\nimport { unref } from '../../react/unref';\nimport { isReducedMotion } from '../isReducedMotion';\n\nfunction setupViewTransitionName(elementRef: MaybeElementOrRef<HTMLElement>, name?: string) {\n let originalName: string | null = null;\n return {\n set() {\n const element = unref(elementRef);\n if (!element || !name) return;\n originalName = element.style.viewTransitionName;\n element.style.viewTransitionName = name;\n },\n unset() {\n const element = unref(elementRef);\n if (!element || originalName === null) return;\n element.style.viewTransitionName = originalName;\n },\n };\n}\n\n/**\n * Wrapper around the `document.startViewTransition` handling browser incompatibilities, react DOM flush and\n * user preference.\n *\n * @param changes callback containing the changes to apply within the view transition.\n * @param setViewTransitionName set the `viewTransitionName` style on a `source` & `target` to morph these elements.\n */\nexport async function startViewTransition({\n changes,\n viewTransitionName,\n}: {\n changes: () => void;\n viewTransitionName?: {\n source: MaybeElementOrRef<HTMLElement>;\n target: MaybeElementOrRef<HTMLElement>;\n name: string;\n };\n}) {\n const start = (document as any)?.startViewTransition?.bind(document);\n const prefersReducedMotion = isReducedMotion();\n const { flushSync } = ReactDOM as any;\n if (\n prefersReducedMotion ||\n !start ||\n !flushSync ||\n (viewTransitionName && (!viewTransitionName?.source || !viewTransitionName?.target))\n ) {\n // Skip, apply changes without a transition\n changes();\n return;\n }\n\n // Setup set/unset transition name on source & target\n const sourceTransitionName = setupViewTransitionName(viewTransitionName?.source, viewTransitionName?.name);\n const targetTransitionName = setupViewTransitionName(viewTransitionName?.target, viewTransitionName?.name);\n\n sourceTransitionName.set();\n\n // Start view transition, apply changes & flush to DOM\n await start(() => {\n sourceTransitionName.unset();\n\n flushSync(changes);\n\n targetTransitionName.set();\n }).updateCallbackDone;\n\n targetTransitionName.unset();\n}\n","/** Find image in element including the element */\nexport const findImage = (element: HTMLElement | null): HTMLImageElement | null =>\n element?.matches('img') ? (element as HTMLImageElement) : element?.querySelector('img') || null;\n","import React from 'react';\n\nimport memoize from 'lodash/memoize';\n\nimport { startViewTransition } from '@lumx/react/utils/browser/DOM/startViewTransition';\nimport { findImage } from '@lumx/react/utils/browser/DOM/findImage';\n\nimport type { ImageLightboxProps } from './types';\nimport { CLASSNAME } from './constants';\n\n/** Subset of the ImageLightboxProps managed by the useImageLightbox hook */\ntype ManagedProps = Pick<\n ImageLightboxProps,\n 'isOpen' | 'images' | 'parentElement' | 'activeImageRef' | 'onClose' | 'activeImageIndex'\n>;\n\nconst EMPTY_PROPS: ManagedProps = { isOpen: false, images: [], parentElement: React.createRef() };\n\ntype TriggerOptions = Pick<ImageLightboxProps, 'activeImageIndex'>;\n\n/**\n * Set up an ImageLightbox with images and triggers.\n *\n * - Associate a trigger with the lightbox to properly focus the trigger on close\n * - Associate a trigger with an image to display on open\n * - Automatically provide a view transition between an image trigger and the displayed image on open & close\n *\n * @param props Images to display in the image lightbox\n */\nexport function useImageLightbox<P extends Partial<ImageLightboxProps>>(\n props: P,\n): {\n /**\n * Generates trigger props\n * @param index Provide an index to choose which image to display when the image lightbox opens.\n * */\n getTriggerProps: (options?: TriggerOptions) => { onClick: (ev?: React.MouseEvent) => void; ref: React.Ref<any> };\n /** Props to forward to the ImageLightbox */\n imageLightboxProps: ManagedProps & P;\n} {\n const propsRef = React.useRef(props);\n\n React.useEffect(() => {\n propsRef.current = props;\n }, [props]);\n\n // Keep reference for each image elements\n const imageRefsRef = React.useRef<Array<React.RefObject<HTMLImageElement>>>([]);\n\n const currentImageRef = React.useRef<HTMLImageElement>(null);\n const [imageLightboxProps, setImageLightboxProps] = React.useState(\n () => ({ ...EMPTY_PROPS, ...props }) as ManagedProps & P,\n );\n\n const getTriggerProps = React.useMemo(() => {\n const triggerImageRefs: Record<number, React.RefObject<HTMLImageElement>> = {};\n\n async function close() {\n const currentImage = currentImageRef.current;\n if (!currentImage) {\n return;\n }\n const currentIndex = imageRefsRef.current.findIndex(\n (imageRef) => imageRef.current === currentImage,\n ) as number;\n\n await startViewTransition({\n changes() {\n // Close lightbox\n setImageLightboxProps((prevProps) => ({ ...prevProps, isOpen: false }));\n },\n // Morph from the image in lightbox to the image in trigger\n viewTransitionName: {\n source: currentImageRef,\n target: triggerImageRefs[currentIndex],\n name: CLASSNAME,\n },\n });\n }\n\n async function open(triggerElement: HTMLElement, { activeImageIndex }: TriggerOptions = {}) {\n // If we find an image inside the trigger, animate it in transition with the opening image\n const triggerImage = triggerImageRefs[activeImageIndex as any]?.current || findImage(triggerElement);\n\n // Inject refs to improve transition and loading style\n const images = propsRef.current?.images?.map((image, idx) => {\n // Get or create image reference\n let imgRef = imageRefsRef.current[idx];\n if (!imgRef) {\n imgRef = React.createRef();\n imageRefsRef.current[idx] = imgRef;\n }\n\n // Try to use the trigger image as the loading placeholder\n const loadingPlaceholderImageRef =\n triggerImage && idx === activeImageIndex ? { current: triggerImage } : undefined;\n\n return { loadingPlaceholderImageRef, ...image, imgRef };\n });\n\n await startViewTransition({\n changes: () => {\n // Open lightbox with setup props\n setImageLightboxProps((prevProps) => ({\n ...prevProps,\n ...propsRef.current,\n activeImageRef: currentImageRef,\n parentElement: { current: triggerElement },\n isOpen: true,\n onClose: () => {\n close();\n propsRef.current?.onClose?.();\n },\n images,\n activeImageIndex: activeImageIndex || 0,\n }));\n },\n // Morph from the image in trigger to the image in lightbox\n viewTransitionName: {\n source: triggerImage,\n target: currentImageRef,\n name: CLASSNAME,\n },\n });\n }\n\n return memoize((options?: TriggerOptions) => ({\n ref(element: HTMLElement | null) {\n // Track trigger image ref if any\n if (options?.activeImageIndex !== undefined && element) {\n triggerImageRefs[options.activeImageIndex] = { current: findImage(element) };\n }\n },\n onClick(e?: React.MouseEvent) {\n open(e?.target as HTMLElement, options);\n },\n }));\n }, []);\n\n return { getTriggerProps, imageLightboxProps };\n}\n","import React from 'react';\n\nimport { Lightbox, ThemeProvider } from '@lumx/react';\nimport { ClickAwayProvider } from '@lumx/react/utils';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { classNames } from '@lumx/core/js/utils';\n\nimport { ImageSlideshow } from './internal/ImageSlideshow';\nimport { useImageLightbox } from './useImageLightbox';\nimport type { ImageLightboxProps } from './types';\nimport { CLASSNAME, COMPONENT_NAME } from './constants';\n\nconst Inner = forwardRef<ImageLightboxProps, HTMLDivElement>((props, ref) => {\n const {\n className,\n isOpen,\n closeButtonProps,\n onClose,\n parentElement,\n activeImageIndex,\n slideshowControlsProps,\n slideGroupLabel,\n images,\n zoomOutButtonProps,\n zoomInButtonProps,\n activeImageRef: propImageRef,\n ...forwardedProps\n } = props;\n const currentPaginationItemRef = React.useRef(null);\n const footerRef = React.useRef(null);\n const imageRef = React.useRef(null);\n const clickAwayChildrenRefs = React.useRef([imageRef, footerRef]);\n\n const onClickAway = React.useCallback(\n (evt: Event) => {\n const targetElement = evt.target;\n if (!(targetElement instanceof HTMLElement) || !(evt instanceof MouseEvent)) return;\n\n // Skip click away if clicking on the scrollbar\n if (targetElement.clientWidth < evt.clientX || targetElement.clientHeight < evt.clientY) return;\n\n onClose?.();\n },\n [onClose],\n );\n\n return (\n <Lightbox\n ref={ref}\n className={classNames.join(className, CLASSNAME)}\n parentElement={parentElement}\n isOpen={isOpen}\n onClose={onClose}\n closeButtonProps={closeButtonProps}\n focusElement={currentPaginationItemRef}\n {...forwardedProps}\n // Disable the close on click away as we want a custom one here\n preventAutoClose\n >\n <ClickAwayProvider childrenRefs={clickAwayChildrenRefs} callback={onClickAway}>\n <ThemeProvider value=\"dark\">\n <ImageSlideshow\n activeImageIndex={activeImageIndex}\n slideGroupLabel={slideGroupLabel}\n slideshowControlsProps={slideshowControlsProps}\n images={images}\n zoomInButtonProps={zoomInButtonProps}\n zoomOutButtonProps={zoomOutButtonProps}\n footerRef={footerRef}\n activeImageRef={useMergeRefs(propImageRef, imageRef)}\n currentPaginationItemRef={currentPaginationItemRef}\n />\n </ThemeProvider>\n </ClickAwayProvider>\n </Lightbox>\n );\n});\nInner.displayName = COMPONENT_NAME;\nInner.className = CLASSNAME;\n\n/**\n * ImageLightbox component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ImageLightbox = Object.assign(Inner, { useImageLightbox });\n","import type { ColorVariant, ColorWithVariants, Typography } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface InlineListProps extends HasClassName {\n /**\n * List items to render.\n */\n items?: JSXElement[];\n /**\n * Text color.\n */\n color?: ColorWithVariants;\n /**\n * Lightened or darkened variant of the selected color.\n */\n colorVariant?: ColorVariant;\n /**\n * Typography variant.\n */\n typography?: Typography;\n /**\n * Activate line wrap on overflow.\n */\n wrap?: boolean;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'InlineList';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-inline-list';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<InlineListProps> = {};\n\n/**\n * InlineList component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const InlineList = (props: InlineListProps) => {\n const { className, color, colorVariant, typography, items = [], wrap, ref, ...forwardedProps } = props;\n return (\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <ul\n {...forwardedProps}\n ref={ref}\n className={classNames.join(\n className,\n block({ wrap: Boolean(wrap) }),\n color && classNames.font(color, colorVariant),\n typography && classNames.typography(typography),\n )}\n // Lists with removed bullet style can lose their a11y list role on some browsers\n role=\"list\"\n >\n {items.map((item, index) => (\n // We need to item is set as display: contents which removes the semantic.\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <li key={index} role=\"listitem\" className={element('item')}>\n {index !== 0 && (\n <span className={element('item-separator')} aria-hidden=\"true\">\n {'\\u00A0•\\u00A0'}\n </span>\n )}\n {item}\n </li>\n ))}\n </ul>\n );\n};\n\nInlineList.displayName = COMPONENT_NAME;\nInlineList.className = CLASSNAME;\nInlineList.defaultProps = DEFAULT_PROPS;\n","import { Children } from 'react';\n\nimport {\n InlineList as UI,\n type InlineListProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/InlineList';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface InlineListProps extends GenericProps, ReactToJSX<UIProps, 'items'> {\n /**\n * Children\n */\n children?: React.ReactNode;\n}\n\n/**\n * InlineList component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const InlineList = forwardRef<InlineListProps, HTMLUListElement>((props, ref) => {\n const { children, ...rest } = props;\n return UI({ ...rest, ref, items: Children.toArray(children) as any });\n});\n\nInlineList.displayName = COMPONENT_NAME;\nInlineList.className = CLASSNAME;\nInlineList.defaultProps = DEFAULT_PROPS;\n","import { InputHelper as UI, InputHelperProps as UIProps } from '@lumx/core/js/components/InputHelper';\nimport { Theme } from '@lumx/react';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface InputHelperProps extends ReactToJSX<UIProps>, GenericProps {}\n\n/**\n * InputHelper component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const InputHelper = forwardRef<InputHelperProps, HTMLParagraphElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n return UI({ ...props, ref, theme: props.theme || defaultTheme });\n});\n\nInputHelper.displayName = UI.displayName;\nInputHelper.className = UI.className;\nInputHelper.defaultProps = UI.defaultProps;\n","import { Theme } from '@lumx/react';\nimport { InputLabel as UI, InputLabelProps as UIProps } from '@lumx/core/js/components/InputLabel';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface InputLabelProps extends ReactToJSX<UIProps>, GenericProps {}\n\n/**\n * InputLabel component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const InputLabel = forwardRef<InputLabelProps, HTMLLabelElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n return UI({ ...props, ref, theme: props.theme || defaultTheme });\n});\n\nInputLabel.displayName = UI.displayName;\nInputLabel.className = UI.className;\nInputLabel.defaultProps = UI.defaultProps;\n","import { mdiClose } from '@lumx/icons';\nimport type { AriaAttributes, CommonRef, HasClassName, LumxClassName, HasTheme, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\n\nexport interface BaseLightboxProps\n extends HasClassName,\n HasTheme,\n Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Whether to keep the dialog open on clickaway or escape press. */\n preventAutoClose?: boolean;\n /** Z-axis position. */\n zIndex?: number;\n}\n\n/**\n * Defines the props of the component.\n */\nexport interface LightboxProps extends BaseLightboxProps {\n /**\n * @deprecated Use `aria-label` instead.\n */\n ariaLabel?: string;\n /**\n * @deprecated Use `aria-labelledby` instead.\n */\n ariaLabelledBy?: string;\n /** Props to pass to the close button (minus those already set by the Lightbox props). */\n closeButtonProps?: any;\n /** Whether the component is still visible (e.g. during the close transition). */\n isVisible?: boolean;\n /** Reference to the element that triggered modal opening to set focus on. */\n parentElement?: CommonRef;\n /** Reference to the element that should get the focus when the lightbox opens. By default, the close button or the lightbox itself will take focus. */\n focusElement?: CommonRef;\n /** On close callback. */\n handleClose?(): void;\n /** Children */\n children?: JSXElement;\n /** Reference to the lightbox root element. */\n ref?: CommonRef;\n /** Reference to the wrapper div containing the children. */\n childrenRef?: CommonRef;\n /** Refs used for click-away detection. */\n clickAwayRefs?: any;\n /** Reference to the close button element. */\n closeButtonRef?: CommonRef;\n /** Portal component for rendering the lightbox outside the DOM hierarchy. */\n Portal: any;\n /** HeadingLevelProvider component injected by the framework wrapper. */\n HeadingLevelProvider: any;\n /** ThemeProvider component injected by the framework wrapper. */\n ThemeProvider: any;\n /** ClickAwayProvider component injected by the framework wrapper. */\n ClickAwayProvider: any;\n /** IconButton component injected by the framework wrapper. */\n IconButton: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Lightbox';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-lightbox';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Lightbox component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Lightbox = (props: LightboxProps) => {\n const {\n 'aria-labelledby': propAriaLabelledBy,\n ariaLabelledBy = propAriaLabelledBy,\n 'aria-label': propAriaLabel,\n ariaLabel = propAriaLabel,\n children,\n className,\n closeButtonProps,\n isOpen,\n handleClose,\n parentElement,\n focusElement,\n preventAutoClose,\n theme,\n zIndex,\n isVisible,\n ref,\n Portal,\n HeadingLevelProvider,\n ThemeProvider,\n ClickAwayProvider,\n childrenRef,\n clickAwayRefs,\n closeButtonRef,\n IconButton,\n ...forwardedProps\n } = props;\n if (!isOpen && !isVisible) return null;\n\n return (\n <Portal>\n <div\n ref={ref}\n {...forwardedProps}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-modal=\"true\"\n role=\"dialog\"\n tabIndex={-1}\n className={classNames.join(\n className,\n block({\n 'is-hidden': !isOpen,\n 'is-shown': isOpen || isVisible,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n style={{ zIndex }}\n >\n {closeButtonProps && (\n <div className={element('close')}>\n <IconButton\n {...closeButtonProps}\n ref={closeButtonRef}\n emphasis=\"low\"\n hasBackground\n icon={mdiClose}\n theme=\"dark\"\n type=\"button\"\n onClick={handleClose}\n />\n </div>\n )}\n <HeadingLevelProvider level={2}>\n <ThemeProvider value={undefined}>\n <ClickAwayProvider callback={!preventAutoClose && handleClose} childrenRefs={clickAwayRefs}>\n <div ref={childrenRef} className={element('wrapper')} role=\"presentation\">\n {children}\n </div>\n </ClickAwayProvider>\n </ThemeProvider>\n </HeadingLevelProvider>\n </div>\n </Portal>\n );\n};\n","import { RefObject, useRef, useEffect } from 'react';\n\nimport { HeadingLevelProvider, IconButton, IconButtonProps } from '@lumx/react';\nimport { DIALOG_TRANSITION_DURATION, DOCUMENT } from '@lumx/react/constants';\nimport { GenericProps } from '@lumx/react/utils/type';\n\nimport { useFocusTrap } from '@lumx/react/hooks/useFocusTrap';\nimport { useDisableBodyScroll } from '@lumx/react/hooks/useDisableBodyScroll';\nimport { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';\nimport { useTransitionVisibility } from '@lumx/react/hooks/useTransitionVisibility';\nimport { ThemeProvider } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { Portal } from '@lumx/react/utils';\n\nimport {\n Lightbox as UI,\n CLASSNAME,\n COMPONENT_NAME,\n BaseLightboxProps as UIProps,\n} from '@lumx/core/js/components/Lightbox';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface LightboxProps extends GenericProps, ReactToJSX<UIProps> {\n /** Props to pass to the close button (minus those already set by the Lightbox props). */\n closeButtonProps?: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;\n /** Reference to the element that triggered modal opening to set focus on. */\n parentElement: RefObject<any>;\n /** Reference to the element that should get the focus when the lightbox opens. By default, the close button or the lightbox itself will take focus. */\n focusElement?: RefObject<HTMLElement>;\n /** On close callback. */\n onClose?(): void;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Lightbox component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Lightbox = forwardRef<LightboxProps, HTMLDivElement>((props, ref) => {\n const {\n children,\n className,\n closeButtonProps,\n isOpen,\n onClose,\n parentElement,\n focusElement,\n preventAutoClose,\n theme,\n zIndex,\n ...forwardedProps\n } = props;\n if (!DOCUMENT) {\n // Can't render in SSR.\n return null;\n }\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const childrenRef = useRef<any>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const wrapperRef = useRef<HTMLDivElement>(null);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const closeButtonRef = useRef<HTMLButtonElement>(null);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useDisableBodyScroll(isOpen && wrapperRef.current);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const isVisible = useTransitionVisibility(wrapperRef, !!isOpen, DIALOG_TRANSITION_DURATION);\n\n // Handle focus trap.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useFocusTrap(\n // Focus trap zone\n isOpen && wrapperRef.current,\n // Focus element (fallback on close button and then on the dialog)\n focusElement?.current || closeButtonRef.current || wrapperRef.current,\n );\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const previousOpen = useRef(isOpen);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n if (isOpen !== previousOpen.current) {\n previousOpen.current = isOpen;\n\n // Focus the parent element on close.\n if (!isOpen && parentElement && parentElement.current) {\n parentElement.current.focus();\n }\n }\n }, [isOpen, parentElement]);\n\n // Close lightbox on escape key pressed.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useCallbackOnEscape(onClose);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const clickAwayRefs = useRef([wrapperRef]);\n\n if (!isOpen && !isVisible) return null;\n\n return UI({\n ClickAwayProvider,\n HeadingLevelProvider,\n IconButton,\n parentElement,\n Portal,\n ThemeProvider,\n children,\n childrenRef,\n className,\n clickAwayRefs,\n closeButtonProps,\n closeButtonRef,\n focusElement,\n isOpen,\n isVisible,\n ref: mergeRefs(ref, wrapperRef),\n theme,\n zIndex,\n preventAutoClose,\n handleClose: onClose,\n ...forwardedProps,\n });\n});\nLightbox.displayName = COMPONENT_NAME;\nLightbox.className = CLASSNAME;\n","import type { CommonRef, HasDisabled, JSXElement, LumxClassName } from '../../types';\nimport { HasAriaDisabled, HasClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ColorVariant, ColorWithVariants, Typography } from '../../constants';\nimport { resolveColorWithVariants } from '../../utils/_internal/color';\nimport { RawClickable } from '../RawClickable';\n\n/**\n * Defines the props of the component.\n */\nexport interface LinkProps extends HasClassName, HasAriaDisabled, HasDisabled {\n /** Children content */\n children?: JSXElement;\n /** Color variant. */\n color?: ColorWithVariants;\n /** Lightened or darkened variant of the selected icon color. */\n colorVariant?: ColorVariant;\n /** Link href. */\n href?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Custom element/component for the link. */\n linkAs?: string | any;\n /** Click handler (framework wrappers convert onClick to handleClick). */\n handleClick?: (event: any) => void;\n /** Link target. */\n target?: string;\n /** Typography variant. */\n typography?: Typography;\n /** Element ref. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Link';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-link';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<LinkProps> = {};\n\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Link component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Link = (props: LinkProps) => {\n const {\n children,\n className,\n color: propColor,\n colorVariant: propColorVariant,\n typography,\n linkAs,\n handleClick,\n ref,\n href,\n ...forwardedProps\n } = props;\n\n const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);\n\n return RawClickable({\n ref,\n as: linkAs || (href ? 'a' : 'button'),\n href,\n ...forwardedProps,\n handleClick,\n children,\n className: classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n [`color-variant-${colorVariant}`]: Boolean(colorVariant),\n 'has-typography': !!typography,\n }),\n typography && classNames.typography(typography),\n ),\n });\n};\n","import { Icon } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { wrapChildrenIconWithSpaces } from '@lumx/react/utils/react/wrapChildrenIconWithSpaces';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { classNames } from '@lumx/core/js/utils';\nimport { Link as UI, LinkProps as UIProps, CLASSNAME, COMPONENT_NAME } from '@lumx/core/js/components/Link';\n\nconst { element } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface LinkProps extends GenericProps, ReactToJSX<UIProps> {\n /**\n * Left icon (SVG path).\n * @deprecated Instead, simply nest `<Icon />` in the children\n */\n leftIcon?: string;\n /** Click handler. */\n onClick?: (event: React.MouseEvent) => void;\n /**\n * Right icon (SVG path).\n * @deprecated Instead, simply nest `<Icon />` in the children\n */\n rightIcon?: string;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Link component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Link = forwardRef<LinkProps, HTMLAnchorElement | HTMLButtonElement>((props, ref) => {\n const { disabledStateProps, otherProps } = useDisableStateProps(props);\n const { children, leftIcon, rightIcon, linkAs, onClick, ...forwardedProps } = otherProps;\n\n return UI({\n ref,\n ...disabledStateProps,\n ...forwardedProps,\n linkAs,\n handleClick: onClick,\n children: wrapChildrenIconWithSpaces(\n <>\n {leftIcon && <Icon icon={leftIcon} className={element('left-icon')} />}\n {children && <span className={element('content')}>{children}</span>}\n {rightIcon && <Icon icon={rightIcon} className={element('right-icon')} />}\n </>,\n ),\n });\n});\n\nLink.displayName = COMPONENT_NAME;\nLink.className = CLASSNAME;\n","import { AspectRatio, ColorPalette, ColorVariant, Size, Theme } from '../../constants';\nimport type { CommonRef, HasClassName, LumxClassName, GenericProps, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface LinkPreviewProps extends HasClassName, HasTheme {\n /** Description. */\n description?: string;\n /** Link URL. */\n link: string;\n /** Custom component for the link (can be used to inject a router Link). */\n linkAs?: 'a' | any;\n /** Props to pass to the link (minus those already set by the LinkPreview props). */\n linkProps?: GenericProps;\n /** Size variant. */\n size?: Extract<Size, 'regular' | 'big'>;\n /** Thumbnail for the link preview. */\n thumbnailProps?: GenericProps;\n /** Title. */\n title?: string;\n /** Ref forwarded to the root article element. */\n ref?: CommonRef;\n /** Heading element used to wrap the title. */\n TitleHeading: any;\n /** Link component injected by the framework wrapper. */\n Link: any;\n /** Thumbnail component injected by the framework wrapper. */\n Thumbnail: any;\n}\n\nexport type LinkPreviewPropsToOverride = 'linkProps' | 'TitleHeading' | 'Link' | 'Thumbnail' | 'thumbnailProps';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'LinkPreview';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-link-preview';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {\n size: Size.regular,\n titleHeading: 'h2',\n} as const;\n\n/**\n * LinkPreview component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const LinkPreview = (props: LinkPreviewProps) => {\n const {\n className,\n description,\n link,\n linkAs,\n linkProps,\n size = DEFAULT_PROPS.size,\n theme,\n thumbnailProps,\n ref,\n title,\n TitleHeading,\n Link,\n Thumbnail,\n ...forwardedProps\n } = props;\n // Use title heading as title wrapper (see DEFAULT_PROPS for the default value).\n const adjustedSize = size === Size.big && thumbnailProps ? Size.big : Size.regular;\n\n return (\n <article\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`size-${adjustedSize}`]: Boolean(adjustedSize),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('wrapper')}>\n {thumbnailProps && (\n <div className={element('thumbnail')}>\n <Thumbnail\n {...thumbnailProps}\n linkAs={linkAs}\n linkProps={{\n ...linkProps,\n href: link,\n target: '_blank',\n // Avoid redundant links in focus order\n tabIndex: -1,\n }}\n aspectRatio={AspectRatio.free}\n fillHeight\n />\n </div>\n )}\n\n <div className={element('container')}>\n {title && (\n <TitleHeading className={element('title')}>\n <Link\n {...linkProps}\n linkAs={linkAs}\n target=\"_blank\"\n href={link}\n color={theme === Theme.light ? ColorPalette.dark : ColorPalette.light}\n colorVariant={ColorVariant.N}\n >\n {title}\n </Link>\n </TitleHeading>\n )}\n\n {description && <p className={element('description')}>{description}</p>}\n\n <div className={element('link')}>\n <Link\n {...linkProps}\n linkAs={linkAs}\n className={classNames.join(element('link'), linkProps?.className)}\n target=\"_blank\"\n href={link}\n color={theme === Theme.light ? ColorPalette.primary : ColorPalette.light}\n colorVariant={ColorVariant.N}\n // Avoid redundant links in focus order\n tabIndex={title ? '-1' : undefined}\n >\n {link}\n </Link>\n </div>\n </div>\n </div>\n </article>\n );\n};\n","import { Link, LinkProps, Theme, Thumbnail } from '@lumx/react';\n\nimport { GenericProps, HeadingElement } from '@lumx/react/utils/type';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n LinkPreview as UI,\n LinkPreviewProps as UIProps,\n LinkPreviewPropsToOverride,\n} from '@lumx/core/js/components/LinkPreview';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface LinkPreviewProps extends GenericProps, ReactToJSX<UIProps, LinkPreviewPropsToOverride> {\n /** Props to pass to the link (minus those already set by the LinkPreview props). */\n linkProps?: Omit<LinkProps, 'color' | 'colorVariant' | 'href' | 'target'>;\n /** Customize the title heading tag. */\n titleHeading?: HeadingElement;\n}\n\n/**\n * LinkPreview component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const LinkPreview = forwardRef<LinkPreviewProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, titleHeading = DEFAULT_PROPS.titleHeading, ...forwardedProps } = props;\n // Use title heading as title wrapper (see DEFAULT_PROPS for the default value).\n const TitleHeading = titleHeading as HeadingElement;\n\n return UI({\n theme,\n TitleHeading,\n ref,\n Link,\n Thumbnail,\n ...forwardedProps,\n });\n});\n\nLinkPreview.displayName = COMPONENT_NAME;\nLinkPreview.className = CLASSNAME;\nLinkPreview.defaultProps = DEFAULT_PROPS;\n","import { ElementType, ReactNode, SyntheticEvent } from 'react';\n\nimport { ComponentRef, HasPolymorphicAs, HasRequiredLinkHref } from '@lumx/react/utils/type';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ListItemAction as UI,\n ListItemActionProps as UIProps,\n} from '@lumx/core/js/components/List/ListItemAction';\nimport { forwardRefPolymorphic } from '@lumx/react/utils/react/forwardRefPolymorphic';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * ListItem.Action props.\n */\nexport type ListItemActionProps<E extends ElementType = 'button'> = HasPolymorphicAs<E> &\n GenericProps &\n ReactToJSX<UIProps, 'children'> &\n HasRequiredLinkHref<E> & {\n /** Content of the action (label). */\n children: ReactNode;\n /** On click callback. */\n onClick?(evt: SyntheticEvent): void;\n };\n\n/**\n * ListItem.Action sub-component.\n *\n * Renders a button or link with action area classes.\n * When placed as a child of ListItem, it activates the action area pattern:\n * the entire list item becomes visually clickable, while other interactive\n * elements (in `before`/`after` slots) remain independently clickable.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ListItemAction = Object.assign(\n forwardRefPolymorphic(<E extends ElementType = 'button'>(props: ListItemActionProps<E>, ref: ComponentRef<E>) => {\n const { children, onClick, ...forwardedProps } = props;\n return UI({ ...forwardedProps, handleClick: onClick, ref, children });\n }),\n { displayName: COMPONENT_NAME, className: CLASSNAME, defaultProps: DEFAULT_PROPS },\n);\n","import { ReactNode, Ref, SyntheticEvent } from 'react';\n\nimport { GenericProps, HasAriaDisabled } from '@lumx/react/utils/type';\nimport {\n ListItem as UI,\n ListItemProps as UIProps,\n ListItemPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/List/ListItem';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport { ListItemAction } from './ListItemAction';\n\nexport type { ListItemSize } from '@lumx/core/js/components/List/ListItem';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListItemProps extends GenericProps, HasAriaDisabled, ReactToJSX<UIProps, ListItemPropsToOverride> {\n /** A component to be rendered after the content. */\n after?: ReactNode;\n /** A component to be rendered before the content. */\n before?: ReactNode;\n /** Content. */\n children: string | ReactNode;\n /** Reference to the <li> element. */\n listItemRef?: Ref<HTMLLIElement>;\n /** Reference to the link element. */\n linkRef?: Ref<HTMLAnchorElement>;\n /** On click callback. */\n onClick?(event: SyntheticEvent): void;\n /** @alias onClick */\n onItemSelected?(evt: SyntheticEvent): void;\n}\n\n/**\n * ListItem component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nconst _ListItem = forwardRef<ListItemProps, HTMLLIElement>((props, ref) => {\n const { disabledStateProps, otherProps } = useDisableStateProps(props);\n const { onItemSelected, onClick, linkRef, ...forwardedProps } = otherProps;\n\n const handleClick = (event: any) => {\n onItemSelected?.(event);\n onClick?.(event);\n };\n\n return UI({\n ...forwardedProps,\n isDisabled: disabledStateProps.disabled,\n 'aria-disabled': disabledStateProps['aria-disabled'],\n ref,\n linkRef,\n handleClick: onItemSelected || props.onClick ? handleClick : undefined,\n });\n});\n_ListItem.displayName = COMPONENT_NAME;\n_ListItem.className = CLASSNAME;\n_ListItem.defaultProps = DEFAULT_PROPS;\n\n/**\n * ListItem component with Action sub-component.\n */\nexport const ListItem = Object.assign(_ListItem, {\n /** Sub-component that renders the default action (button or link) for the action area pattern. */\n Action: ListItemAction,\n});\n","import { ReactNode } from 'react';\n\nimport { GenericProps } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListSubheaderProps extends GenericProps {\n /** Content. */\n children: string | ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ListSubheader';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list-subheader';\n\n/**\n * ListSubheader component.\n * @deprecated ListSubheader produces improper list structure. use ListSection instead.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ListSubheader = forwardRef<ListSubheaderProps, HTMLLIElement>((props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <li ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </li>\n );\n});\nListSubheader.displayName = COMPONENT_NAME;\nListSubheader.className = CLASSNAME;\n","import { mdiDotsVertical } from '@lumx/icons';\nimport type { JSXElement, LumxClassName } from '../../types';\n\nexport type MenuButtonVariant = 'button' | 'icon-button' | 'chip' | 'link';\n\nexport const DEFAULT_PROPS = {\n variant: 'button',\n} satisfies Partial<MenuButtonProps>;\n\n/** ARIA keys set by MenuButton on the trigger — omitted from variant component props. */\ntype MenuButtonAriaKeys = 'aria-haspopup' | 'aria-controls' | 'aria-expanded';\n\n/** Per-variant keys internally managed by MenuButton — omitted from variant component props. */\ntype MenuButtonVariantsInternalKeys = {\n button: MenuButtonAriaKeys;\n 'icon-button': MenuButtonAriaKeys;\n chip: MenuButtonAriaKeys | 'isClickable';\n link: MenuButtonAriaKeys | 'href' | 'linkAs';\n};\n\n/** Discriminated union of MenuButton props across all trigger variants. */\nexport type MenuButtonVariantsProps<TBase, TVariantProps extends Record<MenuButtonVariant, any>> = {\n [V in MenuButtonVariant]: TBase &\n (V extends 'button' ? { variant?: V } : { variant: V }) &\n Omit<TVariantProps[V], MenuButtonVariantsInternalKeys[V] | keyof TBase>;\n}[MenuButtonVariant];\n\nexport interface MenuButtonProps {\n variant?: MenuButtonVariant;\n label?: JSXElement;\n children?: JSXElement;\n triggerProps?: Record<string, any>;\n popoverProps?: Record<string, any>;\n onOpen?: (isOpen: boolean) => void;\n}\n\nexport interface MenuButtonComponents {\n MenuProvider: any;\n MenuTrigger: any;\n MenuPopover: any;\n MenuList: any;\n}\n\nexport const COMPONENT_NAME = 'MenuButton';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-button';\n\n/** Menu button core template (composition of menu provider, trigger, popover and list) */\nexport const MenuButton = (\n props: MenuButtonProps,\n { MenuProvider, MenuTrigger, MenuPopover, MenuList }: MenuButtonComponents,\n) => {\n const { label, children, triggerProps, popoverProps, onOpen, variant } = props;\n\n const extraTriggerProps: Record<string, any> = {};\n if (variant === 'chip') {\n // Chip render as clickable (since the component cannot detect this automatically)\n extraTriggerProps.isClickable = true;\n }\n\n let triggerChildren;\n if (variant === 'icon-button') {\n // Label as prop (renders as tooltip label)\n extraTriggerProps.label = label;\n // Default icon\n if (!triggerProps?.icon) {\n extraTriggerProps.icon = mdiDotsVertical;\n }\n } else {\n // Only set the label as children when we are not displaying an icon-button\n triggerChildren = label;\n }\n\n return (\n <MenuProvider onOpen={onOpen}>\n <MenuTrigger {...triggerProps} {...extraTriggerProps}>\n {triggerChildren}\n </MenuTrigger>\n <MenuPopover {...popoverProps}>\n <MenuList>{children}</MenuList>\n </MenuPopover>\n </MenuProvider>\n );\n};\n","/**\n * CSS selector for menu items (inner focusable element). Includes disabled items: per\n * WAI-ARIA APG they stay focusable so AT announces them; click is no-op'd via `aria-disabled`.\n */\nexport const MENU_ITEM_SELECTOR = '[data-menu-item]';\n\n/** Get an item's text label (trimmed `textContent`) for typeahead matching. */\nexport function getItemText(item: HTMLElement): string {\n return item.textContent?.trim() ?? '';\n}\n\n/** Get all item elements within a menu container, in DOM order (includes disabled). */\nexport function getItems(menu: HTMLElement): HTMLElement[] {\n return Array.from(menu.querySelectorAll<HTMLElement>(MENU_ITEM_SELECTOR));\n}\n","import { createListFocusNavigation, ListFocusNavigationController } from '../../utils/focusNavigation';\nimport { createTypeahead } from '../../utils/typeahead';\nimport { createSelectorTreeWalker } from '../../utils/browser/createSelectorTreeWalker';\nimport { TABBABLE_ELEMENTS_SELECTOR, DISABLED_SELECTOR } from '../../utils/focus/constants';\nimport { isPrintableKey } from '../../utils/browser/isPrintableKey';\nimport { MENU_ITEM_SELECTOR, getItems, getItemText } from './utils';\nimport type { MenuEventMap, MenuHandle, SetupMenuOptions } from './types';\n\n/**\n * Find and focus the next sequential focusable element after the given trigger\n * in document tab order. Used by Tab-at-last-item to move focus forward past\n * the (now-closed) menu.\n */\nfunction moveFocusAfterTrigger(trigger: HTMLElement) {\n const allFocusable = Array.from(document.querySelectorAll<HTMLElement>(TABBABLE_ELEMENTS_SELECTOR)).filter(\n (el) => !el.matches(DISABLED_SELECTOR) && el.tabIndex >= 0,\n );\n const triggerIdx = allFocusable.indexOf(trigger);\n if (triggerIdx === -1) return;\n const next = allFocusable[triggerIdx + 1];\n next?.focus();\n}\n\n/**\n * Set up a disclosure-pattern menu handle.\n *\n * The trigger is registered separately via {@link MenuHandle.registerTrigger}\n * once the trigger mounts. The menu container is registered separately via\n * {@link MenuHandle.registerMenu} once on mount — the popover uses\n * `closeMode=\"hide\"` so the `<ul>` stays in the DOM at all times.\n *\n * IMPORTANT: this is the **disclosure widget** pattern, NOT WAI-ARIA's\n * `role=\"menu\"`. Items are native `<button>` / `<a>` elements with `tabindex=\"0\"`,\n * so screen readers announce them naturally and Tab navigates between them in\n * DOM order. There is no focus trap.\n *\n * @param options Options (menuId for `aria-controls`).\n * @returns A {@link MenuHandle} for interacting with the menu.\n */\nexport function setupMenu(options: SetupMenuOptions = {}): MenuHandle {\n const { menuId } = options;\n\n let trigger: HTMLElement | null = null;\n let menu: HTMLElement | null = null;\n let isOpenState = false;\n\n /** Handle-lifetime abort controller (typeahead, etc.). */\n const handleAbort = new AbortController();\n /** Per-registration controller for trigger listeners. */\n let triggerAbort: AbortController | null = null;\n /** Per-registration controller for menu list listeners. */\n let menuAbort: AbortController | null = null;\n /** List focus nav controller */\n let focusNav: ListFocusNavigationController | null = null;\n /** Menu handle */\n let handle: MenuHandle;\n\n /**\n * Shared typeahead controller (handle lifetime). Shared between the trigger and the\n * menu list so a character typed on the closed trigger lands in the same buffer that\n * in-menu typing reads.\n */\n const typeahead = createTypeahead(\n () => (menu ? createSelectorTreeWalker(menu, MENU_ITEM_SELECTOR) : null),\n getItemText,\n handleAbort.signal,\n );\n\n const subscribers: { [E in keyof MenuEventMap]: Set<(value: MenuEventMap[E]) => void> } = {\n open: new Set(),\n };\n\n function notify<E extends keyof MenuEventMap>(event: E, value: MenuEventMap[E]) {\n subscribers[event].forEach((cb) => cb(value));\n }\n\n /** Open the menu (if not already open), then navigate */\n function openAndGoTo(resolve: Parameters<ListFocusNavigationController['goTo']>[0]) {\n if (!isOpenState) handle.setOpen(true);\n focusNav?.goTo(resolve);\n }\n\n /**\n * Accumulate a printable key into the shared typeahead buffer, then navigate to the\n * matching item using `goToItem` (immediate, for use inside the open menu).\n * Returns the matched item, or `null` when nothing matches.\n */\n function handleTypeaheadInMenu(key: string, currentItem: HTMLElement | null): HTMLElement | null {\n const match = typeahead.handle(key, currentItem);\n if (match) focusNav?.goTo(() => match);\n return match;\n }\n\n handle = {\n get trigger() {\n return trigger;\n },\n\n setOpen(open: boolean) {\n if (isOpenState === open) return;\n isOpenState = open;\n if (trigger) trigger.setAttribute('aria-expanded', String(open));\n notify('open', open);\n },\n\n registerTrigger(el: HTMLElement) {\n if (trigger && trigger !== el) {\n triggerAbort?.abort();\n triggerAbort = null;\n }\n trigger = el;\n\n triggerAbort = new AbortController();\n const { signal } = triggerAbort;\n\n // Set ARIA attributes.\n trigger.setAttribute('aria-haspopup', 'true');\n trigger.setAttribute('aria-expanded', String(isOpenState));\n if (menuId) trigger.setAttribute('aria-controls', menuId);\n\n // Click toggles the menu. When opening via click, focus the first item.\n trigger.addEventListener(\n 'click',\n () => {\n if (!isOpenState) {\n openAndGoTo((n) => n.getFirst());\n } else {\n handle.setOpen(false);\n }\n },\n { signal },\n );\n\n // Native `<button>` fires `click` on Enter/Space; other elements (Chip, role=\"button\",\n // href-less `<a>`, …) don't, so we fire it manually.\n const needsManualActivation = trigger.tagName !== 'BUTTON';\n\n trigger.addEventListener(\n 'keydown',\n (event) => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n event.stopPropagation();\n openAndGoTo((n) => n.getFirst());\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n event.stopPropagation();\n openAndGoTo((n) => n.getLast());\n break;\n\n case 'Enter':\n case ' ':\n // Native <button> already fires `click` on Enter/Space → skip to avoid double-toggle.\n if (!needsManualActivation) break;\n event.preventDefault();\n event.stopPropagation();\n el.click();\n break;\n\n default:\n // Printable char on closed trigger → open menu, focus matching item.\n // When open, the list-side handler owns typeahead (skip here to avoid\n // double-buffering the char).\n if (!isOpenState && isPrintableKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n // Buffer the char; items don't exist yet, matches on flushPendingNavigation\n typeahead.handle(event.key, null);\n focusNav?.goTo((n) => typeahead.rematch(n.activeItem) ?? n.getFirst());\n handle.setOpen(true);\n }\n break;\n }\n },\n { signal },\n );\n\n return () => {\n if (trigger === el) {\n triggerAbort?.abort();\n triggerAbort = null;\n trigger = null;\n }\n };\n },\n\n registerMenu(el: HTMLElement) {\n if (menu && menu !== el) {\n menuAbort?.abort();\n menuAbort = null;\n }\n menu = el;\n\n menuAbort = new AbortController();\n const { signal } = menuAbort;\n\n // ── Focus navigation ──────────────────────────────────\n focusNav = createListFocusNavigation(\n {\n type: 'list',\n container: menu,\n itemSelector: MENU_ITEM_SELECTOR,\n wrap: true,\n getActiveItem: () => {\n const active = document.activeElement;\n if (!active || !el.contains(active)) return null;\n return active as HTMLElement;\n },\n },\n {\n onActivate: (item) => {\n item.focus({ preventScroll: false });\n },\n onDeactivate: () => {\n // No-op — focus moves naturally via item.focus().\n },\n onClear: () => {\n // No-op.\n },\n },\n signal,\n );\n\n // ── Keyboard handlers ─────────────────────────────────\n menu.addEventListener(\n 'keydown',\n (event) => {\n // Modifier+key combos other than Shift+Tab should pass through.\n if (event.altKey || event.ctrlKey || event.metaKey) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goDown();\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goUp();\n break;\n\n case 'Home':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goTo((s) => s.getFirst());\n break;\n\n case 'End':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goTo((s) => s.getLast());\n break;\n\n case 'Escape':\n event.preventDefault();\n event.stopPropagation();\n // Focus trigger before closing: with closeMode=\"hide\" items unmount,\n // which would otherwise leave focus on body.\n trigger?.focus();\n handle.setOpen(false);\n break;\n\n case 'Tab': {\n // Tab-at-edge: close menu and move focus manually. The popover stays\n // mounted (closeMode=\"hide\") but items unmount on close, so the focused\n // item disappears before the browser resolves the next tab stop. Blur the\n // active item (so Popover skips focus-restore), close, then move focus\n // forward (Tab) or to the trigger (Shift+Tab).\n const items = getItems(el);\n if (items.length === 0) return;\n const idx = items.indexOf(document.activeElement as HTMLElement);\n if (idx === -1) return;\n\n if (event.shiftKey && idx === 0) {\n event.preventDefault();\n // Focus trigger explicitly for deterministic timing.\n trigger?.focus();\n handle.setOpen(false);\n } else if (!event.shiftKey && idx === items.length - 1) {\n event.preventDefault();\n // Blur active item so focusAnchorOnClose won't kick in.\n (document.activeElement as HTMLElement)?.blur();\n handle.setOpen(false);\n // After unmount, focus the next element after the trigger.\n setTimeout(() => {\n if (trigger) moveFocusAfterTrigger(trigger);\n }, 0);\n }\n break;\n }\n\n default:\n // Printable characters → typeahead among visible items, navigate immediately.\n if (isPrintableKey(event)) {\n const active = document.activeElement;\n const currentItem = active && el.contains(active) ? (active as HTMLElement) : null;\n const match = handleTypeaheadInMenu(event.key, currentItem);\n if (match) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n break;\n }\n },\n { signal },\n );\n\n return () => {\n if (menu === el) {\n menuAbort?.abort();\n menuAbort = null;\n menu = null;\n }\n };\n },\n\n flushPendingNavigation() {\n focusNav?.flushPendingNavigation();\n },\n\n subscribe<E extends keyof MenuEventMap>(event: E, listener: (value: MenuEventMap[E]) => void) {\n subscribers[event].add(listener);\n return () => {\n subscribers[event].delete(listener);\n };\n },\n\n destroy() {\n handleAbort.abort();\n triggerAbort?.abort();\n menuAbort?.abort();\n triggerAbort = null;\n menuAbort = null;\n trigger = null;\n menu = null;\n isOpenState = false;\n for (const set of Object.values(subscribers)) {\n set.clear();\n }\n },\n };\n\n return handle;\n}\n","import { createContext, RefObject, useContext } from 'react';\n\nimport type { MenuHandle } from '@lumx/core/js/components/Menu/types';\n\n/** Context value shared between Menu sub-components. */\nexport interface MenuContextValue {\n handle: MenuHandle;\n menuId: string;\n triggerId: string;\n anchorRef: RefObject<HTMLElement | null>;\n}\n\nexport const MenuContext = createContext<MenuContextValue | undefined>(undefined);\n\n/** Use Menu context. @throws if used outside `MenuProvider`. */\nexport function useMenuContext(): MenuContextValue {\n const context = useContext(MenuContext);\n if (!context) {\n throw new Error('Menu sub-components must be used within a MenuProvider');\n }\n return context;\n}\n","import { ReactNode, useEffect, useMemo, useRef } from 'react';\n\nimport { setupMenu } from '@lumx/core/js/components/Menu/setupMenu';\nimport { useId } from '@lumx/react/hooks/useId';\n\nimport { MenuContext } from './context/MenuContext';\n\n/** MenuProvider props. */\nexport interface MenuProviderProps {\n /** Menu content (Trigger, Popover, Menu, …). */\n children?: ReactNode;\n /** Callback fired when the menu open state changes. */\n onOpen?: (isOpen: boolean) => void;\n}\n\n/**\n * MenuProvider component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport function MenuProvider(props: MenuProviderProps) {\n const { children, onOpen } = props;\n const menuId = useId();\n const triggerId = useId();\n const anchorRef = useRef<HTMLElement>(null);\n const handle = useMemo(() => setupMenu({ menuId }), [menuId]);\n\n // Forward 'open' events to the consumer callback via a ref to avoid stale closures.\n const onOpenRef = useRef(onOpen);\n onOpenRef.current = onOpen;\n useEffect(() => {\n const unsubscribe = handle.subscribe('open', (isOpen) => onOpenRef.current?.(isOpen));\n // Cleanup\n return () => {\n unsubscribe();\n handle.destroy();\n };\n }, [handle]);\n\n const contextValue = useMemo(() => ({ handle, menuId, triggerId, anchorRef }), [handle, menuId, triggerId]);\n\n return <MenuContext.Provider value={contextValue}>{children}</MenuContext.Provider>;\n}\n\nMenuProvider.displayName = 'Menu.Provider';\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/** MenuTrigger props. */\nexport interface MenuTriggerProps extends HasClassName {\n /** Content of the trigger (label / icon / etc.). */\n children?: JSXElement;\n /** The id of the trigger element. */\n id?: string;\n /** The id of the menu container (for `aria-controls`). */\n menuId?: string;\n /** Whether the menu is currently open. */\n isOpen?: boolean;\n /** ref to the trigger element. */\n ref?: CommonRef;\n}\n\n/** Framework components injected by wrappers. */\nexport interface MenuTriggerComponents {\n /** Component to render as the trigger (e.g. Button, IconButton, Chip, link). */\n Trigger: any;\n}\n\nexport const COMPONENT_NAME = 'MenuTrigger';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-trigger';\n\n/** MenuTrigger core template. Renders `Trigger` with disclosure ARIA attributes. */\nexport const MenuTrigger = (props: MenuTriggerProps, { Trigger }: MenuTriggerComponents) => {\n const { children, className, menuId, isOpen, ref, ...forwardedProps } = props;\n\n return (\n <Trigger\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, CLASSNAME)}\n aria-haspopup=\"true\"\n aria-controls={menuId}\n aria-expanded={isOpen ? 'true' : 'false'}\n >\n {children}\n </Trigger>\n );\n};\n","import { useEffect, useState } from 'react';\n\nimport type { MenuEventMap } from '@lumx/core/js/components/Menu/types';\n\nimport { useMenuContext } from './MenuContext';\n\n/**\n * Subscribe to a menu event via the handle's subscriber system.\n * Re-subscribes when the handle changes (e.g. trigger mount/unmount).\n *\n * @param event Event name to subscribe to.\n * @param initialValue Initial value used until the first event fires.\n * @returns The latest event payload (or `initialValue`).\n */\nexport function useMenuEvent<E extends keyof MenuEventMap>(event: E, initialValue: MenuEventMap[E]): MenuEventMap[E] {\n const { handle } = useMenuContext();\n const [value, setValue] = useState(initialValue);\n useEffect(() => {\n return handle.subscribe(event, setValue);\n }, [handle, event]);\n return value;\n}\n","import { useCallback } from 'react';\n\nimport { useMenuContext } from './MenuContext';\nimport { useMenuEvent } from './useMenuEvent';\n\n/**\n * Subscribe to the menu open state.\n *\n * @returns `[isOpen, setIsOpen]` — open state and a setter that proxies to `handle.setOpen`.\n */\nexport function useMenuOpen(): [boolean, (open: boolean) => void] {\n const { handle } = useMenuContext();\n const isOpen = useMenuEvent('open', false);\n const setIsOpen = useCallback((open: boolean) => handle.setOpen(open), [handle]);\n return [isOpen, setIsOpen];\n}\n","import { ElementType, useEffect, useRef } from 'react';\n\nimport {\n MenuTrigger as UI,\n MenuTriggerProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Menu/MenuTrigger';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRefPolymorphic } from '@lumx/react/utils/react/forwardRefPolymorphic';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { ComponentRef, HasPolymorphicAs, HasRequiredLinkHref } from '@lumx/react/utils/type';\n\nimport { Button } from '../button';\nimport { useMenuContext } from './context/MenuContext';\nimport { useMenuOpen } from './context/useMenuOpen';\n\n/** MenuTrigger props. Polymorphic */\nexport type MenuTriggerProps<E extends ElementType = typeof Button> = Omit<\n HasPolymorphicAs<E>,\n 'aria-haspopup' | 'aria-controls' | 'aria-expanded'\n> &\n HasRequiredLinkHref<E> &\n ReactToJSX<UIProps, 'isOpen' | 'menuId'>;\n\n/**\n * MenuTrigger component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const MenuTrigger = Object.assign(\n forwardRefPolymorphic(<E extends ElementType = typeof Button>(props: MenuTriggerProps<E>, ref: ComponentRef<E>) => {\n const { menuId, triggerId, anchorRef, handle } = useMenuContext();\n const [isOpen] = useMenuOpen();\n const { as, children, ...triggerProps } = props as any;\n const TriggerComp = as ?? Button;\n\n const internalRef = useRef<HTMLElement>(null);\n const mergedRef = useMergeRefs(ref as any, internalRef, anchorRef);\n\n // Register trigger with the handle on mount; clean up on unmount.\n useEffect(() => {\n const triggerEl = internalRef.current;\n if (!triggerEl) return undefined;\n return handle.registerTrigger(triggerEl);\n }, [handle]);\n\n return UI(\n {\n ...triggerProps,\n id: triggerProps.id ?? triggerId,\n menuId,\n isOpen,\n ref: mergedRef,\n children,\n },\n { Trigger: TriggerComp },\n );\n }),\n { displayName: COMPONENT_NAME, className: CLASSNAME },\n);\n","import type { HasClassName, JSXElement, LumxClassName } from '../../types';\nimport type { Placement } from '../Popover/constants';\nimport { classNames } from '../../utils';\nimport { PopoverProps } from '../Popover';\n\n/** MenuPopover props. */\nexport interface MenuPopoverProps\n extends HasClassName,\n Pick<PopoverProps, 'placement' | 'anchorRef' | 'isOpen' | 'handleClose'> {\n /** Popover content (a `Menu`). */\n children?: JSXElement;\n}\n\n/** Framework components injected by wrappers. */\nexport interface MenuPopoverComponents {\n /** Popover component (framework-specific). */\n Popover: any;\n /** FlexBox component (framework-specific). */\n FlexBox: any;\n}\n\nexport const COMPONENT_NAME = 'MenuPopover';\n\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-popover';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/** MenuPopover core template. Renders a `Popover` with menu-friendly defaults. */\nexport const MenuPopover = (props: MenuPopoverProps, { Popover, FlexBox }: MenuPopoverComponents) => {\n const {\n children,\n className,\n isOpen,\n placement = 'bottom-start' as Placement,\n anchorRef,\n handleClose,\n ...forwardedProps\n } = props;\n\n return (\n <Popover\n {...forwardedProps}\n placement={placement}\n anchorRef={anchorRef}\n isOpen={isOpen}\n onClose={handleClose}\n closeOnClickAway\n closeOnEscape\n usePortal={false}\n focusAnchorOnClose\n withFocusTrap={false}\n closeMode=\"hide\"\n fitToAnchorWidth={false}\n className={block([className])}\n >\n <FlexBox orientation=\"vertical\" className={element('scroll')}>\n {children}\n </FlexBox>\n </Popover>\n );\n};\n","import { ReactNode } from 'react';\n\nimport {\n MenuPopover as UI,\n MenuPopoverProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Menu/MenuPopover';\nimport { Popover } from '@lumx/react/components/popover';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport { FlexBox } from '../flex-box';\nimport { useMenuContext } from './context/MenuContext';\nimport { useMenuOpen } from './context/useMenuOpen';\n\n/** Popover props forwarded to the inner Popover (minus managed props). */\n\n/** MenusPopover props. */\nexport interface MenuPopoverProps extends ReactToJSX<UIProps, 'isOpen' | 'anchorRef' | 'handleClose'> {\n /** Content (should contain a `Menu`). */\n children: ReactNode;\n}\n\n/**\n * MenuPopover component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const MenuPopover = (props: MenuPopoverProps) => {\n const { anchorRef } = useMenuContext();\n const [isOpen, setIsOpen] = useMenuOpen();\n const { children, ...popoverProps } = props;\n\n return UI(\n {\n ...popoverProps,\n children,\n isOpen,\n anchorRef,\n handleClose: () => setIsOpen(false),\n },\n { Popover, FlexBox },\n );\n};\n\nMenuPopover.displayName = COMPONENT_NAME;\nMenuPopover.className = CLASSNAME;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { List } from '../List';\n\n/** Menu list props. */\nexport type MenuListProps = HasClassName & {\n /** Menu content (MenuItem, ListDivider, ListSection…). */\n children?: JSXElement;\n /** The id of the menu container element (matches `aria-controls` on the trigger). */\n id?: string;\n /** The id of the element that labels the menu (auto-set to the trigger id by wrappers). */\n 'aria-labelledby'?: string;\n /** ref to the root `<ul>` element. */\n ref?: CommonRef;\n};\n\nexport const COMPONENT_NAME = 'Menu';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu';\n\n/** MenuList core template. Wraps `List` with menu-specific class and ARIA labelling. */\nexport const MenuList = (props: MenuListProps) => {\n const { 'aria-labelledby': ariaLabelledby, children, className, id, ref, ...rest } = props;\n\n return List({\n ...rest,\n ref,\n id,\n className: classNames.join(className, CLASSNAME),\n itemPadding: 'big',\n 'aria-labelledby': ariaLabelledby,\n children,\n } as any);\n};\n","import { useLayoutEffect, useRef } from 'react';\n\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport {\n MenuList as UI,\n MenuListProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Menu/MenuList';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport { useMenuContext } from './context/MenuContext';\nimport { useMenuOpen } from './context/useMenuOpen';\n\nexport type MenuProps = Omit<ReactToJSX<UIProps>, 'id' | 'aria-labelledby'>;\n\n/**\n * MenuList component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const MenuList = forwardRef<MenuProps, HTMLElement>((props, ref) => {\n const { menuId, triggerId, handle } = useMenuContext();\n const internalRef = useRef<HTMLElement>(null);\n const mergedRef = useMergeRefs(ref, internalRef);\n const { children, ...forwardedProps } = props;\n const [isOpen] = useMenuOpen();\n\n // Register menu in context\n useLayoutEffect(() => {\n const menu = internalRef.current;\n if (!menu) return undefined;\n return handle.registerMenu(menu);\n }, [handle]);\n\n // Flush pending navigation (that could not be done when the menu was closed)\n useLayoutEffect(() => {\n if (isOpen) handle.flushPendingNavigation();\n }, [handle, isOpen]);\n\n return UI({\n ...forwardedProps,\n id: menuId,\n 'aria-labelledby': triggerId,\n ref: mergedRef,\n children: isOpen ? children : null,\n });\n});\n\nMenuList.displayName = COMPONENT_NAME;\nMenuList.className = CLASSNAME;\n","import React, { type ForwardedRef } from 'react';\n\nimport {\n DEFAULT_PROPS,\n MenuButton as UI,\n type MenuButtonProps as UIProps,\n type MenuButtonVariantsProps,\n COMPONENT_NAME,\n type MenuButtonVariant,\n} from '@lumx/core/js/components/Menu/MenuButton';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport { MenuProvider } from './MenuProvider';\nimport { MenuTrigger } from './MenuTrigger';\nimport { MenuPopover, type MenuPopoverProps } from './MenuPopover';\nimport { MenuList } from './MenuList';\n\nimport { Button, IconButton, type ButtonProps, type IconButtonProps } from '../button';\nimport { Chip, type ChipProps } from '../chip';\nimport { Link, type LinkProps } from '../link';\n\n/** Props that MenuButton explicitly declares. */\ntype MenuButtonBase = ReactToJSX<UIProps, 'triggerProps' | 'variant'> & {\n children?: React.ReactNode;\n popoverProps?: MenuPopoverProps;\n onOpen?: (isOpen: boolean) => void;\n label: string;\n};\n\n/** MenuButton props — discriminated union over the variant to inherit the target component's props. */\nexport type MenuButtonProps = MenuButtonVariantsProps<\n MenuButtonBase,\n {\n button: ButtonProps;\n 'icon-button': IconButtonProps;\n chip: ChipProps;\n link: LinkProps;\n }\n>;\n\n/** Menu trigger button component by variant */\nconst TRIGGER_COMPONENTS = {\n button: Button,\n 'icon-button': IconButton,\n chip: Chip,\n link: Link,\n} satisfies Record<MenuButtonVariant, unknown>;\n\n/**\n * MenuButton component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const MenuButton = forwardRef<MenuButtonProps>((props, ref: ForwardedRef<HTMLElement>) => {\n const { label, children, popoverProps, onOpen, variant = DEFAULT_PROPS.variant, ...triggerProps } = props;\n\n return UI(\n {\n label,\n children,\n popoverProps,\n onOpen,\n variant,\n triggerProps: { ...triggerProps, as: TRIGGER_COMPONENTS[variant], ref },\n },\n { MenuProvider, MenuTrigger, MenuPopover, MenuList },\n );\n});\n\nMenuButton.displayName = COMPONENT_NAME;\nMenuButton.defaultProps = DEFAULT_PROPS;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ListItem } from '../List/ListItem';\nimport { ListItemAction } from '../List/ListItemAction';\n\n/** MenuItem props. */\nexport interface MenuItemProps extends HasClassName {\n /** Item label content. */\n children?: JSXElement;\n /** Content rendered before the label (e.g. an icon). */\n before?: JSXElement;\n /** Content rendered after the label (e.g. a shortcut hint). */\n after?: JSXElement;\n /** Whether the item is disabled. Skipped by Tab and arrow nav. */\n isDisabled?: boolean;\n /** Click handler for the action element. */\n handleClick?(event: any): void;\n /** Extra props forwarded to the inner action element (e.g. link props when `as=\"a\"`). */\n actionProps?: Record<string, any>;\n /** ref to the inner action element (the focusable `<button>` / `<a>`). */\n actionRef?: CommonRef;\n /** ref to the root `<li>` element. */\n ref?: CommonRef;\n}\n\n/** Props overridden by framework wrappers. */\nexport type MenuItemPropsToOverride = 'before' | 'after' | 'children' | 'handleClick' | 'actionProps' | 'actionRef';\n\nexport const COMPONENT_NAME = 'MenuItem';\n\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-item';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/** MenuItem core template. Renders a `ListItem` with a `ListItemAction`. */\nexport const MenuItem = (props: MenuItemProps) => {\n const { children, className, before, after, isDisabled, handleClick, actionProps, actionRef, ref, ...rest } = props;\n\n const actionElement = ListItemAction({\n as: 'button',\n type: 'button',\n ...actionProps,\n ref: actionRef,\n className: element('action'),\n handleClick,\n 'data-menu-item': '',\n 'aria-disabled': isDisabled ? 'true' : undefined,\n children,\n } as any);\n\n return ListItem({\n ref,\n size: 'tiny',\n ...rest,\n className: classNames.join(className, block()),\n before,\n after,\n children: actionElement,\n } as any);\n};\n","import { ElementType, ReactNode, SyntheticEvent, useRef } from 'react';\nimport type { ReactElement, Ref } from 'react';\n\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { HasPolymorphicAs, HasRequiredLinkHref } from '@lumx/react/utils/type';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ColorPalette } from '@lumx/core/js/constants';\nimport {\n MenuItem as UI,\n MenuItemProps as UIProps,\n MenuItemPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Menu/MenuItem';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport { Icon } from '../icon';\nimport { Text } from '../text';\nimport { useMenuContext } from './context/MenuContext';\n\n/** Props forwarded to the inner action element. */\nexport type MenuItemActionProps<E extends ElementType = 'button'> = HasPolymorphicAs<E> & HasRequiredLinkHref<E>;\n\n/** MenuItem props. */\nexport interface MenuItemProps<E extends ElementType = 'button'>\n extends GenericProps,\n ReactToJSX<UIProps, MenuItemPropsToOverride> {\n /** Item label content. */\n children?: ReactNode;\n /** Click handler. Calls `event.preventDefault()` to keep the menu open. */\n onClick?(event: SyntheticEvent): void;\n /** MDI icon rendered as `<Icon size=\"xs\" />` prepended to the `before` slot. */\n icon?: string;\n /** MDI icon rendered as `<Icon size=\"xs\" />` appended to the `after` slot. */\n afterIcon?: string;\n /** Foreground color applied to the icon and label text. */\n color?: ColorPalette;\n /** Content rendered before the label (rendered AFTER `icon` if both are provided). */\n before?: ReactNode;\n /** Content rendered after the label (e.g. a shortcut hint). */\n after?: ReactNode;\n /** Props forwarded to the inner action element (`{ as: 'a', href: '/foo' }`, etc.). */\n actionProps?: MenuItemActionProps<E>;\n}\n\n/**\n * MenuItem component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const MenuItem: {\n <E extends ElementType = 'button'>(props: MenuItemProps<E> & { ref?: Ref<HTMLLIElement> }): ReactElement | null;\n readonly $$typeof: symbol;\n displayName: typeof COMPONENT_NAME;\n className: typeof CLASSNAME;\n} = forwardRef<MenuItemProps, HTMLLIElement>((props, ref) => {\n const { handle } = useMenuContext();\n const { children, icon, afterIcon, color, before, after, isDisabled, onClick, actionProps, ...rest } = props;\n\n const internalRef = useRef<HTMLLIElement>(null);\n const actionRef = useRef<HTMLElement>(null);\n const mergedRef = useMergeRefs(ref, internalRef);\n\n const handleClick = (event: SyntheticEvent) => {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n if (!event.defaultPrevented) {\n // Focus the trigger before closing so focus restoration works with\n // closeMode=\"hide\" (items unmount on close, leaving focus on body).\n handle.trigger?.focus();\n handle.setOpen(false);\n }\n };\n\n // Prepend the optional `icon` to the `before` slot — consumer-supplied `before`\n // (if any) is rendered after the icon to preserve composability.\n const mergedBefore = icon ? (\n <>\n <Icon icon={icon} size=\"xs\" color={color} />\n {before}\n </>\n ) : (\n before\n );\n\n // Append the optional `afterIcon` to the `after` slot.\n const mergedAfter = afterIcon ? (\n <>\n {after}\n <Icon icon={afterIcon} size=\"xs\" color={color} />\n </>\n ) : (\n after\n );\n\n return UI({\n ...rest,\n ref: mergedRef,\n actionRef,\n before: mergedBefore,\n after: mergedAfter,\n children: (\n <Text as=\"span\" color={color}>\n {children}\n </Text>\n ),\n isDisabled,\n actionProps,\n handleClick,\n });\n}) as any;\n\nMenuItem.displayName = COMPONENT_NAME;\nMenuItem.className = CLASSNAME;\n","import { mdiAlert, mdiAlertCircle, mdiCheckCircle, mdiClose, mdiInformation } from '@lumx/icons';\nimport { ColorPalette, Emphasis, Kind, Size } from '../../constants';\nimport type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { IconButton } from '../Button/IconButton';\n\n/**\n * Defines the props of the component.\n */\nexport interface MessageProps extends HasClassName {\n /** Content. */\n children?: JSXElement;\n /** Whether the message has a background or not. */\n hasBackground?: boolean;\n /** Message variant. */\n kind?: Kind;\n /** Message custom icon SVG path. */\n icon?: string;\n /** Reference to the message container element. */\n ref?: CommonRef;\n /**\n * Displays a close button.\n *\n * NB: only available if `kind === 'info' && hasBackground === true`\n */\n closeButtonProps?: {\n /** The callback called when the button is clicked */\n onClick: () => void;\n /** The label of the close button. */\n label: string;\n };\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Message';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-message';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Associative map from message kind to color and icon.\n */\nexport const CONFIG = {\n [Kind.error]: { color: ColorPalette.red, icon: mdiAlert },\n [Kind.info]: { color: ColorPalette.blue, icon: mdiInformation },\n [Kind.success]: { color: ColorPalette.green, icon: mdiCheckCircle },\n [Kind.warning]: { color: ColorPalette.yellow, icon: mdiAlertCircle },\n};\n\n/**\n * Message component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Message = (props: MessageProps) => {\n const {\n children,\n className,\n hasBackground,\n kind,\n icon: customIcon,\n closeButtonProps,\n ref,\n ...forwardedProps\n } = props;\n const { color, icon } = CONFIG[kind as Kind] || {};\n const { onClick, label: closeButtonLabel } = closeButtonProps || {};\n const isCloseButtonDisplayed = hasBackground && kind === 'info' && onClick && closeButtonLabel;\n\n return (\n <div\n {...forwardedProps}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n 'has-background': hasBackground,\n }),\n )}\n >\n {(customIcon || icon) &&\n Icon({ className: element('icon'), icon: customIcon || icon, size: Size.xs, color })}\n <div className={element('text')}>{children}</div>\n {isCloseButtonDisplayed &&\n IconButton({\n className: element('close-button'),\n icon: mdiClose,\n handleClick: onClick,\n label: closeButtonLabel,\n emphasis: Emphasis.low,\n })}\n </div>\n );\n};\n\nMessage.displayName = COMPONENT_NAME;\nMessage.className = CLASSNAME;\n","import { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { Message as UI, CLASSNAME, COMPONENT_NAME, MessageProps as UIProps } from '@lumx/core/js/components/Message';\nimport { GenericProps } from '@lumx/core/js/types';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport interface MessageProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * Message component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Message = forwardRef<MessageProps, HTMLDivElement>((props, ref) => {\n return UI({\n ...props,\n ref,\n });\n});\n\nMessage.displayName = COMPONENT_NAME;\nMessage.className = CLASSNAME;\n","import take from 'lodash/take';\n\nimport { Alignment, AspectRatio } from '../../constants';\nimport type { CommonRef, HasClassName, LumxClassName, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface MosaicProps extends HasClassName, HasTheme {\n /** Thumbnails. */\n thumbnails: any[];\n /** On image click callback. */\n handleClick?(index: number): void;\n Thumbnail: any;\n ref?: CommonRef;\n}\n\nexport type MosaicPropsToOverride = 'Thumbnail' | 'thumbnails';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Mosaic';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-mosaic';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<MosaicProps> = {};\n\n/**\n * Mosaic component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Mosaic = (props: MosaicProps) => {\n const { className, theme, thumbnails, handleClick, Thumbnail, ref, ...forwardedProps } = props;\n const onImageClick = () => {\n if (!handleClick) return undefined;\n\n return (index: number, onClick?: any): any =>\n (event: any) => {\n onClick?.(event);\n handleClick?.(index);\n };\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n 'has-1-thumbnail': thumbnails?.length === 1,\n 'has-2-thumbnails': thumbnails?.length === 2,\n 'has-3-thumbnails': thumbnails?.length === 3,\n 'has-4-thumbnails': thumbnails?.length >= 4,\n }),\n )}\n >\n <div className={element('wrapper')}>\n {take(thumbnails, 4).map((thumbnail: any, index: number) => {\n const { image, onClick, align, ...thumbnailProps } = thumbnail;\n\n return (\n <div key={index} className={element('thumbnail')}>\n <Thumbnail\n {...thumbnailProps}\n align={align || Alignment.left}\n image={image}\n theme={theme}\n aspectRatio={AspectRatio.free}\n fillHeight\n onClick={onImageClick()?.(index, onClick) || onClick}\n />\n\n {thumbnails.length > 4 && index === 3 && (\n <div className={element('overlay')}>\n <span>+{thumbnails.length - 4}</span>\n </div>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n","import { useTheme } from '@lumx/react/utils/theme/ThemeContext';\n\nimport { Theme, Thumbnail, ThumbnailProps } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n Mosaic as UI,\n MosaicProps as UIProps,\n MosaicPropsToOverride,\n} from '@lumx/core/js/components/Mosaic';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface MosaicProps extends GenericProps, ReactToJSX<UIProps, MosaicPropsToOverride> {\n /** Thumbnails. */\n thumbnails: ThumbnailProps[];\n /** On image click callback. */\n onImageClick?(index: number): void;\n}\n\n/**\n * Mosaic component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Mosaic = forwardRef<MosaicProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, onImageClick, ...forwardedProps } = props;\n\n return UI({\n ref,\n theme,\n Thumbnail,\n handleClick: onImageClick,\n ...forwardedProps,\n });\n});\n\nMosaic.displayName = COMPONENT_NAME;\nMosaic.className = CLASSNAME;\nMosaic.defaultProps = DEFAULT_PROPS;\n","import { createContext } from 'react';\n\nimport { Orientation } from '@lumx/core/js/constants';\n\nexport const NavigationContext = createContext<{ orientation?: Orientation } | undefined>({\n orientation: Orientation.vertical,\n});\n","import type { LumxClassName } from '@lumx/core/js/types';\n\n/**\n * Component display name.\n */\nexport const ITEM_COMPONENT_NAME = 'NavigationItem';\n\n/**\n * Component default class name and class prefix.\n */\nexport const ITEM_CLASSNAME: LumxClassName<typeof ITEM_COMPONENT_NAME> = 'lumx-navigation-item';\n","import { useRef, useState, useContext } from 'react';\n\nimport { mdiChevronDown, mdiChevronUp } from '@lumx/icons';\nimport { Icon, Size, Text, Orientation, Popover, Placement, Theme } from '@lumx/react';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { HasClassName } from '@lumx/react/utils/type';\nimport { ThemeProvider, useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { RawClickable } from '@lumx/core/js/components/RawClickable';\n\nimport { NavigationContext } from './context';\nimport { ITEM_CLASSNAME } from './constants';\n\nexport interface NavigationSectionProps extends React.ComponentPropsWithoutRef<'button'>, HasClassName {\n /** Items inside the section */\n children: React.ReactNode;\n /** Icon (SVG path). */\n icon?: string;\n /** Label content. */\n label: string | React.ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'NavigationSection';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-navigation-section';\nconst { block: sectionBlock, element: sectionElement } = classNames.bem(CLASSNAME);\nconst { block: itemBlock, element: itemElement } = classNames.bem(ITEM_CLASSNAME);\n\nexport const NavigationSection = forwardRef<NavigationSectionProps, HTMLLIElement>((props, ref) => {\n const { children, className, label, icon, ...forwardedProps } = props;\n const [isOpen, setIsOpen] = useState(false);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const sectionId = useId();\n const { orientation } = useContext(NavigationContext) || {};\n const theme = useTheme();\n const isDropdown = orientation === Orientation.horizontal;\n return (\n <li\n className={classNames.join(\n className,\n sectionBlock(),\n itemBlock({\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n ref={ref}\n >\n {RawClickable<'button'>({\n as: 'button',\n ...forwardedProps,\n 'aria-controls': sectionId,\n 'aria-expanded': isOpen,\n className: itemElement('link'),\n ref: buttonRef,\n handleClick: (event) => {\n setIsOpen(!isOpen);\n event.stopPropagation();\n },\n handleKeyPress: forwardedProps.onKeyPress,\n children: (\n <>\n {icon ? <Icon className={itemElement('icon')} icon={icon} size={Size.xs} /> : null}\n\n <Text as=\"span\" truncate className={itemElement('label')} ref={ref}>\n {label}\n </Text>\n <Icon\n className={classNames.join(itemElement('icon'), sectionElement('chevron'))}\n icon={isOpen ? mdiChevronUp : mdiChevronDown}\n />\n </>\n ),\n })}\n {isOpen &&\n (isDropdown ? (\n <Popover\n anchorRef={buttonRef}\n isOpen={isOpen}\n placement={Placement.BOTTOM_START}\n usePortal={false}\n closeOnClickAway\n closeOnEscape\n onClick={() => setIsOpen(false)}\n onClose={() => setIsOpen(false)}\n zIndex={996}\n >\n <ThemeProvider value={Theme.light}>\n <ul className={sectionElement('drawer', { popover: true })} id={sectionId}>\n <NavigationContext.Provider value={{ orientation: Orientation.vertical }}>\n {children}\n </NavigationContext.Provider>\n </ul>\n </ThemeProvider>\n </Popover>\n ) : (\n <ul className={sectionElement('drawer')} id={sectionId}>\n {children}\n </ul>\n ))}\n </li>\n );\n});\nNavigationSection.displayName = COMPONENT_NAME;\nNavigationSection.className = CLASSNAME;\n","import { ElementType, ReactNode } from 'react';\nimport { Icon, Placement, Size, Text, Tooltip } from '@lumx/react';\nimport { classNames } from '@lumx/core/js/utils';\nimport { ComponentRef, HasClassName, HasPolymorphicAs, HasRequiredLinkHref, HasTheme } from '@lumx/react/utils/type';\n\nimport { forwardRefPolymorphic } from '@lumx/react/utils/react/forwardRefPolymorphic';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { useOverflowTooltipLabel } from '@lumx/react/hooks/useOverflowTooltipLabel';\nimport { RawClickable } from '@lumx/core/js/components/RawClickable';\n\nimport { ITEM_CLASSNAME as CLASSNAME, ITEM_COMPONENT_NAME as COMPONENT_NAME } from './constants';\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\ntype BaseNavigationItemProps = {\n /** Icon (SVG path). */\n icon?: string;\n /** Label content. */\n label: ReactNode;\n /** Mark as the current page link */\n isCurrentPage?: boolean;\n};\n\n/**\n * Navigation item props\n */\nexport type NavigationItemProps<E extends ElementType = 'a'> = HasPolymorphicAs<E> &\n HasTheme &\n HasClassName &\n BaseNavigationItemProps &\n HasRequiredLinkHref<E>;\n\nexport const NavigationItem = Object.assign(\n forwardRefPolymorphic(<E extends ElementType = 'a'>(props: NavigationItemProps<E>, ref: ComponentRef<E>) => {\n const {\n className,\n icon,\n label,\n isCurrentPage,\n as: Element = 'a',\n onClick,\n onKeyPress,\n ...forwardedProps\n } = props;\n const theme = useTheme();\n const { tooltipLabel, labelRef } = useOverflowTooltipLabel(label);\n\n return (\n <li\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <Tooltip label={tooltipLabel} placement={Placement.TOP}>\n {RawClickable({\n as: Element,\n className: element('link', {\n 'is-selected': isCurrentPage,\n }),\n ref,\n 'aria-current': isCurrentPage ? 'page' : undefined,\n ...forwardedProps,\n handleClick: onClick,\n handleKeyPress: onKeyPress,\n children: (\n <>\n {icon ? (\n <Icon className={element('icon')} icon={icon} size={Size.xs} theme={theme} />\n ) : null}\n\n <Text as=\"span\" truncate className={element('label')} ref={labelRef}>\n {label}\n </Text>\n </>\n ),\n })}\n </Tooltip>\n </li>\n );\n }),\n {\n displayName: COMPONENT_NAME,\n className: CLASSNAME,\n },\n);\n","import { HasAriaLabelOrLabelledBy, HasClassName, HasTheme } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { Orientation, Theme } from '@lumx/react';\nimport { ThemeProvider, useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { NavigationSection } from './NavigationSection';\nimport { NavigationItem } from './NavigationItem';\nimport { NavigationContext } from './context';\n\nexport type NavigationProps = React.ComponentProps<'nav'> &\n HasClassName &\n HasTheme & {\n /** Content of the navigation. These components should be of type NavigationItem to be rendered */\n children?: React.ReactNode;\n orientation?: Orientation;\n } & HasAriaLabelOrLabelledBy;\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Navigation';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-navigation';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props\n */\nconst DEFAULT_PROPS = {\n orientation: Orientation.vertical,\n};\n\ntype SubComponents = {\n Section: typeof NavigationSection;\n Item: typeof NavigationItem;\n};\n\nexport const Navigation = forwardRef<NavigationProps, HTMLElement, SubComponents>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n children,\n className,\n theme = defaultTheme,\n orientation = DEFAULT_PROPS.orientation,\n ...forwardedProps\n } = props;\n return (\n <ThemeProvider value={theme}>\n <nav\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`orientation-${orientation}`]: Boolean(orientation),\n }),\n )}\n ref={ref}\n {...forwardedProps}\n >\n <NavigationContext.Provider value={{ orientation }}>\n <ul className={element('list')}>{children}</ul>\n </NavigationContext.Provider>\n </nav>\n </ThemeProvider>\n );\n});\nNavigation.displayName = COMPONENT_NAME;\nNavigation.className = CLASSNAME;\nNavigation.defaultProps = DEFAULT_PROPS;\n\n// Sub components\nNavigation.Section = NavigationSection;\nNavigation.Item = NavigationItem;\n","import { mdiAlert, mdiAlertCircle, mdiCheckCircle, mdiInformation } from '@lumx/icons';\n\n/**\n * Notification delay before hiding.\n */\nexport const HIDE_DELAY = 6000;\n\n/**\n * Notification icon and colors according to their type.\n */\nexport const NOTIFICATION_CONFIGURATION = {\n error: {\n color: 'red',\n icon: mdiAlert,\n },\n info: {\n color: 'blue',\n icon: mdiInformation,\n },\n success: {\n color: 'green',\n icon: mdiCheckCircle,\n },\n warning: {\n color: 'yellow',\n icon: mdiAlertCircle,\n },\n};\n","import { useRef } from 'react';\n\nimport isFunction from 'lodash/isFunction';\n\nimport { Button, Emphasis, Icon, Kind, Size, Theme } from '@lumx/react';\nimport { DOCUMENT, NOTIFICATION_TRANSITION_DURATION } from '@lumx/react/constants';\nimport { NOTIFICATION_CONFIGURATION } from '@lumx/react/components/notification/constants';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useTransitionVisibility } from '@lumx/react/hooks/useTransitionVisibility';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { Portal } from '@lumx/react/utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface NotificationProps extends GenericProps, HasTheme {\n /** Action button label. */\n actionLabel?: string;\n /** Content. */\n content?: React.ReactNode;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Notification type. */\n type?: Kind;\n /** Z-axis position. */\n zIndex?: number;\n /** On action button click callback. */\n onActionClick?(): void;\n /** On click callback. */\n onClick?(): void;\n /** Whether the notification should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */\n usePortal?: boolean;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Notification';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-notification';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<NotificationProps> = {\n zIndex: 9999,\n usePortal: true,\n};\n\n/* eslint-disable react-hooks/rules-of-hooks, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\n/**\n * Notification component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Notification = forwardRef<NotificationProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n actionLabel,\n className,\n content,\n isOpen,\n onActionClick,\n onClick,\n theme = defaultTheme,\n type,\n zIndex = DEFAULT_PROPS.zIndex,\n usePortal = DEFAULT_PROPS.usePortal,\n style,\n ...forwardedProps\n } = props;\n if (!DOCUMENT) {\n // Can't render in SSR.\n return null;\n }\n const { color, icon } = NOTIFICATION_CONFIGURATION[type as Kind] || {};\n const rootRef = useRef<HTMLDivElement>(null);\n const isVisible = useTransitionVisibility(rootRef, !!isOpen, NOTIFICATION_TRANSITION_DURATION);\n const hasAction: boolean = Boolean(onActionClick) && Boolean(actionLabel);\n\n const handleCallback = (evt?: React.MouseEvent) => {\n if (isFunction(onActionClick)) {\n onActionClick();\n }\n evt?.stopPropagation();\n };\n\n if (!type || !isVisible) {\n return null;\n }\n\n return (\n <Portal enabled={usePortal}>\n {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}\n <div\n ref={mergeRefs(ref, rootRef)}\n role=\"alert\"\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n 'has-action': hasAction,\n 'is-hidden': !isOpen,\n }),\n )}\n onClick={onClick}\n style={{ ...style, zIndex }}\n >\n <div className={element('icon')}>\n <Icon icon={icon} size={Size.s} />\n </div>\n <div className={element('content')}>{content}</div>\n {hasAction && (\n <div className={element('action')}>\n <Button emphasis={Emphasis.medium} theme={theme} onClick={handleCallback}>\n <span>{actionLabel}</span>\n </Button>\n </div>\n )}\n </div>\n </Portal>\n );\n});\nNotification.displayName = COMPONENT_NAME;\nNotification.className = CLASSNAME;\nNotification.defaultProps = DEFAULT_PROPS;\n","import type { HasAriaLabelOrLabelledBy, LumxClassName } from '../../types';\nimport type { PopoverProps } from '../Popover';\n\n/**\n * PopoverDialog props.\n * The PopoverDialog has the same props as the Popover but requires an accessible label.\n */\nexport type PopoverDialogProps = PopoverProps &\n HasAriaLabelOrLabelledBy & {\n /** Accessible label for the dialog (alternative to aria-label prop). */\n label?: string;\n };\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'PopoverDialog';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-popover-dialog';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<PopoverDialogProps> = {};\n","import { ReactNode } from 'react';\n\nimport { classNames } from '@lumx/core/js/utils';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n type PopoverDialogProps as CorePopoverDialogProps,\n} from '@lumx/core/js/components/PopoverDialog';\nimport type { PopoverProps as CorePopoverProps } from '@lumx/core/js/components/Popover';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { HeadingLevelProvider } from '@lumx/react/components/heading';\nimport { Popover, type PopoverProps } from '../popover/Popover';\n\n/**\n * PopoverDialog props.\n * The PopoverDialog has the same props as the Popover but requires an accessible label.\n */\nexport type PopoverDialogProps = PopoverProps & Omit<CorePopoverDialogProps, keyof CorePopoverProps>;\n\n/**\n * PopoverDialog component.\n * Defines a popover that acts like a dialog:\n * - Has a dialog aria role\n * - Sets a focus trap within the popover\n * - Closes on click away and escape\n * - Resets heading level context to 2\n */\nexport const PopoverDialog = forwardRef<PopoverDialogProps, HTMLDivElement>((props, ref) => {\n const { children, 'aria-label': ariaLabel, label = ariaLabel, className, ...forwardedProps } = props;\n\n return (\n <Popover\n {...forwardedProps}\n ref={ref}\n className={classNames.join(className, CLASSNAME)}\n role=\"dialog\"\n aria-modal=\"true\"\n /**\n * If a label is set, set as aria-label.\n * If it is undefined, the label can be set using the `aria-label` and `aria-labelledby` props\n */\n aria-label={label}\n closeOnClickAway\n closeOnEscape\n withFocusTrap\n >\n <HeadingLevelProvider level={2}>{children as ReactNode}</HeadingLevelProvider>\n </Popover>\n );\n});\n\nPopoverDialog.displayName = COMPONENT_NAME;\nPopoverDialog.className = CLASSNAME;\nPopoverDialog.defaultProps = DEFAULT_PROPS as Partial<PopoverDialogProps>;\n","import { ReactNode } from 'react';\n\nimport { Orientation, Theme, Thumbnail, ThumbnailProps, ThumbnailVariant } from '@lumx/react';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface PostBlockProps extends GenericProps, HasTheme {\n /** Action toolbar content. */\n actions?: ReactNode;\n /** Attachment content. */\n attachments?: ReactNode;\n /** Author content. */\n author?: ReactNode;\n /** Metadata content. */\n meta?: ReactNode;\n /** Orientation. */\n orientation?: Orientation;\n /** Tag content. */\n tags?: ReactNode;\n /** Content (string, or sanitized html). */\n text?: string | { __html: string };\n /** Thumbnail. */\n thumbnailProps?: ThumbnailProps;\n /** Title. */\n title: string;\n /** On click callback. */\n onClick?(): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'PostBlock';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-post-block';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<PostBlockProps> = {\n orientation: Orientation.horizontal,\n};\n\n/**\n * PostBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const PostBlock = forwardRef<PostBlockProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n actions,\n attachments,\n author,\n className,\n meta,\n onClick,\n orientation = DEFAULT_PROPS.orientation,\n tags,\n text,\n theme = defaultTheme,\n thumbnailProps,\n title,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`orientation-${orientation}`]: Boolean(orientation),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n {...forwardedProps}\n >\n {thumbnailProps && (\n <div className={element('thumbnail')}>\n <Thumbnail {...thumbnailProps} theme={theme} variant={ThumbnailVariant.rounded} />\n </div>\n )}\n <div className={element('wrapper')}>\n {author && <div className={element('author')}>{author}</div>}\n\n {title && (\n <button type=\"button\" className={element('title')} onClick={onClick}>\n {title}\n </button>\n )}\n\n {meta && <span className={element('meta')}>{meta}</span>}\n\n {typeof text === 'string' ? (\n <p className={element('text')}>{text}</p>\n ) : (\n // eslint-disable-next-line react/no-danger\n <p dangerouslySetInnerHTML={text} className={element('text')} />\n )}\n\n {attachments && <div className={element('attachments')}>{attachments}</div>}\n {(tags || actions) && (\n <div className={element('toolbar')}>\n {tags && <div className={element('tags')}>{tags}</div>}\n {actions && <div className={element('actions')}>{actions}</div>}\n </div>\n )}\n </div>\n </div>\n );\n});\nPostBlock.displayName = COMPONENT_NAME;\nPostBlock.className = CLASSNAME;\nPostBlock.defaultProps = DEFAULT_PROPS;\n","import type { CommonRef, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressLinearProps extends HasTheme, HasClassName {\n /** Component ref */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ProgressLinear';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-progress-linear';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ProgressLinearProps> = {};\n\n/**\n * ProgressLinear component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ProgressLinear = (props: ProgressLinearProps) => {\n const { className, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('line1')} />\n <div className={element('line2')} />\n </div>\n );\n};\n","import { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n ProgressLinear as ProgressLinearUI,\n ProgressLinearProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/ProgressLinear';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressLinearProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * ProgressLinear component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ProgressLinear = forwardRef<ProgressLinearProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, ...otherProps } = props;\n\n return ProgressLinearUI({\n ref,\n theme,\n ...otherProps,\n });\n});\nProgressLinear.displayName = COMPONENT_NAME;\nProgressLinear.className = CLASSNAME;\nProgressLinear.defaultProps = DEFAULT_PROPS;\n","/* eslint-disable react/no-unknown-property */\nimport type { CommonRef, GenericProps, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\n/**\n * Progress sizes.\n */\nexport type ProgressCircularSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressCircularProps extends HasTheme, HasClassName {\n /**\n * Progress circular size.\n */\n size?: ProgressCircularSize;\n /**\n * Progress display type (inline or block).\n * @default 'block'\n */\n display?: 'inline' | 'block';\n /** Component ref */\n ref?: CommonRef;\n /** additional props for the svg */\n svgProps?: GenericProps;\n /** additional props for the circle */\n circleProps?: GenericProps;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ProgressCircular';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-progress-circular';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ProgressCircularProps> = {\n size: Size.m,\n display: 'block',\n};\n\n/**\n * ProgressCircular component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ProgressCircular = (props: ProgressCircularProps) => {\n const {\n className,\n theme,\n size = DEFAULT_PROPS.size,\n display = DEFAULT_PROPS.display,\n ref,\n circleProps,\n svgProps,\n ...forwardedProps\n } = props;\n const Element = display === 'block' ? 'div' : 'span';\n\n return (\n <Element\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`size-${size}`]: Boolean(size),\n [`display-${display}`]: Boolean(display),\n }),\n )}\n >\n <Element className={element('double-bounce1')} />\n <Element className={element('double-bounce2')} />\n\n <svg {...svgProps} viewBox=\"25 25 50 50\">\n <circle {...circleProps} cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" />\n </svg>\n </Element>\n );\n};\n","import { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport {\n ProgressCircular as ProgressCircularUI,\n ProgressCircularProps as UIProps,\n ProgressCircularSize,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n element,\n} from '@lumx/core/js/components/ProgressCircular';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressCircularProps extends GenericProps, ReactToJSX<UIProps> {}\n\nexport type { ProgressCircularSize };\n\n/**\n * ProgressCircular component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ProgressCircular = forwardRef<ProgressCircularProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, ...otherProps } = props;\n\n return ProgressCircularUI({\n ref,\n theme,\n ...otherProps,\n circleProps: {\n className: element('path'),\n strokeWidth: '5',\n },\n svgProps: {\n className: element('svg'),\n },\n });\n});\nProgressCircular.displayName = COMPONENT_NAME;\nProgressCircular.className = CLASSNAME;\nProgressCircular.defaultProps = DEFAULT_PROPS;\n","import { Theme } from '@lumx/react';\nimport { GenericProps, HasTheme, ValueOf } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { ProgressLinear } from './ProgressLinear';\nimport { ProgressCircular } from './ProgressCircular';\n\n/**\n * Progress variants.\n */\nexport const ProgressVariant = { linear: 'linear', circular: 'circular' } as const;\nexport type ProgressVariant = ValueOf<typeof ProgressVariant>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressProps extends GenericProps, HasTheme {\n /** Progress variant. */\n variant?: ProgressVariant;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Progress';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-progress';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<ProgressProps> = {\n variant: ProgressVariant.circular,\n};\n\n/**\n * Progress component.\n *\n * @deprecated use `ProgressLinear` and `ProgressCircular` instead.\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Progress = forwardRef<ProgressProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { className, theme = defaultTheme, variant = DEFAULT_PROPS.variant, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`variant-${variant}`]: Boolean(variant),\n }),\n )}\n >\n {variant === ProgressVariant.circular && <ProgressCircular theme={theme} />}\n {variant === ProgressVariant.linear && <ProgressLinear theme={theme} />}\n </div>\n );\n});\nProgress.displayName = COMPONENT_NAME;\nProgress.className = CLASSNAME;\nProgress.defaultProps = DEFAULT_PROPS;\n","export type TabType = 'tab' | 'tabPanel';\n\nexport interface State {\n isLazy: boolean;\n shouldActivateOnFocus: boolean;\n activeTabIndex: number;\n ids: Record<TabType, string[]>;\n}\n\nexport const INIT_STATE: State = {\n isLazy: true,\n shouldActivateOnFocus: false,\n activeTabIndex: 0,\n ids: { tab: [], tabPanel: [] },\n};\n\nexport type Action =\n | { type: 'update'; payload: Partial<State> }\n | { type: 'setActiveTabIndex'; payload: number }\n | { type: 'register'; payload: { type: TabType; id: string } }\n | { type: 'unregister'; payload: { type: TabType; id: string } };\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case 'update':\n return { ...state, ...action.payload };\n case 'setActiveTabIndex': {\n if (state.activeTabIndex === action.payload) {\n return state;\n }\n return { ...state, activeTabIndex: action.payload };\n }\n case 'register': {\n const { type, id } = action.payload;\n return { ...state, ids: { ...state.ids, [type]: [...state.ids[type], id] } };\n }\n case 'unregister': {\n const { type, id } = action.payload;\n const index = state.ids[type].indexOf(id);\n if (index === -1) return state;\n const tabIds = [...state.ids.tab];\n tabIds.splice(index, 1);\n const tabPanelIds = [...state.ids.tabPanel];\n tabPanelIds.splice(index, 1);\n return { ...state, ids: { tab: tabIds, tabPanel: tabPanelIds } };\n }\n default:\n return state;\n }\n};\n\nexport type TabState = Pick<Required<State>, 'isLazy' | 'shouldActivateOnFocus'> & {\n isActive: boolean;\n tabId: string;\n tabPanelId: string;\n changeToTab(): void;\n};\n","import { Dispatch, createContext, useCallback, useContext, useEffect, useMemo } from 'react';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { type TabType, type State, type Action, type TabState } from '@lumx/core/js/components/Tabs/state';\n\nexport {\n type TabType,\n type State,\n INIT_STATE,\n type Action,\n reducer,\n type TabState,\n} from '@lumx/core/js/components/Tabs/state';\n\nexport const TabProviderContext = createContext<[State, Dispatch<Action>] | null>(null);\n\n/* eslint-disable react-hooks/rules-of-hooks */\nexport const useTabProviderContext = (type: TabType, originalId?: string): undefined | TabState => {\n const context = useContext(TabProviderContext);\n if (!context) {\n return undefined;\n }\n const [state, dispatch] = context;\n\n // Current tab or tab panel id.\n const generatedId = useId();\n const id = originalId || generatedId;\n\n useEffect(\n () => {\n // On mount: register tab or tab panel id.\n dispatch({ type: 'register', payload: { type, id } });\n return () => {\n // On unmount: unregister tab or tab panel id.\n dispatch({ type: 'unregister', payload: { type, id } });\n };\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n // Find tab/tabPanel index using it's id.\n const index = useMemo(() => state.ids[type].indexOf(id), [state.ids, type, id]);\n const tabId = useMemo(() => state.ids.tab[index] || '', [state, index]);\n const tabPanelId = useMemo(() => state.ids.tabPanel[index] || '', [state, index]);\n const isActive = useMemo(() => state.activeTabIndex === index, [state, index]);\n const changeToTab = useCallback(() => dispatch({ type: 'setActiveTabIndex', payload: index }), [dispatch, index]);\n return {\n isLazy: state.isLazy,\n shouldActivateOnFocus: state.shouldActivateOnFocus,\n tabId,\n tabPanelId,\n isActive,\n changeToTab,\n };\n};\n\nexport const useTabProviderContextState = (): State | undefined => {\n const context = useContext(TabProviderContext);\n return context?.[0];\n};\n","import { ReactNode, useEffect, useReducer } from 'react';\nimport { INIT_STATE, TabProviderContext, reducer } from '../tabs/state';\n\nexport interface ProgressTrackerProviderProps {\n /** Active step index. */\n activeStepIndex?: number;\n /** ProgressTrackerProvider children. */\n children: ReactNode;\n /** Step panel children should not render if the step panel is hidden. */\n isLazy?: boolean;\n /** Activate tabs on focus. */\n shouldActivateOnFocus?: boolean;\n /** Step change callback. */\n onChange?(index: number): void;\n}\n\nconst DEFAULT_PROPS: Partial<ProgressTrackerProviderProps> = {\n isLazy: INIT_STATE.isLazy,\n shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus,\n};\n\n/**\n * This component provides a context in which steps can be defined and linked to their step panel.\n *\n * It does not produce any markup so you can wrap it around any React elements and then split the ProgressTracker and ProgressTrackerPanel\n * components in the react tree.\n *\n * This works exactly as TabProvider so it uses TabProviderContext and tabs state.\n *\n * @param props React component props.\n * @return React element.\n */\nexport const ProgressTrackerProvider: React.FC<ProgressTrackerProviderProps> = (props) => {\n const { children, onChange, ...propState } = props;\n const [state, dispatch] = useReducer(reducer, INIT_STATE);\n\n // On prop state change => dispatch update.\n useEffect(\n () => {\n dispatch({\n type: 'update',\n payload: {\n ...DEFAULT_PROPS,\n ...propState,\n activeTabIndex: propState.activeStepIndex || INIT_STATE.activeTabIndex,\n },\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [dispatch, ...Object.values(propState)],\n );\n\n // On active tab index state change => send update to the onChange.\n useEffect(\n () => {\n if (state === INIT_STATE || !onChange || propState.activeStepIndex === state.activeTabIndex) {\n return;\n }\n onChange(state.activeTabIndex);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onChange, state.activeTabIndex],\n );\n\n return <TabProviderContext.Provider value={[state, dispatch]}>{children}</TabProviderContext.Provider>;\n};\nProgressTrackerProvider.defaultProps = DEFAULT_PROPS;\n","import React, { ReactNode } from 'react';\n\nimport { GenericProps } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useRovingTabIndexContainer } from '../../hooks/useRovingTabIndexContainer';\nimport { useTabProviderContextState } from '../tabs/state';\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressTrackerProps extends GenericProps {\n /** ARIA label (purpose of the set of steps). */\n ['aria-label']: string;\n /** Step list. */\n children: ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ProgressTracker';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-progress-tracker';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<ProgressTrackerProps> = {};\n\n/**\n * ProgressTracker component.\n *\n * Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ProgressTracker = forwardRef<ProgressTrackerProps, HTMLDivElement>((props, ref) => {\n const { 'aria-label': ariaLabel, children, className, ...forwardedProps } = props;\n const stepListRef = React.useRef(null);\n useRovingTabIndexContainer({\n containerRef: stepListRef,\n itemSelector: '[role=\"tab\"]',\n });\n\n const state = useTabProviderContextState();\n const numberOfSteps = state?.ids?.tab?.length || 0;\n const backgroundPosition: number = numberOfSteps > 0 ? 100 / (numberOfSteps * 2) : 0;\n const trackPosition: number =\n numberOfSteps > 0 ? ((100 / (numberOfSteps - 1)) * (state?.activeTabIndex || 0)) / 100 : 0;\n\n return (\n <div ref={mergeRefs(ref, stepListRef)} {...forwardedProps} className={classNames.join(className, block())}>\n <div className={element('steps')} role=\"tablist\" aria-label={ariaLabel}>\n {children}\n </div>\n\n <div\n className={element('background-bar')}\n style={{ left: `${backgroundPosition}%`, right: `${backgroundPosition}%` }}\n />\n\n <div\n className={element('foreground-bar')}\n style={{\n left: `${backgroundPosition}%`,\n right: `${backgroundPosition}%`,\n transform: `scaleX(${trackPosition})`,\n }}\n />\n </div>\n );\n});\nProgressTracker.displayName = COMPONENT_NAME;\nProgressTracker.className = CLASSNAME;\nProgressTracker.defaultProps = DEFAULT_PROPS;\n","import { FocusEventHandler, KeyboardEventHandler, useCallback } from 'react';\n\nimport { mdiAlertCircle, mdiCheckCircle, mdiRadioboxBlank, mdiRadioboxMarked } from '@lumx/icons';\nimport { Icon, InputHelper, InputLabel, Kind, Size } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport { useTabProviderContext } from '../tabs/state';\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressTrackerStepProps extends GenericProps {\n /** Children are not supported. */\n children?: never;\n /** Whether the step should be in error state or not. */\n hasError?: boolean;\n /** Helper text. */\n helper?: string | null;\n /** Native id property. */\n id?: string;\n /** Whether the current step is active or not. */\n isActive?: boolean;\n /** Whether the current step is completed or not. */\n isComplete?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Label text. */\n label?: string | null;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ProgressTrackerStep';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-progress-tracker-step';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<ProgressTrackerStepProps> = {};\n\n/**\n * ProgressTrackerStep component.\n *\n * Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ProgressTrackerStep = forwardRef<ProgressTrackerStepProps, HTMLButtonElement>((props, ref) => {\n const { isAnyDisabled, otherProps } = useDisableStateProps(props);\n const {\n className,\n hasError,\n helper,\n id,\n isActive: propIsActive,\n isComplete,\n label,\n onFocus,\n onKeyPress,\n tabIndex = -1,\n ...forwardedProps\n } = otherProps;\n const state = useTabProviderContext('tab', id);\n const isActive = propIsActive || state?.isActive;\n\n const changeToCurrentTab = useCallback(() => {\n if (isAnyDisabled) {\n return;\n }\n state?.changeToTab();\n }, [isAnyDisabled, state]);\n\n const handleFocus: FocusEventHandler = useCallback(\n (event) => {\n onFocus?.(event);\n if (state?.shouldActivateOnFocus) {\n changeToCurrentTab();\n }\n },\n [changeToCurrentTab, onFocus, state?.shouldActivateOnFocus],\n );\n\n const handleKeyPress: KeyboardEventHandler = useCallback(\n (event) => {\n onKeyPress?.(event);\n if (event.key !== 'Enter') {\n return;\n }\n changeToCurrentTab();\n },\n [changeToCurrentTab, onKeyPress],\n );\n\n const getIcon = (): string => {\n if (isComplete) {\n return mdiCheckCircle;\n }\n\n if (isActive) {\n return hasError ? mdiAlertCircle : mdiRadioboxMarked;\n }\n\n return mdiRadioboxBlank;\n };\n\n return (\n <button\n ref={ref}\n {...forwardedProps}\n type=\"button\"\n id={state?.tabId}\n className={classNames.join(\n className,\n block({\n 'has-error': hasError,\n 'is-active': isActive,\n 'is-clickable': state && !isAnyDisabled,\n 'is-complete': isComplete,\n }),\n )}\n onClick={changeToCurrentTab}\n onKeyPress={handleKeyPress}\n onFocus={handleFocus}\n role=\"tab\"\n tabIndex={isActive ? 0 : tabIndex}\n aria-disabled={isAnyDisabled}\n aria-selected={isActive}\n aria-controls={state?.tabPanelId}\n >\n <Icon className={element('state')} icon={getIcon()} size={Size.s} />\n\n <InputLabel htmlFor={state?.tabId || ''} className={element('label')}>\n {label}\n </InputLabel>\n\n {helper && (\n <InputHelper kind={hasError ? Kind.error : Kind.info} className={element('helper')}>\n {helper}\n </InputHelper>\n )}\n </button>\n );\n});\nProgressTrackerStep.displayName = COMPONENT_NAME;\nProgressTrackerStep.className = CLASSNAME;\nProgressTrackerStep.defaultProps = DEFAULT_PROPS;\n","import { useTabProviderContext } from '@lumx/react/components/tabs/state';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressTrackerStepPanelProps extends GenericProps {\n /** Native id property. */\n id?: string;\n /** Whether the step is active or not. */\n isActive?: boolean;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ProgressTrackerStepPanel';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = `lumx-step-panel`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<ProgressTrackerStepPanelProps> = {};\n\n/**\n * ProgressTrackerStepPanel component.\n *\n * Implements WAI-ARIA `tabpanel` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ProgressTrackerStepPanel = forwardRef<ProgressTrackerStepPanelProps, HTMLDivElement>((props, ref) => {\n const { children, id, className, isActive: propIsActive, ...forwardedProps } = props;\n\n const state = useTabProviderContext('tabPanel', id);\n const isActive = propIsActive || state?.isActive;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n id={state?.tabPanelId}\n className={classNames.join(className, block({ 'is-active': isActive }))}\n role=\"tabpanel\"\n tabIndex={isActive ? 0 : -1}\n aria-labelledby={state?.tabId}\n >\n {(!state?.isLazy || isActive) && children}\n </div>\n );\n});\nProgressTrackerStepPanel.displayName = COMPONENT_NAME;\nProgressTrackerStepPanel.className = CLASSNAME;\nProgressTrackerStepPanel.defaultProps = DEFAULT_PROPS;\n","import type {\n JSXElement,\n LumxClassName,\n HasTheme,\n HasAriaDisabled,\n HasDisabled,\n HasClassName,\n HasChecked,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { InputLabel } from '../InputLabel';\nimport { InputHelper } from '../InputHelper';\n\n/**\n * Defines the props of the component.\n */\nexport interface RadioButtonProps extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked {\n /** Helper text. */\n helper?: string;\n /** Native input id property. */\n id?: string;\n /** Label content. */\n label?: JSXElement;\n /** Native input name property. */\n name?: string;\n /** Native input value property. */\n value?: string;\n /** optional props for input */\n inputProps?: Record<string, any>;\n /** Native input ref. */\n inputRef?: CommonRef;\n /** Native input id. */\n inputId: string;\n /** On change callback. */\n handleChange?(value?: string, name?: string, event?: any): void;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'RadioButton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-radio-button';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RadioButtonProps> = {};\n\n/**\n * RadioButton component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const RadioButton = (props: RadioButtonProps) => {\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n ref,\n handleChange,\n theme,\n value,\n inputProps = {},\n isDisabled,\n inputId,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (event: any) => {\n if (handleChange) {\n handleChange(value, name, event);\n }\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-checked': isChecked,\n 'is-disabled': isDisabled,\n 'is-unchecked': !isChecked,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('input-wrapper')}>\n <input\n ref={inputRef}\n className={element('input-native')}\n id={inputId}\n type=\"radio\"\n name={name}\n value={value}\n checked={isChecked}\n onChange={handleOnChange}\n aria-describedby={helper ? `${inputId}-helper` : undefined}\n {...(inputProps?.readOnly ? { readOnly: inputProps.readOnly } : {})}\n {...inputProps}\n />\n\n <div className={element('input-placeholder')}>\n <div className={element('input-background')} />\n <div className={element('input-indicator')} />\n </div>\n </div>\n\n <div className={element('content')}>\n {label && InputLabel({ htmlFor: inputId, className: element('label'), theme, children: label })}\n {helper &&\n InputHelper({ id: `${inputId}-helper`, className: element('helper'), theme, children: helper })}\n </div>\n </div>\n );\n};\n","import { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n RadioButton as UI,\n RadioButtonProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/RadioButton';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface RadioButtonProps extends GenericProps, ReactToJSX<UIProps, 'inputId'> {\n /** On change callback. */\n onChange?(value?: string, name?: string, event?: React.ChangeEvent): void;\n}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<RadioButtonProps> = {};\n\n/**\n * RadioButton component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const RadioButton = forwardRef<RadioButtonProps, HTMLDivElement>((props, ref) => {\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(props);\n const defaultTheme = useTheme() || Theme.light;\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n onChange,\n theme = defaultTheme,\n value,\n inputProps = {},\n ...forwardedProps\n } = otherProps;\n const generatedInputId = useId();\n const inputId = id || generatedInputId;\n\n return UI({\n ref,\n className,\n helper,\n inputRef,\n isChecked,\n label,\n name,\n handleChange: onChange,\n theme,\n value,\n inputProps: {\n ...inputProps,\n ...disabledStateProps,\n readOnly: inputProps.readOnly || disabledStateProps['aria-disabled'],\n },\n ...forwardedProps,\n isDisabled: isAnyDisabled,\n inputId,\n });\n});\nRadioButton.displayName = COMPONENT_NAME;\nRadioButton.className = CLASSNAME;\nRadioButton.defaultProps = DEFAULT_PROPS;\n","import type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface RadioGroupProps extends HasClassName {\n /** RadioButton elements */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'RadioGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-radio-group';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RadioGroupProps> = {};\n\n/**\n * RadioGroup component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const RadioGroup = (props: RadioGroupProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </div>\n );\n};\n\nRadioGroup.displayName = COMPONENT_NAME;\nRadioGroup.className = CLASSNAME;\nRadioGroup.defaultProps = DEFAULT_PROPS;\n","import { GenericProps } from '@lumx/react/utils/type';\nimport {\n RadioGroup as UI,\n CLASSNAME,\n COMPONENT_NAME,\n RadioGroupProps as UIProps,\n} from '@lumx/core/js/components/RadioGroup';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface RadioGroupProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * RadioGroup component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const RadioGroup = forwardRef<RadioGroupProps, HTMLDivElement>((props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n return UI({\n ref,\n className,\n children,\n ...forwardedProps,\n });\n});\nRadioGroup.displayName = COMPONENT_NAME;\nRadioGroup.className = CLASSNAME;\n","import { RefObject, useEffect, useState } from 'react';\n\n/**\n * Listen on element focus to store the focus status.\n */\nexport function useListenFocus(ref: RefObject<HTMLElement>) {\n const [isFocus, setFocus] = useState(false);\n\n useEffect(() => {\n const { current: element } = ref;\n if (!element) {\n return undefined;\n }\n\n const onFocus = () => setFocus(true);\n const onBlur = () => setFocus(false);\n element.addEventListener('focus', onFocus);\n element.addEventListener('blur', onBlur);\n return () => {\n element.removeEventListener('focus', onFocus);\n element.removeEventListener('blur', onBlur);\n };\n }, [ref, setFocus]);\n\n return isFocus;\n}\n","import { Ref, useCallback, useRef } from 'react';\n\nimport { Placement } from '@lumx/react';\nimport { Kind, Theme } from '@lumx/core/js/constants';\nimport { Dropdown } from '@lumx/react/components/dropdown/Dropdown';\nimport { InputHelper } from '@lumx/react/components/input-helper/InputHelper';\nimport { useFocusTrap } from '@lumx/react/hooks/useFocusTrap';\nimport { useListenFocus } from '@lumx/react/hooks/useListenFocus';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\n\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { CoreSelectProps } from './constants';\n\n/** The display name of the component. */\nconst COMPONENT_NAME = 'Select';\n\n/** The default class name and classes prefix for this component. */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-select';\nconst { block, element } = classNames.bem(CLASSNAME);\n\nexport const WithSelectContext = (\n SelectElement: React.FC<any>,\n props: CoreSelectProps,\n ref: Ref<HTMLDivElement>,\n): React.ReactElement => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n children,\n className,\n focusElement,\n isMultiple,\n closeOnClick = !isMultiple,\n disabled,\n error,\n hasError,\n helper,\n id,\n isDisabled = disabled,\n isEmpty,\n isOpen,\n isRequired,\n isValid,\n label,\n onClear,\n onDropdownClose,\n onInfiniteScroll,\n onInputClick,\n placeholder,\n theme = defaultTheme,\n value,\n variant,\n ...forwardedProps\n } = props;\n const generatedSelectId = useId();\n const selectId = id || generatedSelectId;\n const anchorRef = useRef<HTMLElement>(null);\n const selectRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const isFocus = useListenFocus(anchorRef);\n\n const handleKeyboardNav = useCallback(\n (evt: React.KeyboardEvent<HTMLElement>) => {\n if ((evt.key === 'Enter' || evt.key === ' ' || evt.key === 'ArrowDown') && onInputClick) {\n evt.preventDefault();\n onInputClick();\n }\n },\n [onInputClick],\n );\n\n const onClose = () => {\n if (onDropdownClose) {\n onDropdownClose();\n }\n anchorRef?.current?.blur();\n };\n\n // Handle focus trap.\n useFocusTrap(isOpen && dropdownRef.current, focusElement?.current);\n\n return (\n <div\n ref={mergeRefs(ref, selectRef)}\n className={classNames.join(\n className,\n block({\n 'has-error': hasError,\n 'has-label': Boolean(label),\n 'has-placeholder': Boolean(placeholder),\n 'has-value': !isEmpty,\n 'is-disabled': isDisabled,\n 'is-empty': isEmpty,\n 'is-focus': isFocus,\n 'is-open': isOpen,\n 'is-valid': isValid,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <SelectElement\n {...forwardedProps}\n anchorRef={anchorRef}\n aria-disabled={isDisabled}\n handleKeyboardNav={handleKeyboardNav}\n hasError={hasError}\n isDisabled={isDisabled}\n isEmpty={isEmpty}\n isRequired={isRequired}\n isValid={isValid}\n label={label}\n placeholder={placeholder}\n id={selectId}\n theme={theme}\n value={value}\n variant={variant}\n onClear={onClear}\n onInputClick={onInputClick}\n />\n <Dropdown\n anchorRef={anchorRef}\n closeOnClick={closeOnClick}\n closeOnClickAway\n closeOnEscape\n isOpen={!!isOpen}\n placement={Placement.BOTTOM_START}\n onClose={onClose}\n onInfiniteScroll={onInfiniteScroll}\n ref={dropdownRef}\n >\n {children}\n </Dropdown>\n {hasError && error && (\n <InputHelper className={element('helper')} kind={Kind.error} theme={theme}>\n {error}\n </InputHelper>\n )}\n {helper && (\n <InputHelper className={element('helper')} theme={theme}>\n {helper}\n </InputHelper>\n )}\n </div>\n );\n};\n","import { IconButtonProps } from '@lumx/react';\nimport { GenericProps, HasTheme, ValueOf } from '@lumx/react/utils/type';\nimport { ReactNode, SyntheticEvent } from 'react';\n\n/**\n * Select variants.\n */\nexport const SelectVariant = { input: 'input', chip: 'chip' } as const;\nexport type SelectVariant = ValueOf<typeof SelectVariant>;\n\nexport interface CoreSelectProps extends GenericProps, HasTheme {\n /** Props to pass to the clear button (minus those already set by the Select props). If not specified, the button won't be displayed. */\n clearButtonProps?: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /** Whether the select (input variant) is displayed with error style or not. */\n hasError?: boolean;\n /** Error message. */\n error?: string | ReactNode;\n /** Helper text. */\n helper?: string;\n /** Whether the select should close on click. */\n closeOnClick?: boolean;\n /** Icon (SVG path). */\n icon?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Whether the select (input variant) is displayed with valid style or not. */\n isValid?: boolean;\n /** Label text. */\n label?: string;\n /** Placeholder input text. */\n placeholder?: string;\n /** Select variant. */\n variant?: SelectVariant;\n /** On clear callback. */\n onClear?(event?: SyntheticEvent, value?: string): void;\n /** On blur callback. */\n onBlur?(): void;\n /** On filter text change callback (with 500ms debounce). */\n onFilter?(): void;\n /** On input click callback (can be used for dropdown toggle). */\n onInputClick?(): void;\n /** On dropdown close callback. */\n onDropdownClose?(): void;\n /** On scroll end callback. */\n onInfiniteScroll?(): void;\n /** Render value function. Default: Renders the value as a string. */\n selectedValueRender?(choice: string): ReactNode | string;\n /** Children */\n children?: React.ReactNode;\n}\n","import { RefObject } from 'react';\n\nimport lodashIsEmpty from 'lodash/isEmpty';\n\nimport { mdiAlertCircle, mdiCheckCircle, mdiCloseCircle, mdiMenuDown } from '@lumx/icons';\nimport { Emphasis, Size, Theme } from '@lumx/core/js/constants';\nimport { IconButton } from '@lumx/react/components/button/IconButton';\nimport { Chip } from '@lumx/react/components/chip/Chip';\nimport { Icon } from '@lumx/react/components/icon/Icon';\nimport { InputLabel } from '@lumx/react/components/input-label/InputLabel';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { WithSelectContext } from './WithSelectContext';\nimport { CoreSelectProps, SelectVariant } from './constants';\n\n/** Defines the props of the component. */\nexport interface SelectProps extends CoreSelectProps {\n /** Selected value. */\n value: string;\n}\n\nexport { SelectVariant };\n\n/** The display name of the component. */\nconst COMPONENT_NAME = 'Select';\n\n/** The default class name and classes prefix for this component. */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-select';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/** The default value of props. */\nconst DEFAULT_PROPS: Partial<SelectProps> = {\n selectedValueRender: (choice) => choice,\n variant: SelectVariant.input,\n};\n\nconst stopPropagation = (evt: Event) => evt.stopPropagation();\n\n/**\n * Select component.\n */\nconst SelectField: React.FC<SelectProps> = (props) => {\n const defaultTheme = useTheme();\n const {\n anchorRef,\n clearButtonProps,\n handleKeyboardNav,\n hasError,\n hasInputClear,\n icon,\n id,\n isDisabled,\n isEmpty,\n isRequired,\n isValid,\n label,\n onClear,\n onInputClick,\n placeholder,\n selectedValueRender,\n theme = defaultTheme,\n value,\n variant,\n selectElementRef,\n ...forwardedProps\n } = props;\n\n return (\n <>\n {variant === SelectVariant.input && (\n <>\n {label && (\n <div className={element('header')}>\n <InputLabel htmlFor={id} className={element('label')} isRequired={isRequired} theme={theme}>\n {label}\n </InputLabel>\n </div>\n )}\n\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n ref={mergeRefs(anchorRef as RefObject<HTMLDivElement>, selectElementRef)}\n id={id}\n className={element('wrapper')}\n onClick={onInputClick}\n onKeyDown={handleKeyboardNav}\n tabIndex={isDisabled ? undefined : 0}\n aria-disabled={isDisabled || undefined}\n {...forwardedProps}\n >\n {icon && (\n <Icon\n className={element('input-icon')}\n color={theme === Theme.dark ? 'light' : undefined}\n icon={icon}\n size={Size.xs}\n />\n )}\n\n <div\n className={element('input-native', {\n placeholder: isEmpty && placeholder,\n })}\n >\n {!isEmpty && <span>{selectedValueRender?.(value)}</span>}\n\n {isEmpty && placeholder && <span>{placeholder}</span>}\n </div>\n\n {(isValid || hasError) && (\n <div className={element('input-validity')}>\n <Icon icon={isValid ? mdiCheckCircle : mdiAlertCircle} size={Size.xxs} />\n </div>\n )}\n\n {hasInputClear && clearButtonProps && (\n <IconButton\n {...clearButtonProps}\n className={element('input-clear')}\n icon={mdiCloseCircle}\n emphasis={Emphasis.low}\n size={Size.s}\n theme={theme}\n onClick={onClear}\n onKeyDown={stopPropagation}\n />\n )}\n\n <div className={element('input-indicator')}>\n <Icon icon={mdiMenuDown} size={Size.s} />\n </div>\n </div>\n </>\n )}\n\n {variant === SelectVariant.chip && (\n <Chip\n id={id}\n isSelected={!isEmpty}\n isDisabled={isDisabled}\n after={<Icon icon={isEmpty ? mdiMenuDown : mdiCloseCircle} />}\n onAfterClick={isEmpty ? onInputClick : onClear}\n onClick={onInputClick}\n ref={mergeRefs(anchorRef as RefObject<HTMLAnchorElement>, selectElementRef)}\n theme={theme}\n {...forwardedProps}\n >\n {isEmpty && <span>{label}</span>}\n\n {!isEmpty && <span>{selectedValueRender?.(value)}</span>}\n </Chip>\n )}\n </>\n );\n};\n\n/**\n * Select component.\n *\n * @deprecated use `SelectTextField` instead\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Select = forwardRef<SelectProps, HTMLDivElement>((props, ref) => {\n const isEmpty = lodashIsEmpty(props.value);\n const hasInputClear = props.onClear && props.clearButtonProps && !isEmpty;\n\n return WithSelectContext(\n SelectField,\n {\n ...DEFAULT_PROPS,\n ...props,\n className: classNames.join(\n props.className,\n block({\n 'has-input-clear': hasInputClear,\n 'has-unique': !props.isEmpty,\n }),\n ),\n hasInputClear,\n isEmpty,\n },\n ref,\n );\n});\nSelect.displayName = COMPONENT_NAME;\nSelect.className = CLASSNAME;\nSelect.defaultProps = DEFAULT_PROPS;\nSelect.className = CLASSNAME;\n","import { ReactNode, RefObject, SyntheticEvent } from 'react';\n\nimport { mdiAlertCircle, mdiCheckCircle, mdiClose, mdiCloseCircle, mdiMenuDown } from '@lumx/icons';\nimport { Size, Theme } from '@lumx/core/js/constants';\nimport { Chip } from '@lumx/react/components/chip/Chip';\nimport { Icon } from '@lumx/react/components/icon/Icon';\nimport { InputLabel } from '@lumx/react/components/input-label/InputLabel';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { WithSelectContext } from './WithSelectContext';\nimport { CoreSelectProps, SelectVariant } from './constants';\n\n/** Defines the props of the component. */\nexport interface SelectMultipleProps extends CoreSelectProps {\n /** Selected values. */\n value: string[];\n /** Selected value render function. Default: Renders the value inside of a Chip. */\n selectedChipRender?(\n choice: string,\n index: number,\n onClear?: (event?: SyntheticEvent, choice?: string) => void,\n isDisabled?: boolean,\n theme?: any,\n ): ReactNode | string;\n}\n\n/** The display name of the component. */\nconst COMPONENT_NAME = 'Select';\n\n/** The default class name and classes prefix for this component. */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-select';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/** The default value of props. */\nconst DEFAULT_PROPS: Partial<SelectMultipleProps> = {\n selectedChipRender(choice, index, onClear, isDisabled?, theme?) {\n const onClick = (event?: React.MouseEvent) => onClear && onClear(event, choice);\n return (\n <Chip\n key={index}\n after={onClear && <Icon icon={mdiClose} size={Size.xxs} />}\n isDisabled={isDisabled}\n size={Size.s}\n onAfterClick={onClick}\n onClick={onClick}\n theme={theme}\n >\n {choice}\n </Chip>\n );\n },\n selectedValueRender: (choice) => choice,\n variant: SelectVariant.input,\n};\n\nexport const SelectMultipleField: React.FC<SelectMultipleProps> = (props) => {\n const defaultTheme = useTheme();\n const {\n anchorRef,\n // We don't have a clear button in select multiple but it must be removed from the forwardedProps\n clearButtonProps,\n handleKeyboardNav,\n hasError,\n icon,\n id,\n isDisabled,\n isEmpty,\n isRequired,\n isValid,\n label,\n onClear,\n onInputClick,\n placeholder,\n selectedChipRender,\n selectedValueRender,\n theme = defaultTheme,\n value,\n variant,\n selectElementRef,\n ...forwardedProps\n } = props;\n\n return (\n <>\n {variant === SelectVariant.input && (\n <>\n {label && (\n <div className={element('header')}>\n <InputLabel htmlFor={id} className={element('label')} isRequired={isRequired} theme={theme}>\n {label}\n </InputLabel>\n </div>\n )}\n\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}\n <div\n ref={mergeRefs(anchorRef as RefObject<HTMLDivElement>, selectElementRef)}\n id={id}\n className={element('wrapper')}\n onClick={onInputClick}\n onKeyDown={handleKeyboardNav}\n tabIndex={isDisabled ? undefined : 0}\n aria-disabled={isDisabled || undefined}\n {...forwardedProps}\n >\n {icon && (\n <Icon\n className={element('input-icon')}\n color={theme === Theme.dark ? 'light' : undefined}\n icon={icon}\n size={Size.xs}\n />\n )}\n\n <div className={element('chips')}>\n {!isEmpty &&\n value.map((val, index) => selectedChipRender?.(val, index, onClear, isDisabled, theme))}\n </div>\n\n {isEmpty && placeholder && (\n <div className={element('input-native', { placeholder: true })}>\n <span>{placeholder}</span>\n </div>\n )}\n\n {(isValid || hasError) && (\n <div className={`${CLASSNAME}__input-validity`}>\n <Icon icon={isValid ? mdiCheckCircle : mdiAlertCircle} size={Size.xxs} />\n </div>\n )}\n\n <div className={`${CLASSNAME}__input-indicator`}>\n <Icon icon={mdiMenuDown} size={Size.s} />\n </div>\n </div>\n </>\n )}\n\n {variant === SelectVariant.chip && (\n <Chip\n id={id}\n isSelected={!isEmpty}\n isDisabled={isDisabled}\n after={<Icon icon={isEmpty ? mdiMenuDown : mdiCloseCircle} />}\n onAfterClick={isEmpty ? onInputClick : onClear}\n onClick={onInputClick}\n ref={mergeRefs(anchorRef as RefObject<HTMLAnchorElement>, selectElementRef)}\n theme={theme}\n {...forwardedProps}\n >\n {isEmpty && <span>{label}</span>}\n\n {!isEmpty && (\n <span>\n <span>{selectedValueRender?.(value[0])}</span>\n\n {value.length > 1 && <span> +{value.length - 1}</span>}\n </span>\n )}\n </Chip>\n )}\n </>\n );\n};\n\n/**\n * SelectMultiple component.\n *\n * @deprecated use `SelectTextField` instead\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SelectMultiple = forwardRef<SelectMultipleProps, HTMLDivElement>((props, ref) => {\n return WithSelectContext(\n SelectMultipleField,\n {\n ...DEFAULT_PROPS,\n ...props,\n className: classNames.join(\n props.className,\n block({\n 'has-multiple': !props.isEmpty,\n }),\n ),\n isEmpty: props.value.length === 0,\n isMultiple: true,\n },\n ref,\n );\n});\nSelectMultiple.displayName = COMPONENT_NAME;\nSelectMultiple.className = CLASSNAME;\nSelectMultiple.defaultProps = DEFAULT_PROPS;\n","import type { Selector } from '../../types';\nimport { getWithSelector } from '../selectors';\n\n/**\n * Find the option whose id matches the given value.\n *\n * Used by Select* wrappers to resolve a selection event (which carries the option id\n * as `selectedOption.value`) back to the original option object.\n *\n * @param options The list of options.\n * @param getOptionId Selector returning the option id (matches `<Combobox.Option value>`).\n * @param id The id to match against.\n * @return The matching option, or `undefined` if none is found / inputs are nullish.\n */\nexport function findOptionById<O>(\n options: readonly O[] | undefined,\n getOptionId: Selector<O> | undefined,\n id: unknown,\n): O | undefined {\n if (id == null) return undefined;\n return options?.find((option) => getWithSelector(getOptionId, option) === id);\n}\n","import type { Selector } from '../../types';\nimport { getWithSelector } from '../selectors';\nimport { findOptionById } from './findOptionById';\n\n/**\n * Compute the next selection state after a user toggles an option.\n *\n * Single-mode behaviour (`isMultiple=false`):\n * - Returns the option matched by id (or `undefined` if none matches the id —\n * e.g. when the consumer triggers a custom action via `beforeOptions`).\n *\n * Multi-mode behaviour (`isMultiple=true`):\n * - If the option is already in the current value array → returns a new array with it removed.\n * - Otherwise → returns a new array with the option appended.\n * - If the id matches no option in `options` (e.g. custom actions), the current array is returned unchanged.\n *\n * Pure function: never mutates `currentValue`.\n *\n * @param options The list of options.\n * @param getOptionId Selector returning the option id (matches `<Combobox.Option value>`).\n * @param currentValue Current selection (option, array of options, or undefined).\n * @param selectedOptionId Id of the option the user just selected.\n * @param isMultiple Whether to use multi-select semantics.\n * @return The new selection — `O | undefined` in single mode, `O[]` in multi mode.\n */\nexport function toggleSelection<O>(\n options: readonly O[] | undefined,\n getOptionId: Selector<O> | undefined,\n currentValue: O | O[] | undefined,\n selectedOptionId: unknown,\n isMultiple: boolean,\n): O | O[] | undefined {\n const newOption = findOptionById(options, getOptionId, selectedOptionId);\n\n if (!isMultiple) {\n // Single mode — return the matched option (or undefined when nothing matches).\n return newOption;\n }\n\n // Multi mode — toggle membership in the current array.\n const currentArray = Array.isArray(currentValue) ? currentValue : [];\n const existingIndex = currentArray.findIndex((item) => getWithSelector(getOptionId, item) === selectedOptionId);\n\n if (existingIndex === -1) {\n // Skip if no matching option found (e.g. custom action items).\n if (!newOption) return currentArray;\n return [...currentArray, newOption];\n }\n\n // Remove option (toggle off).\n const updated = [...currentArray];\n updated.splice(existingIndex, 1);\n return updated;\n}\n","import type { Selector } from '../../types';\nimport { getWithSelector } from '../selectors';\n\n/**\n * Get the display name for a single option value.\n *\n * Resolves the option's display name by trying `getOptionName` first,\n * then falling back to `getOptionId`, returning `''` for nullish values.\n */\nexport function getOptionDisplayName<O>(\n value: O | undefined,\n getOptionName?: Selector<O, string | undefined | null>,\n getOptionId?: Selector<O>,\n): string {\n if (value === undefined || value === null) return '';\n if (getOptionName) {\n const name = getWithSelector(getOptionName, value);\n if (name != null) return String(name);\n }\n if (getOptionId) {\n return String(getWithSelector(getOptionId, value));\n }\n return '';\n}\n","import { getWithSelector, groupBySelector } from '../selectors';\nimport type { JSXElement } from '../../types';\nimport type { BaseSelectComponents, RenderSelectOptionsProps } from './types';\n\n/**\n * Render options as ComboboxOption elements.\n * Framework-specific components are passed as a second argument.\n */\nexport function renderSelectOptions<O>(\n props: RenderSelectOptionsProps<O>,\n components: BaseSelectComponents,\n): JSXElement {\n const {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n selected,\n getSectionId,\n renderSectionTitle,\n } = props;\n const { Combobox } = components;\n\n // Render sections when getSectionId is provided.\n if (getSectionId && options) {\n const sections = groupBySelector(options, (option) => getWithSelector(getSectionId, option));\n\n return Array.from(sections.entries()).map(([sectionId, sectionOptions]) => {\n // When renderSectionTitle is provided, use the custom JSX as the label; otherwise fall back to sectionId.\n const sectionLabel = renderSectionTitle ? renderSectionTitle(sectionId, sectionOptions) : sectionId;\n\n return (\n <Combobox.Section key={sectionId} label={sectionLabel}>\n {renderSelectOptions(\n {\n options: sectionOptions,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n selected,\n // getSectionId intentionally omitted to render flat options inside.\n },\n components,\n )}\n </Combobox.Section>\n );\n }) as any;\n }\n\n // Build a Set of selected IDs (works for both single value and arrays).\n const selectedIds: Set<any> | undefined = selected\n ? new Set((Array.isArray(selected) ? selected : [selected]).map((s) => getWithSelector(getOptionId, s)))\n : undefined;\n\n return options?.map((item, index) => {\n const id = getWithSelector(getOptionId || getOptionName, item) as string;\n const name = getWithSelector(getOptionName || getOptionId, item) || id;\n const description = getOptionDescription && getWithSelector(getOptionDescription, item);\n const isSelected = selectedIds?.has(id) ?? false;\n\n // Delegate to the consumer's render function when provided.\n // The consumer receives core-computed context and is responsible for rendering\n // a <Combobox.Option> with those values forwarded.\n if (renderOption) {\n return renderOption(item, { index, value: id, name, isSelected, description }) as any;\n }\n\n return (\n <Combobox.Option key={id} value={id} description={description} isSelected={isSelected}>\n {name}\n </Combobox.Option>\n );\n }) as any;\n}\n","import castArray from 'lodash/castArray';\n\nimport type { LumxClassName } from '../../types';\nimport { getOptionDisplayName } from '../../utils/select/getOptionDisplayName';\nimport { renderSelectOptions } from '../../utils/select/renderSelectOptions';\nimport type { ComboboxButtonLabelDisplayMode } from '../Combobox/ComboboxButton';\nimport {\n BaseSelectComponents,\n BaseSelectProps,\n SelectButtonTranslations,\n SelectListStatus,\n} from '../../utils/select/types';\n\n/**\n * Defines the props for the core SelectButton template.\n */\nexport interface SelectButtonProps<O> extends BaseSelectProps<O> {\n /**\n * Selected value (single mode) or selected values (multi mode).\n * The wrapper layer chooses the shape; the core just renders names.\n */\n value?: O | O[];\n /** Single or multiple selection */\n selectionType?: 'single' | 'multiple';\n /** Button label (used for ARIA and when no selection). */\n label: string;\n /** Controls how the label/value is displayed in the button. */\n labelDisplayMode?: ComboboxButtonLabelDisplayMode;\n /**\n * Props forwarded to Combobox.Button (button appearance, emphasis, size, etc.).\n * Pass `renderButton` here to provide a custom button renderer — see\n * `ComboboxButtonProps.renderButton`. Framework wrappers are responsible for\n * defaulting any visual affordance (e.g. the dropdown chevron `rightIcon`).\n */\n buttonProps?: Record<string, any>;\n /** Props forwarded to Combobox.Popover. */\n popoverProps?: Record<string, any>;\n /** Props forwarded to Combobox.List (e.g. ref). */\n listProps?: Record<string, any>;\n /** Callback on option selected (receives option id string). */\n handleSelect?: (selectedOption: { value: string }) => void;\n /**\n * Status of the dropdown list.\n * - `'idle'` — Default state, no loading indicators.\n * - `'loading'` — Full loading: shows skeleton placeholders, hides real options.\n * - `'loadingMore'` — Paginated loading: appends a skeleton after existing options.\n * - `'error'` — Error state: shows an error message in the dropdown.\n * @default 'idle'\n */\n listStatus?: SelectListStatus;\n /** Optional translations for screen-reader announcements (loading/empty/error/option count). */\n translations?: SelectButtonTranslations;\n /** Callback fired when the dropdown open state changes. */\n onOpen?: (isOpen: boolean) => void;\n /**\n * Callback fired to load more items (infinite scroll).\n * When provided together with an injected `InfiniteScroll` component, an invisible\n * sentinel element is rendered after the options to trigger loading via IntersectionObserver.\n */\n onLoadMore?: () => void;\n /** IntersectionObserver options forwarded to the InfiniteScroll sentinel. */\n infiniteScrollOptions?: IntersectionObserverInit;\n}\n\n/**\n * Injected framework-specific components for SelectButton rendering.\n */\nexport type SelectButtonComponents = BaseSelectComponents;\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SelectButton';\n\n/**\n * Component default class name.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-select-button';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {\n selectionType: 'single',\n} as const;\n\n/**\n * SelectButton core template.\n * Renders a Combobox with a button trigger and a dropdown list of options.\n *\n * Framework-specific components are passed as a second argument by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const SelectButton = <O,>(props: SelectButtonProps<O>, { Combobox, InfiniteScroll }: SelectButtonComponents) => {\n const {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n value,\n selectionType = DEFAULT_PROPS.selectionType,\n label,\n labelDisplayMode,\n buttonProps,\n popoverProps,\n listProps,\n handleSelect,\n listStatus = 'idle',\n translations,\n onOpen,\n onLoadMore,\n infiniteScrollOptions,\n } = props;\n\n const isFullLoading = listStatus === 'loading';\n const isLoadingMore = listStatus === 'loadingMore';\n const isError = listStatus === 'error';\n const isMultiselectable = selectionType === 'multiple';\n\n /*\n * Display value: castArray normalizes single/multi value to an array, then resolve\n * each option to its name and join with `, `. Falsy entries (undefined, empty names)\n * are filtered out so partial state still renders cleanly.\n */\n const displayValue =\n value != null\n ? castArray(value)\n .map((v) => getOptionDisplayName(v, getOptionName, getOptionId))\n .filter(Boolean)\n .join(', ')\n : '';\n\n return (\n <Combobox.Provider onOpen={onOpen}>\n <Combobox.Button\n {...buttonProps}\n label={label}\n value={displayValue}\n onSelect={handleSelect}\n labelDisplayMode={labelDisplayMode}\n />\n\n <Combobox.Popover\n fitToAnchorWidth=\"minWidth\"\n fitWithinViewportHeight\n placement=\"bottom-start\"\n {...popoverProps}\n >\n <Combobox.List {...listProps} aria-label={label} aria-multiselectable={isMultiselectable || undefined}>\n {isFullLoading ? (\n <Combobox.OptionSkeleton count={3} />\n ) : (\n renderSelectOptions(\n {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n selected: value,\n },\n { Combobox },\n )\n )}\n\n {onLoadMore && InfiniteScroll && (\n <InfiniteScroll\n callback={() => {\n // Guard: prevent firing during loading or error states to avoid duplicate fetches.\n if (listStatus && listStatus !== 'idle') return;\n onLoadMore();\n }}\n options={infiniteScrollOptions}\n />\n )}\n\n {isLoadingMore && <Combobox.OptionSkeleton count={1} />}\n </Combobox.List>\n\n <Combobox.State\n loadingMessage={translations?.loadingMessage}\n emptyMessage={translations?.emptyMessage}\n nbOptionMessage={translations?.nbOptionMessage}\n errorMessage={isError ? translations?.errorMessage : undefined}\n errorTryReloadMessage={isError ? translations?.errorTryReloadMessage : undefined}\n />\n </Combobox.Popover>\n </Combobox.Provider>\n );\n};\n\nSelectButton.displayName = COMPONENT_NAME;\nSelectButton.className = CLASSNAME;\n","import React from 'react';\n\nimport type { JSXElement } from '@lumx/core/js/types';\nimport type { RenderOptionContext } from '@lumx/core/js/utils/select/types';\n\nimport { isComponentType } from '@lumx/react/utils/type';\nimport { ComboboxOption } from './ComboboxOption';\n\n/** Render function passed as `renderOption` to a core Select* template. */\ntype WrappedRenderOption<O> = (option: O, context: RenderOptionContext) => JSXElement | null;\n\n/**\n * Adapts a React `renderOption` callback returning a `<Combobox.Option>` into the\n * `renderOption` shape expected by the core Select* templates.\n *\n * Used by both `SelectTextField` and `SelectButton` React wrappers.\n *\n * Behavior:\n * - If `renderOption` is `undefined`, returns `undefined` (no custom rendering).\n * - If the consumer returns a `<Combobox.Option>`, its props/children are merged with the\n * core-computed `value` / `isSelected` / `description` / `key`.\n * When the consumer's `<Combobox.Option>` has no children, falls back to the option `name`.\n * - If the consumer returns anything else, returns `null` (skips the option).\n *\n * @param renderOption Consumer-provided render function.\n * @return The wrapped `renderOption` callback or `undefined`.\n */\nexport function wrapRenderOption<O>(\n renderOption: ((option: O, index: number) => React.ReactNode) | undefined,\n): WrappedRenderOption<O> | undefined {\n if (!renderOption) return undefined;\n return (option, { index, value: optionValue, isSelected, description, name }) => {\n const node = renderOption(option, index);\n if (!isComponentType(ComboboxOption)(node)) {\n return null;\n }\n\n const { children = name, ...customProps } = (node as React.ReactElement).props;\n return (\n <ComboboxOption\n key={optionValue}\n {...customProps}\n value={optionValue}\n isSelected={isSelected}\n description={description}\n >\n {children}\n </ComboboxOption>\n ) as JSXElement;\n };\n}\n","import React, { ElementType, type ForwardedRef, useCallback, useState } from 'react';\n\nimport { mdiMenuDown } from '@lumx/icons';\nimport { toggleSelection } from '@lumx/core/js/utils/select/toggleSelection';\nimport type { GenericProps, NamedProps } from '@lumx/core/js/types';\nimport {\n SelectButton as UI,\n type SelectButtonProps as UIProps,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/SelectButton';\nimport { type ComboboxButtonLabelDisplayMode } from '@lumx/core/js/components/Combobox/ComboboxButton';\nimport { type SelectButtonTranslations, type SelectListStatus } from '@lumx/core/js/utils/select/types';\nimport { ComponentRef } from '@lumx/react/utils/type';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { Button, type ButtonProps } from '../button';\nimport { Combobox, type ComboboxPopoverProps } from '../combobox';\nimport { wrapRenderOption } from '../combobox/wrapRenderOption';\nimport { InfiniteScroll } from '../../utils/InfiniteScroll';\n\n/** Default trigger: LumX `Button` with the dropdown chevron pre-applied. */\nconst DefaultButton = forwardRef<ButtonProps, HTMLButtonElement>((props, ref) => (\n <Button rightIcon={mdiMenuDown} {...props} ref={ref} />\n));\n\n/** Keys managed internally — never forwarded to the trigger element. */\ntype OmittedKeys =\n | 'value'\n | 'children'\n | 'role'\n | 'aria-controls'\n | 'aria-haspopup'\n | 'aria-expanded'\n | 'aria-activedescendant'\n | 'ref';\n\n/** Select-specific props common to both single and multi modes. */\ninterface SelectButtonSelectProps<O>\n extends ReactToJSX<\n UIProps<O>,\n 'renderOption' | 'buttonProps' | 'value' | 'handleSelect' | 'listProps' | 'infiniteScrollOptions'\n > {\n /** Called to load more options (infinite scroll). */\n onLoadMore?: () => void;\n /** Called when the dropdown opens or closes. */\n onOpen?: (isOpen: boolean) => void;\n /**\n * Custom option renderer. It should return a `<SelectButton.Option>`.\n * Props `value`, `isSelected`, `description` and `key` are merged in automatically.\n */\n renderOption?: (option: O, index: number) => React.ReactNode;\n}\n\n/**\n * Forwarded trigger props for a given element `E`, minus the keys that the\n * component manages internally.\n */\ntype TriggerProps<E extends ElementType> = Omit<NamedProps<React.ComponentProps<E>>, OmittedKeys>;\n\n/**\n * Common base — Select-specific props plus the ARIA / label / popover layer.\n * `as`, `ref`, `selectionType`, `value`, `onChange` are intentionally hoisted\n * to the top-level `SelectButtonProps` shape (below) so that TS can infer\n * `O`, `E`, and `S` directly from those JSX attributes.\n */\ntype CommonSelectButtonProps<O> = SelectButtonSelectProps<O> &\n GenericProps & {\n /** Button label, used for ARIA and as fallback when no option is selected. */\n label: string;\n /** Props forwarded to the popover. */\n popoverProps?: ComboboxPopoverProps;\n /** How the selected option is shown in the trigger. */\n labelDisplayMode?: ComboboxButtonLabelDisplayMode;\n /**\n * Status of the dropdown list (loading, error, etc.).\n * @default 'idle'\n */\n listStatus?: SelectListStatus;\n /** Screen-reader translations (loading/empty/error/option count). */\n translations?: SelectButtonTranslations;\n };\n\n/**\n * Props for `SelectButton`.\n *\n * Polymorphic — pass `as` to render the trigger as a different component\n * (e.g. `as={IconButton}`, `as={Chip}`, `as={Link}`). With no `as`, the trigger\n * is the LumX `Button` with the dropdown chevron, so LumX `ButtonProps`\n * (`emphasis`, `size`, `leftIcon`…) are accepted. With `as`, the trigger is\n * fully replaced and only props valid for that component apply.\n *\n * Discriminated on `selectionType`:\n * - default / `'single'` → `value?: O`, `onChange?: (newValue: O) => void`.\n * - `'multiple'` → `value?: O[]`, `onChange?: (newValue: O[]) => void`.\n *\n * `as` and `selectionType` are top-level on this type (rather than buried in\n * an intersection or union member) so that TS can infer `E` from `as` and\n * `S` from `selectionType` without explicit generic annotations at the call site.\n *\n * @typeParam O - Option object type, inferred from `options` / `getOptionId`.\n * @typeParam E - Trigger element type, inferred from `as`. Defaults to the LumX `Button`.\n * @typeParam S - Selection mode, inferred from `selectionType`. Defaults to `'single'`.\n */\nexport type SelectButtonProps<\n O,\n E extends ElementType = typeof DefaultButton,\n S extends 'single' | 'multiple' = 'single',\n> = CommonSelectButtonProps<O> &\n TriggerProps<E> & {\n /** Customize the rendered trigger component. Inference site for `E`. */\n as?: E;\n /** Ref for the trigger element. Type follows `as`. */\n ref?: ComponentRef<E>;\n /**\n * Selection mode discriminator. Inference site for `S`.\n * Optional — defaults to `'single'`. Set to `'multiple'` to opt into\n * multi-select; this also switches `value` / `onChange` to array form.\n */\n selectionType?: S;\n /** Selected option(s). Shape depends on `selectionType`. */\n value?: S extends 'multiple' ? O[] : O;\n /** Called when the selection changes. Shape depends on `selectionType`. */\n onChange?: S extends 'multiple' ? (newValue: O[]) => void : (newValue: O) => void;\n };\n\n/**\n * Single-selection props (`selectionType` defaults to `'single'`).\n */\nexport type SingleSelectButtonProps<O, E extends ElementType = typeof DefaultButton> = NamedProps<\n SelectButtonProps<O, E, 'single'>\n>;\n\n/**\n * Multi-selection props (`selectionType: 'multiple'` is required to opt in).\n */\nexport type MultipleSelectButtonProps<O, E extends ElementType = typeof DefaultButton> = NamedProps<\n SelectButtonProps<O, E, 'multiple'>\n>;\n\n/**\n * `React.forwardRef` re-typed to preserve our polymorphic generics\n * `<O, E, S>` (which the stock `React.forwardRef` would erase).\n */\ntype ForwardRefSelectButton = (\n render: (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any,\n ref: ForwardedRef<unknown>,\n ) => React.ReactNode,\n) => {\n <O, E extends ElementType = typeof DefaultButton, S extends 'single' | 'multiple' = 'single'>(\n props: SelectButtonProps<O, E, S>,\n ): React.ReactNode;\n displayName?: string;\n};\n\n/**\n * A button trigger with a dropdown to select an option (single mode) or\n * options (multi mode) from a list. Polymorphic — pass `as` to customize the trigger element.\n */\nexport const SelectButton = (React.forwardRef as ForwardRefSelectButton)((props, ref) => {\n const {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n selectionType = DEFAULT_PROPS.selectionType,\n value,\n onChange,\n onLoadMore,\n onOpen,\n label,\n popoverProps,\n labelDisplayMode,\n listStatus,\n translations,\n as,\n ...buttonProps\n } = props;\n const [listElement, setListElement] = useState<HTMLElement | null>(null);\n\n const isMultiple = selectionType === 'multiple';\n\n // Inject core-computed props into the consumer's renderOption result.\n const wrappedRenderOption = wrapRenderOption(renderOption);\n\n // Map the core's option-id selection back to the option object(s).\n const handleSelect = useCallback(\n (selectedOption: { value: string }) => {\n const next = toggleSelection(options, getOptionId, value, selectedOption?.value, isMultiple);\n onChange?.(next);\n },\n [getOptionId, isMultiple, onChange, options, value],\n );\n\n // If as is defined and not the Button, render as, else render DefaultButton (with mdiMenuDown right icon)\n const buttonAs = as && as !== Button ? as : DefaultButton;\n\n return UI(\n {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption: wrappedRenderOption,\n getSectionId,\n renderSectionTitle,\n value,\n selectionType,\n label,\n labelDisplayMode,\n buttonProps: { ...buttonProps, as: buttonAs, ref },\n popoverProps,\n listProps: { ref: setListElement },\n handleSelect,\n listStatus,\n onOpen,\n translations,\n onLoadMore,\n infiniteScrollOptions: { root: listElement, rootMargin: '100px' },\n },\n { Combobox, InfiniteScroll },\n );\n});\n\nSelectButton.displayName = 'SelectButton';\n","import { ComboboxOption } from '../combobox/ComboboxOption';\nimport { SelectButton as _SelectButton } from './SelectButton';\n\nexport type {\n SelectListStatus,\n SelectListStatus as SelectButtonStatus,\n SelectButtonTranslations,\n} from '@lumx/core/js/utils/select/types';\nexport type { SelectButtonProps, SingleSelectButtonProps, MultipleSelectButtonProps } from './SelectButton';\n\n/**\n * SelectButton compound component.\n */\nexport const SelectButton = Object.assign(_SelectButton, {\n /** Selectable option within the dropdown list. */\n Option: ComboboxOption,\n});\n","import type { JSXElement, LumxClassName } from '../../types';\nimport { renderSelectOptions } from '../../utils/select/renderSelectOptions';\nimport { BaseSelectComponents, BaseSelectProps, SelectListStatus } from '../../utils/select/types';\n\n/**\n * Defines the props for the core SelectTextField template.\n */\nexport interface SelectTextFieldProps<O = any> extends BaseSelectProps<O> {\n /** Selected option (single) or options (multiple) — for marking options as selected. */\n selected?: O | O[];\n\n /** Field label (required). Also used as aria-label for the listbox. */\n label: string;\n\n /** Whether the listbox supports multiple selection. */\n isMultiselectable?: boolean;\n\n /** Props forwarded to Combobox.Input. */\n inputProps?: Record<string, any>;\n\n /** Props forwarded to Combobox.Popover. */\n popoverProps?: Record<string, any>;\n\n /** Props forwarded to Combobox.List (e.g. ref). */\n listProps?: Record<string, any>;\n\n /**\n * Status of the dropdown list.\n * - `'idle'` — Default state, no loading indicators.\n * - `'loading'` — Full loading: shows skeleton placeholders, hides real options.\n * - `'loadingMore'` — Paginated loading: appends a skeleton after existing options.\n * - `'error'` — Error state: shows an error message in the dropdown.\n * @default 'idle'\n */\n listStatus?: SelectListStatus;\n\n /** Screen reader loading announcement (e.g. \"Loading…\"). */\n loadingMessage?: string;\n\n /**\n * Message to display when the list has no visible options.\n * Can be a plain string or a function receiving the current input value (for dynamic messages).\n * When omitted, the empty state is not shown.\n */\n emptyMessage?: string | ((inputValue: string) => string);\n\n /**\n * Message callback to display the number of available options.\n * Called with the current visible option count and should return a human-readable string.\n * Displayed when the combobox is open, not empty, not loading, and not in error.\n * When omitted, no option count message is shown.\n */\n nbOptionMessage?: (optionsLength: number) => string;\n\n /** Error title displayed in the dropdown (e.g. \"Failed to load\"). */\n errorMessage?: string;\n\n /** Secondary error message (e.g. \"Please try again\"). */\n errorTryReloadMessage?: string;\n\n /** Callback fired when the dropdown open state changes. */\n onOpen?: (isOpen: boolean) => void;\n\n /** Chips element rendered inside the input (multiple selection). */\n chips?: JSXElement;\n\n /** Content to render before the options list. */\n beforeOptions?: JSXElement;\n\n /** Content to render after options. */\n afterOptions?: JSXElement;\n\n /**\n * Callback fired to load more items (infinite scroll).\n * When provided together with an injected `InfiniteScroll` component, an invisible\n * sentinel element is rendered after the options to trigger loading via IntersectionObserver.\n */\n onLoadMore?: () => void;\n\n /** IntersectionObserver options forwarded to the InfiniteScroll sentinel. */\n infiniteScrollOptions?: IntersectionObserverInit;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SelectTextField';\n\n/**\n * Component default class name.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-select-text-field';\n\n/**\n * SelectTextField core template.\n * Renders a Combobox with a text input trigger and a dropdown list of options.\n * Supports search/filter, single selection, and multiple selection with chips.\n *\n * Framework-specific components are passed as a second argument by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const SelectTextField = (props: SelectTextFieldProps, { Combobox, InfiniteScroll }: BaseSelectComponents) => {\n const {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n selected,\n label,\n isMultiselectable,\n inputProps,\n popoverProps,\n listProps,\n listStatus = 'idle',\n loadingMessage,\n emptyMessage,\n nbOptionMessage,\n errorMessage,\n errorTryReloadMessage,\n onOpen,\n chips,\n beforeOptions,\n afterOptions,\n onLoadMore,\n infiniteScrollOptions,\n } = props;\n\n const isFullLoading = listStatus === 'loading';\n const isLoadingMore = listStatus === 'loadingMore';\n const isError = listStatus === 'error';\n\n return (\n <Combobox.Provider onOpen={onOpen}>\n <Combobox.Input label={label} {...inputProps} selectionMode=\"keep\" chips={chips} />\n\n <Combobox.Popover\n fitToAnchorWidth=\"minWidth\"\n fitWithinViewportHeight\n placement=\"bottom-start\"\n {...popoverProps}\n >\n <Combobox.List {...listProps} aria-label={label} aria-multiselectable={isMultiselectable || undefined}>\n {beforeOptions}\n\n {isFullLoading ? (\n <Combobox.OptionSkeleton count={3} />\n ) : (\n renderSelectOptions(\n {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n selected,\n },\n { Combobox },\n )\n )}\n\n {afterOptions}\n\n {onLoadMore && InfiniteScroll && (\n <InfiniteScroll\n callback={() => {\n // Guard: prevent firing during loading or error states to avoid duplicate fetches.\n if (listStatus && listStatus !== 'idle') return;\n onLoadMore();\n }}\n options={infiniteScrollOptions}\n />\n )}\n\n {isLoadingMore && <Combobox.OptionSkeleton count={1} />}\n </Combobox.List>\n\n <Combobox.State\n loadingMessage={loadingMessage}\n emptyMessage={emptyMessage}\n nbOptionMessage={nbOptionMessage}\n errorMessage={isError ? errorMessage : undefined}\n errorTryReloadMessage={isError ? errorTryReloadMessage : undefined}\n />\n </Combobox.Popover>\n </Combobox.Provider>\n );\n};\n\nSelectTextField.displayName = COMPONENT_NAME;\nSelectTextField.className = CLASSNAME;\n","import React, { SyntheticEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nimport type { ChipProps } from '@lumx/core/js/components/Chip';\nimport { type BaseSelectTextFieldWrapperProps } from '@lumx/core/js/utils/select/types';\nimport { getOptionDisplayName } from '@lumx/core/js/utils/select/getOptionDisplayName';\nimport { toggleSelection } from '@lumx/core/js/utils/select/toggleSelection';\nimport { SelectTextField as UI } from '@lumx/core/js/components/SelectTextField';\nimport { HasClassName } from '@lumx/react/utils/type';\nimport { Combobox, type ComboboxPopoverProps } from '../combobox';\nimport { wrapRenderOption } from '../combobox/wrapRenderOption';\nimport { InfiniteScroll } from '../../utils/InfiniteScroll';\nimport { useMergeRefs } from '../../utils/react/mergeRefs';\nimport { SelectionChipGroup } from '../chip/SelectionChipGroup';\n\ninterface BaseSelectTextFieldProps<O = any> extends BaseSelectTextFieldWrapperProps<O>, HasClassName {\n /**\n * Custom option render function. Must return a `<Combobox.Option>` element with custom\n * children/props. Core-computed props (`value`, `isSelected`, `description`, `key`) are\n * merged in automatically — the consumer does not need to forward them.\n */\n renderOption?: (option: O, index: number) => React.ReactNode;\n /**\n * Custom section title render function. Receives the section id and the options\n * in that section. Returns custom JSX to display as the section header.\n * When not provided, the section id is used as a plain text label.\n */\n renderSectionTitle?: (sectionId: string | undefined, options: O[]) => React.ReactNode;\n /**\n * Callback fired when the search input text changes.\n * Independent of `filter`: both can be used together (e.g. client-side\n * filtering + tracking search text for a \"create\" action).\n */\n onSearch?: (searchText: string) => void;\n /** Ref to the underlying input element. */\n inputRef?: React.Ref<HTMLInputElement>;\n /** Callback to load more items (infinite scroll). */\n onLoadMore?: () => void;\n /** Content to render before the options list. */\n beforeOptions?: React.ReactNode;\n /** Props forwarded to the Combobox.List popover. */\n popoverProps?: ComboboxPopoverProps;\n /** On blur callback. */\n onBlur?: (event: React.FocusEvent) => void;\n /** On focus callback. */\n onFocus?: (event: React.FocusEvent) => void;\n /** On key down callback. */\n onKeyDown?: (event: React.KeyboardEvent) => void;\n /** On clear callback (fired when the clear button is clicked). */\n onClear?: (event?: SyntheticEvent) => void;\n /** Callback fired when the dropdown open state changes. */\n onOpen?: (isOpen: boolean) => void;\n}\n\n/** Single selection props **/\nexport interface SingleSelectTextFieldProps<O = any> extends BaseSelectTextFieldProps<O> {\n /** Selection type. */\n selectionType: 'single';\n /** Selected option object. */\n value?: O;\n /** Callback on option selected (or cleared). */\n onChange?: (newValue?: O) => void;\n /** Not available in single selection. */\n renderChip?: never;\n}\n\n/** Multiple selection props **/\nexport interface MultipleSelectTextFieldProps<O = any> extends BaseSelectTextFieldProps<O> {\n /** Selection type. */\n selectionType: 'multiple';\n /** Selected option objects. */\n value?: O[];\n /** Callback on option array changed. */\n onChange?: (newValue?: O[]) => void;\n /** Custom chip render function. */\n renderChip?: (option: O) => React.ReactNode;\n /** Customize chip props per selected option. */\n getChipProps?: (option: O) => Partial<ChipProps>;\n}\n\n/**\n * SelectTextField props — supports both single and multiple selection.\n * Discriminated on `selectionType`:\n * - `'single'` → `value?: O`, `onChange?: (newValue?: O) => void`.\n * - `'multiple'` → `value?: O[]`, `onChange?: (newValue?: O[]) => void`, `renderChip`, `getChipProps`.\n *\n * @typeParam O - Option object type, inferred from `options` / `getOptionId`.\n */\nexport type SelectTextFieldProps<O = any> = SingleSelectTextFieldProps<O> | MultipleSelectTextFieldProps<O>;\n\n/**\n * A text field with a select dropdown to choose between a list of options.\n * Supports search/filter, single selection, and multiple selection with chips.\n */\nexport const SelectTextField = <O,>(props: SelectTextFieldProps<O>) => {\n const {\n // Options\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n // Selection\n selectionType,\n value,\n onChange,\n // Search / filter\n filter,\n openOnFocus,\n onSearch,\n searchInputValue: externalSearchValue,\n // Clear\n hasClearButton = true,\n // Status\n listStatus = 'idle',\n // Text field\n className,\n label,\n placeholder,\n icon,\n isDisabled,\n 'aria-disabled': ariaDisabled,\n isRequired,\n hasError,\n error,\n helper,\n id,\n name,\n isValid,\n maxLength,\n ariaLabel,\n inputRef: externalInputRef,\n // Event callbacks\n onBlur: externalOnBlur,\n onFocus,\n onKeyDown,\n onClear: externalOnClear,\n onOpen,\n // Forwarding\n inputProps: consumerInputProps,\n // Load more\n onLoadMore,\n beforeOptions,\n // Popover\n popoverProps,\n // Theme\n theme,\n // Translations\n translations,\n } = props;\n\n const isAnyDisabled = !!isDisabled || ariaDisabled === true || ariaDisabled === 'true';\n const isMultiple = selectionType === 'multiple';\n const renderChip = isMultiple ? (props as MultipleSelectTextFieldProps<O>).renderChip : undefined;\n const getChipProps = isMultiple ? (props as MultipleSelectTextFieldProps<O>).getChipProps : undefined;\n\n // Wrap the consumer's renderOption to inject core-computed props\n // (`value`, `isSelected`, `description`, `key`) into the returned <Combobox.Option>.\n const wrappedRenderOption = wrapRenderOption(renderOption);\n\n const [listElement, setListElement] = useState<HTMLElement | null>(null);\n const localInputRef = useRef<HTMLInputElement>(null);\n const mergedInputRef = useMergeRefs(localInputRef, externalInputRef);\n\n // Track whether the user is actively typing a search.\n const [isSearching, setIsSearching] = useState(() => Boolean(externalSearchValue));\n const [searchText, setSearchText] = useState(() => externalSearchValue ?? '');\n\n /* Sync external controlled search value into internal state when it changes.\n * This allows the parent to seed or reset the visible search text\n * (e.g., setting searchInputValue='' after creating an entry from beforeOptions). */\n useEffect(() => {\n if (externalSearchValue !== undefined) {\n setSearchText(externalSearchValue);\n setIsSearching(Boolean(externalSearchValue));\n }\n }, [externalSearchValue]);\n\n // The displayed value shown in the input\n let displayValue;\n if (isMultiple || isSearching) {\n displayValue = searchText;\n } else if (!isMultiple) {\n displayValue = getOptionDisplayName(value as O | undefined, getOptionName, getOptionId);\n }\n\n // Map option id selection to option object(s) selection (delegates the toggle math to core).\n const handleSelect = useCallback(\n (selectedOption: { value: string }) => {\n const next = toggleSelection(\n options,\n getOptionId,\n value as O | O[] | undefined,\n selectedOption.value,\n isMultiple,\n );\n // In multi mode, `toggleSelection` skips when no option matches and returns the\n // unchanged current array — the onChange call is a no-op for the consumer.\n onChange?.(next as any);\n\n // Reset search state after selection.\n setIsSearching(false);\n setSearchText('');\n onSearch?.('');\n },\n [getOptionId, isMultiple, onChange, onSearch, options, value],\n );\n\n // Handle text input changes (search).\n const handleInputChange = useCallback(\n (inputValue: string) => {\n setIsSearching(true);\n setSearchText(inputValue);\n onSearch?.(inputValue);\n\n // When the user clears the input (single mode only), clear the selection too.\n if (!isMultiple && inputValue === '' && value !== undefined && value !== null) {\n (onChange as ((newValue?: O) => void) | undefined)?.(undefined);\n }\n },\n [isMultiple, onChange, onSearch, value],\n );\n\n // Handle clear button click (single mode only).\n const handleClear = useCallback(\n (event?: SyntheticEvent) => {\n // Prevent the clear event from being handled as a regular input change.\n event?.stopPropagation();\n (onChange as ((newValue?: O) => void) | undefined)?.(undefined);\n setIsSearching(false);\n setSearchText('');\n onSearch?.('');\n externalOnClear?.(event);\n },\n [onChange, onSearch, externalOnClear],\n );\n\n // Handle blur: notify consumer, then reset search state.\n const handleBlur = useCallback(\n (event?: React.FocusEvent) => {\n onSearch?.('');\n externalOnBlur?.(event as React.FocusEvent);\n\n if (externalSearchValue) {\n setSearchText(externalSearchValue);\n setIsSearching(true);\n } else {\n setSearchText('');\n setIsSearching(false);\n }\n },\n [externalOnBlur, externalSearchValue, onSearch],\n );\n\n const showClear = !isMultiple && !isAnyDisabled && hasClearButton && value !== undefined && value !== null;\n\n const chips = isMultiple ? (\n <SelectionChipGroup\n value={value as O[] | undefined}\n theme={theme}\n getOptionId={getOptionId}\n getOptionName={getOptionName}\n onChange={onChange as ((newValue?: O[]) => void) | undefined}\n inputRef={localInputRef as React.RefObject<HTMLInputElement>}\n isDisabled={isAnyDisabled}\n label={translations.chipGroupLabel ?? label}\n chipRemoveLabel={translations.chipRemoveLabel}\n renderChip={renderChip}\n getChipProps={getChipProps}\n />\n ) : undefined;\n\n // The core template is not generic, so we cast selectors when forwarding to UI().\n return UI(\n {\n options,\n getOptionId: getOptionId as any,\n getOptionName: getOptionName as any,\n getOptionDescription: getOptionDescription as any,\n renderOption: wrappedRenderOption,\n getSectionId: getSectionId as any,\n renderSectionTitle: renderSectionTitle as any,\n selected: value,\n label,\n isMultiselectable: isMultiple,\n listStatus,\n onOpen,\n loadingMessage: translations.loadingMessage,\n emptyMessage: translations.emptyMessage,\n nbOptionMessage: translations.nbOptionMessage,\n errorMessage: translations.errorMessage,\n errorTryReloadMessage: translations.errorTryReloadMessage,\n inputProps: {\n ...consumerInputProps,\n placeholder,\n icon,\n value: displayValue,\n onChange: handleInputChange,\n onSelect: handleSelect,\n onBlur: handleBlur,\n onFocus,\n onKeyDown,\n inputRef: mergedInputRef,\n isDisabled,\n 'aria-disabled': ariaDisabled,\n isRequired,\n hasError,\n error,\n helper,\n id,\n name,\n isValid,\n maxLength,\n 'aria-label': ariaLabel,\n clearButtonProps: showClear ? { label: translations.clearLabel } : undefined,\n onClear: handleClear,\n toggleButtonProps: translations.showSuggestionsLabel\n ? { label: translations.showSuggestionsLabel }\n : undefined,\n filter,\n openOnFocus,\n className,\n theme,\n },\n popoverProps,\n listProps: { ref: setListElement },\n chips,\n beforeOptions,\n onLoadMore,\n infiniteScrollOptions: { root: listElement, rootMargin: '100px' },\n },\n { Combobox, InfiniteScroll },\n );\n};\n\nSelectTextField.displayName = 'SelectTextField';\n","import { ComboboxOption } from '../combobox/ComboboxOption';\nimport { ComboboxSection } from '../combobox/ComboboxSection';\nimport { ComboboxOptionMoreInfo } from '../combobox/ComboboxOptionMoreInfo';\nimport { ComboboxOptionSkeleton } from '../combobox/ComboboxOptionSkeleton';\nimport { ListDivider } from '../list/ListDivider';\nimport { SelectTextField as _SelectTextField } from './SelectTextField';\n\nexport {\n type SelectTextFieldProps,\n type SingleSelectTextFieldProps,\n type MultipleSelectTextFieldProps,\n} from './SelectTextField';\nexport type { SelectListStatus, SelectListStatus as SelectTextFieldStatus } from '@lumx/core/js/utils/select/types';\nexport type { SelectTextFieldTranslations } from '@lumx/core/js/utils/select/types';\n\n/**\n * SelectTextField compound component.\n */\nexport const SelectTextField = Object.assign(_SelectTextField, {\n /** Selectable option within the dropdown list. */\n Option: ComboboxOption,\n /** Labelled group of options. */\n Section: ComboboxSection,\n /** Info icon on an option that reveals a popover with additional details. */\n OptionMoreInfo: ComboboxOptionMoreInfo,\n /** Skeleton loading placeholder for options being fetched. */\n OptionSkeleton: ComboboxOptionSkeleton,\n /** Visual separator between option groups (alias for ListDivider). Purely decorative — invisible to screen readers. */\n Divider: ListDivider,\n});\n","import { Children, ReactNode } from 'react';\n\nimport { SideNavigationItem, Theme } from '@lumx/react';\nimport { GenericProps, HasTheme, isComponent } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface SideNavigationProps extends GenericProps, HasTheme {\n /** SideNavigationItem elements. */\n children: ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'SideNavigation';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-side-navigation';\n\n/**\n * SideNavigation component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SideNavigation = forwardRef<SideNavigationProps, HTMLUListElement>((props, ref) => {\n const defaultTheme = useTheme();\n const { children, className, theme = defaultTheme, ...forwardedProps } = props;\n const content = Children.toArray(children).filter(isComponent(SideNavigationItem));\n\n return (\n <ul\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, theme === Theme.dark && 'lumx-color-font-light-N', CLASSNAME)}\n >\n {content}\n </ul>\n );\n});\nSideNavigation.displayName = COMPONENT_NAME;\nSideNavigation.className = CLASSNAME;\n","import { Children, ReactNode } from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport { mdiChevronDown, mdiChevronUp } from '@lumx/icons';\nimport { Emphasis, Icon, Size, IconButton, IconButtonProps } from '@lumx/react';\nimport { GenericProps, HasCloseMode, isComponent } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { RawClickable } from '@lumx/core/js/components/RawClickable';\n\n/**\n * Defines the props of the component.\n */\nexport interface SideNavigationItemProps extends GenericProps, HasCloseMode {\n /** SideNavigationItem elements. */\n children?: ReactNode;\n /** Emphasis variant. */\n emphasis?: Emphasis;\n /** Label content. */\n label: string | ReactNode;\n /** Icon (SVG path). */\n icon?: string;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Custom react component for the link (can be used to inject react router Link). */\n linkAs?: 'a' | any;\n /** Props to pass to the link (minus those already set by the SideNavigationItem props). */\n linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;\n /** Props to pass to the toggle button (minus those already set by the SideNavigationItem props). */\n toggleButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color' | 'size'>;\n /** On action button click callback. */\n onActionClick?(evt: React.MouseEvent): void;\n /** On click callback. */\n onClick?(evt: React.MouseEvent): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'SideNavigationItem';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-side-navigation-item';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SideNavigationItemProps> = {\n emphasis: Emphasis.high,\n closeMode: 'unmount',\n};\n\n/**\n * SideNavigationItem component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SideNavigationItem = forwardRef<SideNavigationItemProps, HTMLLIElement>((props, ref) => {\n const {\n children,\n className,\n emphasis = DEFAULT_PROPS.emphasis,\n icon,\n isOpen,\n isSelected,\n label,\n linkAs,\n linkProps,\n onActionClick,\n onClick,\n toggleButtonProps,\n closeMode = DEFAULT_PROPS.closeMode,\n ...forwardedProps\n } = props;\n\n const content = children && Children.toArray(children).filter(isComponent(SideNavigationItem));\n const hasContent = !isEmpty(content);\n const shouldSplitActions = Boolean(onActionClick);\n const showChildren = hasContent && isOpen;\n\n const contentId = useId();\n const ariaProps: any = {};\n if (hasContent) {\n ariaProps['aria-expanded'] = !!showChildren;\n // Associate with content ID only if in DOM (shown or hidden and not unmounted)\n ariaProps['aria-controls'] = showChildren || closeMode === 'hide' ? contentId : undefined;\n }\n\n return (\n <li\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`emphasis-${emphasis}`]: Boolean(emphasis),\n 'is-open': showChildren,\n 'is-selected': isSelected,\n }),\n )}\n >\n {shouldSplitActions ? (\n <div className={element('wrapper')}>\n {RawClickable({\n as: linkAs || (linkProps?.href ? 'a' : 'button'),\n ...(linkProps as any),\n className: element('link'),\n handleClick: onClick,\n handleKeyPress: linkProps?.onKeyPress,\n children: (\n <>\n {icon && <Icon className={element('icon')} icon={icon} size={Size.xs} />}\n <span>{label}</span>\n </>\n ),\n })}\n\n <IconButton\n {...toggleButtonProps}\n className={element('toggle')}\n icon={isOpen ? mdiChevronUp : mdiChevronDown}\n size={Size.m}\n emphasis={Emphasis.low}\n onClick={onActionClick}\n {...ariaProps}\n />\n </div>\n ) : (\n RawClickable({\n as: linkAs || (linkProps?.href ? 'a' : 'button'),\n ...linkProps,\n className: element('link'),\n handleClick: onClick,\n handleKeyPress: linkProps?.onKeyPress,\n ...ariaProps,\n children: (\n <>\n {icon && <Icon className={element('icon')} icon={icon} size={Size.xs} />}\n <span>{label}</span>\n {hasContent && (\n <Icon\n className={element('chevron')}\n icon={isOpen ? mdiChevronUp : mdiChevronDown}\n size={Size.xs}\n />\n )}\n </>\n ),\n })\n )}\n\n {(closeMode === 'hide' || showChildren) && (\n <ul className={element('children')} id={contentId}>\n {content}\n </ul>\n )}\n </li>\n );\n});\nSideNavigationItem.displayName = COMPONENT_NAME;\nSideNavigationItem.className = CLASSNAME;\nSideNavigationItem.defaultProps = DEFAULT_PROPS;\n","import type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport type { GlobalSize, ColorPalette } from '../../constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonCircleProps extends HasTheme, HasClassName {\n /** Size variant. */\n size: GlobalSize;\n /** The color of the skeleton. */\n color?: ColorPalette;\n /** Reference to the root element. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SkeletonCircle';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-skeleton-circle';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SkeletonCircleProps> = {};\n\n/**\n * SkeletonCircle component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const SkeletonCircle = (props: SkeletonCircleProps) => {\n const { className, size, color, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`size-${size}`]: Boolean(size),\n [`color-${color}`]: Boolean(color),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n />\n );\n};\n","import type { LumxClassName, HasTheme, HasClassName, CommonRef, ValueOf } from '../../types';\nimport { classNames } from '../../utils';\nimport type { GlobalSize, ColorPalette, AspectRatio } from '../../constants';\n\n/**\n * Skeleton variants.\n */\nexport const SkeletonRectangleVariant = { squared: 'squared', rounded: 'rounded', pill: 'pill' } as const;\nexport type SkeletonRectangleVariant = ValueOf<typeof SkeletonRectangleVariant>;\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonRectangleProps extends HasTheme, HasClassName {\n /** Aspect ratio (use with width and not height). */\n aspectRatio?: Extract<AspectRatio, 'square' | 'horizontal' | 'vertical' | 'wide'>;\n /** Height size. */\n height?: GlobalSize;\n /** Border variant. */\n variant?: SkeletonRectangleVariant;\n /** Width size. */\n width?: GlobalSize;\n /** The color of the skeleton. */\n color?: ColorPalette;\n /** Reference to the root element. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SkeletonRectangle';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-skeleton-rectangle';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SkeletonRectangleProps> = {\n variant: SkeletonRectangleVariant.squared,\n};\n\n/**\n * SkeletonRectangle component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const SkeletonRectangle = (props: SkeletonRectangleProps) => {\n const {\n aspectRatio,\n className,\n height,\n theme,\n variant = DEFAULT_PROPS.variant,\n width,\n color,\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`aspect-ratio-${aspectRatio}`]: Boolean(aspectRatio),\n [`height-${height}`]: Boolean(aspectRatio ? undefined : height),\n [`theme-${theme}`]: Boolean(theme),\n [`variant-${variant}`]: Boolean(variant),\n [`width-${width}`]: Boolean(width),\n [`color-${color}`]: Boolean(color),\n }),\n )}\n >\n <div className={element('inner')} />\n </div>\n );\n};\n","import { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n SkeletonCircle as UI,\n SkeletonCircleProps as UIProps,\n SKELETON_CIRCLE_CLASSNAME as CLASSNAME,\n SKELETON_CIRCLE_COMPONENT_NAME as COMPONENT_NAME,\n} from '@lumx/core/js/components/Skeleton';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonCircleProps extends GenericProps, ReactToJSX<UIProps> {}\n\nconst DEFAULT_PROPS: Partial<SkeletonCircleProps> = {};\n\n/**\n * SkeletonCircle component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SkeletonCircle = forwardRef<SkeletonCircleProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { className, size, color, theme = defaultTheme, ...forwardedProps } = props;\n\n return UI({\n ref,\n className,\n size,\n color,\n theme,\n ...forwardedProps,\n });\n});\nSkeletonCircle.displayName = COMPONENT_NAME;\nSkeletonCircle.defaultProps = DEFAULT_PROPS;\nSkeletonCircle.className = CLASSNAME;\n","import { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n SkeletonRectangle as UI,\n SkeletonRectangleProps as UIProps,\n SkeletonRectangleVariant,\n SKELETON_RECTANGLE_CLASSNAME as CLASSNAME,\n SKELETON_RECTANGLE_COMPONENT_NAME as COMPONENT_NAME,\n SKELETON_RECTANGLE_DEFAULT_PROPS as UI_DEFAULT_PROPS,\n} from '@lumx/core/js/components/Skeleton';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport { SkeletonRectangleVariant };\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonRectangleProps extends GenericProps, ReactToJSX<UIProps> {}\n\nconst DEFAULT_PROPS: Partial<SkeletonRectangleProps> = UI_DEFAULT_PROPS;\n\n/**\n * SkeletonRectangle component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SkeletonRectangle = forwardRef<SkeletonRectangleProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n aspectRatio,\n className,\n height,\n theme = defaultTheme,\n variant = DEFAULT_PROPS.variant,\n width,\n color,\n ...forwardedProps\n } = props;\n\n return UI({\n ref,\n aspectRatio,\n className,\n height,\n theme,\n variant,\n width,\n color,\n ...forwardedProps,\n });\n});\nSkeletonRectangle.displayName = COMPONENT_NAME;\nSkeletonRectangle.className = CLASSNAME;\nSkeletonRectangle.defaultProps = DEFAULT_PROPS;\n","import { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n SkeletonTypography as UI,\n SkeletonTypographyProps as UIProps,\n SKELETON_TYPOGRAPHY_CLASSNAME as CLASSNAME,\n SKELETON_TYPOGRAPHY_COMPONENT_NAME as COMPONENT_NAME,\n} from '@lumx/core/js/components/Skeleton';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonTypographyProps extends GenericProps, ReactToJSX<UIProps> {}\n\nconst DEFAULT_PROPS: Partial<SkeletonTypographyProps> = {};\n\n/**\n * SkeletonTypography component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SkeletonTypography = forwardRef<SkeletonTypographyProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { className, theme = defaultTheme, typography, width, color, ...forwardedProps } = props;\n\n return UI({\n ref,\n className,\n theme,\n typography,\n width,\n color,\n ...forwardedProps,\n });\n});\nSkeletonTypography.displayName = COMPONENT_NAME;\nSkeletonTypography.defaultProps = DEFAULT_PROPS;\nSkeletonTypography.className = CLASSNAME;\n","/**\n * Clamp value in range.\n *\n * @param value Value to clamp.\n * @param min Minimum value.\n * @param max Maximum value.\n * @return Clamped value.\n */\nexport const clamp = (value: number, min: number, max: number): number => {\n if (value < min) {\n return min;\n }\n if (value > max) {\n return max;\n }\n return value;\n};\n","/* eslint-disable jsx-a11y/no-static-element-interactions */\nimport { SyntheticEvent, useMemo, useRef } from 'react';\n\nimport { InputHelper, InputLabel, Theme } from '@lumx/react';\nimport { useEventCallback } from '@lumx/react/hooks/useEventCallback';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { clamp } from '@lumx/react/utils/number/clamp';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\n\n/**\n * Defines the props of the component.\n */\nexport interface SliderProps extends GenericProps, HasTheme {\n /** Helper text. */\n helper?: string;\n /** Whether the min and max labels should be hidden or not. */\n hideMinMaxLabel?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Label text. */\n label?: string;\n /** Maximum value on the range. */\n max: number;\n /** Minimum value of the range. */\n min: number;\n /** Native input name property. */\n name?: string;\n /** Number of digits in the fractional part of the selected value. */\n precision?: number;\n /** Range step value. */\n steps?: number;\n /** Selected ranged value. */\n value: number;\n /** On change callback. */\n onChange(value: number, name?: string, event?: SyntheticEvent): void;\n /** On click callback. */\n onMouseDown?(event: React.SyntheticEvent): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Slider';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-slider';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SliderProps> = {\n precision: 0,\n steps: 0,\n};\n\n/**\n * Convert a percent value to a value in range min - max.\n *\n * @param percent Value to convert.\n * @param min Minimum value.\n * @param max Maximum value.\n * @param precision Precision.\n * @return Value in range min - max\n */\nconst computeValueFromPercent = (percent: number, min: number, max: number, precision = 0): number =>\n Number((min + percent * (max - min)).toFixed(precision));\n\n/**\n * Convert a value in range min - max to a percent value.\n *\n * @param value Value to convert.\n * @param min Minimum value.\n * @param max Maximum value.\n * @return Value in percent\n */\nconst computePercentFromValue = (value: number, min: number, max: number): number =>\n Number((value - min) / (max - min));\n\n/**\n * Slider component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Slider = forwardRef<SliderProps, HTMLDivElement>((props, ref) => {\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(props);\n const defaultTheme = useTheme() || Theme.light;\n const {\n className,\n helper,\n hideMinMaxLabel,\n id,\n label,\n max,\n min,\n name,\n onChange,\n onMouseDown,\n precision = DEFAULT_PROPS.precision,\n steps = DEFAULT_PROPS.steps,\n theme = defaultTheme,\n value,\n ...forwardedProps\n } = otherProps;\n const generatedId = useId();\n const sliderId = id || generatedId;\n const sliderLabelId = useMemo(() => `label-${sliderId}`, [sliderId]);\n const sliderRef = useRef<HTMLDivElement>(null);\n\n // build a lookup array for the steps.\n const availableSteps = useMemo((): number[] => {\n if (!steps) return [];\n\n const available = [0];\n const percentStep = 1 / ((max - min) / steps);\n let ptr = 0;\n while (ptr + percentStep <= 1) {\n ptr += percentStep;\n available.push(ptr);\n }\n return available;\n }, [steps, min, max]);\n\n /**\n * Try to find the closest step to the current slider position.\n *\n * @param percentValue Reference value\n * @return The closest step value\n */\n const findClosestStep = (percentValue: number): number => {\n const closest = availableSteps.reduce(\n (acc, step) => {\n const aDst = Math.abs(percentValue - step);\n if (aDst < acc.dst) {\n return { dst: aDst, val: step };\n }\n return acc;\n },\n { dst: Infinity, val: -1 },\n );\n return closest.val;\n };\n\n /**\n * Convert slider's handle position to percent.\n *\n * @param event The interaction event\n * @param slider the slider element\n * @return The computed percent value\n */\n const getPercentValue = (event: React.MouseEvent, slider: HTMLDivElement): number => {\n const { width, left } = slider.getBoundingClientRect();\n let percent = (event.pageX - left - window.pageXOffset) / width;\n percent = clamp(percent, 0, 1);\n if (steps) {\n percent = findClosestStep(percent);\n }\n return percent;\n };\n\n /**\n * Register a handler for the mouse move event.\n */\n const handleMove = useEventCallback((event: React.MouseEvent) => {\n const { current: slider } = sliderRef;\n if (!slider || !onChange) return;\n const newValue = getPercentValue(event, slider);\n onChange(computeValueFromPercent(newValue, min, max, precision), name, event);\n });\n\n /**\n * Register a handler for the mouse up event.\n * Clean a all listeners.\n */\n const handleEnd = useEventCallback(() => {\n document.body.removeEventListener('mousemove', handleMove as any);\n document.body.removeEventListener('mouseup', handleEnd);\n document.body.removeEventListener('touchmove', handleMove as any);\n document.body.removeEventListener('touchend', handleEnd);\n });\n\n /**\n * Move to the next or previous value (i.e. + or - 10%) or next step\n * @param previous Should seek the previous value.\n */\n const hopToValue = (previous = false) => {\n const oldPercent = computePercentFromValue(value, min, max);\n let percent = clamp(oldPercent + (previous ? -0.1 : 0.1), 0, 1);\n if (steps) {\n percent = oldPercent + availableSteps[1] * (previous ? -1 : 1);\n percent = findClosestStep(percent);\n }\n if (onChange) {\n onChange(computeValueFromPercent(percent, min, max, precision), name);\n }\n };\n\n /**\n * Register a handler for keyboard interactions\n */\n const handleKeyDown = useEventCallback((event: React.KeyboardEvent) => {\n if (event.key === 'ArrowRight') {\n hopToValue();\n } else if (event.key === 'ArrowLeft') {\n hopToValue(true);\n }\n });\n\n /**\n * Register a handler for the mouseDown event.\n */\n const handleMouseDown = useEventCallback((event: React.MouseEvent) => {\n onMouseDown?.(event);\n\n const { current: slider } = sliderRef;\n if (isAnyDisabled || !slider) return;\n const newValue = getPercentValue(event, slider);\n if (onChange) {\n onChange(computeValueFromPercent(newValue, min, max, precision), name, event);\n }\n\n document.body.addEventListener('mousemove', handleMove as any);\n document.body.addEventListener('mouseup', handleEnd);\n });\n\n const percentString = `${computePercentFromValue(value, min, max) * 100}%`;\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n 'has-label': Boolean(label),\n }),\n )}\n onMouseDown={handleMouseDown}\n >\n {label && (\n <InputLabel id={sliderLabelId} htmlFor={sliderId} className={element('label')} theme={theme}>\n {label}\n </InputLabel>\n )}\n\n {helper && (\n <InputHelper className={element('helper')} theme={theme}>\n {helper}\n </InputHelper>\n )}\n\n <div className={element('ui-wrapper')}>\n {!hideMinMaxLabel && <span className={element('value-label', { min: true })}>{min}</span>}\n <div className={element('wrapper')} ref={sliderRef}>\n <div\n className={element('track', {\n background: true,\n })}\n />\n <div\n className={element('track', {\n active: true,\n })}\n style={{ width: percentString }}\n />\n {steps ? (\n <div className={element('ticks')}>\n {availableSteps.map((step, idx) => (\n <div\n key={`tick_${idx}`}\n className={element('tick')}\n style={{ left: `${step * 100}%` }}\n />\n ))}\n </div>\n ) : null}\n <button\n type=\"button\"\n aria-labelledby={sliderLabelId}\n name={name}\n id={sliderId}\n className={element('handle')}\n style={{ left: percentString }}\n onKeyDown={isAnyDisabled ? undefined : handleKeyDown}\n {...disabledStateProps}\n />\n </div>\n {!hideMinMaxLabel && <span className={element('value-label', { max: true })}>{max}</span>}\n </div>\n </div>\n );\n});\nSlider.displayName = COMPONENT_NAME;\nSlider.className = CLASSNAME;\nSlider.defaultProps = DEFAULT_PROPS;\n","import { useEffect, useRef } from 'react';\n\nimport isFunction from 'lodash/isFunction';\nimport { Callback } from '@lumx/react/utils/type';\n\n/**\n * Making setInterval Declarative with React Hooks.\n * Credits: https://overreacted.io/making-setinterval-declarative-with-react-hooks/\n *\n * @param callback Function called by setInterval.\n * @param delay Delay for setInterval.\n */\nexport function useInterval(callback: Callback, delay: number | null): void {\n const savedCallback = useRef<Callback>();\n\n useEffect(() => {\n savedCallback.current = callback;\n });\n\n useEffect(() => {\n if (delay === null) return undefined;\n\n function tick() {\n if (isFunction(savedCallback.current)) {\n savedCallback.current();\n }\n }\n const id = setInterval(tick, delay);\n return () => clearInterval(id);\n }, [delay]);\n}\n","import type { ValueOf } from '@lumx/core/js/types';\n\n/**\n * Autoplay default interval in ms.\n */\nexport const AUTOPLAY_DEFAULT_INTERVAL = 5000;\n\n/**\n * Full width size in percent.\n */\nexport const FULL_WIDTH_PERCENT = 100;\n\n/**\n * Edge from the active index.\n */\nexport const EDGE_FROM_ACTIVE_INDEX = 2;\n\n/**\n * Max number of pagination items.\n */\nexport const PAGINATION_ITEMS_MAX = 5;\n\n/**\n * Size of a pagination item. Used to translate wrapper.\n */\nexport const PAGINATION_ITEM_SIZE = 12;\n\n/**\n * Slide mode\n */\nexport const SlideMode = {\n /** Move slides with CSS transform translate */\n transformTranslate: 'transform-translate',\n /** Move slides native scroll snap (available only on supported browsers) */\n scrollSnap: 'scroll-snap',\n} as const;\nexport type SlideMode = ValueOf<typeof SlideMode>;\n","import { useState, useCallback, useEffect } from 'react';\n\nimport { useInterval } from '@lumx/react/hooks/useInterval';\nimport { AUTOPLAY_DEFAULT_INTERVAL } from '@lumx/react/components/slideshow/constants';\nimport { useId } from '@lumx/react/hooks/useId';\n\nexport interface UseSlideshowControlsOptions {\n /** default active index to be displayed */\n defaultActiveIndex?: number;\n /** total slides to display */\n itemsCount: number;\n /** Index of the current slide. */\n activeIndex?: number;\n /** Whether the automatic rotation of the slideshow is enabled or not. */\n autoPlay?: boolean;\n /** Whether the image has to fill its container height or not. */\n fillHeight?: boolean;\n /** Number of slides to group together. */\n groupBy?: number;\n /** Interval between each slide when automatic rotation is enabled. */\n interval?: number;\n /** Callback when slide changes */\n onChange?(index: number): void;\n /** slideshow HTML id attribute */\n id?: string;\n /** slides wrapper HTML id attribute */\n slidesId?: string;\n}\n\nexport interface UseSlideshowControls {\n /** Index for the first visible slide, should be used when groupBy is passed in */\n startIndexVisible: number;\n /** Index for the last visible slide, should be used when groupBy is passed in */\n endIndexVisible: number;\n /** total slides to be displayed */\n slidesCount: number;\n /** callback to set */\n setSlideshow: (element: HTMLDivElement | null) => void;\n /** reference to the slideshow element */\n slideshow: HTMLDivElement | null;\n /** id to be used for the slideshow */\n slideshowId: string;\n /** id to be used for the wrapper that contains the slides */\n slideshowSlidesId: string;\n /** callback that triggers the previous slide while using the slideshow controls */\n onPreviousClick: (loopback: boolean) => void;\n /** callback that triggers the next slide while using the slideshow controls */\n onNextClick: (loopback: boolean) => void;\n /** callback that triggers a specific page while using the slideshow controls */\n onPaginationClick: (index: number) => void;\n /** whether the slideshow is autoplaying or not */\n isAutoPlaying: boolean;\n /** whether the slideshow was force paused or not */\n isForcePaused: boolean;\n /** callback to change whether the slideshow is autoplaying or not */\n toggleAutoPlay: () => void;\n /** calback to change whether the slideshow should be force paused or not */\n toggleForcePause: () => void;\n /** current active slide index */\n activeIndex: number;\n /** set the current index as the active one */\n setActiveIndex: (index: number) => void;\n /** callback that stops the auto play */\n stopAutoPlay: () => void;\n /** callback that starts the auto play */\n startAutoPlay: () => void;\n}\n\nexport const DEFAULT_OPTIONS = {\n activeIndex: 0,\n groupBy: 1,\n interval: AUTOPLAY_DEFAULT_INTERVAL,\n} as const;\n\nexport const useSlideshowControls = ({\n activeIndex = DEFAULT_OPTIONS.activeIndex,\n groupBy = DEFAULT_OPTIONS.groupBy,\n interval = DEFAULT_OPTIONS.interval,\n autoPlay,\n defaultActiveIndex,\n onChange,\n itemsCount,\n id,\n slidesId,\n}: UseSlideshowControlsOptions): UseSlideshowControls => {\n const [currentIndex, setCurrentIndex] = useState(activeIndex as number);\n // Use state instead of a ref to make the slideshow controls update directly when the element is set.\n const [element, setElement] = useState<HTMLDivElement | null>(null);\n\n // Number of slides when using groupBy prop.\n const slidesCount = Math.ceil(itemsCount / Math.min(groupBy as number, itemsCount));\n\n // Change current index to display next slide.\n const goToNextSlide = useCallback(\n (loopback = true) => {\n setCurrentIndex((index) => {\n if (loopback && index === slidesCount - 1) {\n // Loopback to the start.\n return 0;\n }\n if (index < slidesCount - 1) {\n // Next slide.\n return index + 1;\n }\n return index;\n });\n },\n [slidesCount, setCurrentIndex],\n );\n\n // Change current index to display previous slide.\n const goToPreviousSlide = useCallback(\n (loopback = true) => {\n setCurrentIndex((index) => {\n if (loopback && index === 0) {\n // Loopback to the end.\n return slidesCount - 1;\n }\n if (index > 0) {\n // Previous slide.\n return index - 1;\n }\n return index;\n });\n },\n [slidesCount, setCurrentIndex],\n );\n\n // Auto play\n const [isAutoPlaying, setIsAutoPlaying] = useState(Boolean(autoPlay));\n const [isForcePaused, setIsForcePaused] = useState(false);\n\n const isSlideshowAutoPlaying = isForcePaused ? false : isAutoPlaying;\n // Start\n useInterval(goToNextSlide, isSlideshowAutoPlaying && slidesCount > 1 ? (interval as number) : null);\n\n // Reset current index if it become invalid.\n useEffect(() => {\n if (currentIndex > slidesCount - 1) {\n setCurrentIndex(defaultActiveIndex as number);\n }\n }, [currentIndex, slidesCount, defaultActiveIndex]);\n\n const startAutoPlay = () => {\n setIsAutoPlaying(Boolean(autoPlay));\n };\n\n const stopAutoPlay = () => {\n setIsAutoPlaying(false);\n };\n\n // Handle click on a bullet to go to a specific slide.\n const onPaginationClick = useCallback(\n (index: number) => {\n stopAutoPlay();\n setIsForcePaused(true);\n\n if (index >= 0 && index < slidesCount) {\n setCurrentIndex(index);\n }\n },\n [slidesCount, setCurrentIndex],\n );\n\n // Handle click or keyboard event to go to next slide.\n const onNextClick = useCallback(\n (loopback = true) => {\n stopAutoPlay();\n setIsForcePaused(true);\n goToNextSlide(loopback);\n },\n [goToNextSlide],\n );\n\n // Handle click or keyboard event to go to previous slide.\n const onPreviousClick = useCallback(\n (loopback = true) => {\n stopAutoPlay();\n setIsForcePaused(true);\n goToPreviousSlide(loopback);\n },\n [goToPreviousSlide],\n );\n\n // If the activeIndex props changes, update the current slide\n useEffect(() => {\n setCurrentIndex(activeIndex as number);\n }, [activeIndex]);\n\n // If the slide changes, with autoplay for example, trigger \"onChange\"\n useEffect(() => {\n if (!onChange) return;\n onChange(currentIndex);\n }, [currentIndex, onChange]);\n\n const generatedSlideshowId = useId();\n const slideshowId = id || generatedSlideshowId;\n\n const generatedSlidesId = useId();\n const slideshowSlidesId = slidesId || generatedSlidesId;\n\n const toggleAutoPlay = () => {\n if (isSlideshowAutoPlaying) {\n stopAutoPlay();\n } else {\n startAutoPlay();\n }\n };\n\n const toggleForcePause = () => {\n const shouldBePaused = !isForcePaused;\n\n setIsForcePaused(shouldBePaused);\n\n if (!shouldBePaused) {\n startAutoPlay();\n } else {\n stopAutoPlay();\n }\n };\n\n // Start index and end index of visible slides.\n const startIndexVisible = currentIndex * (groupBy as number);\n const endIndexVisible = startIndexVisible + (groupBy as number);\n\n return {\n startIndexVisible,\n endIndexVisible,\n setSlideshow: setElement,\n slideshow: element,\n slideshowId,\n slideshowSlidesId,\n onPreviousClick,\n onNextClick,\n onPaginationClick,\n isAutoPlaying: isSlideshowAutoPlaying,\n toggleAutoPlay,\n activeIndex: currentIndex,\n slidesCount,\n setActiveIndex: setCurrentIndex,\n startAutoPlay,\n stopAutoPlay,\n isForcePaused,\n toggleForcePause,\n };\n};\n","import { useEffect } from 'react';\n\nexport interface UseFocusWithinOptions {\n /** element to add the focus within to */\n element: HTMLElement | null;\n /** callback to be executed on focus in */\n onFocusIn: (ev: FocusEvent) => void;\n /** callback to be executed on focus out */\n onFocusOut: (ev: FocusEvent) => void;\n}\n\n/**\n * Hook that allows to control when there is a focus event within a given element, meaning\n * that any element within the given target will trigger the focus in and focus out events.\n * @param options - UseFocusWithinOptions\n */\nexport const useFocusWithin = ({ element, onFocusIn, onFocusOut }: UseFocusWithinOptions) => {\n useEffect(() => {\n if (element) {\n element.addEventListener('focusin', onFocusIn);\n\n element.addEventListener('focusout', onFocusOut);\n }\n\n return () => {\n if (element) {\n element.removeEventListener('focusin', onFocusIn);\n\n element.removeEventListener('focusout', onFocusOut);\n }\n };\n }, [onFocusIn, element, onFocusOut]);\n};\n","import { WINDOW } from '@lumx/react/constants';\n\n/** Check if browser supports CSS scroll-snap */\nexport function isScrollSnapSupported() {\n return WINDOW?.CSS?.supports?.('scroll-snap-type', 'x mandatory') ?? false;\n}\n","import { useEffect } from 'react';\nimport { getFocusableElements } from '@lumx/core/js/utils/focus/getFocusableElements';\n\nexport interface UseSlideFocusManagementProps {\n isSlideDisplayed?: boolean;\n slideRef: React.RefObject<HTMLDivElement>;\n}\n\n/**\n * Classname set on elements whose focus was blocked.\n * This is to easily find elements that have been tempered with,\n * and not elements whose focus was already initially blocked.\n * */\nconst BLOCKED_FOCUS_CLASSNAME = 'focus-blocked';\n\n/**\n * Manage how slides must behave when visible or not.\n * When not visible, they should be hidden from screen readers and not focusable.\n */\nexport const useSlideFocusManagement = ({ isSlideDisplayed, slideRef }: UseSlideFocusManagementProps) => {\n useEffect(() => {\n const element = slideRef?.current;\n\n if (!element) {\n return undefined;\n }\n\n /**\n * Display given slide to screen readers and, if focus was blocked, restore focus on elements.\n */\n const enableSlide = () => {\n // Hide from screen readers\n element.setAttribute('aria-hidden', 'false');\n // Find elements we have blocked focus on\n element.querySelectorAll(`.${BLOCKED_FOCUS_CLASSNAME}`).forEach((focusableElement) => {\n focusableElement.removeAttribute('tabindex');\n focusableElement.classList.remove(BLOCKED_FOCUS_CLASSNAME);\n });\n };\n\n /**\n * Hide given slide from screen readers and block focus on all focusable elements within.\n */\n const blockSlide = () => {\n element.setAttribute('aria-hidden', 'true');\n getFocusableElements(element).forEach((focusableElement) => {\n focusableElement.setAttribute('tabindex', '-1');\n focusableElement.classList.add(BLOCKED_FOCUS_CLASSNAME);\n });\n };\n\n const handleDisplay = () => {\n if (!element) {\n return;\n }\n if (isSlideDisplayed) {\n enableSlide();\n } else {\n blockSlide();\n }\n };\n\n // Callback function to execute when mutations are observed\n const callback: MutationCallback = (mutationsList) => {\n if (element) {\n for (const mutation of mutationsList) {\n if (mutation.type === 'childList') {\n handleDisplay();\n }\n }\n }\n };\n\n // Create an observer instance linked to the callback function\n const observer = new MutationObserver(callback);\n\n if (element) {\n handleDisplay();\n\n /** If slide is hidden, start observing for elements to block focus */\n if (!isSlideDisplayed) {\n observer.observe(element, { attributes: true, childList: true, subtree: true });\n }\n }\n\n return () => {\n if (!isSlideDisplayed) {\n observer.disconnect();\n }\n };\n }, [isSlideDisplayed, slideRef]);\n};\n","import React from 'react';\n\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useSlideFocusManagement } from './useSlideFocusManagement';\n\n/**\n * Defines the props of the component.\n */\nexport interface SlideshowItemGroupProps extends GenericProps {\n role?: 'tabpanel' | 'group';\n label?: string;\n isDisplayed?: boolean;\n children?: React.ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'SlideshowItemGroup';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-slideshow-item-group';\n\nexport const buildSlideShowGroupId = (slidesId: string, index: number) => `${slidesId}-slide-${index}`;\n\n/**\n * SlideshowItemGroup component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SlideshowItemGroup = forwardRef<SlideshowItemGroupProps, HTMLDivElement>((props, ref) => {\n const { className, children, role = 'group', label, isDisplayed, ...forwardedProps } = props;\n const groupRef = React.useRef<HTMLDivElement>(null);\n\n useSlideFocusManagement({ isSlideDisplayed: isDisplayed, slideRef: groupRef });\n\n return (\n <div\n ref={mergeRefs(groupRef, ref)}\n role={role}\n className={classNames.join(className, CLASSNAME)}\n aria-roledescription=\"slide\"\n aria-label={label}\n {...forwardedProps}\n >\n {children}\n </div>\n );\n});\n\nSlideshowItemGroup.displayName = COMPONENT_NAME;\nSlideshowItemGroup.className = CLASSNAME;\n","import React from 'react';\n\nimport { SlideshowControls, SlideshowControlsProps, Theme, Slides, SlidesProps } from '@lumx/react';\nimport { DEFAULT_OPTIONS } from '@lumx/react/hooks/useSlideshowControls';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { useFocusWithin } from '@lumx/react/hooks/useFocusWithin';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { isScrollSnapSupported } from '@lumx/react/utils/browser/isScrollSnapSupported';\nimport { buildSlideShowGroupId } from './SlideshowItemGroup';\nimport { SlideMode } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface SlideshowProps\n extends GenericProps,\n Pick<SlidesProps, 'autoPlay' | 'slidesId' | 'id' | 'theme' | 'fillHeight' | 'groupBy' | 'slideGroupLabel'> {\n /** Whether to use CSS transform translate or native scroll snap. */\n slideMode?: SlideMode;\n /** current slide active */\n activeIndex?: SlidesProps['activeIndex'];\n /** Interval between each slide when automatic rotation is enabled. */\n interval?: number;\n /** Props to pass to the slideshow controls (minus those already set by the Slideshow props). */\n slideshowControlsProps?: Pick<\n SlideshowControlsProps,\n 'nextButtonProps' | 'previousButtonProps' | 'paginationItemProps'\n > &\n Omit<\n SlideshowControlsProps,\n | 'activeIndex'\n | 'onPaginationClick'\n | 'onNextClick'\n | 'onPreviousClick'\n | 'slidesCount'\n | 'parentRef'\n | 'theme'\n >;\n /** Callback when slide changes */\n onChange?(index: number): void;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SlideshowProps> = {\n ...DEFAULT_OPTIONS,\n slideMode: SlideMode.transformTranslate,\n};\n\n/**\n * Slideshow component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Slideshow = forwardRef<SlideshowProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n activeIndex,\n autoPlay = DEFAULT_PROPS.autoPlay,\n children,\n className,\n fillHeight,\n groupBy = DEFAULT_OPTIONS.groupBy,\n interval = DEFAULT_PROPS.interval,\n onChange,\n slideshowControlsProps,\n theme = defaultTheme,\n id,\n slidesId,\n slideGroupLabel,\n slideMode = DEFAULT_PROPS.slideMode,\n ...forwardedProps\n } = props;\n // Number of slideshow items.\n const itemsCount = React.Children.count(children);\n\n const {\n activeIndex: currentIndex,\n slideshowId,\n setSlideshow,\n isAutoPlaying,\n slideshowSlidesId,\n slidesCount,\n onNextClick,\n onPaginationClick,\n onPreviousClick,\n slideshow,\n stopAutoPlay,\n startAutoPlay,\n toggleAutoPlay,\n toggleForcePause,\n } = SlideshowControls.useSlideshowControls({\n activeIndex,\n defaultActiveIndex: DEFAULT_PROPS.activeIndex as number,\n autoPlay: Boolean(autoPlay),\n itemsCount,\n groupBy,\n id,\n interval,\n onChange,\n slidesId,\n });\n\n useFocusWithin({\n element: slideshow,\n onFocusIn: stopAutoPlay,\n onFocusOut: startAutoPlay,\n });\n\n const showControls = slideshowControlsProps && slidesCount > 1;\n\n // Only enable scroll-snap if requested and browser supports it\n const isScrollsnapEnabled = slideMode === SlideMode.scrollSnap && isScrollSnapSupported();\n\n return (\n <Slides\n slideMode={slideMode}\n onChange={isScrollsnapEnabled ? onPaginationClick : undefined}\n activeIndex={currentIndex}\n id={slideshowId}\n className={className}\n theme={theme}\n fillHeight={fillHeight}\n groupBy={groupBy}\n isAutoPlaying={isAutoPlaying}\n autoPlay={autoPlay}\n slidesId={slideshowSlidesId}\n toggleAutoPlay={toggleAutoPlay}\n ref={mergeRefs(ref, setSlideshow)}\n hasControls={showControls}\n slideGroupLabel={slideGroupLabel}\n afterSlides={\n slideshowControlsProps && slidesCount > 1 ? (\n <div className={`${Slides.className}__controls`}>\n <SlideshowControls\n {...slideshowControlsProps}\n activeIndex={currentIndex}\n onPaginationClick={onPaginationClick}\n onNextClick={onNextClick}\n onPreviousClick={onPreviousClick}\n slidesCount={slidesCount}\n parentRef={slideshow}\n theme={theme}\n isAutoPlaying={isAutoPlaying}\n nextButtonProps={{\n 'aria-controls': slideshowSlidesId,\n ...slideshowControlsProps.nextButtonProps,\n }}\n previousButtonProps={{\n 'aria-controls': slideshowSlidesId,\n ...slideshowControlsProps.previousButtonProps,\n }}\n playButtonProps={\n autoPlay\n ? {\n 'aria-controls': slideshowSlidesId,\n onClick: toggleForcePause,\n ...slideshowControlsProps.playButtonProps,\n }\n : undefined\n }\n paginationItemProps={(index) => ({\n 'aria-controls': buildSlideShowGroupId(slideshowSlidesId, index),\n ...slideshowControlsProps.paginationItemProps?.(index),\n })}\n />\n </div>\n ) : undefined\n }\n {...forwardedProps}\n >\n {children}\n </Slides>\n );\n});\n\nSlideshow.displayName = 'Slideshow';\nSlideshow.defaultProps = DEFAULT_PROPS;\n","import { GenericProps } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\n/**\n * Defines the props of the component.\n */\nexport interface SlideshowItemProps extends GenericProps {\n /** interval in which slides are automatically shown */\n interval?: number;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'SlideshowItem';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-slideshow-item';\n\n/**\n * SlideshowItem component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const SlideshowItem = forwardRef<SlideshowItemProps, HTMLDivElement>((props, ref) => {\n const { className, children, ...forwardedProps } = props;\n return (\n <div ref={ref} className={classNames.join(className, CLASSNAME)} {...forwardedProps}>\n {children}\n </div>\n );\n});\n\nSlideshowItem.displayName = COMPONENT_NAME;\nSlideshowItem.className = CLASSNAME;\n","import { useEffect } from 'react';\nimport { detectHorizontalSwipe } from '@lumx/core/js/utils';\n\nconst isTouchDevice = () => 'ontouchstart' in window;\n\n/**\n * Listen swipe to navigate left and right.\n */\nexport function useSwipeNavigate(element?: HTMLElement | null, onNext?: () => void, onPrevious?: () => void): void {\n useEffect(() => {\n if (!element || !isTouchDevice()) return undefined;\n\n return detectHorizontalSwipe(element, (swipe) => {\n const callback = swipe === 'right' ? onPrevious : onNext;\n callback?.();\n });\n }, [onPrevious, onNext, element]);\n}\n","import { useMemo, useRef } from 'react';\nimport { EDGE_FROM_ACTIVE_INDEX, PAGINATION_ITEMS_MAX } from '@lumx/react/components/slideshow/constants';\n\ntype Range = { min: number; max: number };\n\n/**\n * Calculate the currently visible pagination \"bullet\" range.\n */\nexport function usePaginationVisibleRange(activeIndex: number, slideCount: number): Range {\n const previousVisibleRangeRef = useRef<Range>();\n return useMemo(() => {\n const lastSlide = slideCount - 1;\n const { current: previousVisibleRange } = previousVisibleRangeRef;\n let newVisibleRange: Range;\n if (activeIndex === previousVisibleRange?.max && activeIndex < lastSlide) {\n newVisibleRange = { min: previousVisibleRange.min + 1, max: previousVisibleRange.max + 1 };\n } else if (activeIndex === previousVisibleRange?.min && activeIndex > 0) {\n newVisibleRange = { min: previousVisibleRange.min - 1, max: previousVisibleRange.max - 1 };\n } else {\n const deltaItems = PAGINATION_ITEMS_MAX - 1;\n let min = activeIndex - EDGE_FROM_ACTIVE_INDEX;\n let max = activeIndex + EDGE_FROM_ACTIVE_INDEX;\n\n if (activeIndex > lastSlide - EDGE_FROM_ACTIVE_INDEX) {\n min = lastSlide - deltaItems;\n max = lastSlide;\n } else if (activeIndex < deltaItems) {\n min = 0;\n max = deltaItems;\n }\n\n newVisibleRange = { min, max };\n }\n previousVisibleRangeRef.current = newVisibleRange;\n return newVisibleRange;\n }, [activeIndex, slideCount]);\n}\n","import React, { RefObject, useCallback, useMemo } from 'react';\n\nimport range from 'lodash/range';\n\nimport { mdiChevronLeft, mdiChevronRight, mdiPlayCircleOutline, mdiPauseCircleOutline } from '@lumx/icons';\nimport { Emphasis, IconButton, IconButtonProps, Theme } from '@lumx/react';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { WINDOW } from '@lumx/react/constants';\nimport { useSlideshowControls, DEFAULT_OPTIONS } from '@lumx/react/hooks/useSlideshowControls';\nimport { useRovingTabIndexContainer } from '@lumx/react/hooks/useRovingTabIndexContainer';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { useSwipeNavigate } from './useSwipeNavigate';\nimport { PAGINATION_ITEM_SIZE, PAGINATION_ITEMS_MAX } from './constants';\nimport { usePaginationVisibleRange } from './usePaginationVisibleRange';\n\n/**\n * Defines the props of the component.\n */\nexport interface SlideshowControlsProps extends GenericProps, HasTheme {\n /** Index of the current slide. */\n activeIndex?: number;\n /** Props to pass to the next button (minus those already set by the SlideshowControls props). */\n nextButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;\n /** Reference to the parent element on which we want to listen touch swipe. */\n parentRef?: RefObject<HTMLDivElement> | HTMLDivElement | null;\n /** Props to pass to the previous button (minus those already set by the SlideshowControls props). */\n previousButtonProps: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;\n /** Props to pass to the pagination wrapper */\n paginationProps?: Omit<React.HTMLAttributes<HTMLDivElement>, 'className' | 'style' | 'role'>;\n /** Number of slides. */\n slidesCount: number;\n /** On next button click callback. */\n onNextClick?(loopback?: boolean): void;\n /** On pagination change callback. */\n onPaginationClick?(index: number): void;\n /** On previous button click callback. */\n onPreviousClick?(loopback?: boolean): void;\n /** whether the slideshow is currently playing */\n isAutoPlaying?: boolean;\n /**\n * function to be executed in order to retrieve the label for the pagination item\n * @deprecated Use paginationItemProps instead.\n * */\n paginationItemLabel?: (index: number) => string;\n /**\n * function to be executed in order to retrieve the props for a pagination item.\n */\n paginationItemProps?: (itemIndex: number) => React.HTMLAttributes<HTMLButtonElement> & { label?: string };\n /** Props to pass to the lay button (minus those already set by the SlideshowControls props). */\n playButtonProps?: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'SlideshowControls';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-slideshow-controls';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SlideshowControlsProps> = {\n activeIndex: 0,\n};\n\n/**\n * SlideshowControls component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nconst InternalSlideshowControls = forwardRef<SlideshowControlsProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n activeIndex = DEFAULT_PROPS.activeIndex,\n className,\n nextButtonProps,\n onNextClick,\n onPaginationClick,\n onPreviousClick,\n parentRef,\n previousButtonProps,\n paginationProps,\n slidesCount,\n theme = defaultTheme,\n isAutoPlaying = false,\n playButtonProps,\n paginationItemLabel,\n paginationItemProps,\n ...forwardedProps\n } = props;\n\n let parent;\n if (WINDOW) {\n // Checking window object to avoid errors in SSR.\n parent = parentRef instanceof HTMLElement ? parentRef : parentRef?.current;\n }\n const paginationRef = React.useRef(null);\n // Listen to touch swipe navigate left & right.\n useSwipeNavigate(\n parent,\n // Go next without loopback.\n useCallback(() => onNextClick?.(false), [onNextClick]),\n // Go previous without loopback.\n useCallback(() => onPreviousClick?.(false), [onPreviousClick]),\n );\n\n /**\n * Add roving tab index pattern to pagination items and activate slide on focus.\n */\n useRovingTabIndexContainer({\n containerRef: paginationRef,\n itemSelector: 'button',\n onItemFocused: (el) => {\n el.click();\n },\n });\n\n // Pagination \"bullet\" range.\n const visibleRange = usePaginationVisibleRange(activeIndex as number, slidesCount);\n\n // Inline style of wrapper element.\n const wrapperStyle = { transform: `translateX(-${PAGINATION_ITEM_SIZE * visibleRange.min}px)` };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n 'has-infinite-pagination': slidesCount > PAGINATION_ITEMS_MAX,\n }),\n )}\n >\n <IconButton\n {...previousButtonProps}\n icon={mdiChevronLeft}\n className={element('navigation')}\n color={theme === Theme.dark ? 'light' : 'dark'}\n emphasis={Emphasis.low}\n onClick={() => onPreviousClick?.()}\n />\n <div ref={paginationRef} className={element('pagination')}>\n <div className={element('pagination-items')} style={wrapperStyle} role=\"tablist\" {...paginationProps}>\n {useMemo(\n () =>\n range(slidesCount).map((index) => {\n const isOnEdge =\n index !== 0 &&\n index !== slidesCount - 1 &&\n (index === visibleRange.min || index === visibleRange.max);\n const isActive = activeIndex === index;\n const isOutRange = index < visibleRange.min || index > visibleRange.max;\n const {\n className: itemClassName = undefined,\n label = undefined,\n ...itemProps\n } = paginationItemProps ? paginationItemProps(index) : {};\n\n const ariaLabel =\n label || paginationItemLabel?.(index) || `${index + 1} / ${slidesCount}`;\n\n return (\n <button\n className={classNames.join(\n element('pagination-item', {\n 'is-active': isActive,\n 'is-on-edge': isOnEdge,\n 'is-out-range': isOutRange,\n }),\n itemClassName,\n )}\n key={index}\n type=\"button\"\n tabIndex={isActive ? undefined : -1}\n role=\"tab\"\n aria-selected={isActive}\n onClick={() => onPaginationClick?.(index)}\n aria-label={ariaLabel}\n {...itemProps}\n />\n );\n }),\n [\n slidesCount,\n visibleRange.min,\n visibleRange.max,\n activeIndex,\n paginationItemProps,\n paginationItemLabel,\n onPaginationClick,\n ],\n )}\n </div>\n </div>\n\n {playButtonProps ? (\n <IconButton\n {...playButtonProps}\n icon={isAutoPlaying ? mdiPauseCircleOutline : mdiPlayCircleOutline}\n className={element('play')}\n color={theme === Theme.dark ? 'light' : 'dark'}\n emphasis={Emphasis.low}\n />\n ) : null}\n\n <IconButton\n {...nextButtonProps}\n icon={mdiChevronRight}\n className={element('navigation')}\n color={theme === Theme.dark ? 'light' : 'dark'}\n emphasis={Emphasis.low}\n onClick={() => onNextClick?.()}\n />\n </div>\n );\n});\n\nInternalSlideshowControls.displayName = COMPONENT_NAME;\nInternalSlideshowControls.className = CLASSNAME;\nInternalSlideshowControls.defaultProps = DEFAULT_PROPS;\n\nexport const SlideshowControls = Object.assign(InternalSlideshowControls, {\n useSlideshowControls,\n useSlideshowControlsDefaultOptions: DEFAULT_OPTIONS,\n});\n","/**\n * Polyfill-like helper for the scrollend event.\n * Uses native scrollend if available, otherwise falls back to a timeout.\n *\n * @param element The element to listen to.\n * @param callback The callback to execute when scrolling ends.\n * @param options Options for the listener (timeout and AbortSignal).\n */\nexport function onScrollEnd(\n element: HTMLElement,\n callback: () => void,\n options: { timeout?: number; signal?: AbortSignal } = {},\n) {\n const { timeout = 150, signal } = options;\n\n // Native scrollend\n if ('onscrollend' in window) {\n element.addEventListener('scrollend', callback, { signal });\n return;\n }\n\n // Fallback for browsers that don't support scrollend\n let timer: ReturnType<typeof setTimeout>;\n const handleScroll = () => {\n clearTimeout(timer);\n timer = setTimeout(callback, timeout);\n };\n element.addEventListener('scroll', handleScroll, { signal });\n signal?.addEventListener('abort', () => clearTimeout(timer));\n}\n","import React from 'react';\nimport { isReducedMotion } from '@lumx/react/utils/browser/isReducedMotion';\nimport { onScrollEnd } from '../../utils/browser/onScrollEnd';\n\ninterface UseSlideScrollParams {\n /** Weather to enable or not */\n enabled?: boolean;\n /** The active index of the slide */\n activeIndex: number;\n /** The ref to the wrapper element */\n wrapperRef: React.RefObject<HTMLDivElement>;\n /** Callback when the active index changes */\n onChange?: (index: number) => void;\n}\n\n/**\n * Hook to handle scroll synchronization for the Slideshow component.\n * It syncs the scroll position with the active index and vice versa.\n */\nexport const useSlideScroll = ({ enabled, activeIndex, wrapperRef, onChange }: UseSlideScrollParams) => {\n const isAutoScrollRef = React.useRef(false);\n const isFromScrollRef = React.useRef(false);\n\n // Sync State -> DOM (Programmatic Navigation)\n React.useEffect(() => {\n const wrapper = wrapperRef.current;\n if (!enabled || !wrapper) {\n return;\n }\n\n // Skip if currently scrolling\n if (isFromScrollRef.current) {\n return;\n }\n\n const targetElement = wrapper.children[activeIndex] as HTMLElement;\n if (!targetElement) return;\n\n let newScrollLeft = targetElement.offsetLeft;\n if (targetElement.offsetParent !== wrapper) {\n newScrollLeft -= wrapper.offsetLeft + wrapper.clientLeft;\n }\n if (Math.abs(wrapper.scrollLeft - newScrollLeft) < 1) {\n return;\n }\n\n isAutoScrollRef.current = true;\n wrapper.scrollTo({\n left: newScrollLeft,\n behavior: !isReducedMotion() ? 'smooth' : undefined,\n });\n }, [activeIndex, enabled, wrapperRef]);\n\n // Sync DOM -> State (User Interaction)\n React.useEffect(() => {\n const wrapper = wrapperRef.current;\n if (!enabled || !wrapper) return undefined;\n\n const controller = new AbortController();\n const { signal } = controller;\n\n const handleScroll = () => {\n // Skip if currently scrolling programmatically\n if (isAutoScrollRef.current) {\n return;\n }\n\n const { scrollLeft, clientWidth } = wrapper;\n const newIndex = Math.round(scrollLeft / clientWidth);\n\n isFromScrollRef.current = true;\n onChange?.(newIndex);\n };\n\n const reset = () => {\n isAutoScrollRef.current = false;\n isFromScrollRef.current = false;\n };\n\n wrapper.addEventListener('scroll', handleScroll, { signal });\n onScrollEnd(wrapper, reset, { signal });\n return () => controller.abort();\n }, [enabled, onChange, wrapperRef]);\n};\n","import React, { Children } from 'react';\n\nimport chunk from 'lodash/chunk';\n\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport type { LumxClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { isScrollSnapSupported } from '@lumx/react/utils/browser/isScrollSnapSupported';\n\nimport { buildSlideShowGroupId, SlideshowItemGroup } from './SlideshowItemGroup';\nimport { useSlideScroll } from './useSlideScroll';\nimport { FULL_WIDTH_PERCENT, SlideMode } from './constants';\n\nexport interface SlidesProps extends GenericProps, HasTheme {\n /** current slide active */\n activeIndex: number;\n /** slides id to be added to the wrapper */\n id?: string;\n /** Whether the automatic rotation of the slideshow is enabled or not. */\n autoPlay?: boolean;\n /** Whether the image has to fill its container height or not. */\n fillHeight?: boolean;\n /** Number of slides to group together. */\n groupBy?: number;\n /** whether the slides are currently playing or not */\n isAutoPlaying?: boolean;\n /** id to be passed in into the slides */\n slidesId?: string;\n /** callback to change whether the slideshow is playing or not */\n toggleAutoPlay: () => void;\n /** component to be rendered after the slides */\n afterSlides?: React.ReactNode;\n /** Whether the slides have controls linked */\n hasControls?: boolean;\n /**\n * Accessible label to set on a slide group.\n * Receives the group position starting from 1 and the total number of groups.\n * */\n slideGroupLabel?: (groupPosition: number, groupTotal: number) => string;\n /** Whether to use CSS transform translate or native scroll snap. */\n slideMode?: SlideMode;\n /** On slide change (only triggered on scroll when slideMode=scroll-snap) */\n onChange?(index: number): void;\n /** Children */\n children?: React.ReactNode;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Slideshow';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-slideshow';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SlidesProps> = {\n slideMode: SlideMode.transformTranslate,\n};\n\n/**\n * Slides component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Slides = forwardRef<SlidesProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme();\n const {\n activeIndex,\n id,\n className,\n theme = defaultTheme,\n fillHeight,\n groupBy,\n isAutoPlaying,\n toggleAutoPlay,\n slidesId,\n children,\n afterSlides,\n hasControls,\n slideGroupLabel,\n slideMode = DEFAULT_PROPS.slideMode,\n onChange,\n ...forwardedProps\n } = props;\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n const startIndexVisible = activeIndex;\n const endIndexVisible = startIndexVisible + 1;\n\n // Only enable scroll-snap if requested and browser supports it\n const isScrollSnapEnabled = slideMode === SlideMode.scrollSnap && isScrollSnapSupported();\n useSlideScroll({ activeIndex, enabled: isScrollSnapEnabled, wrapperRef, onChange });\n\n let wrapperProps;\n if (isScrollSnapEnabled) {\n // Make scroll zone focusable (a11y recommendation)\n wrapperProps = { tabIndex: 0 };\n } else {\n // Transform translate to display the current slide\n wrapperProps = { style: { transform: `translateX(-${FULL_WIDTH_PERCENT * activeIndex}%)` } };\n }\n\n const groups = React.useMemo(() => {\n const childrenArray = Children.toArray(children);\n return groupBy && groupBy > 1 ? chunk(childrenArray, groupBy) : childrenArray;\n }, [children, groupBy]);\n\n return (\n <section\n id={id}\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n 'fill-height': fillHeight,\n [`group-by-${groupBy}`]: Boolean(groupBy),\n }),\n )}\n aria-roledescription=\"carousel\"\n >\n <div\n id={slidesId}\n className={element('slides')}\n onMouseEnter={toggleAutoPlay}\n onMouseLeave={toggleAutoPlay}\n aria-live={isAutoPlaying ? 'off' : 'polite'}\n >\n <div\n ref={wrapperRef}\n className={element('wrapper', {\n [`${slideMode}`]: isScrollSnapEnabled,\n })}\n {...wrapperProps}\n >\n {groups.map((group, index) => (\n <SlideshowItemGroup\n key={index}\n id={slidesId && buildSlideShowGroupId(slidesId, index)}\n role={hasControls ? 'tabpanel' : 'group'}\n label={slideGroupLabel ? slideGroupLabel(index + 1, groups.length) : undefined}\n isDisplayed={index >= startIndexVisible && index < endIndexVisible}\n >\n {group}\n </SlideshowItemGroup>\n ))}\n </div>\n </div>\n\n {afterSlides}\n </section>\n );\n});\n\nSlides.displayName = COMPONENT_NAME;\nSlides.className = CLASSNAME;\n","import type {\n JSXElement,\n LumxClassName,\n HasTheme,\n HasAriaDisabled,\n HasDisabled,\n HasClassName,\n HasChecked,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { InputLabel } from '../InputLabel';\nimport { InputHelper } from '../InputHelper';\n\n/**\n * Defines the props of the component.\n */\nexport interface SwitchProps extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked {\n /** Helper text. */\n helper?: string;\n /** Native input id property. */\n id?: string;\n /** Label text. */\n label?: JSXElement;\n /** Native input name property. */\n name?: string;\n /** Native input value property. */\n value?: string;\n /** optional props for input */\n inputProps?: Record<string, any>;\n /** Native input ref. */\n inputRef?: CommonRef;\n /** Native input id. */\n inputId: string;\n /** On change callback. */\n handleChange?(isChecked: boolean, value?: string, name?: string, event?: any): void;\n /** Position of the switch relative to the label. */\n position?: 'left' | 'right';\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Switch';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-switch';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SwitchProps> = {\n position: 'left',\n};\n\n/**\n * Switch component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Switch = (props: SwitchProps) => {\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n ref,\n handleChange,\n theme,\n value,\n inputProps = {},\n isDisabled,\n inputId,\n position = DEFAULT_PROPS.position,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (event: any) => {\n if (handleChange) {\n handleChange(!isChecked, value, name, event);\n }\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-checked': isChecked,\n 'is-disabled': isDisabled,\n 'is-unchecked': !isChecked,\n [`position-${position}`]: Boolean(position),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('input-wrapper')}>\n <input\n ref={inputRef}\n type=\"checkbox\"\n role=\"switch\"\n id={inputId}\n className={element('input-native')}\n name={name}\n value={value}\n checked={Boolean(isChecked)}\n onChange={handleOnChange}\n aria-describedby={helper ? `${inputId}-helper` : undefined}\n aria-checked={Boolean(isChecked)}\n {...(inputProps?.readOnly ? { readOnly: inputProps.readOnly } : {})}\n {...inputProps}\n />\n\n <div className={element('input-placeholder')}>\n <div className={element('input-background')} />\n <div className={element('input-indicator')} />\n </div>\n </div>\n\n <div className={element('content')}>\n {label && InputLabel({ htmlFor: inputId, className: element('label'), theme, children: label })}\n {helper &&\n InputHelper({ id: `${inputId}-helper`, className: element('helper'), theme, children: helper })}\n </div>\n </div>\n );\n};\n","import React from 'react';\n\nimport { Alignment, Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { Switch as UI, SwitchProps as UIProps, CLASSNAME, COMPONENT_NAME } from '@lumx/core/js/components/Switch';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface SwitchProps extends GenericProps, ReactToJSX<UIProps, 'inputId' | 'label'> {\n /** On change callback. */\n onChange?(isChecked: boolean, value?: string, name?: string, event?: React.ChangeEvent): void;\n}\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<SwitchProps> = {\n position: Alignment.left,\n};\n\n/**\n * Switch component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Switch = forwardRef<SwitchProps, HTMLDivElement>((props, ref) => {\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(props);\n const defaultTheme = useTheme() || Theme.light;\n const {\n checked,\n children,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n name,\n onChange,\n position = DEFAULT_PROPS.position,\n theme = defaultTheme,\n value,\n inputProps = {},\n ...forwardedProps\n } = otherProps;\n\n const localInputRef = React.useRef<HTMLInputElement>(null);\n const generatedInputId = useId();\n const inputId = id || generatedInputId;\n\n return UI({\n ref,\n className,\n helper,\n inputRef: useMergeRefs(inputRef, localInputRef),\n isChecked,\n label: children,\n name,\n handleChange: onChange,\n position,\n theme,\n value,\n inputProps: {\n ...inputProps,\n ...disabledStateProps,\n readOnly: inputProps.readOnly || isAnyDisabled,\n },\n ...forwardedProps,\n isDisabled: isAnyDisabled,\n inputId,\n });\n});\nSwitch.displayName = COMPONENT_NAME;\nSwitch.className = CLASSNAME;\nSwitch.defaultProps = DEFAULT_PROPS;\n","import type { LumxClassName } from '../../types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Table';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-table';\n","import type { JSXElement, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME, COMPONENT_NAME } from './constants';\n\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface TableProps extends HasTheme, HasClassName {\n /** Whether the table has checkbox or thumbnail on first cell or not. */\n hasBefore?: boolean;\n /** Whether the table has dividers or not. */\n hasDividers?: boolean;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableProps> = {};\n\n/**\n * Table component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const Table = (props: TableProps) => {\n const { children, className, hasBefore, hasDividers, ref, theme, ...forwardedProps } = props;\n\n return (\n <table\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'has-before': hasBefore,\n 'has-dividers': hasDividers,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {children}\n </table>\n );\n};\n\nexport { CLASSNAME, COMPONENT_NAME };\n","import { Theme } from '@lumx/react';\nimport {\n Table as UI,\n TableProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Table';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * Table component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Table = forwardRef<TableProps, HTMLTableElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { children, theme = defaultTheme, ...otherProps } = props;\n\n return UI({\n ref,\n theme,\n children,\n ...otherProps,\n });\n});\nTable.displayName = COMPONENT_NAME;\nTable.className = CLASSNAME;\nTable.defaultProps = DEFAULT_PROPS;\n","import type { JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableBodyProps extends HasClassName {\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableBody';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__body`;\n\n/**\n * TableBody component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableBody = (props: TableBodyProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <tbody ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </tbody>\n );\n};\n","import {\n TableBody as UI,\n TableBodyProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/Table/TableBody';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableBodyProps extends GenericProps, ReactToJSX<UIProps> {}\n\n/**\n * TableBody component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TableBody = forwardRef<TableBodyProps, HTMLTableSectionElement>((props, ref) => {\n const { children, ...otherProps } = props;\n\n return UI({\n ref,\n children,\n ...otherProps,\n });\n});\nTableBody.displayName = COMPONENT_NAME;\nTableBody.className = CLASSNAME;\n","import { mdiArrowDown, mdiArrowUp } from '@lumx/icons';\nimport type { JSXElement, HasClassName, CommonRef, ValueOf } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\nimport { Icon } from '../Icon';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Table head cell sort order.\n */\nexport const ThOrder = { asc: 'asc', desc: 'desc' } as const;\nexport type ThOrder = ValueOf<typeof ThOrder>;\n\n/**\n * Table cell variants.\n */\nexport const TableCellVariant = { body: 'body', head: 'head' } as const;\nexport type TableCellVariant = ValueOf<typeof TableCellVariant>;\n\n/**\n * Defines the props of the component.\n */\nexport interface TableCellProps extends HasClassName {\n /** Icon (SVG path).(thead only). */\n icon?: string;\n /** Whether the column is sortable or not (thead only). */\n isSortable?: boolean;\n /** Sort order displayed as icon (sortable thead only). */\n sortOrder?: ThOrder;\n /** Variant. */\n variant?: TableCellVariant;\n /** On header cell click callback. */\n handleClick?(): void;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableCell';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__cell`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableCellProps> = {\n variant: TableCellVariant.body,\n};\n\n/**\n * TableCell component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableCell = (props: TableCellProps) => {\n const {\n children,\n className,\n icon,\n isSortable,\n handleClick,\n ref,\n sortOrder,\n variant = DEFAULT_PROPS.variant,\n ...forwardedProps\n } = props;\n\n // Use button if clickable\n const Wrapper = handleClick ? 'button' : 'div';\n const wrapperProps = Wrapper === 'button' ? ({ type: 'button', onClick: handleClick } as const) : undefined;\n\n // ARIA sort\n let ariaSort: 'ascending' | 'descending' | 'none' | undefined;\n if (isSortable) {\n ariaSort = 'none';\n if (sortOrder === ThOrder.asc) ariaSort = 'ascending';\n if (sortOrder === ThOrder.desc) ariaSort = 'descending';\n }\n\n return (\n <>\n {variant === TableCellVariant.head && (\n <th\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-sortable': isSortable,\n 'is-sorted': isSortable && !!sortOrder,\n head: true,\n }),\n )}\n aria-sort={ariaSort}\n >\n <Wrapper className={`${CLASSNAME}-wrapper`} {...wrapperProps}>\n {icon && !isSortable && Icon({ className: `${CLASSNAME}-icon`, icon, size: Size.xxs })}\n\n {isSortable &&\n sortOrder === ThOrder.asc &&\n Icon({ className: `${CLASSNAME}-icon`, icon: mdiArrowUp, size: Size.xxs })}\n\n {isSortable &&\n sortOrder === ThOrder.desc &&\n Icon({ className: `${CLASSNAME}-icon`, icon: mdiArrowDown, size: Size.xxs })}\n\n <div className={`${CLASSNAME}-content`}>{children}</div>\n </Wrapper>\n </th>\n )}\n\n {variant === TableCellVariant.body && (\n <td ref={ref} {...forwardedProps} className={classNames.join(className, block({ body: true }))}>\n <div className={`${CLASSNAME}-content`}>{children}</div>\n </td>\n )}\n </>\n );\n};\n","import {\n TableCell as UI,\n TableCellProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ThOrder,\n TableCellVariant,\n} from '@lumx/core/js/components/Table/TableCell';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport { ThOrder, TableCellVariant };\nexport type {\n ThOrder as ThOrderType,\n TableCellVariant as TableCellVariantType,\n} from '@lumx/core/js/components/Table/TableCell';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableCellProps extends GenericProps, ReactToJSX<UIProps> {\n /** On header cell click callback. */\n onHeaderClick?: () => void;\n}\n\n/**\n * TableCell component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TableCell = forwardRef<TableCellProps, HTMLTableCellElement>((props, ref) => {\n const { onHeaderClick, ...otherProps } = props;\n\n return UI({\n ref,\n ...otherProps,\n handleClick: onHeaderClick,\n });\n});\n\nTableCell.displayName = COMPONENT_NAME;\nTableCell.className = CLASSNAME;\nTableCell.defaultProps = DEFAULT_PROPS;\n","import type { JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableHeaderProps extends HasClassName {\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableHeader';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__header`;\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableHeaderProps> = {};\n\n/**\n * TableHeader component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableHeader = (props: TableHeaderProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <thead ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </thead>\n );\n};\n","import {\n TableHeader as UI,\n TableHeaderProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Table/TableHeader';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableHeaderProps extends GenericProps, ReactToJSX<UIProps, 'ref'> {}\n\n/**\n * TableHeader component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TableHeader = forwardRef<TableHeaderProps, HTMLTableSectionElement>((props, ref) => {\n const { children, ...otherProps } = props;\n\n return UI({\n ref,\n children,\n ...otherProps,\n });\n});\nTableHeader.displayName = COMPONENT_NAME;\nTableHeader.className = CLASSNAME;\nTableHeader.defaultProps = DEFAULT_PROPS;\n","import type { JSXElement, HasClassName, CommonRef, HasAriaDisabled } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableRowProps extends HasClassName, HasAriaDisabled {\n /** Whether the component is clickable or not. */\n isClickable?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Tab index */\n tabIndex?: number;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableRow';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__row`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableRowProps> = {};\n\n/**\n * TableRow component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableRow = (props: TableRowProps) => {\n const {\n children,\n className,\n isClickable,\n isSelected,\n ref,\n tabIndex,\n 'aria-disabled': ariaDisabled,\n ...forwardedProps\n } = props;\n const isDisabled = Boolean(ariaDisabled);\n\n // Use object spread for tabIndex to ensure cross-framework compatibility (Vue JSX expects lowercase 'tabindex')\n const tabIndexProps = tabIndex !== undefined ? { tabIndex } : {};\n\n return (\n <tr\n ref={ref}\n aria-disabled={ariaDisabled}\n {...tabIndexProps}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-clickable': isClickable && !isDisabled,\n 'is-disabled': isDisabled,\n 'is-selected': isSelected && !isDisabled,\n }),\n )}\n >\n {children}\n </tr>\n );\n};\n","import {\n TableRow as UI,\n TableRowProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Table/TableRow';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableRowProps extends GenericProps, ReactToJSX<UIProps, 'tabIndex' | 'aria-disabled'> {\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n}\n\n/**\n * TableRow component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TableRow = forwardRef<TableRowProps, HTMLTableRowElement>((props, ref) => {\n const { isAnyDisabled, otherProps } = useDisableStateProps(props);\n const { children, isClickable, 'aria-disabled': _ariaDisabled, ...forwardedProps } = otherProps;\n\n return UI({\n ref,\n children,\n isClickable,\n tabIndex: isClickable && !isAnyDisabled ? 0 : -1,\n 'aria-disabled': isAnyDisabled,\n ...forwardedProps,\n });\n});\n\nTableRow.displayName = COMPONENT_NAME;\nTableRow.className = CLASSNAME;\nTableRow.defaultProps = DEFAULT_PROPS;\n","import ReactDOM from 'react-dom';\nimport { ReactNode, useEffect, useReducer } from 'react';\nimport { INIT_STATE, TabProviderContext, reducer } from './state';\n\nexport interface TabProviderProps {\n /** Active tab index. */\n activeTabIndex?: number;\n /** Tab provider children. */\n children: ReactNode;\n /** Tab panel children should not render if the tab panel is hidden. */\n isLazy?: boolean;\n /** Activate tabs on focus. */\n shouldActivateOnFocus?: boolean;\n\n /** Tab change callback. */\n onChange?(index: number): void;\n}\n\nconst DEFAULT_PROPS: Partial<TabProviderProps> = {\n isLazy: INIT_STATE.isLazy,\n shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus,\n};\n\n/**\n * This component provides a context in which tabs can be defined and linked to their tab panel.\n *\n * It does not produce any markup so you can wrap it around any React elements and then split the TabList and TabPanel\n * components in the react tree.\n *\n * @param props React component props.\n * @return React element.\n */\nexport const TabProvider: React.FC<TabProviderProps> = (props) => {\n const { children, onChange, ...propState } = props;\n const [state, dispatch] = useReducer(reducer, { ...INIT_STATE, ...DEFAULT_PROPS, ...propState });\n\n // On prop state change => dispatch update.\n useEffect(\n () => {\n dispatch({ type: 'update', payload: { ...DEFAULT_PROPS, ...propState } });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [dispatch, ...Object.values(propState)],\n );\n\n // On active tab index state change => send update to the onChange.\n useEffect(\n () => {\n if (state === INIT_STATE || !onChange || propState.activeTabIndex === state.activeTabIndex) {\n return;\n }\n\n // Escape rendering/useEffect context\n queueMicrotask(() => {\n // Wait for React to commit last state changes (avoid looping state update)\n ReactDOM.flushSync(() => {\n onChange(state.activeTabIndex);\n });\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onChange, state.activeTabIndex],\n );\n\n return <TabProviderContext.Provider value={[state, dispatch]}>{children}</TabProviderContext.Provider>;\n};\nTabProvider.defaultProps = DEFAULT_PROPS;\n","/**\n * Component default class name and class prefix.\n */\nexport const TABS_CLASSNAME = `lumx-tabs`;\n","import { Alignment } from '../../constants';\nimport { CommonRef, HasClassName, HasTheme, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { TABS_CLASSNAME as CLASSNAME } from './constants';\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\nexport enum TabListLayout {\n clustered = 'clustered',\n fixed = 'fixed',\n}\n\n/**\n * Defines the props of the component.\n */\nexport interface TabListProps extends HasClassName, HasTheme {\n /** ARIA label (purpose of the set of tabs). */\n ['aria-label']: string;\n /** Tab list. */\n children: JSXElement;\n /** Layout of the tabs in the list. */\n layout?: TabListLayout;\n /** Position of the tabs in the list (requires 'clustered' layout). */\n position?: Alignment;\n /** ref to the wrapper element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TabList';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TabListProps> = {\n layout: TabListLayout.fixed,\n position: Alignment.left,\n};\n\n/**\n * TabList component.\n *\n * Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TabList = (props: TabListProps) => {\n const {\n 'aria-label': ariaLabel,\n children,\n className,\n layout = DEFAULT_PROPS.layout,\n position = DEFAULT_PROPS.position,\n theme,\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`layout-${layout}`]: Boolean(layout),\n [`position-${position}`]: Boolean(position),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('links')} role=\"tablist\" aria-label={ariaLabel}>\n {children}\n </div>\n </div>\n );\n};\n","import React from 'react';\n\nimport { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { TABS_CLASSNAME as CLASSNAME } from '@lumx/core/js/components/Tabs/constants';\nimport {\n COMPONENT_NAME,\n DEFAULT_PROPS,\n TabList as UI,\n TabListProps as UIProps,\n TabListLayout,\n} from '@lumx/core/js/components/Tabs/TabList';\n\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { useRovingTabIndexContainer } from '../../hooks/useRovingTabIndexContainer';\n\n/**\n * Defines the props of the component.\n */\nexport interface TabListProps extends GenericProps, ReactToJSX<UIProps> {}\n\nexport { TabListLayout };\n\n/**\n * TabList component.\n *\n * Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TabList = forwardRef<TabListProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, ...forwardedProps } = props;\n const tabListRef = React.useRef(null);\n useRovingTabIndexContainer({\n containerRef: tabListRef,\n itemSelector: '[role=\"tab\"]',\n });\n\n return UI({\n theme,\n ref: mergeRefs(ref, tabListRef),\n ...forwardedProps,\n });\n});\n\nTabList.displayName = COMPONENT_NAME;\nTabList.className = CLASSNAME;\nTabList.defaultProps = DEFAULT_PROPS;\n","import { Size } from '../../constants';\nimport { CommonRef, HasClassName, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\nimport { IconProps } from '../Icon';\n\nimport { TABS_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TabProps extends HasClassName {\n /** Children are not supported. */\n children?: never;\n /** Icon (SVG path). */\n icon?: IconProps['icon'];\n /** Icon component properties. */\n iconProps?: Omit<IconProps, 'icon'>;\n /** Native id property. */\n id?: string;\n /** Whether the tab is active or not. */\n isActive?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Label content. */\n label: string | JSXElement;\n /** Whether any tab in the list is disabled (used to block interaction). */\n isAnyDisabled?: boolean;\n /** Whether the tab should become active when it receives focus (automatic activation pattern). */\n shouldActivateOnFocus?: boolean;\n /** Focus event handler injected by TabList. */\n handleFocus?: (event: any) => void;\n /** Keypress event handler injected by TabList. */\n handleKeyPress?: (event: any) => void;\n /** Callback to activate this tab, injected by TabList. */\n changeToTab?: () => void;\n /** Tab index for roving tabindex management. */\n tabIndex?: number;\n /** Name of the prop used to set tab index (framework-dependent). */\n tabIndexProp?: string;\n /** Name of the prop used to attach the keypress event (framework-dependent). */\n keyPressProp?: string;\n /** ID applied to the tab button element (for aria-labelledby on the panel). */\n tabId?: string;\n /** ID of the associated tab panel (for aria-controls). */\n tabPanelId?: string;\n /** Icon component injected by the framework wrapper. */\n Icon: any;\n /** Text component injected by the framework wrapper. */\n Text: any;\n /** Forward ref to the underlying button element. */\n ref?: CommonRef;\n}\n\nexport type TabPropsToOverride =\n | 'isAnyDisabled'\n | 'shouldActivateOnFocus'\n | 'changeToTab'\n | 'tabIndex'\n | 'tabIndexProp'\n | 'keyPressProp'\n | 'tabId'\n | 'tabPanelId'\n | 'Icon'\n | 'Text';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Tab';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TabProps> = {};\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABS_CLASSNAME}__link`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Tab component.\n *\n * Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Tab = (props: TabProps) => {\n const {\n className,\n icon,\n iconProps = {},\n isAnyDisabled,\n isDisabled,\n id,\n isActive,\n label,\n handleFocus,\n handleKeyPress,\n tabIndex = -1,\n tabIndexProp = 'tabIndex',\n keyPressProp = 'onKeyPress',\n changeToTab,\n tabPanelId,\n shouldActivateOnFocus,\n tabId,\n Icon,\n Text,\n ref,\n ...forwardedProps\n } = props;\n\n const changeToCurrentTab = () => {\n if (isAnyDisabled) {\n return;\n }\n changeToTab?.();\n };\n\n const onFocus = (event: any) => {\n handleFocus?.(event);\n if (shouldActivateOnFocus) {\n changeToCurrentTab();\n }\n };\n\n const onKeyPress = (event: any) => {\n handleKeyPress?.(event);\n if (event.key !== 'Enter' || isAnyDisabled) {\n return;\n }\n changeToCurrentTab();\n };\n\n return (\n <button\n ref={ref}\n {...forwardedProps}\n type=\"button\"\n id={tabId}\n className={classNames.join(\n className,\n block({\n 'is-active': isActive,\n 'is-disabled': isAnyDisabled,\n }),\n )}\n onClick={changeToCurrentTab}\n {...{ [keyPressProp]: onKeyPress }}\n onFocus={onFocus}\n role=\"tab\"\n {...{ [tabIndexProp]: isActive ? 0 : tabIndex }}\n aria-disabled={isAnyDisabled}\n aria-selected={isActive}\n aria-controls={tabPanelId}\n >\n {icon && <Icon icon={icon} size={Size.xs} {...iconProps} />}\n {label && (\n <Text as=\"span\" truncate>\n {label}\n </Text>\n )}\n </button>\n );\n};\n","import { ReactNode } from 'react';\n\nimport { Icon, IconProps, Text } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled/useDisableStateProps';\nimport {\n Tab as UI,\n TabProps as UIProps,\n TabPropsToOverride,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n CLASSNAME,\n} from '@lumx/core/js/components/Tabs/Tab';\n\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { useTabProviderContext } from './state';\n\n/**\n * Defines the props of the component.\n */\nexport interface TabProps extends GenericProps, ReactToJSX<UIProps, TabPropsToOverride> {\n /** Children are not supported. */\n children?: never;\n /** Icon (SVG path). */\n icon?: IconProps['icon'];\n /** Icon component properties. */\n iconProps?: Omit<IconProps, 'icon'>;\n /** Native id property. */\n id?: string;\n /** Whether the tab is active or not. */\n isActive?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Label content. */\n label: string | ReactNode;\n}\n\n/**\n * Tab component.\n *\n * Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Tab = forwardRef<TabProps, HTMLButtonElement>((props, ref) => {\n const { isAnyDisabled, otherProps } = useDisableStateProps(props);\n const { isActive: propIsActive, id, onFocus, onKeyPress, ...forwardedProps } = otherProps;\n const tabState = useTabProviderContext('tab', id);\n const { isLazy: _isLazy, ...state } = tabState ?? ({} as Partial<NonNullable<typeof tabState>>);\n const isActive = propIsActive || state?.isActive;\n\n return UI({\n id,\n ...state,\n Icon,\n Text,\n ref,\n isActive,\n isAnyDisabled,\n handleFocus: onFocus,\n handleKeyPress: onKeyPress,\n ...forwardedProps,\n });\n});\n\nTab.displayName = COMPONENT_NAME;\nTab.className = CLASSNAME;\nTab.defaultProps = DEFAULT_PROPS;\n","import { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface TabPanelProps extends HasClassName {\n /** Whether the tab is active or not. */\n isActive?: boolean;\n /** Whether the tab is lazy loaded or not */\n isLazy?: boolean;\n /** Children */\n children?: JSXElement;\n /** ID applied to the tab button element (for aria-labelledby on the panel). */\n tabId?: string;\n /** ID of the associated tab panel (for aria-controls). */\n id?: string;\n /** Name of the prop used to set tab index (framework-dependent). */\n tabIndexProp?: string;\n /** Forward ref to the underlying button element. */\n ref?: CommonRef;\n}\n\nexport type TabPanelPropsToOverride = 'tabId' | 'isLazy' | 'tabIndexProp';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TabPanel';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = `lumx-tab-panel`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TabPanelProps> = {};\n\n/**\n * TabPanel component.\n *\n * Implements WAI-ARIA `tabpanel` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TabPanel = (props: TabPanelProps) => {\n const {\n children,\n className,\n isActive,\n id,\n tabId,\n isLazy,\n tabIndexProp = 'tabIndex',\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n id={id}\n className={classNames.join(className, block({ 'is-active': isActive }))}\n role=\"tabpanel\"\n {...{ [tabIndexProp]: isActive ? 0 : -1 }}\n aria-labelledby={tabId}\n >\n {(!isLazy || isActive) && children}\n </div>\n );\n};\n","import { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useTabProviderContext } from '@lumx/react/components/tabs/state';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n TabPanel as UI,\n TabPanelProps as UIProps,\n TabPanelPropsToOverride,\n} from '@lumx/core/js/components/Tabs/TabPanel';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface TabPanelProps extends GenericProps, ReactToJSX<UIProps, TabPanelPropsToOverride> {\n /** Native id property */\n id?: string;\n}\n\n/**\n * TabPanel component.\n *\n * Implements WAI-ARIA `tabpanel` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TabPanel = forwardRef<TabPanelProps, HTMLDivElement>((props, ref) => {\n const { id, isActive: propIsActive, ...forwardedProps } = props;\n\n const state = useTabProviderContext('tabPanel', id);\n const isActive = propIsActive || state?.isActive;\n\n return UI({\n ref,\n isActive,\n id: state?.tabPanelId,\n isLazy: state?.isLazy,\n tabId: state?.tabId,\n ...forwardedProps,\n });\n});\n\nTabPanel.displayName = COMPONENT_NAME;\nTabPanel.className = CLASSNAME;\nTabPanel.defaultProps = DEFAULT_PROPS;\n","import type { CSSProperties } from 'react';\nimport type { RectSize } from '../../types';\nimport { AspectRatio } from '../../constants';\nimport type { FocusPoint, LoadingState } from './types';\n\n/**\n * Determines the loading state of an HTML image element.\n *\n * @param img - The HTML image element to check\n * @param event - Optional event (load or error) that triggered the state check\n * @returns The current loading state: 'hasError', 'isLoading', or 'isLoaded'\n */\nexport function getImageLoadingState(img: HTMLImageElement | null | undefined, event?: Event): LoadingState {\n // Error event occurred or image has no source.\n if (event?.type === 'error' || (img?.complete && !img.getAttribute('src'))) {\n return 'hasError';\n }\n // Image is undefined or incomplete.\n if (!img || !img.complete) {\n return 'isLoading';\n }\n // Else loaded.\n return 'isLoaded';\n}\n\n/**\n * Parameters for getting image size.\n */\nexport interface GetImageSizeParams {\n /** Image URL (used for validation) */\n image?: string;\n /** Aspect ratio setting */\n aspectRatio?: AspectRatio;\n /** Focus point (if not set, size calculation is skipped) */\n focusPoint?: FocusPoint;\n /** Width from imgProps */\n width?: number;\n /** Height from imgProps */\n height?: number;\n /** Image element (for getting natural dimensions) */\n element?: HTMLImageElement;\n /** Whether image is loaded */\n isLoaded: boolean;\n}\n\n/**\n * Gets the natural image size from props or element.\n * Returns undefined if focus point is not applicable or size cannot be determined.\n *\n * @param params - Image size parameters\n * @returns Image size or undefined\n */\nexport function getImageSize({\n image,\n aspectRatio,\n focusPoint,\n width,\n height,\n element,\n isLoaded,\n}: GetImageSizeParams): RectSize | undefined {\n // Focus point is not applicable => exit early\n if (!image || aspectRatio === AspectRatio.original || (!focusPoint?.x && !focusPoint?.y)) {\n return undefined;\n }\n // Size provided via props\n if (typeof width === 'number' && typeof height === 'number') {\n return { width, height };\n }\n // Size from loaded element\n if (element && isLoaded) {\n return { width: element.naturalWidth, height: element.naturalHeight };\n }\n return undefined;\n}\n\n/**\n * Calculate shift position to center the focus point in the container.\n *\n * This function computes the percentage offset needed to position an image\n * such that a specific focus point on the image aligns with the center of\n * the container, taking into account the image's scale.\n *\n * @param params - Focus point shift calculation parameters\n * @returns Percentage shift (0-100) for CSS positioning\n */\nexport function shiftPosition({\n scale,\n focusPoint,\n imageSize,\n containerSize,\n}: {\n scale: number;\n focusPoint: number;\n imageSize: number;\n containerSize: number;\n}): number {\n const scaledSize = imageSize / scale;\n if (scaledSize === containerSize) return 0;\n\n const scaledFocusHeight = focusPoint * scaledSize;\n const startFocus = scaledFocusHeight - containerSize / 2;\n const shift = startFocus / (scaledSize - containerSize);\n\n return Math.floor(Math.max(Math.min(shift, 1), 0) * 100);\n}\n\n/**\n * Parameters for calculating focus point style.\n */\nexport interface CalculateFocusPointStyleParams {\n /** Image URL */\n image?: string;\n /** Aspect ratio */\n aspectRatio?: AspectRatio;\n /** Focus point */\n focusPoint?: FocusPoint;\n /** Image element (for validation) */\n element?: HTMLImageElement;\n /** Natural image size */\n imageSize?: RectSize;\n /** Container size */\n containerSize?: RectSize;\n}\n\n/**\n * Calculates CSS style for applying focus point positioning.\n *\n * @param params - Focus point style parameters\n * @returns CSS properties to apply to the image\n */\nexport function calculateFocusPointStyle({\n image,\n aspectRatio,\n focusPoint,\n element,\n imageSize,\n containerSize,\n}: CalculateFocusPointStyleParams): CSSProperties {\n // Focus point is not applicable => exit early\n if (!image || aspectRatio === AspectRatio.original || (!focusPoint?.x && !focusPoint?.y)) {\n return {};\n }\n\n if (!element || !imageSize) {\n // Focus point can be computed but not right now (image size unknown).\n return { visibility: 'hidden' };\n }\n\n if (!containerSize || !imageSize.height || !imageSize.width) {\n // Missing container or image size, abort focus point compute.\n return {};\n }\n\n const heightScale = imageSize.height / containerSize.height;\n const widthScale = imageSize.width / containerSize.width;\n const scale = Math.min(widthScale, heightScale);\n\n // Focus Y relative to the top (instead of the center)\n const focusPointFromTop = Math.abs((focusPoint?.y || 0) - 1) / 2;\n const y = shiftPosition({\n scale,\n focusPoint: focusPointFromTop,\n imageSize: imageSize.height,\n containerSize: containerSize.height,\n });\n\n // Focus X relative to the left (instead of the center)\n const focusPointFromLeft = Math.abs((focusPoint?.x || 0) + 1) / 2;\n const x = shiftPosition({\n scale,\n focusPoint: focusPointFromLeft,\n imageSize: imageSize.width,\n containerSize: containerSize.width,\n });\n\n const objectPosition = `${x}% ${y}%`;\n\n return { objectPosition };\n}\n","import type { CSSProperties, ImgHTMLAttributes } from 'react';\n\nimport { AspectRatio, HorizontalAlignment, Size } from '@lumx/core/js/constants';\nimport type { GenericProps, HasTheme, CommonRef, JSXElement, LumxClassName, HasClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { mdiImageBroken } from '@lumx/icons';\nimport { Icon } from '../Icon';\nimport { RawClickable } from '../RawClickable';\nimport { ThumbnailSize, ThumbnailVariant, ThumbnailObjectFit } from './types';\n\ntype ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ThumbnailProps extends HasTheme, HasClassName {\n /** Alignment of the thumbnail in it's parent (requires flex parent). */\n align?: HorizontalAlignment;\n /** Image alternative text. */\n alt: string;\n /** Image aspect ratio. */\n aspectRatio?: AspectRatio;\n /** Badge. */\n badge?: JSXElement;\n /** Image cross origin resource policy. */\n crossOrigin?: ImgHTMLProps['crossOrigin'];\n /** Fallback icon (SVG path) or react node when image fails to load. */\n fallback?: string | JSXElement;\n /** Whether the thumbnail should fill it's parent size (requires flex parent) or not. */\n fillHeight?: boolean;\n /** Image URL. */\n image: string;\n loadingState: string;\n /** Props to inject into the native <img> element. */\n imgProps?: ImgHTMLProps;\n /** Reference to the native <img> element. */\n imgRef?: CommonRef;\n ref?: CommonRef;\n /** Set to true to force the display of the loading skeleton. */\n isLoading?: boolean;\n /** Set how the image should fit when its aspect ratio is constrained */\n objectFit?: ThumbnailObjectFit;\n /** Size variant of the component. */\n size?: ThumbnailSize;\n /** Image loading mode. */\n loading?: 'eager' | 'lazy';\n /** Ref of an existing placeholder image to display while loading. */\n loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement>;\n /** On click callback. */\n handleClick?: (event: any) => void;\n /** On key press callback. */\n handleKeyPress?: (event: any) => void;\n /** Variant of the component. */\n variant?: ThumbnailVariant;\n /** Props to pass to the link wrapping the thumbnail. */\n linkProps?: GenericProps;\n focusPointStyle?: GenericProps;\n disabledStateProps?: GenericProps;\n isAnyDisabled?: boolean;\n /** Custom react component for the link (can be used to inject react router Link). */\n linkAs?: 'a' | any;\n 'aria-label'?: string;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Thumbnail';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-thumbnail';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ThumbnailProps> = {\n fallback: mdiImageBroken,\n loading: 'lazy',\n};\n\n/**\n * Thumbnail component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Thumbnail = (props: ThumbnailProps) => {\n const {\n align,\n alt,\n aspectRatio = AspectRatio.original,\n badge,\n className,\n crossOrigin,\n ref,\n fallback = DEFAULT_PROPS.fallback,\n focusPointStyle,\n fillHeight,\n image,\n imgProps,\n imgRef: propImgRef,\n isLoading: isLoadingProp,\n objectFit,\n loading = DEFAULT_PROPS.loading,\n loadingPlaceholderImageRef,\n isAnyDisabled,\n disabledStateProps,\n size,\n theme,\n loadingState,\n variant,\n linkProps,\n linkAs,\n handleClick,\n handleKeyPress,\n ...forwardedProps\n } = props;\n const isLoading = isLoadingProp || loadingState === 'isLoading';\n const hasError = loadingState === 'hasError';\n\n const hasIconErrorFallback = hasError && typeof fallback === 'string';\n const hasCustomErrorFallback = hasError && !hasIconErrorFallback;\n const imageErrorStyle: CSSProperties = {};\n if (hasIconErrorFallback) {\n // Keep the image layout on icon fallback.\n imageErrorStyle.visibility = 'hidden';\n } else if (hasCustomErrorFallback) {\n // Remove the image on custom fallback.\n imageErrorStyle.display = 'none';\n }\n\n const isLink = Boolean(linkProps?.href || linkAs);\n const isClickable = !isAnyDisabled && Boolean(isLink || !!handleClick || !!handleKeyPress);\n\n const wrapperProps = { ...forwardedProps };\n if (isClickable) {\n Object.assign(wrapperProps, { as: linkAs || (linkProps?.href ? 'a' : 'button') }, disabledStateProps);\n if (isLink) {\n Object.assign(wrapperProps, linkProps);\n } else {\n wrapperProps['aria-label'] = forwardedProps['aria-label'] || alt;\n }\n }\n\n const wrapperClassName = classNames.join(\n linkProps?.className,\n className,\n block({\n [`align-${align}`]: Boolean(align),\n [`aspect-ratio-${aspectRatio}`]: Boolean(aspectRatio),\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n [`variant-${variant}`]: Boolean(variant),\n 'is-clickable': isClickable,\n 'has-error': hasError,\n 'has-icon-error-fallback': hasIconErrorFallback,\n 'has-custom-error-fallback': hasCustomErrorFallback,\n 'is-loading': isLoading,\n [`object-fit-${objectFit}`]: Boolean(objectFit),\n 'has-badge': !!badge,\n 'fill-height': fillHeight,\n }),\n );\n\n // If we have a loading placeholder image that is really loaded (complete)\n const loadingPlaceholderImage =\n (isLoading && loadingPlaceholderImageRef?.current?.complete && loadingPlaceholderImageRef?.current) ||\n undefined;\n\n // Set loading placeholder image as background\n const loadingStyle = loadingPlaceholderImage\n ? { backgroundImage: `url(${loadingPlaceholderImage.src})` }\n : undefined;\n\n const innerImage = (\n <>\n <span className={element('background')}>\n <img\n // Use placeholder image size\n width={loadingPlaceholderImage?.naturalWidth}\n height={loadingPlaceholderImage?.naturalHeight}\n {...imgProps}\n style={{\n // Reserve space while loading (when possible)\n width: isLoading ? imgProps?.width || loadingPlaceholderImage?.naturalWidth : undefined,\n ...imgProps?.style,\n ...imageErrorStyle,\n ...focusPointStyle,\n ...loadingStyle,\n }}\n ref={propImgRef}\n className={classNames.join(\n element('image', {\n 'is-loading': isLoading,\n 'has-defined-size': Boolean(imgProps?.height && imgProps.width),\n }),\n imgProps?.className,\n )}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - crossOrigin prop compatibility between React and Vue JSX\n crossOrigin={crossOrigin}\n src={image}\n alt={alt}\n loading={loading}\n />\n {!isLoading && hasError && (\n <span className={element('fallback')}>\n {hasIconErrorFallback ? Icon({ icon: fallback as string, size: Size.xxs, theme }) : fallback}\n </span>\n )}\n </span>\n {badge}\n </>\n );\n\n /** Render `RawClickable` as a function since it is a core component which needs to be treated as such */\n if (isClickable) {\n return RawClickable({\n ref,\n ...wrapperProps,\n className: wrapperClassName,\n children: innerImage as JSXElement,\n handleClick,\n handleKeyPress,\n });\n }\n\n return (\n <div ref={ref} {...wrapperProps} className={wrapperClassName}>\n {innerImage}\n </div>\n );\n};\n\nexport * from './utils';\n","import { useEffect, useState } from 'react';\nimport { getImageLoadingState } from '@lumx/core/js/components/Thumbnail';\nimport { type LoadingState } from '@lumx/core/js/components/Thumbnail/types';\n\nexport function useImageLoad(imageURL: string, imgRef?: HTMLImageElement): LoadingState {\n const [state, setState] = useState<LoadingState>(getImageLoadingState(imgRef));\n\n // Update state when changing image URL or DOM reference.\n useEffect(() => {\n setState(getImageLoadingState(imgRef));\n }, [imageURL, imgRef]);\n\n // Listen to `load` and `error` event on image\n useEffect(() => {\n const img = imgRef;\n if (!img) return undefined;\n const update = (event?: Event) => setState(getImageLoadingState(img, event));\n img.addEventListener('load', update);\n img.addEventListener('error', update);\n return () => {\n img.removeEventListener('load', update);\n img.removeEventListener('error', update);\n };\n }, [imgRef, imgRef?.src]);\n\n return state;\n}\n","import { CSSProperties, useEffect, useMemo, useState } from 'react';\nimport { getImageSize, calculateFocusPointStyle } from '@lumx/core/js/components/Thumbnail';\nimport { RectSize } from '@lumx/core/js/types';\nimport { ThumbnailProps } from './Thumbnail';\n\n// Compute CSS properties to apply the focus point.\nexport const useFocusPointStyle = (\n { image, aspectRatio, focusPoint, imgProps: { width, height } = {} }: ThumbnailProps,\n element: HTMLImageElement | undefined,\n isLoaded: boolean,\n): CSSProperties => {\n // Get natural image size from imgProps or img element.\n const imageSize: RectSize | undefined = useMemo(\n () =>\n getImageSize({\n image,\n aspectRatio,\n focusPoint,\n width: typeof width === 'number' ? width : undefined,\n height: typeof height === 'number' ? height : undefined,\n element,\n isLoaded,\n }),\n [aspectRatio, element, focusPoint, height, image, isLoaded, width],\n );\n\n // Get container size (dependant on imageSize).\n const [containerSize, setContainerSize] = useState<RectSize | undefined>(undefined);\n useEffect(\n function updateContainerSize() {\n const cWidth = element?.offsetWidth;\n const cHeight = element?.offsetHeight;\n if (cWidth && cHeight) {\n // Update only if needed.\n setContainerSize((oldContainerSize) =>\n oldContainerSize?.width === cWidth && oldContainerSize.height === cHeight\n ? oldContainerSize\n : { width: cWidth, height: cHeight },\n );\n } else if (imageSize) {\n // Wait for a render (in case the container size is dependent on the image size).\n requestAnimationFrame(updateContainerSize);\n }\n },\n [element?.offsetHeight, element?.offsetWidth, imageSize],\n );\n\n // Compute style.\n const style: CSSProperties = useMemo(\n () =>\n calculateFocusPointStyle({\n image,\n aspectRatio,\n focusPoint,\n element,\n imageSize,\n containerSize,\n }),\n [aspectRatio, containerSize, element, focusPoint, image, imageSize],\n );\n\n return style;\n};\n","import React, { ReactElement, useState } from 'react';\n\nimport { Theme } from '@lumx/react';\nimport { Falsy, GenericProps } from '@lumx/react/utils/type';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { useImageLoad } from '@lumx/react/components/thumbnail/useImageLoad';\nimport { useFocusPointStyle } from '@lumx/react/components/thumbnail/useFocusPointStyle';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useDisableStateProps } from '@lumx/react/utils/disabled';\nimport {\n Thumbnail as UI,\n ThumbnailProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n element,\n} from '@lumx/core/js/components/Thumbnail';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\nimport { FocusPoint } from './types';\n\n/**\n * Defines the props of the component.\n */\nexport interface ThumbnailProps\n extends GenericProps,\n ReactToJSX<UIProps, 'loadingState' | 'isAnyDisabled' | 'focusPointStyle' | 'disabledStateProps' | 'badge'> {\n /** Apply relative vertical and horizontal shift (from -1 to 1) on the image position inside the thumbnail. */\n focusPoint?: FocusPoint;\n /** Badge. */\n badge?: ReactElement | Falsy;\n /** On click callback. */\n onClick?: React.MouseEventHandler<HTMLDivElement>;\n /** On key press callback. */\n onKeyPress?: React.KeyboardEventHandler<HTMLDivElement>;\n}\n\n/**\n * Thumbnail component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Thumbnail = forwardRef<ThumbnailProps>((props, ref) => {\n const { isAnyDisabled, otherProps, disabledStateProps } = useDisableStateProps(props);\n const defaultTheme = useTheme() || Theme.light;\n const { badge, focusPoint, image, imgRef: propImgRef, onClick, onKeyPress, ...forwardedProps } = otherProps;\n const [imgElement, setImgElement] = useState<HTMLImageElement>();\n\n // Image loading state.\n const loadingState = useImageLoad(image, imgElement);\n const isLoaded = loadingState === 'isLoaded';\n\n // Focus point.\n const focusPointStyle = useFocusPointStyle(props, imgElement, isLoaded);\n\n return UI({\n ref,\n ...forwardedProps,\n theme: forwardedProps.theme || defaultTheme,\n isAnyDisabled,\n disabledStateProps,\n focusPointStyle,\n loadingState,\n imgRef: useMergeRefs(setImgElement, propImgRef),\n handleClick: onClick,\n handleKeyPress: onKeyPress,\n image,\n badge:\n badge &&\n React.cloneElement(badge, {\n className: classNames.join(element('badge'), badge.props.className),\n }),\n });\n});\n\nThumbnail.displayName = COMPONENT_NAME;\nThumbnail.className = CLASSNAME;\nThumbnail.defaultProps = DEFAULT_PROPS as ThumbnailProps;\n","import React from 'react';\nimport { AspectRatio, Size } from '@lumx/react';\nimport { ValueOf } from '@lumx/react/utils/type';\n\n/**\n * Focal point using vertical alignment, horizontal alignment or coordinates (from -1 to 1).\n */\nexport type FocusPoint = { x?: number; y?: number };\n\n/**\n * Loading attribute is not yet supported in typescript, so we need\n * to add it in order to avoid a ts error.\n * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes\n */\ndeclare module 'react' {\n interface ImgHTMLAttributes<T> extends React.HTMLAttributes<T> {\n loading?: 'eager' | 'lazy';\n }\n}\n\n/**\n * All available aspect ratios.\n * @deprecated\n */\nexport const ThumbnailAspectRatio: Record<string, AspectRatio> = { ...AspectRatio };\n\n/**\n * Thumbnail sizes.\n */\nexport type ThumbnailSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;\n\n/**\n * Thumbnail variants.\n */\nexport const ThumbnailVariant = {\n squared: 'squared',\n rounded: 'rounded',\n} as const;\nexport type ThumbnailVariant = ValueOf<typeof ThumbnailVariant>;\n\n/**\n * Thumbnail object fit.\n */\nexport const ThumbnailObjectFit = {\n cover: 'cover',\n contain: 'contain',\n} as const;\nexport type ThumbnailObjectFit = ValueOf<typeof ThumbnailObjectFit>;\n","import { classNames } from '../../utils';\nimport type { GenericProps, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport type { TimeOfDay } from '../../utils/time';\nimport type { SelectTextFieldTranslations } from '../../utils/select/types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TimePickerField';\n\n/**\n * Component default class name (BEM root).\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-time-picker-field';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Default values for `TimePickerFieldWrapperProps`.\n */\nexport const DEFAULT_PROPS: Partial<TimePickerFieldWrapperProps> = {\n step: 30,\n boundsMode: 'on-blur',\n};\n\n/**\n * Translations consumed by `TimePickerField` (forwarded as-is to the underlying\n * `SelectTextField`).\n */\nexport type TimePickerFieldTranslations = Pick<SelectTextFieldTranslations, 'clearLabel' | 'showSuggestionsLabel'>;\n\n/**\n * Wrapper-level props shared by React and Vue `TimePickerField`.\n *\n * These represent the public API that framework wrappers expose to consumers\n * (as opposed to the core template props which use pre-computed `TimeOfDay` values).\n */\nexport interface TimePickerFieldWrapperProps {\n /**\n * Currently selected time. Only the time-of-day component is consumed; the\n * date part is preserved when emitting change.\n */\n value?: Date;\n\n /**\n * BCP-47 locale string (e.g. `'en-US'`, `'fr-FR'`).\n */\n locale?: string;\n\n /**\n * Minute interval between option entries.\n */\n step?: number;\n\n /**\n * Lower bound. Options strictly before this time remain **visible** in the\n * dropdown but are rendered as disabled (cannot be picked). Typed input\n * below this bound is snapped up to it on blur.\n */\n minTime?: Date;\n\n /**\n * Upper bound. Options strictly after this time remain **visible** in the\n * dropdown but are rendered as disabled (cannot be picked). Typed input\n * above this bound is snapped down to it on blur.\n */\n maxTime?: Date;\n\n /**\n * Controls how the time value interacts with `[minTime, maxTime]` bounds.\n * Typed input is always snapped to bounds on blur.\n * - `'enforce'`: additionally, the controlled `value` prop is proactively\n * clamped to bounds on mount and whenever bounds change, calling\n * `onChange` when adjusted.\n * - `'on-blur'` (default): only blur snapping applies.\n */\n boundsMode?: 'on-blur' | 'enforce';\n\n /**\n * Translation labels for clear and show suggestions buttons.\n */\n translations: TimePickerFieldTranslations;\n}\n\n/**\n * `SelectTextField` props managed internally by the `TimePickerField` wrappers\n * (omitted from the inherited `SelectTextField` props in both React and Vue).\n */\nexport type TimePickerFieldOwnedSelectProps =\n | 'value'\n | 'listStatus'\n | 'translations'\n | 'options'\n | 'getOptionId'\n | 'getOptionName'\n | 'getOptionDescription'\n | 'getSectionId'\n | 'renderOption'\n | 'filter'\n | 'onBlur'\n | 'onSearch'\n | 'selectionType'\n | 'maxLength'\n | 'searchInputValue'\n | 'openOnFocus'\n | 'beforeOptions'\n | 'popoverProps';\n\n/**\n * Core props for the `TimePickerField` template.\n */\nexport interface TimePickerFieldProps extends HasTheme, HasClassName, GenericProps {\n /**\n * Currently selected option. Resolve from the consumer's `Date` value via\n * `value && timeList.find((e) => e.hour === value.getHours() && e.minute === value.getMinutes())`.\n */\n value?: TimeOfDay;\n\n /** Time options (one entry per `step`-minute slot). */\n options: TimeOfDay[];\n\n /** Translation labels (clear button, show-suggestions toggle). */\n translations: TimePickerFieldTranslations;\n\n /** Called when the user picks (or clears) an option. */\n handleChange(next: TimeOfDay | undefined): void;\n\n /** Called as the user types — wrappers track this to resolve on blur. */\n handleSearch(typed: string): void;\n\n /** Called when the input loses focus — wrappers commit the typed value. */\n handleBlur(): void;\n}\n\n/**\n * Injected framework-specific components for TimePickerField rendering.\n */\nexport interface TimePickerFieldComponents {\n /** Framework-specific `SelectTextField` wrapper. */\n SelectTextField: any;\n /** Framework-specific `SelectTextField.Option` sub-component (used to render disabled out-of-range entries). */\n Option: any;\n}\n\n/**\n * `TimePickerField` core template.\n *\n * Renders a `SelectTextField<TimeOfDay>` with an option list built from\n * `buildTimeList`. Out-of-range options (strictly before `minTime` / after\n * `maxTime`) remain visible in the dropdown but are rendered as disabled.\n *\n * Framework-specific components are passed as a second argument by the\n * React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const TimePickerField = (\n props: TimePickerFieldProps,\n { SelectTextField, Option }: TimePickerFieldComponents,\n) => {\n const { options, translations, className, handleChange, handleSearch, handleBlur, ...fowardedProps } = props;\n\n return (\n <SelectTextField\n {...fowardedProps}\n className={block([className])}\n selectionType=\"single\"\n options={options}\n getOptionId=\"name\"\n renderOption={(entry: TimeOfDay) => <Option isDisabled={entry.outOfRange} />}\n onChange={handleChange}\n onSearch={handleSearch}\n onBlur={handleBlur}\n filter=\"auto\"\n translations={translations}\n />\n );\n};\n\nTimePickerField.displayName = COMPONENT_NAME;\nTimePickerField.className = CLASSNAME;\n","/**\n * Format a time-of-day as a locale-aware short time (e.g. `'10:30 AM'`,\n * `'10:30'`). Hour is `numeric` (not `'2-digit'`); some locales insert a\n * narrow no-break space (U+202F) before AM/PM.\n */\nexport function formatTime(date: Date, locale: string): string {\n return date.toLocaleTimeString(locale, { hour: 'numeric', minute: '2-digit' });\n}\n","/**\n * Build a new `Date` with the given time-of-day, inheriting the date part of\n * `reference` (or today). Seconds/ms zeroed; `reference` is not mutated.\n */\nexport function getDateAtTime({ hour, minute }: { hour: number; minute: number }, reference?: Date): Date {\n const next = reference ? new Date(reference) : new Date();\n next.setHours(hour, minute, 0, 0);\n return next;\n}\n","/**\n * Return the time-of-day of `date` in minutes since 00:00 (date part ignored).\n */\nexport function timeOfDayMinutes(date: Date): number {\n return date.getHours() * 60 + date.getMinutes();\n}\n","import { formatTime } from './formatTime';\nimport { getDateAtTime } from './getDateAtTime';\nimport { timeOfDayMinutes } from './timeOfDayMinutes';\n\n/**\n * A time-of-day (24h), independent of any date or time zone. Canonical\n * exchange shape for the time utilities and `TimePickerField`.\n */\nexport interface TimeOfDay {\n /** 0–23 */\n hour: number;\n /** 0–59 */\n minute: number;\n /** Locale-aware short display string. Populated by `buildTimeList` when `locale` is set. */\n name?: string;\n /**\n * `true` when strictly outside `[minTime, maxTime]`. Set by `buildTimeList`;\n * consumers typically forward this as `isDisabled` on the rendered option.\n */\n outOfRange?: boolean;\n}\n\n/** Options for `buildTimeList`. */\nexport interface BuildTimeListOptions {\n /** Positive integer minute interval between entries. @default 30 */\n step?: number;\n /** Lower bound (date part ignored). Entries before are kept but marked `outOfRange`. */\n minTime?: Date;\n /** Upper bound (date part ignored). Entries after are kept but marked `outOfRange`. */\n maxTime?: Date;\n /** BCP-47 locale used to populate `name` on each entry. */\n locale?: string;\n}\n\nconst MINUTES_IN_HOUR = 60;\nconst MINUTES_IN_DAY = 24 * MINUTES_IN_HOUR;\n\n/**\n * Build a full-day list of `TimeOfDay` entries spaced `step` minutes apart.\n * Out-of-bounds entries are kept (with `outOfRange: true`) so consumers can\n * render them as visible-but-unselectable. Returns `[]` for invalid `step`.\n */\nexport function buildTimeList(options: BuildTimeListOptions = {}): TimeOfDay[] {\n const { step = 30, minTime, maxTime, locale } = options;\n if (!Number.isInteger(step) || step <= 0) {\n return [];\n }\n\n const minMinutes = minTime ? timeOfDayMinutes(minTime) : undefined;\n const maxMinutes = maxTime ? timeOfDayMinutes(maxTime) : undefined;\n\n const list: TimeOfDay[] = [];\n for (let minutes = 0; minutes < MINUTES_IN_DAY; minutes += step) {\n const hour = Math.floor(minutes / MINUTES_IN_HOUR);\n const minute = minutes % MINUTES_IN_HOUR;\n const outOfRange =\n (minMinutes !== undefined && minutes < minMinutes) ||\n (maxMinutes !== undefined && minutes > maxMinutes) ||\n undefined;\n const name = locale ? formatTime(getDateAtTime({ hour, minute }), locale) : undefined;\n\n list.push({ hour, minute, name, outOfRange });\n }\n return list;\n}\n","import type { TimeOfDay } from './buildTimeList';\n\n/**\n * Match a free-form time. Supports:\n * - 12h with am/pm suffix (`a`, `am`, `p`, `pm`, `a.m.`, `p.m.`), optional whitespace\n * - 24h with colon (`15:45`), dot (`15.45`), `h` (`15h45`) or no separator (`1545`)\n * - Optional seconds segment (ignored): `15:45:00`, `15.45.00`\n * - Optional ISO `T` prefix and trailing `Z` (UTC marker)\n *\n * Capture groups:\n * 1: hour, 2: minutes (optional), 3: am/pm marker (optional)\n */\nconst RE_TIME = /^T?(\\d{1,2})(?:[:.h]?([0-5]\\d)(?:[:.]?[0-5]\\d)?)?\\s*(a\\.?m?\\.?|p\\.?m?\\.?)?Z?$/i;\n\n/**\n * Parse a free-form user time input into a 24h `TimeOfDay`. Accepts a wide\n * range of formats:\n *\n * - 12h AM/PM: `'2pm'`, `'2 PM'`, `'2:30pm'`, `'3.45 PM'`, `'3:45 p.m.'`\n * - 24h colon: `'10:30'`, `'15:45'`\n * - 24h dot (DE/FR/IT): `'15.45'`\n * - 24h French: `'15h45'`\n * - Military / no separator: `'1545'`, `'1030pm'`\n * - With seconds (ignored): `'15:45:00'`\n * - ISO 8601: `'T15:45'`, `'15:45Z'`\n *\n * Whitespace is trimmed. Returns `undefined` if no format matches.\n */\nexport function parseTimeInput(raw: string): TimeOfDay | undefined {\n if (typeof raw !== 'string') return undefined;\n const match = raw.trim().match(RE_TIME);\n if (!match) return undefined;\n\n const [, rawHour, rawMinute, ampm] = match;\n let hour = Number(rawHour);\n const minute = rawMinute ? Number(rawMinute) : 0;\n\n if (ampm) {\n // 12h: hour must be 1..12; convert to 24h (12am→0, 12pm→12).\n if (hour < 1 || hour > 12) return undefined;\n const isPm = ampm[0].toLowerCase() === 'p';\n if (hour === 12) hour = isPm ? 12 : 0;\n else if (isPm) hour += 12;\n } else if (hour > 23) {\n // 24h: hour must be 0..23.\n return undefined;\n }\n\n return { hour, minute };\n}\n","import type { TimeOfDay } from './buildTimeList';\nimport { timeOfDayMinutes } from './timeOfDayMinutes';\n\n/**\n * Clamp `time` to `[minTime, maxTime]`. Inputs strictly before `minTime` snap\n * up; inputs strictly after `maxTime` snap down; otherwise returned unchanged.\n * Only the time-of-day of `minTime`/`maxTime` is used.\n */\nexport function snapTimeToBounds(time: TimeOfDay, minTime?: Date, maxTime?: Date): TimeOfDay {\n const totalMinutes = time.hour * 60 + time.minute;\n\n if (minTime && totalMinutes < timeOfDayMinutes(minTime)) {\n return { hour: minTime.getHours(), minute: minTime.getMinutes() };\n }\n if (maxTime && totalMinutes > timeOfDayMinutes(maxTime)) {\n return { hour: maxTime.getHours(), minute: maxTime.getMinutes() };\n }\n return time;\n}\n","/**\n * Returns `true` when the time-of-day of `date` matches `time` (hour and\n * minute). Seconds and milliseconds are ignored.\n */\nexport function isDateOnTime(date: Date, time: { hour: number; minute: number }): boolean {\n return date.getHours() === time.hour && date.getMinutes() === time.minute;\n}\n","import React, { type SyntheticEvent, useCallback, useEffect, useMemo, useState } from 'react';\n\nimport type { HasClassName, HasTheme } from '@lumx/core/js/types';\nimport {\n TimePickerField as UI,\n type TimePickerFieldProps as UIProps,\n type TimePickerFieldWrapperProps,\n type TimePickerFieldOwnedSelectProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/TimePickerField';\nimport { getCurrentLocale } from '@lumx/react/utils/locale/getCurrentLocale';\nimport {\n buildTimeList,\n formatTime,\n getDateAtTime,\n isDateOnTime,\n parseTimeInput,\n snapTimeToBounds,\n type TimeOfDay,\n} from '@lumx/core/js/utils/time';\n\nimport { SelectTextField, SingleSelectTextFieldProps } from '../select-text-field';\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * Inherited SelectTextField props (less the parts owned by TimePickerField).\n */\ntype InheritedSelectTextFieldProps = Omit<\n SingleSelectTextFieldProps<TimeOfDay>,\n TimePickerFieldOwnedSelectProps | 'onChange'\n>;\n\n/**\n * `TimePickerField` props.\n */\nexport interface TimePickerFieldProps\n extends HasClassName,\n HasTheme,\n InheritedSelectTextFieldProps,\n TimePickerFieldWrapperProps {\n /**\n * Change handler. Called with a new `Date` whose date part is inherited from\n * the previous `value` (or today, if none) and whose time-of-day matches the\n * user selection. May also be called with `undefined` when the field is\n * cleared.\n */\n onChange(value: Date | undefined, name?: string, event?: SyntheticEvent): void;\n}\n\n/**\n * A select-style picker for choosing a time of day. Wraps `SelectTextField`\n * with a generated list of times built from `step`, `minTime`, and `maxTime`.\n *\n * Out-of-range options (strictly before `minTime` or after `maxTime`) remain\n * visible in the dropdown but are rendered as disabled.\n *\n * Free-form typed input (e.g. `\"10:30 PM\"`, `\"14\"`, `\"930\"`) is parsed on blur.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TimePickerField: React.FC<TimePickerFieldProps> = (props) => {\n const {\n value,\n onChange,\n locale = getCurrentLocale(),\n step = DEFAULT_PROPS.step,\n minTime,\n maxTime,\n boundsMode = DEFAULT_PROPS.boundsMode,\n className,\n theme,\n translations,\n name,\n ...forwardedProps\n } = props;\n\n // Build the option list — re-computed only when bounds/step/locale change.\n const timeList = useMemo(() => buildTimeList({ step, minTime, maxTime, locale }), [step, minTime, maxTime, locale]);\n\n // Track the user's typed input separately from the SelectTextField's internal search state,\n // so blur can convert it to a Date.\n const [searchValue, handleSearch] = useState<string>('');\n\n // Resolve the option that matches the current value (by time-of-day).\n const selectedOption = useMemo(() => {\n if (!value) return undefined;\n return { hour: value.getHours(), minute: value.getMinutes(), name: formatTime(value, locale) };\n }, [value, locale]);\n\n // Clamp the current value to bounds whenever enforce mode is set and value/bounds change.\n useEffect(() => {\n if (boundsMode !== 'enforce' || !value) return;\n\n const timeOfDay = {\n hour: value.getHours(),\n minute: value.getMinutes(),\n };\n const clamped = snapTimeToBounds(timeOfDay, minTime, maxTime);\n\n if (clamped.hour !== value.getHours() || clamped.minute !== value.getMinutes()) {\n onChange(getDateAtTime(clamped, value), name);\n }\n }, [boundsMode, value, minTime, maxTime, onChange, name]);\n\n const handleChange: UIProps['handleChange'] = useCallback(\n (next) => {\n const date = next ? getDateAtTime(next, value) : undefined;\n onChange(date, name);\n },\n [name, onChange, value],\n );\n\n const handleBlur: UIProps['handleBlur'] = useCallback(() => {\n if (!searchValue) return;\n const parsed = parseTimeInput(searchValue);\n // Reset our local typed-value tracking; SelectTextField clears its own internal copy.\n handleSearch('');\n if (!parsed) return;\n\n // Snap to bounds if needed, then dedup against the current value.\n const time = snapTimeToBounds(parsed, minTime, maxTime);\n if (value && isDateOnTime(value, time)) return;\n\n onChange(getDateAtTime(time, value), name);\n }, [maxTime, minTime, name, onChange, searchValue, value]);\n\n const searchInputValue = value ? formatTime(value, locale) : undefined;\n\n return UI(\n {\n ...forwardedProps,\n value: selectedOption,\n options: timeList,\n translations,\n className,\n theme,\n handleChange,\n handleSearch,\n handleBlur,\n searchInputValue,\n },\n { SelectTextField, Option: SelectTextField.Option },\n );\n};\n\nTimePickerField.displayName = COMPONENT_NAME;\n","import type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ToolbarProps extends HasClassName {\n /** After content (placed after the label). */\n after?: JSXElement;\n /** Before content (placed before the label). */\n before?: JSXElement;\n /** Label content. */\n label?: JSXElement;\n /** Component ref. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const TOOLBAR_NAME = 'Toolbar';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof TOOLBAR_NAME> = 'lumx-toolbar';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ToolbarProps> = {};\n\n/**\n * Toolbar component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Toolbar = (props: ToolbarProps) => {\n const { after, before, className, label, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'has-after': Boolean(after),\n 'has-before': Boolean(before),\n 'has-label': Boolean(label),\n }),\n )}\n >\n {before && <div className={element('before')}>{before}</div>}\n {label && <div className={element('label')}>{label}</div>}\n {after && <div className={element('after')}>{after}</div>}\n </div>\n );\n};\n","import { ReactNode } from 'react';\n\nimport { GenericProps } from '@lumx/react/utils/type';\nimport {\n Toolbar as UI,\n ToolbarProps as UIProps,\n CLASSNAME,\n TOOLBAR_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Toolbar';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\n/**\n * Defines the props of the component.\n */\nexport interface ToolbarProps extends GenericProps, ReactToJSX<UIProps> {\n /** After content (placed after the label). */\n after?: ReactNode;\n /** Before content (placed before the label). */\n before?: ReactNode;\n /** Label content. */\n label?: ReactNode;\n}\n\n/**\n * Toolbar component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Toolbar = forwardRef<ToolbarProps, HTMLDivElement>((props, ref) => {\n return UI({\n ref,\n ...props,\n });\n});\nToolbar.displayName = TOOLBAR_NAME;\nToolbar.className = CLASSNAME;\nToolbar.defaultProps = DEFAULT_PROPS;\n","import { AspectRatio, Size } from '../../constants';\nimport type {\n HasClassName,\n HasDisabled,\n LumxClassName,\n HasTheme,\n ValueOf,\n HasAriaDisabled,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\n\n/**\n * Uploader variants.\n */\nexport const UploaderVariant = {\n square: 'square',\n rounded: 'rounded',\n circle: 'circle',\n} as const;\nexport type UploaderVariant = ValueOf<typeof UploaderVariant>;\n\n/**\n * Uploader sizes.\n */\nexport type UploaderSize = Extract<Size, 'xl' | 'xxl'>;\n\n/**\n * Native input file props (framework-agnostic subset).\n */\ntype FileInputProps = Record<string, any>;\n\n/**\n * Defines the props of the component.\n */\nexport interface UploaderProps extends HasClassName, HasDisabled, HasTheme, HasAriaDisabled {\n /** Image aspect ratio. */\n aspectRatio?: AspectRatio;\n /** Icon (SVG path). */\n icon?: string;\n /** Label text. */\n label?: string;\n /** Size variant. */\n size?: UploaderSize;\n /** Variant. */\n variant?: UploaderVariant;\n /** On click callback. */\n handleClick?: (event: any) => void;\n /** Handle file selection with a native input file. */\n fileInputProps?: FileInputProps;\n /** Forwarded ref to the root element. */\n ref?: CommonRef;\n /** Whether the component is disabled (computed from `isDisabled` and `aria-disabled`). */\n isAnyDisabled?: boolean;\n /** Id of the hidden file input (used to link the label `for` attribute). */\n inputId: string;\n /** Whether a file is currently being dragged over the input. */\n isDragHovering?: boolean;\n /** Callback fired when the file input value changes. */\n handleChange?: (event: any) => void;\n /** Root element tag or component (e.g. `'button'` or `'label'`). */\n Component: 'button' | 'label';\n}\n\nexport type UploaderPropsToOverride = 'isAnyDisabled' | 'inputId' | 'isDragHovering' | 'fileInputProps' | 'Component';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Uploader';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-uploader';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<UploaderProps> = {\n aspectRatio: AspectRatio.horizontal,\n size: Size.xl,\n variant: UploaderVariant.square,\n};\n\n/**\n * Uploader component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Uploader = (props: UploaderProps) => {\n const {\n aspectRatio = DEFAULT_PROPS.aspectRatio,\n className,\n label,\n icon,\n size = DEFAULT_PROPS.size,\n theme,\n variant = DEFAULT_PROPS.variant,\n isAnyDisabled,\n fileInputProps,\n inputId,\n isDragHovering,\n handleClick,\n handleChange,\n Component = 'label',\n ref,\n ...forwardedProps\n } = props;\n // Adjust to square aspect ratio when using circle variants.\n const adjustedAspectRatio = variant === UploaderVariant.circle ? AspectRatio.square : aspectRatio;\n\n return (\n <Component\n ref={ref as any}\n {...forwardedProps}\n onClick={handleClick}\n className={classNames.join(\n className,\n block({\n [`aspect-ratio-${adjustedAspectRatio}`]: Boolean(adjustedAspectRatio),\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n [`variant-${variant}`]: Boolean(variant),\n 'is-drag-hovering': isDragHovering,\n 'is-disabled': isAnyDisabled,\n }),\n )}\n >\n <span className={element('background')} />\n\n <span className={element('wrapper')}>\n {icon && Icon({ className: element('icon'), icon, size: Size.s })}\n\n {label && <span className={element('label')}>{label}</span>}\n </span>\n\n {fileInputProps && (\n <input\n type=\"file\"\n id={inputId}\n className={classNames.join(element('input'), classNames.visuallyHidden())}\n {...fileInputProps}\n onChange={handleChange}\n />\n )}\n </Component>\n );\n};\n","import React, { MouseEventHandler } from 'react';\n\nimport { Theme } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { useBooleanState } from '@lumx/react/hooks/useBooleanState';\nimport { useId } from '@lumx/react/hooks/useId';\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\nimport { useDisableStateProps } from '@lumx/react/utils/disabled';\n\nimport {\n Uploader as UI,\n UploaderProps as UIProps,\n UploaderPropsToOverride,\n UploaderVariant,\n DEFAULT_PROPS,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Uploader';\nimport type { UploaderSize } from '@lumx/core/js/components/Uploader';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nexport type { UploaderSize };\nexport { UploaderVariant };\n\ninterface ReactFileInputProps extends Omit<React.ComponentProps<'input'>, 'onChange'> {\n onChange?(files: File[], evt: React.ChangeEvent<HTMLInputElement>): void;\n}\n\n/**\n * Defines the props of the component.\n */\nexport interface UploaderProps extends GenericProps, ReactToJSX<UIProps, UploaderPropsToOverride> {\n /** On click callback. */\n onClick?: MouseEventHandler;\n /** Handle file selection with a native input file. */\n fileInputProps?: ReactFileInputProps;\n}\n\n/**\n * Uploader component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Uploader = forwardRef<UploaderProps>((props, ref) => {\n const { disabledStateProps, otherProps, isAnyDisabled } = useDisableStateProps(props);\n const defaultTheme = useTheme() || Theme.light;\n const { theme = defaultTheme, fileInputProps, onClick, ...forwardedProps } = otherProps;\n\n const handleClick: React.MouseEventHandler = React.useCallback(\n (evt) => {\n if (isAnyDisabled) {\n evt.preventDefault();\n } else {\n onClick?.(evt);\n }\n },\n [isAnyDisabled, onClick],\n );\n\n const generatedInputId = useId();\n const inputId = fileInputProps?.id || generatedInputId;\n const [isDragHovering, unsetDragHovering, setDragHovering] = useBooleanState(false);\n const wrapper = fileInputProps\n ? ({ Component: 'label', props: { htmlFor: inputId } } as const)\n : ({ Component: 'button', props: { type: 'button', ...disabledStateProps } } as const);\n\n const onChange = React.useMemo(() => {\n if (isAnyDisabled || !fileInputProps?.onChange) return undefined;\n return (evt: React.ChangeEvent<HTMLInputElement>) => {\n const fileList = evt.target.files;\n const files = fileList ? Array.from(fileList) : [];\n fileInputProps.onChange?.(files, evt);\n };\n }, [isAnyDisabled, fileInputProps]);\n\n return UI({\n Component: wrapper.Component,\n ref,\n inputId,\n handleClick,\n handleChange: onChange,\n isAnyDisabled,\n isDragHovering,\n theme,\n fileInputProps: fileInputProps\n ? {\n ...fileInputProps,\n ...disabledStateProps,\n readOnly: isAnyDisabled,\n onDragEnter: setDragHovering,\n onDragLeave: unsetDragHovering,\n onDrop: unsetDragHovering,\n }\n : undefined,\n ...wrapper.props,\n ...forwardedProps,\n });\n});\n\nUploader.displayName = COMPONENT_NAME;\nUploader.className = CLASSNAME;\nUploader.defaultProps = DEFAULT_PROPS;\n","import type { HasClassName, LumxClassName, HasTheme, GenericProps, JSXElement, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Orientation, Size } from '../../constants';\n\n/**\n * User block sizes.\n */\nexport type UserBlockSize = Extract<Size, 'xs' | 's' | 'm' | 'l'>;\n\n/**\n * Props for the UserBlock component.\n *\n * UserBlock displays user information with an avatar, name, and optional fields.\n * Supports both horizontal and vertical orientations with customizable actions.\n */\nexport interface UserBlockProps extends HasClassName, HasTheme {\n /**\n * Props to pass to the Avatar component.\n * Configure the user's avatar appearance and behavior.\n */\n avatarProps?: GenericProps;\n\n /**\n * Additional fields to display below the user's name.\n * Typically used for role, department, or other user metadata.\n */\n fields?: string[];\n\n /**\n * Props to pass to the Link component wrapping the avatar and/or name.\n * Used to make the user block clickable with navigation.\n */\n linkProps?: GenericProps;\n\n /**\n * Custom component to use for the link element.\n * Use this to inject a framework-specific router Link component (e.g., react-router Link).\n * @default 'a'\n */\n linkAs?: 'a' | any;\n\n /**\n * Content for multiple actions displayed in the action toolbar.\n * Only visible when orientation is vertical.\n */\n multipleActions?: JSXElement;\n\n /**\n * The user's display name.\n * Can be a string or custom JSX element.\n */\n name?: JSXElement;\n\n /**\n * Props to pass to the name wrapper element.\n * Used to customize the name block's appearance and behavior.\n */\n nameProps?: GenericProps;\n\n /**\n * Layout orientation of the user block.\n * - horizontal: Avatar and info side by side (default)\n * - vertical: Avatar and info stacked, forces size to 'l'\n * @default Orientation.horizontal\n */\n orientation?: Orientation;\n\n /**\n * Content for a single action displayed in the action toolbar.\n * Only visible when orientation is vertical.\n */\n simpleAction?: JSXElement;\n\n /**\n * Size variant of the component.\n * Note: When orientation is vertical, size is automatically forced to 'l'.\n * @default Size.m\n */\n size?: UserBlockSize;\n\n /**\n * Click event handler.\n * Called when the user clicks on the clickable area (name/avatar).\n */\n handleClick?(): void;\n\n /**\n * Mouse enter event handler.\n * Called when the mouse enters the component.\n */\n handleMouseEnter?(): void;\n mouseEnterProp?: string;\n\n /**\n * Mouse leave event handler.\n * Called when the mouse leaves the component.\n */\n handleMouseLeave?(): void;\n mouseLeaveProp?: string;\n\n /**\n * Additional custom fields to display below the standard fields.\n * Only visible when size is not 'xs' or 's'.\n */\n additionalFields?: JSXElement;\n\n /**\n * Content to display after the entire component.\n * Position depends on orientation:\n * - horizontal: displayed to the right\n * - vertical: displayed at the bottom\n */\n after?: JSXElement;\n\n /**\n * Custom content to replace the default name block.\n * When provided, replaces the default name rendering.\n */\n children?: JSXElement;\n\n /**\n * Ref to attach to the root element.\n */\n ref?: CommonRef;\n\n /**\n * Text component for rendering text content.\n * Injected by the framework wrapper (React/Vue).\n */\n Text: (props: any) => any;\n\n /**\n * Avatar component for rendering the user avatar.\n * Injected by the framework wrapper (React/Vue).\n */\n Avatar: (props: any) => any;\n}\n\nexport type UserBlockPropsToOverride =\n | 'Avatar'\n | 'Text'\n | 'linkProps'\n | 'avatarProps'\n | 'mouseLeaveProp'\n | 'mouseEnterProp';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'UserBlock';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-user-block';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<UserBlockProps> = {\n orientation: Orientation.horizontal,\n size: Size.m,\n};\n\nexport const isUserBlockClickeable = ({\n linkAs,\n linkProps,\n handleClick,\n}: Pick<UserBlockProps, 'linkAs' | 'linkProps' | 'handleClick'>) => {\n const isLink = Boolean(linkProps?.href || linkAs);\n const isClickable = !!handleClick || isLink;\n\n return isClickable;\n};\n\n/**\n * UserBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const UserBlock = (props: UserBlockProps) => {\n const {\n avatarProps,\n className,\n fields,\n linkProps,\n linkAs,\n ref,\n multipleActions,\n mouseEnterProp = 'onMouseEnter',\n mouseLeaveProp = 'onMouseLeave',\n name,\n nameProps,\n handleClick,\n handleMouseEnter,\n handleMouseLeave,\n orientation = DEFAULT_PROPS.orientation,\n simpleAction,\n size = DEFAULT_PROPS.size,\n theme,\n children,\n additionalFields,\n after,\n Text,\n Avatar,\n ...forwardedProps\n } = props;\n let componentSize = size;\n\n // Special case - When using vertical orientation force the size to be Sizes.l.\n if (orientation === Orientation.vertical) {\n componentSize = Size.l;\n }\n\n const shouldDisplayActions: boolean = orientation === Orientation.vertical;\n\n const isClickable = isUserBlockClickeable({ handleClick, linkAs, linkProps });\n\n const shouldDisplayFields = componentSize !== Size.s && componentSize !== Size.xs;\n\n const fieldsBlock = fields && shouldDisplayFields && (\n <div className={element('fields')}>\n {fields.map((field: string, idx: number) => (\n <Text as=\"span\" key={idx} className={element('field')}>\n {field}\n </Text>\n ))}\n </div>\n );\n\n const eventHandlers = {\n ...(handleMouseEnter && { [mouseEnterProp]: handleMouseEnter }),\n ...(handleMouseLeave && { [mouseLeaveProp]: handleMouseLeave }),\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n {...(eventHandlers as any)}\n className={classNames.join(\n className,\n block({\n [`orientation-${orientation}`]: Boolean(orientation),\n [`size-${componentSize}`]: Boolean(componentSize),\n [`theme-${theme}`]: Boolean(theme),\n 'is-clickable': isClickable,\n }),\n )}\n >\n {avatarProps && (\n <Avatar\n linkAs={linkAs}\n linkProps={linkProps}\n alt=\"\"\n {...(avatarProps as any)}\n className={classNames.join(element('avatar'), avatarProps.className)}\n size={componentSize}\n onClick={handleClick}\n theme={theme}\n />\n )}\n {(fields || name || children || additionalFields) && (\n <div className={element('wrapper')}>\n {children}\n {fieldsBlock}\n {shouldDisplayFields ? additionalFields : null}\n </div>\n )}\n {shouldDisplayActions && simpleAction && <div className={element('action')}>{simpleAction}</div>}\n {shouldDisplayActions && multipleActions && <div className={element('actions')}>{multipleActions}</div>}\n {after ? <div className={element('after')}>{after}</div> : null}\n </div>\n );\n};\n","import React, { ReactNode } from 'react';\n\nimport { Avatar, Theme, Text, Link, ColorPalette } from '@lumx/react';\nimport { GenericProps } from '@lumx/react/utils/type';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\n\nimport { useTheme } from '@lumx/react/utils/theme/ThemeContext';\nimport {\n UserBlock as UI,\n UserBlockProps as UIProps,\n UserBlockPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n element,\n isUserBlockClickeable,\n UserBlockSize,\n} from '@lumx/core/js/components/UserBlock';\nimport { ReactToJSX } from '@lumx/react/utils/type/ReactToJSX';\n\nimport isEmpty from 'lodash/isEmpty';\nimport set from 'lodash/set';\nimport { classNames } from '@lumx/core/js/utils';\nimport { AvatarProps } from '../avatar/Avatar';\n\nexport type { UserBlockSize };\n\n/**\n * Defines the props of the component.\n */\nexport interface UserBlockProps extends GenericProps, ReactToJSX<UIProps, UserBlockPropsToOverride> {\n /** Props to pass to the avatar. */\n avatarProps?: Omit<AvatarProps, 'alt'>;\n /** Props to pass to the link wrapping the avatar thumbnail. */\n linkProps?: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;\n /** On click callback. */\n onClick?(): void;\n /** On mouse enter callback. */\n onMouseEnter?(): void;\n /** On mouse leave callback. */\n onMouseLeave?(): void;\n}\n\n/**\n * UserBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const UserBlock = forwardRef<UserBlockProps, HTMLDivElement>((props, ref) => {\n const defaultTheme = useTheme() || Theme.light;\n const {\n onClick,\n onMouseEnter,\n onMouseLeave,\n theme = defaultTheme,\n nameProps,\n avatarProps,\n name,\n linkProps,\n linkAs,\n children,\n ...forwardedProps\n } = props;\n\n const isClickable = isUserBlockClickeable({ linkAs, linkProps, handleClick: onClick });\n\n /**\n * This logic needs to occur on the wrapper level, since core templates cannot manage\n * the render of dynamically determined components. So `NameComponent`, if moved to core,\n * it will return an `undefined`\n */\n const nameBlock: ReactNode = React.useMemo(() => {\n if (isEmpty(name)) {\n return null;\n }\n let NameComponent: any = 'span';\n const nProps: any = {\n ...nameProps,\n className: classNames.join(element('name'), linkProps?.className, nameProps?.className),\n };\n if (isClickable) {\n NameComponent = Link;\n Object.assign(nProps, {\n ...linkProps,\n onClick,\n linkAs,\n color: ColorPalette.dark,\n });\n }\n // Disable avatar focus since the name block is the same link / same button.\n if (avatarProps) {\n set(avatarProps, ['thumbnailProps', 'tabIndex'], -1);\n }\n return (\n <NameComponent {...nProps}>\n <Text as=\"span\">{name}</Text>\n </NameComponent>\n );\n }, [avatarProps, isClickable, linkAs, linkProps, name, nameProps, onClick]);\n\n return UI({\n Avatar,\n ref,\n Text,\n handleClick: onClick,\n handleMouseEnter: onMouseEnter,\n handleMouseLeave: onMouseLeave,\n theme,\n nameProps,\n avatarProps,\n name,\n linkProps,\n linkAs,\n ...forwardedProps,\n children: children || nameBlock,\n });\n});\n\nUserBlock.displayName = COMPONENT_NAME;\nUserBlock.className = CLASSNAME;\nUserBlock.defaultProps = DEFAULT_PROPS;\n"],"names":["i","useId","React","useMemo","forwardRef","TOOLTIP_HOVER_DELAY","open","close","TOOLTIP_LONG_PRESS_DELAY","Alignment","bottom","left","Theme","light","dark","Size","xxs","xs","s","m","l","xl","xxl","tiny","regular","medium","big","huge","Orientation","horizontal","vertical","Emphasis","low","high","TypographyInterface","overline","caption","body1","body2","subtitle1","subtitle2","title","headline","display1","Typography","AspectRatio","original","square","free","Kind","info","success","warning","error","ColorPalette","primary","secondary","blue","green","yellow","red","ColorVariant","D1","N","IS_BROWSER","window","navigator","userAgent","includes","modifier","baseName","modifiers","modifierClasses","key","value","Object","entries","push","join","block","modifiersOrAdditionalClasses","additionalClasses","classes","Array","isArray","classnames","PREFIX","ACTION_ELEMENT","actionArea","assign","action","resolveColorWithVariants","colorWithVariants","colorVariant","undefined","color","baseColorVariant","split","type","propColor","propColorVariant","cColor","cColorVariant","font","typography","typo","ABSTRACT_SIZES","Set","isAbstractSize","has","spacing","directionOrSize","size","isShorthand","direction","resolvedSize","baseClass","padding","visuallyHidden","VISUALLY_HIDDEN","element","elem","bem","blockFn","elementFn","onEnterPressed","handler","evt","getWithSelector","selector","object","String","groupBySelector","array","groups","Map","item","group","get","set","CONFIG","icon","mdiAlert","mdiInformation","mdiCheckCircle","mdiAlertCircle","COMPONENT_NAME","CLASSNAME","classNames","DEFAULT_PROPS","kind","AlertDialog","props","id","className","cancelProps","confirmProps","ref","dialogProps","children","DescriptionElement","cancelButtonRef","confirmationButtonRef","focusElement","Dialog","Toolbar","Button","Icon","forwardedProps","titleId","descriptionId","label","confirmLabel","onClick","confirmOnClick","forwardedConfirmProps","cancelLabel","cancelOnClick","forwardedCancelProps","_jsxs","role","Boolean","_jsx","before","after","_Fragment","emphasis","useRef","generatedId","uniqueId","UI","displayName","defaultProps","useFocus","shouldFocus","wasFocus","setWasFocus","useState","useEffect","focus","mergeRefs","refs","forEach","current","useMergeRefs","ThemeContext","createContext","ThemeProvider","Provider","useTheme","useContext","useDisableStateProps","disabled","isDisabled","ariaDisabled","onChange","otherProps","disabledStateContext","useDisabledStateContext","disabledStateProps","getDisabledState","isAnyDisabled","anchorToInput","closeOnClick","closeOnClickAway","closeOnEscape","shouldFocusOnClose","Autocomplete","defaultTheme","chips","fitToAnchorWidth","hasError","helper","inputRef","clearButtonProps","isRequired","isOpen","isValid","name","offset","onBlur","onClose","onFocus","onInfiniteScroll","placeholder","placement","theme","textFieldProps","focusAnchorOnClose","inputAnchorRef","textFieldRef","TextField","Dropdown","anchorRef","shouldFocusOnOpen","selectedChipRender","choice","index","onClear","event","Chip","mdiClose","onAfterClick","values","AutocompleteMultiple","chipsAlignment","onKeyDown","map","chip","Avatar","actions","badge","image","alt","linkProps","linkAs","onKeyPress","thumbnailProps","Thumbnail","aspectRatio","Badge","BadgeWrapper","RawClickable","handleClick","handleKeyPress","as","Component","clickableProps","tabIndex","stopPropagation","preventDefault","BUTTON_WRAPPER_CLASSNAME","buttonWrapperBlock","BUTTON_CLASSNAME","buttonBlock","renderButtonWrapper","variant","fullWidth","adaptedColor","wrapperClassName","buttonProps","hasBackground","ButtonRoot","ariaLabel","isSelected","isActive","isFocused","isHovered","buttonClassName","href","leftIcon","rightIcon","NAME_PROPERTIES","isComponent","component","instance","componentName","some","nameProperty","restOfOtherProps","isEmpty","Text","IconClassName","hasShape","verticalAlign","iconColor","iconColorVariant","iconSize","path","height","preserveAspectRatio","style","viewBox","width","d","fill","IconButton","defaultChildren","src","tooltipProps","hideTooltip","Tooltip","ButtonGroup","InputLabelClassName","InputLabel","htmlFor","ComponentToUse","INPUT_HELPER_CONFIGURATION","InputHelperClassName","InputHelper","INTERMEDIATE_STATE","Checkbox","checked","isChecked","handleChange","inputProps","inputId","intermediateState","handleOnChange","readOnly","mdiMinus","mdiCheck","localInputRef","generatedInputId","input","indeterminate","useStopPropagation","useCallback","isFunction","isClickable","propIsClickable","isHighlighted","handleAfterClick","handleBeforeClick","hasAfterClick","hasBeforeClick","hasOnClick","handleKeyDown","keyDownProp","tabIndexProp","isButton","chipColor","handleOnKeyDown","compatibilityProps","onBeforeClick","handleOnBeforeClick","handleOnAfterClick","ChipGroup","INITIAL_STATE_ACTIVE_CHIP","useChipGroupNavigation","onChipDeleted","initialActiveChip","wasBackspacePressed","setWasBackspacePressed","activeChip","setActiveChip","resetChipNavigation","onBackspacePressed","length","chipDeleted","InternalChipGroup","SelectionChipGroup","getOptionId","getOptionName","chipRemoveLabel","getChipProps","v","customProps","chipIsDisabled","chipName","truncate","createSelectorTreeWalker","container","document","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","matches","FILTER_ACCEPT","FILTER_SKIP","ENABLED_CHIP_SELECTOR","CHIP_CLASSNAME","getChip","target","closest","isChipDisabled","getAttribute","findSiblingChip","anchor","walker","currentNode","nextNode","previousNode","last","removeOption","options","optionId","getValue","findIndex","newValue","splice","setupSelectionChipGroupEvents","getContainer","dataset","stopImmediatePropagation","activatingKey","focusTarget","getInput","setAttribute","addEventListener","inputHandler","backspacePressed","cursorAtStart","selectionStart","selectionEnd","lastChip","removeEventListener","DEFAULT_VALUE","TooltipContext","TooltipContextProvider","useTooltipContext","useOverflowTooltipLabel","content","parentTooltip","tooltipLabel","setTooltipLabel","labelElement","setLabelElement","useLayoutEffect","offsetWidth","scrollWidth","innerText","labelRef","isComponentType","isValidElement","wrapChildrenIconWithSpaces","Children","toArray","flatMap","child","cloneElement","getTextProps","noWrap","whiteSpace","truncateLinesStyle","lines","isTruncatedMultiline","isTruncated","whiteSpaceStyle","clamp","computePosition","arrow","autoPlacement","flip","shift","getComputedStyle","offset$1","ARROW_SIZE","TOOLTIP_ZINDEX","closeMode","ariaLinkMode","zIndex","TooltipPopup","position","isHidden","labelLines","line","useInjectTooltipRef","setAnchorElement","isMounted","linkId","aria","makeListenerTowerContext","LISTENERS","register","listener","disable","enable","unregister","pull","useCallbackOnEscape","callback","rootElement","DOCUMENT","body","onEscapePressed","isFocusVisible","_ignored","isHoverNotSupported","matchMedia","createTooltipOpenManager","delay","onStateChange","timer","openStartTime","shouldOpen","anchorController","popperController","deferUpdate","duration","clearTimeout","update","setTimeout","hoverNotSupported","hasTouch","openDelay","closeDelay","Date","now","getClose","overrideDelay","closeImmediately","attachAnchor","anchorElement","AbortController","signal","longPressEnd","e","attachPopper","popperElement","abort","destroy","useTooltipOpen","setIsOpen","onPopperMount","managerRef","manager","el","forceOpen","setPopperElement","floatingStyles","resolvedPlacement","useFloating","whileElementsMounted","autoUpdate","elements","reference","floating","middleware","isActivated","wrappedChildren","tooltipRef","Portal","CORE_COMPONENT_NAME","CORE_CLASSNAME","createPendingNavigation","pending","clear","hasPending","defer","navigate","flush","createListFocusNavigation","callbacks","itemSelector","wrap","itemDisabledSelector","getActiveItem","enabledItemSelector","createItemWalker","enabledOnly","findFirstEnabled","querySelector","findLastEnabled","items","querySelectorAll","findAtOffset","forward","stepsNeeded","Math","abs","active","step","remaining","lastChild","next","wrapped","findMatching","predicate","onDeactivate","selectors","activeItem","hasNavigableItems","getFirst","getLast","getMatching","findNearestEnabled","contains","HTMLElement","goTo","resolve","onActivate","goToOffset","flushPendingNavigation","goUp","goDown","goLeft","goRight","createActiveItemState","initialItem","setActive","lastDescendant","lastElementChild","first","iterable","done","Symbol","iterator","createGridFocusNavigation","rowSelector","cellSelector","state","isNavigableRow","row","getFirstCell","getRowCells","from","findRows","start","dive","result","findFirstVisibleRow","findLastVisibleRow","findParentRow","cell","rememberedCol","focusCellInRow","col","cells","clampedCol","min","activateCell","indexOf","goToFirst","goToLast","goHorizontal","currentRow","nextCol","rowDirection","adjacentRow","targetRow","targetCells","targetCol","goVertical","wrapRow","find","visibleRows","startIdx","remainingOffset","targetIdx","max","rowIdx","querySelectorInclusive","trackContainerFocus","hasFocus","activeElement","newTarget","relatedTarget","reset","setupRovingTabIndex","itemSelectedAttr","onItemFocused","itemActiveSelector","itemSelectedSelector","containerFocus","nav","setTabIndex","normalizeItems","hasExistingTabStop","hasTabStop","fallback","normalizeAllItems","preferredTabStopIndex","preferredItem","unshift","ensureTabStop","observer","MutationObserver","mutations","removedActiveItem","removalAnchor","newSelectedItem","disabledTargets","insertedItems","mutation","removedNode","removedNodes","firstMatch","nextSibling","previousSibling","addedNode","addedNodes","attributeName","shouldMoveFocus","currentActive","activeItemDisabled","currentTabStop","observe","childList","subtree","attributes","attributeFilter","disconnect","handled","useIsomorphicLayoutEffect","useEventCallback","fn","args","unref","maybeElement","useRovingTabIndexContainer","containerRef","unstableOnItemFocused","abortController","renderChip","getChipPropsProp","setContainer","valueRef","onChangeRef","option","chipProps","renderChipProps","customChip","definedRenderChipProps","fromEntries","filter","getOptionValue","textContent","trim","getOptionLabel","isOptionDisabled","isActionCell","notifySection","sectionElement","sectionRegistrations","optionRegistrations","force","reg","hasOptions","hasVisibleOption","optionElement","optionReg","lastFiltered","hidden","setupListbox","handle","notify","trigger","listbox","isGrid","focusCallbacks","requestAnimationFrame","lastItem","scrollIntoView","toScrollTo","removeAttribute","focusNav","wrapNavigation","CSS","escape","select","setupCombobox","onTriggerAttach","isOpenState","filterValue","lastOptionsLength","lastInputValue","lastLoadingState","skeletonCount","subscribers","activeDescendantChange","optionsChange","loadingChange","loadingAnnouncement","cb","getVisibleOptionCount","count","hasVisibleContent","notifyVisibilityChange","visibleCount","inputValue","optionsLength","LOADING_ANNOUNCEMENT_DELAY","loadingTimer","announcementSent","startLoadingAnnouncementTimer","onSkeletonCountChange","isLoading","detach","attachTriggerKeydown","triggerEl","onKeydown","handleKeydown","flag","altKey","click","isMultiSelect","tryAttach","isNewController","onSelect","registerOption","filterLower","toLowerCase","text","isFiltered","delete","setFilter","newFilter","refilterOption","registerSection","registerSkeleton","wasLoading","registerTrigger","newTrigger","registerListbox","newListbox","hadListbox","subscribe","add","SEARCH_TIMEOUT","createTypeahead","getWalker","getItemValue","searchString","searchTimeout","match","currentItem","firstItem","allSameChar","every","ch","searchText","validCurrent","root","startItem","candidate","itemText","startsWith","rematch","isPrintableKey","ctrlKey","metaKey","setupComboboxButton","button","combobox","typeahead","n","ComboboxButton","labelDisplayMode","listboxId","renderButton","showSelection","tooltipOnly","selectionLabel","componentProps","forwardRefPolymorphic","ComboboxContext","useComboboxContext","context","Error","useComboboxEvent","initialValue","setValue","useComboboxOpen","setHandle","ButtonComp","buttonElement","setButtonElement","mergedRef","onSelectRef","setupComboboxInput","selectionMode","optionOnSelect","onInput","onInputCallback","openOnFocus","autoFilter","userHasTyped","InputEvent","unsubscribeOpen","setSelectionRange","len","ComboboxInput","toggleButtonProps","handleToggle","disabledState","autoComplete","afterElement","mdiChevronUp","mdiChevronDown","INPUT_NATIVE_CLASSNAME","generateAccessibilityIds","existingAriaDescribedBy","helperId","errorId","labelId","describedByIds","describedById","forceFocusStyle","textFieldId","labelProps","maxLength","multiline","isFocus","valueLength","isNotEmpty","mdiCloseCircle","RawInputText","handleInput","handleFocus","handleBlur","handleOnInput","restOfProps","rows","RawInputTextarea","textarea","useFitRowsToContent","minimumRows","textareaRef","setRows","previousRows","rowHeight","clientHeight","scrollHeight","requiredRows","ceil","CORE_DEFAULT_PROPS","inputRefProps","generatedTextFieldId","setFocus","handleClear","nativeEvent","currentTarget","blur","inputElement","required","externalInputRef","internalInputRef","mergedInputRef","List","itemPadding","ComboboxList","ariaBusy","ComboboxListContext","useComboboxListContext","internalRef","listContextValue","list","setIsLoading","ListItem","linkRef","clickable","ListItemAction","Element","ComboboxOption","description","actionProps","actionRole","itemRole","actionElement","wrappedAction","ComboboxOptionContext","useComboboxOptionContext","setIsFiltered","optionContextValue","wrappedAfter","ComboboxOptionAction","actionId","ComboboxOptionMoreInfo","Popover","popoverId","onMouseEnter","onMouseLeave","mdiInformationOutline","hasArrow","TABBABLE_ELEMENTS_SELECTOR","DISABLED_SELECTOR","isNotDisabled","getFocusableElements","getFirstAndLastFocusable","parentElement","focusableElements","FOCUS_TRAPS","setupFocusTrap","focusZoneElement","aborted","rootNode","getRootNode","addedTabIndex","ensureZoneIsFocusable","hasAttribute","focusZoneFallback","preventScroll","trapTabFocusInFocusZone","focusable","shiftKey","keydownHandler","focusTrap","firstFocusable","once","useFocusTrap","controller","skipRender","Wrapper","Placement","AUTO","AUTO_END","AUTO_START","TOP","TOP_END","TOP_START","RIGHT","RIGHT_END","RIGHT_START","BOTTOM","BOTTOM_END","BOTTOM_START","LEFT","LEFT_END","LEFT_START","FitAnchorWidth","MAX_WIDTH","MIN_WIDTH","POPOVER_ZINDEX","elevation","usePortal","ClickAwayProvider","asTag","popoverStyle","arrowStyle","arrowRef","clickAwayCallback","clickAwayRefs","unmountSentinel","adjustedElevation","enabled","childrenRefs","OnBeforeUnmount","callbackRef","useRestoreFocusOnClose","popoverElement","onBeforeUnmountRef","prevIsOpenRef","tryRestoreFocus","focusedAtClose","isFocusWithin","focusMovedAway","documentElement","elementToFocus","parseAutoPlacement","isAuto","autoAlignment","floatingPlacement","parseFitWidth","resolveCssSize","combineSize","combinator","size1","size2","cssMin","cssMax","buildPopoverMiddleware","fitWidth","fitWithinViewportHeight","rawWidth","minWidth","rawMinWidth","maxWidth","rawMaxWidth","rawHeight","minHeight","rawMinHeight","maxHeight","rawMaxHeight","boundary","parsedPlacement","arrowElement","middlewares","awayOffset","away","alongOffset","along","offsetMiddleware","mainAxis","crossAxis","alignment","anySizeConstraint","apply","availableHeight","rects","anchorWidth","adaptedAvailableHeight","arrowMiddleware","computeArrowStyles","arrowData","x","top","y","getFloatingPlacement","usePopoverStyle","boundaryRef","setArrowElement","isPositioned","middlewareData","arrowStyles","styles","popover","_InnerPopover","withFocusTrap","focusTrapZoneElement","popoverRef","mergedRefs","PopoverUI","onToggle","setIsHovered","activeDescendantId","isKeyboardHighlighted","SkeletonTypography","ComboboxOptionSkeleton","hasDescription","itemProps","_","DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT","ComboboxPopover","FlexBox","handleClose","orientation","getFlexBoxProps","fillSpace","gap","hAlign","marginAuto","noShrink","vAlign","adjustedOrientation","castArray","align","popoverProps","ComboboxProvider","onOpen","contextValue","onOpenRef","ComboboxSection","ListSection","ariaHidden","itemsWrapperProps","hasHeader","sectionState","setSectionState","ComboboxState","GenericBlock","emptyMessage","nbOptionMessage","errorMessage","errorTryReloadMessage","loadingMessage","showError","resolvedEmptyMessage","showEmpty","showLoading","resolvedNbOptionMessage","show","alignProps","renderContent","OPEN_ANNOUNCEMENT_DELAY","subscribeComboboxState","setters","setShouldAnnounce","unsubLoadingChange","unsubLoadingAnnouncement","openTimer","unsubOpen","partitionMulti","predicates","reduce","partitioned","concat","dropRight","partition","figure","figureProps","actionsProps","contentProps","Figure","noop","bind","isFigure","Content","isContent","Actions","isActions","BaseGenericBlock","sections","figureChild","contentChild","actionsChild","otherChildren","figureChildProps","contentChildProps","actionsChildProps","GenericBlockGapSize","pick","optionsState","shouldAnnounce","ListDivider","Combobox","Input","Option","OptionAction","OptionMoreInfo","OptionSkeleton","Section","State","Divider","CommentBlockVariant","indented","linear","CommentBlock","avatarProps","date","fullDate","hasActions","headerActions","isRelevant","hasChildren","addMonthResetDay","monthOffset","newDate","getTime","setDate","setMonth","getMonth","isDateValid","Number","isNaN","getFromBrowser","locale","localeMetadata","Intl","Locale","code","firstDay","getWeekInfo","weekInfo","FIRST_DAY_FOR_LOCALES","localeRX","getFromConstant","searchBy","test","language","getFirstDayOfWeek","DAYS_PER_WEEK","getWeekDays","iterDate","getDay","getDate","weekDays","letter","toLocaleDateString","weekday","long","number","MONTH_ROW_COUNT","getMonthCalendar","referenceDate","rangeMinDate","rangeMaxDate","month","minDate","maxDate","setUTCHours","lastDayOfWeek","weeks","week","rowCount","weekDayNumber","day","isOutOfRange","keys","isSameDay","date1","date2","getFullYear","getCurrentLocale","languages","parseLocale","rawLanguage","rawRegion","region","toUpperCase","usePreviousValue","prevValueRef","prevValue","getYearDisplayName","displayNames","DisplayNames","of","formatDayNumber","formattedDate","replace","DatePickerControlled","nextButtonProps","onNextMonthChange","onPrevMonthChange","previousButtonProps","selectedMonth","todayOrSelectedDateRef","onMonthChange","localeObj","selectedYear","formattedYear","year","slice","currentYear","setCurrentYear","updateMonthOffset","newYearValue","yearNumber","previousYearNumber","onYearChange","inputType","updateYear","updateYearOnEnterPressed","monthYear","prevSelectedMonth","monthHasChanged","labelAriaLive","setLabelAriaLive","yearLabel","mdiChevronRight","mdiChevronLeft","dir","RegExp","exec","part","toLocaleUpperCase","weekIndex","weekDay","dayIndex","isToday","DatePicker","defaultMonth","console","warn","setSelectedMonth","setPrevMonth","setNextMonth","onDatePickerChange","useBooleanState","defaultValue","booleanValue","setBoolean","setToFalse","setToTrue","toggleBoolean","previousValue","DatePickerField","toggleOpen","handleKeyboardNav","onTextFieldChange","textFieldValue","textFieldName","PopoverDialog","useIntersectionObserver","intersections","setIntersections","IntersectionObserver","entry","useDisableBodyScroll","modalElement","previousDocumentOverflow","overflow","disableBodyScroll","enableBodyScroll","isReducedMotion","WINDOW","useTransitionVisibility","isComponentVisible","timeout","onVisibilityChange","isVisible","setVisible","previousVisibility","TransitionEvent","header","forceFooterDivider","forceHeaderDivider","footer","contentRef","headerChildContent","HeadingLevelProvider","shouldPreventCloseOnClickAway","rootRef","wrapperRef","hasTopIntersection","headerChildProps","setSentinelTop","setSentinelBottom","footerChildContent","footerChildProps","ProgressCircular","hasBottomIntersection","level","parentRef","isHeader","isFooter","preventAutoClose","preventCloseOnClick","preventCloseOnEscape","previousOpen","shouldPreventCloseOnEscape","localContentRef","sentinelTop","sentinelBottom","threshold","isIntersecting","headerChild","footerChild","DIALOG_TRANSITION_DURATION","DragHandle","mdiDragVertical","INITIAL_INDEX","useKeyboardListNavigation","onListItemSelected","onListItemNavigated","keepFocusAfterSelection","initialIndex","preventTabOnEnteredValue","activeItemIndex","setActiveItemIndex","calculateActiveIndex","resetActiveIndex","preventDefaultAndStopPropagation","onArrowPressed","nextActiveIndex","selectedItem","onBackspaceKeyPressed","onEnterKeyPressed","onTabKeyPressed","eventsForKeyPressed","ArrowDown","Tab","ArrowUp","Enter","Backspace","onKeyboardNavigation","currentElement","InternalList","adjustedItemPadding","SCROLL_TRIGGER_MARGIN","useInfiniteScroll","callbackOnMount","scrollTriggerMargin","isAtBottom","scrollTop","onScroll","innerRef","listElement","ExpansionPanel","anyChildren","hasHeaderDivider","handleOpen","handleToggleOpen","headerProps","headerContent","dragHandle","isChildrenVisible","rootClassName","isDragHandle","onToggleOpen","setChildrenVisible","isOpenRef","wrapper","onTransitionEnd","Flag","flagColor","MAX_HEADING_LEVEL","DEFAULT_TYPOGRAPHY_BY_LEVEL","h1","h2","h3","h4","h5","h6","defaultContext","headingElement","getHeadingProps","contextHeadingElement","computedHeadingElement","HeadingLevelContext","useHeadingLevel","Heading","headingProps","computeHeadingLevel","levelProp","parentLevel","nextLevel","contextLevel","Grid","gutter","GridItem","order","GridColumn","maxColumns","itemMinWidth","isInteger","ImageBlockCaptionPosition","below","over","captionPosition","ImageBlock","captionStyle","descriptionProps","fillHeight","tags","titleProps","ImageCaption","baseClassName","wrapperProps","titleColor","baseColor","dangerouslySetInnerHTML","useSizeOnWindowResize","elementRef","setSize","updateSize","throttle","newSize","getBoundingClientRect","useImageSize","imgRef","getInitialSize","imageSize","setImageSize","img","onLoad","naturalWidth","naturalHeight","isEqual","obj1","obj2","keys1","keys2","key1","usePointerZoom","scrollAreaRef","onScaleChange","animateScroll","isPointerZooming","setPointerZooming","scrollArea","animationFrame","zoomStateTimeoutId","updateScaleOnNextFrame","newScale","mousePosition","cancelAnimationFrame","nextFrame","onWheel","exp","deltaY","clientX","clientY","activePointers","prevDistance","previousCenterPoint","onPointerDown","pointerId","onPointerMove","pointers","centerPoint","deltaCenterPoint","scrollBy","pointer1","pointer2","distance","hypot","delta","absDelta","onPointerUp","passive","isMultiTouch","maxTouchPoints","useAnimateScroll","animate","initialScrollAreaSize","clientHeightRatio","clientWidthRatio","clientWidth","initialScrollHeight","initialScrollWidth","heightCenter","heightRatio","widthCenter","scrollLeft","widthRatio","prevScrollHeight","prevScrollWidth","scrollTo","ImageSlide","memo","scale","propImgRef","imgProps","loadingPlaceholderImageRef","scrollAreaSize","parseInt","scaledImageSize","horizontalScale","verticalScale","baseScale","isScrollable","SlideshowItem","transition","ImageSlideshow","activeImageIndex","images","slideGroupLabel","zoomInButtonProps","zoomOutButtonProps","slideshowControlsProps","currentPaginationItemRef","footerRef","activeImageRef","activeIndex","slideshowId","setSlideshow","slideshowSlidesId","slidesCount","onNextClick","onPaginationClick","onPreviousClick","toggleAutoPlay","SlideshowControls","useSlideshowControls","itemsCount","metadata","slideShowControls","paginationItemProps","setScale","zoomEnabled","prevScale","zoomIn","zoomOut","zoomControls","mdiMagnifyPlusOutline","mdiMagnifyMinusOutline","getImgRef","memoize","Slides","slidesId","imageProps","setupViewTransitionName","originalName","viewTransitionName","unset","startViewTransition","changes","prefersReducedMotion","flushSync","ReactDOM","source","sourceTransitionName","targetTransitionName","updateCallbackDone","findImage","EMPTY_PROPS","createRef","useImageLightbox","propsRef","imageRefsRef","currentImageRef","imageLightboxProps","setImageLightboxProps","getTriggerProps","triggerImageRefs","currentImage","currentIndex","imageRef","prevProps","triggerElement","triggerImage","idx","Inner","closeButtonProps","propImageRef","clickAwayChildrenRefs","onClickAway","targetElement","MouseEvent","Lightbox","ImageLightbox","InlineList","rest","propAriaLabelledBy","ariaLabelledBy","propAriaLabel","childrenRef","closeButtonRef","Link","titleHeading","LinkPreview","link","TitleHeading","adjustedSize","_ListItem","onItemSelected","Action","ListSubheader","MenuButton","MenuProvider","MenuTrigger","MenuPopover","MenuList","triggerProps","extraTriggerProps","triggerChildren","mdiDotsVertical","MENU_ITEM_SELECTOR","getItemText","getItems","menu","moveFocusAfterTrigger","allFocusable","triggerIdx","setupMenu","menuId","handleAbort","triggerAbort","menuAbort","openAndGoTo","setOpen","handleTypeaheadInMenu","needsManualActivation","tagName","registerMenu","MenuContext","useMenuContext","triggerId","unsubscribe","Trigger","useMenuEvent","useMenuOpen","TriggerComp","ariaLabelledby","TRIGGER_COMPONENTS","MenuItem","actionRef","afterIcon","defaultPrevented","mergedBefore","mergedAfter","Message","customIcon","closeButtonLabel","isCloseButtonDisplayed","Mosaic","thumbnails","onImageClick","take","thumbnail","NavigationContext","ITEM_COMPONENT_NAME","ITEM_CLASSNAME","sectionBlock","itemBlock","itemElement","NavigationSection","buttonRef","sectionId","isDropdown","NavigationItem","isCurrentPage","Navigation","Item","NOTIFICATION_CONFIGURATION","Notification","actionLabel","onActionClick","NOTIFICATION_TRANSITION_DURATION","hasAction","handleCallback","PostBlock","attachments","author","meta","ThumbnailVariant","rounded","ProgressLinear","ProgressLinearUI","display","circleProps","svgProps","cx","cy","r","ProgressCircularUI","strokeWidth","ProgressVariant","circular","Progress","INIT_STATE","isLazy","shouldActivateOnFocus","activeTabIndex","ids","tab","tabPanel","reducer","payload","tabIds","tabPanelIds","TabProviderContext","useTabProviderContext","originalId","dispatch","tabId","tabPanelId","changeToTab","useTabProviderContextState","ProgressTrackerProvider","propState","useReducer","activeStepIndex","ProgressTracker","stepListRef","numberOfSteps","backgroundPosition","trackPosition","right","transform","ProgressTrackerStep","propIsActive","isComplete","changeToCurrentTab","getIcon","mdiRadioboxMarked","mdiRadioboxBlank","ProgressTrackerStepPanel","RadioButton","RadioGroup","useListenFocus","WithSelectContext","SelectElement","isMultiple","onDropdownClose","onInputClick","generatedSelectId","selectId","selectRef","dropdownRef","SelectVariant","selectedValueRender","SelectField","hasInputClear","selectElementRef","mdiMenuDown","Select","lodashIsEmpty","SelectMultipleField","val","SelectMultiple","findOptionById","toggleSelection","currentValue","selectedOptionId","newOption","currentArray","existingIndex","updated","getOptionDisplayName","renderSelectOptions","components","getOptionDescription","renderOption","selected","getSectionId","renderSectionTitle","sectionOptions","sectionLabel","selectedIds","selectionType","SelectButton","InfiniteScroll","listProps","handleSelect","listStatus","translations","onLoadMore","infiniteScrollOptions","isFullLoading","isLoadingMore","isError","isMultiselectable","displayValue","wrapRenderOption","optionValue","DefaultButton","setListElement","wrappedRenderOption","selectedOption","buttonAs","rootMargin","_SelectButton","SelectTextField","beforeOptions","afterOptions","onSearch","searchInputValue","externalSearchValue","hasClearButton","externalOnBlur","externalOnClear","consumerInputProps","isSearching","setIsSearching","setSearchText","handleInputChange","showClear","chipGroupLabel","clearLabel","showSuggestionsLabel","_SelectTextField","SideNavigation","SideNavigationItem","hasContent","shouldSplitActions","showChildren","contentId","ariaProps","SkeletonCircle","SkeletonRectangleVariant","squared","pill","SkeletonRectangle","UI_DEFAULT_PROPS","precision","steps","computeValueFromPercent","percent","toFixed","computePercentFromValue","Slider","hideMinMaxLabel","onMouseDown","sliderId","sliderLabelId","sliderRef","availableSteps","available","percentStep","ptr","findClosestStep","percentValue","acc","aDst","dst","Infinity","getPercentValue","slider","pageX","pageXOffset","handleMove","handleEnd","hopToValue","previous","oldPercent","handleMouseDown","percentString","background","useInterval","savedCallback","tick","setInterval","clearInterval","AUTOPLAY_DEFAULT_INTERVAL","FULL_WIDTH_PERCENT","EDGE_FROM_ACTIVE_INDEX","PAGINATION_ITEMS_MAX","PAGINATION_ITEM_SIZE","SlideMode","transformTranslate","scrollSnap","DEFAULT_OPTIONS","groupBy","interval","autoPlay","defaultActiveIndex","setCurrentIndex","setElement","goToNextSlide","loopback","goToPreviousSlide","isAutoPlaying","setIsAutoPlaying","isForcePaused","setIsForcePaused","isSlideshowAutoPlaying","startAutoPlay","stopAutoPlay","generatedSlideshowId","generatedSlidesId","toggleForcePause","shouldBePaused","startIndexVisible","endIndexVisible","slideshow","setActiveIndex","useFocusWithin","onFocusIn","onFocusOut","isScrollSnapSupported","supports","BLOCKED_FOCUS_CLASSNAME","useSlideFocusManagement","isSlideDisplayed","slideRef","enableSlide","focusableElement","classList","remove","blockSlide","handleDisplay","mutationsList","buildSlideShowGroupId","SlideshowItemGroup","isDisplayed","groupRef","slideMode","Slideshow","showControls","isScrollsnapEnabled","hasControls","afterSlides","playButtonProps","isTouchDevice","useSwipeNavigate","onNext","onPrevious","detectHorizontalSwipe","swipe","usePaginationVisibleRange","slideCount","previousVisibleRangeRef","lastSlide","previousVisibleRange","newVisibleRange","deltaItems","InternalSlideshowControls","paginationProps","paginationItemLabel","parent","paginationRef","visibleRange","wrapperStyle","range","isOnEdge","isOutRange","itemClassName","mdiPauseCircleOutline","mdiPlayCircleOutline","useSlideshowControlsDefaultOptions","onScrollEnd","handleScroll","useSlideScroll","isAutoScrollRef","isFromScrollRef","newScrollLeft","offsetLeft","offsetParent","clientLeft","behavior","newIndex","round","isScrollSnapEnabled","childrenArray","chunk","Switch","Table","hasBefore","hasDividers","TABLE_CLASSNAME","TableBody","ThOrder","asc","desc","TableCellVariant","head","TableCell","isSortable","sortOrder","ariaSort","mdiArrowUp","mdiArrowDown","onHeaderClick","TableHeader","TableRow","tabIndexProps","_ariaDisabled","TabProvider","queueMicrotask","TABS_CLASSNAME","TabListLayout","layout","fixed","TabList","tabListRef","iconProps","keyPressProp","tabState","_isLazy","TabPanel","getImageLoadingState","complete","getImageSize","focusPoint","isLoaded","shiftPosition","containerSize","scaledSize","scaledFocusHeight","startFocus","floor","calculateFocusPointStyle","visibility","heightScale","widthScale","focusPointFromTop","focusPointFromLeft","objectPosition","mdiImageBroken","loading","crossOrigin","focusPointStyle","isLoadingProp","objectFit","loadingState","hasIconErrorFallback","hasCustomErrorFallback","imageErrorStyle","isLink","loadingPlaceholderImage","loadingStyle","backgroundImage","innerImage","useImageLoad","imageURL","setState","useFocusPointStyle","setContainerSize","updateContainerSize","cWidth","cHeight","offsetHeight","oldContainerSize","imgElement","setImgElement","ThumbnailAspectRatio","ThumbnailObjectFit","cover","contain","boundsMode","TimePickerField","handleSearch","fowardedProps","outOfRange","formatTime","toLocaleTimeString","hour","minute","getDateAtTime","setHours","timeOfDayMinutes","getHours","getMinutes","MINUTES_IN_HOUR","MINUTES_IN_DAY","buildTimeList","minTime","maxTime","minMinutes","maxMinutes","minutes","RE_TIME","parseTimeInput","raw","rawHour","rawMinute","ampm","isPm","snapTimeToBounds","time","totalMinutes","isDateOnTime","timeList","searchValue","timeOfDay","clamped","parsed","TOOLBAR_NAME","UploaderVariant","circle","Uploader","fileInputProps","isDragHovering","adjustedAspectRatio","unsetDragHovering","setDragHovering","fileList","files","onDragEnter","onDragLeave","onDrop","isUserBlockClickeable","UserBlock","fields","multipleActions","mouseEnterProp","mouseLeaveProp","nameProps","handleMouseEnter","handleMouseLeave","simpleAction","additionalFields","componentSize","shouldDisplayActions","shouldDisplayFields","fieldsBlock","field","eventHandlers","nameBlock","NameComponent","nProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAIA,CAAC,GAAG,CAAC;;AAET;AACA;AACA;AACA;AACA;AACO,SAASC,KAAKA,GAAG;AACpB,EAAA,OAAOC,cAAK,CAACC,OAAO,CAAC,MAAM;AACvBH,IAAAA,CAAC,IAAI,CAAC;IACN,OAAO,CAAA,KAAA,EAAQA,CAAC,CAAA,CAAA,CAAG;EACvB,CAAC,EAAE,EAAE,CAAC;AACV;;ACPA;AACA;AACA;AACO,MAAMI,UAAU,GAAGF,cAAK,CAACE,UAAwB;;ACVxD;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACO,MAAMC,mBAAmB,GAAG;AAC/BC,EAAAA,IAAI,EAAE,GAAG;AACTC,EAAAA,KAAK,EAAE;AACX,CAAC;;AAED;AACA;AACA;AACA;AACO,MAAMC,wBAAwB,GAAG;AACpCF,EAAAA,IAAI,EAAE,GAAG;AACTC,EAAAA,KAAK,EAAE;AACX,CAAC;;ACvBD;AACA;AACA;AACO,MAAME,SAAS,GAAG;AACrBC,EAGAC,IAAI,EAAE,MAOV,CAAU;AAKH,MAAMC,KAAK,GAAG;AACjBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,IAAI,EAAE;AACV,CAAU;AAGH,MAAMC,IAAI,GAAG;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,CAAC,EAAE,GAAG;AACNC,EAAAA,CAAC,EAAE,GAAG;AACNC,EAAAA,CAAC,EAAE,GAAG;AACNC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,MAAM,EAAE,QAAQ;A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