@purpurds/radio-card-group 4.3.0 → 4.5.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.
- package/dist/LICENSE.txt +3 -3
- package/dist/classnames.d.ts +1 -1
- package/dist/radio-card-group.cjs.js +4 -4
- package/dist/radio-card-group.cjs.js.map +1 -1
- package/dist/radio-card-group.d.ts +5 -4
- package/dist/radio-card-group.es.js +154 -154
- package/dist/radio-card-group.es.js.map +1 -1
- package/dist/radio-card-item-image.d.ts +2 -1
- package/dist/radio-card-item.d.ts +3 -2
- package/package.json +16 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as v, jsxs as
|
|
1
|
+
import { jsx as v, jsxs as k, Fragment as Le } from "react/jsx-runtime";
|
|
2
2
|
import * as _e from "react";
|
|
3
|
-
import
|
|
4
|
-
import { flushSync as
|
|
3
|
+
import S, { useCallback as M, createContext as ae, useMemo as U, createElement as m, useContext as be, forwardRef as R, Children as P, isValidElement as q, cloneElement as Z, Fragment as De, useEffect as T, useLayoutEffect as Ge, useRef as A, useState as F, useReducer as Ue } from "react";
|
|
4
|
+
import { flushSync as qe } from "react-dom";
|
|
5
5
|
function je(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
@@ -42,23 +42,23 @@ var me = { exports: {} };
|
|
|
42
42
|
})();
|
|
43
43
|
})(me);
|
|
44
44
|
var Be = me.exports;
|
|
45
|
-
const
|
|
46
|
-
"purpur-heading": "_purpur-
|
|
47
|
-
"purpur-heading--hyphens": "_purpur-heading--
|
|
48
|
-
"purpur-heading--negative": "_purpur-heading--
|
|
49
|
-
"purpur-heading--subsection-100": "_purpur-heading--subsection-
|
|
50
|
-
"purpur-heading--title-100": "_purpur-heading--title-
|
|
51
|
-
"purpur-heading--title-200": "_purpur-heading--title-
|
|
52
|
-
"purpur-heading--title-300": "_purpur-heading--title-
|
|
53
|
-
"purpur-heading--title-400": "_purpur-heading--title-
|
|
54
|
-
"purpur-heading--title-500": "_purpur-heading--title-
|
|
55
|
-
"purpur-heading--title-600": "_purpur-heading--title-
|
|
56
|
-
"purpur-heading--title-700": "_purpur-heading--title-
|
|
57
|
-
"purpur-heading--display-25": "_purpur-heading--display-
|
|
58
|
-
"purpur-heading--display-50": "_purpur-heading--display-
|
|
59
|
-
"purpur-heading--display-100": "_purpur-heading--display-
|
|
60
|
-
"purpur-heading--display-200": "_purpur-heading--display-
|
|
61
|
-
},
|
|
45
|
+
const ze = /* @__PURE__ */ je(Be), z = {
|
|
46
|
+
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
47
|
+
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
48
|
+
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
49
|
+
"purpur-heading--subsection-100": "_purpur-heading--subsection-100_k9fhq_14",
|
|
50
|
+
"purpur-heading--title-100": "_purpur-heading--title-100_k9fhq_20",
|
|
51
|
+
"purpur-heading--title-200": "_purpur-heading--title-200_k9fhq_26",
|
|
52
|
+
"purpur-heading--title-300": "_purpur-heading--title-300_k9fhq_32",
|
|
53
|
+
"purpur-heading--title-400": "_purpur-heading--title-400_k9fhq_38",
|
|
54
|
+
"purpur-heading--title-500": "_purpur-heading--title-500_k9fhq_44",
|
|
55
|
+
"purpur-heading--title-600": "_purpur-heading--title-600_k9fhq_50",
|
|
56
|
+
"purpur-heading--title-700": "_purpur-heading--title-700_k9fhq_56",
|
|
57
|
+
"purpur-heading--display-25": "_purpur-heading--display-25_k9fhq_62",
|
|
58
|
+
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
59
|
+
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
60
|
+
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
61
|
+
}, Ve = {
|
|
62
62
|
TITLE100: "title-100",
|
|
63
63
|
TITLE200: "title-200",
|
|
64
64
|
TITLE300: "title-300",
|
|
@@ -67,38 +67,38 @@ const Ve = /* @__PURE__ */ je(Be), V = {
|
|
|
67
67
|
TITLE600: "title-600",
|
|
68
68
|
TITLE700: "title-700",
|
|
69
69
|
SUBSECTION100: "subsection-100"
|
|
70
|
-
},
|
|
70
|
+
}, V = "purpur-heading", Ke = ({
|
|
71
71
|
["data-testid"]: e,
|
|
72
72
|
children: n,
|
|
73
73
|
className: t = "",
|
|
74
74
|
enableHyphenation: o = !1,
|
|
75
75
|
negative: i = !1,
|
|
76
76
|
tag: r,
|
|
77
|
-
variant: a =
|
|
77
|
+
variant: a = Ve.TITLE100,
|
|
78
78
|
...c
|
|
79
79
|
}) => {
|
|
80
|
-
const s = r, u =
|
|
80
|
+
const s = r, u = ze([
|
|
81
81
|
t,
|
|
82
|
-
V
|
|
83
|
-
|
|
82
|
+
z[V],
|
|
83
|
+
z[`${V}--${a}`],
|
|
84
84
|
{
|
|
85
|
-
[
|
|
86
|
-
[
|
|
85
|
+
[z[`${V}--hyphens`]]: o,
|
|
86
|
+
[z[`${V}--negative`]]: i
|
|
87
87
|
}
|
|
88
88
|
]);
|
|
89
89
|
return /* @__PURE__ */ v(s, { ...c, className: u, "data-testid": e, children: n });
|
|
90
90
|
};
|
|
91
|
-
function
|
|
92
|
-
return
|
|
91
|
+
function I() {
|
|
92
|
+
return I = Object.assign ? Object.assign.bind() : function(e) {
|
|
93
93
|
for (var n = 1; n < arguments.length; n++) {
|
|
94
94
|
var t = arguments[n];
|
|
95
95
|
for (var o in t)
|
|
96
96
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
97
97
|
}
|
|
98
98
|
return e;
|
|
99
|
-
},
|
|
99
|
+
}, I.apply(this, arguments);
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function x(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
102
102
|
return function(i) {
|
|
103
103
|
if (e == null || e(i), t === !1 || !i.defaultPrevented)
|
|
104
104
|
return n == null ? void 0 : n(i);
|
|
@@ -113,7 +113,7 @@ function $e(...e) {
|
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
function L(...e) {
|
|
116
|
-
return
|
|
116
|
+
return M($e(...e), e);
|
|
117
117
|
}
|
|
118
118
|
function J(e, n = []) {
|
|
119
119
|
let t = [];
|
|
@@ -124,12 +124,12 @@ function J(e, n = []) {
|
|
|
124
124
|
a
|
|
125
125
|
];
|
|
126
126
|
function u(l) {
|
|
127
|
-
const { scope: f, children: p, ...d } = l, b = (f == null ? void 0 : f[e][s]) || c,
|
|
127
|
+
const { scope: f, children: p, ...d } = l, b = (f == null ? void 0 : f[e][s]) || c, g = U(
|
|
128
128
|
() => d,
|
|
129
129
|
Object.values(d)
|
|
130
130
|
);
|
|
131
131
|
return /* @__PURE__ */ m(b.Provider, {
|
|
132
|
-
value:
|
|
132
|
+
value: g
|
|
133
133
|
}, p);
|
|
134
134
|
}
|
|
135
135
|
function _(l, f) {
|
|
@@ -149,7 +149,7 @@ function J(e, n = []) {
|
|
|
149
149
|
const r = t.map((a) => /* @__PURE__ */ ae(a));
|
|
150
150
|
return function(c) {
|
|
151
151
|
const s = (c == null ? void 0 : c[e]) || r;
|
|
152
|
-
return
|
|
152
|
+
return U(
|
|
153
153
|
() => ({
|
|
154
154
|
[`__scope${e}`]: {
|
|
155
155
|
...c,
|
|
@@ -187,7 +187,7 @@ function Ye(...e) {
|
|
|
187
187
|
...l
|
|
188
188
|
};
|
|
189
189
|
}, {});
|
|
190
|
-
return
|
|
190
|
+
return U(
|
|
191
191
|
() => ({
|
|
192
192
|
[`__scope${n.scopeName}`]: a
|
|
193
193
|
}),
|
|
@@ -212,10 +212,10 @@ function O() {
|
|
|
212
212
|
const W = /* @__PURE__ */ R((e, n) => {
|
|
213
213
|
const { children: t, ...o } = e, i = P.toArray(t), r = i.find(Xe);
|
|
214
214
|
if (r) {
|
|
215
|
-
const a = r.props.children, c = i.map((s) => s === r ? P.count(a) > 1 ? P.only(null) : /* @__PURE__ */
|
|
215
|
+
const a = r.props.children, c = i.map((s) => s === r ? P.count(a) > 1 ? P.only(null) : /* @__PURE__ */ q(a) ? a.props.children : null : s);
|
|
216
216
|
return /* @__PURE__ */ m(ie, O({}, o, {
|
|
217
217
|
ref: n
|
|
218
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ q(a) ? /* @__PURE__ */ Z(a, void 0, c) : null);
|
|
219
219
|
}
|
|
220
220
|
return /* @__PURE__ */ m(ie, O({}, o, {
|
|
221
221
|
ref: n
|
|
@@ -224,7 +224,7 @@ const W = /* @__PURE__ */ R((e, n) => {
|
|
|
224
224
|
W.displayName = "Slot";
|
|
225
225
|
const ie = /* @__PURE__ */ R((e, n) => {
|
|
226
226
|
const { children: t, ...o } = e;
|
|
227
|
-
return /* @__PURE__ */
|
|
227
|
+
return /* @__PURE__ */ q(t) ? /* @__PURE__ */ Z(t, {
|
|
228
228
|
...Ze(o, t.props),
|
|
229
229
|
ref: n ? $e(n, t.ref) : t.ref
|
|
230
230
|
}) : P.count(t) > 1 ? P.only(null) : null;
|
|
@@ -232,7 +232,7 @@ const ie = /* @__PURE__ */ R((e, n) => {
|
|
|
232
232
|
ie.displayName = "SlotClone";
|
|
233
233
|
const We = ({ children: e }) => /* @__PURE__ */ m(De, null, e);
|
|
234
234
|
function Xe(e) {
|
|
235
|
-
return /* @__PURE__ */
|
|
235
|
+
return /* @__PURE__ */ q(e) && e.type === We;
|
|
236
236
|
}
|
|
237
237
|
function Ze(e, n) {
|
|
238
238
|
const t = {
|
|
@@ -293,34 +293,34 @@ function Qe(e) {
|
|
|
293
293
|
},
|
|
294
294
|
itemMap: /* @__PURE__ */ new Map()
|
|
295
295
|
}), a = (p) => {
|
|
296
|
-
const { scope: d, children: b } = p,
|
|
297
|
-
return /* @__PURE__ */
|
|
296
|
+
const { scope: d, children: b } = p, g = S.useRef(null), $ = S.useRef(/* @__PURE__ */ new Map()).current;
|
|
297
|
+
return /* @__PURE__ */ S.createElement(i, {
|
|
298
298
|
scope: d,
|
|
299
299
|
itemMap: $,
|
|
300
|
-
collectionRef:
|
|
300
|
+
collectionRef: g
|
|
301
301
|
}, b);
|
|
302
|
-
}, c = e + "CollectionSlot", s = /* @__PURE__ */
|
|
303
|
-
const { scope: b, children:
|
|
304
|
-
return /* @__PURE__ */
|
|
305
|
-
ref:
|
|
306
|
-
},
|
|
307
|
-
}), u = e + "CollectionItemSlot", _ = "data-radix-collection-item", l = /* @__PURE__ */
|
|
308
|
-
const { scope: b, children:
|
|
309
|
-
return
|
|
310
|
-
ref:
|
|
302
|
+
}, c = e + "CollectionSlot", s = /* @__PURE__ */ S.forwardRef((p, d) => {
|
|
303
|
+
const { scope: b, children: g } = p, $ = r(c, b), h = L(d, $.collectionRef);
|
|
304
|
+
return /* @__PURE__ */ S.createElement(W, {
|
|
305
|
+
ref: h
|
|
306
|
+
}, g);
|
|
307
|
+
}), u = e + "CollectionItemSlot", _ = "data-radix-collection-item", l = /* @__PURE__ */ S.forwardRef((p, d) => {
|
|
308
|
+
const { scope: b, children: g, ...$ } = p, h = S.useRef(null), B = L(d, h), E = r(u, b);
|
|
309
|
+
return S.useEffect(() => (E.itemMap.set(h, {
|
|
310
|
+
ref: h,
|
|
311
311
|
...$
|
|
312
|
-
}), () => void E.itemMap.delete(
|
|
312
|
+
}), () => void E.itemMap.delete(h))), /* @__PURE__ */ S.createElement(W, {
|
|
313
313
|
[_]: "",
|
|
314
314
|
ref: B
|
|
315
|
-
},
|
|
315
|
+
}, g);
|
|
316
316
|
});
|
|
317
317
|
function f(p) {
|
|
318
318
|
const d = r(e + "CollectionConsumer", p);
|
|
319
|
-
return
|
|
320
|
-
const
|
|
321
|
-
if (!
|
|
319
|
+
return S.useCallback(() => {
|
|
320
|
+
const g = d.collectionRef.current;
|
|
321
|
+
if (!g)
|
|
322
322
|
return [];
|
|
323
|
-
const $ = Array.from(
|
|
323
|
+
const $ = Array.from(g.querySelectorAll(`[${_}]`));
|
|
324
324
|
return Array.from(d.itemMap.values()).sort(
|
|
325
325
|
(E, Q) => $.indexOf(E.ref.current) - $.indexOf(Q.ref.current)
|
|
326
326
|
);
|
|
@@ -346,18 +346,18 @@ let rr = 0;
|
|
|
346
346
|
function tr(e) {
|
|
347
347
|
const [n, t] = _e.useState(er());
|
|
348
348
|
return X(() => {
|
|
349
|
-
|
|
349
|
+
t(
|
|
350
350
|
(o) => o ?? String(rr++)
|
|
351
351
|
);
|
|
352
352
|
}, [
|
|
353
353
|
e
|
|
354
|
-
]),
|
|
354
|
+
]), n ? `radix-${n}` : "";
|
|
355
355
|
}
|
|
356
356
|
function ue(e) {
|
|
357
|
-
const n =
|
|
357
|
+
const n = A(e);
|
|
358
358
|
return T(() => {
|
|
359
359
|
n.current = e;
|
|
360
|
-
}),
|
|
360
|
+
}), U(
|
|
361
361
|
() => (...t) => {
|
|
362
362
|
var o;
|
|
363
363
|
return (o = n.current) === null || o === void 0 ? void 0 : o.call(n, ...t);
|
|
@@ -365,12 +365,12 @@ function ue(e) {
|
|
|
365
365
|
[]
|
|
366
366
|
);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function he({ prop: e, defaultProp: n, onChange: t = () => {
|
|
369
369
|
} }) {
|
|
370
370
|
const [o, i] = nr({
|
|
371
371
|
defaultProp: n,
|
|
372
372
|
onChange: t
|
|
373
|
-
}), r = e !== void 0, a = r ? e : o, c = ue(t), s =
|
|
373
|
+
}), r = e !== void 0, a = r ? e : o, c = ue(t), s = M((u) => {
|
|
374
374
|
if (r) {
|
|
375
375
|
const l = typeof u == "function" ? u(e) : u;
|
|
376
376
|
l !== e && c(l);
|
|
@@ -388,7 +388,7 @@ function ge({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
388
388
|
];
|
|
389
389
|
}
|
|
390
390
|
function nr({ defaultProp: e, onChange: n }) {
|
|
391
|
-
const t = F(e), [o] = t, i =
|
|
391
|
+
const t = F(e), [o] = t, i = A(o), r = ue(n);
|
|
392
392
|
return T(() => {
|
|
393
393
|
i.current !== o && (r(o), i.current = o);
|
|
394
394
|
}, [
|
|
@@ -398,7 +398,7 @@ function nr({ defaultProp: e, onChange: n }) {
|
|
|
398
398
|
]), t;
|
|
399
399
|
}
|
|
400
400
|
const or = /* @__PURE__ */ ae(void 0);
|
|
401
|
-
function
|
|
401
|
+
function ge(e) {
|
|
402
402
|
const n = be(or);
|
|
403
403
|
return e || n || "ltr";
|
|
404
404
|
}
|
|
@@ -414,47 +414,47 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
414
414
|
}, /* @__PURE__ */ m(pr, O({}, e, {
|
|
415
415
|
ref: n
|
|
416
416
|
}))))), pr = /* @__PURE__ */ R((e, n) => {
|
|
417
|
-
const { __scopeRovingFocusGroup: t, orientation: o, loop: i = !1, dir: r, currentTabStopId: a, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: s, onEntryFocus: u, ..._ } = e, l =
|
|
417
|
+
const { __scopeRovingFocusGroup: t, orientation: o, loop: i = !1, dir: r, currentTabStopId: a, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: s, onEntryFocus: u, ..._ } = e, l = A(null), f = L(n, l), p = ge(r), [d = null, b] = he({
|
|
418
418
|
prop: a,
|
|
419
419
|
defaultProp: c,
|
|
420
420
|
onChange: s
|
|
421
|
-
}), [
|
|
421
|
+
}), [g, $] = F(!1), h = ue(u), B = ve(t), E = A(!1), [Q, pe] = F(0);
|
|
422
422
|
return T(() => {
|
|
423
423
|
const y = l.current;
|
|
424
424
|
if (y)
|
|
425
|
-
return y.addEventListener(re,
|
|
425
|
+
return y.addEventListener(re, h), () => y.removeEventListener(re, h);
|
|
426
426
|
}, [
|
|
427
|
-
|
|
427
|
+
h
|
|
428
428
|
]), /* @__PURE__ */ m(ur, {
|
|
429
429
|
scope: t,
|
|
430
430
|
orientation: o,
|
|
431
431
|
dir: p,
|
|
432
432
|
loop: i,
|
|
433
433
|
currentTabStopId: d,
|
|
434
|
-
onItemFocus:
|
|
434
|
+
onItemFocus: M(
|
|
435
435
|
(y) => b(y),
|
|
436
436
|
[
|
|
437
437
|
b
|
|
438
438
|
]
|
|
439
439
|
),
|
|
440
|
-
onItemShiftTab:
|
|
440
|
+
onItemShiftTab: M(
|
|
441
441
|
() => $(!0),
|
|
442
442
|
[]
|
|
443
443
|
),
|
|
444
|
-
onFocusableItemAdd:
|
|
444
|
+
onFocusableItemAdd: M(
|
|
445
445
|
() => pe(
|
|
446
446
|
(y) => y + 1
|
|
447
447
|
),
|
|
448
448
|
[]
|
|
449
449
|
),
|
|
450
|
-
onFocusableItemRemove:
|
|
450
|
+
onFocusableItemRemove: M(
|
|
451
451
|
() => pe(
|
|
452
452
|
(y) => y - 1
|
|
453
453
|
),
|
|
454
454
|
[]
|
|
455
455
|
)
|
|
456
456
|
}, /* @__PURE__ */ m(j.div, O({
|
|
457
|
-
tabIndex:
|
|
457
|
+
tabIndex: g || Q === 0 ? -1 : 0,
|
|
458
458
|
"data-orientation": o
|
|
459
459
|
}, _, {
|
|
460
460
|
ref: f,
|
|
@@ -462,23 +462,23 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
462
462
|
outline: "none",
|
|
463
463
|
...e.style
|
|
464
464
|
},
|
|
465
|
-
onMouseDown:
|
|
465
|
+
onMouseDown: x(e.onMouseDown, () => {
|
|
466
466
|
E.current = !0;
|
|
467
467
|
}),
|
|
468
|
-
onFocus:
|
|
468
|
+
onFocus: x(e.onFocus, (y) => {
|
|
469
469
|
const we = !E.current;
|
|
470
|
-
if (y.target === y.currentTarget && we && !
|
|
470
|
+
if (y.target === y.currentTarget && we && !g) {
|
|
471
471
|
const le = new CustomEvent(re, ar);
|
|
472
472
|
if (y.currentTarget.dispatchEvent(le), !le.defaultPrevented) {
|
|
473
473
|
const ee = B().filter(
|
|
474
474
|
(w) => w.focusable
|
|
475
|
-
), Me = ee.find(
|
|
476
|
-
(w) => w.active
|
|
477
475
|
), ke = ee.find(
|
|
476
|
+
(w) => w.active
|
|
477
|
+
), Me = ee.find(
|
|
478
478
|
(w) => w.id === d
|
|
479
479
|
), Fe = [
|
|
480
|
-
Me,
|
|
481
480
|
ke,
|
|
481
|
+
Me,
|
|
482
482
|
...ee
|
|
483
483
|
].filter(Boolean).map(
|
|
484
484
|
(w) => w.ref.current
|
|
@@ -488,7 +488,7 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
488
488
|
}
|
|
489
489
|
E.current = !1;
|
|
490
490
|
}),
|
|
491
|
-
onBlur:
|
|
491
|
+
onBlur: x(
|
|
492
492
|
e.onBlur,
|
|
493
493
|
() => $(!1)
|
|
494
494
|
)
|
|
@@ -512,14 +512,14 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
512
512
|
"data-orientation": u.orientation
|
|
513
513
|
}, a, {
|
|
514
514
|
ref: n,
|
|
515
|
-
onMouseDown:
|
|
515
|
+
onMouseDown: x(e.onMouseDown, (d) => {
|
|
516
516
|
o ? u.onItemFocus(s) : d.preventDefault();
|
|
517
517
|
}),
|
|
518
|
-
onFocus:
|
|
518
|
+
onFocus: x(
|
|
519
519
|
e.onFocus,
|
|
520
520
|
() => u.onItemFocus(s)
|
|
521
521
|
),
|
|
522
|
-
onKeyDown:
|
|
522
|
+
onKeyDown: x(e.onKeyDown, (d) => {
|
|
523
523
|
if (d.key === "Tab" && d.shiftKey) {
|
|
524
524
|
u.onItemShiftTab();
|
|
525
525
|
return;
|
|
@@ -530,16 +530,16 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
530
530
|
if (b !== void 0) {
|
|
531
531
|
d.preventDefault();
|
|
532
532
|
let $ = l().filter(
|
|
533
|
-
(
|
|
533
|
+
(h) => h.focusable
|
|
534
534
|
).map(
|
|
535
|
-
(
|
|
535
|
+
(h) => h.ref.current
|
|
536
536
|
);
|
|
537
537
|
if (b === "last")
|
|
538
538
|
$.reverse();
|
|
539
539
|
else if (b === "prev" || b === "next") {
|
|
540
540
|
b === "prev" && $.reverse();
|
|
541
|
-
const
|
|
542
|
-
$ = u.loop ? $r($,
|
|
541
|
+
const h = $.indexOf(d.currentTarget);
|
|
542
|
+
$ = u.loop ? $r($, h + 1) : $.slice(h + 1);
|
|
543
543
|
}
|
|
544
544
|
setTimeout(
|
|
545
545
|
() => Ce($)
|
|
@@ -582,7 +582,7 @@ function $r(e, n) {
|
|
|
582
582
|
(t, o) => e[(n + o) % e.length]
|
|
583
583
|
);
|
|
584
584
|
}
|
|
585
|
-
const
|
|
585
|
+
const hr = dr, gr = fr;
|
|
586
586
|
function vr(e) {
|
|
587
587
|
const [n, t] = F(void 0);
|
|
588
588
|
return X(() => {
|
|
@@ -616,16 +616,16 @@ function vr(e) {
|
|
|
616
616
|
]), n;
|
|
617
617
|
}
|
|
618
618
|
function yr(e) {
|
|
619
|
-
const n =
|
|
619
|
+
const n = A({
|
|
620
620
|
value: e,
|
|
621
621
|
previous: e
|
|
622
622
|
});
|
|
623
|
-
return
|
|
623
|
+
return U(() => (n.current.value !== e && (n.current.previous = n.current.value, n.current.value = e), n.current.previous), [
|
|
624
624
|
e
|
|
625
625
|
]);
|
|
626
626
|
}
|
|
627
627
|
function Cr(e, n) {
|
|
628
|
-
return
|
|
628
|
+
return Ue((t, o) => {
|
|
629
629
|
const i = n[t][o];
|
|
630
630
|
return i ?? t;
|
|
631
631
|
}, e);
|
|
@@ -640,7 +640,7 @@ const Re = (e) => {
|
|
|
640
640
|
};
|
|
641
641
|
Re.displayName = "Presence";
|
|
642
642
|
function Rr(e) {
|
|
643
|
-
const [n, t] = F(), o =
|
|
643
|
+
const [n, t] = F(), o = A({}), i = A(e), r = A("none"), a = e ? "mounted" : "unmounted", [c, s] = Cr(a, {
|
|
644
644
|
mounted: {
|
|
645
645
|
UNMOUNT: "unmounted",
|
|
646
646
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -671,7 +671,7 @@ function Rr(e) {
|
|
|
671
671
|
if (n) {
|
|
672
672
|
const u = (l) => {
|
|
673
673
|
const p = K(o.current).includes(l.animationName);
|
|
674
|
-
l.target === n && p &&
|
|
674
|
+
l.target === n && p && qe(
|
|
675
675
|
() => s("ANIMATION_END")
|
|
676
676
|
);
|
|
677
677
|
}, _ = (l) => {
|
|
@@ -690,7 +690,7 @@ function Rr(e) {
|
|
|
690
690
|
"mounted",
|
|
691
691
|
"unmountSuspended"
|
|
692
692
|
].includes(c),
|
|
693
|
-
ref:
|
|
693
|
+
ref: M((u) => {
|
|
694
694
|
u && (o.current = getComputedStyle(u)), t(u);
|
|
695
695
|
}, [])
|
|
696
696
|
};
|
|
@@ -698,26 +698,26 @@ function Rr(e) {
|
|
|
698
698
|
function K(e) {
|
|
699
699
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
700
700
|
}
|
|
701
|
-
const
|
|
701
|
+
const Ae = "Radio", [Ar, Se] = J(Ae), [Sr, Ir] = Ar(Ae), Nr = /* @__PURE__ */ R((e, n) => {
|
|
702
702
|
const { __scopeRadio: t, name: o, checked: i = !1, required: r, disabled: a, value: c = "on", onCheck: s, ...u } = e, [_, l] = F(null), f = L(
|
|
703
703
|
n,
|
|
704
704
|
(b) => l(b)
|
|
705
|
-
), p =
|
|
706
|
-
return /* @__PURE__ */ m(
|
|
705
|
+
), p = A(!1), d = _ ? !!_.closest("form") : !0;
|
|
706
|
+
return /* @__PURE__ */ m(Sr, {
|
|
707
707
|
scope: t,
|
|
708
708
|
checked: i,
|
|
709
709
|
disabled: a
|
|
710
|
-
}, /* @__PURE__ */ m(j.button,
|
|
710
|
+
}, /* @__PURE__ */ m(j.button, I({
|
|
711
711
|
type: "button",
|
|
712
712
|
role: "radio",
|
|
713
713
|
"aria-checked": i,
|
|
714
|
-
"data-state":
|
|
714
|
+
"data-state": Ie(i),
|
|
715
715
|
"data-disabled": a ? "" : void 0,
|
|
716
716
|
disabled: a,
|
|
717
717
|
value: c
|
|
718
718
|
}, u, {
|
|
719
719
|
ref: f,
|
|
720
|
-
onClick:
|
|
720
|
+
onClick: x(e.onClick, (b) => {
|
|
721
721
|
i || s == null || s(), d && (p.current = b.isPropagationStopped(), p.current || b.stopPropagation());
|
|
722
722
|
})
|
|
723
723
|
})), d && /* @__PURE__ */ m(Pr, {
|
|
@@ -732,18 +732,18 @@ const Se = "Radio", [Sr, Ae] = J(Se), [Ar, Nr] = Sr(Se), xr = /* @__PURE__ */ R(
|
|
|
732
732
|
transform: "translateX(-100%)"
|
|
733
733
|
}
|
|
734
734
|
}));
|
|
735
|
-
}),
|
|
736
|
-
const { __scopeRadio: t, forceMount: o, ...i } = e, r =
|
|
735
|
+
}), xr = "RadioIndicator", Er = /* @__PURE__ */ R((e, n) => {
|
|
736
|
+
const { __scopeRadio: t, forceMount: o, ...i } = e, r = Ir(xr, t);
|
|
737
737
|
return /* @__PURE__ */ m(Re, {
|
|
738
738
|
present: o || r.checked
|
|
739
|
-
}, /* @__PURE__ */ m(j.span,
|
|
740
|
-
"data-state":
|
|
739
|
+
}, /* @__PURE__ */ m(j.span, I({
|
|
740
|
+
"data-state": Ie(r.checked),
|
|
741
741
|
"data-disabled": r.disabled ? "" : void 0
|
|
742
742
|
}, i, {
|
|
743
743
|
ref: n
|
|
744
744
|
})));
|
|
745
745
|
}), Pr = (e) => {
|
|
746
|
-
const { control: n, checked: t, bubbles: o = !0, ...i } = e, r =
|
|
746
|
+
const { control: n, checked: t, bubbles: o = !0, ...i } = e, r = A(null), a = yr(t), c = vr(n);
|
|
747
747
|
return T(() => {
|
|
748
748
|
const s = r.current, u = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(u, "checked").set;
|
|
749
749
|
if (a !== t && l) {
|
|
@@ -756,7 +756,7 @@ const Se = "Radio", [Sr, Ae] = J(Se), [Ar, Nr] = Sr(Se), xr = /* @__PURE__ */ R(
|
|
|
756
756
|
a,
|
|
757
757
|
t,
|
|
758
758
|
o
|
|
759
|
-
]), /* @__PURE__ */ m("input",
|
|
759
|
+
]), /* @__PURE__ */ m("input", I({
|
|
760
760
|
type: "radio",
|
|
761
761
|
"aria-hidden": !0,
|
|
762
762
|
defaultChecked: t
|
|
@@ -773,7 +773,7 @@ const Se = "Radio", [Sr, Ae] = J(Se), [Ar, Nr] = Sr(Se), xr = /* @__PURE__ */ R(
|
|
|
773
773
|
}
|
|
774
774
|
}));
|
|
775
775
|
};
|
|
776
|
-
function
|
|
776
|
+
function Ie(e) {
|
|
777
777
|
return e ? "checked" : "unchecked";
|
|
778
778
|
}
|
|
779
779
|
const Or = [
|
|
@@ -781,11 +781,11 @@ const Or = [
|
|
|
781
781
|
"ArrowDown",
|
|
782
782
|
"ArrowLeft",
|
|
783
783
|
"ArrowRight"
|
|
784
|
-
],
|
|
784
|
+
], Ne = "RadioGroup", [Tr, pt] = J(Ne, [
|
|
785
785
|
ye,
|
|
786
|
-
|
|
787
|
-
]),
|
|
788
|
-
const { __scopeRadioGroup: t, name: o, defaultValue: i, value: r, required: a = !1, disabled: c = !1, orientation: s, dir: u, loop: _ = !0, onValueChange: l, ...f } = e, p =
|
|
786
|
+
Se
|
|
787
|
+
]), xe = ye(), Ee = Se(), [wr, kr] = Tr(Ne), Mr = /* @__PURE__ */ R((e, n) => {
|
|
788
|
+
const { __scopeRadioGroup: t, name: o, defaultValue: i, value: r, required: a = !1, disabled: c = !1, orientation: s, dir: u, loop: _ = !0, onValueChange: l, ...f } = e, p = xe(t), d = ge(u), [b, g] = he({
|
|
789
789
|
prop: r,
|
|
790
790
|
defaultProp: i,
|
|
791
791
|
onChange: l
|
|
@@ -796,14 +796,14 @@ const Or = [
|
|
|
796
796
|
required: a,
|
|
797
797
|
disabled: c,
|
|
798
798
|
value: b,
|
|
799
|
-
onValueChange:
|
|
800
|
-
}, /* @__PURE__ */ m(
|
|
799
|
+
onValueChange: g
|
|
800
|
+
}, /* @__PURE__ */ m(hr, I({
|
|
801
801
|
asChild: !0
|
|
802
802
|
}, p, {
|
|
803
803
|
orientation: s,
|
|
804
804
|
dir: d,
|
|
805
805
|
loop: _
|
|
806
|
-
}), /* @__PURE__ */ m(j.div,
|
|
806
|
+
}), /* @__PURE__ */ m(j.div, I({
|
|
807
807
|
role: "radiogroup",
|
|
808
808
|
"aria-required": a,
|
|
809
809
|
"aria-orientation": s,
|
|
@@ -813,7 +813,7 @@ const Or = [
|
|
|
813
813
|
ref: n
|
|
814
814
|
}))));
|
|
815
815
|
}), Fr = "RadioGroupItem", Lr = /* @__PURE__ */ R((e, n) => {
|
|
816
|
-
const { __scopeRadioGroup: t, disabled: o, ...i } = e, r =
|
|
816
|
+
const { __scopeRadioGroup: t, disabled: o, ...i } = e, r = kr(Fr, t), a = r.disabled || o, c = xe(t), s = Ee(t), u = A(null), _ = L(n, u), l = r.value === i.value, f = A(!1);
|
|
817
817
|
return T(() => {
|
|
818
818
|
const p = (b) => {
|
|
819
819
|
Or.includes(b.key) && (f.current = !0);
|
|
@@ -821,12 +821,12 @@ const Or = [
|
|
|
821
821
|
return document.addEventListener("keydown", p), document.addEventListener("keyup", d), () => {
|
|
822
822
|
document.removeEventListener("keydown", p), document.removeEventListener("keyup", d);
|
|
823
823
|
};
|
|
824
|
-
}, []), /* @__PURE__ */ m(
|
|
824
|
+
}, []), /* @__PURE__ */ m(gr, I({
|
|
825
825
|
asChild: !0
|
|
826
826
|
}, c, {
|
|
827
827
|
focusable: !a,
|
|
828
828
|
active: l
|
|
829
|
-
}), /* @__PURE__ */ m(
|
|
829
|
+
}), /* @__PURE__ */ m(Nr, I({
|
|
830
830
|
disabled: a,
|
|
831
831
|
required: r.required,
|
|
832
832
|
checked: l
|
|
@@ -834,20 +834,20 @@ const Or = [
|
|
|
834
834
|
name: r.name,
|
|
835
835
|
ref: _,
|
|
836
836
|
onCheck: () => r.onValueChange(i.value),
|
|
837
|
-
onKeyDown:
|
|
837
|
+
onKeyDown: x((p) => {
|
|
838
838
|
p.key === "Enter" && p.preventDefault();
|
|
839
839
|
}),
|
|
840
|
-
onFocus:
|
|
840
|
+
onFocus: x(i.onFocus, () => {
|
|
841
841
|
var p;
|
|
842
842
|
f.current && ((p = u.current) === null || p === void 0 || p.click());
|
|
843
843
|
})
|
|
844
844
|
})));
|
|
845
845
|
}), Dr = /* @__PURE__ */ R((e, n) => {
|
|
846
846
|
const { __scopeRadioGroup: t, ...o } = e, i = Ee(t);
|
|
847
|
-
return /* @__PURE__ */ m(Er,
|
|
847
|
+
return /* @__PURE__ */ m(Er, I({}, i, o, {
|
|
848
848
|
ref: n
|
|
849
849
|
}));
|
|
850
|
-
}), Gr =
|
|
850
|
+
}), Gr = Mr, Ur = Lr, qr = Dr;
|
|
851
851
|
function jr(e) {
|
|
852
852
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
853
853
|
}
|
|
@@ -888,7 +888,7 @@ var Pe = { exports: {} };
|
|
|
888
888
|
})();
|
|
889
889
|
})(Pe);
|
|
890
890
|
var Br = Pe.exports;
|
|
891
|
-
const
|
|
891
|
+
const zr = /* @__PURE__ */ jr(Br), Vr = {
|
|
892
892
|
"purpur-radio-card-group": "_purpur-radio-card-group_19msf_1",
|
|
893
893
|
"purpur-radio-card-group--vertical": "_purpur-radio-card-group--vertical_19msf_5",
|
|
894
894
|
"purpur-radio-card-group--horizontal": "_purpur-radio-card-group--horizontal_19msf_9",
|
|
@@ -908,7 +908,7 @@ const Vr = /* @__PURE__ */ jr(Br), qr = {
|
|
|
908
908
|
"purpur-radio-card-group__item-image-placeholder": "_purpur-radio-card-group__item-image-placeholder_19msf_167",
|
|
909
909
|
"purpur-radio-card-group__item-image-placeholder--loaded": "_purpur-radio-card-group__item-image-placeholder--loaded_19msf_172",
|
|
910
910
|
"purpur-radio-card-group__item-children": "_purpur-radio-card-group__item-children_19msf_175"
|
|
911
|
-
}, C =
|
|
911
|
+
}, C = zr.bind(Vr);
|
|
912
912
|
function Kr(e) {
|
|
913
913
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
914
914
|
}
|
|
@@ -950,20 +950,20 @@ var Oe = { exports: {} };
|
|
|
950
950
|
})(Oe);
|
|
951
951
|
var Hr = Oe.exports;
|
|
952
952
|
const Yr = /* @__PURE__ */ Kr(Hr), D = {
|
|
953
|
-
"purpur-paragraph": "_purpur-
|
|
954
|
-
"purpur-paragraph--disabled": "_purpur-paragraph--
|
|
955
|
-
"purpur-paragraph--hyphens": "_purpur-paragraph--
|
|
956
|
-
"purpur-paragraph--negative": "_purpur-paragraph--
|
|
957
|
-
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-
|
|
958
|
-
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-
|
|
959
|
-
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-
|
|
960
|
-
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-
|
|
961
|
-
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-
|
|
962
|
-
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-
|
|
963
|
-
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-
|
|
964
|
-
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-
|
|
965
|
-
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-
|
|
966
|
-
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-
|
|
953
|
+
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
954
|
+
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
955
|
+
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
956
|
+
"purpur-paragraph--negative": "_purpur-paragraph--negative_1rh57_13",
|
|
957
|
+
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1rh57_16",
|
|
958
|
+
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1rh57_22",
|
|
959
|
+
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1rh57_29",
|
|
960
|
+
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1rh57_36",
|
|
961
|
+
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1rh57_42",
|
|
962
|
+
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1rh57_48",
|
|
963
|
+
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1rh57_54",
|
|
964
|
+
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
965
|
+
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
966
|
+
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
967
967
|
}, Wr = {
|
|
968
968
|
PARAGRAPH100: "paragraph-100",
|
|
969
969
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
@@ -1074,7 +1074,7 @@ const Jr = /* @__PURE__ */ Xr(Zr), Qr = "_loading_93tal_1", te = {
|
|
|
1074
1074
|
}), u = C(`${H}-placeholder`, {
|
|
1075
1075
|
[`${H}-placeholder--loaded`]: r
|
|
1076
1076
|
});
|
|
1077
|
-
return /* @__PURE__ */
|
|
1077
|
+
return /* @__PURE__ */ k(Le, { children: [
|
|
1078
1078
|
/* @__PURE__ */ v(
|
|
1079
1079
|
"img",
|
|
1080
1080
|
{
|
|
@@ -1088,7 +1088,7 @@ const Jr = /* @__PURE__ */ Xr(Zr), Qr = "_loading_93tal_1", te = {
|
|
|
1088
1088
|
),
|
|
1089
1089
|
!t && /* @__PURE__ */ v(et, { className: u })
|
|
1090
1090
|
] });
|
|
1091
|
-
},
|
|
1091
|
+
}, N = "purpur-radio-card-group__item", oe = (e, { disabled: n }) => typeof e == "function" ? e({ disabled: n }) : e, nt = (e, n) => {
|
|
1092
1092
|
const {
|
|
1093
1093
|
["data-testid"]: t,
|
|
1094
1094
|
body: o,
|
|
@@ -1100,33 +1100,33 @@ const Jr = /* @__PURE__ */ Xr(Zr), Qr = "_loading_93tal_1", te = {
|
|
|
1100
1100
|
title: u,
|
|
1101
1101
|
value: _
|
|
1102
1102
|
} = e;
|
|
1103
|
-
return /* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
|
|
1103
|
+
return /* @__PURE__ */ k("div", { className: C(`${N}-container`), ref: n, children: [
|
|
1104
|
+
/* @__PURE__ */ k(
|
|
1105
|
+
Ur,
|
|
1106
1106
|
{
|
|
1107
|
-
className: C(
|
|
1107
|
+
className: C(N),
|
|
1108
1108
|
"data-testid": t,
|
|
1109
1109
|
disabled: r,
|
|
1110
1110
|
id: a,
|
|
1111
1111
|
required: s,
|
|
1112
1112
|
value: _,
|
|
1113
1113
|
children: [
|
|
1114
|
-
c && /* @__PURE__ */ v("span", { className: C(`${
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1114
|
+
c && /* @__PURE__ */ v("span", { className: C(`${N}-image-container`), children: rt(c) ? /* @__PURE__ */ v(tt, { ...c, "data-testid": t && `${t}-image` }) : oe(c, e) }),
|
|
1115
|
+
/* @__PURE__ */ k("span", { className: C(`${N}-content`), children: [
|
|
1116
|
+
/* @__PURE__ */ k("span", { className: C(`${N}-top-container`), children: [
|
|
1117
1117
|
typeof u == "string" ? /* @__PURE__ */ v(
|
|
1118
1118
|
fe,
|
|
1119
1119
|
{
|
|
1120
|
-
className: C(`${
|
|
1120
|
+
className: C(`${N}-title`),
|
|
1121
1121
|
"data-testid": t && `${t}-title`,
|
|
1122
1122
|
variant: "paragraph-100",
|
|
1123
1123
|
disabled: r,
|
|
1124
1124
|
children: u
|
|
1125
1125
|
}
|
|
1126
1126
|
) : oe(u, e),
|
|
1127
|
-
/* @__PURE__ */ v("span", { className: C(`${
|
|
1127
|
+
/* @__PURE__ */ v("span", { className: C(`${N}-radio`), children: /* @__PURE__ */ v(qr, { className: C(`${N}-indicator`) }) })
|
|
1128
1128
|
] }),
|
|
1129
|
-
o && /* @__PURE__ */ v("span", { className: C(`${
|
|
1129
|
+
o && /* @__PURE__ */ v("span", { className: C(`${N}-bottom-container`), children: typeof o == "string" ? /* @__PURE__ */ v(
|
|
1130
1130
|
fe,
|
|
1131
1131
|
{
|
|
1132
1132
|
"data-testid": t && `${t}-body`,
|
|
@@ -1143,7 +1143,7 @@ const Jr = /* @__PURE__ */ Xr(Zr), Qr = "_loading_93tal_1", te = {
|
|
|
1143
1143
|
] });
|
|
1144
1144
|
}, de = R(nt);
|
|
1145
1145
|
de.displayName = "RadioCardItem";
|
|
1146
|
-
const ot = (e) =>
|
|
1146
|
+
const ot = (e) => q(e) && (e == null ? void 0 : e.type) === de, Y = "purpur-radio-card-group", at = ({
|
|
1147
1147
|
"data-testid": e,
|
|
1148
1148
|
"aria-labelledby": n,
|
|
1149
1149
|
children: t,
|
|
@@ -1156,7 +1156,7 @@ const ot = (e) => U(e) && (e == null ? void 0 : e.type) === de, Y = "purpur-radi
|
|
|
1156
1156
|
...u
|
|
1157
1157
|
}, _) => {
|
|
1158
1158
|
const l = P.toArray(t).filter(ot);
|
|
1159
|
-
return /* @__PURE__ */
|
|
1159
|
+
return /* @__PURE__ */ k("div", { className: C(o, `${Y}__container`), ref: _, children: [
|
|
1160
1160
|
r && /* @__PURE__ */ v(
|
|
1161
1161
|
Ke,
|
|
1162
1162
|
{
|
|
@@ -1167,7 +1167,7 @@ const ot = (e) => U(e) && (e == null ? void 0 : e.type) === de, Y = "purpur-radi
|
|
|
1167
1167
|
children: `${u.required ? "* " : ""}${r}`
|
|
1168
1168
|
}
|
|
1169
1169
|
),
|
|
1170
|
-
(!!(i != null && i.length) || l.length) && /* @__PURE__ */
|
|
1170
|
+
(!!(i != null && i.length) || l.length) && /* @__PURE__ */ k(
|
|
1171
1171
|
Gr,
|
|
1172
1172
|
{
|
|
1173
1173
|
...u,
|