@purpurds/radio-card-group 5.11.0 → 5.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +3 -3
- package/dist/radio-card-group.cjs.js +5 -5
- package/dist/radio-card-group.cjs.js.map +1 -1
- package/dist/radio-card-group.d.ts +4 -2
- package/dist/radio-card-group.d.ts.map +1 -1
- package/dist/radio-card-group.es.js +254 -261
- package/dist/radio-card-group.es.js.map +1 -1
- package/dist/radio-card-item-image.d.ts.map +1 -1
- package/dist/radio-card-item.d.ts +22 -2
- package/dist/radio-card-item.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/radio-card-group.stories.tsx +47 -42
- package/src/radio-card-group.tsx +4 -2
- package/src/radio-card-item.test.tsx +1 -1
- package/src/radio-card-item.tsx +29 -4
- package/readme.mdx +0 -178
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as v, jsxs as k, Fragment as
|
|
1
|
+
import { jsx as v, jsxs as k, Fragment as De } from "react/jsx-runtime";
|
|
2
2
|
import * as _e from "react";
|
|
3
|
-
import
|
|
4
|
-
import { flushSync as
|
|
5
|
-
function
|
|
3
|
+
import N, { useCallback as M, createContext as ae, useMemo as U, createElement as b, useContext as me, forwardRef as C, Children as P, isValidElement as q, cloneElement as Z, Fragment as Ge, useEffect as T, useLayoutEffect as Ue, useRef as I, useState as F, useReducer as qe } from "react";
|
|
4
|
+
import { flushSync as je } from "react-dom";
|
|
5
|
+
function Be(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var be = { exports: {} };
|
|
9
9
|
/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
@@ -40,9 +40,9 @@ var me = { exports: {} };
|
|
|
40
40
|
}
|
|
41
41
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
42
42
|
})();
|
|
43
|
-
})(
|
|
44
|
-
var
|
|
45
|
-
const
|
|
43
|
+
})(be);
|
|
44
|
+
var ze = be.exports;
|
|
45
|
+
const Ve = /* @__PURE__ */ Be(ze), z = {
|
|
46
46
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
|
47
47
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
|
48
48
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
|
@@ -58,7 +58,7 @@ const ze = /* @__PURE__ */ je(Be), z = {
|
|
|
58
58
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
|
59
59
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
|
60
60
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
|
61
|
-
},
|
|
61
|
+
}, He = {
|
|
62
62
|
TITLE100: "title-100",
|
|
63
63
|
TITLE200: "title-200",
|
|
64
64
|
TITLE300: "title-300",
|
|
@@ -67,17 +67,17 @@ const ze = /* @__PURE__ */ je(Be), z = {
|
|
|
67
67
|
TITLE600: "title-600",
|
|
68
68
|
TITLE700: "title-700",
|
|
69
69
|
SUBSECTION100: "subsection-100"
|
|
70
|
-
}, V = "purpur-heading",
|
|
70
|
+
}, V = "purpur-heading", $e = ({
|
|
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 = He.TITLE100,
|
|
78
78
|
...c
|
|
79
79
|
}) => {
|
|
80
|
-
const s = r, u =
|
|
80
|
+
const s = r, u = Ve([
|
|
81
81
|
t,
|
|
82
82
|
z[V],
|
|
83
83
|
z[`${V}--${a}`],
|
|
@@ -88,32 +88,32 @@ const ze = /* @__PURE__ */ je(Be), z = {
|
|
|
88
88
|
]);
|
|
89
89
|
return /* @__PURE__ */ v(s, { ...c, className: u, "data-testid": e, children: n });
|
|
90
90
|
};
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
$e.displayName = "Heading";
|
|
92
|
+
function A() {
|
|
93
|
+
return A = Object.assign ? Object.assign.bind() : function(e) {
|
|
93
94
|
for (var n = 1; n < arguments.length; n++) {
|
|
94
95
|
var t = arguments[n];
|
|
95
96
|
for (var o in t)
|
|
96
97
|
Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
|
|
97
98
|
}
|
|
98
99
|
return e;
|
|
99
|
-
},
|
|
100
|
+
}, A.apply(this, arguments);
|
|
100
101
|
}
|
|
101
102
|
function x(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
102
103
|
return function(i) {
|
|
103
|
-
if (e == null || e(i), t === !1 || !i.defaultPrevented)
|
|
104
|
-
return n == null ? void 0 : n(i);
|
|
104
|
+
if (e == null || e(i), t === !1 || !i.defaultPrevented) return n == null ? void 0 : n(i);
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Ke(e, n) {
|
|
108
108
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function he(...e) {
|
|
111
111
|
return (n) => e.forEach(
|
|
112
|
-
(t) =>
|
|
112
|
+
(t) => Ke(t, n)
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
115
|
function L(...e) {
|
|
116
|
-
return M(
|
|
116
|
+
return M(he(...e), e);
|
|
117
117
|
}
|
|
118
118
|
function J(e, n = []) {
|
|
119
119
|
let t = [];
|
|
@@ -123,22 +123,20 @@ function J(e, n = []) {
|
|
|
123
123
|
...t,
|
|
124
124
|
a
|
|
125
125
|
];
|
|
126
|
-
function u(
|
|
127
|
-
const { scope: f, children:
|
|
126
|
+
function u(p) {
|
|
127
|
+
const { scope: f, children: l, ...d } = p, m = (f == null ? void 0 : f[e][s]) || c, g = U(
|
|
128
128
|
() => d,
|
|
129
129
|
Object.values(d)
|
|
130
130
|
);
|
|
131
|
-
return /* @__PURE__ */ m
|
|
131
|
+
return /* @__PURE__ */ b(m.Provider, {
|
|
132
132
|
value: g
|
|
133
|
-
},
|
|
133
|
+
}, l);
|
|
134
134
|
}
|
|
135
|
-
function _(
|
|
136
|
-
const
|
|
137
|
-
if (d)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return a;
|
|
141
|
-
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
135
|
+
function _(p, f) {
|
|
136
|
+
const l = (f == null ? void 0 : f[e][s]) || c, d = me(l);
|
|
137
|
+
if (d) return d;
|
|
138
|
+
if (a !== void 0) return a;
|
|
139
|
+
throw new Error(`\`${p}\` must be used within \`${r}\``);
|
|
142
140
|
}
|
|
143
141
|
return u.displayName = r + "Provider", [
|
|
144
142
|
u,
|
|
@@ -170,8 +168,7 @@ function J(e, n = []) {
|
|
|
170
168
|
}
|
|
171
169
|
function Ye(...e) {
|
|
172
170
|
const n = e[0];
|
|
173
|
-
if (e.length === 1)
|
|
174
|
-
return n;
|
|
171
|
+
if (e.length === 1) return n;
|
|
175
172
|
const t = () => {
|
|
176
173
|
const o = e.map(
|
|
177
174
|
(i) => ({
|
|
@@ -181,10 +178,10 @@ function Ye(...e) {
|
|
|
181
178
|
);
|
|
182
179
|
return function(r) {
|
|
183
180
|
const a = o.reduce((c, { useScope: s, scopeName: u }) => {
|
|
184
|
-
const
|
|
181
|
+
const p = s(r)[`__scope${u}`];
|
|
185
182
|
return {
|
|
186
183
|
...c,
|
|
187
|
-
...
|
|
184
|
+
...p
|
|
188
185
|
};
|
|
189
186
|
}, {});
|
|
190
187
|
return U(
|
|
@@ -209,28 +206,28 @@ function O() {
|
|
|
209
206
|
return e;
|
|
210
207
|
}, O.apply(this, arguments);
|
|
211
208
|
}
|
|
212
|
-
const W = /* @__PURE__ */
|
|
209
|
+
const W = /* @__PURE__ */ C((e, n) => {
|
|
213
210
|
const { children: t, ...o } = e, i = P.toArray(t), r = i.find(Xe);
|
|
214
211
|
if (r) {
|
|
215
212
|
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
|
-
return /* @__PURE__ */
|
|
213
|
+
return /* @__PURE__ */ b(ie, O({}, o, {
|
|
217
214
|
ref: n
|
|
218
215
|
}), /* @__PURE__ */ q(a) ? /* @__PURE__ */ Z(a, void 0, c) : null);
|
|
219
216
|
}
|
|
220
|
-
return /* @__PURE__ */
|
|
217
|
+
return /* @__PURE__ */ b(ie, O({}, o, {
|
|
221
218
|
ref: n
|
|
222
219
|
}), t);
|
|
223
220
|
});
|
|
224
221
|
W.displayName = "Slot";
|
|
225
|
-
const ie = /* @__PURE__ */
|
|
222
|
+
const ie = /* @__PURE__ */ C((e, n) => {
|
|
226
223
|
const { children: t, ...o } = e;
|
|
227
224
|
return /* @__PURE__ */ q(t) ? /* @__PURE__ */ Z(t, {
|
|
228
225
|
...Ze(o, t.props),
|
|
229
|
-
ref: n ?
|
|
226
|
+
ref: n ? he(n, t.ref) : t.ref
|
|
230
227
|
}) : P.count(t) > 1 ? P.only(null) : null;
|
|
231
228
|
});
|
|
232
229
|
ie.displayName = "SlotClone";
|
|
233
|
-
const We = ({ children: e }) => /* @__PURE__ */
|
|
230
|
+
const We = ({ children: e }) => /* @__PURE__ */ b(Ge, null, e);
|
|
234
231
|
function Xe(e) {
|
|
235
232
|
return /* @__PURE__ */ q(e) && e.type === We;
|
|
236
233
|
}
|
|
@@ -273,11 +270,11 @@ const Je = [
|
|
|
273
270
|
"svg",
|
|
274
271
|
"ul"
|
|
275
272
|
], j = Je.reduce((e, n) => {
|
|
276
|
-
const t = /* @__PURE__ */
|
|
273
|
+
const t = /* @__PURE__ */ C((o, i) => {
|
|
277
274
|
const { asChild: r, ...a } = o, c = r ? W : n;
|
|
278
275
|
return T(() => {
|
|
279
276
|
window[Symbol.for("radix-ui")] = !0;
|
|
280
|
-
}, []), /* @__PURE__ */
|
|
277
|
+
}, []), /* @__PURE__ */ b(c, O({}, a, {
|
|
281
278
|
ref: i
|
|
282
279
|
}));
|
|
283
280
|
});
|
|
@@ -292,34 +289,33 @@ function Qe(e) {
|
|
|
292
289
|
current: null
|
|
293
290
|
},
|
|
294
291
|
itemMap: /* @__PURE__ */ new Map()
|
|
295
|
-
}), a = (
|
|
296
|
-
const { scope: d, children:
|
|
297
|
-
return /* @__PURE__ */
|
|
292
|
+
}), a = (l) => {
|
|
293
|
+
const { scope: d, children: m } = l, g = N.useRef(null), $ = N.useRef(/* @__PURE__ */ new Map()).current;
|
|
294
|
+
return /* @__PURE__ */ N.createElement(i, {
|
|
298
295
|
scope: d,
|
|
299
296
|
itemMap: $,
|
|
300
297
|
collectionRef: g
|
|
301
|
-
},
|
|
302
|
-
}, c = e + "CollectionSlot", s = /* @__PURE__ */
|
|
303
|
-
const { scope:
|
|
304
|
-
return /* @__PURE__ */
|
|
298
|
+
}, m);
|
|
299
|
+
}, c = e + "CollectionSlot", s = /* @__PURE__ */ N.forwardRef((l, d) => {
|
|
300
|
+
const { scope: m, children: g } = l, $ = r(c, m), h = L(d, $.collectionRef);
|
|
301
|
+
return /* @__PURE__ */ N.createElement(W, {
|
|
305
302
|
ref: h
|
|
306
303
|
}, g);
|
|
307
|
-
}), u = e + "CollectionItemSlot", _ = "data-radix-collection-item",
|
|
308
|
-
const { scope:
|
|
309
|
-
return
|
|
304
|
+
}), u = e + "CollectionItemSlot", _ = "data-radix-collection-item", p = /* @__PURE__ */ N.forwardRef((l, d) => {
|
|
305
|
+
const { scope: m, children: g, ...$ } = l, h = N.useRef(null), B = L(d, h), E = r(u, m);
|
|
306
|
+
return N.useEffect(() => (E.itemMap.set(h, {
|
|
310
307
|
ref: h,
|
|
311
308
|
...$
|
|
312
|
-
}), () => void E.itemMap.delete(h))), /* @__PURE__ */
|
|
309
|
+
}), () => void E.itemMap.delete(h))), /* @__PURE__ */ N.createElement(W, {
|
|
313
310
|
[_]: "",
|
|
314
311
|
ref: B
|
|
315
312
|
}, g);
|
|
316
313
|
});
|
|
317
|
-
function f(
|
|
318
|
-
const d = r(e + "CollectionConsumer",
|
|
319
|
-
return
|
|
314
|
+
function f(l) {
|
|
315
|
+
const d = r(e + "CollectionConsumer", l);
|
|
316
|
+
return N.useCallback(() => {
|
|
320
317
|
const g = d.collectionRef.current;
|
|
321
|
-
if (!g)
|
|
322
|
-
return [];
|
|
318
|
+
if (!g) return [];
|
|
323
319
|
const $ = Array.from(g.querySelectorAll(`[${_}]`));
|
|
324
320
|
return Array.from(d.itemMap.values()).sort(
|
|
325
321
|
(E, Q) => $.indexOf(E.ref.current) - $.indexOf(Q.ref.current)
|
|
@@ -333,13 +329,13 @@ function Qe(e) {
|
|
|
333
329
|
{
|
|
334
330
|
Provider: a,
|
|
335
331
|
Slot: s,
|
|
336
|
-
ItemSlot:
|
|
332
|
+
ItemSlot: p
|
|
337
333
|
},
|
|
338
334
|
f,
|
|
339
335
|
o
|
|
340
336
|
];
|
|
341
337
|
}
|
|
342
|
-
const X = globalThis != null && globalThis.document ?
|
|
338
|
+
const X = globalThis != null && globalThis.document ? Ue : () => {
|
|
343
339
|
}, er = _e.useId || (() => {
|
|
344
340
|
});
|
|
345
341
|
let rr = 0;
|
|
@@ -353,8 +349,8 @@ function tr(e) {
|
|
|
353
349
|
e
|
|
354
350
|
]), n ? `radix-${n}` : "";
|
|
355
351
|
}
|
|
356
|
-
function
|
|
357
|
-
const n =
|
|
352
|
+
function se(e) {
|
|
353
|
+
const n = I(e);
|
|
358
354
|
return T(() => {
|
|
359
355
|
n.current = e;
|
|
360
356
|
}), U(
|
|
@@ -365,17 +361,16 @@ function ue(e) {
|
|
|
365
361
|
[]
|
|
366
362
|
);
|
|
367
363
|
}
|
|
368
|
-
function
|
|
364
|
+
function ge({ prop: e, defaultProp: n, onChange: t = () => {
|
|
369
365
|
} }) {
|
|
370
366
|
const [o, i] = nr({
|
|
371
367
|
defaultProp: n,
|
|
372
368
|
onChange: t
|
|
373
|
-
}), r = e !== void 0, a = r ? e : o, c =
|
|
369
|
+
}), r = e !== void 0, a = r ? e : o, c = se(t), s = M((u) => {
|
|
374
370
|
if (r) {
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
} else
|
|
378
|
-
i(u);
|
|
371
|
+
const p = typeof u == "function" ? u(e) : u;
|
|
372
|
+
p !== e && c(p);
|
|
373
|
+
} else i(u);
|
|
379
374
|
}, [
|
|
380
375
|
r,
|
|
381
376
|
e,
|
|
@@ -388,7 +383,7 @@ function he({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
388
383
|
];
|
|
389
384
|
}
|
|
390
385
|
function nr({ defaultProp: e, onChange: n }) {
|
|
391
|
-
const t = F(e), [o] = t, i =
|
|
386
|
+
const t = F(e), [o] = t, i = I(o), r = se(n);
|
|
392
387
|
return T(() => {
|
|
393
388
|
i.current !== o && (r(o), i.current = o);
|
|
394
389
|
}, [
|
|
@@ -398,43 +393,43 @@ function nr({ defaultProp: e, onChange: n }) {
|
|
|
398
393
|
]), t;
|
|
399
394
|
}
|
|
400
395
|
const or = /* @__PURE__ */ ae(void 0);
|
|
401
|
-
function
|
|
402
|
-
const n =
|
|
396
|
+
function ve(e) {
|
|
397
|
+
const n = me(or);
|
|
403
398
|
return e || n || "ltr";
|
|
404
399
|
}
|
|
405
400
|
const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
406
401
|
bubbles: !1,
|
|
407
402
|
cancelable: !0
|
|
408
|
-
},
|
|
403
|
+
}, de = "RovingFocusGroup", [ce, ye, ir] = Qe(de), [cr, Re] = J(de, [
|
|
409
404
|
ir
|
|
410
|
-
]), [ur, sr] = cr(
|
|
405
|
+
]), [ur, sr] = cr(de), dr = /* @__PURE__ */ C((e, n) => /* @__PURE__ */ b(ce.Provider, {
|
|
411
406
|
scope: e.__scopeRovingFocusGroup
|
|
412
|
-
}, /* @__PURE__ */
|
|
407
|
+
}, /* @__PURE__ */ b(ce.Slot, {
|
|
413
408
|
scope: e.__scopeRovingFocusGroup
|
|
414
|
-
}, /* @__PURE__ */
|
|
409
|
+
}, /* @__PURE__ */ b(pr, O({}, e, {
|
|
415
410
|
ref: n
|
|
416
|
-
}))))), pr = /* @__PURE__ */
|
|
417
|
-
const { __scopeRovingFocusGroup: t, orientation: o, loop: i = !1, dir: r, currentTabStopId: a, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: s, onEntryFocus: u, ..._ } = e,
|
|
411
|
+
}))))), pr = /* @__PURE__ */ C((e, n) => {
|
|
412
|
+
const { __scopeRovingFocusGroup: t, orientation: o, loop: i = !1, dir: r, currentTabStopId: a, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: s, onEntryFocus: u, ..._ } = e, p = I(null), f = L(n, p), l = ve(r), [d = null, m] = ge({
|
|
418
413
|
prop: a,
|
|
419
414
|
defaultProp: c,
|
|
420
415
|
onChange: s
|
|
421
|
-
}), [g, $] = F(!1), h =
|
|
416
|
+
}), [g, $] = F(!1), h = se(u), B = ye(t), E = I(!1), [Q, le] = F(0);
|
|
422
417
|
return T(() => {
|
|
423
|
-
const y =
|
|
418
|
+
const y = p.current;
|
|
424
419
|
if (y)
|
|
425
420
|
return y.addEventListener(re, h), () => y.removeEventListener(re, h);
|
|
426
421
|
}, [
|
|
427
422
|
h
|
|
428
|
-
]), /* @__PURE__ */
|
|
423
|
+
]), /* @__PURE__ */ b(ur, {
|
|
429
424
|
scope: t,
|
|
430
425
|
orientation: o,
|
|
431
|
-
dir:
|
|
426
|
+
dir: l,
|
|
432
427
|
loop: i,
|
|
433
428
|
currentTabStopId: d,
|
|
434
429
|
onItemFocus: M(
|
|
435
|
-
(y) =>
|
|
430
|
+
(y) => m(y),
|
|
436
431
|
[
|
|
437
|
-
|
|
432
|
+
m
|
|
438
433
|
]
|
|
439
434
|
),
|
|
440
435
|
onItemShiftTab: M(
|
|
@@ -442,18 +437,18 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
442
437
|
[]
|
|
443
438
|
),
|
|
444
439
|
onFocusableItemAdd: M(
|
|
445
|
-
() =>
|
|
440
|
+
() => le(
|
|
446
441
|
(y) => y + 1
|
|
447
442
|
),
|
|
448
443
|
[]
|
|
449
444
|
),
|
|
450
445
|
onFocusableItemRemove: M(
|
|
451
|
-
() =>
|
|
446
|
+
() => le(
|
|
452
447
|
(y) => y - 1
|
|
453
448
|
),
|
|
454
449
|
[]
|
|
455
450
|
)
|
|
456
|
-
}, /* @__PURE__ */
|
|
451
|
+
}, /* @__PURE__ */ b(j.div, O({
|
|
457
452
|
tabIndex: g || Q === 0 ? -1 : 0,
|
|
458
453
|
"data-orientation": o
|
|
459
454
|
}, _, {
|
|
@@ -466,24 +461,24 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
466
461
|
E.current = !0;
|
|
467
462
|
}),
|
|
468
463
|
onFocus: x(e.onFocus, (y) => {
|
|
469
|
-
const
|
|
470
|
-
if (y.target === y.currentTarget &&
|
|
471
|
-
const
|
|
472
|
-
if (y.currentTarget.dispatchEvent(
|
|
464
|
+
const ke = !E.current;
|
|
465
|
+
if (y.target === y.currentTarget && ke && !g) {
|
|
466
|
+
const fe = new CustomEvent(re, ar);
|
|
467
|
+
if (y.currentTarget.dispatchEvent(fe), !fe.defaultPrevented) {
|
|
473
468
|
const ee = B().filter(
|
|
474
469
|
(w) => w.focusable
|
|
475
|
-
), ke = ee.find(
|
|
476
|
-
(w) => w.active
|
|
477
470
|
), Me = ee.find(
|
|
471
|
+
(w) => w.active
|
|
472
|
+
), Fe = ee.find(
|
|
478
473
|
(w) => w.id === d
|
|
479
|
-
),
|
|
480
|
-
ke,
|
|
474
|
+
), Le = [
|
|
481
475
|
Me,
|
|
476
|
+
Fe,
|
|
482
477
|
...ee
|
|
483
478
|
].filter(Boolean).map(
|
|
484
479
|
(w) => w.ref.current
|
|
485
480
|
);
|
|
486
|
-
Ce(
|
|
481
|
+
Ce(Le);
|
|
487
482
|
}
|
|
488
483
|
}
|
|
489
484
|
E.current = !1;
|
|
@@ -493,21 +488,21 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
493
488
|
() => $(!1)
|
|
494
489
|
)
|
|
495
490
|
})));
|
|
496
|
-
}), lr = "RovingFocusGroupItem", fr = /* @__PURE__ */
|
|
497
|
-
const { __scopeRovingFocusGroup: t, focusable: o = !0, active: i = !1, tabStopId: r, ...a } = e, c = tr(), s = r || c, u = sr(lr, t), _ = u.currentTabStopId === s,
|
|
491
|
+
}), lr = "RovingFocusGroupItem", fr = /* @__PURE__ */ C((e, n) => {
|
|
492
|
+
const { __scopeRovingFocusGroup: t, focusable: o = !0, active: i = !1, tabStopId: r, ...a } = e, c = tr(), s = r || c, u = sr(lr, t), _ = u.currentTabStopId === s, p = ye(t), { onFocusableItemAdd: f, onFocusableItemRemove: l } = u;
|
|
498
493
|
return T(() => {
|
|
499
494
|
if (o)
|
|
500
|
-
return f(), () =>
|
|
495
|
+
return f(), () => l();
|
|
501
496
|
}, [
|
|
502
497
|
o,
|
|
503
498
|
f,
|
|
504
|
-
|
|
505
|
-
]), /* @__PURE__ */
|
|
499
|
+
l
|
|
500
|
+
]), /* @__PURE__ */ b(ce.ItemSlot, {
|
|
506
501
|
scope: t,
|
|
507
502
|
id: s,
|
|
508
503
|
focusable: o,
|
|
509
504
|
active: i
|
|
510
|
-
}, /* @__PURE__ */
|
|
505
|
+
}, /* @__PURE__ */ b(j.span, O({
|
|
511
506
|
tabIndex: _ ? 0 : -1,
|
|
512
507
|
"data-orientation": u.orientation
|
|
513
508
|
}, a, {
|
|
@@ -524,20 +519,18 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
524
519
|
u.onItemShiftTab();
|
|
525
520
|
return;
|
|
526
521
|
}
|
|
527
|
-
if (d.target !== d.currentTarget)
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
if (b !== void 0) {
|
|
522
|
+
if (d.target !== d.currentTarget) return;
|
|
523
|
+
const m = br(d, u.orientation, u.dir);
|
|
524
|
+
if (m !== void 0) {
|
|
531
525
|
d.preventDefault();
|
|
532
|
-
let $ =
|
|
526
|
+
let $ = p().filter(
|
|
533
527
|
(h) => h.focusable
|
|
534
528
|
).map(
|
|
535
529
|
(h) => h.ref.current
|
|
536
530
|
);
|
|
537
|
-
if (
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
b === "prev" && $.reverse();
|
|
531
|
+
if (m === "last") $.reverse();
|
|
532
|
+
else if (m === "prev" || m === "next") {
|
|
533
|
+
m === "prev" && $.reverse();
|
|
541
534
|
const h = $.indexOf(d.currentTarget);
|
|
542
535
|
$ = u.loop ? $r($, h + 1) : $.slice(h + 1);
|
|
543
536
|
}
|
|
@@ -557,11 +550,11 @@ const re = "rovingFocusGroup.onEntryFocus", ar = {
|
|
|
557
550
|
PageDown: "last",
|
|
558
551
|
End: "last"
|
|
559
552
|
};
|
|
560
|
-
function
|
|
553
|
+
function mr(e, n) {
|
|
561
554
|
return n !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
562
555
|
}
|
|
563
|
-
function
|
|
564
|
-
const o =
|
|
556
|
+
function br(e, n, t) {
|
|
557
|
+
const o = mr(e.key, t);
|
|
565
558
|
if (!(n === "vertical" && [
|
|
566
559
|
"ArrowLeft",
|
|
567
560
|
"ArrowRight"
|
|
@@ -574,8 +567,7 @@ function mr(e, n, t) {
|
|
|
574
567
|
function Ce(e) {
|
|
575
568
|
const n = document.activeElement;
|
|
576
569
|
for (const t of e)
|
|
577
|
-
if (t === n || (t.focus(), document.activeElement !== n))
|
|
578
|
-
return;
|
|
570
|
+
if (t === n || (t.focus(), document.activeElement !== n)) return;
|
|
579
571
|
}
|
|
580
572
|
function $r(e, n) {
|
|
581
573
|
return e.map(
|
|
@@ -592,8 +584,7 @@ function vr(e) {
|
|
|
592
584
|
height: e.offsetHeight
|
|
593
585
|
});
|
|
594
586
|
const o = new ResizeObserver((i) => {
|
|
595
|
-
if (!Array.isArray(i) || !i.length)
|
|
596
|
-
return;
|
|
587
|
+
if (!Array.isArray(i) || !i.length) return;
|
|
597
588
|
const r = i[0];
|
|
598
589
|
let a, c;
|
|
599
590
|
if ("borderBoxSize" in r) {
|
|
@@ -616,7 +607,7 @@ function vr(e) {
|
|
|
616
607
|
]), n;
|
|
617
608
|
}
|
|
618
609
|
function yr(e) {
|
|
619
|
-
const n =
|
|
610
|
+
const n = I({
|
|
620
611
|
value: e,
|
|
621
612
|
previous: e
|
|
622
613
|
});
|
|
@@ -624,23 +615,23 @@ function yr(e) {
|
|
|
624
615
|
e
|
|
625
616
|
]);
|
|
626
617
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
618
|
+
function Rr(e, n) {
|
|
619
|
+
return qe((t, o) => {
|
|
629
620
|
const i = n[t][o];
|
|
630
621
|
return i ?? t;
|
|
631
622
|
}, e);
|
|
632
623
|
}
|
|
633
|
-
const
|
|
634
|
-
const { present: n, children: t } = e, o =
|
|
624
|
+
const Ie = (e) => {
|
|
625
|
+
const { present: n, children: t } = e, o = Cr(n), i = typeof t == "function" ? t({
|
|
635
626
|
present: o.isPresent
|
|
636
627
|
}) : P.only(t), r = L(o.ref, i.ref);
|
|
637
628
|
return typeof t == "function" || o.isPresent ? /* @__PURE__ */ Z(i, {
|
|
638
629
|
ref: r
|
|
639
630
|
}) : null;
|
|
640
631
|
};
|
|
641
|
-
|
|
642
|
-
function
|
|
643
|
-
const [n, t] = F(), o =
|
|
632
|
+
Ie.displayName = "Presence";
|
|
633
|
+
function Cr(e) {
|
|
634
|
+
const [n, t] = F(), o = I({}), i = I(e), r = I("none"), a = e ? "mounted" : "unmounted", [c, s] = Rr(a, {
|
|
644
635
|
mounted: {
|
|
645
636
|
UNMOUNT: "unmounted",
|
|
646
637
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -654,28 +645,28 @@ function Rr(e) {
|
|
|
654
645
|
}
|
|
655
646
|
});
|
|
656
647
|
return T(() => {
|
|
657
|
-
const u =
|
|
648
|
+
const u = H(o.current);
|
|
658
649
|
r.current = c === "mounted" ? u : "none";
|
|
659
650
|
}, [
|
|
660
651
|
c
|
|
661
652
|
]), X(() => {
|
|
662
653
|
const u = o.current, _ = i.current;
|
|
663
654
|
if (_ !== e) {
|
|
664
|
-
const f = r.current,
|
|
665
|
-
e ? s("MOUNT") :
|
|
655
|
+
const f = r.current, l = H(u);
|
|
656
|
+
e ? s("MOUNT") : l === "none" || (u == null ? void 0 : u.display) === "none" ? s("UNMOUNT") : s(_ && f !== l ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
666
657
|
}
|
|
667
658
|
}, [
|
|
668
659
|
e,
|
|
669
660
|
s
|
|
670
661
|
]), X(() => {
|
|
671
662
|
if (n) {
|
|
672
|
-
const u = (
|
|
673
|
-
const
|
|
674
|
-
|
|
663
|
+
const u = (p) => {
|
|
664
|
+
const l = H(o.current).includes(p.animationName);
|
|
665
|
+
p.target === n && l && je(
|
|
675
666
|
() => s("ANIMATION_END")
|
|
676
667
|
);
|
|
677
|
-
}, _ = (
|
|
678
|
-
|
|
668
|
+
}, _ = (p) => {
|
|
669
|
+
p.target === n && (r.current = H(o.current));
|
|
679
670
|
};
|
|
680
671
|
return n.addEventListener("animationstart", _), n.addEventListener("animationcancel", u), n.addEventListener("animationend", u), () => {
|
|
681
672
|
n.removeEventListener("animationstart", _), n.removeEventListener("animationcancel", u), n.removeEventListener("animationend", u);
|
|
@@ -695,34 +686,34 @@ function Rr(e) {
|
|
|
695
686
|
}, [])
|
|
696
687
|
};
|
|
697
688
|
}
|
|
698
|
-
function
|
|
689
|
+
function H(e) {
|
|
699
690
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
700
691
|
}
|
|
701
|
-
const
|
|
702
|
-
const { __scopeRadio: t, name: o, checked: i = !1, required: r, disabled: a, value: c = "on", onCheck: s, ...u } = e, [_,
|
|
692
|
+
const Ne = "Radio", [Ir, Ae] = J(Ne), [Nr, Ar] = Ir(Ne), Sr = /* @__PURE__ */ C((e, n) => {
|
|
693
|
+
const { __scopeRadio: t, name: o, checked: i = !1, required: r, disabled: a, value: c = "on", onCheck: s, ...u } = e, [_, p] = F(null), f = L(
|
|
703
694
|
n,
|
|
704
|
-
(
|
|
705
|
-
),
|
|
706
|
-
return /* @__PURE__ */
|
|
695
|
+
(m) => p(m)
|
|
696
|
+
), l = I(!1), d = _ ? !!_.closest("form") : !0;
|
|
697
|
+
return /* @__PURE__ */ b(Nr, {
|
|
707
698
|
scope: t,
|
|
708
699
|
checked: i,
|
|
709
700
|
disabled: a
|
|
710
|
-
}, /* @__PURE__ */
|
|
701
|
+
}, /* @__PURE__ */ b(j.button, A({
|
|
711
702
|
type: "button",
|
|
712
703
|
role: "radio",
|
|
713
704
|
"aria-checked": i,
|
|
714
|
-
"data-state":
|
|
705
|
+
"data-state": Se(i),
|
|
715
706
|
"data-disabled": a ? "" : void 0,
|
|
716
707
|
disabled: a,
|
|
717
708
|
value: c
|
|
718
709
|
}, u, {
|
|
719
710
|
ref: f,
|
|
720
|
-
onClick: x(e.onClick, (
|
|
721
|
-
i || s == null || s(), d && (
|
|
711
|
+
onClick: x(e.onClick, (m) => {
|
|
712
|
+
i || s == null || s(), d && (l.current = m.isPropagationStopped(), l.current || m.stopPropagation());
|
|
722
713
|
})
|
|
723
|
-
})), d && /* @__PURE__ */
|
|
714
|
+
})), d && /* @__PURE__ */ b(Pr, {
|
|
724
715
|
control: _,
|
|
725
|
-
bubbles: !
|
|
716
|
+
bubbles: !l.current,
|
|
726
717
|
name: o,
|
|
727
718
|
value: c,
|
|
728
719
|
checked: i,
|
|
@@ -732,31 +723,31 @@ const Ae = "Radio", [Ar, Se] = J(Ae), [Sr, Ir] = Ar(Ae), Nr = /* @__PURE__ */ R(
|
|
|
732
723
|
transform: "translateX(-100%)"
|
|
733
724
|
}
|
|
734
725
|
}));
|
|
735
|
-
}), xr = "RadioIndicator", Er = /* @__PURE__ */
|
|
736
|
-
const { __scopeRadio: t, forceMount: o, ...i } = e, r =
|
|
737
|
-
return /* @__PURE__ */
|
|
726
|
+
}), xr = "RadioIndicator", Er = /* @__PURE__ */ C((e, n) => {
|
|
727
|
+
const { __scopeRadio: t, forceMount: o, ...i } = e, r = Ar(xr, t);
|
|
728
|
+
return /* @__PURE__ */ b(Ie, {
|
|
738
729
|
present: o || r.checked
|
|
739
|
-
}, /* @__PURE__ */
|
|
740
|
-
"data-state":
|
|
730
|
+
}, /* @__PURE__ */ b(j.span, A({
|
|
731
|
+
"data-state": Se(r.checked),
|
|
741
732
|
"data-disabled": r.disabled ? "" : void 0
|
|
742
733
|
}, i, {
|
|
743
734
|
ref: n
|
|
744
735
|
})));
|
|
745
736
|
}), Pr = (e) => {
|
|
746
|
-
const { control: n, checked: t, bubbles: o = !0, ...i } = e, r =
|
|
737
|
+
const { control: n, checked: t, bubbles: o = !0, ...i } = e, r = I(null), a = yr(t), c = vr(n);
|
|
747
738
|
return T(() => {
|
|
748
|
-
const s = r.current, u = window.HTMLInputElement.prototype,
|
|
749
|
-
if (a !== t &&
|
|
739
|
+
const s = r.current, u = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(u, "checked").set;
|
|
740
|
+
if (a !== t && p) {
|
|
750
741
|
const f = new Event("click", {
|
|
751
742
|
bubbles: o
|
|
752
743
|
});
|
|
753
|
-
|
|
744
|
+
p.call(s, t), s.dispatchEvent(f);
|
|
754
745
|
}
|
|
755
746
|
}, [
|
|
756
747
|
a,
|
|
757
748
|
t,
|
|
758
749
|
o
|
|
759
|
-
]), /* @__PURE__ */
|
|
750
|
+
]), /* @__PURE__ */ b("input", A({
|
|
760
751
|
type: "radio",
|
|
761
752
|
"aria-hidden": !0,
|
|
762
753
|
defaultChecked: t
|
|
@@ -773,7 +764,7 @@ const Ae = "Radio", [Ar, Se] = J(Ae), [Sr, Ir] = Ar(Ae), Nr = /* @__PURE__ */ R(
|
|
|
773
764
|
}
|
|
774
765
|
}));
|
|
775
766
|
};
|
|
776
|
-
function
|
|
767
|
+
function Se(e) {
|
|
777
768
|
return e ? "checked" : "unchecked";
|
|
778
769
|
}
|
|
779
770
|
const Or = [
|
|
@@ -781,29 +772,29 @@ const Or = [
|
|
|
781
772
|
"ArrowDown",
|
|
782
773
|
"ArrowLeft",
|
|
783
774
|
"ArrowRight"
|
|
784
|
-
],
|
|
785
|
-
|
|
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:
|
|
775
|
+
], xe = "RadioGroup", [Tr, pt] = J(xe, [
|
|
776
|
+
Re,
|
|
777
|
+
Ae
|
|
778
|
+
]), Ee = Re(), Pe = Ae(), [wr, kr] = Tr(xe), Mr = /* @__PURE__ */ C((e, n) => {
|
|
779
|
+
const { __scopeRadioGroup: t, name: o, defaultValue: i, value: r, required: a = !1, disabled: c = !1, orientation: s, dir: u, loop: _ = !0, onValueChange: p, ...f } = e, l = Ee(t), d = ve(u), [m, g] = ge({
|
|
789
780
|
prop: r,
|
|
790
781
|
defaultProp: i,
|
|
791
|
-
onChange:
|
|
782
|
+
onChange: p
|
|
792
783
|
});
|
|
793
|
-
return /* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ b(wr, {
|
|
794
785
|
scope: t,
|
|
795
786
|
name: o,
|
|
796
787
|
required: a,
|
|
797
788
|
disabled: c,
|
|
798
|
-
value:
|
|
789
|
+
value: m,
|
|
799
790
|
onValueChange: g
|
|
800
|
-
}, /* @__PURE__ */
|
|
791
|
+
}, /* @__PURE__ */ b(hr, A({
|
|
801
792
|
asChild: !0
|
|
802
|
-
},
|
|
793
|
+
}, l, {
|
|
803
794
|
orientation: s,
|
|
804
795
|
dir: d,
|
|
805
796
|
loop: _
|
|
806
|
-
}), /* @__PURE__ */
|
|
797
|
+
}), /* @__PURE__ */ b(j.div, A({
|
|
807
798
|
role: "radiogroup",
|
|
808
799
|
"aria-required": a,
|
|
809
800
|
"aria-orientation": s,
|
|
@@ -812,46 +803,46 @@ const Or = [
|
|
|
812
803
|
}, f, {
|
|
813
804
|
ref: n
|
|
814
805
|
}))));
|
|
815
|
-
}), Fr = "RadioGroupItem", Lr = /* @__PURE__ */
|
|
816
|
-
const { __scopeRadioGroup: t, disabled: o, ...i } = e, r = kr(Fr, t), a = r.disabled || o, c =
|
|
806
|
+
}), Fr = "RadioGroupItem", Lr = /* @__PURE__ */ C((e, n) => {
|
|
807
|
+
const { __scopeRadioGroup: t, disabled: o, ...i } = e, r = kr(Fr, t), a = r.disabled || o, c = Ee(t), s = Pe(t), u = I(null), _ = L(n, u), p = r.value === i.value, f = I(!1);
|
|
817
808
|
return T(() => {
|
|
818
|
-
const
|
|
819
|
-
Or.includes(
|
|
809
|
+
const l = (m) => {
|
|
810
|
+
Or.includes(m.key) && (f.current = !0);
|
|
820
811
|
}, d = () => f.current = !1;
|
|
821
|
-
return document.addEventListener("keydown",
|
|
822
|
-
document.removeEventListener("keydown",
|
|
812
|
+
return document.addEventListener("keydown", l), document.addEventListener("keyup", d), () => {
|
|
813
|
+
document.removeEventListener("keydown", l), document.removeEventListener("keyup", d);
|
|
823
814
|
};
|
|
824
|
-
}, []), /* @__PURE__ */
|
|
815
|
+
}, []), /* @__PURE__ */ b(gr, A({
|
|
825
816
|
asChild: !0
|
|
826
817
|
}, c, {
|
|
827
818
|
focusable: !a,
|
|
828
|
-
active:
|
|
829
|
-
}), /* @__PURE__ */
|
|
819
|
+
active: p
|
|
820
|
+
}), /* @__PURE__ */ b(Sr, A({
|
|
830
821
|
disabled: a,
|
|
831
822
|
required: r.required,
|
|
832
|
-
checked:
|
|
823
|
+
checked: p
|
|
833
824
|
}, s, i, {
|
|
834
825
|
name: r.name,
|
|
835
826
|
ref: _,
|
|
836
827
|
onCheck: () => r.onValueChange(i.value),
|
|
837
|
-
onKeyDown: x((
|
|
838
|
-
|
|
828
|
+
onKeyDown: x((l) => {
|
|
829
|
+
l.key === "Enter" && l.preventDefault();
|
|
839
830
|
}),
|
|
840
831
|
onFocus: x(i.onFocus, () => {
|
|
841
|
-
var
|
|
842
|
-
f.current && ((
|
|
832
|
+
var l;
|
|
833
|
+
f.current && ((l = u.current) === null || l === void 0 || l.click());
|
|
843
834
|
})
|
|
844
835
|
})));
|
|
845
|
-
}), Dr = /* @__PURE__ */
|
|
846
|
-
const { __scopeRadioGroup: t, ...o } = e, i =
|
|
847
|
-
return /* @__PURE__ */
|
|
836
|
+
}), Dr = /* @__PURE__ */ C((e, n) => {
|
|
837
|
+
const { __scopeRadioGroup: t, ...o } = e, i = Pe(t);
|
|
838
|
+
return /* @__PURE__ */ b(Er, A({}, i, o, {
|
|
848
839
|
ref: n
|
|
849
840
|
}));
|
|
850
841
|
}), Gr = Mr, Ur = Lr, qr = Dr;
|
|
851
842
|
function jr(e) {
|
|
852
843
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
853
844
|
}
|
|
854
|
-
var
|
|
845
|
+
var Oe = { exports: {} };
|
|
855
846
|
/*!
|
|
856
847
|
Copyright (c) 2018 Jed Watson.
|
|
857
848
|
Licensed under the MIT License (MIT), see
|
|
@@ -886,8 +877,8 @@ var Pe = { exports: {} };
|
|
|
886
877
|
}
|
|
887
878
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
888
879
|
})();
|
|
889
|
-
})(
|
|
890
|
-
var Br =
|
|
880
|
+
})(Oe);
|
|
881
|
+
var Br = Oe.exports;
|
|
891
882
|
const zr = /* @__PURE__ */ jr(Br), Vr = {
|
|
892
883
|
"purpur-radio-card-group": "_purpur-radio-card-group_19msf_1",
|
|
893
884
|
"purpur-radio-card-group--vertical": "_purpur-radio-card-group--vertical_19msf_5",
|
|
@@ -908,11 +899,11 @@ const zr = /* @__PURE__ */ jr(Br), Vr = {
|
|
|
908
899
|
"purpur-radio-card-group__item-image-placeholder": "_purpur-radio-card-group__item-image-placeholder_19msf_167",
|
|
909
900
|
"purpur-radio-card-group__item-image-placeholder--loaded": "_purpur-radio-card-group__item-image-placeholder--loaded_19msf_172",
|
|
910
901
|
"purpur-radio-card-group__item-children": "_purpur-radio-card-group__item-children_19msf_175"
|
|
911
|
-
},
|
|
912
|
-
function
|
|
902
|
+
}, R = zr.bind(Vr);
|
|
903
|
+
function Hr(e) {
|
|
913
904
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
914
905
|
}
|
|
915
|
-
var
|
|
906
|
+
var Te = { exports: {} };
|
|
916
907
|
/*!
|
|
917
908
|
Copyright (c) 2018 Jed Watson.
|
|
918
909
|
Licensed under the MIT License (MIT), see
|
|
@@ -947,9 +938,9 @@ var Oe = { exports: {} };
|
|
|
947
938
|
}
|
|
948
939
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
949
940
|
})();
|
|
950
|
-
})(
|
|
951
|
-
var
|
|
952
|
-
const Yr = /* @__PURE__ */ Kr
|
|
941
|
+
})(Te);
|
|
942
|
+
var Kr = Te.exports;
|
|
943
|
+
const Yr = /* @__PURE__ */ Hr(Kr), D = {
|
|
953
944
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
954
945
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
955
946
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -975,10 +966,10 @@ const Yr = /* @__PURE__ */ Kr(Hr), D = {
|
|
|
975
966
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
976
967
|
OVERLINE100: "overline-100",
|
|
977
968
|
OVERLINE200: "overline-200"
|
|
978
|
-
}, G = "purpur-paragraph",
|
|
969
|
+
}, G = "purpur-paragraph", ue = ({
|
|
979
970
|
["data-testid"]: e,
|
|
980
971
|
children: n,
|
|
981
|
-
className: t
|
|
972
|
+
className: t,
|
|
982
973
|
disabled: o,
|
|
983
974
|
enableHyphenation: i = !1,
|
|
984
975
|
negative: r = !1,
|
|
@@ -997,10 +988,11 @@ const Yr = /* @__PURE__ */ Kr(Hr), D = {
|
|
|
997
988
|
]);
|
|
998
989
|
return /* @__PURE__ */ v("p", { ...c, className: s, "data-testid": e, children: n });
|
|
999
990
|
};
|
|
991
|
+
ue.displayName = "Paragraph";
|
|
1000
992
|
function Xr(e) {
|
|
1001
993
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1002
994
|
}
|
|
1003
|
-
var
|
|
995
|
+
var we = { exports: {} };
|
|
1004
996
|
/*!
|
|
1005
997
|
Copyright (c) 2018 Jed Watson.
|
|
1006
998
|
Licensed under the MIT License (MIT), see
|
|
@@ -1035,18 +1027,18 @@ var Te = { exports: {} };
|
|
|
1035
1027
|
}
|
|
1036
1028
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
1037
1029
|
})();
|
|
1038
|
-
})(
|
|
1039
|
-
var Zr =
|
|
1040
|
-
const Jr = /* @__PURE__ */ Xr(Zr), Qr = "
|
|
1041
|
-
"purpur-skeleton": "_purpur-
|
|
1030
|
+
})(we);
|
|
1031
|
+
var Zr = we.exports;
|
|
1032
|
+
const Jr = /* @__PURE__ */ Xr(Zr), Qr = "_loading_cil8l_1", te = {
|
|
1033
|
+
"purpur-skeleton": "_purpur-skeleton_cil8l_2",
|
|
1042
1034
|
loading: Qr,
|
|
1043
|
-
"purpur-skeleton--default": "_purpur-skeleton--
|
|
1044
|
-
"purpur-skeleton--negative": "_purpur-skeleton--
|
|
1045
|
-
"purpur-skeleton--xs": "_purpur-skeleton--
|
|
1046
|
-
"purpur-skeleton--sm": "_purpur-skeleton--
|
|
1047
|
-
"purpur-skeleton--md": "_purpur-skeleton--
|
|
1048
|
-
"purpur-skeleton--lg": "_purpur-skeleton--
|
|
1049
|
-
"purpur-skeleton--full": "_purpur-skeleton--
|
|
1035
|
+
"purpur-skeleton--default": "_purpur-skeleton--default_cil8l_25",
|
|
1036
|
+
"purpur-skeleton--negative": "_purpur-skeleton--negative_cil8l_31",
|
|
1037
|
+
"purpur-skeleton--xs": "_purpur-skeleton--xs_cil8l_37",
|
|
1038
|
+
"purpur-skeleton--sm": "_purpur-skeleton--sm_cil8l_40",
|
|
1039
|
+
"purpur-skeleton--md": "_purpur-skeleton--md_cil8l_43",
|
|
1040
|
+
"purpur-skeleton--lg": "_purpur-skeleton--lg_cil8l_46",
|
|
1041
|
+
"purpur-skeleton--full": "_purpur-skeleton--full_cil8l_49"
|
|
1050
1042
|
}, ne = "purpur-skeleton", et = ({
|
|
1051
1043
|
className: e,
|
|
1052
1044
|
["data-testid"]: n,
|
|
@@ -1062,19 +1054,19 @@ const Jr = /* @__PURE__ */ Xr(Zr), Qr = "_loading_93tal_1", te = {
|
|
|
1062
1054
|
te[`${ne}--${t}`]
|
|
1063
1055
|
]);
|
|
1064
1056
|
return /* @__PURE__ */ v("div", { className: a, style: o, "data-testid": n, ...r });
|
|
1065
|
-
},
|
|
1057
|
+
}, K = "purpur-radio-card-group__item-image", rt = (e) => !!(e != null && e.src) && !!e.altText, tt = ({
|
|
1066
1058
|
src: e,
|
|
1067
1059
|
altText: n,
|
|
1068
1060
|
noPlaceholder: t,
|
|
1069
1061
|
loading: o = "lazy",
|
|
1070
1062
|
["data-testid"]: i
|
|
1071
1063
|
}) => {
|
|
1072
|
-
const [r, a] = F(!1), c = () => a(!0), s =
|
|
1073
|
-
[`${
|
|
1074
|
-
}), u =
|
|
1075
|
-
[`${
|
|
1064
|
+
const [r, a] = F(!1), c = () => a(!0), s = R(K, {
|
|
1065
|
+
[`${K}--loaded`]: r
|
|
1066
|
+
}), u = R(`${K}-placeholder`, {
|
|
1067
|
+
[`${K}-placeholder--loaded`]: r
|
|
1076
1068
|
});
|
|
1077
|
-
return /* @__PURE__ */ k(
|
|
1069
|
+
return /* @__PURE__ */ k(De, { children: [
|
|
1078
1070
|
/* @__PURE__ */ v(
|
|
1079
1071
|
"img",
|
|
1080
1072
|
{
|
|
@@ -1088,62 +1080,61 @@ const Jr = /* @__PURE__ */ Xr(Zr), Qr = "_loading_93tal_1", te = {
|
|
|
1088
1080
|
),
|
|
1089
1081
|
!t && /* @__PURE__ */ v(et, { className: u })
|
|
1090
1082
|
] });
|
|
1091
|
-
},
|
|
1083
|
+
}, S = "purpur-radio-card-group__item", oe = (e, { disabled: n }) => typeof e == "function" ? e({ disabled: n }) : e, nt = ({ title: e, ...n }, t) => {
|
|
1092
1084
|
const {
|
|
1093
|
-
["data-testid"]:
|
|
1094
|
-
body:
|
|
1095
|
-
children:
|
|
1096
|
-
disabled:
|
|
1097
|
-
id:
|
|
1098
|
-
image:
|
|
1099
|
-
required:
|
|
1100
|
-
title: u,
|
|
1085
|
+
["data-testid"]: o,
|
|
1086
|
+
body: i,
|
|
1087
|
+
children: r,
|
|
1088
|
+
disabled: a,
|
|
1089
|
+
id: c,
|
|
1090
|
+
image: s,
|
|
1091
|
+
required: u,
|
|
1101
1092
|
value: _
|
|
1102
|
-
} = e;
|
|
1103
|
-
return /* @__PURE__ */ k("div", { className:
|
|
1093
|
+
} = n, p = { title: e, ...n };
|
|
1094
|
+
return /* @__PURE__ */ k("div", { className: R(`${S}-container`), ref: t, children: [
|
|
1104
1095
|
/* @__PURE__ */ k(
|
|
1105
1096
|
Ur,
|
|
1106
1097
|
{
|
|
1107
|
-
className:
|
|
1108
|
-
"data-testid":
|
|
1109
|
-
disabled:
|
|
1110
|
-
id:
|
|
1111
|
-
required:
|
|
1098
|
+
className: R(S),
|
|
1099
|
+
"data-testid": o,
|
|
1100
|
+
disabled: a,
|
|
1101
|
+
id: c,
|
|
1102
|
+
required: u,
|
|
1112
1103
|
value: _,
|
|
1113
1104
|
children: [
|
|
1114
|
-
|
|
1115
|
-
/* @__PURE__ */ k("span", { className:
|
|
1116
|
-
/* @__PURE__ */ k("span", { className:
|
|
1117
|
-
typeof
|
|
1118
|
-
|
|
1105
|
+
s && /* @__PURE__ */ v("span", { className: R(`${S}-image-container`), children: rt(s) ? /* @__PURE__ */ v(tt, { ...s, "data-testid": o && `${o}-image` }) : oe(s, p) }),
|
|
1106
|
+
/* @__PURE__ */ k("span", { className: R(`${S}-content`), children: [
|
|
1107
|
+
/* @__PURE__ */ k("span", { className: R(`${S}-top-container`), children: [
|
|
1108
|
+
typeof e == "string" ? /* @__PURE__ */ v(
|
|
1109
|
+
ue,
|
|
1119
1110
|
{
|
|
1120
|
-
className:
|
|
1121
|
-
"data-testid":
|
|
1111
|
+
className: R(`${S}-title`),
|
|
1112
|
+
"data-testid": o && `${o}-title`,
|
|
1122
1113
|
variant: "paragraph-100",
|
|
1123
|
-
disabled:
|
|
1124
|
-
children:
|
|
1114
|
+
disabled: a,
|
|
1115
|
+
children: e
|
|
1125
1116
|
}
|
|
1126
|
-
) : oe(
|
|
1127
|
-
/* @__PURE__ */ v("span", { className:
|
|
1117
|
+
) : oe(e, p),
|
|
1118
|
+
/* @__PURE__ */ v("span", { className: R(`${S}-radio`), children: /* @__PURE__ */ v(qr, { className: R(`${S}-indicator`) }) })
|
|
1128
1119
|
] }),
|
|
1129
|
-
|
|
1130
|
-
|
|
1120
|
+
i && /* @__PURE__ */ v("span", { className: R(`${S}-bottom-container`), children: typeof i == "string" ? /* @__PURE__ */ v(
|
|
1121
|
+
ue,
|
|
1131
1122
|
{
|
|
1132
|
-
"data-testid":
|
|
1123
|
+
"data-testid": o && `${o}-body`,
|
|
1133
1124
|
variant: "paragraph-100",
|
|
1134
|
-
disabled:
|
|
1135
|
-
children:
|
|
1125
|
+
disabled: a,
|
|
1126
|
+
children: i
|
|
1136
1127
|
}
|
|
1137
|
-
) : oe(
|
|
1128
|
+
) : oe(i, p) })
|
|
1138
1129
|
] })
|
|
1139
1130
|
]
|
|
1140
1131
|
}
|
|
1141
1132
|
),
|
|
1142
|
-
|
|
1133
|
+
r
|
|
1143
1134
|
] });
|
|
1144
|
-
},
|
|
1145
|
-
|
|
1146
|
-
const ot = (e) => q(e) && (e == null ? void 0 : e.type) ===
|
|
1135
|
+
}, pe = C(nt);
|
|
1136
|
+
pe.displayName = "RadioCardItem";
|
|
1137
|
+
const ot = (e) => q(e) && (e == null ? void 0 : e.type) === pe, lt = ["horizontal", "vertical"], ft = ["right", "left"], Y = "purpur-radio-card-group", at = ({
|
|
1147
1138
|
"data-testid": e,
|
|
1148
1139
|
"aria-labelledby": n,
|
|
1149
1140
|
children: t,
|
|
@@ -1155,10 +1146,10 @@ const ot = (e) => q(e) && (e == null ? void 0 : e.type) === de, Y = "purpur-radi
|
|
|
1155
1146
|
radioPosition: s = "right",
|
|
1156
1147
|
...u
|
|
1157
1148
|
}, _) => {
|
|
1158
|
-
const
|
|
1159
|
-
return /* @__PURE__ */ k("div", { className:
|
|
1149
|
+
const p = P.toArray(t).filter(ot);
|
|
1150
|
+
return /* @__PURE__ */ k("div", { className: R(o, `${Y}__container`), ref: _, children: [
|
|
1160
1151
|
r && /* @__PURE__ */ v(
|
|
1161
|
-
|
|
1152
|
+
$e,
|
|
1162
1153
|
{
|
|
1163
1154
|
"data-testid": e ? `${e}-label` : void 0,
|
|
1164
1155
|
id: `${u.id}-label`,
|
|
@@ -1167,12 +1158,12 @@ const ot = (e) => q(e) && (e == null ? void 0 : e.type) === de, Y = "purpur-radi
|
|
|
1167
1158
|
children: `${u.required ? "* " : ""}${r}`
|
|
1168
1159
|
}
|
|
1169
1160
|
),
|
|
1170
|
-
(!!(i != null && i.length) ||
|
|
1161
|
+
(!!(i != null && i.length) || p.length) && /* @__PURE__ */ k(
|
|
1171
1162
|
Gr,
|
|
1172
1163
|
{
|
|
1173
1164
|
...u,
|
|
1174
1165
|
"aria-labelledby": n || (r ? `${u.id}-label` : void 0),
|
|
1175
|
-
className:
|
|
1166
|
+
className: R(
|
|
1176
1167
|
Y,
|
|
1177
1168
|
`${Y}--${c}`,
|
|
1178
1169
|
`${Y}--radio-${s}`
|
|
@@ -1181,7 +1172,7 @@ const ot = (e) => q(e) && (e == null ? void 0 : e.type) === de, Y = "purpur-radi
|
|
|
1181
1172
|
loop: a,
|
|
1182
1173
|
children: [
|
|
1183
1174
|
i == null ? void 0 : i.map((f) => /* @__PURE__ */ v(
|
|
1184
|
-
|
|
1175
|
+
pe,
|
|
1185
1176
|
{
|
|
1186
1177
|
...f,
|
|
1187
1178
|
disabled: f.disabled || u.disabled,
|
|
@@ -1190,17 +1181,19 @@ const ot = (e) => q(e) && (e == null ? void 0 : e.type) === de, Y = "purpur-radi
|
|
|
1190
1181
|
f.id
|
|
1191
1182
|
)),
|
|
1192
1183
|
P.map(
|
|
1193
|
-
|
|
1184
|
+
p,
|
|
1194
1185
|
(f) => Z(f, { disabled: f.props.disabled || u.disabled })
|
|
1195
1186
|
)
|
|
1196
1187
|
]
|
|
1197
1188
|
}
|
|
1198
1189
|
)
|
|
1199
1190
|
] });
|
|
1200
|
-
}, it =
|
|
1191
|
+
}, it = C(at);
|
|
1201
1192
|
it.displayName = "RadioCardGroup";
|
|
1202
1193
|
export {
|
|
1194
|
+
lt as ORIENTATION,
|
|
1195
|
+
ft as RADIO_POSITION,
|
|
1203
1196
|
it as RadioCardGroup,
|
|
1204
|
-
|
|
1197
|
+
pe as RadioCardItem
|
|
1205
1198
|
};
|
|
1206
1199
|
//# sourceMappingURL=radio-card-group.es.js.map
|