@coinloger/dev-ui 0.0.1 → 0.0.2

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