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