@purpurds/checkbox 5.20.1 → 5.21.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,7 +1,7 @@
1
1
  import { jsxs as z, jsx as h } from "react/jsx-runtime";
2
- import { forwardRef as g, Children as v, isValidElement as N, createElement as p, cloneElement as j, useEffect as A, Fragment as Y, useCallback as F, createContext as Z, useMemo as M, useContext as ve, useRef as $, useState as L, useLayoutEffect as be, useReducer as _e } from "react";
3
- import { flushSync as ge } from "react-dom";
4
- function $e(e) {
2
+ import { forwardRef as g, Children as v, isValidElement as N, createElement as p, cloneElement as j, useEffect as A, Fragment as Y, useCallback as Z, createContext as V, useMemo as M, useContext as be, useRef as $, useState as I, useLayoutEffect as _e, useReducer as ge } from "react";
3
+ import { flushSync as $e } from "react-dom";
4
+ function xe(e) {
5
5
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
6
  }
7
7
  var Q = { exports: {} };
@@ -40,8 +40,8 @@ var Q = { exports: {} };
40
40
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
41
41
  })();
42
42
  })(Q);
43
- var xe = Q.exports;
44
- const ye = /* @__PURE__ */ $e(xe), Ne = {
43
+ var ye = Q.exports;
44
+ const Ne = /* @__PURE__ */ xe(ye), we = {
45
45
  "purpur-icon": "_purpur-icon_8u1lq_1",
46
46
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
47
47
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -49,31 +49,31 @@ const ye = /* @__PURE__ */ $e(xe), Ne = {
49
49
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
50
50
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
51
51
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
52
- }, we = {
52
+ }, Se = {
53
53
  name: "error-filled",
54
54
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
55
55
  keywords: ["error-filled"],
56
56
  category: "status"
57
- }, Se = ye.bind(Ne), V = "purpur-icon", Ae = "md", Ce = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), ke = ({ content: e = "", title: n } = {}) => {
57
+ }, Ae = Ne.bind(we), G = "purpur-icon", Ce = "md", ke = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Pe = ({ content: e = "", title: n } = {}) => {
58
58
  const t = [
59
59
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
60
60
  { name: "fill", value: "currentColor" },
61
61
  { name: "viewBox", value: "0 0 24 24" },
62
62
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
63
63
  ], a = n ? `<title>${n}</title>` : "";
64
- return `<svg ${Ce(t)}>${a}${e}</svg>`;
65
- }, Pe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Oe = ({
64
+ return `<svg ${ke(t)}>${a}${e}</svg>`;
65
+ }, Oe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), ee = ({
66
66
  ["data-testid"]: e,
67
67
  svg: n,
68
68
  allyTitle: t,
69
69
  className: a,
70
- size: u = Ae,
70
+ size: u = Ce,
71
71
  ...r
72
72
  }) => {
73
- const o = ke({
74
- content: Pe(n.svg),
73
+ const o = Pe({
74
+ content: Oe(n.svg),
75
75
  title: t
76
- }), i = Se(a, V, `${V}--${u}`);
76
+ }), i = Ae(a, G, `${G}--${u}`);
77
77
  return /* @__PURE__ */ h(
78
78
  "span",
79
79
  {
@@ -85,10 +85,11 @@ const ye = /* @__PURE__ */ $e(xe), Ne = {
85
85
  }
86
86
  );
87
87
  };
88
+ ee.displayName = "Icon";
88
89
  function Ee(e) {
89
90
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
90
91
  }
91
- var ee = { exports: {} };
92
+ var re = { exports: {} };
92
93
  /*!
93
94
  Copyright (c) 2018 Jed Watson.
94
95
  Licensed under the MIT License (MIT), see
@@ -123,12 +124,12 @@ var ee = { exports: {} };
123
124
  }
124
125
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
125
126
  })();
126
- })(ee);
127
- var Me = ee.exports;
128
- const je = /* @__PURE__ */ Ee(Me), G = {
127
+ })(re);
128
+ var Me = re.exports;
129
+ const je = /* @__PURE__ */ Ee(Me), K = {
129
130
  "purpur-field-error-text": "_purpur-field-error-text_1u768_1",
130
131
  "purpur-field-error-text__icon": "_purpur-field-error-text__icon_1u768_12"
131
- }, K = "purpur-field-error-text", Re = ({
132
+ }, X = "purpur-field-error-text", Re = ({
132
133
  ["data-testid"]: e,
133
134
  children: n,
134
135
  className: t,
@@ -137,13 +138,13 @@ const je = /* @__PURE__ */ Ee(Me), G = {
137
138
  }) => /* @__PURE__ */ z(
138
139
  "div",
139
140
  {
140
- className: je([t, G[K]]),
141
+ className: je([t, K[X]]),
141
142
  "data-testid": e,
142
143
  "aria-live": "assertive",
143
144
  "aria-relevant": a,
144
145
  ...u,
145
146
  children: [
146
- /* @__PURE__ */ h(Oe, { svg: we, size: "xs", className: G[`${K}__icon`] }),
147
+ /* @__PURE__ */ h(ee, { svg: Se, size: "xs", className: K[`${X}__icon`] }),
147
148
  n
148
149
  ]
149
150
  }
@@ -151,7 +152,7 @@ const je = /* @__PURE__ */ Ee(Me), G = {
151
152
  function De(e) {
152
153
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
153
154
  }
154
- var re = { exports: {} };
155
+ var te = { exports: {} };
155
156
  /*!
156
157
  Copyright (c) 2018 Jed Watson.
157
158
  Licensed under the MIT License (MIT), see
@@ -186,9 +187,9 @@ var re = { exports: {} };
186
187
  }
187
188
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
188
189
  })();
189
- })(re);
190
- var Le = re.exports;
191
- const qe = /* @__PURE__ */ De(Le), Ie = {
190
+ })(te);
191
+ var Ie = te.exports;
192
+ const Le = /* @__PURE__ */ De(Ie), qe = {
192
193
  "purpur-icon": "_purpur-icon_8u1lq_1",
193
194
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
194
195
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -206,7 +207,7 @@ const qe = /* @__PURE__ */ De(Le), Ie = {
206
207
  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
208
  keywords: ["minus-bold"],
208
209
  category: "utility"
209
- }, Te = qe.bind(Ie), X = "purpur-icon", Ue = "md", He = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Fe = ({ content: e = "", title: n } = {}) => {
210
+ }, Te = Le.bind(qe), W = "purpur-icon", Ue = "md", He = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Fe = ({ content: e = "", title: n } = {}) => {
210
211
  const t = [
211
212
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
212
213
  { name: "fill", value: "currentColor" },
@@ -214,7 +215,7 @@ const qe = /* @__PURE__ */ De(Le), Ie = {
214
215
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
215
216
  ], a = n ? `<title>${n}</title>` : "";
216
217
  return `<svg ${He(t)}>${a}${e}</svg>`;
217
- }, Ze = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), W = ({
218
+ }, Ze = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), T = ({
218
219
  ["data-testid"]: e,
219
220
  svg: n,
220
221
  allyTitle: t,
@@ -225,7 +226,7 @@ const qe = /* @__PURE__ */ De(Le), Ie = {
225
226
  const o = Fe({
226
227
  content: Ze(n.svg),
227
228
  title: t
228
- }), i = Te(a, X, `${X}--${u}`);
229
+ }), i = Te(a, W, `${W}--${u}`);
229
230
  return /* @__PURE__ */ h(
230
231
  "span",
231
232
  {
@@ -237,6 +238,7 @@ const qe = /* @__PURE__ */ De(Le), Ie = {
237
238
  }
238
239
  );
239
240
  };
241
+ T.displayName = "Icon";
240
242
  function k() {
241
243
  return k = Object.assign ? Object.assign.bind() : function(e) {
242
244
  for (var n = 1; n < arguments.length; n++) {
@@ -254,27 +256,27 @@ function Ge(...e) {
254
256
  (t) => Ve(t, n)
255
257
  );
256
258
  }
257
- const te = /* @__PURE__ */ g((e, n) => {
259
+ const ne = /* @__PURE__ */ g((e, n) => {
258
260
  const { children: t, ...a } = e, u = v.toArray(t), r = u.find(Xe);
259
261
  if (r) {
260
262
  const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ N(o) ? o.props.children : null : c);
261
- return /* @__PURE__ */ p(T, k({}, a, {
263
+ return /* @__PURE__ */ p(U, k({}, a, {
262
264
  ref: n
263
265
  }), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0, i) : null);
264
266
  }
265
- return /* @__PURE__ */ p(T, k({}, a, {
267
+ return /* @__PURE__ */ p(U, k({}, a, {
266
268
  ref: n
267
269
  }), t);
268
270
  });
269
- te.displayName = "Slot";
270
- const T = /* @__PURE__ */ g((e, n) => {
271
+ ne.displayName = "Slot";
272
+ const U = /* @__PURE__ */ g((e, n) => {
271
273
  const { children: t, ...a } = e;
272
274
  return /* @__PURE__ */ N(t) ? /* @__PURE__ */ j(t, {
273
275
  ...We(a, t.props),
274
276
  ref: n ? Ge(n, t.ref) : t.ref
275
277
  }) : v.count(t) > 1 ? v.only(null) : null;
276
278
  });
277
- T.displayName = "SlotClone";
279
+ U.displayName = "SlotClone";
278
280
  const Ke = ({ children: e }) => /* @__PURE__ */ p(Y, null, e);
279
281
  function Xe(e) {
280
282
  return /* @__PURE__ */ N(e) && e.type === Ke;
@@ -319,7 +321,7 @@ const Je = [
319
321
  "ul"
320
322
  ], Ye = Je.reduce((e, n) => {
321
323
  const t = /* @__PURE__ */ g((a, u) => {
322
- const { asChild: r, ...o } = a, i = r ? te : n;
324
+ const { asChild: r, ...o } = a, i = r ? ne : n;
323
325
  return A(() => {
324
326
  window[Symbol.for("radix-ui")] = !0;
325
327
  }, []), /* @__PURE__ */ p(i, k({}, o, {
@@ -340,7 +342,7 @@ const Je = [
340
342
  function rr(e) {
341
343
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
342
344
  }
343
- var ne = { exports: {} };
345
+ var oe = { exports: {} };
344
346
  /*!
345
347
  Copyright (c) 2018 Jed Watson.
346
348
  Licensed under the MIT License (MIT), see
@@ -375,9 +377,9 @@ var ne = { exports: {} };
375
377
  }
376
378
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
377
379
  })();
378
- })(ne);
379
- var tr = ne.exports;
380
- const nr = /* @__PURE__ */ rr(tr), I = {
380
+ })(oe);
381
+ var tr = oe.exports;
382
+ const nr = /* @__PURE__ */ rr(tr), q = {
381
383
  "purpur-label": "_purpur-label_12cfi_1",
382
384
  "purpur-label--negative": "_purpur-label--negative_12cfi_9",
383
385
  "purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
@@ -392,10 +394,10 @@ const nr = /* @__PURE__ */ rr(tr), I = {
392
394
  }) => {
393
395
  const i = nr([
394
396
  n,
395
- I[B],
397
+ q[B],
396
398
  {
397
- [I[`${B}--disabled`]]: u,
398
- [I[`${B}--negative`]]: r
399
+ [q[`${B}--disabled`]]: u,
400
+ [q[`${B}--negative`]]: r
399
401
  }
400
402
  ]);
401
403
  return /* @__PURE__ */ h(er, { className: i, "data-testid": a, htmlFor: t, ...o, children: e });
@@ -403,7 +405,7 @@ const nr = /* @__PURE__ */ rr(tr), I = {
403
405
  function ar(e) {
404
406
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
405
407
  }
406
- var oe = { exports: {} };
408
+ var ae = { exports: {} };
407
409
  /*!
408
410
  Copyright (c) 2018 Jed Watson.
409
411
  Licensed under the MIT License (MIT), see
@@ -438,8 +440,8 @@ var oe = { exports: {} };
438
440
  }
439
441
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
440
442
  })();
441
- })(oe);
442
- var ir = oe.exports;
443
+ })(ae);
444
+ var ir = ae.exports;
443
445
  const ur = /* @__PURE__ */ ar(ir), O = {
444
446
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
445
447
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
@@ -466,7 +468,7 @@ const ur = /* @__PURE__ */ ar(ir), O = {
466
468
  ADDITIONAL100MEDIUM: "additional-100-medium",
467
469
  OVERLINE100: "overline-100",
468
470
  OVERLINE200: "overline-200"
469
- }, E = "purpur-paragraph", ae = ({
471
+ }, E = "purpur-paragraph", ie = ({
470
472
  ["data-testid"]: e,
471
473
  children: n,
472
474
  className: t,
@@ -488,7 +490,7 @@ const ur = /* @__PURE__ */ ar(ir), O = {
488
490
  ]);
489
491
  return /* @__PURE__ */ h("p", { ...i, className: c, "data-testid": e, children: n });
490
492
  };
491
- ae.displayName = "Paragraph";
493
+ ie.displayName = "Paragraph";
492
494
  function w() {
493
495
  return w = Object.assign ? Object.assign.bind() : function(e) {
494
496
  for (var n = 1; n < arguments.length; n++) {
@@ -501,18 +503,18 @@ function w() {
501
503
  function sr(e, n) {
502
504
  typeof e == "function" ? e(n) : e != null && (e.current = n);
503
505
  }
504
- function ie(...e) {
506
+ function ue(...e) {
505
507
  return (n) => e.forEach(
506
508
  (t) => sr(t, n)
507
509
  );
508
510
  }
509
- function ue(...e) {
510
- return F(ie(...e), e);
511
+ function ce(...e) {
512
+ return Z(ue(...e), e);
511
513
  }
512
514
  function lr(e, n = []) {
513
515
  let t = [];
514
516
  function a(r, o) {
515
- const i = /* @__PURE__ */ Z(o), c = t.length;
517
+ const i = /* @__PURE__ */ V(o), c = t.length;
516
518
  t = [
517
519
  ...t,
518
520
  o
@@ -527,7 +529,7 @@ function lr(e, n = []) {
527
529
  }, b);
528
530
  }
529
531
  function d(l, f) {
530
- const b = (f == null ? void 0 : f[e][c]) || i, _ = ve(b);
532
+ const b = (f == null ? void 0 : f[e][c]) || i, _ = be(b);
531
533
  if (_) return _;
532
534
  if (o !== void 0) return o;
533
535
  throw new Error(`\`${l}\` must be used within \`${r}\``);
@@ -538,7 +540,7 @@ function lr(e, n = []) {
538
540
  ];
539
541
  }
540
542
  const u = () => {
541
- const r = t.map((o) => /* @__PURE__ */ Z(o));
543
+ const r = t.map((o) => /* @__PURE__ */ V(o));
542
544
  return function(i) {
543
545
  const c = (i == null ? void 0 : i[e]) || r;
544
546
  return M(
@@ -595,7 +597,7 @@ function J(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
595
597
  if (e == null || e(u), t === !1 || !u.defaultPrevented) return n == null ? void 0 : n(u);
596
598
  };
597
599
  }
598
- function ce(e) {
600
+ function se(e) {
599
601
  const n = $(e);
600
602
  return A(() => {
601
603
  n.current = e;
@@ -612,7 +614,7 @@ function dr({ prop: e, defaultProp: n, onChange: t = () => {
612
614
  const [a, u] = fr({
613
615
  defaultProp: n,
614
616
  onChange: t
615
- }), r = e !== void 0, o = r ? e : a, i = ce(t), c = F((s) => {
617
+ }), r = e !== void 0, o = r ? e : a, i = se(t), c = Z((s) => {
616
618
  if (r) {
617
619
  const l = typeof s == "function" ? s(e) : s;
618
620
  l !== e && i(l);
@@ -629,7 +631,7 @@ function dr({ prop: e, defaultProp: n, onChange: t = () => {
629
631
  ];
630
632
  }
631
633
  function fr({ defaultProp: e, onChange: n }) {
632
- const t = L(e), [a] = t, u = $(a), r = ce(n);
634
+ const t = I(e), [a] = t, u = $(a), r = se(n);
633
635
  return A(() => {
634
636
  u.current !== a && (r(a), u.current = a);
635
637
  }, [
@@ -647,11 +649,11 @@ function hr(e) {
647
649
  e
648
650
  ]);
649
651
  }
650
- const U = globalThis != null && globalThis.document ? be : () => {
652
+ const H = globalThis != null && globalThis.document ? _e : () => {
651
653
  };
652
654
  function mr(e) {
653
- const [n, t] = L(void 0);
654
- return U(() => {
655
+ const [n, t] = I(void 0);
656
+ return H(() => {
655
657
  if (e) {
656
658
  t({
657
659
  width: e.offsetWidth,
@@ -681,22 +683,22 @@ function mr(e) {
681
683
  ]), n;
682
684
  }
683
685
  function vr(e, n) {
684
- return _e((t, a) => {
686
+ return ge((t, a) => {
685
687
  const u = n[t][a];
686
688
  return u ?? t;
687
689
  }, e);
688
690
  }
689
- const se = (e) => {
691
+ const le = (e) => {
690
692
  const { present: n, children: t } = e, a = br(n), u = typeof t == "function" ? t({
691
693
  present: a.isPresent
692
- }) : v.only(t), r = ue(a.ref, u.ref);
694
+ }) : v.only(t), r = ce(a.ref, u.ref);
693
695
  return typeof t == "function" || a.isPresent ? /* @__PURE__ */ j(u, {
694
696
  ref: r
695
697
  }) : null;
696
698
  };
697
- se.displayName = "Presence";
699
+ le.displayName = "Presence";
698
700
  function br(e) {
699
- const [n, t] = L(), a = $({}), u = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [i, c] = vr(o, {
701
+ const [n, t] = I(), a = $({}), u = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [i, c] = vr(o, {
700
702
  mounted: {
701
703
  UNMOUNT: "unmounted",
702
704
  ANIMATION_OUT: "unmountSuspended"
@@ -714,7 +716,7 @@ function br(e) {
714
716
  r.current = i === "mounted" ? s : "none";
715
717
  }, [
716
718
  i
717
- ]), U(() => {
719
+ ]), H(() => {
718
720
  const s = a.current, d = u.current;
719
721
  if (d !== e) {
720
722
  const f = r.current, b = D(s);
@@ -723,11 +725,11 @@ function br(e) {
723
725
  }, [
724
726
  e,
725
727
  c
726
- ]), U(() => {
728
+ ]), H(() => {
727
729
  if (n) {
728
730
  const s = (l) => {
729
731
  const b = D(a.current).includes(l.animationName);
730
- l.target === n && b && ge(
732
+ l.target === n && b && $e(
731
733
  () => c("ANIMATION_END")
732
734
  );
733
735
  }, d = (l) => {
@@ -746,7 +748,7 @@ function br(e) {
746
748
  "mounted",
747
749
  "unmountSuspended"
748
750
  ].includes(i),
749
- ref: F((s) => {
751
+ ref: Z((s) => {
750
752
  s && (a.current = getComputedStyle(s)), t(s);
751
753
  }, [])
752
754
  };
@@ -754,27 +756,27 @@ function br(e) {
754
756
  function D(e) {
755
757
  return (e == null ? void 0 : e.animationName) || "none";
756
758
  }
757
- const le = /* @__PURE__ */ g((e, n) => {
759
+ const pe = /* @__PURE__ */ g((e, n) => {
758
760
  const { children: t, ...a } = e, u = v.toArray(t), r = u.find(gr);
759
761
  if (r) {
760
762
  const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ N(o) ? o.props.children : null : c);
761
- return /* @__PURE__ */ p(H, w({}, a, {
763
+ return /* @__PURE__ */ p(F, w({}, a, {
762
764
  ref: n
763
765
  }), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0, i) : null);
764
766
  }
765
- return /* @__PURE__ */ p(H, w({}, a, {
767
+ return /* @__PURE__ */ p(F, w({}, a, {
766
768
  ref: n
767
769
  }), t);
768
770
  });
769
- le.displayName = "Slot";
770
- const H = /* @__PURE__ */ g((e, n) => {
771
+ pe.displayName = "Slot";
772
+ const F = /* @__PURE__ */ g((e, n) => {
771
773
  const { children: t, ...a } = e;
772
774
  return /* @__PURE__ */ N(t) ? /* @__PURE__ */ j(t, {
773
775
  ...$r(a, t.props),
774
- ref: n ? ie(n, t.ref) : t.ref
776
+ ref: n ? ue(n, t.ref) : t.ref
775
777
  }) : v.count(t) > 1 ? v.only(null) : null;
776
778
  });
777
- H.displayName = "SlotClone";
779
+ F.displayName = "SlotClone";
778
780
  const _r = ({ children: e }) => /* @__PURE__ */ p(Y, null, e);
779
781
  function gr(e) {
780
782
  return /* @__PURE__ */ N(e) && e.type === _r;
@@ -817,9 +819,9 @@ const xr = [
817
819
  "span",
818
820
  "svg",
819
821
  "ul"
820
- ], pe = xr.reduce((e, n) => {
822
+ ], de = xr.reduce((e, n) => {
821
823
  const t = /* @__PURE__ */ g((a, u) => {
822
- const { asChild: r, ...o } = a, i = r ? le : n;
824
+ const { asChild: r, ...o } = a, i = r ? pe : n;
823
825
  return A(() => {
824
826
  window[Symbol.for("radix-ui")] = !0;
825
827
  }, []), /* @__PURE__ */ p(i, w({}, o, {
@@ -830,34 +832,34 @@ const xr = [
830
832
  ...e,
831
833
  [n]: t
832
834
  };
833
- }, {}), de = "Checkbox", [yr, zr] = lr(de), [Nr, wr] = yr(de), Sr = /* @__PURE__ */ g((e, n) => {
834
- const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...d } = e, [l, f] = L(null), b = ue(
835
+ }, {}), fe = "Checkbox", [yr, zr] = lr(fe), [Nr, wr] = yr(fe), Sr = /* @__PURE__ */ g((e, n) => {
836
+ const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...d } = e, [l, f] = I(null), b = ce(
835
837
  n,
836
838
  (m) => f(m)
837
- ), _ = $(!1), R = l ? !!l.closest("form") : !0, [x = !1, q] = dr({
839
+ ), _ = $(!1), R = l ? !!l.closest("form") : !0, [x = !1, L] = dr({
838
840
  prop: u,
839
841
  defaultProp: r,
840
842
  onChange: s
841
- }), me = $(x);
843
+ }), ve = $(x);
842
844
  return A(() => {
843
845
  const m = l == null ? void 0 : l.form;
844
846
  if (m) {
845
- const P = () => q(me.current);
847
+ const P = () => L(ve.current);
846
848
  return m.addEventListener("reset", P), () => m.removeEventListener("reset", P);
847
849
  }
848
850
  }, [
849
851
  l,
850
- q
852
+ L
851
853
  ]), /* @__PURE__ */ p(Nr, {
852
854
  scope: t,
853
855
  state: x,
854
856
  disabled: i
855
- }, /* @__PURE__ */ p(pe.button, w({
857
+ }, /* @__PURE__ */ p(de.button, w({
856
858
  type: "button",
857
859
  role: "checkbox",
858
860
  "aria-checked": S(x) ? "mixed" : x,
859
861
  "aria-required": o,
860
- "data-state": fe(x),
862
+ "data-state": he(x),
861
863
  "data-disabled": i ? "" : void 0,
862
864
  disabled: i,
863
865
  value: c
@@ -867,7 +869,7 @@ const xr = [
867
869
  m.key === "Enter" && m.preventDefault();
868
870
  }),
869
871
  onClick: J(e.onClick, (m) => {
870
- q(
872
+ L(
871
873
  (P) => S(P) ? !0 : !P
872
874
  ), R && (_.current = m.isPropagationStopped(), _.current || m.stopPropagation());
873
875
  })
@@ -885,10 +887,10 @@ const xr = [
885
887
  }));
886
888
  }), Ar = "CheckboxIndicator", Cr = /* @__PURE__ */ g((e, n) => {
887
889
  const { __scopeCheckbox: t, forceMount: a, ...u } = e, r = wr(Ar, t);
888
- return /* @__PURE__ */ p(se, {
890
+ return /* @__PURE__ */ p(le, {
889
891
  present: a || S(r.state) || r.state === !0
890
- }, /* @__PURE__ */ p(pe.span, w({
891
- "data-state": fe(r.state),
892
+ }, /* @__PURE__ */ p(de.span, w({
893
+ "data-state": he(r.state),
892
894
  "data-disabled": r.disabled ? "" : void 0
893
895
  }, u, {
894
896
  ref: n,
@@ -931,14 +933,14 @@ const xr = [
931
933
  function S(e) {
932
934
  return e === "indeterminate";
933
935
  }
934
- function fe(e) {
936
+ function he(e) {
935
937
  return S(e) ? "indeterminate" : e ? "checked" : "unchecked";
936
938
  }
937
939
  const Pr = Sr, Or = Cr;
938
940
  function Er(e) {
939
941
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
940
942
  }
941
- var he = { exports: {} };
943
+ var me = { exports: {} };
942
944
  /*!
943
945
  Copyright (c) 2018 Jed Watson.
944
946
  Licensed under the MIT License (MIT), see
@@ -973,8 +975,8 @@ var he = { exports: {} };
973
975
  }
974
976
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
975
977
  })();
976
- })(he);
977
- var Mr = he.exports;
978
+ })(me);
979
+ var Mr = me.exports;
978
980
  const jr = /* @__PURE__ */ Er(Mr), Rr = {
979
981
  "purpur-checkbox": "_purpur-checkbox_m4999_1",
980
982
  "purpur-checkbox__box": "_purpur-checkbox__box_m4999_7",
@@ -1013,14 +1015,14 @@ const jr = /* @__PURE__ */ Er(Mr), Rr = {
1013
1015
  onCheckedChange: o,
1014
1016
  ref: c,
1015
1017
  children: /* @__PURE__ */ h("span", { className: C(`${y}__box`), children: /* @__PURE__ */ h(Or, { className: C(`${y}__indicator`), children: n === "indeterminate" ? /* @__PURE__ */ h(
1016
- W,
1018
+ T,
1017
1019
  {
1018
1020
  "data-testid": e && `${e}-checked-icon`,
1019
1021
  size: "xs",
1020
1022
  svg: ze
1021
1023
  }
1022
1024
  ) : /* @__PURE__ */ h(
1023
- W,
1025
+ T,
1024
1026
  {
1025
1027
  "data-testid": e && `${e}-indeterminate-icon`,
1026
1028
  size: "xs",
@@ -1036,16 +1038,16 @@ const jr = /* @__PURE__ */ Er(Mr), Rr = {
1036
1038
  "data-testid": e && `${e}-label`,
1037
1039
  disabled: i.disabled,
1038
1040
  className: C(`${y}__label`),
1039
- children: /* @__PURE__ */ h(ae, { variant: "paragraph-100", disabled: i.disabled, children: `${i.required ? "* " : ""}${r}` })
1041
+ children: /* @__PURE__ */ h(ie, { variant: "paragraph-100", disabled: i.disabled, children: `${i.required ? "* " : ""}${r}` })
1040
1042
  }
1041
1043
  )
1042
1044
  ] }),
1043
1045
  s && /* @__PURE__ */ h(Re, { "data-testid": e && `${e}-error-text`, children: u })
1044
1046
  ] });
1045
- }, Lr = g(Dr);
1046
- Lr.displayName = "Checkbox";
1047
+ }, Ir = g(Dr);
1048
+ Ir.displayName = "Checkbox";
1047
1049
  export {
1048
- Lr as Checkbox,
1050
+ Ir as Checkbox,
1049
1051
  Tr as checkedState
1050
1052
  };
1051
1053
  //# sourceMappingURL=checkbox.es.js.map