@konstructio/ui 0.1.2-alpha.44 → 0.1.2-alpha.46

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 (59) hide show
  1. package/dist/components/AlertDialog/AlertDialog.js +39 -37
  2. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  3. package/dist/components/AlertDialog/components/index.js +1 -1
  4. package/dist/components/Badge/Badge.js +23 -26
  5. package/dist/components/Badge/Badge.variants.js +1 -1
  6. package/dist/components/Button/Button.variants.js +108 -98
  7. package/dist/components/Checkbox/Checkbox.js +104 -100
  8. package/dist/components/Checkbox/Checkbox.variants.js +30 -7
  9. package/dist/components/Filter/Filter.js +1 -1
  10. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +9 -10
  11. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +76 -43
  12. package/dist/components/Filter/components/ResetButton/ResetButton.js +21 -32
  13. package/dist/components/Filter/events/index.js +3 -3
  14. package/dist/components/ImageUpload/ImageUpload.js +221 -0
  15. package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
  16. package/dist/components/Input/Input.variants.js +10 -2
  17. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +4 -4
  18. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +16 -7
  19. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +92 -74
  20. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +53 -29
  21. package/dist/components/PhoneNumberInput/components/Wrapper.js +139 -120
  22. package/dist/components/Select/Select.js +48 -0
  23. package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +3 -3
  24. package/dist/components/{Dropdown → Select}/components/List/List.js +48 -43
  25. package/dist/components/{Dropdown → Select}/components/List/List.variants.js +8 -5
  26. package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.js +20 -20
  27. package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +3 -2
  28. package/dist/components/{Dropdown → Select}/components/Wrapper.js +70 -70
  29. package/dist/components/Select/contexts/index.js +6 -0
  30. package/dist/components/{Dropdown/contexts/dropdown.context.js → Select/contexts/select.context.js} +2 -2
  31. package/dist/components/Select/contexts/select.hook.js +11 -0
  32. package/dist/components/Select/contexts/select.provider.js +58 -0
  33. package/dist/components/{Dropdown → Select}/hooks/useNavigationList.js +3 -3
  34. package/dist/components/{Dropdown/hooks/useDropdown.js → Select/hooks/useSelect.js} +33 -33
  35. package/dist/components/Switch/Switch.js +153 -125
  36. package/dist/components/Switch/Switch.variants.js +15 -6
  37. package/dist/components/Typography/Typography.js +25 -27
  38. package/dist/components/Typography/Typography.variants.js +2 -2
  39. package/dist/components/VirtualizedTable/components/Actions/Actions.js +14 -14
  40. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +10 -10
  41. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +1 -1
  42. package/dist/components/index.js +77 -74
  43. package/dist/{index-CPU02rhe.js → index-D6KzX_ef.js} +13 -12
  44. package/dist/index.d.ts +106 -60
  45. package/dist/index.js +109 -106
  46. package/dist/package.json +4 -4
  47. package/dist/styles.css +1 -1
  48. package/dist/ui/civo-theme.css +6 -5
  49. package/dist/ui/theme.css +27 -0
  50. package/dist/x-BXShoIAM.js +8 -0
  51. package/package.json +4 -4
  52. package/dist/components/Dropdown/Dropdown.js +0 -48
  53. package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
  54. package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -58
  55. package/dist/components/Dropdown/contexts/index.js +0 -6
  56. /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
  57. /package/dist/components/{Dropdown → Select}/components/index.js +0 -0
  58. /package/dist/components/{Dropdown → Select}/constants/index.js +0 -0
  59. /package/dist/components/{Dropdown → Select}/constants/pagination.js +0 -0
@@ -0,0 +1,58 @@
1
+ import { jsx as L } from "react/jsx-runtime";
2
+ import { useState as e, useRef as f, useCallback as T, useEffect as p } from "react";
3
+ import { SelectContext as N } from "./select.context.js";
4
+ import { useToggle as O } from "../../../hooks/useToggle.js";
5
+ const c = 1, R = 300, V = ({
6
+ children: C,
7
+ value: E,
8
+ name: i,
9
+ highlightSearch: S = !1,
10
+ options: n,
11
+ onChange: a,
12
+ onBlur: u
13
+ }) => {
14
+ const [d, l] = e(n), v = f(S), [F, g] = O(!1), [P, I] = e(""), [b, x] = e(!0), [A, o] = e(!0), [_, s] = e(c), [y, h] = e(!1), t = f(void 0), D = T(
15
+ (r, m) => {
16
+ m?.current && (m.current.value = r), t.current && clearTimeout(t.current), h(!0), o(!0), s(c), a?.({ target: { value: r, name: i ?? "" } }), u?.(), t.current = setTimeout(() => {
17
+ h(!1);
18
+ }, R);
19
+ },
20
+ [a, i, u]
21
+ ), G = T(
22
+ (r) => {
23
+ g(r), o(!0), s(c);
24
+ },
25
+ [g]
26
+ );
27
+ return p(() => {
28
+ l(n);
29
+ }, [n.length]), p(() => () => {
30
+ t.current && clearTimeout(t.current);
31
+ }, []), /* @__PURE__ */ L(
32
+ N.Provider,
33
+ {
34
+ value: {
35
+ highlightSearchEnabled: v.current,
36
+ isOpen: F,
37
+ searchTerm: P,
38
+ value: E,
39
+ canFilter: b,
40
+ canContinueFetching: A,
41
+ page: _,
42
+ options: d,
43
+ isTyping: y,
44
+ setOptions: l,
45
+ setPage: s,
46
+ setCanContinueFetching: o,
47
+ setCanFilter: x,
48
+ setSearchTerm: I,
49
+ setValue: D,
50
+ toggleOpen: G
51
+ },
52
+ children: C
53
+ }
54
+ );
55
+ };
56
+ export {
57
+ V as SelectProvider
58
+ };
@@ -1,6 +1,6 @@
1
1
  import { useRef as g, useEffect as a } from "react";
2
- import { useDropdownContext as k } from "../contexts/dropdown.hook.js";
3
- const A = ({
2
+ import { useSelectContext as k } from "../contexts/select.hook.js";
3
+ const d = ({
4
4
  searchable: o,
5
5
  ulRef: n,
6
6
  wrapperInputRef: e,
@@ -46,5 +46,5 @@ const A = ({
46
46
  }, [s]);
47
47
  };
48
48
  export {
49
- A as useNavigationUlList
49
+ d as useNavigationUlList
50
50
  };
@@ -1,22 +1,22 @@
1
- import { useRef as m, useEffect as c, useCallback as b } from "react";
2
- import { useDropdownContext as L } from "../contexts/dropdown.hook.js";
3
- const p = ({
1
+ import { useRef as m, useEffect as c, useCallback as w } from "react";
2
+ import { useSelectContext as L } from "../contexts/select.hook.js";
3
+ const y = ({
4
4
  ulRef: f,
5
- inputRef: t,
6
- disabled: w,
5
+ inputRef: r,
6
+ disabled: E,
7
7
  internalValue: u,
8
8
  onBlur: g
9
9
  }) => {
10
- const r = m(null), a = m(null), { value: i, setSearchTerm: v, setCanFilter: d, toggleOpen: n } = L();
10
+ const t = m(null), a = m(null), { value: i, setSearchTerm: v, setCanFilter: d, toggleOpen: n } = L();
11
11
  c(() => {
12
- const e = new AbortController(), o = (l) => {
12
+ const e = new AbortController(), s = (l) => {
13
13
  l.key === "Escape" && n(!1);
14
- }, s = (l) => {
15
- r.current?.contains(l.target) || n(!1);
14
+ }, o = (l) => {
15
+ t.current?.contains(l.target) || n(!1);
16
16
  };
17
- return document.addEventListener("keydown", o, {
17
+ return document.addEventListener("keydown", s, {
18
18
  signal: e.signal
19
- }), document.addEventListener("mousedown", s, {
19
+ }), document.addEventListener("mousedown", o, {
20
20
  signal: e.signal
21
21
  }), document.addEventListener(
22
22
  "visibilitychange",
@@ -29,20 +29,20 @@ const p = ({
29
29
  ), a.current?.addEventListener(
30
30
  "focusin",
31
31
  (l) => {
32
- !w && l.target?.matches(":focus-visible") && n(!0);
32
+ !E && l.target?.matches(":focus-visible") && n(!0);
33
33
  },
34
34
  { signal: e.signal }
35
35
  ), () => {
36
36
  e.abort();
37
37
  };
38
- }, [n, r]), c(() => {
38
+ }, [n, t]), c(() => {
39
39
  const e = new AbortController();
40
40
  return a.current?.addEventListener(
41
41
  "keydown",
42
- (o) => {
43
- if (o.key === "ArrowDown") {
44
- const s = f.current?.querySelector("li");
45
- s && s.focus();
42
+ (s) => {
43
+ if (s.key === "ArrowDown") {
44
+ const o = f.current?.querySelector("li");
45
+ o && o.focus();
46
46
  }
47
47
  },
48
48
  { signal: e.signal }
@@ -51,13 +51,13 @@ const p = ({
51
51
  };
52
52
  }, [a, f]), c(() => {
53
53
  const e = new AbortController();
54
- return t?.current?.addEventListener(
54
+ return r?.current?.addEventListener(
55
55
  "focusin",
56
56
  () => {
57
57
  v(u?.value ?? ""), d(!1);
58
58
  },
59
59
  { signal: e.signal }
60
- ), t?.current?.addEventListener(
60
+ ), r?.current?.addEventListener(
61
61
  "focusout",
62
62
  () => {
63
63
  d(!0);
@@ -69,35 +69,35 @@ const p = ({
69
69
  d(!1);
70
70
  },
71
71
  { signal: e.signal }
72
- ), r.current?.addEventListener(
72
+ ), t.current?.addEventListener(
73
73
  "focusout",
74
- (o) => {
75
- r.current?.contains(o.relatedTarget) || n(!1);
74
+ (s) => {
75
+ t.current?.contains(s.relatedTarget) || n(!1);
76
76
  },
77
77
  { signal: e.signal }
78
78
  ), () => {
79
79
  e.abort();
80
80
  };
81
81
  }, [i]), c(() => {
82
- t?.current && (t.current.value = i && u?.value || "");
82
+ r?.current && (r.current.value = i && u?.value || "");
83
83
  }, [u, i]), c(() => {
84
84
  const e = new AbortController();
85
- return r.current?.addEventListener("focusout", (o) => {
86
- const s = o.relatedTarget;
87
- (!s || !r.current?.contains(s)) && (t?.current?.value || g?.());
85
+ return t.current?.addEventListener("focusout", (s) => {
86
+ const o = s.relatedTarget;
87
+ (!o || !t.current?.contains(o)) && (r?.current?.value || g?.());
88
88
  }), () => {
89
89
  e.abort();
90
90
  };
91
- }, [n, r, v, g, i]);
92
- const E = b(() => {
93
- n(!0), requestAnimationFrame(() => t?.current?.focus());
94
- }, [t, n]);
91
+ }, [n, t, v, g, i]);
92
+ const b = w(() => {
93
+ n(!0), requestAnimationFrame(() => r?.current?.focus());
94
+ }, [r, n]);
95
95
  return {
96
- wrapperRef: r,
96
+ wrapperRef: t,
97
97
  wrapperInputRef: a,
98
- handleOpen: E
98
+ handleOpen: b
99
99
  };
100
100
  };
101
101
  export {
102
- p as useDropdown
102
+ y as useSelect
103
103
  };
@@ -1,115 +1,116 @@
1
- import { jsxs as C, jsx as i } from "react/jsx-runtime";
2
- import * as h from "react";
3
- import { forwardRef as H, useRef as M, useId as $, useImperativeHandle as j, useEffect as z } from "react";
4
- import { a as A, c as U, P as N, b as q } from "../../index-DKfEnhKr.js";
1
+ import { jsxs as y, jsx as l } from "react/jsx-runtime";
2
+ import * as p from "react";
3
+ import { forwardRef as M, useRef as $, useId as j, useImperativeHandle as z, useEffect as A } from "react";
4
+ import { a as U, c as q, P as N, b as F } from "../../index-DKfEnhKr.js";
5
5
  import { u as P } from "../../index-DLcqcWxM.js";
6
- import { u as F } from "../../index-BZPx6jYI.js";
7
- import { u as L } from "../../index-DtEcCIrM.js";
8
- import { cn as R } from "../../utils/index.js";
9
- import { thumbVariants as O, switchVariants as V } from "./Switch.variants.js";
10
- var b = "Switch", [D, se] = U(b), [W, X] = D(b), y = h.forwardRef(
11
- (e, l) => {
6
+ import { u as L } from "../../index-BZPx6jYI.js";
7
+ import { u as O } from "../../index-DtEcCIrM.js";
8
+ import { Typography as R } from "../Typography/Typography.js";
9
+ import { cn as C } from "../../utils/index.js";
10
+ import { thumbVariants as V, switchVariants as D } from "./Switch.variants.js";
11
+ var k = "Switch", [W, ne] = q(k), [X, G] = W(k), g = p.forwardRef(
12
+ (o, d) => {
12
13
  const {
13
- __scopeSwitch: t,
14
- name: s,
15
- checked: o,
16
- defaultChecked: d,
17
- required: u,
18
- disabled: r,
19
- value: c = "on",
20
- onCheckedChange: m,
21
- form: n,
22
- ...a
23
- } = e, [p, f] = h.useState(null), w = P(l, (v) => f(v)), x = h.useRef(!1), k = p ? n || !!p.closest("form") : !0, [S, B] = A({
24
- prop: o,
25
- defaultProp: d ?? !1,
26
- onChange: m,
27
- caller: b
14
+ __scopeSwitch: e,
15
+ name: c,
16
+ checked: t,
17
+ defaultChecked: S,
18
+ required: r,
19
+ disabled: n,
20
+ value: a = "on",
21
+ onCheckedChange: v,
22
+ form: i,
23
+ ...u
24
+ } = o, [f, m] = p.useState(null), s = P(d, (x) => m(x)), h = p.useRef(!1), b = f ? i || !!f.closest("form") : !0, [w, T] = U({
25
+ prop: t,
26
+ defaultProp: S ?? !1,
27
+ onChange: v,
28
+ caller: k
28
29
  });
29
- return /* @__PURE__ */ C(W, { scope: t, checked: S, disabled: r, children: [
30
- /* @__PURE__ */ i(
30
+ return /* @__PURE__ */ y(X, { scope: e, checked: w, disabled: n, children: [
31
+ /* @__PURE__ */ l(
31
32
  N.button,
32
33
  {
33
34
  type: "button",
34
35
  role: "switch",
35
- "aria-checked": S,
36
- "aria-required": u,
37
- "data-state": I(S),
38
- "data-disabled": r ? "" : void 0,
39
- disabled: r,
40
- value: c,
41
- ...a,
42
- ref: w,
43
- onClick: q(e.onClick, (v) => {
44
- B((T) => !T), k && (x.current = v.isPropagationStopped(), x.current || v.stopPropagation());
36
+ "aria-checked": w,
37
+ "aria-required": r,
38
+ "data-state": B(w),
39
+ "data-disabled": n ? "" : void 0,
40
+ disabled: n,
41
+ value: a,
42
+ ...u,
43
+ ref: s,
44
+ onClick: F(o.onClick, (x) => {
45
+ T((H) => !H), b && (h.current = x.isPropagationStopped(), h.current || x.stopPropagation());
45
46
  })
46
47
  }
47
48
  ),
48
- k && /* @__PURE__ */ i(
49
- _,
49
+ b && /* @__PURE__ */ l(
50
+ I,
50
51
  {
51
- control: p,
52
- bubbles: !x.current,
53
- name: s,
54
- value: c,
55
- checked: S,
56
- required: u,
57
- disabled: r,
58
- form: n,
52
+ control: f,
53
+ bubbles: !h.current,
54
+ name: c,
55
+ value: a,
56
+ checked: w,
57
+ required: r,
58
+ disabled: n,
59
+ form: i,
59
60
  style: { transform: "translateX(-100%)" }
60
61
  }
61
62
  )
62
63
  ] });
63
64
  }
64
65
  );
65
- y.displayName = b;
66
- var g = "SwitchThumb", E = h.forwardRef(
67
- (e, l) => {
68
- const { __scopeSwitch: t, ...s } = e, o = X(g, t);
69
- return /* @__PURE__ */ i(
66
+ g.displayName = k;
67
+ var E = "SwitchThumb", _ = p.forwardRef(
68
+ (o, d) => {
69
+ const { __scopeSwitch: e, ...c } = o, t = G(E, e);
70
+ return /* @__PURE__ */ l(
70
71
  N.span,
71
72
  {
72
- "data-state": I(o.checked),
73
- "data-disabled": o.disabled ? "" : void 0,
74
- ...s,
75
- ref: l
73
+ "data-state": B(t.checked),
74
+ "data-disabled": t.disabled ? "" : void 0,
75
+ ...c,
76
+ ref: d
76
77
  }
77
78
  );
78
79
  }
79
80
  );
80
- E.displayName = g;
81
- var G = "SwitchBubbleInput", _ = h.forwardRef(
81
+ _.displayName = E;
82
+ var J = "SwitchBubbleInput", I = p.forwardRef(
82
83
  ({
83
- __scopeSwitch: e,
84
- control: l,
85
- checked: t,
86
- bubbles: s = !0,
87
- ...o
88
- }, d) => {
89
- const u = h.useRef(null), r = P(u, d), c = F(t), m = L(l);
90
- return h.useEffect(() => {
91
- const n = u.current;
92
- if (!n) return;
93
- const a = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(
94
- a,
84
+ __scopeSwitch: o,
85
+ control: d,
86
+ checked: e,
87
+ bubbles: c = !0,
88
+ ...t
89
+ }, S) => {
90
+ const r = p.useRef(null), n = P(r, S), a = L(e), v = O(d);
91
+ return p.useEffect(() => {
92
+ const i = r.current;
93
+ if (!i) return;
94
+ const u = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(
95
+ u,
95
96
  "checked"
96
97
  ).set;
97
- if (c !== t && f) {
98
- const w = new Event("click", { bubbles: s });
99
- f.call(n, t), n.dispatchEvent(w);
98
+ if (a !== e && m) {
99
+ const s = new Event("click", { bubbles: c });
100
+ m.call(i, e), i.dispatchEvent(s);
100
101
  }
101
- }, [c, t, s]), /* @__PURE__ */ i(
102
+ }, [a, e, c]), /* @__PURE__ */ l(
102
103
  "input",
103
104
  {
104
105
  type: "checkbox",
105
106
  "aria-hidden": !0,
106
- defaultChecked: t,
107
- ...o,
107
+ defaultChecked: e,
108
+ ...t,
108
109
  tabIndex: -1,
109
- ref: r,
110
+ ref: n,
110
111
  style: {
111
- ...o.style,
112
- ...m,
112
+ ...t.style,
113
+ ...v,
113
114
  position: "absolute",
114
115
  pointerEvents: "none",
115
116
  opacity: 0,
@@ -119,72 +120,99 @@ var G = "SwitchBubbleInput", _ = h.forwardRef(
119
120
  );
120
121
  }
121
122
  );
122
- _.displayName = G;
123
- function I(e) {
124
- return e ? "checked" : "unchecked";
123
+ I.displayName = J;
124
+ function B(o) {
125
+ return o ? "checked" : "unchecked";
125
126
  }
126
- var J = y, K = E;
127
- const ce = H(
127
+ var K = g, Q = _;
128
+ const ie = M(
128
129
  ({
129
- name: e,
130
- alignment: l = "horizontal",
131
- theme: t,
132
- thumbClassName: s,
133
- className: o,
134
- label: d,
135
- defaultChecked: u,
136
- value: r,
137
- helperText: c,
138
- onChange: m
139
- }, n) => {
140
- const a = M(null), p = $(), f = e ? `${p}-${e}` : p;
141
- return j(n, () => a.current, [a]), z(() => {
142
- a.current && (a.current.value = `${r}`);
143
- }, [r]), /* @__PURE__ */ C(
130
+ alignment: o = "horizontal",
131
+ className: d,
132
+ defaultChecked: e,
133
+ disabled: c = !1,
134
+ helperText: t,
135
+ helperTextClassName: S,
136
+ label: r,
137
+ labelClassName: n,
138
+ name: a,
139
+ theme: v,
140
+ thumbClassName: i,
141
+ value: u,
142
+ onChange: f
143
+ }, m) => {
144
+ const s = $(null), h = j(), b = a ? `${h}-${a}` : h;
145
+ return z(m, () => s.current, [s]), A(() => {
146
+ s.current && (s.current.value = `${u}`);
147
+ }, [u]), /* @__PURE__ */ y(
144
148
  "div",
145
149
  {
146
- className: R(
147
- "w-full flex gap-3",
148
- l === "vertical" ? "flex-col" : "flex-row"
150
+ className: C(
151
+ "w-full",
152
+ "flex",
153
+ "gap-3",
154
+ o === "vertical" ? "flex-col" : "flex-row"
149
155
  ),
150
- "data-theme": t,
156
+ "data-theme": v,
151
157
  children: [
152
- /* @__PURE__ */ i(
153
- J,
158
+ /* @__PURE__ */ l(
159
+ K,
154
160
  {
155
- id: f,
156
- defaultChecked: u,
157
- checked: r,
158
- onCheckedChange: (w) => m?.(w),
159
- className: R(V({ className: o })),
160
- "aria-label": d,
161
- children: /* @__PURE__ */ i(
162
- K,
161
+ id: b,
162
+ defaultChecked: e,
163
+ checked: u,
164
+ onCheckedChange: (w) => f?.(w),
165
+ className: C(D({ className: d })),
166
+ "aria-label": r,
167
+ disabled: c,
168
+ children: /* @__PURE__ */ l(
169
+ Q,
163
170
  {
164
- className: O({
165
- className: s
171
+ className: V({
172
+ className: i
166
173
  })
167
174
  }
168
175
  )
169
176
  }
170
177
  ),
171
- d ? /* @__PURE__ */ C(
172
- "label",
178
+ r ? /* @__PURE__ */ y(
179
+ R,
173
180
  {
174
- className: "flex flex-col text-slate-800 dark:text-white text-sm",
175
- htmlFor: f,
181
+ component: "label",
182
+ className: C(
183
+ "flex",
184
+ "flex-col",
185
+ "text-sm",
186
+ "dark:text-white",
187
+ "select-none",
188
+ n
189
+ ),
190
+ htmlFor: b,
176
191
  style: { paddingRight: 15 },
177
192
  children: [
178
- d,
179
- c ? /* @__PURE__ */ i("span", { className: "text-slate-600 dark:text-slate-400 text-xs", children: c }) : null
193
+ r,
194
+ t ? /* @__PURE__ */ l(
195
+ R,
196
+ {
197
+ component: "span",
198
+ className: C(
199
+ "text-xs",
200
+ "select-none",
201
+ "text-slate-600",
202
+ "dark:text-metal-400",
203
+ S
204
+ ),
205
+ children: t
206
+ }
207
+ ) : null
180
208
  ]
181
209
  }
182
210
  ) : null,
183
- /* @__PURE__ */ i(
211
+ /* @__PURE__ */ l(
184
212
  "input",
185
213
  {
186
- ref: a,
187
- name: e,
214
+ ref: s,
215
+ name: a,
188
216
  type: "text",
189
217
  className: "hidden",
190
218
  "aria-hidden": "true"
@@ -196,5 +224,5 @@ const ce = H(
196
224
  }
197
225
  );
198
226
  export {
199
- ce as Switch
227
+ ie as Switch
200
228
  };
@@ -1,5 +1,5 @@
1
1
  import { c as a } from "../../index-D29mdTf5.js";
2
- const r = a([
2
+ const t = a([
3
3
  "w-10",
4
4
  "h-5",
5
5
  "flex",
@@ -8,14 +8,23 @@ const r = a([
8
8
  "shadow",
9
9
  "focus:shadow-md",
10
10
  "data-[state=unchecked]:bg-gray-300",
11
- "dark:data-[state=unchecked]:bg-gray-600",
11
+ "dark:data-[state=unchecked]:bg-metal-600",
12
12
  "transition-all",
13
13
  "delay-10",
14
14
  "duration-250",
15
15
  "cursor-pointer",
16
16
  "bg-aurora-500",
17
- "kubefirst:bg-kubefirst-primary"
18
- ]), e = a([
17
+ "kubefirst:bg-kubefirst-primary",
18
+ "[&+label,&+span]:cursor-pointer",
19
+ "disabled:[&+label,&+span,&]:cursor-not-allowed",
20
+ "disabled:bg-gray-200",
21
+ "disabled:data-[state=unchecked]:[&>span]:bg-white",
22
+ "disabled:data-[state=unchecked]:bg-gray-200",
23
+ "dark:disabled:bg-metal-700",
24
+ "dark:disabled:data-[state=unchecked]:[&>span]:bg-metal-600",
25
+ "dark:disabled:data-[state=unchecked]:bg-metal-700",
26
+ "dark:disabled:[&>span]:bg-metal-600"
27
+ ]), d = a([
19
28
  "block",
20
29
  "w-4",
21
30
  "h-4",
@@ -31,6 +40,6 @@ const r = a([
31
40
  "duration-300"
32
41
  ]);
33
42
  export {
34
- r as switchVariants,
35
- e as thumbVariants
43
+ t as switchVariants,
44
+ d as thumbVariants
36
45
  };
@@ -1,30 +1,28 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { forwardRef as f } from "react";
3
- import { cn as n } from "../../utils/index.js";
4
- import { typographyVariants as c } from "./Typography.variants.js";
5
- const d = f(
6
- ({ className: t, theme: r, children: p, variant: o, component: e, ...m }, a) => {
7
- const s = e ?? (o?.includes("h") ? o : "p");
8
- return /* @__PURE__ */ y(
9
- s,
10
- {
11
- ref: a,
12
- "data-theme": r,
13
- className: n(
14
- "text-slate-800",
15
- "dark:text-metal-50",
16
- c({
17
- className: t,
18
- variant: o
19
- })
20
- ),
21
- ...m,
22
- children: p
23
- }
24
- );
25
- }
26
- );
27
- d.displayName = "Typography";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as y } from "react";
3
+ import { cn as c } from "../../utils/index.js";
4
+ import { typographyVariants as f } from "./Typography.variants.js";
5
+ const d = y(({ className: o, theme: r, children: p, variant: t, component: e, ...m }, a) => {
6
+ const s = e ?? (t?.includes("h") ? t : "p");
7
+ return /* @__PURE__ */ n(
8
+ s,
9
+ {
10
+ ref: a,
11
+ "data-theme": r,
12
+ className: c(
13
+ "text-slate-800",
14
+ "dark:text-metal-50",
15
+ f({
16
+ className: o,
17
+ variant: t
18
+ })
19
+ ),
20
+ ...m,
21
+ children: p
22
+ }
23
+ );
24
+ });
25
+ d.displayName = "KonstructTypography";
28
26
  export {
29
27
  d as Typography
30
28
  };
@@ -3,7 +3,7 @@ const a = t([], {
3
3
  variants: {
4
4
  variant: {
5
5
  h1: ["text-[57px]", "leading-16"],
6
- h2: ["text-[45px]", "leading-[52px]"],
6
+ h2: ["text-[45px]", "leading-13"],
7
7
  h3: ["text-4xl", "leading-11"],
8
8
  h4: ["text-[32px]", "leading-10"],
9
9
  h5: ["text-[28px]", "leading-9"],
@@ -40,7 +40,7 @@ const a = t([], {
40
40
  body1: ["text-base", "leading-6", "tracking-[0.5px]"],
41
41
  body2: ["text-sm", "leading-5", "tracking-[0.25px]"],
42
42
  body3: ["text-xs", "leading-4", "tracking-[0.4px]"],
43
- tooltip: ["text-sm", "leading-[22px]"]
43
+ tooltip: ["text-sm", "leading-5.5"]
44
44
  }
45
45
  },
46
46
  defaultVariants: {