@emporix/component-library 1.2.1 → 1.3.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 DELETED
@@ -1,852 +0,0 @@
1
- import w from "react";
2
- var U = { exports: {} }, $ = {};
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 xe;
13
- function hr() {
14
- if (xe) return $;
15
- xe = 1;
16
- var n = w, a = Symbol.for("react.element"), i = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, p = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function R(y, f, T) {
18
- var _, j = {}, S = null, W = null;
19
- T !== void 0 && (S = "" + T), f.key !== void 0 && (S = "" + f.key), f.ref !== void 0 && (W = f.ref);
20
- for (_ in f) s.call(f, _) && !m.hasOwnProperty(_) && (j[_] = f[_]);
21
- if (y && y.defaultProps) for (_ in f = y.defaultProps, f) j[_] === void 0 && (j[_] = f[_]);
22
- return { $$typeof: a, type: y, key: S, ref: W, props: j, _owner: p.current };
23
- }
24
- return $.Fragment = i, $.jsx = R, $.jsxs = R, $;
25
- }
26
- var L = {};
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 Se;
37
- function Er() {
38
- return Se || (Se = 1, process.env.NODE_ENV !== "production" && (function() {
39
- var n = w, a = Symbol.for("react.element"), i = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), y = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), j = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), ne = Symbol.iterator, Ne = "@@iterator";
40
- function $e(e) {
41
- if (e === null || typeof e != "object")
42
- return null;
43
- var r = ne && e[ne] || e[Ne];
44
- return typeof r == "function" ? r : null;
45
- }
46
- var F = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function g(e) {
48
- {
49
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
50
- t[o - 1] = arguments[o];
51
- Le("error", e, t);
52
- }
53
- }
54
- function Le(e, r, t) {
55
- {
56
- var o = F.ReactDebugCurrentFrame, c = o.getStackAddendum();
57
- c !== "" && (r += "%s", t = t.concat([c]));
58
- var d = t.map(function(l) {
59
- return String(l);
60
- });
61
- d.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, d);
62
- }
63
- }
64
- var We = !1, Ye = !1, Me = !1, Ve = !1, ze = !1, ae;
65
- ae = Symbol.for("react.module.reference");
66
- function Ue(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === s || e === m || ze || e === p || e === T || e === _ || Ve || e === W || We || Ye || Me || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === j || e.$$typeof === R || e.$$typeof === y || e.$$typeof === f || // 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 === ae || e.getModuleId !== void 0));
72
- }
73
- function Je(e, r, t) {
74
- var o = e.displayName;
75
- if (o)
76
- return o;
77
- var c = r.displayName || r.name || "";
78
- return c !== "" ? t + "(" + c + ")" : t;
79
- }
80
- function ie(e) {
81
- return e.displayName || "Context";
82
- }
83
- function x(e) {
84
- if (e == null)
85
- return null;
86
- if (typeof e.tag == "number" && g("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 i:
94
- return "Portal";
95
- case m:
96
- return "Profiler";
97
- case p:
98
- return "StrictMode";
99
- case T:
100
- return "Suspense";
101
- case _:
102
- return "SuspenseList";
103
- }
104
- if (typeof e == "object")
105
- switch (e.$$typeof) {
106
- case y:
107
- var r = e;
108
- return ie(r) + ".Consumer";
109
- case R:
110
- var t = e;
111
- return ie(t._context) + ".Provider";
112
- case f:
113
- return Je(e, e.render, "ForwardRef");
114
- case j:
115
- var o = e.displayName || null;
116
- return o !== null ? o : x(e.type) || "Memo";
117
- case S: {
118
- var c = e, d = c._payload, l = c._init;
119
- try {
120
- return x(l(d));
121
- } catch {
122
- return null;
123
- }
124
- }
125
- }
126
- return null;
127
- }
128
- var D = Object.assign, I = 0, oe, se, ue, le, ce, fe, de;
129
- function ve() {
130
- }
131
- ve.__reactDisabledLog = !0;
132
- function qe() {
133
- {
134
- if (I === 0) {
135
- oe = console.log, se = console.info, ue = console.warn, le = console.error, ce = console.group, fe = console.groupCollapsed, de = console.groupEnd;
136
- var e = {
137
- configurable: !0,
138
- enumerable: !0,
139
- value: ve,
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
- I++;
153
- }
154
- }
155
- function Ke() {
156
- {
157
- if (I--, I === 0) {
158
- var e = {
159
- configurable: !0,
160
- enumerable: !0,
161
- writable: !0
162
- };
163
- Object.defineProperties(console, {
164
- log: D({}, e, {
165
- value: oe
166
- }),
167
- info: D({}, e, {
168
- value: se
169
- }),
170
- warn: D({}, e, {
171
- value: ue
172
- }),
173
- error: D({}, e, {
174
- value: le
175
- }),
176
- group: D({}, e, {
177
- value: ce
178
- }),
179
- groupCollapsed: D({}, e, {
180
- value: fe
181
- }),
182
- groupEnd: D({}, e, {
183
- value: de
184
- })
185
- });
186
- }
187
- I < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
- }
189
- }
190
- var K = F.ReactCurrentDispatcher, H;
191
- function Y(e, r, t) {
192
- {
193
- if (H === void 0)
194
- try {
195
- throw Error();
196
- } catch (c) {
197
- var o = c.stack.trim().match(/\n( *(at )?)/);
198
- H = o && o[1] || "";
199
- }
200
- return `
201
- ` + H + e;
202
- }
203
- }
204
- var G = !1, M;
205
- {
206
- var He = typeof WeakMap == "function" ? WeakMap : Map;
207
- M = new He();
208
- }
209
- function pe(e, r) {
210
- if (!e || G)
211
- return "";
212
- {
213
- var t = M.get(e);
214
- if (t !== void 0)
215
- return t;
216
- }
217
- var o;
218
- G = !0;
219
- var c = Error.prepareStackTrace;
220
- Error.prepareStackTrace = void 0;
221
- var d;
222
- d = K.current, K.current = null, qe();
223
- try {
224
- if (r) {
225
- var l = function() {
226
- throw Error();
227
- };
228
- if (Object.defineProperty(l.prototype, "props", {
229
- set: function() {
230
- throw Error();
231
- }
232
- }), typeof Reflect == "object" && Reflect.construct) {
233
- try {
234
- Reflect.construct(l, []);
235
- } catch (E) {
236
- o = E;
237
- }
238
- Reflect.construct(e, [], l);
239
- } else {
240
- try {
241
- l.call();
242
- } catch (E) {
243
- o = E;
244
- }
245
- e.call(l.prototype);
246
- }
247
- } else {
248
- try {
249
- throw Error();
250
- } catch (E) {
251
- o = E;
252
- }
253
- e();
254
- }
255
- } catch (E) {
256
- if (E && o && typeof E.stack == "string") {
257
- for (var u = E.stack.split(`
258
- `), h = o.stack.split(`
259
- `), v = u.length - 1, b = h.length - 1; v >= 1 && b >= 0 && u[v] !== h[b]; )
260
- b--;
261
- for (; v >= 1 && b >= 0; v--, b--)
262
- if (u[v] !== h[b]) {
263
- if (v !== 1 || b !== 1)
264
- do
265
- if (v--, b--, b < 0 || u[v] !== h[b]) {
266
- var O = `
267
- ` + u[v].replace(" at new ", " at ");
268
- return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, O), O;
269
- }
270
- while (v >= 1 && b >= 0);
271
- break;
272
- }
273
- }
274
- } finally {
275
- G = !1, K.current = d, Ke(), Error.prepareStackTrace = c;
276
- }
277
- var B = e ? e.displayName || e.name : "", k = B ? Y(B) : "";
278
- return typeof e == "function" && M.set(e, k), k;
279
- }
280
- function Ge(e, r, t) {
281
- return pe(e, !1);
282
- }
283
- function Xe(e) {
284
- var r = e.prototype;
285
- return !!(r && r.isReactComponent);
286
- }
287
- function V(e, r, t) {
288
- if (e == null)
289
- return "";
290
- if (typeof e == "function")
291
- return pe(e, Xe(e));
292
- if (typeof e == "string")
293
- return Y(e);
294
- switch (e) {
295
- case T:
296
- return Y("Suspense");
297
- case _:
298
- return Y("SuspenseList");
299
- }
300
- if (typeof e == "object")
301
- switch (e.$$typeof) {
302
- case f:
303
- return Ge(e.render);
304
- case j:
305
- return V(e.type, r, t);
306
- case S: {
307
- var o = e, c = o._payload, d = o._init;
308
- try {
309
- return V(d(c), r, t);
310
- } catch {
311
- }
312
- }
313
- }
314
- return "";
315
- }
316
- var N = Object.prototype.hasOwnProperty, be = {}, me = F.ReactDebugCurrentFrame;
317
- function z(e) {
318
- if (e) {
319
- var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
320
- me.setExtraStackFrame(t);
321
- } else
322
- me.setExtraStackFrame(null);
323
- }
324
- function Ze(e, r, t, o, c) {
325
- {
326
- var d = Function.call.bind(N);
327
- for (var l in e)
328
- if (d(e, l)) {
329
- var u = void 0;
330
- try {
331
- if (typeof e[l] != "function") {
332
- var h = Error((o || "React class") + ": " + t + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw h.name = "Invariant Violation", h;
334
- }
335
- u = e[l](r, l, o, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (v) {
337
- u = v;
338
- }
339
- u && !(u instanceof Error) && (z(c), g("%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).", o || "React class", t, l, typeof u), z(null)), u instanceof Error && !(u.message in be) && (be[u.message] = !0, z(c), g("Failed %s type: %s", t, u.message), z(null));
340
- }
341
- }
342
- }
343
- var Qe = Array.isArray;
344
- function X(e) {
345
- return Qe(e);
346
- }
347
- function er(e) {
348
- {
349
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
- return t;
351
- }
352
- }
353
- function rr(e) {
354
- try {
355
- return ye(e), !1;
356
- } catch {
357
- return !0;
358
- }
359
- }
360
- function ye(e) {
361
- return "" + e;
362
- }
363
- function _e(e) {
364
- if (rr(e))
365
- return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), ye(e);
366
- }
367
- var ge = F.ReactCurrentOwner, tr = {
368
- key: !0,
369
- ref: !0,
370
- __self: !0,
371
- __source: !0
372
- }, he, Ee;
373
- function nr(e) {
374
- if (N.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 ar(e) {
382
- if (N.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 ir(e, r) {
390
- typeof e.ref == "string" && ge.current;
391
- }
392
- function or(e, r) {
393
- {
394
- var t = function() {
395
- he || (he = !0, g("%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
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
- get: t,
399
- configurable: !0
400
- });
401
- }
402
- }
403
- function sr(e, r) {
404
- {
405
- var t = function() {
406
- Ee || (Ee = !0, g("%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
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
- get: t,
410
- configurable: !0
411
- });
412
- }
413
- }
414
- var ur = function(e, r, t, o, c, d, l) {
415
- var u = {
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: r,
421
- ref: t,
422
- props: l,
423
- // Record the component responsible for creating this element.
424
- _owner: d
425
- };
426
- return u._store = {}, Object.defineProperty(u._store, "validated", {
427
- configurable: !1,
428
- enumerable: !1,
429
- writable: !0,
430
- value: !1
431
- }), Object.defineProperty(u, "_self", {
432
- configurable: !1,
433
- enumerable: !1,
434
- writable: !1,
435
- value: o
436
- }), Object.defineProperty(u, "_source", {
437
- configurable: !1,
438
- enumerable: !1,
439
- writable: !1,
440
- value: c
441
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
442
- };
443
- function lr(e, r, t, o, c) {
444
- {
445
- var d, l = {}, u = null, h = null;
446
- t !== void 0 && (_e(t), u = "" + t), ar(r) && (_e(r.key), u = "" + r.key), nr(r) && (h = r.ref, ir(r, c));
447
- for (d in r)
448
- N.call(r, d) && !tr.hasOwnProperty(d) && (l[d] = r[d]);
449
- if (e && e.defaultProps) {
450
- var v = e.defaultProps;
451
- for (d in v)
452
- l[d] === void 0 && (l[d] = v[d]);
453
- }
454
- if (u || h) {
455
- var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- u && or(l, b), h && sr(l, b);
457
- }
458
- return ur(e, u, h, c, o, ge.current, l);
459
- }
460
- }
461
- var Z = F.ReactCurrentOwner, Re = F.ReactDebugCurrentFrame;
462
- function A(e) {
463
- if (e) {
464
- var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
465
- Re.setExtraStackFrame(t);
466
- } else
467
- Re.setExtraStackFrame(null);
468
- }
469
- var Q;
470
- Q = !1;
471
- function ee(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === a;
473
- }
474
- function Oe() {
475
- {
476
- if (Z.current) {
477
- var e = x(Z.current.type);
478
- if (e)
479
- return `
480
-
481
- Check the render method of \`` + e + "`.";
482
- }
483
- return "";
484
- }
485
- }
486
- function cr(e) {
487
- return "";
488
- }
489
- var Ce = {};
490
- function fr(e) {
491
- {
492
- var r = Oe();
493
- if (!r) {
494
- var t = typeof e == "string" ? e : e.displayName || e.name;
495
- t && (r = `
496
-
497
- Check the top-level render call using <` + t + ">.");
498
- }
499
- return r;
500
- }
501
- }
502
- function je(e, r) {
503
- {
504
- if (!e._store || e._store.validated || e.key != null)
505
- return;
506
- e._store.validated = !0;
507
- var t = fr(r);
508
- if (Ce[t])
509
- return;
510
- Ce[t] = !0;
511
- var o = "";
512
- e && e._owner && e._owner !== Z.current && (o = " It was passed a child from " + x(e._owner.type) + "."), A(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, o), A(null);
513
- }
514
- }
515
- function Pe(e, r) {
516
- {
517
- if (typeof e != "object")
518
- return;
519
- if (X(e))
520
- for (var t = 0; t < e.length; t++) {
521
- var o = e[t];
522
- ee(o) && je(o, r);
523
- }
524
- else if (ee(e))
525
- e._store && (e._store.validated = !0);
526
- else if (e) {
527
- var c = $e(e);
528
- if (typeof c == "function" && c !== e.entries)
529
- for (var d = c.call(e), l; !(l = d.next()).done; )
530
- ee(l.value) && je(l.value, r);
531
- }
532
- }
533
- }
534
- function dr(e) {
535
- {
536
- var r = e.type;
537
- if (r == null || typeof r == "string")
538
- return;
539
- var t;
540
- if (typeof r == "function")
541
- t = r.propTypes;
542
- else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
543
- // Inner props are checked in the reconciler.
544
- r.$$typeof === j))
545
- t = r.propTypes;
546
- else
547
- return;
548
- if (t) {
549
- var o = x(r);
550
- Ze(t, e.props, "prop", o, e);
551
- } else if (r.PropTypes !== void 0 && !Q) {
552
- Q = !0;
553
- var c = x(r);
554
- g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", c || "Unknown");
555
- }
556
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
- }
558
- }
559
- function vr(e) {
560
- {
561
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
- var o = r[t];
563
- if (o !== "children" && o !== "key") {
564
- A(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), A(null);
565
- break;
566
- }
567
- }
568
- e.ref !== null && (A(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
569
- }
570
- }
571
- var we = {};
572
- function Te(e, r, t, o, c, d) {
573
- {
574
- var l = Ue(e);
575
- if (!l) {
576
- var u = "";
577
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " 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 h = cr();
579
- h ? u += h : u += Oe();
580
- var v;
581
- e === null ? v = "null" : X(e) ? v = "array" : e !== void 0 && e.$$typeof === a ? (v = "<" + (x(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, u);
582
- }
583
- var b = lr(e, r, t, c, d);
584
- if (b == null)
585
- return b;
586
- if (l) {
587
- var O = r.children;
588
- if (O !== void 0)
589
- if (o)
590
- if (X(O)) {
591
- for (var B = 0; B < O.length; B++)
592
- Pe(O[B], e);
593
- Object.freeze && Object.freeze(O);
594
- } else
595
- g("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
- Pe(O, e);
598
- }
599
- if (N.call(r, "key")) {
600
- var k = x(e), E = Object.keys(r).filter(function(gr) {
601
- return gr !== "key";
602
- }), re = E.length > 0 ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!we[k + re]) {
604
- var _r = E.length > 0 ? "{" + E.join(": ..., ") + ": ...}" : "{}";
605
- g(`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} />`, re, k, _r, k), we[k + re] = !0;
611
- }
612
- }
613
- return e === s ? vr(b) : dr(b), b;
614
- }
615
- }
616
- function pr(e, r, t) {
617
- return Te(e, r, t, !0);
618
- }
619
- function br(e, r, t) {
620
- return Te(e, r, t, !1);
621
- }
622
- var mr = br, yr = pr;
623
- L.Fragment = s, L.jsx = mr, L.jsxs = yr;
624
- })()), L;
625
- }
626
- var De;
627
- function Rr() {
628
- return De || (De = 1, process.env.NODE_ENV === "production" ? U.exports = hr() : U.exports = Er()), U.exports;
629
- }
630
- var C = Rr();
631
- const Or = "_primaryButton_uyzzr_1", Cr = "_primaryButtonDisabled_uyzzr_34", jr = "_spinner_uyzzr_42", te = {
632
- primaryButton: Or,
633
- primaryButtonDisabled: Cr,
634
- spinner: jr
635
- };
636
- var Be = {
637
- color: void 0,
638
- size: void 0,
639
- className: void 0,
640
- style: void 0,
641
- attr: void 0
642
- }, ke = w.createContext && /* @__PURE__ */ w.createContext(Be), Pr = ["attr", "size", "title"];
643
- function wr(n, a) {
644
- if (n == null) return {};
645
- var i = Tr(n, a), s, p;
646
- if (Object.getOwnPropertySymbols) {
647
- var m = Object.getOwnPropertySymbols(n);
648
- for (p = 0; p < m.length; p++)
649
- s = m[p], !(a.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(n, s) && (i[s] = n[s]);
650
- }
651
- return i;
652
- }
653
- function Tr(n, a) {
654
- if (n == null) return {};
655
- var i = {};
656
- for (var s in n)
657
- if (Object.prototype.hasOwnProperty.call(n, s)) {
658
- if (a.indexOf(s) >= 0) continue;
659
- i[s] = n[s];
660
- }
661
- return i;
662
- }
663
- function J() {
664
- return J = Object.assign ? Object.assign.bind() : function(n) {
665
- for (var a = 1; a < arguments.length; a++) {
666
- var i = arguments[a];
667
- for (var s in i)
668
- Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
669
- }
670
- return n;
671
- }, J.apply(this, arguments);
672
- }
673
- function Fe(n, a) {
674
- var i = Object.keys(n);
675
- if (Object.getOwnPropertySymbols) {
676
- var s = Object.getOwnPropertySymbols(n);
677
- a && (s = s.filter(function(p) {
678
- return Object.getOwnPropertyDescriptor(n, p).enumerable;
679
- })), i.push.apply(i, s);
680
- }
681
- return i;
682
- }
683
- function q(n) {
684
- for (var a = 1; a < arguments.length; a++) {
685
- var i = arguments[a] != null ? arguments[a] : {};
686
- a % 2 ? Fe(Object(i), !0).forEach(function(s) {
687
- xr(n, s, i[s]);
688
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(i)) : Fe(Object(i)).forEach(function(s) {
689
- Object.defineProperty(n, s, Object.getOwnPropertyDescriptor(i, s));
690
- });
691
- }
692
- return n;
693
- }
694
- function xr(n, a, i) {
695
- return a = Sr(a), a in n ? Object.defineProperty(n, a, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : n[a] = i, n;
696
- }
697
- function Sr(n) {
698
- var a = Dr(n, "string");
699
- return typeof a == "symbol" ? a : a + "";
700
- }
701
- function Dr(n, a) {
702
- if (typeof n != "object" || !n) return n;
703
- var i = n[Symbol.toPrimitive];
704
- if (i !== void 0) {
705
- var s = i.call(n, 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)(n);
710
- }
711
- function Ie(n) {
712
- return n && n.map((a, i) => /* @__PURE__ */ w.createElement(a.tag, q({
713
- key: i
714
- }, a.attr), Ie(a.child)));
715
- }
716
- function kr(n) {
717
- return (a) => /* @__PURE__ */ w.createElement(Fr, J({
718
- attr: q({}, n.attr)
719
- }, a), Ie(n.child));
720
- }
721
- function Fr(n) {
722
- var a = (i) => {
723
- var {
724
- attr: s,
725
- size: p,
726
- title: m
727
- } = n, R = wr(n, Pr), y = p || i.size || "1em", f;
728
- return i.className && (f = i.className), n.className && (f = (f ? f + " " : "") + n.className), /* @__PURE__ */ w.createElement("svg", J({
729
- stroke: "currentColor",
730
- fill: "currentColor",
731
- strokeWidth: "0"
732
- }, i.attr, s, R, {
733
- className: f,
734
- style: q(q({
735
- color: n.color || i.color
736
- }, i.style), n.style),
737
- height: y,
738
- width: y,
739
- xmlns: "http://www.w3.org/2000/svg"
740
- }), m && /* @__PURE__ */ w.createElement("title", null, m), n.children);
741
- };
742
- return ke !== void 0 ? /* @__PURE__ */ w.createElement(ke.Consumer, null, (i) => a(i)) : a(Be);
743
- }
744
- function Ar(n) {
745
- return kr({ 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: [] }] })(n);
746
- }
747
- const qr = ({
748
- children: n,
749
- disabled: a = !1,
750
- loading: i = !1,
751
- onClick: s,
752
- className: p = "",
753
- "data-testid": m,
754
- ...R
755
- }) => {
756
- const y = [
757
- te.primaryButton,
758
- a ? te.primaryButtonDisabled : "",
759
- p
760
- ].filter(Boolean).join(" ");
761
- return /* @__PURE__ */ C.jsxs(
762
- "button",
763
- {
764
- type: "button",
765
- className: y,
766
- disabled: a || i,
767
- onClick: s,
768
- "data-testid": m,
769
- ...R,
770
- children: [
771
- i && /* @__PURE__ */ C.jsx(Ar, { className: te.spinner, size: 12 }),
772
- n
773
- ]
774
- }
775
- );
776
- }, Br = "_secondaryButton_1s7ft_1", Ir = "_secondaryButtonDisabled_1s7ft_33", Ae = {
777
- secondaryButton: Br,
778
- secondaryButtonDisabled: Ir
779
- }, Kr = ({
780
- children: n,
781
- disabled: a = !1,
782
- onClick: i,
783
- className: s = "",
784
- "data-testid": p,
785
- ...m
786
- }) => {
787
- const R = [
788
- Ae.secondaryButton,
789
- a ? Ae.secondaryButtonDisabled : "",
790
- s
791
- ].filter(Boolean).join(" ");
792
- return /* @__PURE__ */ C.jsx(
793
- "button",
794
- {
795
- type: "button",
796
- className: R,
797
- disabled: a,
798
- onClick: i,
799
- "data-testid": p,
800
- ...m,
801
- children: n
802
- }
803
- );
804
- }, Nr = "_tabsContainer_m3c4e_1", $r = "_tabsHeader_m3c4e_7", Lr = "_tabItem_m3c4e_13", Wr = "_tabContent_m3c4e_29", Yr = "_tabLabel_m3c4e_51", Mr = "_tabLine_m3c4e_61", Vr = "_active_m3c4e_68", zr = "_inactive_m3c4e_76", Ur = "_tabPanels_m3c4e_84", P = {
805
- tabsContainer: Nr,
806
- tabsHeader: $r,
807
- tabItem: Lr,
808
- tabContent: Wr,
809
- tabLabel: Yr,
810
- tabLine: Mr,
811
- active: Vr,
812
- inactive: zr,
813
- tabPanels: Ur
814
- }, Hr = ({
815
- tabs: n,
816
- activeTabId: a,
817
- onTabChange: i,
818
- className: s = "",
819
- "data-testid": p,
820
- ...m
821
- }) => {
822
- var y;
823
- const R = [P.tabsContainer, s].filter(Boolean).join(" ");
824
- return /* @__PURE__ */ C.jsxs("div", { className: R, "data-testid": p, ...m, children: [
825
- /* @__PURE__ */ C.jsx("div", { className: P.tabsHeader, children: n.map((f) => {
826
- const T = f.id === a, _ = [
827
- P.tabItem,
828
- T ? P.active : P.inactive
829
- ].filter(Boolean).join(" ");
830
- return /* @__PURE__ */ C.jsxs(
831
- "button",
832
- {
833
- type: "button",
834
- className: _,
835
- onClick: () => i(f.id),
836
- "data-testid": `${p}-tab-${f.id}`,
837
- children: [
838
- /* @__PURE__ */ C.jsx("div", { className: P.tabContent, children: /* @__PURE__ */ C.jsx("span", { className: P.tabLabel, children: f.label }) }),
839
- /* @__PURE__ */ C.jsx("div", { className: P.tabLine })
840
- ]
841
- },
842
- f.id
843
- );
844
- }) }),
845
- /* @__PURE__ */ C.jsx("div", { className: P.tabPanels, children: (y = n.find((f) => f.id === a)) == null ? void 0 : y.content })
846
- ] });
847
- };
848
- export {
849
- qr as PrimaryButton,
850
- Kr as SecondaryButton,
851
- Hr as Tabs
852
- };