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