@purpurds/radio-card-group 6.6.0 → 6.6.2

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.
@@ -73,7 +73,7 @@ const Xe = /* @__PURE__ */ We(Ye), M = {
73
73
  variant: i = Ze.TITLE100,
74
74
  ...u
75
75
  }) => {
76
- const p = r, c = Xe([
76
+ const c = r, p = Xe([
77
77
  n,
78
78
  M[F],
79
79
  M[`${F}--${i}`],
@@ -82,7 +82,7 @@ const Xe = /* @__PURE__ */ We(Ye), M = {
82
82
  [M[`${F}--negative`]]: a
83
83
  }
84
84
  ]);
85
- return /* @__PURE__ */ f(p, { ...u, className: c, "data-testid": e, children: t });
85
+ return /* @__PURE__ */ f(c, { ...u, className: p, "data-testid": e, children: t });
86
86
  };
87
87
  ge.displayName = "Heading";
88
88
  function N(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
@@ -118,30 +118,30 @@ function P(...e) {
118
118
  function j(e, t = []) {
119
119
  let n = [];
120
120
  function o(r, i) {
121
- const u = s.createContext(i), p = n.length;
121
+ const u = s.createContext(i), c = n.length;
122
122
  n = [...n, i];
123
- const c = (l) => {
123
+ const p = (m) => {
124
124
  var y;
125
- const { scope: m, children: _, ...d } = l, g = ((y = m == null ? void 0 : m[e]) == null ? void 0 : y[p]) || u, v = s.useMemo(() => d, Object.values(d));
126
- return /* @__PURE__ */ f(g.Provider, { value: v, children: _ });
125
+ const { scope: _, children: d, ...l } = m, h = ((y = _ == null ? void 0 : _[e]) == null ? void 0 : y[c]) || u, v = s.useMemo(() => l, Object.values(l));
126
+ return /* @__PURE__ */ f(h.Provider, { value: v, children: d });
127
127
  };
128
- c.displayName = r + "Provider";
129
- function h(l, m) {
130
- var g;
131
- const _ = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[p]) || u, d = s.useContext(_);
132
- if (d) return d;
128
+ p.displayName = r + "Provider";
129
+ function g(m, _) {
130
+ var h;
131
+ const d = ((h = _ == null ? void 0 : _[e]) == null ? void 0 : h[c]) || u, l = s.useContext(d);
132
+ if (l) return l;
133
133
  if (i !== void 0) return i;
134
- throw new Error(`\`${l}\` must be used within \`${r}\``);
134
+ throw new Error(`\`${m}\` must be used within \`${r}\``);
135
135
  }
136
- return [c, h];
136
+ return [p, g];
137
137
  }
138
138
  const a = () => {
139
139
  const r = n.map((i) => s.createContext(i));
140
140
  return function(u) {
141
- const p = (u == null ? void 0 : u[e]) || r;
141
+ const c = (u == null ? void 0 : u[e]) || r;
142
142
  return s.useMemo(
143
- () => ({ [`__scope${e}`]: { ...u, [e]: p } }),
144
- [u, p]
143
+ () => ({ [`__scope${e}`]: { ...u, [e]: c } }),
144
+ [u, c]
145
145
  );
146
146
  };
147
147
  };
@@ -156,9 +156,9 @@ function Je(...e) {
156
156
  scopeName: a.scopeName
157
157
  }));
158
158
  return function(r) {
159
- const i = o.reduce((u, { useScope: p, scopeName: c }) => {
160
- const l = p(r)[`__scope${c}`];
161
- return { ...u, ...l };
159
+ const i = o.reduce((u, { useScope: c, scopeName: p }) => {
160
+ const m = c(r)[`__scope${p}`];
161
+ return { ...u, ...m };
162
162
  }, {});
163
163
  return s.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
164
164
  };
@@ -168,7 +168,7 @@ function Je(...e) {
168
168
  var q = s.forwardRef((e, t) => {
169
169
  const { children: n, ...o } = e, a = s.Children.toArray(n), r = a.find(er);
170
170
  if (r) {
171
- const i = r.props.children, u = a.map((p) => p === r ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : p);
171
+ const i = r.props.children, u = a.map((c) => c === r ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : c);
172
172
  return /* @__PURE__ */ f(X, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
173
173
  }
174
174
  return /* @__PURE__ */ f(X, { ...o, ref: t, children: n });
@@ -230,39 +230,39 @@ function or(e) {
230
230
  const t = e + "CollectionProvider", [n, o] = j(t), [a, r] = n(
231
231
  t,
232
232
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
233
- ), i = (_) => {
234
- const { scope: d, children: g } = _, v = A.useRef(null), y = A.useRef(/* @__PURE__ */ new Map()).current;
235
- return /* @__PURE__ */ f(a, { scope: d, itemMap: y, collectionRef: v, children: g });
233
+ ), i = (d) => {
234
+ const { scope: l, children: h } = d, v = A.useRef(null), y = A.useRef(/* @__PURE__ */ new Map()).current;
235
+ return /* @__PURE__ */ f(a, { scope: l, itemMap: y, collectionRef: v, children: h });
236
236
  };
237
237
  i.displayName = t;
238
- const u = e + "CollectionSlot", p = A.forwardRef(
239
- (_, d) => {
240
- const { scope: g, children: v } = _, y = r(u, g), b = P(d, y.collectionRef);
238
+ const u = e + "CollectionSlot", c = A.forwardRef(
239
+ (d, l) => {
240
+ const { scope: h, children: v } = d, y = r(u, h), b = P(l, y.collectionRef);
241
241
  return /* @__PURE__ */ f(q, { ref: b, children: v });
242
242
  }
243
243
  );
244
- p.displayName = u;
245
- const c = e + "CollectionItemSlot", h = "data-radix-collection-item", l = A.forwardRef(
246
- (_, d) => {
247
- const { scope: g, children: v, ...y } = _, b = A.useRef(null), E = P(d, b), O = r(c, g);
248
- return A.useEffect(() => (O.itemMap.set(b, { ref: b, ...y }), () => void O.itemMap.delete(b))), /* @__PURE__ */ f(q, { [h]: "", ref: E, children: v });
244
+ c.displayName = u;
245
+ const p = e + "CollectionItemSlot", g = "data-radix-collection-item", m = A.forwardRef(
246
+ (d, l) => {
247
+ const { scope: h, children: v, ...y } = d, b = A.useRef(null), E = P(l, b), O = r(p, h);
248
+ return A.useEffect(() => (O.itemMap.set(b, { ref: b, ...y }), () => void O.itemMap.delete(b))), /* @__PURE__ */ f(q, { [g]: "", ref: E, children: v });
249
249
  }
250
250
  );
251
- l.displayName = c;
252
- function m(_) {
253
- const d = r(e + "CollectionConsumer", _);
251
+ m.displayName = p;
252
+ function _(d) {
253
+ const l = r(e + "CollectionConsumer", d);
254
254
  return A.useCallback(() => {
255
- const v = d.collectionRef.current;
255
+ const v = l.collectionRef.current;
256
256
  if (!v) return [];
257
- const y = Array.from(v.querySelectorAll(`[${h}]`));
258
- return Array.from(d.itemMap.values()).sort(
257
+ const y = Array.from(v.querySelectorAll(`[${g}]`));
258
+ return Array.from(l.itemMap.values()).sort(
259
259
  (O, x) => y.indexOf(O.ref.current) - y.indexOf(x.ref.current)
260
260
  );
261
- }, [d.collectionRef, d.itemMap]);
261
+ }, [l.collectionRef, l.itemMap]);
262
262
  }
263
263
  return [
264
- { Provider: i, Slot: p, ItemSlot: l },
265
- m,
264
+ { Provider: i, Slot: c, ItemSlot: m },
265
+ _,
266
266
  o
267
267
  ];
268
268
  }
@@ -290,17 +290,17 @@ function ve({
290
290
  onChange: n = () => {
291
291
  }
292
292
  }) {
293
- const [o, a] = sr({ defaultProp: t, onChange: n }), r = e !== void 0, i = r ? e : o, u = Q(n), p = s.useCallback(
294
- (c) => {
293
+ const [o, a] = sr({ defaultProp: t, onChange: n }), r = e !== void 0, i = r ? e : o, u = Q(n), c = s.useCallback(
294
+ (p) => {
295
295
  if (r) {
296
- const l = typeof c == "function" ? c(e) : c;
297
- l !== e && u(l);
296
+ const m = typeof p == "function" ? p(e) : p;
297
+ m !== e && u(m);
298
298
  } else
299
- a(c);
299
+ a(p);
300
300
  },
301
301
  [r, e, a, u]
302
302
  );
303
- return [i, p];
303
+ return [i, c];
304
304
  }
305
305
  function sr({
306
306
  defaultProp: e,
@@ -331,17 +331,17 @@ var _r = s.forwardRef((e, t) => {
331
331
  dir: r,
332
332
  currentTabStopId: i,
333
333
  defaultCurrentTabStopId: u,
334
- onCurrentTabStopIdChange: p,
335
- onEntryFocus: c,
336
- preventScrollOnEntryFocus: h = !1,
337
- ...l
338
- } = e, m = s.useRef(null), _ = P(t, m), d = ye(r), [g = null, v] = ve({
334
+ onCurrentTabStopIdChange: c,
335
+ onEntryFocus: p,
336
+ preventScrollOnEntryFocus: g = !1,
337
+ ...m
338
+ } = e, _ = s.useRef(null), d = P(t, _), l = ye(r), [h = null, v] = ve({
339
339
  prop: i,
340
340
  defaultProp: u,
341
- onChange: p
342
- }), [y, b] = s.useState(!1), E = Q(c), O = be(n), x = s.useRef(!1), [Le, ne] = s.useState(0);
341
+ onChange: c
342
+ }), [y, b] = s.useState(!1), E = Q(p), O = be(n), x = s.useRef(!1), [Le, ne] = s.useState(0);
343
343
  return s.useEffect(() => {
344
- const R = m.current;
344
+ const R = _.current;
345
345
  if (R)
346
346
  return R.addEventListener(K, E), () => R.removeEventListener(K, E);
347
347
  }, [E]), /* @__PURE__ */ f(
@@ -349,9 +349,9 @@ var _r = s.forwardRef((e, t) => {
349
349
  {
350
350
  scope: n,
351
351
  orientation: o,
352
- dir: d,
352
+ dir: l,
353
353
  loop: a,
354
- currentTabStopId: g,
354
+ currentTabStopId: h,
355
355
  onItemFocus: s.useCallback(
356
356
  (R) => v(R),
357
357
  [v]
@@ -370,8 +370,8 @@ var _r = s.forwardRef((e, t) => {
370
370
  {
371
371
  tabIndex: y || Le === 0 ? -1 : 0,
372
372
  "data-orientation": o,
373
- ...l,
374
- ref: _,
373
+ ...m,
374
+ ref: d,
375
375
  style: { outline: "none", ...e.style },
376
376
  onMouseDown: N(e.onMouseDown, () => {
377
377
  x.current = !0;
@@ -381,10 +381,10 @@ var _r = s.forwardRef((e, t) => {
381
381
  if (R.target === R.currentTarget && qe && !y) {
382
382
  const oe = new CustomEvent(K, pr);
383
383
  if (R.currentTarget.dispatchEvent(oe), !oe.defaultPrevented) {
384
- const V = O().filter((w) => w.focusable), Ue = V.find((w) => w.active), je = V.find((w) => w.id === g), ze = [Ue, je, ...V].filter(
384
+ const V = O().filter((w) => w.focusable), Ue = V.find((w) => w.active), je = V.find((w) => w.id === h), ze = [Ue, je, ...V].filter(
385
385
  Boolean
386
386
  ).map((w) => w.ref.current);
387
- Ie(ze, h);
387
+ Ie(ze, g);
388
388
  }
389
389
  }
390
390
  x.current = !1;
@@ -402,44 +402,44 @@ var _r = s.forwardRef((e, t) => {
402
402
  active: a = !1,
403
403
  tabStopId: r,
404
404
  ...i
405
- } = e, u = ur(), p = r || u, c = mr(Se, n), h = c.currentTabStopId === p, l = be(n), { onFocusableItemAdd: m, onFocusableItemRemove: _ } = c;
405
+ } = e, u = ur(), c = r || u, p = mr(Se, n), g = p.currentTabStopId === c, m = be(n), { onFocusableItemAdd: _, onFocusableItemRemove: d } = p;
406
406
  return s.useEffect(() => {
407
407
  if (o)
408
- return m(), () => _();
409
- }, [o, m, _]), /* @__PURE__ */ f(
408
+ return _(), () => d();
409
+ }, [o, _, d]), /* @__PURE__ */ f(
410
410
  Z.ItemSlot,
411
411
  {
412
412
  scope: n,
413
- id: p,
413
+ id: c,
414
414
  focusable: o,
415
415
  active: a,
416
416
  children: /* @__PURE__ */ f(
417
417
  $.span,
418
418
  {
419
- tabIndex: h ? 0 : -1,
420
- "data-orientation": c.orientation,
419
+ tabIndex: g ? 0 : -1,
420
+ "data-orientation": p.orientation,
421
421
  ...i,
422
422
  ref: t,
423
- onMouseDown: N(e.onMouseDown, (d) => {
424
- o ? c.onItemFocus(p) : d.preventDefault();
423
+ onMouseDown: N(e.onMouseDown, (l) => {
424
+ o ? p.onItemFocus(c) : l.preventDefault();
425
425
  }),
426
- onFocus: N(e.onFocus, () => c.onItemFocus(p)),
427
- onKeyDown: N(e.onKeyDown, (d) => {
428
- if (d.key === "Tab" && d.shiftKey) {
429
- c.onItemShiftTab();
426
+ onFocus: N(e.onFocus, () => p.onItemFocus(c)),
427
+ onKeyDown: N(e.onKeyDown, (l) => {
428
+ if (l.key === "Tab" && l.shiftKey) {
429
+ p.onItemShiftTab();
430
430
  return;
431
431
  }
432
- if (d.target !== d.currentTarget) return;
433
- const g = vr(d, c.orientation, c.dir);
434
- if (g !== void 0) {
435
- if (d.metaKey || d.ctrlKey || d.altKey || d.shiftKey) return;
436
- d.preventDefault();
437
- let y = l().filter((b) => b.focusable).map((b) => b.ref.current);
438
- if (g === "last") y.reverse();
439
- else if (g === "prev" || g === "next") {
440
- g === "prev" && y.reverse();
441
- const b = y.indexOf(d.currentTarget);
442
- y = c.loop ? yr(y, b + 1) : y.slice(b + 1);
432
+ if (l.target !== l.currentTarget) return;
433
+ const h = vr(l, p.orientation, p.dir);
434
+ if (h !== void 0) {
435
+ if (l.metaKey || l.ctrlKey || l.altKey || l.shiftKey) return;
436
+ l.preventDefault();
437
+ let y = m().filter((b) => b.focusable).map((b) => b.ref.current);
438
+ if (h === "last") y.reverse();
439
+ else if (h === "prev" || h === "next") {
440
+ h === "prev" && y.reverse();
441
+ const b = y.indexOf(l.currentTarget);
442
+ y = p.loop ? yr(y, b + 1) : y.slice(b + 1);
443
443
  }
444
444
  setTimeout(() => Ie(y));
445
445
  }
@@ -489,8 +489,8 @@ function Cr(e) {
489
489
  const r = a[0];
490
490
  let i, u;
491
491
  if ("borderBoxSize" in r) {
492
- const p = r.borderBoxSize, c = Array.isArray(p) ? p[0] : p;
493
- i = c.inlineSize, u = c.blockSize;
492
+ const c = r.borderBoxSize, p = Array.isArray(c) ? c[0] : c;
493
+ i = p.inlineSize, u = p.blockSize;
494
494
  } else
495
495
  i = e.offsetWidth, u = e.offsetHeight;
496
496
  n({ width: i, height: u });
@@ -513,7 +513,7 @@ var we = (e) => {
513
513
  };
514
514
  we.displayName = "Presence";
515
515
  function Ir(e) {
516
- const [t, n] = s.useState(), o = s.useRef({}), a = s.useRef(e), r = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, p] = Nr(i, {
516
+ const [t, n] = s.useState(), o = s.useRef({}), a = s.useRef(e), r = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, c] = Nr(i, {
517
517
  mounted: {
518
518
  UNMOUNT: "unmounted",
519
519
  ANIMATION_OUT: "unmountSuspended"
@@ -527,37 +527,37 @@ function Ir(e) {
527
527
  }
528
528
  });
529
529
  return s.useEffect(() => {
530
- const c = D(o.current);
531
- r.current = u === "mounted" ? c : "none";
530
+ const p = D(o.current);
531
+ r.current = u === "mounted" ? p : "none";
532
532
  }, [u]), U(() => {
533
- const c = o.current, h = a.current;
534
- if (h !== e) {
535
- const m = r.current, _ = D(c);
536
- e ? p("MOUNT") : _ === "none" || (c == null ? void 0 : c.display) === "none" ? p("UNMOUNT") : p(h && m !== _ ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
533
+ const p = o.current, g = a.current;
534
+ if (g !== e) {
535
+ const _ = r.current, d = D(p);
536
+ e ? c("MOUNT") : d === "none" || (p == null ? void 0 : p.display) === "none" ? c("UNMOUNT") : c(g && _ !== d ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
537
537
  }
538
- }, [e, p]), U(() => {
538
+ }, [e, c]), U(() => {
539
539
  if (t) {
540
- let c;
541
- const h = t.ownerDocument.defaultView ?? window, l = (_) => {
542
- const g = D(o.current).includes(_.animationName);
543
- if (_.target === t && g && (p("ANIMATION_END"), !a.current)) {
540
+ let p;
541
+ const g = t.ownerDocument.defaultView ?? window, m = (d) => {
542
+ const h = D(o.current).includes(d.animationName);
543
+ if (d.target === t && h && (c("ANIMATION_END"), !a.current)) {
544
544
  const v = t.style.animationFillMode;
545
- t.style.animationFillMode = "forwards", c = h.setTimeout(() => {
545
+ t.style.animationFillMode = "forwards", p = g.setTimeout(() => {
546
546
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
547
547
  });
548
548
  }
549
- }, m = (_) => {
550
- _.target === t && (r.current = D(o.current));
549
+ }, _ = (d) => {
550
+ d.target === t && (r.current = D(o.current));
551
551
  };
552
- return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
553
- h.clearTimeout(c), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
552
+ return t.addEventListener("animationstart", _), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
553
+ g.clearTimeout(p), t.removeEventListener("animationstart", _), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
554
554
  };
555
555
  } else
556
- p("ANIMATION_END");
557
- }, [t, p]), {
556
+ c("ANIMATION_END");
557
+ }, [t, c]), {
558
558
  isPresent: ["mounted", "unmountSuspended"].includes(u),
559
- ref: s.useCallback((c) => {
560
- c && (o.current = getComputedStyle(c)), n(c);
559
+ ref: s.useCallback((p) => {
560
+ p && (o.current = getComputedStyle(p)), n(p);
561
561
  }, [])
562
562
  };
563
563
  }
@@ -578,10 +578,10 @@ var ee = "Radio", [Ar, Ae] = j(ee), [Er, Or] = Ar(ee), Ee = s.forwardRef(
578
578
  required: r,
579
579
  disabled: i,
580
580
  value: u = "on",
581
- onCheck: p,
582
- form: c,
583
- ...h
584
- } = e, [l, m] = s.useState(null), _ = P(t, (v) => m(v)), d = s.useRef(!1), g = l ? c || !!l.closest("form") : !0;
581
+ onCheck: c,
582
+ form: p,
583
+ ...g
584
+ } = e, [m, _] = s.useState(null), d = P(t, (v) => _(v)), l = s.useRef(!1), h = m ? p || !!m.closest("form") : !0;
585
585
  return /* @__PURE__ */ I(Er, { scope: n, checked: a, disabled: i, children: [
586
586
  /* @__PURE__ */ f(
587
587
  $.button,
@@ -593,24 +593,24 @@ var ee = "Radio", [Ar, Ae] = j(ee), [Er, Or] = Ar(ee), Ee = s.forwardRef(
593
593
  "data-disabled": i ? "" : void 0,
594
594
  disabled: i,
595
595
  value: u,
596
- ...h,
597
- ref: _,
596
+ ...g,
597
+ ref: d,
598
598
  onClick: N(e.onClick, (v) => {
599
- a || p == null || p(), g && (d.current = v.isPropagationStopped(), d.current || v.stopPropagation());
599
+ a || c == null || c(), h && (l.current = v.isPropagationStopped(), l.current || v.stopPropagation());
600
600
  })
601
601
  }
602
602
  ),
603
- g && /* @__PURE__ */ f(
603
+ h && /* @__PURE__ */ f(
604
604
  Pr,
605
605
  {
606
- control: l,
607
- bubbles: !d.current,
606
+ control: m,
607
+ bubbles: !l.current,
608
608
  name: o,
609
609
  value: u,
610
610
  checked: a,
611
611
  required: r,
612
612
  disabled: i,
613
- form: c,
613
+ form: p,
614
614
  style: { transform: "translateX(-100%)" }
615
615
  }
616
616
  )
@@ -636,10 +636,10 @@ Pe.displayName = Oe;
636
636
  var Pr = (e) => {
637
637
  const { control: t, checked: n, bubbles: o = !0, ...a } = e, r = s.useRef(null), i = Sr(n), u = Cr(t);
638
638
  return s.useEffect(() => {
639
- const p = r.current, c = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(c, "checked").set;
640
- if (i !== n && l) {
641
- const m = new Event("click", { bubbles: o });
642
- l.call(p, n), p.dispatchEvent(m);
639
+ const c = r.current, p = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(p, "checked").set;
640
+ if (i !== n && m) {
641
+ const _ = new Event("click", { bubbles: o });
642
+ m.call(c, n), c.dispatchEvent(_);
643
643
  }
644
644
  }, [i, n, o]), /* @__PURE__ */ f(
645
645
  "input",
@@ -676,15 +676,15 @@ var xr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], re = "RadioGroup",
676
676
  value: r,
677
677
  required: i = !1,
678
678
  disabled: u = !1,
679
- orientation: p,
680
- dir: c,
681
- loop: h = !0,
682
- onValueChange: l,
683
- ...m
684
- } = e, _ = ke(n), d = ye(c), [g, v] = ve({
679
+ orientation: c,
680
+ dir: p,
681
+ loop: g = !0,
682
+ onValueChange: m,
683
+ ..._
684
+ } = e, d = ke(n), l = ye(p), [h, v] = ve({
685
685
  prop: r,
686
686
  defaultProp: a,
687
- onChange: l
687
+ onChange: m
688
688
  });
689
689
  return /* @__PURE__ */ f(
690
690
  Tr,
@@ -693,25 +693,25 @@ var xr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], re = "RadioGroup",
693
693
  name: o,
694
694
  required: i,
695
695
  disabled: u,
696
- value: g,
696
+ value: h,
697
697
  onValueChange: v,
698
698
  children: /* @__PURE__ */ f(
699
699
  br,
700
700
  {
701
701
  asChild: !0,
702
- ..._,
703
- orientation: p,
704
- dir: d,
705
- loop: h,
702
+ ...d,
703
+ orientation: c,
704
+ dir: l,
705
+ loop: g,
706
706
  children: /* @__PURE__ */ f(
707
707
  $.div,
708
708
  {
709
709
  role: "radiogroup",
710
710
  "aria-required": i,
711
- "aria-orientation": p,
711
+ "aria-orientation": c,
712
712
  "data-disabled": u ? "" : void 0,
713
- dir: d,
714
- ...m,
713
+ dir: l,
714
+ ..._,
715
715
  ref: t
716
716
  }
717
717
  )
@@ -724,13 +724,13 @@ var xr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], re = "RadioGroup",
724
724
  $e.displayName = re;
725
725
  var Me = "RadioGroupItem", Fe = s.forwardRef(
726
726
  (e, t) => {
727
- const { __scopeRadioGroup: n, disabled: o, ...a } = e, r = $r(Me, n), i = r.disabled || o, u = ke(n), p = Te(n), c = s.useRef(null), h = P(t, c), l = r.value === a.value, m = s.useRef(!1);
727
+ const { __scopeRadioGroup: n, disabled: o, ...a } = e, r = $r(Me, n), i = r.disabled || o, u = ke(n), c = Te(n), p = s.useRef(null), g = P(t, p), m = r.value === a.value, _ = s.useRef(!1);
728
728
  return s.useEffect(() => {
729
- const _ = (g) => {
730
- xr.includes(g.key) && (m.current = !0);
731
- }, d = () => m.current = !1;
732
- return document.addEventListener("keydown", _), document.addEventListener("keyup", d), () => {
733
- document.removeEventListener("keydown", _), document.removeEventListener("keyup", d);
729
+ const d = (h) => {
730
+ xr.includes(h.key) && (_.current = !0);
731
+ }, l = () => _.current = !1;
732
+ return document.addEventListener("keydown", d), document.addEventListener("keyup", l), () => {
733
+ document.removeEventListener("keydown", d), document.removeEventListener("keyup", l);
734
734
  };
735
735
  }, []), /* @__PURE__ */ f(
736
736
  Rr,
@@ -738,24 +738,24 @@ var Me = "RadioGroupItem", Fe = s.forwardRef(
738
738
  asChild: !0,
739
739
  ...u,
740
740
  focusable: !i,
741
- active: l,
741
+ active: m,
742
742
  children: /* @__PURE__ */ f(
743
743
  Ee,
744
744
  {
745
745
  disabled: i,
746
746
  required: r.required,
747
- checked: l,
748
- ...p,
747
+ checked: m,
748
+ ...c,
749
749
  ...a,
750
750
  name: r.name,
751
- ref: h,
751
+ ref: g,
752
752
  onCheck: () => r.onValueChange(a.value),
753
- onKeyDown: N((_) => {
754
- _.key === "Enter" && _.preventDefault();
753
+ onKeyDown: N((d) => {
754
+ d.key === "Enter" && d.preventDefault();
755
755
  }),
756
756
  onFocus: N(a.onFocus, () => {
757
- var _;
758
- m.current && ((_ = c.current) == null || _.click());
757
+ var d;
758
+ _.current && ((d = p.current) == null || d.click());
759
759
  })
760
760
  }
761
761
  )
@@ -906,7 +906,7 @@ const Wr = /* @__PURE__ */ Vr(Br), k = {
906
906
  variant: i = Hr.PARAGRAPH100,
907
907
  ...u
908
908
  }) => {
909
- const p = Wr([
909
+ const c = Wr([
910
910
  n,
911
911
  k[T],
912
912
  k[`${T}--${i}`],
@@ -916,7 +916,7 @@ const Wr = /* @__PURE__ */ Vr(Br), k = {
916
916
  [k[`${T}--negative`]]: r
917
917
  }
918
918
  ]);
919
- return /* @__PURE__ */ f("p", { ...u, className: p, "data-testid": e, children: t });
919
+ return /* @__PURE__ */ f("p", { ...u, className: c, "data-testid": e, children: t });
920
920
  };
921
921
  J.displayName = "Paragraph";
922
922
  function Yr(e) {
@@ -996,9 +996,9 @@ const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.s
996
996
  loading: o = "lazy",
997
997
  ["data-testid"]: a
998
998
  }) => {
999
- const [r, i] = Ve(!1), u = () => i(!0), p = C(G, {
999
+ const [r, i] = Ve(!1), u = () => i(!0), c = C(G, {
1000
1000
  [`${G}--loaded`]: r
1001
- }), c = C(`${G}-placeholder`, {
1001
+ }), p = C(`${G}-placeholder`, {
1002
1002
  [`${G}-placeholder--loaded`]: r
1003
1003
  });
1004
1004
  return /* @__PURE__ */ I(me, { children: [
@@ -1006,14 +1006,14 @@ const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.s
1006
1006
  "img",
1007
1007
  {
1008
1008
  "data-testid": a,
1009
- className: p,
1009
+ className: c,
1010
1010
  src: e,
1011
1011
  alt: t,
1012
1012
  loading: o,
1013
1013
  onLoad: u
1014
1014
  }
1015
1015
  ),
1016
- !n && /* @__PURE__ */ f(Ge, { className: c })
1016
+ !n && /* @__PURE__ */ f(Ge, { className: p })
1017
1017
  ] });
1018
1018
  }, S = "purpur-radio-card-group__item", Y = (e, { disabled: t }) => typeof e == "function" ? e({ disabled: t }) : e, tt = ({ title: e, ...t }, n) => {
1019
1019
  const {
@@ -1022,10 +1022,10 @@ const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.s
1022
1022
  children: r,
1023
1023
  disabled: i,
1024
1024
  id: u,
1025
- image: p,
1026
- required: c,
1027
- value: h
1028
- } = t, l = { ...t };
1025
+ image: c,
1026
+ required: p,
1027
+ value: g
1028
+ } = t, m = { ...t };
1029
1029
  return /* @__PURE__ */ I("div", { className: C(`${S}-container`), ref: n, children: [
1030
1030
  /* @__PURE__ */ I(
1031
1031
  Dr,
@@ -1034,10 +1034,10 @@ const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.s
1034
1034
  "data-testid": o,
1035
1035
  disabled: i,
1036
1036
  id: u,
1037
- required: c,
1038
- value: h,
1037
+ required: p,
1038
+ value: g,
1039
1039
  children: [
1040
- p && /* @__PURE__ */ f("span", { className: C(`${S}-image-container`), children: et(p) ? /* @__PURE__ */ f(rt, { ...p, "data-testid": o && `${o}-image` }) : Y(p, l) }),
1040
+ c && /* @__PURE__ */ f("span", { className: C(`${S}-image-container`), children: et(c) ? /* @__PURE__ */ f(rt, { ...c, "data-testid": o && `${o}-image` }) : Y(c, m) }),
1041
1041
  /* @__PURE__ */ I("span", { className: C(`${S}-content`), children: [
1042
1042
  /* @__PURE__ */ I("span", { className: C(`${S}-top-container`), children: [
1043
1043
  typeof e == "string" ? /* @__PURE__ */ f(
@@ -1049,7 +1049,7 @@ const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.s
1049
1049
  disabled: i,
1050
1050
  children: e
1051
1051
  }
1052
- ) : Y(e, l),
1052
+ ) : Y(e, m),
1053
1053
  /* @__PURE__ */ f("span", { className: C(`${S}-radio`), children: /* @__PURE__ */ f(Gr, { className: C(`${S}-indicator`) }) })
1054
1054
  ] }),
1055
1055
  a && /* @__PURE__ */ f("span", { className: C(`${S}-bottom-container`), children: typeof a == "string" ? /* @__PURE__ */ f(
@@ -1060,7 +1060,7 @@ const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.s
1060
1060
  disabled: i,
1061
1061
  children: a
1062
1062
  }
1063
- ) : Y(a, l) })
1063
+ ) : Y(a, m) })
1064
1064
  ] })
1065
1065
  ]
1066
1066
  }
@@ -1076,48 +1076,49 @@ const nt = (e) => Ke(e) && (e == null ? void 0 : e.type) === te, dt = ["horizont
1076
1076
  className: o,
1077
1077
  items: a,
1078
1078
  label: r,
1079
- loop: i = !0,
1080
- orientation: u = "vertical",
1079
+ labelTag: i = "h2",
1080
+ loop: u = !0,
1081
+ orientation: c = "vertical",
1081
1082
  radioPosition: p = "right",
1082
- ...c
1083
- }, h) => {
1084
- const l = ae.toArray(n).filter(nt);
1085
- return /* @__PURE__ */ I("div", { className: C(o, `${L}__container`), ref: h, children: [
1083
+ ...g
1084
+ }, m) => {
1085
+ const _ = ae.toArray(n).filter(nt);
1086
+ return /* @__PURE__ */ I("div", { className: C(o, `${L}__container`), ref: m, children: [
1086
1087
  r && /* @__PURE__ */ f(
1087
1088
  ge,
1088
1089
  {
1089
1090
  "data-testid": e ? `${e}-label` : void 0,
1090
- id: `${c.id}-label`,
1091
- tag: "h2",
1091
+ id: `${g.id}-label`,
1092
+ tag: i,
1092
1093
  variant: "subsection-100",
1093
- children: `${c.required ? "* " : ""}${r}`
1094
+ children: `${g.required ? "* " : ""}${r}`
1094
1095
  }
1095
1096
  ),
1096
- (!!(a != null && a.length) || l.length) && /* @__PURE__ */ I(
1097
+ (!!(a != null && a.length) || _.length) && /* @__PURE__ */ I(
1097
1098
  Fr,
1098
1099
  {
1099
- ...c,
1100
- "aria-labelledby": t || (r ? `${c.id}-label` : void 0),
1100
+ ...g,
1101
+ "aria-labelledby": t || (r ? `${g.id}-label` : void 0),
1101
1102
  className: C(
1102
1103
  L,
1103
- `${L}--${u}`,
1104
+ `${L}--${c}`,
1104
1105
  `${L}--radio-${p}`
1105
1106
  ),
1106
1107
  "data-testid": e,
1107
- loop: i,
1108
+ loop: u,
1108
1109
  children: [
1109
- a == null ? void 0 : a.map((m) => /* @__PURE__ */ f(
1110
+ a == null ? void 0 : a.map((d) => /* @__PURE__ */ f(
1110
1111
  te,
1111
1112
  {
1112
- ...m,
1113
- disabled: m.disabled || c.disabled,
1113
+ ...d,
1114
+ disabled: d.disabled || g.disabled,
1114
1115
  "data-testid": e ? `${e}-item` : void 0
1115
1116
  },
1116
- m.id
1117
+ d.id
1117
1118
  )),
1118
1119
  ae.map(
1119
- l,
1120
- (m) => Be(m, { disabled: m.props.disabled || c.disabled })
1120
+ _,
1121
+ (d) => Be(d, { disabled: d.props.disabled || g.disabled })
1121
1122
  )
1122
1123
  ]
1123
1124
  }