@emporix/component-library 1.3.1 → 1.3.3
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/components/buttons/PrimaryButton.d.ts +29 -0
- package/dist/components/buttons/PrimaryButton.d.ts.map +1 -0
- package/dist/components/buttons/SecondaryButton.d.ts +25 -0
- package/dist/components/buttons/SecondaryButton.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.d.ts +77 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +39 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.js +1076 -0
- package/dist/index.umd.js +30 -0
- package/dist/style.css +1 -0
- package/dist/styles.d.ts +4 -0
- package/package.json +1 -5
- package/dist/assets/index-CGlMSzXO.js +0 -79
- package/dist/assets/index-CcChJOm6.css +0 -1
- package/dist/index.html +0 -14
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,1076 @@
|
|
|
1
|
+
import W, { useState as Ee, useRef as oe, useEffect as we } from "react";
|
|
2
|
+
var Re = { exports: {} }, ie = {};
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.min.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var Ze;
|
|
13
|
+
function Pt() {
|
|
14
|
+
if (Ze) return ie;
|
|
15
|
+
Ze = 1;
|
|
16
|
+
var r = W, a = Symbol.for("react.element"), o = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, _ = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function j(E, u, I) {
|
|
18
|
+
var w, N = {}, A = null, U = null;
|
|
19
|
+
I !== void 0 && (A = "" + I), u.key !== void 0 && (A = "" + u.key), u.ref !== void 0 && (U = u.ref);
|
|
20
|
+
for (w in u) s.call(u, w) && !b.hasOwnProperty(w) && (N[w] = u[w]);
|
|
21
|
+
if (E && E.defaultProps) for (w in u = E.defaultProps, u) N[w] === void 0 && (N[w] = u[w]);
|
|
22
|
+
return { $$typeof: a, type: E, key: A, ref: U, props: N, _owner: _.current };
|
|
23
|
+
}
|
|
24
|
+
return ie.Fragment = o, ie.jsx = j, ie.jsxs = j, ie;
|
|
25
|
+
}
|
|
26
|
+
var se = {};
|
|
27
|
+
/**
|
|
28
|
+
* @license React
|
|
29
|
+
* react-jsx-runtime.development.js
|
|
30
|
+
*
|
|
31
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the MIT license found in the
|
|
34
|
+
* LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/
|
|
36
|
+
var Qe;
|
|
37
|
+
function St() {
|
|
38
|
+
return Qe || (Qe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
39
|
+
var r = W, a = Symbol.for("react.element"), o = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), E = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), U = Symbol.for("react.offscreen"), k = Symbol.iterator, S = "@@iterator";
|
|
40
|
+
function H(e) {
|
|
41
|
+
if (e === null || typeof e != "object")
|
|
42
|
+
return null;
|
|
43
|
+
var t = k && e[k] || e[S];
|
|
44
|
+
return typeof t == "function" ? t : null;
|
|
45
|
+
}
|
|
46
|
+
var T = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
+
function C(e) {
|
|
48
|
+
{
|
|
49
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), l = 1; l < t; l++)
|
|
50
|
+
n[l - 1] = arguments[l];
|
|
51
|
+
le("error", e, n);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function le(e, t, n) {
|
|
55
|
+
{
|
|
56
|
+
var l = T.ReactDebugCurrentFrame, d = l.getStackAddendum();
|
|
57
|
+
d !== "" && (t += "%s", n = n.concat([d]));
|
|
58
|
+
var v = n.map(function(f) {
|
|
59
|
+
return String(f);
|
|
60
|
+
});
|
|
61
|
+
v.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, v);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var ce = !1, q = !1, B = !1, X = !1, xe = !1, Z;
|
|
65
|
+
Z = Symbol.for("react.module.reference");
|
|
66
|
+
function ue(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === s || e === b || xe || e === _ || e === I || e === w || X || e === U || ce || q || B || typeof e == "object" && e !== null && (e.$$typeof === A || e.$$typeof === N || e.$$typeof === j || e.$$typeof === E || e.$$typeof === u || // This needs to include all possible module reference object
|
|
68
|
+
// types supported by any Flight configuration anywhere since
|
|
69
|
+
// we don't know which Flight build this will end up being used
|
|
70
|
+
// with.
|
|
71
|
+
e.$$typeof === Z || e.getModuleId !== void 0));
|
|
72
|
+
}
|
|
73
|
+
function Q(e, t, n) {
|
|
74
|
+
var l = e.displayName;
|
|
75
|
+
if (l)
|
|
76
|
+
return l;
|
|
77
|
+
var d = t.displayName || t.name || "";
|
|
78
|
+
return d !== "" ? n + "(" + d + ")" : n;
|
|
79
|
+
}
|
|
80
|
+
function ee(e) {
|
|
81
|
+
return e.displayName || "Context";
|
|
82
|
+
}
|
|
83
|
+
function F(e) {
|
|
84
|
+
if (e == null)
|
|
85
|
+
return null;
|
|
86
|
+
if (typeof e.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
87
|
+
return e.displayName || e.name || null;
|
|
88
|
+
if (typeof e == "string")
|
|
89
|
+
return e;
|
|
90
|
+
switch (e) {
|
|
91
|
+
case s:
|
|
92
|
+
return "Fragment";
|
|
93
|
+
case o:
|
|
94
|
+
return "Portal";
|
|
95
|
+
case b:
|
|
96
|
+
return "Profiler";
|
|
97
|
+
case _:
|
|
98
|
+
return "StrictMode";
|
|
99
|
+
case I:
|
|
100
|
+
return "Suspense";
|
|
101
|
+
case w:
|
|
102
|
+
return "SuspenseList";
|
|
103
|
+
}
|
|
104
|
+
if (typeof e == "object")
|
|
105
|
+
switch (e.$$typeof) {
|
|
106
|
+
case E:
|
|
107
|
+
var t = e;
|
|
108
|
+
return ee(t) + ".Consumer";
|
|
109
|
+
case j:
|
|
110
|
+
var n = e;
|
|
111
|
+
return ee(n._context) + ".Provider";
|
|
112
|
+
case u:
|
|
113
|
+
return Q(e, e.render, "ForwardRef");
|
|
114
|
+
case N:
|
|
115
|
+
var l = e.displayName || null;
|
|
116
|
+
return l !== null ? l : F(e.type) || "Memo";
|
|
117
|
+
case A: {
|
|
118
|
+
var d = e, v = d._payload, f = d._init;
|
|
119
|
+
try {
|
|
120
|
+
return F(f(v));
|
|
121
|
+
} catch {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
var Y = Object.assign, O = 0, K, fe, de, te, pe, ve, _e;
|
|
129
|
+
function be() {
|
|
130
|
+
}
|
|
131
|
+
be.__reactDisabledLog = !0;
|
|
132
|
+
function re() {
|
|
133
|
+
{
|
|
134
|
+
if (O === 0) {
|
|
135
|
+
K = console.log, fe = console.info, de = console.warn, te = console.error, pe = console.group, ve = console.groupCollapsed, _e = console.groupEnd;
|
|
136
|
+
var e = {
|
|
137
|
+
configurable: !0,
|
|
138
|
+
enumerable: !0,
|
|
139
|
+
value: be,
|
|
140
|
+
writable: !0
|
|
141
|
+
};
|
|
142
|
+
Object.defineProperties(console, {
|
|
143
|
+
info: e,
|
|
144
|
+
log: e,
|
|
145
|
+
warn: e,
|
|
146
|
+
error: e,
|
|
147
|
+
group: e,
|
|
148
|
+
groupCollapsed: e,
|
|
149
|
+
groupEnd: e
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
O++;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
function me() {
|
|
156
|
+
{
|
|
157
|
+
if (O--, O === 0) {
|
|
158
|
+
var e = {
|
|
159
|
+
configurable: !0,
|
|
160
|
+
enumerable: !0,
|
|
161
|
+
writable: !0
|
|
162
|
+
};
|
|
163
|
+
Object.defineProperties(console, {
|
|
164
|
+
log: Y({}, e, {
|
|
165
|
+
value: K
|
|
166
|
+
}),
|
|
167
|
+
info: Y({}, e, {
|
|
168
|
+
value: fe
|
|
169
|
+
}),
|
|
170
|
+
warn: Y({}, e, {
|
|
171
|
+
value: de
|
|
172
|
+
}),
|
|
173
|
+
error: Y({}, e, {
|
|
174
|
+
value: te
|
|
175
|
+
}),
|
|
176
|
+
group: Y({}, e, {
|
|
177
|
+
value: pe
|
|
178
|
+
}),
|
|
179
|
+
groupCollapsed: Y({}, e, {
|
|
180
|
+
value: ve
|
|
181
|
+
}),
|
|
182
|
+
groupEnd: Y({}, e, {
|
|
183
|
+
value: _e
|
|
184
|
+
})
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
O < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
var i = T.ReactCurrentDispatcher, p;
|
|
191
|
+
function g(e, t, n) {
|
|
192
|
+
{
|
|
193
|
+
if (p === void 0)
|
|
194
|
+
try {
|
|
195
|
+
throw Error();
|
|
196
|
+
} catch (d) {
|
|
197
|
+
var l = d.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
+
p = l && l[1] || "";
|
|
199
|
+
}
|
|
200
|
+
return `
|
|
201
|
+
` + p + e;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
var $ = !1, M;
|
|
205
|
+
{
|
|
206
|
+
var ge = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
+
M = new ge();
|
|
208
|
+
}
|
|
209
|
+
function ne(e, t) {
|
|
210
|
+
if (!e || $)
|
|
211
|
+
return "";
|
|
212
|
+
{
|
|
213
|
+
var n = M.get(e);
|
|
214
|
+
if (n !== void 0)
|
|
215
|
+
return n;
|
|
216
|
+
}
|
|
217
|
+
var l;
|
|
218
|
+
$ = !0;
|
|
219
|
+
var d = Error.prepareStackTrace;
|
|
220
|
+
Error.prepareStackTrace = void 0;
|
|
221
|
+
var v;
|
|
222
|
+
v = i.current, i.current = null, re();
|
|
223
|
+
try {
|
|
224
|
+
if (t) {
|
|
225
|
+
var f = function() {
|
|
226
|
+
throw Error();
|
|
227
|
+
};
|
|
228
|
+
if (Object.defineProperty(f.prototype, "props", {
|
|
229
|
+
set: function() {
|
|
230
|
+
throw Error();
|
|
231
|
+
}
|
|
232
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
|
+
try {
|
|
234
|
+
Reflect.construct(f, []);
|
|
235
|
+
} catch (P) {
|
|
236
|
+
l = P;
|
|
237
|
+
}
|
|
238
|
+
Reflect.construct(e, [], f);
|
|
239
|
+
} else {
|
|
240
|
+
try {
|
|
241
|
+
f.call();
|
|
242
|
+
} catch (P) {
|
|
243
|
+
l = P;
|
|
244
|
+
}
|
|
245
|
+
e.call(f.prototype);
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
try {
|
|
249
|
+
throw Error();
|
|
250
|
+
} catch (P) {
|
|
251
|
+
l = P;
|
|
252
|
+
}
|
|
253
|
+
e();
|
|
254
|
+
}
|
|
255
|
+
} catch (P) {
|
|
256
|
+
if (P && l && typeof P.stack == "string") {
|
|
257
|
+
for (var c = P.stack.split(`
|
|
258
|
+
`), x = l.stack.split(`
|
|
259
|
+
`), y = c.length - 1, R = x.length - 1; y >= 1 && R >= 0 && c[y] !== x[R]; )
|
|
260
|
+
R--;
|
|
261
|
+
for (; y >= 1 && R >= 0; y--, R--)
|
|
262
|
+
if (c[y] !== x[R]) {
|
|
263
|
+
if (y !== 1 || R !== 1)
|
|
264
|
+
do
|
|
265
|
+
if (y--, R--, R < 0 || c[y] !== x[R]) {
|
|
266
|
+
var D = `
|
|
267
|
+
` + c[y].replace(" at new ", " at ");
|
|
268
|
+
return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, D), D;
|
|
269
|
+
}
|
|
270
|
+
while (y >= 1 && R >= 0);
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
} finally {
|
|
275
|
+
$ = !1, i.current = v, me(), Error.prepareStackTrace = d;
|
|
276
|
+
}
|
|
277
|
+
var G = e ? e.displayName || e.name : "", V = G ? g(G) : "";
|
|
278
|
+
return typeof e == "function" && M.set(e, V), V;
|
|
279
|
+
}
|
|
280
|
+
function Pe(e, t, n) {
|
|
281
|
+
return ne(e, !1);
|
|
282
|
+
}
|
|
283
|
+
function Se(e) {
|
|
284
|
+
var t = e.prototype;
|
|
285
|
+
return !!(t && t.isReactComponent);
|
|
286
|
+
}
|
|
287
|
+
function ye(e, t, n) {
|
|
288
|
+
if (e == null)
|
|
289
|
+
return "";
|
|
290
|
+
if (typeof e == "function")
|
|
291
|
+
return ne(e, Se(e));
|
|
292
|
+
if (typeof e == "string")
|
|
293
|
+
return g(e);
|
|
294
|
+
switch (e) {
|
|
295
|
+
case I:
|
|
296
|
+
return g("Suspense");
|
|
297
|
+
case w:
|
|
298
|
+
return g("SuspenseList");
|
|
299
|
+
}
|
|
300
|
+
if (typeof e == "object")
|
|
301
|
+
switch (e.$$typeof) {
|
|
302
|
+
case u:
|
|
303
|
+
return Pe(e.render);
|
|
304
|
+
case N:
|
|
305
|
+
return ye(e.type, t, n);
|
|
306
|
+
case A: {
|
|
307
|
+
var l = e, d = l._payload, v = l._init;
|
|
308
|
+
try {
|
|
309
|
+
return ye(v(d), t, n);
|
|
310
|
+
} catch {
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return "";
|
|
315
|
+
}
|
|
316
|
+
var ae = Object.prototype.hasOwnProperty, $e = {}, Le = T.ReactDebugCurrentFrame;
|
|
317
|
+
function he(e) {
|
|
318
|
+
if (e) {
|
|
319
|
+
var t = e._owner, n = ye(e.type, e._source, t ? t.type : null);
|
|
320
|
+
Le.setExtraStackFrame(n);
|
|
321
|
+
} else
|
|
322
|
+
Le.setExtraStackFrame(null);
|
|
323
|
+
}
|
|
324
|
+
function it(e, t, n, l, d) {
|
|
325
|
+
{
|
|
326
|
+
var v = Function.call.bind(ae);
|
|
327
|
+
for (var f in e)
|
|
328
|
+
if (v(e, f)) {
|
|
329
|
+
var c = void 0;
|
|
330
|
+
try {
|
|
331
|
+
if (typeof e[f] != "function") {
|
|
332
|
+
var x = Error((l || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
|
+
throw x.name = "Invariant Violation", x;
|
|
334
|
+
}
|
|
335
|
+
c = e[f](t, f, l, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
+
} catch (y) {
|
|
337
|
+
c = y;
|
|
338
|
+
}
|
|
339
|
+
c && !(c instanceof Error) && (he(d), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", n, f, typeof c), he(null)), c instanceof Error && !(c.message in $e) && ($e[c.message] = !0, he(d), C("Failed %s type: %s", n, c.message), he(null));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
var st = Array.isArray;
|
|
344
|
+
function Te(e) {
|
|
345
|
+
return st(e);
|
|
346
|
+
}
|
|
347
|
+
function lt(e) {
|
|
348
|
+
{
|
|
349
|
+
var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
350
|
+
return n;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
function ct(e) {
|
|
354
|
+
try {
|
|
355
|
+
return We(e), !1;
|
|
356
|
+
} catch {
|
|
357
|
+
return !0;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
function We(e) {
|
|
361
|
+
return "" + e;
|
|
362
|
+
}
|
|
363
|
+
function Ye(e) {
|
|
364
|
+
if (ct(e))
|
|
365
|
+
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", lt(e)), We(e);
|
|
366
|
+
}
|
|
367
|
+
var Me = T.ReactCurrentOwner, ut = {
|
|
368
|
+
key: !0,
|
|
369
|
+
ref: !0,
|
|
370
|
+
__self: !0,
|
|
371
|
+
__source: !0
|
|
372
|
+
}, Ve, ze;
|
|
373
|
+
function ft(e) {
|
|
374
|
+
if (ae.call(e, "ref")) {
|
|
375
|
+
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
376
|
+
if (t && t.isReactWarning)
|
|
377
|
+
return !1;
|
|
378
|
+
}
|
|
379
|
+
return e.ref !== void 0;
|
|
380
|
+
}
|
|
381
|
+
function dt(e) {
|
|
382
|
+
if (ae.call(e, "key")) {
|
|
383
|
+
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
384
|
+
if (t && t.isReactWarning)
|
|
385
|
+
return !1;
|
|
386
|
+
}
|
|
387
|
+
return e.key !== void 0;
|
|
388
|
+
}
|
|
389
|
+
function pt(e, t) {
|
|
390
|
+
typeof e.ref == "string" && Me.current;
|
|
391
|
+
}
|
|
392
|
+
function vt(e, t) {
|
|
393
|
+
{
|
|
394
|
+
var n = function() {
|
|
395
|
+
Ve || (Ve = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
396
|
+
};
|
|
397
|
+
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
|
+
get: n,
|
|
399
|
+
configurable: !0
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function _t(e, t) {
|
|
404
|
+
{
|
|
405
|
+
var n = function() {
|
|
406
|
+
ze || (ze = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
|
|
407
|
+
};
|
|
408
|
+
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
|
+
get: n,
|
|
410
|
+
configurable: !0
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
var bt = function(e, t, n, l, d, v, f) {
|
|
415
|
+
var c = {
|
|
416
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
+
$$typeof: a,
|
|
418
|
+
// Built-in properties that belong on the element
|
|
419
|
+
type: e,
|
|
420
|
+
key: t,
|
|
421
|
+
ref: n,
|
|
422
|
+
props: f,
|
|
423
|
+
// Record the component responsible for creating this element.
|
|
424
|
+
_owner: v
|
|
425
|
+
};
|
|
426
|
+
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
427
|
+
configurable: !1,
|
|
428
|
+
enumerable: !1,
|
|
429
|
+
writable: !0,
|
|
430
|
+
value: !1
|
|
431
|
+
}), Object.defineProperty(c, "_self", {
|
|
432
|
+
configurable: !1,
|
|
433
|
+
enumerable: !1,
|
|
434
|
+
writable: !1,
|
|
435
|
+
value: l
|
|
436
|
+
}), Object.defineProperty(c, "_source", {
|
|
437
|
+
configurable: !1,
|
|
438
|
+
enumerable: !1,
|
|
439
|
+
writable: !1,
|
|
440
|
+
value: d
|
|
441
|
+
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
442
|
+
};
|
|
443
|
+
function mt(e, t, n, l, d) {
|
|
444
|
+
{
|
|
445
|
+
var v, f = {}, c = null, x = null;
|
|
446
|
+
n !== void 0 && (Ye(n), c = "" + n), dt(t) && (Ye(t.key), c = "" + t.key), ft(t) && (x = t.ref, pt(t, d));
|
|
447
|
+
for (v in t)
|
|
448
|
+
ae.call(t, v) && !ut.hasOwnProperty(v) && (f[v] = t[v]);
|
|
449
|
+
if (e && e.defaultProps) {
|
|
450
|
+
var y = e.defaultProps;
|
|
451
|
+
for (v in y)
|
|
452
|
+
f[v] === void 0 && (f[v] = y[v]);
|
|
453
|
+
}
|
|
454
|
+
if (c || x) {
|
|
455
|
+
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
+
c && vt(f, R), x && _t(f, R);
|
|
457
|
+
}
|
|
458
|
+
return bt(e, c, x, d, l, Me.current, f);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
var ke = T.ReactCurrentOwner, Ue = T.ReactDebugCurrentFrame;
|
|
462
|
+
function J(e) {
|
|
463
|
+
if (e) {
|
|
464
|
+
var t = e._owner, n = ye(e.type, e._source, t ? t.type : null);
|
|
465
|
+
Ue.setExtraStackFrame(n);
|
|
466
|
+
} else
|
|
467
|
+
Ue.setExtraStackFrame(null);
|
|
468
|
+
}
|
|
469
|
+
var De;
|
|
470
|
+
De = !1;
|
|
471
|
+
function Ne(e) {
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
473
|
+
}
|
|
474
|
+
function He() {
|
|
475
|
+
{
|
|
476
|
+
if (ke.current) {
|
|
477
|
+
var e = F(ke.current.type);
|
|
478
|
+
if (e)
|
|
479
|
+
return `
|
|
480
|
+
|
|
481
|
+
Check the render method of \`` + e + "`.";
|
|
482
|
+
}
|
|
483
|
+
return "";
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
function gt(e) {
|
|
487
|
+
return "";
|
|
488
|
+
}
|
|
489
|
+
var qe = {};
|
|
490
|
+
function yt(e) {
|
|
491
|
+
{
|
|
492
|
+
var t = He();
|
|
493
|
+
if (!t) {
|
|
494
|
+
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
|
+
n && (t = `
|
|
496
|
+
|
|
497
|
+
Check the top-level render call using <` + n + ">.");
|
|
498
|
+
}
|
|
499
|
+
return t;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
function Ke(e, t) {
|
|
503
|
+
{
|
|
504
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
505
|
+
return;
|
|
506
|
+
e._store.validated = !0;
|
|
507
|
+
var n = yt(t);
|
|
508
|
+
if (qe[n])
|
|
509
|
+
return;
|
|
510
|
+
qe[n] = !0;
|
|
511
|
+
var l = "";
|
|
512
|
+
e && e._owner && e._owner !== ke.current && (l = " It was passed a child from " + F(e._owner.type) + "."), J(e), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, l), J(null);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
function Je(e, t) {
|
|
516
|
+
{
|
|
517
|
+
if (typeof e != "object")
|
|
518
|
+
return;
|
|
519
|
+
if (Te(e))
|
|
520
|
+
for (var n = 0; n < e.length; n++) {
|
|
521
|
+
var l = e[n];
|
|
522
|
+
Ne(l) && Ke(l, t);
|
|
523
|
+
}
|
|
524
|
+
else if (Ne(e))
|
|
525
|
+
e._store && (e._store.validated = !0);
|
|
526
|
+
else if (e) {
|
|
527
|
+
var d = H(e);
|
|
528
|
+
if (typeof d == "function" && d !== e.entries)
|
|
529
|
+
for (var v = d.call(e), f; !(f = v.next()).done; )
|
|
530
|
+
Ne(f.value) && Ke(f.value, t);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
function ht(e) {
|
|
535
|
+
{
|
|
536
|
+
var t = e.type;
|
|
537
|
+
if (t == null || typeof t == "string")
|
|
538
|
+
return;
|
|
539
|
+
var n;
|
|
540
|
+
if (typeof t == "function")
|
|
541
|
+
n = t.propTypes;
|
|
542
|
+
else if (typeof t == "object" && (t.$$typeof === u || // Note: Memo only checks outer props here.
|
|
543
|
+
// Inner props are checked in the reconciler.
|
|
544
|
+
t.$$typeof === N))
|
|
545
|
+
n = t.propTypes;
|
|
546
|
+
else
|
|
547
|
+
return;
|
|
548
|
+
if (n) {
|
|
549
|
+
var l = F(t);
|
|
550
|
+
it(n, e.props, "prop", l, e);
|
|
551
|
+
} else if (t.PropTypes !== void 0 && !De) {
|
|
552
|
+
De = !0;
|
|
553
|
+
var d = F(t);
|
|
554
|
+
C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
|
|
555
|
+
}
|
|
556
|
+
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
function Et(e) {
|
|
560
|
+
{
|
|
561
|
+
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
562
|
+
var l = t[n];
|
|
563
|
+
if (l !== "children" && l !== "key") {
|
|
564
|
+
J(e), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), J(null);
|
|
565
|
+
break;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
e.ref !== null && (J(e), C("Invalid attribute `ref` supplied to `React.Fragment`."), J(null));
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
var Ge = {};
|
|
572
|
+
function Xe(e, t, n, l, d, v) {
|
|
573
|
+
{
|
|
574
|
+
var f = ue(e);
|
|
575
|
+
if (!f) {
|
|
576
|
+
var c = "";
|
|
577
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
|
+
var x = gt();
|
|
579
|
+
x ? c += x : c += He();
|
|
580
|
+
var y;
|
|
581
|
+
e === null ? y = "null" : Te(e) ? y = "array" : e !== void 0 && e.$$typeof === a ? (y = "<" + (F(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, c);
|
|
582
|
+
}
|
|
583
|
+
var R = mt(e, t, n, d, v);
|
|
584
|
+
if (R == null)
|
|
585
|
+
return R;
|
|
586
|
+
if (f) {
|
|
587
|
+
var D = t.children;
|
|
588
|
+
if (D !== void 0)
|
|
589
|
+
if (l)
|
|
590
|
+
if (Te(D)) {
|
|
591
|
+
for (var G = 0; G < D.length; G++)
|
|
592
|
+
Je(D[G], e);
|
|
593
|
+
Object.freeze && Object.freeze(D);
|
|
594
|
+
} else
|
|
595
|
+
C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
596
|
+
else
|
|
597
|
+
Je(D, e);
|
|
598
|
+
}
|
|
599
|
+
if (ae.call(t, "key")) {
|
|
600
|
+
var V = F(e), P = Object.keys(t).filter(function(xt) {
|
|
601
|
+
return xt !== "key";
|
|
602
|
+
}), Ie = P.length > 0 ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
+
if (!Ge[V + Ie]) {
|
|
604
|
+
var jt = P.length > 0 ? "{" + P.join(": ..., ") + ": ...}" : "{}";
|
|
605
|
+
C(`A props object containing a "key" prop is being spread into JSX:
|
|
606
|
+
let props = %s;
|
|
607
|
+
<%s {...props} />
|
|
608
|
+
React keys must be passed directly to JSX without using spread:
|
|
609
|
+
let props = %s;
|
|
610
|
+
<%s key={someKey} {...props} />`, Ie, V, jt, V), Ge[V + Ie] = !0;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return e === s ? Et(R) : ht(R), R;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
function wt(e, t, n) {
|
|
617
|
+
return Xe(e, t, n, !0);
|
|
618
|
+
}
|
|
619
|
+
function Rt(e, t, n) {
|
|
620
|
+
return Xe(e, t, n, !1);
|
|
621
|
+
}
|
|
622
|
+
var Ct = Rt, Ot = wt;
|
|
623
|
+
se.Fragment = s, se.jsx = Ct, se.jsxs = Ot;
|
|
624
|
+
})()), se;
|
|
625
|
+
}
|
|
626
|
+
var et;
|
|
627
|
+
function Tt() {
|
|
628
|
+
return et || (et = 1, process.env.NODE_ENV === "production" ? Re.exports = Pt() : Re.exports = St()), Re.exports;
|
|
629
|
+
}
|
|
630
|
+
var m = Tt();
|
|
631
|
+
const kt = "_primaryButton_uyzzr_1", Dt = "_primaryButtonDisabled_uyzzr_34", Nt = "_spinner_uyzzr_42", Fe = {
|
|
632
|
+
primaryButton: kt,
|
|
633
|
+
primaryButtonDisabled: Dt,
|
|
634
|
+
spinner: Nt
|
|
635
|
+
};
|
|
636
|
+
var at = {
|
|
637
|
+
color: void 0,
|
|
638
|
+
size: void 0,
|
|
639
|
+
className: void 0,
|
|
640
|
+
style: void 0,
|
|
641
|
+
attr: void 0
|
|
642
|
+
}, tt = W.createContext && /* @__PURE__ */ W.createContext(at), It = ["attr", "size", "title"];
|
|
643
|
+
function Ft(r, a) {
|
|
644
|
+
if (r == null) return {};
|
|
645
|
+
var o = At(r, a), s, _;
|
|
646
|
+
if (Object.getOwnPropertySymbols) {
|
|
647
|
+
var b = Object.getOwnPropertySymbols(r);
|
|
648
|
+
for (_ = 0; _ < b.length; _++)
|
|
649
|
+
s = b[_], !(a.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(r, s) && (o[s] = r[s]);
|
|
650
|
+
}
|
|
651
|
+
return o;
|
|
652
|
+
}
|
|
653
|
+
function At(r, a) {
|
|
654
|
+
if (r == null) return {};
|
|
655
|
+
var o = {};
|
|
656
|
+
for (var s in r)
|
|
657
|
+
if (Object.prototype.hasOwnProperty.call(r, s)) {
|
|
658
|
+
if (a.indexOf(s) >= 0) continue;
|
|
659
|
+
o[s] = r[s];
|
|
660
|
+
}
|
|
661
|
+
return o;
|
|
662
|
+
}
|
|
663
|
+
function Oe() {
|
|
664
|
+
return Oe = Object.assign ? Object.assign.bind() : function(r) {
|
|
665
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
666
|
+
var o = arguments[a];
|
|
667
|
+
for (var s in o)
|
|
668
|
+
Object.prototype.hasOwnProperty.call(o, s) && (r[s] = o[s]);
|
|
669
|
+
}
|
|
670
|
+
return r;
|
|
671
|
+
}, Oe.apply(this, arguments);
|
|
672
|
+
}
|
|
673
|
+
function rt(r, a) {
|
|
674
|
+
var o = Object.keys(r);
|
|
675
|
+
if (Object.getOwnPropertySymbols) {
|
|
676
|
+
var s = Object.getOwnPropertySymbols(r);
|
|
677
|
+
a && (s = s.filter(function(_) {
|
|
678
|
+
return Object.getOwnPropertyDescriptor(r, _).enumerable;
|
|
679
|
+
})), o.push.apply(o, s);
|
|
680
|
+
}
|
|
681
|
+
return o;
|
|
682
|
+
}
|
|
683
|
+
function je(r) {
|
|
684
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
685
|
+
var o = arguments[a] != null ? arguments[a] : {};
|
|
686
|
+
a % 2 ? rt(Object(o), !0).forEach(function(s) {
|
|
687
|
+
Bt(r, s, o[s]);
|
|
688
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(o)) : rt(Object(o)).forEach(function(s) {
|
|
689
|
+
Object.defineProperty(r, s, Object.getOwnPropertyDescriptor(o, s));
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
return r;
|
|
693
|
+
}
|
|
694
|
+
function Bt(r, a, o) {
|
|
695
|
+
return a = $t(a), a in r ? Object.defineProperty(r, a, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : r[a] = o, r;
|
|
696
|
+
}
|
|
697
|
+
function $t(r) {
|
|
698
|
+
var a = Lt(r, "string");
|
|
699
|
+
return typeof a == "symbol" ? a : a + "";
|
|
700
|
+
}
|
|
701
|
+
function Lt(r, a) {
|
|
702
|
+
if (typeof r != "object" || !r) return r;
|
|
703
|
+
var o = r[Symbol.toPrimitive];
|
|
704
|
+
if (o !== void 0) {
|
|
705
|
+
var s = o.call(r, a);
|
|
706
|
+
if (typeof s != "object") return s;
|
|
707
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
708
|
+
}
|
|
709
|
+
return (a === "string" ? String : Number)(r);
|
|
710
|
+
}
|
|
711
|
+
function ot(r) {
|
|
712
|
+
return r && r.map((a, o) => /* @__PURE__ */ W.createElement(a.tag, je({
|
|
713
|
+
key: o
|
|
714
|
+
}, a.attr), ot(a.child)));
|
|
715
|
+
}
|
|
716
|
+
function Be(r) {
|
|
717
|
+
return (a) => /* @__PURE__ */ W.createElement(Wt, Oe({
|
|
718
|
+
attr: je({}, r.attr)
|
|
719
|
+
}, a), ot(r.child));
|
|
720
|
+
}
|
|
721
|
+
function Wt(r) {
|
|
722
|
+
var a = (o) => {
|
|
723
|
+
var {
|
|
724
|
+
attr: s,
|
|
725
|
+
size: _,
|
|
726
|
+
title: b
|
|
727
|
+
} = r, j = Ft(r, It), E = _ || o.size || "1em", u;
|
|
728
|
+
return o.className && (u = o.className), r.className && (u = (u ? u + " " : "") + r.className), /* @__PURE__ */ W.createElement("svg", Oe({
|
|
729
|
+
stroke: "currentColor",
|
|
730
|
+
fill: "currentColor",
|
|
731
|
+
strokeWidth: "0"
|
|
732
|
+
}, o.attr, s, j, {
|
|
733
|
+
className: u,
|
|
734
|
+
style: je(je({
|
|
735
|
+
color: r.color || o.color
|
|
736
|
+
}, o.style), r.style),
|
|
737
|
+
height: E,
|
|
738
|
+
width: E,
|
|
739
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
740
|
+
}), b && /* @__PURE__ */ W.createElement("title", null, b), r.children);
|
|
741
|
+
};
|
|
742
|
+
return tt !== void 0 ? /* @__PURE__ */ W.createElement(tt.Consumer, null, (o) => a(o)) : a(at);
|
|
743
|
+
}
|
|
744
|
+
function Yt(r) {
|
|
745
|
+
return Be({ attr: { viewBox: "0 0 24 24", fill: "none" }, child: [{ tag: "path", attr: { opacity: "0.2", fillRule: "evenodd", clipRule: "evenodd", d: "M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z", fill: "currentColor" }, child: [] }] })(r);
|
|
746
|
+
}
|
|
747
|
+
const Rr = ({
|
|
748
|
+
children: r,
|
|
749
|
+
disabled: a = !1,
|
|
750
|
+
loading: o = !1,
|
|
751
|
+
onClick: s,
|
|
752
|
+
className: _ = "",
|
|
753
|
+
"data-testid": b,
|
|
754
|
+
...j
|
|
755
|
+
}) => {
|
|
756
|
+
const E = [
|
|
757
|
+
Fe.primaryButton,
|
|
758
|
+
a ? Fe.primaryButtonDisabled : "",
|
|
759
|
+
_
|
|
760
|
+
].filter(Boolean).join(" ");
|
|
761
|
+
return /* @__PURE__ */ m.jsxs(
|
|
762
|
+
"button",
|
|
763
|
+
{
|
|
764
|
+
type: "button",
|
|
765
|
+
className: E,
|
|
766
|
+
disabled: a || o,
|
|
767
|
+
onClick: s,
|
|
768
|
+
"data-testid": b,
|
|
769
|
+
...j,
|
|
770
|
+
children: [
|
|
771
|
+
o && /* @__PURE__ */ m.jsx(Yt, { className: Fe.spinner, size: 12 }),
|
|
772
|
+
r
|
|
773
|
+
]
|
|
774
|
+
}
|
|
775
|
+
);
|
|
776
|
+
}, Mt = "_secondaryButton_1s7ft_1", Vt = "_secondaryButtonDisabled_1s7ft_33", nt = {
|
|
777
|
+
secondaryButton: Mt,
|
|
778
|
+
secondaryButtonDisabled: Vt
|
|
779
|
+
}, Cr = ({
|
|
780
|
+
children: r,
|
|
781
|
+
disabled: a = !1,
|
|
782
|
+
onClick: o,
|
|
783
|
+
className: s = "",
|
|
784
|
+
"data-testid": _,
|
|
785
|
+
...b
|
|
786
|
+
}) => {
|
|
787
|
+
const j = [
|
|
788
|
+
nt.secondaryButton,
|
|
789
|
+
a ? nt.secondaryButtonDisabled : "",
|
|
790
|
+
s
|
|
791
|
+
].filter(Boolean).join(" ");
|
|
792
|
+
return /* @__PURE__ */ m.jsx(
|
|
793
|
+
"button",
|
|
794
|
+
{
|
|
795
|
+
type: "button",
|
|
796
|
+
className: j,
|
|
797
|
+
disabled: a,
|
|
798
|
+
onClick: o,
|
|
799
|
+
"data-testid": _,
|
|
800
|
+
...b,
|
|
801
|
+
children: r
|
|
802
|
+
}
|
|
803
|
+
);
|
|
804
|
+
}, zt = "_tabsContainer_m3c4e_1", Ut = "_tabsHeader_m3c4e_7", Ht = "_tabItem_m3c4e_13", qt = "_tabContent_m3c4e_29", Kt = "_tabLabel_m3c4e_51", Jt = "_tabLine_m3c4e_61", Gt = "_active_m3c4e_68", Xt = "_inactive_m3c4e_76", Zt = "_tabPanels_m3c4e_84", L = {
|
|
805
|
+
tabsContainer: zt,
|
|
806
|
+
tabsHeader: Ut,
|
|
807
|
+
tabItem: Ht,
|
|
808
|
+
tabContent: qt,
|
|
809
|
+
tabLabel: Kt,
|
|
810
|
+
tabLine: Jt,
|
|
811
|
+
active: Gt,
|
|
812
|
+
inactive: Xt,
|
|
813
|
+
tabPanels: Zt
|
|
814
|
+
}, Or = ({
|
|
815
|
+
tabs: r,
|
|
816
|
+
activeTabId: a,
|
|
817
|
+
onTabChange: o,
|
|
818
|
+
className: s = "",
|
|
819
|
+
"data-testid": _,
|
|
820
|
+
...b
|
|
821
|
+
}) => {
|
|
822
|
+
var E;
|
|
823
|
+
const j = [L.tabsContainer, s].filter(Boolean).join(" ");
|
|
824
|
+
return /* @__PURE__ */ m.jsxs("div", { className: j, "data-testid": _, ...b, children: [
|
|
825
|
+
/* @__PURE__ */ m.jsx("div", { className: L.tabsHeader, children: r.map((u) => {
|
|
826
|
+
const I = u.id === a, w = [
|
|
827
|
+
L.tabItem,
|
|
828
|
+
I ? L.active : L.inactive
|
|
829
|
+
].filter(Boolean).join(" ");
|
|
830
|
+
return /* @__PURE__ */ m.jsxs(
|
|
831
|
+
"button",
|
|
832
|
+
{
|
|
833
|
+
type: "button",
|
|
834
|
+
className: w,
|
|
835
|
+
onClick: () => o(u.id),
|
|
836
|
+
"data-testid": `${_}-tab-${u.id}`,
|
|
837
|
+
children: [
|
|
838
|
+
/* @__PURE__ */ m.jsx("div", { className: L.tabContent, children: /* @__PURE__ */ m.jsx("span", { className: L.tabLabel, children: u.label }) }),
|
|
839
|
+
/* @__PURE__ */ m.jsx("div", { className: L.tabLine })
|
|
840
|
+
]
|
|
841
|
+
},
|
|
842
|
+
u.id
|
|
843
|
+
);
|
|
844
|
+
}) }),
|
|
845
|
+
/* @__PURE__ */ m.jsx("div", { className: L.tabPanels, children: (E = r.find((u) => u.id === a)) == null ? void 0 : E.content })
|
|
846
|
+
] });
|
|
847
|
+
};
|
|
848
|
+
function Qt(r) {
|
|
849
|
+
return Be({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "6 9 12 15 18 9" }, child: [] }] })(r);
|
|
850
|
+
}
|
|
851
|
+
function er(r) {
|
|
852
|
+
return Be({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(r);
|
|
853
|
+
}
|
|
854
|
+
const tr = "_dropdown_1tw6u_1", rr = "_label_1tw6u_9", nr = "_required_1tw6u_18", ar = "_trigger_1tw6u_23", or = "_triggerDisabled_1tw6u_47", ir = "_value_1tw6u_56", sr = "_placeholder_1tw6u_64", lr = "_chevron_1tw6u_68", cr = "_open_1tw6u_75", ur = "_panel_1tw6u_99", fr = "_panelClosing_1tw6u_116", dr = "_filterWrapper_1tw6u_120", pr = "_filterInput_1tw6u_127", vr = "_filterIcon_1tw6u_146", _r = "_list_1tw6u_157", br = "_option_1tw6u_166", mr = "_optionSelected_1tw6u_178", gr = "_optionHighlighted_1tw6u_182", yr = "_optionDisabled_1tw6u_186", hr = "_empty_1tw6u_195", Er = "_disabled_1tw6u_202", h = {
|
|
855
|
+
dropdown: tr,
|
|
856
|
+
label: rr,
|
|
857
|
+
required: nr,
|
|
858
|
+
trigger: ar,
|
|
859
|
+
triggerDisabled: or,
|
|
860
|
+
value: ir,
|
|
861
|
+
placeholder: sr,
|
|
862
|
+
chevron: lr,
|
|
863
|
+
open: cr,
|
|
864
|
+
panel: ur,
|
|
865
|
+
panelClosing: fr,
|
|
866
|
+
filterWrapper: dr,
|
|
867
|
+
filterInput: pr,
|
|
868
|
+
filterIcon: vr,
|
|
869
|
+
list: _r,
|
|
870
|
+
option: br,
|
|
871
|
+
optionSelected: mr,
|
|
872
|
+
optionHighlighted: gr,
|
|
873
|
+
optionDisabled: yr,
|
|
874
|
+
empty: hr,
|
|
875
|
+
disabled: Er
|
|
876
|
+
}, Ae = (r, a) => {
|
|
877
|
+
const s = r[a];
|
|
878
|
+
return s != null ? String(s) : "";
|
|
879
|
+
}, Ce = (r, a) => r[a], z = (r, a) => a == null ? !1 : !!r[a], jr = ({
|
|
880
|
+
value: r,
|
|
881
|
+
onChange: a,
|
|
882
|
+
options: o,
|
|
883
|
+
optionLabel: s = "label",
|
|
884
|
+
optionValue: _ = "value",
|
|
885
|
+
optionDisabled: b,
|
|
886
|
+
placeholder: j = "Select",
|
|
887
|
+
filter: E = !1,
|
|
888
|
+
disabled: u = !1,
|
|
889
|
+
required: I = !1,
|
|
890
|
+
label: w,
|
|
891
|
+
inputId: N,
|
|
892
|
+
className: A = "",
|
|
893
|
+
panelClassName: U = "",
|
|
894
|
+
"data-testid": k
|
|
895
|
+
}) => {
|
|
896
|
+
const [S, H] = Ee(!1), [T, C] = Ee(!1), [le, ce] = Ee(""), [q, B] = Ee(0), X = oe(null), xe = oe(null), Z = oe(null), ue = oe(null), Q = oe(!1), ee = o.find(
|
|
897
|
+
(i) => Ce(i, _) === r
|
|
898
|
+
), F = ee ? Ae(ee, s) : "", O = E ? o.filter(
|
|
899
|
+
(i) => Ae(i, s).toLowerCase().includes(le.toLowerCase())
|
|
900
|
+
) : o;
|
|
901
|
+
we(() => {
|
|
902
|
+
S && E && (ce(""), B(0), setTimeout(() => {
|
|
903
|
+
var i;
|
|
904
|
+
return (i = Z.current) == null ? void 0 : i.focus();
|
|
905
|
+
}, 0));
|
|
906
|
+
}, [S, E]), we(() => {
|
|
907
|
+
if (!S) return;
|
|
908
|
+
const i = O.findIndex(
|
|
909
|
+
($) => Ce($, _) === r
|
|
910
|
+
), p = O.findIndex(
|
|
911
|
+
($) => !z($, b)
|
|
912
|
+
), g = i >= 0 && !z(O[i], b);
|
|
913
|
+
B(g ? i : p >= 0 ? p : 0);
|
|
914
|
+
}, [S, r, O, _, b]), we(() => {
|
|
915
|
+
const i = ue.current;
|
|
916
|
+
i != null && i.scrollIntoView && typeof i.scrollIntoView == "function" && i.scrollIntoView({ block: "nearest" });
|
|
917
|
+
}, [q]);
|
|
918
|
+
const K = () => {
|
|
919
|
+
Q.current = !0, C(!0);
|
|
920
|
+
}, fe = (i) => {
|
|
921
|
+
var p;
|
|
922
|
+
(Q.current || (p = i.animationName) != null && p.includes("menuOut")) && (Q.current = !1, H(!1), C(!1));
|
|
923
|
+
};
|
|
924
|
+
we(() => {
|
|
925
|
+
if (!S && !T) return;
|
|
926
|
+
const i = (p) => {
|
|
927
|
+
X.current && !X.current.contains(p.target) && K();
|
|
928
|
+
};
|
|
929
|
+
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
930
|
+
}, [S, T]);
|
|
931
|
+
const de = () => {
|
|
932
|
+
u || H((i) => !i);
|
|
933
|
+
}, te = (i, p) => {
|
|
934
|
+
if (z(i, b)) return;
|
|
935
|
+
const g = Ce(i, _);
|
|
936
|
+
a == null || a({
|
|
937
|
+
value: g ?? null,
|
|
938
|
+
originalEvent: p
|
|
939
|
+
}), K();
|
|
940
|
+
}, pe = (i) => {
|
|
941
|
+
if (!S) {
|
|
942
|
+
(i.key === "Enter" || i.key === " " || i.key === "ArrowDown") && (i.preventDefault(), H(!0));
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
if (i.key === "Escape") {
|
|
946
|
+
i.preventDefault(), K();
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
if (i.key === "ArrowDown") {
|
|
950
|
+
i.preventDefault(), B((p) => {
|
|
951
|
+
for (let g = p + 1; g < O.length; g++)
|
|
952
|
+
if (!z(O[g], b))
|
|
953
|
+
return g;
|
|
954
|
+
return p;
|
|
955
|
+
});
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
if (i.key === "ArrowUp") {
|
|
959
|
+
i.preventDefault(), B((p) => {
|
|
960
|
+
for (let g = p - 1; g >= 0; g--)
|
|
961
|
+
if (!z(O[g], b))
|
|
962
|
+
return g;
|
|
963
|
+
return p;
|
|
964
|
+
});
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
967
|
+
if (i.key === "Enter" && O[q]) {
|
|
968
|
+
i.preventDefault();
|
|
969
|
+
const p = O[q];
|
|
970
|
+
z(p, b) || te(p, i);
|
|
971
|
+
}
|
|
972
|
+
}, ve = [
|
|
973
|
+
h.dropdown,
|
|
974
|
+
u ? h.disabled : "",
|
|
975
|
+
S ? h.open : "",
|
|
976
|
+
A
|
|
977
|
+
].filter(Boolean).join(" "), _e = [
|
|
978
|
+
h.trigger,
|
|
979
|
+
u ? h.triggerDisabled : ""
|
|
980
|
+
].filter(Boolean).join(" "), be = [
|
|
981
|
+
h.panel,
|
|
982
|
+
T ? h.panelClosing : "",
|
|
983
|
+
U
|
|
984
|
+
].filter(Boolean).join(" "), re = N ?? `dropdown-${Math.random().toString(36).slice(2, 9)}`, me = `${re}-panel`;
|
|
985
|
+
return /* @__PURE__ */ m.jsxs("div", { className: ve, ref: X, "data-testid": k, children: [
|
|
986
|
+
w != null && /* @__PURE__ */ m.jsxs("label", { htmlFor: re, className: h.label, children: [
|
|
987
|
+
w,
|
|
988
|
+
I && /* @__PURE__ */ m.jsx("span", { className: h.required, children: "*" })
|
|
989
|
+
] }),
|
|
990
|
+
/* @__PURE__ */ m.jsxs(
|
|
991
|
+
"div",
|
|
992
|
+
{
|
|
993
|
+
id: re,
|
|
994
|
+
role: "combobox",
|
|
995
|
+
"aria-expanded": S || T,
|
|
996
|
+
"aria-haspopup": "listbox",
|
|
997
|
+
"aria-controls": S || T ? me : void 0,
|
|
998
|
+
"aria-disabled": u,
|
|
999
|
+
"aria-label": typeof w == "string" ? w : void 0,
|
|
1000
|
+
tabIndex: u ? -1 : 0,
|
|
1001
|
+
className: _e,
|
|
1002
|
+
onClick: de,
|
|
1003
|
+
onKeyDown: pe,
|
|
1004
|
+
"data-testid": k ? `${k}-trigger` : void 0,
|
|
1005
|
+
children: [
|
|
1006
|
+
/* @__PURE__ */ m.jsx("span", { className: h.value, children: F || /* @__PURE__ */ m.jsx("span", { className: h.placeholder, children: j }) }),
|
|
1007
|
+
/* @__PURE__ */ m.jsx(Qt, { className: h.chevron, "aria-hidden": !0 })
|
|
1008
|
+
]
|
|
1009
|
+
}
|
|
1010
|
+
),
|
|
1011
|
+
(S || T) && /* @__PURE__ */ m.jsxs(
|
|
1012
|
+
"div",
|
|
1013
|
+
{
|
|
1014
|
+
ref: xe,
|
|
1015
|
+
id: me,
|
|
1016
|
+
className: be,
|
|
1017
|
+
role: "presentation",
|
|
1018
|
+
onAnimationEnd: fe,
|
|
1019
|
+
"data-testid": k ? `${k}-panel` : void 0,
|
|
1020
|
+
children: [
|
|
1021
|
+
E && /* @__PURE__ */ m.jsxs("div", { className: h.filterWrapper, children: [
|
|
1022
|
+
/* @__PURE__ */ m.jsx(
|
|
1023
|
+
"input",
|
|
1024
|
+
{
|
|
1025
|
+
ref: Z,
|
|
1026
|
+
type: "text",
|
|
1027
|
+
className: h.filterInput,
|
|
1028
|
+
value: le,
|
|
1029
|
+
onChange: (i) => {
|
|
1030
|
+
ce(i.target.value), B(0);
|
|
1031
|
+
},
|
|
1032
|
+
onKeyDown: (i) => {
|
|
1033
|
+
i.key === "Escape" && H(!1), i.stopPropagation();
|
|
1034
|
+
},
|
|
1035
|
+
placeholder: "Search...",
|
|
1036
|
+
"aria-label": "Filter options",
|
|
1037
|
+
title: "Filter options",
|
|
1038
|
+
"data-testid": k ? `${k}-filter` : void 0
|
|
1039
|
+
}
|
|
1040
|
+
),
|
|
1041
|
+
/* @__PURE__ */ m.jsx(er, { className: h.filterIcon, "aria-hidden": !0 })
|
|
1042
|
+
] }),
|
|
1043
|
+
/* @__PURE__ */ m.jsx("ul", { className: h.list, role: "listbox", "aria-label": "Options", children: O.length === 0 ? /* @__PURE__ */ m.jsx("li", { className: h.empty, children: "No results" }) : O.map((i, p) => {
|
|
1044
|
+
const g = Ce(i, _), $ = Ae(i, s), M = z(i, b), ge = r === g, ne = p === q, Pe = g != null ? String(g) : `option-${p}`;
|
|
1045
|
+
return /* @__PURE__ */ m.jsx(
|
|
1046
|
+
"li",
|
|
1047
|
+
{
|
|
1048
|
+
ref: ne ? ue : void 0,
|
|
1049
|
+
role: "option",
|
|
1050
|
+
"aria-selected": ge,
|
|
1051
|
+
"aria-disabled": M,
|
|
1052
|
+
className: [
|
|
1053
|
+
h.option,
|
|
1054
|
+
ge ? h.optionSelected : "",
|
|
1055
|
+
ne ? h.optionHighlighted : "",
|
|
1056
|
+
M ? h.optionDisabled : ""
|
|
1057
|
+
].filter(Boolean).join(" "),
|
|
1058
|
+
onMouseEnter: () => !M && B(p),
|
|
1059
|
+
onClick: (Se) => te(i, Se),
|
|
1060
|
+
"data-testid": k ? `${k}-option-${p}` : void 0,
|
|
1061
|
+
children: $
|
|
1062
|
+
},
|
|
1063
|
+
Pe
|
|
1064
|
+
);
|
|
1065
|
+
}) })
|
|
1066
|
+
]
|
|
1067
|
+
}
|
|
1068
|
+
)
|
|
1069
|
+
] });
|
|
1070
|
+
};
|
|
1071
|
+
export {
|
|
1072
|
+
jr as Dropdown,
|
|
1073
|
+
Rr as PrimaryButton,
|
|
1074
|
+
Cr as SecondaryButton,
|
|
1075
|
+
Or as Tabs
|
|
1076
|
+
};
|