@purpurds/radio-card-group 7.6.1 → 7.7.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,19 +1,19 @@
1
- import { jsx as f, Fragment as me, jsxs as N } from "react/jsx-runtime";
1
+ import { jsx as f, Fragment as le, jsxs as N } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import A, { useState as Ve, forwardRef as _e, isValidElement as Ke, Children as ae, cloneElement as Be } from "react";
3
+ import A, { useState as je, forwardRef as fe, isValidElement as ze, Children as ne, cloneElement as Ve } from "react";
4
4
  import "react-dom";
5
- function We(e) {
5
+ function Ke(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
- var ie = { exports: {} };
8
+ var oe = { exports: {} };
9
9
  /*!
10
10
  Copyright (c) 2018 Jed Watson.
11
11
  Licensed under the MIT License (MIT), see
12
12
  http://jedwatson.github.io/classnames
13
13
  */
14
- var ue;
15
- function He() {
16
- return ue || (ue = 1, function(e) {
14
+ var ae;
15
+ function Be() {
16
+ return ae || (ae = 1, function(e) {
17
17
  (function() {
18
18
  var t = {}.hasOwnProperty;
19
19
  function n() {
@@ -42,10 +42,10 @@ function He() {
42
42
  }
43
43
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
44
44
  })();
45
- }(ie)), ie.exports;
45
+ }(oe)), oe.exports;
46
46
  }
47
- var Ye = He();
48
- const Xe = /* @__PURE__ */ We(Ye), $ = {
47
+ var We = Be();
48
+ const He = /* @__PURE__ */ Ke(We), M = {
49
49
  "purpur-heading": "_purpur-heading_k9fhq_1",
50
50
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
51
51
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -61,73 +61,73 @@ const Xe = /* @__PURE__ */ We(Ye), $ = {
61
61
  "purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
62
62
  "purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
63
63
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
64
- }, Ze = {
64
+ }, Ye = {
65
65
  TITLE100: "title-100"
66
- }, F = "purpur-heading", ge = ({
66
+ }, $ = "purpur-heading", me = ({
67
67
  children: e,
68
68
  className: t = "",
69
69
  enableHyphenation: n = !1,
70
70
  negative: o = !1,
71
71
  tag: a,
72
- variant: r = Ze.TITLE100,
72
+ variant: r = Ye.TITLE100,
73
73
  ...i
74
74
  }) => {
75
- const u = a, c = Xe([
75
+ const u = a, c = He([
76
76
  t,
77
- $[F],
78
- $[`${F}--${r}`],
77
+ M[$],
78
+ M[`${$}--${r}`],
79
79
  {
80
- [$[`${F}--hyphens`]]: n,
81
- [$[`${F}--negative`]]: o
80
+ [M[`${$}--hyphens`]]: n,
81
+ [M[`${$}--negative`]]: o
82
82
  }
83
83
  ]);
84
84
  return /* @__PURE__ */ f(u, { className: c, ...i, children: e });
85
85
  };
86
- ge.displayName = "Heading";
86
+ me.displayName = "Heading";
87
87
  function I(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
88
88
  return function(a) {
89
89
  if (e == null || e(a), n === !1 || !a.defaultPrevented)
90
90
  return t == null ? void 0 : t(a);
91
91
  };
92
92
  }
93
- function se(e, t) {
93
+ function ie(e, t) {
94
94
  if (typeof e == "function")
95
95
  return e(t);
96
96
  e != null && (e.current = t);
97
97
  }
98
- function he(...e) {
98
+ function _e(...e) {
99
99
  return (t) => {
100
100
  let n = !1;
101
101
  const o = e.map((a) => {
102
- const r = se(a, t);
102
+ const r = ie(a, t);
103
103
  return !n && typeof r == "function" && (n = !0), r;
104
104
  });
105
105
  if (n)
106
106
  return () => {
107
107
  for (let a = 0; a < o.length; a++) {
108
108
  const r = o[a];
109
- typeof r == "function" ? r() : se(e[a], null);
109
+ typeof r == "function" ? r() : ie(e[a], null);
110
110
  }
111
111
  };
112
112
  };
113
113
  }
114
114
  function P(...e) {
115
- return s.useCallback(he(...e), e);
115
+ return s.useCallback(_e(...e), e);
116
116
  }
117
- function j(e, t = []) {
117
+ function U(e, t = []) {
118
118
  let n = [];
119
119
  function o(r, i) {
120
120
  const u = s.createContext(i), c = n.length;
121
121
  n = [...n, i];
122
122
  const p = (m) => {
123
123
  var y;
124
- const { scope: g, children: d, ...l } = m, h = ((y = g == null ? void 0 : g[e]) == null ? void 0 : y[c]) || u, v = s.useMemo(() => l, Object.values(l));
125
- return /* @__PURE__ */ f(h.Provider, { value: v, children: d });
124
+ const { scope: h, children: d, ...l } = m, g = ((y = h == null ? void 0 : h[e]) == null ? void 0 : y[c]) || u, v = s.useMemo(() => l, Object.values(l));
125
+ return /* @__PURE__ */ f(g.Provider, { value: v, children: d });
126
126
  };
127
127
  p.displayName = r + "Provider";
128
- function _(m, g) {
129
- var h;
130
- const d = ((h = g == null ? void 0 : g[e]) == null ? void 0 : h[c]) || u, l = s.useContext(d);
128
+ function _(m, h) {
129
+ var g;
130
+ const d = ((g = h == null ? void 0 : h[e]) == null ? void 0 : g[c]) || u, l = s.useContext(d);
131
131
  if (l) return l;
132
132
  if (i !== void 0) return i;
133
133
  throw new Error(`\`${m}\` must be used within \`${r}\``);
@@ -144,9 +144,9 @@ function j(e, t = []) {
144
144
  );
145
145
  };
146
146
  };
147
- return a.scopeName = e, [o, Je(a, ...t)];
147
+ return a.scopeName = e, [o, Xe(a, ...t)];
148
148
  }
149
- function Je(...e) {
149
+ function Xe(...e) {
150
150
  const t = e[0];
151
151
  if (e.length === 1) return t;
152
152
  const n = () => {
@@ -164,29 +164,29 @@ function Je(...e) {
164
164
  };
165
165
  return n.scopeName = t.scopeName, n;
166
166
  }
167
- var q = s.forwardRef((e, t) => {
168
- const { children: n, ...o } = e, a = s.Children.toArray(n), r = a.find(er);
167
+ var L = s.forwardRef((e, t) => {
168
+ const { children: n, ...o } = e, a = s.Children.toArray(n), r = a.find(Je);
169
169
  if (r) {
170
170
  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);
171
- return /* @__PURE__ */ f(X, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
171
+ return /* @__PURE__ */ f(H, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
172
172
  }
173
- return /* @__PURE__ */ f(X, { ...o, ref: t, children: n });
173
+ return /* @__PURE__ */ f(H, { ...o, ref: t, children: n });
174
174
  });
175
- q.displayName = "Slot";
176
- var X = s.forwardRef((e, t) => {
175
+ L.displayName = "Slot";
176
+ var H = s.forwardRef((e, t) => {
177
177
  const { children: n, ...o } = e;
178
178
  if (s.isValidElement(n)) {
179
- const a = tr(n), r = rr(o, n.props);
180
- return n.type !== s.Fragment && (r.ref = t ? he(t, a) : a), s.cloneElement(n, r);
179
+ const a = er(n), r = Qe(o, n.props);
180
+ return n.type !== s.Fragment && (r.ref = t ? _e(t, a) : a), s.cloneElement(n, r);
181
181
  }
182
182
  return s.Children.count(n) > 1 ? s.Children.only(null) : null;
183
183
  });
184
- X.displayName = "SlotClone";
185
- var Qe = ({ children: e }) => /* @__PURE__ */ f(me, { children: e });
186
- function er(e) {
187
- return s.isValidElement(e) && e.type === Qe;
184
+ H.displayName = "SlotClone";
185
+ var Ze = ({ children: e }) => /* @__PURE__ */ f(le, { children: e });
186
+ function Je(e) {
187
+ return s.isValidElement(e) && e.type === Ze;
188
188
  }
189
- function rr(e, t) {
189
+ function Qe(e, t) {
190
190
  const n = { ...t };
191
191
  for (const o in t) {
192
192
  const a = e[o], r = t[o];
@@ -196,12 +196,12 @@ function rr(e, t) {
196
196
  }
197
197
  return { ...e, ...n };
198
198
  }
199
- function tr(e) {
199
+ function er(e) {
200
200
  var o, a;
201
201
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
202
202
  return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
203
203
  }
204
- var nr = [
204
+ var rr = [
205
205
  "a",
206
206
  "button",
207
207
  "div",
@@ -218,37 +218,37 @@ var nr = [
218
218
  "span",
219
219
  "svg",
220
220
  "ul"
221
- ], M = nr.reduce((e, t) => {
221
+ ], T = rr.reduce((e, t) => {
222
222
  const n = s.forwardRef((o, a) => {
223
- const { asChild: r, ...i } = o, u = r ? q : t;
223
+ const { asChild: r, ...i } = o, u = r ? L : t;
224
224
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: a });
225
225
  });
226
226
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
227
227
  }, {});
228
- function or(e) {
229
- const t = e + "CollectionProvider", [n, o] = j(t), [a, r] = n(
228
+ function tr(e) {
229
+ const t = e + "CollectionProvider", [n, o] = U(t), [a, r] = n(
230
230
  t,
231
231
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
232
232
  ), i = (d) => {
233
- const { scope: l, children: h } = d, v = A.useRef(null), y = A.useRef(/* @__PURE__ */ new Map()).current;
234
- return /* @__PURE__ */ f(a, { scope: l, itemMap: y, collectionRef: v, children: h });
233
+ const { scope: l, children: g } = d, v = A.useRef(null), y = A.useRef(/* @__PURE__ */ new Map()).current;
234
+ return /* @__PURE__ */ f(a, { scope: l, itemMap: y, collectionRef: v, children: g });
235
235
  };
236
236
  i.displayName = t;
237
237
  const u = e + "CollectionSlot", c = A.forwardRef(
238
238
  (d, l) => {
239
- const { scope: h, children: v } = d, y = r(u, h), b = P(l, y.collectionRef);
240
- return /* @__PURE__ */ f(q, { ref: b, children: v });
239
+ const { scope: g, children: v } = d, y = r(u, g), b = P(l, y.collectionRef);
240
+ return /* @__PURE__ */ f(L, { ref: b, children: v });
241
241
  }
242
242
  );
243
243
  c.displayName = u;
244
244
  const p = e + "CollectionItemSlot", _ = "data-radix-collection-item", m = A.forwardRef(
245
245
  (d, l) => {
246
- const { scope: h, children: v, ...y } = d, b = A.useRef(null), E = P(l, b), O = r(p, h);
247
- return A.useEffect(() => (O.itemMap.set(b, { ref: b, ...y }), () => void O.itemMap.delete(b))), /* @__PURE__ */ f(q, { [_]: "", ref: E, children: v });
246
+ const { scope: g, children: v, ...y } = d, b = A.useRef(null), E = P(l, b), O = r(p, g);
247
+ return A.useEffect(() => (O.itemMap.set(b, { ref: b, ...y }), () => void O.itemMap.delete(b))), /* @__PURE__ */ f(L, { [_]: "", ref: E, children: v });
248
248
  }
249
249
  );
250
250
  m.displayName = p;
251
- function g(d) {
251
+ function h(d) {
252
252
  const l = r(e + "CollectionConsumer", d);
253
253
  return A.useCallback(() => {
254
254
  const v = l.collectionRef.current;
@@ -261,20 +261,20 @@ function or(e) {
261
261
  }
262
262
  return [
263
263
  { Provider: i, Slot: c, ItemSlot: m },
264
- g,
264
+ h,
265
265
  o
266
266
  ];
267
267
  }
268
- var U = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
269
- }, ar = s.useId || (() => {
270
- }), ir = 0;
271
- function ur(e) {
272
- const [t, n] = s.useState(ar());
273
- return U(() => {
274
- n((o) => o ?? String(ir++));
268
+ var q = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
269
+ }, nr = s.useId || (() => {
270
+ }), or = 0;
271
+ function ar(e) {
272
+ const [t, n] = s.useState(nr());
273
+ return q(() => {
274
+ n((o) => o ?? String(or++));
275
275
  }, [e]), t ? `radix-${t}` : "";
276
276
  }
277
- function Q(e) {
277
+ function Z(e) {
278
278
  const t = s.useRef(e);
279
279
  return s.useEffect(() => {
280
280
  t.current = e;
@@ -283,13 +283,13 @@ function Q(e) {
283
283
  return (o = t.current) == null ? void 0 : o.call(t, ...n);
284
284
  }, []);
285
285
  }
286
- function ve({
286
+ function he({
287
287
  prop: e,
288
288
  defaultProp: t,
289
289
  onChange: n = () => {
290
290
  }
291
291
  }) {
292
- const [o, a] = sr({ defaultProp: t, onChange: n }), r = e !== void 0, i = r ? e : o, u = Q(n), c = s.useCallback(
292
+ const [o, a] = ir({ defaultProp: t, onChange: n }), r = e !== void 0, i = r ? e : o, u = Z(n), c = s.useCallback(
293
293
  (p) => {
294
294
  if (r) {
295
295
  const m = typeof p == "function" ? p(e) : p;
@@ -301,28 +301,28 @@ function ve({
301
301
  );
302
302
  return [i, c];
303
303
  }
304
- function sr({
304
+ function ir({
305
305
  defaultProp: e,
306
306
  onChange: t
307
307
  }) {
308
- const n = s.useState(e), [o] = n, a = s.useRef(o), r = Q(t);
308
+ const n = s.useState(e), [o] = n, a = s.useRef(o), r = Z(t);
309
309
  return s.useEffect(() => {
310
310
  a.current !== o && (r(o), a.current = o);
311
311
  }, [o, a, r]), n;
312
312
  }
313
- var cr = s.createContext(void 0);
314
- function ye(e) {
315
- const t = s.useContext(cr);
313
+ var ur = s.createContext(void 0);
314
+ function ge(e) {
315
+ const t = s.useContext(ur);
316
316
  return e || t || "ltr";
317
317
  }
318
- var K = "rovingFocusGroup.onEntryFocus", pr = { bubbles: !1, cancelable: !0 }, z = "RovingFocusGroup", [Z, be, dr] = or(z), [lr, Re] = j(
319
- z,
320
- [dr]
321
- ), [fr, mr] = lr(z), Ce = s.forwardRef(
322
- (e, t) => /* @__PURE__ */ f(Z.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f(Z.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f(_r, { ...e, ref: t }) }) })
318
+ var V = "rovingFocusGroup.onEntryFocus", sr = { bubbles: !1, cancelable: !0 }, j = "RovingFocusGroup", [Y, ve, cr] = tr(j), [pr, ye] = U(
319
+ j,
320
+ [cr]
321
+ ), [dr, lr] = pr(j), be = s.forwardRef(
322
+ (e, t) => /* @__PURE__ */ f(Y.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f(Y.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ f(fr, { ...e, ref: t }) }) })
323
323
  );
324
- Ce.displayName = z;
325
- var _r = s.forwardRef((e, t) => {
324
+ be.displayName = j;
325
+ var fr = s.forwardRef((e, t) => {
326
326
  const {
327
327
  __scopeRovingFocusGroup: n,
328
328
  orientation: o,
@@ -334,40 +334,40 @@ var _r = s.forwardRef((e, t) => {
334
334
  onEntryFocus: p,
335
335
  preventScrollOnEntryFocus: _ = !1,
336
336
  ...m
337
- } = e, g = s.useRef(null), d = P(t, g), l = ye(r), [h = null, v] = ve({
337
+ } = e, h = s.useRef(null), d = P(t, h), l = ge(r), [g = null, v] = he({
338
338
  prop: i,
339
339
  defaultProp: u,
340
340
  onChange: c
341
- }), [y, b] = s.useState(!1), E = Q(p), O = be(n), x = s.useRef(!1), [Le, ne] = s.useState(0);
341
+ }), [y, b] = s.useState(!1), E = Z(p), O = ve(n), x = s.useRef(!1), [De, re] = s.useState(0);
342
342
  return s.useEffect(() => {
343
- const R = g.current;
343
+ const R = h.current;
344
344
  if (R)
345
- return R.addEventListener(K, E), () => R.removeEventListener(K, E);
345
+ return R.addEventListener(V, E), () => R.removeEventListener(V, E);
346
346
  }, [E]), /* @__PURE__ */ f(
347
- fr,
347
+ dr,
348
348
  {
349
349
  scope: n,
350
350
  orientation: o,
351
351
  dir: l,
352
352
  loop: a,
353
- currentTabStopId: h,
353
+ currentTabStopId: g,
354
354
  onItemFocus: s.useCallback(
355
355
  (R) => v(R),
356
356
  [v]
357
357
  ),
358
358
  onItemShiftTab: s.useCallback(() => b(!0), []),
359
359
  onFocusableItemAdd: s.useCallback(
360
- () => ne((R) => R + 1),
360
+ () => re((R) => R + 1),
361
361
  []
362
362
  ),
363
363
  onFocusableItemRemove: s.useCallback(
364
- () => ne((R) => R - 1),
364
+ () => re((R) => R - 1),
365
365
  []
366
366
  ),
367
367
  children: /* @__PURE__ */ f(
368
- M.div,
368
+ T.div,
369
369
  {
370
- tabIndex: y || Le === 0 ? -1 : 0,
370
+ tabIndex: y || De === 0 ? -1 : 0,
371
371
  "data-orientation": o,
372
372
  ...m,
373
373
  ref: d,
@@ -376,14 +376,14 @@ var _r = s.forwardRef((e, t) => {
376
376
  x.current = !0;
377
377
  }),
378
378
  onFocus: I(e.onFocus, (R) => {
379
- const qe = !x.current;
380
- if (R.target === R.currentTarget && qe && !y) {
381
- const oe = new CustomEvent(K, pr);
382
- if (R.currentTarget.dispatchEvent(oe), !oe.defaultPrevented) {
383
- 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(
379
+ const Ge = !x.current;
380
+ if (R.target === R.currentTarget && Ge && !y) {
381
+ const te = new CustomEvent(V, sr);
382
+ if (R.currentTarget.dispatchEvent(te), !te.defaultPrevented) {
383
+ const z = O().filter((w) => w.focusable), Le = z.find((w) => w.active), qe = z.find((w) => w.id === g), Ue = [Le, qe, ...z].filter(
384
384
  Boolean
385
385
  ).map((w) => w.ref.current);
386
- Ie(ze, _);
386
+ Se(Ue, _);
387
387
  }
388
388
  }
389
389
  x.current = !1;
@@ -393,7 +393,7 @@ var _r = s.forwardRef((e, t) => {
393
393
  )
394
394
  }
395
395
  );
396
- }), Se = "RovingFocusGroupItem", Ne = s.forwardRef(
396
+ }), Re = "RovingFocusGroupItem", Ce = s.forwardRef(
397
397
  (e, t) => {
398
398
  const {
399
399
  __scopeRovingFocusGroup: n,
@@ -401,19 +401,19 @@ var _r = s.forwardRef((e, t) => {
401
401
  active: a = !1,
402
402
  tabStopId: r,
403
403
  ...i
404
- } = e, u = ur(), c = r || u, p = mr(Se, n), _ = p.currentTabStopId === c, m = be(n), { onFocusableItemAdd: g, onFocusableItemRemove: d } = p;
404
+ } = e, u = ar(), c = r || u, p = lr(Re, n), _ = p.currentTabStopId === c, m = ve(n), { onFocusableItemAdd: h, onFocusableItemRemove: d } = p;
405
405
  return s.useEffect(() => {
406
406
  if (o)
407
- return g(), () => d();
408
- }, [o, g, d]), /* @__PURE__ */ f(
409
- Z.ItemSlot,
407
+ return h(), () => d();
408
+ }, [o, h, d]), /* @__PURE__ */ f(
409
+ Y.ItemSlot,
410
410
  {
411
411
  scope: n,
412
412
  id: c,
413
413
  focusable: o,
414
414
  active: a,
415
415
  children: /* @__PURE__ */ f(
416
- M.span,
416
+ T.span,
417
417
  {
418
418
  tabIndex: _ ? 0 : -1,
419
419
  "data-orientation": p.orientation,
@@ -429,18 +429,18 @@ var _r = s.forwardRef((e, t) => {
429
429
  return;
430
430
  }
431
431
  if (l.target !== l.currentTarget) return;
432
- const h = vr(l, p.orientation, p.dir);
433
- if (h !== void 0) {
432
+ const g = hr(l, p.orientation, p.dir);
433
+ if (g !== void 0) {
434
434
  if (l.metaKey || l.ctrlKey || l.altKey || l.shiftKey) return;
435
435
  l.preventDefault();
436
436
  let y = m().filter((b) => b.focusable).map((b) => b.ref.current);
437
- if (h === "last") y.reverse();
438
- else if (h === "prev" || h === "next") {
439
- h === "prev" && y.reverse();
437
+ if (g === "last") y.reverse();
438
+ else if (g === "prev" || g === "next") {
439
+ g === "prev" && y.reverse();
440
440
  const b = y.indexOf(l.currentTarget);
441
- y = p.loop ? yr(y, b + 1) : y.slice(b + 1);
441
+ y = p.loop ? gr(y, b + 1) : y.slice(b + 1);
442
442
  }
443
- setTimeout(() => Ie(y));
443
+ setTimeout(() => Se(y));
444
444
  }
445
445
  })
446
446
  }
@@ -449,8 +449,8 @@ var _r = s.forwardRef((e, t) => {
449
449
  );
450
450
  }
451
451
  );
452
- Ne.displayName = Se;
453
- var gr = {
452
+ Ce.displayName = Re;
453
+ var mr = {
454
454
  ArrowLeft: "prev",
455
455
  ArrowUp: "prev",
456
456
  ArrowRight: "next",
@@ -460,26 +460,26 @@ var gr = {
460
460
  PageDown: "last",
461
461
  End: "last"
462
462
  };
463
- function hr(e, t) {
463
+ function _r(e, t) {
464
464
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
465
465
  }
466
- function vr(e, t, n) {
467
- const o = hr(e.key, n);
466
+ function hr(e, t, n) {
467
+ const o = _r(e.key, n);
468
468
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
469
- return gr[o];
469
+ return mr[o];
470
470
  }
471
- function Ie(e, t = !1) {
471
+ function Se(e, t = !1) {
472
472
  const n = document.activeElement;
473
473
  for (const o of e)
474
474
  if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
475
475
  }
476
- function yr(e, t) {
476
+ function gr(e, t) {
477
477
  return e.map((n, o) => e[(t + o) % e.length]);
478
478
  }
479
- var br = Ce, Rr = Ne;
480
- function Cr(e) {
479
+ var vr = be, yr = Ce;
480
+ function br(e) {
481
481
  const [t, n] = s.useState(void 0);
482
- return U(() => {
482
+ return q(() => {
483
483
  if (e) {
484
484
  n({ width: e.offsetWidth, height: e.offsetHeight });
485
485
  const o = new ResizeObserver((a) => {
@@ -499,20 +499,20 @@ function Cr(e) {
499
499
  n(void 0);
500
500
  }, [e]), t;
501
501
  }
502
- function Sr(e) {
502
+ function Rr(e) {
503
503
  const t = s.useRef({ value: e, previous: e });
504
504
  return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
505
505
  }
506
- function Nr(e, t) {
506
+ function Cr(e, t) {
507
507
  return s.useReducer((n, o) => t[n][o] ?? n, e);
508
508
  }
509
- var we = (e) => {
510
- const { present: t, children: n } = e, o = Ir(t), a = typeof n == "function" ? n({ present: o.isPresent }) : s.Children.only(n), r = P(o.ref, wr(a));
509
+ var Ne = (e) => {
510
+ const { present: t, children: n } = e, o = Sr(t), a = typeof n == "function" ? n({ present: o.isPresent }) : s.Children.only(n), r = P(o.ref, Nr(a));
511
511
  return typeof n == "function" || o.isPresent ? s.cloneElement(a, { ref: r }) : null;
512
512
  };
513
- we.displayName = "Presence";
514
- function Ir(e) {
515
- const [t, n] = s.useState(), o = s.useRef({}), a = s.useRef(e), r = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, c] = Nr(i, {
513
+ Ne.displayName = "Presence";
514
+ function Sr(e) {
515
+ const [t, n] = s.useState(), o = s.useRef({}), a = s.useRef(e), r = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, c] = Cr(i, {
516
516
  mounted: {
517
517
  UNMOUNT: "unmounted",
518
518
  ANIMATION_OUT: "unmountSuspended"
@@ -526,30 +526,30 @@ function Ir(e) {
526
526
  }
527
527
  });
528
528
  return s.useEffect(() => {
529
- const p = D(o.current);
529
+ const p = F(o.current);
530
530
  r.current = u === "mounted" ? p : "none";
531
- }, [u]), U(() => {
531
+ }, [u]), q(() => {
532
532
  const p = o.current, _ = a.current;
533
533
  if (_ !== e) {
534
- const g = r.current, d = D(p);
535
- e ? c("MOUNT") : d === "none" || (p == null ? void 0 : p.display) === "none" ? c("UNMOUNT") : c(_ && g !== d ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
534
+ const h = r.current, d = F(p);
535
+ e ? c("MOUNT") : d === "none" || (p == null ? void 0 : p.display) === "none" ? c("UNMOUNT") : c(_ && h !== d ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
536
536
  }
537
- }, [e, c]), U(() => {
537
+ }, [e, c]), q(() => {
538
538
  if (t) {
539
539
  let p;
540
540
  const _ = t.ownerDocument.defaultView ?? window, m = (d) => {
541
- const h = D(o.current).includes(d.animationName);
542
- if (d.target === t && h && (c("ANIMATION_END"), !a.current)) {
541
+ const g = F(o.current).includes(d.animationName);
542
+ if (d.target === t && g && (c("ANIMATION_END"), !a.current)) {
543
543
  const v = t.style.animationFillMode;
544
544
  t.style.animationFillMode = "forwards", p = _.setTimeout(() => {
545
545
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
546
546
  });
547
547
  }
548
- }, g = (d) => {
549
- d.target === t && (r.current = D(o.current));
548
+ }, h = (d) => {
549
+ d.target === t && (r.current = F(o.current));
550
550
  };
551
- return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
552
- _.clearTimeout(p), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
551
+ return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
552
+ _.clearTimeout(p), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
553
553
  };
554
554
  } else
555
555
  c("ANIMATION_END");
@@ -560,15 +560,15 @@ function Ir(e) {
560
560
  }, [])
561
561
  };
562
562
  }
563
- function D(e) {
563
+ function F(e) {
564
564
  return (e == null ? void 0 : e.animationName) || "none";
565
565
  }
566
- function wr(e) {
566
+ function Nr(e) {
567
567
  var o, a;
568
568
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
569
569
  return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
570
570
  }
571
- var ee = "Radio", [Ar, Ae] = j(ee), [Er, Or] = Ar(ee), Ee = s.forwardRef(
571
+ var J = "Radio", [Ir, Ie] = U(J), [wr, Ar] = Ir(J), we = s.forwardRef(
572
572
  (e, t) => {
573
573
  const {
574
574
  __scopeRadio: n,
@@ -580,27 +580,27 @@ var ee = "Radio", [Ar, Ae] = j(ee), [Er, Or] = Ar(ee), Ee = s.forwardRef(
580
580
  onCheck: c,
581
581
  form: p,
582
582
  ..._
583
- } = e, [m, g] = s.useState(null), d = P(t, (v) => g(v)), l = s.useRef(!1), h = m ? p || !!m.closest("form") : !0;
584
- return /* @__PURE__ */ N(Er, { scope: n, checked: a, disabled: i, children: [
583
+ } = e, [m, h] = s.useState(null), d = P(t, (v) => h(v)), l = s.useRef(!1), g = m ? p || !!m.closest("form") : !0;
584
+ return /* @__PURE__ */ N(wr, { scope: n, checked: a, disabled: i, children: [
585
585
  /* @__PURE__ */ f(
586
- M.button,
586
+ T.button,
587
587
  {
588
588
  type: "button",
589
589
  role: "radio",
590
590
  "aria-checked": a,
591
- "data-state": xe(a),
591
+ "data-state": Oe(a),
592
592
  "data-disabled": i ? "" : void 0,
593
593
  disabled: i,
594
594
  value: u,
595
595
  ..._,
596
596
  ref: d,
597
597
  onClick: I(e.onClick, (v) => {
598
- a || c == null || c(), h && (l.current = v.isPropagationStopped(), l.current || v.stopPropagation());
598
+ a || c == null || c(), g && (l.current = v.isPropagationStopped(), l.current || v.stopPropagation());
599
599
  })
600
600
  }
601
601
  ),
602
- h && /* @__PURE__ */ f(
603
- Pr,
602
+ g && /* @__PURE__ */ f(
603
+ Er,
604
604
  {
605
605
  control: m,
606
606
  bubbles: !l.current,
@@ -616,14 +616,14 @@ var ee = "Radio", [Ar, Ae] = j(ee), [Er, Or] = Ar(ee), Ee = s.forwardRef(
616
616
  ] });
617
617
  }
618
618
  );
619
- Ee.displayName = ee;
620
- var Oe = "RadioIndicator", Pe = s.forwardRef(
619
+ we.displayName = J;
620
+ var Ae = "RadioIndicator", Ee = s.forwardRef(
621
621
  (e, t) => {
622
- const { __scopeRadio: n, forceMount: o, ...a } = e, r = Or(Oe, n);
623
- return /* @__PURE__ */ f(we, { present: o || r.checked, children: /* @__PURE__ */ f(
624
- M.span,
622
+ const { __scopeRadio: n, forceMount: o, ...a } = e, r = Ar(Ae, n);
623
+ return /* @__PURE__ */ f(Ne, { present: o || r.checked, children: /* @__PURE__ */ f(
624
+ T.span,
625
625
  {
626
- "data-state": xe(r.checked),
626
+ "data-state": Oe(r.checked),
627
627
  "data-disabled": r.disabled ? "" : void 0,
628
628
  ...a,
629
629
  ref: t
@@ -631,14 +631,14 @@ var Oe = "RadioIndicator", Pe = s.forwardRef(
631
631
  ) });
632
632
  }
633
633
  );
634
- Pe.displayName = Oe;
635
- var Pr = (e) => {
636
- const { control: t, checked: n, bubbles: o = !0, ...a } = e, r = s.useRef(null), i = Sr(n), u = Cr(t);
634
+ Ee.displayName = Ae;
635
+ var Er = (e) => {
636
+ const { control: t, checked: n, bubbles: o = !0, ...a } = e, r = s.useRef(null), i = Rr(n), u = br(t);
637
637
  return s.useEffect(() => {
638
638
  const c = r.current, p = window.HTMLInputElement.prototype, m = Object.getOwnPropertyDescriptor(p, "checked").set;
639
639
  if (i !== n && m) {
640
- const g = new Event("click", { bubbles: o });
641
- m.call(c, n), c.dispatchEvent(g);
640
+ const h = new Event("click", { bubbles: o });
641
+ m.call(c, n), c.dispatchEvent(h);
642
642
  }
643
643
  }, [i, n, o]), /* @__PURE__ */ f(
644
644
  "input",
@@ -660,13 +660,13 @@ var Pr = (e) => {
660
660
  }
661
661
  );
662
662
  };
663
- function xe(e) {
663
+ function Oe(e) {
664
664
  return e ? "checked" : "unchecked";
665
665
  }
666
- var xr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], re = "RadioGroup", [kr, pt] = j(re, [
667
- Re,
668
- Ae
669
- ]), ke = Re(), Te = Ae(), [Tr, Mr] = kr(re), Me = s.forwardRef(
666
+ var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup", [Pr, pt] = U(Q, [
667
+ ye,
668
+ Ie
669
+ ]), Pe = ye(), xe = Ie(), [xr, kr] = Pr(Q), ke = s.forwardRef(
670
670
  (e, t) => {
671
671
  const {
672
672
  __scopeRadioGroup: n,
@@ -679,23 +679,23 @@ var xr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], re = "RadioGroup",
679
679
  dir: p,
680
680
  loop: _ = !0,
681
681
  onValueChange: m,
682
- ...g
683
- } = e, d = ke(n), l = ye(p), [h, v] = ve({
682
+ ...h
683
+ } = e, d = Pe(n), l = ge(p), [g, v] = he({
684
684
  prop: r,
685
685
  defaultProp: a,
686
686
  onChange: m
687
687
  });
688
688
  return /* @__PURE__ */ f(
689
- Tr,
689
+ xr,
690
690
  {
691
691
  scope: n,
692
692
  name: o,
693
693
  required: i,
694
694
  disabled: u,
695
- value: h,
695
+ value: g,
696
696
  onValueChange: v,
697
697
  children: /* @__PURE__ */ f(
698
- br,
698
+ vr,
699
699
  {
700
700
  asChild: !0,
701
701
  ...d,
@@ -703,14 +703,14 @@ var xr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], re = "RadioGroup",
703
703
  dir: l,
704
704
  loop: _,
705
705
  children: /* @__PURE__ */ f(
706
- M.div,
706
+ T.div,
707
707
  {
708
708
  role: "radiogroup",
709
709
  "aria-required": i,
710
710
  "aria-orientation": c,
711
711
  "data-disabled": u ? "" : void 0,
712
712
  dir: l,
713
- ...g,
713
+ ...h,
714
714
  ref: t
715
715
  }
716
716
  )
@@ -720,26 +720,26 @@ var xr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], re = "RadioGroup",
720
720
  );
721
721
  }
722
722
  );
723
- Me.displayName = re;
724
- var $e = "RadioGroupItem", Fe = s.forwardRef(
723
+ ke.displayName = Q;
724
+ var Te = "RadioGroupItem", Me = s.forwardRef(
725
725
  (e, t) => {
726
- const { __scopeRadioGroup: n, disabled: o, ...a } = e, r = Mr($e, n), i = r.disabled || o, u = ke(n), c = Te(n), p = s.useRef(null), _ = P(t, p), m = r.value === a.value, g = s.useRef(!1);
726
+ const { __scopeRadioGroup: n, disabled: o, ...a } = e, r = kr(Te, n), i = r.disabled || o, u = Pe(n), c = xe(n), p = s.useRef(null), _ = P(t, p), m = r.value === a.value, h = s.useRef(!1);
727
727
  return s.useEffect(() => {
728
- const d = (h) => {
729
- xr.includes(h.key) && (g.current = !0);
730
- }, l = () => g.current = !1;
728
+ const d = (g) => {
729
+ Or.includes(g.key) && (h.current = !0);
730
+ }, l = () => h.current = !1;
731
731
  return document.addEventListener("keydown", d), document.addEventListener("keyup", l), () => {
732
732
  document.removeEventListener("keydown", d), document.removeEventListener("keyup", l);
733
733
  };
734
734
  }, []), /* @__PURE__ */ f(
735
- Rr,
735
+ yr,
736
736
  {
737
737
  asChild: !0,
738
738
  ...u,
739
739
  focusable: !i,
740
740
  active: m,
741
741
  children: /* @__PURE__ */ f(
742
- Ee,
742
+ we,
743
743
  {
744
744
  disabled: i,
745
745
  required: r.required,
@@ -754,7 +754,7 @@ var $e = "RadioGroupItem", Fe = s.forwardRef(
754
754
  }),
755
755
  onFocus: I(a.onFocus, () => {
756
756
  var d;
757
- g.current && ((d = p.current) == null || d.click());
757
+ h.current && ((d = p.current) == null || d.click());
758
758
  })
759
759
  }
760
760
  )
@@ -762,27 +762,27 @@ var $e = "RadioGroupItem", Fe = s.forwardRef(
762
762
  );
763
763
  }
764
764
  );
765
- Fe.displayName = $e;
766
- var $r = "RadioGroupIndicator", De = s.forwardRef(
765
+ Me.displayName = Te;
766
+ var Tr = "RadioGroupIndicator", $e = s.forwardRef(
767
767
  (e, t) => {
768
- const { __scopeRadioGroup: n, ...o } = e, a = Te(n);
769
- return /* @__PURE__ */ f(Pe, { ...a, ...o, ref: t });
768
+ const { __scopeRadioGroup: n, ...o } = e, a = xe(n);
769
+ return /* @__PURE__ */ f(Ee, { ...a, ...o, ref: t });
770
770
  }
771
771
  );
772
- De.displayName = $r;
773
- var Fr = Me, Dr = Fe, Gr = De;
774
- function Lr(e) {
772
+ $e.displayName = Tr;
773
+ var Mr = ke, $r = Me, Fr = $e;
774
+ function Dr(e) {
775
775
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
776
776
  }
777
- var B = { exports: {} };
777
+ var K = { exports: {} };
778
778
  /*!
779
779
  Copyright (c) 2018 Jed Watson.
780
780
  Licensed under the MIT License (MIT), see
781
781
  http://jedwatson.github.io/classnames
782
782
  */
783
- var ce;
784
- function qr() {
785
- return ce || (ce = 1, function(e) {
783
+ var ue;
784
+ function Gr() {
785
+ return ue || (ue = 1, function(e) {
786
786
  (function() {
787
787
  var t = {}.hasOwnProperty;
788
788
  function n() {
@@ -811,10 +811,10 @@ function qr() {
811
811
  }
812
812
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
813
813
  })();
814
- }(B)), B.exports;
814
+ }(K)), K.exports;
815
815
  }
816
- var Ur = qr();
817
- const jr = /* @__PURE__ */ Lr(Ur), zr = {
816
+ var Lr = Gr();
817
+ const qr = /* @__PURE__ */ Dr(Lr), Ur = {
818
818
  "purpur-radio-card-group": "_purpur-radio-card-group_19msf_1",
819
819
  "purpur-radio-card-group--vertical": "_purpur-radio-card-group--vertical_19msf_5",
820
820
  "purpur-radio-card-group--horizontal": "_purpur-radio-card-group--horizontal_19msf_9",
@@ -834,40 +834,40 @@ const jr = /* @__PURE__ */ Lr(Ur), zr = {
834
834
  "purpur-radio-card-group__item-image-placeholder": "_purpur-radio-card-group__item-image-placeholder_19msf_167",
835
835
  "purpur-radio-card-group__item-image-placeholder--loaded": "_purpur-radio-card-group__item-image-placeholder--loaded_19msf_172",
836
836
  "purpur-radio-card-group__item-children": "_purpur-radio-card-group__item-children_19msf_175"
837
- }, C = jr.bind(zr);
838
- function Vr(e) {
837
+ }, C = qr.bind(Ur);
838
+ function jr(e) {
839
839
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
840
840
  }
841
- var pe = { exports: {} };
841
+ var se = { exports: {} };
842
842
  /*!
843
843
  Copyright (c) 2018 Jed Watson.
844
844
  Licensed under the MIT License (MIT), see
845
845
  http://jedwatson.github.io/classnames
846
846
  */
847
- var de;
848
- function Kr() {
849
- return de || (de = 1, function(e) {
847
+ var ce;
848
+ function zr() {
849
+ return ce || (ce = 1, function(e) {
850
850
  (function() {
851
851
  var t = {}.hasOwnProperty;
852
852
  function n() {
853
853
  for (var r = "", i = 0; i < arguments.length; i++) {
854
854
  var u = arguments[i];
855
- u && (r = a(r, o(u)));
855
+ u && (r = a(r, o.call(this, u)));
856
856
  }
857
857
  return r;
858
858
  }
859
859
  function o(r) {
860
860
  if (typeof r == "string" || typeof r == "number")
861
- return r;
861
+ return this && this[r] || r;
862
862
  if (typeof r != "object")
863
863
  return "";
864
864
  if (Array.isArray(r))
865
- return n.apply(null, r);
865
+ return n.apply(this, r);
866
866
  if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
867
867
  return r.toString();
868
868
  var i = "";
869
869
  for (var u in r)
870
- t.call(r, u) && r[u] && (i = a(i, u));
870
+ t.call(r, u) && r[u] && (i = a(i, this && this[u] || u));
871
871
  return i;
872
872
  }
873
873
  function a(r, i) {
@@ -875,10 +875,10 @@ function Kr() {
875
875
  }
876
876
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
877
877
  })();
878
- }(pe)), pe.exports;
878
+ }(se)), se.exports;
879
879
  }
880
- var Br = Kr();
881
- const Wr = /* @__PURE__ */ Vr(Br), k = {
880
+ var Vr = zr();
881
+ const Kr = /* @__PURE__ */ jr(Vr), Br = {
882
882
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
883
883
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
884
884
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -893,64 +893,58 @@ const Wr = /* @__PURE__ */ Vr(Br), k = {
893
893
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
894
894
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
895
895
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
896
- }, Hr = {
896
+ }, Wr = Kr.bind(Br), Hr = {
897
897
  PARAGRAPH100: "paragraph-100"
898
- }, T = "purpur-paragraph", J = ({
899
- ["data-testid"]: e,
900
- children: t,
901
- className: n,
902
- disabled: o,
903
- enableHyphenation: a = !1,
904
- negative: r = !1,
905
- variant: i = Hr.PARAGRAPH100,
906
- ...u
898
+ }, k = "purpur-paragraph", X = ({
899
+ children: e,
900
+ className: t,
901
+ disabled: n,
902
+ enableHyphenation: o = !1,
903
+ negative: a = !1,
904
+ variant: r = Hr.PARAGRAPH100,
905
+ ...i
907
906
  }) => {
908
- const c = Wr([
909
- n,
910
- k[T],
911
- k[`${T}--${i}`],
912
- {
913
- [k[`${T}--hyphens`]]: a,
914
- [k[`${T}--disabled`]]: o,
915
- [k[`${T}--negative`]]: r
916
- }
917
- ]);
918
- return /* @__PURE__ */ f("p", { ...u, className: c, "data-testid": e, children: t });
907
+ const u = Wr(t, k, `${k}--${r}`, {
908
+ [`${k}--hyphens`]: o,
909
+ [`${k}--disabled`]: n,
910
+ [`${k}--negative`]: a
911
+ });
912
+ return /* @__PURE__ */ f("p", { ...i, className: u, children: e });
919
913
  };
920
- J.displayName = "Paragraph";
914
+ X.displayName = "Paragraph";
921
915
  function Yr(e) {
922
916
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
923
917
  }
924
- var le = { exports: {} };
918
+ var pe = { exports: {} };
925
919
  /*!
926
920
  Copyright (c) 2018 Jed Watson.
927
921
  Licensed under the MIT License (MIT), see
928
922
  http://jedwatson.github.io/classnames
929
923
  */
930
- var fe;
924
+ var de;
931
925
  function Xr() {
932
- return fe || (fe = 1, function(e) {
926
+ return de || (de = 1, function(e) {
933
927
  (function() {
934
928
  var t = {}.hasOwnProperty;
935
929
  function n() {
936
930
  for (var r = "", i = 0; i < arguments.length; i++) {
937
931
  var u = arguments[i];
938
- u && (r = a(r, o(u)));
932
+ u && (r = a(r, o.call(this, u)));
939
933
  }
940
934
  return r;
941
935
  }
942
936
  function o(r) {
943
937
  if (typeof r == "string" || typeof r == "number")
944
- return r;
938
+ return this && this[r] || r;
945
939
  if (typeof r != "object")
946
940
  return "";
947
941
  if (Array.isArray(r))
948
- return n.apply(null, r);
942
+ return n.apply(this, r);
949
943
  if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
950
944
  return r.toString();
951
945
  var i = "";
952
946
  for (var u in r)
953
- t.call(r, u) && r[u] && (i = a(i, u));
947
+ t.call(r, u) && r[u] && (i = a(i, this && this[u] || u));
954
948
  return i;
955
949
  }
956
950
  function a(r, i) {
@@ -958,10 +952,10 @@ function Xr() {
958
952
  }
959
953
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
960
954
  })();
961
- }(le)), le.exports;
955
+ }(pe)), pe.exports;
962
956
  }
963
957
  var Zr = Xr();
964
- const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_93tal_1", W = {
958
+ const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_93tal_1", et = {
965
959
  "purpur-skeleton": "_purpur-skeleton_93tal_1",
966
960
  loading: Qr,
967
961
  "purpur-skeleton--default": "_purpur-skeleton--default_93tal_24",
@@ -971,36 +965,34 @@ const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_93tal_1", W = {
971
965
  "purpur-skeleton--md": "_purpur-skeleton--md_93tal_42",
972
966
  "purpur-skeleton--lg": "_purpur-skeleton--lg_93tal_45",
973
967
  "purpur-skeleton--full": "_purpur-skeleton--full_93tal_48"
974
- }, H = "purpur-skeleton", Ge = ({
968
+ }, rt = Jr.bind(et), B = "purpur-skeleton", Fe = ({
975
969
  className: e,
976
- ["data-testid"]: t,
977
- radius: n = "xs",
978
- style: o,
979
- negative: a = !1,
980
- ...r
970
+ radius: t = "xs",
971
+ negative: n = !1,
972
+ ...o
981
973
  }) => {
982
- const i = Jr([
974
+ const a = rt(
983
975
  e,
984
- W[H],
985
- W[`${H}--${a ? "negative" : "default"}`],
986
- W[`${H}--${n}`]
987
- ]);
988
- return /* @__PURE__ */ f("div", { className: i, style: o, "data-testid": t, ...r });
976
+ B,
977
+ `${B}--${n ? "negative" : "default"}`,
978
+ `${B}--${t}`
979
+ );
980
+ return /* @__PURE__ */ f("div", { className: a, ...o });
989
981
  };
990
- Ge.displayName = "Skeleton";
991
- const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.src) && !!e.altText, rt = ({
982
+ Fe.displayName = "Skeleton";
983
+ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.src) && !!e.altText, nt = ({
992
984
  src: e,
993
985
  altText: t,
994
986
  noPlaceholder: n,
995
987
  loading: o = "lazy",
996
988
  ["data-testid"]: a
997
989
  }) => {
998
- const [r, i] = Ve(!1), u = () => i(!0), c = C(G, {
999
- [`${G}--loaded`]: r
1000
- }), p = C(`${G}-placeholder`, {
1001
- [`${G}-placeholder--loaded`]: r
990
+ const [r, i] = je(!1), u = () => i(!0), c = C(D, {
991
+ [`${D}--loaded`]: r
992
+ }), p = C(`${D}-placeholder`, {
993
+ [`${D}-placeholder--loaded`]: r
1002
994
  });
1003
- return /* @__PURE__ */ N(me, { children: [
995
+ return /* @__PURE__ */ N(le, { children: [
1004
996
  /* @__PURE__ */ f(
1005
997
  "img",
1006
998
  {
@@ -1012,116 +1004,120 @@ const G = "purpur-radio-card-group__item-image", et = (e) => !!(e != null && e.s
1012
1004
  onLoad: u
1013
1005
  }
1014
1006
  ),
1015
- !n && /* @__PURE__ */ f(Ge, { className: p })
1007
+ !n && /* @__PURE__ */ f(Fe, { className: p })
1016
1008
  ] });
1017
- }, S = "purpur-radio-card-group__item", Y = (e, { disabled: t }) => typeof e == "function" ? e({ disabled: t }) : e, tt = ({ title: e, ...t }, n) => {
1018
- const { ["data-testid"]: o, body: a, children: r, disabled: i, id: u, image: c, value: p } = t, _ = { ...t };
1019
- return /* @__PURE__ */ N("div", { className: C(`${S}-container`), ref: n, children: [
1020
- /* @__PURE__ */ N(
1021
- Dr,
1022
- {
1023
- className: C(S),
1024
- "data-testid": o,
1025
- disabled: i,
1026
- id: u,
1027
- value: p,
1028
- children: [
1029
- c && /* @__PURE__ */ f("span", { className: C(`${S}-image-container`), children: et(c) ? /* @__PURE__ */ f(rt, { ...c, "data-testid": o && `${o}-image` }) : Y(c, _) }),
1030
- /* @__PURE__ */ N("span", { className: C(`${S}-content`), children: [
1031
- /* @__PURE__ */ N("span", { className: C(`${S}-top-container`), children: [
1032
- typeof e == "string" ? /* @__PURE__ */ f(
1033
- J,
1009
+ }, S = "purpur-radio-card-group__item", W = (e, { disabled: t }) => typeof e == "function" ? e({ disabled: t }) : e, ee = fe(
1010
+ ({ title: e, ...t }, n) => {
1011
+ const { ["data-testid"]: o, body: a, children: r, disabled: i, id: u, image: c, value: p } = t, _ = { ...t };
1012
+ return /* @__PURE__ */ N("div", { className: C(`${S}-container`), ref: n, children: [
1013
+ /* @__PURE__ */ N(
1014
+ $r,
1015
+ {
1016
+ className: C(S),
1017
+ "data-testid": o,
1018
+ disabled: i,
1019
+ id: u,
1020
+ value: p,
1021
+ children: [
1022
+ c && /* @__PURE__ */ f("span", { className: C(`${S}-image-container`), children: tt(c) ? /* @__PURE__ */ f(nt, { ...c, "data-testid": o && `${o}-image` }) : W(c, _) }),
1023
+ /* @__PURE__ */ N("span", { className: C(`${S}-content`), children: [
1024
+ /* @__PURE__ */ N("span", { className: C(`${S}-top-container`), children: [
1025
+ typeof e == "string" ? /* @__PURE__ */ f(
1026
+ X,
1027
+ {
1028
+ className: C(`${S}-title`),
1029
+ "data-testid": o && `${o}-title`,
1030
+ variant: "paragraph-100",
1031
+ disabled: i,
1032
+ children: e
1033
+ }
1034
+ ) : W(e, _),
1035
+ /* @__PURE__ */ f("span", { className: C(`${S}-radio`), children: /* @__PURE__ */ f(Fr, { className: C(`${S}-indicator`) }) })
1036
+ ] }),
1037
+ a && /* @__PURE__ */ f("span", { className: C(`${S}-bottom-container`), children: typeof a == "string" ? /* @__PURE__ */ f(
1038
+ X,
1034
1039
  {
1035
- className: C(`${S}-title`),
1036
- "data-testid": o && `${o}-title`,
1040
+ "data-testid": o && `${o}-body`,
1037
1041
  variant: "paragraph-100",
1038
1042
  disabled: i,
1039
- children: e
1043
+ children: a
1040
1044
  }
1041
- ) : Y(e, _),
1042
- /* @__PURE__ */ f("span", { className: C(`${S}-radio`), children: /* @__PURE__ */ f(Gr, { className: C(`${S}-indicator`) }) })
1043
- ] }),
1044
- a && /* @__PURE__ */ f("span", { className: C(`${S}-bottom-container`), children: typeof a == "string" ? /* @__PURE__ */ f(
1045
- J,
1045
+ ) : W(a, _) })
1046
+ ] })
1047
+ ]
1048
+ }
1049
+ ),
1050
+ r
1051
+ ] });
1052
+ }
1053
+ );
1054
+ ee.displayName = "RadioCardItem";
1055
+ const ot = (e) => ze(e) && (e == null ? void 0 : e.type) === ee, dt = ["horizontal", "vertical"], lt = ["right", "left"], G = "purpur-radio-card-group", at = fe(
1056
+ ({
1057
+ "data-testid": e,
1058
+ "aria-labelledby": t,
1059
+ children: n,
1060
+ className: o,
1061
+ items: a,
1062
+ heading: r,
1063
+ headingTag: i = "h2",
1064
+ loop: u = !0,
1065
+ orientation: c = "vertical",
1066
+ radioPosition: p = "right",
1067
+ ..._
1068
+ }, m) => {
1069
+ const h = ne.toArray(n).filter(ot);
1070
+ return /* @__PURE__ */ N("div", { className: C(o, `${G}__container`), ref: m, children: [
1071
+ r && /* @__PURE__ */ N(
1072
+ me,
1073
+ {
1074
+ "data-testid": e ? `${e}-heading` : void 0,
1075
+ id: `${_.id}-heading`,
1076
+ tag: i,
1077
+ variant: "subsection-100",
1078
+ children: [
1079
+ _.required && /* @__PURE__ */ f("span", { "aria-hidden": !0, children: "* " }),
1080
+ r
1081
+ ]
1082
+ }
1083
+ ),
1084
+ (!!(a != null && a.length) || h.length) && /* @__PURE__ */ N(
1085
+ Mr,
1086
+ {
1087
+ ..._,
1088
+ "aria-labelledby": t || (r ? `${_.id}-heading` : void 0),
1089
+ className: C(
1090
+ G,
1091
+ `${G}--${c}`,
1092
+ `${G}--radio-${p}`
1093
+ ),
1094
+ "data-testid": e,
1095
+ loop: u,
1096
+ children: [
1097
+ a == null ? void 0 : a.map((d) => /* @__PURE__ */ f(
1098
+ ee,
1046
1099
  {
1047
- "data-testid": o && `${o}-body`,
1048
- variant: "paragraph-100",
1049
- disabled: i,
1050
- children: a
1051
- }
1052
- ) : Y(a, _) })
1053
- ] })
1054
- ]
1055
- }
1056
- ),
1057
- r
1058
- ] });
1059
- }, te = _e(tt);
1060
- te.displayName = "RadioCardItem";
1061
- const nt = (e) => Ke(e) && (e == null ? void 0 : e.type) === te, dt = ["horizontal", "vertical"], lt = ["right", "left"], L = "purpur-radio-card-group", ot = ({
1062
- "data-testid": e,
1063
- "aria-labelledby": t,
1064
- children: n,
1065
- className: o,
1066
- items: a,
1067
- heading: r,
1068
- headingTag: i = "h2",
1069
- loop: u = !0,
1070
- orientation: c = "vertical",
1071
- radioPosition: p = "right",
1072
- ..._
1073
- }, m) => {
1074
- const g = ae.toArray(n).filter(nt);
1075
- return /* @__PURE__ */ N("div", { className: C(o, `${L}__container`), ref: m, children: [
1076
- r && /* @__PURE__ */ N(
1077
- ge,
1078
- {
1079
- "data-testid": e ? `${e}-heading` : void 0,
1080
- id: `${_.id}-heading`,
1081
- tag: i,
1082
- variant: "subsection-100",
1083
- children: [
1084
- _.required && /* @__PURE__ */ f("span", { "aria-hidden": !0, children: "* " }),
1085
- r
1086
- ]
1087
- }
1088
- ),
1089
- (!!(a != null && a.length) || g.length) && /* @__PURE__ */ N(
1090
- Fr,
1091
- {
1092
- ..._,
1093
- "aria-labelledby": t || (r ? `${_.id}-heading` : void 0),
1094
- className: C(
1095
- L,
1096
- `${L}--${c}`,
1097
- `${L}--radio-${p}`
1098
- ),
1099
- "data-testid": e,
1100
- loop: u,
1101
- children: [
1102
- a == null ? void 0 : a.map((d) => /* @__PURE__ */ f(
1103
- te,
1104
- {
1105
- ...d,
1106
- disabled: d.disabled || _.disabled,
1107
- "data-testid": e ? `${e}-item` : void 0
1108
- },
1109
- d.id
1110
- )),
1111
- ae.map(
1112
- g,
1113
- (d) => Be(d, { disabled: d.props.disabled || _.disabled })
1114
- )
1115
- ]
1116
- }
1117
- )
1118
- ] });
1119
- }, at = _e(ot);
1100
+ ...d,
1101
+ disabled: d.disabled || _.disabled,
1102
+ "data-testid": e ? `${e}-item` : void 0
1103
+ },
1104
+ d.id
1105
+ )),
1106
+ ne.map(
1107
+ h,
1108
+ (d) => Ve(d, { disabled: d.props.disabled || _.disabled })
1109
+ )
1110
+ ]
1111
+ }
1112
+ )
1113
+ ] });
1114
+ }
1115
+ );
1120
1116
  at.displayName = "RadioCardGroup";
1121
1117
  export {
1122
1118
  dt as RADIO_CARD_GROUP_ORIENTATION,
1123
1119
  lt as RADIO_POSITION,
1124
1120
  at as RadioCardGroup,
1125
- te as RadioCardItem
1121
+ ee as RadioCardItem
1126
1122
  };
1127
1123
  //# sourceMappingURL=radio-card-group.es.js.map