@lumx/react 3.20.1-alpha.20 → 3.20.1-alpha.21
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/Falsy.d.ts +7 -0
- package/_internal/index.js +236 -0
- package/_internal/index.js.map +1 -0
- package/index.d.ts +352 -7
- package/index.js +14486 -65
- package/index.js.map +1 -1
- package/package.json +11 -4
- package/src/components/alert-dialog/AlertDialog.stories.tsx +127 -0
- package/src/components/alert-dialog/AlertDialog.test.tsx +34 -0
- package/src/components/alert-dialog/AlertDialog.tsx +189 -0
- package/src/components/alert-dialog/index.ts +1 -0
- package/src/components/autocomplete/Autocomplete.stories.tsx +75 -0
- package/src/components/autocomplete/Autocomplete.test.tsx +99 -0
- package/src/components/autocomplete/Autocomplete.tsx +294 -0
- package/src/components/autocomplete/AutocompleteMultiple.stories.tsx +167 -0
- package/src/components/autocomplete/AutocompleteMultiple.test.tsx +61 -0
- package/src/components/autocomplete/AutocompleteMultiple.tsx +156 -0
- package/src/components/autocomplete/__mockData__/index.ts +39 -0
- package/src/components/autocomplete/index.ts +2 -0
- package/src/components/avatar/Avatar.stories.tsx +119 -0
- package/src/components/avatar/Avatar.test.tsx +32 -0
- package/src/components/avatar/Avatar.tsx +114 -0
- package/src/components/avatar/index.ts +1 -0
- package/src/components/badge/Badge.stories.tsx +69 -0
- package/src/components/badge/Badge.test.tsx +45 -0
- package/src/components/badge/Badge.tsx +58 -0
- package/src/components/badge/BadgeWrapper.stories.tsx +75 -0
- package/src/components/badge/BadgeWrapper.test.tsx +47 -0
- package/src/components/badge/BadgeWrapper.tsx +37 -0
- package/src/components/badge/index.ts +2 -0
- package/src/components/button/Button.stories.tsx +355 -0
- package/src/components/button/Button.test.tsx +125 -0
- package/src/components/button/Button.tsx +101 -0
- package/src/components/button/ButtonGroup.stories.tsx +52 -0
- package/src/components/button/ButtonGroup.test.tsx +41 -0
- package/src/components/button/ButtonGroup.tsx +50 -0
- package/src/components/button/ButtonRoot.tsx +163 -0
- package/src/components/button/IconButton.stories.tsx +52 -0
- package/src/components/button/IconButton.test.tsx +66 -0
- package/src/components/button/IconButton.tsx +91 -0
- package/src/components/button/index.ts +4 -0
- package/src/components/checkbox/Checkbox.stories.tsx +64 -0
- package/src/components/checkbox/Checkbox.test.tsx +154 -0
- package/src/components/checkbox/Checkbox.tsx +164 -0
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/chip/Chip.stories.tsx +164 -0
- package/src/components/chip/Chip.test.tsx +243 -0
- package/src/components/chip/Chip.tsx +168 -0
- package/src/components/chip/ChipGroup.stories.tsx +47 -0
- package/src/components/chip/ChipGroup.test.tsx +37 -0
- package/src/components/chip/ChipGroup.tsx +60 -0
- package/src/components/chip/index.ts +2 -0
- package/src/components/comment-block/CommentBlock.stories.tsx +91 -0
- package/src/components/comment-block/CommentBlock.test.tsx +28 -0
- package/src/components/comment-block/CommentBlock.tsx +172 -0
- package/src/components/comment-block/index.ts +1 -0
- package/src/components/date-picker/DatePicker.stories.tsx +118 -0
- package/src/components/date-picker/DatePicker.test.tsx +34 -0
- package/src/components/date-picker/DatePicker.tsx +52 -0
- package/src/components/date-picker/DatePickerControlled.test.tsx +91 -0
- package/src/components/date-picker/DatePickerControlled.tsx +259 -0
- package/src/components/date-picker/DatePickerField.stories.tsx +100 -0
- package/src/components/date-picker/DatePickerField.test.tsx +70 -0
- package/src/components/date-picker/DatePickerField.tsx +135 -0
- package/src/components/date-picker/constants.ts +11 -0
- package/src/components/date-picker/index.ts +4 -0
- package/src/components/date-picker/types.ts +28 -0
- package/src/components/dialog/Dialog.stories.tsx +318 -0
- package/src/components/dialog/Dialog.test.tsx +97 -0
- package/src/components/dialog/Dialog.tsx +288 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/divider/Divider.test.tsx +51 -0
- package/src/components/divider/Divider.tsx +50 -0
- package/src/components/divider/index.ts +1 -0
- package/src/components/drag-handle/DragHandle.test.tsx +36 -0
- package/src/components/drag-handle/DragHandle.tsx +51 -0
- package/src/components/drag-handle/index.ts +1 -0
- package/src/components/dropdown/Dropdown.stories.tsx +31 -0
- package/src/components/dropdown/Dropdown.test.tsx +66 -0
- package/src/components/dropdown/Dropdown.tsx +186 -0
- package/src/components/dropdown/index.ts +1 -0
- package/src/components/expansion-panel/ExpansionPanel.stories.tsx +91 -0
- package/src/components/expansion-panel/ExpansionPanel.test.tsx +185 -0
- package/src/components/expansion-panel/ExpansionPanel.tsx +195 -0
- package/src/components/expansion-panel/index.ts +1 -0
- package/src/components/flag/Flag.stories.tsx +48 -0
- package/src/components/flag/Flag.test.tsx +62 -0
- package/src/components/flag/Flag.tsx +52 -0
- package/src/components/flag/index.ts +1 -0
- package/src/components/flex-box/FlexBox.stories.tsx +156 -0
- package/src/components/flex-box/FlexBox.test.tsx +24 -0
- package/src/components/flex-box/FlexBox.tsx +100 -0
- package/src/components/flex-box/index.ts +1 -0
- package/src/components/generic-block/GenericBlock.stories.jsx +128 -0
- package/src/components/generic-block/GenericBlock.test.tsx +156 -0
- package/src/components/generic-block/GenericBlock.tsx +225 -0
- package/src/components/generic-block/constants.ts +9 -0
- package/src/components/generic-block/index.ts +2 -0
- package/src/components/grid/Grid.tsx +83 -0
- package/src/components/grid/GridItem.tsx +55 -0
- package/src/components/grid/index.ts +2 -0
- package/src/components/grid-column/GridColumn.stories.tsx +45 -0
- package/src/components/grid-column/GridColumn.test.jsx +56 -0
- package/src/components/grid-column/GridColumn.tsx +83 -0
- package/src/components/grid-column/index.ts +1 -0
- package/src/components/heading/Heading.stories.tsx +69 -0
- package/src/components/heading/Heading.test.tsx +82 -0
- package/src/components/heading/Heading.tsx +65 -0
- package/src/components/heading/HeadingLevelProvider.tsx +30 -0
- package/src/components/heading/constants.ts +16 -0
- package/src/components/heading/context.tsx +13 -0
- package/src/components/heading/index.ts +3 -0
- package/src/components/heading/useHeadingLevel.tsx +8 -0
- package/src/components/icon/Icon.stories.tsx +73 -0
- package/src/components/icon/Icon.test.tsx +125 -0
- package/src/components/icon/Icon.tsx +133 -0
- package/src/components/icon/index.ts +1 -0
- package/src/components/image-block/ImageBlock.stories.tsx +117 -0
- package/src/components/image-block/ImageBlock.test.tsx +58 -0
- package/src/components/image-block/ImageBlock.tsx +142 -0
- package/src/components/image-block/ImageCaption.tsx +115 -0
- package/src/components/image-block/index.ts +1 -0
- package/src/components/image-lightbox/ImageLightbox.stories.tsx +160 -0
- package/src/components/image-lightbox/ImageLightbox.test.tsx +254 -0
- package/src/components/image-lightbox/ImageLightbox.tsx +90 -0
- package/src/components/image-lightbox/constants.ts +11 -0
- package/src/components/image-lightbox/index.ts +2 -0
- package/src/components/image-lightbox/internal/ImageSlide.tsx +107 -0
- package/src/components/image-lightbox/internal/ImageSlideshow.tsx +164 -0
- package/src/components/image-lightbox/internal/useAnimateScroll.ts +55 -0
- package/src/components/image-lightbox/internal/usePointerZoom.ts +148 -0
- package/src/components/image-lightbox/types.ts +48 -0
- package/src/components/image-lightbox/useImageLightbox.tsx +141 -0
- package/src/components/inline-list/InlineList.stories.tsx +77 -0
- package/src/components/inline-list/InlineList.test.tsx +52 -0
- package/src/components/inline-list/InlineList.tsx +96 -0
- package/src/components/inline-list/index.ts +1 -0
- package/src/components/input-helper/InputHelper.stories.tsx +35 -0
- package/src/components/input-helper/InputHelper.test.tsx +55 -0
- package/src/components/input-helper/InputHelper.tsx +65 -0
- package/src/components/input-helper/constants.ts +11 -0
- package/src/components/input-helper/index.ts +1 -0
- package/src/components/input-label/InputLabel.stories.tsx +45 -0
- package/src/components/input-label/InputLabel.test.tsx +59 -0
- package/src/components/input-label/InputLabel.tsx +69 -0
- package/src/components/input-label/index.ts +1 -0
- package/src/components/lightbox/Lightbox.stories.tsx +101 -0
- package/src/components/lightbox/Lightbox.test.tsx +53 -0
- package/src/components/lightbox/Lightbox.tsx +180 -0
- package/src/components/lightbox/index.ts +1 -0
- package/src/components/link/Link.stories.tsx +195 -0
- package/src/components/link/Link.test.tsx +127 -0
- package/src/components/link/Link.tsx +106 -0
- package/src/components/link/index.ts +1 -0
- package/src/components/link-preview/LinkPreview.stories.tsx +61 -0
- package/src/components/link-preview/LinkPreview.test.tsx +105 -0
- package/src/components/link-preview/LinkPreview.tsx +158 -0
- package/src/components/link-preview/index.ts +1 -0
- package/src/components/list/List.stories.tsx +116 -0
- package/src/components/list/List.test.tsx +18 -0
- package/src/components/list/List.tsx +104 -0
- package/src/components/list/ListDivider.stories.tsx +12 -0
- package/src/components/list/ListDivider.test.tsx +22 -0
- package/src/components/list/ListDivider.tsx +35 -0
- package/src/components/list/ListItem.stories.tsx +66 -0
- package/src/components/list/ListItem.test.tsx +93 -0
- package/src/components/list/ListItem.tsx +157 -0
- package/src/components/list/ListSubheader.stories.tsx +11 -0
- package/src/components/list/ListSubheader.test.tsx +21 -0
- package/src/components/list/ListSubheader.tsx +44 -0
- package/src/components/list/index.ts +4 -0
- package/src/components/list/useInteractiveList.tsx +202 -0
- package/src/components/message/Message.stories.tsx +72 -0
- package/src/components/message/Message.test.tsx +76 -0
- package/src/components/message/Message.tsx +100 -0
- package/src/components/message/index.ts +1 -0
- package/src/components/mosaic/Mosaic.stories.tsx +89 -0
- package/src/components/mosaic/Mosaic.test.tsx +77 -0
- package/src/components/mosaic/Mosaic.tsx +98 -0
- package/src/components/mosaic/index.ts +1 -0
- package/src/components/navigation/Navigation.stories.tsx +234 -0
- package/src/components/navigation/Navigation.test.tsx +65 -0
- package/src/components/navigation/Navigation.tsx +79 -0
- package/src/components/navigation/NavigationItem.test.tsx +35 -0
- package/src/components/navigation/NavigationItem.tsx +82 -0
- package/src/components/navigation/NavigationSection.test.tsx +137 -0
- package/src/components/navigation/NavigationSection.tsx +108 -0
- package/src/components/navigation/context.tsx +7 -0
- package/src/components/navigation/index.ts +1 -0
- package/src/components/notification/Notification.test.tsx +94 -0
- package/src/components/notification/Notification.tsx +138 -0
- package/src/components/notification/Notifications.stories.tsx +92 -0
- package/src/components/notification/constants.ts +28 -0
- package/src/components/notification/index.ts +1 -0
- package/src/components/popover/Popover.stories.tsx +264 -0
- package/src/components/popover/Popover.test.tsx +62 -0
- package/src/components/popover/Popover.tsx +201 -0
- package/src/components/popover/constants.ts +62 -0
- package/src/components/popover/index.ts +3 -0
- package/src/components/popover/usePopoverStyle.tsx +184 -0
- package/src/components/popover/useRestoreFocusOnClose.tsx +47 -0
- package/src/components/popover-dialog/PopoverDialog.stories.tsx +64 -0
- package/src/components/popover-dialog/PopoverDialog.test.tsx +139 -0
- package/src/components/popover-dialog/PopoverDialog.tsx +74 -0
- package/src/components/popover-dialog/index.tsx +1 -0
- package/src/components/post-block/PostBlock.test.tsx +27 -0
- package/src/components/post-block/PostBlock.tsx +122 -0
- package/src/components/post-block/index.ts +1 -0
- package/src/components/progress/Progress.tsx +68 -0
- package/src/components/progress/ProgressCircular.stories.tsx +43 -0
- package/src/components/progress/ProgressCircular.test.tsx +46 -0
- package/src/components/progress/ProgressCircular.tsx +82 -0
- package/src/components/progress/ProgressLinear.stories.tsx +12 -0
- package/src/components/progress/ProgressLinear.test.tsx +30 -0
- package/src/components/progress/ProgressLinear.tsx +50 -0
- package/src/components/progress/index.ts +3 -0
- package/src/components/progress-tracker/ProgressTracker.stories.tsx +145 -0
- package/src/components/progress-tracker/ProgressTracker.test.tsx +42 -0
- package/src/components/progress-tracker/ProgressTracker.tsx +87 -0
- package/src/components/progress-tracker/ProgressTrackerProvider.test.tsx +65 -0
- package/src/components/progress-tracker/ProgressTrackerProvider.tsx +67 -0
- package/src/components/progress-tracker/ProgressTrackerStep.test.tsx +36 -0
- package/src/components/progress-tracker/ProgressTrackerStep.tsx +159 -0
- package/src/components/progress-tracker/ProgressTrackerStepPanel.test.tsx +34 -0
- package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +67 -0
- package/src/components/progress-tracker/index.ts +4 -0
- package/src/components/radio-button/RadioButton.stories.tsx +71 -0
- package/src/components/radio-button/RadioButton.test.tsx +143 -0
- package/src/components/radio-button/RadioButton.tsx +143 -0
- package/src/components/radio-button/RadioGroup.stories.tsx +39 -0
- package/src/components/radio-button/RadioGroup.test.tsx +29 -0
- package/src/components/radio-button/RadioGroup.tsx +44 -0
- package/src/components/radio-button/index.ts +2 -0
- package/src/components/select/Select.stories.tsx +385 -0
- package/src/components/select/Select.test.tsx +199 -0
- package/src/components/select/Select.tsx +199 -0
- package/src/components/select/SelectMultiple.stories.tsx +315 -0
- package/src/components/select/SelectMultiple.test.tsx +213 -0
- package/src/components/select/SelectMultiple.tsx +206 -0
- package/src/components/select/WithSelectContext.tsx +147 -0
- package/src/components/select/constants.ts +55 -0
- package/src/components/select/index.ts +2 -0
- package/src/components/side-navigation/SideNavigation.stories.tsx +191 -0
- package/src/components/side-navigation/SideNavigation.test.tsx +37 -0
- package/src/components/side-navigation/SideNavigation.tsx +52 -0
- package/src/components/side-navigation/SideNavigationItem.stories.tsx +133 -0
- package/src/components/side-navigation/SideNavigationItem.test.tsx +136 -0
- package/src/components/side-navigation/SideNavigationItem.tsx +165 -0
- package/src/components/side-navigation/index.ts +2 -0
- package/src/components/skeleton/SkeletonCircle.stories.tsx +41 -0
- package/src/components/skeleton/SkeletonCircle.test.tsx +27 -0
- package/src/components/skeleton/SkeletonCircle.tsx +52 -0
- package/src/components/skeleton/SkeletonRectangle.stories.tsx +82 -0
- package/src/components/skeleton/SkeletonRectangle.test.tsx +27 -0
- package/src/components/skeleton/SkeletonRectangle.tsx +88 -0
- package/src/components/skeleton/SkeletonTypography.stories.tsx +19 -0
- package/src/components/skeleton/SkeletonTypography.test.tsx +27 -0
- package/src/components/skeleton/SkeletonTypography.tsx +59 -0
- package/src/components/skeleton/index.ts +3 -0
- package/src/components/slider/Slider.stories.tsx +45 -0
- package/src/components/slider/Slider.test.tsx +29 -0
- package/src/components/slider/Slider.tsx +299 -0
- package/src/components/slider/index.ts +2 -0
- package/src/components/slideshow/Slides.tsx +130 -0
- package/src/components/slideshow/Slideshow.stories.tsx +179 -0
- package/src/components/slideshow/Slideshow.test.tsx +35 -0
- package/src/components/slideshow/Slideshow.tsx +173 -0
- package/src/components/slideshow/SlideshowControls.stories.tsx +100 -0
- package/src/components/slideshow/SlideshowControls.tsx +243 -0
- package/src/components/slideshow/SlideshowItem.tsx +44 -0
- package/src/components/slideshow/SlideshowItemGroup.tsx +60 -0
- package/src/components/slideshow/constants.ts +24 -0
- package/src/components/slideshow/index.ts +4 -0
- package/src/components/slideshow/useKeyNavigate.ts +28 -0
- package/src/components/slideshow/usePaginationVisibleRange.ts +37 -0
- package/src/components/slideshow/useSlideFocusManagement.tsx +92 -0
- package/src/components/slideshow/useSwipeNavigate.ts +18 -0
- package/src/components/switch/Switch.stories.tsx +49 -0
- package/src/components/switch/Switch.test.tsx +144 -0
- package/src/components/switch/Switch.tsx +145 -0
- package/src/components/switch/index.ts +1 -0
- package/src/components/table/Table.test.tsx +29 -0
- package/src/components/table/Table.tsx +59 -0
- package/src/components/table/TableBody.test.tsx +30 -0
- package/src/components/table/TableBody.tsx +42 -0
- package/src/components/table/TableCell.test.tsx +72 -0
- package/src/components/table/TableCell.tsx +130 -0
- package/src/components/table/TableHeader.test.tsx +30 -0
- package/src/components/table/TableHeader.tsx +48 -0
- package/src/components/table/TableRow.test.tsx +40 -0
- package/src/components/table/TableRow.tsx +71 -0
- package/src/components/table/index.ts +5 -0
- package/src/components/tabs/Tab.test.tsx +50 -0
- package/src/components/tabs/Tab.tsx +133 -0
- package/src/components/tabs/TabList.test.tsx +49 -0
- package/src/components/tabs/TabList.tsx +94 -0
- package/src/components/tabs/TabPanel.test.tsx +37 -0
- package/src/components/tabs/TabPanel.tsx +67 -0
- package/src/components/tabs/TabProvider.test.tsx +161 -0
- package/src/components/tabs/TabProvider.tsx +67 -0
- package/src/components/tabs/Tabs.stories.tsx +170 -0
- package/src/components/tabs/index.ts +4 -0
- package/src/components/tabs/state.ts +114 -0
- package/src/components/tabs/test-utils.ts +39 -0
- package/src/components/text/Text.stories.tsx +177 -0
- package/src/components/text/Text.test.tsx +92 -0
- package/src/components/text/Text.tsx +139 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text-field/TextField.stories.tsx +180 -0
- package/src/components/text-field/TextField.test.tsx +298 -0
- package/src/components/text-field/TextField.tsx +493 -0
- package/src/components/text-field/index.ts +1 -0
- package/src/components/thumbnail/Thumbnail.stories.tsx +448 -0
- package/src/components/thumbnail/Thumbnail.test.tsx +88 -0
- package/src/components/thumbnail/Thumbnail.tsx +248 -0
- package/src/components/thumbnail/index.ts +3 -0
- package/src/components/thumbnail/types.ts +48 -0
- package/src/components/thumbnail/useFocusPointStyle.test.ts +92 -0
- package/src/components/thumbnail/useFocusPointStyle.tsx +107 -0
- package/src/components/thumbnail/useImageLoad.ts +40 -0
- package/src/components/toolbar/Toolbar.tsx +68 -0
- package/src/components/toolbar/index.ts +1 -0
- package/src/components/tooltip/Tooltip.stories.tsx +118 -0
- package/src/components/tooltip/Tooltip.test.tsx +417 -0
- package/src/components/tooltip/Tooltip.tsx +165 -0
- package/src/components/tooltip/constants.ts +8 -0
- package/src/components/tooltip/context.tsx +17 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/useInjectTooltipRef.tsx +55 -0
- package/src/components/tooltip/useTooltipOpen.tsx +143 -0
- package/src/components/uploader/Uploader.stories.tsx +109 -0
- package/src/components/uploader/Uploader.test.tsx +146 -0
- package/src/components/uploader/Uploader.tsx +177 -0
- package/src/components/uploader/index.ts +1 -0
- package/src/components/user-block/UserBlock.stories.tsx +133 -0
- package/src/components/user-block/UserBlock.test.tsx +106 -0
- package/src/components/user-block/UserBlock.tsx +193 -0
- package/src/components/user-block/index.ts +1 -0
- package/src/constants.ts +27 -0
- package/src/hooks/useBooleanState.tsx +13 -0
- package/src/hooks/useCallbackOnEscape.ts +34 -0
- package/src/hooks/useChipGroupNavigation.tsx +75 -0
- package/src/hooks/useClickAway.tsx +48 -0
- package/src/hooks/useDisableBodyScroll.ts +28 -0
- package/src/hooks/useEventCallback.tsx +17 -0
- package/src/hooks/useFocus.tsx +21 -0
- package/src/hooks/useFocusTrap.ts +93 -0
- package/src/hooks/useFocusWithin.ts +33 -0
- package/src/hooks/useId.test.tsx +22 -0
- package/src/hooks/useId.ts +15 -0
- package/src/hooks/useImageSize.ts +17 -0
- package/src/hooks/useInfiniteScroll.tsx +60 -0
- package/src/hooks/useIntersectionObserver.tsx +43 -0
- package/src/hooks/useInterval.tsx +31 -0
- package/src/hooks/useKeyboardListNavigation.tsx +204 -0
- package/src/hooks/useListenFocus.tsx +26 -0
- package/src/hooks/useOverflowTooltipLabel.tsx +32 -0
- package/src/hooks/usePopper.ts +12 -0
- package/src/hooks/usePreviousValue.ts +12 -0
- package/src/hooks/useRovingTabIndex.tsx +90 -0
- package/src/hooks/useSizeOnWindowResize.ts +30 -0
- package/src/hooks/useSlideshowControls.ts +246 -0
- package/src/hooks/useStopPropagation.ts +21 -0
- package/src/hooks/useTransitionVisibility.ts +48 -0
- package/src/index.ts +63 -0
- package/src/stories/controls/color.ts +7 -0
- package/src/stories/controls/element.ts +6 -0
- package/src/stories/controls/focusPoint.ts +1 -0
- package/src/stories/controls/icons.ts +126 -0
- package/src/stories/controls/image.ts +84 -0
- package/src/stories/controls/selectArgType.ts +8 -0
- package/src/stories/controls/theme.ts +3 -0
- package/src/stories/controls/typography.ts +5 -0
- package/src/stories/controls/withUndefined.ts +1 -0
- package/src/stories/decorators/withChromaticForceScreenSize.tsx +7 -0
- package/src/stories/decorators/withCombinations.tsx +132 -0
- package/src/stories/decorators/withNestedProps.tsx +22 -0
- package/src/stories/decorators/withResizableBox.tsx +21 -0
- package/src/stories/decorators/withThemedBackground.tsx +16 -0
- package/src/stories/decorators/withValueOnChange.tsx +18 -0
- package/src/stories/decorators/withWrapper.tsx +19 -0
- package/src/stories/generated/Autocomplete/Demos.stories.tsx +7 -0
- package/src/stories/generated/Avatar/Demos.stories.tsx +7 -0
- package/src/stories/generated/Badge/Demos.stories.tsx +9 -0
- package/src/stories/generated/Button/Demos.stories.tsx +11 -0
- package/src/stories/generated/Checkbox/Demos.stories.tsx +6 -0
- package/src/stories/generated/Chip/Demos.stories.tsx +11 -0
- package/src/stories/generated/CommentBlock/Demos.stories.tsx +8 -0
- package/src/stories/generated/DatePicker/Demos.stories.tsx +8 -0
- package/src/stories/generated/Dialog/Demos.stories.tsx +10 -0
- package/src/stories/generated/Divider/Demos.stories.tsx +6 -0
- package/src/stories/generated/Dropdown/Demos.stories.tsx +8 -0
- package/src/stories/generated/ExpansionPanel/Demos.stories.tsx +9 -0
- package/src/stories/generated/Flag/Demos.stories.tsx +6 -0
- package/src/stories/generated/GenericBlock/Demos.stories.tsx +8 -0
- package/src/stories/generated/Heading/Demos.stories.tsx +6 -0
- package/src/stories/generated/Icon/Demos.stories.tsx +8 -0
- package/src/stories/generated/ImageBlock/Demos.stories.tsx +9 -0
- package/src/stories/generated/ImageLightbox/Demos.stories.tsx +6 -0
- package/src/stories/generated/Lightbox/Demos.stories.tsx +6 -0
- package/src/stories/generated/LinkPreview/Demos.stories.tsx +7 -0
- package/src/stories/generated/List/Demos.stories.tsx +11 -0
- package/src/stories/generated/Message/Demos.stories.tsx +11 -0
- package/src/stories/generated/Mosaic/Demos.stories.tsx +10 -0
- package/src/stories/generated/Notification/Demos.stories.tsx +6 -0
- package/src/stories/generated/Popover/Demos.stories.tsx +11 -0
- package/src/stories/generated/PopoverDialog/Demos.stories.tsx +6 -0
- package/src/stories/generated/PostBlock/Demos.stories.tsx +6 -0
- package/src/stories/generated/Progress/Demos.stories.tsx +7 -0
- package/src/stories/generated/ProgressTracker/Demos.stories.tsx +9 -0
- package/src/stories/generated/RadioButton/Demos.stories.tsx +6 -0
- package/src/stories/generated/Select/Demos.stories.tsx +14 -0
- package/src/stories/generated/SideNavigation/Demos.stories.tsx +10 -0
- package/src/stories/generated/Skeleton/Demos.stories.tsx +9 -0
- package/src/stories/generated/Slider/Demos.stories.tsx +9 -0
- package/src/stories/generated/Slideshow/Demos.stories.tsx +8 -0
- package/src/stories/generated/Switch/Demos.stories.tsx +6 -0
- package/src/stories/generated/Table/Demos.stories.tsx +7 -0
- package/src/stories/generated/Tabs/Demos.stories.tsx +8 -0
- package/src/stories/generated/TextField/Demos.stories.tsx +20 -0
- package/src/stories/generated/Thumbnail/Demos.stories.tsx +12 -0
- package/src/stories/generated/Toolbar/Demos.stories.tsx +10 -0
- package/src/stories/generated/Tooltip/Demos.stories.tsx +8 -0
- package/src/stories/generated/Uploader/Demos.stories.tsx +8 -0
- package/src/stories/generated/UserBlock/Demos.stories.tsx +11 -0
- package/src/stories/utils/CustomLink.tsx +12 -0
- package/src/stories/utils/concatPath.tsx +17 -0
- package/src/stories/utils/disableArgTypes.ts +3 -0
- package/src/stories/utils/initDemoShadowDOMPortal.ts +10 -0
- package/src/stories/utils/lorem.ts +59 -0
- package/src/stories/utils/theming.tsx +166 -0
- package/src/stories/utils/toFlattenProps.ts +28 -0
- package/src/stories/utils/withCategory.ts +12 -0
- package/src/testing/utils/ThemeSentinel.tsx +10 -0
- package/src/testing/utils/commonTestsSuiteRTL.tsx +193 -0
- package/src/testing/utils/index.ts +1 -0
- package/src/testing/utils/queries.ts +19 -0
- package/src/untypped-modules.d.ts +9 -0
- package/src/utils/ClickAwayProvider/ClickAwayProvider.stories.jsx +70 -0
- package/src/utils/ClickAwayProvider/ClickAwayProvider.tsx +69 -0
- package/src/utils/ClickAwayProvider/index.ts +1 -0
- package/src/utils/MaterialThemeSwitcher/MaterialThemeSwitcher.tsx +54 -0
- package/src/utils/MaterialThemeSwitcher/index.ts +1 -0
- package/src/utils/Portal/Portal.test.tsx +31 -0
- package/src/utils/Portal/Portal.tsx +33 -0
- package/src/utils/Portal/PortalProvider.stories.jsx +22 -0
- package/src/utils/Portal/PortalProvider.test.tsx +72 -0
- package/src/utils/Portal/PortalProvider.tsx +24 -0
- package/src/utils/Portal/index.tsx +2 -0
- package/src/utils/browser/DOM/findImage.tsx +3 -0
- package/src/utils/browser/DOM/startViewTransition.ts +68 -0
- package/src/utils/browser/focus/constants.ts +7 -0
- package/src/utils/browser/focus/getFirstAndLastFocusable.test.ts +134 -0
- package/src/utils/browser/focus/getFirstAndLastFocusable.ts +21 -0
- package/src/utils/browser/focus/getFocusableElements.test.ts +151 -0
- package/src/utils/browser/focus/getFocusableElements.ts +7 -0
- package/src/utils/browser/isFocusVisible.ts +9 -0
- package/src/utils/browser/isHoverNotSupported.test.js +24 -0
- package/src/utils/browser/isHoverNotSupported.ts +2 -0
- package/src/utils/browser/isReducedMotion.ts +6 -0
- package/src/utils/date/addMonthResetDay.test.ts +13 -0
- package/src/utils/date/addMonthResetDay.ts +9 -0
- package/src/utils/date/formatDayNumber.test.ts +12 -0
- package/src/utils/date/formatDayNumber.ts +5 -0
- package/src/utils/date/getFirstDayOfWeek.test.ts +20 -0
- package/src/utils/date/getFirstDayOfWeek.ts +59 -0
- package/src/utils/date/getMonthCalendar.test.ts +127 -0
- package/src/utils/date/getMonthCalendar.ts +69 -0
- package/src/utils/date/getWeekDays.test.ts +48 -0
- package/src/utils/date/getWeekDays.ts +34 -0
- package/src/utils/date/getYearDisplayName.test.ts +20 -0
- package/src/utils/date/getYearDisplayName.ts +12 -0
- package/src/utils/date/isDateValid.test.ts +15 -0
- package/src/utils/date/isDateValid.ts +4 -0
- package/src/utils/date/isSameDay.test.ts +37 -0
- package/src/utils/date/isSameDay.ts +11 -0
- package/src/utils/disabled/DisabledStateContext.tsx +29 -0
- package/src/utils/disabled/DisabledStateProvider.stories.tsx +92 -0
- package/src/utils/disabled/index.ts +2 -0
- package/src/utils/disabled/useDisableStateProps.test.tsx +74 -0
- package/src/utils/disabled/useDisableStateProps.tsx +37 -0
- package/src/utils/function/makeListenerTowerContext.ts +32 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/locale/getCurrentLocale.ts +4 -0
- package/src/utils/locale/parseLocale.test.ts +17 -0
- package/src/utils/locale/parseLocale.ts +23 -0
- package/src/utils/locale/types.ts +8 -0
- package/src/utils/number/clamp.ts +17 -0
- package/src/utils/object/isEqual.test.ts +25 -0
- package/src/utils/object/isEqual.ts +11 -0
- package/src/utils/partitionMulti.test.ts +27 -0
- package/{_internal/partitionMulti-4daccdd5.js → src/utils/partitionMulti.ts} +9 -5
- package/src/utils/react/OnBeforeUnmount.tsx +20 -0
- package/src/utils/react/RawClickable.test.tsx +153 -0
- package/src/utils/react/RawClickable.tsx +65 -0
- package/src/utils/react/flattenChildren.ts +32 -0
- package/src/utils/react/forwardRef.ts +11 -0
- package/src/utils/react/forwardRefPolymorphic.ts +9 -0
- package/src/utils/react/mergeRefs.ts +33 -0
- package/src/utils/react/renderLink.tsx +17 -0
- package/src/utils/react/skipRender.tsx +18 -0
- package/src/utils/react/unref.ts +7 -0
- package/src/utils/react/wrapChildrenIconWithSpaces.test.tsx +37 -0
- package/src/utils/react/wrapChildrenIconWithSpaces.tsx +22 -0
- package/src/utils/theme/ThemeContext.ts +16 -0
- package/src/utils/theme/invertTheme.ts +4 -0
- package/src/utils/type/Comp.ts +14 -0
- package/src/utils/type/ComponentRef.ts +16 -0
- package/src/utils/type/HasAriaDisabled.ts +6 -0
- package/src/utils/type/HasPolymorphicAs.ts +6 -0
- package/src/utils/type/HasRequiredLinkHref.ts +1 -0
- package/src/utils/type/MaybeElementOrRef.ts +6 -0
- package/src/utils/type/index.ts +9 -0
- package/src/utils/type/isComponent.ts +33 -0
- package/src/utils/type/isComponentType.ts +9 -0
- package/utils/index.d.ts +1 -1
- package/utils/index.js +1 -3
- package/utils/index.js.map +1 -1
- package/_internal/Button-1f227024.js +0 -98
- package/_internal/Button-1f227024.js.map +0 -1
- package/_internal/ButtonRoot-823f3e9c.js +0 -117
- package/_internal/ButtonRoot-823f3e9c.js.map +0 -1
- package/_internal/Chip-a34f6905.js +0 -146
- package/_internal/Chip-a34f6905.js.map +0 -1
- package/_internal/ClickAwayProvider-7093ba23.js +0 -95
- package/_internal/ClickAwayProvider-7093ba23.js.map +0 -1
- package/_internal/DisabledStateContext-ea04260d.js +0 -29
- package/_internal/DisabledStateContext-ea04260d.js.map +0 -1
- package/_internal/HeadingLevelProvider-ebdcb0c7.js +0 -61
- package/_internal/HeadingLevelProvider-ebdcb0c7.js.map +0 -1
- package/_internal/IconButton-f4df224c.js +0 -77
- package/_internal/IconButton-f4df224c.js.map +0 -1
- package/_internal/ImageCaption-8134a3aa.js +0 -75
- package/_internal/ImageCaption-8134a3aa.js.map +0 -1
- package/_internal/List-54237e0e.js +0 -793
- package/_internal/List-54237e0e.js.map +0 -1
- package/_internal/PopoverDialog-e0967e5f.js +0 -655
- package/_internal/PopoverDialog-e0967e5f.js.map +0 -1
- package/_internal/Portal-3f86608e.js +0 -45
- package/_internal/Portal-3f86608e.js.map +0 -1
- package/_internal/RawClickable-2c2b6a89.js +0 -52
- package/_internal/RawClickable-2c2b6a89.js.map +0 -1
- package/_internal/Slides-b7a67f32.js +0 -678
- package/_internal/Slides-b7a67f32.js.map +0 -1
- package/_internal/ThemeContext-3181f000.js +0 -14
- package/_internal/ThemeContext-3181f000.js.map +0 -1
- package/_internal/Thumbnail-b5dea0af.js +0 -313
- package/_internal/Thumbnail-b5dea0af.js.map +0 -1
- package/_internal/components/alert-dialog-b284b191.js +0 -162
- package/_internal/components/alert-dialog-b284b191.js.map +0 -1
- package/_internal/components/autocomplete-8d3f37ea.js +0 -261
- package/_internal/components/autocomplete-8d3f37ea.js.map +0 -1
- package/_internal/components/avatar-5fc70e00.js +0 -83
- package/_internal/components/avatar-5fc70e00.js.map +0 -1
- package/_internal/components/badge-8390e590.js +0 -81
- package/_internal/components/badge-8390e590.js.map +0 -1
- package/_internal/components/button-e3c7f2eb.js +0 -47
- package/_internal/components/button-e3c7f2eb.js.map +0 -1
- package/_internal/components/checkbox-d1ca9748.js +0 -140
- package/_internal/components/checkbox-d1ca9748.js.map +0 -1
- package/_internal/components/chip-e40c5521.js +0 -102
- package/_internal/components/chip-e40c5521.js.map +0 -1
- package/_internal/components/comment-block-a3cf7b9b.js +0 -138
- package/_internal/components/comment-block-a3cf7b9b.js.map +0 -1
- package/_internal/components/date-picker-6c1b14e4.js +0 -2
- package/_internal/components/date-picker-6c1b14e4.js.map +0 -1
- package/_internal/components/dialog-ebdb9500.js +0 -238
- package/_internal/components/dialog-ebdb9500.js.map +0 -1
- package/_internal/components/divider-116af6b9.js +0 -50
- package/_internal/components/divider-116af6b9.js.map +0 -1
- package/_internal/components/drag-handle-5215cd21.js +0 -51
- package/_internal/components/drag-handle-5215cd21.js.map +0 -1
- package/_internal/components/dropdown-0baed51b.js +0 -147
- package/_internal/components/dropdown-0baed51b.js.map +0 -1
- package/_internal/components/expansion-panel-5533a680.js +0 -167
- package/_internal/components/expansion-panel-5533a680.js.map +0 -1
- package/_internal/components/flag-8d4a7e72.js +0 -59
- package/_internal/components/flag-8d4a7e72.js.map +0 -1
- package/_internal/components/flex-box-55144e5f.js +0 -56
- package/_internal/components/flex-box-55144e5f.js.map +0 -1
- package/_internal/components/generic-block-ff0509ee.js +0 -124
- package/_internal/components/generic-block-ff0509ee.js.map +0 -1
- package/_internal/components/grid-6f1b5a41.js +0 -104
- package/_internal/components/grid-6f1b5a41.js.map +0 -1
- package/_internal/components/grid-column-f01df853.js +0 -59
- package/_internal/components/grid-column-f01df853.js.map +0 -1
- package/_internal/components/heading-89239843.js +0 -53
- package/_internal/components/heading-89239843.js.map +0 -1
- package/_internal/components/icon-b708cca4.js +0 -102
- package/_internal/components/icon-b708cca4.js.map +0 -1
- package/_internal/components/image-block-7938422d.js +0 -110
- package/_internal/components/image-block-7938422d.js.map +0 -1
- package/_internal/components/image-lightbox-58331704.js +0 -756
- package/_internal/components/image-lightbox-58331704.js.map +0 -1
- package/_internal/components/inline-list-e6f19a98.js +0 -74
- package/_internal/components/inline-list-e6f19a98.js.map +0 -1
- package/_internal/components/input-helper-64153099.js +0 -71
- package/_internal/components/input-helper-64153099.js.map +0 -1
- package/_internal/components/input-label-2feb0bb0.js +0 -59
- package/_internal/components/input-label-2feb0bb0.js.map +0 -1
- package/_internal/components/lightbox-570ad9e5.js +0 -155
- package/_internal/components/lightbox-570ad9e5.js.map +0 -1
- package/_internal/components/link-91f76477.js +0 -72
- package/_internal/components/link-91f76477.js.map +0 -1
- package/_internal/components/link-preview-fdd8d738.js +0 -117
- package/_internal/components/link-preview-fdd8d738.js.map +0 -1
- package/_internal/components/list-b08d8423.js +0 -71
- package/_internal/components/list-b08d8423.js.map +0 -1
- package/_internal/components/message-29cb9181.js +0 -96
- package/_internal/components/message-29cb9181.js.map +0 -1
- package/_internal/components/mosaic-cdb9f563.js +0 -95
- package/_internal/components/mosaic-cdb9f563.js.map +0 -1
- package/_internal/components/navigation-8b7d9bd8.js +0 -225
- package/_internal/components/navigation-8b7d9bd8.js.map +0 -1
- package/_internal/components/notification-a45fda96.js +0 -145
- package/_internal/components/notification-a45fda96.js.map +0 -1
- package/_internal/components/popover-65bfbc57.js +0 -3
- package/_internal/components/popover-65bfbc57.js.map +0 -1
- package/_internal/components/post-block-52e58dd5.js +0 -109
- package/_internal/components/post-block-52e58dd5.js.map +0 -1
- package/_internal/components/progress-f39c3fa2.js +0 -182
- package/_internal/components/progress-f39c3fa2.js.map +0 -1
- package/_internal/components/progress-tracker-512d7a08.js +0 -305
- package/_internal/components/progress-tracker-512d7a08.js.map +0 -1
- package/_internal/components/radio-button-559a4863.js +0 -149
- package/_internal/components/radio-button-559a4863.js.map +0 -1
- package/_internal/components/select-48d4fa8c.js +0 -454
- package/_internal/components/select-48d4fa8c.js.map +0 -1
- package/_internal/components/side-navigation-f9bc5b4e.js +0 -165
- package/_internal/components/side-navigation-f9bc5b4e.js.map +0 -1
- package/_internal/components/skeleton-c66516ee.js +0 -166
- package/_internal/components/skeleton-c66516ee.js.map +0 -1
- package/_internal/components/slider-efbfbc45.js +0 -311
- package/_internal/components/slider-efbfbc45.js.map +0 -1
- package/_internal/components/slideshow-dd312470.js +0 -151
- package/_internal/components/slideshow-dd312470.js.map +0 -1
- package/_internal/components/switch-769a2a04.js +0 -122
- package/_internal/components/switch-769a2a04.js.map +0 -1
- package/_internal/components/table-8617b1ba.js +0 -294
- package/_internal/components/table-8617b1ba.js.map +0 -1
- package/_internal/components/tabs-884c57b6.js +0 -298
- package/_internal/components/tabs-884c57b6.js.map +0 -1
- package/_internal/components/text-c7b1e079.js +0 -2
- package/_internal/components/text-c7b1e079.js.map +0 -1
- package/_internal/components/text-field-478acd86.js +0 -359
- package/_internal/components/text-field-478acd86.js.map +0 -1
- package/_internal/components/thumbnail-310a4c4b.js +0 -42
- package/_internal/components/thumbnail-310a4c4b.js.map +0 -1
- package/_internal/components/toolbar-a43533a2.js +0 -61
- package/_internal/components/toolbar-a43533a2.js.map +0 -1
- package/_internal/components/tooltip-2885ab2e.js +0 -327
- package/_internal/components/tooltip-2885ab2e.js.map +0 -1
- package/_internal/components/uploader-1e7f5bbb.js +0 -153
- package/_internal/components/uploader-1e7f5bbb.js.map +0 -1
- package/_internal/components/user-block-68a51ed0.js +0 -145
- package/_internal/components/user-block-68a51ed0.js.map +0 -1
- package/_internal/constants-b9e57936.js +0 -2155
- package/_internal/constants-b9e57936.js.map +0 -1
- package/_internal/constants-d0e3f49e.js +0 -24
- package/_internal/constants-d0e3f49e.js.map +0 -1
- package/_internal/context-9d1336a1.js +0 -19
- package/_internal/context-9d1336a1.js.map +0 -1
- package/_internal/forwardRef-15f62847.js +0 -70
- package/_internal/forwardRef-15f62847.js.map +0 -1
- package/_internal/getFocusableElements-230173a8.js +0 -13
- package/_internal/getFocusableElements-230173a8.js.map +0 -1
- package/_internal/index-9df37c0d.js +0 -436
- package/_internal/index-9df37c0d.js.map +0 -1
- package/_internal/index-a9c5cd69.js +0 -117
- package/_internal/index-a9c5cd69.js.map +0 -1
- package/_internal/isComponent-78df9309.js +0 -20
- package/_internal/isComponent-78df9309.js.map +0 -1
- package/_internal/isComponentType-e806b848.js +0 -9
- package/_internal/isComponentType-e806b848.js.map +0 -1
- package/_internal/mergeRefs-f0d7d6ea.js +0 -30
- package/_internal/mergeRefs-f0d7d6ea.js.map +0 -1
- package/_internal/partitionMulti-4daccdd5.js.map +0 -1
- package/_internal/state-db358714.js +0 -130
- package/_internal/state-db358714.js.map +0 -1
- package/_internal/useBooleanState-2a3d237c.js +0 -12
- package/_internal/useBooleanState-2a3d237c.js.map +0 -1
- package/_internal/useCallbackOnEscape-ea4d9eb4.js +0 -62
- package/_internal/useCallbackOnEscape-ea4d9eb4.js.map +0 -1
- package/_internal/useDisableBodyScroll-36bd7352.js +0 -219
- package/_internal/useDisableBodyScroll-36bd7352.js.map +0 -1
- package/_internal/useDisableStateProps-69e16b7c.js +0 -36
- package/_internal/useDisableStateProps-69e16b7c.js.map +0 -1
- package/_internal/useFocusTrap-c3c6378b.js +0 -112
- package/_internal/useFocusTrap-c3c6378b.js.map +0 -1
- package/_internal/useId-3a1facc0.js +0 -18
- package/_internal/useId-3a1facc0.js.map +0 -1
- package/_internal/useRovingTabIndex-7daf0f24.js +0 -77
- package/_internal/useRovingTabIndex-7daf0f24.js.map +0 -1
- package/_internal/useTransitionVisibility-321fdbfa.js +0 -50
- package/_internal/useTransitionVisibility-321fdbfa.js.map +0 -1
- package/_internal/wrapChildrenIconWithSpaces-c1faaae4.js +0 -20
- package/_internal/wrapChildrenIconWithSpaces-c1faaae4.js.map +0 -1
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import React__default, { useState, useEffect, useRef, useMemo, Children } from 'react';
|
|
2
|
-
import { f as forwardRef, c as classNames } from '../forwardRef-15f62847.js';
|
|
3
|
-
import { D as DOCUMENT } from '../constants-d0e3f49e.js';
|
|
4
|
-
import { u as useCallbackOnEscape } from '../useCallbackOnEscape-ea4d9eb4.js';
|
|
5
|
-
import { u as useFocusTrap } from '../useFocusTrap-c3c6378b.js';
|
|
6
|
-
import { i as isComponent } from '../isComponent-78df9309.js';
|
|
7
|
-
import { p as partitionMulti } from '../partitionMulti-4daccdd5.js';
|
|
8
|
-
import { getRootClassName, handleBasicClasses } from '@lumx/core/js/utils/className';
|
|
9
|
-
import { m as mergeRefs } from '../mergeRefs-f0d7d6ea.js';
|
|
10
|
-
import { u as useDisableBodyScroll } from '../useDisableBodyScroll-36bd7352.js';
|
|
11
|
-
import { u as useTransitionVisibility } from '../useTransitionVisibility-321fdbfa.js';
|
|
12
|
-
import { T as ThemeProvider } from '../ThemeContext-3181f000.js';
|
|
13
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
|
-
import { P as Portal } from '../Portal-3f86608e.js';
|
|
15
|
-
import { H as HeadingLevelProvider } from '../HeadingLevelProvider-ebdcb0c7.js';
|
|
16
|
-
import { C as ClickAwayProvider } from '../ClickAwayProvider-7093ba23.js';
|
|
17
|
-
import { Progress, ProgressVariant } from './progress-f39c3fa2.js';
|
|
18
|
-
import { Size, DIALOG_TRANSITION_DURATION } from '@lumx/core/js/constants';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Convenient hook to create interaction observers.
|
|
22
|
-
*
|
|
23
|
-
* @param elements Elements to observe.
|
|
24
|
-
* @param options IntersectionObserver options.
|
|
25
|
-
* @return Map of intersections.
|
|
26
|
-
*/
|
|
27
|
-
function useIntersectionObserver(elements, options) {
|
|
28
|
-
const [intersections, setIntersections] = useState(() => new Map());
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
if (elements.length < 1 || !elements.some(Boolean)) {
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
const observer = new IntersectionObserver(entries => {
|
|
34
|
-
for (const entry of entries) {
|
|
35
|
-
intersections.set(entry.target, entry);
|
|
36
|
-
}
|
|
37
|
-
setIntersections(new Map(intersections));
|
|
38
|
-
}, options);
|
|
39
|
-
for (const element of elements) {
|
|
40
|
-
if (element) {
|
|
41
|
-
observer.observe(element);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return () => observer.disconnect();
|
|
45
|
-
},
|
|
46
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
-
[...elements]);
|
|
48
|
-
return intersections;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
const isHeader = isComponent('header');
|
|
52
|
-
const isFooter = isComponent('footer');
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Component display name.
|
|
56
|
-
*/
|
|
57
|
-
const COMPONENT_NAME = 'Dialog';
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Component default class name and class prefix.
|
|
61
|
-
*/
|
|
62
|
-
const CLASSNAME = getRootClassName(COMPONENT_NAME);
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Component default props.
|
|
66
|
-
*/
|
|
67
|
-
const DEFAULT_PROPS = {
|
|
68
|
-
size: Size.big,
|
|
69
|
-
disableBodyScroll: true
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Dialog component.
|
|
74
|
-
*
|
|
75
|
-
* @param props Component props.
|
|
76
|
-
* @param ref Component ref.
|
|
77
|
-
* @return React element.
|
|
78
|
-
*/
|
|
79
|
-
const Dialog = forwardRef((props, ref) => {
|
|
80
|
-
if (!DOCUMENT) {
|
|
81
|
-
// Can't render in SSR.
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
const {
|
|
85
|
-
children,
|
|
86
|
-
className,
|
|
87
|
-
header,
|
|
88
|
-
focusElement,
|
|
89
|
-
forceFooterDivider,
|
|
90
|
-
forceHeaderDivider,
|
|
91
|
-
footer,
|
|
92
|
-
isLoading,
|
|
93
|
-
isOpen,
|
|
94
|
-
onClose,
|
|
95
|
-
parentElement,
|
|
96
|
-
contentRef,
|
|
97
|
-
preventAutoClose,
|
|
98
|
-
size = DEFAULT_PROPS.size,
|
|
99
|
-
zIndex,
|
|
100
|
-
dialogProps,
|
|
101
|
-
onVisibilityChange,
|
|
102
|
-
disableBodyScroll = DEFAULT_PROPS.disableBodyScroll,
|
|
103
|
-
preventCloseOnClick,
|
|
104
|
-
preventCloseOnEscape,
|
|
105
|
-
...forwardedProps
|
|
106
|
-
} = props;
|
|
107
|
-
|
|
108
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
109
|
-
const previousOpen = React__default.useRef(isOpen);
|
|
110
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
111
|
-
React__default.useEffect(() => {
|
|
112
|
-
if (isOpen !== previousOpen.current) {
|
|
113
|
-
previousOpen.current = isOpen;
|
|
114
|
-
|
|
115
|
-
// Focus the parent element on close.
|
|
116
|
-
if (!isOpen && parentElement && parentElement.current) {
|
|
117
|
-
parentElement.current.focus();
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}, [isOpen, parentElement]);
|
|
121
|
-
const shouldPreventCloseOnEscape = preventAutoClose || preventCloseOnEscape;
|
|
122
|
-
|
|
123
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
124
|
-
useCallbackOnEscape(onClose, isOpen && !shouldPreventCloseOnEscape);
|
|
125
|
-
|
|
126
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
127
|
-
const wrapperRef = useRef(null);
|
|
128
|
-
/**
|
|
129
|
-
* Since the `contentRef` comes from the parent and is optional,
|
|
130
|
-
* we need to create a stable contentRef that will always be available.
|
|
131
|
-
*/
|
|
132
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
133
|
-
const localContentRef = useRef(null);
|
|
134
|
-
// Handle focus trap.
|
|
135
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
136
|
-
useFocusTrap(isOpen && wrapperRef.current, focusElement?.current);
|
|
137
|
-
|
|
138
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
139
|
-
useDisableBodyScroll(disableBodyScroll && isOpen && localContentRef.current);
|
|
140
|
-
|
|
141
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
142
|
-
const [sentinelTop, setSentinelTop] = useState(null);
|
|
143
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
144
|
-
const [sentinelBottom, setSentinelBottom] = useState(null);
|
|
145
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
146
|
-
const intersections = useIntersectionObserver([sentinelTop, sentinelBottom], {
|
|
147
|
-
threshold: [0, 1]
|
|
148
|
-
});
|
|
149
|
-
const hasTopIntersection = sentinelTop && !(intersections.get(sentinelTop)?.isIntersecting ?? true);
|
|
150
|
-
const hasBottomIntersection = sentinelBottom && !(intersections.get(sentinelBottom)?.isIntersecting ?? true);
|
|
151
|
-
|
|
152
|
-
// Separate header, footer and dialog content from children.
|
|
153
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
154
|
-
const [[headerChild], [footerChild], content] = useMemo(() => partitionMulti(Children.toArray(children), [isHeader, isFooter]), [children]);
|
|
155
|
-
const headerChildProps = headerChild?.props;
|
|
156
|
-
const headerChildContent = headerChildProps?.children;
|
|
157
|
-
const footerChildProps = footerChild?.props;
|
|
158
|
-
const footerChildContent = footerChildProps?.children;
|
|
159
|
-
|
|
160
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
161
|
-
const clickAwayRefs = useRef([wrapperRef]);
|
|
162
|
-
|
|
163
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
164
|
-
const rootRef = useRef(null);
|
|
165
|
-
|
|
166
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
167
|
-
const isVisible = useTransitionVisibility(rootRef, Boolean(isOpen), DIALOG_TRANSITION_DURATION, onVisibilityChange);
|
|
168
|
-
const shouldPreventCloseOnClickAway = preventAutoClose || preventCloseOnClick;
|
|
169
|
-
return isOpen || isVisible ? /*#__PURE__*/jsx(Portal, {
|
|
170
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
171
|
-
ref: mergeRefs(rootRef, ref),
|
|
172
|
-
...forwardedProps,
|
|
173
|
-
className: classNames(className, handleBasicClasses({
|
|
174
|
-
isHidden: !isOpen,
|
|
175
|
-
isLoading,
|
|
176
|
-
isShown: isOpen || isVisible,
|
|
177
|
-
prefix: CLASSNAME,
|
|
178
|
-
size
|
|
179
|
-
})),
|
|
180
|
-
style: {
|
|
181
|
-
zIndex
|
|
182
|
-
},
|
|
183
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
184
|
-
className: `${CLASSNAME}__overlay`
|
|
185
|
-
}), /*#__PURE__*/jsx(HeadingLevelProvider, {
|
|
186
|
-
level: 2,
|
|
187
|
-
children: /*#__PURE__*/jsx(ThemeProvider, {
|
|
188
|
-
value: undefined,
|
|
189
|
-
children: /*#__PURE__*/jsx("div", {
|
|
190
|
-
className: `${CLASSNAME}__container`,
|
|
191
|
-
role: "dialog",
|
|
192
|
-
"aria-modal": "true",
|
|
193
|
-
...dialogProps,
|
|
194
|
-
children: /*#__PURE__*/jsx(ClickAwayProvider, {
|
|
195
|
-
callback: !shouldPreventCloseOnClickAway && onClose,
|
|
196
|
-
childrenRefs: clickAwayRefs,
|
|
197
|
-
parentRef: rootRef,
|
|
198
|
-
children: /*#__PURE__*/jsxs("section", {
|
|
199
|
-
className: `${CLASSNAME}__wrapper`,
|
|
200
|
-
ref: wrapperRef,
|
|
201
|
-
children: [(header || headerChildContent) && /*#__PURE__*/jsxs("header", {
|
|
202
|
-
...headerChildProps,
|
|
203
|
-
className: classNames(`${CLASSNAME}__header`, (forceHeaderDivider || hasTopIntersection) && `${CLASSNAME}__header--has-divider`, headerChildProps?.className),
|
|
204
|
-
children: [header, headerChildContent]
|
|
205
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
206
|
-
ref: mergeRefs(contentRef, localContentRef),
|
|
207
|
-
className: `${CLASSNAME}__content`,
|
|
208
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
209
|
-
className: `${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--top`,
|
|
210
|
-
ref: setSentinelTop
|
|
211
|
-
}), content, /*#__PURE__*/jsx("div", {
|
|
212
|
-
className: `${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--bottom`,
|
|
213
|
-
ref: setSentinelBottom
|
|
214
|
-
})]
|
|
215
|
-
}), (footer || footerChildContent) && /*#__PURE__*/jsxs("footer", {
|
|
216
|
-
...footerChildProps,
|
|
217
|
-
className: classNames(`${CLASSNAME}__footer`, (forceFooterDivider || hasBottomIntersection) && `${CLASSNAME}__footer--has-divider`, footerChildProps?.className),
|
|
218
|
-
children: [footer, footerChildContent]
|
|
219
|
-
}), isLoading && /*#__PURE__*/jsx("div", {
|
|
220
|
-
className: `${CLASSNAME}__progress-overlay`,
|
|
221
|
-
children: /*#__PURE__*/jsx(Progress, {
|
|
222
|
-
variant: ProgressVariant.circular
|
|
223
|
-
})
|
|
224
|
-
})]
|
|
225
|
-
})
|
|
226
|
-
})
|
|
227
|
-
})
|
|
228
|
-
})
|
|
229
|
-
})]
|
|
230
|
-
})
|
|
231
|
-
}) : null;
|
|
232
|
-
});
|
|
233
|
-
Dialog.displayName = COMPONENT_NAME;
|
|
234
|
-
Dialog.className = CLASSNAME;
|
|
235
|
-
Dialog.defaultProps = DEFAULT_PROPS;
|
|
236
|
-
|
|
237
|
-
export { Dialog };
|
|
238
|
-
//# sourceMappingURL=dialog-ebdb9500.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-ebdb9500.js","sources":["../../../src/hooks/useIntersectionObserver.tsx","../../../src/components/dialog/Dialog.tsx"],"sourcesContent":["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","import React, { Children, ReactElement, ReactNode, Ref, RefObject, useMemo, useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { HeadingLevelProvider, Progress, ProgressVariant, 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, isComponent } from '@lumx/react/utils/type';\nimport { partitionMulti } from '@lumx/react/utils/partitionMulti';\nimport { getRootClassName, handleBasicClasses } from '@lumx/core/js/utils/className';\nimport { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';\nimport { mergeRefs } from '@lumx/react/utils/react/mergeRefs';\nimport { forwardRef } from '@lumx/react/utils/react/forwardRef';\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';\n\n/**\n * Defines the props of the component.\n */\nexport interface DialogProps extends GenericProps {\n /** Footer content. */\n footer?: ReactNode;\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?: ReactNode;\n /** Whether the divider between the dialog content and the footer 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 /** 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\nexport type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\nconst isHeader = isComponent('header');\nconst isFooter = isComponent('footer');\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Dialog';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<DialogProps> = {\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 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 return isOpen || isVisible ? (\n <Portal>\n <div\n ref={mergeRefs(rootRef, ref)}\n {...forwardedProps}\n className={classNames(\n className,\n handleBasicClasses({\n isHidden: !isOpen,\n isLoading,\n isShown: isOpen || isVisible,\n prefix: CLASSNAME,\n size,\n }),\n )}\n style={{ zIndex }}\n >\n <div className={`${CLASSNAME}__overlay`} />\n\n <HeadingLevelProvider level={2}>\n <ThemeProvider value={undefined}>\n <div className={`${CLASSNAME}__container`} role=\"dialog\" aria-modal=\"true\" {...dialogProps}>\n <ClickAwayProvider\n callback={!shouldPreventCloseOnClickAway && onClose}\n childrenRefs={clickAwayRefs}\n parentRef={rootRef}\n >\n <section className={`${CLASSNAME}__wrapper`} ref={wrapperRef}>\n {(header || headerChildContent) && (\n <header\n {...headerChildProps}\n className={classNames(\n `${CLASSNAME}__header`,\n (forceHeaderDivider || hasTopIntersection) &&\n `${CLASSNAME}__header--has-divider`,\n headerChildProps?.className,\n )}\n >\n {header}\n {headerChildContent}\n </header>\n )}\n\n <div\n ref={mergeRefs(contentRef, localContentRef)}\n className={`${CLASSNAME}__content`}\n >\n <div\n className={`${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--top`}\n ref={setSentinelTop}\n />\n\n {content}\n\n <div\n className={`${CLASSNAME}__sentinel ${CLASSNAME}__sentinel--bottom`}\n ref={setSentinelBottom}\n />\n </div>\n\n {(footer || footerChildContent) && (\n <footer\n {...footerChildProps}\n className={classNames(\n `${CLASSNAME}__footer`,\n (forceFooterDivider || hasBottomIntersection) &&\n `${CLASSNAME}__footer--has-divider`,\n footerChildProps?.className,\n )}\n >\n {footer}\n {footerChildContent}\n </footer>\n )}\n\n {isLoading && (\n <div className={`${CLASSNAME}__progress-overlay`}>\n <Progress variant={ProgressVariant.circular} />\n </div>\n )}\n </section>\n </ClickAwayProvider>\n </div>\n </ThemeProvider>\n </HeadingLevelProvider>\n </div>\n </Portal>\n ) : null;\n});\nDialog.displayName = COMPONENT_NAME;\nDialog.className = CLASSNAME;\nDialog.defaultProps = DEFAULT_PROPS;\n"],"names":["useIntersectionObserver","elements","options","intersections","setIntersections","useState","Map","useEffect","length","some","Boolean","undefined","observer","IntersectionObserver","entries","entry","set","target","element","observe","disconnect","isHeader","isComponent","isFooter","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","size","Size","big","disableBodyScroll","Dialog","forwardRef","props","ref","DOCUMENT","children","className","header","focusElement","forceFooterDivider","forceHeaderDivider","footer","isLoading","isOpen","onClose","parentElement","contentRef","preventAutoClose","zIndex","dialogProps","onVisibilityChange","preventCloseOnClick","preventCloseOnEscape","forwardedProps","previousOpen","React","useRef","current","focus","shouldPreventCloseOnEscape","useCallbackOnEscape","wrapperRef","localContentRef","useFocusTrap","useDisableBodyScroll","sentinelTop","setSentinelTop","sentinelBottom","setSentinelBottom","threshold","hasTopIntersection","get","isIntersecting","hasBottomIntersection","headerChild","footerChild","content","useMemo","partitionMulti","Children","toArray","headerChildProps","headerChildContent","footerChildProps","footerChildContent","clickAwayRefs","rootRef","isVisible","useTransitionVisibility","DIALOG_TRANSITION_DURATION","shouldPreventCloseOnClickAway","_jsx","Portal","_jsxs","mergeRefs","classNames","handleBasicClasses","isHidden","isShown","prefix","style","HeadingLevelProvider","level","ThemeProvider","value","role","ClickAwayProvider","callback","childrenRefs","parentRef","Progress","variant","ProgressVariant","circular","displayName","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,uBAAuBA,CACnCC,QAAqC,EACrCC,OAAkC,EAClB;AAChB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AM,CAACM,SAAS,GAAGb,SAAS,CAAA;AAC5BO,MAAM,CAACqF,YAAY,GAAG1F,aAAa;;;;"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { f as forwardRef, c as classNames } from '../forwardRef-15f62847.js';
|
|
2
|
-
import { getRootClassName, handleBasicClasses } from '@lumx/core/js/utils/className';
|
|
3
|
-
import { u as useTheme } from '../ThemeContext-3181f000.js';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
import { Theme } from '@lumx/core/js/constants';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Component display name.
|
|
9
|
-
*/
|
|
10
|
-
const COMPONENT_NAME = 'Divider';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Component default class name and class prefix.
|
|
14
|
-
*/
|
|
15
|
-
const CLASSNAME = getRootClassName(COMPONENT_NAME);
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Component default props.
|
|
19
|
-
*/
|
|
20
|
-
const DEFAULT_PROPS = {};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Divider component.
|
|
24
|
-
*
|
|
25
|
-
* @param props Component props.
|
|
26
|
-
* @param ref Component ref.
|
|
27
|
-
* @return React element.
|
|
28
|
-
*/
|
|
29
|
-
const Divider = forwardRef((props, ref) => {
|
|
30
|
-
const defaultTheme = useTheme() || Theme.light;
|
|
31
|
-
const {
|
|
32
|
-
className,
|
|
33
|
-
theme = defaultTheme,
|
|
34
|
-
...forwardedProps
|
|
35
|
-
} = props;
|
|
36
|
-
return /*#__PURE__*/jsx("hr", {
|
|
37
|
-
ref: ref,
|
|
38
|
-
...forwardedProps,
|
|
39
|
-
className: classNames(className, handleBasicClasses({
|
|
40
|
-
prefix: CLASSNAME,
|
|
41
|
-
theme
|
|
42
|
-
}))
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
Divider.displayName = COMPONENT_NAME;
|
|
46
|
-
Divider.className = CLASSNAME;
|
|
47
|
-
Divider.defaultProps = DEFAULT_PROPS;
|
|
48
|
-
|
|
49
|
-
export { Divider };
|
|
50
|
-
//# sourceMappingURL=divider-116af6b9.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider-116af6b9.js","sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport { Theme } from '@lumx/react';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/core/js/utils/className';\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 DividerProps extends GenericProps, HasTheme {}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Divider';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\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 { className, theme = defaultTheme, ...forwardedProps } = props;\n\n return (\n <hr\n ref={ref}\n {...forwardedProps}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, theme }))}\n />\n );\n});\nDivider.displayName = COMPONENT_NAME;\nDivider.className = CLASSNAME;\nDivider.defaultProps = DEFAULT_PROPS;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","Divider","forwardRef","props","ref","defaultTheme","useTheme","Theme","light","className","theme","forwardedProps","_jsx","classNames","handleBasicClasses","prefix","displayName","defaultProps"],"mappings":";;;;;;AAaA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,SAAS,CAAA;;AAEhC;AACA;AACA;AACA,MAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAc,CAAC,CAAA;;AAElD;AACA;AACA;AACA,MAAMG,aAAoC,GAAG,EAAE,CAAA;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,OAAO,GAAGC,UAAU,CAA8B,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC3E,MAAMC,YAAY,GAAGC,QAAQ,EAAE,IAAIC,KAAK,CAACC,KAAK,CAAA;EAC9C,MAAM;IAAEC,SAAS;AAAEC,IAAAA,KAAK,GAAGL,YAAY;IAAE,GAAGM,cAAAA;AAAe,GAAC,GAAGR,KAAK,CAAA;AAEpE,EAAA,oBACIS,GAAA,CAAA,IAAA,EAAA;AACIR,IAAAA,GAAG,EAAEA,GAAI;AAAA,IAAA,GACLO,cAAc;AAClBF,IAAAA,SAAS,EAAEI,UAAU,CAACJ,SAAS,EAAEK,kBAAkB,CAAC;AAAEC,MAAAA,MAAM,EAAEjB,SAAS;AAAEY,MAAAA,KAAAA;AAAM,KAAC,CAAC,CAAA;AAAE,GACtF,CAAC,CAAA;AAEV,CAAC,EAAC;AACFT,OAAO,CAACe,WAAW,GAAGnB,cAAc,CAAA;AACpCI,OAAO,CAACQ,SAAS,GAAGX,SAAS,CAAA;AAC7BG,OAAO,CAACgB,YAAY,GAAGjB,aAAa;;;;"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { f as forwardRef, c as classNames } from '../forwardRef-15f62847.js';
|
|
2
|
-
import { mdiDragVertical } from '@lumx/icons';
|
|
3
|
-
import { getRootClassName, handleBasicClasses } from '@lumx/core/js/utils/className';
|
|
4
|
-
import { u as useTheme } from '../ThemeContext-3181f000.js';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import { Icon } from './icon-b708cca4.js';
|
|
7
|
-
import { Theme, ColorPalette, Size } from '@lumx/core/js/constants';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Component display name.
|
|
11
|
-
*/
|
|
12
|
-
const COMPONENT_NAME = 'DragHandle';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Component default class name and class prefix.
|
|
16
|
-
*/
|
|
17
|
-
const CLASSNAME = getRootClassName(COMPONENT_NAME);
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* DragHandle component.
|
|
21
|
-
*
|
|
22
|
-
* @param props Component props.
|
|
23
|
-
* @param ref Component ref.
|
|
24
|
-
* @return React element.
|
|
25
|
-
*/
|
|
26
|
-
const DragHandle = forwardRef((props, ref) => {
|
|
27
|
-
const defaultTheme = useTheme();
|
|
28
|
-
const {
|
|
29
|
-
className,
|
|
30
|
-
theme = defaultTheme,
|
|
31
|
-
...forwardedProps
|
|
32
|
-
} = props;
|
|
33
|
-
return /*#__PURE__*/jsx("div", {
|
|
34
|
-
ref: ref,
|
|
35
|
-
...forwardedProps,
|
|
36
|
-
className: classNames(className, handleBasicClasses({
|
|
37
|
-
prefix: CLASSNAME,
|
|
38
|
-
theme
|
|
39
|
-
})),
|
|
40
|
-
children: /*#__PURE__*/jsx(Icon, {
|
|
41
|
-
icon: mdiDragVertical,
|
|
42
|
-
color: theme === Theme.dark ? ColorPalette.light : ColorPalette.dark,
|
|
43
|
-
size: Size.xs
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
DragHandle.displayName = COMPONENT_NAME;
|
|
48
|
-
DragHandle.className = CLASSNAME;
|
|
49
|
-
|
|
50
|
-
export { DragHandle };
|
|
51
|
-
//# sourceMappingURL=drag-handle-5215cd21.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drag-handle-5215cd21.js","sources":["../../../src/components/drag-handle/DragHandle.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport { mdiDragVertical } from '@lumx/icons';\nimport { ColorPalette, Icon, Size, Theme } from '@lumx/react';\nimport { GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/core/js/utils/className';\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 DragHandleProps extends GenericProps, HasTheme {}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'DragHandle';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\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 { className, theme = defaultTheme, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, 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});\nDragHandle.displayName = COMPONENT_NAME;\nDragHandle.className = CLASSNAME;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DragHandle","forwardRef","props","ref","defaultTheme","useTheme","className","theme","forwardedProps","_jsx","classNames","handleBasicClasses","prefix","children","Icon","icon","mdiDragVertical","color","Theme","dark","ColorPalette","light","size","Size","xs","displayName"],"mappings":";;;;;;;;AAcA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,YAAY,CAAA;;AAEnC;AACA;AACA;AACA,MAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAc,CAAC,CAAA;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,UAAU,GAAGC,UAAU,CAAkC,CAACC,KAAK,EAAEC,GAAG,KAAK;AAClF,EAAA,MAAMC,YAAY,GAAGC,QAAQ,EAAE,CAAA;EAC/B,MAAM;IAAEC,SAAS;AAAEC,IAAAA,KAAK,GAAGH,YAAY;IAAE,GAAGI,cAAAA;AAAe,GAAC,GAAGN,KAAK,CAAA;AAEpE,EAAA,oBACIO,GAAA,CAAA,KAAA,EAAA;AACIN,IAAAA,GAAG,EAAEA,GAAI;AAAA,IAAA,GACLK,cAAc;AAClBF,IAAAA,SAAS,EAAEI,UAAU,CAACJ,SAAS,EAAEK,kBAAkB,CAAC;AAAEC,MAAAA,MAAM,EAAEd,SAAS;AAAES,MAAAA,KAAAA;AAAM,KAAC,CAAC,CAAE;IAAAM,QAAA,eAEnFJ,GAAA,CAACK,IAAI,EAAA;AACDC,MAAAA,IAAI,EAAEC,eAAgB;AACtBC,MAAAA,KAAK,EAAEV,KAAK,KAAKW,KAAK,CAACC,IAAI,GAAGC,YAAY,CAACC,KAAK,GAAGD,YAAY,CAACD,IAAK;MACrEG,IAAI,EAAEC,IAAI,CAACC,EAAAA;KACd,CAAA;AAAC,GACD,CAAC,CAAA;AAEd,CAAC,EAAC;AACFxB,UAAU,CAACyB,WAAW,GAAG5B,cAAc,CAAA;AACvCG,UAAU,CAACM,SAAS,GAAGR,SAAS;;;;"}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useMemo, cloneElement } from 'react';
|
|
2
|
-
import { f as forwardRef, c as classNames } from '../forwardRef-15f62847.js';
|
|
3
|
-
import { L as List } from '../List-54237e0e.js';
|
|
4
|
-
import { P as Popover } from '../index-9df37c0d.js';
|
|
5
|
-
import { i as isComponent } from '../isComponent-78df9309.js';
|
|
6
|
-
import { getRootClassName } from '@lumx/core/js/utils/className';
|
|
7
|
-
import { P as Placement } from '../constants-b9e57936.js';
|
|
8
|
-
import { jsx } from 'react/jsx-runtime';
|
|
9
|
-
|
|
10
|
-
// The error margin in px we want to have for triggering infinite scroll
|
|
11
|
-
const SCROLL_TRIGGER_MARGIN = 5;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Listen to clicks away from a given element and callback the passed in function.
|
|
15
|
-
*
|
|
16
|
-
* @param ref A reference to the element on which you want to listen scroll event.
|
|
17
|
-
* @param [callback] A callback function to call when the bottom of the reference element is reached.
|
|
18
|
-
* @param [callbackOnMount] A callback function to call when the component is mounted.
|
|
19
|
-
*/
|
|
20
|
-
const useInfiniteScroll = (ref, callback, callbackOnMount = false, scrollTriggerMargin = SCROLL_TRIGGER_MARGIN) => {
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
const {
|
|
23
|
-
current
|
|
24
|
-
} = ref;
|
|
25
|
-
if (!callback || !current) {
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
const isAtBottom = () => Boolean(current && current.scrollHeight - (current.scrollTop + current.clientHeight) <= scrollTriggerMargin);
|
|
29
|
-
const onScroll = e => {
|
|
30
|
-
if (isAtBottom()) {
|
|
31
|
-
callback(e);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
if (isAtBottom()) {
|
|
35
|
-
onScroll();
|
|
36
|
-
}
|
|
37
|
-
current.addEventListener('scroll', onScroll);
|
|
38
|
-
current.addEventListener('resize', onScroll);
|
|
39
|
-
return () => {
|
|
40
|
-
current.removeEventListener('scroll', onScroll);
|
|
41
|
-
current.removeEventListener('resize', onScroll);
|
|
42
|
-
};
|
|
43
|
-
}, [ref, callback, scrollTriggerMargin]);
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (callback && callbackOnMount) {
|
|
46
|
-
callback();
|
|
47
|
-
}
|
|
48
|
-
}, [callback, callbackOnMount]);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Component display name.
|
|
53
|
-
*/
|
|
54
|
-
const COMPONENT_NAME = 'Dropdown';
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Component default class name and class prefix.
|
|
58
|
-
*/
|
|
59
|
-
const CLASSNAME = getRootClassName(COMPONENT_NAME);
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Component default props.
|
|
63
|
-
*/
|
|
64
|
-
const DEFAULT_PROPS = {
|
|
65
|
-
closeOnClick: true,
|
|
66
|
-
closeOnClickAway: true,
|
|
67
|
-
closeOnEscape: true,
|
|
68
|
-
fitToAnchorWidth: true,
|
|
69
|
-
fitWithinViewportHeight: true,
|
|
70
|
-
placement: Placement.BOTTOM_START,
|
|
71
|
-
shouldFocusOnOpen: true,
|
|
72
|
-
focusAnchorOnClose: true
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Dropdown component.
|
|
77
|
-
*
|
|
78
|
-
* @param props Component props.
|
|
79
|
-
* @param ref Component ref.
|
|
80
|
-
* @return React element.
|
|
81
|
-
*/
|
|
82
|
-
const Dropdown = forwardRef((props, ref) => {
|
|
83
|
-
const {
|
|
84
|
-
anchorRef,
|
|
85
|
-
children,
|
|
86
|
-
className,
|
|
87
|
-
closeOnClick = DEFAULT_PROPS.closeOnClick,
|
|
88
|
-
closeOnClickAway = DEFAULT_PROPS.closeOnClickAway,
|
|
89
|
-
closeOnEscape = DEFAULT_PROPS.closeOnEscape,
|
|
90
|
-
fitToAnchorWidth = DEFAULT_PROPS.fitToAnchorWidth,
|
|
91
|
-
fitWithinViewportHeight = DEFAULT_PROPS.fitWithinViewportHeight,
|
|
92
|
-
isOpen,
|
|
93
|
-
offset,
|
|
94
|
-
focusAnchorOnClose = DEFAULT_PROPS.focusAnchorOnClose,
|
|
95
|
-
onClose,
|
|
96
|
-
onInfiniteScroll,
|
|
97
|
-
placement = DEFAULT_PROPS.placement,
|
|
98
|
-
shouldFocusOnOpen = DEFAULT_PROPS.shouldFocusOnOpen,
|
|
99
|
-
zIndex,
|
|
100
|
-
...forwardedProps
|
|
101
|
-
} = props;
|
|
102
|
-
const innerRef = useRef(null);
|
|
103
|
-
const listElement = useRef(null);
|
|
104
|
-
useInfiniteScroll(innerRef, onInfiniteScroll);
|
|
105
|
-
const popperElement = useMemo(() => {
|
|
106
|
-
return !Array.isArray(children) && isComponent(List)(children) ? /*#__PURE__*/cloneElement(children, {
|
|
107
|
-
...children.props,
|
|
108
|
-
ref: listElement,
|
|
109
|
-
onClick(evt) {
|
|
110
|
-
children.props.onClick?.(evt);
|
|
111
|
-
if (closeOnClick) {
|
|
112
|
-
onClose?.();
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
isClickable: true
|
|
116
|
-
}) : children;
|
|
117
|
-
}, [children, closeOnClick, onClose]);
|
|
118
|
-
return isOpen ? /*#__PURE__*/jsx(Popover, {
|
|
119
|
-
ref: ref,
|
|
120
|
-
...forwardedProps,
|
|
121
|
-
focusAnchorOnClose: focusAnchorOnClose,
|
|
122
|
-
anchorRef: anchorRef,
|
|
123
|
-
className: classNames(className, CLASSNAME),
|
|
124
|
-
elevation: 0,
|
|
125
|
-
closeOnClickAway: closeOnClickAway,
|
|
126
|
-
closeOnEscape: closeOnEscape,
|
|
127
|
-
fitToAnchorWidth: fitToAnchorWidth,
|
|
128
|
-
fitWithinViewportHeight: fitWithinViewportHeight,
|
|
129
|
-
focusElement: shouldFocusOnOpen ? listElement : undefined,
|
|
130
|
-
isOpen: isOpen,
|
|
131
|
-
offset: offset,
|
|
132
|
-
onClose: onClose,
|
|
133
|
-
placement: placement,
|
|
134
|
-
zIndex: zIndex,
|
|
135
|
-
children: /*#__PURE__*/jsx("div", {
|
|
136
|
-
className: `${CLASSNAME}__menu`,
|
|
137
|
-
ref: innerRef,
|
|
138
|
-
children: popperElement
|
|
139
|
-
})
|
|
140
|
-
}) : null;
|
|
141
|
-
});
|
|
142
|
-
Dropdown.displayName = COMPONENT_NAME;
|
|
143
|
-
Dropdown.className = CLASSNAME;
|
|
144
|
-
Dropdown.defaultProps = DEFAULT_PROPS;
|
|
145
|
-
|
|
146
|
-
export { Dropdown };
|
|
147
|
-
//# sourceMappingURL=dropdown-0baed51b.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-0baed51b.js","sources":["../../../src/hooks/useInfiniteScroll.tsx","../../../src/components/dropdown/Dropdown.tsx"],"sourcesContent":["import { useEffect } from 'react';\n\ntype useInfiniteScrollType = (\n ref: React.RefObject<HTMLElement>,\n callback?: EventCallback,\n callbackOnMount?: boolean,\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 classNames from 'classnames';\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 { getRootClassName } from '@lumx/core/js/utils/className';\nimport { Offset, Placement } from '@lumx/react/components/popover/constants';\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 = getRootClassName(COMPONENT_NAME);\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 * @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(className, CLASSNAME)}\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={`${CLASSNAME}__menu`} ref={innerRef}>\n {popperElement}\n </div>\n </Popover>\n ) : null;\n});\nDropdown.displayName = COMPONENT_NAME;\nDropdown.className = CLASSNAME;\nDropdown.defaultProps = DEFAULT_PROPS;\n"],"names":["SCROLL_TRIGGER_MARGIN","useInfiniteScroll","ref","callback","callbackOnMount","scrollTriggerMargin","useEffect","current","undefined","isAtBottom","Boolean","scrollHeight","scrollTop","clientHeight","onScroll","e","addEventListener","removeEventListener","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","closeOnClick","closeOnClickAway","closeOnEscape","fitToAnchorWidth","fitWithinViewportHeight","placement","Placement","BOTTOM_START","shouldFocusOnOpen","focusAnchorOnClose","Dropdown","forwardRef","props","anchorRef","children","className","isOpen","offset","onClose","onInfiniteScroll","zIndex","forwardedProps","innerRef","useRef","listElement","popperElement","useMemo","Array","isArray","isComponent","List","cloneElement","onClick","evt","isClickable","_jsx","Popover","classNames","elevation","focusElement","displayName","defaultProps"],"mappings":";;;;;;;;;AASA;AACA,MAAMA,qBAAqB,GAAG,CAAC,CAAA;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAwC,GAAGA,CACpDC,GAAG,EACHC,QAAQ,EACRC,eAAe,GAAG,KAAK,EACvBC,mBAAmB,GAAGL,qBAAqB,KAC1C;AACDM,EAAAA,SAAS,CAAC,MAAM;IACZ,MAAM;AAAEC,MAAAA,OAAAA;AAAQ,KAAC,GAAGL,GAAG,CAAA;AACvB,IAAA,IAAI,CAACC,QAAQ,IAAI,CAACI,OAAO,EAAE;AACvB,MAAA,OAAOC,SAAS,CAAA;AACpB,KAAA;IAEA,MAAMC,UAAU,GAAGA,MACfC,OAAO,CACHH,OAAO,IAAIA,OAAO,CAACI,YAAY,IAAIJ,OAAO,CAACK,SAAS,GAAGL,OAAO,CAACM,YAAY,CAAC,IAAIR,mBACpF,CAAC,CAAA;IAEL,MAAMS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