@konstructio/ui 0.0.12-alpha.9 → 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/{Modal-B-E9uaA6.js → Modal-i7eolhYH.js} +311 -307
- package/dist/components/Alert/Alert.js +24 -29
- package/dist/components/Alert/Alert.variants.js +9 -15
- package/dist/components/AlertDialog/AlertDialog.js +59 -46
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +76 -72
- package/dist/components/Autocomplete/Autocomplete.variants.js +11 -20
- 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 +47 -56
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +6 -26
- package/dist/components/Breadcrumb/components/Item/Item.js +29 -41
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -20
- package/dist/components/Button/Button.js +33 -37
- package/dist/components/Button/Button.variants.js +138 -195
- package/dist/components/Card/Card.js +32 -37
- package/dist/components/Card/Card.variants.js +18 -53
- package/dist/components/Checkbox/Checkbox.js +65 -68
- package/dist/components/Checkbox/Checkbox.variants.js +11 -35
- package/dist/components/Command/Command.js +33 -25
- package/dist/components/Command/Command.variants.js +47 -94
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +8 -8
- package/dist/components/Divider/Divider.js +3 -2
- package/dist/components/Divider/Divider.variants.js +12 -9
- package/dist/components/Dropdown/Dropdown.js +6 -6
- package/dist/components/Dropdown/Dropdown.variants.js +31 -38
- package/dist/components/Dropdown/components/List/List.js +17 -15
- package/dist/components/Dropdown/components/List/List.variants.js +22 -32
- package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -19
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +18 -30
- package/dist/components/Dropdown/components/Wrapper.js +127 -90
- package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
- package/dist/components/Input/Input.js +37 -37
- package/dist/components/Input/Input.variants.js +8 -13
- package/dist/components/Loading/Loading.js +60 -58
- package/dist/components/Loading/Loading.variants.js +9 -15
- package/dist/components/Modal/Modal.js +2 -2
- 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 +3 -4
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +32 -46
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +93 -111
- package/dist/components/NumberInput/NumberInput.variants.js +30 -51
- package/dist/components/ProgressBar/ProgressBar.js +25 -29
- package/dist/components/ProgressBar/ProgressBar.variants.js +10 -31
- package/dist/components/Radio/Radio.js +45 -46
- package/dist/components/Radio/Radio.variants.js +4 -13
- package/dist/components/RadioCard/RadioCard.js +31 -37
- package/dist/components/RadioCard/RadioCard.variants.js +8 -17
- package/dist/components/RadioCardGroup/RadioCardGroup.js +22 -23
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +3 -9
- package/dist/components/RadioGroup/RadioGroup.js +30 -31
- package/dist/components/RadioGroup/RadioGroup.variants.js +2 -8
- package/dist/components/Range/Range.js +28 -34
- package/dist/components/Range/Range.variants.js +21 -53
- package/dist/components/Sidebar/Sidebar.js +12 -13
- package/dist/components/Sidebar/Sidebar.variants.js +30 -56
- package/dist/components/Sidebar/components/Footer/Footer.js +5 -17
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -16
- package/dist/components/Sidebar/components/Logo/Logo.js +5 -15
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +20 -36
- package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -28
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +3 -17
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +21 -34
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -13
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +21 -27
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +7 -17
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +7 -19
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -16
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +8 -21
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +11 -20
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +41 -44
- package/dist/components/Slider/Slider.js +26 -27
- package/dist/components/Slider/Slider.variants.js +22 -34
- package/dist/components/Switch/Switch.js +103 -106
- 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 +1 -1
- package/dist/components/TagSelect/TagSelect.variants.js +23 -55
- package/dist/components/TagSelect/components/Item/Item.js +12 -14
- package/dist/components/TagSelect/components/Item/Item.variants.js +11 -10
- package/dist/components/TagSelect/components/List/List.js +9 -10
- package/dist/components/TagSelect/components/List/List.variants.js +21 -35
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +46 -48
- package/dist/components/TextArea/TextArea.js +20 -23
- package/dist/components/TextArea/TextArea.variants.js +19 -31
- package/dist/components/Toast/Toast.js +110 -116
- package/dist/components/Toast/Toast.variants.js +42 -70
- package/dist/components/Tooltip/Tooltip.js +21 -27
- package/dist/components/Tooltip/Tooltip.variants.js +61 -62
- package/dist/components/Typography/Typography.js +23 -19
- package/dist/components/Typography/Typography.variants.js +1 -7
- package/dist/components/index.js +22 -20
- package/dist/contexts/theme.provider.js +37 -39
- package/dist/domain/theme.js +0 -0
- package/dist/index-AM3avohj.js +133 -0
- package/dist/{index-BzaHYXkt.js → index-BOx5P4tS.js} +5 -5
- package/dist/index-Bk324h27.js +82 -0
- package/dist/{index-4ecjw_Aj.js → index-Bry5AFQ2.js} +1 -1
- package/dist/{index-CbTU3cnP.js → index-CWKdynYu.js} +1 -1
- package/dist/index-D9BbbgUq.js +47 -0
- package/dist/{index-DyKo5ZJT.js → index-DvFiic6N.js} +45 -45
- package/dist/{index-Dj1pom3_.js → index-G_6jG4Qc.js} +2 -2
- package/dist/{index-D_76wh4w.js → index-YaQrdkGE.js} +3 -3
- package/dist/{index-Cva-e5M4.js → index-bYyfdsls.js} +9 -9
- package/dist/index-dRxIWVBr.js +313 -0
- package/dist/{index-D7QNmo_D.js → index-g-TFwd6Y.js} +41 -41
- package/dist/index.d.ts +115 -98
- package/dist/index.js +30 -30
- package/dist/package.json +37 -36
- package/dist/styles.css +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/utils/index.js +675 -424
- package/package.json +37 -36
- package/dist/components/AlertDialog/AlertDialog.variants.js +0 -15
- package/dist/index-B_6_jmOO.js +0 -68
- package/dist/index-BbsJ0VIJ.js +0 -47
- package/dist/index-CzSBQN5S.js +0 -432
- package/dist/index-DUA6Y_AE.js +0 -126
- package/dist/plugins/index.js +0 -4
- package/dist/plugins/konstruct.js +0 -118
- package/dist/plugins/utils/animation.styles.js +0 -162
- package/dist/plugins/utils/colors.js +0 -331
- package/dist/plugins/utils/index.js +0 -7
|
@@ -1,58 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { V as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { closeButtonVariants as
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type: s,
|
|
1
|
+
import { jsx as l, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as b, useState as C, useMemo as V, isValidElement as v, useCallback as k, useEffect as w } from "react";
|
|
3
|
+
import { V as x } from "../../index-CWKdynYu.js";
|
|
4
|
+
import { cn as m } from "../../utils/index.js";
|
|
5
|
+
import { closeButtonVariants as y, alertVariants as A } from "./Alert.variants.js";
|
|
6
|
+
import { X as E } from "../../x-DU-Zw-L_.js";
|
|
7
|
+
const B = ({
|
|
8
|
+
theme: c,
|
|
9
|
+
type: o,
|
|
11
10
|
content: t,
|
|
12
11
|
isVisible: n = !0,
|
|
13
12
|
showCloseButton: d = !1
|
|
14
13
|
}) => {
|
|
15
|
-
const r =
|
|
16
|
-
() =>
|
|
14
|
+
const r = b(null), [u, p] = C(n), f = V(
|
|
15
|
+
() => v(t) ? t : /* @__PURE__ */ l("p", { children: t }),
|
|
17
16
|
[t]
|
|
18
|
-
),
|
|
17
|
+
), h = k(() => {
|
|
19
18
|
const e = r.current;
|
|
20
19
|
e && e.setAttribute("data-state", "hidden");
|
|
21
20
|
}, []);
|
|
22
|
-
return
|
|
23
|
-
var
|
|
21
|
+
return w(() => {
|
|
22
|
+
var s;
|
|
24
23
|
const e = new AbortController();
|
|
25
|
-
return (
|
|
24
|
+
return (s = r.current) == null || s.addEventListener(
|
|
26
25
|
"animationend",
|
|
27
26
|
() => {
|
|
28
27
|
var a;
|
|
29
|
-
(a = r.current) == null || a.style.setProperty("display", "none"),
|
|
28
|
+
(a = r.current) == null || a.style.setProperty("display", "none"), p(!1);
|
|
30
29
|
},
|
|
31
30
|
{ signal: e.signal }
|
|
32
31
|
), () => e.abort();
|
|
33
|
-
}, []),
|
|
32
|
+
}, []), u ? /* @__PURE__ */ i(
|
|
34
33
|
"div",
|
|
35
34
|
{
|
|
36
35
|
ref: r,
|
|
37
|
-
className:
|
|
36
|
+
className: m(A({ type: o, isVisible: n })),
|
|
38
37
|
"data-state": n ? "visible" : "hidden",
|
|
38
|
+
"data-theme": c,
|
|
39
39
|
role: "alert",
|
|
40
40
|
"aria-live": "polite",
|
|
41
41
|
children: [
|
|
42
|
-
|
|
43
|
-
d ? /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */ o
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
className: c(E({ theme: l, type: s }))
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ o(A, { children: "Dismiss alert" })
|
|
42
|
+
f,
|
|
43
|
+
d ? /* @__PURE__ */ i("button", { role: "button", onClick: h, children: [
|
|
44
|
+
/* @__PURE__ */ l(E, { className: m(y({ type: o })) }),
|
|
45
|
+
/* @__PURE__ */ l(x, { children: "Dismiss alert" })
|
|
51
46
|
] }) : null
|
|
52
47
|
]
|
|
53
48
|
}
|
|
54
49
|
) : null;
|
|
55
50
|
};
|
|
56
51
|
export {
|
|
57
|
-
|
|
52
|
+
B as Alert
|
|
58
53
|
};
|
|
@@ -23,11 +23,6 @@ const a = t(
|
|
|
23
23
|
],
|
|
24
24
|
{
|
|
25
25
|
variants: {
|
|
26
|
-
theme: {
|
|
27
|
-
kubefirst: "",
|
|
28
|
-
colony: "",
|
|
29
|
-
civo: ""
|
|
30
|
-
},
|
|
31
26
|
type: {
|
|
32
27
|
sucess: "",
|
|
33
28
|
info: [
|
|
@@ -46,28 +41,27 @@ const a = t(
|
|
|
46
41
|
}
|
|
47
42
|
},
|
|
48
43
|
defaultVariants: {
|
|
49
|
-
theme: "kubefirst",
|
|
50
44
|
isVisible: !0
|
|
51
45
|
}
|
|
52
46
|
}
|
|
53
47
|
), s = t(
|
|
54
|
-
[
|
|
48
|
+
[
|
|
49
|
+
"w-4",
|
|
50
|
+
"h-4",
|
|
51
|
+
"absolute",
|
|
52
|
+
"right-2",
|
|
53
|
+
"top-2",
|
|
54
|
+
"text-inherit",
|
|
55
|
+
"cursor-pointer"
|
|
56
|
+
],
|
|
55
57
|
{
|
|
56
58
|
variants: {
|
|
57
|
-
theme: {
|
|
58
|
-
kubefirst: "",
|
|
59
|
-
colony: "",
|
|
60
|
-
civo: ""
|
|
61
|
-
},
|
|
62
59
|
type: {
|
|
63
60
|
sucess: "",
|
|
64
61
|
info: ["text-blue-600"],
|
|
65
62
|
warning: "",
|
|
66
63
|
danger: ""
|
|
67
64
|
}
|
|
68
|
-
},
|
|
69
|
-
defaultVariants: {
|
|
70
|
-
theme: "kubefirst"
|
|
71
65
|
}
|
|
72
66
|
}
|
|
73
67
|
);
|
|
@@ -1,58 +1,71 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { R as
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { R as u, A as b, P as y, O as N, C as O, T as A, D, a as v, b as j } from "../../index-AM3avohj.js";
|
|
3
|
+
import { Button as n } from "../Button/Button.js";
|
|
3
4
|
import { cn as l } from "../../utils/index.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
buttonCancelText: i = "Cancel",
|
|
5
|
+
import { useAlertDialog as k } from "./hooks/useAlertDialog.js";
|
|
6
|
+
const B = ({
|
|
7
|
+
buttonTriggerClassName: i,
|
|
8
|
+
buttonCancelClassName: r,
|
|
9
|
+
buttonCancelText: o = "Cancel",
|
|
10
10
|
buttonConfirmClassName: s,
|
|
11
11
|
buttonConfirmText: c = "OK",
|
|
12
12
|
buttonText: d,
|
|
13
13
|
description: m,
|
|
14
|
-
theme:
|
|
15
|
-
title:
|
|
16
|
-
onConfirm:
|
|
14
|
+
theme: t,
|
|
15
|
+
title: p,
|
|
16
|
+
onConfirm: f
|
|
17
17
|
}) => {
|
|
18
|
-
const {
|
|
19
|
-
onConfirm:
|
|
18
|
+
const { isOpen: h, handleCancel: x, handleConfirm: g, handleOpen: C } = k({
|
|
19
|
+
onConfirm: f
|
|
20
20
|
});
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */ e(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
21
|
+
return /* @__PURE__ */ a(u, { open: h, children: [
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
b,
|
|
24
|
+
{
|
|
25
|
+
className: i,
|
|
26
|
+
text: d,
|
|
27
|
+
"data-theme": t,
|
|
28
|
+
onOpen: C
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ a(y, { children: [
|
|
32
|
+
/* @__PURE__ */ e(N, { className: "bg-black opacity-75 inset-0 fixed animate-in fade-in-0" }),
|
|
33
|
+
/* @__PURE__ */ a(
|
|
34
|
+
O,
|
|
35
|
+
{
|
|
36
|
+
"data-theme": t,
|
|
37
|
+
className: "bg-white rounded-md fixed top-1/2 left-1/2 -translate-y-2/4 -translate-x-2/4 flex flex-col gap-8 p-6 animate-in fade-in-0 zoom-in-85",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ e(A, { className: "font-bold text-center text-2xl", children: p }),
|
|
40
|
+
/* @__PURE__ */ e(D, { children: m }),
|
|
41
|
+
/* @__PURE__ */ a("div", { className: "flex flex-row gap-5 justify-end", children: [
|
|
42
|
+
/* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
|
|
43
|
+
n,
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
variant: "secondary",
|
|
47
|
+
className: l(r),
|
|
48
|
+
onClick: x,
|
|
49
|
+
children: o
|
|
50
|
+
}
|
|
51
|
+
) }),
|
|
52
|
+
/* @__PURE__ */ e(j, { asChild: !0, children: /* @__PURE__ */ e(
|
|
53
|
+
n,
|
|
54
|
+
{
|
|
55
|
+
type: "button",
|
|
56
|
+
variant: "danger",
|
|
57
|
+
className: l(s),
|
|
58
|
+
onClick: g,
|
|
59
|
+
children: c
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
62
|
+
] })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
53
66
|
] })
|
|
54
67
|
] });
|
|
55
68
|
};
|
|
56
69
|
export {
|
|
57
|
-
|
|
70
|
+
B as AlertDialog
|
|
58
71
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { A as p } from "../../../index-
|
|
2
|
+
import { A as p } from "../../../index-AM3avohj.js";
|
|
3
3
|
import "../../Button/Button.js";
|
|
4
|
-
import "../../../
|
|
4
|
+
import "../../../utils/index.js";
|
|
5
5
|
export {
|
|
6
6
|
p as AlertDialogTrigger
|
|
7
7
|
};
|
|
@@ -1,88 +1,92 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsxs as v, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as C, useRef as i, useId as R, useImperativeHandle as A } from "react";
|
|
3
3
|
import { cn as p } from "../../utils/index.js";
|
|
4
|
-
import { labelVariants as
|
|
5
|
-
import { useAutocomplete as
|
|
6
|
-
import { List as
|
|
7
|
-
|
|
8
|
-
const k = A(
|
|
4
|
+
import { labelVariants as O, autocompleteVariants as V } from "./Autocomplete.variants.js";
|
|
5
|
+
import { useAutocomplete as g } from "./hooks/useAutocomplete.js";
|
|
6
|
+
import { List as j } from "./components/List/List.js";
|
|
7
|
+
const y = C(
|
|
9
8
|
({
|
|
10
|
-
autoComplete:
|
|
9
|
+
autoComplete: c = "off",
|
|
11
10
|
className: a,
|
|
12
11
|
label: n,
|
|
13
12
|
labelClassName: d,
|
|
14
|
-
name:
|
|
15
|
-
options:
|
|
13
|
+
name: t,
|
|
14
|
+
options: u,
|
|
15
|
+
placeholder: f,
|
|
16
16
|
placeHolderEmptyValues: h = "No values...",
|
|
17
|
-
placeHolderEmptyValuesClassName:
|
|
18
|
-
|
|
19
|
-
theme: N,
|
|
17
|
+
placeHolderEmptyValuesClassName: w,
|
|
18
|
+
theme: x,
|
|
20
19
|
variant: r,
|
|
21
|
-
onChange:
|
|
22
|
-
},
|
|
23
|
-
const s = i(null), o = i(null),
|
|
24
|
-
|
|
25
|
-
const e =
|
|
26
|
-
options:
|
|
20
|
+
onChange: N
|
|
21
|
+
}, b) => {
|
|
22
|
+
const s = i(null), o = i(null), m = R();
|
|
23
|
+
A(b, () => o.current, [o]);
|
|
24
|
+
const e = g({
|
|
25
|
+
options: u,
|
|
27
26
|
inputRef: o,
|
|
28
27
|
wrapperRef: s,
|
|
29
|
-
onChange:
|
|
28
|
+
onChange: N
|
|
30
29
|
});
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
return /* @__PURE__ */ v(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
ref: s,
|
|
34
|
+
className: "relative flex flex-col",
|
|
35
|
+
"data-theme": x,
|
|
36
|
+
children: [
|
|
37
|
+
n ? /* @__PURE__ */ l(
|
|
38
|
+
"label",
|
|
39
|
+
{
|
|
40
|
+
htmlFor: t ?? m,
|
|
41
|
+
className: p(
|
|
42
|
+
O({
|
|
43
|
+
variant: r,
|
|
44
|
+
className: d
|
|
45
|
+
})
|
|
46
|
+
),
|
|
47
|
+
children: n
|
|
48
|
+
}
|
|
49
|
+
) : null,
|
|
50
|
+
/* @__PURE__ */ l(
|
|
51
|
+
"input",
|
|
52
|
+
{
|
|
53
|
+
ref: o,
|
|
54
|
+
id: t ?? m,
|
|
55
|
+
type: "text",
|
|
56
|
+
name: t,
|
|
57
|
+
role: "combobox",
|
|
58
|
+
autoComplete: c,
|
|
59
|
+
className: p(
|
|
60
|
+
V({
|
|
61
|
+
variant: r,
|
|
62
|
+
className: a
|
|
63
|
+
})
|
|
64
|
+
),
|
|
65
|
+
onChange: e.handleChange,
|
|
66
|
+
value: e.value,
|
|
67
|
+
placeholder: f,
|
|
68
|
+
"aria-expanded": e.showOptions ? "true" : "false"
|
|
69
|
+
}
|
|
42
70
|
),
|
|
43
|
-
children:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
name: l,
|
|
53
|
-
role: "combobox",
|
|
54
|
-
autoComplete: u,
|
|
55
|
-
className: p(
|
|
56
|
-
g({
|
|
57
|
-
theme: m,
|
|
71
|
+
e.showOptions && /* @__PURE__ */ l("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm border-zinc-200 overflow-hidden", children: /* @__PURE__ */ l(
|
|
72
|
+
j,
|
|
73
|
+
{
|
|
74
|
+
className: a,
|
|
75
|
+
inputRef: o,
|
|
76
|
+
wrapperRef: s,
|
|
77
|
+
options: e.newOptions,
|
|
78
|
+
placeholder: h,
|
|
79
|
+
placeholderClassName: w,
|
|
58
80
|
variant: r,
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"aria-expanded": e.showOptions ? "true" : "false"
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
e.showOptions && /* @__PURE__ */ t("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm", children: /* @__PURE__ */ t(
|
|
69
|
-
y,
|
|
70
|
-
{
|
|
71
|
-
className: a,
|
|
72
|
-
inputRef: o,
|
|
73
|
-
wrapperRef: s,
|
|
74
|
-
options: e.newOptions,
|
|
75
|
-
placeholder: h,
|
|
76
|
-
placeholderClassName: x,
|
|
77
|
-
variant: r,
|
|
78
|
-
theme: m,
|
|
79
|
-
onClick: e.handleSelectValue
|
|
80
|
-
}
|
|
81
|
-
) })
|
|
82
|
-
] });
|
|
81
|
+
onClick: e.handleSelectValue
|
|
82
|
+
}
|
|
83
|
+
) })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
83
87
|
}
|
|
84
88
|
);
|
|
85
|
-
|
|
89
|
+
y.displayName = "Autocomplete";
|
|
86
90
|
export {
|
|
87
|
-
|
|
91
|
+
y as Autocomplete
|
|
88
92
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
1
|
+
import { c as a } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const t = a(
|
|
3
3
|
[
|
|
4
4
|
"flex",
|
|
5
5
|
"w-full",
|
|
@@ -15,46 +15,37 @@ const r = e(
|
|
|
15
15
|
"focus-visible:ring-ring",
|
|
16
16
|
"disabled:cursor-not-allowed",
|
|
17
17
|
"disabled:opacity-50",
|
|
18
|
-
"shadow-
|
|
18
|
+
"shadow-2xs",
|
|
19
19
|
"py-1",
|
|
20
|
-
"px-2"
|
|
20
|
+
"px-2",
|
|
21
|
+
"focus:ring-kubefirst-primary",
|
|
22
|
+
"colony:focus:focus:ring-red-400",
|
|
23
|
+
"civo:focus:focus:ring-blue-400"
|
|
21
24
|
],
|
|
22
25
|
{
|
|
23
26
|
variants: {
|
|
24
27
|
variant: {
|
|
25
28
|
default: ""
|
|
26
|
-
},
|
|
27
|
-
theme: {
|
|
28
|
-
kubefirst: ["focus:ring-kubefirst-primary"],
|
|
29
|
-
colony: ["focus:focus:ring-red-400"],
|
|
30
|
-
civo: ""
|
|
31
29
|
}
|
|
32
30
|
},
|
|
33
31
|
defaultVariants: {
|
|
34
|
-
theme: "kubefirst",
|
|
35
32
|
variant: "default"
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
|
-
),
|
|
35
|
+
), o = a(
|
|
39
36
|
["pl-1", "mb-2", "text-base", "cursor-pointer"],
|
|
40
37
|
{
|
|
41
38
|
variants: {
|
|
42
39
|
variant: {
|
|
43
40
|
default: ""
|
|
44
|
-
},
|
|
45
|
-
theme: {
|
|
46
|
-
kubefirst: "",
|
|
47
|
-
colony: "",
|
|
48
|
-
civo: ""
|
|
49
41
|
}
|
|
50
42
|
},
|
|
51
43
|
defaultVariants: {
|
|
52
|
-
variant: "default"
|
|
53
|
-
theme: "kubefirst"
|
|
44
|
+
variant: "default"
|
|
54
45
|
}
|
|
55
46
|
}
|
|
56
47
|
);
|
|
57
48
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
t as autocompleteVariants,
|
|
50
|
+
o as labelVariants
|
|
60
51
|
};
|
|
@@ -1,60 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { emptyListVariants as
|
|
5
|
-
import { useNavigationUlList as
|
|
6
|
-
const
|
|
7
|
-
className:
|
|
8
|
-
inputRef:
|
|
9
|
-
options:
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p } from "react";
|
|
3
|
+
import { cn as s } from "../../../../utils/index.js";
|
|
4
|
+
import { emptyListVariants as u, buttonVariants as b, listItemVariants as N, listVariants as d } from "./List.variants.js";
|
|
5
|
+
import { useNavigationUlList as h } from "../../hooks/useNavigationList.js";
|
|
6
|
+
const I = ({
|
|
7
|
+
className: i,
|
|
8
|
+
inputRef: n,
|
|
9
|
+
options: e,
|
|
10
10
|
placeholder: m,
|
|
11
|
-
placeholderClassName:
|
|
11
|
+
placeholderClassName: a,
|
|
12
12
|
variant: t,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onClick: p
|
|
13
|
+
wrapperRef: c,
|
|
14
|
+
onClick: f
|
|
16
15
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
return
|
|
16
|
+
const o = p(null);
|
|
17
|
+
return h({ ulRef: o, inputRef: n, wrapperRef: c, options: e }), e.length === 0 ? /* @__PURE__ */ r(
|
|
19
18
|
"span",
|
|
20
19
|
{
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
theme: r,
|
|
20
|
+
className: s(
|
|
21
|
+
u({
|
|
24
22
|
variant: t,
|
|
25
|
-
className:
|
|
23
|
+
className: a
|
|
26
24
|
})
|
|
27
25
|
),
|
|
28
26
|
children: m
|
|
29
27
|
}
|
|
30
|
-
) : /* @__PURE__ */
|
|
28
|
+
) : /* @__PURE__ */ r(
|
|
31
29
|
"ul",
|
|
32
30
|
{
|
|
33
|
-
ref:
|
|
31
|
+
ref: o,
|
|
34
32
|
role: "listbox",
|
|
35
|
-
className:
|
|
36
|
-
children:
|
|
33
|
+
className: s(d({ variant: t, className: i })),
|
|
34
|
+
children: e.map(({ value: l }) => /* @__PURE__ */ r(
|
|
37
35
|
"li",
|
|
38
36
|
{
|
|
39
37
|
role: "option",
|
|
40
38
|
tabIndex: 0,
|
|
41
|
-
className:
|
|
42
|
-
children: /* @__PURE__ */
|
|
39
|
+
className: s(N({ variant: t })),
|
|
40
|
+
children: /* @__PURE__ */ r(
|
|
43
41
|
"button",
|
|
44
42
|
{
|
|
45
43
|
type: "button",
|
|
46
44
|
role: "button",
|
|
47
|
-
className:
|
|
48
|
-
onClick: () =>
|
|
49
|
-
children:
|
|
45
|
+
className: s(b({ variant: t })),
|
|
46
|
+
onClick: () => f(l),
|
|
47
|
+
children: l
|
|
50
48
|
}
|
|
51
49
|
)
|
|
52
50
|
},
|
|
53
|
-
|
|
51
|
+
l
|
|
54
52
|
))
|
|
55
53
|
}
|
|
56
54
|
);
|
|
57
55
|
};
|
|
58
56
|
export {
|
|
59
|
-
|
|
57
|
+
I as List
|
|
60
58
|
};
|