@purpurds/checkbox 4.4.0 → 4.5.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,5 +1,5 @@
1
- import { jsxs as B, jsx as f } from "react/jsx-runtime";
2
- import { forwardRef as _, Children as v, isValidElement as x, createElement as p, cloneElement as z, useEffect as A, Fragment as re, useCallback as Z, createContext as V, useMemo as k, useContext as ge, useRef as $, useState as q, useLayoutEffect as _e, useReducer as $e } from "react";
1
+ import { jsxs as z, jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as g, Children as v, isValidElement as x, createElement as p, cloneElement as R, useEffect as A, Fragment as re, useCallback as Z, createContext as V, useMemo as k, useContext as _e, useRef as $, useState as I, useLayoutEffect as ge, useReducer as $e } from "react";
3
3
  import { flushSync as ye } from "react-dom";
4
4
  function xe(e) {
5
5
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -62,7 +62,7 @@ const Ne = /* @__PURE__ */ xe(we), Se = {
62
62
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
63
63
  ], a = n ? `<title>${n}</title>` : "";
64
64
  return `<svg ${Pe(t)}>${a}${e}</svg>`;
65
- }, je = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ee = ({
65
+ }, Ee = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), je = ({
66
66
  ["data-testid"]: e,
67
67
  svg: n,
68
68
  allyTitle: t,
@@ -71,7 +71,7 @@ const Ne = /* @__PURE__ */ xe(we), Se = {
71
71
  ...r
72
72
  }) => {
73
73
  const o = ke({
74
- content: je(n.svg),
74
+ content: Ee(n.svg),
75
75
  title: t
76
76
  }), i = Oe(a, G, `${G}--${u}`);
77
77
  return /* @__PURE__ */ f(
@@ -124,31 +124,31 @@ var ne = { exports: {} };
124
124
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
125
125
  })();
126
126
  })(ne);
127
- var ze = ne.exports;
128
- const Re = /* @__PURE__ */ Me(ze), K = {
129
- "purpur-field-error-text": "_purpur-field-error-text_1h4gy_1",
130
- "purpur-field-error-text__icon": "_purpur-field-error-text__icon_1h4gy_12"
131
- }, W = "purpur-field-error-text", De = ({
127
+ var Re = ne.exports;
128
+ const De = /* @__PURE__ */ Me(Re), K = {
129
+ "purpur-field-error-text": "_purpur-field-error-text_1u768_1",
130
+ "purpur-field-error-text__icon": "_purpur-field-error-text__icon_1u768_12"
131
+ }, W = "purpur-field-error-text", qe = ({
132
132
  ["data-testid"]: e,
133
133
  children: n,
134
134
  className: t,
135
135
  relevant: a = "additions text",
136
136
  ...u
137
- }) => /* @__PURE__ */ B(
137
+ }) => /* @__PURE__ */ z(
138
138
  "div",
139
139
  {
140
- className: Re([t, K[W]]),
140
+ className: De([t, K[W]]),
141
141
  "data-testid": e,
142
142
  "aria-live": "assertive",
143
143
  "aria-relevant": a,
144
144
  ...u,
145
145
  children: [
146
- /* @__PURE__ */ f(Ee, { svg: Ae, size: "xs", className: K[`${W}__icon`] }),
146
+ /* @__PURE__ */ f(je, { svg: Ae, size: "xs", className: K[`${W}__icon`] }),
147
147
  n
148
148
  ]
149
149
  }
150
150
  );
151
- function qe(e) {
151
+ function Ie(e) {
152
152
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
153
153
  }
154
154
  var oe = { exports: {} };
@@ -187,8 +187,8 @@ var oe = { exports: {} };
187
187
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
188
188
  })();
189
189
  })(oe);
190
- var Ie = oe.exports;
191
- const Le = /* @__PURE__ */ qe(Ie), Be = {
190
+ var Le = oe.exports;
191
+ const Be = /* @__PURE__ */ Ie(Le), ze = {
192
192
  "purpur-icon": "_purpur-icon_8u1lq_1",
193
193
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
194
194
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -206,7 +206,7 @@ const Le = /* @__PURE__ */ qe(Ie), Be = {
206
206
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3 12c0-1.105.711-2 1.588-2h14.824c.877 0 1.588.895 1.588 2s-.711 2-1.588 2H4.588C3.711 14 3 13.105 3 12Z" clip-rule="evenodd"/></svg>',
207
207
  keywords: ["minus-bold"],
208
208
  category: "utility"
209
- }, He = Le.bind(Be), X = "purpur-icon", Fe = "md", Ze = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Ve = ({ content: e = "", title: n } = {}) => {
209
+ }, He = Be.bind(ze), X = "purpur-icon", Fe = "md", Ze = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Ve = ({ content: e = "", title: n } = {}) => {
210
210
  const t = [
211
211
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
212
212
  { name: "fill", value: "currentColor" },
@@ -247,15 +247,15 @@ function T() {
247
247
  return e;
248
248
  }, T.apply(this, arguments);
249
249
  }
250
- function j() {
251
- return j = Object.assign ? Object.assign.bind() : function(e) {
250
+ function E() {
251
+ return E = Object.assign ? Object.assign.bind() : function(e) {
252
252
  for (var n = 1; n < arguments.length; n++) {
253
253
  var t = arguments[n];
254
254
  for (var a in t)
255
255
  Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
256
256
  }
257
257
  return e;
258
- }, j.apply(this, arguments);
258
+ }, E.apply(this, arguments);
259
259
  }
260
260
  function Ke(e, n) {
261
261
  typeof e == "function" ? e(n) : e != null && (e.current = n);
@@ -265,22 +265,22 @@ function We(...e) {
265
265
  (t) => Ke(t, n)
266
266
  );
267
267
  }
268
- const ae = /* @__PURE__ */ _((e, n) => {
268
+ const ae = /* @__PURE__ */ g((e, n) => {
269
269
  const { children: t, ...a } = e, u = v.toArray(t), r = u.find(Je);
270
270
  if (r) {
271
271
  const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ x(o) ? o.props.children : null : c);
272
- return /* @__PURE__ */ p(U, j({}, a, {
272
+ return /* @__PURE__ */ p(U, E({}, a, {
273
273
  ref: n
274
- }), /* @__PURE__ */ x(o) ? /* @__PURE__ */ z(o, void 0, i) : null);
274
+ }), /* @__PURE__ */ x(o) ? /* @__PURE__ */ R(o, void 0, i) : null);
275
275
  }
276
- return /* @__PURE__ */ p(U, j({}, a, {
276
+ return /* @__PURE__ */ p(U, E({}, a, {
277
277
  ref: n
278
278
  }), t);
279
279
  });
280
280
  ae.displayName = "Slot";
281
- const U = /* @__PURE__ */ _((e, n) => {
281
+ const U = /* @__PURE__ */ g((e, n) => {
282
282
  const { children: t, ...a } = e;
283
- return /* @__PURE__ */ x(t) ? /* @__PURE__ */ z(t, {
283
+ return /* @__PURE__ */ x(t) ? /* @__PURE__ */ R(t, {
284
284
  ...Qe(a, t.props),
285
285
  ref: n ? We(n, t.ref) : t.ref
286
286
  }) : v.count(t) > 1 ? v.only(null) : null;
@@ -329,11 +329,11 @@ const Ye = [
329
329
  "svg",
330
330
  "ul"
331
331
  ], er = Ye.reduce((e, n) => {
332
- const t = /* @__PURE__ */ _((a, u) => {
332
+ const t = /* @__PURE__ */ g((a, u) => {
333
333
  const { asChild: r, ...o } = a, i = r ? ae : n;
334
334
  return A(() => {
335
335
  window[Symbol.for("radix-ui")] = !0;
336
- }, []), /* @__PURE__ */ p(i, j({}, o, {
336
+ }, []), /* @__PURE__ */ p(i, E({}, o, {
337
337
  ref: u
338
338
  }));
339
339
  });
@@ -341,7 +341,7 @@ const Ye = [
341
341
  ...e,
342
342
  [n]: t
343
343
  };
344
- }, {}), rr = /* @__PURE__ */ _((e, n) => /* @__PURE__ */ p(er.label, T({}, e, {
344
+ }, {}), rr = /* @__PURE__ */ g((e, n) => /* @__PURE__ */ p(er.label, T({}, e, {
345
345
  ref: n,
346
346
  onMouseDown: (t) => {
347
347
  var a;
@@ -389,8 +389,8 @@ var ue = { exports: {} };
389
389
  })(ue);
390
390
  var or = ue.exports;
391
391
  const ar = /* @__PURE__ */ nr(or), Q = {
392
- "purpur-label": "_purpur-label_1jub8_1",
393
- "purpur-label--disabled": "_purpur-label--disabled_1jub8_9"
392
+ "purpur-label": "_purpur-label_1tkut_1",
393
+ "purpur-label--disabled": "_purpur-label--disabled_1tkut_9"
394
394
  }, Y = "purpur-label", ur = ({
395
395
  children: e,
396
396
  className: n,
@@ -447,20 +447,20 @@ var ie = { exports: {} };
447
447
  })(ie);
448
448
  var cr = ie.exports;
449
449
  const sr = /* @__PURE__ */ ir(cr), C = {
450
- "purpur-paragraph": "_purpur-paragraph_15yuz_1",
451
- "purpur-paragraph--disabled": "_purpur-paragraph--disabled_15yuz_7",
452
- "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_15yuz_10",
453
- "purpur-paragraph--negative": "_purpur-paragraph--negative_15yuz_13",
454
- "purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_15yuz_16",
455
- "purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_15yuz_22",
456
- "purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_15yuz_29",
457
- "purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_15yuz_36",
458
- "purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_15yuz_42",
459
- "purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_15yuz_48",
460
- "purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_15yuz_54",
461
- "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_15yuz_60",
462
- "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_15yuz_67",
463
- "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_15yuz_75"
450
+ "purpur-paragraph": "_purpur-paragraph_1rh57_1",
451
+ "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
452
+ "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
453
+ "purpur-paragraph--negative": "_purpur-paragraph--negative_1rh57_13",
454
+ "purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1rh57_16",
455
+ "purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1rh57_22",
456
+ "purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1rh57_29",
457
+ "purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1rh57_36",
458
+ "purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1rh57_42",
459
+ "purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1rh57_48",
460
+ "purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1rh57_54",
461
+ "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
462
+ "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
463
+ "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
464
464
  }, lr = {
465
465
  PARAGRAPH100: "paragraph-100",
466
466
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
@@ -494,15 +494,15 @@ const sr = /* @__PURE__ */ ir(cr), C = {
494
494
  ]);
495
495
  return /* @__PURE__ */ f("p", { ...i, className: c, "data-testid": e, children: n });
496
496
  };
497
- function E() {
498
- return E = Object.assign ? Object.assign.bind() : function(e) {
497
+ function j() {
498
+ return j = Object.assign ? Object.assign.bind() : function(e) {
499
499
  for (var n = 1; n < arguments.length; n++) {
500
500
  var t = arguments[n];
501
501
  for (var a in t)
502
502
  Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
503
503
  }
504
504
  return e;
505
- }, E.apply(this, arguments);
505
+ }, j.apply(this, arguments);
506
506
  }
507
507
  function dr(e, n) {
508
508
  typeof e == "function" ? e(n) : e != null && (e.current = n);
@@ -524,18 +524,18 @@ function fr(e, n = []) {
524
524
  o
525
525
  ];
526
526
  function s(l) {
527
- const { scope: d, children: b, ...g } = l, R = (d == null ? void 0 : d[e][c]) || i, y = k(
528
- () => g,
529
- Object.values(g)
527
+ const { scope: d, children: b, ..._ } = l, D = (d == null ? void 0 : d[e][c]) || i, y = k(
528
+ () => _,
529
+ Object.values(_)
530
530
  );
531
- return /* @__PURE__ */ p(R.Provider, {
531
+ return /* @__PURE__ */ p(D.Provider, {
532
532
  value: y
533
533
  }, b);
534
534
  }
535
535
  function h(l, d) {
536
- const b = (d == null ? void 0 : d[e][c]) || i, g = ge(b);
537
- if (g)
538
- return g;
536
+ const b = (d == null ? void 0 : d[e][c]) || i, _ = _e(b);
537
+ if (_)
538
+ return _;
539
539
  if (o !== void 0)
540
540
  return o;
541
541
  throw new Error(`\`${l}\` must be used within \`${r}\``);
@@ -640,7 +640,7 @@ function mr({ prop: e, defaultProp: n, onChange: t = () => {
640
640
  ];
641
641
  }
642
642
  function vr({ defaultProp: e, onChange: n }) {
643
- const t = q(e), [a] = t, u = $(a), r = le(n);
643
+ const t = I(e), [a] = t, u = $(a), r = le(n);
644
644
  return A(() => {
645
645
  u.current !== a && (r(a), u.current = a);
646
646
  }, [
@@ -658,10 +658,10 @@ function br(e) {
658
658
  e
659
659
  ]);
660
660
  }
661
- const H = globalThis != null && globalThis.document ? _e : () => {
661
+ const H = globalThis != null && globalThis.document ? ge : () => {
662
662
  };
663
- function gr(e) {
664
- const [n, t] = q(void 0);
663
+ function _r(e) {
664
+ const [n, t] = I(void 0);
665
665
  return H(() => {
666
666
  if (e) {
667
667
  t({
@@ -692,7 +692,7 @@ function gr(e) {
692
692
  e
693
693
  ]), n;
694
694
  }
695
- function _r(e, n) {
695
+ function gr(e, n) {
696
696
  return $e((t, a) => {
697
697
  const u = n[t][a];
698
698
  return u ?? t;
@@ -702,13 +702,13 @@ const pe = (e) => {
702
702
  const { present: n, children: t } = e, a = $r(n), u = typeof t == "function" ? t({
703
703
  present: a.isPresent
704
704
  }) : v.only(t), r = se(a.ref, u.ref);
705
- return typeof t == "function" || a.isPresent ? /* @__PURE__ */ z(u, {
705
+ return typeof t == "function" || a.isPresent ? /* @__PURE__ */ R(u, {
706
706
  ref: r
707
707
  }) : null;
708
708
  };
709
709
  pe.displayName = "Presence";
710
710
  function $r(e) {
711
- const [n, t] = q(), a = $({}), u = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [i, c] = _r(o, {
711
+ const [n, t] = I(), a = $({}), u = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [i, c] = gr(o, {
712
712
  mounted: {
713
713
  UNMOUNT: "unmounted",
714
714
  ANIMATION_OUT: "unmountSuspended"
@@ -722,14 +722,14 @@ function $r(e) {
722
722
  }
723
723
  });
724
724
  return A(() => {
725
- const s = D(a.current);
725
+ const s = q(a.current);
726
726
  r.current = i === "mounted" ? s : "none";
727
727
  }, [
728
728
  i
729
729
  ]), H(() => {
730
730
  const s = a.current, h = u.current;
731
731
  if (h !== e) {
732
- const d = r.current, b = D(s);
732
+ const d = r.current, b = q(s);
733
733
  e ? c("MOUNT") : b === "none" || (s == null ? void 0 : s.display) === "none" ? c("UNMOUNT") : c(h && d !== b ? "ANIMATION_OUT" : "UNMOUNT"), u.current = e;
734
734
  }
735
735
  }, [
@@ -738,12 +738,12 @@ function $r(e) {
738
738
  ]), H(() => {
739
739
  if (n) {
740
740
  const s = (l) => {
741
- const b = D(a.current).includes(l.animationName);
741
+ const b = q(a.current).includes(l.animationName);
742
742
  l.target === n && b && ye(
743
743
  () => c("ANIMATION_END")
744
744
  );
745
745
  }, h = (l) => {
746
- l.target === n && (r.current = D(a.current));
746
+ l.target === n && (r.current = q(a.current));
747
747
  };
748
748
  return n.addEventListener("animationstart", h), n.addEventListener("animationcancel", s), n.addEventListener("animationend", s), () => {
749
749
  n.removeEventListener("animationstart", h), n.removeEventListener("animationcancel", s), n.removeEventListener("animationend", s);
@@ -763,7 +763,7 @@ function $r(e) {
763
763
  }, [])
764
764
  };
765
765
  }
766
- function D(e) {
766
+ function q(e) {
767
767
  return (e == null ? void 0 : e.animationName) || "none";
768
768
  }
769
769
  function M() {
@@ -776,22 +776,22 @@ function M() {
776
776
  return e;
777
777
  }, M.apply(this, arguments);
778
778
  }
779
- const de = /* @__PURE__ */ _((e, n) => {
779
+ const de = /* @__PURE__ */ g((e, n) => {
780
780
  const { children: t, ...a } = e, u = v.toArray(t), r = u.find(xr);
781
781
  if (r) {
782
782
  const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ x(o) ? o.props.children : null : c);
783
783
  return /* @__PURE__ */ p(F, M({}, a, {
784
784
  ref: n
785
- }), /* @__PURE__ */ x(o) ? /* @__PURE__ */ z(o, void 0, i) : null);
785
+ }), /* @__PURE__ */ x(o) ? /* @__PURE__ */ R(o, void 0, i) : null);
786
786
  }
787
787
  return /* @__PURE__ */ p(F, M({}, a, {
788
788
  ref: n
789
789
  }), t);
790
790
  });
791
791
  de.displayName = "Slot";
792
- const F = /* @__PURE__ */ _((e, n) => {
792
+ const F = /* @__PURE__ */ g((e, n) => {
793
793
  const { children: t, ...a } = e;
794
- return /* @__PURE__ */ x(t) ? /* @__PURE__ */ z(t, {
794
+ return /* @__PURE__ */ x(t) ? /* @__PURE__ */ R(t, {
795
795
  ...wr(a, t.props),
796
796
  ref: n ? ce(n, t.ref) : t.ref
797
797
  }) : v.count(t) > 1 ? v.only(null) : null;
@@ -840,7 +840,7 @@ const Nr = [
840
840
  "svg",
841
841
  "ul"
842
842
  ], fe = Nr.reduce((e, n) => {
843
- const t = /* @__PURE__ */ _((a, u) => {
843
+ const t = /* @__PURE__ */ g((a, u) => {
844
844
  const { asChild: r, ...o } = a, i = r ? de : n;
845
845
  return A(() => {
846
846
  window[Symbol.for("radix-ui")] = !0;
@@ -852,11 +852,11 @@ const Nr = [
852
852
  ...e,
853
853
  [n]: t
854
854
  };
855
- }, {}), he = "Checkbox", [Sr, Tr] = fr(he), [Ar, Or] = Sr(he), Cr = /* @__PURE__ */ _((e, n) => {
856
- const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...h } = e, [l, d] = q(null), b = se(
855
+ }, {}), he = "Checkbox", [Sr, Tr] = fr(he), [Ar, Or] = Sr(he), Cr = /* @__PURE__ */ g((e, n) => {
856
+ const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...h } = e, [l, d] = I(null), b = se(
857
857
  n,
858
858
  (m) => d(m)
859
- ), g = $(!1), R = l ? !!l.closest("form") : !0, [y = !1, I] = mr({
859
+ ), _ = $(!1), D = l ? !!l.closest("form") : !0, [y = !1, L] = mr({
860
860
  prop: u,
861
861
  defaultProp: r,
862
862
  onChange: s
@@ -864,17 +864,17 @@ const Nr = [
864
864
  return A(() => {
865
865
  const m = l == null ? void 0 : l.form;
866
866
  if (m) {
867
- const O = () => I(be.current);
867
+ const O = () => L(be.current);
868
868
  return m.addEventListener("reset", O), () => m.removeEventListener("reset", O);
869
869
  }
870
870
  }, [
871
871
  l,
872
- I
872
+ L
873
873
  ]), /* @__PURE__ */ p(Ar, {
874
874
  scope: t,
875
875
  state: y,
876
876
  disabled: i
877
- }, /* @__PURE__ */ p(fe.button, E({
877
+ }, /* @__PURE__ */ p(fe.button, j({
878
878
  type: "button",
879
879
  role: "checkbox",
880
880
  "aria-checked": S(y) ? "mixed" : y,
@@ -889,13 +889,13 @@ const Nr = [
889
889
  m.key === "Enter" && m.preventDefault();
890
890
  }),
891
891
  onClick: ee(e.onClick, (m) => {
892
- I(
892
+ L(
893
893
  (O) => S(O) ? !0 : !O
894
- ), R && (g.current = m.isPropagationStopped(), g.current || m.stopPropagation());
894
+ ), D && (_.current = m.isPropagationStopped(), _.current || m.stopPropagation());
895
895
  })
896
- })), R && /* @__PURE__ */ p(jr, {
896
+ })), D && /* @__PURE__ */ p(Er, {
897
897
  control: l,
898
- bubbles: !g.current,
898
+ bubbles: !_.current,
899
899
  name: a,
900
900
  value: c,
901
901
  checked: y,
@@ -905,11 +905,11 @@ const Nr = [
905
905
  transform: "translateX(-100%)"
906
906
  }
907
907
  }));
908
- }), Pr = "CheckboxIndicator", kr = /* @__PURE__ */ _((e, n) => {
908
+ }), Pr = "CheckboxIndicator", kr = /* @__PURE__ */ g((e, n) => {
909
909
  const { __scopeCheckbox: t, forceMount: a, ...u } = e, r = Or(Pr, t);
910
910
  return /* @__PURE__ */ p(pe, {
911
911
  present: a || S(r.state) || r.state === !0
912
- }, /* @__PURE__ */ p(fe.span, E({
912
+ }, /* @__PURE__ */ p(fe.span, j({
913
913
  "data-state": me(r.state),
914
914
  "data-disabled": r.disabled ? "" : void 0
915
915
  }, u, {
@@ -919,8 +919,8 @@ const Nr = [
919
919
  ...e.style
920
920
  }
921
921
  })));
922
- }), jr = (e) => {
923
- const { control: n, checked: t, bubbles: a = !0, ...u } = e, r = $(null), o = br(t), i = gr(n);
922
+ }), Er = (e) => {
923
+ const { control: n, checked: t, bubbles: a = !0, ...u } = e, r = $(null), o = br(t), i = _r(n);
924
924
  return A(() => {
925
925
  const c = r.current, s = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(s, "checked").set;
926
926
  if (o !== t && l) {
@@ -933,7 +933,7 @@ const Nr = [
933
933
  o,
934
934
  t,
935
935
  a
936
- ]), /* @__PURE__ */ p("input", E({
936
+ ]), /* @__PURE__ */ p("input", j({
937
937
  type: "checkbox",
938
938
  "aria-hidden": !0,
939
939
  defaultChecked: S(t) ? !1 : t
@@ -956,8 +956,8 @@ function S(e) {
956
956
  function me(e) {
957
957
  return S(e) ? "indeterminate" : e ? "checked" : "unchecked";
958
958
  }
959
- const Er = Cr, Mr = kr;
960
- function zr(e) {
959
+ const jr = Cr, Mr = kr;
960
+ function Rr(e) {
961
961
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
962
962
  }
963
963
  var ve = { exports: {} };
@@ -996,8 +996,8 @@ var ve = { exports: {} };
996
996
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
997
997
  })();
998
998
  })(ve);
999
- var Rr = ve.exports;
1000
- const L = /* @__PURE__ */ zr(Rr), w = {
999
+ var Dr = ve.exports;
1000
+ const B = /* @__PURE__ */ Rr(Dr), w = {
1001
1001
  "purpur-checkbox": "_purpur-checkbox_10fl8_1",
1002
1002
  "purpur-checkbox__box": "_purpur-checkbox__box_10fl8_7",
1003
1003
  "purpur-checkbox--error": "_purpur-checkbox--error_10fl8_16",
@@ -1005,7 +1005,7 @@ const L = /* @__PURE__ */ zr(Rr), w = {
1005
1005
  "purpur-checkbox__label": "_purpur-checkbox__label_10fl8_70",
1006
1006
  "purpur-checkbox__wrapper": "_purpur-checkbox__wrapper_10fl8_73",
1007
1007
  "purpur-checkbox__container": "_purpur-checkbox__container_10fl8_79"
1008
- }, N = "purpur-checkbox", Dr = ({
1008
+ }, N = "purpur-checkbox", qr = ({
1009
1009
  ["data-testid"]: e,
1010
1010
  checked: n,
1011
1011
  className: t,
@@ -1015,14 +1015,14 @@ const L = /* @__PURE__ */ zr(Rr), w = {
1015
1015
  ...o
1016
1016
  }, i) => {
1017
1017
  const c = a && !n;
1018
- return /* @__PURE__ */ B("div", { className: L([t, w[`${N}__wrapper`]]), children: [
1019
- /* @__PURE__ */ B("div", { className: L([t, w[`${N}__container`]]), children: [
1018
+ return /* @__PURE__ */ z("div", { className: B([t, w[`${N}__wrapper`]]), children: [
1019
+ /* @__PURE__ */ z("div", { className: B([t, w[`${N}__container`]]), children: [
1020
1020
  /* @__PURE__ */ f(
1021
- Er,
1021
+ jr,
1022
1022
  {
1023
1023
  ...o,
1024
1024
  checked: n,
1025
- className: L(w[N], {
1025
+ className: B(w[N], {
1026
1026
  [w[`${N}--error`]]: c
1027
1027
  }),
1028
1028
  "data-testid": e,
@@ -1056,11 +1056,11 @@ const L = /* @__PURE__ */ zr(Rr), w = {
1056
1056
  }
1057
1057
  )
1058
1058
  ] }),
1059
- c && /* @__PURE__ */ f(De, { "data-testid": e && `${e}-error-text`, children: a })
1059
+ c && /* @__PURE__ */ f(qe, { "data-testid": e && `${e}-error-text`, children: a })
1060
1060
  ] });
1061
- }, qr = _(Dr);
1062
- qr.displayName = "Checkbox";
1061
+ }, Ir = g(qr);
1062
+ Ir.displayName = "Checkbox";
1063
1063
  export {
1064
- qr as Checkbox
1064
+ Ir as Checkbox
1065
1065
  };
1066
1066
  //# sourceMappingURL=checkbox.es.js.map