@emporix/component-library 1.4.3 → 1.5.1

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/index.es.js CHANGED
@@ -1,1292 +1,796 @@
1
- import Q, { useState as je, useRef as ve, useMemo as It, useEffect as Re } from "react";
2
- var De = { exports: {} }, Ce = {};
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 rt;
13
- function Bt() {
14
- if (rt) return Ce;
15
- rt = 1;
16
- var t = Q, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function m(C, c, _) {
18
- var h, T = {}, D = null, q = null;
19
- _ !== void 0 && (D = "" + _), c.key !== void 0 && (D = "" + c.key), c.ref !== void 0 && (q = c.ref);
20
- for (h in c) s.call(c, h) && !b.hasOwnProperty(h) && (T[h] = c[h]);
21
- if (C && C.defaultProps) for (h in c = C.defaultProps, c) T[h] === void 0 && (T[h] = c[h]);
22
- return { $$typeof: n, type: C, key: D, ref: q, props: T, _owner: u.current };
23
- }
24
- return Ce.Fragment = a, Ce.jsx = m, Ce.jsxs = m, Ce;
25
- }
26
- var we = {};
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 nt;
37
- function Nt() {
38
- return nt || (nt = 1, process.env.NODE_ENV !== "production" && (function() {
39
- var t = Q, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), C = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), q = Symbol.for("react.offscreen"), z = Symbol.iterator, w = "@@iterator";
40
- function I(e) {
41
- if (e === null || typeof e != "object")
42
- return null;
43
- var r = z && e[z] || e[w];
44
- return typeof r == "function" ? r : null;
45
- }
46
- var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function d(e) {
48
- {
49
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
50
- i[l - 1] = arguments[l];
51
- N("error", e, i);
52
- }
53
- }
54
- function N(e, r, i) {
55
- {
56
- var l = P.ReactDebugCurrentFrame, g = l.getStackAddendum();
57
- g !== "" && (r += "%s", i = i.concat([g]));
58
- var x = i.map(function(p) {
59
- return String(p);
60
- });
61
- x.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, x);
62
- }
63
- }
64
- var W = !1, j = !1, ee = !1, M = !1, Oe = !1, ie;
65
- ie = Symbol.for("react.module.reference");
66
- function Ee(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === s || e === b || Oe || e === u || e === _ || e === h || M || e === q || W || j || ee || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === T || e.$$typeof === m || e.$$typeof === C || e.$$typeof === c || // 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 === ie || e.getModuleId !== void 0));
72
- }
73
- function oe(e, r, i) {
74
- var l = e.displayName;
75
- if (l)
76
- return l;
77
- var g = r.displayName || r.name || "";
78
- return g !== "" ? i + "(" + g + ")" : i;
79
- }
80
- function H(e) {
81
- return e.displayName || "Context";
82
- }
83
- function V(e) {
84
- if (e == null)
85
- return null;
86
- if (typeof e.tag == "number" && d("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 a:
94
- return "Portal";
95
- case b:
96
- return "Profiler";
97
- case u:
98
- return "StrictMode";
99
- case _:
100
- return "Suspense";
101
- case h:
102
- return "SuspenseList";
103
- }
104
- if (typeof e == "object")
105
- switch (e.$$typeof) {
106
- case C:
107
- var r = e;
108
- return H(r) + ".Consumer";
109
- case m:
110
- var i = e;
111
- return H(i._context) + ".Provider";
112
- case c:
113
- return oe(e, e.render, "ForwardRef");
114
- case T:
115
- var l = e.displayName || null;
116
- return l !== null ? l : V(e.type) || "Memo";
117
- case D: {
118
- var g = e, x = g._payload, p = g._init;
119
- try {
120
- return V(p(x));
121
- } catch {
122
- return null;
123
- }
124
- }
125
- }
126
- return null;
127
- }
128
- var B = Object.assign, J = 0, Pe, ye, Se, me, se, F, le;
129
- function ke() {
130
- }
131
- ke.__reactDisabledLog = !0;
132
- function Te() {
133
- {
134
- if (J === 0) {
135
- Pe = console.log, ye = console.info, Se = console.warn, me = console.error, se = console.group, F = console.groupCollapsed, le = console.groupEnd;
136
- var e = {
137
- configurable: !0,
138
- enumerable: !0,
139
- value: ke,
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
- J++;
153
- }
154
- }
155
- function ge() {
156
- {
157
- if (J--, J === 0) {
158
- var e = {
159
- configurable: !0,
160
- enumerable: !0,
161
- writable: !0
162
- };
163
- Object.defineProperties(console, {
164
- log: B({}, e, {
165
- value: Pe
166
- }),
167
- info: B({}, e, {
168
- value: ye
169
- }),
170
- warn: B({}, e, {
171
- value: Se
172
- }),
173
- error: B({}, e, {
174
- value: me
175
- }),
176
- group: B({}, e, {
177
- value: se
178
- }),
179
- groupCollapsed: B({}, e, {
180
- value: F
181
- }),
182
- groupEnd: B({}, e, {
183
- value: le
184
- })
185
- });
186
- }
187
- J < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
- }
189
- }
190
- var ce = P.ReactCurrentDispatcher, be;
191
- function ue(e, r, i) {
192
- {
193
- if (be === void 0)
194
- try {
195
- throw Error();
196
- } catch (g) {
197
- var l = g.stack.trim().match(/\n( *(at )?)/);
198
- be = l && l[1] || "";
199
- }
200
- return `
201
- ` + be + e;
202
- }
203
- }
204
- var he = !1, G;
205
- {
206
- var xe = typeof WeakMap == "function" ? WeakMap : Map;
207
- G = new xe();
208
- }
209
- function o(e, r) {
210
- if (!e || he)
211
- return "";
212
- {
213
- var i = G.get(e);
214
- if (i !== void 0)
215
- return i;
216
- }
217
- var l;
218
- he = !0;
219
- var g = Error.prepareStackTrace;
220
- Error.prepareStackTrace = void 0;
221
- var x;
222
- x = ce.current, ce.current = null, Te();
223
- try {
224
- if (r) {
225
- var p = function() {
226
- throw Error();
227
- };
228
- if (Object.defineProperty(p.prototype, "props", {
229
- set: function() {
230
- throw Error();
231
- }
232
- }), typeof Reflect == "object" && Reflect.construct) {
233
- try {
234
- Reflect.construct(p, []);
235
- } catch (L) {
236
- l = L;
237
- }
238
- Reflect.construct(e, [], p);
239
- } else {
240
- try {
241
- p.call();
242
- } catch (L) {
243
- l = L;
244
- }
245
- e.call(p.prototype);
246
- }
247
- } else {
248
- try {
249
- throw Error();
250
- } catch (L) {
251
- l = L;
252
- }
253
- e();
254
- }
255
- } catch (L) {
256
- if (L && l && typeof L.stack == "string") {
257
- for (var f = L.stack.split(`
258
- `), $ = l.stack.split(`
259
- `), S = f.length - 1, k = $.length - 1; S >= 1 && k >= 0 && f[S] !== $[k]; )
260
- k--;
261
- for (; S >= 1 && k >= 0; S--, k--)
262
- if (f[S] !== $[k]) {
263
- if (S !== 1 || k !== 1)
264
- do
265
- if (S--, k--, k < 0 || f[S] !== $[k]) {
266
- var Y = `
267
- ` + f[S].replace(" at new ", " at ");
268
- return e.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, Y), Y;
269
- }
270
- while (S >= 1 && k >= 0);
271
- break;
272
- }
273
- }
274
- } finally {
275
- he = !1, ce.current = x, ge(), Error.prepareStackTrace = g;
276
- }
277
- var pe = e ? e.displayName || e.name : "", te = pe ? ue(pe) : "";
278
- return typeof e == "function" && G.set(e, te), te;
279
- }
280
- function y(e, r, i) {
281
- return o(e, !1);
282
- }
283
- function R(e) {
284
- var r = e.prototype;
285
- return !!(r && r.isReactComponent);
286
- }
287
- function O(e, r, i) {
288
- if (e == null)
289
- return "";
290
- if (typeof e == "function")
291
- return o(e, R(e));
292
- if (typeof e == "string")
293
- return ue(e);
294
- switch (e) {
295
- case _:
296
- return ue("Suspense");
297
- case h:
298
- return ue("SuspenseList");
299
- }
300
- if (typeof e == "object")
301
- switch (e.$$typeof) {
302
- case c:
303
- return y(e.render);
304
- case T:
305
- return O(e.type, r, i);
306
- case D: {
307
- var l = e, g = l._payload, x = l._init;
308
- try {
309
- return O(x(g), r, i);
310
- } catch {
311
- }
312
- }
313
- }
314
- return "";
315
- }
316
- var A = Object.prototype.hasOwnProperty, X = {}, U = P.ReactDebugCurrentFrame;
317
- function fe(e) {
318
- if (e) {
319
- var r = e._owner, i = O(e.type, e._source, r ? r.type : null);
320
- U.setExtraStackFrame(i);
321
- } else
322
- U.setExtraStackFrame(null);
323
- }
324
- function $e(e, r, i, l, g) {
325
- {
326
- var x = Function.call.bind(A);
327
- for (var p in e)
328
- if (x(e, p)) {
329
- var f = void 0;
330
- try {
331
- if (typeof e[p] != "function") {
332
- var $ = Error((l || "React class") + ": " + i + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw $.name = "Invariant Violation", $;
334
- }
335
- f = e[p](r, p, l, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (S) {
337
- f = S;
338
- }
339
- f && !(f instanceof Error) && (fe(g), d("%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", i, p, typeof f), fe(null)), f instanceof Error && !(f.message in X) && (X[f.message] = !0, fe(g), d("Failed %s type: %s", i, f.message), fe(null));
340
- }
341
- }
342
- }
343
- var dt = Array.isArray;
344
- function Fe(e) {
345
- return dt(e);
346
- }
347
- function pt(e) {
348
- {
349
- var r = typeof Symbol == "function" && Symbol.toStringTag, i = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
- return i;
351
- }
352
- }
353
- function vt(e) {
354
- try {
355
- return qe(e), !1;
356
- } catch {
357
- return !0;
358
- }
359
- }
360
- function qe(e) {
361
- return "" + e;
362
- }
363
- function ze(e) {
364
- if (vt(e))
365
- return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", pt(e)), qe(e);
366
- }
367
- var Ue = P.ReactCurrentOwner, _t = {
368
- key: !0,
369
- ref: !0,
370
- __self: !0,
371
- __source: !0
372
- }, Ke, He;
373
- function yt(e) {
374
- if (A.call(e, "ref")) {
375
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
- if (r && r.isReactWarning)
377
- return !1;
378
- }
379
- return e.ref !== void 0;
380
- }
381
- function mt(e) {
382
- if (A.call(e, "key")) {
383
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
- if (r && r.isReactWarning)
385
- return !1;
386
- }
387
- return e.key !== void 0;
388
- }
389
- function gt(e, r) {
390
- typeof e.ref == "string" && Ue.current;
391
- }
392
- function bt(e, r) {
393
- {
394
- var i = function() {
395
- Ke || (Ke = !0, d("%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)", r));
396
- };
397
- i.isReactWarning = !0, Object.defineProperty(e, "key", {
398
- get: i,
399
- configurable: !0
400
- });
401
- }
402
- }
403
- function ht(e, r) {
404
- {
405
- var i = function() {
406
- He || (He = !0, d("%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)", r));
407
- };
408
- i.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
- get: i,
410
- configurable: !0
411
- });
412
- }
413
- }
414
- var xt = function(e, r, i, l, g, x, p) {
415
- var f = {
416
- // This tag allows us to uniquely identify this as a React Element
417
- $$typeof: n,
418
- // Built-in properties that belong on the element
419
- type: e,
420
- key: r,
421
- ref: i,
422
- props: p,
423
- // Record the component responsible for creating this element.
424
- _owner: x
425
- };
426
- return f._store = {}, Object.defineProperty(f._store, "validated", {
427
- configurable: !1,
428
- enumerable: !1,
429
- writable: !0,
430
- value: !1
431
- }), Object.defineProperty(f, "_self", {
432
- configurable: !1,
433
- enumerable: !1,
434
- writable: !1,
435
- value: l
436
- }), Object.defineProperty(f, "_source", {
437
- configurable: !1,
438
- enumerable: !1,
439
- writable: !1,
440
- value: g
441
- }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
442
- };
443
- function jt(e, r, i, l, g) {
444
- {
445
- var x, p = {}, f = null, $ = null;
446
- i !== void 0 && (ze(i), f = "" + i), mt(r) && (ze(r.key), f = "" + r.key), yt(r) && ($ = r.ref, gt(r, g));
447
- for (x in r)
448
- A.call(r, x) && !_t.hasOwnProperty(x) && (p[x] = r[x]);
449
- if (e && e.defaultProps) {
450
- var S = e.defaultProps;
451
- for (x in S)
452
- p[x] === void 0 && (p[x] = S[x]);
453
- }
454
- if (f || $) {
455
- var k = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- f && bt(p, k), $ && ht(p, k);
457
- }
458
- return xt(e, f, $, g, l, Ue.current, p);
459
- }
460
- }
461
- var Ae = P.ReactCurrentOwner, Je = P.ReactDebugCurrentFrame;
462
- function de(e) {
463
- if (e) {
464
- var r = e._owner, i = O(e.type, e._source, r ? r.type : null);
465
- Je.setExtraStackFrame(i);
466
- } else
467
- Je.setExtraStackFrame(null);
468
- }
469
- var Le;
470
- Le = !1;
471
- function We(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === n;
473
- }
474
- function Ge() {
475
- {
476
- if (Ae.current) {
477
- var e = V(Ae.current.type);
478
- if (e)
479
- return `
480
-
481
- Check the render method of \`` + e + "`.";
482
- }
483
- return "";
484
- }
485
- }
486
- function Rt(e) {
487
- return "";
488
- }
489
- var Xe = {};
490
- function Ct(e) {
491
- {
492
- var r = Ge();
493
- if (!r) {
494
- var i = typeof e == "string" ? e : e.displayName || e.name;
495
- i && (r = `
496
-
497
- Check the top-level render call using <` + i + ">.");
498
- }
499
- return r;
500
- }
501
- }
502
- function Ze(e, r) {
503
- {
504
- if (!e._store || e._store.validated || e.key != null)
505
- return;
506
- e._store.validated = !0;
507
- var i = Ct(r);
508
- if (Xe[i])
509
- return;
510
- Xe[i] = !0;
511
- var l = "";
512
- e && e._owner && e._owner !== Ae.current && (l = " It was passed a child from " + V(e._owner.type) + "."), de(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, l), de(null);
513
- }
514
- }
515
- function Qe(e, r) {
516
- {
517
- if (typeof e != "object")
518
- return;
519
- if (Fe(e))
520
- for (var i = 0; i < e.length; i++) {
521
- var l = e[i];
522
- We(l) && Ze(l, r);
523
- }
524
- else if (We(e))
525
- e._store && (e._store.validated = !0);
526
- else if (e) {
527
- var g = I(e);
528
- if (typeof g == "function" && g !== e.entries)
529
- for (var x = g.call(e), p; !(p = x.next()).done; )
530
- We(p.value) && Ze(p.value, r);
531
- }
532
- }
533
- }
534
- function wt(e) {
535
- {
536
- var r = e.type;
537
- if (r == null || typeof r == "string")
538
- return;
539
- var i;
540
- if (typeof r == "function")
541
- i = r.propTypes;
542
- else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
543
- // Inner props are checked in the reconciler.
544
- r.$$typeof === T))
545
- i = r.propTypes;
546
- else
547
- return;
548
- if (i) {
549
- var l = V(r);
550
- $e(i, e.props, "prop", l, e);
551
- } else if (r.PropTypes !== void 0 && !Le) {
552
- Le = !0;
553
- var g = V(r);
554
- d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", g || "Unknown");
555
- }
556
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
- }
558
- }
559
- function Ot(e) {
560
- {
561
- for (var r = Object.keys(e.props), i = 0; i < r.length; i++) {
562
- var l = r[i];
563
- if (l !== "children" && l !== "key") {
564
- de(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), de(null);
565
- break;
566
- }
567
- }
568
- e.ref !== null && (de(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
569
- }
570
- }
571
- var et = {};
572
- function tt(e, r, i, l, g, x) {
573
- {
574
- var p = Ee(e);
575
- if (!p) {
576
- var f = "";
577
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " 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 $ = Rt();
579
- $ ? f += $ : f += Ge();
580
- var S;
581
- e === null ? S = "null" : Fe(e) ? S = "array" : e !== void 0 && e.$$typeof === n ? (S = "<" + (V(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : S = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", S, f);
582
- }
583
- var k = jt(e, r, i, g, x);
584
- if (k == null)
585
- return k;
586
- if (p) {
587
- var Y = r.children;
588
- if (Y !== void 0)
589
- if (l)
590
- if (Fe(Y)) {
591
- for (var pe = 0; pe < Y.length; pe++)
592
- Qe(Y[pe], e);
593
- Object.freeze && Object.freeze(Y);
594
- } else
595
- d("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
- Qe(Y, e);
598
- }
599
- if (A.call(r, "key")) {
600
- var te = V(e), L = Object.keys(r).filter(function(Dt) {
601
- return Dt !== "key";
602
- }), Ve = L.length > 0 ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!et[te + Ve]) {
604
- var Tt = L.length > 0 ? "{" + L.join(": ..., ") + ": ...}" : "{}";
605
- d(`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} />`, Ve, te, Tt, te), et[te + Ve] = !0;
611
- }
612
- }
613
- return e === s ? Ot(k) : wt(k), k;
614
- }
615
- }
616
- function Et(e, r, i) {
617
- return tt(e, r, i, !0);
618
- }
619
- function Pt(e, r, i) {
620
- return tt(e, r, i, !1);
621
- }
622
- var St = Pt, kt = Et;
623
- we.Fragment = s, we.jsx = St, we.jsxs = kt;
624
- })()), we;
625
- }
626
- var at;
627
- function $t() {
628
- return at || (at = 1, process.env.NODE_ENV === "production" ? De.exports = Bt() : De.exports = Nt()), De.exports;
629
- }
630
- var v = $t();
631
- const Ft = "_primaryButton_uyzzr_1", At = "_primaryButtonDisabled_uyzzr_34", Lt = "_spinner_uyzzr_42", Me = {
632
- primaryButton: Ft,
633
- primaryButtonDisabled: At,
634
- spinner: Lt
1
+ import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
+ import F, { useState as T, useRef as X, useMemo as me, useEffect as ie, useId as he } from "react";
3
+ const Le = "_primaryButton_uyzzr_1", Ae = "_primaryButtonDisabled_uyzzr_34", qe = "_spinner_uyzzr_42", _e = {
4
+ primaryButton: Le,
5
+ primaryButtonDisabled: Ae,
6
+ spinner: qe
635
7
  };
636
- var ut = {
8
+ var we = {
637
9
  color: void 0,
638
10
  size: void 0,
639
11
  className: void 0,
640
12
  style: void 0,
641
13
  attr: void 0
642
- }, it = Q.createContext && /* @__PURE__ */ Q.createContext(ut), Wt = ["attr", "size", "title"];
643
- function Vt(t, n) {
644
- if (t == null) return {};
645
- var a = Mt(t, n), s, u;
14
+ }, ge = F.createContext && /* @__PURE__ */ F.createContext(we), ze = ["attr", "size", "title"];
15
+ function Fe(e, t) {
16
+ if (e == null) return {};
17
+ var n, o, i = We(e, t);
646
18
  if (Object.getOwnPropertySymbols) {
647
- var b = Object.getOwnPropertySymbols(t);
648
- for (u = 0; u < b.length; u++)
649
- s = b[u], !(n.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(t, s) && (a[s] = t[s]);
19
+ var a = Object.getOwnPropertySymbols(e);
20
+ for (o = 0; o < a.length; o++) n = a[o], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
650
21
  }
651
- return a;
22
+ return i;
652
23
  }
653
- function Mt(t, n) {
654
- if (t == null) return {};
655
- var a = {};
656
- for (var s in t)
657
- if (Object.prototype.hasOwnProperty.call(t, s)) {
658
- if (n.indexOf(s) >= 0) continue;
659
- a[s] = t[s];
660
- }
661
- return a;
24
+ function We(e, t) {
25
+ if (e == null) return {};
26
+ var n = {};
27
+ for (var o in e) if ({}.hasOwnProperty.call(e, o)) {
28
+ if (t.indexOf(o) !== -1) continue;
29
+ n[o] = e[o];
30
+ }
31
+ return n;
662
32
  }
663
- function Ie() {
664
- return Ie = Object.assign ? Object.assign.bind() : function(t) {
665
- for (var n = 1; n < arguments.length; n++) {
666
- var a = arguments[n];
667
- for (var s in a)
668
- Object.prototype.hasOwnProperty.call(a, s) && (t[s] = a[s]);
669
- }
670
- return t;
671
- }, Ie.apply(this, arguments);
33
+ function ue() {
34
+ return ue = Object.assign ? Object.assign.bind() : function(e) {
35
+ for (var t = 1; t < arguments.length; t++) {
36
+ var n = arguments[t];
37
+ for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
38
+ }
39
+ return e;
40
+ }, ue.apply(null, arguments);
672
41
  }
673
- function ot(t, n) {
674
- var a = Object.keys(t);
42
+ function be(e, t) {
43
+ var n = Object.keys(e);
675
44
  if (Object.getOwnPropertySymbols) {
676
- var s = Object.getOwnPropertySymbols(t);
677
- n && (s = s.filter(function(u) {
678
- return Object.getOwnPropertyDescriptor(t, u).enumerable;
679
- })), a.push.apply(a, s);
45
+ var o = Object.getOwnPropertySymbols(e);
46
+ t && (o = o.filter(function(i) {
47
+ return Object.getOwnPropertyDescriptor(e, i).enumerable;
48
+ })), n.push.apply(n, o);
680
49
  }
681
- return a;
50
+ return n;
682
51
  }
683
- function Be(t) {
684
- for (var n = 1; n < arguments.length; n++) {
685
- var a = arguments[n] != null ? arguments[n] : {};
686
- n % 2 ? ot(Object(a), !0).forEach(function(s) {
687
- Yt(t, s, a[s]);
688
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : ot(Object(a)).forEach(function(s) {
689
- Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(a, s));
52
+ function de(e) {
53
+ for (var t = 1; t < arguments.length; t++) {
54
+ var n = arguments[t] != null ? arguments[t] : {};
55
+ t % 2 ? be(Object(n), !0).forEach(function(o) {
56
+ Ee(e, o, n[o]);
57
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : be(Object(n)).forEach(function(o) {
58
+ Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
690
59
  });
691
60
  }
692
- return t;
61
+ return e;
693
62
  }
694
- function Yt(t, n, a) {
695
- return n = qt(n), n in t ? Object.defineProperty(t, n, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = a, t;
63
+ function Ee(e, t, n) {
64
+ return (t = Re(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
696
65
  }
697
- function qt(t) {
698
- var n = zt(t, "string");
699
- return typeof n == "symbol" ? n : n + "";
66
+ function Re(e) {
67
+ var t = Ve(e, "string");
68
+ return typeof t == "symbol" ? t : t + "";
700
69
  }
701
- function zt(t, n) {
702
- if (typeof t != "object" || !t) return t;
703
- var a = t[Symbol.toPrimitive];
704
- if (a !== void 0) {
705
- var s = a.call(t, n);
706
- if (typeof s != "object") return s;
70
+ function Ve(e, t) {
71
+ if (typeof e != "object" || !e) return e;
72
+ var n = e[Symbol.toPrimitive];
73
+ if (n !== void 0) {
74
+ var o = n.call(e, t);
75
+ if (typeof o != "object") return o;
707
76
  throw new TypeError("@@toPrimitive must return a primitive value.");
708
77
  }
709
- return (n === "string" ? String : Number)(t);
78
+ return (t === "string" ? String : Number)(e);
710
79
  }
711
- function ft(t) {
712
- return t && t.map((n, a) => /* @__PURE__ */ Q.createElement(n.tag, Be({
713
- key: a
714
- }, n.attr), ft(n.child)));
80
+ function Ne(e) {
81
+ return e && e.map((t, n) => /* @__PURE__ */ F.createElement(t.tag, de({
82
+ key: n
83
+ }, t.attr), Ne(t.child)));
715
84
  }
716
- function Ne(t) {
717
- return (n) => /* @__PURE__ */ Q.createElement(Ut, Ie({
718
- attr: Be({}, t.attr)
719
- }, n), ft(t.child));
85
+ function se(e) {
86
+ return (t) => /* @__PURE__ */ F.createElement(He, ue({
87
+ attr: de({}, e.attr)
88
+ }, t), Ne(e.child));
720
89
  }
721
- function Ut(t) {
722
- var n = (a) => {
90
+ function He(e) {
91
+ var t = (n) => {
723
92
  var {
724
- attr: s,
725
- size: u,
726
- title: b
727
- } = t, m = Vt(t, Wt), C = u || a.size || "1em", c;
728
- return a.className && (c = a.className), t.className && (c = (c ? c + " " : "") + t.className), /* @__PURE__ */ Q.createElement("svg", Ie({
93
+ attr: o,
94
+ size: i,
95
+ title: a
96
+ } = e, s = Fe(e, ze), b = i || n.size || "1em", l;
97
+ return n.className && (l = n.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ F.createElement("svg", ue({
729
98
  stroke: "currentColor",
730
99
  fill: "currentColor",
731
100
  strokeWidth: "0"
732
- }, a.attr, s, m, {
733
- className: c,
734
- style: Be(Be({
735
- color: t.color || a.color
736
- }, a.style), t.style),
737
- height: C,
738
- width: C,
101
+ }, n.attr, o, s, {
102
+ className: l,
103
+ style: de(de({
104
+ color: e.color || n.color
105
+ }, n.style), e.style),
106
+ height: b,
107
+ width: b,
739
108
  xmlns: "http://www.w3.org/2000/svg"
740
- }), b && /* @__PURE__ */ Q.createElement("title", null, b), t.children);
109
+ }), a && /* @__PURE__ */ F.createElement("title", null, a), e.children);
741
110
  };
742
- return it !== void 0 ? /* @__PURE__ */ Q.createElement(it.Consumer, null, (a) => n(a)) : n(ut);
111
+ return ge !== void 0 ? /* @__PURE__ */ F.createElement(ge.Consumer, null, (n) => t(n)) : t(we);
743
112
  }
744
- function Kt(t) {
745
- return Ne({ 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: [] }] })(t);
113
+ function Ke(e) {
114
+ return se({ 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: [] }] })(e);
746
115
  }
747
- const zr = ({
748
- children: t,
749
- disabled: n = !1,
750
- loading: a = !1,
751
- onClick: s,
752
- className: u = "",
753
- "data-testid": b,
754
- ...m
116
+ const nn = ({
117
+ children: e,
118
+ disabled: t = !1,
119
+ loading: n = !1,
120
+ onClick: o,
121
+ className: i = "",
122
+ "data-testid": a,
123
+ ...s
755
124
  }) => {
756
- const C = [
757
- Me.primaryButton,
758
- n ? Me.primaryButtonDisabled : "",
759
- u
125
+ const b = [
126
+ _e.primaryButton,
127
+ t ? _e.primaryButtonDisabled : "",
128
+ i
760
129
  ].filter(Boolean).join(" ");
761
- return /* @__PURE__ */ v.jsxs(
130
+ return /* @__PURE__ */ I(
762
131
  "button",
763
132
  {
764
133
  type: "button",
765
- className: C,
766
- disabled: n || a,
767
- onClick: s,
768
- "data-testid": b,
769
- ...m,
134
+ className: b,
135
+ disabled: t || n,
136
+ onClick: o,
137
+ "data-testid": a,
138
+ ...s,
770
139
  children: [
771
- a && /* @__PURE__ */ v.jsx(Kt, { className: Me.spinner, size: 12 }),
772
- t
140
+ n && /* @__PURE__ */ u(Ke, { className: _e.spinner, size: 12 }),
141
+ e
773
142
  ]
774
143
  }
775
144
  );
776
- }, Ht = "_secondaryButton_1s7ft_1", Jt = "_secondaryButtonDisabled_1s7ft_33", st = {
777
- secondaryButton: Ht,
778
- secondaryButtonDisabled: Jt
779
- }, Ur = ({
780
- children: t,
781
- disabled: n = !1,
782
- onClick: a,
783
- className: s = "",
784
- "data-testid": u,
785
- ...b
145
+ }, Me = "_secondaryButton_1s7ft_1", Ze = "_secondaryButtonDisabled_1s7ft_33", xe = {
146
+ secondaryButton: Me,
147
+ secondaryButtonDisabled: Ze
148
+ }, rn = ({
149
+ children: e,
150
+ disabled: t = !1,
151
+ onClick: n,
152
+ className: o = "",
153
+ "data-testid": i,
154
+ ...a
786
155
  }) => {
787
- const m = [
788
- st.secondaryButton,
789
- n ? st.secondaryButtonDisabled : "",
790
- s
156
+ const s = [
157
+ xe.secondaryButton,
158
+ t ? xe.secondaryButtonDisabled : "",
159
+ o
791
160
  ].filter(Boolean).join(" ");
792
- return /* @__PURE__ */ v.jsx(
161
+ return /* @__PURE__ */ u(
793
162
  "button",
794
163
  {
795
164
  type: "button",
796
- className: m,
797
- disabled: n,
798
- onClick: a,
799
- "data-testid": u,
800
- ...b,
801
- children: t
165
+ className: s,
166
+ disabled: t,
167
+ onClick: n,
168
+ "data-testid": i,
169
+ ...a,
170
+ children: e
802
171
  }
803
172
  );
804
- }, Gt = "_tabsContainer_m3c4e_1", Xt = "_tabsHeader_m3c4e_7", Zt = "_tabItem_m3c4e_13", Qt = "_tabContent_m3c4e_29", er = "_tabLabel_m3c4e_51", tr = "_tabLine_m3c4e_61", rr = "_active_m3c4e_68", nr = "_inactive_m3c4e_76", ar = "_tabPanels_m3c4e_84", Z = {
805
- tabsContainer: Gt,
806
- tabsHeader: Xt,
807
- tabItem: Zt,
808
- tabContent: Qt,
809
- tabLabel: er,
810
- tabLine: tr,
811
- active: rr,
812
- inactive: nr,
813
- tabPanels: ar
814
- }, Kr = ({
815
- tabs: t,
816
- activeTabId: n,
817
- onTabChange: a,
818
- className: s = "",
819
- "data-testid": u,
820
- ...b
173
+ }, Qe = "_tabsContainer_m3c4e_1", Ge = "_tabsHeader_m3c4e_7", Ue = "_tabItem_m3c4e_13", Je = "_tabContent_m3c4e_29", Xe = "_tabLabel_m3c4e_51", Ye = "_tabLine_m3c4e_61", Te = "_active_m3c4e_68", et = "_inactive_m3c4e_76", tt = "_tabPanels_m3c4e_84", z = {
174
+ tabsContainer: Qe,
175
+ tabsHeader: Ge,
176
+ tabItem: Ue,
177
+ tabContent: Je,
178
+ tabLabel: Xe,
179
+ tabLine: Ye,
180
+ active: Te,
181
+ inactive: et,
182
+ tabPanels: tt
183
+ }, on = ({
184
+ tabs: e,
185
+ activeTabId: t,
186
+ onTabChange: n,
187
+ className: o = "",
188
+ "data-testid": i,
189
+ ...a
821
190
  }) => {
822
- var C;
823
- const m = [Z.tabsContainer, s].filter(Boolean).join(" ");
824
- return /* @__PURE__ */ v.jsxs("div", { className: m, "data-testid": u, ...b, children: [
825
- /* @__PURE__ */ v.jsx("div", { className: Z.tabsHeader, children: t.map((c) => {
826
- const _ = c.id === n, h = [
827
- Z.tabItem,
828
- _ ? Z.active : Z.inactive
191
+ var b;
192
+ const s = [z.tabsContainer, o].filter(Boolean).join(" ");
193
+ return /* @__PURE__ */ I("div", { className: s, "data-testid": i, ...a, children: [
194
+ /* @__PURE__ */ u("div", { className: z.tabsHeader, children: e.map((l) => {
195
+ const f = l.id === t, N = [
196
+ z.tabItem,
197
+ f ? z.active : z.inactive
829
198
  ].filter(Boolean).join(" ");
830
- return /* @__PURE__ */ v.jsxs(
199
+ return /* @__PURE__ */ I(
831
200
  "button",
832
201
  {
833
202
  type: "button",
834
- className: h,
835
- onClick: () => a(c.id),
836
- "data-testid": `${u}-tab-${c.id}`,
203
+ className: N,
204
+ onClick: () => n(l.id),
205
+ "data-testid": `${i}-tab-${l.id}`,
837
206
  children: [
838
- /* @__PURE__ */ v.jsx("div", { className: Z.tabContent, children: /* @__PURE__ */ v.jsx("span", { className: Z.tabLabel, children: c.label }) }),
839
- /* @__PURE__ */ v.jsx("div", { className: Z.tabLine })
207
+ /* @__PURE__ */ u("div", { className: z.tabContent, children: /* @__PURE__ */ u("span", { className: z.tabLabel, children: l.label }) }),
208
+ /* @__PURE__ */ u("div", { className: z.tabLine })
840
209
  ]
841
210
  },
842
- c.id
211
+ l.id
843
212
  );
844
213
  }) }),
845
- /* @__PURE__ */ v.jsx("div", { className: Z.tabPanels, children: (C = t.find((c) => c.id === n)) == null ? void 0 : C.content })
214
+ /* @__PURE__ */ u("div", { className: z.tabPanels, children: (b = e.find((l) => l.id === t)) == null ? void 0 : b.content })
846
215
  ] });
847
216
  };
848
- function ir(t) {
849
- return Ne({ 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: [] }] })(t);
217
+ function nt(e) {
218
+ return se({ 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: [] }] })(e);
850
219
  }
851
- function or(t) {
852
- return Ne({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "10" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "16", x2: "12", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "8", x2: "12.01", y2: "8" }, child: [] }] })(t);
220
+ function rt(e) {
221
+ return se({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "10" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "16", x2: "12", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "8", x2: "12.01", y2: "8" }, child: [] }] })(e);
853
222
  }
854
- function sr(t) {
855
- return Ne({ 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: [] }] })(t);
223
+ function ot(e) {
224
+ return se({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "9 18 15 12 9 6" }, child: [] }] })(e);
856
225
  }
857
- const lr = "_dropdown_1xupi_1", cr = "_label_1xupi_9", ur = "_required_1xupi_18", fr = "_trigger_1xupi_23", dr = "_triggerDisabled_1xupi_47", pr = "_triggerInput_1xupi_56", vr = "_value_1xupi_74", _r = "_placeholder_1xupi_82", yr = "_chevron_1xupi_86", mr = "_open_1xupi_93", gr = "_panel_1xupi_117", br = "_panelClosing_1xupi_134", hr = "_filterWrapper_1xupi_138", xr = "_filterInput_1xupi_145", jr = "_filterIcon_1xupi_164", Rr = "_list_1xupi_175", Cr = "_option_1xupi_184", wr = "_optionSelected_1xupi_196", Or = "_optionHighlighted_1xupi_200", Er = "_optionDisabled_1xupi_204", Pr = "_empty_1xupi_213", Sr = "_disabled_1xupi_220", E = {
858
- dropdown: lr,
859
- label: cr,
860
- required: ur,
861
- trigger: fr,
862
- triggerDisabled: dr,
863
- triggerInput: pr,
864
- value: vr,
865
- placeholder: _r,
866
- chevron: yr,
867
- open: mr,
868
- panel: gr,
869
- panelClosing: br,
870
- filterWrapper: hr,
871
- filterInput: xr,
872
- filterIcon: jr,
873
- list: Rr,
874
- option: Cr,
875
- optionSelected: wr,
876
- optionHighlighted: Or,
877
- optionDisabled: Er,
878
- empty: Pr,
879
- disabled: Sr
880
- }, re = (t, n) => {
881
- const s = t[n];
882
- return s != null ? String(s) : "";
883
- }, _e = (t, n) => t[n], K = (t, n) => n == null ? !1 : !!t[n], Hr = ({
884
- value: t,
885
- onChange: n,
886
- onEditEnd: a,
887
- options: s,
888
- optionLabel: u = "label",
889
- optionValue: b = "value",
890
- optionDisabled: m,
891
- placeholder: C = "Select",
892
- filter: c = !1,
893
- editable: _ = !1,
894
- disabled: h = !1,
895
- required: T = !1,
896
- label: D,
897
- inputId: q,
898
- className: z = "",
899
- panelClassName: w = "",
900
- valueTemplate: I,
901
- itemTemplate: P,
902
- "data-testid": d
226
+ function ke(e) {
227
+ return se({ 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: [] }] })(e);
228
+ }
229
+ const it = "_dropdown_1xupi_1", st = "_label_1xupi_9", lt = "_required_1xupi_18", at = "_trigger_1xupi_23", ct = "_triggerDisabled_1xupi_47", ut = "_triggerInput_1xupi_56", dt = "_value_1xupi_74", pt = "_placeholder_1xupi_82", ft = "_chevron_1xupi_86", _t = "_open_1xupi_93", yt = "_panel_1xupi_117", mt = "_panelClosing_1xupi_134", ht = "_filterWrapper_1xupi_138", vt = "_filterInput_1xupi_145", gt = "_filterIcon_1xupi_164", bt = "_list_1xupi_175", xt = "_option_1xupi_184", Bt = "_optionSelected_1xupi_196", Ct = "_optionHighlighted_1xupi_200", wt = "_optionDisabled_1xupi_204", Nt = "_empty_1xupi_213", kt = "_disabled_1xupi_220", v = {
230
+ dropdown: it,
231
+ label: st,
232
+ required: lt,
233
+ trigger: at,
234
+ triggerDisabled: ct,
235
+ triggerInput: ut,
236
+ value: dt,
237
+ placeholder: pt,
238
+ chevron: ft,
239
+ open: _t,
240
+ panel: yt,
241
+ panelClosing: mt,
242
+ filterWrapper: ht,
243
+ filterInput: vt,
244
+ filterIcon: gt,
245
+ list: bt,
246
+ option: xt,
247
+ optionSelected: Bt,
248
+ optionHighlighted: Ct,
249
+ optionDisabled: wt,
250
+ empty: Nt,
251
+ disabled: kt
252
+ }, K = (e, t) => {
253
+ const o = e[t];
254
+ return o != null ? String(o) : "";
255
+ }, Y = (e, t) => e[t], P = (e, t) => t == null ? !1 : !!e[t], sn = ({
256
+ value: e,
257
+ onChange: t,
258
+ onEditEnd: n,
259
+ options: o,
260
+ optionLabel: i = "label",
261
+ optionValue: a = "value",
262
+ optionDisabled: s,
263
+ placeholder: b = "Select",
264
+ filter: l = !1,
265
+ editable: f = !1,
266
+ disabled: N = !1,
267
+ required: $ = !1,
268
+ label: S,
269
+ inputId: A,
270
+ className: H = "",
271
+ panelClassName: h = "",
272
+ valueTemplate: y,
273
+ itemTemplate: B,
274
+ "data-testid": g
903
275
  }) => {
904
- const N = s.find(
905
- (o) => _e(o, b) === t
906
- ), W = N ? re(N, u) : "", [j, ee] = je(!1), [M, Oe] = je(!1), [ie, Ee] = je(""), [oe, H] = je(W), [V, B] = je(0), J = ve(null), Pe = ve(null), ye = ve(null), Se = ve(null), me = ve(null), se = ve(!1), F = It(
907
- () => c && !_ ? s.filter(
908
- (o) => re(o, u).toLowerCase().includes(ie.toLowerCase())
909
- ) : s,
910
- [c, _, s, u, ie]
276
+ const k = o.find(
277
+ (r) => Y(r, a) === e
278
+ ), w = k ? K(k, i) : "", [c, q] = T(!1), [O, le] = T(!1), [ee, ae] = T(""), [Q, C] = T(w), [_, d] = T(0), D = X(null), W = X(null), E = X(null), G = X(null), U = X(null), te = X(!1), j = me(
279
+ () => l && !f ? o.filter(
280
+ (r) => K(r, i).toLowerCase().includes(ee.toLowerCase())
281
+ ) : o,
282
+ [l, f, o, i, ee]
911
283
  );
912
- Re(() => {
913
- _ && H(W);
914
- }, [_, t, W]), Re(() => {
915
- j && c && !_ && (Ee(""), B(0), setTimeout(() => {
916
- var o;
917
- return (o = ye.current) == null ? void 0 : o.focus();
284
+ ie(() => {
285
+ f && C(w);
286
+ }, [f, e, w]), ie(() => {
287
+ c && l && !f && (ae(""), d(0), setTimeout(() => {
288
+ var r;
289
+ return (r = E.current) == null ? void 0 : r.focus();
918
290
  }, 0));
919
- }, [j, c, _]), Re(() => {
920
- if (!j) return;
921
- const o = F.findIndex(
922
- (O) => _e(O, b) === t
923
- ), y = F.findIndex(
924
- (O) => !K(O, m)
925
- ), R = o >= 0 && !K(F[o], m);
926
- B(R ? o : y >= 0 ? y : 0);
927
- }, [j, t, F, b, m]), Re(() => {
928
- const o = me.current;
929
- o != null && o.scrollIntoView && typeof o.scrollIntoView == "function" && o.scrollIntoView({ block: "nearest" });
930
- }, [V]);
931
- const le = () => {
932
- se.current = !0, Oe(!0);
933
- }, ke = (o) => {
934
- var y;
935
- (se.current || (y = o.animationName) != null && y.includes("menuOut")) && (se.current = !1, ee(!1), Oe(!1), _ && H(W));
291
+ }, [c, l, f]), ie(() => {
292
+ if (!c) return;
293
+ const r = j.findIndex(
294
+ (x) => Y(x, a) === e
295
+ ), p = j.findIndex(
296
+ (x) => !P(x, s)
297
+ ), m = r >= 0 && !P(j[r], s);
298
+ d(m ? r : p >= 0 ? p : 0);
299
+ }, [c, e, j, a, s]), ie(() => {
300
+ const r = U.current;
301
+ r != null && r.scrollIntoView && typeof r.scrollIntoView == "function" && r.scrollIntoView({ block: "nearest" });
302
+ }, [_]);
303
+ const ne = () => {
304
+ te.current = !0, le(!0);
305
+ }, pe = (r) => {
306
+ var p;
307
+ (te.current || (p = r.animationName) != null && p.includes("menuOut")) && (te.current = !1, q(!1), le(!1), f && C(w));
936
308
  };
937
- Re(() => {
938
- if (!j && !M) return;
939
- const o = (y) => {
940
- J.current && !J.current.contains(y.target) && (_ && H(W), le());
309
+ ie(() => {
310
+ if (!c && !O) return;
311
+ const r = (p) => {
312
+ D.current && !D.current.contains(p.target) && (f && C(w), ne());
941
313
  };
942
- return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
943
- }, [j, M, _, W]);
944
- const Te = () => {
945
- h || ee((o) => !o);
946
- }, ge = (o, y) => {
947
- if (K(o, m)) return;
948
- const R = _e(o, b);
949
- _ && H(re(o, u)), n == null || n({
950
- value: R ?? null,
951
- originalEvent: y
952
- }), le();
953
- }, ce = (o) => {
954
- if (!j) {
955
- if (o.key === "Enter" && _ && oe.trim()) {
956
- o.preventDefault();
957
- const y = oe.trim(), R = y.toLowerCase(), O = s.find((X) => {
958
- const U = re(X, u).toLowerCase();
959
- return U === R || U.startsWith(R);
960
- }), A = O && !K(O, m) ? _e(O, b) : null;
961
- O && !K(O, m) && (H(re(O, u)), n == null || n({
962
- value: A,
963
- originalEvent: o
964
- })), a == null || a({
965
- value: y,
966
- selectedValue: A,
967
- originalEvent: o
314
+ return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
315
+ }, [c, O, f, w]);
316
+ const re = () => {
317
+ N || q((r) => !r);
318
+ }, oe = (r, p) => {
319
+ if (P(r, s)) return;
320
+ const m = Y(r, a);
321
+ f && C(K(r, i)), t == null || t({
322
+ value: m ?? null,
323
+ originalEvent: p
324
+ }), ne();
325
+ }, ve = (r) => {
326
+ if (!c) {
327
+ if (r.key === "Enter" && f && Q.trim()) {
328
+ r.preventDefault();
329
+ const p = Q.trim(), m = p.toLowerCase(), x = o.find((J) => {
330
+ const V = K(J, i).toLowerCase();
331
+ return V === m || V.startsWith(m);
332
+ }), R = x && !P(x, s) ? Y(x, a) : null;
333
+ x && !P(x, s) && (C(K(x, i)), t == null || t({
334
+ value: R,
335
+ originalEvent: r
336
+ })), n == null || n({
337
+ value: p,
338
+ selectedValue: R,
339
+ originalEvent: r
968
340
  });
969
341
  return;
970
342
  }
971
- (o.key === "Enter" || o.key === " " || o.key === "ArrowDown") && (o.preventDefault(), ee(!0));
343
+ (r.key === "Enter" || r.key === " " || r.key === "ArrowDown") && (r.preventDefault(), q(!0));
972
344
  return;
973
345
  }
974
- if (o.key === "Escape") {
975
- o.preventDefault(), le();
346
+ if (r.key === "Escape") {
347
+ r.preventDefault(), ne();
976
348
  return;
977
349
  }
978
- if (o.key === "ArrowDown") {
979
- o.preventDefault(), B((y) => {
980
- for (let R = y + 1; R < F.length; R++)
981
- if (!K(F[R], m))
982
- return R;
983
- return y;
350
+ if (r.key === "ArrowDown") {
351
+ r.preventDefault(), d((p) => {
352
+ for (let m = p + 1; m < j.length; m++)
353
+ if (!P(j[m], s))
354
+ return m;
355
+ return p;
984
356
  });
985
357
  return;
986
358
  }
987
- if (o.key === "ArrowUp") {
988
- o.preventDefault(), B((y) => {
989
- for (let R = y - 1; R >= 0; R--)
990
- if (!K(F[R], m))
991
- return R;
992
- return y;
359
+ if (r.key === "ArrowUp") {
360
+ r.preventDefault(), d((p) => {
361
+ for (let m = p - 1; m >= 0; m--)
362
+ if (!P(j[m], s))
363
+ return m;
364
+ return p;
993
365
  });
994
366
  return;
995
367
  }
996
- if (o.key === "Enter") {
997
- if (o.preventDefault(), _) {
998
- const y = oe.trim();
999
- if (y) {
1000
- const R = y.toLowerCase(), O = s.find((X) => {
1001
- const U = re(X, u).toLowerCase();
1002
- return U === R || U.startsWith(R);
1003
- }), A = O && !K(O, m) ? _e(O, b) : null;
1004
- O && !K(O, m) && ge(O, o), a == null || a({
1005
- value: y,
1006
- selectedValue: A,
1007
- originalEvent: o
368
+ if (r.key === "Enter") {
369
+ if (r.preventDefault(), f) {
370
+ const p = Q.trim();
371
+ if (p) {
372
+ const m = p.toLowerCase(), x = o.find((J) => {
373
+ const V = K(J, i).toLowerCase();
374
+ return V === m || V.startsWith(m);
375
+ }), R = x && !P(x, s) ? Y(x, a) : null;
376
+ x && !P(x, s) && oe(x, r), n == null || n({
377
+ value: p,
378
+ selectedValue: R,
379
+ originalEvent: r
1008
380
  });
1009
381
  } else
1010
- a == null || a({ value: "", selectedValue: null, originalEvent: o });
1011
- } else if (F[V]) {
1012
- const y = F[V];
1013
- K(y, m) || ge(y, o);
382
+ n == null || n({ value: "", selectedValue: null, originalEvent: r });
383
+ } else if (j[_]) {
384
+ const p = j[_];
385
+ P(p, s) || oe(p, r);
1014
386
  }
1015
387
  }
1016
- }, be = [
1017
- E.dropdown,
1018
- h ? E.disabled : "",
1019
- j ? E.open : "",
1020
- z
1021
- ].filter(Boolean).join(" "), ue = [
1022
- E.trigger,
1023
- h ? E.triggerDisabled : ""
1024
- ].filter(Boolean).join(" "), he = [
1025
- E.panel,
1026
- M ? E.panelClosing : "",
1027
- w
1028
- ].filter(Boolean).join(" "), G = q ?? `dropdown-${Math.random().toString(36).slice(2, 9)}`, xe = `${G}-panel`;
1029
- return /* @__PURE__ */ v.jsxs("div", { className: be, ref: J, "data-testid": d, children: [
1030
- D != null && /* @__PURE__ */ v.jsxs("label", { htmlFor: G, className: E.label, children: [
1031
- D,
1032
- T && /* @__PURE__ */ v.jsx("span", { className: E.required, children: "*" })
388
+ }, Oe = [
389
+ v.dropdown,
390
+ N ? v.disabled : "",
391
+ c ? v.open : "",
392
+ H
393
+ ].filter(Boolean).join(" "), De = [
394
+ v.trigger,
395
+ N ? v.triggerDisabled : ""
396
+ ].filter(Boolean).join(" "), Ie = [
397
+ v.panel,
398
+ O ? v.panelClosing : "",
399
+ h
400
+ ].filter(Boolean).join(" "), Se = he(), ce = A ?? `dropdown-${Se.replace(/[^a-zA-Z0-9_-]/g, "")}`, fe = `${ce}-panel`;
401
+ return /* @__PURE__ */ I("div", { className: Oe, ref: D, "data-testid": g, children: [
402
+ S != null && /* @__PURE__ */ I("label", { htmlFor: ce, className: v.label, children: [
403
+ S,
404
+ $ && /* @__PURE__ */ u("span", { className: v.required, children: "*" })
1033
405
  ] }),
1034
- /* @__PURE__ */ v.jsxs(
406
+ /* @__PURE__ */ I(
1035
407
  "div",
1036
408
  {
1037
- id: _ ? void 0 : G,
409
+ id: f ? void 0 : ce,
1038
410
  role: "combobox",
1039
- "aria-expanded": j || M,
411
+ "aria-expanded": c || O,
1040
412
  "aria-haspopup": "listbox",
1041
- "aria-controls": j || M ? xe : void 0,
1042
- "aria-disabled": h,
1043
- "aria-label": typeof D == "string" ? D : void 0,
1044
- tabIndex: _ || h ? -1 : 0,
1045
- className: ue,
1046
- onClick: _ ? void 0 : Te,
1047
- onKeyDown: _ ? void 0 : ce,
1048
- "data-testid": d && !_ ? `${d}-trigger` : void 0,
413
+ "aria-controls": c || O ? fe : void 0,
414
+ "aria-disabled": N,
415
+ "aria-label": typeof S == "string" ? S : void 0,
416
+ tabIndex: f || N ? -1 : 0,
417
+ className: De,
418
+ onClick: f ? void 0 : re,
419
+ onKeyDown: f ? void 0 : ve,
420
+ "data-testid": g && !f ? `${g}-trigger` : void 0,
1049
421
  children: [
1050
- _ ? /* @__PURE__ */ v.jsx(
422
+ f ? /* @__PURE__ */ u(
1051
423
  "input",
1052
424
  {
1053
- ref: Se,
1054
- id: G,
425
+ ref: G,
426
+ id: ce,
1055
427
  type: "text",
1056
- className: E.triggerInput,
1057
- value: oe,
1058
- onChange: (o) => {
1059
- H(o.target.value), !j && !M && ee(!0), B(0);
428
+ className: v.triggerInput,
429
+ value: Q,
430
+ onChange: (r) => {
431
+ C(r.target.value), !c && !O && q(!0), d(0);
1060
432
  },
1061
433
  onFocus: () => {
1062
- !h && !j && !M && ee(!0);
434
+ !N && !c && !O && q(!0);
1063
435
  },
1064
- onKeyDown: ce,
1065
- placeholder: C,
1066
- disabled: h,
436
+ onKeyDown: ve,
437
+ placeholder: b,
438
+ disabled: N,
1067
439
  "aria-autocomplete": "list",
1068
- "aria-controls": j || M ? xe : void 0,
1069
- "aria-expanded": j || M,
1070
- "data-testid": d ? `${d}-trigger` : void 0
440
+ "aria-controls": c || O ? fe : void 0,
441
+ "aria-expanded": c || O,
442
+ "data-testid": g ? `${g}-trigger` : void 0
1071
443
  }
1072
- ) : /* @__PURE__ */ v.jsx("span", { className: E.value, children: I ? I(N ?? null) : W || /* @__PURE__ */ v.jsx("span", { className: E.placeholder, children: C }) }),
1073
- /* @__PURE__ */ v.jsx(
1074
- ir,
444
+ ) : /* @__PURE__ */ u("span", { className: v.value, children: y ? y(k ?? null) : w || /* @__PURE__ */ u("span", { className: v.placeholder, children: b }) }),
445
+ /* @__PURE__ */ u(
446
+ ke,
1075
447
  {
1076
- className: E.chevron,
448
+ className: v.chevron,
1077
449
  "aria-hidden": !0,
1078
- onClick: _ ? Te : void 0
450
+ onClick: f ? re : void 0
1079
451
  }
1080
452
  )
1081
453
  ]
1082
454
  }
1083
455
  ),
1084
- (j || M) && /* @__PURE__ */ v.jsxs(
456
+ (c || O) && /* @__PURE__ */ I(
1085
457
  "div",
1086
458
  {
1087
- ref: Pe,
1088
- id: xe,
1089
- className: he,
459
+ ref: W,
460
+ id: fe,
461
+ className: Ie,
1090
462
  role: "presentation",
1091
- onAnimationEnd: ke,
1092
- "data-testid": d ? `${d}-panel` : void 0,
463
+ onAnimationEnd: pe,
464
+ "data-testid": g ? `${g}-panel` : void 0,
1093
465
  children: [
1094
- c && !_ && /* @__PURE__ */ v.jsxs("div", { className: E.filterWrapper, children: [
1095
- /* @__PURE__ */ v.jsx(
466
+ l && !f && /* @__PURE__ */ I("div", { className: v.filterWrapper, children: [
467
+ /* @__PURE__ */ u(
1096
468
  "input",
1097
469
  {
1098
- ref: ye,
470
+ ref: E,
1099
471
  type: "text",
1100
- className: E.filterInput,
1101
- value: ie,
1102
- onChange: (o) => {
1103
- Ee(o.target.value), B(0);
472
+ className: v.filterInput,
473
+ value: ee,
474
+ onChange: (r) => {
475
+ ae(r.target.value), d(0);
1104
476
  },
1105
- onKeyDown: (o) => {
1106
- o.key === "Escape" && ee(!1), o.stopPropagation();
477
+ onKeyDown: (r) => {
478
+ r.key === "Escape" && q(!1), r.stopPropagation();
1107
479
  },
1108
480
  placeholder: "Search...",
1109
481
  "aria-label": "Filter options",
1110
482
  title: "Filter options",
1111
- "data-testid": d ? `${d}-filter` : void 0
483
+ "data-testid": g ? `${g}-filter` : void 0
1112
484
  }
1113
485
  ),
1114
- /* @__PURE__ */ v.jsx(sr, { className: E.filterIcon, "aria-hidden": !0 })
486
+ /* @__PURE__ */ u(nt, { className: v.filterIcon, "aria-hidden": !0 })
1115
487
  ] }),
1116
- /* @__PURE__ */ v.jsx("ul", { className: E.list, role: "listbox", "aria-label": "Options", children: F.length === 0 ? /* @__PURE__ */ v.jsx("li", { className: E.empty, children: "No results" }) : F.map((o, y) => {
1117
- const R = _e(o, b), O = re(o, u), A = K(o, m), X = t === R, U = y === V, fe = R != null ? String(R) : `option-${y}`;
1118
- return /* @__PURE__ */ v.jsx(
488
+ /* @__PURE__ */ u("ul", { className: v.list, role: "listbox", "aria-label": "Options", children: j.length === 0 ? /* @__PURE__ */ u("li", { className: v.empty, children: "No results" }) : j.map((r, p) => {
489
+ const m = Y(r, a), x = K(r, i), R = P(r, s), J = e === m, V = p === _, Pe = m != null ? String(m) : `option-${p}`;
490
+ return /* @__PURE__ */ u(
1119
491
  "li",
1120
492
  {
1121
- ref: U ? me : void 0,
493
+ ref: V ? U : void 0,
1122
494
  role: "option",
1123
- "aria-selected": X,
1124
- "aria-disabled": A,
495
+ "aria-selected": J,
496
+ "aria-disabled": R,
1125
497
  className: [
1126
- E.option,
1127
- X ? E.optionSelected : "",
1128
- U ? E.optionHighlighted : "",
1129
- A ? E.optionDisabled : ""
498
+ v.option,
499
+ J ? v.optionSelected : "",
500
+ V ? v.optionHighlighted : "",
501
+ R ? v.optionDisabled : ""
1130
502
  ].filter(Boolean).join(" "),
1131
- onMouseEnter: () => !A && B(y),
1132
- onClick: ($e) => ge(o, $e),
1133
- "data-testid": d ? `${d}-option-${y}` : void 0,
1134
- children: P ? P(o) : O
503
+ onMouseEnter: () => !R && d(p),
504
+ onClick: ($e) => oe(r, $e),
505
+ "data-testid": g ? `${g}-option-${p}` : void 0,
506
+ children: B ? B(r) : x
1135
507
  },
1136
- fe
508
+ Pe
1137
509
  );
1138
510
  }) })
1139
511
  ]
1140
512
  }
1141
513
  )
1142
514
  ] });
1143
- }, kr = "_inputText_1crp5_1", Tr = "_label_1crp5_9", Dr = "_required_1crp5_20", Ir = "_tooltipIcon_1crp5_25", Br = "_input_1crp5_1", Nr = "_inputTextarea_1crp5_72", $r = "_inputTextDisabled_1crp5_79", ne = {
1144
- inputText: kr,
1145
- label: Tr,
1146
- required: Dr,
1147
- tooltipIcon: Ir,
1148
- input: Br,
1149
- inputTextarea: Nr,
1150
- inputTextDisabled: $r
1151
- }, Jr = ({
1152
- label: t,
1153
- tooltip: n,
1154
- required: a = !1,
1155
- inputId: s,
1156
- textarea: u = !1,
1157
- rows: b,
1158
- className: m = "",
1159
- "data-testid": C,
1160
- disabled: c = !1,
1161
- ..._
515
+ }, jt = "_inputText_1crp5_1", Ot = "_label_1crp5_9", Dt = "_required_1crp5_20", It = "_tooltipIcon_1crp5_25", St = "_input_1crp5_1", Pt = "_inputTextarea_1crp5_72", $t = "_inputTextDisabled_1crp5_79", M = {
516
+ inputText: jt,
517
+ label: Ot,
518
+ required: Dt,
519
+ tooltipIcon: It,
520
+ input: St,
521
+ inputTextarea: Pt,
522
+ inputTextDisabled: $t
523
+ }, ln = ({
524
+ label: e,
525
+ tooltip: t,
526
+ required: n = !1,
527
+ inputId: o,
528
+ textarea: i = !1,
529
+ rows: a,
530
+ className: s = "",
531
+ "data-testid": b,
532
+ disabled: l = !1,
533
+ ...f
1162
534
  }) => {
1163
- const { type: h = "text", ...T } = _, D = s ?? `input-text-${Math.random().toString(36).slice(2, 9)}`, q = [
1164
- ne.inputText,
1165
- c ? ne.inputTextDisabled : "",
1166
- m
1167
- ].filter(Boolean).join(" "), z = T["aria-invalid"];
1168
- let w;
1169
- z === void 0 ? w = void 0 : z === !0 ? w = "true" : z === !1 ? w = "false" : w = z;
1170
- const I = a ? { "aria-required": "true" } : { "aria-required": "false" }, P = w === void 0 ? {} : { "aria-invalid": w }, d = [ne.input, u ? ne.inputTextarea : ""].filter(Boolean).join(" "), N = {
1171
- id: D,
1172
- className: d,
1173
- disabled: c,
1174
- ...I,
1175
- ...P,
1176
- "data-testid": C ? `${C}-input` : void 0
535
+ const { type: N = "text", ...$ } = f, S = he(), A = o || `input-text-${S.replace(/[^a-zA-Z0-9_-]/g, "")}`, H = [
536
+ M.inputText,
537
+ l ? M.inputTextDisabled : "",
538
+ s
539
+ ].filter(Boolean).join(" "), h = $["aria-invalid"];
540
+ let y;
541
+ h === void 0 ? y = void 0 : h === !0 ? y = "true" : h === !1 ? y = "false" : y = h;
542
+ const B = n ? { "aria-required": "true" } : { "aria-required": "false" }, g = y === void 0 ? {} : { "aria-invalid": y }, k = [M.input, i ? M.inputTextarea : ""].filter(Boolean).join(" "), w = {
543
+ id: A,
544
+ className: k,
545
+ disabled: l,
546
+ ...B,
547
+ ...g,
548
+ "data-testid": b ? `${b}-input` : void 0
1177
549
  };
1178
- return /* @__PURE__ */ v.jsxs("div", { className: q, "data-testid": C, children: [
1179
- t != null && /* @__PURE__ */ v.jsxs("label", { htmlFor: D, className: ne.label, children: [
1180
- t,
1181
- a && /* @__PURE__ */ v.jsx("span", { className: ne.required, children: "*" }),
1182
- n != null && /* @__PURE__ */ v.jsx(
550
+ return /* @__PURE__ */ I("div", { className: H, "data-testid": b, children: [
551
+ e != null && /* @__PURE__ */ I("label", { htmlFor: A, className: M.label, children: [
552
+ e,
553
+ n && /* @__PURE__ */ u("span", { className: M.required, children: "*" }),
554
+ t != null && /* @__PURE__ */ u(
1183
555
  "span",
1184
556
  {
1185
- className: ne.tooltipIcon,
1186
- title: n,
1187
- "aria-label": n,
1188
- children: /* @__PURE__ */ v.jsx(or, { "aria-hidden": !0 })
557
+ className: M.tooltipIcon,
558
+ title: t,
559
+ "aria-label": t,
560
+ children: /* @__PURE__ */ u(rt, { "aria-hidden": !0 })
1189
561
  }
1190
562
  )
1191
563
  ] }),
1192
- u ? /* @__PURE__ */ v.jsx(
564
+ i ? /* @__PURE__ */ u(
1193
565
  "textarea",
1194
566
  {
1195
- ...T,
1196
- ...N,
1197
- rows: b ?? 3
567
+ ...$,
568
+ ...w,
569
+ rows: a ?? 3
1198
570
  }
1199
- ) : /* @__PURE__ */ v.jsx("input", { ...T, ...N, type: h })
571
+ ) : /* @__PURE__ */ u("input", { ...$, ...w, type: N })
1200
572
  ] });
1201
- }, Fr = "_selectButton_1u3fo_1", Ar = "_selectButtonDisabled_1u3fo_9", Lr = "_selectButtonInvalid_1u3fo_14", Wr = "_button_1u3fo_14", Vr = "_buttonFirst_1u3fo_47", Mr = "_buttonLast_1u3fo_51", Yr = "_buttonSelected_1u3fo_59", ae = {
1202
- selectButton: Fr,
1203
- selectButtonDisabled: Ar,
1204
- selectButtonInvalid: Lr,
1205
- button: Wr,
1206
- buttonFirst: Vr,
1207
- buttonLast: Mr,
1208
- buttonSelected: Yr
1209
- }, lt = (t, n) => {
1210
- const s = t[n];
1211
- return s != null ? String(s) : "";
1212
- }, Ye = (t, n) => t[n], ct = (t, n) => n == null ? !1 : !!t[n], Gr = ({
1213
- value: t,
1214
- onChange: n,
1215
- options: a,
1216
- optionLabel: s = "label",
1217
- optionValue: u = "value",
1218
- optionDisabled: b,
1219
- multiple: m = !1,
1220
- itemTemplate: C,
1221
- disabled: c = !1,
1222
- invalid: _ = !1,
1223
- className: h = "",
1224
- "data-testid": T
573
+ }, Lt = "_accordion_l1hoq_1", At = "_tab_l1hoq_6", qt = "_headerButton_l1hoq_11", zt = "_headerContent_l1hoq_39", Ft = "_icon_l1hoq_45", Wt = "_panel_l1hoq_53", Et = "_panelCollapsed_l1hoq_58", Rt = "_panelOpen_l1hoq_64", Vt = "_panelContent_l1hoq_70", Ht = "_noBorderLast_l1hoq_74", L = {
574
+ accordion: Lt,
575
+ tab: At,
576
+ headerButton: qt,
577
+ headerContent: zt,
578
+ icon: Ft,
579
+ panel: Wt,
580
+ panelCollapsed: Et,
581
+ panelOpen: Rt,
582
+ panelContent: Vt,
583
+ noBorderLast: Ht
584
+ }, je = (e) => null;
585
+ je.displayName = "AccordionTab";
586
+ const Kt = (e, t) => e == null ? [] : Array.isArray(e) ? t ? e : e.slice(0, 1) : [e], Mt = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), Zt = ({
587
+ activeIndex: e,
588
+ multiple: t = !1,
589
+ expandIcon: n,
590
+ collapseIcon: o,
591
+ onTabChange: i,
592
+ onTabOpen: a,
593
+ onTabClose: s,
594
+ className: b = "",
595
+ transitionOptions: l,
596
+ pt: f,
597
+ ptOptions: N,
598
+ unstyled: $,
599
+ children: S,
600
+ ...A
601
+ }) => {
602
+ const H = he(), h = Mt(H), y = me(() => F.Children.toArray(S).filter(
603
+ (_) => F.isValidElement(_) && _.type === je
604
+ ), [S]), B = e !== void 0, g = me(() => Kt(e, t), [e, t]), [k, w] = T([]), c = B ? g : k, q = typeof l == "object" && l != null && typeof l.timeout == "number" ? l.timeout : void 0, O = /* @__PURE__ */ u(ot, { "aria-hidden": !0 }), le = /* @__PURE__ */ u(ke, { "aria-hidden": !0 }), ee = n ?? O, ae = o ?? le, Q = (C, _) => {
605
+ const d = c.includes(C);
606
+ if (t) {
607
+ const E = d ? c.filter((G) => G !== C) : [...c, C];
608
+ B || w(E), i == null || i({ index: E, originalEvent: _ }), d ? s == null || s({ index: C, originalEvent: _ }) : a == null || a({ index: C, originalEvent: _ });
609
+ return;
610
+ }
611
+ const D = c.length ? c[0] : null, W = d ? [] : [C];
612
+ if (B || w(W), i == null || i({ index: W, originalEvent: _ }), d) {
613
+ s == null || s({ index: C, originalEvent: _ });
614
+ return;
615
+ }
616
+ D != null && (s == null || s({ index: D, originalEvent: _ })), a == null || a({ index: C, originalEvent: _ });
617
+ };
618
+ return /* @__PURE__ */ u(
619
+ "div",
620
+ {
621
+ className: [L.accordion, b].filter(Boolean).join(" "),
622
+ ...A,
623
+ children: y.map((C, _) => {
624
+ var re;
625
+ const d = C.props, D = c.includes(_), W = !!d.disabled, E = `${h}-header-${_}`, G = `${h}-content-${_}`, U = d.headerTemplate != null ? typeof d.headerTemplate == "function" ? d.headerTemplate({
626
+ index: _,
627
+ selected: D,
628
+ disabled: W,
629
+ count: y.length,
630
+ first: _ === 0,
631
+ last: _ === y.length - 1
632
+ }) : d.headerTemplate : d.header, te = D ? ae : ee, j = [
633
+ L.headerButton,
634
+ d.headerClassName ?? ""
635
+ ].filter(Boolean).join(" "), ne = [
636
+ L.tab,
637
+ d.className ?? "",
638
+ _ === y.length - 1 ? L.noBorderLast : ""
639
+ ].filter(Boolean).join(" "), pe = typeof U == "string" ? U : void 0;
640
+ return /* @__PURE__ */ I(
641
+ "div",
642
+ {
643
+ className: ne,
644
+ style: d.style,
645
+ children: [
646
+ /* @__PURE__ */ I(
647
+ "button",
648
+ {
649
+ id: E,
650
+ type: "button",
651
+ disabled: W,
652
+ className: j,
653
+ style: d.headerStyle,
654
+ "aria-controls": G,
655
+ "aria-expanded": D,
656
+ "aria-disabled": W,
657
+ tabIndex: d.tabIndex,
658
+ onClick: (oe) => Q(_, oe),
659
+ ...d.headerProps,
660
+ "aria-label": ((re = d.headerProps) == null ? void 0 : re["aria-label"]) ?? pe,
661
+ children: [
662
+ /* @__PURE__ */ u("span", { className: L.headerContent, children: U }),
663
+ /* @__PURE__ */ u("span", { className: L.icon, "aria-hidden": !0, children: te })
664
+ ]
665
+ }
666
+ ),
667
+ /* @__PURE__ */ u(
668
+ "div",
669
+ {
670
+ id: G,
671
+ role: "region",
672
+ "aria-labelledby": E,
673
+ "aria-hidden": !D,
674
+ className: [
675
+ L.panel,
676
+ D ? L.panelOpen : L.panelCollapsed
677
+ ].join(" "),
678
+ style: {
679
+ transitionDuration: q ? `${q}ms` : void 0
680
+ },
681
+ children: /* @__PURE__ */ u(
682
+ "div",
683
+ {
684
+ className: [
685
+ L.panelContent,
686
+ d.contentClassName ?? ""
687
+ ].filter(Boolean).join(" "),
688
+ style: d.contentStyle,
689
+ children: d.children
690
+ }
691
+ )
692
+ }
693
+ )
694
+ ]
695
+ },
696
+ _
697
+ );
698
+ })
699
+ }
700
+ );
701
+ };
702
+ Zt.displayName = "Accordion";
703
+ const Qt = "_selectButton_1u3fo_1", Gt = "_selectButtonDisabled_1u3fo_9", Ut = "_selectButtonInvalid_1u3fo_14", Jt = "_button_1u3fo_14", Xt = "_buttonFirst_1u3fo_47", Yt = "_buttonLast_1u3fo_51", Tt = "_buttonSelected_1u3fo_59", Z = {
704
+ selectButton: Qt,
705
+ selectButtonDisabled: Gt,
706
+ selectButtonInvalid: Ut,
707
+ button: Jt,
708
+ buttonFirst: Xt,
709
+ buttonLast: Yt,
710
+ buttonSelected: Tt
711
+ }, Be = (e, t) => {
712
+ const o = e[t];
713
+ return o != null ? String(o) : "";
714
+ }, ye = (e, t) => e[t], Ce = (e, t) => t == null ? !1 : !!e[t], an = ({
715
+ value: e,
716
+ onChange: t,
717
+ options: n,
718
+ optionLabel: o = "label",
719
+ optionValue: i = "value",
720
+ optionDisabled: a,
721
+ multiple: s = !1,
722
+ itemTemplate: b,
723
+ disabled: l = !1,
724
+ invalid: f = !1,
725
+ className: N = "",
726
+ "data-testid": $
1225
727
  }) => {
1226
- const D = (w) => {
1227
- const I = Ye(w, u);
1228
- return m && Array.isArray(t) ? t.includes(I) : t === I;
1229
- }, q = (w, I) => {
1230
- if (c || ct(w, b)) return;
1231
- const P = Ye(w, u);
1232
- if (P === void 0) return;
1233
- let d;
1234
- if (m) {
1235
- const N = Array.isArray(t) ? t : [];
1236
- d = N.includes(P) ? N.filter((j) => j !== P) : [...N, P];
728
+ const S = (h) => {
729
+ const y = ye(h, i);
730
+ return s && Array.isArray(e) ? e.includes(y) : e === y;
731
+ }, A = (h, y) => {
732
+ if (l || Ce(h, a)) return;
733
+ const B = ye(h, i);
734
+ if (B === void 0) return;
735
+ let g;
736
+ if (s) {
737
+ const k = Array.isArray(e) ? e : [];
738
+ g = k.includes(B) ? k.filter((c) => c !== B) : [...k, B];
1237
739
  } else
1238
- d = t === P ? null : P;
1239
- n == null || n({
1240
- value: d,
1241
- originalEvent: I
740
+ g = e === B ? null : B;
741
+ t == null || t({
742
+ value: g,
743
+ originalEvent: y
1242
744
  });
1243
- }, z = [
1244
- ae.selectButton,
1245
- c ? ae.selectButtonDisabled : "",
1246
- _ ? ae.selectButtonInvalid : "",
1247
- h
745
+ }, H = [
746
+ Z.selectButton,
747
+ l ? Z.selectButtonDisabled : "",
748
+ f ? Z.selectButtonInvalid : "",
749
+ N
1248
750
  ].filter(Boolean).join(" ");
1249
- return /* @__PURE__ */ v.jsx(
751
+ return /* @__PURE__ */ u(
1250
752
  "div",
1251
753
  {
1252
- className: z,
754
+ className: H,
1253
755
  role: "group",
1254
- "aria-disabled": c,
1255
- "data-testid": T,
1256
- children: a.map((w, I) => {
1257
- const P = Ye(w, u), d = P != null ? String(P) : `option-${I}`, N = ct(w, b), W = D(w);
1258
- return /* @__PURE__ */ v.jsx(
756
+ "aria-disabled": l,
757
+ "data-testid": $,
758
+ children: n.map((h, y) => {
759
+ const B = ye(h, i), g = B != null ? String(B) : `option-${y}`, k = Ce(h, a), w = S(h);
760
+ return /* @__PURE__ */ u(
1259
761
  "button",
1260
762
  {
1261
763
  type: "button",
1262
- "aria-pressed": W,
1263
- "aria-disabled": N || c,
1264
- "aria-label": lt(w, s),
1265
- disabled: c || N,
764
+ "aria-pressed": w,
765
+ "aria-disabled": k || l,
766
+ "aria-label": Be(h, o),
767
+ disabled: l || k,
1266
768
  className: [
1267
- ae.button,
1268
- W ? ae.buttonSelected : "",
1269
- I === 0 ? ae.buttonFirst : "",
1270
- I === a.length - 1 ? ae.buttonLast : ""
769
+ Z.button,
770
+ w ? Z.buttonSelected : "",
771
+ y === 0 ? Z.buttonFirst : "",
772
+ y === n.length - 1 ? Z.buttonLast : ""
1271
773
  ].filter(Boolean).join(" "),
1272
- onClick: (j) => q(w, j),
1273
- onKeyDown: (j) => {
1274
- (j.key === " " || j.key === "Enter") && (j.preventDefault(), q(w, j));
774
+ onClick: (c) => A(h, c),
775
+ onKeyDown: (c) => {
776
+ (c.key === " " || c.key === "Enter") && (c.preventDefault(), A(h, c));
1275
777
  },
1276
- "data-testid": T ? `${T}-option-${I}` : void 0,
1277
- children: C ? C(w) : lt(w, s)
778
+ "data-testid": $ ? `${$}-option-${y}` : void 0,
779
+ children: b ? b(h) : Be(h, o)
1278
780
  },
1279
- d
781
+ g
1280
782
  );
1281
783
  })
1282
784
  }
1283
785
  );
1284
786
  };
1285
787
  export {
1286
- Hr as Dropdown,
1287
- Jr as InputText,
1288
- zr as PrimaryButton,
1289
- Ur as SecondaryButton,
1290
- Gr as SelectButton,
1291
- Kr as Tabs
788
+ Zt as Accordion,
789
+ je as AccordionTab,
790
+ sn as Dropdown,
791
+ ln as InputText,
792
+ nn as PrimaryButton,
793
+ rn as SecondaryButton,
794
+ an as SelectButton,
795
+ on as Tabs
1292
796
  };