@purpurds/radio-card-group 7.11.0 → 7.13.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,8 +1,8 @@
|
|
|
1
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
|
|
3
|
+
import A, { useState as ze, forwardRef as fe, isValidElement as Ve, Children as ne, cloneElement as Ke } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function Be(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
8
|
var oe = { exports: {} };
|
|
@@ -12,7 +12,7 @@ var oe = { exports: {} };
|
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
13
|
*/
|
|
14
14
|
var ae;
|
|
15
|
-
function
|
|
15
|
+
function We() {
|
|
16
16
|
return ae || (ae = 1, function(e) {
|
|
17
17
|
(function() {
|
|
18
18
|
var t = {}.hasOwnProperty;
|
|
@@ -44,26 +44,30 @@ function Be() {
|
|
|
44
44
|
})();
|
|
45
45
|
}(oe)), oe.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const He = /* @__PURE__ */
|
|
49
|
-
"purpur-heading": "_purpur-
|
|
50
|
-
"purpur-heading--hyphens": "_purpur-heading--
|
|
51
|
-
"purpur-heading--negative": "_purpur-heading--
|
|
52
|
-
"purpur-heading--subsection-100": "_purpur-heading--subsection-
|
|
53
|
-
"purpur-heading--title-100": "_purpur-heading--title-
|
|
54
|
-
"purpur-heading--title-200": "_purpur-heading--title-
|
|
55
|
-
"purpur-heading--title-300": "_purpur-heading--title-
|
|
56
|
-
"purpur-heading--title-400": "_purpur-heading--title-
|
|
57
|
-
"purpur-heading--title-500": "_purpur-heading--title-
|
|
58
|
-
"purpur-heading--title-600": "_purpur-heading--title-
|
|
59
|
-
"purpur-heading--title-700": "_purpur-heading--title-
|
|
60
|
-
"purpur-heading--display-
|
|
61
|
-
"purpur-heading--display-
|
|
62
|
-
"purpur-heading--display-
|
|
63
|
-
"purpur-heading--display-
|
|
47
|
+
var qe = We();
|
|
48
|
+
const He = /* @__PURE__ */ Be(qe), $ = {
|
|
49
|
+
"purpur-heading": "_purpur-heading_vo751_1",
|
|
50
|
+
"purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
|
|
51
|
+
"purpur-heading--negative": "_purpur-heading--negative_vo751_11",
|
|
52
|
+
"purpur-heading--subsection-100": "_purpur-heading--subsection-100_vo751_14",
|
|
53
|
+
"purpur-heading--title-100": "_purpur-heading--title-100_vo751_20",
|
|
54
|
+
"purpur-heading--title-200": "_purpur-heading--title-200_vo751_26",
|
|
55
|
+
"purpur-heading--title-300": "_purpur-heading--title-300_vo751_32",
|
|
56
|
+
"purpur-heading--title-400": "_purpur-heading--title-400_vo751_38",
|
|
57
|
+
"purpur-heading--title-500": "_purpur-heading--title-500_vo751_44",
|
|
58
|
+
"purpur-heading--title-600": "_purpur-heading--title-600_vo751_50",
|
|
59
|
+
"purpur-heading--title-700": "_purpur-heading--title-700_vo751_56",
|
|
60
|
+
"purpur-heading--display-5": "_purpur-heading--display-5_vo751_62",
|
|
61
|
+
"purpur-heading--display-10": "_purpur-heading--display-10_vo751_68",
|
|
62
|
+
"purpur-heading--display-15": "_purpur-heading--display-15_vo751_74",
|
|
63
|
+
"purpur-heading--display-20": "_purpur-heading--display-20_vo751_80",
|
|
64
|
+
"purpur-heading--display-25": "_purpur-heading--display-25_vo751_86",
|
|
65
|
+
"purpur-heading--display-50": "_purpur-heading--display-50_vo751_92",
|
|
66
|
+
"purpur-heading--display-100": "_purpur-heading--display-100_vo751_98",
|
|
67
|
+
"purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
|
|
64
68
|
}, Ye = {
|
|
65
69
|
TITLE100: "title-100"
|
|
66
|
-
},
|
|
70
|
+
}, F = "purpur-heading", _e = ({
|
|
67
71
|
children: e,
|
|
68
72
|
className: t = "",
|
|
69
73
|
enableHyphenation: n = !1,
|
|
@@ -74,16 +78,16 @@ const He = /* @__PURE__ */ Ke(We), M = {
|
|
|
74
78
|
}) => {
|
|
75
79
|
const u = a, c = He([
|
|
76
80
|
t,
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
$[F],
|
|
82
|
+
$[`${F}--${r}`],
|
|
79
83
|
{
|
|
80
|
-
[
|
|
81
|
-
[
|
|
84
|
+
[$[`${F}--hyphens`]]: n,
|
|
85
|
+
[$[`${F}--negative`]]: o
|
|
82
86
|
}
|
|
83
87
|
]);
|
|
84
88
|
return /* @__PURE__ */ f(u, { className: c, ...i, children: e });
|
|
85
89
|
};
|
|
86
|
-
|
|
90
|
+
_e.displayName = "Heading";
|
|
87
91
|
function I(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
88
92
|
return function(a) {
|
|
89
93
|
if (e == null || e(a), n === !1 || !a.defaultPrevented)
|
|
@@ -95,7 +99,7 @@ function ie(e, t) {
|
|
|
95
99
|
return e(t);
|
|
96
100
|
e != null && (e.current = t);
|
|
97
101
|
}
|
|
98
|
-
function
|
|
102
|
+
function me(...e) {
|
|
99
103
|
return (t) => {
|
|
100
104
|
let n = !1;
|
|
101
105
|
const o = e.map((a) => {
|
|
@@ -112,27 +116,27 @@ function _e(...e) {
|
|
|
112
116
|
};
|
|
113
117
|
}
|
|
114
118
|
function P(...e) {
|
|
115
|
-
return s.useCallback(
|
|
119
|
+
return s.useCallback(me(...e), e);
|
|
116
120
|
}
|
|
117
|
-
function
|
|
121
|
+
function j(e, t = []) {
|
|
118
122
|
let n = [];
|
|
119
123
|
function o(r, i) {
|
|
120
124
|
const u = s.createContext(i), c = n.length;
|
|
121
125
|
n = [...n, i];
|
|
122
|
-
const p = (
|
|
126
|
+
const p = (_) => {
|
|
123
127
|
var y;
|
|
124
|
-
const { scope:
|
|
125
|
-
return /* @__PURE__ */ f(
|
|
128
|
+
const { scope: g, children: d, ...l } = _, h = ((y = g == null ? void 0 : g[e]) == null ? void 0 : y[c]) || u, v = s.useMemo(() => l, Object.values(l));
|
|
129
|
+
return /* @__PURE__ */ f(h.Provider, { value: v, children: d });
|
|
126
130
|
};
|
|
127
131
|
p.displayName = r + "Provider";
|
|
128
|
-
function _
|
|
129
|
-
var
|
|
130
|
-
const d = ((
|
|
132
|
+
function m(_, g) {
|
|
133
|
+
var h;
|
|
134
|
+
const d = ((h = g == null ? void 0 : g[e]) == null ? void 0 : h[c]) || u, l = s.useContext(d);
|
|
131
135
|
if (l) return l;
|
|
132
136
|
if (i !== void 0) return i;
|
|
133
|
-
throw new Error(`\`${
|
|
137
|
+
throw new Error(`\`${_}\` must be used within \`${r}\``);
|
|
134
138
|
}
|
|
135
|
-
return [p,
|
|
139
|
+
return [p, m];
|
|
136
140
|
}
|
|
137
141
|
const a = () => {
|
|
138
142
|
const r = n.map((i) => s.createContext(i));
|
|
@@ -156,8 +160,8 @@ function Xe(...e) {
|
|
|
156
160
|
}));
|
|
157
161
|
return function(r) {
|
|
158
162
|
const i = o.reduce((u, { useScope: c, scopeName: p }) => {
|
|
159
|
-
const
|
|
160
|
-
return { ...u, ...
|
|
163
|
+
const _ = c(r)[`__scope${p}`];
|
|
164
|
+
return { ...u, ..._ };
|
|
161
165
|
}, {});
|
|
162
166
|
return s.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
|
|
163
167
|
};
|
|
@@ -177,7 +181,7 @@ var H = s.forwardRef((e, t) => {
|
|
|
177
181
|
const { children: n, ...o } = e;
|
|
178
182
|
if (s.isValidElement(n)) {
|
|
179
183
|
const a = er(n), r = Qe(o, n.props);
|
|
180
|
-
return n.type !== s.Fragment && (r.ref = t ?
|
|
184
|
+
return n.type !== s.Fragment && (r.ref = t ? me(t, a) : a), s.cloneElement(n, r);
|
|
181
185
|
}
|
|
182
186
|
return s.Children.count(n) > 1 ? s.Children.only(null) : null;
|
|
183
187
|
});
|
|
@@ -218,7 +222,7 @@ var rr = [
|
|
|
218
222
|
"span",
|
|
219
223
|
"svg",
|
|
220
224
|
"ul"
|
|
221
|
-
],
|
|
225
|
+
], M = rr.reduce((e, t) => {
|
|
222
226
|
const n = s.forwardRef((o, a) => {
|
|
223
227
|
const { asChild: r, ...i } = o, u = r ? L : t;
|
|
224
228
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ f(u, { ...i, ref: a });
|
|
@@ -226,51 +230,51 @@ var rr = [
|
|
|
226
230
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
227
231
|
}, {});
|
|
228
232
|
function tr(e) {
|
|
229
|
-
const t = e + "CollectionProvider", [n, o] =
|
|
233
|
+
const t = e + "CollectionProvider", [n, o] = j(t), [a, r] = n(
|
|
230
234
|
t,
|
|
231
235
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
232
236
|
), i = (d) => {
|
|
233
|
-
const { scope: l, children:
|
|
234
|
-
return /* @__PURE__ */ f(a, { scope: l, itemMap: y, collectionRef: v, children:
|
|
237
|
+
const { scope: l, children: h } = d, v = A.useRef(null), y = A.useRef(/* @__PURE__ */ new Map()).current;
|
|
238
|
+
return /* @__PURE__ */ f(a, { scope: l, itemMap: y, collectionRef: v, children: h });
|
|
235
239
|
};
|
|
236
240
|
i.displayName = t;
|
|
237
241
|
const u = e + "CollectionSlot", c = A.forwardRef(
|
|
238
242
|
(d, l) => {
|
|
239
|
-
const { scope:
|
|
243
|
+
const { scope: h, children: v } = d, y = r(u, h), b = P(l, y.collectionRef);
|
|
240
244
|
return /* @__PURE__ */ f(L, { ref: b, children: v });
|
|
241
245
|
}
|
|
242
246
|
);
|
|
243
247
|
c.displayName = u;
|
|
244
|
-
const p = e + "CollectionItemSlot",
|
|
248
|
+
const p = e + "CollectionItemSlot", m = "data-radix-collection-item", _ = A.forwardRef(
|
|
245
249
|
(d, l) => {
|
|
246
|
-
const { scope:
|
|
247
|
-
return A.useEffect(() => (O.itemMap.set(b, { ref: b, ...y }), () => void O.itemMap.delete(b))), /* @__PURE__ */ f(L, { [
|
|
250
|
+
const { scope: h, children: v, ...y } = d, b = A.useRef(null), E = P(l, b), O = r(p, h);
|
|
251
|
+
return A.useEffect(() => (O.itemMap.set(b, { ref: b, ...y }), () => void O.itemMap.delete(b))), /* @__PURE__ */ f(L, { [m]: "", ref: E, children: v });
|
|
248
252
|
}
|
|
249
253
|
);
|
|
250
|
-
|
|
251
|
-
function
|
|
254
|
+
_.displayName = p;
|
|
255
|
+
function g(d) {
|
|
252
256
|
const l = r(e + "CollectionConsumer", d);
|
|
253
257
|
return A.useCallback(() => {
|
|
254
258
|
const v = l.collectionRef.current;
|
|
255
259
|
if (!v) return [];
|
|
256
|
-
const y = Array.from(v.querySelectorAll(`[${
|
|
260
|
+
const y = Array.from(v.querySelectorAll(`[${m}]`));
|
|
257
261
|
return Array.from(l.itemMap.values()).sort(
|
|
258
262
|
(O, x) => y.indexOf(O.ref.current) - y.indexOf(x.ref.current)
|
|
259
263
|
);
|
|
260
264
|
}, [l.collectionRef, l.itemMap]);
|
|
261
265
|
}
|
|
262
266
|
return [
|
|
263
|
-
{ Provider: i, Slot: c, ItemSlot:
|
|
264
|
-
|
|
267
|
+
{ Provider: i, Slot: c, ItemSlot: _ },
|
|
268
|
+
g,
|
|
265
269
|
o
|
|
266
270
|
];
|
|
267
271
|
}
|
|
268
|
-
var
|
|
272
|
+
var U = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
|
|
269
273
|
}, nr = s.useId || (() => {
|
|
270
274
|
}), or = 0;
|
|
271
275
|
function ar(e) {
|
|
272
276
|
const [t, n] = s.useState(nr());
|
|
273
|
-
return
|
|
277
|
+
return U(() => {
|
|
274
278
|
n((o) => o ?? String(or++));
|
|
275
279
|
}, [e]), t ? `radix-${t}` : "";
|
|
276
280
|
}
|
|
@@ -283,7 +287,7 @@ function Z(e) {
|
|
|
283
287
|
return (o = t.current) == null ? void 0 : o.call(t, ...n);
|
|
284
288
|
}, []);
|
|
285
289
|
}
|
|
286
|
-
function
|
|
290
|
+
function ge({
|
|
287
291
|
prop: e,
|
|
288
292
|
defaultProp: t,
|
|
289
293
|
onChange: n = () => {
|
|
@@ -292,8 +296,8 @@ function he({
|
|
|
292
296
|
const [o, a] = ir({ defaultProp: t, onChange: n }), r = e !== void 0, i = r ? e : o, u = Z(n), c = s.useCallback(
|
|
293
297
|
(p) => {
|
|
294
298
|
if (r) {
|
|
295
|
-
const
|
|
296
|
-
|
|
299
|
+
const _ = typeof p == "function" ? p(e) : p;
|
|
300
|
+
_ !== e && u(_);
|
|
297
301
|
} else
|
|
298
302
|
a(p);
|
|
299
303
|
},
|
|
@@ -311,17 +315,17 @@ function ir({
|
|
|
311
315
|
}, [o, a, r]), n;
|
|
312
316
|
}
|
|
313
317
|
var ur = s.createContext(void 0);
|
|
314
|
-
function
|
|
318
|
+
function he(e) {
|
|
315
319
|
const t = s.useContext(ur);
|
|
316
320
|
return e || t || "ltr";
|
|
317
321
|
}
|
|
318
|
-
var
|
|
319
|
-
|
|
322
|
+
var K = "rovingFocusGroup.onEntryFocus", sr = { bubbles: !1, cancelable: !0 }, z = "RovingFocusGroup", [Y, ve, cr] = tr(z), [pr, ye] = j(
|
|
323
|
+
z,
|
|
320
324
|
[cr]
|
|
321
|
-
), [dr, lr] = pr(
|
|
325
|
+
), [dr, lr] = pr(z), be = s.forwardRef(
|
|
322
326
|
(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
327
|
);
|
|
324
|
-
be.displayName =
|
|
328
|
+
be.displayName = z;
|
|
325
329
|
var fr = s.forwardRef((e, t) => {
|
|
326
330
|
const {
|
|
327
331
|
__scopeRovingFocusGroup: n,
|
|
@@ -332,17 +336,17 @@ var fr = s.forwardRef((e, t) => {
|
|
|
332
336
|
defaultCurrentTabStopId: u,
|
|
333
337
|
onCurrentTabStopIdChange: c,
|
|
334
338
|
onEntryFocus: p,
|
|
335
|
-
preventScrollOnEntryFocus:
|
|
336
|
-
...
|
|
337
|
-
} = e,
|
|
339
|
+
preventScrollOnEntryFocus: m = !1,
|
|
340
|
+
..._
|
|
341
|
+
} = e, g = s.useRef(null), d = P(t, g), l = he(r), [h = null, v] = ge({
|
|
338
342
|
prop: i,
|
|
339
343
|
defaultProp: u,
|
|
340
344
|
onChange: c
|
|
341
345
|
}), [y, b] = s.useState(!1), E = Z(p), O = ve(n), x = s.useRef(!1), [De, re] = s.useState(0);
|
|
342
346
|
return s.useEffect(() => {
|
|
343
|
-
const R =
|
|
347
|
+
const R = g.current;
|
|
344
348
|
if (R)
|
|
345
|
-
return R.addEventListener(
|
|
349
|
+
return R.addEventListener(K, E), () => R.removeEventListener(K, E);
|
|
346
350
|
}, [E]), /* @__PURE__ */ f(
|
|
347
351
|
dr,
|
|
348
352
|
{
|
|
@@ -350,7 +354,7 @@ var fr = s.forwardRef((e, t) => {
|
|
|
350
354
|
orientation: o,
|
|
351
355
|
dir: l,
|
|
352
356
|
loop: a,
|
|
353
|
-
currentTabStopId:
|
|
357
|
+
currentTabStopId: h,
|
|
354
358
|
onItemFocus: s.useCallback(
|
|
355
359
|
(R) => v(R),
|
|
356
360
|
[v]
|
|
@@ -365,11 +369,11 @@ var fr = s.forwardRef((e, t) => {
|
|
|
365
369
|
[]
|
|
366
370
|
),
|
|
367
371
|
children: /* @__PURE__ */ f(
|
|
368
|
-
|
|
372
|
+
M.div,
|
|
369
373
|
{
|
|
370
374
|
tabIndex: y || De === 0 ? -1 : 0,
|
|
371
375
|
"data-orientation": o,
|
|
372
|
-
...
|
|
376
|
+
..._,
|
|
373
377
|
ref: d,
|
|
374
378
|
style: { outline: "none", ...e.style },
|
|
375
379
|
onMouseDown: I(e.onMouseDown, () => {
|
|
@@ -378,12 +382,12 @@ var fr = s.forwardRef((e, t) => {
|
|
|
378
382
|
onFocus: I(e.onFocus, (R) => {
|
|
379
383
|
const Ge = !x.current;
|
|
380
384
|
if (R.target === R.currentTarget && Ge && !y) {
|
|
381
|
-
const te = new CustomEvent(
|
|
385
|
+
const te = new CustomEvent(K, sr);
|
|
382
386
|
if (R.currentTarget.dispatchEvent(te), !te.defaultPrevented) {
|
|
383
|
-
const
|
|
387
|
+
const V = O().filter((w) => w.focusable), Le = V.find((w) => w.active), Ue = V.find((w) => w.id === h), je = [Le, Ue, ...V].filter(
|
|
384
388
|
Boolean
|
|
385
389
|
).map((w) => w.ref.current);
|
|
386
|
-
Se(
|
|
390
|
+
Se(je, m);
|
|
387
391
|
}
|
|
388
392
|
}
|
|
389
393
|
x.current = !1;
|
|
@@ -401,11 +405,11 @@ var fr = s.forwardRef((e, t) => {
|
|
|
401
405
|
active: a = !1,
|
|
402
406
|
tabStopId: r,
|
|
403
407
|
...i
|
|
404
|
-
} = e, u = ar(), c = r || u, p = lr(Re, n),
|
|
408
|
+
} = e, u = ar(), c = r || u, p = lr(Re, n), m = p.currentTabStopId === c, _ = ve(n), { onFocusableItemAdd: g, onFocusableItemRemove: d } = p;
|
|
405
409
|
return s.useEffect(() => {
|
|
406
410
|
if (o)
|
|
407
|
-
return
|
|
408
|
-
}, [o,
|
|
411
|
+
return g(), () => d();
|
|
412
|
+
}, [o, g, d]), /* @__PURE__ */ f(
|
|
409
413
|
Y.ItemSlot,
|
|
410
414
|
{
|
|
411
415
|
scope: n,
|
|
@@ -413,9 +417,9 @@ var fr = s.forwardRef((e, t) => {
|
|
|
413
417
|
focusable: o,
|
|
414
418
|
active: a,
|
|
415
419
|
children: /* @__PURE__ */ f(
|
|
416
|
-
|
|
420
|
+
M.span,
|
|
417
421
|
{
|
|
418
|
-
tabIndex:
|
|
422
|
+
tabIndex: m ? 0 : -1,
|
|
419
423
|
"data-orientation": p.orientation,
|
|
420
424
|
...i,
|
|
421
425
|
ref: t,
|
|
@@ -429,16 +433,16 @@ var fr = s.forwardRef((e, t) => {
|
|
|
429
433
|
return;
|
|
430
434
|
}
|
|
431
435
|
if (l.target !== l.currentTarget) return;
|
|
432
|
-
const
|
|
433
|
-
if (
|
|
436
|
+
const h = gr(l, p.orientation, p.dir);
|
|
437
|
+
if (h !== void 0) {
|
|
434
438
|
if (l.metaKey || l.ctrlKey || l.altKey || l.shiftKey) return;
|
|
435
439
|
l.preventDefault();
|
|
436
|
-
let y =
|
|
437
|
-
if (
|
|
438
|
-
else if (
|
|
439
|
-
|
|
440
|
+
let y = _().filter((b) => b.focusable).map((b) => b.ref.current);
|
|
441
|
+
if (h === "last") y.reverse();
|
|
442
|
+
else if (h === "prev" || h === "next") {
|
|
443
|
+
h === "prev" && y.reverse();
|
|
440
444
|
const b = y.indexOf(l.currentTarget);
|
|
441
|
-
y = p.loop ?
|
|
445
|
+
y = p.loop ? hr(y, b + 1) : y.slice(b + 1);
|
|
442
446
|
}
|
|
443
447
|
setTimeout(() => Se(y));
|
|
444
448
|
}
|
|
@@ -450,7 +454,7 @@ var fr = s.forwardRef((e, t) => {
|
|
|
450
454
|
}
|
|
451
455
|
);
|
|
452
456
|
Ce.displayName = Re;
|
|
453
|
-
var
|
|
457
|
+
var _r = {
|
|
454
458
|
ArrowLeft: "prev",
|
|
455
459
|
ArrowUp: "prev",
|
|
456
460
|
ArrowRight: "next",
|
|
@@ -460,26 +464,26 @@ var mr = {
|
|
|
460
464
|
PageDown: "last",
|
|
461
465
|
End: "last"
|
|
462
466
|
};
|
|
463
|
-
function
|
|
467
|
+
function mr(e, t) {
|
|
464
468
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
465
469
|
}
|
|
466
|
-
function
|
|
467
|
-
const o =
|
|
470
|
+
function gr(e, t, n) {
|
|
471
|
+
const o = mr(e.key, n);
|
|
468
472
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
469
|
-
return
|
|
473
|
+
return _r[o];
|
|
470
474
|
}
|
|
471
475
|
function Se(e, t = !1) {
|
|
472
476
|
const n = document.activeElement;
|
|
473
477
|
for (const o of e)
|
|
474
478
|
if (o === n || (o.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
475
479
|
}
|
|
476
|
-
function
|
|
480
|
+
function hr(e, t) {
|
|
477
481
|
return e.map((n, o) => e[(t + o) % e.length]);
|
|
478
482
|
}
|
|
479
483
|
var vr = be, yr = Ce;
|
|
480
484
|
function br(e) {
|
|
481
485
|
const [t, n] = s.useState(void 0);
|
|
482
|
-
return
|
|
486
|
+
return U(() => {
|
|
483
487
|
if (e) {
|
|
484
488
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
485
489
|
const o = new ResizeObserver((a) => {
|
|
@@ -526,30 +530,30 @@ function Sr(e) {
|
|
|
526
530
|
}
|
|
527
531
|
});
|
|
528
532
|
return s.useEffect(() => {
|
|
529
|
-
const p =
|
|
533
|
+
const p = k(o.current);
|
|
530
534
|
r.current = u === "mounted" ? p : "none";
|
|
531
|
-
}, [u]),
|
|
532
|
-
const p = o.current,
|
|
533
|
-
if (
|
|
534
|
-
const
|
|
535
|
-
e ? c("MOUNT") : d === "none" || (p == null ? void 0 : p.display) === "none" ? c("UNMOUNT") : c(
|
|
535
|
+
}, [u]), U(() => {
|
|
536
|
+
const p = o.current, m = a.current;
|
|
537
|
+
if (m !== e) {
|
|
538
|
+
const g = r.current, d = k(p);
|
|
539
|
+
e ? c("MOUNT") : d === "none" || (p == null ? void 0 : p.display) === "none" ? c("UNMOUNT") : c(m && g !== d ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
536
540
|
}
|
|
537
|
-
}, [e, c]),
|
|
541
|
+
}, [e, c]), U(() => {
|
|
538
542
|
if (t) {
|
|
539
543
|
let p;
|
|
540
|
-
const
|
|
541
|
-
const
|
|
542
|
-
if (d.target === t &&
|
|
544
|
+
const m = t.ownerDocument.defaultView ?? window, _ = (d) => {
|
|
545
|
+
const h = k(o.current).includes(d.animationName);
|
|
546
|
+
if (d.target === t && h && (c("ANIMATION_END"), !a.current)) {
|
|
543
547
|
const v = t.style.animationFillMode;
|
|
544
|
-
t.style.animationFillMode = "forwards", p =
|
|
548
|
+
t.style.animationFillMode = "forwards", p = m.setTimeout(() => {
|
|
545
549
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
546
550
|
});
|
|
547
551
|
}
|
|
548
|
-
},
|
|
549
|
-
d.target === t && (r.current =
|
|
552
|
+
}, g = (d) => {
|
|
553
|
+
d.target === t && (r.current = k(o.current));
|
|
550
554
|
};
|
|
551
|
-
return t.addEventListener("animationstart",
|
|
552
|
-
|
|
555
|
+
return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", _), t.addEventListener("animationend", _), () => {
|
|
556
|
+
m.clearTimeout(p), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", _), t.removeEventListener("animationend", _);
|
|
553
557
|
};
|
|
554
558
|
} else
|
|
555
559
|
c("ANIMATION_END");
|
|
@@ -560,7 +564,7 @@ function Sr(e) {
|
|
|
560
564
|
}, [])
|
|
561
565
|
};
|
|
562
566
|
}
|
|
563
|
-
function
|
|
567
|
+
function k(e) {
|
|
564
568
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
565
569
|
}
|
|
566
570
|
function Nr(e) {
|
|
@@ -568,7 +572,7 @@ function Nr(e) {
|
|
|
568
572
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
569
573
|
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
574
|
}
|
|
571
|
-
var J = "Radio", [Ir, Ie] =
|
|
575
|
+
var J = "Radio", [Ir, Ie] = j(J), [wr, Ar] = Ir(J), we = s.forwardRef(
|
|
572
576
|
(e, t) => {
|
|
573
577
|
const {
|
|
574
578
|
__scopeRadio: n,
|
|
@@ -579,11 +583,11 @@ var J = "Radio", [Ir, Ie] = U(J), [wr, Ar] = Ir(J), we = s.forwardRef(
|
|
|
579
583
|
value: u = "on",
|
|
580
584
|
onCheck: c,
|
|
581
585
|
form: p,
|
|
582
|
-
...
|
|
583
|
-
} = e, [
|
|
586
|
+
...m
|
|
587
|
+
} = e, [_, g] = s.useState(null), d = P(t, (v) => g(v)), l = s.useRef(!1), h = _ ? p || !!_.closest("form") : !0;
|
|
584
588
|
return /* @__PURE__ */ N(wr, { scope: n, checked: a, disabled: i, children: [
|
|
585
589
|
/* @__PURE__ */ f(
|
|
586
|
-
|
|
590
|
+
M.button,
|
|
587
591
|
{
|
|
588
592
|
type: "button",
|
|
589
593
|
role: "radio",
|
|
@@ -592,17 +596,17 @@ var J = "Radio", [Ir, Ie] = U(J), [wr, Ar] = Ir(J), we = s.forwardRef(
|
|
|
592
596
|
"data-disabled": i ? "" : void 0,
|
|
593
597
|
disabled: i,
|
|
594
598
|
value: u,
|
|
595
|
-
...
|
|
599
|
+
...m,
|
|
596
600
|
ref: d,
|
|
597
601
|
onClick: I(e.onClick, (v) => {
|
|
598
|
-
a || c == null || c(),
|
|
602
|
+
a || c == null || c(), h && (l.current = v.isPropagationStopped(), l.current || v.stopPropagation());
|
|
599
603
|
})
|
|
600
604
|
}
|
|
601
605
|
),
|
|
602
|
-
|
|
606
|
+
h && /* @__PURE__ */ f(
|
|
603
607
|
Er,
|
|
604
608
|
{
|
|
605
|
-
control:
|
|
609
|
+
control: _,
|
|
606
610
|
bubbles: !l.current,
|
|
607
611
|
name: o,
|
|
608
612
|
value: u,
|
|
@@ -621,7 +625,7 @@ var Ae = "RadioIndicator", Ee = s.forwardRef(
|
|
|
621
625
|
(e, t) => {
|
|
622
626
|
const { __scopeRadio: n, forceMount: o, ...a } = e, r = Ar(Ae, n);
|
|
623
627
|
return /* @__PURE__ */ f(Ne, { present: o || r.checked, children: /* @__PURE__ */ f(
|
|
624
|
-
|
|
628
|
+
M.span,
|
|
625
629
|
{
|
|
626
630
|
"data-state": Oe(r.checked),
|
|
627
631
|
"data-disabled": r.disabled ? "" : void 0,
|
|
@@ -635,10 +639,10 @@ Ee.displayName = Ae;
|
|
|
635
639
|
var Er = (e) => {
|
|
636
640
|
const { control: t, checked: n, bubbles: o = !0, ...a } = e, r = s.useRef(null), i = Rr(n), u = br(t);
|
|
637
641
|
return s.useEffect(() => {
|
|
638
|
-
const c = r.current, p = window.HTMLInputElement.prototype,
|
|
639
|
-
if (i !== n &&
|
|
640
|
-
const
|
|
641
|
-
|
|
642
|
+
const c = r.current, p = window.HTMLInputElement.prototype, _ = Object.getOwnPropertyDescriptor(p, "checked").set;
|
|
643
|
+
if (i !== n && _) {
|
|
644
|
+
const g = new Event("click", { bubbles: o });
|
|
645
|
+
_.call(c, n), c.dispatchEvent(g);
|
|
642
646
|
}
|
|
643
647
|
}, [i, n, o]), /* @__PURE__ */ f(
|
|
644
648
|
"input",
|
|
@@ -663,10 +667,10 @@ var Er = (e) => {
|
|
|
663
667
|
function Oe(e) {
|
|
664
668
|
return e ? "checked" : "unchecked";
|
|
665
669
|
}
|
|
666
|
-
var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup", [Pr, pt] =
|
|
670
|
+
var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup", [Pr, pt] = j(Q, [
|
|
667
671
|
ye,
|
|
668
672
|
Ie
|
|
669
|
-
]), Pe = ye(), xe = Ie(), [xr,
|
|
673
|
+
]), Pe = ye(), xe = Ie(), [xr, Tr] = Pr(Q), Te = s.forwardRef(
|
|
670
674
|
(e, t) => {
|
|
671
675
|
const {
|
|
672
676
|
__scopeRadioGroup: n,
|
|
@@ -677,13 +681,13 @@ var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup",
|
|
|
677
681
|
disabled: u = !1,
|
|
678
682
|
orientation: c,
|
|
679
683
|
dir: p,
|
|
680
|
-
loop:
|
|
681
|
-
onValueChange:
|
|
682
|
-
...
|
|
683
|
-
} = e, d = Pe(n), l =
|
|
684
|
+
loop: m = !0,
|
|
685
|
+
onValueChange: _,
|
|
686
|
+
...g
|
|
687
|
+
} = e, d = Pe(n), l = he(p), [h, v] = ge({
|
|
684
688
|
prop: r,
|
|
685
689
|
defaultProp: a,
|
|
686
|
-
onChange:
|
|
690
|
+
onChange: _
|
|
687
691
|
});
|
|
688
692
|
return /* @__PURE__ */ f(
|
|
689
693
|
xr,
|
|
@@ -692,7 +696,7 @@ var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup",
|
|
|
692
696
|
name: o,
|
|
693
697
|
required: i,
|
|
694
698
|
disabled: u,
|
|
695
|
-
value:
|
|
699
|
+
value: h,
|
|
696
700
|
onValueChange: v,
|
|
697
701
|
children: /* @__PURE__ */ f(
|
|
698
702
|
vr,
|
|
@@ -701,16 +705,16 @@ var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup",
|
|
|
701
705
|
...d,
|
|
702
706
|
orientation: c,
|
|
703
707
|
dir: l,
|
|
704
|
-
loop:
|
|
708
|
+
loop: m,
|
|
705
709
|
children: /* @__PURE__ */ f(
|
|
706
|
-
|
|
710
|
+
M.div,
|
|
707
711
|
{
|
|
708
712
|
role: "radiogroup",
|
|
709
713
|
"aria-required": i,
|
|
710
714
|
"aria-orientation": c,
|
|
711
715
|
"data-disabled": u ? "" : void 0,
|
|
712
716
|
dir: l,
|
|
713
|
-
...
|
|
717
|
+
...g,
|
|
714
718
|
ref: t
|
|
715
719
|
}
|
|
716
720
|
)
|
|
@@ -720,14 +724,14 @@ var Or = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], Q = "RadioGroup",
|
|
|
720
724
|
);
|
|
721
725
|
}
|
|
722
726
|
);
|
|
723
|
-
|
|
724
|
-
var
|
|
727
|
+
Te.displayName = Q;
|
|
728
|
+
var Me = "RadioGroupItem", $e = s.forwardRef(
|
|
725
729
|
(e, t) => {
|
|
726
|
-
const { __scopeRadioGroup: n, disabled: o, ...a } = e, r =
|
|
730
|
+
const { __scopeRadioGroup: n, disabled: o, ...a } = e, r = Tr(Me, n), i = r.disabled || o, u = Pe(n), c = xe(n), p = s.useRef(null), m = P(t, p), _ = r.value === a.value, g = s.useRef(!1);
|
|
727
731
|
return s.useEffect(() => {
|
|
728
|
-
const d = (
|
|
729
|
-
Or.includes(
|
|
730
|
-
}, l = () =>
|
|
732
|
+
const d = (h) => {
|
|
733
|
+
Or.includes(h.key) && (g.current = !0);
|
|
734
|
+
}, l = () => g.current = !1;
|
|
731
735
|
return document.addEventListener("keydown", d), document.addEventListener("keyup", l), () => {
|
|
732
736
|
document.removeEventListener("keydown", d), document.removeEventListener("keyup", l);
|
|
733
737
|
};
|
|
@@ -737,24 +741,24 @@ var Te = "RadioGroupItem", Me = s.forwardRef(
|
|
|
737
741
|
asChild: !0,
|
|
738
742
|
...u,
|
|
739
743
|
focusable: !i,
|
|
740
|
-
active:
|
|
744
|
+
active: _,
|
|
741
745
|
children: /* @__PURE__ */ f(
|
|
742
746
|
we,
|
|
743
747
|
{
|
|
744
748
|
disabled: i,
|
|
745
749
|
required: r.required,
|
|
746
|
-
checked:
|
|
750
|
+
checked: _,
|
|
747
751
|
...c,
|
|
748
752
|
...a,
|
|
749
753
|
name: r.name,
|
|
750
|
-
ref:
|
|
754
|
+
ref: m,
|
|
751
755
|
onCheck: () => r.onValueChange(a.value),
|
|
752
756
|
onKeyDown: I((d) => {
|
|
753
757
|
d.key === "Enter" && d.preventDefault();
|
|
754
758
|
}),
|
|
755
759
|
onFocus: I(a.onFocus, () => {
|
|
756
760
|
var d;
|
|
757
|
-
|
|
761
|
+
g.current && ((d = p.current) == null || d.click());
|
|
758
762
|
})
|
|
759
763
|
}
|
|
760
764
|
)
|
|
@@ -762,19 +766,19 @@ var Te = "RadioGroupItem", Me = s.forwardRef(
|
|
|
762
766
|
);
|
|
763
767
|
}
|
|
764
768
|
);
|
|
765
|
-
|
|
766
|
-
var
|
|
769
|
+
$e.displayName = Me;
|
|
770
|
+
var Mr = "RadioGroupIndicator", Fe = s.forwardRef(
|
|
767
771
|
(e, t) => {
|
|
768
772
|
const { __scopeRadioGroup: n, ...o } = e, a = xe(n);
|
|
769
773
|
return /* @__PURE__ */ f(Ee, { ...a, ...o, ref: t });
|
|
770
774
|
}
|
|
771
775
|
);
|
|
772
|
-
|
|
773
|
-
var
|
|
776
|
+
Fe.displayName = Mr;
|
|
777
|
+
var $r = Te, Fr = $e, kr = Fe;
|
|
774
778
|
function Dr(e) {
|
|
775
779
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
776
780
|
}
|
|
777
|
-
var
|
|
781
|
+
var B = { exports: {} };
|
|
778
782
|
/*!
|
|
779
783
|
Copyright (c) 2018 Jed Watson.
|
|
780
784
|
Licensed under the MIT License (MIT), see
|
|
@@ -811,10 +815,10 @@ function Gr() {
|
|
|
811
815
|
}
|
|
812
816
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
813
817
|
})();
|
|
814
|
-
}(
|
|
818
|
+
}(B)), B.exports;
|
|
815
819
|
}
|
|
816
820
|
var Lr = Gr();
|
|
817
|
-
const
|
|
821
|
+
const Ur = /* @__PURE__ */ Dr(Lr), jr = {
|
|
818
822
|
"purpur-radio-card-group": "_purpur-radio-card-group_19msf_1",
|
|
819
823
|
"purpur-radio-card-group--vertical": "_purpur-radio-card-group--vertical_19msf_5",
|
|
820
824
|
"purpur-radio-card-group--horizontal": "_purpur-radio-card-group--horizontal_19msf_9",
|
|
@@ -834,8 +838,8 @@ const qr = /* @__PURE__ */ Dr(Lr), Ur = {
|
|
|
834
838
|
"purpur-radio-card-group__item-image-placeholder": "_purpur-radio-card-group__item-image-placeholder_19msf_167",
|
|
835
839
|
"purpur-radio-card-group__item-image-placeholder--loaded": "_purpur-radio-card-group__item-image-placeholder--loaded_19msf_172",
|
|
836
840
|
"purpur-radio-card-group__item-children": "_purpur-radio-card-group__item-children_19msf_175"
|
|
837
|
-
}, C =
|
|
838
|
-
function
|
|
841
|
+
}, C = Ur.bind(jr);
|
|
842
|
+
function zr(e) {
|
|
839
843
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
840
844
|
}
|
|
841
845
|
var se = { exports: {} };
|
|
@@ -845,7 +849,7 @@ var se = { exports: {} };
|
|
|
845
849
|
http://jedwatson.github.io/classnames
|
|
846
850
|
*/
|
|
847
851
|
var ce;
|
|
848
|
-
function
|
|
852
|
+
function Vr() {
|
|
849
853
|
return ce || (ce = 1, function(e) {
|
|
850
854
|
(function() {
|
|
851
855
|
var t = {}.hasOwnProperty;
|
|
@@ -877,8 +881,8 @@ function zr() {
|
|
|
877
881
|
})();
|
|
878
882
|
}(se)), se.exports;
|
|
879
883
|
}
|
|
880
|
-
var
|
|
881
|
-
const
|
|
884
|
+
var Kr = Vr();
|
|
885
|
+
const Br = /* @__PURE__ */ zr(Kr), Wr = {
|
|
882
886
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
883
887
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
884
888
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -893,9 +897,9 @@ const Kr = /* @__PURE__ */ jr(Vr), Br = {
|
|
|
893
897
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
894
898
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
895
899
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
896
|
-
},
|
|
900
|
+
}, qr = Br.bind(Wr), Hr = {
|
|
897
901
|
PARAGRAPH100: "paragraph-100"
|
|
898
|
-
},
|
|
902
|
+
}, T = "purpur-paragraph", X = ({
|
|
899
903
|
children: e,
|
|
900
904
|
className: t,
|
|
901
905
|
disabled: n,
|
|
@@ -904,10 +908,10 @@ const Kr = /* @__PURE__ */ jr(Vr), Br = {
|
|
|
904
908
|
variant: r = Hr.PARAGRAPH100,
|
|
905
909
|
...i
|
|
906
910
|
}) => {
|
|
907
|
-
const u =
|
|
908
|
-
[`${
|
|
909
|
-
[`${
|
|
910
|
-
[`${
|
|
911
|
+
const u = qr(t, T, `${T}--${r}`, {
|
|
912
|
+
[`${T}--hyphens`]: o,
|
|
913
|
+
[`${T}--disabled`]: n,
|
|
914
|
+
[`${T}--negative`]: a
|
|
911
915
|
});
|
|
912
916
|
return /* @__PURE__ */ f("p", { ...i, className: u, children: e });
|
|
913
917
|
};
|
|
@@ -965,7 +969,7 @@ const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_93tal_1", et = {
|
|
|
965
969
|
"purpur-skeleton--md": "_purpur-skeleton--md_93tal_42",
|
|
966
970
|
"purpur-skeleton--lg": "_purpur-skeleton--lg_93tal_45",
|
|
967
971
|
"purpur-skeleton--full": "_purpur-skeleton--full_93tal_48"
|
|
968
|
-
}, rt = Jr.bind(et),
|
|
972
|
+
}, rt = Jr.bind(et), W = "purpur-skeleton", ke = ({
|
|
969
973
|
className: e,
|
|
970
974
|
radius: t = "xs",
|
|
971
975
|
negative: n = !1,
|
|
@@ -973,13 +977,13 @@ const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_93tal_1", et = {
|
|
|
973
977
|
}) => {
|
|
974
978
|
const a = rt(
|
|
975
979
|
e,
|
|
976
|
-
|
|
977
|
-
`${
|
|
978
|
-
`${
|
|
980
|
+
W,
|
|
981
|
+
`${W}--${n ? "negative" : "default"}`,
|
|
982
|
+
`${W}--${t}`
|
|
979
983
|
);
|
|
980
984
|
return /* @__PURE__ */ f("div", { className: a, ...o });
|
|
981
985
|
};
|
|
982
|
-
|
|
986
|
+
ke.displayName = "Skeleton";
|
|
983
987
|
const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.src) && !!e.altText, nt = ({
|
|
984
988
|
src: e,
|
|
985
989
|
altText: t,
|
|
@@ -987,7 +991,7 @@ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.s
|
|
|
987
991
|
loading: o = "lazy",
|
|
988
992
|
["data-testid"]: a
|
|
989
993
|
}) => {
|
|
990
|
-
const [r, i] =
|
|
994
|
+
const [r, i] = ze(!1), u = () => i(!0), c = C(D, {
|
|
991
995
|
[`${D}--loaded`]: r
|
|
992
996
|
}), p = C(`${D}-placeholder`, {
|
|
993
997
|
[`${D}-placeholder--loaded`]: r
|
|
@@ -1004,14 +1008,14 @@ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.s
|
|
|
1004
1008
|
onLoad: u
|
|
1005
1009
|
}
|
|
1006
1010
|
),
|
|
1007
|
-
!n && /* @__PURE__ */ f(
|
|
1011
|
+
!n && /* @__PURE__ */ f(ke, { className: p })
|
|
1008
1012
|
] });
|
|
1009
|
-
}, S = "purpur-radio-card-group__item",
|
|
1013
|
+
}, S = "purpur-radio-card-group__item", q = (e, { disabled: t }) => typeof e == "function" ? e({ disabled: t }) : e, ee = fe(
|
|
1010
1014
|
({ title: e, ...t }, n) => {
|
|
1011
|
-
const { ["data-testid"]: o, body: a, children: r, disabled: i, id: u, image: c, value: p } = t,
|
|
1015
|
+
const { ["data-testid"]: o, body: a, children: r, disabled: i, id: u, image: c, value: p } = t, m = { ...t };
|
|
1012
1016
|
return /* @__PURE__ */ N("div", { className: C(`${S}-container`), ref: n, children: [
|
|
1013
1017
|
/* @__PURE__ */ N(
|
|
1014
|
-
|
|
1018
|
+
Fr,
|
|
1015
1019
|
{
|
|
1016
1020
|
className: C(S),
|
|
1017
1021
|
"data-testid": o,
|
|
@@ -1019,7 +1023,7 @@ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.s
|
|
|
1019
1023
|
id: u,
|
|
1020
1024
|
value: p,
|
|
1021
1025
|
children: [
|
|
1022
|
-
c && /* @__PURE__ */ f("span", { className: C(`${S}-image-container`), children: tt(c) ? /* @__PURE__ */ f(nt, { ...c, "data-testid": o && `${o}-image` }) :
|
|
1026
|
+
c && /* @__PURE__ */ f("span", { className: C(`${S}-image-container`), children: tt(c) ? /* @__PURE__ */ f(nt, { ...c, "data-testid": o && `${o}-image` }) : q(c, m) }),
|
|
1023
1027
|
/* @__PURE__ */ N("span", { className: C(`${S}-content`), children: [
|
|
1024
1028
|
/* @__PURE__ */ N("span", { className: C(`${S}-top-container`), children: [
|
|
1025
1029
|
typeof e == "string" ? /* @__PURE__ */ f(
|
|
@@ -1031,8 +1035,8 @@ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.s
|
|
|
1031
1035
|
disabled: i,
|
|
1032
1036
|
children: e
|
|
1033
1037
|
}
|
|
1034
|
-
) :
|
|
1035
|
-
/* @__PURE__ */ f("span", { className: C(`${S}-radio`), children: /* @__PURE__ */ f(
|
|
1038
|
+
) : q(e, m),
|
|
1039
|
+
/* @__PURE__ */ f("span", { className: C(`${S}-radio`), children: /* @__PURE__ */ f(kr, { className: C(`${S}-indicator`) }) })
|
|
1036
1040
|
] }),
|
|
1037
1041
|
a && /* @__PURE__ */ f("span", { className: C(`${S}-bottom-container`), children: typeof a == "string" ? /* @__PURE__ */ f(
|
|
1038
1042
|
X,
|
|
@@ -1042,7 +1046,7 @@ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.s
|
|
|
1042
1046
|
disabled: i,
|
|
1043
1047
|
children: a
|
|
1044
1048
|
}
|
|
1045
|
-
) :
|
|
1049
|
+
) : q(a, m) })
|
|
1046
1050
|
] })
|
|
1047
1051
|
]
|
|
1048
1052
|
}
|
|
@@ -1052,7 +1056,7 @@ const D = "purpur-radio-card-group__item-image", tt = (e) => !!(e != null && e.s
|
|
|
1052
1056
|
}
|
|
1053
1057
|
);
|
|
1054
1058
|
ee.displayName = "RadioCardItem";
|
|
1055
|
-
const ot = (e) =>
|
|
1059
|
+
const ot = (e) => Ve(e) && (e == null ? void 0 : e.type) === ee, dt = ["horizontal", "vertical"], lt = ["right", "left"], G = "purpur-radio-card-group", at = fe(
|
|
1056
1060
|
({
|
|
1057
1061
|
"data-testid": e,
|
|
1058
1062
|
"aria-labelledby": t,
|
|
@@ -1064,28 +1068,28 @@ const ot = (e) => ze(e) && (e == null ? void 0 : e.type) === ee, dt = ["horizont
|
|
|
1064
1068
|
loop: u = !0,
|
|
1065
1069
|
orientation: c = "vertical",
|
|
1066
1070
|
radioPosition: p = "right",
|
|
1067
|
-
...
|
|
1068
|
-
},
|
|
1069
|
-
const
|
|
1070
|
-
return /* @__PURE__ */ N("div", { className: C(o, `${G}__container`), ref:
|
|
1071
|
+
...m
|
|
1072
|
+
}, _) => {
|
|
1073
|
+
const g = ne.toArray(n).filter(ot);
|
|
1074
|
+
return /* @__PURE__ */ N("div", { className: C(o, `${G}__container`), ref: _, children: [
|
|
1071
1075
|
r && /* @__PURE__ */ N(
|
|
1072
|
-
|
|
1076
|
+
_e,
|
|
1073
1077
|
{
|
|
1074
1078
|
"data-testid": e ? `${e}-heading` : void 0,
|
|
1075
|
-
id: `${
|
|
1079
|
+
id: `${m.id}-heading`,
|
|
1076
1080
|
tag: i,
|
|
1077
1081
|
variant: "subsection-100",
|
|
1078
1082
|
children: [
|
|
1079
|
-
|
|
1083
|
+
m.required && /* @__PURE__ */ f("span", { "aria-hidden": !0, children: "* " }),
|
|
1080
1084
|
r
|
|
1081
1085
|
]
|
|
1082
1086
|
}
|
|
1083
1087
|
),
|
|
1084
|
-
(!!(a != null && a.length) ||
|
|
1085
|
-
|
|
1088
|
+
(!!(a != null && a.length) || g.length) && /* @__PURE__ */ N(
|
|
1089
|
+
$r,
|
|
1086
1090
|
{
|
|
1087
|
-
...
|
|
1088
|
-
"aria-labelledby": t || (r ? `${
|
|
1091
|
+
...m,
|
|
1092
|
+
"aria-labelledby": t || (r ? `${m.id}-heading` : void 0),
|
|
1089
1093
|
className: C(
|
|
1090
1094
|
G,
|
|
1091
1095
|
`${G}--${c}`,
|
|
@@ -1098,14 +1102,14 @@ const ot = (e) => ze(e) && (e == null ? void 0 : e.type) === ee, dt = ["horizont
|
|
|
1098
1102
|
ee,
|
|
1099
1103
|
{
|
|
1100
1104
|
...d,
|
|
1101
|
-
disabled: d.disabled ||
|
|
1105
|
+
disabled: d.disabled || m.disabled,
|
|
1102
1106
|
"data-testid": e ? `${e}-item` : void 0
|
|
1103
1107
|
},
|
|
1104
1108
|
d.id
|
|
1105
1109
|
)),
|
|
1106
1110
|
ne.map(
|
|
1107
|
-
|
|
1108
|
-
(d) =>
|
|
1111
|
+
g,
|
|
1112
|
+
(d) => Ke(d, { disabled: d.props.disabled || m.disabled })
|
|
1109
1113
|
)
|
|
1110
1114
|
]
|
|
1111
1115
|
}
|