@lumx/react 3.0.1 → 3.0.2-alpha-react-utils.2
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/{esm/_internal/useDisableBodyScroll.js → _internal/0062d1bc.js} +1 -1
- package/_internal/0062d1bc.js.map +1 -0
- package/_internal/03e8323d.d.ts +118 -0
- package/_internal/0402f9bc.d.ts +183 -0
- package/{esm/_internal/List2.js → _internal/0b370acc.js} +7 -10
- package/_internal/0b370acc.js.map +1 -0
- package/_internal/0d154d73.d.ts +67 -0
- package/_internal/113e3b40.d.ts +31 -0
- package/{esm/_internal/InputLabel.js → _internal/12ab39e4.js} +4 -4
- package/_internal/12ab39e4.js.map +1 -0
- package/{esm/_internal/DatePickerField.js → _internal/13e759f3.js} +10 -14
- package/_internal/13e759f3.js.map +1 -0
- package/{esm/_internal/SideNavigationItem.js → _internal/158b46d5.js} +8 -8
- package/_internal/158b46d5.js.map +1 -0
- package/_internal/17b74e16.d.ts +31 -0
- package/_internal/1b1530a4.d.ts +43 -0
- package/_internal/20976405.js +87 -0
- package/_internal/20976405.js.map +1 -0
- package/_internal/20b0e9a5.d.ts +77 -0
- package/{esm/_internal/Chip2.js → _internal/26cd9c63.js} +4 -4
- package/_internal/26cd9c63.js.map +1 -0
- package/{esm/_internal/ListSubheader.js → _internal/27f21164.js} +3 -3
- package/_internal/27f21164.js.map +1 -0
- package/{esm/_internal/constants.js → _internal/288dfd0f.js} +1 -1
- package/_internal/288dfd0f.js.map +1 -0
- package/_internal/28aaf23a.d.ts +41 -0
- package/_internal/2c829c0b.d.ts +57 -0
- package/{esm/_internal/useFocusTrap.js → _internal/2cc0aec5.js} +3 -3
- package/_internal/2cc0aec5.js.map +1 -0
- package/{esm/_internal/types.js → _internal/2d0a5b28.js} +3 -3
- package/_internal/2d0a5b28.js.map +1 -0
- package/_internal/2d4b5a5e.d.ts +92 -0
- package/_internal/2d770113.d.ts +38 -0
- package/{esm/_internal/TableRow.js → _internal/2fe97f00.js} +5 -5
- package/_internal/2fe97f00.js.map +1 -0
- package/_internal/31c16fa0.d.ts +37 -0
- package/{esm/_internal/renderLink.js → _internal/329a01d3.js} +2 -2
- package/_internal/329a01d3.js.map +1 -0
- package/{esm/_internal/SkeletonTypography.js → _internal/3326e990.js} +4 -4
- package/_internal/3326e990.js.map +1 -0
- package/{esm/_internal/IconButton.js → _internal/377b2f44.js} +7 -11
- package/_internal/377b2f44.js.map +1 -0
- package/{esm/_internal/CommentBlock.js → _internal/3b8d2a6e.js} +6 -6
- package/_internal/3b8d2a6e.js.map +1 -0
- package/_internal/3bd3186e.d.ts +57 -0
- package/{esm/_internal/ImageBlock.js → _internal/48e40868.js} +5 -5
- package/_internal/48e40868.js.map +1 -0
- package/{esm/_internal/TextField.js → _internal/490ec1da.js} +10 -10
- package/_internal/490ec1da.js.map +1 -0
- package/_internal/49127d69.d.ts +52 -0
- package/{esm/_internal/Message2.js → _internal/4dcd87cb.js} +5 -5
- package/_internal/4dcd87cb.js.map +1 -0
- package/{esm/_internal/Dropdown2.js → _internal/4f44d848.js} +6 -6
- package/_internal/4f44d848.js.map +1 -0
- package/{esm/_internal/partitionMulti.js → _internal/4fc64a2e.js} +2 -2
- package/_internal/4fc64a2e.js.map +1 -0
- package/_internal/53a831be.js +108 -0
- package/_internal/53a831be.js.map +1 -0
- package/_internal/55271fa1.d.ts +34 -0
- package/_internal/55d30377.d.ts +22 -0
- package/{esm/_internal/Switch2.js → _internal/56385b04.js} +7 -7
- package/_internal/56385b04.js.map +1 -0
- package/_internal/599e250a.d.ts +88 -0
- package/_internal/5a054691.d.ts +33 -0
- package/{esm/_internal/Avatar2.js → _internal/5a127b58.js} +5 -5
- package/_internal/5a127b58.js.map +1 -0
- package/{esm/_internal/ExpansionPanel.js → _internal/5a1c0db4.js} +10 -10
- package/_internal/5a1c0db4.js.map +1 -0
- package/{esm/_internal/RadioGroup.js → _internal/5babcc39.js} +7 -7
- package/_internal/5babcc39.js.map +1 -0
- package/_internal/5c1bf4d4.d.ts +81 -0
- package/_internal/5d8ed4ee.js +113 -0
- package/_internal/5d8ed4ee.js.map +1 -0
- package/{esm/_internal/Thumbnail2.js → _internal/616f2912.js} +6 -6
- package/_internal/616f2912.js.map +1 -0
- package/_internal/61f915de.d.ts +49 -0
- package/{esm/_internal/ChipGroup.js → _internal/620081fa.js} +4 -4
- package/_internal/620081fa.js.map +1 -0
- package/{esm/_internal/_rollupPluginBabelHelpers.js → _internal/6340c129.js} +18 -2
- package/_internal/6340c129.js.map +1 -0
- package/_internal/6581c863.d.ts +34 -0
- package/_internal/66de4d45.d.ts +32 -0
- package/_internal/6735c5c8.d.ts +62 -0
- package/_internal/69dd1472.js +112 -0
- package/_internal/69dd1472.js.map +1 -0
- package/{esm/_internal/Slider2.js → _internal/6a0e1c77.js} +7 -7
- package/_internal/6a0e1c77.js.map +1 -0
- package/_internal/701c20b0.d.ts +24 -0
- package/{esm/_internal/Progress2.js → _internal/7391188a.js} +4 -4
- package/_internal/7391188a.js.map +1 -0
- package/{esm/_internal/ButtonRoot.js → _internal/74cb6c26.js} +6 -5
- package/_internal/74cb6c26.js.map +1 -0
- package/{esm/_internal/ProgressTrackerStepPanel.js → _internal/761031bf.js} +11 -9
- package/_internal/761031bf.js.map +1 -0
- package/{esm/_internal/DragHandle.js → _internal/76fed69d.js} +5 -5
- package/_internal/76fed69d.js.map +1 -0
- package/{esm/_internal/type.js → _internal/78ef8e34.js} +1 -1
- package/_internal/78ef8e34.js.map +1 -0
- package/_internal/7b906e16.d.ts +17 -0
- package/_internal/7be11ddc.d.ts +35 -0
- package/_internal/7d39705e.d.ts +20 -0
- package/{esm/_internal/useDelayedVisibility.js → _internal/7e03266f.js} +2 -2
- package/_internal/7e03266f.js.map +1 -0
- package/{esm/_internal/Button2.js → _internal/7e8d0ac5.js} +6 -6
- package/_internal/7e8d0ac5.js.map +1 -0
- package/{esm/_internal/Flag2.js → _internal/7ffa45f6.js} +5 -5
- package/_internal/7ffa45f6.js.map +1 -0
- package/{esm/_internal/AutocompleteMultiple.js → _internal/84c1ec44.js} +10 -10
- package/_internal/84c1ec44.js.map +1 -0
- package/{esm/_internal/PostBlock.js → _internal/8518279f.js} +6 -6
- package/_internal/8518279f.js.map +1 -0
- package/{esm/_internal/mergeRefs.js → _internal/853713cd.js} +1 -1
- package/_internal/853713cd.js.map +1 -0
- package/_internal/86566d75.d.ts +27 -0
- package/_internal/86d22dde.d.ts +57 -0
- package/_internal/8e755ded.d.ts +101 -0
- package/_internal/901471f5.d.ts +37 -0
- package/_internal/935ce959.d.ts +49 -0
- package/_internal/97089888.d.ts +16 -0
- package/_internal/97cc728c.d.ts +26 -0
- package/{esm/_internal/Popover2.js → _internal/9ab3c637.js} +7 -6
- package/_internal/9ab3c637.js.map +1 -0
- package/{esm/_internal/Toolbar2.js → _internal/9ca3f59c.js} +3 -3
- package/_internal/9ca3f59c.js.map +1 -0
- package/_internal/9e95ea38.d.ts +43 -0
- package/{esm/_internal/Uploader2.js → _internal/a0108f92.js} +5 -5
- package/_internal/a0108f92.js.map +1 -0
- package/_internal/a493a193.d.ts +65 -0
- package/{esm/_internal/Icon2.js → _internal/a521723d.js} +4 -4
- package/_internal/a521723d.js.map +1 -0
- package/_internal/a6fad025.d.ts +107 -0
- package/{esm/_internal/Lightbox2.js → _internal/a8fa525f.js} +13 -12
- package/_internal/a8fa525f.js.map +1 -0
- package/{esm/_internal/AlertDialog.js → _internal/aca2ecf5.js} +9 -9
- package/_internal/aca2ecf5.js.map +1 -0
- package/{esm/_internal/Divider2.js → _internal/aef2ef1c.js} +5 -5
- package/_internal/aef2ef1c.js.map +1 -0
- package/{esm/_internal/Mosaic2.js → _internal/af048b0c.js} +5 -5
- package/_internal/af048b0c.js.map +1 -0
- package/_internal/af2cd0cd.d.ts +17 -0
- package/{esm/_internal/Slides.js → _internal/afec6b62.js} +278 -87
- package/_internal/afec6b62.js.map +1 -0
- package/{esm/_internal/InputHelper.js → _internal/b0eb3a30.js} +4 -4
- package/_internal/b0eb3a30.js.map +1 -0
- package/{esm/_internal/Dialog2.js → _internal/b89517ea.js} +14 -13
- package/_internal/b89517ea.js.map +1 -0
- package/{esm/_internal/Checkbox2.js → _internal/bafa6fcc.js} +8 -8
- package/_internal/bafa6fcc.js.map +1 -0
- package/{esm/_internal/ButtonGroup.js → _internal/bbbeb49e.js} +3 -7
- package/_internal/bbbeb49e.js.map +1 -0
- package/_internal/c11f6162.d.ts +52 -0
- package/{esm/_internal/Notification2.js → _internal/c723dab4.js} +8 -8
- package/_internal/c723dab4.js.map +1 -0
- package/_internal/c87cc857.d.ts +42 -0
- package/{esm/_internal/SelectMultiple.js → _internal/c97f8d04.js} +13 -13
- package/_internal/c97f8d04.js.map +1 -0
- package/_internal/cbb373ea.d.ts +6 -0
- package/_internal/cbef23b6.d.ts +104 -0
- package/_internal/cdf77f06.d.ts +88 -0
- package/{esm/_internal/LinkPreview.js → _internal/d350f2ff.js} +6 -6
- package/_internal/d350f2ff.js.map +1 -0
- package/{esm/_internal/Badge2.js → _internal/d71a8cf7.js} +4 -4
- package/_internal/d71a8cf7.js.map +1 -0
- package/{esm/_internal/GridItem.js → _internal/d9337952.js} +4 -4
- package/_internal/d9337952.js.map +1 -0
- package/_internal/def14e1a.d.ts +24 -0
- package/_internal/e0cd29c7.d.ts +35 -0
- package/{esm/_internal/useRovingTabIndex.js → _internal/e354228f.js} +4 -81
- package/_internal/e354228f.js.map +1 -0
- package/_internal/e3922a05.d.ts +22 -0
- package/_internal/e3cb6177.d.ts +75 -0
- package/_internal/e810c841.d.ts +182 -0
- package/_internal/ea700b01.d.ts +43 -0
- package/_internal/eca6d4dc.d.ts +269 -0
- package/{esm/_internal/Link2.js → _internal/eed07003.js} +6 -6
- package/_internal/eed07003.js.map +1 -0
- package/_internal/f1c9b334.d.ts +22 -0
- package/{esm/_internal/TabPanel.js → _internal/f3c3a674.js} +9 -7
- package/_internal/f3c3a674.js.map +1 -0
- package/{esm/_internal/UserBlock.js → _internal/f571cdcd.js} +6 -6
- package/_internal/f571cdcd.js.map +1 -0
- package/{esm/_internal/Tooltip2.js → _internal/f5bdff7e.js} +8 -8
- package/_internal/f5bdff7e.js.map +1 -0
- package/_internal/f851fc00.d.ts +34 -0
- package/_internal/f859b007.d.ts +49 -0
- package/_internal/fb384b79.d.ts +38 -0
- package/_internal/fc4c034b.js +63 -0
- package/_internal/fc4c034b.js.map +1 -0
- package/{esm/index2.js → _internal/fc608bd9.js} +1 -1
- package/_internal/fc608bd9.js.map +1 -0
- package/_internal/fd1f4d68.d.ts +36 -0
- package/{esm/_internal/getRootClassName.js → _internal/fd867c9d.js} +33 -33
- package/_internal/fd867c9d.js.map +1 -0
- package/{esm/_internal/FlexBox.js → _internal/ff8081e5.js} +9 -7
- package/_internal/ff8081e5.js.map +1 -0
- package/{esm/_internal/GenericBlock.js → _internal/ffd1bfe3.js} +7 -9
- package/_internal/ffd1bfe3.js.map +1 -0
- package/components/alert-dialog.d.ts +6 -0
- package/components/alert-dialog.js +2 -0
- package/{esm/_internal → components}/alert-dialog.js.map +1 -1
- package/components/autocomplete.d.ts +8 -0
- package/components/autocomplete.js +2 -0
- package/{esm/_internal → components}/autocomplete.js.map +1 -1
- package/components/avatar.d.ts +4 -0
- package/components/avatar.js +2 -0
- package/{esm/_internal → components}/avatar.js.map +1 -1
- package/components/badge.d.ts +3 -0
- package/components/badge.js +2 -0
- package/{esm/_internal → components}/badge.js.map +1 -1
- package/components/button.d.ts +8 -0
- package/components/button.js +4 -0
- package/{esm/_internal → components}/button.js.map +1 -1
- package/components/checkbox.d.ts +3 -0
- package/components/checkbox.js +2 -0
- package/{esm/_internal → components}/checkbox.js.map +1 -1
- package/components/chip.d.ts +3 -0
- package/components/chip.js +3 -0
- package/{esm/_internal → components}/chip.js.map +1 -1
- package/components/comment-block.d.ts +5 -0
- package/components/comment-block.js +2 -0
- package/{esm/_internal → components}/comment-block.js.map +1 -1
- package/components/date-picker.d.ts +7 -0
- package/components/date-picker.js +2 -0
- package/{esm/_internal → components}/date-picker.js.map +1 -1
- package/components/dialog.d.ts +3 -0
- package/components/dialog.js +2 -0
- package/{esm/_internal → components}/dialog.js.map +1 -1
- package/components/divider.d.ts +3 -0
- package/components/divider.js +2 -0
- package/{esm/_internal → components}/divider.js.map +1 -1
- package/components/drag-handle.d.ts +3 -0
- package/components/drag-handle.js +2 -0
- package/{esm/_internal → components}/drag-handle.js.map +1 -1
- package/components/dropdown.d.ts +4 -0
- package/components/dropdown.js +2 -0
- package/{esm/_internal → components}/dropdown.js.map +1 -1
- package/components/expansion-panel.d.ts +7 -0
- package/components/expansion-panel.js +2 -0
- package/components/expansion-panel.js.map +1 -0
- package/components/flag.d.ts +3 -0
- package/components/flag.js +2 -0
- package/{esm/_internal → components}/flag.js.map +1 -1
- package/components/flex-box.d.ts +3 -0
- package/components/flex-box.js +2 -0
- package/{esm/_internal → components}/flex-box.js.map +1 -1
- package/components/generic-block.d.ts +4 -0
- package/components/generic-block.js +2 -0
- package/{esm/_internal → components}/generic-block.js.map +1 -1
- package/components/grid.d.ts +3 -0
- package/components/grid.js +2 -0
- package/{esm/_internal → components}/grid.js.map +1 -1
- package/components/heading.d.ts +4 -0
- package/components/heading.js +2 -0
- package/components/heading.js.map +1 -0
- package/components/icon.d.ts +3 -0
- package/components/icon.js +2 -0
- package/{esm/_internal → components}/icon.js.map +1 -1
- package/components/image-block.d.ts +4 -0
- package/components/image-block.js +2 -0
- package/{esm/_internal → components}/image-block.js.map +1 -1
- package/components/input-helper.d.ts +3 -0
- package/components/input-helper.js +2 -0
- package/{esm/_internal → components}/input-helper.js.map +1 -1
- package/components/input-label.d.ts +3 -0
- package/components/input-label.js +2 -0
- package/{esm/_internal → components}/input-label.js.map +1 -1
- package/components/lightbox.d.ts +7 -0
- package/components/lightbox.js +2 -0
- package/{esm/_internal → components}/lightbox.js.map +1 -1
- package/components/link-preview.d.ts +5 -0
- package/components/link-preview.js +2 -0
- package/{esm/_internal → components}/link-preview.js.map +1 -1
- package/components/link.d.ts +3 -0
- package/components/link.js +2 -0
- package/{esm/_internal → components}/link.js.map +1 -1
- package/components/list.d.ts +3 -0
- package/components/list.js +3 -0
- package/{esm/_internal → components}/list.js.map +1 -1
- package/components/message.d.ts +3 -0
- package/components/message.js +2 -0
- package/{esm/_internal → components}/message.js.map +1 -1
- package/components/mosaic.d.ts +4 -0
- package/components/mosaic.js +2 -0
- package/{esm/_internal → components}/mosaic.js.map +1 -1
- package/components/notification.d.ts +3 -0
- package/components/notification.js +2 -0
- package/{esm/_internal → components}/notification.js.map +1 -1
- package/components/popover.d.ts +3 -0
- package/components/popover.js +2 -0
- package/{esm/_internal → components}/popover.js.map +1 -1
- package/components/post-block.d.ts +4 -0
- package/components/post-block.js +2 -0
- package/{esm/_internal → components}/post-block.js.map +1 -1
- package/components/progress-tracker.d.ts +3 -0
- package/components/progress-tracker.js +2 -0
- package/{esm/_internal → components}/progress-tracker.js.map +1 -1
- package/components/progress.d.ts +3 -0
- package/components/progress.js +2 -0
- package/{esm/_internal → components}/progress.js.map +1 -1
- package/components/radio-button.d.ts +3 -0
- package/components/radio-button.js +2 -0
- package/{esm/_internal → components}/radio-button.js.map +1 -1
- package/components/select.d.ts +7 -0
- package/components/select.js +2 -0
- package/{esm/_internal → components}/select.js.map +1 -1
- package/components/side-navigation.d.ts +7 -0
- package/components/side-navigation.js +2 -0
- package/{esm/_internal → components}/side-navigation.js.map +1 -1
- package/components/skeleton.d.ts +3 -0
- package/components/skeleton.js +2 -0
- package/{esm/_internal → components}/skeleton.js.map +1 -1
- package/components/slider.d.ts +3 -0
- package/components/slider.js +2 -0
- package/{esm/_internal → components}/slider.js.map +1 -1
- package/components/slideshow.d.ts +7 -0
- package/components/slideshow.js +2 -0
- package/{esm/_internal → components}/slideshow.js.map +1 -1
- package/components/switch.d.ts +3 -0
- package/components/switch.js +2 -0
- package/{esm/_internal → components}/switch.js.map +1 -1
- package/components/table.d.ts +3 -0
- package/components/table.js +2 -0
- package/{esm/_internal → components}/table.js.map +1 -1
- package/components/tabs.d.ts +4 -0
- package/components/tabs.js +2 -0
- package/{esm/_internal → components}/tabs.js.map +1 -1
- package/components/text-field.d.ts +7 -0
- package/components/text-field.js +2 -0
- package/{esm/_internal → components}/text-field.js.map +1 -1
- package/components/text.d.ts +3 -0
- package/components/text.js +2 -0
- package/components/text.js.map +1 -0
- package/components/thumbnail.d.ts +4 -0
- package/components/thumbnail.js +3 -0
- package/{esm/_internal → components}/thumbnail.js.map +1 -1
- package/components/toolbar.d.ts +3 -0
- package/components/toolbar.js +2 -0
- package/{esm/_internal → components}/toolbar.js.map +1 -1
- package/components/tooltip.d.ts +4 -0
- package/components/tooltip.js +2 -0
- package/{esm/_internal → components}/tooltip.js.map +1 -1
- package/components/uploader.d.ts +3 -0
- package/components/uploader.js +2 -0
- package/{esm/_internal → components}/uploader.js.map +1 -1
- package/components/user-block.d.ts +5 -0
- package/components/user-block.js +2 -0
- package/{esm/_internal → components}/user-block.js.map +1 -1
- package/components.d.ts +2 -0
- package/{esm/_internal/components.js → components.js} +2 -1
- package/components.js.map +1 -0
- package/index.d.ts +56 -0
- package/index.js +57 -0
- package/{esm/index.js.map → index.js.map} +1 -1
- package/package.json +7 -7
- package/src/components/alert-dialog/AlertDialog.tsx +2 -1
- package/src/components/autocomplete/Autocomplete.tsx +2 -2
- package/src/components/autocomplete/AutocompleteMultiple.tsx +2 -1
- package/src/components/avatar/Avatar.tsx +2 -1
- package/src/components/badge/Badge.test.tsx +1 -1
- package/src/components/badge/Badge.tsx +2 -1
- package/src/components/button/Button.test.tsx +1 -1
- package/src/components/button/Button.tsx +2 -1
- package/src/components/button/ButtonGroup.tsx +2 -1
- package/src/components/button/ButtonRoot.test.tsx +1 -1
- package/src/components/button/ButtonRoot.tsx +2 -1
- package/src/components/button/IconButton.tsx +2 -1
- package/src/components/checkbox/Checkbox.test.tsx +1 -1
- package/src/components/checkbox/Checkbox.tsx +2 -1
- package/src/components/chip/Chip.test.tsx +1 -1
- package/src/components/chip/Chip.tsx +3 -1
- package/src/components/chip/ChipGroup.tsx +2 -1
- package/src/components/comment-block/CommentBlock.tsx +2 -1
- package/src/components/date-picker/DatePicker.tsx +1 -1
- package/src/components/date-picker/DatePickerControlled.tsx +1 -1
- package/src/components/date-picker/DatePickerField.tsx +1 -1
- package/src/components/date-picker/constants.ts +1 -1
- package/src/components/date-picker/types.ts +1 -1
- package/src/components/dialog/Dialog.tsx +4 -8
- package/src/components/divider/Divider.test.tsx +1 -1
- package/src/components/divider/Divider.tsx +3 -2
- package/src/components/drag-handle/DragHandle.tsx +2 -1
- package/src/components/dropdown/Dropdown.tsx +2 -1
- package/src/components/expansion-panel/ExpansionPanel.test.tsx +1 -1
- package/src/components/expansion-panel/ExpansionPanel.tsx +3 -10
- package/src/components/flag/Flag.test.tsx +1 -1
- package/src/components/flag/Flag.tsx +2 -1
- package/src/components/flex-box/FlexBox.stories.tsx +68 -4
- package/src/components/flex-box/FlexBox.tsx +14 -7
- package/src/components/flex-box/__snapshots__/FlexBox.test.tsx.snap +51 -0
- package/src/components/generic-block/GenericBlock.stories.jsx +23 -1
- package/src/components/generic-block/GenericBlock.tsx +3 -1
- package/src/components/grid/Grid.tsx +2 -1
- package/src/components/grid/GridItem.tsx +2 -1
- package/src/components/heading/Heading.stories.tsx +108 -0
- package/src/components/heading/Heading.test.tsx +77 -0
- package/src/components/heading/Heading.tsx +63 -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.test.tsx +1 -1
- package/src/components/icon/Icon.tsx +2 -1
- package/src/components/image-block/ImageBlock.tsx +2 -1
- package/src/components/index.ts +2 -1
- package/src/components/input-helper/InputHelper.tsx +2 -1
- package/src/components/input-label/InputLabel.tsx +2 -1
- package/src/components/lightbox/Lightbox.tsx +2 -1
- package/src/components/link/Link.tsx +2 -1
- package/src/components/link-preview/LinkPreview.test.tsx +1 -1
- package/src/components/link-preview/LinkPreview.tsx +2 -1
- package/src/components/list/List.tsx +2 -1
- package/src/components/list/ListDivider.tsx +2 -1
- package/src/components/list/ListItem.tsx +3 -8
- package/src/components/list/ListSubheader.tsx +2 -1
- package/src/components/list/useInteractiveList.tsx +1 -1
- package/src/components/message/Message.test.tsx +1 -1
- package/src/components/message/Message.tsx +2 -1
- package/src/components/mosaic/Mosaic.tsx +2 -1
- package/src/components/notification/Notification.tsx +2 -1
- package/src/components/popover/Popover.tsx +2 -1
- package/src/components/post-block/PostBlock.tsx +2 -1
- package/src/components/progress/Progress.tsx +2 -1
- package/src/components/progress-tracker/ProgressTracker.tsx +2 -1
- package/src/components/progress-tracker/ProgressTrackerStep.test.tsx +1 -1
- package/src/components/progress-tracker/ProgressTrackerStep.tsx +2 -1
- package/src/components/progress-tracker/ProgressTrackerStepPanel.tsx +2 -1
- package/src/components/radio-button/RadioButton.test.tsx +1 -1
- package/src/components/radio-button/RadioButton.tsx +2 -1
- package/src/components/radio-button/RadioGroup.tsx +2 -1
- package/src/components/select/Select.test.tsx +1 -1
- package/src/components/select/Select.tsx +2 -1
- package/src/components/select/SelectMultiple.test.tsx +1 -1
- package/src/components/select/SelectMultiple.tsx +2 -1
- package/src/components/select/WithSelectContext.tsx +1 -1
- package/src/components/select/constants.ts +1 -1
- package/src/components/side-navigation/SideNavigation.tsx +2 -1
- package/src/components/side-navigation/SideNavigationItem.test.tsx +1 -1
- package/src/components/side-navigation/SideNavigationItem.tsx +3 -9
- package/src/components/skeleton/SkeletonCircle.tsx +2 -1
- package/src/components/skeleton/SkeletonRectangle.tsx +2 -1
- package/src/components/skeleton/SkeletonTypography.tsx +2 -1
- package/src/components/slider/Slider.tsx +2 -1
- package/src/components/slideshow/Slides.tsx +35 -4
- package/src/components/slideshow/Slideshow.stories.tsx +98 -2
- package/src/components/slideshow/Slideshow.tsx +16 -4
- package/src/components/slideshow/SlideshowControls.stories.tsx +1 -1
- package/src/components/slideshow/SlideshowControls.tsx +51 -12
- package/src/components/slideshow/SlideshowItem.tsx +2 -6
- package/src/components/slideshow/SlideshowItemGroup.tsx +64 -0
- package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +4 -1
- package/src/components/slideshow/useSlideFocusManagement.tsx +92 -0
- package/src/components/switch/Switch.test.tsx +1 -1
- package/src/components/switch/Switch.tsx +2 -1
- package/src/components/table/Table.tsx +2 -1
- package/src/components/table/TableBody.tsx +2 -1
- package/src/components/table/TableCell.tsx +3 -1
- package/src/components/table/TableHeader.tsx +2 -1
- package/src/components/table/TableRow.tsx +2 -1
- package/src/components/tabs/Tab.test.tsx +1 -1
- package/src/components/tabs/Tab.tsx +2 -1
- package/src/components/tabs/TabList.test.tsx +1 -1
- package/src/components/tabs/TabList.tsx +2 -1
- package/src/components/tabs/TabPanel.tsx +2 -1
- package/src/components/text/Text.stories.tsx +80 -0
- package/src/components/text/Text.test.tsx +62 -0
- package/src/components/text/Text.tsx +95 -0
- package/src/components/text/index.ts +1 -0
- package/src/components/text-field/TextField.test.tsx +1 -1
- package/src/components/text-field/TextField.tsx +2 -1
- package/src/components/thumbnail/Thumbnail.tsx +2 -1
- package/src/components/thumbnail/types.ts +1 -1
- package/src/components/toolbar/Toolbar.tsx +2 -1
- package/src/components/tooltip/Tooltip.tsx +2 -1
- package/src/components/tooltip/useTooltipOpen.tsx +1 -1
- package/src/components/uploader/Uploader.test.tsx +1 -1
- package/src/components/uploader/Uploader.tsx +2 -1
- package/src/components/user-block/UserBlock.tsx +2 -1
- package/src/hooks/useCallbackOnEscape.ts +2 -1
- package/src/hooks/useClickAway.tsx +1 -1
- package/src/hooks/useDisableBodyScroll.ts +1 -1
- package/src/hooks/useFocusTrap.ts +1 -1
- package/src/hooks/useInterval.tsx +1 -1
- package/src/hooks/useOnResize.ts +1 -1
- package/src/hooks/useRovingTabIndex.tsx +9 -0
- package/src/index.ts +6 -0
- package/src/testing/utils/commonTestsSuite.ts +1 -1
- package/src/utils/{getRootClassName.ts → className.ts} +2 -0
- package/src/utils/event.ts +1 -0
- package/src/utils/focus/constants.ts +5 -0
- package/src/utils/focus/getFirstAndLastFocusable.ts +4 -10
- package/src/utils/focus/getFocusableElements.test.ts +151 -0
- package/src/utils/focus/getFocusableElements.ts +7 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/utils.test.ts +1 -1
- package/types.d.ts +96 -11
- package/utils/index.d.ts +29 -0
- package/utils/index.js +2 -0
- package/utils/index.js.map +1 -0
- package/esm/_internal/AlertDialog.js.map +0 -1
- package/esm/_internal/AutocompleteMultiple.js.map +0 -1
- package/esm/_internal/Avatar2.js.map +0 -1
- package/esm/_internal/Badge2.js.map +0 -1
- package/esm/_internal/Button2.js.map +0 -1
- package/esm/_internal/ButtonGroup.js.map +0 -1
- package/esm/_internal/ButtonRoot.js.map +0 -1
- package/esm/_internal/Checkbox2.js.map +0 -1
- package/esm/_internal/Chip2.js.map +0 -1
- package/esm/_internal/ChipGroup.js.map +0 -1
- package/esm/_internal/ClickAwayProvider.js +0 -213
- package/esm/_internal/ClickAwayProvider.js.map +0 -1
- package/esm/_internal/CommentBlock.js.map +0 -1
- package/esm/_internal/DatePickerField.js.map +0 -1
- package/esm/_internal/Dialog2.js.map +0 -1
- package/esm/_internal/Divider2.js.map +0 -1
- package/esm/_internal/DragHandle.js.map +0 -1
- package/esm/_internal/Dropdown2.js.map +0 -1
- package/esm/_internal/ExpansionPanel.js.map +0 -1
- package/esm/_internal/Flag2.js.map +0 -1
- package/esm/_internal/FlexBox.js.map +0 -1
- package/esm/_internal/GenericBlock.js.map +0 -1
- package/esm/_internal/GridItem.js.map +0 -1
- package/esm/_internal/Icon2.js.map +0 -1
- package/esm/_internal/IconButton.js.map +0 -1
- package/esm/_internal/ImageBlock.js.map +0 -1
- package/esm/_internal/InputHelper.js.map +0 -1
- package/esm/_internal/InputLabel.js.map +0 -1
- package/esm/_internal/Lightbox2.js.map +0 -1
- package/esm/_internal/Link2.js.map +0 -1
- package/esm/_internal/LinkPreview.js.map +0 -1
- package/esm/_internal/List2.js.map +0 -1
- package/esm/_internal/ListSubheader.js.map +0 -1
- package/esm/_internal/Message2.js.map +0 -1
- package/esm/_internal/Mosaic2.js.map +0 -1
- package/esm/_internal/Notification2.js.map +0 -1
- package/esm/_internal/Popover2.js.map +0 -1
- package/esm/_internal/PostBlock.js.map +0 -1
- package/esm/_internal/Progress2.js.map +0 -1
- package/esm/_internal/ProgressTrackerStepPanel.js.map +0 -1
- package/esm/_internal/RadioGroup.js.map +0 -1
- package/esm/_internal/SelectMultiple.js.map +0 -1
- package/esm/_internal/SideNavigationItem.js.map +0 -1
- package/esm/_internal/SkeletonTypography.js.map +0 -1
- package/esm/_internal/Slider2.js.map +0 -1
- package/esm/_internal/Slides.js.map +0 -1
- package/esm/_internal/Switch2.js.map +0 -1
- package/esm/_internal/TabPanel.js.map +0 -1
- package/esm/_internal/TableRow.js.map +0 -1
- package/esm/_internal/TextField.js.map +0 -1
- package/esm/_internal/Thumbnail2.js.map +0 -1
- package/esm/_internal/Toolbar2.js.map +0 -1
- package/esm/_internal/Tooltip2.js.map +0 -1
- package/esm/_internal/Uploader2.js.map +0 -1
- package/esm/_internal/UserBlock.js.map +0 -1
- package/esm/_internal/_rollupPluginBabelHelpers.js.map +0 -1
- package/esm/_internal/alert-dialog.js +0 -34
- package/esm/_internal/autocomplete.js +0 -32
- package/esm/_internal/avatar.js +0 -13
- package/esm/_internal/badge.js +0 -10
- package/esm/_internal/button.js +0 -25
- package/esm/_internal/checkbox.js +0 -14
- package/esm/_internal/chip.js +0 -12
- package/esm/_internal/comment-block.js +0 -24
- package/esm/_internal/components.js.map +0 -1
- package/esm/_internal/constants.js.map +0 -1
- package/esm/_internal/date-picker.js +0 -32
- package/esm/_internal/dialog.js +0 -27
- package/esm/_internal/divider.js +0 -10
- package/esm/_internal/drag-handle.js +0 -11
- package/esm/_internal/dropdown.js +0 -21
- package/esm/_internal/expansion-panel.js +0 -32
- package/esm/_internal/expansion-panel.js.map +0 -1
- package/esm/_internal/flag.js +0 -11
- package/esm/_internal/flex-box.js +0 -11
- package/esm/_internal/generic-block.js +0 -20
- package/esm/_internal/getRootClassName.js.map +0 -1
- package/esm/_internal/grid.js +0 -10
- package/esm/_internal/icon.js +0 -10
- package/esm/_internal/image-block.js +0 -14
- package/esm/_internal/input-helper.js +0 -10
- package/esm/_internal/input-label.js +0 -10
- package/esm/_internal/lightbox.js +0 -27
- package/esm/_internal/link-preview.js +0 -15
- package/esm/_internal/link.js +0 -12
- package/esm/_internal/list.js +0 -15
- package/esm/_internal/mergeRefs.js.map +0 -1
- package/esm/_internal/message.js +0 -11
- package/esm/_internal/mosaic.js +0 -14
- package/esm/_internal/notification.js +0 -18
- package/esm/_internal/partitionMulti.js.map +0 -1
- package/esm/_internal/popover.js +0 -15
- package/esm/_internal/post-block.js +0 -15
- package/esm/_internal/progress-tracker.js +0 -16
- package/esm/_internal/progress.js +0 -10
- package/esm/_internal/radio-button.js +0 -13
- package/esm/_internal/renderLink.js.map +0 -1
- package/esm/_internal/select.js +0 -31
- package/esm/_internal/side-navigation.js +0 -25
- package/esm/_internal/skeleton.js +0 -10
- package/esm/_internal/slider.js +0 -13
- package/esm/_internal/slideshow.js +0 -27
- package/esm/_internal/switch.js +0 -13
- package/esm/_internal/table.js +0 -12
- package/esm/_internal/tabs.js +0 -14
- package/esm/_internal/text-field.js +0 -26
- package/esm/_internal/thumbnail.js +0 -13
- package/esm/_internal/toolbar.js +0 -9
- package/esm/_internal/tooltip.js +0 -18
- package/esm/_internal/type.js.map +0 -1
- package/esm/_internal/types.js.map +0 -1
- package/esm/_internal/uploader.js +0 -11
- package/esm/_internal/useDelayedVisibility.js.map +0 -1
- package/esm/_internal/useDisableBodyScroll.js.map +0 -1
- package/esm/_internal/useFocusTrap.js.map +0 -1
- package/esm/_internal/useRovingTabIndex.js.map +0 -1
- package/esm/_internal/user-block.js +0 -17
- package/esm/index.js +0 -91
- package/esm/index2.js.map +0 -1
- package/src/utils/index.tsx +0 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as _objectWithoutProperties, c as _extends, _ as _objectSpread2 } from './
|
|
2
|
-
import { Emphasis, Size, Theme } from '
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends, _ as _objectSpread2 } from './6340c129.js';
|
|
2
|
+
import { Emphasis, Size, Theme } from '../components.js';
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
|
-
import { g as getRootClassName, c as classnames, a as getBasicClass } from './
|
|
5
|
-
import { I as Icon } from './
|
|
4
|
+
import { g as getRootClassName, c as classnames, a as getBasicClass } from './fd867c9d.js';
|
|
5
|
+
import { I as Icon } from './a521723d.js';
|
|
6
6
|
import isEmpty from 'lodash/isEmpty';
|
|
7
|
-
import { B as ButtonRoot } from './
|
|
7
|
+
import { B as ButtonRoot } from './74cb6c26.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Button emphasis definition.
|
|
@@ -81,4 +81,4 @@ Button.className = CLASSNAME;
|
|
|
81
81
|
Button.defaultProps = DEFAULT_PROPS;
|
|
82
82
|
|
|
83
83
|
export { ButtonEmphasis as B, Button as a };
|
|
84
|
-
//# sourceMappingURL=
|
|
84
|
+
//# sourceMappingURL=7e8d0ac5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7e8d0ac5.js","sources":["../../src/components/button/Button.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from 'react';\n\nimport classNames from 'classnames';\nimport isEmpty from 'lodash/isEmpty';\n\nimport { Emphasis, Icon, Size, Theme } from '@lumx/react';\nimport { Comp } from '@lumx/react/utils/type';\nimport { getBasicClass, getRootClassName } from '@lumx/react/utils/className';\nimport { BaseButtonProps, ButtonRoot } from './ButtonRoot';\n\n/**\n * Button emphasis definition.\n * @deprecated Use Emphasis instead.\n */\nexport const ButtonEmphasis = Emphasis;\n\n/**\n * Defines the props of the component.\n */\nexport interface ButtonProps extends BaseButtonProps {\n /** Button content. */\n children?: ReactNode;\n /** Left icon (SVG path). */\n leftIcon?: string;\n /** Right icon (SVG path). */\n rightIcon?: string;\n /** When `true`, the button gets as large as possible. */\n fullWidth?: boolean;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Button';\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<ButtonProps> = {\n emphasis: Emphasis.high,\n size: Size.m,\n theme: Theme.light,\n};\n\n/**\n * Button component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Button: Comp<ButtonProps, HTMLButtonElement | HTMLAnchorElement> = forwardRef((props, ref) => {\n const { children, className, emphasis, leftIcon, rightIcon, size, theme, ...forwardedProps } = props;\n\n const buttonClassName = classNames(\n className,\n getBasicClass({ prefix: CLASSNAME, type: 'hasLeftIcon', value: !isEmpty(leftIcon) }),\n getBasicClass({ prefix: CLASSNAME, type: 'hasRightIcon', value: !isEmpty(rightIcon) }),\n );\n\n return (\n <ButtonRoot\n ref={ref}\n {...{ emphasis, size, theme, ...forwardedProps }}\n className={buttonClassName}\n variant=\"button\"\n >\n {leftIcon && !isEmpty(leftIcon) && <Icon icon={leftIcon} />}\n {children && <span>{children}</span>}\n {rightIcon && !isEmpty(rightIcon) && <Icon icon={rightIcon} />}\n </ButtonRoot>\n );\n});\nButton.displayName = COMPONENT_NAME;\nButton.className = CLASSNAME;\nButton.defaultProps = DEFAULT_PROPS;\n"],"names":["ButtonEmphasis","Emphasis","COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","emphasis","high","size","Size","m","theme","Theme","light","Button","forwardRef","props","ref","children","className","leftIcon","rightIcon","forwardedProps","buttonClassName","classNames","getBasicClass","prefix","type","value","isEmpty","displayName","defaultProps"],"mappings":";;;;;;;;AAUA;;;;;IAIaA,cAAc,GAAGC;AAE9B;;;;AAcA;;;AAGA,IAAMC,c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IAAAA,KAAK,EAALA;AAF1B,KAEoCW,cAFpC;AAGI,IAAA,SAAS,EAAEC,eAHf;AAII,IAAA,OAAO,EAAC;AAJZ,MAMKH,QAAQ,IAAI,CAACS,OAAO,CAACT,QAAD,CAApB,IAAkC,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAEA;AAAZ,IANvC,EAOKF,QAAQ,IAAI,kCAAOA,QAAP,CAPjB,EAQKG,SAAS,IAAI,CAACQ,OAAO,CAACR,SAAD,CAArB,IAAoC,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAEA;AAAZ,IARzC,CADJ;AAYH,CArByF;AAsB1FP,MAAM,CAACgB,WAAP,GAAqB5B,cAArB;AACAY,MAAM,CAACK,SAAP,GAAmBhB,SAAnB;AACAW,MAAM,CAACiB,YAAP,GAAsB1B,aAAtB;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as _objectWithoutProperties, c as _extends } from './
|
|
2
|
-
import { Size, Theme, ColorPalette } from '
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './6340c129.js';
|
|
2
|
+
import { Size, Theme, ColorPalette } from '../components.js';
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
|
-
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './
|
|
5
|
-
import { I as Icon } from './
|
|
4
|
+
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './fd867c9d.js';
|
|
5
|
+
import { I as Icon } from './a521723d.js';
|
|
6
6
|
|
|
7
7
|
var COMPONENT_NAME = 'Flag';
|
|
8
8
|
var CLASSNAME = getRootClassName(COMPONENT_NAME);
|
|
@@ -45,4 +45,4 @@ Flag.className = CLASSNAME;
|
|
|
45
45
|
Flag.defaultProps = DEFAULT_PROPS;
|
|
46
46
|
|
|
47
47
|
export { Flag as F };
|
|
48
|
-
//# sourceMappingURL=
|
|
48
|
+
//# sourceMappingURL=7ffa45f6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"7ffa45f6.js","sources":["../../src/components/flag/Flag.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport classNames from 'classnames';\n\nimport { ColorPalette, Icon, Size, Theme } from '@lumx/react';\nimport { Comp, GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';\n\nexport interface FlagProps extends GenericProps, HasTheme {\n /** Color of the component. */\n color?: ColorPalette;\n /** Icon to use before the label. */\n icon?: string;\n /** Text label of the flag. */\n label: string;\n}\n\nconst COMPONENT_NAME = 'Flag';\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\nconst DEFAULT_PROPS: Partial<FlagProps> = {\n theme: Theme.light,\n};\n\n/**\n * Flag component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Flag: Comp<FlagProps, HTMLDivElement> = forwardRef((props, ref) => {\n const { label, icon, color, className, theme, ...forwardedProps } = props;\n const flagColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);\n\n return (\n <div\n {...forwardedProps}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, color: flagColor }))}\n ref={ref}\n >\n {icon && <Icon icon={icon} size={Size.xxs} className={`${CLASSNAME}__icon`} />}\n <span className={`${CLASSNAME}__label`}>{label}</span>\n </div>\n );\n});\nFlag.displayName = COMPONENT_NAME;\nFlag.className = CLASSNAME;\nFlag.defaultProps = DEFAULT_PROPS;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","theme","Theme","light","Flag","forwardRef","props","ref","label","icon","color","className","forwardedProps","flagColor","ColorPalette","dark","classNames","handleBasicClasses","prefix","Size","xxs","displayName","defaultProps"],"mappings":";;;;;;AAgBA,IAAMA,cAAc,GAAG,MAAvB;AACA,IAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAD,CAAlC;AACA,IAAMG,aAAiC,GAAG;AACtCC,EAAAA,KAAK,EAAEC,KAAK,CAACC;AADyB,CAA1C;AAIA;;;;;;;;IAOaC,IAAqC,GAAGC,UAAU,CAAC,UAACC,KAAD,EAAQC,GAAR,EAAgB;AAAA,MACpEC,KADoE,GACRF,KADQ,CACpEE,KADoE;AAAA,MAC7DC,IAD6D,GACRH,KADQ,CAC7DG,IAD6D;AAAA,MACvDC,KADuD,GACRJ,KADQ,CACvDI,KADuD;AAAA,MAChDC,SADgD,GACRL,KADQ,CAChDK,SADgD;AAAA,MACrCV,KADqC,GACRK,KADQ,CACrCL,KADqC;AAAA,MAC3BW,cAD2B,4BACRN,KADQ;;AAE5E,MAAMO,SAAS,GAAGH,KAAK,KAAKT,KAAK,KAAKC,KAAK,CAACC,KAAhB,GAAwBW,YAAY,CAACC,IAArC,GAA4CD,YAAY,CAACX,KAA9D,CAAvB;AAEA,SACI,wCACQS,cADR;AAEI,IAAA,SAAS,EAAEI,UAAU,CAACL,SAAD,EAAYM,kBAAkB,CAAC;AAAEC,MAAAA,MAAM,EAAEpB,SAAV;AAAqBY,MAAAA,KAAK,EAAEG;AAA5B,KAAD,CAA9B,CAFzB;AAGI,IAAA,GAAG,EAAEN;AAHT,MAKKE,IAAI,IAAI,oBAAC,IAAD;AAAM,IAAA,IAAI,EAAEA,IAAZ;AAAkB,IAAA,IAAI,EAAEU,IAAI,CAACC,GAA7B;AAAkC,IAAA,SAAS,YAAKtB,SAAL;AAA3C,IALb,EAMI;AAAM,IAAA,SAAS,YAAKA,SAAL;AAAf,KAAyCU,KAAzC,CANJ,CADJ;AAUH,CAd8D;AAe/DJ,IAAI,CAACiB,WAAL,GAAmBxB,cAAnB;AACAO,IAAI,CAACO,SAAL,GAAiBb,SAAjB;AACAM,IAAI,CAACkB,YAAL,GAAoBtB,aAApB;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { b as _objectWithoutProperties, c as _extends } from './
|
|
2
|
-
import { Size } from '
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './6340c129.js';
|
|
2
|
+
import { Size } from '../components.js';
|
|
3
3
|
import React, { forwardRef, useRef } from 'react';
|
|
4
|
-
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './
|
|
5
|
-
import { I as Icon, d as mdiClose } from './
|
|
6
|
-
import { u as useFocus } from './
|
|
7
|
-
import { m as mergeRefs } from './
|
|
8
|
-
import { C as Chip } from './
|
|
9
|
-
import { D as Dropdown } from './
|
|
10
|
-
import { T as TextField } from './
|
|
4
|
+
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './fd867c9d.js';
|
|
5
|
+
import { I as Icon, d as mdiClose } from './a521723d.js';
|
|
6
|
+
import { u as useFocus } from './9ab3c637.js';
|
|
7
|
+
import { m as mergeRefs } from './853713cd.js';
|
|
8
|
+
import { C as Chip } from './26cd9c63.js';
|
|
9
|
+
import { D as Dropdown } from './4f44d848.js';
|
|
10
|
+
import { T as TextField } from './490ec1da.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Defines the props of the component.
|
|
@@ -254,4 +254,4 @@ AutocompleteMultiple.className = CLASSNAME$1;
|
|
|
254
254
|
AutocompleteMultiple.defaultProps = DEFAULT_PROPS$1;
|
|
255
255
|
|
|
256
256
|
export { Autocomplete as A, AutocompleteMultiple as a };
|
|
257
|
-
//# sourceMappingURL=
|
|
257
|
+
//# sourceMappingURL=84c1ec44.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"84c1ec44.js","sources":["../../src/components/autocomplete/Autocomplete.tsx","../../src/components/autocomplete/AutocompleteMultiple.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode, SyntheticEvent, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { Dropdown, IconButtonProps, Offset, Placement, TextField, TextFieldProps } from '@lumx/react';\n\nimport { Comp, GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';\nimport { useFocus } from '@lumx/react/hooks/useFocus';\nimport { mergeRefs } from '@lumx/react/utils/mergeRefs';\n\n/**\n * Defines the props of the component.\n */\nexport interface AutocompleteProps extends GenericProps, HasTheme {\n /**\n * Whether the suggestions list should display anchored to the input or to the wrapper.\n * @see {@link DropdownProps#anchorToInput}\n */\n anchorToInput?: boolean;\n /**\n * Props to pass to the clear button (minus those already set by the TextField props).\n * If not specified, the button won't be displayed.\n * @see {@link TextFieldProps#clearButtonProps}\n */\n clearButtonProps?: Pick<IconButtonProps, 'label'> &\n Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;\n /**\n * Reference to the <input> or <textarea> element.\n * @see {@link TextFieldProps#inputRef}\n */\n inputRef?: TextFieldProps['inputRef'];\n /**\n * The offset that will be applied to the Dropdown position.\n * @see {@link DropdownProps#offset}\n */\n offset?: Offset;\n /**\n * The preferred Dropdown location against the anchor element.\n * @see {@link DropdownProps#placement}\n */\n placement?: Placement;\n /**\n * Whether the dropdown should fit to the anchor width or not.\n * @see {@link DropdownProps#fitToAnchorWidth}\n */\n fitToAnchorWidth?: boolean;\n /**\n * The error related to the component.\n * @see {@link TextFieldProps#error}\n */\n error?: string | ReactNode;\n /**\n * Whether the text field is displayed with error style or not.\n * @see {@link TextFieldProps#hasError}\n */\n hasError?: boolean;\n /**\n * Whether the text box should be focused upon closing the suggestions or not.\n */\n shouldFocusOnClose?: boolean;\n /**\n * The helper message of the text field.\n * @see {@link TextFieldProps#helper}\n */\n helper?: string;\n /**\n * The icon of the text field (SVG path).\n * @see {@link TextFieldProps#icon}\n */\n icon?: string;\n /**\n * Whether the component is disabled or not.\n * @see {@link TextFieldProps#isDisabled}\n */\n isDisabled?: boolean;\n /**\n * Whether the component is required or not.\n * @see {@link TextFieldProps#isRequired}\n */\n isRequired?: boolean;\n /**\n * Whether the text field is displayed with valid style or not.\n * @see {@link TextFieldProps#isValid}\n */\n isValid?: boolean;\n /**\n * The label of the text field displayed in a label tag.\n * @see {@link TextFieldProps#label}\n */\n label?: string;\n /**\n * The placeholder message of the text field.\n * @see {@link TextFieldProps#placeholder}\n */\n placeholder?: string;\n /** List of suggestions to display during autocomplete. */\n children: React.ReactNode;\n /**\n * The list of chips to be displayed before the text field input.\n */\n chips?: React.ReactNode;\n /**\n * The value of the text field.\n * @see {@link TextFieldProps#value}\n */\n value: string;\n /**\n * Whether the suggestions from the autocomplete should be displayed or not.\n * @see {@link DropdownProps#isOpen}\n */\n isOpen: boolean;\n /**\n * The native input name property.\n * @see {@link TextFieldProps#name}\n */\n name?: string;\n /**\n * Whether a click in the Autocomplete dropdown would close it or not.\n * @see {@link DropdownProps#closeOnClick}\n */\n closeOnClick?: boolean;\n /**\n * Whether a click anywhere out of the Autocomplete would close it or not.\n * @see {@link DropdownProps#closeOnClickAway}\n */\n closeOnClickAway?: boolean;\n /**\n * Whether an escape key press would close the Autocomplete or not.\n * @see {@link DropdownProps#closeOnEscape}\n */\n closeOnEscape?: boolean;\n /**\n * The function called on blur.\n * @see {@link TextFieldProps#onBlur}\n */\n onBlur?(event: React.FocusEvent): void;\n /**\n * On change callback.\n * @see {@link TextFieldProps#onChange}\n */\n onChange(value: string, name?: string, event?: SyntheticEvent): void;\n /**\n * The function called on close.\n * @see {@link DropdownProps#onClose}\n */\n onClose?(): void;\n /**\n * The function called on focus.\n * @see {@link TextFieldProps#onFocus}\n */\n onFocus?(event: React.FocusEvent): void;\n /**\n * The function called when the bottom of the dropdown is reached.\n * @see {@link DropdownProps#onInfiniteScroll}\n */\n onInfiniteScroll?(): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'Autocomplete';\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<AutocompleteProps> = {\n anchorToInput: false,\n closeOnClick: false,\n closeOnClickAway: true,\n closeOnEscape: true,\n shouldFocusOnClose: false,\n};\n\n/**\n * Autocomplete component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Autocomplete: Comp<AutocompleteProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n anchorToInput,\n children,\n chips,\n className,\n closeOnClick,\n closeOnClickAway,\n closeOnEscape,\n disabled,\n error,\n fitToAnchorWidth,\n hasError,\n helper,\n icon,\n inputRef,\n clearButtonProps,\n isDisabled = disabled,\n isRequired,\n isOpen,\n isValid,\n label,\n name,\n offset,\n onBlur,\n onChange,\n onClose,\n onFocus,\n onInfiniteScroll,\n placeholder,\n placement,\n shouldFocusOnClose,\n theme,\n value,\n ...forwardedProps\n } = props;\n const inputAnchorRef = useRef<HTMLElement>(null);\n const textFieldRef = useRef(null);\n useFocus(inputAnchorRef.current, !isOpen && shouldFocusOnClose);\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames(\n className,\n handleBasicClasses({\n prefix: CLASSNAME,\n }),\n )}\n >\n <TextField\n chips={chips}\n error={error}\n hasError={hasError}\n helper={helper}\n icon={icon}\n inputRef={mergeRefs(inputAnchorRef as React.RefObject<HTMLInputElement>, inputRef)}\n clearButtonProps={clearButtonProps}\n isDisabled={isDisabled}\n isRequired={isRequired}\n isValid={isValid}\n label={label}\n name={name}\n onBlur={onBlur}\n onChange={onChange}\n onFocus={onFocus}\n placeholder={placeholder}\n textFieldRef={textFieldRef}\n theme={theme}\n value={value}\n />\n <Dropdown\n anchorRef={anchorToInput ? inputAnchorRef : textFieldRef}\n closeOnClick={closeOnClick}\n closeOnClickAway={closeOnClickAway}\n closeOnEscape={closeOnEscape}\n fitToAnchorWidth={fitToAnchorWidth}\n isOpen={isOpen}\n offset={offset}\n onClose={onClose}\n onInfiniteScroll={onInfiniteScroll}\n placement={placement}\n shouldFocusOnOpen={false}\n theme={theme}\n >\n {children}\n </Dropdown>\n </div>\n );\n});\nAutocomplete.displayName = COMPONENT_NAME;\nAutocomplete.className = CLASSNAME;\nAutocomplete.defaultProps = DEFAULT_PROPS;\n","import { mdiClose } from '@lumx/icons';\nimport { Autocomplete, AutocompleteProps, Chip, HorizontalAlignment, Icon, Size } from '@lumx/react';\n\nimport { Comp } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';\n\nimport classNames from 'classnames';\nimport React, { forwardRef, ReactNode } from 'react';\n\n/**\n * Defines the props of the component.\n */\nexport interface AutocompleteMultipleProps extends AutocompleteProps {\n /** Selected values. */\n values: any[];\n /** Alignment of the chips in the autocomplete. */\n chipsAlignment?: HorizontalAlignment;\n /** Selected value render function. Default: Renders the value inside of a Chip. */\n selectedChipRender(\n choice: any,\n index: number,\n onClear?: (event: React.MouseEvent, choice: any) => void,\n isDisabled?: boolean,\n ): ReactNode | string;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'AutocompleteMultiple';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<AutocompleteMultipleProps> = {\n closeOnClickAway: true,\n closeOnEscape: true,\n selectedChipRender(choice, index, onClear, isDisabled) {\n const onClick = (event: React.MouseEvent) => onClear && onClear(event, choice);\n return (\n <Chip\n key={index}\n after={onClear && <Icon icon={mdiClose} size={Size.xxs} />}\n isDisabled={isDisabled}\n size={Size.s}\n onAfterClick={onClick}\n onClick={onClick}\n >\n {choice}\n </Chip>\n );\n },\n values: [],\n};\n\n/**\n * AutocompleteMultiple component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const AutocompleteMultiple: Comp<AutocompleteMultipleProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n anchorToInput,\n children,\n // `chipsAlignment` needs to be here to remove it from `forwardedProps`.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n chipsAlignment,\n className,\n closeOnClickAway,\n closeOnEscape,\n fitToAnchorWidth,\n hasError,\n helper,\n icon,\n inputRef,\n clearButtonProps,\n isDisabled,\n isRequired,\n isOpen,\n isValid,\n label,\n name,\n offset,\n onBlur,\n onChange,\n onClear,\n onClose,\n onFocus,\n onInfiniteScroll,\n onKeyDown,\n placeholder,\n placement,\n selectedChipRender,\n shouldFocusOnClose,\n theme,\n type,\n value,\n values,\n ...forwardedProps\n } = props;\n\n return (\n <Autocomplete\n ref={ref}\n {...forwardedProps}\n anchorToInput={anchorToInput}\n className={classNames(\n className,\n handleBasicClasses({\n prefix: CLASSNAME,\n }),\n )}\n name={name}\n value={value}\n onChange={onChange}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n shouldFocusOnClose={shouldFocusOnClose}\n onFocus={onFocus}\n hasError={hasError}\n helper={helper}\n icon={icon}\n inputRef={inputRef}\n chips={values && values.map((chip: any, index: number) => selectedChipRender(chip, index, onClear))}\n isDisabled={isDisabled}\n isRequired={isRequired}\n clearButtonProps={clearButtonProps}\n isValid={isValid}\n label={label}\n placeholder={placeholder}\n theme={theme}\n type={type}\n isOpen={isOpen}\n closeOnClick={false}\n closeOnClickAway={closeOnClickAway}\n closeOnEscape={closeOnEscape}\n onClose={onClose}\n offset={offset}\n placement={placement}\n fitToAnchorWidth={fitToAnchorWidth}\n onInfiniteScroll={onInfiniteScroll}\n >\n {children}\n </Autocomplete>\n );\n});\nAutocompleteMultiple.displayName = COMPONENT_NAME;\nAutocompleteMultiple.className = CLASSNAME;\nAutocompleteMultiple.defaultProps = DEFAULT_PROPS;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","anchorToInput","closeOnClick","closeOnClickAway","closeOnEscape","shouldFocusOnClose","Autocomplete","forwardRef","props","ref","children","chips","className","disabled","error","fitToAnchorWidth","hasError","helper","icon","inputRef","clearButtonProps","isDisabled","isRequired","isOpen","isValid","label","name","offset","onBlur","onChange","onClose","onFocus","onInfiniteScroll","placeholder","placement","theme","value","forwardedProps","inputAnchorRef","useRef","textFieldRef","useFocus","current","classNames","handleBasicClasses","prefix","mergeRefs","displayName","defaultProps","selectedChipRender","choice","index","onClear","onClick","event","mdiClose","Size","xxs","s","values","AutocompleteMultiple","chipsAlignment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A8D,oBAAoB,CAACZ,YAArB,GAAoChD,eAApC;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { b as _objectWithoutProperties, c as _extends } from './
|
|
2
|
-
import { Orientation, Theme } from '
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './6340c129.js';
|
|
2
|
+
import { Orientation, Theme } from '../components.js';
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
|
-
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './
|
|
4
|
+
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './fd867c9d.js';
|
|
5
5
|
import isObject from 'lodash/isObject';
|
|
6
|
-
import { T as Thumbnail } from './
|
|
7
|
-
import { a as ThumbnailVariant } from './
|
|
6
|
+
import { T as Thumbnail } from './616f2912.js';
|
|
7
|
+
import { a as ThumbnailVariant } from './2d0a5b28.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Defines the props of the component.
|
|
@@ -93,4 +93,4 @@ PostBlock.className = CLASSNAME;
|
|
|
93
93
|
PostBlock.defaultProps = DEFAULT_PROPS;
|
|
94
94
|
|
|
95
95
|
export { PostBlock as P };
|
|
96
|
-
//# sourceMappingURL=
|
|
96
|
+
//# sourceMappingURL=8518279f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"8518279f.js","sources":["../../src/components/post-block/PostBlock.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from 'react';\n\nimport classNames from 'classnames';\n\nimport isObject from 'lodash/isObject';\n\nimport { Orientation, Theme, Thumbnail, ThumbnailProps, ThumbnailVariant } from '@lumx/react';\n\nimport { Comp, GenericProps, HasTheme } from '@lumx/react/utils/type';\nimport { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';\n\n/**\n * Defines the props of the component.\n */\nexport interface PostBlockProps extends GenericProps, HasTheme {\n /** Action toolbar content. */\n actions?: ReactNode;\n /** Attachment content. */\n attachments?: ReactNode;\n /** Author content. */\n author?: ReactNode;\n /** Metadata content. */\n meta?: ReactNode;\n /** Orientation. */\n orientation?: Orientation;\n /** Tag content. */\n tags?: ReactNode;\n /** Content (string, or sanitized html). */\n text?: string | { __html: string };\n /** Thumbnail. */\n thumbnailProps?: ThumbnailProps;\n /** Title. */\n title: string;\n /** On click callback. */\n onClick?(): void;\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'PostBlock';\n\n/**\n * Component default class name and class prefix.\n */\nconst CLASSNAME = getRootClassName(COMPONENT_NAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<PostBlockProps> = {\n orientation: Orientation.horizontal,\n theme: Theme.light,\n};\n\n/**\n * PostBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const PostBlock: Comp<PostBlockProps, HTMLDivElement> = forwardRef((props, ref) => {\n const {\n actions,\n attachments,\n author,\n className,\n meta,\n onClick,\n orientation,\n tags,\n text,\n theme,\n thumbnailProps,\n title,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, orientation, theme }))}\n {...forwardedProps}\n >\n {thumbnailProps && (\n <div className={`${CLASSNAME}__thumbnail`}>\n <Thumbnail {...thumbnailProps} theme={theme} variant={ThumbnailVariant.rounded} />\n </div>\n )}\n\n <div className={`${CLASSNAME}__wrapper`}>\n {author && <div className={`${CLASSNAME}__author`}>{author}</div>}\n\n {title && (\n <button type=\"button\" className={`${CLASSNAME}__title`} onClick={onClick}>\n {title}\n </button>\n )}\n\n {meta && <span className={`${CLASSNAME}__meta`}>{meta}</span>}\n\n {isObject(text) && text.__html ? (\n // eslint-disable-next-line react/no-danger\n <p dangerouslySetInnerHTML={text} className={`${CLASSNAME}__text`} />\n ) : (\n <p className={`${CLASSNAME}__text`}>{text}</p>\n )}\n\n {attachments && <div className={`${CLASSNAME}__attachments`}>{attachments}</div>}\n {(tags || actions) && (\n <div className={`${CLASSNAME}__toolbar`}>\n {tags && <div className={`${CLASSNAME}__tags`}>{tags}</div>}\n {actions && <div className={`${CLASSNAME}__actions`}>{actions}</div>}\n </div>\n )}\n </div>\n </div>\n );\n});\nPostBlock.displayName = COMPONENT_NAME;\nPostBlock.className = CLASSNAME;\nPostBlock.defaultProps = DEFAULT_PROPS;\n"],"names":["COMPONENT_NAME","CLASSNAME","getRootClassName","DEFAULT_PROPS","orientation","Orientation","horizontal","theme","Theme","light","PostBlock","forwardRef","props","ref","actions","attachments","author","className","meta","onClick","tags","text","thumbnailProps","title","forwardedProps","classNames","handleBasicClasses","prefix","ThumbnailVariant","rounded","isObject","__html","displayName","defaultProps"],"mappings":";;;;;;;;AAWA;;;;AA0BA;;;AAGA,IAAMA,cAAc,GAAG,WAAvB;AAEA;;;;AAGA,IAAMC,SAAS,GAAGC,gBAAgB,CAACF,cAAD,CAAlC;AAEA;;;;AAGA,IAAMG,aAAsC,GAAG;AAC3CC,EAAAA,WAAW,EAAEC,WAAW,CAACC,UADkB;AAE3CC,EAAAA,KAAK,EAAEC,KAAK,CAACC;AAF8B,CAA/C;AAKA;;;;;;;;IAOaC,SAA+C,GAAGC,UAAU,CAAC,UAACC,KAAD,EAAQC,GAAR,EAAgB;AAAA,MAElFC,OAFkF,GAelFF,KAfkF,CAElFE,OAFkF;AAAA,MAGlFC,WAHkF,GAelFH,KAfkF,CAGlFG,WAHkF;AAAA,MAIlFC,MAJkF,GAelFJ,KAfkF,CAIlFI,MAJkF;AAAA,MAKlFC,SALkF,GAelFL,KAfkF,CAKlFK,SALkF;AAAA,MAMlFC,IANkF,GAelFN,KAfkF,CAMlFM,IANkF;AAAA,MAOlFC,OAPkF,GAelFP,KAfkF,CAOlFO,OAPkF;AAAA,MAQlFf,WARkF,GAelFQ,KAfkF,CAQlFR,WARkF;AAAA,MASlFgB,IATkF,GAelFR,KAfkF,CASlFQ,IATkF;AAAA,MAUlFC,IAVkF,GAelFT,KAfkF,CAUlFS,IAVkF;AAAA,MAWlFd,KAXkF,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lBpB,EAmBK,CAACK,IAAI,IAAIN,OAAT,KACG;AAAK,IAAA,SAAS,YAAKb,SAAL;AAAd,KACKmB,IAAI,IAAI;AAAK,IAAA,SAAS,YAAKnB,SAAL;AAAd,KAAuCmB,IAAvC,CADb,EAEKN,OAAO,IAAI;AAAK,IAAA,SAAS,YAAKb,SAAL;AAAd,KAA0Ca,OAA1C,CAFhB,CApBR,CAXJ,CADJ;AAwCH,CAzDwE;AA0DzEJ,SAAS,CAACsB,WAAV,GAAwBhC,cAAxB;AACAU,SAAS,CAACO,SAAV,GAAsBhB,SAAtB;AACAS,SAAS,CAACuB,YAAV,GAAyB9B,aAAzB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"853713cd.js","sources":["../../src/utils/mergeRefs.ts"],"sourcesContent":["import { Falsy } from '@lumx/react/utils/type';\nimport { MutableRefObject } from 'react';\n\ntype FnRef<T> = (value: T) => void;\n\n/**\n * Merge refs into a single function ref.\n *\n * @param refs React references to merge.\n * @return the merged ref.\n */\nexport function mergeRefs<T>(...refs: Array<MutableRefObject<T | null> | FnRef<T> | Falsy>): FnRef<T> {\n return (value) =>\n refs.forEach((ref) => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n // eslint-disable-next-line no-param-reassign\n (ref as MutableRefObject<T>).current = value;\n }\n });\n}\n"],"names":["mergeRefs","refs","value","forEach","ref","current"],"mappings":"AAKA;;;;;;AAMO,SAASA,SAAT,GAA+F;AAAA,oCAAtEC,IAAsE;AAAtEA,IAAAA,IAAsE;AAAA;;AAClG,SAAO,UAACC,KAAD;AAAA,WACHD,IAAI,CAACE,OAAL,CAAa,UAACC,GAAD,EAAS;AAClB,UAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;AAC3BA,QAAAA,GAAG,CAACF,KAAD,CAAH;AACH,OAFD,MAEO,IAAIE,GAAJ,EAAS;AACZ;AACCA,QAAAA,GAAD,CAA6BC,OAA7B,GAAuCH,KAAvC;AACH;AACJ,KAPD,CADG;AAAA,GAAP;AASH;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { n as ValueOf, l as GenericProps, m as HasTheme, k as Comp } from './eca6d4dc.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Progress variants.
|
|
5
|
+
*/
|
|
6
|
+
declare const ProgressVariant: {
|
|
7
|
+
readonly linear: "linear";
|
|
8
|
+
readonly circular: "circular";
|
|
9
|
+
};
|
|
10
|
+
declare type ProgressVariant = ValueOf<typeof ProgressVariant>;
|
|
11
|
+
/**
|
|
12
|
+
* Defines the props of the component.
|
|
13
|
+
*/
|
|
14
|
+
interface ProgressProps extends GenericProps, HasTheme {
|
|
15
|
+
/** Progress variant. */
|
|
16
|
+
variant?: ProgressVariant;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Progress component.
|
|
20
|
+
*
|
|
21
|
+
* @param props Component props.
|
|
22
|
+
* @param ref Component ref.
|
|
23
|
+
* @return React element.
|
|
24
|
+
*/
|
|
25
|
+
declare const Progress: Comp<ProgressProps, HTMLDivElement>;
|
|
26
|
+
|
|
27
|
+
export { ProgressVariant as P, ProgressProps as a, Progress as b };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { n as ValueOf, l as GenericProps, m as HasTheme, k as Comp } from './eca6d4dc.js';
|
|
3
|
+
import { a as AvatarProps } from './ea700b01.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Comment block variants.
|
|
7
|
+
*/
|
|
8
|
+
declare const CommentBlockVariant: {
|
|
9
|
+
readonly indented: "indented";
|
|
10
|
+
readonly linear: "linear";
|
|
11
|
+
};
|
|
12
|
+
declare type CommentBlockVariant = ValueOf<typeof CommentBlockVariant>;
|
|
13
|
+
/**
|
|
14
|
+
* Defines the props of the component.
|
|
15
|
+
*/
|
|
16
|
+
interface CommentBlockProps extends GenericProps, HasTheme {
|
|
17
|
+
/** Action toolbar content. */
|
|
18
|
+
actions?: ReactNode;
|
|
19
|
+
/** Props to pass to the avatar. */
|
|
20
|
+
avatarProps: AvatarProps;
|
|
21
|
+
/** Comment block replies. */
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/** Comment date with the minimal timestamp informations (xx minutes, x hours, yesterday, 6 days, Month Day, Month Day Year)*/
|
|
24
|
+
date: string;
|
|
25
|
+
/** Comment date with the full timestamp informations (day, month, year, time) */
|
|
26
|
+
fullDate?: string;
|
|
27
|
+
/** Whether the component has actions to display or not. */
|
|
28
|
+
hasActions?: boolean;
|
|
29
|
+
/** Action toolbar header content. */
|
|
30
|
+
headerActions?: ReactNode;
|
|
31
|
+
/** Whether the component is open or not. */
|
|
32
|
+
isOpen?: boolean;
|
|
33
|
+
/** Whether the comment is relevant or not. */
|
|
34
|
+
isRelevant?: boolean;
|
|
35
|
+
/** Comment author name. */
|
|
36
|
+
name: string;
|
|
37
|
+
/** On click callback. */
|
|
38
|
+
onClick?(): void;
|
|
39
|
+
/** On mouse enter callback. */
|
|
40
|
+
onMouseEnter?(): void;
|
|
41
|
+
/** On mouse leave callback. */
|
|
42
|
+
onMouseLeave?(): void;
|
|
43
|
+
/** Comment content. */
|
|
44
|
+
text: ReactNode | string;
|
|
45
|
+
/** Comment variant. */
|
|
46
|
+
variant?: CommentBlockVariant;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* CommentBlock component.
|
|
50
|
+
*
|
|
51
|
+
* @param props Component props.
|
|
52
|
+
* @param ref Component ref.
|
|
53
|
+
* @return React element.
|
|
54
|
+
*/
|
|
55
|
+
declare const CommentBlock: Comp<CommentBlockProps, HTMLDivElement>;
|
|
56
|
+
|
|
57
|
+
export { CommentBlockVariant as C, CommentBlockProps as a, CommentBlock as b };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { l as GenericProps, k as Comp } from './eca6d4dc.js';
|
|
3
|
+
|
|
4
|
+
interface ProgressTrackerProviderProps {
|
|
5
|
+
/** Active step index. */
|
|
6
|
+
activeStepIndex?: number;
|
|
7
|
+
/** ProgressTrackerProvider children. */
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Step panel children should not render if the step panel is hidden. */
|
|
10
|
+
isLazy?: boolean;
|
|
11
|
+
/** Activate tabs on focus. */
|
|
12
|
+
shouldActivateOnFocus?: boolean;
|
|
13
|
+
/** Step change callback. */
|
|
14
|
+
onChange?(index: number): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This component provides a context in which steps can be defined and linked to their step panel.
|
|
18
|
+
*
|
|
19
|
+
* It does not produce any markup so you can wrap it around any React elements and then split the ProgressTracker and ProgressTrackerPanel
|
|
20
|
+
* components in the react tree.
|
|
21
|
+
*
|
|
22
|
+
* This works exactly as TabProvider so it uses TabProviderContext and tabs state.
|
|
23
|
+
*
|
|
24
|
+
* @param props React component props.
|
|
25
|
+
* @return React element.
|
|
26
|
+
*/
|
|
27
|
+
declare const ProgressTrackerProvider: React.FC<ProgressTrackerProviderProps>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Defines the props of the component.
|
|
31
|
+
*/
|
|
32
|
+
interface ProgressTrackerProps extends GenericProps {
|
|
33
|
+
/** ARIA label (purpose of the set of steps). */
|
|
34
|
+
['aria-label']: string;
|
|
35
|
+
/** Step list. */
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* ProgressTracker component.
|
|
40
|
+
*
|
|
41
|
+
* Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
42
|
+
*
|
|
43
|
+
* @param props Component props.
|
|
44
|
+
* @param ref Component ref.
|
|
45
|
+
* @return React element.
|
|
46
|
+
*/
|
|
47
|
+
declare const ProgressTracker: Comp<ProgressTrackerProps, HTMLDivElement>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Defines the props of the component.
|
|
51
|
+
*/
|
|
52
|
+
interface ProgressTrackerStepProps extends GenericProps {
|
|
53
|
+
/** Children are not supported. */
|
|
54
|
+
children?: never;
|
|
55
|
+
/** Whether the step should be in error state or not. */
|
|
56
|
+
hasError?: boolean;
|
|
57
|
+
/** Helper text. */
|
|
58
|
+
helper?: string | null;
|
|
59
|
+
/** Native id property. */
|
|
60
|
+
id?: string;
|
|
61
|
+
/** Whether the current step is active or not. */
|
|
62
|
+
isActive?: boolean;
|
|
63
|
+
/** Whether the current step is completed or not. */
|
|
64
|
+
isComplete?: boolean;
|
|
65
|
+
/** Whether the component is disabled or not. */
|
|
66
|
+
isDisabled?: boolean;
|
|
67
|
+
/** Label text. */
|
|
68
|
+
label?: string | null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* ProgressTrackerStep component.
|
|
72
|
+
*
|
|
73
|
+
* Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
74
|
+
*
|
|
75
|
+
* @param props Component props.
|
|
76
|
+
* @param ref Component ref.
|
|
77
|
+
* @return React element.
|
|
78
|
+
*/
|
|
79
|
+
declare const ProgressTrackerStep: Comp<ProgressTrackerStepProps, HTMLButtonElement>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Defines the props of the component.
|
|
83
|
+
*/
|
|
84
|
+
interface ProgressTrackerStepPanelProps extends GenericProps {
|
|
85
|
+
/** Native id property. */
|
|
86
|
+
id?: string;
|
|
87
|
+
/** Whether the step is active or not. */
|
|
88
|
+
isActive?: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* ProgressTrackerStepPanel component.
|
|
92
|
+
*
|
|
93
|
+
* Implements WAI-ARIA `tabpanel` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
94
|
+
*
|
|
95
|
+
* @param props Component props.
|
|
96
|
+
* @param ref Component ref.
|
|
97
|
+
* @return React element.
|
|
98
|
+
*/
|
|
99
|
+
declare const ProgressTrackerStepPanel: Comp<ProgressTrackerStepPanelProps, HTMLDivElement>;
|
|
100
|
+
|
|
101
|
+
export { ProgressTrackerProviderProps as P, ProgressTrackerProvider as a, ProgressTrackerProps as b, ProgressTracker as c, ProgressTrackerStepProps as d, ProgressTrackerStep as e, ProgressTrackerStepPanelProps as f, ProgressTrackerStepPanel as g };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { p as HeadingElement, k as Comp } from './eca6d4dc.js';
|
|
3
|
+
import { T as TextProps } from './c87cc857.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Defines the props of the component.
|
|
7
|
+
*/
|
|
8
|
+
interface HeadingProps extends Partial<TextProps> {
|
|
9
|
+
/**
|
|
10
|
+
* Display a specific heading level instead of the one provided by parent context provider.
|
|
11
|
+
*/
|
|
12
|
+
as?: HeadingElement;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders a heading component.
|
|
16
|
+
* Extends the `Text` Component with the heading level automatically computed based on
|
|
17
|
+
* the current level provided by the context.
|
|
18
|
+
*/
|
|
19
|
+
declare const Heading: Comp<HeadingProps>;
|
|
20
|
+
|
|
21
|
+
interface HeadingLevelProviderProps {
|
|
22
|
+
/** The heading level to start at. If left undefined, the parent context will be used, if any. */
|
|
23
|
+
level?: number;
|
|
24
|
+
/** The children to display */
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Provide a new heading level context.
|
|
29
|
+
*/
|
|
30
|
+
declare const HeadingLevelProvider: React.FC<HeadingLevelProviderProps>;
|
|
31
|
+
|
|
32
|
+
declare const useHeadingLevel: () => {
|
|
33
|
+
level: number;
|
|
34
|
+
headingElement: HeadingElement;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { HeadingProps as H, Heading as a, HeadingLevelProviderProps as b, HeadingLevelProvider as c, useHeadingLevel as u };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ReactNode, RefObject, Ref } from 'react';
|
|
2
|
+
import { l as GenericProps, S as Size, k as Comp } from './eca6d4dc.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Defines the props of the component.
|
|
6
|
+
*/
|
|
7
|
+
interface DialogProps extends GenericProps {
|
|
8
|
+
/** Footer content. */
|
|
9
|
+
footer?: ReactNode;
|
|
10
|
+
/** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
|
|
11
|
+
forceFooterDivider?: boolean;
|
|
12
|
+
/** Header content. */
|
|
13
|
+
header?: ReactNode;
|
|
14
|
+
/** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
|
|
15
|
+
forceHeaderDivider?: boolean;
|
|
16
|
+
/** Whether the indefinite progress indicator over the dialog content is displayed or not. */
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
/** Whether the component is open or not. */
|
|
19
|
+
isOpen?: boolean;
|
|
20
|
+
/** Reference to the parent element that triggered modal opening (will get back focus on close). */
|
|
21
|
+
parentElement?: RefObject<HTMLElement>;
|
|
22
|
+
/** Reference to the dialog content element. */
|
|
23
|
+
contentRef?: Ref<HTMLDivElement>;
|
|
24
|
+
/** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */
|
|
25
|
+
focusElement?: RefObject<HTMLElement>;
|
|
26
|
+
/** Whether to keep the dialog open on clickaway or escape press. */
|
|
27
|
+
preventAutoClose?: boolean;
|
|
28
|
+
/** Size variant. */
|
|
29
|
+
size?: DialogSizes;
|
|
30
|
+
/** Z-axis position. */
|
|
31
|
+
zIndex?: number;
|
|
32
|
+
/** Z-axis position. */
|
|
33
|
+
dialogProps?: GenericProps;
|
|
34
|
+
/** On close callback. */
|
|
35
|
+
onClose?(): void;
|
|
36
|
+
/** Callback called when the open animation starts and the close animation finishes. */
|
|
37
|
+
onVisibilityChange?(isVisible: boolean): void;
|
|
38
|
+
}
|
|
39
|
+
declare type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
40
|
+
/**
|
|
41
|
+
* Dialog component.
|
|
42
|
+
*
|
|
43
|
+
* @param props Component props.
|
|
44
|
+
* @param ref Component ref.
|
|
45
|
+
* @return React element.
|
|
46
|
+
*/
|
|
47
|
+
declare const Dialog: Comp<DialogProps, HTMLDivElement>;
|
|
48
|
+
|
|
49
|
+
export { DialogProps as D, DialogSizes as a, Dialog as b };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { l as GenericProps, k as Comp } from './eca6d4dc.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Defines the props of the component
|
|
5
|
+
*/
|
|
6
|
+
declare type ButtonGroupProps = GenericProps;
|
|
7
|
+
/**
|
|
8
|
+
* ButtonGroup component.
|
|
9
|
+
*
|
|
10
|
+
* @param props Component props.
|
|
11
|
+
* @param ref Component ref.
|
|
12
|
+
* @return React element.
|
|
13
|
+
*/
|
|
14
|
+
declare const ButtonGroup: Comp<ButtonGroupProps, HTMLDivElement>;
|
|
15
|
+
|
|
16
|
+
export { ButtonGroupProps as B, ButtonGroup as a };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { l as GenericProps, K as Kind, k as Comp } from './eca6d4dc.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Defines the props of the component.
|
|
6
|
+
*/
|
|
7
|
+
interface MessageProps extends GenericProps {
|
|
8
|
+
/** Content. */
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/** Whether the message has a background or not. */
|
|
11
|
+
hasBackground?: boolean;
|
|
12
|
+
/** Message variant. */
|
|
13
|
+
kind?: Kind;
|
|
14
|
+
/** Message custom icon SVG path. */
|
|
15
|
+
icon?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Message component.
|
|
19
|
+
*
|
|
20
|
+
* @param props Component props.
|
|
21
|
+
* @param ref Component ref.
|
|
22
|
+
* @return React element.
|
|
23
|
+
*/
|
|
24
|
+
declare const Message: Comp<MessageProps, HTMLDivElement>;
|
|
25
|
+
|
|
26
|
+
export { MessageProps as M, Message as a };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { d as _slicedToArray, b as _objectWithoutProperties, _ as _objectSpread2, c as _extends } from './
|
|
1
|
+
import { d as _slicedToArray, b as _objectWithoutProperties, _ as _objectSpread2, c as _extends } from './6340c129.js';
|
|
2
2
|
import React, { useState, useEffect, useLayoutEffect, useRef, useMemo, forwardRef, useCallback } from 'react';
|
|
3
|
-
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './
|
|
4
|
-
import { D as DOCUMENT, W as WINDOW } from './
|
|
5
|
-
import { m as mergeRefs } from './
|
|
6
|
-
import { g as getFirstAndLastFocusable, u as useCallbackOnEscape
|
|
3
|
+
import { g as getRootClassName, c as classnames, h as handleBasicClasses } from './fd867c9d.js';
|
|
4
|
+
import { D as DOCUMENT, W as WINDOW } from './288dfd0f.js';
|
|
5
|
+
import { m as mergeRefs } from './853713cd.js';
|
|
6
|
+
import { g as getFirstAndLastFocusable, u as useCallbackOnEscape } from './5d8ed4ee.js';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
|
+
import { C as ClickAwayProvider } from './53a831be.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Hook focusing an element when defined and `focus` boolean `true`.
|
|
@@ -2470,4 +2471,4 @@ Popover.className = CLASSNAME;
|
|
|
2470
2471
|
Popover.defaultProps = DEFAULT_PROPS;
|
|
2471
2472
|
|
|
2472
2473
|
export { Placement as P, Popover as a, useFocusWithin as b, usePopper as c, useFocus as u };
|
|
2473
|
-
//# sourceMappingURL=
|
|
2474
|
+
//# sourceMappingURL=9ab3c637.js.map
|