@lumx/react 3.20.1-alpha.24 → 3.20.1-alpha.26
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/Button-85482487.js +98 -0
- package/_internal/Button-85482487.js.map +1 -0
- package/_internal/ButtonRoot-823f3e9c.js +117 -0
- package/_internal/ButtonRoot-823f3e9c.js.map +1 -0
- package/_internal/Chip-a34f6905.js +146 -0
- package/_internal/Chip-a34f6905.js.map +1 -0
- package/_internal/ClickAwayProvider-7093ba23.js +95 -0
- package/_internal/ClickAwayProvider-7093ba23.js.map +1 -0
- package/_internal/DisabledStateContext-ea04260d.js +29 -0
- package/_internal/DisabledStateContext-ea04260d.js.map +1 -0
- package/_internal/HeadingLevelProvider-ebdcb0c7.js +61 -0
- package/_internal/HeadingLevelProvider-ebdcb0c7.js.map +1 -0
- package/_internal/IconButton-1a22c4c8.js +77 -0
- package/_internal/IconButton-1a22c4c8.js.map +1 -0
- package/_internal/ImageCaption-a0a6de5c.js +75 -0
- package/_internal/ImageCaption-a0a6de5c.js.map +1 -0
- package/_internal/List-54237e0e.js +793 -0
- package/_internal/List-54237e0e.js.map +1 -0
- package/_internal/PopoverDialog-4ebe79f2.js +655 -0
- package/_internal/PopoverDialog-4ebe79f2.js.map +1 -0
- package/_internal/Portal-3f86608e.js +45 -0
- package/_internal/Portal-3f86608e.js.map +1 -0
- package/_internal/RawClickable-2c2b6a89.js +52 -0
- package/_internal/RawClickable-2c2b6a89.js.map +1 -0
- package/_internal/Slides-ae91d12c.js +682 -0
- package/_internal/Slides-ae91d12c.js.map +1 -0
- package/_internal/ThemeContext-3181f000.js +14 -0
- package/_internal/ThemeContext-3181f000.js.map +1 -0
- package/_internal/Thumbnail-0872250e.js +314 -0
- package/_internal/Thumbnail-0872250e.js.map +1 -0
- package/_internal/check-circle-de24f857.js +4 -0
- package/_internal/check-circle-de24f857.js.map +1 -0
- package/_internal/chevron-right-827b804a.js +6 -0
- package/_internal/chevron-right-827b804a.js.map +1 -0
- package/_internal/chevron-up-0b9c76cb.js +6 -0
- package/_internal/chevron-up-0b9c76cb.js.map +1 -0
- package/_internal/close-circle-ef5d1aac.js +4 -0
- package/_internal/close-circle-ef5d1aac.js.map +1 -0
- package/_internal/close-eaf6c45a.js +4 -0
- package/_internal/close-eaf6c45a.js.map +1 -0
- package/_internal/components/alert-dialog-0eeb06ce.js +163 -0
- package/_internal/components/alert-dialog-0eeb06ce.js.map +1 -0
- package/_internal/components/autocomplete-32170542.js +261 -0
- package/_internal/components/autocomplete-32170542.js.map +1 -0
- package/_internal/components/avatar-d2214a61.js +83 -0
- package/_internal/components/avatar-d2214a61.js.map +1 -0
- package/_internal/components/badge-8390e590.js +81 -0
- package/_internal/components/badge-8390e590.js.map +1 -0
- package/_internal/components/button-b5818c5a.js +47 -0
- package/_internal/components/button-b5818c5a.js.map +1 -0
- package/_internal/components/checkbox-346834f8.js +143 -0
- package/_internal/components/checkbox-346834f8.js.map +1 -0
- package/_internal/components/chip-e40c5521.js +102 -0
- package/_internal/components/chip-e40c5521.js.map +1 -0
- package/_internal/components/comment-block-a4997791.js +138 -0
- package/_internal/components/comment-block-a4997791.js.map +1 -0
- package/_internal/components/date-picker-48a39549.js +2 -0
- package/_internal/components/date-picker-48a39549.js.map +1 -0
- package/_internal/components/dialog-ebdb9500.js +238 -0
- package/_internal/components/dialog-ebdb9500.js.map +1 -0
- package/_internal/components/divider-116af6b9.js +50 -0
- package/_internal/components/divider-116af6b9.js.map +1 -0
- package/_internal/components/drag-handle-6b073866.js +52 -0
- package/_internal/components/drag-handle-6b073866.js.map +1 -0
- package/_internal/components/dropdown-0baed51b.js +147 -0
- package/_internal/components/dropdown-0baed51b.js.map +1 -0
- package/_internal/components/expansion-panel-80edf6c9.js +167 -0
- package/_internal/components/expansion-panel-80edf6c9.js.map +1 -0
- package/_internal/components/flag-7c9d3abf.js +59 -0
- package/_internal/components/flag-7c9d3abf.js.map +1 -0
- package/_internal/components/flex-box-55144e5f.js +56 -0
- package/_internal/components/flex-box-55144e5f.js.map +1 -0
- package/_internal/components/generic-block-ff0509ee.js +124 -0
- package/_internal/components/generic-block-ff0509ee.js.map +1 -0
- package/_internal/components/grid-6f1b5a41.js +104 -0
- package/_internal/components/grid-6f1b5a41.js.map +1 -0
- package/_internal/components/grid-column-f01df853.js +59 -0
- package/_internal/components/grid-column-f01df853.js.map +1 -0
- package/_internal/components/heading-d4c66a34.js +53 -0
- package/_internal/components/heading-d4c66a34.js.map +1 -0
- package/_internal/components/icon-7c79ab42.js +2 -0
- package/_internal/components/icon-7c79ab42.js.map +1 -0
- package/_internal/components/image-block-755d8b96.js +110 -0
- package/_internal/components/image-block-755d8b96.js.map +1 -0
- package/_internal/components/image-lightbox-d31dcd8a.js +759 -0
- package/_internal/components/image-lightbox-d31dcd8a.js.map +1 -0
- package/_internal/components/inline-list-e6f19a98.js +74 -0
- package/_internal/components/inline-list-e6f19a98.js.map +1 -0
- package/_internal/components/input-helper-64153099.js +71 -0
- package/_internal/components/input-helper-64153099.js.map +1 -0
- package/_internal/components/input-label-2feb0bb0.js +59 -0
- package/_internal/components/input-label-2feb0bb0.js.map +1 -0
- package/_internal/components/lightbox-9dbd7c15.js +155 -0
- package/_internal/components/lightbox-9dbd7c15.js.map +1 -0
- package/_internal/components/link-f9421eab.js +72 -0
- package/_internal/components/link-f9421eab.js.map +1 -0
- package/_internal/components/link-preview-5c7e3878.js +117 -0
- package/_internal/components/link-preview-5c7e3878.js.map +1 -0
- package/_internal/components/list-b08d8423.js +71 -0
- package/_internal/components/list-b08d8423.js.map +1 -0
- package/_internal/components/message-b3957df0.js +98 -0
- package/_internal/components/message-b3957df0.js.map +1 -0
- package/_internal/components/mosaic-742a9109.js +95 -0
- package/_internal/components/mosaic-742a9109.js.map +1 -0
- package/_internal/components/navigation-b1cd43c3.js +225 -0
- package/_internal/components/navigation-b1cd43c3.js.map +1 -0
- package/_internal/components/notification-94679f51.js +146 -0
- package/_internal/components/notification-94679f51.js.map +1 -0
- package/_internal/components/popover-65bfbc57.js +3 -0
- package/_internal/components/popover-65bfbc57.js.map +1 -0
- package/_internal/components/post-block-3ac52237.js +109 -0
- package/_internal/components/post-block-3ac52237.js.map +1 -0
- package/_internal/components/progress-f39c3fa2.js +182 -0
- package/_internal/components/progress-f39c3fa2.js.map +1 -0
- package/_internal/components/progress-tracker-997931ac.js +309 -0
- package/_internal/components/progress-tracker-997931ac.js.map +1 -0
- package/_internal/components/radio-button-559a4863.js +149 -0
- package/_internal/components/radio-button-559a4863.js.map +1 -0
- package/_internal/components/select-f3b44cb6.js +458 -0
- package/_internal/components/select-f3b44cb6.js.map +1 -0
- package/_internal/components/side-navigation-414825d8.js +165 -0
- package/_internal/components/side-navigation-414825d8.js.map +1 -0
- package/_internal/components/skeleton-c66516ee.js +166 -0
- package/_internal/components/skeleton-c66516ee.js.map +1 -0
- package/_internal/components/slider-efbfbc45.js +311 -0
- package/_internal/components/slider-efbfbc45.js.map +1 -0
- package/_internal/components/slideshow-dc4b79ae.js +151 -0
- package/_internal/components/slideshow-dc4b79ae.js.map +1 -0
- package/_internal/components/switch-769a2a04.js +122 -0
- package/_internal/components/switch-769a2a04.js.map +1 -0
- package/_internal/components/table-c43ec4a5.js +297 -0
- package/_internal/components/table-c43ec4a5.js.map +1 -0
- package/_internal/components/tabs-4037fe57.js +298 -0
- package/_internal/components/tabs-4037fe57.js.map +1 -0
- package/_internal/components/text-851c62f8.js +2 -0
- package/_internal/components/text-851c62f8.js.map +1 -0
- package/_internal/components/text-field-0a15a15d.js +360 -0
- package/_internal/components/text-field-0a15a15d.js.map +1 -0
- package/_internal/components/thumbnail-f1784929.js +42 -0
- package/_internal/components/thumbnail-f1784929.js.map +1 -0
- package/_internal/components/toolbar-a43533a2.js +61 -0
- package/_internal/components/toolbar-a43533a2.js.map +1 -0
- package/_internal/components/tooltip-2885ab2e.js +327 -0
- package/_internal/components/tooltip-2885ab2e.js.map +1 -0
- package/_internal/components/uploader-7bc3adaa.js +153 -0
- package/_internal/components/uploader-7bc3adaa.js.map +1 -0
- package/_internal/components/user-block-5f7b09af.js +145 -0
- package/_internal/components/user-block-5f7b09af.js.map +1 -0
- package/_internal/constants-b9e57936.js +2155 -0
- package/_internal/constants-b9e57936.js.map +1 -0
- package/_internal/constants-d0e3f49e.js +24 -0
- package/_internal/constants-d0e3f49e.js.map +1 -0
- package/_internal/context-9d1336a1.js +19 -0
- package/_internal/context-9d1336a1.js.map +1 -0
- package/_internal/forwardRef-15f62847.js +70 -0
- package/_internal/forwardRef-15f62847.js.map +1 -0
- package/_internal/getFocusableElements-230173a8.js +13 -0
- package/_internal/getFocusableElements-230173a8.js.map +1 -0
- package/_internal/index-192f8ada.js +103 -0
- package/_internal/index-192f8ada.js.map +1 -0
- package/_internal/index-9df37c0d.js +436 -0
- package/_internal/index-9df37c0d.js.map +1 -0
- package/_internal/index-b06353f2.js +117 -0
- package/_internal/index-b06353f2.js.map +1 -0
- package/_internal/information-49bbeed3.js +6 -0
- package/_internal/information-49bbeed3.js.map +1 -0
- package/_internal/isComponent-78df9309.js +20 -0
- package/_internal/isComponent-78df9309.js.map +1 -0
- package/_internal/isComponentType-e806b848.js +9 -0
- package/_internal/isComponentType-e806b848.js.map +1 -0
- package/_internal/mergeRefs-f0d7d6ea.js +30 -0
- package/_internal/mergeRefs-f0d7d6ea.js.map +1 -0
- package/{src/utils/partitionMulti.ts → _internal/partitionMulti-4daccdd5.js} +5 -9
- package/_internal/partitionMulti-4daccdd5.js.map +1 -0
- package/_internal/state-db358714.js +130 -0
- package/_internal/state-db358714.js.map +1 -0
- package/_internal/useBooleanState-2a3d237c.js +12 -0
- package/_internal/useBooleanState-2a3d237c.js.map +1 -0
- package/_internal/useCallbackOnEscape-ea4d9eb4.js +62 -0
- package/_internal/useCallbackOnEscape-ea4d9eb4.js.map +1 -0
- package/_internal/useDisableBodyScroll-36bd7352.js +219 -0
- package/_internal/useDisableBodyScroll-36bd7352.js.map +1 -0
- package/_internal/useDisableStateProps-69e16b7c.js +36 -0
- package/_internal/useDisableStateProps-69e16b7c.js.map +1 -0
- package/_internal/useFocusTrap-c3c6378b.js +112 -0
- package/_internal/useFocusTrap-c3c6378b.js.map +1 -0
- package/_internal/useId-3a1facc0.js +18 -0
- package/_internal/useId-3a1facc0.js.map +1 -0
- package/_internal/useRovingTabIndex-7daf0f24.js +77 -0
- package/_internal/useRovingTabIndex-7daf0f24.js.map +1 -0
- package/_internal/useTransitionVisibility-321fdbfa.js +50 -0
- package/_internal/useTransitionVisibility-321fdbfa.js.map +1 -0
- package/_internal/wrapChildrenIconWithSpaces-f1e91251.js +20 -0
- package/_internal/wrapChildrenIconWithSpaces-f1e91251.js.map +1 -0
- package/index.d.ts +7 -352
- package/index.js +65 -14486
- package/index.js.map +1 -1
- package/package.json +4 -11
- package/utils/index.d.ts +1 -1
- package/utils/index.js +3 -1
- package/utils/index.js.map +1 -1
- package/_internal/Falsy.d.ts +0 -7
- package/_internal/index.js +0 -236
- package/_internal/index.js.map +0 -1
- package/src/components/alert-dialog/AlertDialog.stories.tsx +0 -127
- package/src/components/alert-dialog/AlertDialog.test.tsx +0 -34
- package/src/components/alert-dialog/AlertDialog.tsx +0 -189
- package/src/components/alert-dialog/index.ts +0 -1
- package/src/components/autocomplete/Autocomplete.stories.tsx +0 -75
- package/src/components/autocomplete/Autocomplete.test.tsx +0 -99
- package/src/components/autocomplete/Autocomplete.tsx +0 -294
- package/src/components/autocomplete/AutocompleteMultiple.stories.tsx +0 -167
- package/src/components/autocomplete/AutocompleteMultiple.test.tsx +0 -61
- package/src/components/autocomplete/AutocompleteMultiple.tsx +0 -156
- package/src/components/autocomplete/__mockData__/index.ts +0 -39
- package/src/components/autocomplete/index.ts +0 -2
- package/src/components/avatar/Avatar.stories.tsx +0 -119
- package/src/components/avatar/Avatar.test.tsx +0 -32
- package/src/components/avatar/Avatar.tsx +0 -114
- package/src/components/avatar/index.ts +0 -1
- package/src/components/badge/Badge.stories.tsx +0 -69
- package/src/components/badge/Badge.test.tsx +0 -45
- package/src/components/badge/Badge.tsx +0 -58
- package/src/components/badge/BadgeWrapper.stories.tsx +0 -75
- package/src/components/badge/BadgeWrapper.test.tsx +0 -47
- package/src/components/badge/BadgeWrapper.tsx +0 -37
- package/src/components/badge/index.ts +0 -2
- package/src/components/button/Button.stories.tsx +0 -355
- package/src/components/button/Button.test.tsx +0 -125
- package/src/components/button/Button.tsx +0 -101
- package/src/components/button/ButtonGroup.stories.tsx +0 -52
- package/src/components/button/ButtonGroup.test.tsx +0 -41
- package/src/components/button/ButtonGroup.tsx +0 -50
- package/src/components/button/ButtonRoot.tsx +0 -163
- package/src/components/button/IconButton.stories.tsx +0 -52
- package/src/components/button/IconButton.test.tsx +0 -66
- package/src/components/button/IconButton.tsx +0 -91
- package/src/components/button/index.ts +0 -4
- package/src/components/checkbox/Checkbox.stories.tsx +0 -64
- package/src/components/checkbox/Checkbox.test.tsx +0 -154
- package/src/components/checkbox/Checkbox.tsx +0 -164
- package/src/components/checkbox/index.ts +0 -1
- package/src/components/chip/Chip.stories.tsx +0 -164
- package/src/components/chip/Chip.test.tsx +0 -243
- package/src/components/chip/Chip.tsx +0 -168
- package/src/components/chip/ChipGroup.stories.tsx +0 -47
- package/src/components/chip/ChipGroup.test.tsx +0 -37
- package/src/components/chip/ChipGroup.tsx +0 -60
- package/src/components/chip/index.ts +0 -2
- package/src/components/comment-block/CommentBlock.stories.tsx +0 -91
- package/src/components/comment-block/CommentBlock.test.tsx +0 -28
- package/src/components/comment-block/CommentBlock.tsx +0 -172
- package/src/components/comment-block/index.ts +0 -1
- package/src/components/date-picker/DatePicker.stories.tsx +0 -118
- package/src/components/date-picker/DatePicker.test.tsx +0 -34
- package/src/components/date-picker/DatePicker.tsx +0 -52
- package/src/components/date-picker/DatePickerControlled.test.tsx +0 -91
- package/src/components/date-picker/DatePickerControlled.tsx +0 -259
- package/src/components/date-picker/DatePickerField.stories.tsx +0 -100
- package/src/components/date-picker/DatePickerField.test.tsx +0 -70
- package/src/components/date-picker/DatePickerField.tsx +0 -135
- package/src/components/date-picker/constants.ts +0 -11
- package/src/components/date-picker/index.ts +0 -4
- package/src/components/date-picker/types.ts +0 -28
- package/src/components/dialog/Dialog.stories.tsx +0 -318
- package/src/components/dialog/Dialog.test.tsx +0 -97
- package/src/components/dialog/Dialog.tsx +0 -288
- package/src/components/dialog/index.ts +0 -1
- package/src/components/divider/Divider.test.tsx +0 -51
- package/src/components/divider/Divider.tsx +0 -50
- package/src/components/divider/index.ts +0 -1
- package/src/components/drag-handle/DragHandle.test.tsx +0 -36
- package/src/components/drag-handle/DragHandle.tsx +0 -51
- package/src/components/drag-handle/index.ts +0 -1
- package/src/components/dropdown/Dropdown.stories.tsx +0 -31
- package/src/components/dropdown/Dropdown.test.tsx +0 -66
- package/src/components/dropdown/Dropdown.tsx +0 -186
- package/src/components/dropdown/index.ts +0 -1
- package/src/components/expansion-panel/ExpansionPanel.stories.tsx +0 -91
- package/src/components/expansion-panel/ExpansionPanel.test.tsx +0 -185
- package/src/components/expansion-panel/ExpansionPanel.tsx +0 -195
- package/src/components/expansion-panel/index.ts +0 -1
- package/src/components/flag/Flag.stories.tsx +0 -48
- package/src/components/flag/Flag.test.tsx +0 -62
- package/src/components/flag/Flag.tsx +0 -52
- package/src/components/flag/index.ts +0 -1
- package/src/components/flex-box/FlexBox.stories.tsx +0 -156
- package/src/components/flex-box/FlexBox.test.tsx +0 -24
- package/src/components/flex-box/FlexBox.tsx +0 -100
- package/src/components/flex-box/index.ts +0 -1
- package/src/components/generic-block/GenericBlock.stories.jsx +0 -128
- package/src/components/generic-block/GenericBlock.test.tsx +0 -156
- package/src/components/generic-block/GenericBlock.tsx +0 -225
- package/src/components/generic-block/constants.ts +0 -9
- package/src/components/generic-block/index.ts +0 -2
- package/src/components/grid/Grid.tsx +0 -83
- package/src/components/grid/GridItem.tsx +0 -55
- package/src/components/grid/index.ts +0 -2
- package/src/components/grid-column/GridColumn.stories.tsx +0 -45
- package/src/components/grid-column/GridColumn.test.jsx +0 -56
- package/src/components/grid-column/GridColumn.tsx +0 -83
- package/src/components/grid-column/index.ts +0 -1
- package/src/components/heading/Heading.stories.tsx +0 -69
- package/src/components/heading/Heading.test.tsx +0 -82
- package/src/components/heading/Heading.tsx +0 -65
- package/src/components/heading/HeadingLevelProvider.tsx +0 -30
- package/src/components/heading/constants.ts +0 -16
- package/src/components/heading/context.tsx +0 -13
- package/src/components/heading/index.ts +0 -3
- package/src/components/heading/useHeadingLevel.tsx +0 -8
- package/src/components/icon/Icon.stories.tsx +0 -73
- package/src/components/icon/Icon.test.tsx +0 -125
- package/src/components/icon/Icon.tsx +0 -133
- package/src/components/icon/index.ts +0 -1
- package/src/components/image-block/ImageBlock.stories.tsx +0 -117
- package/src/components/image-block/ImageBlock.test.tsx +0 -58
- package/src/components/image-block/ImageBlock.tsx +0 -142
- package/src/components/image-block/ImageCaption.tsx +0 -115
- package/src/components/image-block/index.ts +0 -1
- package/src/components/image-lightbox/ImageLightbox.stories.tsx +0 -160
- package/src/components/image-lightbox/ImageLightbox.test.tsx +0 -254
- package/src/components/image-lightbox/ImageLightbox.tsx +0 -90
- package/src/components/image-lightbox/constants.ts +0 -11
- package/src/components/image-lightbox/index.ts +0 -2
- package/src/components/image-lightbox/internal/ImageSlide.tsx +0 -107
- package/src/components/image-lightbox/internal/ImageSlideshow.tsx +0 -164
- package/src/components/image-lightbox/internal/useAnimateScroll.ts +0 -55
- package/src/components/image-lightbox/internal/usePointerZoom.ts +0 -148
- package/src/components/image-lightbox/types.ts +0 -48
- package/src/components/image-lightbox/useImageLightbox.tsx +0 -141
- package/src/components/inline-list/InlineList.stories.tsx +0 -77
- package/src/components/inline-list/InlineList.test.tsx +0 -52
- package/src/components/inline-list/InlineList.tsx +0 -96
- package/src/components/inline-list/index.ts +0 -1
- package/src/components/input-helper/InputHelper.stories.tsx +0 -35
- package/src/components/input-helper/InputHelper.test.tsx +0 -55
- package/src/components/input-helper/InputHelper.tsx +0 -65
- package/src/components/input-helper/constants.ts +0 -11
- package/src/components/input-helper/index.ts +0 -1
- package/src/components/input-label/InputLabel.stories.tsx +0 -45
- package/src/components/input-label/InputLabel.test.tsx +0 -59
- package/src/components/input-label/InputLabel.tsx +0 -69
- package/src/components/input-label/index.ts +0 -1
- package/src/components/lightbox/Lightbox.stories.tsx +0 -101
- package/src/components/lightbox/Lightbox.test.tsx +0 -53
- package/src/components/lightbox/Lightbox.tsx +0 -180
- package/src/components/lightbox/index.ts +0 -1
- package/src/components/link/Link.stories.tsx +0 -195
- package/src/components/link/Link.test.tsx +0 -127
- package/src/components/link/Link.tsx +0 -106
- package/src/components/link/index.ts +0 -1
- package/src/components/link-preview/LinkPreview.stories.tsx +0 -61
- package/src/components/link-preview/LinkPreview.test.tsx +0 -105
- package/src/components/link-preview/LinkPreview.tsx +0 -158
- package/src/components/link-preview/index.ts +0 -1
- package/src/components/list/List.stories.tsx +0 -116
- package/src/components/list/List.test.tsx +0 -18
- package/src/components/list/List.tsx +0 -104
- package/src/components/list/ListDivider.stories.tsx +0 -12
- package/src/components/list/ListDivider.test.tsx +0 -22
- package/src/components/list/ListDivider.tsx +0 -35
- package/src/components/list/ListItem.stories.tsx +0 -66
- package/src/components/list/ListItem.test.tsx +0 -93
- package/src/components/list/ListItem.tsx +0 -157
- package/src/components/list/ListSubheader.stories.tsx +0 -11
- package/src/components/list/ListSubheader.test.tsx +0 -21
- package/src/components/list/ListSubheader.tsx +0 -44
- package/src/components/list/index.ts +0 -4
- package/src/components/list/useInteractiveList.tsx +0 -202
- package/src/components/message/Message.stories.tsx +0 -72
- package/src/components/message/Message.test.tsx +0 -76
- package/src/components/message/Message.tsx +0 -100
- package/src/components/message/index.ts +0 -1
- package/src/components/mosaic/Mosaic.stories.tsx +0 -89
- package/src/components/mosaic/Mosaic.test.tsx +0 -77
- package/src/components/mosaic/Mosaic.tsx +0 -98
- package/src/components/mosaic/index.ts +0 -1
- package/src/components/navigation/Navigation.stories.tsx +0 -234
- package/src/components/navigation/Navigation.test.tsx +0 -65
- package/src/components/navigation/Navigation.tsx +0 -79
- package/src/components/navigation/NavigationItem.test.tsx +0 -35
- package/src/components/navigation/NavigationItem.tsx +0 -82
- package/src/components/navigation/NavigationSection.test.tsx +0 -137
- package/src/components/navigation/NavigationSection.tsx +0 -108
- package/src/components/navigation/context.tsx +0 -7
- package/src/components/navigation/index.ts +0 -1
- package/src/components/notification/Notification.test.tsx +0 -94
- package/src/components/notification/Notification.tsx +0 -138
- package/src/components/notification/Notifications.stories.tsx +0 -92
- package/src/components/notification/constants.ts +0 -28
- package/src/components/notification/index.ts +0 -1
- package/src/components/popover/Popover.stories.tsx +0 -264
- package/src/components/popover/Popover.test.tsx +0 -62
- package/src/components/popover/Popover.tsx +0 -201
- package/src/components/popover/constants.ts +0 -62
- package/src/components/popover/index.ts +0 -3
- package/src/components/popover/usePopoverStyle.tsx +0 -184
- package/src/components/popover/useRestoreFocusOnClose.tsx +0 -47
- package/src/components/popover-dialog/PopoverDialog.stories.tsx +0 -64
- package/src/components/popover-dialog/PopoverDialog.test.tsx +0 -139
- package/src/components/popover-dialog/PopoverDialog.tsx +0 -74
- package/src/components/popover-dialog/index.tsx +0 -1
- package/src/components/post-block/PostBlock.test.tsx +0 -27
- package/src/components/post-block/PostBlock.tsx +0 -122
- package/src/components/post-block/index.ts +0 -1
- package/src/components/progress/Progress.tsx +0 -68
- package/src/components/progress/ProgressCircular.stories.tsx +0 -43
- package/src/components/progress/ProgressCircular.test.tsx +0 -46
- package/src/components/progress/ProgressCircular.tsx +0 -82
- package/src/components/progress/ProgressLinear.stories.tsx +0 -12
- package/src/components/progress/ProgressLinear.test.tsx +0 -30
- package/src/components/progress/ProgressLinear.tsx +0 -50
- package/src/components/progress/index.ts +0 -3
- package/src/components/progress-tracker/ProgressTracker.stories.tsx +0 -145
- package/src/components/progress-tracker/ProgressTracker.test.tsx +0 -42
- package/src/components/progress-tracker/ProgressTracker.tsx +0 -87
- package/src/components/progress-tracker/ProgressTrackerProvider.test.tsx +0 -65
- package/src/components/progress-tracker/ProgressTrackerProvider.tsx +0 -67
- package/src/components/progress-tracker/ProgressTrackerStep.test.tsx +0 -36
- package/src/components/progress-tracker/ProgressTrackerStep.tsx +0 -159
- package/src/components/progress-tracker/ProgressTrackerStepPanel.test.tsx +0 -34
- package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +0 -67
- package/src/components/progress-tracker/index.ts +0 -4
- package/src/components/radio-button/RadioButton.stories.tsx +0 -71
- package/src/components/radio-button/RadioButton.test.tsx +0 -143
- package/src/components/radio-button/RadioButton.tsx +0 -143
- package/src/components/radio-button/RadioGroup.stories.tsx +0 -39
- package/src/components/radio-button/RadioGroup.test.tsx +0 -29
- package/src/components/radio-button/RadioGroup.tsx +0 -44
- package/src/components/radio-button/index.ts +0 -2
- package/src/components/select/Select.stories.tsx +0 -385
- package/src/components/select/Select.test.tsx +0 -199
- package/src/components/select/Select.tsx +0 -199
- package/src/components/select/SelectMultiple.stories.tsx +0 -315
- package/src/components/select/SelectMultiple.test.tsx +0 -213
- package/src/components/select/SelectMultiple.tsx +0 -206
- package/src/components/select/WithSelectContext.tsx +0 -147
- package/src/components/select/constants.ts +0 -55
- package/src/components/select/index.ts +0 -2
- package/src/components/side-navigation/SideNavigation.stories.tsx +0 -191
- package/src/components/side-navigation/SideNavigation.test.tsx +0 -37
- package/src/components/side-navigation/SideNavigation.tsx +0 -52
- package/src/components/side-navigation/SideNavigationItem.stories.tsx +0 -133
- package/src/components/side-navigation/SideNavigationItem.test.tsx +0 -136
- package/src/components/side-navigation/SideNavigationItem.tsx +0 -165
- package/src/components/side-navigation/index.ts +0 -2
- package/src/components/skeleton/SkeletonCircle.stories.tsx +0 -41
- package/src/components/skeleton/SkeletonCircle.test.tsx +0 -27
- package/src/components/skeleton/SkeletonCircle.tsx +0 -52
- package/src/components/skeleton/SkeletonRectangle.stories.tsx +0 -82
- package/src/components/skeleton/SkeletonRectangle.test.tsx +0 -27
- package/src/components/skeleton/SkeletonRectangle.tsx +0 -88
- package/src/components/skeleton/SkeletonTypography.stories.tsx +0 -19
- package/src/components/skeleton/SkeletonTypography.test.tsx +0 -27
- package/src/components/skeleton/SkeletonTypography.tsx +0 -59
- package/src/components/skeleton/index.ts +0 -3
- package/src/components/slider/Slider.stories.tsx +0 -45
- package/src/components/slider/Slider.test.tsx +0 -29
- package/src/components/slider/Slider.tsx +0 -299
- package/src/components/slider/index.ts +0 -2
- package/src/components/slideshow/Slides.tsx +0 -130
- package/src/components/slideshow/Slideshow.stories.tsx +0 -179
- package/src/components/slideshow/Slideshow.test.tsx +0 -35
- package/src/components/slideshow/Slideshow.tsx +0 -173
- package/src/components/slideshow/SlideshowControls.stories.tsx +0 -100
- package/src/components/slideshow/SlideshowControls.tsx +0 -243
- package/src/components/slideshow/SlideshowItem.tsx +0 -44
- package/src/components/slideshow/SlideshowItemGroup.tsx +0 -60
- package/src/components/slideshow/constants.ts +0 -24
- package/src/components/slideshow/index.ts +0 -4
- package/src/components/slideshow/useKeyNavigate.ts +0 -28
- package/src/components/slideshow/usePaginationVisibleRange.ts +0 -37
- package/src/components/slideshow/useSlideFocusManagement.tsx +0 -92
- package/src/components/slideshow/useSwipeNavigate.ts +0 -18
- package/src/components/switch/Switch.stories.tsx +0 -49
- package/src/components/switch/Switch.test.tsx +0 -144
- package/src/components/switch/Switch.tsx +0 -145
- package/src/components/switch/index.ts +0 -1
- package/src/components/table/Table.test.tsx +0 -29
- package/src/components/table/Table.tsx +0 -59
- package/src/components/table/TableBody.test.tsx +0 -30
- package/src/components/table/TableBody.tsx +0 -42
- package/src/components/table/TableCell.test.tsx +0 -72
- package/src/components/table/TableCell.tsx +0 -130
- package/src/components/table/TableHeader.test.tsx +0 -30
- package/src/components/table/TableHeader.tsx +0 -48
- package/src/components/table/TableRow.test.tsx +0 -40
- package/src/components/table/TableRow.tsx +0 -71
- package/src/components/table/index.ts +0 -5
- package/src/components/tabs/Tab.test.tsx +0 -50
- package/src/components/tabs/Tab.tsx +0 -133
- package/src/components/tabs/TabList.test.tsx +0 -49
- package/src/components/tabs/TabList.tsx +0 -94
- package/src/components/tabs/TabPanel.test.tsx +0 -37
- package/src/components/tabs/TabPanel.tsx +0 -67
- package/src/components/tabs/TabProvider.test.tsx +0 -161
- package/src/components/tabs/TabProvider.tsx +0 -67
- package/src/components/tabs/Tabs.stories.tsx +0 -170
- package/src/components/tabs/index.ts +0 -4
- package/src/components/tabs/state.ts +0 -114
- package/src/components/tabs/test-utils.ts +0 -39
- package/src/components/text/Text.stories.tsx +0 -177
- package/src/components/text/Text.test.tsx +0 -92
- package/src/components/text/Text.tsx +0 -139
- package/src/components/text/index.ts +0 -1
- package/src/components/text-field/TextField.stories.tsx +0 -180
- package/src/components/text-field/TextField.test.tsx +0 -298
- package/src/components/text-field/TextField.tsx +0 -493
- package/src/components/text-field/index.ts +0 -1
- package/src/components/thumbnail/Thumbnail.stories.tsx +0 -448
- package/src/components/thumbnail/Thumbnail.test.tsx +0 -88
- package/src/components/thumbnail/Thumbnail.tsx +0 -248
- package/src/components/thumbnail/index.ts +0 -3
- package/src/components/thumbnail/types.ts +0 -48
- package/src/components/thumbnail/useFocusPointStyle.test.ts +0 -92
- package/src/components/thumbnail/useFocusPointStyle.tsx +0 -107
- package/src/components/thumbnail/useImageLoad.ts +0 -40
- package/src/components/toolbar/Toolbar.tsx +0 -68
- package/src/components/toolbar/index.ts +0 -1
- package/src/components/tooltip/Tooltip.stories.tsx +0 -118
- package/src/components/tooltip/Tooltip.test.tsx +0 -417
- package/src/components/tooltip/Tooltip.tsx +0 -165
- package/src/components/tooltip/constants.ts +0 -8
- package/src/components/tooltip/context.tsx +0 -17
- package/src/components/tooltip/index.ts +0 -1
- package/src/components/tooltip/useInjectTooltipRef.tsx +0 -55
- package/src/components/tooltip/useTooltipOpen.tsx +0 -143
- package/src/components/uploader/Uploader.stories.tsx +0 -109
- package/src/components/uploader/Uploader.test.tsx +0 -146
- package/src/components/uploader/Uploader.tsx +0 -177
- package/src/components/uploader/index.ts +0 -1
- package/src/components/user-block/UserBlock.stories.tsx +0 -133
- package/src/components/user-block/UserBlock.test.tsx +0 -106
- package/src/components/user-block/UserBlock.tsx +0 -193
- package/src/components/user-block/index.ts +0 -1
- package/src/constants.ts +0 -27
- package/src/hooks/useBooleanState.tsx +0 -13
- package/src/hooks/useCallbackOnEscape.ts +0 -34
- package/src/hooks/useChipGroupNavigation.tsx +0 -75
- package/src/hooks/useClickAway.tsx +0 -48
- package/src/hooks/useDisableBodyScroll.ts +0 -28
- package/src/hooks/useEventCallback.tsx +0 -17
- package/src/hooks/useFocus.tsx +0 -21
- package/src/hooks/useFocusTrap.ts +0 -93
- package/src/hooks/useFocusWithin.ts +0 -33
- package/src/hooks/useId.test.tsx +0 -22
- package/src/hooks/useId.ts +0 -15
- package/src/hooks/useImageSize.ts +0 -17
- package/src/hooks/useInfiniteScroll.tsx +0 -60
- package/src/hooks/useIntersectionObserver.tsx +0 -43
- package/src/hooks/useInterval.tsx +0 -31
- package/src/hooks/useKeyboardListNavigation.tsx +0 -204
- package/src/hooks/useListenFocus.tsx +0 -26
- package/src/hooks/useOverflowTooltipLabel.tsx +0 -32
- package/src/hooks/usePopper.ts +0 -12
- package/src/hooks/usePreviousValue.ts +0 -12
- package/src/hooks/useRovingTabIndex.tsx +0 -90
- package/src/hooks/useSizeOnWindowResize.ts +0 -30
- package/src/hooks/useSlideshowControls.ts +0 -246
- package/src/hooks/useStopPropagation.ts +0 -21
- package/src/hooks/useTransitionVisibility.ts +0 -48
- package/src/index.ts +0 -63
- package/src/stories/controls/color.ts +0 -7
- package/src/stories/controls/element.ts +0 -6
- package/src/stories/controls/focusPoint.ts +0 -1
- package/src/stories/controls/icons.ts +0 -126
- package/src/stories/controls/image.ts +0 -84
- package/src/stories/controls/selectArgType.ts +0 -8
- package/src/stories/controls/theme.ts +0 -3
- package/src/stories/controls/typography.ts +0 -5
- package/src/stories/controls/withUndefined.ts +0 -1
- package/src/stories/decorators/withChromaticForceScreenSize.tsx +0 -7
- package/src/stories/decorators/withCombinations.tsx +0 -132
- package/src/stories/decorators/withNestedProps.tsx +0 -22
- package/src/stories/decorators/withResizableBox.tsx +0 -21
- package/src/stories/decorators/withThemedBackground.tsx +0 -16
- package/src/stories/decorators/withValueOnChange.tsx +0 -18
- package/src/stories/decorators/withWrapper.tsx +0 -19
- package/src/stories/generated/Autocomplete/Demos.stories.tsx +0 -7
- package/src/stories/generated/Avatar/Demos.stories.tsx +0 -7
- package/src/stories/generated/Badge/Demos.stories.tsx +0 -9
- package/src/stories/generated/Button/Demos.stories.tsx +0 -11
- package/src/stories/generated/Checkbox/Demos.stories.tsx +0 -6
- package/src/stories/generated/Chip/Demos.stories.tsx +0 -11
- package/src/stories/generated/CommentBlock/Demos.stories.tsx +0 -8
- package/src/stories/generated/DatePicker/Demos.stories.tsx +0 -8
- package/src/stories/generated/Dialog/Demos.stories.tsx +0 -10
- package/src/stories/generated/Divider/Demos.stories.tsx +0 -6
- package/src/stories/generated/Dropdown/Demos.stories.tsx +0 -8
- package/src/stories/generated/ExpansionPanel/Demos.stories.tsx +0 -9
- package/src/stories/generated/Flag/Demos.stories.tsx +0 -6
- package/src/stories/generated/GenericBlock/Demos.stories.tsx +0 -8
- package/src/stories/generated/Heading/Demos.stories.tsx +0 -6
- package/src/stories/generated/Icon/Demos.stories.tsx +0 -8
- package/src/stories/generated/ImageBlock/Demos.stories.tsx +0 -9
- package/src/stories/generated/ImageLightbox/Demos.stories.tsx +0 -6
- package/src/stories/generated/Lightbox/Demos.stories.tsx +0 -6
- package/src/stories/generated/LinkPreview/Demos.stories.tsx +0 -7
- package/src/stories/generated/List/Demos.stories.tsx +0 -11
- package/src/stories/generated/Message/Demos.stories.tsx +0 -11
- package/src/stories/generated/Mosaic/Demos.stories.tsx +0 -10
- package/src/stories/generated/Notification/Demos.stories.tsx +0 -6
- package/src/stories/generated/Popover/Demos.stories.tsx +0 -11
- package/src/stories/generated/PopoverDialog/Demos.stories.tsx +0 -6
- package/src/stories/generated/PostBlock/Demos.stories.tsx +0 -6
- package/src/stories/generated/Progress/Demos.stories.tsx +0 -7
- package/src/stories/generated/ProgressTracker/Demos.stories.tsx +0 -9
- package/src/stories/generated/RadioButton/Demos.stories.tsx +0 -6
- package/src/stories/generated/Select/Demos.stories.tsx +0 -14
- package/src/stories/generated/SideNavigation/Demos.stories.tsx +0 -10
- package/src/stories/generated/Skeleton/Demos.stories.tsx +0 -9
- package/src/stories/generated/Slider/Demos.stories.tsx +0 -9
- package/src/stories/generated/Slideshow/Demos.stories.tsx +0 -8
- package/src/stories/generated/Switch/Demos.stories.tsx +0 -6
- package/src/stories/generated/Table/Demos.stories.tsx +0 -7
- package/src/stories/generated/Tabs/Demos.stories.tsx +0 -8
- package/src/stories/generated/TextField/Demos.stories.tsx +0 -20
- package/src/stories/generated/Thumbnail/Demos.stories.tsx +0 -12
- package/src/stories/generated/Toolbar/Demos.stories.tsx +0 -10
- package/src/stories/generated/Tooltip/Demos.stories.tsx +0 -8
- package/src/stories/generated/Uploader/Demos.stories.tsx +0 -8
- package/src/stories/generated/UserBlock/Demos.stories.tsx +0 -11
- package/src/stories/utils/CustomLink.tsx +0 -12
- package/src/stories/utils/concatPath.tsx +0 -17
- package/src/stories/utils/disableArgTypes.ts +0 -3
- package/src/stories/utils/initDemoShadowDOMPortal.ts +0 -10
- package/src/stories/utils/lorem.ts +0 -59
- package/src/stories/utils/theming.tsx +0 -166
- package/src/stories/utils/toFlattenProps.ts +0 -28
- package/src/stories/utils/withCategory.ts +0 -12
- package/src/testing/utils/ThemeSentinel.tsx +0 -10
- package/src/testing/utils/commonTestsSuiteRTL.tsx +0 -193
- package/src/testing/utils/index.ts +0 -1
- package/src/testing/utils/queries.ts +0 -19
- package/src/untypped-modules.d.ts +0 -9
- package/src/utils/ClickAwayProvider/ClickAwayProvider.stories.jsx +0 -70
- package/src/utils/ClickAwayProvider/ClickAwayProvider.tsx +0 -69
- package/src/utils/ClickAwayProvider/index.ts +0 -1
- package/src/utils/MaterialThemeSwitcher/MaterialThemeSwitcher.tsx +0 -54
- package/src/utils/MaterialThemeSwitcher/index.ts +0 -1
- package/src/utils/Portal/Portal.test.tsx +0 -31
- package/src/utils/Portal/Portal.tsx +0 -33
- package/src/utils/Portal/PortalProvider.stories.jsx +0 -22
- package/src/utils/Portal/PortalProvider.test.tsx +0 -72
- package/src/utils/Portal/PortalProvider.tsx +0 -24
- package/src/utils/Portal/index.tsx +0 -2
- package/src/utils/browser/DOM/findImage.tsx +0 -3
- package/src/utils/browser/DOM/startViewTransition.ts +0 -68
- package/src/utils/browser/focus/constants.ts +0 -7
- package/src/utils/browser/focus/getFirstAndLastFocusable.test.ts +0 -134
- package/src/utils/browser/focus/getFirstAndLastFocusable.ts +0 -21
- package/src/utils/browser/focus/getFocusableElements.test.ts +0 -151
- package/src/utils/browser/focus/getFocusableElements.ts +0 -7
- package/src/utils/browser/isFocusVisible.ts +0 -9
- package/src/utils/browser/isHoverNotSupported.test.js +0 -24
- package/src/utils/browser/isHoverNotSupported.ts +0 -2
- package/src/utils/browser/isReducedMotion.ts +0 -6
- package/src/utils/date/addMonthResetDay.test.ts +0 -13
- package/src/utils/date/addMonthResetDay.ts +0 -9
- package/src/utils/date/formatDayNumber.test.ts +0 -12
- package/src/utils/date/formatDayNumber.ts +0 -5
- package/src/utils/date/getFirstDayOfWeek.test.ts +0 -20
- package/src/utils/date/getFirstDayOfWeek.ts +0 -59
- package/src/utils/date/getMonthCalendar.test.ts +0 -127
- package/src/utils/date/getMonthCalendar.ts +0 -69
- package/src/utils/date/getWeekDays.test.ts +0 -48
- package/src/utils/date/getWeekDays.ts +0 -34
- package/src/utils/date/getYearDisplayName.test.ts +0 -20
- package/src/utils/date/getYearDisplayName.ts +0 -12
- package/src/utils/date/isDateValid.test.ts +0 -15
- package/src/utils/date/isDateValid.ts +0 -4
- package/src/utils/date/isSameDay.test.ts +0 -37
- package/src/utils/date/isSameDay.ts +0 -11
- package/src/utils/disabled/DisabledStateContext.tsx +0 -29
- package/src/utils/disabled/DisabledStateProvider.stories.tsx +0 -92
- package/src/utils/disabled/index.ts +0 -2
- package/src/utils/disabled/useDisableStateProps.test.tsx +0 -74
- package/src/utils/disabled/useDisableStateProps.tsx +0 -37
- package/src/utils/function/makeListenerTowerContext.ts +0 -32
- package/src/utils/index.ts +0 -7
- package/src/utils/locale/getCurrentLocale.ts +0 -4
- package/src/utils/locale/parseLocale.test.ts +0 -17
- package/src/utils/locale/parseLocale.ts +0 -23
- package/src/utils/locale/types.ts +0 -8
- package/src/utils/number/clamp.ts +0 -17
- package/src/utils/object/isEqual.test.ts +0 -25
- package/src/utils/object/isEqual.ts +0 -11
- package/src/utils/partitionMulti.test.ts +0 -27
- package/src/utils/react/OnBeforeUnmount.tsx +0 -20
- package/src/utils/react/RawClickable.test.tsx +0 -153
- package/src/utils/react/RawClickable.tsx +0 -65
- package/src/utils/react/flattenChildren.ts +0 -32
- package/src/utils/react/forwardRef.ts +0 -11
- package/src/utils/react/forwardRefPolymorphic.ts +0 -9
- package/src/utils/react/mergeRefs.ts +0 -33
- package/src/utils/react/renderLink.tsx +0 -17
- package/src/utils/react/skipRender.tsx +0 -18
- package/src/utils/react/unref.ts +0 -7
- package/src/utils/react/wrapChildrenIconWithSpaces.test.tsx +0 -37
- package/src/utils/react/wrapChildrenIconWithSpaces.tsx +0 -22
- package/src/utils/theme/ThemeContext.ts +0 -16
- package/src/utils/theme/invertTheme.ts +0 -4
- package/src/utils/type/Comp.ts +0 -14
- package/src/utils/type/ComponentRef.ts +0 -16
- package/src/utils/type/HasAriaDisabled.ts +0 -6
- package/src/utils/type/HasPolymorphicAs.ts +0 -6
- package/src/utils/type/HasRequiredLinkHref.ts +0 -1
- package/src/utils/type/MaybeElementOrRef.ts +0 -6
- package/src/utils/type/index.ts +0 -9
- package/src/utils/type/isComponent.ts +0 -33
- package/src/utils/type/isComponentType.ts +0 -9
|
@@ -0,0 +1,238 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAA,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGC,QAAQ,CAAmB,MAAM,IAAIC,GAAG,EAAE,CAAC,CAAA;AAErFC,EAAAA,SAAS,CACL,MAAM;AACF,IAAA,IAAIN,QAAQ,CAACO,MAAM,GAAG,CAAC,IAAI,CAACP,QAAQ,CAACQ,IAAI,CAACC,OAAO,CAAC,EAAE;AAChD,MAAA,OAAOC,SAAS,CAAA;AACpB,KAAA;AAEA,IAAA,MAAMC,QAAQ,GAAG,IAAIC,oBAAoB,CAAEC,OAAO,IAAK;AACnD,MAAA,KAAK,MAAMC,KAAK,IAAID,OAAO,EAAE;QACzBX,aAAa,CAACa,GAAG,CAACD,KAAK,CAACE,MAAM,EAAOF,KAAK,CAAC,CAAA;AAC/C,OAAA;AACAX,MAAAA,gBAAgB,CAAC,IAAIE,GAAG,CAACH,aAAa,CAAC,CAAC,CAAA;KAC3C,EAAED,OAAO,CAAC,CAAA;AAEX,IAAA,KAAK,MAAMgB,OAAO,IAAIjB,QAAQ,EAAE;AAC5B,MAAA,IAAIiB,OAAO,EAAE;AACTN,QAAAA,QAAQ,CAACO,OAAO,CAACD,OAAO,CAAC,CAAA;AAC7B,OAAA;AACJ,KAAA;AACA,IAAA,OAAO,MAAMN,QAAQ,CAACQ,UAAU,EAAE,CAAA;GACrC;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iBACNiD,GAAA,CAAA,KAAA,EAAA;kBAAKvD,SAAS,EAAE,CAAGb,EAAAA,SAAS,CAAqB,kBAAA,CAAA;kBAAAY,QAAA,eAC7CwD,GAAA,CAACmB,QAAQ,EAAA;oBAACC,OAAO,EAAEC,eAAe,CAACC,QAAAA;mBAAW,CAAA;AAAC,iBAC9C,CACR,CAAA;eACI,CAAA;aACM,CAAA;WAClB,CAAA;SACM,CAAA;AAAC,OACE,CAAC,CAAA;KACtB,CAAA;GACD,CAAC,GACT,IAAI,CAAA;AACZ,CAAC,EAAC;AACFnF,MAAM,CAACoF,WAAW,GAAG5F,cAAc,CAAA;AACnCQ,MAAM,CAACM,SAAS,GAAGb,SAAS,CAAA;AAC5BO,MAAM,CAACqF,YAAY,GAAG1F,aAAa;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { I as Icon } from '../index-192f8ada.js';
|
|
6
|
+
import { Theme, ColorPalette, Size } from '@lumx/core/js/constants';
|
|
7
|
+
|
|
8
|
+
const mdiDragVertical = 'M9 3h2v2H9zm4 0h2v2h-2zM9 7h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2z';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Component display name.
|
|
12
|
+
*/
|
|
13
|
+
const COMPONENT_NAME = 'DragHandle';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Component default class name and class prefix.
|
|
17
|
+
*/
|
|
18
|
+
const CLASSNAME = getRootClassName(COMPONENT_NAME);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* DragHandle component.
|
|
22
|
+
*
|
|
23
|
+
* @param props Component props.
|
|
24
|
+
* @param ref Component ref.
|
|
25
|
+
* @return React element.
|
|
26
|
+
*/
|
|
27
|
+
const DragHandle = forwardRef((props, ref) => {
|
|
28
|
+
const defaultTheme = useTheme();
|
|
29
|
+
const {
|
|
30
|
+
className,
|
|
31
|
+
theme = defaultTheme,
|
|
32
|
+
...forwardedProps
|
|
33
|
+
} = props;
|
|
34
|
+
return /*#__PURE__*/jsx("div", {
|
|
35
|
+
ref: ref,
|
|
36
|
+
...forwardedProps,
|
|
37
|
+
className: classNames(className, handleBasicClasses({
|
|
38
|
+
prefix: CLASSNAME,
|
|
39
|
+
theme
|
|
40
|
+
})),
|
|
41
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
42
|
+
icon: mdiDragVertical,
|
|
43
|
+
color: theme === Theme.dark ? ColorPalette.light : ColorPalette.dark,
|
|
44
|
+
size: Size.xs
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
DragHandle.displayName = COMPONENT_NAME;
|
|
49
|
+
DragHandle.className = CLASSNAME;
|
|
50
|
+
|
|
51
|
+
export { DragHandle };
|
|
52
|
+
//# sourceMappingURL=drag-handle-6b073866.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag-handle-6b073866.js","sources":["../../../../lumx-icons/dist/esm/drag-vertical.js","../../../src/components/drag-handle/DragHandle.tsx"],"sourcesContent":["export const mdiDragVertical = /*#__PURE__*/ 'M9 3h2v2H9zm4 0h2v2h-2zM9 7h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2zm-4 4h2v2H9zm4 0h2v2h-2z';","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":["mdiDragVertical","COMPONENT_NAME","CLASSNAME","getRootClassName","DragHandle","forwardRef","props","ref","defaultTheme","useTheme","className","theme","forwardedProps","_jsx","classNames","handleBasicClasses","prefix","children","Icon","icon","color","Theme","dark","ColorPalette","light","size","Size","xs","displayName"],"mappings":";;;;;;;AAAO,MAAMA,eAAe,GAAiB,wHAAwH;;ACcrK;AACA;AACA;AACA,MAAMC,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,EAAEnB,eAAgB;AACtBoB,MAAAA,KAAK,EAAET,KAAK,KAAKU,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;AACFvB,UAAU,CAACwB,WAAW,GAAG3B,cAAc,CAAA;AACvCG,UAAU,CAACM,SAAS,GAAGR,SAAS;;;;"}
|
|
@@ -0,0 +1,147 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,QAAQ,GAAIC,CAAS,IAAW;MAClC,IAAIN,UAAU,EAAE,EAAE;QACdN,QAAQ,CAACY,CAAC,CAAC,CAAA;AACf,OAAA;KACH,CAAA;IAED,IAAIN,UAAU,EAAE,EAAE;AACdK,MAAAA,QAAQ,EAAE,CAAA;AACd,KAAA;AAEAP,IAAAA,OAAO,CAACS,gBAAgB,CAAC,QAAQ,EAAEF,QAAQ,CAAC,CAAA;AAC5CP,IAAAA,OAAO,CAACS,gBAAgB,CAAC,QAAQ,EAAEF,QAAQ,CAAC,CAAA;AAC5C,IAAA,OAAO,MAAM;AACTP,MAAAA,OAAO,CAACU,mBAAmB,CAAC,QAAQ,EAAEH,QAAQ,CAAC,CAAA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