@konstructio/ui 0.0.5 → 0.0.6

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 (42) hide show
  1. package/dist/{AlertDialogTrigger-lenvKoGF.js → AlertDialogTrigger-D4Tm_9M0.js} +2 -2
  2. package/dist/{Modal-Bg9UG35z.js → Modal-Ca3bkvvt.js} +2 -2
  3. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  4. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  5. package/dist/components/AlertDialog/components/index.js +1 -1
  6. package/dist/components/Autocomplete/Autocomplete.js +31 -30
  7. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  8. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  9. package/dist/components/Card/Card.d.ts +4 -0
  10. package/dist/components/Card/Card.js +38 -0
  11. package/dist/components/Card/Card.types.d.ts +7 -0
  12. package/dist/components/Card/Card.types.js +1 -0
  13. package/dist/components/Card/Card.variants.d.ts +10 -0
  14. package/dist/components/Card/Card.variants.js +87 -0
  15. package/dist/components/Checkbox/Checkbox.js +106 -101
  16. package/dist/components/Checkbox/Checkbox.types.d.ts +2 -0
  17. package/dist/components/Dropdown/components/List/List.js +14 -13
  18. package/dist/components/Dropdown/components/List/List.types.d.ts +1 -3
  19. package/dist/components/Dropdown/components/ListItem/ListItem.js +25 -18
  20. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +14 -3
  21. package/dist/components/Dropdown/components/Wrapper.js +46 -34
  22. package/dist/components/Modal/Modal.js +2 -2
  23. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  24. package/dist/components/Modal/components/index.js +1 -1
  25. package/dist/components/NumberInput/NumberInput.js +65 -65
  26. package/dist/components/Range/Range.js +1 -1
  27. package/dist/components/Slider/Slider.js +1 -1
  28. package/dist/components/Switch/Switch.js +59 -49
  29. package/dist/components/Toast/Toast.js +3 -3
  30. package/dist/components/Tooltip/Tooltip.js +17 -17
  31. package/dist/components/Tooltip/Tooltip.variants.js +1 -1
  32. package/dist/components/index.js +1 -1
  33. package/dist/index-BaNV0qac.js +19164 -0
  34. package/dist/{index-O3j1K921.js → index-BedjZUuB.js} +1 -1
  35. package/dist/{index-ffjBR8Av.js → index-BtibbG81.js} +1 -1
  36. package/dist/{index-Ci9Yg4G1.js → index-z-AJyzdv.js} +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/package.json +35 -35
  39. package/dist/styles.css +1 -1
  40. package/dist/{useBreadcrumb-tyxjV-a1.js → useBreadcrumb-DxYsZvj_.js} +4 -4
  41. package/package.json +36 -36
  42. package/dist/index-OOfdXoxx.js +0 -423
@@ -2,8 +2,8 @@ import { jsx as c, jsxs as U, Fragment as j } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import { u as xe, b as Y, c as ee, d as R, e as Le, a as ke } from "./index-8vgf-x5i.js";
4
4
  import { u as O, S as We, a as $e } from "./index-DoOsnuB6.js";
5
- import { D as Ue, P as Ge } from "./index-O3j1K921.js";
6
- import { P } from "./index-OOfdXoxx.js";
5
+ import { D as Ue, P as Ge } from "./index-BedjZUuB.js";
6
+ import { P } from "./index-BaNV0qac.js";
7
7
  import { P as G } from "./index-D4Q2rMby.js";
8
8
  import { R as Ke } from "./Combination-Cmu9JRkv.js";
9
9
  import "./contexts/theme.context.js";
@@ -1,12 +1,12 @@
1
1
  import { jsx as _, jsxs as Q } from "react/jsx-runtime";
2
- import { r as _r } from "./index-OOfdXoxx.js";
2
+ import { r as _r } from "./index-BaNV0qac.js";
3
3
  import { Body as Mr } from "./components/Modal/components/Body/Body.js";
4
4
  import { Footer as kr } from "./components/Modal/components/Footer/Footer.js";
5
5
  import { Header as Lr } from "./components/Modal/components/Header/Header.js";
6
6
  import N, { createContext as Rr, forwardRef as Re, useState as Z, useRef as ee, useCallback as R, useEffect as Wr, useMemo as Br, Fragment as Ur, PureComponent as Gr, Children as q, isValidElement as $ } from "react";
7
7
  import { P as We, p as l } from "./index-D68N8v8R.js";
8
8
  import { c as se, a as Hr, u as jr, R as Vr } from "./Combination-Cmu9JRkv.js";
9
- import { R as qr } from "./index-ffjBR8Av.js";
9
+ import { R as qr } from "./index-BtibbG81.js";
10
10
  import "./contexts/theme.context.js";
11
11
  import { useTheme as $r } from "./contexts/theme.hook.js";
12
12
  import "./js.cookie-OLEfuq_g.js";
@@ -1,5 +1,5 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { R as h, A as f, P as x, O as g, C as u, T as C, D as b, a as y, b as O } from "../../AlertDialogTrigger-lenvKoGF.js";
2
+ import { R as h, A as f, P as x, O as g, C as u, T as C, D as b, a as y, b as O } from "../../AlertDialogTrigger-D4Tm_9M0.js";
3
3
  import "../../contexts/theme.context.js";
4
4
  import { useTheme as A } from "../../contexts/theme.hook.js";
5
5
  import "react";
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { A as a } from "../../../AlertDialogTrigger-lenvKoGF.js";
2
+ import { A as a } from "../../../AlertDialogTrigger-D4Tm_9M0.js";
3
3
  import "../../../contexts/theme.context.js";
4
4
  import "../../../contexts/theme.hook.js";
5
5
  import "react";
@@ -1,4 +1,4 @@
1
- import { A as g } from "../../../AlertDialogTrigger-lenvKoGF.js";
1
+ import { A as g } from "../../../AlertDialogTrigger-D4Tm_9M0.js";
2
2
  export {
3
3
  g as AlertDialogTrigger
4
4
  };
@@ -1,14 +1,14 @@
1
1
  import { jsxs as C, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as R, useRef as i, useId as A, useImperativeHandle as T } from "react";
2
+ import { forwardRef as R, useRef as p, useId as A, useImperativeHandle as O } from "react";
3
3
  import "../../contexts/theme.context.js";
4
- import { useTheme as V } from "../../contexts/theme.hook.js";
4
+ import { useTheme as T } from "../../contexts/theme.hook.js";
5
5
  import "../../js.cookie-OLEfuq_g.js";
6
- import { useAutocomplete as g } from "./hooks/useAutocomplete.js";
7
- import { List as j } from "./components/List.js";
8
- import { labelVariants as y, autocompleteVariants as I } from "./Autocomplete.variants.js";
9
- const O = R(
6
+ import { useAutocomplete as V } from "./hooks/useAutocomplete.js";
7
+ import { List as g } from "./components/List.js";
8
+ import { labelVariants as j, autocompleteVariants as y } from "./Autocomplete.variants.js";
9
+ const I = R(
10
10
  ({
11
- autoComplete: p = "off",
11
+ autoComplete: c = "off",
12
12
  className: a,
13
13
  label: n,
14
14
  labelClassName: u,
@@ -17,24 +17,24 @@ const O = R(
17
17
  placeHolderEmptyValues: h = "No values...",
18
18
  placeHolderEmptyValuesClassName: f,
19
19
  placeholder: x,
20
- theme: N,
20
+ theme: w,
21
21
  variant: r,
22
- onChange: w
22
+ onChange: N
23
23
  }, b) => {
24
- const s = i(null), e = i(null), c = A(), { theme: v } = V(), m = N ?? v;
25
- T(b, () => e.current, [e]);
26
- const o = g({
24
+ const s = p(null), o = p(null), i = A(), { theme: v } = T(), m = w ?? v;
25
+ O(b, () => o.current, [o]);
26
+ const e = V({
27
27
  options: d,
28
- inputRef: e,
28
+ inputRef: o,
29
29
  wrapperRef: s,
30
- onChange: w
30
+ onChange: N
31
31
  });
32
32
  return /* @__PURE__ */ C("div", { ref: s, className: "relative flex flex-col", children: [
33
33
  n ? /* @__PURE__ */ t(
34
34
  "label",
35
35
  {
36
- htmlFor: l ?? c,
37
- className: y({
36
+ htmlFor: l ?? i,
37
+ className: j({
38
38
  theme: m,
39
39
  variant: r,
40
40
  className: u
@@ -45,40 +45,41 @@ const O = R(
45
45
  /* @__PURE__ */ t(
46
46
  "input",
47
47
  {
48
- ref: e,
49
- id: l ?? c,
48
+ ref: o,
49
+ id: l ?? i,
50
50
  type: "text",
51
51
  name: l,
52
52
  role: "combobox",
53
- autoComplete: p,
54
- className: I({
53
+ autoComplete: c,
54
+ className: y({
55
55
  theme: m,
56
56
  variant: r,
57
57
  className: a
58
58
  }),
59
- onChange: o.handleChange,
60
- value: o.value,
61
- placeholder: x
59
+ onChange: e.handleChange,
60
+ value: e.value,
61
+ placeholder: x,
62
+ "aria-expanded": e.showOptions ? "true" : "false"
62
63
  }
63
64
  ),
64
- o.showOptions && /* @__PURE__ */ t("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm", children: /* @__PURE__ */ t(
65
- j,
65
+ e.showOptions && /* @__PURE__ */ t("div", { className: "absolute z-10 top-full w-full rounded-md mt-1 border shadow-sm", children: /* @__PURE__ */ t(
66
+ g,
66
67
  {
67
68
  className: a,
68
- inputRef: e,
69
+ inputRef: o,
69
70
  wrapperRef: s,
70
- options: o.newOptions,
71
+ options: e.newOptions,
71
72
  placeholder: h,
72
73
  placeholderClassName: f,
73
74
  variant: r,
74
75
  theme: m,
75
- onClick: o.handleSelectValue
76
+ onClick: e.handleSelectValue
76
77
  }
77
78
  ) })
78
79
  ] });
79
80
  }
80
81
  );
81
- O.displayName = "Autocomplete";
82
+ I.displayName = "Autocomplete";
82
83
  export {
83
- O as Autocomplete
84
+ I as Autocomplete
84
85
  };
@@ -4,7 +4,7 @@ import "../../contexts/theme.context.js";
4
4
  import { useTheme as O } from "../../contexts/theme.hook.js";
5
5
  import "../../js.cookie-OLEfuq_g.js";
6
6
  import { breadcrumbVariants as j, breadcrumbItemVariants as w, chevronVariants as x } from "./Breadcrumb.variants.js";
7
- import { u as P, L as k } from "../../useBreadcrumb-tyxjV-a1.js";
7
+ import { u as P, L as k } from "../../useBreadcrumb-DxYsZvj_.js";
8
8
  import { P as m } from "../../index-D68N8v8R.js";
9
9
  function h() {
10
10
  return h = Object.assign || function(e) {
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { u as o } from "../../../useBreadcrumb-tyxjV-a1.js";
2
+ import { u as o } from "../../../useBreadcrumb-DxYsZvj_.js";
3
3
  export {
4
4
  o as useBreadcrumb
5
5
  };
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { CardProps } from './Card.types';
3
+ declare const Card: FC<CardProps>;
4
+ export { Card };
@@ -0,0 +1,38 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as d } from "react";
3
+ import "../../contexts/theme.context.js";
4
+ import { useTheme as p } from "../../contexts/theme.hook.js";
5
+ import "../../js.cookie-OLEfuq_g.js";
6
+ import { cardBaseVariants as c, cardVariants as f } from "./Card.variants.js";
7
+ const n = d(
8
+ ({ className: o, theme: r, isActive: m, canHover: e, ...s }, i) => {
9
+ const { theme: a } = p();
10
+ return /* @__PURE__ */ t(
11
+ "div",
12
+ {
13
+ className: c({
14
+ theme: r ?? a,
15
+ isActive: m,
16
+ canHover: e
17
+ }),
18
+ children: /* @__PURE__ */ t(
19
+ "div",
20
+ {
21
+ ref: i,
22
+ className: f({
23
+ className: o,
24
+ theme: r ?? a,
25
+ isActive: m,
26
+ canHover: e
27
+ }),
28
+ ...s
29
+ }
30
+ )
31
+ }
32
+ );
33
+ }
34
+ );
35
+ n.displayName = "Card";
36
+ export {
37
+ n as Card
38
+ };
@@ -0,0 +1,7 @@
1
+ import { HTMLAttributes, PropsWithChildren } from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { cardVariants } from './Card.variants';
4
+ export interface CardProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants>, PropsWithChildren {
5
+ isActive?: boolean;
6
+ canHover?: boolean;
7
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,10 @@
1
+ export declare const cardBaseVariants: (props?: ({
2
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
3
+ isActive?: boolean | null | undefined;
4
+ canHover?: boolean | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export declare const cardVariants: (props?: ({
7
+ theme?: "kubefirst" | "colony" | "civo" | null | undefined;
8
+ isActive?: boolean | null | undefined;
9
+ canHover?: boolean | null | undefined;
10
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -0,0 +1,87 @@
1
+ import { c as r } from "../../index-BNmRGtA6.js";
2
+ const o = r(
3
+ ["border", "border-slate-200", "rounded-xl"],
4
+ {
5
+ variants: {
6
+ theme: {
7
+ colony: "",
8
+ kubefirst: "",
9
+ civo: ""
10
+ },
11
+ isActive: {
12
+ true: "border-transparent",
13
+ false: ""
14
+ },
15
+ canHover: {
16
+ true: ["group", "hover:border-transparent"],
17
+ false: ""
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ theme: "kubefirst"
22
+ }
23
+ }
24
+ ), t = r(
25
+ ["border", "border-4", "p-3", "text-card-foreground", "rounded-xl"],
26
+ {
27
+ variants: {
28
+ theme: {
29
+ colony: "",
30
+ kubefirst: "",
31
+ civo: ""
32
+ },
33
+ isActive: {
34
+ true: "",
35
+ false: "border-transparent"
36
+ },
37
+ canHover: {
38
+ true: "cursor-pointer border-transparent",
39
+ false: ""
40
+ }
41
+ },
42
+ compoundVariants: [
43
+ {
44
+ theme: "colony",
45
+ isActive: !0,
46
+ class: ["border-colony-primary", "shadow"]
47
+ },
48
+ {
49
+ theme: "kubefirst",
50
+ isActive: !0,
51
+ class: ["border-kubefirst-primary", "shadow"]
52
+ },
53
+ {
54
+ theme: "civo",
55
+ isActive: !0,
56
+ class: ["border-civo-primary", "shadow"]
57
+ },
58
+ {
59
+ theme: "colony",
60
+ canHover: !0,
61
+ class: "group-hover:border-colony-primary"
62
+ },
63
+ {
64
+ theme: "kubefirst",
65
+ canHover: !0,
66
+ class: "group-hover:border-kubefirst-primary"
67
+ },
68
+ {
69
+ theme: "civo",
70
+ canHover: !0,
71
+ class: "group-hover:border-civo-primary"
72
+ },
73
+ {
74
+ canHover: void 0,
75
+ isActive: void 0,
76
+ class: "border-transparent"
77
+ }
78
+ ],
79
+ defaultVariants: {
80
+ theme: "kubefirst"
81
+ }
82
+ }
83
+ );
84
+ export {
85
+ o as cardBaseVariants,
86
+ t as cardVariants
87
+ };
@@ -1,26 +1,26 @@
1
- import { jsxs as N, jsx as p } from "react/jsx-runtime";
2
- import * as f from "react";
1
+ import { jsxs as N, jsx as f } from "react/jsx-runtime";
2
+ import * as u from "react";
3
3
  import j, { forwardRef as S, useId as M, useCallback as A } from "react";
4
4
  import { u as H } from "../../index-DoOsnuB6.js";
5
5
  import { c as K, a as W, d as I } from "../../index-8vgf-x5i.js";
6
6
  import { u as $, a as q } from "../../index-BxeV34ij.js";
7
7
  import { P as F } from "../../index-D4Q2rMby.js";
8
- import { P as _ } from "../../index-OOfdXoxx.js";
8
+ import { P as _ } from "../../index-BaNV0qac.js";
9
9
  import { useToggle as V } from "../../hooks/useToggle.js";
10
10
  import { checkboxVariants as X, labelVariants as G } from "./Checkbox.variants.js";
11
11
  import "../../contexts/theme.context.js";
12
12
  import { useTheme as J } from "../../contexts/theme.hook.js";
13
13
  import "../../js.cookie-OLEfuq_g.js";
14
- import { P as y } from "../../index-D68N8v8R.js";
15
- function w() {
16
- return w = Object.assign || function(e) {
14
+ import { P } from "../../index-D68N8v8R.js";
15
+ function E() {
16
+ return E = Object.assign || function(e) {
17
17
  for (var s = 1; s < arguments.length; s++) {
18
18
  var t = arguments[s];
19
19
  for (var o in t)
20
20
  Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
21
21
  }
22
22
  return e;
23
- }, w.apply(this, arguments);
23
+ }, E.apply(this, arguments);
24
24
  }
25
25
  function Q(e, s) {
26
26
  if (e == null) return {};
@@ -39,9 +39,9 @@ function U(e, s) {
39
39
  n = o[r], !(s.indexOf(n) >= 0) && (t[n] = e[n]);
40
40
  return t;
41
41
  }
42
- var E = S(function(e, s) {
43
- var t = e.color, o = t === void 0 ? "currentColor" : t, n = e.size, r = n === void 0 ? 24 : n, i = Q(e, ["color", "size"]);
44
- return /* @__PURE__ */ j.createElement("svg", w({
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"]);
44
+ return /* @__PURE__ */ j.createElement("svg", E({
45
45
  ref: s,
46
46
  xmlns: "http://www.w3.org/2000/svg",
47
47
  width: r,
@@ -52,84 +52,84 @@ var E = S(function(e, s) {
52
52
  strokeWidth: "2",
53
53
  strokeLinecap: "round",
54
54
  strokeLinejoin: "round"
55
- }, i), /* @__PURE__ */ j.createElement("polyline", {
55
+ }, l), /* @__PURE__ */ j.createElement("polyline", {
56
56
  points: "20 6 9 17 4 12"
57
57
  }));
58
58
  });
59
- E.propTypes = {
60
- color: y.string,
61
- size: y.oneOfType([y.string, y.number])
59
+ O.propTypes = {
60
+ color: P.string,
61
+ size: P.oneOfType([P.string, P.number])
62
62
  };
63
- E.displayName = "Check";
64
- var O = "Checkbox", [Y, be] = K(O), [Z, ee] = Y(O), T = f.forwardRef(
63
+ O.displayName = "Check";
64
+ var R = "Checkbox", [Y, ke] = K(R), [Z, ee] = Y(R), T = u.forwardRef(
65
65
  (e, s) => {
66
66
  const {
67
67
  __scopeCheckbox: t,
68
68
  name: o,
69
69
  checked: n,
70
70
  defaultChecked: r,
71
- required: i,
72
- disabled: l,
73
- value: d = "on",
74
- onCheckedChange: v,
75
- form: u,
76
- ...h
77
- } = e, [c, k] = f.useState(null), C = H(s, (a) => k(a)), g = f.useRef(!1), R = c ? u || !!c.closest("form") : !0, [b = !1, P] = W({
71
+ required: l,
72
+ disabled: a,
73
+ value: b = "on",
74
+ onCheckedChange: C,
75
+ form: d,
76
+ ...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
78
  prop: n,
79
79
  defaultProp: r,
80
- onChange: v
81
- }), B = f.useRef(b);
82
- return f.useEffect(() => {
83
- const a = c == null ? void 0 : c.form;
84
- if (a) {
85
- const x = () => P(B.current);
86
- return a.addEventListener("reset", x), () => a.removeEventListener("reset", x);
80
+ onChange: C
81
+ }), B = u.useRef(m);
82
+ return u.useEffect(() => {
83
+ const c = i == null ? void 0 : i.form;
84
+ if (c) {
85
+ const y = () => w(B.current);
86
+ return c.addEventListener("reset", y), () => c.removeEventListener("reset", y);
87
87
  }
88
- }, [c, P]), /* @__PURE__ */ N(Z, { scope: t, state: b, disabled: l, children: [
89
- /* @__PURE__ */ p(
88
+ }, [i, w]), /* @__PURE__ */ N(Z, { scope: t, state: m, disabled: a, children: [
89
+ /* @__PURE__ */ f(
90
90
  _.button,
91
91
  {
92
92
  type: "button",
93
93
  role: "checkbox",
94
- "aria-checked": m(b) ? "mixed" : b,
95
- "aria-required": i,
96
- "data-state": D(b),
97
- "data-disabled": l ? "" : void 0,
98
- disabled: l,
99
- value: d,
100
- ...h,
101
- ref: C,
102
- onKeyDown: I(e.onKeyDown, (a) => {
103
- a.key === "Enter" && a.preventDefault();
94
+ "aria-checked": h(m) ? "mixed" : m,
95
+ "aria-required": l,
96
+ "data-state": D(m),
97
+ "data-disabled": a ? "" : void 0,
98
+ disabled: a,
99
+ value: b,
100
+ ...p,
101
+ ref: v,
102
+ onKeyDown: I(e.onKeyDown, (c) => {
103
+ c.key === "Enter" && c.preventDefault();
104
104
  }),
105
- onClick: I(e.onClick, (a) => {
106
- P((x) => m(x) ? !0 : !x), R && (g.current = a.isPropagationStopped(), g.current || a.stopPropagation());
105
+ onClick: I(e.onClick, (c) => {
106
+ w((y) => h(y) ? !0 : !y), g && (x.current = c.isPropagationStopped(), x.current || c.stopPropagation());
107
107
  })
108
108
  }
109
109
  ),
110
- R && /* @__PURE__ */ p(
110
+ g && /* @__PURE__ */ f(
111
111
  te,
112
112
  {
113
- control: c,
114
- bubbles: !g.current,
113
+ control: i,
114
+ bubbles: !x.current,
115
115
  name: o,
116
- value: d,
117
- checked: b,
118
- required: i,
119
- disabled: l,
120
- form: u,
116
+ value: b,
117
+ checked: m,
118
+ required: l,
119
+ disabled: a,
120
+ form: d,
121
121
  style: { transform: "translateX(-100%)" },
122
- defaultChecked: m(r) ? !1 : r
122
+ defaultChecked: h(r) ? !1 : r
123
123
  }
124
124
  )
125
125
  ] });
126
126
  }
127
127
  );
128
- T.displayName = O;
129
- var z = "CheckboxIndicator", L = f.forwardRef(
128
+ T.displayName = R;
129
+ var z = "CheckboxIndicator", L = u.forwardRef(
130
130
  (e, s) => {
131
131
  const { __scopeCheckbox: t, forceMount: o, ...n } = e, r = ee(z, t);
132
- return /* @__PURE__ */ p(F, { present: o || m(r.state) || r.state === !0, children: /* @__PURE__ */ p(
132
+ return /* @__PURE__ */ f(F, { present: o || h(r.state) || r.state === !0, children: /* @__PURE__ */ f(
133
133
  _.span,
134
134
  {
135
135
  "data-state": D(r.state),
@@ -143,27 +143,27 @@ var z = "CheckboxIndicator", L = f.forwardRef(
143
143
  );
144
144
  L.displayName = z;
145
145
  var te = (e) => {
146
- const { control: s, checked: t, bubbles: o = !0, defaultChecked: n, ...r } = e, i = f.useRef(null), l = $(t), d = q(s);
147
- f.useEffect(() => {
148
- const u = i.current, h = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(h, "checked").set;
149
- if (l !== t && k) {
150
- const C = new Event("click", { bubbles: o });
151
- u.indeterminate = m(t), k.call(u, m(t) ? !1 : t), u.dispatchEvent(C);
146
+ const { control: s, checked: t, bubbles: o = !0, defaultChecked: n, ...r } = e, l = u.useRef(null), a = $(t), b = q(s);
147
+ u.useEffect(() => {
148
+ const d = l.current, p = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(p, "checked").set;
149
+ if (a !== t && k) {
150
+ const v = new Event("click", { bubbles: o });
151
+ d.indeterminate = h(t), k.call(d, h(t) ? !1 : t), d.dispatchEvent(v);
152
152
  }
153
- }, [l, t, o]);
154
- const v = f.useRef(m(t) ? !1 : t);
155
- return /* @__PURE__ */ p(
153
+ }, [a, t, o]);
154
+ const C = u.useRef(h(t) ? !1 : t);
155
+ return /* @__PURE__ */ f(
156
156
  "input",
157
157
  {
158
158
  type: "checkbox",
159
159
  "aria-hidden": !0,
160
- defaultChecked: n ?? v.current,
160
+ defaultChecked: n ?? C.current,
161
161
  ...r,
162
162
  tabIndex: -1,
163
- ref: i,
163
+ ref: l,
164
164
  style: {
165
165
  ...e.style,
166
- ...d,
166
+ ...b,
167
167
  position: "absolute",
168
168
  pointerEvents: "none",
169
169
  opacity: 0,
@@ -172,57 +172,62 @@ var te = (e) => {
172
172
  }
173
173
  );
174
174
  };
175
- function m(e) {
175
+ function h(e) {
176
176
  return e === "indeterminate";
177
177
  }
178
178
  function D(e) {
179
- return m(e) ? "indeterminate" : e ? "checked" : "unchecked";
179
+ return h(e) ? "indeterminate" : e ? "checked" : "unchecked";
180
180
  }
181
181
  var re = T, oe = L;
182
182
  const ve = S(
183
183
  ({
184
- className: e,
185
- defaultChecked: s,
186
- disabled: t,
187
- label: o,
188
- labelClassName: n,
189
- name: r,
190
- theme: i,
191
- variant: l,
192
- onChange: d
193
- }, v) => {
194
- const [u, h] = V(s), c = M(), { theme: k } = J(), C = A(() => {
195
- h(), d == null || d();
196
- }, [d, h]);
184
+ ariaLabelledBy: e,
185
+ className: s,
186
+ defaultChecked: t,
187
+ disabled: o,
188
+ id: n,
189
+ label: r,
190
+ labelClassName: l,
191
+ name: a,
192
+ theme: b,
193
+ title: C,
194
+ variant: d,
195
+ onChange: p
196
+ }, i) => {
197
+ const [k, v] = V(t), x = M(), { theme: g } = J(), m = A(() => {
198
+ v(), p == null || p();
199
+ }, [p, v]);
197
200
  return /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
198
- /* @__PURE__ */ p(
201
+ /* @__PURE__ */ f(
199
202
  re,
200
203
  {
201
- id: r ?? c,
202
- checked: u,
203
- ref: v,
204
- name: r,
205
- disabled: t,
204
+ id: n ?? x,
205
+ checked: k,
206
+ ref: i,
207
+ name: a,
208
+ disabled: o,
209
+ "aria-labelledby": e,
210
+ title: C,
206
211
  className: X({
207
- className: e,
208
- theme: i ?? k,
209
- variant: l,
210
- checked: u
212
+ className: s,
213
+ theme: b ?? g,
214
+ variant: d,
215
+ checked: k
211
216
  }),
212
- onCheckedChange: C,
213
- children: /* @__PURE__ */ p(oe, { children: /* @__PURE__ */ p(E, { className: "w-4 h-4 stroke-2" }) })
217
+ onCheckedChange: m,
218
+ children: /* @__PURE__ */ f(oe, { children: /* @__PURE__ */ f(O, { className: "w-4 h-4 stroke-2" }) })
214
219
  }
215
220
  ),
216
- o ? /* @__PURE__ */ p(
221
+ r ? /* @__PURE__ */ f(
217
222
  "label",
218
223
  {
219
- htmlFor: r ?? c,
224
+ htmlFor: a ?? n,
220
225
  className: G({
221
- variant: l,
222
- theme: i,
223
- className: n
226
+ variant: d,
227
+ theme: b,
228
+ className: l
224
229
  }),
225
- children: o
230
+ children: r
226
231
  }
227
232
  ) : null
228
233
  ] });