@konstructio/ui 0.0.12-alpha.1 → 0.0.12
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/{index-BVppSRDQ.js → AlertDialogTrigger-D4Tm_9M0.js} +21 -19
- package/dist/{Combination-BQYb0Gw7.js → Combination-Cmu9JRkv.js} +72 -72
- package/dist/{Modal-W2GbkC_F.js → Modal-L73dmnHv.js} +246 -238
- package/dist/{chevron-up-DgLBQCKD.js → chevron-up-CvquEaNg.js} +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
- package/dist/components/AlertDialog/AlertDialog.js +23 -20
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +18 -0
- package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +6 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +6 -0
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +1 -0
- package/dist/components/AlertDialog/components/index.d.ts +1 -0
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
- package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
- package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
- package/dist/components/Autocomplete/Autocomplete.js +17 -15
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
- package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +8 -0
- package/dist/components/Autocomplete/components/List/List.d.ts +3 -0
- package/dist/components/Autocomplete/components/List/List.js +7 -7
- package/dist/components/Autocomplete/components/List/List.types.d.ts +13 -0
- package/dist/components/Autocomplete/components/List/List.types.js +1 -0
- package/dist/components/Autocomplete/components/List/List.variants.d.ts +16 -0
- package/dist/components/Autocomplete/components/index.d.ts +1 -0
- package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +69 -68
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +11 -0
- package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +17 -16
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +3 -2
- package/dist/components/Button/Button.d.ts +4 -0
- package/dist/components/Button/Button.js +16 -14
- package/dist/components/Button/Button.types.d.ts +7 -0
- package/dist/components/Button/Button.types.js +1 -0
- package/dist/components/Button/Button.variants.d.ts +7 -0
- package/dist/components/Card/Card.d.ts +4 -0
- package/dist/components/Card/Card.js +12 -10
- package/dist/components/Card/Card.types.d.ts +8 -0
- package/dist/components/Card/Card.types.js +1 -0
- package/dist/components/Card/Card.variants.d.ts +10 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.js +15 -13
- package/dist/components/Checkbox/Checkbox.types.d.ts +14 -0
- package/dist/components/Checkbox/Checkbox.types.js +1 -0
- package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
- package/dist/components/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.js +6 -4
- package/dist/components/Dropdown/Dropdown.types.d.ts +16 -0
- package/dist/components/Dropdown/Dropdown.types.js +1 -0
- package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
- package/dist/components/Dropdown/components/List/List.d.ts +3 -0
- package/dist/components/Dropdown/components/List/List.js +10 -9
- package/dist/components/Dropdown/components/List/List.types.d.ts +6 -0
- package/dist/components/Dropdown/components/List/List.types.js +1 -0
- package/dist/components/Dropdown/components/List/List.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.js +21 -20
- package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +4 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.types.js +1 -0
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +3 -0
- package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
- package/dist/components/Dropdown/components/Wrapper.js +34 -31
- package/dist/components/Dropdown/components/index.d.ts +3 -0
- package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
- package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +5 -0
- package/dist/components/Dropdown/contexts/dropdown.provider.js +4 -4
- package/dist/components/Dropdown/contexts/index.d.ts +2 -0
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
- package/dist/components/Dropdown/hooks/useDropdown.js +14 -12
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
- package/dist/components/Dropdown/hooks/useNavigationList.js +10 -8
- package/dist/components/Input/Input.d.ts +3 -0
- package/dist/components/Input/Input.js +14 -12
- package/dist/components/Input/Input.types.d.ts +9 -0
- package/dist/components/Input/Input.types.js +1 -0
- package/dist/components/Input/Input.variants.d.ts +4 -0
- package/dist/components/Modal/Modal.d.ts +8 -0
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Modal/Modal.types.d.ts +12 -0
- package/dist/components/Modal/Modal.types.js +1 -0
- package/dist/components/Modal/components/Body/Body.d.ts +3 -0
- package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
- package/dist/components/Modal/components/Body/Body.types.js +1 -0
- package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
- package/dist/components/Modal/components/Footer/Footer.types.js +1 -0
- package/dist/components/Modal/components/Header/Header.d.ts +3 -0
- package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
- package/dist/components/Modal/components/Header/Header.types.js +1 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.js +9 -7
- package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +7 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.types.js +1 -0
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +6 -0
- package/dist/components/Modal/components/index.d.ts +4 -0
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
- package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
- package/dist/components/Modal/contexts/Modal.provider.js +4 -4
- package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
- package/dist/components/Modal/contexts/Modal.types.js +1 -0
- package/dist/components/Modal/contexts/index.d.ts +1 -0
- package/dist/components/Modal/hooks/index.d.ts +1 -0
- package/dist/components/Modal/hooks/useModal.d.ts +9 -0
- package/dist/components/NumberInput/NumberInput.d.ts +3 -0
- package/dist/components/NumberInput/NumberInput.js +11 -9
- package/dist/components/NumberInput/NumberInput.types.d.ts +11 -0
- package/dist/components/NumberInput/NumberInput.types.js +1 -0
- package/dist/components/NumberInput/NumberInput.variants.d.ts +11 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
- package/dist/components/ProgressBar/ProgressBar.js +16 -13
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +8 -0
- package/dist/components/ProgressBar/ProgressBar.types.js +1 -0
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +7 -0
- package/dist/components/Radio/Radio.d.ts +3 -0
- package/dist/components/Radio/Radio.js +37 -55
- package/dist/components/Radio/Radio.types.d.ts +12 -0
- package/dist/components/Radio/Radio.types.js +1 -0
- package/dist/components/Radio/Radio.variants.d.ts +3 -0
- package/dist/components/Radio/Radio.variants.js +16 -69
- package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.js +27 -37
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.types.js +1 -0
- package/dist/components/Range/Range.d.ts +3 -0
- package/dist/components/Range/Range.js +22 -20
- package/dist/components/Range/Range.types.d.ts +13 -0
- package/dist/components/Range/Range.types.js +1 -0
- package/dist/components/Range/Range.variants.d.ts +14 -0
- package/dist/components/Sidebar/Sidebar.d.ts +5 -0
- package/dist/components/Sidebar/Sidebar.js +22 -20
- package/dist/components/Sidebar/Sidebar.types.d.ts +18 -0
- package/dist/components/Sidebar/Sidebar.types.js +1 -0
- package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
- package/dist/components/Sidebar/components/Footer/Footer.js +12 -9
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
- package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
- package/dist/components/Sidebar/components/Logo/Logo.js +12 -9
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
- package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
- package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -12
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +26 -24
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +20 -17
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +17 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +4 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +11 -8
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +13 -10
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +8 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +27 -29
- package/dist/components/Sidebar/components/index.d.ts +15 -0
- package/dist/components/Slider/Slider.d.ts +3 -0
- package/dist/components/Slider/Slider.js +20 -18
- package/dist/components/Slider/Slider.types.d.ts +13 -0
- package/dist/components/Slider/Slider.types.js +1 -0
- package/dist/components/Slider/Slider.variants.d.ts +11 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.js +21 -19
- package/dist/components/Switch/Switch.types.d.ts +10 -0
- package/dist/components/Switch/Switch.types.js +1 -0
- package/dist/components/Switch/Switch.variants.d.ts +6 -0
- package/dist/components/Tag/Tag.d.ts +3 -0
- package/dist/components/Tag/Tag.types.d.ts +4 -0
- package/dist/components/Tag/Tag.types.js +1 -0
- package/dist/components/Tag/Tag.variants.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.d.ts +3 -0
- package/dist/components/TagSelect/TagSelect.js +21 -19
- package/dist/components/TagSelect/TagSelect.types.d.ts +9 -0
- package/dist/components/TagSelect/TagSelect.types.js +1 -0
- package/dist/components/TagSelect/TagSelect.variants.d.ts +9 -0
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
- package/dist/components/TextArea/TextArea.d.ts +3 -0
- package/dist/components/TextArea/TextArea.js +19 -17
- package/dist/components/TextArea/TextArea.types.d.ts +10 -0
- package/dist/components/TextArea/TextArea.types.js +1 -0
- package/dist/components/TextArea/TextArea.variants.d.ts +3 -0
- package/dist/components/Toast/Toast.d.ts +3 -0
- package/dist/components/Toast/Toast.js +54 -52
- package/dist/components/Toast/Toast.types.d.ts +12 -0
- package/dist/components/Toast/Toast.types.js +1 -0
- package/dist/components/Toast/Toast.variants.d.ts +9 -0
- package/dist/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.js +12 -10
- package/dist/components/Tooltip/Tooltip.types.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.types.js +1 -0
- package/dist/components/Tooltip/Tooltip.variants.d.ts +8 -0
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
- package/dist/components/index.d.ts +21 -0
- package/dist/components/index.js +44 -50
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/theme.context.d.ts +6 -0
- package/dist/contexts/theme.hook.d.ts +7 -0
- package/dist/contexts/theme.provider.d.ts +6 -0
- package/dist/contexts/theme.provider.js +14 -84
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useToggle.d.ts +1 -0
- package/dist/{index-1GLoikpT.js → index-BaNV0qac.js} +6585 -6555
- package/dist/{index-CoqDsznq.js → index-BedjZUuB.js} +1 -1
- package/dist/{index-KEdwcThH.js → index-BtibbG81.js} +1 -1
- package/dist/{index-C5psggHV.js → index-D68N8v8R.js} +17 -17
- package/dist/{index-CJsYodgi.js → index-z-AJyzdv.js} +10 -10
- package/dist/index.d.ts +4 -522
- package/dist/index.js +53 -59
- package/dist/js.cookie-OLEfuq_g.js +74 -0
- package/dist/package.json +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/konstruct.d.ts +4 -0
- package/dist/plugins/konstruct.js +3 -3
- package/dist/plugins/utils/colors.d.ts +328 -0
- package/dist/styles.css +1 -1
- package/dist/styles.d.ts +0 -0
- package/dist/styles.js +1 -1
- package/dist/useBreadcrumb-DxYsZvj_.js +1398 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/{x-DU-Zw-L_.js → x-CRBgmX1Q.js} +1 -1
- package/package.json +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +0 -61
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +0 -90
- package/dist/components/Breadcrumb/components/index.js +0 -4
- package/dist/components/RadioCard/RadioCard.js +0 -41
- package/dist/components/RadioCard/RadioCard.variants.js +0 -19
- package/dist/components/RadioCardGroup/RadioCardGroup.js +0 -47
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +0 -21
- package/dist/components/RadioGroup/RadioGroup.variants.js +0 -21
- package/dist/useBreadcrumb-CojbXFVD.js +0 -1279
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
|
-
const
|
|
2
|
+
const s = e(["flex", "gap-1.5", "items-center"], {
|
|
3
3
|
variants: {
|
|
4
4
|
theme: {
|
|
5
5
|
kubefirst: "",
|
|
@@ -14,9 +14,10 @@ const a = e(["text-slate-500"], {
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
17
|
-
theme: "kubefirst"
|
|
17
|
+
theme: "kubefirst",
|
|
18
|
+
size: "base"
|
|
18
19
|
}
|
|
19
|
-
}),
|
|
20
|
+
}), a = e(["text-slate-400", "font-semibold"], {
|
|
20
21
|
variants: {
|
|
21
22
|
theme: {
|
|
22
23
|
kubefirst: "",
|
|
@@ -24,28 +25,28 @@ const a = e(["text-slate-500"], {
|
|
|
24
25
|
civo: ""
|
|
25
26
|
},
|
|
26
27
|
size: {
|
|
27
|
-
sm: "",
|
|
28
|
-
base: "",
|
|
29
|
-
lg: "",
|
|
30
|
-
xl: ""
|
|
28
|
+
sm: "text-sm",
|
|
29
|
+
base: "text-base",
|
|
30
|
+
lg: "text-lg",
|
|
31
|
+
xl: "text-xl"
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
defaultVariants: {
|
|
34
35
|
theme: "kubefirst",
|
|
35
36
|
size: "base"
|
|
36
37
|
}
|
|
37
|
-
}),
|
|
38
|
+
}), i = e("", {
|
|
38
39
|
variants: {
|
|
39
40
|
theme: {
|
|
40
|
-
kubefirst: "",
|
|
41
|
-
colony: "",
|
|
41
|
+
kubefirst: "text-kubefirst-primary",
|
|
42
|
+
colony: "text-red-500",
|
|
42
43
|
civo: ""
|
|
43
44
|
},
|
|
44
45
|
size: {
|
|
45
|
-
sm: ["w-
|
|
46
|
-
base: ["w-
|
|
47
|
-
lg: ["w-
|
|
48
|
-
xl: ["w-
|
|
46
|
+
sm: ["w-2", "h-2"],
|
|
47
|
+
base: ["w-3", "h-3"],
|
|
48
|
+
lg: ["w-4", "h-4"],
|
|
49
|
+
xl: ["w-5", "h-5"]
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
52
|
defaultVariants: {
|
|
@@ -54,7 +55,7 @@ const a = e(["text-slate-500"], {
|
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
export {
|
|
58
|
+
a as breadcrumbItemVariants,
|
|
57
59
|
s as breadcrumbVariants,
|
|
58
|
-
|
|
59
|
-
r as chevronVariants
|
|
60
|
+
i as chevronVariants
|
|
60
61
|
};
|
|
@@ -2,36 +2,38 @@ import { jsx as h } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as c } from "react";
|
|
3
3
|
import { S as u } from "../../index-DoOsnuB6.js";
|
|
4
4
|
import { cn as l } from "../../utils/index.js";
|
|
5
|
-
import
|
|
6
|
-
import { useTheme as
|
|
5
|
+
import "../../contexts/theme.context.js";
|
|
6
|
+
import { useTheme as x } from "../../contexts/theme.hook.js";
|
|
7
|
+
import "../../js.cookie-OLEfuq_g.js";
|
|
8
|
+
import { buttonVariants as T } from "./Button.variants.js";
|
|
7
9
|
const B = c(
|
|
8
10
|
({
|
|
9
11
|
className: o,
|
|
10
|
-
variant:
|
|
11
|
-
theme:
|
|
12
|
+
variant: m,
|
|
13
|
+
theme: e,
|
|
12
14
|
size: r,
|
|
13
15
|
version: n,
|
|
14
16
|
disabled: t = !1,
|
|
15
|
-
asChild:
|
|
16
|
-
...
|
|
17
|
-
},
|
|
18
|
-
const
|
|
17
|
+
asChild: i = !1,
|
|
18
|
+
...s
|
|
19
|
+
}, p) => {
|
|
20
|
+
const f = i ? u : "button", { theme: a } = x();
|
|
19
21
|
return /* @__PURE__ */ h(
|
|
20
|
-
|
|
22
|
+
f,
|
|
21
23
|
{
|
|
22
|
-
ref:
|
|
24
|
+
ref: p,
|
|
23
25
|
className: l(
|
|
24
|
-
|
|
25
|
-
variant:
|
|
26
|
+
T({
|
|
27
|
+
variant: m,
|
|
26
28
|
disabled: t,
|
|
27
|
-
theme:
|
|
29
|
+
theme: e ?? a,
|
|
28
30
|
size: r,
|
|
29
31
|
className: o,
|
|
30
32
|
version: n
|
|
31
33
|
})
|
|
32
34
|
),
|
|
33
35
|
disabled: t,
|
|
34
|
-
...
|
|
36
|
+
...s
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
import { buttonVariants } from './Button.variants';
|
|
4
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'disabled'>, VariantProps<typeof buttonVariants> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const buttonVariants: (props?: ({
|
|
2
|
+
variant?: "primary" | "secondary" | "danger" | "text" | "circle" | null | undefined;
|
|
3
|
+
version?: "default" | "alternate" | null | undefined;
|
|
4
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
5
|
+
disabled?: boolean | null | undefined;
|
|
6
|
+
size?: "medium" | "large" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import "../../contexts/theme.context.js";
|
|
4
|
+
import { useTheme as f } from "../../contexts/theme.hook.js";
|
|
5
|
+
import "../../js.cookie-OLEfuq_g.js";
|
|
3
6
|
import { cn as t } from "../../utils/index.js";
|
|
4
|
-
import { cardBaseVariants as n, cardVariants as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const { theme: e } = h();
|
|
7
|
+
import { cardBaseVariants as n, cardVariants as h } from "./Card.variants.js";
|
|
8
|
+
const l = c(
|
|
9
|
+
({ className: s, theme: r, isActive: m, canHover: a, wrapperClassName: i, ...d }, p) => {
|
|
10
|
+
const { theme: e } = f();
|
|
9
11
|
return /* @__PURE__ */ o(
|
|
10
12
|
"div",
|
|
11
13
|
{
|
|
12
14
|
className: t(
|
|
13
15
|
n({
|
|
14
16
|
canHover: a,
|
|
15
|
-
className:
|
|
17
|
+
className: i,
|
|
16
18
|
isActive: m,
|
|
17
19
|
theme: r ?? e
|
|
18
20
|
})
|
|
@@ -20,16 +22,16 @@ const l = f(
|
|
|
20
22
|
children: /* @__PURE__ */ o(
|
|
21
23
|
"div",
|
|
22
24
|
{
|
|
23
|
-
ref:
|
|
25
|
+
ref: p,
|
|
24
26
|
className: t(
|
|
25
|
-
|
|
27
|
+
h({
|
|
26
28
|
className: s,
|
|
27
29
|
theme: r ?? e,
|
|
28
30
|
isActive: m,
|
|
29
31
|
canHover: a
|
|
30
32
|
})
|
|
31
33
|
),
|
|
32
|
-
...
|
|
34
|
+
...d
|
|
33
35
|
}
|
|
34
36
|
)
|
|
35
37
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { cardVariants } from './Card.variants';
|
|
4
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants>, PropsWithChildren {
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
canHover?: boolean;
|
|
7
|
+
wrapperClassName?: string;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const cardBaseVariants: (props?: ({
|
|
2
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
3
|
+
isActive?: boolean | null | undefined;
|
|
4
|
+
canHover?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const cardVariants: (props?: ({
|
|
7
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
8
|
+
isActive?: boolean | null | undefined;
|
|
9
|
+
canHover?: boolean | null | undefined;
|
|
10
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -2,15 +2,17 @@ import { jsxs as S, jsx as f } from "react/jsx-runtime";
|
|
|
2
2
|
import * as u from "react";
|
|
3
3
|
import j, { forwardRef as _, useId as A, useCallback as H } from "react";
|
|
4
4
|
import { u as K } from "../../index-DoOsnuB6.js";
|
|
5
|
-
import {
|
|
5
|
+
import { c as W, a as $, d as I } from "../../index-8vgf-x5i.js";
|
|
6
6
|
import { u as q, a as F } from "../../index-BxeV34ij.js";
|
|
7
7
|
import { P as V } from "../../index-D4Q2rMby.js";
|
|
8
|
-
import { P as T } from "../../index-
|
|
8
|
+
import { P as T } from "../../index-BaNV0qac.js";
|
|
9
|
+
import "../../contexts/theme.context.js";
|
|
10
|
+
import { useTheme as X } from "../../contexts/theme.hook.js";
|
|
11
|
+
import "../../js.cookie-OLEfuq_g.js";
|
|
9
12
|
import { cn as N } from "../../utils/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { P } from "../../index-
|
|
13
|
-
import { useTheme as Q } from "../../contexts/theme.hook.js";
|
|
13
|
+
import { useToggle as G } from "../../hooks/useToggle.js";
|
|
14
|
+
import { checkboxVariants as J, labelVariants as Q } from "./Checkbox.variants.js";
|
|
15
|
+
import { P } from "../../index-D68N8v8R.js";
|
|
14
16
|
function E() {
|
|
15
17
|
return E = Object.assign || function(e) {
|
|
16
18
|
for (var s = 1; s < arguments.length; s++) {
|
|
@@ -60,7 +62,7 @@ O.propTypes = {
|
|
|
60
62
|
size: P.oneOfType([P.string, P.number])
|
|
61
63
|
};
|
|
62
64
|
O.displayName = "Check";
|
|
63
|
-
var R = "Checkbox", [Z,
|
|
65
|
+
var R = "Checkbox", [Z, Ce] = W(R), [ee, te] = Z(R), z = u.forwardRef(
|
|
64
66
|
(e, s) => {
|
|
65
67
|
const {
|
|
66
68
|
__scopeCheckbox: t,
|
|
@@ -73,7 +75,7 @@ var R = "Checkbox", [Z, ke] = $(R), [ee, te] = Z(R), z = u.forwardRef(
|
|
|
73
75
|
onCheckedChange: C,
|
|
74
76
|
form: d,
|
|
75
77
|
...p
|
|
76
|
-
} = e, [i, k] = u.useState(null), v = K(s, (c) => k(c)), x = u.useRef(!1), g = i ? d || !!i.closest("form") : !0, [m = !1, w] =
|
|
78
|
+
} = e, [i, k] = u.useState(null), v = K(s, (c) => k(c)), x = u.useRef(!1), g = i ? d || !!i.closest("form") : !0, [m = !1, w] = $({
|
|
77
79
|
prop: n,
|
|
78
80
|
defaultProp: r,
|
|
79
81
|
onChange: C
|
|
@@ -178,7 +180,7 @@ function B(e) {
|
|
|
178
180
|
return h(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
179
181
|
}
|
|
180
182
|
var oe = z, ne = D;
|
|
181
|
-
const
|
|
183
|
+
const xe = _(
|
|
182
184
|
({
|
|
183
185
|
ariaLabelledBy: e,
|
|
184
186
|
className: s,
|
|
@@ -193,7 +195,7 @@ const ve = _(
|
|
|
193
195
|
variant: d,
|
|
194
196
|
onChange: p
|
|
195
197
|
}, i) => {
|
|
196
|
-
const [k, v] =
|
|
198
|
+
const [k, v] = G(t), x = A(), { theme: g } = X(), m = H(() => {
|
|
197
199
|
v(), p == null || p();
|
|
198
200
|
}, [p, v]);
|
|
199
201
|
return /* @__PURE__ */ S("div", { className: "flex items-center gap-2", children: [
|
|
@@ -208,7 +210,7 @@ const ve = _(
|
|
|
208
210
|
"aria-labelledby": e,
|
|
209
211
|
title: C,
|
|
210
212
|
className: N(
|
|
211
|
-
|
|
213
|
+
J({
|
|
212
214
|
className: s,
|
|
213
215
|
theme: b ?? g,
|
|
214
216
|
variant: d,
|
|
@@ -224,7 +226,7 @@ const ve = _(
|
|
|
224
226
|
{
|
|
225
227
|
htmlFor: a ?? n,
|
|
226
228
|
className: N(
|
|
227
|
-
|
|
229
|
+
Q({
|
|
228
230
|
variant: d,
|
|
229
231
|
theme: b,
|
|
230
232
|
className: l
|
|
@@ -237,5 +239,5 @@ const ve = _(
|
|
|
237
239
|
}
|
|
238
240
|
);
|
|
239
241
|
export {
|
|
240
|
-
|
|
242
|
+
xe as Checkbox
|
|
241
243
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { checkboxVariants } from './Checkbox.variants';
|
|
4
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'checked'>, VariantProps<typeof checkboxVariants> {
|
|
5
|
+
ariaLabelledBy?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
id?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
labelClassName?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
onChange?: () => void;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const checkboxVariants: (props?: ({
|
|
2
|
+
variant?: "default" | null | undefined;
|
|
3
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
4
|
+
checked?: boolean | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare const labelVariants: (props?: ({
|
|
7
|
+
variant?: "default" | null | undefined;
|
|
8
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import "./components/List/List.js";
|
|
4
4
|
import { Wrapper as t } from "./components/Wrapper.js";
|
|
5
|
-
|
|
5
|
+
import "./contexts/dropdown.context.js";
|
|
6
|
+
import { DropdownProvider as f } from "./contexts/dropdown.provider.js";
|
|
7
|
+
const s = i(({ onChange: o, ...p }, m) => /* @__PURE__ */ r(f, { onChange: o, children: /* @__PURE__ */ r(t, { ref: m, ...p }) }));
|
|
6
8
|
export {
|
|
7
|
-
|
|
9
|
+
s as Dropdown
|
|
8
10
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { dropdownVariants } from './Dropdown.variants';
|
|
4
|
+
export type Option = {
|
|
5
|
+
label: string | ReactNode;
|
|
6
|
+
leftIcon?: ReactNode | string;
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
export interface DropdownProps extends VariantProps<typeof dropdownVariants> {
|
|
10
|
+
defaultValue?: string;
|
|
11
|
+
label?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
options: Option[];
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
onChange?: (value: Option) => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as p, useRef as a, useImperativeHandle as u } from "react";
|
|
3
3
|
import { cn as c } from "../../../../utils/index.js";
|
|
4
4
|
import { useNavigationUlList as d } from "../../hooks/useNavigationList.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
5
|
+
import { useDropdownContext as x } from "../../contexts/dropdown.hook.js";
|
|
6
|
+
import "../../contexts/dropdown.context.js";
|
|
7
|
+
import { ListItem as v } from "../ListItem/ListItem.js";
|
|
8
|
+
import { listVariants as L } from "./List.variants.js";
|
|
9
|
+
const C = p(
|
|
9
10
|
({ options: i, theme: t, wrapperRef: m, wrapperInputRef: s, name: l }, n) => {
|
|
10
|
-
const r =
|
|
11
|
+
const r = a(null), { isOpen: f } = x();
|
|
11
12
|
return u(n, () => r.current, [r]), d({ ulRef: r, wrapperRef: m, wrapperInputRef: s }), /* @__PURE__ */ e(
|
|
12
13
|
"ul",
|
|
13
14
|
{
|
|
14
15
|
ref: r,
|
|
15
16
|
title: l,
|
|
16
17
|
role: "listbox",
|
|
17
|
-
className: c(
|
|
18
|
-
children: i.map((o) => /* @__PURE__ */ e(
|
|
18
|
+
className: c(L({ theme: t }), f ? "flex" : "hidden"),
|
|
19
|
+
children: i.map((o) => /* @__PURE__ */ e(v, { theme: t, ...o }, o.value))
|
|
19
20
|
}
|
|
20
21
|
);
|
|
21
22
|
}
|
|
22
23
|
);
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
C as List
|
|
25
26
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentRef, RefObject } from 'react';
|
|
2
|
+
import { DropdownProps } from '../../Dropdown.types';
|
|
3
|
+
export type ListProps = Pick<DropdownProps, 'name' | 'options' | 'theme'> & {
|
|
4
|
+
wrapperRef: RefObject<ComponentRef<'div'> | null>;
|
|
5
|
+
wrapperInputRef: RefObject<ComponentRef<'div'> | null>;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as u, useCallback as
|
|
3
|
-
import { cn as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as i, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u, useCallback as s } from "react";
|
|
3
|
+
import { cn as p } from "../../../../utils/index.js";
|
|
4
|
+
import { useDropdownContext as d } from "../../contexts/dropdown.hook.js";
|
|
5
|
+
import "../../contexts/dropdown.context.js";
|
|
6
|
+
import { listItemVariants as x } from "./ListItem.variants.js";
|
|
7
|
+
const b = ({ theme: o, ...e }) => {
|
|
8
|
+
const { setValue: n, toggleOpen: r } = d(), c = u(null), l = s(
|
|
9
|
+
(t) => {
|
|
10
|
+
n(t), r(!1);
|
|
10
11
|
},
|
|
11
|
-
[n,
|
|
12
|
-
),
|
|
13
|
-
(
|
|
14
|
-
|
|
12
|
+
[n, r]
|
|
13
|
+
), m = s(
|
|
14
|
+
(t, a) => {
|
|
15
|
+
t.key === "Enter" && l(a);
|
|
15
16
|
},
|
|
16
|
-
[
|
|
17
|
+
[l]
|
|
17
18
|
);
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ i(
|
|
19
20
|
"li",
|
|
20
21
|
{
|
|
21
22
|
ref: c,
|
|
22
23
|
role: "option",
|
|
23
|
-
className:
|
|
24
|
+
className: p(x({ theme: o })),
|
|
24
25
|
tabIndex: 0,
|
|
25
|
-
onClick: () =>
|
|
26
|
-
onKeyDown: (
|
|
26
|
+
onClick: () => l(e),
|
|
27
|
+
onKeyDown: (t) => m(t, e),
|
|
27
28
|
children: [
|
|
28
|
-
e.leftIcon ? /* @__PURE__ */
|
|
29
|
+
e.leftIcon ? /* @__PURE__ */ f("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null,
|
|
29
30
|
e.label
|
|
30
31
|
]
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
34
|
};
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
+
b as ListItem
|
|
36
37
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|