@konstructio/ui 0.1.1-alpha.6 → 0.1.2-alpha.2

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 (30) hide show
  1. package/dist/{chevron-down-CVce9Mvh.js → chevron-down-BLZPftpV.js} +2 -2
  2. package/dist/components/Autocomplete/Autocomplete.js +46 -54
  3. package/dist/components/Autocomplete/Autocomplete.variants.js +29 -48
  4. package/dist/components/Autocomplete/components/List/List.js +37 -47
  5. package/dist/components/Autocomplete/components/List/List.variants.js +34 -69
  6. package/dist/components/Badge/Badge.js +2 -2
  7. package/dist/components/Button/Button.variants.js +110 -134
  8. package/dist/components/Checkbox/Checkbox.variants.js +5 -5
  9. package/dist/components/Datepicker/DatePicker.js +754 -705
  10. package/dist/components/Dropdown/Dropdown.variants.js +8 -8
  11. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  12. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  13. package/dist/components/Filter/components/ResetButton/ResetButton.js +16 -11
  14. package/dist/components/Input/Input.js +47 -47
  15. package/dist/components/Input/Input.variants.js +10 -10
  16. package/dist/components/Loading/Loading.js +2 -2
  17. package/dist/components/Loading/Loading.variants.js +4 -4
  18. package/dist/components/Radio/Radio.variants.js +4 -4
  19. package/dist/components/Switch/Switch.js +90 -86
  20. package/dist/components/Switch/Switch.variants.js +16 -12
  21. package/dist/components/Tabs/Tabs.variants.js +2 -2
  22. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
  23. package/dist/{createLucideIcon-BpsAkT97.js → createLucideIcon-DbC6TvM5.js} +4 -4
  24. package/dist/index.d.ts +4 -5
  25. package/dist/package.json +17 -17
  26. package/dist/styles.css +1 -1
  27. package/dist/ui/civo-theme.css +204 -189
  28. package/dist/ui/kubefirst-theme.css +3 -1
  29. package/dist/ui/theme.css +2 -2
  30. package/package.json +17 -17
@@ -16,20 +16,20 @@ const a = r(
16
16
  "outline-none",
17
17
  "h-9",
18
18
  "border-gray-200",
19
- "aria-expanded:border-kubefirst-primary",
20
- "aria-expanded:text-kubefirst-secondary",
21
19
  "focus-visible:bg-zinc-50",
22
- "civo:aria-expanded:border-aurora-500",
23
- "civo:aria-expanded:text-aurora-500"
20
+ "aria-expanded:border-aurora-500",
21
+ "aria-expanded:text-aurora-500",
22
+ "kubefirst:aria-expanded:border-kubefirst-primary",
23
+ "kubefirst:aria-expanded:text-kubefirst-secondary"
24
24
  ],
25
25
  {
26
26
  variants: {
27
27
  hasError: {
28
28
  true: [
29
- "border-red-600",
30
- "text-red-600",
31
- "civo:aria-expanded:border-red-600",
32
- "civo:aria-expanded:text-red-600"
29
+ "aria-expanded:border-red-600",
30
+ "aria-expanded:text-red-600",
31
+ "kubefirst:border-red-600",
32
+ "kubefirst:text-red-600"
33
33
  ],
34
34
  false: ""
35
35
  }
@@ -5,7 +5,7 @@ import { Checkbox as C } from "../../../Checkbox/Checkbox.js";
5
5
  import { cn as n } from "../../../../utils/index.js";
6
6
  import { filterButtonIconVariants as y, filterButtonVariants as N } from "../../Filter.variants.js";
7
7
  import { useBadgeMultiSelect as B } from "./BadgeMultiSelect.hook.js";
8
- import { C as O } from "../../../../chevron-down-CVce9Mvh.js";
8
+ import { C as O } from "../../../../chevron-down-BLZPftpV.js";
9
9
  const $ = ({
10
10
  options: i,
11
11
  label: p,
@@ -5,7 +5,7 @@ import { DatePicker as w } from "../../../Datepicker/DatePicker.js";
5
5
  import { cn as o } from "../../../../utils/index.js";
6
6
  import { filterButtonIconVariants as x, filterButtonVariants as y } from "../../Filter.variants.js";
7
7
  import { useDateFilterDropdown as D } from "./DateFilterDropdown.hook.js";
8
- import { C as N } from "../../../../chevron-down-CVce9Mvh.js";
8
+ import { C as N } from "../../../../chevron-down-BLZPftpV.js";
9
9
  const R = ({
10
10
  label: s,
11
11
  position: l = "left",
@@ -1,24 +1,29 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useCallback as n } from "react";
3
- import { Button as a } from "../../../Button/Button.js";
4
- import { resetEvent as m } from "../../events/index.js";
5
- const l = ({ disabled: e, onClick: t }) => {
6
- const r = n(() => {
7
- m(), t?.();
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useCallback as a } from "react";
3
+ import { Button as m } from "../../../Button/Button.js";
4
+ import { resetEvent as p } from "../../events/index.js";
5
+ const u = ({
6
+ disabled: e,
7
+ onClick: t,
8
+ ...r
9
+ }) => {
10
+ const o = a(() => {
11
+ p(), t?.();
8
12
  }, [t]);
9
- return /* @__PURE__ */ o(
10
- a,
13
+ return /* @__PURE__ */ n(
14
+ m,
11
15
  {
12
16
  type: "button",
13
17
  variant: "text",
14
18
  appearance: "compact",
15
19
  version: "alternate",
16
- onClick: r,
20
+ onClick: o,
17
21
  disabled: e,
22
+ ...r,
18
23
  children: "Reset"
19
24
  }
20
25
  );
21
26
  };
22
27
  export {
23
- l as ResetButton
28
+ u as ResetButton
24
29
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as m, jsx as s } from "react/jsx-runtime";
2
- import l, { forwardRef as g, useId as _, useRef as I, useState as W } from "react";
2
+ import l, { forwardRef as x, useId as _, useRef as I, useState as W } from "react";
3
3
  import { cn as u } from "../../utils/index.js";
4
4
  import { inputVariants as $ } from "./Input.variants.js";
5
5
  import { SearchIcon as L } from "../../assets/icons/components/Search.js";
@@ -8,37 +8,37 @@ import { P as i } from "../../index-h-Ul0anl.js";
8
8
  function h() {
9
9
  return h = Object.assign || function(t) {
10
10
  for (var n = 1; n < arguments.length; n++) {
11
- var o = arguments[n];
12
- for (var e in o)
13
- Object.prototype.hasOwnProperty.call(o, e) && (t[e] = o[e]);
11
+ var a = arguments[n];
12
+ for (var e in a)
13
+ Object.prototype.hasOwnProperty.call(a, e) && (t[e] = a[e]);
14
14
  }
15
15
  return t;
16
16
  }, h.apply(this, arguments);
17
17
  }
18
18
  function S(t, n) {
19
19
  if (t == null) return {};
20
- var o = C(t, n), e, r;
20
+ var a = C(t, n), e, r;
21
21
  if (Object.getOwnPropertySymbols) {
22
- var a = Object.getOwnPropertySymbols(t);
23
- for (r = 0; r < a.length; r++)
24
- e = a[r], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (o[e] = t[e]);
22
+ var o = Object.getOwnPropertySymbols(t);
23
+ for (r = 0; r < o.length; r++)
24
+ e = o[r], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (a[e] = t[e]);
25
25
  }
26
- return o;
26
+ return a;
27
27
  }
28
28
  function C(t, n) {
29
29
  if (t == null) return {};
30
- var o = {}, e = Object.keys(t), r, a;
31
- for (a = 0; a < e.length; a++)
32
- r = e[a], !(n.indexOf(r) >= 0) && (o[r] = t[r]);
33
- return o;
30
+ var a = {}, e = Object.keys(t), r, o;
31
+ for (o = 0; o < e.length; o++)
32
+ r = e[o], !(n.indexOf(r) >= 0) && (a[r] = t[r]);
33
+ return a;
34
34
  }
35
- var x = g(function(t, n) {
36
- var o = t.color, e = o === void 0 ? "currentColor" : o, r = t.size, a = r === void 0 ? 24 : r, c = S(t, ["color", "size"]);
35
+ var v = x(function(t, n) {
36
+ var a = t.color, e = a === void 0 ? "currentColor" : a, r = t.size, o = r === void 0 ? 24 : r, c = S(t, ["color", "size"]);
37
37
  return /* @__PURE__ */ l.createElement("svg", h({
38
38
  ref: n,
39
39
  xmlns: "http://www.w3.org/2000/svg",
40
- width: a,
41
- height: a,
40
+ width: o,
41
+ height: o,
42
42
  viewBox: "0 0 24 24",
43
43
  fill: "none",
44
44
  stroke: e,
@@ -54,45 +54,45 @@ var x = g(function(t, n) {
54
54
  y2: "23"
55
55
  }));
56
56
  });
57
- x.propTypes = {
57
+ v.propTypes = {
58
58
  color: i.string,
59
59
  size: i.oneOfType([i.string, i.number])
60
60
  };
61
- x.displayName = "EyeOff";
62
- function v() {
63
- return v = Object.assign || function(t) {
61
+ v.displayName = "EyeOff";
62
+ function g() {
63
+ return g = Object.assign || function(t) {
64
64
  for (var n = 1; n < arguments.length; n++) {
65
- var o = arguments[n];
66
- for (var e in o)
67
- Object.prototype.hasOwnProperty.call(o, e) && (t[e] = o[e]);
65
+ var a = arguments[n];
66
+ for (var e in a)
67
+ Object.prototype.hasOwnProperty.call(a, e) && (t[e] = a[e]);
68
68
  }
69
69
  return t;
70
- }, v.apply(this, arguments);
70
+ }, g.apply(this, arguments);
71
71
  }
72
72
  function M(t, n) {
73
73
  if (t == null) return {};
74
- var o = R(t, n), e, r;
74
+ var a = R(t, n), e, r;
75
75
  if (Object.getOwnPropertySymbols) {
76
- var a = Object.getOwnPropertySymbols(t);
77
- for (r = 0; r < a.length; r++)
78
- e = a[r], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (o[e] = t[e]);
76
+ var o = Object.getOwnPropertySymbols(t);
77
+ for (r = 0; r < o.length; r++)
78
+ e = o[r], !(n.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(t, e) && (a[e] = t[e]);
79
79
  }
80
- return o;
80
+ return a;
81
81
  }
82
82
  function R(t, n) {
83
83
  if (t == null) return {};
84
- var o = {}, e = Object.keys(t), r, a;
85
- for (a = 0; a < e.length; a++)
86
- r = e[a], !(n.indexOf(r) >= 0) && (o[r] = t[r]);
87
- return o;
84
+ var a = {}, e = Object.keys(t), r, o;
85
+ for (o = 0; o < e.length; o++)
86
+ r = e[o], !(n.indexOf(r) >= 0) && (a[r] = t[r]);
87
+ return a;
88
88
  }
89
- var y = g(function(t, n) {
90
- var o = t.color, e = o === void 0 ? "currentColor" : o, r = t.size, a = r === void 0 ? 24 : r, c = M(t, ["color", "size"]);
91
- return /* @__PURE__ */ l.createElement("svg", v({
89
+ var y = x(function(t, n) {
90
+ var a = t.color, e = a === void 0 ? "currentColor" : a, r = t.size, o = r === void 0 ? 24 : r, c = M(t, ["color", "size"]);
91
+ return /* @__PURE__ */ l.createElement("svg", g({
92
92
  ref: n,
93
93
  xmlns: "http://www.w3.org/2000/svg",
94
- width: a,
95
- height: a,
94
+ width: o,
95
+ height: o,
96
96
  viewBox: "0 0 24 24",
97
97
  fill: "none",
98
98
  stroke: e,
@@ -112,14 +112,14 @@ y.propTypes = {
112
112
  size: i.oneOfType([i.string, i.number])
113
113
  };
114
114
  y.displayName = "Eye";
115
- const A = g(
115
+ const A = x(
116
116
  ({
117
117
  className: t,
118
118
  error: n,
119
- isRequired: o = !1,
119
+ isRequired: a = !1,
120
120
  isSearch: e = !1,
121
121
  label: r,
122
- labelClassName: a,
122
+ labelClassName: o,
123
123
  name: c,
124
124
  theme: O,
125
125
  type: f = "text",
@@ -127,20 +127,20 @@ const A = g(
127
127
  helperTextClassName: j,
128
128
  ...k
129
129
  }, N) => {
130
- const b = _(), P = I(f === "password"), [d, E] = W(() => f !== "password"), p = typeof n == "string" && n.length >= 0, z = d ? y : x;
130
+ const b = _(), P = I(f === "password"), [d, E] = W(() => f !== "password"), p = typeof n == "string" && n.length >= 0, z = d ? y : v;
131
131
  return /* @__PURE__ */ m("div", { className: "flex flex-col gap-2 w-full relative", "data-theme": O, children: [
132
132
  r ? /* @__PURE__ */ m(
133
133
  "label",
134
134
  {
135
135
  htmlFor: b,
136
136
  className: u(
137
- "cursor-pointer text-slate-500 flex gap-1 text-sm font-medium civo-dark:text-slate-50 kubefirst-dark:text-slate-50",
138
- a
137
+ "cursor-pointer text-slate-500 flex gap-1 text-sm font-medium dark:text-slate-50 kubefirst-dark:text-slate-50",
138
+ o
139
139
  ),
140
140
  children: [
141
141
  r,
142
142
  " ",
143
- o && /* @__PURE__ */ s("span", { className: "text-red-600 text-xs mt-0.5", children: "*" })
143
+ a && /* @__PURE__ */ s("span", { className: "text-red-600 text-xs mt-0.5", children: "*" })
144
144
  ]
145
145
  }
146
146
  ) : null,
@@ -192,7 +192,7 @@ const A = g(
192
192
  "span",
193
193
  {
194
194
  className: u(
195
- "text-xs text-slate-600 civo-dark:text-slate-200 kubefirst-dark:text-slate-200",
195
+ "text-xs text-slate-600 dark:text-slate-200 kubefirst-dark:text-slate-200",
196
196
  j
197
197
  ),
198
198
  children: w
@@ -19,15 +19,15 @@ const a = r(
19
19
  "text-sm",
20
20
  "w-full",
21
21
  "transition-all",
22
- "data-[error=false]:civo-dark:focus:ring-aurora-500",
23
- "data-[error=false]:civo:focus:ring-aurora-500",
24
- "data-[error=false]:focus:ring-kubefirst-primary",
25
- "civo-dark:bg-slate-800",
26
- "civo-dark:border-slate-600",
27
- "civo-dark:disabled:bg-slate-900",
28
- "civo-dark:disabled:text-slate-400",
29
- "civo-dark:text-slate-50",
30
- "civo-dark:text-white",
22
+ "data-[error=false]:dark:focus:ring-aurora-500",
23
+ "data-[error=false]:focus:ring-aurora-500",
24
+ "data-[error=false]:kubefirst:focus:ring-kubefirst-primary",
25
+ "dark:bg-slate-800",
26
+ "dark:border-slate-600",
27
+ "dark:disabled:bg-slate-900",
28
+ "dark:disabled:text-slate-400",
29
+ "dark:text-slate-50",
30
+ "dark:text-white",
31
31
  "kubefirst-dark:bg-slate-800",
32
32
  "kubefirst-dark:border-slate-600",
33
33
  "kubefirst-dark:disabled:bg-slate-900",
@@ -39,7 +39,7 @@ const a = r(
39
39
  variants: {
40
40
  variant: {
41
41
  default: "",
42
- error: "border-red-600 kubefirst-dark:border-red-500 civo-dark:border-red-500 dark:border-red-500 pr-8 focus-visible:ring-transparent"
42
+ error: "border-red-600 kubefirst-dark:border-red-500 dark:border-red-500 dark:border-red-500 pr-8 focus-visible:ring-transparent"
43
43
  }
44
44
  },
45
45
  defaultVariants: {
@@ -1,9 +1,9 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { cn as c } from "../../utils/index.js";
3
3
  import { loadingVariants as i } from "./Loading.variants.js";
4
- import { c as t } from "../../createLucideIcon-BpsAkT97.js";
4
+ import { c as t } from "../../createLucideIcon-DbC6TvM5.js";
5
5
  /**
6
- * @license lucide-react v0.542.0 - ISC
6
+ * @license lucide-react v0.544.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
@@ -1,12 +1,12 @@
1
1
  import { c as t } from "../../index-D29mdTf5.js";
2
- const r = t([
2
+ const a = t([
3
3
  "h-8",
4
4
  "w-8",
5
5
  "animate-spin",
6
6
  "text-inherit",
7
- "text-kubefirst-primary",
8
- "civo:text-civo-primary"
7
+ "kubefirst:text-kubefirst-primary",
8
+ "text-aurora-500"
9
9
  ]);
10
10
  export {
11
- r as loadingVariants
11
+ a as loadingVariants
12
12
  };
@@ -51,10 +51,10 @@ const a = e(
51
51
  disabled: !1,
52
52
  checked: [!0, !1],
53
53
  class: [
54
- "peer-checked:border-kubefirst-primary",
55
- "peer-checked:before:bg-kubefirst-primary",
56
- "civo:peer-checked:border-aurora-500",
57
- "civo:peer-checked:before:bg-aurora-500"
54
+ "kubefirst:peer-checked:border-kubefirst-primary",
55
+ "kubefirst:peer-checked:before:bg-kubefirst-primary",
56
+ "peer-checked:border-aurora-500",
57
+ "peer-checked:before:bg-aurora-500"
58
58
  ]
59
59
  },
60
60
  {
@@ -1,112 +1,112 @@
1
- import { jsxs as x, jsx as n } from "react/jsx-runtime";
2
- import * as p from "react";
1
+ import { jsxs as C, jsx as i } from "react/jsx-runtime";
2
+ import * as h from "react";
3
3
  import { forwardRef as H, useRef as M, useId as $, useImperativeHandle as j, useEffect as z } from "react";
4
4
  import { a as A, c as U, b as q } from "../../index-BfXxHr_2.js";
5
- import { u as P } from "../../index-DQH6odE9.js";
5
+ import { u as N } from "../../index-DQH6odE9.js";
6
6
  import { u as F, a as L } from "../../index-CZnD2QxM.js";
7
- import { P as y } from "../../index-C9T9HQaa.js";
7
+ import { P } from "../../index-C9T9HQaa.js";
8
8
  import { cn as R } from "../../utils/index.js";
9
9
  import { thumbVariants as O, switchVariants as V } from "./Switch.variants.js";
10
- var b = "Switch", [D, se] = U(b), [W, X] = D(b), N = p.forwardRef(
11
- (t, i) => {
10
+ var b = "Switch", [D, se] = U(b), [W, X] = D(b), y = h.forwardRef(
11
+ (e, l) => {
12
12
  const {
13
- __scopeSwitch: r,
13
+ __scopeSwitch: t,
14
14
  name: s,
15
15
  checked: o,
16
16
  defaultChecked: d,
17
17
  required: u,
18
- disabled: c,
19
- value: a = "on",
18
+ disabled: r,
19
+ value: c = "on",
20
20
  onCheckedChange: m,
21
- form: e,
22
- ...f
23
- } = t, [l, h] = p.useState(null), v = P(i, (S) => h(S)), C = p.useRef(!1), k = l ? e || !!l.closest("form") : !0, [w, B] = A({
21
+ form: n,
22
+ ...a
23
+ } = e, [p, f] = h.useState(null), w = N(l, (v) => f(v)), x = h.useRef(!1), k = p ? n || !!p.closest("form") : !0, [S, B] = A({
24
24
  prop: o,
25
25
  defaultProp: d ?? !1,
26
26
  onChange: m,
27
27
  caller: b
28
28
  });
29
- return /* @__PURE__ */ x(W, { scope: r, checked: w, disabled: c, children: [
30
- /* @__PURE__ */ n(
31
- y.button,
29
+ return /* @__PURE__ */ C(W, { scope: t, checked: S, disabled: r, children: [
30
+ /* @__PURE__ */ i(
31
+ P.button,
32
32
  {
33
33
  type: "button",
34
34
  role: "switch",
35
- "aria-checked": w,
35
+ "aria-checked": S,
36
36
  "aria-required": u,
37
- "data-state": I(w),
38
- "data-disabled": c ? "" : void 0,
39
- disabled: c,
40
- value: a,
41
- ...f,
42
- ref: v,
43
- onClick: q(t.onClick, (S) => {
44
- B((T) => !T), k && (C.current = S.isPropagationStopped(), C.current || S.stopPropagation());
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());
45
45
  })
46
46
  }
47
47
  ),
48
- k && /* @__PURE__ */ n(
48
+ k && /* @__PURE__ */ i(
49
49
  _,
50
50
  {
51
- control: l,
52
- bubbles: !C.current,
51
+ control: p,
52
+ bubbles: !x.current,
53
53
  name: s,
54
- value: a,
55
- checked: w,
54
+ value: c,
55
+ checked: S,
56
56
  required: u,
57
- disabled: c,
58
- form: e,
57
+ disabled: r,
58
+ form: n,
59
59
  style: { transform: "translateX(-100%)" }
60
60
  }
61
61
  )
62
62
  ] });
63
63
  }
64
64
  );
65
- N.displayName = b;
66
- var g = "SwitchThumb", E = p.forwardRef(
67
- (t, i) => {
68
- const { __scopeSwitch: r, ...s } = t, o = X(g, r);
69
- return /* @__PURE__ */ n(
70
- y.span,
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(
70
+ P.span,
71
71
  {
72
72
  "data-state": I(o.checked),
73
73
  "data-disabled": o.disabled ? "" : void 0,
74
74
  ...s,
75
- ref: i
75
+ ref: l
76
76
  }
77
77
  );
78
78
  }
79
79
  );
80
80
  E.displayName = g;
81
- var G = "SwitchBubbleInput", _ = p.forwardRef(
81
+ var G = "SwitchBubbleInput", _ = h.forwardRef(
82
82
  ({
83
- __scopeSwitch: t,
84
- control: i,
85
- checked: r,
83
+ __scopeSwitch: e,
84
+ control: l,
85
+ checked: t,
86
86
  bubbles: s = !0,
87
87
  ...o
88
88
  }, d) => {
89
- const u = p.useRef(null), c = P(u, d), a = F(r), m = L(i);
90
- return p.useEffect(() => {
91
- const e = u.current;
92
- if (!e) return;
93
- const f = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(
94
- f,
89
+ const u = h.useRef(null), r = N(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,
95
95
  "checked"
96
96
  ).set;
97
- if (a !== r && h) {
98
- const v = new Event("click", { bubbles: s });
99
- h.call(e, r), e.dispatchEvent(v);
97
+ if (c !== t && f) {
98
+ const w = new Event("click", { bubbles: s });
99
+ f.call(n, t), n.dispatchEvent(w);
100
100
  }
101
- }, [a, r, s]), /* @__PURE__ */ n(
101
+ }, [c, t, s]), /* @__PURE__ */ i(
102
102
  "input",
103
103
  {
104
104
  type: "checkbox",
105
105
  "aria-hidden": !0,
106
- defaultChecked: r,
106
+ defaultChecked: t,
107
107
  ...o,
108
108
  tabIndex: -1,
109
- ref: c,
109
+ ref: r,
110
110
  style: {
111
111
  ...o.style,
112
112
  ...m,
@@ -120,53 +120,45 @@ var G = "SwitchBubbleInput", _ = p.forwardRef(
120
120
  }
121
121
  );
122
122
  _.displayName = G;
123
- function I(t) {
124
- return t ? "checked" : "unchecked";
123
+ function I(e) {
124
+ return e ? "checked" : "unchecked";
125
125
  }
126
- var J = N, K = E;
126
+ var J = y, K = E;
127
127
  const ce = H(
128
128
  ({
129
- name: t,
130
- alignment: i = "horizontal",
131
- theme: r,
129
+ name: e,
130
+ alignment: l = "horizontal",
131
+ theme: t,
132
132
  thumbClassName: s,
133
133
  className: o,
134
134
  label: d,
135
135
  defaultChecked: u,
136
- onChange: c,
137
- value: a
138
- }, m) => {
139
- const e = M(null), f = $(), l = t ? `${f}-${t}` : f;
140
- return j(m, () => e.current, [e]), z(() => {
141
- e.current && (e.current.value = `${a}`);
142
- }, [a]), /* @__PURE__ */ x(
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(
143
144
  "div",
144
145
  {
145
146
  className: R(
146
147
  "w-full flex gap-3",
147
- i === "vertical" ? "flex-col" : "flex-row"
148
+ l === "vertical" ? "flex-col" : "flex-row"
148
149
  ),
149
- "data-theme": r,
150
+ "data-theme": t,
150
151
  children: [
151
- d ? /* @__PURE__ */ n(
152
- "label",
153
- {
154
- className: "text-base",
155
- htmlFor: l,
156
- style: { paddingRight: 15 },
157
- children: d
158
- }
159
- ) : null,
160
- /* @__PURE__ */ n(
152
+ /* @__PURE__ */ i(
161
153
  J,
162
154
  {
163
- id: l,
155
+ id: f,
164
156
  defaultChecked: u,
165
- checked: a,
166
- onCheckedChange: (h) => c?.(h),
157
+ checked: r,
158
+ onCheckedChange: (w) => m?.(w),
167
159
  className: R(V({ className: o })),
168
160
  "aria-label": d,
169
- children: /* @__PURE__ */ n(
161
+ children: /* @__PURE__ */ i(
170
162
  K,
171
163
  {
172
164
  className: O({
@@ -176,11 +168,23 @@ const ce = H(
176
168
  )
177
169
  }
178
170
  ),
179
- /* @__PURE__ */ n(
171
+ d ? /* @__PURE__ */ C(
172
+ "label",
173
+ {
174
+ className: "flex flex-col text-slate-800 dark:text-white text-sm",
175
+ htmlFor: f,
176
+ style: { paddingRight: 15 },
177
+ children: [
178
+ d,
179
+ c ? /* @__PURE__ */ i("span", { className: "text-slate-600 dark:text-slate-400 text-xs", children: c }) : null
180
+ ]
181
+ }
182
+ ) : null,
183
+ /* @__PURE__ */ i(
180
184
  "input",
181
185
  {
182
- ref: e,
183
- name: t,
186
+ ref: a,
187
+ name: e,
184
188
  type: "text",
185
189
  className: "hidden",
186
190
  "aria-hidden": "true"