@konstructio/ui 0.0.9 → 0.0.11

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 (100) hide show
  1. package/dist/{Modal-Ca3bkvvt.js → Modal-L73dmnHv.js} +240 -235
  2. package/dist/components/AlertDialog/AlertDialog.js +37 -30
  3. package/dist/components/AlertDialog/AlertDialog.types.d.ts +7 -2
  4. package/dist/components/Autocomplete/Autocomplete.js +42 -37
  5. package/dist/components/Autocomplete/components/List/List.js +60 -0
  6. package/dist/components/Autocomplete/components/{List.types.d.ts → List/List.types.d.ts} +3 -3
  7. package/dist/components/Autocomplete/components/{List.variants.js → List/List.variants.js} +1 -1
  8. package/dist/components/Autocomplete/components/index.d.ts +1 -0
  9. package/dist/components/Autocomplete/components/index.js +4 -0
  10. package/dist/components/Breadcrumb/Breadcrumb.js +44 -39
  11. package/dist/components/Button/Button.variants.d.ts +2 -2
  12. package/dist/components/Button/Button.variants.js +142 -8
  13. package/dist/components/Card/Card.js +30 -25
  14. package/dist/components/Checkbox/Checkbox.js +56 -51
  15. package/dist/components/Dropdown/components/ListItem/ListItem.js +18 -17
  16. package/dist/components/Dropdown/components/Wrapper.js +15 -15
  17. package/dist/components/Input/Input.js +4 -4
  18. package/dist/components/Modal/Modal.js +1 -1
  19. package/dist/components/Modal/components/Footer/Footer.js +5 -4
  20. package/dist/components/Modal/components/Header/Header.js +4 -3
  21. package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
  22. package/dist/components/Modal/components/index.js +1 -1
  23. package/dist/components/NumberInput/NumberInput.js +78 -69
  24. package/dist/components/ProgressBar/ProgressBar.js +6 -6
  25. package/dist/components/Radio/Radio.js +21 -18
  26. package/dist/components/RadioGroup/RadioGroup.js +26 -22
  27. package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -3
  28. package/dist/components/Range/Range.js +40 -40
  29. package/dist/components/Sidebar/Sidebar.d.ts +5 -0
  30. package/dist/components/Sidebar/Sidebar.js +27 -0
  31. package/dist/components/Sidebar/Sidebar.types.d.ts +17 -0
  32. package/dist/components/Sidebar/Sidebar.types.js +1 -0
  33. package/dist/components/Sidebar/Sidebar.variants.d.ts +6 -0
  34. package/dist/components/Sidebar/Sidebar.variants.js +56 -0
  35. package/dist/components/Sidebar/components/Footer/Footer.d.ts +3 -0
  36. package/dist/components/Sidebar/components/Footer/Footer.js +22 -0
  37. package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +6 -0
  38. package/dist/components/Sidebar/components/Footer/Footer.types.js +1 -0
  39. package/dist/components/Sidebar/components/Footer/Footer.variants.d.ts +3 -0
  40. package/dist/components/Sidebar/components/Footer/Footer.variants.js +19 -0
  41. package/dist/components/Sidebar/components/Logo/Logo.d.ts +3 -0
  42. package/dist/components/Sidebar/components/Logo/Logo.js +20 -0
  43. package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +6 -0
  44. package/dist/components/Sidebar/components/Logo/Logo.types.js +1 -0
  45. package/dist/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -0
  46. package/dist/components/Sidebar/components/Logo/Logo.variants.js +45 -0
  47. package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +4 -0
  48. package/dist/components/Sidebar/components/Navigation/Navigation.js +34 -0
  49. package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +16 -0
  50. package/dist/components/Sidebar/components/Navigation/Navigation.types.js +1 -0
  51. package/dist/components/Sidebar/components/Navigation/Navigation.variants.d.ts +3 -0
  52. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +19 -0
  53. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +3 -0
  54. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +40 -0
  55. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +7 -0
  56. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.js +1 -0
  57. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.d.ts +3 -0
  58. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +16 -0
  59. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +3 -0
  60. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +29 -0
  61. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +15 -0
  62. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.js +1 -0
  63. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +3 -0
  64. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +39 -0
  65. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +3 -0
  66. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +24 -0
  67. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +5 -0
  68. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.js +1 -0
  69. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.d.ts +3 -0
  70. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +19 -0
  71. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +3 -0
  72. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +26 -0
  73. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +7 -0
  74. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.js +1 -0
  75. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +3 -0
  76. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +23 -0
  77. package/dist/components/Sidebar/components/Wrapper/Wrapper.d.ts +3 -0
  78. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +84 -0
  79. package/dist/components/Sidebar/components/index.d.ts +15 -0
  80. package/dist/components/Sidebar/components/index.js +18 -0
  81. package/dist/components/Slider/Slider.js +25 -25
  82. package/dist/components/Switch/Switch.js +30 -30
  83. package/dist/components/Tag/Tag.js +5 -4
  84. package/dist/components/TagSelect/TagSelect.js +24 -24
  85. package/dist/components/TextArea/TextArea.js +17 -16
  86. package/dist/components/Toast/Toast.js +103 -97
  87. package/dist/components/Tooltip/Tooltip.js +12 -12
  88. package/dist/components/index.d.ts +1 -0
  89. package/dist/components/index.js +44 -30
  90. package/dist/index.js +47 -33
  91. package/dist/package.json +31 -16
  92. package/dist/plugins/utils/colors.d.ts +5 -0
  93. package/dist/plugins/utils/colors.js +6 -1
  94. package/dist/styles.css +1 -1
  95. package/dist/utils/index.js +747 -530
  96. package/package.json +31 -16
  97. package/dist/components/Autocomplete/components/List.js +0 -57
  98. /package/dist/components/Autocomplete/components/{List.d.ts → List/List.d.ts} +0 -0
  99. /package/dist/components/Autocomplete/components/{List.types.js → List/List.types.js} +0 -0
  100. /package/dist/components/Autocomplete/components/{List.variants.d.ts → List/List.variants.d.ts} +0 -0
@@ -1,39 +1,44 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as p } from "react";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as c } from "react";
3
3
  import "../../contexts/theme.context.js";
4
- import { useTheme as c } from "../../contexts/theme.hook.js";
4
+ import { useTheme as f } from "../../contexts/theme.hook.js";
5
5
  import "../../js.cookie-OLEfuq_g.js";
6
- import { cardBaseVariants as f, cardVariants as n } from "./Card.variants.js";
7
- const h = p(
8
- ({ className: o, theme: r, isActive: m, canHover: a, wrapperClassName: s, ...i }, d) => {
9
- const { theme: e } = c();
10
- return /* @__PURE__ */ t(
6
+ import { cn as t } from "../../utils/index.js";
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();
11
+ return /* @__PURE__ */ o(
11
12
  "div",
12
13
  {
13
- className: f({
14
- canHover: a,
15
- className: s,
16
- isActive: m,
17
- theme: r ?? e
18
- }),
19
- children: /* @__PURE__ */ t(
14
+ className: t(
15
+ n({
16
+ canHover: a,
17
+ className: i,
18
+ isActive: m,
19
+ theme: r ?? e
20
+ })
21
+ ),
22
+ children: /* @__PURE__ */ o(
20
23
  "div",
21
24
  {
22
- ref: d,
23
- className: n({
24
- className: o,
25
- theme: r ?? e,
26
- isActive: m,
27
- canHover: a
28
- }),
29
- ...i
25
+ ref: p,
26
+ className: t(
27
+ h({
28
+ className: s,
29
+ theme: r ?? e,
30
+ isActive: m,
31
+ canHover: a
32
+ })
33
+ ),
34
+ ...d
30
35
  }
31
36
  )
32
37
  }
33
38
  );
34
39
  }
35
40
  );
36
- h.displayName = "Card";
41
+ l.displayName = "Card";
37
42
  export {
38
- h as Card
43
+ l as Card
39
44
  };
@@ -1,16 +1,17 @@
1
- import { jsxs as N, jsx as f } from "react/jsx-runtime";
1
+ import { jsxs as S, jsx as f } from "react/jsx-runtime";
2
2
  import * as u from "react";
3
- import j, { forwardRef as S, useId as M, useCallback as A } from "react";
4
- import { u as H } from "../../index-DoOsnuB6.js";
5
- import { c as K, a as W, d as I } from "../../index-8vgf-x5i.js";
6
- import { u as $, a as q } from "../../index-BxeV34ij.js";
7
- import { P as F } from "../../index-D4Q2rMby.js";
8
- import { P as _ } from "../../index-BaNV0qac.js";
9
- import { useToggle as V } from "../../hooks/useToggle.js";
10
- import { checkboxVariants as X, labelVariants as G } from "./Checkbox.variants.js";
3
+ import j, { forwardRef as _, useId as A, useCallback as H } from "react";
4
+ import { u as K } from "../../index-DoOsnuB6.js";
5
+ import { c as W, a as $, d as I } from "../../index-8vgf-x5i.js";
6
+ import { u as q, a as F } from "../../index-BxeV34ij.js";
7
+ import { P as V } from "../../index-D4Q2rMby.js";
8
+ import { P as T } from "../../index-BaNV0qac.js";
11
9
  import "../../contexts/theme.context.js";
12
- import { useTheme as J } from "../../contexts/theme.hook.js";
10
+ import { useTheme as X } from "../../contexts/theme.hook.js";
13
11
  import "../../js.cookie-OLEfuq_g.js";
12
+ import { cn as N } from "../../utils/index.js";
13
+ import { useToggle as G } from "../../hooks/useToggle.js";
14
+ import { checkboxVariants as J, labelVariants as Q } from "./Checkbox.variants.js";
14
15
  import { P } from "../../index-D68N8v8R.js";
15
16
  function E() {
16
17
  return E = Object.assign || function(e) {
@@ -22,9 +23,9 @@ function E() {
22
23
  return e;
23
24
  }, E.apply(this, arguments);
24
25
  }
25
- function Q(e, s) {
26
+ function U(e, s) {
26
27
  if (e == null) return {};
27
- var t = U(e, s), o, n;
28
+ var t = Y(e, s), o, n;
28
29
  if (Object.getOwnPropertySymbols) {
29
30
  var r = Object.getOwnPropertySymbols(e);
30
31
  for (n = 0; n < r.length; n++)
@@ -32,15 +33,15 @@ function Q(e, s) {
32
33
  }
33
34
  return t;
34
35
  }
35
- function U(e, s) {
36
+ function Y(e, s) {
36
37
  if (e == null) return {};
37
38
  var t = {}, o = Object.keys(e), n, r;
38
39
  for (r = 0; r < o.length; r++)
39
40
  n = o[r], !(s.indexOf(n) >= 0) && (t[n] = e[n]);
40
41
  return t;
41
42
  }
42
- var O = S(function(e, s) {
43
- var t = e.color, o = t === void 0 ? "currentColor" : t, n = e.size, r = n === void 0 ? 24 : n, l = Q(e, ["color", "size"]);
43
+ var O = _(function(e, s) {
44
+ var t = e.color, o = t === void 0 ? "currentColor" : t, n = e.size, r = n === void 0 ? 24 : n, l = U(e, ["color", "size"]);
44
45
  return /* @__PURE__ */ j.createElement("svg", E({
45
46
  ref: s,
46
47
  xmlns: "http://www.w3.org/2000/svg",
@@ -61,7 +62,7 @@ O.propTypes = {
61
62
  size: P.oneOfType([P.string, P.number])
62
63
  };
63
64
  O.displayName = "Check";
64
- var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
65
+ var R = "Checkbox", [Z, Ce] = W(R), [ee, te] = Z(R), z = u.forwardRef(
65
66
  (e, s) => {
66
67
  const {
67
68
  __scopeCheckbox: t,
@@ -74,26 +75,26 @@ var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
74
75
  onCheckedChange: C,
75
76
  form: d,
76
77
  ...p
77
- } = e, [i, k] = u.useState(null), v = H(s, (c) => k(c)), x = u.useRef(!1), g = i ? d || !!i.closest("form") : !0, [m = !1, w] = 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] = $({
78
79
  prop: n,
79
80
  defaultProp: r,
80
81
  onChange: C
81
- }), B = u.useRef(m);
82
+ }), M = u.useRef(m);
82
83
  return u.useEffect(() => {
83
84
  const c = i == null ? void 0 : i.form;
84
85
  if (c) {
85
- const y = () => w(B.current);
86
+ const y = () => w(M.current);
86
87
  return c.addEventListener("reset", y), () => c.removeEventListener("reset", y);
87
88
  }
88
- }, [i, w]), /* @__PURE__ */ N(Z, { scope: t, state: m, disabled: a, children: [
89
+ }, [i, w]), /* @__PURE__ */ S(ee, { scope: t, state: m, disabled: a, children: [
89
90
  /* @__PURE__ */ f(
90
- _.button,
91
+ T.button,
91
92
  {
92
93
  type: "button",
93
94
  role: "checkbox",
94
95
  "aria-checked": h(m) ? "mixed" : m,
95
96
  "aria-required": l,
96
- "data-state": D(m),
97
+ "data-state": B(m),
97
98
  "data-disabled": a ? "" : void 0,
98
99
  disabled: a,
99
100
  value: b,
@@ -108,7 +109,7 @@ var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
108
109
  }
109
110
  ),
110
111
  g && /* @__PURE__ */ f(
111
- te,
112
+ re,
112
113
  {
113
114
  control: i,
114
115
  bubbles: !x.current,
@@ -125,14 +126,14 @@ var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
125
126
  ] });
126
127
  }
127
128
  );
128
- T.displayName = R;
129
- var z = "CheckboxIndicator", L = u.forwardRef(
129
+ z.displayName = R;
130
+ var L = "CheckboxIndicator", D = u.forwardRef(
130
131
  (e, s) => {
131
- const { __scopeCheckbox: t, forceMount: o, ...n } = e, r = ee(z, t);
132
- return /* @__PURE__ */ f(F, { present: o || h(r.state) || r.state === !0, children: /* @__PURE__ */ f(
133
- _.span,
132
+ const { __scopeCheckbox: t, forceMount: o, ...n } = e, r = te(L, t);
133
+ return /* @__PURE__ */ f(V, { present: o || h(r.state) || r.state === !0, children: /* @__PURE__ */ f(
134
+ T.span,
134
135
  {
135
- "data-state": D(r.state),
136
+ "data-state": B(r.state),
136
137
  "data-disabled": r.disabled ? "" : void 0,
137
138
  ...n,
138
139
  ref: s,
@@ -141,9 +142,9 @@ var z = "CheckboxIndicator", L = u.forwardRef(
141
142
  ) });
142
143
  }
143
144
  );
144
- L.displayName = z;
145
- var te = (e) => {
146
- const { control: s, checked: t, bubbles: o = !0, defaultChecked: n, ...r } = e, l = u.useRef(null), a = $(t), b = q(s);
145
+ D.displayName = L;
146
+ var re = (e) => {
147
+ const { control: s, checked: t, bubbles: o = !0, defaultChecked: n, ...r } = e, l = u.useRef(null), a = q(t), b = F(s);
147
148
  u.useEffect(() => {
148
149
  const d = l.current, p = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(p, "checked").set;
149
150
  if (a !== t && k) {
@@ -175,11 +176,11 @@ var te = (e) => {
175
176
  function h(e) {
176
177
  return e === "indeterminate";
177
178
  }
178
- function D(e) {
179
+ function B(e) {
179
180
  return h(e) ? "indeterminate" : e ? "checked" : "unchecked";
180
181
  }
181
- var re = T, oe = L;
182
- const ve = S(
182
+ var oe = z, ne = D;
183
+ const xe = _(
183
184
  ({
184
185
  ariaLabelledBy: e,
185
186
  className: s,
@@ -194,12 +195,12 @@ const ve = S(
194
195
  variant: d,
195
196
  onChange: p
196
197
  }, i) => {
197
- const [k, v] = V(t), x = M(), { theme: g } = J(), m = A(() => {
198
+ const [k, v] = G(t), x = A(), { theme: g } = X(), m = H(() => {
198
199
  v(), p == null || p();
199
200
  }, [p, v]);
200
- return /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
201
+ return /* @__PURE__ */ S("div", { className: "flex items-center gap-2", children: [
201
202
  /* @__PURE__ */ f(
202
- re,
203
+ oe,
203
204
  {
204
205
  id: n ?? x,
205
206
  checked: k,
@@ -208,25 +209,29 @@ const ve = S(
208
209
  disabled: o,
209
210
  "aria-labelledby": e,
210
211
  title: C,
211
- className: X({
212
- className: s,
213
- theme: b ?? g,
214
- variant: d,
215
- checked: k
216
- }),
212
+ className: N(
213
+ J({
214
+ className: s,
215
+ theme: b ?? g,
216
+ variant: d,
217
+ checked: k
218
+ })
219
+ ),
217
220
  onCheckedChange: m,
218
- children: /* @__PURE__ */ f(oe, { children: /* @__PURE__ */ f(O, { className: "w-4 h-4 stroke-2" }) })
221
+ children: /* @__PURE__ */ f(ne, { children: /* @__PURE__ */ f(O, { className: "w-4 h-4 stroke-2" }) })
219
222
  }
220
223
  ),
221
224
  r ? /* @__PURE__ */ f(
222
225
  "label",
223
226
  {
224
227
  htmlFor: a ?? n,
225
- className: G({
226
- variant: d,
227
- theme: b,
228
- className: l
229
- }),
228
+ className: N(
229
+ Q({
230
+ variant: d,
231
+ theme: b,
232
+ className: l
233
+ })
234
+ ),
230
235
  children: r
231
236
  }
232
237
  ) : null
@@ -234,5 +239,5 @@ const ve = S(
234
239
  }
235
240
  );
236
241
  export {
237
- ve as Checkbox
242
+ xe as Checkbox
238
243
  };
@@ -1,29 +1,30 @@
1
- import { jsxs as m, jsx as f } from "react/jsx-runtime";
2
- import { useRef as u, useCallback as r } from "react";
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";
3
4
  import { useDropdownContext as d } from "../../contexts/dropdown.hook.js";
4
5
  import "../../contexts/dropdown.context.js";
5
- import { listItemVariants as p } from "./ListItem.variants.js";
6
- const y = ({ theme: o, ...e }) => {
7
- const { setValue: n, toggleOpen: s } = d(), c = u(null), t = r(
8
- (l) => {
9
- n(l), s(!1);
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, s]
12
- ), a = r(
13
- (l, i) => {
14
- l.key === "Enter" && t(i);
12
+ [n, r]
13
+ ), m = s(
14
+ (t, a) => {
15
+ t.key === "Enter" && l(a);
15
16
  },
16
- [t]
17
+ [l]
17
18
  );
18
- return /* @__PURE__ */ m(
19
+ return /* @__PURE__ */ i(
19
20
  "li",
20
21
  {
21
22
  ref: c,
22
23
  role: "option",
23
- className: p({ theme: o }),
24
+ className: p(x({ theme: o })),
24
25
  tabIndex: 0,
25
- onClick: () => t(e),
26
- onKeyDown: (l) => a(l, e),
26
+ onClick: () => l(e),
27
+ onKeyDown: (t) => m(t, e),
27
28
  children: [
28
29
  e.leftIcon ? /* @__PURE__ */ f("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null,
29
30
  e.label
@@ -32,5 +33,5 @@ const y = ({ theme: o, ...e }) => {
32
33
  );
33
34
  };
34
35
  export {
35
- y as ListItem
36
+ b as ListItem
36
37
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as D, useId as F, useRef as N, useImperativeHandle as L, useEffect as f } from "react";
3
- import { cn as $ } from "../../../utils/index.js";
2
+ import { forwardRef as F, useId as L, useRef as N, useImperativeHandle as $, useEffect as f } from "react";
3
+ import { cn as R } from "../../../utils/index.js";
4
4
  import "../../../contexts/theme.context.js";
5
5
  import { useTheme as A } from "../../../contexts/theme.hook.js";
6
6
  import "../../../js.cookie-OLEfuq_g.js";
@@ -10,10 +10,10 @@ import { useDropdownContext as W } from "../contexts/dropdown.hook.js";
10
10
  import "../contexts/dropdown.context.js";
11
11
  import { List as q } from "./List/List.js";
12
12
  import { C as z } from "../../../chevron-up-CvquEaNg.js";
13
- const _ = D(
14
- ({ theme: R, label: p, placeholder: g, name: o, options: a, defaultValue: c }, O) => {
15
- const d = F(), r = N(null), u = N(null), { wrapperRef: n, wrapperInputRef: h, handleOpen: j, handleOpenIfClosed: y } = U({ ulRef: u }), { isOpen: x, value: e, setValue: w, toggleOpen: b } = W(), { theme: E } = A(), v = R ?? E, i = o ? `${d}-${o}` : d;
16
- L(O, () => r.current, [r]), f(() => {
13
+ const _ = F(
14
+ ({ theme: g, label: p, placeholder: O, name: o, options: a, defaultValue: c }, j) => {
15
+ const d = L(), r = N(null), u = N(null), { wrapperRef: n, wrapperInputRef: h, handleOpen: y, handleOpenIfClosed: E } = U({ ulRef: u }), { isOpen: x, value: e, setValue: w, toggleOpen: b } = W(), { theme: T } = A(), v = g ?? T, i = o ? `${d}-${o}` : d;
16
+ $(j, () => r.current, [r]), f(() => {
17
17
  r.current && (r.current.value = e ? e.value : "");
18
18
  }, [e]), f(() => {
19
19
  if (c) {
@@ -25,15 +25,15 @@ const _ = D(
25
25
  }, [c, a, w]), f(() => {
26
26
  var l;
27
27
  const s = new AbortController();
28
- return (l = n.current) == null || l.addEventListener("focusout", (k) => {
28
+ return (l = n.current) == null || l.addEventListener("focusout", (D) => {
29
29
  var I;
30
- const C = k.relatedTarget;
30
+ const C = D.relatedTarget;
31
31
  (!C || !((I = n.current) != null && I.contains(C))) && b(!1);
32
32
  }), () => {
33
33
  s.abort();
34
34
  };
35
35
  }, [b, n]);
36
- const T = () => e != null && e.leftIcon ? /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null;
36
+ const k = () => e != null && e.leftIcon ? /* @__PURE__ */ t("span", { className: "w-4 h-4 flex justify-center items-center", children: e.leftIcon }) : null;
37
37
  return /* @__PURE__ */ m("div", { ref: n, className: "flex flex-col w-full relative", children: [
38
38
  p ? /* @__PURE__ */ t(
39
39
  "label",
@@ -41,7 +41,7 @@ const _ = D(
41
41
  id: i,
42
42
  className: "m-2 cursor-pointer",
43
43
  htmlFor: i,
44
- onClick: y,
44
+ onClick: E,
45
45
  children: p
46
46
  }
47
47
  ) : null,
@@ -50,21 +50,21 @@ const _ = D(
50
50
  {
51
51
  ref: h,
52
52
  id: i,
53
- className: H({ theme: v }),
53
+ className: R(H({ theme: v })),
54
54
  role: "combobox",
55
- onClick: j,
55
+ onClick: y,
56
56
  "aria-expanded": x,
57
57
  tabIndex: 0,
58
58
  "aria-labelledby": i,
59
59
  children: [
60
60
  /* @__PURE__ */ t("span", { className: "text-base text-inherit", children: e ? /* @__PURE__ */ m("span", { className: "flex gap-3 items-center", children: [
61
- T(),
61
+ k(),
62
62
  e.label
63
- ] }) : g }),
63
+ ] }) : O }),
64
64
  /* @__PURE__ */ t(
65
65
  z,
66
66
  {
67
- className: $(
67
+ className: R(
68
68
  "w-4 h-4 text-inherit transition-all duration-50",
69
69
  x ? "rotate-0" : "rotate-180"
70
70
  )
@@ -1,10 +1,10 @@
1
1
  import { jsxs as y, jsx as a } from "react/jsx-runtime";
2
2
  import s, { forwardRef as m, useId as b } from "react";
3
3
  import { cn as w } from "../../utils/index.js";
4
- import { inputVariants as j } from "./Input.variants.js";
5
4
  import "../../contexts/theme.context.js";
6
- import { useTheme as N } from "../../contexts/theme.hook.js";
5
+ import { useTheme as j } from "../../contexts/theme.hook.js";
7
6
  import "../../js.cookie-OLEfuq_g.js";
7
+ import { inputVariants as N } from "./Input.variants.js";
8
8
  import { P as l } from "../../index-D68N8v8R.js";
9
9
  function p() {
10
10
  return p = Object.assign || function(e) {
@@ -133,7 +133,7 @@ const _ = m(
133
133
  onClickIcon: g,
134
134
  ...d
135
135
  }, x) => {
136
- const v = b(), { theme: O } = N();
136
+ const v = b(), { theme: O } = j();
137
137
  return /* @__PURE__ */ y("div", { className: "flex flex-col gap-1.5", children: [
138
138
  r ? /* @__PURE__ */ a(
139
139
  "label",
@@ -151,7 +151,7 @@ const _ = m(
151
151
  ref: x,
152
152
  name: n,
153
153
  type: i,
154
- className: j({
154
+ className: N({
155
155
  className: e,
156
156
  theme: c ?? O,
157
157
  variant: o ? "error" : "default"
@@ -3,7 +3,7 @@ import "../../index-BaNV0qac.js";
3
3
  import "./components/Body/Body.js";
4
4
  import "./components/Footer/Footer.js";
5
5
  import "./components/Header/Header.js";
6
- import { M as d } from "../../Modal-Ca3bkvvt.js";
6
+ import { M as d } from "../../Modal-L73dmnHv.js";
7
7
  import "./hooks/useModal.js";
8
8
  export {
9
9
  d as Modal
@@ -1,6 +1,7 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { S as m } from "../../../../index-DoOsnuB6.js";
3
- const i = ({ children: o, asChild: t, className: r }) => /* @__PURE__ */ n(t ? m : "div", { className: r, children: o });
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { S as n } from "../../../../index-DoOsnuB6.js";
3
+ import { cn as e } from "../../../../utils/index.js";
4
+ const a = ({ children: o, asChild: t, className: r }) => /* @__PURE__ */ m(t ? n : "div", { className: e(r), children: o });
4
5
  export {
5
- i as Footer
6
+ a as Footer
6
7
  };
@@ -1,6 +1,7 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { S as e } from "../../../../index-DoOsnuB6.js";
3
- const i = ({ children: o, asChild: t, className: r }) => /* @__PURE__ */ n(t ? e : "div", { className: r, children: o });
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { S as n } from "../../../../index-DoOsnuB6.js";
3
+ import { cn as e } from "../../../../utils/index.js";
4
+ const i = ({ children: o, asChild: r, className: t }) => /* @__PURE__ */ m(r ? n : "div", { className: e(t), children: o });
4
5
  export {
5
6
  i as Header
6
7
  };
@@ -1,14 +1,15 @@
1
1
  import "react/jsx-runtime";
2
+ import "../../../../index-BtibbG81.js";
2
3
  import "react";
3
- import { W as b } from "../../../../Modal-Ca3bkvvt.js";
4
+ import { W as c } from "../../../../Modal-L73dmnHv.js";
4
5
  import "../../../../Combination-Cmu9JRkv.js";
5
- import "../../../../index-BtibbG81.js";
6
6
  import "../../../../contexts/theme.context.js";
7
7
  import "../../../../contexts/theme.hook.js";
8
8
  import "../../../../js.cookie-OLEfuq_g.js";
9
+ import "../../../../utils/index.js";
9
10
  import "../../hooks/useModal.js";
10
11
  import "./Wrapper.variants.js";
11
12
  import "../../../../x-CRBgmX1Q.js";
12
13
  export {
13
- b as Wrapper
14
+ c as Wrapper
14
15
  };
@@ -1,7 +1,7 @@
1
1
  import { Body as e } from "./Body/Body.js";
2
2
  import { Footer as t } from "./Footer/Footer.js";
3
3
  import { Header as m } from "./Header/Header.js";
4
- import { W as a } from "../../../Modal-Ca3bkvvt.js";
4
+ import { W as a } from "../../../Modal-L73dmnHv.js";
5
5
  export {
6
6
  e as Body,
7
7
  t as Footer,