@purpurds/accordion 5.24.3 → 5.25.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 -165
- package/dist/accordion-item.d.ts +9 -8
- package/dist/accordion-item.d.ts.map +1 -1
- package/dist/accordion.cjs.js +5 -5
- package/dist/accordion.cjs.js.map +1 -1
- package/dist/accordion.d.ts +10 -3
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.es.js +276 -907
- package/dist/accordion.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -6
- package/src/accordion-item.module.scss +45 -56
- package/src/accordion-item.tsx +73 -56
- package/src/accordion.stories.tsx +39 -17
- package/src/accordion.test.tsx +3 -17
- package/src/accordion.tsx +25 -22
package/dist/accordion.es.js
CHANGED
@@ -1,48 +1,46 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
function He(e) {
|
6
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
1
|
+
import { jsx as o, jsxs as v } from "react/jsx-runtime";
|
2
|
+
import { useContext as k, useId as R, useState as M, createContext as H } from "react";
|
3
|
+
function C(t) {
|
4
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
7
5
|
}
|
8
|
-
var
|
6
|
+
var $ = { exports: {} };
|
9
7
|
/*!
|
10
8
|
Copyright (c) 2018 Jed Watson.
|
11
9
|
Licensed under the MIT License (MIT), see
|
12
10
|
http://jedwatson.github.io/classnames
|
13
11
|
*/
|
14
|
-
(function(
|
12
|
+
(function(t) {
|
15
13
|
(function() {
|
16
|
-
var
|
17
|
-
function
|
18
|
-
for (var
|
19
|
-
var
|
20
|
-
|
14
|
+
var n = {}.hasOwnProperty;
|
15
|
+
function p() {
|
16
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
17
|
+
var a = arguments[e];
|
18
|
+
a && (r = i(r, u(a)));
|
21
19
|
}
|
22
|
-
return
|
20
|
+
return r;
|
23
21
|
}
|
24
|
-
function
|
25
|
-
if (typeof
|
26
|
-
return
|
27
|
-
if (typeof
|
22
|
+
function u(r) {
|
23
|
+
if (typeof r == "string" || typeof r == "number")
|
24
|
+
return r;
|
25
|
+
if (typeof r != "object")
|
28
26
|
return "";
|
29
|
-
if (Array.isArray(
|
30
|
-
return
|
31
|
-
if (
|
32
|
-
return
|
33
|
-
var
|
34
|
-
for (var
|
35
|
-
|
36
|
-
return
|
27
|
+
if (Array.isArray(r))
|
28
|
+
return p.apply(null, r);
|
29
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
30
|
+
return r.toString();
|
31
|
+
var e = "";
|
32
|
+
for (var a in r)
|
33
|
+
n.call(r, a) && r[a] && (e = i(e, a));
|
34
|
+
return e;
|
37
35
|
}
|
38
|
-
function
|
39
|
-
return
|
36
|
+
function i(r, e) {
|
37
|
+
return e ? r ? r + " " + e : r + e : r;
|
40
38
|
}
|
41
|
-
|
39
|
+
t.exports ? (p.default = p, t.exports = p) : window.classNames = p;
|
42
40
|
})();
|
43
|
-
})(
|
44
|
-
var
|
45
|
-
const
|
41
|
+
})($);
|
42
|
+
var D = $.exports;
|
43
|
+
const B = /* @__PURE__ */ C(D), g = {
|
46
44
|
"purpur-heading": "_purpur-heading_k9fhq_1",
|
47
45
|
"purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
|
48
46
|
"purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
|
@@ -58,7 +56,7 @@ const Fe = /* @__PURE__ */ He(Ge), L = {
|
|
58
56
|
"purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
|
59
57
|
"purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
|
60
58
|
"purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
|
61
|
-
},
|
59
|
+
}, G = {
|
62
60
|
TITLE100: "title-100",
|
63
61
|
TITLE200: "title-200",
|
64
62
|
TITLE300: "title-300",
|
@@ -67,776 +65,114 @@ const Fe = /* @__PURE__ */ He(Ge), L = {
|
|
67
65
|
TITLE600: "title-600",
|
68
66
|
TITLE700: "title-700",
|
69
67
|
SUBSECTION100: "subsection-100"
|
70
|
-
},
|
71
|
-
["data-testid"]:
|
72
|
-
children:
|
73
|
-
className:
|
74
|
-
enableHyphenation:
|
75
|
-
negative:
|
76
|
-
tag:
|
77
|
-
variant:
|
78
|
-
...
|
68
|
+
}, f = "purpur-heading", y = ({
|
69
|
+
["data-testid"]: t,
|
70
|
+
children: n,
|
71
|
+
className: p = "",
|
72
|
+
enableHyphenation: u = !1,
|
73
|
+
negative: i = !1,
|
74
|
+
tag: r,
|
75
|
+
variant: e = G.TITLE100,
|
76
|
+
...a
|
79
77
|
}) => {
|
80
|
-
const s =
|
81
|
-
|
82
|
-
|
83
|
-
|
78
|
+
const s = r, c = B([
|
79
|
+
p,
|
80
|
+
g[f],
|
81
|
+
g[`${f}--${e}`],
|
84
82
|
{
|
85
|
-
[
|
86
|
-
[
|
83
|
+
[g[`${f}--hyphens`]]: u,
|
84
|
+
[g[`${f}--negative`]]: i
|
87
85
|
}
|
88
86
|
]);
|
89
|
-
return /* @__PURE__ */
|
90
|
-
};
|
91
|
-
oe.displayName = "Heading";
|
92
|
-
function h() {
|
93
|
-
return h = Object.assign ? Object.assign.bind() : function(e) {
|
94
|
-
for (var r = 1; r < arguments.length; r++) {
|
95
|
-
var n = arguments[r];
|
96
|
-
for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
97
|
-
}
|
98
|
-
return e;
|
99
|
-
}, h.apply(null, arguments);
|
100
|
-
}
|
101
|
-
function ae(e, r = []) {
|
102
|
-
let n = [];
|
103
|
-
function o(t, a) {
|
104
|
-
const i = /* @__PURE__ */ ee(a), s = n.length;
|
105
|
-
n = [
|
106
|
-
...n,
|
107
|
-
a
|
108
|
-
];
|
109
|
-
function l(p) {
|
110
|
-
const { scope: _, children: f, ...b } = p, y = (_ == null ? void 0 : _[e][s]) || i, g = V(
|
111
|
-
() => b,
|
112
|
-
Object.values(b)
|
113
|
-
);
|
114
|
-
return /* @__PURE__ */ A(y.Provider, {
|
115
|
-
value: g
|
116
|
-
}, f);
|
117
|
-
}
|
118
|
-
function d(p, _) {
|
119
|
-
const f = (_ == null ? void 0 : _[e][s]) || i, b = _e(f);
|
120
|
-
if (b) return b;
|
121
|
-
if (a !== void 0) return a;
|
122
|
-
throw new Error(`\`${p}\` must be used within \`${t}\``);
|
123
|
-
}
|
124
|
-
return l.displayName = t + "Provider", [
|
125
|
-
l,
|
126
|
-
d
|
127
|
-
];
|
128
|
-
}
|
129
|
-
const c = () => {
|
130
|
-
const t = n.map((a) => /* @__PURE__ */ ee(a));
|
131
|
-
return function(i) {
|
132
|
-
const s = (i == null ? void 0 : i[e]) || t;
|
133
|
-
return V(
|
134
|
-
() => ({
|
135
|
-
[`__scope${e}`]: {
|
136
|
-
...i,
|
137
|
-
[e]: s
|
138
|
-
}
|
139
|
-
}),
|
140
|
-
[
|
141
|
-
i,
|
142
|
-
s
|
143
|
-
]
|
144
|
-
);
|
145
|
-
};
|
146
|
-
};
|
147
|
-
return c.scopeName = e, [
|
148
|
-
o,
|
149
|
-
Ye(c, ...r)
|
150
|
-
];
|
151
|
-
}
|
152
|
-
function Ye(...e) {
|
153
|
-
const r = e[0];
|
154
|
-
if (e.length === 1) return r;
|
155
|
-
const n = () => {
|
156
|
-
const o = e.map(
|
157
|
-
(c) => ({
|
158
|
-
useScope: c(),
|
159
|
-
scopeName: c.scopeName
|
160
|
-
})
|
161
|
-
);
|
162
|
-
return function(t) {
|
163
|
-
const a = o.reduce((i, { useScope: s, scopeName: l }) => {
|
164
|
-
const p = s(t)[`__scope${l}`];
|
165
|
-
return {
|
166
|
-
...i,
|
167
|
-
...p
|
168
|
-
};
|
169
|
-
}, {});
|
170
|
-
return V(
|
171
|
-
() => ({
|
172
|
-
[`__scope${r.scopeName}`]: a
|
173
|
-
}),
|
174
|
-
[
|
175
|
-
a
|
176
|
-
]
|
177
|
-
);
|
178
|
-
};
|
179
|
-
};
|
180
|
-
return n.scopeName = r.scopeName, n;
|
181
|
-
}
|
182
|
-
function Ze(e, r) {
|
183
|
-
typeof e == "function" ? e(r) : e != null && (e.current = r);
|
184
|
-
}
|
185
|
-
function he(...e) {
|
186
|
-
return (r) => e.forEach(
|
187
|
-
(n) => Ze(n, r)
|
188
|
-
);
|
189
|
-
}
|
190
|
-
function M(...e) {
|
191
|
-
return H(he(...e), e);
|
192
|
-
}
|
193
|
-
const z = /* @__PURE__ */ I((e, r) => {
|
194
|
-
const { children: n, ...o } = e, c = S.toArray(n), t = c.find(Xe);
|
195
|
-
if (t) {
|
196
|
-
const a = t.props.children, i = c.map((s) => s === t ? S.count(a) > 1 ? S.only(null) : /* @__PURE__ */ U(a) ? a.props.children : null : s);
|
197
|
-
return /* @__PURE__ */ A(te, h({}, o, {
|
198
|
-
ref: r
|
199
|
-
}), /* @__PURE__ */ U(a) ? /* @__PURE__ */ G(a, void 0, i) : null);
|
200
|
-
}
|
201
|
-
return /* @__PURE__ */ A(te, h({}, o, {
|
202
|
-
ref: r
|
203
|
-
}), n);
|
204
|
-
});
|
205
|
-
z.displayName = "Slot";
|
206
|
-
const te = /* @__PURE__ */ I((e, r) => {
|
207
|
-
const { children: n, ...o } = e;
|
208
|
-
return /* @__PURE__ */ U(n) ? /* @__PURE__ */ G(n, {
|
209
|
-
...Qe(o, n.props),
|
210
|
-
ref: r ? he(r, n.ref) : n.ref
|
211
|
-
}) : S.count(n) > 1 ? S.only(null) : null;
|
212
|
-
});
|
213
|
-
te.displayName = "SlotClone";
|
214
|
-
const Je = ({ children: e }) => /* @__PURE__ */ A(Ve, null, e);
|
215
|
-
function Xe(e) {
|
216
|
-
return /* @__PURE__ */ U(e) && e.type === Je;
|
217
|
-
}
|
218
|
-
function Qe(e, r) {
|
219
|
-
const n = {
|
220
|
-
...r
|
221
|
-
};
|
222
|
-
for (const o in r) {
|
223
|
-
const c = e[o], t = r[o];
|
224
|
-
/^on[A-Z]/.test(o) ? c && t ? n[o] = (...i) => {
|
225
|
-
t(...i), c(...i);
|
226
|
-
} : c && (n[o] = c) : o === "style" ? n[o] = {
|
227
|
-
...c,
|
228
|
-
...t
|
229
|
-
} : o === "className" && (n[o] = [
|
230
|
-
c,
|
231
|
-
t
|
232
|
-
].filter(Boolean).join(" "));
|
233
|
-
}
|
234
|
-
return {
|
235
|
-
...e,
|
236
|
-
...n
|
237
|
-
};
|
238
|
-
}
|
239
|
-
function We(e) {
|
240
|
-
const r = e + "CollectionProvider", [n, o] = ae(r), [c, t] = n(r, {
|
241
|
-
collectionRef: {
|
242
|
-
current: null
|
243
|
-
},
|
244
|
-
itemMap: /* @__PURE__ */ new Map()
|
245
|
-
}), a = (f) => {
|
246
|
-
const { scope: b, children: y } = f, g = u.useRef(null), m = u.useRef(/* @__PURE__ */ new Map()).current;
|
247
|
-
return /* @__PURE__ */ u.createElement(c, {
|
248
|
-
scope: b,
|
249
|
-
itemMap: m,
|
250
|
-
collectionRef: g
|
251
|
-
}, y);
|
252
|
-
}, i = e + "CollectionSlot", s = /* @__PURE__ */ u.forwardRef((f, b) => {
|
253
|
-
const { scope: y, children: g } = f, m = t(i, y), $ = M(b, m.collectionRef);
|
254
|
-
return /* @__PURE__ */ u.createElement(z, {
|
255
|
-
ref: $
|
256
|
-
}, g);
|
257
|
-
}), l = e + "CollectionItemSlot", d = "data-radix-collection-item", p = /* @__PURE__ */ u.forwardRef((f, b) => {
|
258
|
-
const { scope: y, children: g, ...m } = f, $ = u.useRef(null), v = M(b, $), N = t(l, y);
|
259
|
-
return u.useEffect(() => (N.itemMap.set($, {
|
260
|
-
ref: $,
|
261
|
-
...m
|
262
|
-
}), () => void N.itemMap.delete($))), /* @__PURE__ */ u.createElement(z, {
|
263
|
-
[d]: "",
|
264
|
-
ref: v
|
265
|
-
}, g);
|
266
|
-
});
|
267
|
-
function _(f) {
|
268
|
-
const b = t(e + "CollectionConsumer", f);
|
269
|
-
return u.useCallback(() => {
|
270
|
-
const g = b.collectionRef.current;
|
271
|
-
if (!g) return [];
|
272
|
-
const m = Array.from(g.querySelectorAll(`[${d}]`));
|
273
|
-
return Array.from(b.itemMap.values()).sort(
|
274
|
-
(N, O) => m.indexOf(N.ref.current) - m.indexOf(O.ref.current)
|
275
|
-
);
|
276
|
-
}, [
|
277
|
-
b.collectionRef,
|
278
|
-
b.itemMap
|
279
|
-
]);
|
280
|
-
}
|
281
|
-
return [
|
282
|
-
{
|
283
|
-
Provider: a,
|
284
|
-
Slot: s,
|
285
|
-
ItemSlot: p
|
286
|
-
},
|
287
|
-
_,
|
288
|
-
o
|
289
|
-
];
|
290
|
-
}
|
291
|
-
function ge(e, r, { checkForDefaultPrevented: n = !0 } = {}) {
|
292
|
-
return function(c) {
|
293
|
-
if (e == null || e(c), n === !1 || !c.defaultPrevented) return r == null ? void 0 : r(c);
|
294
|
-
};
|
295
|
-
}
|
296
|
-
function ve(e) {
|
297
|
-
const r = C(e);
|
298
|
-
return k(() => {
|
299
|
-
r.current = e;
|
300
|
-
}), V(
|
301
|
-
() => (...n) => {
|
302
|
-
var o;
|
303
|
-
return (o = r.current) === null || o === void 0 ? void 0 : o.call(r, ...n);
|
304
|
-
},
|
305
|
-
[]
|
306
|
-
);
|
307
|
-
}
|
308
|
-
function ce({ prop: e, defaultProp: r, onChange: n = () => {
|
309
|
-
} }) {
|
310
|
-
const [o, c] = et({
|
311
|
-
defaultProp: r,
|
312
|
-
onChange: n
|
313
|
-
}), t = e !== void 0, a = t ? e : o, i = ve(n), s = H((l) => {
|
314
|
-
if (t) {
|
315
|
-
const p = typeof l == "function" ? l(e) : l;
|
316
|
-
p !== e && i(p);
|
317
|
-
} else c(l);
|
318
|
-
}, [
|
319
|
-
t,
|
320
|
-
e,
|
321
|
-
c,
|
322
|
-
i
|
323
|
-
]);
|
324
|
-
return [
|
325
|
-
a,
|
326
|
-
s
|
327
|
-
];
|
328
|
-
}
|
329
|
-
function et({ defaultProp: e, onChange: r }) {
|
330
|
-
const n = re(e), [o] = n, c = C(o), t = ve(r);
|
331
|
-
return k(() => {
|
332
|
-
c.current !== o && (t(o), c.current = o);
|
333
|
-
}, [
|
334
|
-
o,
|
335
|
-
c,
|
336
|
-
t
|
337
|
-
]), n;
|
338
|
-
}
|
339
|
-
const tt = [
|
340
|
-
"a",
|
341
|
-
"button",
|
342
|
-
"div",
|
343
|
-
"form",
|
344
|
-
"h2",
|
345
|
-
"h3",
|
346
|
-
"img",
|
347
|
-
"input",
|
348
|
-
"label",
|
349
|
-
"li",
|
350
|
-
"nav",
|
351
|
-
"ol",
|
352
|
-
"p",
|
353
|
-
"span",
|
354
|
-
"svg",
|
355
|
-
"ul"
|
356
|
-
], D = tt.reduce((e, r) => {
|
357
|
-
const n = /* @__PURE__ */ I((o, c) => {
|
358
|
-
const { asChild: t, ...a } = o, i = t ? z : r;
|
359
|
-
return k(() => {
|
360
|
-
window[Symbol.for("radix-ui")] = !0;
|
361
|
-
}, []), /* @__PURE__ */ A(i, h({}, a, {
|
362
|
-
ref: c
|
363
|
-
}));
|
364
|
-
});
|
365
|
-
return n.displayName = `Primitive.${r}`, {
|
366
|
-
...e,
|
367
|
-
[r]: n
|
368
|
-
};
|
369
|
-
}, {}), B = globalThis != null && globalThis.document ? Ue : () => {
|
370
|
-
};
|
371
|
-
function nt(e, r) {
|
372
|
-
return ze((n, o) => {
|
373
|
-
const c = r[n][o];
|
374
|
-
return c ?? n;
|
375
|
-
}, e);
|
376
|
-
}
|
377
|
-
const ye = (e) => {
|
378
|
-
const { present: r, children: n } = e, o = rt(r), c = typeof n == "function" ? n({
|
379
|
-
present: o.isPresent
|
380
|
-
}) : S.only(n), t = M(o.ref, c.ref);
|
381
|
-
return typeof n == "function" || o.isPresent ? /* @__PURE__ */ G(c, {
|
382
|
-
ref: t
|
383
|
-
}) : null;
|
384
|
-
};
|
385
|
-
ye.displayName = "Presence";
|
386
|
-
function rt(e) {
|
387
|
-
const [r, n] = re(), o = C({}), c = C(e), t = C("none"), a = e ? "mounted" : "unmounted", [i, s] = nt(a, {
|
388
|
-
mounted: {
|
389
|
-
UNMOUNT: "unmounted",
|
390
|
-
ANIMATION_OUT: "unmountSuspended"
|
391
|
-
},
|
392
|
-
unmountSuspended: {
|
393
|
-
MOUNT: "mounted",
|
394
|
-
ANIMATION_END: "unmounted"
|
395
|
-
},
|
396
|
-
unmounted: {
|
397
|
-
MOUNT: "mounted"
|
398
|
-
}
|
399
|
-
});
|
400
|
-
return k(() => {
|
401
|
-
const l = q(o.current);
|
402
|
-
t.current = i === "mounted" ? l : "none";
|
403
|
-
}, [
|
404
|
-
i
|
405
|
-
]), B(() => {
|
406
|
-
const l = o.current, d = c.current;
|
407
|
-
if (d !== e) {
|
408
|
-
const _ = t.current, f = q(l);
|
409
|
-
e ? s("MOUNT") : f === "none" || (l == null ? void 0 : l.display) === "none" ? s("UNMOUNT") : s(d && _ !== f ? "ANIMATION_OUT" : "UNMOUNT"), c.current = e;
|
410
|
-
}
|
411
|
-
}, [
|
412
|
-
e,
|
413
|
-
s
|
414
|
-
]), B(() => {
|
415
|
-
if (r) {
|
416
|
-
const l = (p) => {
|
417
|
-
const f = q(o.current).includes(p.animationName);
|
418
|
-
p.target === r && f && Be(
|
419
|
-
() => s("ANIMATION_END")
|
420
|
-
);
|
421
|
-
}, d = (p) => {
|
422
|
-
p.target === r && (t.current = q(o.current));
|
423
|
-
};
|
424
|
-
return r.addEventListener("animationstart", d), r.addEventListener("animationcancel", l), r.addEventListener("animationend", l), () => {
|
425
|
-
r.removeEventListener("animationstart", d), r.removeEventListener("animationcancel", l), r.removeEventListener("animationend", l);
|
426
|
-
};
|
427
|
-
} else
|
428
|
-
s("ANIMATION_END");
|
429
|
-
}, [
|
430
|
-
r,
|
431
|
-
s
|
432
|
-
]), {
|
433
|
-
isPresent: [
|
434
|
-
"mounted",
|
435
|
-
"unmountSuspended"
|
436
|
-
].includes(i),
|
437
|
-
ref: H((l) => {
|
438
|
-
l && (o.current = getComputedStyle(l)), n(l);
|
439
|
-
}, [])
|
440
|
-
};
|
441
|
-
}
|
442
|
-
function q(e) {
|
443
|
-
return (e == null ? void 0 : e.animationName) || "none";
|
444
|
-
}
|
445
|
-
const ot = $e.useId || (() => {
|
446
|
-
});
|
447
|
-
let at = 0;
|
448
|
-
function xe(e) {
|
449
|
-
const [r, n] = $e.useState(ot());
|
450
|
-
return B(() => {
|
451
|
-
n(
|
452
|
-
(o) => o ?? String(at++)
|
453
|
-
);
|
454
|
-
}, [
|
455
|
-
e
|
456
|
-
]), r ? `radix-${r}` : "";
|
457
|
-
}
|
458
|
-
const Ae = "Collapsible", [ct, Ce] = ae(Ae), [it, ie] = ct(Ae), st = /* @__PURE__ */ I((e, r) => {
|
459
|
-
const { __scopeCollapsible: n, open: o, defaultOpen: c, disabled: t, onOpenChange: a, ...i } = e, [s = !1, l] = ce({
|
460
|
-
prop: o,
|
461
|
-
defaultProp: c,
|
462
|
-
onChange: a
|
463
|
-
});
|
464
|
-
return /* @__PURE__ */ A(it, {
|
465
|
-
scope: n,
|
466
|
-
disabled: t,
|
467
|
-
contentId: xe(),
|
468
|
-
open: s,
|
469
|
-
onOpenToggle: H(
|
470
|
-
() => l(
|
471
|
-
(d) => !d
|
472
|
-
),
|
473
|
-
[
|
474
|
-
l
|
475
|
-
]
|
476
|
-
)
|
477
|
-
}, /* @__PURE__ */ A(D.div, h({
|
478
|
-
"data-state": se(s),
|
479
|
-
"data-disabled": t ? "" : void 0
|
480
|
-
}, i, {
|
481
|
-
ref: r
|
482
|
-
})));
|
483
|
-
}), lt = "CollapsibleTrigger", ut = /* @__PURE__ */ I((e, r) => {
|
484
|
-
const { __scopeCollapsible: n, ...o } = e, c = ie(lt, n);
|
485
|
-
return /* @__PURE__ */ A(D.button, h({
|
486
|
-
type: "button",
|
487
|
-
"aria-controls": c.contentId,
|
488
|
-
"aria-expanded": c.open || !1,
|
489
|
-
"data-state": se(c.open),
|
490
|
-
"data-disabled": c.disabled ? "" : void 0,
|
491
|
-
disabled: c.disabled
|
492
|
-
}, o, {
|
493
|
-
ref: r,
|
494
|
-
onClick: ge(e.onClick, c.onOpenToggle)
|
495
|
-
}));
|
496
|
-
}), Ne = "CollapsibleContent", pt = /* @__PURE__ */ I((e, r) => {
|
497
|
-
const { forceMount: n, ...o } = e, c = ie(Ne, e.__scopeCollapsible);
|
498
|
-
return /* @__PURE__ */ A(
|
499
|
-
ye,
|
500
|
-
{
|
501
|
-
present: n || c.open
|
502
|
-
},
|
503
|
-
({ present: t }) => /* @__PURE__ */ A(dt, h({}, o, {
|
504
|
-
ref: r,
|
505
|
-
present: t
|
506
|
-
}))
|
507
|
-
);
|
508
|
-
}), dt = /* @__PURE__ */ I((e, r) => {
|
509
|
-
const { __scopeCollapsible: n, present: o, children: c, ...t } = e, a = ie(Ne, n), [i, s] = re(o), l = C(null), d = M(r, l), p = C(0), _ = p.current, f = C(0), b = f.current, y = a.open || i, g = C(y), m = C();
|
510
|
-
return k(() => {
|
511
|
-
const $ = requestAnimationFrame(
|
512
|
-
() => g.current = !1
|
513
|
-
);
|
514
|
-
return () => cancelAnimationFrame($);
|
515
|
-
}, []), B(() => {
|
516
|
-
const $ = l.current;
|
517
|
-
if ($) {
|
518
|
-
m.current = m.current || {
|
519
|
-
transitionDuration: $.style.transitionDuration,
|
520
|
-
animationName: $.style.animationName
|
521
|
-
}, $.style.transitionDuration = "0s", $.style.animationName = "none";
|
522
|
-
const v = $.getBoundingClientRect();
|
523
|
-
p.current = v.height, f.current = v.width, g.current || ($.style.transitionDuration = m.current.transitionDuration, $.style.animationName = m.current.animationName), s(o);
|
524
|
-
}
|
525
|
-
}, [
|
526
|
-
a.open,
|
527
|
-
o
|
528
|
-
]), /* @__PURE__ */ A(D.div, h({
|
529
|
-
"data-state": se(a.open),
|
530
|
-
"data-disabled": a.disabled ? "" : void 0,
|
531
|
-
id: a.contentId,
|
532
|
-
hidden: !y
|
533
|
-
}, t, {
|
534
|
-
ref: d,
|
535
|
-
style: {
|
536
|
-
"--radix-collapsible-content-height": _ ? `${_}px` : void 0,
|
537
|
-
"--radix-collapsible-content-width": b ? `${b}px` : void 0,
|
538
|
-
...e.style
|
539
|
-
}
|
540
|
-
}), y && c);
|
541
|
-
});
|
542
|
-
function se(e) {
|
543
|
-
return e ? "open" : "closed";
|
544
|
-
}
|
545
|
-
const ft = st, bt = ut, $t = pt, _t = /* @__PURE__ */ ee(void 0);
|
546
|
-
function mt(e) {
|
547
|
-
const r = _e(_t);
|
548
|
-
return e || r || "ltr";
|
549
|
-
}
|
550
|
-
const P = "Accordion", ht = [
|
551
|
-
"Home",
|
552
|
-
"End",
|
553
|
-
"ArrowDown",
|
554
|
-
"ArrowUp",
|
555
|
-
"ArrowLeft",
|
556
|
-
"ArrowRight"
|
557
|
-
], [le, gt, vt] = We(P), [F, ln] = ae(P, [
|
558
|
-
vt,
|
559
|
-
Ce
|
560
|
-
]), ue = Ce(), Ee = /* @__PURE__ */ u.forwardRef((e, r) => {
|
561
|
-
const { type: n, ...o } = e, c = o, t = o;
|
562
|
-
return /* @__PURE__ */ u.createElement(le.Provider, {
|
563
|
-
scope: e.__scopeAccordion
|
564
|
-
}, n === "multiple" ? /* @__PURE__ */ u.createElement(Ct, h({}, t, {
|
565
|
-
ref: r
|
566
|
-
})) : /* @__PURE__ */ u.createElement(At, h({}, c, {
|
567
|
-
ref: r
|
568
|
-
})));
|
569
|
-
});
|
570
|
-
Ee.propTypes = {
|
571
|
-
type(e) {
|
572
|
-
const r = e.value || e.defaultValue;
|
573
|
-
return e.type && ![
|
574
|
-
"single",
|
575
|
-
"multiple"
|
576
|
-
].includes(e.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : e.type === "multiple" && typeof r == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : e.type === "single" && Array.isArray(r) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
|
577
|
-
}
|
87
|
+
return /* @__PURE__ */ o(s, { ...a, className: c, "data-testid": t, children: n });
|
578
88
|
};
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
const { value: n, defaultValue: o, onValueChange: c = () => {
|
583
|
-
}, collapsible: t = !1, ...a } = e, [i, s] = ce({
|
584
|
-
prop: n,
|
585
|
-
defaultProp: o,
|
586
|
-
onChange: c
|
587
|
-
});
|
588
|
-
return /* @__PURE__ */ u.createElement(Ie, {
|
589
|
-
scope: e.__scopeAccordion,
|
590
|
-
value: i ? [
|
591
|
-
i
|
592
|
-
] : [],
|
593
|
-
onItemOpen: s,
|
594
|
-
onItemClose: u.useCallback(
|
595
|
-
() => t && s(""),
|
596
|
-
[
|
597
|
-
t,
|
598
|
-
s
|
599
|
-
]
|
600
|
-
)
|
601
|
-
}, /* @__PURE__ */ u.createElement(Pe, {
|
602
|
-
scope: e.__scopeAccordion,
|
603
|
-
collapsible: t
|
604
|
-
}, /* @__PURE__ */ u.createElement(we, h({}, a, {
|
605
|
-
ref: r
|
606
|
-
}))));
|
607
|
-
}), Ct = /* @__PURE__ */ u.forwardRef((e, r) => {
|
608
|
-
const { value: n, defaultValue: o, onValueChange: c = () => {
|
609
|
-
}, ...t } = e, [a = [], i] = ce({
|
610
|
-
prop: n,
|
611
|
-
defaultProp: o,
|
612
|
-
onChange: c
|
613
|
-
}), s = u.useCallback(
|
614
|
-
(d) => i(
|
615
|
-
(p = []) => [
|
616
|
-
...p,
|
617
|
-
d
|
618
|
-
]
|
619
|
-
),
|
620
|
-
[
|
621
|
-
i
|
622
|
-
]
|
623
|
-
), l = u.useCallback(
|
624
|
-
(d) => i(
|
625
|
-
(p = []) => p.filter(
|
626
|
-
(_) => _ !== d
|
627
|
-
)
|
628
|
-
),
|
629
|
-
[
|
630
|
-
i
|
631
|
-
]
|
632
|
-
);
|
633
|
-
return /* @__PURE__ */ u.createElement(Ie, {
|
634
|
-
scope: e.__scopeAccordion,
|
635
|
-
value: a,
|
636
|
-
onItemOpen: s,
|
637
|
-
onItemClose: l
|
638
|
-
}, /* @__PURE__ */ u.createElement(Pe, {
|
639
|
-
scope: e.__scopeAccordion,
|
640
|
-
collapsible: !0
|
641
|
-
}, /* @__PURE__ */ u.createElement(we, h({}, t, {
|
642
|
-
ref: r
|
643
|
-
}))));
|
644
|
-
}), [Nt, K] = F(P), we = /* @__PURE__ */ u.forwardRef((e, r) => {
|
645
|
-
const { __scopeAccordion: n, disabled: o, dir: c, orientation: t = "vertical", ...a } = e, i = u.useRef(null), s = M(i, r), l = gt(n), p = mt(c) === "ltr", _ = ge(e.onKeyDown, (f) => {
|
646
|
-
var b;
|
647
|
-
if (!ht.includes(f.key)) return;
|
648
|
-
const y = f.target, g = l().filter((J) => {
|
649
|
-
var X;
|
650
|
-
return !((X = J.ref.current) !== null && X !== void 0 && X.disabled);
|
651
|
-
}), m = g.findIndex(
|
652
|
-
(J) => J.ref.current === y
|
653
|
-
), $ = g.length;
|
654
|
-
if (m === -1) return;
|
655
|
-
f.preventDefault();
|
656
|
-
let v = m;
|
657
|
-
const N = 0, O = $ - 1, Y = () => {
|
658
|
-
v = m + 1, v > O && (v = N);
|
659
|
-
}, Z = () => {
|
660
|
-
v = m - 1, v < N && (v = O);
|
661
|
-
};
|
662
|
-
switch (f.key) {
|
663
|
-
case "Home":
|
664
|
-
v = N;
|
665
|
-
break;
|
666
|
-
case "End":
|
667
|
-
v = O;
|
668
|
-
break;
|
669
|
-
case "ArrowRight":
|
670
|
-
t === "horizontal" && (p ? Y() : Z());
|
671
|
-
break;
|
672
|
-
case "ArrowDown":
|
673
|
-
t === "vertical" && Y();
|
674
|
-
break;
|
675
|
-
case "ArrowLeft":
|
676
|
-
t === "horizontal" && (p ? Z() : Y());
|
677
|
-
break;
|
678
|
-
case "ArrowUp":
|
679
|
-
t === "vertical" && Z();
|
680
|
-
break;
|
681
|
-
}
|
682
|
-
const qe = v % $;
|
683
|
-
(b = g[qe].ref.current) === null || b === void 0 || b.focus();
|
684
|
-
});
|
685
|
-
return /* @__PURE__ */ u.createElement(Nt, {
|
686
|
-
scope: n,
|
687
|
-
disabled: o,
|
688
|
-
direction: c,
|
689
|
-
orientation: t
|
690
|
-
}, /* @__PURE__ */ u.createElement(le.Slot, {
|
691
|
-
scope: n
|
692
|
-
}, /* @__PURE__ */ u.createElement(D.div, h({}, a, {
|
693
|
-
"data-orientation": t,
|
694
|
-
ref: s,
|
695
|
-
onKeyDown: o ? void 0 : _
|
696
|
-
}))));
|
697
|
-
}), ne = "AccordionItem", [Et, pe] = F(ne), It = /* @__PURE__ */ u.forwardRef((e, r) => {
|
698
|
-
const { __scopeAccordion: n, value: o, ...c } = e, t = K(ne, n), a = yt(ne, n), i = ue(n), s = xe(), l = o && a.value.includes(o) || !1, d = t.disabled || e.disabled;
|
699
|
-
return /* @__PURE__ */ u.createElement(Et, {
|
700
|
-
scope: n,
|
701
|
-
open: l,
|
702
|
-
disabled: d,
|
703
|
-
triggerId: s
|
704
|
-
}, /* @__PURE__ */ u.createElement(ft, h({
|
705
|
-
"data-orientation": t.orientation,
|
706
|
-
"data-state": Se(l)
|
707
|
-
}, i, c, {
|
708
|
-
ref: r,
|
709
|
-
disabled: d,
|
710
|
-
open: l,
|
711
|
-
onOpenChange: (p) => {
|
712
|
-
p ? a.onItemOpen(o) : a.onItemClose(o);
|
713
|
-
}
|
714
|
-
})));
|
715
|
-
}), Pt = "AccordionHeader", wt = /* @__PURE__ */ u.forwardRef((e, r) => {
|
716
|
-
const { __scopeAccordion: n, ...o } = e, c = K(P, n), t = pe(Pt, n);
|
717
|
-
return /* @__PURE__ */ u.createElement(D.h3, h({
|
718
|
-
"data-orientation": c.orientation,
|
719
|
-
"data-state": Se(t.open),
|
720
|
-
"data-disabled": t.disabled ? "" : void 0
|
721
|
-
}, o, {
|
722
|
-
ref: r
|
723
|
-
}));
|
724
|
-
}), de = "AccordionTrigger", St = /* @__PURE__ */ u.forwardRef((e, r) => {
|
725
|
-
const { __scopeAccordion: n, ...o } = e, c = K(P, n), t = pe(de, n), a = xt(de, n), i = ue(n);
|
726
|
-
return /* @__PURE__ */ u.createElement(le.ItemSlot, {
|
727
|
-
scope: n
|
728
|
-
}, /* @__PURE__ */ u.createElement(bt, h({
|
729
|
-
"aria-disabled": t.open && !a.collapsible || void 0,
|
730
|
-
"data-orientation": c.orientation,
|
731
|
-
id: t.triggerId
|
732
|
-
}, i, o, {
|
733
|
-
ref: r
|
734
|
-
})));
|
735
|
-
}), Ot = "AccordionContent", Rt = /* @__PURE__ */ u.forwardRef((e, r) => {
|
736
|
-
const { __scopeAccordion: n, ...o } = e, c = K(P, n), t = pe(Ot, n), a = ue(n);
|
737
|
-
return /* @__PURE__ */ u.createElement($t, h({
|
738
|
-
role: "region",
|
739
|
-
"aria-labelledby": t.triggerId,
|
740
|
-
"data-orientation": c.orientation
|
741
|
-
}, a, o, {
|
742
|
-
ref: r,
|
743
|
-
style: {
|
744
|
-
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
745
|
-
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
746
|
-
...e.style
|
747
|
-
}
|
748
|
-
}));
|
749
|
-
});
|
750
|
-
function Se(e) {
|
751
|
-
return e ? "open" : "closed";
|
89
|
+
y.displayName = "Heading";
|
90
|
+
function V(t) {
|
91
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
752
92
|
}
|
753
|
-
|
754
|
-
function jt(e) {
|
755
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
756
|
-
}
|
757
|
-
var Oe = { exports: {} };
|
93
|
+
var A = { exports: {} };
|
758
94
|
/*!
|
759
95
|
Copyright (c) 2018 Jed Watson.
|
760
96
|
Licensed under the MIT License (MIT), see
|
761
97
|
http://jedwatson.github.io/classnames
|
762
98
|
*/
|
763
|
-
(function(
|
99
|
+
(function(t) {
|
764
100
|
(function() {
|
765
|
-
var
|
766
|
-
function
|
767
|
-
for (var
|
768
|
-
var
|
769
|
-
|
101
|
+
var n = {}.hasOwnProperty;
|
102
|
+
function p() {
|
103
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
104
|
+
var a = arguments[e];
|
105
|
+
a && (r = i(r, u.call(this, a)));
|
770
106
|
}
|
771
|
-
return
|
107
|
+
return r;
|
772
108
|
}
|
773
|
-
function
|
774
|
-
if (typeof
|
775
|
-
return this && this[
|
776
|
-
if (typeof
|
109
|
+
function u(r) {
|
110
|
+
if (typeof r == "string" || typeof r == "number")
|
111
|
+
return this && this[r] || r;
|
112
|
+
if (typeof r != "object")
|
777
113
|
return "";
|
778
|
-
if (Array.isArray(
|
779
|
-
return
|
780
|
-
if (
|
781
|
-
return
|
782
|
-
var
|
783
|
-
for (var
|
784
|
-
|
785
|
-
return
|
114
|
+
if (Array.isArray(r))
|
115
|
+
return p.apply(this, r);
|
116
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
117
|
+
return r.toString();
|
118
|
+
var e = "";
|
119
|
+
for (var a in r)
|
120
|
+
n.call(r, a) && r[a] && (e = i(e, this && this[a] || a));
|
121
|
+
return e;
|
786
122
|
}
|
787
|
-
function
|
788
|
-
return
|
123
|
+
function i(r, e) {
|
124
|
+
return e ? r ? r + " " + e : r + e : r;
|
789
125
|
}
|
790
|
-
|
126
|
+
t.exports ? (p.default = p, t.exports = p) : window.classNames = p;
|
791
127
|
})();
|
792
|
-
})(
|
793
|
-
var
|
794
|
-
const
|
128
|
+
})(A);
|
129
|
+
var U = A.exports;
|
130
|
+
const N = /* @__PURE__ */ V(U), z = {
|
795
131
|
"purpur-accordion": "_purpur-accordion_u887g_1",
|
796
132
|
"purpur-accordion__title": "_purpur-accordion__title_u887g_4",
|
797
133
|
"purpur-accordion--negative": "_purpur-accordion--negative_u887g_13"
|
798
134
|
};
|
799
|
-
function
|
800
|
-
return
|
135
|
+
function F(t) {
|
136
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
801
137
|
}
|
802
|
-
var
|
138
|
+
var w = { exports: {} };
|
803
139
|
/*!
|
804
140
|
Copyright (c) 2018 Jed Watson.
|
805
141
|
Licensed under the MIT License (MIT), see
|
806
142
|
http://jedwatson.github.io/classnames
|
807
143
|
*/
|
808
|
-
(function(
|
144
|
+
(function(t) {
|
809
145
|
(function() {
|
810
|
-
var
|
811
|
-
function
|
812
|
-
for (var
|
813
|
-
var
|
814
|
-
|
146
|
+
var n = {}.hasOwnProperty;
|
147
|
+
function p() {
|
148
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
149
|
+
var a = arguments[e];
|
150
|
+
a && (r = i(r, u.call(this, a)));
|
815
151
|
}
|
816
|
-
return
|
152
|
+
return r;
|
817
153
|
}
|
818
|
-
function
|
819
|
-
if (typeof
|
820
|
-
return this && this[
|
821
|
-
if (typeof
|
154
|
+
function u(r) {
|
155
|
+
if (typeof r == "string" || typeof r == "number")
|
156
|
+
return this && this[r] || r;
|
157
|
+
if (typeof r != "object")
|
822
158
|
return "";
|
823
|
-
if (Array.isArray(
|
824
|
-
return
|
825
|
-
if (
|
826
|
-
return
|
827
|
-
var
|
828
|
-
for (var
|
829
|
-
|
830
|
-
return
|
159
|
+
if (Array.isArray(r))
|
160
|
+
return p.apply(this, r);
|
161
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
162
|
+
return r.toString();
|
163
|
+
var e = "";
|
164
|
+
for (var a in r)
|
165
|
+
n.call(r, a) && r[a] && (e = i(e, this && this[a] || a));
|
166
|
+
return e;
|
831
167
|
}
|
832
|
-
function
|
833
|
-
return
|
168
|
+
function i(r, e) {
|
169
|
+
return e ? r ? r + " " + e : r + e : r;
|
834
170
|
}
|
835
|
-
|
171
|
+
t.exports ? (p.default = p, t.exports = p) : window.classNames = p;
|
836
172
|
})();
|
837
|
-
})(
|
838
|
-
var
|
839
|
-
const
|
173
|
+
})(w);
|
174
|
+
var J = w.exports;
|
175
|
+
const X = /* @__PURE__ */ F(J), Y = {
|
840
176
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
841
177
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
842
178
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
@@ -844,92 +180,92 @@ const Bt = /* @__PURE__ */ Ut(zt), Ht = {
|
|
844
180
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
845
181
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
846
182
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
847
|
-
},
|
183
|
+
}, Z = {
|
848
184
|
name: "chevron-down",
|
849
185
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M20.136 7.864a.9.9 0 0 0-1.272 0L12 14.727 5.136 7.864a.9.9 0 0 0-1.272 1.272l7.5 7.5a.9.9 0 0 0 1.272 0l7.5-7.5a.9.9 0 0 0 0-1.272Z" clip-rule="evenodd"/></svg>',
|
850
186
|
keywords: ["chevron-down"],
|
851
187
|
category: "utility"
|
852
|
-
},
|
853
|
-
|
188
|
+
}, T = (t) => /* @__PURE__ */ o(
|
189
|
+
S,
|
854
190
|
{
|
855
|
-
...
|
856
|
-
svg:
|
191
|
+
...t,
|
192
|
+
svg: Z
|
857
193
|
}
|
858
194
|
);
|
859
|
-
|
860
|
-
const
|
861
|
-
const
|
195
|
+
T.displayName = "IconChevronDown";
|
196
|
+
const K = X.bind(Y), b = "purpur-icon", Q = "md", W = (t) => t.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), rr = ({ content: t = "", title: n } = {}) => {
|
197
|
+
const p = [
|
862
198
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
863
199
|
{ name: "fill", value: "currentColor" },
|
864
200
|
{ name: "viewBox", value: "0 0 24 24" },
|
865
|
-
|
866
|
-
],
|
867
|
-
return `<svg ${
|
868
|
-
},
|
869
|
-
["data-testid"]:
|
870
|
-
svg:
|
871
|
-
allyTitle:
|
872
|
-
className:
|
873
|
-
size:
|
874
|
-
...
|
201
|
+
n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
202
|
+
], u = n ? `<title>${n}</title>` : "";
|
203
|
+
return `<svg ${W(p)}>${u}${t}</svg>`;
|
204
|
+
}, er = (t) => t.replace(/<(\/?)svg([^>]*)>/g, "").trim(), S = ({
|
205
|
+
["data-testid"]: t,
|
206
|
+
svg: n,
|
207
|
+
allyTitle: p,
|
208
|
+
className: u,
|
209
|
+
size: i = Q,
|
210
|
+
...r
|
875
211
|
}) => {
|
876
|
-
const
|
877
|
-
content:
|
878
|
-
title:
|
879
|
-
}),
|
880
|
-
return /* @__PURE__ */
|
212
|
+
const e = rr({
|
213
|
+
content: er(n.svg),
|
214
|
+
title: p
|
215
|
+
}), a = K(u, b, `${b}--${i}`);
|
216
|
+
return /* @__PURE__ */ o(
|
881
217
|
"span",
|
882
218
|
{
|
883
|
-
"aria-label":
|
884
|
-
className:
|
885
|
-
"data-testid":
|
886
|
-
dangerouslySetInnerHTML: { __html:
|
887
|
-
...
|
219
|
+
"aria-label": p,
|
220
|
+
className: a,
|
221
|
+
"data-testid": t,
|
222
|
+
dangerouslySetInnerHTML: { __html: e },
|
223
|
+
...r
|
888
224
|
}
|
889
225
|
);
|
890
226
|
};
|
891
|
-
|
892
|
-
function
|
893
|
-
return
|
227
|
+
S.displayName = "Icon";
|
228
|
+
function tr(t) {
|
229
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
894
230
|
}
|
895
|
-
var
|
231
|
+
var I = { exports: {} };
|
896
232
|
/*!
|
897
233
|
Copyright (c) 2018 Jed Watson.
|
898
234
|
Licensed under the MIT License (MIT), see
|
899
235
|
http://jedwatson.github.io/classnames
|
900
236
|
*/
|
901
|
-
(function(
|
237
|
+
(function(t) {
|
902
238
|
(function() {
|
903
|
-
var
|
904
|
-
function
|
905
|
-
for (var
|
906
|
-
var
|
907
|
-
|
239
|
+
var n = {}.hasOwnProperty;
|
240
|
+
function p() {
|
241
|
+
for (var r = "", e = 0; e < arguments.length; e++) {
|
242
|
+
var a = arguments[e];
|
243
|
+
a && (r = i(r, u(a)));
|
908
244
|
}
|
909
|
-
return
|
245
|
+
return r;
|
910
246
|
}
|
911
|
-
function
|
912
|
-
if (typeof
|
913
|
-
return
|
914
|
-
if (typeof
|
247
|
+
function u(r) {
|
248
|
+
if (typeof r == "string" || typeof r == "number")
|
249
|
+
return r;
|
250
|
+
if (typeof r != "object")
|
915
251
|
return "";
|
916
|
-
if (Array.isArray(
|
917
|
-
return
|
918
|
-
if (
|
919
|
-
return
|
920
|
-
var
|
921
|
-
for (var
|
922
|
-
|
923
|
-
return
|
252
|
+
if (Array.isArray(r))
|
253
|
+
return p.apply(null, r);
|
254
|
+
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
255
|
+
return r.toString();
|
256
|
+
var e = "";
|
257
|
+
for (var a in r)
|
258
|
+
n.call(r, a) && r[a] && (e = i(e, a));
|
259
|
+
return e;
|
924
260
|
}
|
925
|
-
function
|
926
|
-
return
|
261
|
+
function i(r, e) {
|
262
|
+
return e ? r ? r + " " + e : r + e : r;
|
927
263
|
}
|
928
|
-
|
264
|
+
t.exports ? (p.default = p, t.exports = p) : window.classNames = p;
|
929
265
|
})();
|
930
|
-
})(
|
931
|
-
var
|
932
|
-
const
|
266
|
+
})(I);
|
267
|
+
var ar = I.exports;
|
268
|
+
const pr = /* @__PURE__ */ tr(ar), _ = {
|
933
269
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
934
270
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
935
271
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
@@ -944,7 +280,7 @@ const Wt = /* @__PURE__ */ Xt(Qt), R = {
|
|
944
280
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
945
281
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
946
282
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
947
|
-
},
|
283
|
+
}, nr = {
|
948
284
|
PARAGRAPH100: "paragraph-100",
|
949
285
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
950
286
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
@@ -955,100 +291,133 @@ const Wt = /* @__PURE__ */ Xt(Qt), R = {
|
|
955
291
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
956
292
|
OVERLINE100: "overline-100",
|
957
293
|
OVERLINE200: "overline-200"
|
958
|
-
},
|
959
|
-
["data-testid"]:
|
960
|
-
children:
|
294
|
+
}, h = "purpur-paragraph", O = ({
|
295
|
+
["data-testid"]: t,
|
296
|
+
children: n,
|
297
|
+
className: p,
|
298
|
+
disabled: u,
|
299
|
+
enableHyphenation: i = !1,
|
300
|
+
negative: r = !1,
|
301
|
+
variant: e = nr.PARAGRAPH100,
|
302
|
+
...a
|
303
|
+
}) => {
|
304
|
+
const s = pr([
|
305
|
+
p,
|
306
|
+
_[h],
|
307
|
+
_[`${h}--${e}`],
|
308
|
+
{
|
309
|
+
[_[`${h}--hyphens`]]: i,
|
310
|
+
[_[`${h}--disabled`]]: u,
|
311
|
+
[_[`${h}--negative`]]: r
|
312
|
+
}
|
313
|
+
]);
|
314
|
+
return /* @__PURE__ */ o("p", { ...a, className: s, "data-testid": t, children: n });
|
315
|
+
};
|
316
|
+
O.displayName = "Paragraph";
|
317
|
+
const ir = {
|
318
|
+
"purpur-accordion-item": "_purpur-accordion-item_29ds4_1",
|
319
|
+
"purpur-accordion-item__header": "_purpur-accordion-item__header_29ds4_10",
|
320
|
+
"purpur-accordion-item__trigger": "_purpur-accordion-item__trigger_29ds4_13",
|
321
|
+
"purpur-accordion-item__trigger__icon": "_purpur-accordion-item__trigger__icon_29ds4_43",
|
322
|
+
"purpur-accordion-item__title": "_purpur-accordion-item__title_29ds4_49",
|
323
|
+
"purpur-accordion-item__rotate": "_purpur-accordion-item__rotate_29ds4_63",
|
324
|
+
"purpur-accordion-item__icon": "_purpur-accordion-item__icon_29ds4_63",
|
325
|
+
"purpur-accordion-item__content": "_purpur-accordion-item__content_29ds4_66",
|
326
|
+
"purpur-accordion-item__contentText": "_purpur-accordion-item__contentText_29ds4_79",
|
327
|
+
"purpur-accordion-item--negative": "_purpur-accordion-item--negative_29ds4_98"
|
328
|
+
}, d = N.bind(ir), l = "purpur-accordion-item", ur = ({
|
329
|
+
children: t,
|
961
330
|
className: n,
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
...
|
331
|
+
title: p,
|
332
|
+
titleTag: u = "h3",
|
333
|
+
initialOpen: i = !1,
|
334
|
+
onClick: r,
|
335
|
+
...e
|
967
336
|
}) => {
|
968
|
-
const s =
|
337
|
+
const a = k(q), s = R(), [c, E] = M(!i), L = d([
|
969
338
|
n,
|
970
|
-
|
971
|
-
R[`${T}--${a}`],
|
339
|
+
l,
|
972
340
|
{
|
973
|
-
[
|
974
|
-
[R[`${T}--disabled`]]: o,
|
975
|
-
[R[`${T}--negative`]]: t
|
341
|
+
[`${l}--negative`]: a
|
976
342
|
}
|
977
343
|
]);
|
978
|
-
return /* @__PURE__ */
|
979
|
-
|
980
|
-
|
981
|
-
const tn = "_slideDown_aukzj_1", nn = "_slideUp_aukzj_1", rn = {
|
982
|
-
"purpur-accordion-item": "_purpur-accordion-item_aukzj_1",
|
983
|
-
"purpur-accordion-item__header": "_purpur-accordion-item__header_aukzj_8",
|
984
|
-
"purpur-accordion-item__trigger": "_purpur-accordion-item__trigger_aukzj_11",
|
985
|
-
"purpur-accordion-item__content": "_purpur-accordion-item__content_aukzj_41",
|
986
|
-
slideDown: tn,
|
987
|
-
slideUp: nn,
|
988
|
-
"purpur-accordion-item__contentText": "_purpur-accordion-item__contentText_aukzj_50",
|
989
|
-
"purpur-accordion-item__icon": "_purpur-accordion-item__icon_aukzj_54",
|
990
|
-
"purpur-accordion-item__title": "_purpur-accordion-item__title_aukzj_67",
|
991
|
-
"purpur-accordion-item--negative": "_purpur-accordion-item--negative_aukzj_88"
|
992
|
-
}, w = Re.bind(rn), E = "purpur-accordion-item", on = I(
|
993
|
-
({
|
994
|
-
children: e,
|
995
|
-
className: r,
|
996
|
-
title: n,
|
997
|
-
titleTag: o = "h3",
|
998
|
-
negative: c,
|
999
|
-
onClick: t,
|
1000
|
-
...a
|
1001
|
-
}, i) => {
|
1002
|
-
const s = w([
|
1003
|
-
r,
|
1004
|
-
E,
|
344
|
+
return /* @__PURE__ */ v("div", { className: L, ...e, children: [
|
345
|
+
/* @__PURE__ */ o(
|
346
|
+
y,
|
1005
347
|
{
|
1006
|
-
|
348
|
+
tag: u,
|
349
|
+
variant: "title-100",
|
350
|
+
className: d([`${l}__header`, `${l}__title`]),
|
351
|
+
children: /* @__PURE__ */ v(
|
352
|
+
"button",
|
353
|
+
{
|
354
|
+
type: "button",
|
355
|
+
"data-state": c ? "open" : "close",
|
356
|
+
onClick: (j) => {
|
357
|
+
r && r(j), E(!c);
|
358
|
+
},
|
359
|
+
className: d(`${l}__trigger`, n, {
|
360
|
+
[`${l}__rotate`]: !c
|
361
|
+
}),
|
362
|
+
"aria-expanded": !c,
|
363
|
+
"aria-controls": s,
|
364
|
+
id: s + "button",
|
365
|
+
children: [
|
366
|
+
p,
|
367
|
+
/* @__PURE__ */ o(T, { size: "md", className: d(`${l}__icon`), "aria-hidden": !0 })
|
368
|
+
]
|
369
|
+
}
|
370
|
+
)
|
1007
371
|
}
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
{
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
titleTag: t = "h2",
|
1032
|
-
titleVariant: a = "title-300",
|
1033
|
-
...i
|
372
|
+
),
|
373
|
+
/* @__PURE__ */ o(
|
374
|
+
"div",
|
375
|
+
{
|
376
|
+
className: d(`${l}__content`, n),
|
377
|
+
"aria-hidden": c,
|
378
|
+
id: s,
|
379
|
+
"aria-labelledby": s + "button",
|
380
|
+
role: "region",
|
381
|
+
children: /* @__PURE__ */ o("div", { className: d(`${l}__contentText`), children: typeof t == "string" ? /* @__PURE__ */ o(O, { variant: "paragraph-200", children: t }) : t })
|
382
|
+
}
|
383
|
+
)
|
384
|
+
] });
|
385
|
+
}, x = N.bind(z), m = "purpur-accordion", q = H(!1), P = ({
|
386
|
+
["data-testid"]: t,
|
387
|
+
children: n,
|
388
|
+
className: p,
|
389
|
+
negative: u = !1,
|
390
|
+
title: i,
|
391
|
+
titleTag: r = "h2",
|
392
|
+
titleVariant: e = "title-300",
|
393
|
+
schema: a,
|
394
|
+
...s
|
1034
395
|
}) => {
|
1035
|
-
const
|
1036
|
-
|
1037
|
-
|
396
|
+
const c = x([
|
397
|
+
p,
|
398
|
+
m,
|
1038
399
|
{
|
1039
|
-
[`${
|
400
|
+
[`${m}--negative`]: u
|
1040
401
|
}
|
1041
|
-
])
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
402
|
+
]);
|
403
|
+
return /* @__PURE__ */ v("div", { className: c, "data-testid": t, ...s, children: [
|
404
|
+
i && /* @__PURE__ */ o(y, { tag: r, variant: e, className: x(`${m}__title`), children: i }),
|
405
|
+
/* @__PURE__ */ o(q.Provider, { value: u, children: n }),
|
406
|
+
a && /* @__PURE__ */ o(
|
407
|
+
"script",
|
408
|
+
{
|
409
|
+
type: "application/ld+json",
|
410
|
+
dangerouslySetInnerHTML: {
|
411
|
+
__html: a
|
412
|
+
}
|
413
|
+
}
|
414
|
+
)
|
1047
415
|
] });
|
1048
416
|
};
|
1049
|
-
|
1050
|
-
|
417
|
+
P.Item = ur;
|
418
|
+
P.displayName = "Accordion";
|
1051
419
|
export {
|
1052
|
-
|
420
|
+
P as Accordion,
|
421
|
+
q as NegativeContext
|
1053
422
|
};
|
1054
423
|
//# sourceMappingURL=accordion.es.js.map
|