@yungu-fed/componentlibrary 0.0.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.
@@ -0,0 +1,793 @@
1
+ import Be, { useState as Le, useRef as We, useEffect as ce } from "react";
2
+ var de = { exports: {} }, V = {};
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 Me;
13
+ function hr() {
14
+ if (Me) return V;
15
+ Me = 1;
16
+ var A = Be, w = Symbol.for("react.element"), j = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, m = A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, S = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function x(k, v, y) {
18
+ var h, C = {}, D = null, F = null;
19
+ y !== void 0 && (D = "" + y), v.key !== void 0 && (D = "" + v.key), v.ref !== void 0 && (F = v.ref);
20
+ for (h in v) d.call(v, h) && !S.hasOwnProperty(h) && (C[h] = v[h]);
21
+ if (k && k.defaultProps) for (h in v = k.defaultProps, v) C[h] === void 0 && (C[h] = v[h]);
22
+ return { $$typeof: w, type: k, key: D, ref: F, props: C, _owner: m.current };
23
+ }
24
+ return V.Fragment = j, V.jsx = x, V.jsxs = x, V;
25
+ }
26
+ var U = {};
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 Ye;
37
+ function _r() {
38
+ return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
39
+ var A = Be, w = Symbol.for("react.element"), j = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), k = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), $ = Symbol.iterator, J = "@@iterator";
40
+ function O(e) {
41
+ if (e === null || typeof e != "object")
42
+ return null;
43
+ var r = $ && e[$] || e[J];
44
+ return typeof r == "function" ? r : null;
45
+ }
46
+ var R = A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function p(e) {
48
+ {
49
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
50
+ t[n - 1] = arguments[n];
51
+ X("error", e, t);
52
+ }
53
+ }
54
+ function X(e, r, t) {
55
+ {
56
+ var n = R.ReactDebugCurrentFrame, s = n.getStackAddendum();
57
+ s !== "" && (r += "%s", t = t.concat([s]));
58
+ var u = t.map(function(i) {
59
+ return String(i);
60
+ });
61
+ u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
62
+ }
63
+ }
64
+ var Z = !1, Q = !1, ee = !1, re = !1, a = !1, l;
65
+ l = Symbol.for("react.module.reference");
66
+ function _(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === d || e === S || a || e === m || e === y || e === h || re || e === F || Z || Q || ee || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === C || e.$$typeof === x || e.$$typeof === k || e.$$typeof === v || // 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 === l || e.getModuleId !== void 0));
72
+ }
73
+ function g(e, r, t) {
74
+ var n = e.displayName;
75
+ if (n)
76
+ return n;
77
+ var s = r.displayName || r.name || "";
78
+ return s !== "" ? t + "(" + s + ")" : t;
79
+ }
80
+ function Y(e) {
81
+ return e.displayName || "Context";
82
+ }
83
+ function P(e) {
84
+ if (e == null)
85
+ return null;
86
+ if (typeof e.tag == "number" && p("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 d:
92
+ return "Fragment";
93
+ case j:
94
+ return "Portal";
95
+ case S:
96
+ return "Profiler";
97
+ case m:
98
+ return "StrictMode";
99
+ case y:
100
+ return "Suspense";
101
+ case h:
102
+ return "SuspenseList";
103
+ }
104
+ if (typeof e == "object")
105
+ switch (e.$$typeof) {
106
+ case k:
107
+ var r = e;
108
+ return Y(r) + ".Consumer";
109
+ case x:
110
+ var t = e;
111
+ return Y(t._context) + ".Provider";
112
+ case v:
113
+ return g(e, e.render, "ForwardRef");
114
+ case C:
115
+ var n = e.displayName || null;
116
+ return n !== null ? n : P(e.type) || "Memo";
117
+ case D: {
118
+ var s = e, u = s._payload, i = s._init;
119
+ try {
120
+ return P(i(u));
121
+ } catch {
122
+ return null;
123
+ }
124
+ }
125
+ }
126
+ return null;
127
+ }
128
+ var I = Object.assign, B = 0, pe, he, _e, ge, ye, be, me;
129
+ function Ee() {
130
+ }
131
+ Ee.__reactDisabledLog = !0;
132
+ function Ne() {
133
+ {
134
+ if (B === 0) {
135
+ pe = console.log, he = console.info, _e = console.warn, ge = console.error, ye = console.group, be = console.groupCollapsed, me = console.groupEnd;
136
+ var e = {
137
+ configurable: !0,
138
+ enumerable: !0,
139
+ value: Ee,
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
+ B++;
153
+ }
154
+ }
155
+ function Ve() {
156
+ {
157
+ if (B--, B === 0) {
158
+ var e = {
159
+ configurable: !0,
160
+ enumerable: !0,
161
+ writable: !0
162
+ };
163
+ Object.defineProperties(console, {
164
+ log: I({}, e, {
165
+ value: pe
166
+ }),
167
+ info: I({}, e, {
168
+ value: he
169
+ }),
170
+ warn: I({}, e, {
171
+ value: _e
172
+ }),
173
+ error: I({}, e, {
174
+ value: ge
175
+ }),
176
+ group: I({}, e, {
177
+ value: ye
178
+ }),
179
+ groupCollapsed: I({}, e, {
180
+ value: be
181
+ }),
182
+ groupEnd: I({}, e, {
183
+ value: me
184
+ })
185
+ });
186
+ }
187
+ B < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
+ }
189
+ }
190
+ var te = R.ReactCurrentDispatcher, ne;
191
+ function K(e, r, t) {
192
+ {
193
+ if (ne === void 0)
194
+ try {
195
+ throw Error();
196
+ } catch (s) {
197
+ var n = s.stack.trim().match(/\n( *(at )?)/);
198
+ ne = n && n[1] || "";
199
+ }
200
+ return `
201
+ ` + ne + e;
202
+ }
203
+ }
204
+ var ae = !1, z;
205
+ {
206
+ var Ue = typeof WeakMap == "function" ? WeakMap : Map;
207
+ z = new Ue();
208
+ }
209
+ function Re(e, r) {
210
+ if (!e || ae)
211
+ return "";
212
+ {
213
+ var t = z.get(e);
214
+ if (t !== void 0)
215
+ return t;
216
+ }
217
+ var n;
218
+ ae = !0;
219
+ var s = Error.prepareStackTrace;
220
+ Error.prepareStackTrace = void 0;
221
+ var u;
222
+ u = te.current, te.current = null, Ne();
223
+ try {
224
+ if (r) {
225
+ var i = function() {
226
+ throw Error();
227
+ };
228
+ if (Object.defineProperty(i.prototype, "props", {
229
+ set: function() {
230
+ throw Error();
231
+ }
232
+ }), typeof Reflect == "object" && Reflect.construct) {
233
+ try {
234
+ Reflect.construct(i, []);
235
+ } catch (E) {
236
+ n = E;
237
+ }
238
+ Reflect.construct(e, [], i);
239
+ } else {
240
+ try {
241
+ i.call();
242
+ } catch (E) {
243
+ n = E;
244
+ }
245
+ e.call(i.prototype);
246
+ }
247
+ } else {
248
+ try {
249
+ throw Error();
250
+ } catch (E) {
251
+ n = E;
252
+ }
253
+ e();
254
+ }
255
+ } catch (E) {
256
+ if (E && n && typeof E.stack == "string") {
257
+ for (var o = E.stack.split(`
258
+ `), b = n.stack.split(`
259
+ `), c = o.length - 1, f = b.length - 1; c >= 1 && f >= 0 && o[c] !== b[f]; )
260
+ f--;
261
+ for (; c >= 1 && f >= 0; c--, f--)
262
+ if (o[c] !== b[f]) {
263
+ if (c !== 1 || f !== 1)
264
+ do
265
+ if (c--, f--, f < 0 || o[c] !== b[f]) {
266
+ var T = `
267
+ ` + o[c].replace(" at new ", " at ");
268
+ return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && z.set(e, T), T;
269
+ }
270
+ while (c >= 1 && f >= 0);
271
+ break;
272
+ }
273
+ }
274
+ } finally {
275
+ ae = !1, te.current = u, Ve(), Error.prepareStackTrace = s;
276
+ }
277
+ var M = e ? e.displayName || e.name : "", L = M ? K(M) : "";
278
+ return typeof e == "function" && z.set(e, L), L;
279
+ }
280
+ function qe(e, r, t) {
281
+ return Re(e, !1);
282
+ }
283
+ function Je(e) {
284
+ var r = e.prototype;
285
+ return !!(r && r.isReactComponent);
286
+ }
287
+ function G(e, r, t) {
288
+ if (e == null)
289
+ return "";
290
+ if (typeof e == "function")
291
+ return Re(e, Je(e));
292
+ if (typeof e == "string")
293
+ return K(e);
294
+ switch (e) {
295
+ case y:
296
+ return K("Suspense");
297
+ case h:
298
+ return K("SuspenseList");
299
+ }
300
+ if (typeof e == "object")
301
+ switch (e.$$typeof) {
302
+ case v:
303
+ return qe(e.render);
304
+ case C:
305
+ return G(e.type, r, t);
306
+ case D: {
307
+ var n = e, s = n._payload, u = n._init;
308
+ try {
309
+ return G(u(s), r, t);
310
+ } catch {
311
+ }
312
+ }
313
+ }
314
+ return "";
315
+ }
316
+ var N = Object.prototype.hasOwnProperty, we = {}, Ce = R.ReactDebugCurrentFrame;
317
+ function H(e) {
318
+ if (e) {
319
+ var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
320
+ Ce.setExtraStackFrame(t);
321
+ } else
322
+ Ce.setExtraStackFrame(null);
323
+ }
324
+ function Ke(e, r, t, n, s) {
325
+ {
326
+ var u = Function.call.bind(N);
327
+ for (var i in e)
328
+ if (u(e, i)) {
329
+ var o = void 0;
330
+ try {
331
+ if (typeof e[i] != "function") {
332
+ var b = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw b.name = "Invariant Violation", b;
334
+ }
335
+ o = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
+ } catch (c) {
337
+ o = c;
338
+ }
339
+ o && !(o instanceof Error) && (H(s), p("%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).", n || "React class", t, i, typeof o), H(null)), o instanceof Error && !(o.message in we) && (we[o.message] = !0, H(s), p("Failed %s type: %s", t, o.message), H(null));
340
+ }
341
+ }
342
+ }
343
+ var ze = Array.isArray;
344
+ function oe(e) {
345
+ return ze(e);
346
+ }
347
+ function Ge(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 He(e) {
354
+ try {
355
+ return Te(e), !1;
356
+ } catch {
357
+ return !0;
358
+ }
359
+ }
360
+ function Te(e) {
361
+ return "" + e;
362
+ }
363
+ function je(e) {
364
+ if (He(e))
365
+ return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(e)), Te(e);
366
+ }
367
+ var ke = R.ReactCurrentOwner, Xe = {
368
+ key: !0,
369
+ ref: !0,
370
+ __self: !0,
371
+ __source: !0
372
+ }, Oe, Pe;
373
+ function Ze(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 Qe(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 er(e, r) {
390
+ typeof e.ref == "string" && ke.current;
391
+ }
392
+ function rr(e, r) {
393
+ {
394
+ var t = function() {
395
+ Oe || (Oe = !0, p("%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 tr(e, r) {
404
+ {
405
+ var t = function() {
406
+ Pe || (Pe = !0, p("%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 nr = function(e, r, t, n, s, u, i) {
415
+ var o = {
416
+ // This tag allows us to uniquely identify this as a React Element
417
+ $$typeof: w,
418
+ // Built-in properties that belong on the element
419
+ type: e,
420
+ key: r,
421
+ ref: t,
422
+ props: i,
423
+ // Record the component responsible for creating this element.
424
+ _owner: u
425
+ };
426
+ return o._store = {}, Object.defineProperty(o._store, "validated", {
427
+ configurable: !1,
428
+ enumerable: !1,
429
+ writable: !0,
430
+ value: !1
431
+ }), Object.defineProperty(o, "_self", {
432
+ configurable: !1,
433
+ enumerable: !1,
434
+ writable: !1,
435
+ value: n
436
+ }), Object.defineProperty(o, "_source", {
437
+ configurable: !1,
438
+ enumerable: !1,
439
+ writable: !1,
440
+ value: s
441
+ }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
442
+ };
443
+ function ar(e, r, t, n, s) {
444
+ {
445
+ var u, i = {}, o = null, b = null;
446
+ t !== void 0 && (je(t), o = "" + t), Qe(r) && (je(r.key), o = "" + r.key), Ze(r) && (b = r.ref, er(r, s));
447
+ for (u in r)
448
+ N.call(r, u) && !Xe.hasOwnProperty(u) && (i[u] = r[u]);
449
+ if (e && e.defaultProps) {
450
+ var c = e.defaultProps;
451
+ for (u in c)
452
+ i[u] === void 0 && (i[u] = c[u]);
453
+ }
454
+ if (o || b) {
455
+ var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ o && rr(i, f), b && tr(i, f);
457
+ }
458
+ return nr(e, o, b, s, n, ke.current, i);
459
+ }
460
+ }
461
+ var ie = R.ReactCurrentOwner, Se = R.ReactDebugCurrentFrame;
462
+ function W(e) {
463
+ if (e) {
464
+ var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
465
+ Se.setExtraStackFrame(t);
466
+ } else
467
+ Se.setExtraStackFrame(null);
468
+ }
469
+ var se;
470
+ se = !1;
471
+ function ue(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === w;
473
+ }
474
+ function xe() {
475
+ {
476
+ if (ie.current) {
477
+ var e = P(ie.current.type);
478
+ if (e)
479
+ return `
480
+
481
+ Check the render method of \`` + e + "`.";
482
+ }
483
+ return "";
484
+ }
485
+ }
486
+ function or(e) {
487
+ return "";
488
+ }
489
+ var Fe = {};
490
+ function ir(e) {
491
+ {
492
+ var r = xe();
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 De(e, r) {
503
+ {
504
+ if (!e._store || e._store.validated || e.key != null)
505
+ return;
506
+ e._store.validated = !0;
507
+ var t = ir(r);
508
+ if (Fe[t])
509
+ return;
510
+ Fe[t] = !0;
511
+ var n = "";
512
+ e && e._owner && e._owner !== ie.current && (n = " It was passed a child from " + P(e._owner.type) + "."), W(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), W(null);
513
+ }
514
+ }
515
+ function Ae(e, r) {
516
+ {
517
+ if (typeof e != "object")
518
+ return;
519
+ if (oe(e))
520
+ for (var t = 0; t < e.length; t++) {
521
+ var n = e[t];
522
+ ue(n) && De(n, r);
523
+ }
524
+ else if (ue(e))
525
+ e._store && (e._store.validated = !0);
526
+ else if (e) {
527
+ var s = O(e);
528
+ if (typeof s == "function" && s !== e.entries)
529
+ for (var u = s.call(e), i; !(i = u.next()).done; )
530
+ ue(i.value) && De(i.value, r);
531
+ }
532
+ }
533
+ }
534
+ function sr(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 === v || // Note: Memo only checks outer props here.
543
+ // Inner props are checked in the reconciler.
544
+ r.$$typeof === C))
545
+ t = r.propTypes;
546
+ else
547
+ return;
548
+ if (t) {
549
+ var n = P(r);
550
+ Ke(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !se) {
552
+ se = !0;
553
+ var s = P(r);
554
+ p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
555
+ }
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
+ }
558
+ }
559
+ function ur(e) {
560
+ {
561
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
+ var n = r[t];
563
+ if (n !== "children" && n !== "key") {
564
+ W(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), W(null);
565
+ break;
566
+ }
567
+ }
568
+ e.ref !== null && (W(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
569
+ }
570
+ }
571
+ var $e = {};
572
+ function Ie(e, r, t, n, s, u) {
573
+ {
574
+ var i = _(e);
575
+ if (!i) {
576
+ var o = "";
577
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " 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 b = or();
579
+ b ? o += b : o += xe();
580
+ var c;
581
+ e === null ? c = "null" : oe(e) ? c = "array" : e !== void 0 && e.$$typeof === w ? (c = "<" + (P(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, o);
582
+ }
583
+ var f = ar(e, r, t, s, u);
584
+ if (f == null)
585
+ return f;
586
+ if (i) {
587
+ var T = r.children;
588
+ if (T !== void 0)
589
+ if (n)
590
+ if (oe(T)) {
591
+ for (var M = 0; M < T.length; M++)
592
+ Ae(T[M], e);
593
+ Object.freeze && Object.freeze(T);
594
+ } else
595
+ p("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
+ Ae(T, e);
598
+ }
599
+ if (N.call(r, "key")) {
600
+ var L = P(e), E = Object.keys(r).filter(function(pr) {
601
+ return pr !== "key";
602
+ }), le = E.length > 0 ? "{key: someKey, " + E.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!$e[L + le]) {
604
+ var vr = E.length > 0 ? "{" + E.join(": ..., ") + ": ...}" : "{}";
605
+ p(`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} />`, le, L, vr, L), $e[L + le] = !0;
611
+ }
612
+ }
613
+ return e === d ? ur(f) : sr(f), f;
614
+ }
615
+ }
616
+ function lr(e, r, t) {
617
+ return Ie(e, r, t, !0);
618
+ }
619
+ function cr(e, r, t) {
620
+ return Ie(e, r, t, !1);
621
+ }
622
+ var fr = cr, dr = lr;
623
+ U.Fragment = d, U.jsx = fr, U.jsxs = dr;
624
+ }()), U;
625
+ }
626
+ process.env.NODE_ENV === "production" ? de.exports = hr() : de.exports = _r();
627
+ var ve = de.exports;
628
+ const gr = "_btn_jnyss_21", yr = "_small_jnyss_45", br = "_middle_jnyss_52", mr = "_large_jnyss_59", Er = "_danger_jnyss_66", Rr = "_primary_jnyss_70", wr = "_link_jnyss_70", Cr = "_text_jnyss_70", Tr = "_dashed_jnyss_70", jr = "_ghost_jnyss_70", kr = "_warning_jnyss_80", Or = "_info_jnyss_94", Pr = "_success_jnyss_108", Sr = "_disabled_jnyss_177", q = {
629
+ btn: gr,
630
+ small: yr,
631
+ middle: br,
632
+ large: mr,
633
+ danger: Er,
634
+ primary: Rr,
635
+ link: wr,
636
+ text: Cr,
637
+ dashed: Tr,
638
+ ghost: jr,
639
+ default: "_default_jnyss_70",
640
+ warning: kr,
641
+ info: Or,
642
+ success: Pr,
643
+ disabled: Sr
644
+ }, $r = ({
645
+ type: A,
646
+ size: w = "middle",
647
+ color: j = "primary",
648
+ disabled: d = !1,
649
+ onClick: m,
650
+ className: S = "",
651
+ style: x,
652
+ children: k,
653
+ ...v
654
+ }) => {
655
+ const y = [q.btn];
656
+ w && w !== "middle" && y.push(q[w]), A && y.push(q[A]), j && j !== "primary" && y.push(q[j]), S && y.push(S), d && y.push(q.disabled);
657
+ const h = y.filter(Boolean).join(" ");
658
+ return /* @__PURE__ */ ve.jsx(
659
+ "span",
660
+ {
661
+ className: h,
662
+ onClick: d ? void 0 : m,
663
+ style: x,
664
+ ...v,
665
+ children: k
666
+ }
667
+ );
668
+ }, xr = "_popoverWrapper_1hkwl_21", Fr = "_popoverContent_1hkwl_28", Dr = "_popoverFadeIn_1hkwl_1", fe = {
669
+ popoverWrapper: xr,
670
+ popoverContent: Fr,
671
+ popoverFadeIn: Dr
672
+ }, Ir = ({
673
+ children: A,
674
+ content: w,
675
+ placement: j = "BL",
676
+ offset: d = 8,
677
+ trigger: m = "click",
678
+ visible: S,
679
+ onVisibleChange: x,
680
+ className: k = "",
681
+ style: v
682
+ }) => {
683
+ const [y, h] = Le(!1), [C, D] = Le({ top: 0, left: 0 }), F = We(null), $ = We(null), J = S !== void 0, O = J ? S : y, R = (a) => {
684
+ J || h(a), x && x(a);
685
+ }, p = () => {
686
+ if (!F.current || !$.current || !O)
687
+ return;
688
+ const a = F.current.getBoundingClientRect(), l = $.current.getBoundingClientRect();
689
+ let _ = 0, g = 0;
690
+ switch (j) {
691
+ case "TL":
692
+ _ = a.top - l.height - d, g = a.left;
693
+ break;
694
+ case "TC":
695
+ _ = a.top - l.height - d, g = a.left + (a.width - l.width) / 2;
696
+ break;
697
+ case "TR":
698
+ _ = a.top - l.height - d, g = a.left + a.width - l.width;
699
+ break;
700
+ case "CL":
701
+ _ = a.top + (a.height - l.height) / 2, g = a.left - l.width - d;
702
+ break;
703
+ case "CC":
704
+ _ = a.top + (a.height - l.height) / 2, g = a.left + (a.width - l.width) / 2;
705
+ break;
706
+ case "CR":
707
+ _ = a.top + (a.height - l.height) / 2, g = a.left + a.width + d;
708
+ break;
709
+ case "BL":
710
+ default:
711
+ _ = a.bottom + d, g = a.left;
712
+ break;
713
+ case "BC":
714
+ _ = a.bottom + d, g = a.left + (a.width - l.width) / 2;
715
+ break;
716
+ case "BR":
717
+ _ = a.bottom + d, g = a.left + a.width - l.width;
718
+ break;
719
+ }
720
+ const Y = window.innerWidth, P = window.innerHeight;
721
+ g < 8 && (g = 8), g + l.width > Y - 8 && (g = Y - l.width - 8), _ < 8 && (_ = 8), _ + l.height > P - 8 && (_ = P - l.height - 8), D({ top: _, left: g });
722
+ };
723
+ ce(() => {
724
+ O && requestAnimationFrame(() => {
725
+ p();
726
+ });
727
+ }, [O, j, d]), ce(() => {
728
+ if (!O) return;
729
+ const a = () => {
730
+ p();
731
+ }, l = () => {
732
+ p();
733
+ };
734
+ return window.addEventListener("resize", a), window.addEventListener("scroll", l, !0), () => {
735
+ window.removeEventListener("resize", a), window.removeEventListener("scroll", l, !0);
736
+ };
737
+ }, [O]), ce(() => {
738
+ if (m !== "click" || !O) return;
739
+ const a = (l) => {
740
+ F.current && $.current && !F.current.contains(l.target) && !$.current.contains(l.target) && R(!1);
741
+ };
742
+ return setTimeout(() => {
743
+ document.addEventListener("click", a);
744
+ }, 0), () => {
745
+ document.removeEventListener("click", a);
746
+ };
747
+ }, [m, O]);
748
+ const X = (a) => {
749
+ m === "click" && (a.stopPropagation(), R(!O));
750
+ }, Z = () => {
751
+ m === "hover" && R(!0);
752
+ }, Q = () => {
753
+ m === "hover" && R(!1);
754
+ }, ee = () => {
755
+ m === "hover" && R(!0);
756
+ }, re = () => {
757
+ m === "hover" && R(!1);
758
+ };
759
+ return /* @__PURE__ */ ve.jsxs(
760
+ "div",
761
+ {
762
+ ref: F,
763
+ className: `${fe.popoverWrapper} ${k}`,
764
+ style: v,
765
+ onClick: X,
766
+ onMouseEnter: Z,
767
+ onMouseLeave: Q,
768
+ children: [
769
+ A,
770
+ O && w && /* @__PURE__ */ ve.jsx(
771
+ "div",
772
+ {
773
+ ref: $,
774
+ className: `${fe.popoverContent} ${fe[`placement-${j}`]}`,
775
+ style: {
776
+ top: `${C.top}px`,
777
+ left: `${C.left}px`
778
+ },
779
+ onClick: (a) => a.stopPropagation(),
780
+ onMouseEnter: ee,
781
+ onMouseLeave: re,
782
+ children: w
783
+ }
784
+ )
785
+ ]
786
+ }
787
+ );
788
+ };
789
+ export {
790
+ $r as Button,
791
+ Ir as Popover
792
+ };
793
+ //# sourceMappingURL=index.es.js.map