@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.
Files changed (144) hide show
  1. package/dist/{Modal-B-E9uaA6.js → Modal-i7eolhYH.js} +311 -307
  2. package/dist/components/Alert/Alert.js +24 -29
  3. package/dist/components/Alert/Alert.variants.js +9 -15
  4. package/dist/components/AlertDialog/AlertDialog.js +59 -46
  5. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +2 -2
  6. package/dist/components/AlertDialog/components/index.js +1 -1
  7. package/dist/components/Autocomplete/Autocomplete.js +76 -72
  8. package/dist/components/Autocomplete/Autocomplete.variants.js +11 -20
  9. package/dist/components/Autocomplete/components/List/List.js +28 -30
  10. package/dist/components/Autocomplete/components/List/List.variants.js +34 -40
  11. package/dist/components/Breadcrumb/Breadcrumb.js +47 -56
  12. package/dist/components/Breadcrumb/Breadcrumb.variants.js +6 -26
  13. package/dist/components/Breadcrumb/components/Item/Item.js +29 -41
  14. package/dist/components/Breadcrumb/components/Item/Item.variants.js +2 -20
  15. package/dist/components/Button/Button.js +33 -37
  16. package/dist/components/Button/Button.variants.js +138 -195
  17. package/dist/components/Card/Card.js +32 -37
  18. package/dist/components/Card/Card.variants.js +18 -53
  19. package/dist/components/Checkbox/Checkbox.js +65 -68
  20. package/dist/components/Checkbox/Checkbox.variants.js +11 -35
  21. package/dist/components/Command/Command.js +33 -25
  22. package/dist/components/Command/Command.variants.js +47 -94
  23. package/dist/components/Command/components/Command.js +1 -1
  24. package/dist/components/Command/components/CommandEmpty.js +1 -1
  25. package/dist/components/Command/components/CommandGroup.js +1 -1
  26. package/dist/components/Command/components/CommandInput.js +1 -1
  27. package/dist/components/Command/components/CommandItem.js +1 -1
  28. package/dist/components/Command/components/CommandList.js +1 -1
  29. package/dist/components/Command/components/CommandSeparator.js +1 -1
  30. package/dist/components/Command/components/DialogContent.js +1 -1
  31. package/dist/components/Command/components/DialogOverlay.js +8 -8
  32. package/dist/components/Divider/Divider.js +3 -2
  33. package/dist/components/Divider/Divider.variants.js +12 -9
  34. package/dist/components/Dropdown/Dropdown.js +6 -6
  35. package/dist/components/Dropdown/Dropdown.variants.js +31 -38
  36. package/dist/components/Dropdown/components/List/List.js +17 -15
  37. package/dist/components/Dropdown/components/List/List.variants.js +22 -32
  38. package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -19
  39. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +18 -30
  40. package/dist/components/Dropdown/components/Wrapper.js +127 -90
  41. package/dist/components/Dropdown/contexts/dropdown.context.js +1 -1
  42. package/dist/components/Dropdown/contexts/dropdown.provider.js +9 -9
  43. package/dist/components/Input/Input.js +37 -37
  44. package/dist/components/Input/Input.variants.js +8 -13
  45. package/dist/components/Loading/Loading.js +60 -58
  46. package/dist/components/Loading/Loading.variants.js +9 -15
  47. package/dist/components/Modal/Modal.js +2 -2
  48. package/dist/components/Modal/components/Body/Body.js +1 -1
  49. package/dist/components/Modal/components/Footer/Footer.js +2 -2
  50. package/dist/components/Modal/components/Header/Header.js +3 -3
  51. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -4
  52. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +32 -46
  53. package/dist/components/Modal/components/index.js +1 -1
  54. package/dist/components/NumberInput/NumberInput.js +93 -111
  55. package/dist/components/NumberInput/NumberInput.variants.js +30 -51
  56. package/dist/components/ProgressBar/ProgressBar.js +25 -29
  57. package/dist/components/ProgressBar/ProgressBar.variants.js +10 -31
  58. package/dist/components/Radio/Radio.js +45 -46
  59. package/dist/components/Radio/Radio.variants.js +4 -13
  60. package/dist/components/RadioCard/RadioCard.js +31 -37
  61. package/dist/components/RadioCard/RadioCard.variants.js +8 -17
  62. package/dist/components/RadioCardGroup/RadioCardGroup.js +22 -23
  63. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +3 -9
  64. package/dist/components/RadioGroup/RadioGroup.js +30 -31
  65. package/dist/components/RadioGroup/RadioGroup.variants.js +2 -8
  66. package/dist/components/Range/Range.js +28 -34
  67. package/dist/components/Range/Range.variants.js +21 -53
  68. package/dist/components/Sidebar/Sidebar.js +12 -13
  69. package/dist/components/Sidebar/Sidebar.variants.js +30 -56
  70. package/dist/components/Sidebar/components/Footer/Footer.js +5 -17
  71. package/dist/components/Sidebar/components/Footer/Footer.variants.js +9 -16
  72. package/dist/components/Sidebar/components/Logo/Logo.js +5 -15
  73. package/dist/components/Sidebar/components/Logo/Logo.variants.js +20 -36
  74. package/dist/components/Sidebar/components/Navigation/Navigation.js +15 -28
  75. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +3 -17
  76. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +21 -34
  77. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +2 -13
  78. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +21 -27
  79. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +7 -17
  80. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +7 -19
  81. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +6 -16
  82. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +8 -21
  83. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +11 -20
  84. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +41 -44
  85. package/dist/components/Slider/Slider.js +26 -27
  86. package/dist/components/Slider/Slider.variants.js +22 -34
  87. package/dist/components/Switch/Switch.js +103 -106
  88. package/dist/components/Switch/Switch.variants.js +28 -53
  89. package/dist/components/Table/Table.js +27 -0
  90. package/dist/components/Table/Table.variants.js +40 -0
  91. package/dist/components/Table/components/Body.js +18 -0
  92. package/dist/components/Table/components/Filter.js +9 -0
  93. package/dist/components/Table/components/Head.js +18 -0
  94. package/dist/components/Table/components/Row.js +28 -0
  95. package/dist/components/Table/components/index.js +10 -0
  96. package/dist/components/Tag/Tag.js +1 -1
  97. package/dist/components/TagSelect/TagSelect.variants.js +23 -55
  98. package/dist/components/TagSelect/components/Item/Item.js +12 -14
  99. package/dist/components/TagSelect/components/Item/Item.variants.js +11 -10
  100. package/dist/components/TagSelect/components/List/List.js +9 -10
  101. package/dist/components/TagSelect/components/List/List.variants.js +21 -35
  102. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +46 -48
  103. package/dist/components/TextArea/TextArea.js +20 -23
  104. package/dist/components/TextArea/TextArea.variants.js +19 -31
  105. package/dist/components/Toast/Toast.js +110 -116
  106. package/dist/components/Toast/Toast.variants.js +42 -70
  107. package/dist/components/Tooltip/Tooltip.js +21 -27
  108. package/dist/components/Tooltip/Tooltip.variants.js +61 -62
  109. package/dist/components/Typography/Typography.js +23 -19
  110. package/dist/components/Typography/Typography.variants.js +1 -7
  111. package/dist/components/index.js +22 -20
  112. package/dist/contexts/theme.provider.js +37 -39
  113. package/dist/domain/theme.js +0 -0
  114. package/dist/index-AM3avohj.js +133 -0
  115. package/dist/{index-BzaHYXkt.js → index-BOx5P4tS.js} +5 -5
  116. package/dist/index-Bk324h27.js +82 -0
  117. package/dist/{index-4ecjw_Aj.js → index-Bry5AFQ2.js} +1 -1
  118. package/dist/{index-CbTU3cnP.js → index-CWKdynYu.js} +1 -1
  119. package/dist/index-D9BbbgUq.js +47 -0
  120. package/dist/{index-DyKo5ZJT.js → index-DvFiic6N.js} +45 -45
  121. package/dist/{index-Dj1pom3_.js → index-G_6jG4Qc.js} +2 -2
  122. package/dist/{index-D_76wh4w.js → index-YaQrdkGE.js} +3 -3
  123. package/dist/{index-Cva-e5M4.js → index-bYyfdsls.js} +9 -9
  124. package/dist/index-dRxIWVBr.js +313 -0
  125. package/dist/{index-D7QNmo_D.js → index-g-TFwd6Y.js} +41 -41
  126. package/dist/index.d.ts +115 -98
  127. package/dist/index.js +30 -30
  128. package/dist/package.json +37 -36
  129. package/dist/styles.css +1 -1
  130. package/dist/ui/kubefirst-theme.css +296 -0
  131. package/dist/ui/theme.css +6 -0
  132. package/dist/ui/utilities.css +165 -0
  133. package/dist/utils/index.js +675 -424
  134. package/package.json +37 -36
  135. package/dist/components/AlertDialog/AlertDialog.variants.js +0 -15
  136. package/dist/index-B_6_jmOO.js +0 -68
  137. package/dist/index-BbsJ0VIJ.js +0 -47
  138. package/dist/index-CzSBQN5S.js +0 -432
  139. package/dist/index-DUA6Y_AE.js +0 -126
  140. package/dist/plugins/index.js +0 -4
  141. package/dist/plugins/konstruct.js +0 -118
  142. package/dist/plugins/utils/animation.styles.js +0 -162
  143. package/dist/plugins/utils/colors.js +0 -331
  144. package/dist/plugins/utils/index.js +0 -7
@@ -1,58 +1,53 @@
1
- import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
- import { useRef as V, useState as v, useMemo as x, isValidElement as k, useCallback as w, useEffect as y } from "react";
3
- import { V as A } from "../../index-CbTU3cnP.js";
4
- import { cn as c } from "../../utils/index.js";
5
- import { closeButtonVariants as E, alertVariants as T } from "./Alert.variants.js";
6
- import { useTheme as g } from "../../contexts/theme.hook.js";
7
- import { X as j } from "../../x-DU-Zw-L_.js";
8
- const I = ({
9
- theme: u,
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 = V(null), [p, f] = v(n), { theme: h } = g(), l = u ?? h, b = x(
16
- () => k(t) ? t : /* @__PURE__ */ o("p", { children: t }),
14
+ const r = b(null), [u, p] = C(n), f = V(
15
+ () => v(t) ? t : /* @__PURE__ */ l("p", { children: t }),
17
16
  [t]
18
- ), C = w(() => {
17
+ ), h = k(() => {
19
18
  const e = r.current;
20
19
  e && e.setAttribute("data-state", "hidden");
21
20
  }, []);
22
- return y(() => {
23
- var i;
21
+ return w(() => {
22
+ var s;
24
23
  const e = new AbortController();
25
- return (i = r.current) == null || i.addEventListener(
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"), f(!1);
28
+ (a = r.current) == null || a.style.setProperty("display", "none"), p(!1);
30
29
  },
31
30
  { signal: e.signal }
32
31
  ), () => e.abort();
33
- }, []), p ? /* @__PURE__ */ m(
32
+ }, []), u ? /* @__PURE__ */ i(
34
33
  "div",
35
34
  {
36
35
  ref: r,
37
- className: c(T({ theme: l, type: s, isVisible: n })),
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
- b,
43
- d ? /* @__PURE__ */ m("button", { role: "button", onClick: C, children: [
44
- /* @__PURE__ */ o(
45
- j,
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
- I as Alert
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
- ["w-4", "h-4", "absolute", "right-2", "top-2", "text-inherit"],
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 t, jsx as e } from "react/jsx-runtime";
2
- import { R as C, A as b, P as y, O as N, C as O, T as A, D, a as T, b as v } from "../../index-DUA6Y_AE.js";
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 { Button as r } from "../Button/Button.js";
5
- import { useAlertDialog as j } from "./hooks/useAlertDialog.js";
6
- import { useTheme as k } from "../../contexts/theme.hook.js";
7
- const z = ({
8
- buttonCancelClassName: o,
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: a,
15
- title: h,
16
- onConfirm: p
14
+ theme: t,
15
+ title: p,
16
+ onConfirm: f
17
17
  }) => {
18
- const { theme: n } = k(), { isOpen: f, handleCancel: x, handleConfirm: g, handleOpen: u } = j({
19
- onConfirm: p
18
+ const { isOpen: h, handleCancel: x, handleConfirm: g, handleOpen: C } = k({
19
+ onConfirm: f
20
20
  });
21
- return /* @__PURE__ */ t(C, { open: f, children: [
22
- /* @__PURE__ */ e(b, { text: d, theme: a, onOpen: u }),
23
- /* @__PURE__ */ t(y, { children: [
24
- /* @__PURE__ */ e(N, { className: "bg-black opacity-75 inset-0 fixed" }),
25
- /* @__PURE__ */ t(O, { 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", children: [
26
- /* @__PURE__ */ e(A, { className: "font-bold text-center text-2xl", children: h }),
27
- /* @__PURE__ */ e(D, { children: m }),
28
- /* @__PURE__ */ t("div", { className: "flex flex-row gap-5 justify-end", children: [
29
- /* @__PURE__ */ e(T, { asChild: !0, children: /* @__PURE__ */ e(
30
- r,
31
- {
32
- type: "button",
33
- theme: a ?? n,
34
- variant: "secondary",
35
- className: l(o),
36
- onClick: x,
37
- children: i
38
- }
39
- ) }),
40
- /* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ e(
41
- r,
42
- {
43
- type: "button",
44
- theme: a ?? n,
45
- variant: "danger",
46
- className: l(s),
47
- onClick: g,
48
- children: c
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
- z as AlertDialog
70
+ B as AlertDialog
58
71
  };
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
- import { A as p } from "../../../index-DUA6Y_AE.js";
2
+ import { A as p } from "../../../index-AM3avohj.js";
3
3
  import "../../Button/Button.js";
4
- import "../../../contexts/theme.hook.js";
4
+ import "../../../utils/index.js";
5
5
  export {
6
6
  p as AlertDialogTrigger
7
7
  };
@@ -1,4 +1,4 @@
1
- import { A as g } from "../../../index-DUA6Y_AE.js";
1
+ import { A as g } from "../../../index-AM3avohj.js";
2
2
  export {
3
3
  g as AlertDialogTrigger
4
4
  };
@@ -1,88 +1,92 @@
1
- import { jsxs as R, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as A, useRef as i, useId as O, useImperativeHandle as T } from "react";
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 V, autocompleteVariants as g } from "./Autocomplete.variants.js";
5
- import { useAutocomplete as j } from "./hooks/useAutocomplete.js";
6
- import { List as y } from "./components/List/List.js";
7
- import { useTheme as I } from "../../contexts/theme.hook.js";
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: u = "off",
9
+ autoComplete: c = "off",
11
10
  className: a,
12
11
  label: n,
13
12
  labelClassName: d,
14
- name: l,
15
- options: f,
13
+ name: t,
14
+ options: u,
15
+ placeholder: f,
16
16
  placeHolderEmptyValues: h = "No values...",
17
- placeHolderEmptyValuesClassName: x,
18
- placeholder: w,
19
- theme: N,
17
+ placeHolderEmptyValuesClassName: w,
18
+ theme: x,
20
19
  variant: r,
21
- onChange: b
22
- }, v) => {
23
- const s = i(null), o = i(null), c = O(), { theme: C } = I(), m = N ?? C;
24
- T(v, () => o.current, [o]);
25
- const e = j({
26
- options: f,
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: b
28
+ onChange: N
30
29
  });
31
- return /* @__PURE__ */ R("div", { ref: s, className: "relative flex flex-col", children: [
32
- n ? /* @__PURE__ */ t(
33
- "label",
34
- {
35
- htmlFor: l ?? c,
36
- className: p(
37
- V({
38
- theme: m,
39
- variant: r,
40
- className: d
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: n
44
- }
45
- ) : null,
46
- /* @__PURE__ */ t(
47
- "input",
48
- {
49
- ref: o,
50
- id: l ?? c,
51
- type: "text",
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
- className: a
60
- })
61
- ),
62
- onChange: e.handleChange,
63
- value: e.value,
64
- placeholder: w,
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
- k.displayName = "Autocomplete";
89
+ y.displayName = "Autocomplete";
86
90
  export {
87
- k as Autocomplete
91
+ y as Autocomplete
88
92
  };
@@ -1,5 +1,5 @@
1
- import { c as e } from "../../index-BNmRGtA6.js";
2
- const r = e(
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-sm",
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
- ), a = e(
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
- r as autocompleteVariants,
59
- a as labelVariants
49
+ t as autocompleteVariants,
50
+ o as labelVariants
60
51
  };
@@ -1,60 +1,58 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { useRef as u } from "react";
3
- import { cn as l } from "../../../../utils/index.js";
4
- import { emptyListVariants as b, buttonVariants as N, listItemVariants as d, listVariants as x } from "./List.variants.js";
5
- import { useNavigationUlList as V } from "../../hooks/useNavigationList.js";
6
- const R = ({
7
- className: e,
8
- inputRef: a,
9
- options: o,
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: c,
11
+ placeholderClassName: a,
12
12
  variant: t,
13
- theme: r,
14
- wrapperRef: f,
15
- onClick: p
13
+ wrapperRef: c,
14
+ onClick: f
16
15
  }) => {
17
- const n = u(null);
18
- return V({ ulRef: n, inputRef: a, wrapperRef: f, options: o }), o.length === 0 ? /* @__PURE__ */ s(
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: l(
22
- b({
23
- theme: r,
20
+ className: s(
21
+ u({
24
22
  variant: t,
25
- className: c
23
+ className: a
26
24
  })
27
25
  ),
28
26
  children: m
29
27
  }
30
- ) : /* @__PURE__ */ s(
28
+ ) : /* @__PURE__ */ r(
31
29
  "ul",
32
30
  {
33
- ref: n,
31
+ ref: o,
34
32
  role: "listbox",
35
- className: l(x({ variant: t, theme: r, className: e })),
36
- children: o.map(({ value: i }) => /* @__PURE__ */ s(
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: l(d({ theme: r, variant: t })),
42
- children: /* @__PURE__ */ s(
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: l(N({ theme: r, variant: t })),
48
- onClick: () => p(i),
49
- children: i
45
+ className: s(b({ variant: t })),
46
+ onClick: () => f(l),
47
+ children: l
50
48
  }
51
49
  )
52
50
  },
53
- i
51
+ l
54
52
  ))
55
53
  }
56
54
  );
57
55
  };
58
56
  export {
59
- R as List
57
+ I as List
60
58
  };