@purpurds/radio-card-group 8.10.2 → 8.12.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/radio-card-group.cjs.js +1 -1
- package/dist/radio-card-group.cjs.js.map +1 -1
- package/dist/radio-card-group.d.ts +0 -1
- package/dist/radio-card-group.es.js +265 -264
- package/dist/radio-card-group.es.js.map +1 -1
- package/dist/radio-card-item-image.d.ts +0 -1
- package/dist/radio-card-item.d.ts +0 -1
- package/package.json +13 -13
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as d, jsxs as E, Fragment as
|
|
1
|
+
import { jsx as d, jsxs as E, Fragment as Le } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import P, { useState as Ue, forwardRef as le, isValidElement as je, Children as
|
|
3
|
+
import P, { useState as Ue, forwardRef as le, isValidElement as je, Children as oe, cloneElement as Ve } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
function Ke(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var ne = { exports: {} }, ae;
|
|
9
9
|
function Be() {
|
|
10
10
|
return ae || (ae = 1, (function(e) {
|
|
11
11
|
(function() {
|
|
12
12
|
var t = {}.hasOwnProperty;
|
|
13
|
-
function
|
|
14
|
-
for (var r = "",
|
|
15
|
-
var u = arguments[
|
|
13
|
+
function o() {
|
|
14
|
+
for (var r = "", n = 0; n < arguments.length; n++) {
|
|
15
|
+
var u = arguments[n];
|
|
16
16
|
u && (r = i(r, a(u)));
|
|
17
17
|
}
|
|
18
18
|
return r;
|
|
@@ -23,20 +23,20 @@ function Be() {
|
|
|
23
23
|
if (typeof r != "object")
|
|
24
24
|
return "";
|
|
25
25
|
if (Array.isArray(r))
|
|
26
|
-
return
|
|
26
|
+
return o.apply(null, r);
|
|
27
27
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
28
28
|
return r.toString();
|
|
29
|
-
var
|
|
29
|
+
var n = "";
|
|
30
30
|
for (var u in r)
|
|
31
|
-
t.call(r, u) && r[u] && (
|
|
32
|
-
return
|
|
31
|
+
t.call(r, u) && r[u] && (n = i(n, u));
|
|
32
|
+
return n;
|
|
33
33
|
}
|
|
34
|
-
function i(r,
|
|
35
|
-
return
|
|
34
|
+
function i(r, n) {
|
|
35
|
+
return n ? r ? r + " " + n : r + n : r;
|
|
36
36
|
}
|
|
37
|
-
e.exports ? (
|
|
37
|
+
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
38
38
|
})();
|
|
39
|
-
})(
|
|
39
|
+
})(ne)), ne.exports;
|
|
40
40
|
}
|
|
41
41
|
var We = Be();
|
|
42
42
|
const He = /* @__PURE__ */ Ke(We), F = {
|
|
@@ -64,27 +64,27 @@ const He = /* @__PURE__ */ Ke(We), F = {
|
|
|
64
64
|
}, D = "purpur-heading", fe = ({
|
|
65
65
|
children: e,
|
|
66
66
|
className: t = "",
|
|
67
|
-
enableHyphenation:
|
|
67
|
+
enableHyphenation: o = !1,
|
|
68
68
|
negative: a = !1,
|
|
69
69
|
tag: i,
|
|
70
70
|
variant: r = qe.TITLE100,
|
|
71
|
-
...
|
|
71
|
+
...n
|
|
72
72
|
}) => {
|
|
73
73
|
const u = i, p = He([
|
|
74
74
|
t,
|
|
75
75
|
F[D],
|
|
76
76
|
F[`${D}--${r}`],
|
|
77
77
|
{
|
|
78
|
-
[F[`${D}--hyphens`]]:
|
|
78
|
+
[F[`${D}--hyphens`]]: o,
|
|
79
79
|
[F[`${D}--negative`]]: a
|
|
80
80
|
}
|
|
81
81
|
]);
|
|
82
|
-
return /* @__PURE__ */ d(u, { className: p, ...
|
|
82
|
+
return /* @__PURE__ */ d(u, { className: p, ...n, children: e });
|
|
83
83
|
};
|
|
84
84
|
fe.displayName = "Heading";
|
|
85
|
-
function A(e, t, { checkForDefaultPrevented:
|
|
85
|
+
function A(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
|
|
86
86
|
return function(i) {
|
|
87
|
-
if (e?.(i),
|
|
87
|
+
if (e?.(i), o === !1 || !i.defaultPrevented)
|
|
88
88
|
return t?.(i);
|
|
89
89
|
};
|
|
90
90
|
}
|
|
@@ -93,14 +93,14 @@ function ie(e, t) {
|
|
|
93
93
|
return e(t);
|
|
94
94
|
e != null && (e.current = t);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function _e(...e) {
|
|
97
97
|
return (t) => {
|
|
98
|
-
let
|
|
98
|
+
let o = !1;
|
|
99
99
|
const a = e.map((i) => {
|
|
100
100
|
const r = ie(i, t);
|
|
101
|
-
return !
|
|
101
|
+
return !o && typeof r == "function" && (o = !0), r;
|
|
102
102
|
});
|
|
103
|
-
if (
|
|
103
|
+
if (o)
|
|
104
104
|
return () => {
|
|
105
105
|
for (let i = 0; i < a.length; i++) {
|
|
106
106
|
const r = a[i];
|
|
@@ -109,29 +109,29 @@ function me(...e) {
|
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return s.useCallback(
|
|
112
|
+
function $(...e) {
|
|
113
|
+
return s.useCallback(_e(...e), e);
|
|
114
114
|
}
|
|
115
115
|
function j(e, t = []) {
|
|
116
|
-
let
|
|
117
|
-
function a(r,
|
|
118
|
-
const u = s.createContext(
|
|
119
|
-
|
|
116
|
+
let o = [];
|
|
117
|
+
function a(r, n) {
|
|
118
|
+
const u = s.createContext(n), p = o.length;
|
|
119
|
+
o = [...o, n];
|
|
120
120
|
const c = (l) => {
|
|
121
|
-
const { scope: g, children:
|
|
122
|
-
return /* @__PURE__ */ d(h.Provider, { value: v, children:
|
|
121
|
+
const { scope: g, children: _, ...m } = l, h = g?.[e]?.[p] || u, v = s.useMemo(() => m, Object.values(m));
|
|
122
|
+
return /* @__PURE__ */ d(h.Provider, { value: v, children: _ });
|
|
123
123
|
};
|
|
124
124
|
c.displayName = r + "Provider";
|
|
125
125
|
function f(l, g) {
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
if (
|
|
126
|
+
const _ = g?.[e]?.[p] || u, m = s.useContext(_);
|
|
127
|
+
if (m) return m;
|
|
128
|
+
if (n !== void 0) return n;
|
|
129
129
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
130
130
|
}
|
|
131
131
|
return [c, f];
|
|
132
132
|
}
|
|
133
133
|
const i = () => {
|
|
134
|
-
const r =
|
|
134
|
+
const r = o.map((n) => s.createContext(n));
|
|
135
135
|
return function(u) {
|
|
136
136
|
const p = u?.[e] || r;
|
|
137
137
|
return s.useMemo(
|
|
@@ -145,40 +145,40 @@ function j(e, t = []) {
|
|
|
145
145
|
function Ye(...e) {
|
|
146
146
|
const t = e[0];
|
|
147
147
|
if (e.length === 1) return t;
|
|
148
|
-
const
|
|
148
|
+
const o = () => {
|
|
149
149
|
const a = e.map((i) => ({
|
|
150
150
|
useScope: i(),
|
|
151
151
|
scopeName: i.scopeName
|
|
152
152
|
}));
|
|
153
153
|
return function(r) {
|
|
154
|
-
const
|
|
154
|
+
const n = a.reduce((u, { useScope: p, scopeName: c }) => {
|
|
155
155
|
const l = p(r)[`__scope${c}`];
|
|
156
156
|
return { ...u, ...l };
|
|
157
157
|
}, {});
|
|
158
|
-
return s.useMemo(() => ({ [`__scope${t.scopeName}`]:
|
|
158
|
+
return s.useMemo(() => ({ [`__scope${t.scopeName}`]: n }), [n]);
|
|
159
159
|
};
|
|
160
160
|
};
|
|
161
|
-
return
|
|
161
|
+
return o.scopeName = t.scopeName, o;
|
|
162
162
|
}
|
|
163
163
|
// @__NO_SIDE_EFFECTS__
|
|
164
164
|
function Y(e) {
|
|
165
|
-
const t = /* @__PURE__ */ Xe(e),
|
|
166
|
-
const { children: r, ...
|
|
165
|
+
const t = /* @__PURE__ */ Xe(e), o = s.forwardRef((a, i) => {
|
|
166
|
+
const { children: r, ...n } = a, u = s.Children.toArray(r), p = u.find(Je);
|
|
167
167
|
if (p) {
|
|
168
168
|
const c = p.props.children, f = u.map((l) => l === p ? s.Children.count(c) > 1 ? s.Children.only(null) : s.isValidElement(c) ? c.props.children : null : l);
|
|
169
|
-
return /* @__PURE__ */ d(t, { ...
|
|
169
|
+
return /* @__PURE__ */ d(t, { ...n, ref: i, children: s.isValidElement(c) ? s.cloneElement(c, void 0, f) : null });
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ d(t, { ...
|
|
171
|
+
return /* @__PURE__ */ d(t, { ...n, ref: i, children: r });
|
|
172
172
|
});
|
|
173
|
-
return
|
|
173
|
+
return o.displayName = `${e}.Slot`, o;
|
|
174
174
|
}
|
|
175
175
|
// @__NO_SIDE_EFFECTS__
|
|
176
176
|
function Xe(e) {
|
|
177
|
-
const t = s.forwardRef((
|
|
178
|
-
const { children: i, ...r } =
|
|
177
|
+
const t = s.forwardRef((o, a) => {
|
|
178
|
+
const { children: i, ...r } = o;
|
|
179
179
|
if (s.isValidElement(i)) {
|
|
180
|
-
const
|
|
181
|
-
return i.type !== s.Fragment && (u.ref = a ?
|
|
180
|
+
const n = er(i), u = Qe(r, i.props);
|
|
181
|
+
return i.type !== s.Fragment && (u.ref = a ? _e(a, n) : n), s.cloneElement(i, u);
|
|
182
182
|
}
|
|
183
183
|
return s.Children.count(i) > 1 ? s.Children.only(null) : null;
|
|
184
184
|
});
|
|
@@ -189,18 +189,18 @@ function Je(e) {
|
|
|
189
189
|
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ze;
|
|
190
190
|
}
|
|
191
191
|
function Qe(e, t) {
|
|
192
|
-
const
|
|
192
|
+
const o = { ...t };
|
|
193
193
|
for (const a in t) {
|
|
194
194
|
const i = e[a], r = t[a];
|
|
195
|
-
/^on[A-Z]/.test(a) ? i && r ?
|
|
195
|
+
/^on[A-Z]/.test(a) ? i && r ? o[a] = (...u) => {
|
|
196
196
|
r(...u), i(...u);
|
|
197
|
-
} : i && (
|
|
197
|
+
} : i && (o[a] = i) : a === "style" ? o[a] = { ...i, ...r } : a === "className" && (o[a] = [i, r].filter(Boolean).join(" "));
|
|
198
198
|
}
|
|
199
|
-
return { ...e, ...
|
|
199
|
+
return { ...e, ...o };
|
|
200
200
|
}
|
|
201
201
|
function er(e) {
|
|
202
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get,
|
|
203
|
-
return
|
|
202
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
203
|
+
return o ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
204
204
|
}
|
|
205
205
|
var rr = [
|
|
206
206
|
"a",
|
|
@@ -220,36 +220,36 @@ var rr = [
|
|
|
220
220
|
"svg",
|
|
221
221
|
"ul"
|
|
222
222
|
], M = rr.reduce((e, t) => {
|
|
223
|
-
const
|
|
224
|
-
const { asChild:
|
|
223
|
+
const o = /* @__PURE__ */ Y(`Primitive.${t}`), a = s.forwardRef((i, r) => {
|
|
224
|
+
const { asChild: n, ...u } = i, p = n ? o : t;
|
|
225
225
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(p, { ...u, ref: r });
|
|
226
226
|
});
|
|
227
227
|
return a.displayName = `Primitive.${t}`, { ...e, [t]: a };
|
|
228
228
|
}, {});
|
|
229
229
|
function tr(e) {
|
|
230
|
-
const t = e + "CollectionProvider", [
|
|
230
|
+
const t = e + "CollectionProvider", [o, a] = j(t), [i, r] = o(
|
|
231
231
|
t,
|
|
232
232
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
233
|
-
),
|
|
233
|
+
), n = (h) => {
|
|
234
234
|
const { scope: v, children: b } = h, y = P.useRef(null), S = P.useRef(/* @__PURE__ */ new Map()).current;
|
|
235
235
|
return /* @__PURE__ */ d(i, { scope: v, itemMap: S, collectionRef: y, children: b });
|
|
236
236
|
};
|
|
237
|
-
|
|
237
|
+
n.displayName = t;
|
|
238
238
|
const u = e + "CollectionSlot", p = /* @__PURE__ */ Y(u), c = P.forwardRef(
|
|
239
239
|
(h, v) => {
|
|
240
|
-
const { scope: b, children: y } = h, S = r(u, b), N =
|
|
240
|
+
const { scope: b, children: y } = h, S = r(u, b), N = $(v, S.collectionRef);
|
|
241
241
|
return /* @__PURE__ */ d(p, { ref: N, children: y });
|
|
242
242
|
}
|
|
243
243
|
);
|
|
244
244
|
c.displayName = u;
|
|
245
|
-
const f = e + "CollectionItemSlot", l = "data-radix-collection-item", g = /* @__PURE__ */ Y(f),
|
|
245
|
+
const f = e + "CollectionItemSlot", l = "data-radix-collection-item", g = /* @__PURE__ */ Y(f), _ = P.forwardRef(
|
|
246
246
|
(h, v) => {
|
|
247
|
-
const { scope: b, children: y, ...S } = h, N = P.useRef(null), O =
|
|
247
|
+
const { scope: b, children: y, ...S } = h, N = P.useRef(null), O = $(v, N), x = r(f, b);
|
|
248
248
|
return P.useEffect(() => (x.itemMap.set(N, { ref: N, ...S }), () => void x.itemMap.delete(N))), /* @__PURE__ */ d(g, { [l]: "", ref: O, children: y });
|
|
249
249
|
}
|
|
250
250
|
);
|
|
251
|
-
|
|
252
|
-
function
|
|
251
|
+
_.displayName = f;
|
|
252
|
+
function m(h) {
|
|
253
253
|
const v = r(e + "CollectionConsumer", h);
|
|
254
254
|
return P.useCallback(() => {
|
|
255
255
|
const y = v.collectionRef.current;
|
|
@@ -261,33 +261,33 @@ function tr(e) {
|
|
|
261
261
|
}, [v.collectionRef, v.itemMap]);
|
|
262
262
|
}
|
|
263
263
|
return [
|
|
264
|
-
{ Provider:
|
|
265
|
-
|
|
264
|
+
{ Provider: n, Slot: c, ItemSlot: _ },
|
|
265
|
+
m,
|
|
266
266
|
a
|
|
267
267
|
];
|
|
268
268
|
}
|
|
269
269
|
var U = globalThis?.document ? s.useLayoutEffect : () => {
|
|
270
|
-
},
|
|
271
|
-
}),
|
|
270
|
+
}, or = s[" useId ".trim().toString()] || (() => {
|
|
271
|
+
}), nr = 0;
|
|
272
272
|
function ar(e) {
|
|
273
|
-
const [t,
|
|
273
|
+
const [t, o] = s.useState(or());
|
|
274
274
|
return U(() => {
|
|
275
|
-
|
|
275
|
+
o((a) => a ?? String(nr++));
|
|
276
276
|
}, [e]), t ? `radix-${t}` : "";
|
|
277
277
|
}
|
|
278
278
|
function J(e) {
|
|
279
279
|
const t = s.useRef(e);
|
|
280
280
|
return s.useEffect(() => {
|
|
281
281
|
t.current = e;
|
|
282
|
-
}), s.useMemo(() => (...
|
|
282
|
+
}), s.useMemo(() => (...o) => t.current?.(...o), []);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function me({
|
|
285
285
|
prop: e,
|
|
286
286
|
defaultProp: t,
|
|
287
|
-
onChange:
|
|
287
|
+
onChange: o = () => {
|
|
288
288
|
}
|
|
289
289
|
}) {
|
|
290
|
-
const [a, i] = ir({ defaultProp: t, onChange:
|
|
290
|
+
const [a, i] = ir({ defaultProp: t, onChange: o }), r = e !== void 0, n = r ? e : a, u = J(o), p = s.useCallback(
|
|
291
291
|
(c) => {
|
|
292
292
|
if (r) {
|
|
293
293
|
const l = typeof c == "function" ? c(e) : c;
|
|
@@ -297,16 +297,16 @@ function _e({
|
|
|
297
297
|
},
|
|
298
298
|
[r, e, i, u]
|
|
299
299
|
);
|
|
300
|
-
return [
|
|
300
|
+
return [n, p];
|
|
301
301
|
}
|
|
302
302
|
function ir({
|
|
303
303
|
defaultProp: e,
|
|
304
304
|
onChange: t
|
|
305
305
|
}) {
|
|
306
|
-
const
|
|
306
|
+
const o = s.useState(e), [a] = o, i = s.useRef(a), r = J(t);
|
|
307
307
|
return s.useEffect(() => {
|
|
308
308
|
i.current !== a && (r(a), i.current = a);
|
|
309
|
-
}, [a, i, r]),
|
|
309
|
+
}, [a, i, r]), o;
|
|
310
310
|
}
|
|
311
311
|
var ur = s.createContext(void 0);
|
|
312
312
|
function ge(e) {
|
|
@@ -322,21 +322,21 @@ var B = "rovingFocusGroup.onEntryFocus", sr = { bubbles: !1, cancelable: !0 }, V
|
|
|
322
322
|
ye.displayName = V;
|
|
323
323
|
var fr = s.forwardRef((e, t) => {
|
|
324
324
|
const {
|
|
325
|
-
__scopeRovingFocusGroup:
|
|
325
|
+
__scopeRovingFocusGroup: o,
|
|
326
326
|
orientation: a,
|
|
327
327
|
loop: i = !1,
|
|
328
328
|
dir: r,
|
|
329
|
-
currentTabStopId:
|
|
329
|
+
currentTabStopId: n,
|
|
330
330
|
defaultCurrentTabStopId: u,
|
|
331
331
|
onCurrentTabStopIdChange: p,
|
|
332
332
|
onEntryFocus: c,
|
|
333
333
|
preventScrollOnEntryFocus: f = !1,
|
|
334
334
|
...l
|
|
335
|
-
} = e, g = s.useRef(null),
|
|
336
|
-
prop:
|
|
335
|
+
} = e, g = s.useRef(null), _ = $(t, g), m = ge(r), [h = null, v] = me({
|
|
336
|
+
prop: n,
|
|
337
337
|
defaultProp: u,
|
|
338
338
|
onChange: p
|
|
339
|
-
}), [b, y] = s.useState(!1), S = J(c), N = he(
|
|
339
|
+
}), [b, y] = s.useState(!1), S = J(c), N = he(o), O = s.useRef(!1), [x, k] = s.useState(0);
|
|
340
340
|
return s.useEffect(() => {
|
|
341
341
|
const R = g.current;
|
|
342
342
|
if (R)
|
|
@@ -344,9 +344,9 @@ var fr = s.forwardRef((e, t) => {
|
|
|
344
344
|
}, [S]), /* @__PURE__ */ d(
|
|
345
345
|
dr,
|
|
346
346
|
{
|
|
347
|
-
scope:
|
|
347
|
+
scope: o,
|
|
348
348
|
orientation: a,
|
|
349
|
-
dir:
|
|
349
|
+
dir: m,
|
|
350
350
|
loop: i,
|
|
351
351
|
currentTabStopId: h,
|
|
352
352
|
onItemFocus: s.useCallback(
|
|
@@ -368,7 +368,7 @@ var fr = s.forwardRef((e, t) => {
|
|
|
368
368
|
tabIndex: b || x === 0 ? -1 : 0,
|
|
369
369
|
"data-orientation": a,
|
|
370
370
|
...l,
|
|
371
|
-
ref:
|
|
371
|
+
ref: _,
|
|
372
372
|
style: { outline: "none", ...e.style },
|
|
373
373
|
onMouseDown: A(e.onMouseDown, () => {
|
|
374
374
|
O.current = !0;
|
|
@@ -378,10 +378,10 @@ var fr = s.forwardRef((e, t) => {
|
|
|
378
378
|
if (R.target === R.currentTarget && Fe && !b) {
|
|
379
379
|
const te = new CustomEvent(B, sr);
|
|
380
380
|
if (R.currentTarget.dispatchEvent(te), !te.defaultPrevented) {
|
|
381
|
-
const K = N().filter((w) => w.focusable), De = K.find((w) => w.active),
|
|
381
|
+
const K = N().filter((w) => w.focusable), De = K.find((w) => w.active), ze = K.find((w) => w.id === h), Ge = [De, ze, ...K].filter(
|
|
382
382
|
Boolean
|
|
383
383
|
).map((w) => w.ref.current);
|
|
384
|
-
Ce(
|
|
384
|
+
Ce(Ge, f);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
O.current = !1;
|
|
@@ -394,19 +394,19 @@ var fr = s.forwardRef((e, t) => {
|
|
|
394
394
|
}), be = "RovingFocusGroupItem", Re = s.forwardRef(
|
|
395
395
|
(e, t) => {
|
|
396
396
|
const {
|
|
397
|
-
__scopeRovingFocusGroup:
|
|
397
|
+
__scopeRovingFocusGroup: o,
|
|
398
398
|
focusable: a = !0,
|
|
399
399
|
active: i = !1,
|
|
400
400
|
tabStopId: r,
|
|
401
|
-
...
|
|
402
|
-
} = e, u = ar(), p = r || u, c = lr(be,
|
|
401
|
+
...n
|
|
402
|
+
} = e, u = ar(), p = r || u, c = lr(be, o), f = c.currentTabStopId === p, l = he(o), { onFocusableItemAdd: g, onFocusableItemRemove: _ } = c;
|
|
403
403
|
return s.useEffect(() => {
|
|
404
404
|
if (a)
|
|
405
|
-
return g(), () =>
|
|
406
|
-
}, [a, g,
|
|
405
|
+
return g(), () => _();
|
|
406
|
+
}, [a, g, _]), /* @__PURE__ */ d(
|
|
407
407
|
X.ItemSlot,
|
|
408
408
|
{
|
|
409
|
-
scope:
|
|
409
|
+
scope: o,
|
|
410
410
|
id: p,
|
|
411
411
|
focusable: a,
|
|
412
412
|
active: i,
|
|
@@ -415,27 +415,27 @@ var fr = s.forwardRef((e, t) => {
|
|
|
415
415
|
{
|
|
416
416
|
tabIndex: f ? 0 : -1,
|
|
417
417
|
"data-orientation": c.orientation,
|
|
418
|
-
...
|
|
418
|
+
...n,
|
|
419
419
|
ref: t,
|
|
420
|
-
onMouseDown: A(e.onMouseDown, (
|
|
421
|
-
a ? c.onItemFocus(p) :
|
|
420
|
+
onMouseDown: A(e.onMouseDown, (m) => {
|
|
421
|
+
a ? c.onItemFocus(p) : m.preventDefault();
|
|
422
422
|
}),
|
|
423
423
|
onFocus: A(e.onFocus, () => c.onItemFocus(p)),
|
|
424
|
-
onKeyDown: A(e.onKeyDown, (
|
|
425
|
-
if (
|
|
424
|
+
onKeyDown: A(e.onKeyDown, (m) => {
|
|
425
|
+
if (m.key === "Tab" && m.shiftKey) {
|
|
426
426
|
c.onItemShiftTab();
|
|
427
427
|
return;
|
|
428
428
|
}
|
|
429
|
-
if (
|
|
430
|
-
const h = gr(
|
|
429
|
+
if (m.target !== m.currentTarget) return;
|
|
430
|
+
const h = gr(m, c.orientation, c.dir);
|
|
431
431
|
if (h !== void 0) {
|
|
432
|
-
if (
|
|
433
|
-
|
|
432
|
+
if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
|
|
433
|
+
m.preventDefault();
|
|
434
434
|
let b = l().filter((y) => y.focusable).map((y) => y.ref.current);
|
|
435
435
|
if (h === "last") b.reverse();
|
|
436
436
|
else if (h === "prev" || h === "next") {
|
|
437
437
|
h === "prev" && b.reverse();
|
|
438
|
-
const y = b.indexOf(
|
|
438
|
+
const y = b.indexOf(m.currentTarget);
|
|
439
439
|
b = c.loop ? hr(b, y + 1) : b.slice(y + 1);
|
|
440
440
|
}
|
|
441
441
|
setTimeout(() => Ce(b));
|
|
@@ -448,7 +448,7 @@ var fr = s.forwardRef((e, t) => {
|
|
|
448
448
|
}
|
|
449
449
|
);
|
|
450
450
|
Re.displayName = be;
|
|
451
|
-
var
|
|
451
|
+
var _r = {
|
|
452
452
|
ArrowLeft: "prev",
|
|
453
453
|
ArrowUp: "prev",
|
|
454
454
|
ArrowRight: "next",
|
|
@@ -458,43 +458,43 @@ var mr = {
|
|
|
458
458
|
PageDown: "last",
|
|
459
459
|
End: "last"
|
|
460
460
|
};
|
|
461
|
-
function
|
|
461
|
+
function mr(e, t) {
|
|
462
462
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
463
463
|
}
|
|
464
|
-
function gr(e, t,
|
|
465
|
-
const a =
|
|
464
|
+
function gr(e, t, o) {
|
|
465
|
+
const a = mr(e.key, o);
|
|
466
466
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
|
|
467
|
-
return
|
|
467
|
+
return _r[a];
|
|
468
468
|
}
|
|
469
469
|
function Ce(e, t = !1) {
|
|
470
|
-
const
|
|
470
|
+
const o = document.activeElement;
|
|
471
471
|
for (const a of e)
|
|
472
|
-
if (a ===
|
|
472
|
+
if (a === o || (a.focus({ preventScroll: t }), document.activeElement !== o)) return;
|
|
473
473
|
}
|
|
474
474
|
function hr(e, t) {
|
|
475
|
-
return e.map((
|
|
475
|
+
return e.map((o, a) => e[(t + a) % e.length]);
|
|
476
476
|
}
|
|
477
477
|
var vr = ye, yr = Re;
|
|
478
478
|
function br(e) {
|
|
479
|
-
const [t,
|
|
479
|
+
const [t, o] = s.useState(void 0);
|
|
480
480
|
return U(() => {
|
|
481
481
|
if (e) {
|
|
482
|
-
|
|
482
|
+
o({ width: e.offsetWidth, height: e.offsetHeight });
|
|
483
483
|
const a = new ResizeObserver((i) => {
|
|
484
484
|
if (!Array.isArray(i) || !i.length)
|
|
485
485
|
return;
|
|
486
486
|
const r = i[0];
|
|
487
|
-
let
|
|
487
|
+
let n, u;
|
|
488
488
|
if ("borderBoxSize" in r) {
|
|
489
489
|
const p = r.borderBoxSize, c = Array.isArray(p) ? p[0] : p;
|
|
490
|
-
|
|
490
|
+
n = c.inlineSize, u = c.blockSize;
|
|
491
491
|
} else
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
n = e.offsetWidth, u = e.offsetHeight;
|
|
493
|
+
o({ width: n, height: u });
|
|
494
494
|
});
|
|
495
495
|
return a.observe(e, { box: "border-box" }), () => a.unobserve(e);
|
|
496
496
|
} else
|
|
497
|
-
|
|
497
|
+
o(void 0);
|
|
498
498
|
}, [e]), t;
|
|
499
499
|
}
|
|
500
500
|
function Rr(e) {
|
|
@@ -502,15 +502,15 @@ function Rr(e) {
|
|
|
502
502
|
return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
503
503
|
}
|
|
504
504
|
function Cr(e, t) {
|
|
505
|
-
return s.useReducer((
|
|
505
|
+
return s.useReducer((o, a) => t[o][a] ?? o, e);
|
|
506
506
|
}
|
|
507
507
|
var Se = (e) => {
|
|
508
|
-
const { present: t, children:
|
|
509
|
-
return typeof
|
|
508
|
+
const { present: t, children: o } = e, a = Sr(t), i = typeof o == "function" ? o({ present: a.isPresent }) : s.Children.only(o), r = $(a.ref, Nr(i));
|
|
509
|
+
return typeof o == "function" || a.isPresent ? s.cloneElement(i, { ref: r }) : null;
|
|
510
510
|
};
|
|
511
511
|
Se.displayName = "Presence";
|
|
512
512
|
function Sr(e) {
|
|
513
|
-
const [t,
|
|
513
|
+
const [t, o] = s.useState(), a = s.useRef({}), i = s.useRef(e), r = s.useRef("none"), n = e ? "mounted" : "unmounted", [u, p] = Cr(n, {
|
|
514
514
|
mounted: {
|
|
515
515
|
UNMOUNT: "unmounted",
|
|
516
516
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -524,27 +524,27 @@ function Sr(e) {
|
|
|
524
524
|
}
|
|
525
525
|
});
|
|
526
526
|
return s.useEffect(() => {
|
|
527
|
-
const c =
|
|
527
|
+
const c = z(a.current);
|
|
528
528
|
r.current = u === "mounted" ? c : "none";
|
|
529
529
|
}, [u]), U(() => {
|
|
530
530
|
const c = a.current, f = i.current;
|
|
531
531
|
if (f !== e) {
|
|
532
|
-
const g = r.current,
|
|
533
|
-
e ? p("MOUNT") :
|
|
532
|
+
const g = r.current, _ = z(c);
|
|
533
|
+
e ? p("MOUNT") : _ === "none" || c?.display === "none" ? p("UNMOUNT") : p(f && g !== _ ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
534
534
|
}
|
|
535
535
|
}, [e, p]), U(() => {
|
|
536
536
|
if (t) {
|
|
537
537
|
let c;
|
|
538
|
-
const f = t.ownerDocument.defaultView ?? window, l = (
|
|
539
|
-
const h =
|
|
540
|
-
if (
|
|
538
|
+
const f = t.ownerDocument.defaultView ?? window, l = (_) => {
|
|
539
|
+
const h = z(a.current).includes(_.animationName);
|
|
540
|
+
if (_.target === t && h && (p("ANIMATION_END"), !i.current)) {
|
|
541
541
|
const v = t.style.animationFillMode;
|
|
542
542
|
t.style.animationFillMode = "forwards", c = f.setTimeout(() => {
|
|
543
543
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
|
-
}, g = (
|
|
547
|
-
|
|
546
|
+
}, g = (_) => {
|
|
547
|
+
_.target === t && (r.current = z(a.current));
|
|
548
548
|
};
|
|
549
549
|
return t.addEventListener("animationstart", g), t.addEventListener("animationcancel", l), t.addEventListener("animationend", l), () => {
|
|
550
550
|
f.clearTimeout(c), t.removeEventListener("animationstart", g), t.removeEventListener("animationcancel", l), t.removeEventListener("animationend", l);
|
|
@@ -554,31 +554,31 @@ function Sr(e) {
|
|
|
554
554
|
}, [t, p]), {
|
|
555
555
|
isPresent: ["mounted", "unmountSuspended"].includes(u),
|
|
556
556
|
ref: s.useCallback((c) => {
|
|
557
|
-
c && (a.current = getComputedStyle(c)),
|
|
557
|
+
c && (a.current = getComputedStyle(c)), o(c);
|
|
558
558
|
}, [])
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function z(e) {
|
|
562
562
|
return e?.animationName || "none";
|
|
563
563
|
}
|
|
564
564
|
function Nr(e) {
|
|
565
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get,
|
|
566
|
-
return
|
|
565
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
566
|
+
return o ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
567
567
|
}
|
|
568
568
|
var Q = "Radio", [Ir, Ne] = j(Q), [Er, Ar] = Ir(Q), Ie = s.forwardRef(
|
|
569
569
|
(e, t) => {
|
|
570
570
|
const {
|
|
571
|
-
__scopeRadio:
|
|
571
|
+
__scopeRadio: o,
|
|
572
572
|
name: a,
|
|
573
573
|
checked: i = !1,
|
|
574
574
|
required: r,
|
|
575
|
-
disabled:
|
|
575
|
+
disabled: n,
|
|
576
576
|
value: u = "on",
|
|
577
577
|
onCheck: p,
|
|
578
578
|
form: c,
|
|
579
579
|
...f
|
|
580
|
-
} = e, [l, g] = s.useState(null),
|
|
581
|
-
return /* @__PURE__ */ E(Er, { scope:
|
|
580
|
+
} = e, [l, g] = s.useState(null), _ = $(t, (v) => g(v)), m = s.useRef(!1), h = l ? c || !!l.closest("form") : !0;
|
|
581
|
+
return /* @__PURE__ */ E(Er, { scope: o, checked: i, disabled: n, children: [
|
|
582
582
|
/* @__PURE__ */ d(
|
|
583
583
|
M.button,
|
|
584
584
|
{
|
|
@@ -586,13 +586,13 @@ var Q = "Radio", [Ir, Ne] = j(Q), [Er, Ar] = Ir(Q), Ie = s.forwardRef(
|
|
|
586
586
|
role: "radio",
|
|
587
587
|
"aria-checked": i,
|
|
588
588
|
"data-state": we(i),
|
|
589
|
-
"data-disabled":
|
|
590
|
-
disabled:
|
|
589
|
+
"data-disabled": n ? "" : void 0,
|
|
590
|
+
disabled: n,
|
|
591
591
|
value: u,
|
|
592
592
|
...f,
|
|
593
|
-
ref:
|
|
593
|
+
ref: _,
|
|
594
594
|
onClick: A(e.onClick, (v) => {
|
|
595
|
-
i || p?.(), h && (
|
|
595
|
+
i || p?.(), h && (m.current = v.isPropagationStopped(), m.current || v.stopPropagation());
|
|
596
596
|
})
|
|
597
597
|
}
|
|
598
598
|
),
|
|
@@ -600,12 +600,12 @@ var Q = "Radio", [Ir, Ne] = j(Q), [Er, Ar] = Ir(Q), Ie = s.forwardRef(
|
|
|
600
600
|
wr,
|
|
601
601
|
{
|
|
602
602
|
control: l,
|
|
603
|
-
bubbles: !
|
|
603
|
+
bubbles: !m.current,
|
|
604
604
|
name: a,
|
|
605
605
|
value: u,
|
|
606
606
|
checked: i,
|
|
607
607
|
required: r,
|
|
608
|
-
disabled:
|
|
608
|
+
disabled: n,
|
|
609
609
|
form: c,
|
|
610
610
|
style: { transform: "translateX(-100%)" }
|
|
611
611
|
}
|
|
@@ -616,7 +616,7 @@ var Q = "Radio", [Ir, Ne] = j(Q), [Er, Ar] = Ir(Q), Ie = s.forwardRef(
|
|
|
616
616
|
Ie.displayName = Q;
|
|
617
617
|
var Ee = "RadioIndicator", Ae = s.forwardRef(
|
|
618
618
|
(e, t) => {
|
|
619
|
-
const { __scopeRadio:
|
|
619
|
+
const { __scopeRadio: o, forceMount: a, ...i } = e, r = Ar(Ee, o);
|
|
620
620
|
return /* @__PURE__ */ d(Se, { present: a || r.checked, children: /* @__PURE__ */ d(
|
|
621
621
|
M.span,
|
|
622
622
|
{
|
|
@@ -630,19 +630,19 @@ var Ee = "RadioIndicator", Ae = s.forwardRef(
|
|
|
630
630
|
);
|
|
631
631
|
Ae.displayName = Ee;
|
|
632
632
|
var wr = (e) => {
|
|
633
|
-
const { control: t, checked:
|
|
633
|
+
const { control: t, checked: o, bubbles: a = !0, ...i } = e, r = s.useRef(null), n = Rr(o), u = br(t);
|
|
634
634
|
return s.useEffect(() => {
|
|
635
635
|
const p = r.current, c = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(c, "checked").set;
|
|
636
|
-
if (
|
|
636
|
+
if (n !== o && l) {
|
|
637
637
|
const g = new Event("click", { bubbles: a });
|
|
638
|
-
l.call(p,
|
|
638
|
+
l.call(p, o), p.dispatchEvent(g);
|
|
639
639
|
}
|
|
640
|
-
}, [
|
|
640
|
+
}, [n, o, a]), /* @__PURE__ */ d(
|
|
641
641
|
"input",
|
|
642
642
|
{
|
|
643
643
|
type: "radio",
|
|
644
644
|
"aria-hidden": !0,
|
|
645
|
-
defaultChecked:
|
|
645
|
+
defaultChecked: o,
|
|
646
646
|
...i,
|
|
647
647
|
tabIndex: -1,
|
|
648
648
|
ref: r,
|
|
@@ -663,21 +663,21 @@ function we(e) {
|
|
|
663
663
|
var Pr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], ee = "RadioGroup", [Or] = j(ee, [
|
|
664
664
|
ve,
|
|
665
665
|
Ne
|
|
666
|
-
]), Pe = ve(), Oe = Ne(), [xr,
|
|
666
|
+
]), Pe = ve(), Oe = Ne(), [xr, $r] = Or(ee), xe = s.forwardRef(
|
|
667
667
|
(e, t) => {
|
|
668
668
|
const {
|
|
669
|
-
__scopeRadioGroup:
|
|
669
|
+
__scopeRadioGroup: o,
|
|
670
670
|
name: a,
|
|
671
671
|
defaultValue: i,
|
|
672
672
|
value: r,
|
|
673
|
-
required:
|
|
673
|
+
required: n = !1,
|
|
674
674
|
disabled: u = !1,
|
|
675
675
|
orientation: p,
|
|
676
676
|
dir: c,
|
|
677
677
|
loop: f = !0,
|
|
678
678
|
onValueChange: l,
|
|
679
679
|
...g
|
|
680
|
-
} = e,
|
|
680
|
+
} = e, _ = Pe(o), m = ge(c), [h, v] = me({
|
|
681
681
|
prop: r,
|
|
682
682
|
defaultProp: i,
|
|
683
683
|
onChange: l
|
|
@@ -685,9 +685,9 @@ var Pr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], ee = "RadioGroup",
|
|
|
685
685
|
return /* @__PURE__ */ d(
|
|
686
686
|
xr,
|
|
687
687
|
{
|
|
688
|
-
scope:
|
|
688
|
+
scope: o,
|
|
689
689
|
name: a,
|
|
690
|
-
required:
|
|
690
|
+
required: n,
|
|
691
691
|
disabled: u,
|
|
692
692
|
value: h,
|
|
693
693
|
onValueChange: v,
|
|
@@ -695,18 +695,18 @@ var Pr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], ee = "RadioGroup",
|
|
|
695
695
|
vr,
|
|
696
696
|
{
|
|
697
697
|
asChild: !0,
|
|
698
|
-
...
|
|
698
|
+
..._,
|
|
699
699
|
orientation: p,
|
|
700
|
-
dir:
|
|
700
|
+
dir: m,
|
|
701
701
|
loop: f,
|
|
702
702
|
children: /* @__PURE__ */ d(
|
|
703
703
|
M.div,
|
|
704
704
|
{
|
|
705
705
|
role: "radiogroup",
|
|
706
|
-
"aria-required":
|
|
706
|
+
"aria-required": n,
|
|
707
707
|
"aria-orientation": p,
|
|
708
708
|
"data-disabled": u ? "" : void 0,
|
|
709
|
-
dir:
|
|
709
|
+
dir: m,
|
|
710
710
|
...g,
|
|
711
711
|
ref: t
|
|
712
712
|
}
|
|
@@ -718,27 +718,27 @@ var Pr = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], ee = "RadioGroup",
|
|
|
718
718
|
}
|
|
719
719
|
);
|
|
720
720
|
xe.displayName = ee;
|
|
721
|
-
var
|
|
721
|
+
var $e = "RadioGroupItem", Te = s.forwardRef(
|
|
722
722
|
(e, t) => {
|
|
723
|
-
const { __scopeRadioGroup:
|
|
723
|
+
const { __scopeRadioGroup: o, disabled: a, ...i } = e, r = $r($e, o), n = r.disabled || a, u = Pe(o), p = Oe(o), c = s.useRef(null), f = $(t, c), l = r.value === i.value, g = s.useRef(!1);
|
|
724
724
|
return s.useEffect(() => {
|
|
725
|
-
const
|
|
725
|
+
const _ = (h) => {
|
|
726
726
|
Pr.includes(h.key) && (g.current = !0);
|
|
727
|
-
},
|
|
728
|
-
return document.addEventListener("keydown",
|
|
729
|
-
document.removeEventListener("keydown",
|
|
727
|
+
}, m = () => g.current = !1;
|
|
728
|
+
return document.addEventListener("keydown", _), document.addEventListener("keyup", m), () => {
|
|
729
|
+
document.removeEventListener("keydown", _), document.removeEventListener("keyup", m);
|
|
730
730
|
};
|
|
731
731
|
}, []), /* @__PURE__ */ d(
|
|
732
732
|
yr,
|
|
733
733
|
{
|
|
734
734
|
asChild: !0,
|
|
735
735
|
...u,
|
|
736
|
-
focusable: !
|
|
736
|
+
focusable: !n,
|
|
737
737
|
active: l,
|
|
738
738
|
children: /* @__PURE__ */ d(
|
|
739
739
|
Ie,
|
|
740
740
|
{
|
|
741
|
-
disabled:
|
|
741
|
+
disabled: n,
|
|
742
742
|
required: r.required,
|
|
743
743
|
checked: l,
|
|
744
744
|
...p,
|
|
@@ -746,8 +746,8 @@ var Te = "RadioGroupItem", $e = s.forwardRef(
|
|
|
746
746
|
name: r.name,
|
|
747
747
|
ref: f,
|
|
748
748
|
onCheck: () => r.onValueChange(i.value),
|
|
749
|
-
onKeyDown: A((
|
|
750
|
-
|
|
749
|
+
onKeyDown: A((_) => {
|
|
750
|
+
_.key === "Enter" && _.preventDefault();
|
|
751
751
|
}),
|
|
752
752
|
onFocus: A(i.onFocus, () => {
|
|
753
753
|
g.current && c.current?.click();
|
|
@@ -758,27 +758,27 @@ var Te = "RadioGroupItem", $e = s.forwardRef(
|
|
|
758
758
|
);
|
|
759
759
|
}
|
|
760
760
|
);
|
|
761
|
-
|
|
762
|
-
var
|
|
761
|
+
Te.displayName = $e;
|
|
762
|
+
var Tr = "RadioGroupIndicator", Me = s.forwardRef(
|
|
763
763
|
(e, t) => {
|
|
764
|
-
const { __scopeRadioGroup:
|
|
764
|
+
const { __scopeRadioGroup: o, ...a } = e, i = Oe(o);
|
|
765
765
|
return /* @__PURE__ */ d(Ae, { ...i, ...a, ref: t });
|
|
766
766
|
}
|
|
767
767
|
);
|
|
768
|
-
Me.displayName =
|
|
769
|
-
var Mr = xe, kr =
|
|
768
|
+
Me.displayName = Tr;
|
|
769
|
+
var Mr = xe, kr = Te, Fr = Me;
|
|
770
770
|
function Dr(e) {
|
|
771
771
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
772
772
|
}
|
|
773
773
|
var W = { exports: {} };
|
|
774
774
|
var ue;
|
|
775
|
-
function
|
|
775
|
+
function zr() {
|
|
776
776
|
return ue || (ue = 1, (function(e) {
|
|
777
777
|
(function() {
|
|
778
778
|
var t = {}.hasOwnProperty;
|
|
779
|
-
function
|
|
780
|
-
for (var r = "",
|
|
781
|
-
var u = arguments[
|
|
779
|
+
function o() {
|
|
780
|
+
for (var r = "", n = 0; n < arguments.length; n++) {
|
|
781
|
+
var u = arguments[n];
|
|
782
782
|
u && (r = i(r, a.call(this, u)));
|
|
783
783
|
}
|
|
784
784
|
return r;
|
|
@@ -789,23 +789,23 @@ function Gr() {
|
|
|
789
789
|
if (typeof r != "object")
|
|
790
790
|
return "";
|
|
791
791
|
if (Array.isArray(r))
|
|
792
|
-
return
|
|
792
|
+
return o.apply(this, r);
|
|
793
793
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
794
794
|
return r.toString();
|
|
795
|
-
var
|
|
795
|
+
var n = "";
|
|
796
796
|
for (var u in r)
|
|
797
|
-
t.call(r, u) && r[u] && (
|
|
798
|
-
return
|
|
797
|
+
t.call(r, u) && r[u] && (n = i(n, this && this[u] || u));
|
|
798
|
+
return n;
|
|
799
799
|
}
|
|
800
|
-
function i(r,
|
|
801
|
-
return
|
|
800
|
+
function i(r, n) {
|
|
801
|
+
return n ? r ? r + " " + n : r + n : r;
|
|
802
802
|
}
|
|
803
|
-
e.exports ? (
|
|
803
|
+
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
804
804
|
})();
|
|
805
805
|
})(W)), W.exports;
|
|
806
806
|
}
|
|
807
|
-
var
|
|
808
|
-
const
|
|
807
|
+
var Gr = zr();
|
|
808
|
+
const Lr = /* @__PURE__ */ Dr(Gr), Ur = {
|
|
809
809
|
"purpur-radio-card-group": "_purpur-radio-card-group_19msf_1",
|
|
810
810
|
"purpur-radio-card-group--vertical": "_purpur-radio-card-group--vertical_19msf_5",
|
|
811
811
|
"purpur-radio-card-group--horizontal": "_purpur-radio-card-group--horizontal_19msf_9",
|
|
@@ -825,7 +825,7 @@ const zr = /* @__PURE__ */ Dr(Lr), Ur = {
|
|
|
825
825
|
"purpur-radio-card-group__item-image-placeholder": "_purpur-radio-card-group__item-image-placeholder_19msf_167",
|
|
826
826
|
"purpur-radio-card-group__item-image-placeholder--loaded": "_purpur-radio-card-group__item-image-placeholder--loaded_19msf_172",
|
|
827
827
|
"purpur-radio-card-group__item-children": "_purpur-radio-card-group__item-children_19msf_175"
|
|
828
|
-
}, C =
|
|
828
|
+
}, C = Lr.bind(Ur);
|
|
829
829
|
function jr(e) {
|
|
830
830
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
831
831
|
}
|
|
@@ -834,9 +834,9 @@ function Vr() {
|
|
|
834
834
|
return ce || (ce = 1, (function(e) {
|
|
835
835
|
(function() {
|
|
836
836
|
var t = {}.hasOwnProperty;
|
|
837
|
-
function
|
|
838
|
-
for (var r = "",
|
|
839
|
-
var u = arguments[
|
|
837
|
+
function o() {
|
|
838
|
+
for (var r = "", n = 0; n < arguments.length; n++) {
|
|
839
|
+
var u = arguments[n];
|
|
840
840
|
u && (r = i(r, a.call(this, u)));
|
|
841
841
|
}
|
|
842
842
|
return r;
|
|
@@ -847,54 +847,55 @@ function Vr() {
|
|
|
847
847
|
if (typeof r != "object")
|
|
848
848
|
return "";
|
|
849
849
|
if (Array.isArray(r))
|
|
850
|
-
return
|
|
850
|
+
return o.apply(this, r);
|
|
851
851
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
852
852
|
return r.toString();
|
|
853
|
-
var
|
|
853
|
+
var n = "";
|
|
854
854
|
for (var u in r)
|
|
855
|
-
t.call(r, u) && r[u] && (
|
|
856
|
-
return
|
|
855
|
+
t.call(r, u) && r[u] && (n = i(n, this && this[u] || u));
|
|
856
|
+
return n;
|
|
857
857
|
}
|
|
858
|
-
function i(r,
|
|
859
|
-
return
|
|
858
|
+
function i(r, n) {
|
|
859
|
+
return n ? r ? r + " " + n : r + n : r;
|
|
860
860
|
}
|
|
861
|
-
e.exports ? (
|
|
861
|
+
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
862
862
|
})();
|
|
863
863
|
})(se)), se.exports;
|
|
864
864
|
}
|
|
865
865
|
var Kr = Vr();
|
|
866
866
|
const Br = /* @__PURE__ */ jr(Kr), Wr = {
|
|
867
|
-
"purpur-paragraph": "_purpur-
|
|
868
|
-
"purpur-paragraph--disabled": "_purpur-paragraph--
|
|
869
|
-
"purpur-paragraph--hyphens": "_purpur-paragraph--
|
|
870
|
-
"purpur-paragraph--negative": "_purpur-paragraph--
|
|
871
|
-
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-
|
|
872
|
-
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-
|
|
873
|
-
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-
|
|
874
|
-
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-
|
|
875
|
-
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-
|
|
876
|
-
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-
|
|
877
|
-
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-
|
|
878
|
-
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-
|
|
879
|
-
"purpur-paragraph--
|
|
880
|
-
"purpur-paragraph--overline-
|
|
867
|
+
"purpur-paragraph": "_purpur-paragraph_1vz75_1",
|
|
868
|
+
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1vz75_7",
|
|
869
|
+
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1vz75_10",
|
|
870
|
+
"purpur-paragraph--negative": "_purpur-paragraph--negative_1vz75_13",
|
|
871
|
+
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_1vz75_16",
|
|
872
|
+
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_1vz75_22",
|
|
873
|
+
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_1vz75_29",
|
|
874
|
+
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_1vz75_36",
|
|
875
|
+
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_1vz75_42",
|
|
876
|
+
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_1vz75_48",
|
|
877
|
+
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_1vz75_54",
|
|
878
|
+
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1vz75_60",
|
|
879
|
+
"purpur-paragraph--additional-100-bold": "_purpur-paragraph--additional-100-bold_1vz75_67",
|
|
880
|
+
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1vz75_74",
|
|
881
|
+
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1vz75_82"
|
|
881
882
|
}, Hr = Br.bind(Wr), qr = {
|
|
882
883
|
PARAGRAPH100: "paragraph-100"
|
|
883
|
-
},
|
|
884
|
+
}, T = "purpur-paragraph", Z = ({
|
|
884
885
|
children: e,
|
|
885
886
|
className: t,
|
|
886
|
-
disabled:
|
|
887
|
+
disabled: o,
|
|
887
888
|
enableHyphenation: a = !1,
|
|
888
889
|
negative: i = !1,
|
|
889
890
|
variant: r = qr.PARAGRAPH100,
|
|
890
|
-
...
|
|
891
|
+
...n
|
|
891
892
|
}) => {
|
|
892
|
-
const u = Hr(t,
|
|
893
|
-
[`${
|
|
894
|
-
[`${
|
|
895
|
-
[`${
|
|
893
|
+
const u = Hr(t, T, `${T}--${r}`, {
|
|
894
|
+
[`${T}--hyphens`]: a,
|
|
895
|
+
[`${T}--disabled`]: o,
|
|
896
|
+
[`${T}--negative`]: i
|
|
896
897
|
});
|
|
897
|
-
return /* @__PURE__ */ d("p", { ...
|
|
898
|
+
return /* @__PURE__ */ d("p", { ...n, className: u, children: e });
|
|
898
899
|
};
|
|
899
900
|
Z.displayName = "Paragraph";
|
|
900
901
|
function Yr(e) {
|
|
@@ -905,9 +906,9 @@ function Xr() {
|
|
|
905
906
|
return de || (de = 1, (function(e) {
|
|
906
907
|
(function() {
|
|
907
908
|
var t = {}.hasOwnProperty;
|
|
908
|
-
function
|
|
909
|
-
for (var r = "",
|
|
910
|
-
var u = arguments[
|
|
909
|
+
function o() {
|
|
910
|
+
for (var r = "", n = 0; n < arguments.length; n++) {
|
|
911
|
+
var u = arguments[n];
|
|
911
912
|
u && (r = i(r, a.call(this, u)));
|
|
912
913
|
}
|
|
913
914
|
return r;
|
|
@@ -918,18 +919,18 @@ function Xr() {
|
|
|
918
919
|
if (typeof r != "object")
|
|
919
920
|
return "";
|
|
920
921
|
if (Array.isArray(r))
|
|
921
|
-
return
|
|
922
|
+
return o.apply(this, r);
|
|
922
923
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
923
924
|
return r.toString();
|
|
924
|
-
var
|
|
925
|
+
var n = "";
|
|
925
926
|
for (var u in r)
|
|
926
|
-
t.call(r, u) && r[u] && (
|
|
927
|
-
return
|
|
927
|
+
t.call(r, u) && r[u] && (n = i(n, this && this[u] || u));
|
|
928
|
+
return n;
|
|
928
929
|
}
|
|
929
|
-
function i(r,
|
|
930
|
-
return
|
|
930
|
+
function i(r, n) {
|
|
931
|
+
return n ? r ? r + " " + n : r + n : r;
|
|
931
932
|
}
|
|
932
|
-
e.exports ? (
|
|
933
|
+
e.exports ? (o.default = o, e.exports = o) : window.classNames = o;
|
|
933
934
|
})();
|
|
934
935
|
})(pe)), pe.exports;
|
|
935
936
|
}
|
|
@@ -947,31 +948,31 @@ const Jr = /* @__PURE__ */ Yr(Zr), Qr = "_loading_rzc29_1", et = {
|
|
|
947
948
|
}, rt = Jr.bind(et), H = "purpur-skeleton", ke = ({
|
|
948
949
|
className: e,
|
|
949
950
|
radius: t = "xs",
|
|
950
|
-
negative:
|
|
951
|
+
negative: o = !1,
|
|
951
952
|
...a
|
|
952
953
|
}) => {
|
|
953
954
|
const i = rt(
|
|
954
955
|
e,
|
|
955
956
|
H,
|
|
956
|
-
`${H}--${
|
|
957
|
+
`${H}--${o ? "negative" : "default"}`,
|
|
957
958
|
`${H}--${t}`
|
|
958
959
|
);
|
|
959
960
|
return /* @__PURE__ */ d("div", { className: i, ...a });
|
|
960
961
|
};
|
|
961
962
|
ke.displayName = "Skeleton";
|
|
962
|
-
const
|
|
963
|
+
const G = "purpur-radio-card-group__item-image", tt = (e) => !!e?.src && !!e.altText, ot = ({
|
|
963
964
|
src: e,
|
|
964
965
|
altText: t,
|
|
965
|
-
noPlaceholder:
|
|
966
|
+
noPlaceholder: o,
|
|
966
967
|
loading: a = "lazy",
|
|
967
968
|
["data-testid"]: i
|
|
968
969
|
}) => {
|
|
969
|
-
const [r,
|
|
970
|
-
[`${
|
|
971
|
-
}), c = C(`${
|
|
972
|
-
[`${
|
|
970
|
+
const [r, n] = Ue(!1), u = () => n(!0), p = C(G, {
|
|
971
|
+
[`${G}--loaded`]: r
|
|
972
|
+
}), c = C(`${G}-placeholder`, {
|
|
973
|
+
[`${G}-placeholder--loaded`]: r
|
|
973
974
|
});
|
|
974
|
-
return /* @__PURE__ */ E(
|
|
975
|
+
return /* @__PURE__ */ E(Le, { children: [
|
|
975
976
|
/* @__PURE__ */ d(
|
|
976
977
|
"img",
|
|
977
978
|
{
|
|
@@ -983,22 +984,22 @@ const L = "purpur-radio-card-group__item-image", tt = (e) => !!e?.src && !!e.alt
|
|
|
983
984
|
onLoad: u
|
|
984
985
|
}
|
|
985
986
|
),
|
|
986
|
-
!
|
|
987
|
+
!o && /* @__PURE__ */ d(ke, { className: c })
|
|
987
988
|
] });
|
|
988
989
|
}, I = "purpur-radio-card-group__item", q = (e, { disabled: t }) => typeof e == "function" ? e({ disabled: t }) : e, re = le(
|
|
989
|
-
({ title: e, ...t },
|
|
990
|
-
const { ["data-testid"]: a, body: i, children: r, disabled:
|
|
991
|
-
return /* @__PURE__ */ E("div", { className: C(`${I}-container`), ref:
|
|
990
|
+
({ title: e, ...t }, o) => {
|
|
991
|
+
const { ["data-testid"]: a, body: i, children: r, disabled: n, id: u, image: p, value: c } = t, f = { ...t };
|
|
992
|
+
return /* @__PURE__ */ E("div", { className: C(`${I}-container`), ref: o, children: [
|
|
992
993
|
/* @__PURE__ */ E(
|
|
993
994
|
kr,
|
|
994
995
|
{
|
|
995
996
|
className: C(I),
|
|
996
997
|
"data-testid": a,
|
|
997
|
-
disabled:
|
|
998
|
+
disabled: n,
|
|
998
999
|
id: u,
|
|
999
1000
|
value: c,
|
|
1000
1001
|
children: [
|
|
1001
|
-
p && /* @__PURE__ */ d("span", { className: C(`${I}-image-container`), children: tt(p) ? /* @__PURE__ */ d(
|
|
1002
|
+
p && /* @__PURE__ */ d("span", { className: C(`${I}-image-container`), children: tt(p) ? /* @__PURE__ */ d(ot, { ...p, "data-testid": a && `${a}-image` }) : q(p, f) }),
|
|
1002
1003
|
/* @__PURE__ */ E("span", { className: C(`${I}-content`), children: [
|
|
1003
1004
|
/* @__PURE__ */ E("span", { className: C(`${I}-top-container`), children: [
|
|
1004
1005
|
typeof e == "string" ? /* @__PURE__ */ d(
|
|
@@ -1007,7 +1008,7 @@ const L = "purpur-radio-card-group__item-image", tt = (e) => !!e?.src && !!e.alt
|
|
|
1007
1008
|
className: C(`${I}-title`),
|
|
1008
1009
|
"data-testid": a && `${a}-title`,
|
|
1009
1010
|
variant: "paragraph-100",
|
|
1010
|
-
disabled:
|
|
1011
|
+
disabled: n,
|
|
1011
1012
|
children: e
|
|
1012
1013
|
}
|
|
1013
1014
|
) : q(e, f),
|
|
@@ -1018,7 +1019,7 @@ const L = "purpur-radio-card-group__item-image", tt = (e) => !!e?.src && !!e.alt
|
|
|
1018
1019
|
{
|
|
1019
1020
|
"data-testid": a && `${a}-body`,
|
|
1020
1021
|
variant: "paragraph-100",
|
|
1021
|
-
disabled:
|
|
1022
|
+
disabled: n,
|
|
1022
1023
|
children: i
|
|
1023
1024
|
}
|
|
1024
1025
|
) : q(i, f) })
|
|
@@ -1031,28 +1032,28 @@ const L = "purpur-radio-card-group__item-image", tt = (e) => !!e?.src && !!e.alt
|
|
|
1031
1032
|
}
|
|
1032
1033
|
);
|
|
1033
1034
|
re.displayName = "RadioCardItem";
|
|
1034
|
-
const
|
|
1035
|
+
const nt = (e) => je(e) && e?.type === re, pt = ["horizontal", "vertical"], dt = ["right", "left"], L = "purpur-radio-card-group", at = le(
|
|
1035
1036
|
({
|
|
1036
1037
|
"data-testid": e,
|
|
1037
1038
|
"aria-labelledby": t,
|
|
1038
|
-
children:
|
|
1039
|
+
children: o,
|
|
1039
1040
|
className: a,
|
|
1040
1041
|
items: i,
|
|
1041
1042
|
heading: r,
|
|
1042
|
-
headingTag:
|
|
1043
|
+
headingTag: n = "h2",
|
|
1043
1044
|
loop: u = !0,
|
|
1044
1045
|
orientation: p = "vertical",
|
|
1045
1046
|
radioPosition: c = "right",
|
|
1046
1047
|
...f
|
|
1047
1048
|
}, l) => {
|
|
1048
|
-
const g =
|
|
1049
|
-
return /* @__PURE__ */ E("div", { className: C(a, `${
|
|
1049
|
+
const g = oe.toArray(o).filter(nt);
|
|
1050
|
+
return /* @__PURE__ */ E("div", { className: C(a, `${L}__container`), ref: l, children: [
|
|
1050
1051
|
r && /* @__PURE__ */ E(
|
|
1051
1052
|
fe,
|
|
1052
1053
|
{
|
|
1053
1054
|
"data-testid": e ? `${e}-heading` : void 0,
|
|
1054
1055
|
id: `${f.id}-heading`,
|
|
1055
|
-
tag:
|
|
1056
|
+
tag: n,
|
|
1056
1057
|
variant: "subsection-100",
|
|
1057
1058
|
children: [
|
|
1058
1059
|
f.required && /* @__PURE__ */ d("span", { "aria-hidden": !0, children: "* " }),
|
|
@@ -1066,25 +1067,25 @@ const ot = (e) => je(e) && e?.type === re, pt = ["horizontal", "vertical"], dt =
|
|
|
1066
1067
|
...f,
|
|
1067
1068
|
"aria-labelledby": t || (r ? `${f.id}-heading` : void 0),
|
|
1068
1069
|
className: C(
|
|
1069
|
-
|
|
1070
|
-
`${
|
|
1071
|
-
`${
|
|
1070
|
+
L,
|
|
1071
|
+
`${L}--${p}`,
|
|
1072
|
+
`${L}--radio-${c}`
|
|
1072
1073
|
),
|
|
1073
1074
|
"data-testid": e,
|
|
1074
1075
|
loop: u,
|
|
1075
1076
|
children: [
|
|
1076
|
-
i?.map((
|
|
1077
|
+
i?.map((_) => /* @__PURE__ */ d(
|
|
1077
1078
|
re,
|
|
1078
1079
|
{
|
|
1079
|
-
...
|
|
1080
|
-
disabled:
|
|
1080
|
+
..._,
|
|
1081
|
+
disabled: _.disabled || f.disabled,
|
|
1081
1082
|
"data-testid": e ? `${e}-item` : void 0
|
|
1082
1083
|
},
|
|
1083
|
-
|
|
1084
|
+
_.id
|
|
1084
1085
|
)),
|
|
1085
|
-
|
|
1086
|
+
oe.map(
|
|
1086
1087
|
g,
|
|
1087
|
-
(
|
|
1088
|
+
(_) => Ve(_, { disabled: _.props.disabled || f.disabled })
|
|
1088
1089
|
)
|
|
1089
1090
|
]
|
|
1090
1091
|
}
|