@konstructio/ui 0.0.12 → 0.0.13-alpha.1
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 +40 -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,27 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "../../utils/index.js";
|
|
3
|
+
import { tableVariants as p } from "./Table.variants.js";
|
|
4
|
+
import { Body as f } from "./components/Body.js";
|
|
5
|
+
import { Filter as l } from "./components/Filter.js";
|
|
6
|
+
import { Head as d } from "./components/Head.js";
|
|
7
|
+
import { Row as s } from "./components/Row.js";
|
|
8
|
+
const o = ({ children: r, className: m, theme: t, ...a }) => /* @__PURE__ */ e(
|
|
9
|
+
"table",
|
|
10
|
+
{
|
|
11
|
+
className: i(
|
|
12
|
+
p({
|
|
13
|
+
className: m
|
|
14
|
+
})
|
|
15
|
+
),
|
|
16
|
+
"data-theme": t,
|
|
17
|
+
...a,
|
|
18
|
+
children: r
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
o.Body = f;
|
|
22
|
+
o.Filter = l;
|
|
23
|
+
o.Head = d;
|
|
24
|
+
o.Row = s;
|
|
25
|
+
export {
|
|
26
|
+
o as Table
|
|
27
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { c as t } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const r = t([
|
|
3
|
+
"table-auto",
|
|
4
|
+
"w-full",
|
|
5
|
+
"border-collapse",
|
|
6
|
+
"border-spacing-0",
|
|
7
|
+
"rounded",
|
|
8
|
+
"shadow-sm"
|
|
9
|
+
]), a = t(
|
|
10
|
+
[
|
|
11
|
+
"h-8",
|
|
12
|
+
"text-inherit",
|
|
13
|
+
"[&>td]:py-3",
|
|
14
|
+
"[&>td]:px-4",
|
|
15
|
+
"text-slate-700",
|
|
16
|
+
"hover:bg-zinc-100",
|
|
17
|
+
"hover:cursor-pointer"
|
|
18
|
+
],
|
|
19
|
+
{
|
|
20
|
+
variants: {
|
|
21
|
+
isSelected: {
|
|
22
|
+
true: "bg-purple-50",
|
|
23
|
+
false: ""
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
), s = t([
|
|
28
|
+
"h-[18px]",
|
|
29
|
+
"bg-slate-100",
|
|
30
|
+
"[&>tr>th]:py-3",
|
|
31
|
+
"[&>tr>th]:px-4",
|
|
32
|
+
"[&>tr>th]:uppercase",
|
|
33
|
+
"text-left"
|
|
34
|
+
]), o = t([]);
|
|
35
|
+
export {
|
|
36
|
+
o as bodyVariants,
|
|
37
|
+
s as headVariants,
|
|
38
|
+
a as rowVariants,
|
|
39
|
+
r as tableVariants
|
|
40
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "../../../utils/index.js";
|
|
3
|
+
import { bodyVariants as a } from "../Table.variants.js";
|
|
4
|
+
const d = ({ children: o, className: r, ...m }) => /* @__PURE__ */ t(
|
|
5
|
+
"tbody",
|
|
6
|
+
{
|
|
7
|
+
className: s(
|
|
8
|
+
a({
|
|
9
|
+
className: r
|
|
10
|
+
})
|
|
11
|
+
),
|
|
12
|
+
...m,
|
|
13
|
+
children: o
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
d as Body
|
|
18
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsxs as t, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Input as i } from "../../Input/Input.js";
|
|
3
|
+
const o = ({ children: e, ...r }) => /* @__PURE__ */ t("div", { className: "flex px-4 py-6 rounded-t", children: [
|
|
4
|
+
/* @__PURE__ */ s(i, { className: "!w-1/3", ...r }),
|
|
5
|
+
/* @__PURE__ */ s("div", { className: "w-1/4 flex justify-end", children: e })
|
|
6
|
+
] });
|
|
7
|
+
export {
|
|
8
|
+
o as Filter
|
|
9
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../../utils/index.js";
|
|
3
|
+
import { headVariants as e } from "../Table.variants.js";
|
|
4
|
+
const c = ({ children: o, className: r, ...a }) => /* @__PURE__ */ m(
|
|
5
|
+
"thead",
|
|
6
|
+
{
|
|
7
|
+
className: t(
|
|
8
|
+
e({
|
|
9
|
+
className: r
|
|
10
|
+
})
|
|
11
|
+
),
|
|
12
|
+
...a,
|
|
13
|
+
children: o
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
export {
|
|
17
|
+
c as Head
|
|
18
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as c } from "../../../utils/index.js";
|
|
3
|
+
import { rowVariants as n } from "../Table.variants.js";
|
|
4
|
+
const l = ({
|
|
5
|
+
children: o,
|
|
6
|
+
className: r,
|
|
7
|
+
width: t,
|
|
8
|
+
isSelected: m,
|
|
9
|
+
onSelect: s,
|
|
10
|
+
...i
|
|
11
|
+
}) => /* @__PURE__ */ a(
|
|
12
|
+
"tr",
|
|
13
|
+
{
|
|
14
|
+
style: { width: t },
|
|
15
|
+
onClick: s,
|
|
16
|
+
className: c(
|
|
17
|
+
n({
|
|
18
|
+
className: r,
|
|
19
|
+
isSelected: m
|
|
20
|
+
})
|
|
21
|
+
),
|
|
22
|
+
...i,
|
|
23
|
+
children: o
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
export {
|
|
27
|
+
l as Row
|
|
28
|
+
};
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { S as r } from "../../index-Bk324h27.js";
|
|
3
|
+
import { cn as o } from "../../utils/index.js";
|
|
4
|
+
import { tagVariants as c } from "./Tag.variants.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
label: i,
|
|
7
|
+
color: s,
|
|
8
|
+
rightIcon: t,
|
|
9
|
+
leftIcon: e,
|
|
10
|
+
className: l,
|
|
11
|
+
"data-value": m
|
|
12
|
+
}) => /* @__PURE__ */ n("div", { className: o(c({ color: s, className: l })), "data-value": m, children: [
|
|
13
|
+
e ? /* @__PURE__ */ a(r, { className: "text-inherit", children: e }) : null,
|
|
14
|
+
/* @__PURE__ */ a("span", { className: "text-inherit", children: i }),
|
|
15
|
+
t ? /* @__PURE__ */ a(r, { className: "text-inherit", children: t }) : null
|
|
16
|
+
] });
|
|
5
17
|
export {
|
|
6
|
-
|
|
18
|
+
u as Tag
|
|
7
19
|
};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
2
|
const f = e(
|
|
3
|
-
[
|
|
3
|
+
[
|
|
4
|
+
"px-2",
|
|
5
|
+
"py-1",
|
|
6
|
+
"rounded-md",
|
|
7
|
+
"w-max",
|
|
8
|
+
"text-xs",
|
|
9
|
+
"flex",
|
|
10
|
+
"items-center",
|
|
11
|
+
"justify-center",
|
|
12
|
+
"gap-1"
|
|
13
|
+
],
|
|
4
14
|
{
|
|
5
15
|
variants: {
|
|
6
16
|
color: {
|
|
@@ -1,75 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import "
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { cn as r } from "../../utils/index.js";
|
|
7
|
-
import { Tag as d } from "../Tag/Tag.js";
|
|
8
|
-
import { useTagSelect as k } from "./hooks/useTagSelect.js";
|
|
9
|
-
import { tagSelectVariants as I, tagListVariants as V, tagItemVariants as j } from "./TagSelect.variants.js";
|
|
10
|
-
import { C as y } from "../../chevron-up-CvquEaNg.js";
|
|
11
|
-
const B = g(({ label: s, name: l, options: f, placeholder: h = "Select a value...", theme: o }, x) => {
|
|
12
|
-
const c = w(), { theme: a } = S(), t = C(null), {
|
|
13
|
-
isOpen: i,
|
|
14
|
-
selectedTag: m,
|
|
15
|
-
value: p,
|
|
16
|
-
wrapperRef: b,
|
|
17
|
-
handleClickTag: N,
|
|
18
|
-
handleOpenDropdown: v
|
|
19
|
-
} = k();
|
|
20
|
-
return T(x, () => t.current, [t]), R(() => {
|
|
21
|
-
t.current && (t.current.value = p);
|
|
22
|
-
}, [p]), /* @__PURE__ */ u("div", { ref: b, className: "flex flex-col w-full relative", children: [
|
|
23
|
-
s ? /* @__PURE__ */ e("label", { className: "m-2 cursor-pointer", htmlFor: l ?? c, children: s }) : null,
|
|
24
|
-
/* @__PURE__ */ u(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
id: l ?? c,
|
|
28
|
-
className: r(I({ theme: o ?? a })),
|
|
29
|
-
role: "combobox",
|
|
30
|
-
onClick: v,
|
|
31
|
-
"aria-expanded": i,
|
|
32
|
-
children: [
|
|
33
|
-
m ? /* @__PURE__ */ e(d, { ...m }) : /* @__PURE__ */ e("span", { className: "text-base text-inherit", children: h }),
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
-
y,
|
|
36
|
-
{
|
|
37
|
-
className: r(
|
|
38
|
-
"w-4 h-4 text-inherit transition-all duration-50",
|
|
39
|
-
i ? "rotate-0" : "rotate-180"
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
)
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ e("input", { ref: t, type: "text", name: l, className: "hidden" }),
|
|
47
|
-
i ? /* @__PURE__ */ e(
|
|
48
|
-
"ul",
|
|
49
|
-
{
|
|
50
|
-
role: "listbox",
|
|
51
|
-
className: r(V({ theme: o ?? a })),
|
|
52
|
-
children: f.map((n) => /* @__PURE__ */ e(
|
|
53
|
-
"li",
|
|
54
|
-
{
|
|
55
|
-
className: r(j({ theme: o ?? a })),
|
|
56
|
-
role: "option",
|
|
57
|
-
children: /* @__PURE__ */ e(
|
|
58
|
-
"button",
|
|
59
|
-
{
|
|
60
|
-
type: "button",
|
|
61
|
-
role: "button",
|
|
62
|
-
className: "m-0 p-0 w-full",
|
|
63
|
-
onClick: () => N(n),
|
|
64
|
-
children: /* @__PURE__ */ e(d, { label: n.label, color: n.color })
|
|
65
|
-
}
|
|
66
|
-
)
|
|
67
|
-
}
|
|
68
|
-
))
|
|
69
|
-
}
|
|
70
|
-
) : null
|
|
71
|
-
] });
|
|
72
|
-
});
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { TagSelectProvider as f } from "./contexts/TagSelect.provider.js";
|
|
4
|
+
import { Wrapper as i } from "./components/Wrapper/Wrapper.js";
|
|
5
|
+
const n = p(({ options: o, multiselect: e, ...t }, m) => /* @__PURE__ */ r(f, { defaultOptions: o, multiselect: e, children: /* @__PURE__ */ r(i, { ref: m, ...t }) }));
|
|
73
6
|
export {
|
|
74
|
-
|
|
7
|
+
n as TagSelect
|
|
75
8
|
};
|
|
@@ -1,80 +1,27 @@
|
|
|
1
1
|
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
|
-
const t = e(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"aria-expanded:text-kubefirst-secondary"
|
|
24
|
-
],
|
|
25
|
-
civo: ""
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
theme: "kubefirst"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
), a = e(
|
|
33
|
-
[
|
|
34
|
-
"absolute",
|
|
35
|
-
"bg-white",
|
|
36
|
-
"border",
|
|
37
|
-
"duration-100",
|
|
38
|
-
"ease-in-out",
|
|
39
|
-
"flex",
|
|
40
|
-
"flex-col",
|
|
41
|
-
"mt-1",
|
|
42
|
-
"rounded-md",
|
|
43
|
-
"shadow-sm",
|
|
44
|
-
"top-full",
|
|
45
|
-
"transition-all",
|
|
46
|
-
"w-full",
|
|
47
|
-
"z-10"
|
|
48
|
-
],
|
|
49
|
-
{
|
|
50
|
-
variants: {
|
|
51
|
-
theme: {
|
|
52
|
-
colony: ["border-red-400"],
|
|
53
|
-
kubefirst: ["border-kubefirst-primary"],
|
|
54
|
-
civo: ""
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
defaultVariants: {
|
|
58
|
-
theme: "kubefirst"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
), i = e(
|
|
62
|
-
["cursor-pointer", "py-1", "px-2", "last:mb-2", "first:mt-2", "h-full"],
|
|
63
|
-
{
|
|
64
|
-
variants: {
|
|
65
|
-
theme: {
|
|
66
|
-
colony: "hover:bg-red-100",
|
|
67
|
-
kubefirst: "hover:bg-purple-100",
|
|
68
|
-
civo: ""
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
defaultVariants: {
|
|
72
|
-
theme: "kubefirst"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
);
|
|
2
|
+
const t = e([
|
|
3
|
+
"flex",
|
|
4
|
+
"flex-col",
|
|
5
|
+
"w-full",
|
|
6
|
+
"relative",
|
|
7
|
+
"text-zinc-500"
|
|
8
|
+
]), a = e(["my-2", "cursor-pointer"]), o = e([
|
|
9
|
+
"border",
|
|
10
|
+
"cursor-pointer",
|
|
11
|
+
"duration-250",
|
|
12
|
+
"ease-in-out",
|
|
13
|
+
"flex",
|
|
14
|
+
"items-center",
|
|
15
|
+
"justify-between",
|
|
16
|
+
"px-2",
|
|
17
|
+
"py-1",
|
|
18
|
+
"rounded",
|
|
19
|
+
"transition-all",
|
|
20
|
+
"w-full",
|
|
21
|
+
"border-gray-200"
|
|
22
|
+
]);
|
|
76
23
|
export {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
t as
|
|
24
|
+
a as labelVariants,
|
|
25
|
+
o as tagSelectVariants,
|
|
26
|
+
t as wrapperVariants
|
|
80
27
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Tag as m } from "../../../Tag/Tag.js";
|
|
3
|
+
import { cn as a } from "../../../../utils/index.js";
|
|
4
|
+
import { wrapperVariants as c } from "./Item.variants.js";
|
|
5
|
+
import { useTagSelect as i } from "../../contexts/TagSelect.hook.js";
|
|
6
|
+
const d = ({ option: e, theme: t }) => {
|
|
7
|
+
const { onSelectTag: o } = i();
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
"li",
|
|
10
|
+
{
|
|
11
|
+
role: "option",
|
|
12
|
+
"data-theme": t,
|
|
13
|
+
className: a(c({ isSelected: e.isSelected })),
|
|
14
|
+
onClick: () => o(e),
|
|
15
|
+
children: /* @__PURE__ */ r(m, { ...e })
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
d as Item
|
|
21
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { c as e } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const t = e(
|
|
3
|
+
[
|
|
4
|
+
"cursor-pointer",
|
|
5
|
+
"py-1.5",
|
|
6
|
+
"px-2",
|
|
7
|
+
"last:pb-2",
|
|
8
|
+
"first:pt-2",
|
|
9
|
+
"h-full",
|
|
10
|
+
"hover:bg-purple-100"
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
isSelected: {
|
|
15
|
+
true: "",
|
|
16
|
+
false: ""
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
compoundVariants: [
|
|
20
|
+
{
|
|
21
|
+
isSelected: !0,
|
|
22
|
+
class: ["bg-purple-100"]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
isSelected: !1
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
export {
|
|
31
|
+
t as wrapperVariants
|
|
32
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "../../../../utils/index.js";
|
|
3
|
+
import { Item as s } from "../Item/Item.js";
|
|
4
|
+
import { wrapperVariants as a } from "./List.variants.js";
|
|
5
|
+
import { useTagSelect as i } from "../../contexts/TagSelect.hook.js";
|
|
6
|
+
const f = ({ theme: o }) => {
|
|
7
|
+
const { tags: e } = i();
|
|
8
|
+
return /* @__PURE__ */ t("ul", { role: "listbox", "data-theme": o, className: m(a()), children: e.length > 0 ? e.map((r) => /* @__PURE__ */ t(s, { option: r }, r.id)) : /* @__PURE__ */ t("span", { className: "text-center text-sm px-4 py-2", children: "There is not options available" }) });
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
f as List
|
|
12
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { c as o } from "../../../../index-BNmRGtA6.js";
|
|
2
|
+
const a = o([
|
|
3
|
+
"absolute",
|
|
4
|
+
"bg-white",
|
|
5
|
+
"border",
|
|
6
|
+
"duration-100",
|
|
7
|
+
"flex",
|
|
8
|
+
"flex-col",
|
|
9
|
+
"mt-0.5",
|
|
10
|
+
"rounded",
|
|
11
|
+
"shadow-xs",
|
|
12
|
+
"top-full",
|
|
13
|
+
"transition-all",
|
|
14
|
+
"w-full",
|
|
15
|
+
"z-10",
|
|
16
|
+
"animate-in",
|
|
17
|
+
"fade-in-50",
|
|
18
|
+
"overflow-hidden",
|
|
19
|
+
"border-gray-200"
|
|
20
|
+
]);
|
|
21
|
+
export {
|
|
22
|
+
a as wrapperVariants
|
|
23
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import "../Item/Item.js";
|
|
2
|
+
import { List as g } from "../List/List.js";
|
|
3
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as w, useId as T, useImperativeHandle as b } from "react";
|
|
5
|
+
import { Tag as C } from "../../../Tag/Tag.js";
|
|
6
|
+
import { cn as r } from "../../../../utils/index.js";
|
|
7
|
+
import { useTagSelect as S } from "../../hooks/useTagSelect.js";
|
|
8
|
+
import { labelVariants as k, tagSelectVariants as R, wrapperVariants as I } from "../../TagSelect.variants.js";
|
|
9
|
+
import { X as O } from "../../../../x-DU-Zw-L_.js";
|
|
10
|
+
import { C as V } from "../../../../chevron-up-DgLBQCKD.js";
|
|
11
|
+
import { useTagSelect as j } from "../../contexts/TagSelect.hook.js";
|
|
12
|
+
const B = w(
|
|
13
|
+
({
|
|
14
|
+
label: o,
|
|
15
|
+
labelClassName: c,
|
|
16
|
+
name: t,
|
|
17
|
+
placeholder: p = "Select a value...",
|
|
18
|
+
theme: d,
|
|
19
|
+
wrapperClassName: f
|
|
20
|
+
}, h) => {
|
|
21
|
+
const i = T(), { selectedTags: n, isOpen: s, onOpen: u, onRemoveTag: x, inputRef: l } = j(), { wrapperRef: N, handleOpen: v } = S();
|
|
22
|
+
return b(h, () => l.current, [l]), /* @__PURE__ */ m(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
ref: N,
|
|
26
|
+
className: r(
|
|
27
|
+
I({
|
|
28
|
+
className: f
|
|
29
|
+
})
|
|
30
|
+
),
|
|
31
|
+
"data-theme": d,
|
|
32
|
+
children: [
|
|
33
|
+
o ? /* @__PURE__ */ e(
|
|
34
|
+
"label",
|
|
35
|
+
{
|
|
36
|
+
htmlFor: t ?? i,
|
|
37
|
+
className: r(
|
|
38
|
+
k({
|
|
39
|
+
className: c
|
|
40
|
+
})
|
|
41
|
+
),
|
|
42
|
+
onClick: () => u(!0),
|
|
43
|
+
children: o
|
|
44
|
+
}
|
|
45
|
+
) : null,
|
|
46
|
+
/* @__PURE__ */ m(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
id: t ?? i,
|
|
50
|
+
className: r(R()),
|
|
51
|
+
role: "combobox",
|
|
52
|
+
onClick: v,
|
|
53
|
+
"aria-expanded": s,
|
|
54
|
+
children: [
|
|
55
|
+
n.length === 0 ? /* @__PURE__ */ e("span", { className: "text-base text-inherit select-none", children: p }) : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1.5", children: n.map((a) => /* @__PURE__ */ e(
|
|
56
|
+
C,
|
|
57
|
+
{
|
|
58
|
+
...a,
|
|
59
|
+
className: "select-none",
|
|
60
|
+
rightIcon: /* @__PURE__ */ e(O, { className: "w-3 h-3", onClick: () => x(a) }),
|
|
61
|
+
"data-value": a.label
|
|
62
|
+
},
|
|
63
|
+
a.id
|
|
64
|
+
)) }),
|
|
65
|
+
/* @__PURE__ */ e(
|
|
66
|
+
V,
|
|
67
|
+
{
|
|
68
|
+
className: r(
|
|
69
|
+
"w-4 h-4 text-inherit transition-all duration-50 shrink-0",
|
|
70
|
+
s ? "rotate-0" : "rotate-180"
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ e("input", { ref: l, type: "text", name: t, className: "hidden" }),
|
|
78
|
+
s ? /* @__PURE__ */ e(g, {}) : null
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
export {
|
|
85
|
+
B as Wrapper
|
|
86
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createContext as e } from "react";
|
|
2
|
+
const t = {
|
|
3
|
+
tags: [],
|
|
4
|
+
selectedTags: [],
|
|
5
|
+
isOpen: !1,
|
|
6
|
+
inputRef: null,
|
|
7
|
+
onSelectTag() {
|
|
8
|
+
throw new Error("Function not implemented.");
|
|
9
|
+
},
|
|
10
|
+
onRemoveTag() {
|
|
11
|
+
throw new Error("Function not implemented.");
|
|
12
|
+
},
|
|
13
|
+
onOpen() {
|
|
14
|
+
throw new Error("Function not implemented.");
|
|
15
|
+
}
|
|
16
|
+
}, o = e(t);
|
|
17
|
+
export {
|
|
18
|
+
o as TagSelectContext
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useContext as t } from "react";
|
|
2
|
+
import { TagSelectContext as o } from "./TagSelect.context.js";
|
|
3
|
+
const c = () => {
|
|
4
|
+
const e = t(o);
|
|
5
|
+
if (!e)
|
|
6
|
+
throw new Error("useTagSelect must be used within a TagSelectProvider");
|
|
7
|
+
return e;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
c as useTagSelect
|
|
11
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as R, useState as T, useCallback as l } from "react";
|
|
3
|
+
import { TagSelectContext as x } from "./TagSelect.context.js";
|
|
4
|
+
import { useToggle as w } from "../../../hooks/useToggle.js";
|
|
5
|
+
const k = ({
|
|
6
|
+
children: m,
|
|
7
|
+
defaultOptions: n = [],
|
|
8
|
+
multiselect: d = !0
|
|
9
|
+
}) => {
|
|
10
|
+
const i = R(null), [p, a] = w(!1), [S, g] = T(n), [r, u] = T([]), o = l((t) => {
|
|
11
|
+
if (i.current) {
|
|
12
|
+
const s = t.map(({ id: c, label: e }) => ({
|
|
13
|
+
id: c,
|
|
14
|
+
value: e
|
|
15
|
+
}));
|
|
16
|
+
i.current.value = JSON.stringify(s);
|
|
17
|
+
}
|
|
18
|
+
}, []), f = l(
|
|
19
|
+
(t) => {
|
|
20
|
+
const s = [...d ? r : [], t];
|
|
21
|
+
u(s);
|
|
22
|
+
const c = s.map((e) => e.id);
|
|
23
|
+
g(() => d ? n.filter(
|
|
24
|
+
(e) => !c.includes(e.id)
|
|
25
|
+
) : n.map((e) => ({
|
|
26
|
+
...e,
|
|
27
|
+
isSelected: c.includes(e.id)
|
|
28
|
+
}))), o(s), a(!1);
|
|
29
|
+
},
|
|
30
|
+
[
|
|
31
|
+
n,
|
|
32
|
+
o,
|
|
33
|
+
d,
|
|
34
|
+
r,
|
|
35
|
+
a
|
|
36
|
+
]
|
|
37
|
+
), v = l(
|
|
38
|
+
(t) => {
|
|
39
|
+
const s = r.filter((e) => e.id !== t.id);
|
|
40
|
+
u(s);
|
|
41
|
+
const c = s.map((e) => e.id);
|
|
42
|
+
g(
|
|
43
|
+
() => n.filter((e) => !c.includes(e.id))
|
|
44
|
+
), o(s);
|
|
45
|
+
},
|
|
46
|
+
[n, o, r]
|
|
47
|
+
), h = l(
|
|
48
|
+
(t) => a(t),
|
|
49
|
+
[a]
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ I(
|
|
52
|
+
x.Provider,
|
|
53
|
+
{
|
|
54
|
+
value: {
|
|
55
|
+
tags: S,
|
|
56
|
+
selectedTags: r,
|
|
57
|
+
isOpen: p,
|
|
58
|
+
inputRef: i,
|
|
59
|
+
onSelectTag: f,
|
|
60
|
+
onRemoveTag: v,
|
|
61
|
+
onOpen: h
|
|
62
|
+
},
|
|
63
|
+
children: m
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
k as TagSelectProvider
|
|
69
|
+
};
|