@purpurds/checkbox 8.11.0 → 8.12.0

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.
@@ -1,13 +1,13 @@
1
1
  import { jsxs as S, jsx as p } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { forwardRef as _e } from "react";
3
+ import { forwardRef as ve } from "react";
4
4
  import "react-dom";
5
- function ge(e) {
5
+ function _e(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
- var q = { exports: {} }, z;
9
- function ve() {
10
- return z || (z = 1, (function(e) {
8
+ var I = { exports: {} }, q;
9
+ function ge() {
10
+ return q || (q = 1, (function(e) {
11
11
  (function() {
12
12
  var t = {}.hasOwnProperty;
13
13
  function n() {
@@ -36,10 +36,10 @@ function ve() {
36
36
  }
37
37
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
38
38
  })();
39
- })(q)), q.exports;
39
+ })(I)), I.exports;
40
40
  }
41
- var ye = ve();
42
- const be = /* @__PURE__ */ ge(ye), xe = {
41
+ var ye = ge();
42
+ const be = /* @__PURE__ */ _e(ye), xe = {
43
43
  "purpur-icon": "_purpur-icon_8u1lq_1",
44
44
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
45
45
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -135,7 +135,7 @@ function je(e) {
135
135
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
136
136
  }
137
137
  var T = { exports: {} }, U;
138
- function De() {
138
+ function ze() {
139
139
  return U || (U = 1, (function(e) {
140
140
  (function() {
141
141
  var t = {}.hasOwnProperty;
@@ -167,12 +167,12 @@ function De() {
167
167
  })();
168
168
  })(T)), T.exports;
169
169
  }
170
- var Ie = De();
171
- const qe = /* @__PURE__ */ je(Ie), ze = {
170
+ var De = ze();
171
+ const Ie = /* @__PURE__ */ je(De), qe = {
172
172
  "purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
173
173
  "purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
174
174
  "purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
175
- }, Be = qe.bind(ze), R = "purpur-field-helper-text", We = ({
175
+ }, Be = Ie.bind(qe), R = "purpur-field-helper-text", We = ({
176
176
  children: e,
177
177
  className: t,
178
178
  disabled: n,
@@ -293,8 +293,8 @@ function tr(e) {
293
293
  ne(r) && typeof O == "function" && (r = O(r._payload));
294
294
  const u = s.Children.toArray(r), c = u.find(ir);
295
295
  if (c) {
296
- const l = c.props.children, d = u.map((f) => f === c ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : f);
297
- return /* @__PURE__ */ p(t, { ...o, ref: i, children: s.isValidElement(l) ? s.cloneElement(l, void 0, d) : null });
296
+ const l = c.props.children, f = u.map((d) => d === c ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : d);
297
+ return /* @__PURE__ */ p(t, { ...o, ref: i, children: s.isValidElement(l) ? s.cloneElement(l, void 0, f) : null });
298
298
  }
299
299
  return /* @__PURE__ */ p(t, { ...o, ref: i, children: r });
300
300
  });
@@ -367,11 +367,11 @@ var sr = [
367
367
  ));
368
368
  oe.displayName = lr;
369
369
  var pr = oe;
370
- function fr(e) {
370
+ function dr(e) {
371
371
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
372
372
  }
373
373
  var G = { exports: {} }, X;
374
- function dr() {
374
+ function fr() {
375
375
  return X || (X = 1, (function(e) {
376
376
  (function() {
377
377
  var t = {}.hasOwnProperty;
@@ -403,19 +403,19 @@ function dr() {
403
403
  })();
404
404
  })(G)), G.exports;
405
405
  }
406
- var hr = dr();
407
- const mr = /* @__PURE__ */ fr(hr), _r = {
406
+ var hr = fr();
407
+ const mr = /* @__PURE__ */ dr(hr), vr = {
408
408
  "purpur-label": "_purpur-label_1x80u_1",
409
409
  "purpur-label--negative": "_purpur-label--negative_1x80u_8",
410
410
  "purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
411
- }, gr = mr.bind(_r), E = "purpur-label", vr = ({
411
+ }, _r = mr.bind(vr), E = "purpur-label", gr = ({
412
412
  children: e,
413
413
  className: t,
414
414
  disabled: n,
415
415
  negative: a = !1,
416
416
  ...i
417
417
  }) => {
418
- const r = gr(t, E, {
418
+ const r = _r(t, E, {
419
419
  [`${E}--disabled`]: n,
420
420
  [`${E}--negative`]: a
421
421
  });
@@ -459,20 +459,21 @@ function br() {
459
459
  }
460
460
  var xr = br();
461
461
  const $r = /* @__PURE__ */ yr(xr), wr = {
462
- "purpur-paragraph": "_purpur-paragraph_1rh57_1",
463
- "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
464
- "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
465
- "purpur-paragraph--negative": "_purpur-paragraph--negative_1rh57_13",
466
- "purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1rh57_16",
467
- "purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1rh57_22",
468
- "purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1rh57_29",
469
- "purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1rh57_36",
470
- "purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1rh57_42",
471
- "purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1rh57_48",
472
- "purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1rh57_54",
473
- "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
474
- "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
475
- "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
462
+ "purpur-paragraph": "_purpur-paragraph_1vz75_1",
463
+ "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1vz75_7",
464
+ "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1vz75_10",
465
+ "purpur-paragraph--negative": "_purpur-paragraph--negative_1vz75_13",
466
+ "purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1vz75_16",
467
+ "purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1vz75_22",
468
+ "purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1vz75_29",
469
+ "purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1vz75_36",
470
+ "purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1vz75_42",
471
+ "purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1vz75_48",
472
+ "purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1vz75_54",
473
+ "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1vz75_60",
474
+ "purpur-paragraph--additional-100-bold": "_purpur-paragraph--additional-100-bold_1vz75_67",
475
+ "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1vz75_74",
476
+ "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1vz75_82"
476
477
  }, Sr = $r.bind(wr), Cr = {
477
478
  PARAGRAPH100: "paragraph-100"
478
479
  }, N = "purpur-paragraph", ie = ({
@@ -521,18 +522,18 @@ function Nr(e, t = []) {
521
522
  function a(r, o) {
522
523
  const u = s.createContext(o), c = n.length;
523
524
  n = [...n, o];
524
- const l = (f) => {
525
- const { scope: m, children: h, ..._ } = f, b = m?.[e]?.[c] || u, $ = s.useMemo(() => _, Object.values(_));
525
+ const l = (d) => {
526
+ const { scope: m, children: h, ...v } = d, b = m?.[e]?.[c] || u, $ = s.useMemo(() => v, Object.values(v));
526
527
  return /* @__PURE__ */ p(b.Provider, { value: $, children: h });
527
528
  };
528
529
  l.displayName = r + "Provider";
529
- function d(f, m) {
530
- const h = m?.[e]?.[c] || u, _ = s.useContext(h);
531
- if (_) return _;
530
+ function f(d, m) {
531
+ const h = m?.[e]?.[c] || u, v = s.useContext(h);
532
+ if (v) return v;
532
533
  if (o !== void 0) return o;
533
- throw new Error(`\`${f}\` must be used within \`${r}\``);
534
+ throw new Error(`\`${d}\` must be used within \`${r}\``);
534
535
  }
535
- return [l, d];
536
+ return [l, f];
536
537
  }
537
538
  const i = () => {
538
539
  const r = n.map((o) => s.createContext(o));
@@ -556,8 +557,8 @@ function kr(...e) {
556
557
  }));
557
558
  return function(r) {
558
559
  const o = a.reduce((u, { useScope: c, scopeName: l }) => {
559
- const f = c(r)[`__scope${l}`];
560
- return { ...u, ...f };
560
+ const d = c(r)[`__scope${l}`];
561
+ return { ...u, ...d };
561
562
  }, {});
562
563
  return s.useMemo(() => ({ [`__scope${t.scopeName}`]: o }), [o]);
563
564
  };
@@ -585,8 +586,8 @@ function Or({
585
586
  const [a, i] = Pr({ defaultProp: t, onChange: n }), r = e !== void 0, o = r ? e : a, u = se(n), c = s.useCallback(
586
587
  (l) => {
587
588
  if (r) {
588
- const f = typeof l == "function" ? l(e) : l;
589
- f !== e && u(f);
589
+ const d = typeof l == "function" ? l(e) : l;
590
+ d !== e && u(d);
590
591
  } else
591
592
  i(l);
592
593
  },
@@ -607,11 +608,11 @@ function Ar(e) {
607
608
  const t = s.useRef({ value: e, previous: e });
608
609
  return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
609
610
  }
610
- var D = globalThis?.document ? s.useLayoutEffect : () => {
611
+ var z = globalThis?.document ? s.useLayoutEffect : () => {
611
612
  };
612
613
  function Rr(e) {
613
614
  const [t, n] = s.useState(void 0);
614
- return D(() => {
615
+ return z(() => {
615
616
  if (e) {
616
617
  n({ width: e.offsetWidth, height: e.offsetHeight });
617
618
  const a = new ResizeObserver((i) => {
@@ -656,28 +657,28 @@ function Mr(e) {
656
657
  return s.useEffect(() => {
657
658
  const l = k(a.current);
658
659
  r.current = u === "mounted" ? l : "none";
659
- }, [u]), D(() => {
660
- const l = a.current, d = i.current;
661
- if (d !== e) {
660
+ }, [u]), z(() => {
661
+ const l = a.current, f = i.current;
662
+ if (f !== e) {
662
663
  const m = r.current, h = k(l);
663
- e ? c("MOUNT") : h === "none" || l?.display === "none" ? c("UNMOUNT") : c(d && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
664
+ e ? c("MOUNT") : h === "none" || l?.display === "none" ? c("UNMOUNT") : c(f && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
664
665
  }
665
- }, [e, c]), D(() => {
666
+ }, [e, c]), z(() => {
666
667
  if (t) {
667
668
  let l;
668
- const d = t.ownerDocument.defaultView ?? window, f = (h) => {
669
+ const f = t.ownerDocument.defaultView ?? window, d = (h) => {
669
670
  const b = k(a.current).includes(h.animationName);
670
671
  if (h.target === t && b && (c("ANIMATION_END"), !i.current)) {
671
672
  const $ = t.style.animationFillMode;
672
- t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
673
+ t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
673
674
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = $);
674
675
  });
675
676
  }
676
677
  }, m = (h) => {
677
678
  h.target === t && (r.current = k(a.current));
678
679
  };
679
- return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
680
- d.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
680
+ return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
681
+ f.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
681
682
  };
682
683
  } else
683
684
  c("ANIMATION_END");
@@ -696,19 +697,19 @@ function jr(e) {
696
697
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
697
698
  }
698
699
  // @__NO_SIDE_EFFECTS__
699
- function Dr(e) {
700
- const t = /* @__PURE__ */ Ir(e), n = s.forwardRef((a, i) => {
701
- const { children: r, ...o } = a, u = s.Children.toArray(r), c = u.find(zr);
700
+ function zr(e) {
701
+ const t = /* @__PURE__ */ Dr(e), n = s.forwardRef((a, i) => {
702
+ const { children: r, ...o } = a, u = s.Children.toArray(r), c = u.find(qr);
702
703
  if (c) {
703
- const l = c.props.children, d = u.map((f) => f === c ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : f);
704
- return /* @__PURE__ */ p(t, { ...o, ref: i, children: s.isValidElement(l) ? s.cloneElement(l, void 0, d) : null });
704
+ const l = c.props.children, f = u.map((d) => d === c ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : d);
705
+ return /* @__PURE__ */ p(t, { ...o, ref: i, children: s.isValidElement(l) ? s.cloneElement(l, void 0, f) : null });
705
706
  }
706
707
  return /* @__PURE__ */ p(t, { ...o, ref: i, children: r });
707
708
  });
708
709
  return n.displayName = `${e}.Slot`, n;
709
710
  }
710
711
  // @__NO_SIDE_EFFECTS__
711
- function Ir(e) {
712
+ function Dr(e) {
712
713
  const t = s.forwardRef((n, a) => {
713
714
  const { children: i, ...r } = n;
714
715
  if (s.isValidElement(i)) {
@@ -719,9 +720,9 @@ function Ir(e) {
719
720
  });
720
721
  return t.displayName = `${e}.SlotClone`, t;
721
722
  }
722
- var qr = Symbol("radix.slottable");
723
- function zr(e) {
724
- return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === qr;
723
+ var Ir = Symbol("radix.slottable");
724
+ function qr(e) {
725
+ return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ir;
725
726
  }
726
727
  function Br(e, t) {
727
728
  const n = { ...t };
@@ -755,12 +756,12 @@ var Lr = [
755
756
  "svg",
756
757
  "ul"
757
758
  ], le = Lr.reduce((e, t) => {
758
- const n = /* @__PURE__ */ Dr(`Primitive.${t}`), a = s.forwardRef((i, r) => {
759
+ const n = /* @__PURE__ */ zr(`Primitive.${t}`), a = s.forwardRef((i, r) => {
759
760
  const { asChild: o, ...u } = i, c = o ? n : t;
760
761
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(c, { ...u, ref: r });
761
762
  });
762
763
  return a.displayName = `Primitive.${t}`, { ...e, [t]: a };
763
- }, {}), I = "Checkbox", [Hr] = Nr(I), [Tr, Ur] = Hr(I), pe = s.forwardRef(
764
+ }, {}), D = "Checkbox", [Hr] = Nr(D), [Tr, Ur] = Hr(D), pe = s.forwardRef(
764
765
  (e, t) => {
765
766
  const {
766
767
  __scopeCheckbox: n,
@@ -771,18 +772,18 @@ var Lr = [
771
772
  disabled: u,
772
773
  value: c = "on",
773
774
  onCheckedChange: l,
774
- form: d,
775
- ...f
776
- } = e, [m, h] = s.useState(null), _ = ue(t, (g) => h(g)), b = s.useRef(!1), $ = m ? d || !!m.closest("form") : !0, [w = !1, P] = Or({
775
+ form: f,
776
+ ...d
777
+ } = e, [m, h] = s.useState(null), v = ue(t, (_) => h(_)), b = s.useRef(!1), $ = m ? f || !!m.closest("form") : !0, [w = !1, P] = Or({
777
778
  prop: i,
778
779
  defaultProp: r,
779
780
  onChange: l
780
781
  }), me = s.useRef(w);
781
782
  return s.useEffect(() => {
782
- const g = m?.form;
783
- if (g) {
783
+ const _ = m?.form;
784
+ if (_) {
784
785
  const C = () => P(me.current);
785
- return g.addEventListener("reset", C), () => g.removeEventListener("reset", C);
786
+ return _.addEventListener("reset", C), () => _.removeEventListener("reset", C);
786
787
  }
787
788
  }, [m, P]), /* @__PURE__ */ S(Tr, { scope: n, state: w, disabled: u, children: [
788
789
  /* @__PURE__ */ p(
@@ -796,13 +797,13 @@ var Lr = [
796
797
  "data-disabled": u ? "" : void 0,
797
798
  disabled: u,
798
799
  value: c,
799
- ...f,
800
- ref: _,
801
- onKeyDown: ee(e.onKeyDown, (g) => {
802
- g.key === "Enter" && g.preventDefault();
800
+ ...d,
801
+ ref: v,
802
+ onKeyDown: ee(e.onKeyDown, (_) => {
803
+ _.key === "Enter" && _.preventDefault();
803
804
  }),
804
- onClick: ee(e.onClick, (g) => {
805
- P((C) => y(C) ? !0 : !C), $ && (b.current = g.isPropagationStopped(), b.current || g.stopPropagation());
805
+ onClick: ee(e.onClick, (_) => {
806
+ P((C) => y(C) ? !0 : !C), $ && (b.current = _.isPropagationStopped(), b.current || _.stopPropagation());
806
807
  })
807
808
  }
808
809
  ),
@@ -816,7 +817,7 @@ var Lr = [
816
817
  checked: w,
817
818
  required: o,
818
819
  disabled: u,
819
- form: d,
820
+ form: f,
820
821
  style: { transform: "translateX(-100%)" },
821
822
  defaultChecked: y(r) ? !1 : r
822
823
  }
@@ -824,10 +825,10 @@ var Lr = [
824
825
  ] });
825
826
  }
826
827
  );
827
- pe.displayName = I;
828
- var fe = "CheckboxIndicator", de = s.forwardRef(
828
+ pe.displayName = D;
829
+ var de = "CheckboxIndicator", fe = s.forwardRef(
829
830
  (e, t) => {
830
- const { __scopeCheckbox: n, forceMount: a, ...i } = e, r = Ur(fe, n);
831
+ const { __scopeCheckbox: n, forceMount: a, ...i } = e, r = Ur(de, n);
831
832
  return /* @__PURE__ */ p(ce, { present: a || y(r.state) || r.state === !0, children: /* @__PURE__ */ p(
832
833
  le.span,
833
834
  {
@@ -840,14 +841,14 @@ var fe = "CheckboxIndicator", de = s.forwardRef(
840
841
  ) });
841
842
  }
842
843
  );
843
- de.displayName = fe;
844
+ fe.displayName = de;
844
845
  var Vr = (e) => {
845
846
  const { control: t, checked: n, bubbles: a = !0, defaultChecked: i, ...r } = e, o = s.useRef(null), u = Ar(n), c = Rr(t);
846
847
  s.useEffect(() => {
847
- const d = o.current, f = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(f, "checked").set;
848
+ const f = o.current, d = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(d, "checked").set;
848
849
  if (u !== n && h) {
849
- const _ = new Event("click", { bubbles: a });
850
- d.indeterminate = y(n), h.call(d, y(n) ? !1 : n), d.dispatchEvent(_);
850
+ const v = new Event("click", { bubbles: a });
851
+ f.indeterminate = y(n), h.call(f, y(n) ? !1 : n), f.dispatchEvent(v);
851
852
  }
852
853
  }, [u, n, a]);
853
854
  const l = s.useRef(y(n) ? !1 : n);
@@ -877,7 +878,7 @@ function y(e) {
877
878
  function he(e) {
878
879
  return y(e) ? "indeterminate" : e ? "checked" : "unchecked";
879
880
  }
880
- var Fr = pe, Zr = de;
881
+ var Fr = pe, Zr = fe;
881
882
  function Kr(e) {
882
883
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
883
884
  }
@@ -925,7 +926,7 @@ const Jr = /* @__PURE__ */ Kr(Xr), Qr = {
925
926
  "purpur-checkbox__label-container": "_purpur-checkbox__label-container_150ck_70",
926
927
  "purpur-checkbox__wrapper": "_purpur-checkbox__wrapper_150ck_76",
927
928
  "purpur-checkbox__container": "_purpur-checkbox__container_150ck_82"
928
- }, x = Jr.bind(Qr), nt = ["indeterminate", !0, !1], v = "purpur-checkbox", Yr = _e(
929
+ }, x = Jr.bind(Qr), nt = ["indeterminate", !0, !1], g = "purpur-checkbox", Yr = ve(
929
930
  ({
930
931
  ["data-testid"]: e,
931
932
  checked: t,
@@ -937,25 +938,25 @@ const Jr = /* @__PURE__ */ Kr(Xr), Qr = {
937
938
  onChange: u,
938
939
  ...c
939
940
  }, l) => {
940
- const d = i && !t, f = a && !t;
941
- return /* @__PURE__ */ S("div", { className: x([`${v}__wrapper`, n]), children: [
942
- /* @__PURE__ */ S("div", { className: x([`${v}__container`, n]), children: [
941
+ const f = i && !t, d = a && !t;
942
+ return /* @__PURE__ */ S("div", { className: x([`${g}__wrapper`, n]), children: [
943
+ /* @__PURE__ */ S("div", { className: x([`${g}__container`, n]), children: [
943
944
  /* @__PURE__ */ p(
944
945
  Fr,
945
946
  {
946
947
  ...c,
947
948
  checked: t,
948
949
  className: x([
949
- v,
950
+ g,
950
951
  {
951
- [`${v}--error`]: d,
952
- [`${v}--error-checkbox`]: f
952
+ [`${g}--error`]: f,
953
+ [`${g}--error-checkbox`]: d
953
954
  }
954
955
  ]),
955
956
  "data-testid": e,
956
957
  onCheckedChange: u,
957
958
  ref: l,
958
- children: /* @__PURE__ */ p("span", { className: x(`${v}__box`), children: /* @__PURE__ */ p(Zr, { className: x(`${v}__indicator`), children: t === "indeterminate" ? /* @__PURE__ */ p(
959
+ children: /* @__PURE__ */ p("span", { className: x(`${g}__box`), children: /* @__PURE__ */ p(Zr, { className: x(`${g}__indicator`), children: t === "indeterminate" ? /* @__PURE__ */ p(
959
960
  j,
960
961
  {
961
962
  "data-testid": e && `${e}-checked-icon`,
@@ -972,9 +973,9 @@ const Jr = /* @__PURE__ */ Kr(Xr), Qr = {
972
973
  ) }) })
973
974
  }
974
975
  ),
975
- /* @__PURE__ */ S("span", { className: x(`${v}__label-container`), children: [
976
+ /* @__PURE__ */ S("span", { className: x(`${g}__label-container`), children: [
976
977
  r && /* @__PURE__ */ p(
977
- vr,
978
+ gr,
978
979
  {
979
980
  htmlFor: c.id,
980
981
  "data-testid": e && `${e}-label`,
@@ -988,7 +989,7 @@ const Jr = /* @__PURE__ */ Kr(Xr), Qr = {
988
989
  o && /* @__PURE__ */ p(
989
990
  We,
990
991
  {
991
- className: x(`${v}__helper`),
992
+ className: x(`${g}__helper`),
992
993
  "data-testid": e && `${e}-helper-text`,
993
994
  disabled: c.disabled,
994
995
  id: `${c.id}-helper-text`,
@@ -997,7 +998,7 @@ const Jr = /* @__PURE__ */ Kr(Xr), Qr = {
997
998
  )
998
999
  ] })
999
1000
  ] }),
1000
- d && /* @__PURE__ */ p(Me, { "data-testid": e && `${e}-error-text`, children: i })
1001
+ f && /* @__PURE__ */ p(Me, { "data-testid": e && `${e}-error-text`, children: i })
1001
1002
  ] });
1002
1003
  }
1003
1004
  );