@purpurds/toggle 5.27.3 → 5.27.5

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.
package/dist/toggle.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as x, jsxs as Z } from "react/jsx-runtime";
2
- import { forwardRef as w, Children as y, isValidElement as P, createElement as _, Fragment as K, cloneElement as R, useEffect as D, useCallback as B, useMemo as H, createContext as G, useContext as fe, useRef as O, useState as $, useLayoutEffect as Q } from "react";
1
+ import { jsx as x, jsxs as G } from "react/jsx-runtime";
2
+ import { forwardRef as w, Children as y, isValidElement as k, createElement as _, cloneElement as L, useEffect as D, Fragment as K, useCallback as X, createContext as Z, useMemo as H, useContext as fe, useRef as C, useState as $, useLayoutEffect as Q } from "react";
3
3
  import "react-dom";
4
4
  function ge(e) {
5
5
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -98,35 +98,35 @@ function E() {
98
98
  function Se(e, n) {
99
99
  typeof e == "function" ? e(n) : e != null && (e.current = n);
100
100
  }
101
- function ke(...e) {
101
+ function Pe(...e) {
102
102
  return (n) => e.forEach(
103
103
  (t) => Se(t, n)
104
104
  );
105
105
  }
106
106
  const te = /* @__PURE__ */ w((e, n) => {
107
- const { children: t, ...a } = e, c = y.toArray(t), r = c.find(Ce);
107
+ const { children: t, ...a } = e, c = y.toArray(t), r = c.find(Ae);
108
108
  if (r) {
109
- const o = r.props.children, u = c.map((i) => i === r ? y.count(o) > 1 ? y.only(null) : /* @__PURE__ */ P(o) ? o.props.children : null : i);
110
- return /* @__PURE__ */ _(W, E({}, a, {
109
+ const o = r.props.children, u = c.map((i) => i === r ? y.count(o) > 1 ? y.only(null) : /* @__PURE__ */ k(o) ? o.props.children : null : i);
110
+ return /* @__PURE__ */ _(F, E({}, a, {
111
111
  ref: n
112
- }), /* @__PURE__ */ P(o) ? /* @__PURE__ */ R(o, void 0, u) : null);
112
+ }), /* @__PURE__ */ k(o) ? /* @__PURE__ */ L(o, void 0, u) : null);
113
113
  }
114
- return /* @__PURE__ */ _(W, E({}, a, {
114
+ return /* @__PURE__ */ _(F, E({}, a, {
115
115
  ref: n
116
116
  }), t);
117
117
  });
118
118
  te.displayName = "Slot";
119
- const W = /* @__PURE__ */ w((e, n) => {
119
+ const F = /* @__PURE__ */ w((e, n) => {
120
120
  const { children: t, ...a } = e;
121
- return /* @__PURE__ */ P(t) ? /* @__PURE__ */ R(t, {
121
+ return /* @__PURE__ */ k(t) ? /* @__PURE__ */ L(t, {
122
122
  ...Ne(a, t.props),
123
- ref: n ? ke(n, t.ref) : t.ref
123
+ ref: n ? Pe(n, t.ref) : t.ref
124
124
  }) : y.count(t) > 1 ? y.only(null) : null;
125
125
  });
126
- W.displayName = "SlotClone";
127
- const Pe = ({ children: e }) => /* @__PURE__ */ _(K, null, e);
128
- function Ce(e) {
129
- return /* @__PURE__ */ P(e) && e.type === Pe;
126
+ F.displayName = "SlotClone";
127
+ const ke = ({ children: e }) => /* @__PURE__ */ _(K, null, e);
128
+ function Ae(e) {
129
+ return /* @__PURE__ */ k(e) && e.type === ke;
130
130
  }
131
131
  function Ne(e, n) {
132
132
  const t = {
@@ -166,7 +166,7 @@ const De = [
166
166
  "span",
167
167
  "svg",
168
168
  "ul"
169
- ], Oe = De.reduce((e, n) => {
169
+ ], Ce = De.reduce((e, n) => {
170
170
  const t = /* @__PURE__ */ w((a, c) => {
171
171
  const { asChild: r, ...o } = a, u = r ? te : n;
172
172
  return D(() => {
@@ -179,14 +179,14 @@ const De = [
179
179
  ...e,
180
180
  [n]: t
181
181
  };
182
- }, {}), Ee = /* @__PURE__ */ w((e, n) => /* @__PURE__ */ _(Oe.label, E({}, e, {
182
+ }, {}), Ee = /* @__PURE__ */ w((e, n) => /* @__PURE__ */ _(Ce.label, E({}, e, {
183
183
  ref: n,
184
184
  onMouseDown: (t) => {
185
185
  var a;
186
186
  (a = e.onMouseDown) === null || a === void 0 || a.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault();
187
187
  }
188
- }))), Ae = Ee;
189
- function je(e) {
188
+ }))), Oe = Ee;
189
+ function Re(e) {
190
190
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
191
191
  }
192
192
  var ne = { exports: {} };
@@ -226,11 +226,11 @@ var ne = { exports: {} };
226
226
  })();
227
227
  })(ne);
228
228
  var Me = ne.exports;
229
- const Xe = /* @__PURE__ */ je(Me), T = {
229
+ const je = /* @__PURE__ */ Re(Me), z = {
230
230
  "purpur-label": "_purpur-label_12cfi_1",
231
231
  "purpur-label--negative": "_purpur-label--negative_12cfi_9",
232
232
  "purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
233
- }, q = "purpur-label", He = ({
233
+ }, I = "purpur-label", He = ({
234
234
  children: e,
235
235
  className: n,
236
236
  htmlFor: t,
@@ -239,17 +239,17 @@ const Xe = /* @__PURE__ */ je(Me), T = {
239
239
  negative: r = !1,
240
240
  ...o
241
241
  }) => {
242
- const u = Xe([
242
+ const u = je([
243
243
  n,
244
- T[q],
244
+ z[I],
245
245
  {
246
- [T[`${q}--disabled`]]: c,
247
- [T[`${q}--negative`]]: r
246
+ [z[`${I}--disabled`]]: c,
247
+ [z[`${I}--negative`]]: r
248
248
  }
249
249
  ]);
250
- return /* @__PURE__ */ x(Ae, { className: u, "data-testid": a, htmlFor: t, ...o, children: e });
250
+ return /* @__PURE__ */ x(Oe, { className: u, "data-testid": a, htmlFor: t, ...o, children: e });
251
251
  };
252
- function Re(e) {
252
+ function Le(e) {
253
253
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
254
254
  }
255
255
  var oe = { exports: {} };
@@ -288,8 +288,8 @@ var oe = { exports: {} };
288
288
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
289
289
  })();
290
290
  })(oe);
291
- var Be = oe.exports;
292
- const Le = /* @__PURE__ */ Re(Be), M = {
291
+ var Xe = oe.exports;
292
+ const Be = /* @__PURE__ */ Le(Xe), M = {
293
293
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
294
294
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
295
295
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -304,26 +304,35 @@ const Le = /* @__PURE__ */ Re(Be), M = {
304
304
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
305
305
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
306
306
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
307
- }, ze = {
308
- PARAGRAPH100: "paragraph-100"
309
- }, X = "purpur-paragraph", ae = ({
307
+ }, Te = {
308
+ PARAGRAPH100: "paragraph-100",
309
+ PARAGRAPH100MEDIUM: "paragraph-100-medium",
310
+ PARAGRAPH100BOLD: "paragraph-100-bold",
311
+ PARAGRAPH200: "paragraph-200",
312
+ PREAMBLE100: "preamble-100",
313
+ PREAMBLE200: "preamble-200",
314
+ ADDITIONAL100: "additional-100",
315
+ ADDITIONAL100MEDIUM: "additional-100-medium",
316
+ OVERLINE100: "overline-100",
317
+ OVERLINE200: "overline-200"
318
+ }, j = "purpur-paragraph", ae = ({
310
319
  ["data-testid"]: e,
311
320
  children: n,
312
321
  className: t,
313
322
  disabled: a,
314
323
  enableHyphenation: c = !1,
315
324
  negative: r = !1,
316
- variant: o = ze.PARAGRAPH100,
325
+ variant: o = Te.PARAGRAPH100,
317
326
  ...u
318
327
  }) => {
319
- const i = Le([
328
+ const i = Be([
320
329
  t,
321
- M[X],
322
- M[`${X}--${o}`],
330
+ M[j],
331
+ M[`${j}--${o}`],
323
332
  {
324
- [M[`${X}--hyphens`]]: c,
325
- [M[`${X}--disabled`]]: a,
326
- [M[`${X}--negative`]]: r
333
+ [M[`${j}--hyphens`]]: c,
334
+ [M[`${j}--disabled`]]: a,
335
+ [M[`${j}--negative`]]: r
327
336
  }
328
337
  ]);
329
338
  return /* @__PURE__ */ x("p", { ...u, className: i, "data-testid": e, children: n });
@@ -338,26 +347,26 @@ function N() {
338
347
  return e;
339
348
  }, N.apply(null, arguments);
340
349
  }
341
- function Te(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
350
+ function ze(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
342
351
  return function(c) {
343
352
  if (e == null || e(c), t === !1 || !c.defaultPrevented) return n == null ? void 0 : n(c);
344
353
  };
345
354
  }
346
- function qe(e, n) {
355
+ function Ie(e, n) {
347
356
  typeof e == "function" ? e(n) : e != null && (e.current = n);
348
357
  }
349
358
  function ce(...e) {
350
359
  return (n) => e.forEach(
351
- (t) => qe(t, n)
360
+ (t) => Ie(t, n)
352
361
  );
353
362
  }
354
- function Fe(...e) {
355
- return B(ce(...e), e);
363
+ function qe(...e) {
364
+ return X(ce(...e), e);
356
365
  }
357
- function We(e, n = []) {
366
+ function Fe(e, n = []) {
358
367
  let t = [];
359
368
  function a(r, o) {
360
- const u = /* @__PURE__ */ G(o), i = t.length;
369
+ const u = /* @__PURE__ */ Z(o), i = t.length;
361
370
  t = [
362
371
  ...t,
363
372
  o
@@ -383,7 +392,7 @@ function We(e, n = []) {
383
392
  ];
384
393
  }
385
394
  const c = () => {
386
- const r = t.map((o) => /* @__PURE__ */ G(o));
395
+ const r = t.map((o) => /* @__PURE__ */ Z(o));
387
396
  return function(u) {
388
397
  const i = (u == null ? void 0 : u[e]) || r;
389
398
  return H(
@@ -402,10 +411,10 @@ function We(e, n = []) {
402
411
  };
403
412
  return c.scopeName = e, [
404
413
  a,
405
- Ie(c, ...n)
414
+ Ue(c, ...n)
406
415
  ];
407
416
  }
408
- function Ie(...e) {
417
+ function Ue(...e) {
409
418
  const n = e[0];
410
419
  if (e.length === 1) return n;
411
420
  const t = () => {
@@ -436,7 +445,7 @@ function Ie(...e) {
436
445
  return t.scopeName = n.scopeName, t;
437
446
  }
438
447
  function ue(e) {
439
- const n = O(e);
448
+ const n = C(e);
440
449
  return D(() => {
441
450
  n.current = e;
442
451
  }), H(
@@ -447,12 +456,12 @@ function ue(e) {
447
456
  []
448
457
  );
449
458
  }
450
- function Ue({ prop: e, defaultProp: n, onChange: t = () => {
459
+ function Ve({ prop: e, defaultProp: n, onChange: t = () => {
451
460
  } }) {
452
- const [a, c] = Ve({
461
+ const [a, c] = We({
453
462
  defaultProp: n,
454
463
  onChange: t
455
- }), r = e !== void 0, o = r ? e : a, u = ue(t), i = B((s) => {
464
+ }), r = e !== void 0, o = r ? e : a, u = ue(t), i = X((s) => {
456
465
  if (r) {
457
466
  const l = typeof s == "function" ? s(e) : s;
458
467
  l !== e && u(l);
@@ -468,8 +477,8 @@ function Ue({ prop: e, defaultProp: n, onChange: t = () => {
468
477
  i
469
478
  ];
470
479
  }
471
- function Ve({ defaultProp: e, onChange: n }) {
472
- const t = $(e), [a] = t, c = O(a), r = ue(n);
480
+ function We({ defaultProp: e, onChange: n }) {
481
+ const t = $(e), [a] = t, c = C(a), r = ue(n);
473
482
  return D(() => {
474
483
  c.current !== a && (r(a), c.current = a);
475
484
  }, [
@@ -478,8 +487,8 @@ function Ve({ defaultProp: e, onChange: n }) {
478
487
  r
479
488
  ]), t;
480
489
  }
481
- function Ze(e) {
482
- const n = O({
490
+ function Ge(e) {
491
+ const n = C({
483
492
  value: e,
484
493
  previous: e
485
494
  });
@@ -487,11 +496,11 @@ function Ze(e) {
487
496
  e
488
497
  ]);
489
498
  }
490
- const Ge = globalThis != null && globalThis.document ? Q : () => {
499
+ const Ze = globalThis != null && globalThis.document ? Q : () => {
491
500
  };
492
501
  function Je(e) {
493
502
  const [n, t] = $(void 0);
494
- return Ge(() => {
503
+ return Ze(() => {
495
504
  if (e) {
496
505
  t({
497
506
  width: e.offsetWidth,
@@ -523,27 +532,27 @@ function Je(e) {
523
532
  const ie = /* @__PURE__ */ w((e, n) => {
524
533
  const { children: t, ...a } = e, c = y.toArray(t), r = c.find(Ke);
525
534
  if (r) {
526
- const o = r.props.children, u = c.map((i) => i === r ? y.count(o) > 1 ? y.only(null) : /* @__PURE__ */ P(o) ? o.props.children : null : i);
527
- return /* @__PURE__ */ _(I, N({}, a, {
535
+ const o = r.props.children, u = c.map((i) => i === r ? y.count(o) > 1 ? y.only(null) : /* @__PURE__ */ k(o) ? o.props.children : null : i);
536
+ return /* @__PURE__ */ _(U, N({}, a, {
528
537
  ref: n
529
- }), /* @__PURE__ */ P(o) ? /* @__PURE__ */ R(o, void 0, u) : null);
538
+ }), /* @__PURE__ */ k(o) ? /* @__PURE__ */ L(o, void 0, u) : null);
530
539
  }
531
- return /* @__PURE__ */ _(I, N({}, a, {
540
+ return /* @__PURE__ */ _(U, N({}, a, {
532
541
  ref: n
533
542
  }), t);
534
543
  });
535
544
  ie.displayName = "Slot";
536
- const I = /* @__PURE__ */ w((e, n) => {
545
+ const U = /* @__PURE__ */ w((e, n) => {
537
546
  const { children: t, ...a } = e;
538
- return /* @__PURE__ */ P(t) ? /* @__PURE__ */ R(t, {
547
+ return /* @__PURE__ */ k(t) ? /* @__PURE__ */ L(t, {
539
548
  ...Qe(a, t.props),
540
549
  ref: n ? ce(n, t.ref) : t.ref
541
550
  }) : y.count(t) > 1 ? y.only(null) : null;
542
551
  });
543
- I.displayName = "SlotClone";
552
+ U.displayName = "SlotClone";
544
553
  const Ye = ({ children: e }) => /* @__PURE__ */ _(K, null, e);
545
554
  function Ke(e) {
546
- return /* @__PURE__ */ P(e) && e.type === Ye;
555
+ return /* @__PURE__ */ k(e) && e.type === Ye;
547
556
  }
548
557
  function Qe(e, n) {
549
558
  const t = {
@@ -596,11 +605,11 @@ const er = [
596
605
  ...e,
597
606
  [n]: t
598
607
  };
599
- }, {}), le = "Switch", [rr, mr] = We(le), [tr, nr] = rr(le), or = /* @__PURE__ */ w((e, n) => {
600
- const { __scopeSwitch: t, name: a, checked: c, defaultChecked: r, required: o, disabled: u, value: i = "on", onCheckedChange: s, ...h } = e, [l, p] = $(null), v = Fe(
608
+ }, {}), le = "Switch", [rr, mr] = Fe(le), [tr, nr] = rr(le), or = /* @__PURE__ */ w((e, n) => {
609
+ const { __scopeSwitch: t, name: a, checked: c, defaultChecked: r, required: o, disabled: u, value: i = "on", onCheckedChange: s, ...h } = e, [l, p] = $(null), v = qe(
601
610
  n,
602
611
  (m) => p(m)
603
- ), f = O(!1), g = l ? !!l.closest("form") : !0, [d = !1, b] = Ue({
612
+ ), f = C(!1), g = l ? !!l.closest("form") : !0, [d = !1, b] = Ve({
604
613
  prop: c,
605
614
  defaultProp: r,
606
615
  onChange: s
@@ -620,9 +629,9 @@ const er = [
620
629
  value: i
621
630
  }, h, {
622
631
  ref: v,
623
- onClick: Te(e.onClick, (m) => {
632
+ onClick: ze(e.onClick, (m) => {
624
633
  b(
625
- (C) => !C
634
+ (A) => !A
626
635
  ), g && (f.current = m.isPropagationStopped(), f.current || m.stopPropagation());
627
636
  })
628
637
  })), g && /* @__PURE__ */ _(ur, {
@@ -646,7 +655,7 @@ const er = [
646
655
  ref: n
647
656
  }));
648
657
  }), ur = (e) => {
649
- const { control: n, checked: t, bubbles: a = !0, ...c } = e, r = O(null), o = Ze(t), u = Je(n);
658
+ const { control: n, checked: t, bubbles: a = !0, ...c } = e, r = C(null), o = Ge(t), u = Je(n);
650
659
  return D(() => {
651
660
  const i = r.current, s = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(s, "checked").set;
652
661
  if (o !== t && l) {
@@ -720,7 +729,7 @@ var de = { exports: {} };
720
729
  })();
721
730
  })(de);
722
731
  var pr = de.exports;
723
- const F = /* @__PURE__ */ lr(pr), S = {
732
+ const q = /* @__PURE__ */ lr(pr), S = {
724
733
  "purpur-toggle": "_purpur-toggle_1xng6_1",
725
734
  "purpur-toggle__track": "_purpur-toggle__track_1xng6_7",
726
735
  "purpur-toggle__checkmark-container": "_purpur-toggle__checkmark-container_1xng6_45",
@@ -746,38 +755,38 @@ const F = /* @__PURE__ */ lr(pr), S = {
746
755
  const m = Y(b.nativeEvent) ? b.nativeEvent.touches[0].clientX : b.nativeEvent.clientX;
747
756
  l(m), t == null || t();
748
757
  }
749
- }, g = B(
758
+ }, g = X(
750
759
  (b) => {
751
760
  if (typeof h != "number")
752
761
  return;
753
- const C = (Y(b) ? b.touches[0].clientX : b.clientX) - h;
754
- if (!C)
762
+ const A = (Y(b) ? b.touches[0].clientX : b.clientX) - h;
763
+ if (!A)
755
764
  return;
756
- const A = o + C;
757
- !p && Math.abs(A) && v(!0);
758
- const L = A > r.right ? r.right : A < r.left ? r.left : A;
759
- s(L), a == null || a({ x: L });
765
+ const O = o + A;
766
+ !p && Math.abs(O) && v(!0);
767
+ const B = O > r.right ? r.right : O < r.left ? r.left : O;
768
+ s(B), a == null || a({ x: B });
760
769
  },
761
770
  [a, s, p, h]
762
- ), d = B(() => {
771
+ ), d = X(() => {
763
772
  l(void 0), s(void 0), v(!1), c == null || c();
764
773
  }, [c, l]);
765
774
  return D(() => (window.addEventListener("mousemove", g), window.addEventListener("touchmove", g), () => {
766
775
  window.removeEventListener("mousemove", g), window.removeEventListener("touchmove", g);
767
776
  }), [g]), D(() => (window.addEventListener("mouseup", d), window.addEventListener("touchend", d), () => {
768
777
  window.removeEventListener("mouseup", d), window.removeEventListener("touchend", d);
769
- }), [d]), P(e) ? R(y.only(e), {
778
+ }), [d]), k(e) ? L(y.only(e), {
770
779
  onMouseDown: f,
771
780
  onTouchStart: f,
772
781
  style: { ...u, transform: `translateX(${p ? i : o}px)` }
773
782
  }) : null;
774
783
  }, fr = ({ checked: e, onChange: n }) => {
775
- var U, V;
776
- const t = O(null), a = O(null), [c, r] = $(void 0), [o, u] = $(!1), [i, s] = $(0), [h, l] = $(0), [p, v] = $(0);
784
+ var V, W;
785
+ const t = C(null), a = C(null), [c, r] = $(void 0), [o, u] = $(!1), [i, s] = $(0), [h, l] = $(0), [p, v] = $(0);
777
786
  Q(() => {
778
- var j, z;
779
- l(((j = a.current) == null ? void 0 : j.clientHeight) || 0), v(((z = t.current) == null ? void 0 : z.clientHeight) || 0);
780
- }, [(U = a.current) == null ? void 0 : U.clientHeight, (V = t.current) == null ? void 0 : V.clientHeight]);
787
+ var R, T;
788
+ l(((R = a.current) == null ? void 0 : R.clientHeight) || 0), v(((T = t.current) == null ? void 0 : T.clientHeight) || 0);
789
+ }, [(V = a.current) == null ? void 0 : V.clientHeight, (W = t.current) == null ? void 0 : W.clientHeight]);
781
790
  const f = (p || 0) - h, g = h + f, d = f / 2, b = g / 2, m = typeof c == "number" && (e ? c < b : c > b);
782
791
  return {
783
792
  trackRef: t,
@@ -785,8 +794,8 @@ const F = /* @__PURE__ */ lr(pr), S = {
785
794
  isDragging: o,
786
795
  bounds: { left: d, right: g },
787
796
  position: e ? g : d,
788
- onDrag: ({ x: j }) => {
789
- r(j), Math.abs((e ? g : d) - j) > 2 && u(!0);
797
+ onDrag: ({ x: R }) => {
798
+ r(R), Math.abs((e ? g : d) - R) > 2 && u(!0);
790
799
  },
791
800
  onStop: () => {
792
801
  u(!1), o && s(Date.now()), m && (n == null || n(!e));
@@ -795,7 +804,7 @@ const F = /* @__PURE__ */ lr(pr), S = {
795
804
  Date.now() - i > 50 && (n == null || n(!e)), r(void 0);
796
805
  }
797
806
  };
798
- }, k = "purpur-toggle", gr = ({
807
+ }, P = "purpur-toggle", gr = ({
799
808
  ["data-testid"]: e,
800
809
  className: n,
801
810
  label: t,
@@ -810,8 +819,8 @@ const F = /* @__PURE__ */ lr(pr), S = {
810
819
  typeof r == "boolean" ? r : !!u
811
820
  ), p = !!(typeof r == "boolean" ? r : h), { thumbRef: v, trackRef: f, isDragging: g, onChangeWithDrag: d, ...b } = fr({
812
821
  checked: p,
813
- onChange: (C) => {
814
- i.disabled || (a == null || a(C), l(C));
822
+ onChange: (A) => {
823
+ i.disabled || (a == null || a(A), l(A));
815
824
  }
816
825
  }), m = () => /* @__PURE__ */ x(
817
826
  He,
@@ -819,14 +828,14 @@ const F = /* @__PURE__ */ lr(pr), S = {
819
828
  htmlFor: i.id,
820
829
  "data-testid": e && `${e}-label`,
821
830
  disabled: i.disabled,
822
- className: F(
823
- S[`${k}__label`],
824
- S[`${k}__label--${c}`]
831
+ className: q(
832
+ S[`${P}__label`],
833
+ S[`${P}__label--${c}`]
825
834
  ),
826
835
  children: /* @__PURE__ */ x(ae, { variant: "paragraph-100", disabled: i.disabled, children: t })
827
836
  }
828
837
  );
829
- return /* @__PURE__ */ Z("div", { className: F([n, S[`${k}__container`]]), children: [
838
+ return /* @__PURE__ */ G("div", { className: q([n, S[`${P}__container`]]), children: [
830
839
  t && c === "left" && m(),
831
840
  /* @__PURE__ */ x(
832
841
  ir,
@@ -835,14 +844,14 @@ const F = /* @__PURE__ */ lr(pr), S = {
835
844
  ref: s,
836
845
  id: i.id,
837
846
  "data-testid": e,
838
- className: S[k],
847
+ className: S[P],
839
848
  onCheckedChange: d,
840
849
  checked: p,
841
- children: /* @__PURE__ */ Z("span", { ref: f, className: S[`${k}__track`], children: [
842
- /* @__PURE__ */ x("span", { className: S[`${k}__checkmark-container`], children: /* @__PURE__ */ x(
850
+ children: /* @__PURE__ */ G("span", { ref: f, className: S[`${P}__track`], children: [
851
+ /* @__PURE__ */ x("span", { className: S[`${P}__checkmark-container`], children: /* @__PURE__ */ x(
843
852
  re,
844
853
  {
845
- className: S[`${k}__checkmark`],
854
+ className: S[`${P}__checkmark`],
846
855
  svg: ve,
847
856
  size: "xxs"
848
857
  }
@@ -852,10 +861,10 @@ const F = /* @__PURE__ */ lr(pr), S = {
852
861
  {
853
862
  ref: v,
854
863
  "data-testid": e && `${e}-thumb`,
855
- className: F([
856
- S[`${k}__thumb`],
864
+ className: q([
865
+ S[`${P}__thumb`],
857
866
  {
858
- [S[`${k}__thumb--dragging`]]: g
867
+ [S[`${P}__thumb--dragging`]]: g
859
868
  }
860
869
  ])
861
870
  }