@konstructio/ui 0.0.12 → 0.0.13-alpha.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/dist/{Combination-Cmu9JRkv.js → Combination-b348x__d.js} +89 -89
- package/dist/Modal-i7eolhYH.js +926 -0
- package/dist/{chevron-up-CvquEaNg.js → chevron-up-DgLBQCKD.js} +1 -1
- package/dist/components/Alert/Alert.js +53 -0
- package/dist/components/Alert/Alert.variants.js +71 -0
- package/dist/components/AlertDialog/AlertDialog.js +60 -50
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -6
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +74 -72
- package/dist/components/Autocomplete/Autocomplete.variants.js +11 -21
- package/dist/components/Autocomplete/components/List/List.js +28 -30
- package/dist/components/Autocomplete/components/List/List.variants.js +34 -40
- package/dist/components/Breadcrumb/Breadcrumb.js +67 -77
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +22 -40
- package/dist/components/Breadcrumb/components/Item/Item.js +49 -0
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +72 -0
- package/dist/components/Breadcrumb/components/index.js +4 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +2 -3
- package/dist/components/Button/Button.js +34 -40
- package/dist/components/Button/Button.variants.js +138 -195
- package/dist/components/Card/Card.js +30 -37
- package/dist/components/Card/Card.variants.js +18 -53
- package/dist/components/Checkbox/Checkbox.js +70 -75
- package/dist/components/Checkbox/Checkbox.variants.js +11 -35
- package/dist/components/Command/Command.js +40 -0
- package/dist/components/Command/Command.variants.js +50 -0
- package/dist/components/Command/components/Command.js +8 -0
- package/dist/components/Command/components/CommandEmpty.js +15 -0
- package/dist/components/Command/components/CommandGroup.js +19 -0
- package/dist/components/Command/components/CommandInput.js +84 -0
- package/dist/components/Command/components/CommandItem.js +29 -0
- package/dist/components/Command/components/CommandList.js +16 -0
- package/dist/components/Command/components/CommandSeparator.js +16 -0
- package/dist/components/Command/components/CommandShortcut.js +19 -0
- package/dist/components/Command/components/DialogContent.js +31 -0
- package/dist/components/Command/components/DialogOverlay.js +19 -0
- package/dist/components/Command/components/index.js +20 -0
- package/dist/components/Command/contexts/Command.context.js +13 -0
- package/dist/components/Command/contexts/Command.provider.js +24 -0
- package/dist/components/Command/contexts/index.js +6 -0
- package/dist/components/Divider/Divider.js +11 -0
- package/dist/components/Divider/Divider.variants.js +17 -0
- package/dist/components/Dropdown/Dropdown.js +6 -8
- package/dist/components/Dropdown/Dropdown.variants.js +31 -38
- package/dist/components/Dropdown/components/List/List.js +18 -17
- package/dist/components/Dropdown/components/List/List.variants.js +22 -32
- package/dist/components/Dropdown/components/ListItem/ListItem.js +19 -19
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +18 -28
- package/dist/components/Dropdown/components/Wrapper.js +128 -94
- package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +12 -12
- package/dist/components/Dropdown/hooks/useDropdown.js +12 -14
- package/dist/components/Dropdown/hooks/useNavigationList.js +8 -10
- package/dist/components/Input/Input.js +112 -69
- package/dist/components/Input/Input.variants.js +10 -16
- package/dist/components/Loading/Loading.js +111 -0
- package/dist/components/Loading/Loading.variants.js +13 -0
- package/dist/components/Modal/Modal.js +4 -4
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +2 -2
- package/dist/components/Modal/components/Header/Header.js +3 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.js +5 -9
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +32 -46
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.provider.js +4 -4
- package/dist/components/NumberInput/NumberInput.js +93 -113
- package/dist/components/NumberInput/NumberInput.variants.js +30 -51
- package/dist/components/ProgressBar/ProgressBar.js +25 -32
- package/dist/components/ProgressBar/ProgressBar.variants.js +10 -31
- package/dist/components/Radio/Radio.js +47 -30
- package/dist/components/Radio/Radio.variants.js +61 -17
- package/dist/components/RadioCard/RadioCard.js +35 -0
- package/dist/components/RadioCard/RadioCard.variants.js +10 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.js +46 -0
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +15 -0
- package/dist/components/RadioGroup/RadioGroup.js +40 -31
- package/dist/components/RadioGroup/RadioGroup.variants.js +15 -0
- package/dist/components/Range/Range.js +31 -39
- package/dist/components/Range/Range.variants.js +21 -53
- package/dist/components/Sidebar/Sidebar.js +15 -18
- package/dist/components/Sidebar/Sidebar.variants.js +30 -55
- package/dist/components/Sidebar/components/Footer/Footer.js +5 -20
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -16
- package/dist/components/Sidebar/components/Logo/Logo.js +5 -18
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +21 -43
- package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -31
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +3 -17
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +23 -38
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +3 -14
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +24 -33
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +13 -22
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +7 -22
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -16
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -25
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +11 -20
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +41 -42
- package/dist/components/Slider/Slider.js +26 -29
- package/dist/components/Slider/Slider.variants.js +22 -34
- package/dist/components/Switch/Switch.js +100 -105
- package/dist/components/Switch/Switch.variants.js +28 -53
- package/dist/components/Table/Table.js +27 -0
- package/dist/components/Table/Table.variants.js +39 -0
- package/dist/components/Table/components/Body.js +18 -0
- package/dist/components/Table/components/Filter.js +9 -0
- package/dist/components/Table/components/Head.js +18 -0
- package/dist/components/Table/components/Row.js +28 -0
- package/dist/components/Table/components/index.js +10 -0
- package/dist/components/Tag/Tag.js +17 -5
- package/dist/components/Tag/Tag.variants.js +11 -1
- package/dist/components/TagSelect/TagSelect.js +6 -73
- package/dist/components/TagSelect/TagSelect.variants.js +24 -77
- package/dist/components/TagSelect/components/Item/Item.js +21 -0
- package/dist/components/TagSelect/components/Item/Item.variants.js +32 -0
- package/dist/components/TagSelect/components/List/List.js +12 -0
- package/dist/components/TagSelect/components/List/List.variants.js +23 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +86 -0
- package/dist/components/TagSelect/components/index.js +8 -0
- package/dist/components/TagSelect/contexts/TagSelect.context.js +19 -0
- package/dist/components/TagSelect/contexts/TagSelect.hook.js +11 -0
- package/dist/components/TagSelect/contexts/TagSelect.provider.js +69 -0
- package/dist/components/TagSelect/contexts/index.js +6 -0
- package/dist/components/TagSelect/hooks/useTagSelect.js +22 -27
- package/dist/components/TextArea/TextArea.js +26 -25
- package/dist/components/TextArea/TextArea.variants.js +19 -32
- package/dist/components/Toast/Toast.js +177 -172
- package/dist/components/Toast/Toast.variants.js +42 -71
- package/dist/components/Tooltip/Tooltip.js +21 -29
- package/dist/components/Tooltip/Tooltip.variants.js +61 -62
- package/dist/components/Typography/Typography.js +35 -0
- package/dist/components/Typography/Typography.variants.js +57 -0
- package/dist/components/index.js +68 -52
- package/dist/contexts/theme.provider.js +84 -16
- package/dist/index-AM3avohj.js +133 -0
- package/dist/{index-z-AJyzdv.js → index-BOx5P4tS.js} +11 -11
- package/dist/index-Bk324h27.js +82 -0
- package/dist/{index-BxeV34ij.js → index-Bry5AFQ2.js} +1 -1
- package/dist/{index-D68N8v8R.js → index-C5psggHV.js} +17 -17
- package/dist/{index-BtibbG81.js → index-CWKdynYu.js} +1 -1
- package/dist/index-D9BbbgUq.js +47 -0
- package/dist/index-DvFiic6N.js +446 -0
- package/dist/{index-D4Q2rMby.js → index-G_6jG4Qc.js} +2 -2
- package/dist/{index-BedjZUuB.js → index-YaQrdkGE.js} +3 -3
- package/dist/{index-8vgf-x5i.js → index-bYyfdsls.js} +11 -11
- package/dist/index-dRxIWVBr.js +313 -0
- package/dist/index-g-TFwd6Y.js +422 -0
- package/dist/index.d.ts +591 -4
- package/dist/index.js +72 -58
- package/dist/package.json +44 -42
- package/dist/styles.css +1 -1
- package/dist/styles.js +1 -1
- package/dist/ui/kubefirst-theme.css +296 -0
- package/dist/ui/theme.css +6 -0
- package/dist/ui/utilities.css +165 -0
- package/dist/useBreadcrumb-BsIeMoR1.js +1279 -0
- package/dist/utils/index.js +671 -422
- package/dist/{x-CRBgmX1Q.js → x-DU-Zw-L_.js} +1 -1
- package/package.json +44 -42
- package/dist/AlertDialogTrigger-D4Tm_9M0.js +0 -553
- package/dist/Modal-L73dmnHv.js +0 -914
- package/dist/components/AlertDialog/AlertDialog.d.ts +0 -3
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +0 -18
- package/dist/components/AlertDialog/AlertDialog.types.js +0 -1
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +0 -3
- package/dist/components/AlertDialog/AlertDialog.variants.js +0 -15
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +0 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +0 -6
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +0 -1
- package/dist/components/AlertDialog/components/index.d.ts +0 -1
- package/dist/components/AlertDialog/hooks/index.d.ts +0 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +0 -7
- package/dist/components/Autocomplete/Autocomplete.d.ts +0 -3
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +0 -18
- package/dist/components/Autocomplete/Autocomplete.types.js +0 -1
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +0 -8
- package/dist/components/Autocomplete/components/List/List.d.ts +0 -3
- package/dist/components/Autocomplete/components/List/List.types.d.ts +0 -13
- package/dist/components/Autocomplete/components/List/List.types.js +0 -1
- package/dist/components/Autocomplete/components/List/List.variants.d.ts +0 -16
- package/dist/components/Autocomplete/components/index.d.ts +0 -1
- package/dist/components/Autocomplete/hooks/index.d.ts +0 -2
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +0 -17
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +0 -10
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +0 -3
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +0 -11
- package/dist/components/Breadcrumb/Breadcrumb.types.js +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +0 -12
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -4
- package/dist/components/Button/Button.types.d.ts +0 -7
- package/dist/components/Button/Button.types.js +0 -1
- package/dist/components/Button/Button.variants.d.ts +0 -7
- package/dist/components/Card/Card.d.ts +0 -4
- package/dist/components/Card/Card.types.d.ts +0 -8
- package/dist/components/Card/Card.types.js +0 -1
- package/dist/components/Card/Card.variants.d.ts +0 -10
- package/dist/components/Checkbox/Checkbox.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.types.d.ts +0 -14
- package/dist/components/Checkbox/Checkbox.types.js +0 -1
- package/dist/components/Checkbox/Checkbox.variants.d.ts +0 -9
- package/dist/components/Dropdown/Dropdown.d.ts +0 -3
- package/dist/components/Dropdown/Dropdown.types.d.ts +0 -16
- package/dist/components/Dropdown/Dropdown.types.js +0 -1
- package/dist/components/Dropdown/Dropdown.variants.d.ts +0 -3
- package/dist/components/Dropdown/components/EmptyList.d.ts +0 -2
- package/dist/components/Dropdown/components/List/List.d.ts +0 -3
- package/dist/components/Dropdown/components/List/List.types.d.ts +0 -6
- package/dist/components/Dropdown/components/List/List.types.js +0 -1
- package/dist/components/Dropdown/components/List/List.variants.d.ts +0 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +0 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +0 -4
- package/dist/components/Dropdown/components/ListItem/ListItem.types.js +0 -1
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +0 -3
- package/dist/components/Dropdown/components/Wrapper.d.ts +0 -3
- package/dist/components/Dropdown/components/index.d.ts +0 -3
- package/dist/components/Dropdown/contexts/dropdown.context.d.ts +0 -8
- package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +0 -2
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +0 -5
- package/dist/components/Dropdown/contexts/index.d.ts +0 -2
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +0 -11
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +0 -8
- package/dist/components/Input/Input.d.ts +0 -3
- package/dist/components/Input/Input.types.d.ts +0 -9
- package/dist/components/Input/Input.types.js +0 -1
- package/dist/components/Input/Input.variants.d.ts +0 -4
- package/dist/components/Modal/Modal.d.ts +0 -8
- package/dist/components/Modal/Modal.types.d.ts +0 -12
- package/dist/components/Modal/Modal.types.js +0 -1
- package/dist/components/Modal/components/Body/Body.d.ts +0 -3
- package/dist/components/Modal/components/Body/Body.types.d.ts +0 -5
- package/dist/components/Modal/components/Body/Body.types.js +0 -1
- package/dist/components/Modal/components/Footer/Footer.d.ts +0 -3
- package/dist/components/Modal/components/Footer/Footer.types.d.ts +0 -5
- package/dist/components/Modal/components/Footer/Footer.types.js +0 -1
- package/dist/components/Modal/components/Header/Header.d.ts +0 -3
- package/dist/components/Modal/components/Header/Header.types.d.ts +0 -5
- package/dist/components/Modal/components/Header/Header.types.js +0 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +0 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +0 -7
- package/dist/components/Modal/components/Wrapper/Wrapper.types.js +0 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +0 -6
- package/dist/components/Modal/components/index.d.ts +0 -4
- package/dist/components/Modal/contexts/Modal.context.d.ts +0 -2
- package/dist/components/Modal/contexts/Modal.provider.d.ts +0 -4
- package/dist/components/Modal/contexts/Modal.types.d.ts +0 -9
- package/dist/components/Modal/contexts/Modal.types.js +0 -1
- package/dist/components/Modal/contexts/index.d.ts +0 -1
- package/dist/components/Modal/hooks/index.d.ts +0 -1
- package/dist/components/Modal/hooks/useModal.d.ts +0 -9
- package/dist/components/NumberInput/NumberInput.d.ts +0 -3
- package/dist/components/NumberInput/NumberInput.types.d.ts +0 -11
- package/dist/components/NumberInput/NumberInput.types.js +0 -1
- package/dist/components/NumberInput/NumberInput.variants.d.ts +0 -11
- package/dist/components/ProgressBar/ProgressBar.d.ts +0 -3
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +0 -8
- package/dist/components/ProgressBar/ProgressBar.types.js +0 -1
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +0 -7
- package/dist/components/Radio/Radio.d.ts +0 -3
- package/dist/components/Radio/Radio.types.d.ts +0 -12
- package/dist/components/Radio/Radio.types.js +0 -1
- package/dist/components/Radio/Radio.variants.d.ts +0 -3
- package/dist/components/RadioGroup/RadioGroup.d.ts +0 -3
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +0 -12
- package/dist/components/RadioGroup/RadioGroup.types.js +0 -1
- package/dist/components/Range/Range.d.ts +0 -3
- package/dist/components/Range/Range.types.d.ts +0 -13
- package/dist/components/Range/Range.types.js +0 -1
- package/dist/components/Range/Range.variants.d.ts +0 -14
- package/dist/components/Sidebar/Sidebar.d.ts +0 -5
- package/dist/components/Sidebar/Sidebar.types.d.ts +0 -18
- package/dist/components/Sidebar/Sidebar.types.js +0 -1
- package/dist/components/Sidebar/Sidebar.variants.d.ts +0 -6
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +0 -3
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +0 -6
- package/dist/components/Sidebar/components/Footer/Footer.types.js +0 -1
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +0 -3
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +0 -6
- package/dist/components/Sidebar/components/Logo/Logo.types.js +0 -1
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +0 -4
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +0 -16
- package/dist/components/Sidebar/components/Navigation/Navigation.types.js +0 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +0 -7
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +0 -17
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +0 -4
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +0 -5
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +0 -3
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +0 -8
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +0 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +0 -3
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +0 -3
- package/dist/components/Sidebar/components/index.d.ts +0 -15
- package/dist/components/Slider/Slider.d.ts +0 -3
- package/dist/components/Slider/Slider.types.d.ts +0 -13
- package/dist/components/Slider/Slider.types.js +0 -1
- package/dist/components/Slider/Slider.variants.d.ts +0 -11
- package/dist/components/Switch/Switch.d.ts +0 -3
- package/dist/components/Switch/Switch.types.d.ts +0 -10
- package/dist/components/Switch/Switch.types.js +0 -1
- package/dist/components/Switch/Switch.variants.d.ts +0 -6
- package/dist/components/Tag/Tag.d.ts +0 -3
- package/dist/components/Tag/Tag.types.d.ts +0 -4
- package/dist/components/Tag/Tag.types.js +0 -1
- package/dist/components/Tag/Tag.variants.d.ts +0 -3
- package/dist/components/TagSelect/TagSelect.d.ts +0 -3
- package/dist/components/TagSelect/TagSelect.types.d.ts +0 -9
- package/dist/components/TagSelect/TagSelect.types.js +0 -1
- package/dist/components/TagSelect/TagSelect.variants.d.ts +0 -9
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +0 -9
- package/dist/components/TextArea/TextArea.d.ts +0 -3
- package/dist/components/TextArea/TextArea.types.d.ts +0 -10
- package/dist/components/TextArea/TextArea.types.js +0 -1
- package/dist/components/TextArea/TextArea.variants.d.ts +0 -3
- package/dist/components/Toast/Toast.d.ts +0 -3
- package/dist/components/Toast/Toast.types.d.ts +0 -12
- package/dist/components/Toast/Toast.types.js +0 -1
- package/dist/components/Toast/Toast.variants.d.ts +0 -9
- package/dist/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/components/Tooltip/Tooltip.types.d.ts +0 -8
- package/dist/components/Tooltip/Tooltip.types.js +0 -1
- package/dist/components/Tooltip/Tooltip.variants.d.ts +0 -8
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +0 -4
- package/dist/components/index.d.ts +0 -21
- package/dist/contexts/index.d.ts +0 -3
- package/dist/contexts/theme.context.d.ts +0 -6
- package/dist/contexts/theme.hook.d.ts +0 -7
- package/dist/contexts/theme.provider.d.ts +0 -6
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useToggle.d.ts +0 -1
- package/dist/index-BBjak_0p.js +0 -47
- package/dist/index-BaNV0qac.js +0 -19164
- package/dist/index-DoOsnuB6.js +0 -72
- package/dist/js.cookie-OLEfuq_g.js +0 -74
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.js +0 -4
- package/dist/plugins/konstruct.d.ts +0 -4
- package/dist/plugins/konstruct.js +0 -115
- package/dist/plugins/utils/colors.d.ts +0 -328
- package/dist/plugins/utils/colors.js +0 -331
- package/dist/useBreadcrumb-DxYsZvj_.js +0 -1398
- package/dist/utils/index.d.ts +0 -4
- /package/dist/{styles.d.ts → domain/theme.js} +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { jsx as i, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { c as M, b as x } from "./index-bYyfdsls.js";
|
|
4
|
+
import { u as A, b as I } from "./index-Bk324h27.js";
|
|
5
|
+
import { c as v, R as $, P as L, O as F, W as G, C as W, T as j, d as B, b as D, e as Y } from "./index-DvFiic6N.js";
|
|
6
|
+
import { Button as k } from "./components/Button/Button.js";
|
|
7
|
+
import { cn as q } from "./utils/index.js";
|
|
8
|
+
var f = "AlertDialog", [H, se] = M(f, [
|
|
9
|
+
v
|
|
10
|
+
]), s = v(), m = (e) => {
|
|
11
|
+
const { __scopeAlertDialog: o, ...r } = e, a = s(o);
|
|
12
|
+
return /* @__PURE__ */ i($, { ...a, ...r, modal: !0 });
|
|
13
|
+
};
|
|
14
|
+
m.displayName = f;
|
|
15
|
+
var V = "AlertDialogTrigger", y = l.forwardRef(
|
|
16
|
+
(e, o) => {
|
|
17
|
+
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
18
|
+
return /* @__PURE__ */ i(Y, { ...t, ...a, ref: o });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
y.displayName = V;
|
|
22
|
+
var z = "AlertDialogPortal", _ = (e) => {
|
|
23
|
+
const { __scopeAlertDialog: o, ...r } = e, a = s(o);
|
|
24
|
+
return /* @__PURE__ */ i(L, { ...a, ...r });
|
|
25
|
+
};
|
|
26
|
+
_.displayName = z;
|
|
27
|
+
var J = "AlertDialogOverlay", N = l.forwardRef(
|
|
28
|
+
(e, o) => {
|
|
29
|
+
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
30
|
+
return /* @__PURE__ */ i(F, { ...t, ...a, ref: o });
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
N.displayName = J;
|
|
34
|
+
var n = "AlertDialogContent", [K, Q] = H(n), U = I("AlertDialogContent"), h = l.forwardRef(
|
|
35
|
+
(e, o) => {
|
|
36
|
+
const { __scopeAlertDialog: r, children: a, ...t } = e, d = s(r), p = l.useRef(null), O = A(o, p), g = l.useRef(null);
|
|
37
|
+
return /* @__PURE__ */ i(
|
|
38
|
+
G,
|
|
39
|
+
{
|
|
40
|
+
contentName: n,
|
|
41
|
+
titleName: C,
|
|
42
|
+
docsSlug: "alert-dialog",
|
|
43
|
+
children: /* @__PURE__ */ i(K, { scope: r, cancelRef: g, children: /* @__PURE__ */ w(
|
|
44
|
+
W,
|
|
45
|
+
{
|
|
46
|
+
role: "alertdialog",
|
|
47
|
+
...d,
|
|
48
|
+
...t,
|
|
49
|
+
ref: O,
|
|
50
|
+
onOpenAutoFocus: x(t.onOpenAutoFocus, (c) => {
|
|
51
|
+
var u;
|
|
52
|
+
c.preventDefault(), (u = g.current) == null || u.focus({ preventScroll: !0 });
|
|
53
|
+
}),
|
|
54
|
+
onPointerDownOutside: (c) => c.preventDefault(),
|
|
55
|
+
onInteractOutside: (c) => c.preventDefault(),
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ i(U, { children: a }),
|
|
58
|
+
/* @__PURE__ */ i(Z, { contentRef: p })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
h.displayName = n;
|
|
67
|
+
var C = "AlertDialogTitle", R = l.forwardRef(
|
|
68
|
+
(e, o) => {
|
|
69
|
+
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
70
|
+
return /* @__PURE__ */ i(j, { ...t, ...a, ref: o });
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
R.displayName = C;
|
|
74
|
+
var E = "AlertDialogDescription", P = l.forwardRef((e, o) => {
|
|
75
|
+
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
76
|
+
return /* @__PURE__ */ i(B, { ...t, ...a, ref: o });
|
|
77
|
+
});
|
|
78
|
+
P.displayName = E;
|
|
79
|
+
var X = "AlertDialogAction", S = l.forwardRef(
|
|
80
|
+
(e, o) => {
|
|
81
|
+
const { __scopeAlertDialog: r, ...a } = e, t = s(r);
|
|
82
|
+
return /* @__PURE__ */ i(D, { ...t, ...a, ref: o });
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
S.displayName = X;
|
|
86
|
+
var T = "AlertDialogCancel", b = l.forwardRef(
|
|
87
|
+
(e, o) => {
|
|
88
|
+
const { __scopeAlertDialog: r, ...a } = e, { cancelRef: t } = Q(T, r), d = s(r), p = A(o, t);
|
|
89
|
+
return /* @__PURE__ */ i(D, { ...d, ...a, ref: p });
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
b.displayName = T;
|
|
93
|
+
var Z = ({ contentRef: e }) => {
|
|
94
|
+
const o = `\`${n}\` requires a description for the component to be accessible for screen reader users.
|
|
95
|
+
|
|
96
|
+
You can add a description to the \`${n}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
97
|
+
|
|
98
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${n}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
99
|
+
|
|
100
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
101
|
+
return l.useEffect(() => {
|
|
102
|
+
var a;
|
|
103
|
+
document.getElementById(
|
|
104
|
+
(a = e.current) == null ? void 0 : a.getAttribute("aria-describedby")
|
|
105
|
+
) || console.warn(o);
|
|
106
|
+
}, [o, e]), null;
|
|
107
|
+
}, ne = m, ee = y, ce = _, pe = N, de = h, ge = S, ue = b, Ae = R, ve = P;
|
|
108
|
+
const De = ({
|
|
109
|
+
"data-theme": e,
|
|
110
|
+
className: o,
|
|
111
|
+
text: r,
|
|
112
|
+
onOpen: a
|
|
113
|
+
}) => /* @__PURE__ */ i(ee, { asChild: !0, children: /* @__PURE__ */ i(
|
|
114
|
+
k,
|
|
115
|
+
{
|
|
116
|
+
type: "button",
|
|
117
|
+
"data-theme": e,
|
|
118
|
+
className: q(o),
|
|
119
|
+
onClick: a,
|
|
120
|
+
children: r
|
|
121
|
+
}
|
|
122
|
+
) });
|
|
123
|
+
export {
|
|
124
|
+
De as A,
|
|
125
|
+
de as C,
|
|
126
|
+
ve as D,
|
|
127
|
+
pe as O,
|
|
128
|
+
ce as P,
|
|
129
|
+
ne as R,
|
|
130
|
+
Ae as T,
|
|
131
|
+
ue as a,
|
|
132
|
+
ge as b
|
|
133
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as d from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { u as K } from "./index-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { a as ae, c as ce, b as _ } from "./index-bYyfdsls.js";
|
|
3
|
+
import { u as K } from "./index-Bk324h27.js";
|
|
4
|
+
import { a as le, u as de } from "./index-Bry5AFQ2.js";
|
|
5
|
+
import { P as T } from "./index-g-TFwd6Y.js";
|
|
6
|
+
import { c as ue } from "./index-D9BbbgUq.js";
|
|
7
|
+
import { jsx as g, jsxs as fe } from "react/jsx-runtime";
|
|
8
8
|
function $(e, [t, n]) {
|
|
9
9
|
return Math.min(n, Math.max(t, e));
|
|
10
10
|
}
|
|
@@ -18,7 +18,7 @@ var j = ["PageUp", "PageDown"], X = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
18
18
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
19
19
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
20
20
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
21
|
-
}, M = "Slider", [N, he, Se] =
|
|
21
|
+
}, M = "Slider", [N, he, Se] = ue(M), [W, ke] = ce(M, [
|
|
22
22
|
Se
|
|
23
23
|
]), [ge, B] = W(M), q = d.forwardRef(
|
|
24
24
|
(e, t) => {
|
|
@@ -39,7 +39,7 @@ var j = ["PageUp", "PageDown"], X = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arrow
|
|
|
39
39
|
inverted: v = !1,
|
|
40
40
|
form: P,
|
|
41
41
|
...S
|
|
42
|
-
} = e, p = d.useRef(/* @__PURE__ */ new Set()), f = d.useRef(0), w = r === "horizontal" ? ve : we, [h = [], A] =
|
|
42
|
+
} = e, p = d.useRef(/* @__PURE__ */ new Set()), f = d.useRef(0), w = r === "horizontal" ? ve : we, [h = [], A] = ae({
|
|
43
43
|
prop: x,
|
|
44
44
|
defaultProp: m,
|
|
45
45
|
onChange: (b) => {
|
|
@@ -310,13 +310,13 @@ var L = "SliderThumb", oe = d.forwardRef(
|
|
|
310
310
|
}
|
|
311
311
|
), be = d.forwardRef(
|
|
312
312
|
(e, t) => {
|
|
313
|
-
const { __scopeSlider: n, index: o, name: i, ...c } = e, r = B(L, n), a = Q(L, n), [l, m] = d.useState(null), x = K(t, (D) => m(D)), s = l ? r.form || !!l.closest("form") : !0, u =
|
|
313
|
+
const { __scopeSlider: n, index: o, name: i, ...c } = e, r = B(L, n), a = Q(L, n), [l, m] = d.useState(null), x = K(t, (D) => m(D)), s = l ? r.form || !!l.closest("form") : !0, u = le(l), v = r.values[o], P = v === void 0 ? 0 : re(v, r.min, r.max), S = Re(o, r.values.length), p = u == null ? void 0 : u[a.size], f = p ? De(p, P, a.direction) : 0;
|
|
314
314
|
return d.useEffect(() => {
|
|
315
315
|
if (l)
|
|
316
316
|
return r.thumbs.add(l), () => {
|
|
317
317
|
r.thumbs.delete(l);
|
|
318
318
|
};
|
|
319
|
-
}, [l, r.thumbs]), /* @__PURE__ */
|
|
319
|
+
}, [l, r.thumbs]), /* @__PURE__ */ fe(
|
|
320
320
|
"span",
|
|
321
321
|
{
|
|
322
322
|
style: {
|
|
@@ -361,7 +361,7 @@ var L = "SliderThumb", oe = d.forwardRef(
|
|
|
361
361
|
);
|
|
362
362
|
oe.displayName = L;
|
|
363
363
|
var xe = (e) => {
|
|
364
|
-
const { value: t, ...n } = e, o = d.useRef(null), i =
|
|
364
|
+
const { value: t, ...n } = e, o = d.useRef(null), i = de(t);
|
|
365
365
|
return d.useEffect(() => {
|
|
366
366
|
const c = o.current, r = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(r, "value").set;
|
|
367
367
|
if (i !== t && l) {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { jsx as f, Fragment as g } from "react/jsx-runtime";
|
|
3
|
+
function d(e, n) {
|
|
4
|
+
if (typeof e == "function")
|
|
5
|
+
return e(n);
|
|
6
|
+
e != null && (e.current = n);
|
|
7
|
+
}
|
|
8
|
+
function m(...e) {
|
|
9
|
+
return (n) => {
|
|
10
|
+
let r = !1;
|
|
11
|
+
const o = e.map((t) => {
|
|
12
|
+
const l = d(t, n);
|
|
13
|
+
return !r && typeof l == "function" && (r = !0), l;
|
|
14
|
+
});
|
|
15
|
+
if (r)
|
|
16
|
+
return () => {
|
|
17
|
+
for (let t = 0; t < o.length; t++) {
|
|
18
|
+
const l = o[t];
|
|
19
|
+
typeof l == "function" ? l() : d(e[t], null);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function x(...e) {
|
|
25
|
+
return i.useCallback(m(...e), e);
|
|
26
|
+
}
|
|
27
|
+
// @__NO_SIDE_EFFECTS__
|
|
28
|
+
function C(e) {
|
|
29
|
+
const n = /* @__PURE__ */ b(e), r = i.forwardRef((o, t) => {
|
|
30
|
+
const { children: l, ...a } = o, s = i.Children.toArray(l), u = s.find(E);
|
|
31
|
+
if (u) {
|
|
32
|
+
const c = u.props.children, S = s.map((p) => p === u ? i.Children.count(c) > 1 ? i.Children.only(null) : i.isValidElement(c) ? c.props.children : null : p);
|
|
33
|
+
return /* @__PURE__ */ f(n, { ...a, ref: t, children: i.isValidElement(c) ? i.cloneElement(c, void 0, S) : null });
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ f(n, { ...a, ref: t, children: l });
|
|
36
|
+
});
|
|
37
|
+
return r.displayName = `${e}.Slot`, r;
|
|
38
|
+
}
|
|
39
|
+
var I = /* @__PURE__ */ C("Slot");
|
|
40
|
+
// @__NO_SIDE_EFFECTS__
|
|
41
|
+
function b(e) {
|
|
42
|
+
const n = i.forwardRef((r, o) => {
|
|
43
|
+
const { children: t, ...l } = r;
|
|
44
|
+
if (i.isValidElement(t)) {
|
|
45
|
+
const a = h(t), s = R(l, t.props);
|
|
46
|
+
return t.type !== i.Fragment && (s.ref = o ? m(o, a) : a), i.cloneElement(t, s);
|
|
47
|
+
}
|
|
48
|
+
return i.Children.count(t) > 1 ? i.Children.only(null) : null;
|
|
49
|
+
});
|
|
50
|
+
return n.displayName = `${e}.SlotClone`, n;
|
|
51
|
+
}
|
|
52
|
+
var y = Symbol("radix.slottable");
|
|
53
|
+
// @__NO_SIDE_EFFECTS__
|
|
54
|
+
function V(e) {
|
|
55
|
+
const n = ({ children: r }) => /* @__PURE__ */ f(g, { children: r });
|
|
56
|
+
return n.displayName = `${e}.Slottable`, n.__radixId = y, n;
|
|
57
|
+
}
|
|
58
|
+
function E(e) {
|
|
59
|
+
return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === y;
|
|
60
|
+
}
|
|
61
|
+
function R(e, n) {
|
|
62
|
+
const r = { ...n };
|
|
63
|
+
for (const o in n) {
|
|
64
|
+
const t = e[o], l = n[o];
|
|
65
|
+
/^on[A-Z]/.test(o) ? t && l ? r[o] = (...s) => {
|
|
66
|
+
l(...s), t(...s);
|
|
67
|
+
} : t && (r[o] = t) : o === "style" ? r[o] = { ...t, ...l } : o === "className" && (r[o] = [t, l].filter(Boolean).join(" "));
|
|
68
|
+
}
|
|
69
|
+
return { ...e, ...r };
|
|
70
|
+
}
|
|
71
|
+
function h(e) {
|
|
72
|
+
var o, t;
|
|
73
|
+
let n = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
74
|
+
return r ? e.ref : (n = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
I as S,
|
|
78
|
+
m as a,
|
|
79
|
+
V as b,
|
|
80
|
+
C as c,
|
|
81
|
+
x as u
|
|
82
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as f from "react";
|
|
2
|
-
import { u as a } from "./index-
|
|
2
|
+
import { u as a } from "./index-bYyfdsls.js";
|
|
3
3
|
function h(r) {
|
|
4
4
|
const e = f.useRef({ value: r, previous: r });
|
|
5
5
|
return f.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { g as ge } from "./_commonjsHelpers-C6fGbg64.js";
|
|
2
2
|
var V = { exports: {} }, N = { exports: {} }, T = {};
|
|
3
3
|
/** @license React v16.13.1
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
* react-is.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/
|
|
11
11
|
var ue;
|
|
12
12
|
function Se() {
|
|
13
13
|
if (ue) return T;
|
|
@@ -76,13 +76,13 @@ function Se() {
|
|
|
76
76
|
}
|
|
77
77
|
var m = {};
|
|
78
78
|
/** @license React v16.13.1
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
* react-is.development.js
|
|
80
|
+
*
|
|
81
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the MIT license found in the
|
|
84
|
+
* LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/
|
|
86
86
|
var fe;
|
|
87
87
|
function Pe() {
|
|
88
88
|
return fe || (fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
@@ -168,7 +168,7 @@ function Pe() {
|
|
|
168
168
|
}
|
|
169
169
|
var le;
|
|
170
170
|
function he() {
|
|
171
|
-
return le || (le = 1, process.env.NODE_ENV === "production" ? N.exports = Se() : N.exports = Pe()), N.exports;
|
|
171
|
+
return le || (le = 1, process.env.NODE_ENV === "production" ? N.exports = /* @__PURE__ */ Se() : N.exports = /* @__PURE__ */ Pe()), N.exports;
|
|
172
172
|
}
|
|
173
173
|
/*
|
|
174
174
|
object-assign
|
|
@@ -285,7 +285,7 @@ var ie, be;
|
|
|
285
285
|
function Re() {
|
|
286
286
|
if (be) return ie;
|
|
287
287
|
be = 1;
|
|
288
|
-
var o = he(), C = Oe(), O = /* @__PURE__ */ ce(), p = /* @__PURE__ */ Ee(), S = /* @__PURE__ */ _e(), a = function() {
|
|
288
|
+
var o = /* @__PURE__ */ he(), C = /* @__PURE__ */ Oe(), O = /* @__PURE__ */ ce(), p = /* @__PURE__ */ Ee(), S = /* @__PURE__ */ _e(), a = function() {
|
|
289
289
|
};
|
|
290
290
|
process.env.NODE_ENV !== "production" && (a = function(l) {
|
|
291
291
|
var _ = "Warning: " + l;
|
|
@@ -654,7 +654,7 @@ var me;
|
|
|
654
654
|
function Ce() {
|
|
655
655
|
if (me) return V.exports;
|
|
656
656
|
if (me = 1, process.env.NODE_ENV !== "production") {
|
|
657
|
-
var o = he(), C = !0;
|
|
657
|
+
var o = /* @__PURE__ */ he(), C = !0;
|
|
658
658
|
V.exports = /* @__PURE__ */ Re()(o.isElement, C);
|
|
659
659
|
} else
|
|
660
660
|
V.exports = /* @__PURE__ */ xe()();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { c as y } from "./index-bYyfdsls.js";
|
|
3
|
+
import { u as M, c as x } from "./index-Bk324h27.js";
|
|
4
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
5
|
+
function D(s) {
|
|
6
|
+
const f = s + "CollectionProvider", [A, N] = y(f), [_, m] = A(
|
|
7
|
+
f,
|
|
8
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
9
|
+
), p = (c) => {
|
|
10
|
+
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
|
11
|
+
return /* @__PURE__ */ d(_, { scope: e, itemMap: t, collectionRef: o, children: l });
|
|
12
|
+
};
|
|
13
|
+
p.displayName = f;
|
|
14
|
+
const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
|
|
15
|
+
(c, e) => {
|
|
16
|
+
const { scope: l, children: o } = c, t = m(a, l), n = M(e, t.collectionRef);
|
|
17
|
+
return /* @__PURE__ */ d(E, { ref: n, children: o });
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
C.displayName = a;
|
|
21
|
+
const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(u), I = r.forwardRef(
|
|
22
|
+
(c, e) => {
|
|
23
|
+
const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = m(u, l);
|
|
24
|
+
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d(T, { [R]: "", ref: S, children: o });
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
I.displayName = u;
|
|
28
|
+
function O(c) {
|
|
29
|
+
const e = m(s + "CollectionConsumer", c);
|
|
30
|
+
return r.useCallback(() => {
|
|
31
|
+
const o = e.collectionRef.current;
|
|
32
|
+
if (!o) return [];
|
|
33
|
+
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
|
34
|
+
return Array.from(e.itemMap.values()).sort(
|
|
35
|
+
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
|
36
|
+
);
|
|
37
|
+
}, [e.collectionRef, e.itemMap]);
|
|
38
|
+
}
|
|
39
|
+
return [
|
|
40
|
+
{ Provider: p, Slot: C, ItemSlot: I },
|
|
41
|
+
O,
|
|
42
|
+
N
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
D as c
|
|
47
|
+
};
|