@khyxer/fastyui 1.0.0

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,1584 @@
1
+ import { Children as e, cloneElement as t, createContext as n, isValidElement as r, useContext as i, useEffect as a, useRef as o, useState as s } from "react";
2
+ import c, { gsap as l } from "gsap";
3
+ //#region \0rolldown/runtime.js
4
+ var u = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), d = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
5
+ if (typeof require < "u") return require.apply(this, arguments);
6
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
7
+ }), f = {
8
+ button: "_button_1xsg4_1",
9
+ primary: "_primary_1xsg4_18",
10
+ disabled: "_disabled_1xsg4_23",
11
+ secondary: "_secondary_1xsg4_34",
12
+ warning: "_warning_1xsg4_52",
13
+ error: "_error_1xsg4_68",
14
+ sm: "_sm_1xsg4_92",
15
+ lg: "_lg_1xsg4_103",
16
+ xl: "_xl_1xsg4_114"
17
+ }, p = /* @__PURE__ */ u(((e) => {
18
+ var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
19
+ function r(e, n, r) {
20
+ var i = null;
21
+ if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
22
+ else r = n;
23
+ return n = r.ref, {
24
+ $$typeof: t,
25
+ type: e,
26
+ key: i,
27
+ ref: n === void 0 ? null : n,
28
+ props: r
29
+ };
30
+ }
31
+ e.Fragment = n, e.jsx = r, e.jsxs = r;
32
+ })), m = /* @__PURE__ */ u(((e) => {
33
+ process.env.NODE_ENV !== "production" && (function() {
34
+ function t(e) {
35
+ if (e == null) return null;
36
+ if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
37
+ if (typeof e == "string") return e;
38
+ switch (e) {
39
+ case v: return "Fragment";
40
+ case b: return "Profiler";
41
+ case y: return "StrictMode";
42
+ case w: return "Suspense";
43
+ case T: return "SuspenseList";
44
+ case O: return "Activity";
45
+ }
46
+ if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
47
+ case _: return "Portal";
48
+ case S: return e.displayName || "Context";
49
+ case x: return (e._context.displayName || "Context") + ".Consumer";
50
+ case C:
51
+ var n = e.render;
52
+ return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
53
+ case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
54
+ case D:
55
+ n = e._payload, e = e._init;
56
+ try {
57
+ return t(e(n));
58
+ } catch {}
59
+ }
60
+ return null;
61
+ }
62
+ function n(e) {
63
+ return "" + e;
64
+ }
65
+ function r(e) {
66
+ try {
67
+ n(e);
68
+ var t = !1;
69
+ } catch {
70
+ t = !0;
71
+ }
72
+ if (t) {
73
+ t = console;
74
+ var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
75
+ return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
76
+ }
77
+ }
78
+ function i(e) {
79
+ if (e === v) return "<>";
80
+ if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
81
+ try {
82
+ var n = t(e);
83
+ return n ? "<" + n + ">" : "<...>";
84
+ } catch {
85
+ return "<...>";
86
+ }
87
+ }
88
+ function a() {
89
+ var e = A.A;
90
+ return e === null ? null : e.getOwner();
91
+ }
92
+ function o() {
93
+ return Error("react-stack-top-frame");
94
+ }
95
+ function s(e) {
96
+ if (j.call(e, "key")) {
97
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
98
+ if (t && t.isReactWarning) return !1;
99
+ }
100
+ return e.key !== void 0;
101
+ }
102
+ function c(e, t) {
103
+ function n() {
104
+ P || (P = !0, console.error("%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://react.dev/link/special-props)", t));
105
+ }
106
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
107
+ get: n,
108
+ configurable: !0
109
+ });
110
+ }
111
+ function l() {
112
+ var e = t(this.type);
113
+ return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
114
+ }
115
+ function u(e, t, n, r, i, a) {
116
+ var o = n.ref;
117
+ return e = {
118
+ $$typeof: g,
119
+ type: e,
120
+ key: t,
121
+ props: n,
122
+ _owner: r
123
+ }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
124
+ enumerable: !1,
125
+ value: null
126
+ }) : Object.defineProperty(e, "ref", {
127
+ enumerable: !1,
128
+ get: l
129
+ }), e._store = {}, Object.defineProperty(e._store, "validated", {
130
+ configurable: !1,
131
+ enumerable: !1,
132
+ writable: !0,
133
+ value: 0
134
+ }), Object.defineProperty(e, "_debugInfo", {
135
+ configurable: !1,
136
+ enumerable: !1,
137
+ writable: !0,
138
+ value: null
139
+ }), Object.defineProperty(e, "_debugStack", {
140
+ configurable: !1,
141
+ enumerable: !1,
142
+ writable: !0,
143
+ value: i
144
+ }), Object.defineProperty(e, "_debugTask", {
145
+ configurable: !1,
146
+ enumerable: !1,
147
+ writable: !0,
148
+ value: a
149
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
150
+ }
151
+ function f(e, n, i, o, l, d) {
152
+ var f = n.children;
153
+ if (f !== void 0) if (o) if (M(f)) {
154
+ for (o = 0; o < f.length; o++) p(f[o]);
155
+ Object.freeze && Object.freeze(f);
156
+ } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
157
+ else p(f);
158
+ if (j.call(n, "key")) {
159
+ f = t(e);
160
+ var m = Object.keys(n).filter(function(e) {
161
+ return e !== "key";
162
+ });
163
+ o = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + o] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", o, f, m, f), R[f + o] = !0);
164
+ }
165
+ if (f = null, i !== void 0 && (r(i), f = "" + i), s(n) && (r(n.key), f = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
166
+ else i = n;
167
+ return f && c(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), u(e, f, i, a(), l, d);
168
+ }
169
+ function p(e) {
170
+ m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
171
+ }
172
+ function m(e) {
173
+ return typeof e == "object" && !!e && e.$$typeof === g;
174
+ }
175
+ var h = d("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
176
+ return null;
177
+ };
178
+ h = { react_stack_bottom_frame: function(e) {
179
+ return e();
180
+ } };
181
+ var P, F = {}, I = h.react_stack_bottom_frame.bind(h, o)(), L = N(i(o)), R = {};
182
+ e.Fragment = v, e.jsx = function(e, t, n) {
183
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
184
+ return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
185
+ }, e.jsxs = function(e, t, n) {
186
+ var r = 1e4 > A.recentlyCreatedOwnerStacks++;
187
+ return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
188
+ };
189
+ })();
190
+ })), h = (/* @__PURE__ */ u(((e, t) => {
191
+ process.env.NODE_ENV === "production" ? t.exports = p() : t.exports = m();
192
+ })))();
193
+ function g({ text: e, variant: t = "primary", size: n = "lg", onClick: r, icon: i, disabled: a = !1, className: s, ...c }) {
194
+ let u = o(null);
195
+ return /* @__PURE__ */ (0, h.jsxs)("button", {
196
+ ref: u,
197
+ onClick: () => {
198
+ a || r?.();
199
+ },
200
+ onMouseDown: () => {
201
+ a || !u.current || l.to(u.current, {
202
+ scale: .96,
203
+ duration: .1,
204
+ ease: "power2.in"
205
+ });
206
+ },
207
+ onMouseUp: () => {
208
+ a || !u.current || l.to(u.current, {
209
+ scale: 1,
210
+ duration: .2,
211
+ ease: "back.out(1.7)"
212
+ });
213
+ },
214
+ disabled: a,
215
+ className: `${f.button} ${f[t]} ${n ? f[n] : ""} ${a ? f.disabled : ""} ${s || ""}`,
216
+ ...c,
217
+ children: [i && /* @__PURE__ */ (0, h.jsx)("span", {
218
+ className: f.icon,
219
+ children: i
220
+ }), e && /* @__PURE__ */ (0, h.jsx)("span", {
221
+ className: f.text,
222
+ children: e
223
+ })]
224
+ });
225
+ }
226
+ var _ = {
227
+ input: "_input_1ddpd_1",
228
+ inputWrapper: "_inputWrapper_1ddpd_19",
229
+ icon: "_icon_1ddpd_37",
230
+ eyeButton: "_eyeButton_1ddpd_46",
231
+ inputWithIcon: "_inputWithIcon_1ddpd_63",
232
+ sm: "_sm_1ddpd_72",
233
+ lg: "_lg_1ddpd_92",
234
+ xl: "_xl_1ddpd_112"
235
+ };
236
+ //#endregion
237
+ //#region src/components/input/Input.tsx
238
+ function v({ size: e = "lg", icon: t, password: n = !1, className: r, ...i }) {
239
+ let [a, o] = s(!1), c = e ? _[e] : "", l = n ? a ? "text" : "password" : i.type || "text";
240
+ return t || n ? /* @__PURE__ */ (0, h.jsxs)("div", {
241
+ className: `${_.inputWrapper}`,
242
+ children: [
243
+ t && /* @__PURE__ */ (0, h.jsx)("span", {
244
+ className: _.icon,
245
+ children: t
246
+ }),
247
+ /* @__PURE__ */ (0, h.jsx)("input", {
248
+ type: l,
249
+ className: `${_.inputWithIcon} ${c} ${r || ""}`,
250
+ ...i
251
+ }),
252
+ n && /* @__PURE__ */ (0, h.jsx)("button", {
253
+ type: "button",
254
+ className: _.eyeButton,
255
+ onClick: () => o(!a),
256
+ "aria-label": a ? "Ocultar contraseña" : "Mostrar contraseña",
257
+ children: a ? /* @__PURE__ */ (0, h.jsxs)("svg", {
258
+ xmlns: "http://www.w3.org/2000/svg",
259
+ width: "20",
260
+ height: "20",
261
+ viewBox: "0 0 24 24",
262
+ fill: "none",
263
+ stroke: "currentColor",
264
+ strokeWidth: "2",
265
+ strokeLinecap: "round",
266
+ strokeLinejoin: "round",
267
+ children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }), /* @__PURE__ */ (0, h.jsx)("line", {
268
+ x1: "2",
269
+ y1: "2",
270
+ x2: "22",
271
+ y2: "22"
272
+ })]
273
+ }) : /* @__PURE__ */ (0, h.jsxs)("svg", {
274
+ xmlns: "http://www.w3.org/2000/svg",
275
+ width: "20",
276
+ height: "20",
277
+ viewBox: "0 0 24 24",
278
+ fill: "none",
279
+ stroke: "currentColor",
280
+ strokeWidth: "2",
281
+ strokeLinecap: "round",
282
+ strokeLinejoin: "round",
283
+ children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }), /* @__PURE__ */ (0, h.jsx)("circle", {
284
+ cx: "12",
285
+ cy: "12",
286
+ r: "3"
287
+ })]
288
+ })
289
+ })
290
+ ]
291
+ }) : /* @__PURE__ */ (0, h.jsx)("input", {
292
+ type: l,
293
+ className: `${_.input} ${c} ${r || ""}`,
294
+ ...i
295
+ });
296
+ }
297
+ var y = {
298
+ card: "_card_w8zkq_1",
299
+ dashed: "_dashed_w8zkq_9"
300
+ };
301
+ //#endregion
302
+ //#region src/components/card/Card.tsx
303
+ function b({ children: e, dashed: t = !1, className: n, ...r }) {
304
+ return /* @__PURE__ */ (0, h.jsx)("div", {
305
+ className: `${y.card} ${t ? y.dashed : ""} ${n || ""}`,
306
+ ...r,
307
+ children: e
308
+ });
309
+ }
310
+ var x = {
311
+ overlay: "_overlay_1qbeq_1",
312
+ sheet: "_sheet_1qbeq_8",
313
+ right: "_right_1qbeq_18",
314
+ left: "_left_1qbeq_25",
315
+ top: "_top_1qbeq_32",
316
+ bottom: "_bottom_1qbeq_39",
317
+ sm: "_sm_1qbeq_46",
318
+ md: "_md_1qbeq_52",
319
+ lg: "_lg_1qbeq_58",
320
+ xl: "_xl_1qbeq_64",
321
+ full: "_full_1qbeq_70",
322
+ closeButton: "_closeButton_1qbeq_109"
323
+ }, S = {
324
+ header: "_header_1pbdy_1",
325
+ content: "_content_1pbdy_9",
326
+ title: "_title_1pbdy_15",
327
+ description: "_description_1pbdy_23",
328
+ closeButton: "_closeButton_1pbdy_30"
329
+ }, C = n(null);
330
+ function w({ title: e, description: t, showCloseButton: n = !1, className: r, ...a }) {
331
+ let o = i(C);
332
+ if (!o) throw Error("HeroSheet must be used within a Sheet component");
333
+ return /* @__PURE__ */ (0, h.jsx)("div", {
334
+ className: `${S.heroSheet} ${r || ""}`,
335
+ ...a,
336
+ children: /* @__PURE__ */ (0, h.jsxs)("div", {
337
+ className: S.header,
338
+ children: [/* @__PURE__ */ (0, h.jsxs)("div", {
339
+ className: S.content,
340
+ children: [/* @__PURE__ */ (0, h.jsx)("h2", {
341
+ className: S.title,
342
+ children: e
343
+ }), t && /* @__PURE__ */ (0, h.jsx)("p", {
344
+ className: S.description,
345
+ children: t
346
+ })]
347
+ }), n && /* @__PURE__ */ (0, h.jsx)("button", {
348
+ className: S.closeButton,
349
+ onClick: o.onClose,
350
+ "aria-label": "Close",
351
+ children: /* @__PURE__ */ (0, h.jsxs)("svg", {
352
+ xmlns: "http://www.w3.org/2000/svg",
353
+ width: "24",
354
+ height: "24",
355
+ viewBox: "0 0 24 24",
356
+ fill: "none",
357
+ stroke: "currentColor",
358
+ "stroke-width": "2",
359
+ "stroke-linecap": "round",
360
+ "stroke-linejoin": "round",
361
+ className: "lucide lucide-x-icon lucide-x",
362
+ children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M18 6 6 18" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "m6 6 12 12" })]
363
+ })
364
+ })]
365
+ })
366
+ });
367
+ }
368
+ //#endregion
369
+ //#region src/components/sheet/Sheet.tsx
370
+ function T({ children: n, side: i = "right", width: l = "md", className: u, ...d }) {
371
+ let [f, p] = s(!1), m = o(null), g = o(null);
372
+ a(() => (f ? (document.body.style.overflow = "hidden", _()) : document.body.style.overflow = "unset", () => {
373
+ document.body.style.overflow = "unset";
374
+ }), [f]);
375
+ let _ = () => {
376
+ !m.current || !g.current || (c.fromTo(m.current, { opacity: 0 }, {
377
+ opacity: 1,
378
+ duration: .2,
379
+ ease: "power2.out"
380
+ }), c.fromTo(g.current, {
381
+ right: { x: "100%" },
382
+ left: { x: "-100%" },
383
+ top: { y: "-100%" },
384
+ bottom: { y: "100%" }
385
+ }[i], {
386
+ x: 0,
387
+ y: 0,
388
+ duration: .3,
389
+ ease: "power2.out"
390
+ }));
391
+ }, v = () => {
392
+ !m.current || !g.current || (c.to(m.current, {
393
+ opacity: 0,
394
+ duration: .3,
395
+ ease: "power2.in"
396
+ }), c.to(g.current, {
397
+ ...{
398
+ right: { x: "100%" },
399
+ left: { x: "-100%" },
400
+ top: { y: "-100%" },
401
+ bottom: { y: "100%" }
402
+ }[i],
403
+ duration: .3,
404
+ ease: "power2.in",
405
+ onComplete: () => p(!1)
406
+ }));
407
+ }, y = () => {
408
+ v();
409
+ }, b = e.toArray(n), S = b[0], w = b.slice(1);
410
+ return /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [r(S) ? t(S, { onClick: () => p(!0) }) : S, f && /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)("div", {
411
+ ref: m,
412
+ className: x.overlay,
413
+ onClick: y
414
+ }), /* @__PURE__ */ (0, h.jsx)("div", {
415
+ ref: g,
416
+ className: `${x.sheet} ${x[i]} ${x[l]} ${u || ""}`,
417
+ ...d,
418
+ children: /* @__PURE__ */ (0, h.jsx)(C.Provider, {
419
+ value: { onClose: y },
420
+ children: w
421
+ })
422
+ })] })] });
423
+ }
424
+ var E = { content: "_content_n86ez_1" };
425
+ //#endregion
426
+ //#region src/components/sheet/SheetContent.tsx
427
+ function D({ children: e, className: t, ...n }) {
428
+ return /* @__PURE__ */ (0, h.jsx)("div", {
429
+ className: `${E.content} ${t || ""}`,
430
+ ...n,
431
+ children: e
432
+ });
433
+ }
434
+ var O = { footer: "_footer_e6jod_1" };
435
+ //#endregion
436
+ //#region src/components/sheet/SheetFooter.tsx
437
+ function k({ children: e, className: t, ...n }) {
438
+ return /* @__PURE__ */ (0, h.jsx)("div", {
439
+ className: `${O.footer} ${t || ""}`,
440
+ ...n,
441
+ children: e
442
+ });
443
+ }
444
+ var A = {
445
+ overlay: "_overlay_160jk_1",
446
+ modal: "_modal_160jk_11"
447
+ }, j = n(null);
448
+ function M({ children: n, className: i, ...l }) {
449
+ let [u, d] = s(!1), f = o(null), p = o(null);
450
+ a(() => (u ? (document.body.style.overflow = "hidden", m()) : document.body.style.overflow = "unset", () => {
451
+ document.body.style.overflow = "unset";
452
+ }), [u]);
453
+ let m = () => {
454
+ !f.current || !p.current || (c.fromTo(f.current, { opacity: 0 }, {
455
+ opacity: 1,
456
+ duration: .3,
457
+ ease: "power2.out"
458
+ }), c.fromTo(p.current, {
459
+ opacity: 0,
460
+ scale: .9,
461
+ y: 20
462
+ }, {
463
+ opacity: 1,
464
+ scale: 1,
465
+ y: 0,
466
+ duration: .4,
467
+ ease: "back.out(1.7)"
468
+ }));
469
+ }, g = () => {
470
+ !f.current || !p.current || (c.to(f.current, {
471
+ opacity: 0,
472
+ duration: .25,
473
+ ease: "power2.in"
474
+ }), c.to(p.current, {
475
+ opacity: 0,
476
+ scale: .95,
477
+ y: 10,
478
+ duration: .25,
479
+ ease: "power2.in",
480
+ onComplete: () => d(!1)
481
+ }));
482
+ }, _ = () => {
483
+ g();
484
+ }, v = e.toArray(n), y = v[0], b = v.slice(1);
485
+ return /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [r(y) ? t(y, { onClick: () => d(!0) }) : y, u && /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)("div", {
486
+ ref: f,
487
+ className: A.overlay,
488
+ onClick: _
489
+ }), /* @__PURE__ */ (0, h.jsx)("div", {
490
+ ref: p,
491
+ className: `${A.modal} ${i || ""}`,
492
+ ...l,
493
+ children: /* @__PURE__ */ (0, h.jsx)(j.Provider, {
494
+ value: { onClose: _ },
495
+ children: b
496
+ })
497
+ })] })] });
498
+ }
499
+ var N = {
500
+ header: "_header_52hw4_1",
501
+ content: "_content_52hw4_10",
502
+ title: "_title_52hw4_16",
503
+ description: "_description_52hw4_24",
504
+ closeButton: "_closeButton_52hw4_31"
505
+ };
506
+ //#endregion
507
+ //#region src/components/modal/ModalHeader.tsx
508
+ function P({ title: e, description: t, showCloseButton: n = !0, className: r, ...a }) {
509
+ let o = i(j);
510
+ if (!o) throw Error("ModalHeader must be used within a Modal component");
511
+ return /* @__PURE__ */ (0, h.jsxs)("div", {
512
+ className: `${N.header} ${r || ""}`,
513
+ ...a,
514
+ children: [/* @__PURE__ */ (0, h.jsxs)("div", {
515
+ className: N.content,
516
+ children: [/* @__PURE__ */ (0, h.jsx)("h2", {
517
+ className: N.title,
518
+ children: e
519
+ }), t && /* @__PURE__ */ (0, h.jsx)("p", {
520
+ className: N.description,
521
+ children: t
522
+ })]
523
+ }), n && /* @__PURE__ */ (0, h.jsx)("button", {
524
+ className: N.closeButton,
525
+ onClick: o.onClose,
526
+ "aria-label": "Close",
527
+ children: /* @__PURE__ */ (0, h.jsxs)("svg", {
528
+ xmlns: "http://www.w3.org/2000/svg",
529
+ width: "24",
530
+ height: "24",
531
+ viewBox: "0 0 24 24",
532
+ fill: "none",
533
+ stroke: "currentColor",
534
+ strokeWidth: "2",
535
+ strokeLinecap: "round",
536
+ strokeLinejoin: "round",
537
+ children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M18 6 6 18" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "m6 6 12 12" })]
538
+ })
539
+ })]
540
+ });
541
+ }
542
+ var F = { body: "_body_6i5xc_1" };
543
+ //#endregion
544
+ //#region src/components/modal/ModalBody.tsx
545
+ function I({ children: e, className: t, ...n }) {
546
+ return /* @__PURE__ */ (0, h.jsx)("div", {
547
+ className: `${F.body} ${t || ""}`,
548
+ ...n,
549
+ children: e
550
+ });
551
+ }
552
+ var L = {
553
+ content: "_content_5wshu_1",
554
+ sm: "_sm_5wshu_7",
555
+ md: "_md_5wshu_12",
556
+ lg: "_lg_5wshu_17",
557
+ xl: "_xl_5wshu_22"
558
+ };
559
+ //#endregion
560
+ //#region src/components/modal/ModalContent.tsx
561
+ function R({ children: e, width: t = "md", className: n, ...r }) {
562
+ return /* @__PURE__ */ (0, h.jsx)("div", {
563
+ className: `${L.content} ${L[t]} ${n || ""}`,
564
+ ...r,
565
+ children: e
566
+ });
567
+ }
568
+ var ee = { footer: "_footer_1hqi4_1" };
569
+ //#endregion
570
+ //#region src/components/modal/ModalFooter.tsx
571
+ function te({ children: e, className: t, ...n }) {
572
+ return /* @__PURE__ */ (0, h.jsx)("div", {
573
+ className: `${ee.footer} ${t || ""}`,
574
+ ...n,
575
+ children: e
576
+ });
577
+ }
578
+ var z = {
579
+ "toast-container": "_toast-container_1rucc_1",
580
+ "toast-container--top-left": "_toast-container--top-left_1rucc_7",
581
+ "toast-container--top-center": "_toast-container--top-center_1rucc_12",
582
+ "toast-container--top-right": "_toast-container--top-right_1rucc_17",
583
+ "toast-container--bottom-left": "_toast-container--bottom-left_1rucc_22",
584
+ "toast-container--bottom-center": "_toast-container--bottom-center_1rucc_27",
585
+ "toast-container--bottom-right": "_toast-container--bottom-right_1rucc_32",
586
+ toast: "_toast_1rucc_1",
587
+ toast__icon: "_toast__icon_1rucc_81",
588
+ toast__message: "_toast__message_1rucc_90",
589
+ toast__close: "_toast__close_1rucc_97",
590
+ "toast--success": "_toast--success_1rucc_119",
591
+ "toast--error": "_toast--error_1rucc_128",
592
+ "toast--warning": "_toast--warning_1rucc_137",
593
+ "toast--info": "_toast--info_1rucc_146"
594
+ }, ne = ({ id: e, message: t, type: n, duration: r = 3e3, onClose: i, isGlobalPaused: s, onHoverChange: l, position: u, zIndex: d }) => {
595
+ let f = o(null), p = o(null), m = o(Date.now()), g = o(r), _ = () => u.includes("right") ? {
596
+ from: {
597
+ x: 400,
598
+ y: 0
599
+ },
600
+ to: {
601
+ x: 400,
602
+ y: 0
603
+ }
604
+ } : u.includes("left") ? {
605
+ from: {
606
+ x: -400,
607
+ y: 0
608
+ },
609
+ to: {
610
+ x: -400,
611
+ y: 0
612
+ }
613
+ } : u.includes("top") ? {
614
+ from: {
615
+ x: 0,
616
+ y: -100
617
+ },
618
+ to: {
619
+ x: 0,
620
+ y: -100
621
+ }
622
+ } : {
623
+ from: {
624
+ x: 0,
625
+ y: 100
626
+ },
627
+ to: {
628
+ x: 0,
629
+ y: 100
630
+ }
631
+ }, v = () => {
632
+ if (f.current) {
633
+ let t = _();
634
+ c.to(f.current, {
635
+ x: t.to.x,
636
+ y: t.to.y,
637
+ opacity: 0,
638
+ duration: .3,
639
+ ease: "power2.in",
640
+ onComplete: () => {
641
+ i(e);
642
+ }
643
+ });
644
+ }
645
+ };
646
+ a(() => {
647
+ if (f.current) {
648
+ let e = _();
649
+ c.fromTo(f.current, {
650
+ x: e.from.x,
651
+ y: e.from.y,
652
+ opacity: 0
653
+ }, {
654
+ x: 0,
655
+ y: 0,
656
+ opacity: 1,
657
+ duration: .3,
658
+ ease: "power2.out"
659
+ });
660
+ }
661
+ }, []), a(() => {
662
+ if (s) {
663
+ if (p.current) {
664
+ clearTimeout(p.current), p.current = null;
665
+ let e = Date.now() - m.current;
666
+ g.current = Math.max(0, g.current - e);
667
+ }
668
+ } else m.current = Date.now(), p.current = setTimeout(() => {
669
+ v();
670
+ }, g.current);
671
+ return () => {
672
+ p.current && clearTimeout(p.current);
673
+ };
674
+ }, [s]);
675
+ let y = {
676
+ success: /* @__PURE__ */ (0, h.jsxs)("svg", {
677
+ xmlns: "http://www.w3.org/2000/svg",
678
+ width: "24",
679
+ height: "24",
680
+ viewBox: "0 0 24 24",
681
+ fill: "none",
682
+ stroke: "currentColor",
683
+ "stroke-width": "2",
684
+ "stroke-linecap": "round",
685
+ "stroke-linejoin": "round",
686
+ className: "lucide lucide-circle-check-icon lucide-circle-check",
687
+ children: [/* @__PURE__ */ (0, h.jsx)("circle", {
688
+ cx: "12",
689
+ cy: "12",
690
+ r: "10"
691
+ }), /* @__PURE__ */ (0, h.jsx)("path", { d: "m9 12 2 2 4-4" })]
692
+ }),
693
+ error: /* @__PURE__ */ (0, h.jsxs)("svg", {
694
+ xmlns: "http://www.w3.org/2000/svg",
695
+ width: "24",
696
+ height: "24",
697
+ viewBox: "0 0 24 24",
698
+ fill: "none",
699
+ stroke: "currentColor",
700
+ "stroke-width": "2",
701
+ "stroke-linecap": "round",
702
+ "stroke-linejoin": "round",
703
+ className: "lucide lucide-circle-x-icon lucide-circle-x",
704
+ children: [
705
+ /* @__PURE__ */ (0, h.jsx)("circle", {
706
+ cx: "12",
707
+ cy: "12",
708
+ r: "10"
709
+ }),
710
+ /* @__PURE__ */ (0, h.jsx)("path", { d: "m15 9-6 6" }),
711
+ /* @__PURE__ */ (0, h.jsx)("path", { d: "m9 9 6 6" })
712
+ ]
713
+ }),
714
+ warning: /* @__PURE__ */ (0, h.jsxs)("svg", {
715
+ xmlns: "http://www.w3.org/2000/svg",
716
+ width: "24",
717
+ height: "24",
718
+ viewBox: "0 0 24 24",
719
+ fill: "none",
720
+ stroke: "currentColor",
721
+ "stroke-width": "2",
722
+ "stroke-linecap": "round",
723
+ "stroke-linejoin": "round",
724
+ className: "lucide lucide-alert-triangle-icon lucide-alert-triangle",
725
+ children: [
726
+ /* @__PURE__ */ (0, h.jsx)("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" }),
727
+ /* @__PURE__ */ (0, h.jsx)("path", { d: "M12 9v4" }),
728
+ /* @__PURE__ */ (0, h.jsx)("path", { d: "M12 17h.01" })
729
+ ]
730
+ }),
731
+ info: /* @__PURE__ */ (0, h.jsxs)("svg", {
732
+ xmlns: "http://www.w3.org/2000/svg",
733
+ width: "24",
734
+ height: "24",
735
+ viewBox: "0 0 24 24",
736
+ fill: "none",
737
+ stroke: "currentColor",
738
+ "stroke-width": "2",
739
+ "stroke-linecap": "round",
740
+ "stroke-linejoin": "round",
741
+ className: "lucide lucide-info-icon lucide-info",
742
+ children: [
743
+ /* @__PURE__ */ (0, h.jsx)("circle", {
744
+ cx: "12",
745
+ cy: "12",
746
+ r: "10"
747
+ }),
748
+ /* @__PURE__ */ (0, h.jsx)("path", { d: "M12 16v-4" }),
749
+ /* @__PURE__ */ (0, h.jsx)("path", { d: "M12 8h.01" })
750
+ ]
751
+ })
752
+ };
753
+ return /* @__PURE__ */ (0, h.jsxs)("div", {
754
+ ref: f,
755
+ className: `${z.toast} ${z[`toast--${n}`]}`,
756
+ role: "alert",
757
+ style: { zIndex: d },
758
+ onMouseEnter: () => l(!0),
759
+ onMouseLeave: () => l(!1),
760
+ children: [
761
+ /* @__PURE__ */ (0, h.jsx)("span", {
762
+ className: z.toast__icon,
763
+ children: y[n]
764
+ }),
765
+ /* @__PURE__ */ (0, h.jsx)("span", {
766
+ className: z.toast__message,
767
+ children: t
768
+ }),
769
+ /* @__PURE__ */ (0, h.jsx)("button", {
770
+ className: z.toast__close,
771
+ onClick: v,
772
+ "aria-label": "Close",
773
+ children: /* @__PURE__ */ (0, h.jsxs)("svg", {
774
+ xmlns: "http://www.w3.org/2000/svg",
775
+ width: "24",
776
+ height: "24",
777
+ viewBox: "0 0 24 24",
778
+ fill: "none",
779
+ stroke: "currentColor",
780
+ "stroke-width": "2",
781
+ "stroke-linecap": "round",
782
+ "stroke-linejoin": "round",
783
+ className: "lucide lucide-x-icon lucide-x",
784
+ children: [/* @__PURE__ */ (0, h.jsx)("path", { d: "M18 6 6 18" }), /* @__PURE__ */ (0, h.jsx)("path", { d: "m6 6 12 12" })]
785
+ })
786
+ })
787
+ ]
788
+ });
789
+ }, B = new class {
790
+ constructor() {
791
+ this.listeners = [];
792
+ }
793
+ on(e, t) {
794
+ this.listeners.push(t);
795
+ }
796
+ off(e, t) {
797
+ this.listeners = this.listeners.filter((e) => e !== t);
798
+ }
799
+ emit(e, t) {
800
+ this.listeners.forEach((e) => e(t));
801
+ }
802
+ }(), re = 0, V = (e, t, n) => {
803
+ let r = `toast-${Date.now()}-${re++}`;
804
+ B.emit("show", {
805
+ id: r,
806
+ message: e,
807
+ type: t,
808
+ duration: n
809
+ });
810
+ }, ie = {
811
+ success: (e, t) => V(e, "success", t),
812
+ error: (e, t) => V(e, "error", t),
813
+ warning: (e, t) => V(e, "warning", t),
814
+ info: (e, t) => V(e, "info", t)
815
+ }, ae = ({ position: e = "top-right" }) => {
816
+ let [t, n] = s([]), [r, i] = s(!1), l = o(null), u = e.startsWith("bottom");
817
+ a(() => {
818
+ let e = (e) => {
819
+ n((t) => u ? [...t, e] : [e, ...t]);
820
+ };
821
+ return B.on("show", e), () => {
822
+ B.off("show", e);
823
+ };
824
+ }, [u]), a(() => {
825
+ if (!l.current) return;
826
+ let e = l.current.querySelectorAll(`.${z.toast}`);
827
+ e.forEach((t, n) => {
828
+ let r = t, i;
829
+ i = u ? -(e.length - 1 - n) * 76 : n * 76, c.getProperty(r, "y") !== i && c.to(r, {
830
+ y: i,
831
+ duration: .3,
832
+ ease: "power2.out"
833
+ });
834
+ });
835
+ }, [t, u]);
836
+ let d = (e) => {
837
+ n((t) => t.filter((t) => t.id !== e));
838
+ }, f = z[`toast-container--${e}`];
839
+ return /* @__PURE__ */ (0, h.jsx)("div", {
840
+ ref: l,
841
+ className: `${z["toast-container"]} ${f}`,
842
+ children: t.map((n, a) => /* @__PURE__ */ (0, h.jsx)(ne, {
843
+ id: n.id,
844
+ message: n.message,
845
+ type: n.type,
846
+ duration: n.duration,
847
+ onClose: d,
848
+ isGlobalPaused: r,
849
+ onHoverChange: i,
850
+ position: e,
851
+ zIndex: t.length - a
852
+ }, n.id))
853
+ });
854
+ }, H = {
855
+ otpContainer: "_otpContainer_vqdff_1",
856
+ otpInput: "_otpInput_vqdff_8",
857
+ filled: "_filled_vqdff_31",
858
+ disabled: "_disabled_vqdff_36",
859
+ sm: "_sm_vqdff_43",
860
+ lg: "_lg_vqdff_54",
861
+ xl: "_xl_vqdff_65"
862
+ };
863
+ //#endregion
864
+ //#region src/components/otp/OTPInput.tsx
865
+ function oe({ length: e = 6, type: t = "number", onChange: n, onComplete: r, size: i = "lg", disabled: c = !1, autoFocus: l = !1, value: u, className: d, ...f }) {
866
+ let [p, m] = s(Array(e).fill("")), g = o([]);
867
+ a(() => {
868
+ if (u !== void 0) {
869
+ let t = u.split("").slice(0, e);
870
+ m([...t, ...Array(e - t.length).fill("")]);
871
+ }
872
+ }, [u, e]), a(() => {
873
+ l && g.current[0] && g.current[0].focus();
874
+ }, [l]);
875
+ let _ = (e) => t === "number" ? /^\d$/.test(e) : t === "text" ? /^[a-zA-Z]$/.test(e) : t === "alphanumeric" ? /^[a-zA-Z0-9]$/.test(e) : !1, v = (t, i) => {
876
+ if (c) return;
877
+ let a = i.slice(-1);
878
+ if (i === "" || _(a)) {
879
+ let i = [...p];
880
+ i[t] = a.toUpperCase(), m(i);
881
+ let o = i.join("");
882
+ n?.(o), a && t < e - 1 && g.current[t + 1]?.focus(), o.length === e && i.every((e) => e !== "") && r?.(o);
883
+ }
884
+ }, y = (t, r) => {
885
+ if (!c) {
886
+ if (r.key === "Backspace") {
887
+ r.preventDefault();
888
+ let e = [...p];
889
+ p[t] ? (e[t] = "", m(e), n?.(e.join(""))) : t > 0 && (e[t - 1] = "", m(e), n?.(e.join("")), g.current[t - 1]?.focus());
890
+ } else if (r.key === "ArrowLeft" && t > 0) r.preventDefault(), g.current[t - 1]?.focus();
891
+ else if (r.key === "ArrowRight" && t < e - 1) r.preventDefault(), g.current[t + 1]?.focus();
892
+ else if (r.key === "Delete") {
893
+ r.preventDefault();
894
+ let e = [...p];
895
+ e[t] = "", m(e), n?.(e.join(""));
896
+ }
897
+ }
898
+ }, b = (t) => {
899
+ if (t.preventDefault(), c) return;
900
+ let i = t.clipboardData.getData("text/plain").slice(0, e), a = [...p], o = 0;
901
+ for (let e = 0; e < i.length; e++) _(i[e]) && (a[e] = i[e].toUpperCase(), o++);
902
+ m(a), n?.(a.join(""));
903
+ let s = Math.min(o, e - 1);
904
+ g.current[s]?.focus(), a.every((e) => e !== "") && r?.(a.join(""));
905
+ }, x = (e) => {
906
+ g.current[e]?.select();
907
+ }, S = i ? H[i] : "";
908
+ return /* @__PURE__ */ (0, h.jsx)("div", {
909
+ className: `${H.otpContainer} ${S} ${d || ""}`,
910
+ ...f,
911
+ children: p.map((n, r) => /* @__PURE__ */ (0, h.jsx)("input", {
912
+ ref: (e) => {
913
+ g.current[r] = e;
914
+ },
915
+ type: "text",
916
+ inputMode: t === "number" ? "numeric" : "text",
917
+ maxLength: 1,
918
+ value: n,
919
+ onChange: (e) => v(r, e.target.value),
920
+ onKeyDown: (e) => y(r, e),
921
+ onPaste: b,
922
+ onFocus: () => x(r),
923
+ disabled: c,
924
+ className: `${H.otpInput} ${n ? H.filled : ""} ${c ? H.disabled : ""}`,
925
+ "aria-label": `Dígito ${r + 1} de ${e}`
926
+ }, r))
927
+ });
928
+ }
929
+ var U = {
930
+ accordion: "_accordion_p5xc9_1",
931
+ accordionItem: "_accordionItem_p5xc9_8",
932
+ open: "_open_p5xc9_16",
933
+ accordionTrigger: "_accordionTrigger_p5xc9_21",
934
+ triggerText: "_triggerText_p5xc9_46",
935
+ triggerIcon: "_triggerIcon_p5xc9_50",
936
+ accordionContent: "_accordionContent_p5xc9_59",
937
+ accordionContentInner: "_accordionContentInner_p5xc9_64",
938
+ sm: "_sm_p5xc9_71",
939
+ lg: "_lg_p5xc9_89",
940
+ xl: "_xl_p5xc9_103"
941
+ }, W = n(void 0);
942
+ function se({ children: e, multiple: t = !1, defaultValue: n, size: r = "lg", className: i, ...a }) {
943
+ let [o, c] = s(() => n ? Array.isArray(n) ? n : [n] : []), l = (e) => {
944
+ c((n) => n.includes(e) ? n.filter((t) => t !== e) : t ? [...n, e] : [e]);
945
+ }, u = r ? U[r] : "";
946
+ return /* @__PURE__ */ (0, h.jsx)(W.Provider, {
947
+ value: {
948
+ openItems: o,
949
+ toggleItem: l,
950
+ multiple: t
951
+ },
952
+ children: /* @__PURE__ */ (0, h.jsx)("div", {
953
+ className: `${U.accordion} ${u} ${i || ""}`,
954
+ ...a,
955
+ children: e
956
+ })
957
+ });
958
+ }
959
+ function G() {
960
+ let e = i(W);
961
+ if (!e) throw Error("Accordion components must be used within an Accordion");
962
+ return e;
963
+ }
964
+ //#endregion
965
+ //#region src/components/accordion/AccordionItem.tsx
966
+ function ce({ value: e, children: t, className: n, ...r }) {
967
+ let { openItems: i } = G(), a = i.includes(e);
968
+ return /* @__PURE__ */ (0, h.jsx)("div", {
969
+ className: `${U.accordionItem} ${a ? U.open : ""} ${n || ""}`,
970
+ "data-value": e,
971
+ ...r,
972
+ children: t
973
+ });
974
+ }
975
+ function le({ children: e, icon: t, className: n, ...r }) {
976
+ let { openItems: i, toggleItem: s } = G(), c = o(null), u = o(null), d = c.current?.closest("[data-value]")?.getAttribute("data-value") || "", f = i.includes(d);
977
+ return a(() => {
978
+ u.current && l.to(u.current, {
979
+ rotation: f ? 180 : 0,
980
+ duration: .3,
981
+ ease: "power2.out"
982
+ });
983
+ }, [f]), /* @__PURE__ */ (0, h.jsxs)("button", {
984
+ ref: c,
985
+ className: `${U.accordionTrigger} ${n || ""}`,
986
+ onClick: () => {
987
+ let e = c.current?.closest("[data-value]")?.getAttribute("data-value");
988
+ e && s(e);
989
+ },
990
+ type: "button",
991
+ ...r,
992
+ children: [/* @__PURE__ */ (0, h.jsx)("span", {
993
+ className: U.triggerText,
994
+ children: e
995
+ }), /* @__PURE__ */ (0, h.jsx)("span", {
996
+ ref: u,
997
+ className: U.triggerIcon,
998
+ children: t || /* @__PURE__ */ (0, h.jsx)("svg", {
999
+ xmlns: "http://www.w3.org/2000/svg",
1000
+ width: "20",
1001
+ height: "20",
1002
+ viewBox: "0 0 24 24",
1003
+ fill: "none",
1004
+ stroke: "currentColor",
1005
+ strokeWidth: "2",
1006
+ strokeLinecap: "round",
1007
+ strokeLinejoin: "round",
1008
+ children: /* @__PURE__ */ (0, h.jsx)("polyline", { points: "6 9 12 15 18 9" })
1009
+ })
1010
+ })]
1011
+ });
1012
+ }
1013
+ function ue({ children: e, className: t, ...n }) {
1014
+ let { openItems: r } = G(), i = o(null), c = o(null), [u, d] = s(!1), f = o(!0);
1015
+ return a(() => {
1016
+ let e = i.current, t = c.current;
1017
+ if (!e || !t) return;
1018
+ let n = e.closest("[data-value]")?.getAttribute("data-value") || "", a = r.includes(n);
1019
+ if (f.current) {
1020
+ f.current = !1, d(a), a ? (e.style.height = "auto", e.style.overflow = "visible", l.set(t, {
1021
+ opacity: 1,
1022
+ y: 0
1023
+ })) : (e.style.height = "0", l.set(t, {
1024
+ opacity: 0,
1025
+ y: -10
1026
+ }));
1027
+ return;
1028
+ }
1029
+ a !== u && (d(a), a ? (l.to(e, {
1030
+ height: "auto",
1031
+ duration: .4,
1032
+ ease: "power2.out",
1033
+ onStart: () => {
1034
+ e.style.overflow = "hidden";
1035
+ },
1036
+ onComplete: () => {
1037
+ e.style.overflow = "visible";
1038
+ }
1039
+ }), l.fromTo(t, {
1040
+ opacity: 0,
1041
+ y: -10
1042
+ }, {
1043
+ opacity: 1,
1044
+ y: 0,
1045
+ duration: .3,
1046
+ delay: .1,
1047
+ ease: "power2.out"
1048
+ })) : (l.to(e, {
1049
+ height: 0,
1050
+ duration: .3,
1051
+ ease: "power2.in",
1052
+ onStart: () => {
1053
+ e.style.overflow = "hidden";
1054
+ }
1055
+ }), l.to(t, {
1056
+ opacity: 0,
1057
+ y: -10,
1058
+ duration: .2,
1059
+ ease: "power2.in"
1060
+ })));
1061
+ }, [r, u]), /* @__PURE__ */ (0, h.jsx)("div", {
1062
+ ref: i,
1063
+ className: `${U.accordionContent} ${t || ""}`,
1064
+ ...n,
1065
+ children: /* @__PURE__ */ (0, h.jsx)("div", {
1066
+ ref: c,
1067
+ className: U.accordionContentInner,
1068
+ children: e
1069
+ })
1070
+ });
1071
+ }
1072
+ var K = {
1073
+ badge: "_badge_1p9t7_1",
1074
+ default: "_default_1p9t7_15",
1075
+ secondary: "_secondary_1p9t7_21",
1076
+ destructive: "_destructive_1p9t7_27"
1077
+ };
1078
+ //#endregion
1079
+ //#region src/components/badge/Badge.tsx
1080
+ function de({ children: e, variant: t = "default", className: n, ...r }) {
1081
+ let i = t ? K[t] : "";
1082
+ return /* @__PURE__ */ (0, h.jsx)("span", {
1083
+ className: `${K.badge} ${i} ${n || ""}`,
1084
+ ...r,
1085
+ children: e
1086
+ });
1087
+ }
1088
+ var q = {
1089
+ hoverCardWrapper: "_hoverCardWrapper_1cb8v_1",
1090
+ trigger: "_trigger_1cb8v_7",
1091
+ bridge: "_bridge_1cb8v_11",
1092
+ bottom: "_bottom_1cb8v_19",
1093
+ top: "_top_1cb8v_24",
1094
+ hoverCard: "_hoverCard_1cb8v_1"
1095
+ };
1096
+ //#endregion
1097
+ //#region src/components/hovercard/HoverCard.tsx
1098
+ function fe({ children: e, trigger: t, delay: n = 200, className: r, ...i }) {
1099
+ let [c, u] = s(!1), [d, f] = s(!1), [p, m] = s("bottom"), [g, _] = s(0), v = o(null), y = o(null), b = o(null), x = o(null), S = () => {
1100
+ if (!v.current || !y.current) return {
1101
+ position: "bottom",
1102
+ offset: 0
1103
+ };
1104
+ let e = v.current.getBoundingClientRect(), t = y.current.offsetWidth, n = y.current.offsetHeight, r = window.innerHeight, i = window.innerWidth, a = r - e.bottom, o = e.top, s = "bottom";
1105
+ s = a >= n + 10 ? "bottom" : o >= n + 10 ? "top" : "bottom";
1106
+ let c = e.left + e.width / 2, l = t / 2, u = 0, d = c - l, f = c + l;
1107
+ return d < 10 ? u = 10 - d : f > i - 10 && (u = i - 10 - f), {
1108
+ position: s,
1109
+ offset: u
1110
+ };
1111
+ };
1112
+ return a(() => {
1113
+ if (c && y.current) {
1114
+ let { position: e, offset: t } = S();
1115
+ m(e), _(t), l.fromTo(y.current, {
1116
+ opacity: 0,
1117
+ y: e === "bottom" ? -10 : 10,
1118
+ scale: .95
1119
+ }, {
1120
+ opacity: 1,
1121
+ y: 0,
1122
+ scale: 1,
1123
+ duration: .2,
1124
+ ease: "power2.out"
1125
+ });
1126
+ } else !c && y.current && l.to(y.current, {
1127
+ opacity: 0,
1128
+ y: p === "bottom" ? -10 : 10,
1129
+ scale: .95,
1130
+ duration: .15,
1131
+ ease: "power2.in",
1132
+ onComplete: () => {
1133
+ f(!1);
1134
+ }
1135
+ });
1136
+ }, [c, p]), a(() => () => {
1137
+ b.current && clearTimeout(b.current), x.current && clearTimeout(x.current);
1138
+ }, []), /* @__PURE__ */ (0, h.jsxs)("div", {
1139
+ className: `${q.hoverCardWrapper} ${r || ""}`,
1140
+ onMouseEnter: () => {
1141
+ x.current &&= (clearTimeout(x.current), null), b.current = setTimeout(() => {
1142
+ f(!0), u(!0);
1143
+ }, n);
1144
+ },
1145
+ onMouseLeave: () => {
1146
+ b.current &&= (clearTimeout(b.current), null), u(!1);
1147
+ },
1148
+ ...i,
1149
+ children: [/* @__PURE__ */ (0, h.jsx)("div", {
1150
+ ref: v,
1151
+ className: q.trigger,
1152
+ children: t
1153
+ }), d && /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)("div", { className: `${q.bridge} ${q[p]}` }), /* @__PURE__ */ (0, h.jsx)("div", {
1154
+ ref: y,
1155
+ className: `${q.hoverCard} ${q[p]}`,
1156
+ style: { transform: `translateX(calc(-50% + ${g}px))` },
1157
+ role: "tooltip",
1158
+ children: e
1159
+ })] })]
1160
+ });
1161
+ }
1162
+ var J = {
1163
+ checkboxWrapper: "_checkboxWrapper_1owy4_1",
1164
+ hiddenInput: "_hiddenInput_1owy4_7",
1165
+ checkboxLabel: "_checkboxLabel_1owy4_15",
1166
+ checkbox: "_checkbox_1owy4_1",
1167
+ checked: "_checked_1owy4_40",
1168
+ checkmark: "_checkmark_1owy4_45",
1169
+ labelText: "_labelText_1owy4_52",
1170
+ disabled: "_disabled_1owy4_58"
1171
+ };
1172
+ //#endregion
1173
+ //#region src/components/checkbox/Checkbox.tsx
1174
+ function pe({ checked: e, defaultChecked: t = !1, onChange: n, label: r, disabled: i = !1, id: c, className: u, ...d }) {
1175
+ let [f, p] = s(t), m = e !== void 0, g = m ? e : f, _ = o(null), v = o(null), y = o(null), b = () => {
1176
+ if (i) return;
1177
+ let e = !g;
1178
+ m || p(e), n?.(e);
1179
+ };
1180
+ a(() => {
1181
+ !_.current || !v.current || !y.current || (g ? (l.to(_.current, {
1182
+ scale: .9,
1183
+ duration: .1,
1184
+ ease: "power2.in",
1185
+ onComplete: () => {
1186
+ l.to(_.current, {
1187
+ scale: 1,
1188
+ duration: .2,
1189
+ ease: "elastic.out(1, 0.5)"
1190
+ });
1191
+ }
1192
+ }), l.fromTo(v.current, {
1193
+ scale: 0,
1194
+ rotation: -45
1195
+ }, {
1196
+ scale: 1,
1197
+ rotation: 0,
1198
+ duration: .3,
1199
+ ease: "back.out(1.7)"
1200
+ }), l.fromTo(y.current, {
1201
+ strokeDasharray: 100,
1202
+ strokeDashoffset: 100
1203
+ }, {
1204
+ strokeDashoffset: 0,
1205
+ duration: .3,
1206
+ ease: "power2.out"
1207
+ })) : (l.to(v.current, {
1208
+ scale: 0,
1209
+ rotation: 45,
1210
+ duration: .2,
1211
+ ease: "back.in(1.7)"
1212
+ }), l.to(_.current, {
1213
+ scale: 1,
1214
+ duration: .2,
1215
+ ease: "power2.out"
1216
+ })));
1217
+ }, [g]);
1218
+ let x = c || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
1219
+ return /* @__PURE__ */ (0, h.jsxs)("div", {
1220
+ className: `${J.checkboxWrapper} ${i ? J.disabled : ""} ${u || ""}`,
1221
+ children: [/* @__PURE__ */ (0, h.jsx)("input", {
1222
+ type: "checkbox",
1223
+ id: x,
1224
+ checked: g,
1225
+ onChange: b,
1226
+ disabled: i,
1227
+ className: J.hiddenInput,
1228
+ ...d
1229
+ }), /* @__PURE__ */ (0, h.jsxs)("label", {
1230
+ htmlFor: x,
1231
+ className: J.checkboxLabel,
1232
+ children: [/* @__PURE__ */ (0, h.jsx)("div", {
1233
+ ref: _,
1234
+ className: `${J.checkbox} ${g ? J.checked : ""}`,
1235
+ children: /* @__PURE__ */ (0, h.jsx)("svg", {
1236
+ ref: v,
1237
+ className: J.checkmark,
1238
+ viewBox: "0 0 24 24",
1239
+ fill: "none",
1240
+ xmlns: "http://www.w3.org/2000/svg",
1241
+ children: /* @__PURE__ */ (0, h.jsx)("path", {
1242
+ ref: y,
1243
+ d: "M5 13l4 4L19 7",
1244
+ stroke: "currentColor",
1245
+ strokeWidth: "3",
1246
+ strokeLinecap: "round",
1247
+ strokeLinejoin: "round"
1248
+ })
1249
+ })
1250
+ }), r && /* @__PURE__ */ (0, h.jsx)("span", {
1251
+ className: J.labelText,
1252
+ children: r
1253
+ })]
1254
+ })]
1255
+ });
1256
+ }
1257
+ var Y = {
1258
+ dropdownWrapper: "_dropdownWrapper_iqkch_1",
1259
+ trigger: "_trigger_iqkch_7",
1260
+ dropdownMenu: "_dropdownMenu_iqkch_11",
1261
+ bottom: "_bottom_iqkch_24",
1262
+ top: "_top_iqkch_28",
1263
+ dropdownItem: "_dropdownItem_iqkch_32",
1264
+ disabled: "_disabled_iqkch_50",
1265
+ hasSubItems: "_hasSubItems_iqkch_56",
1266
+ itemContent: "_itemContent_iqkch_60",
1267
+ arrowIcon: "_arrowIcon_iqkch_64",
1268
+ subMenu: "_subMenu_iqkch_70",
1269
+ separator: "_separator_iqkch_84"
1270
+ }, X = n(void 0);
1271
+ function me({ children: e, trigger: t, className: n, ...r }) {
1272
+ let [i, c] = s(!1), [u, d] = s(!1), [f, p] = s("bottom"), m = o(null), g = o(null), _ = () => {
1273
+ if (!m.current || !g.current) return "bottom";
1274
+ let e = m.current.getBoundingClientRect(), t = g.current.offsetHeight, n = window.innerHeight - e.bottom, r = e.top;
1275
+ return n >= t + 10 ? "bottom" : r >= t + 10 ? "top" : "bottom";
1276
+ }, v = () => {
1277
+ i ? c(!1) : (d(!0), c(!0));
1278
+ }, y = () => {
1279
+ c(!1);
1280
+ };
1281
+ return a(() => {
1282
+ if (i && g.current) {
1283
+ let e = _();
1284
+ p(e), l.fromTo(g.current, {
1285
+ opacity: 0,
1286
+ y: e === "bottom" ? -10 : 10,
1287
+ scale: .95
1288
+ }, {
1289
+ opacity: 1,
1290
+ y: 0,
1291
+ scale: 1,
1292
+ duration: .2,
1293
+ ease: "power2.out"
1294
+ });
1295
+ } else !i && g.current && l.to(g.current, {
1296
+ opacity: 0,
1297
+ y: f === "bottom" ? -10 : 10,
1298
+ scale: .95,
1299
+ duration: .15,
1300
+ ease: "power2.in",
1301
+ onComplete: () => {
1302
+ d(!1);
1303
+ }
1304
+ });
1305
+ }, [i, f]), a(() => {
1306
+ let e = (e) => {
1307
+ m.current && g.current && !m.current.contains(e.target) && !g.current.contains(e.target) && y();
1308
+ };
1309
+ return i && document.addEventListener("mousedown", e), () => {
1310
+ document.removeEventListener("mousedown", e);
1311
+ };
1312
+ }, [i]), /* @__PURE__ */ (0, h.jsx)(X.Provider, {
1313
+ value: {
1314
+ isOpen: i,
1315
+ closeMenu: y
1316
+ },
1317
+ children: /* @__PURE__ */ (0, h.jsxs)("div", {
1318
+ className: `${Y.dropdownWrapper} ${n || ""}`,
1319
+ ...r,
1320
+ children: [/* @__PURE__ */ (0, h.jsx)("div", {
1321
+ ref: m,
1322
+ onClick: v,
1323
+ className: Y.trigger,
1324
+ children: t
1325
+ }), u && /* @__PURE__ */ (0, h.jsx)("div", {
1326
+ ref: g,
1327
+ className: `${Y.dropdownMenu} ${Y[f]}`,
1328
+ children: e
1329
+ })]
1330
+ })
1331
+ });
1332
+ }
1333
+ function Z() {
1334
+ let e = i(X);
1335
+ if (!e) throw Error("Dropdown components must be used within DropdownMenu");
1336
+ return e;
1337
+ }
1338
+ function he({ children: e, onClick: t, disabled: n = !1, subItems: r, className: i, ...c }) {
1339
+ let { closeMenu: u } = Z(), [d, f] = s(!1), [p, m] = s(!1), g = o(null), _ = o(null), v = o(null);
1340
+ return a(() => {
1341
+ d && _.current ? l.fromTo(_.current, {
1342
+ opacity: 0,
1343
+ x: -10,
1344
+ scale: .95
1345
+ }, {
1346
+ opacity: 1,
1347
+ x: 0,
1348
+ scale: 1,
1349
+ duration: .2,
1350
+ ease: "power2.out"
1351
+ }) : !d && _.current && l.to(_.current, {
1352
+ opacity: 0,
1353
+ x: -10,
1354
+ scale: .95,
1355
+ duration: .15,
1356
+ ease: "power2.in",
1357
+ onComplete: () => {
1358
+ m(!1);
1359
+ }
1360
+ });
1361
+ }, [d]), a(() => () => {
1362
+ v.current && clearTimeout(v.current);
1363
+ }, []), /* @__PURE__ */ (0, h.jsxs)("div", {
1364
+ ref: g,
1365
+ className: `${Y.dropdownItem} ${n ? Y.disabled : ""} ${r ? Y.hasSubItems : ""} ${i || ""}`,
1366
+ onClick: () => {
1367
+ n || r || (t?.(), u());
1368
+ },
1369
+ onMouseEnter: () => {
1370
+ r && !n && (v.current = setTimeout(() => {
1371
+ m(!0), f(!0);
1372
+ }, 150));
1373
+ },
1374
+ onMouseLeave: () => {
1375
+ v.current && clearTimeout(v.current), f(!1);
1376
+ },
1377
+ ...c,
1378
+ children: [/* @__PURE__ */ (0, h.jsx)("span", {
1379
+ className: Y.itemContent,
1380
+ children: e
1381
+ }), r && /* @__PURE__ */ (0, h.jsxs)(h.Fragment, { children: [/* @__PURE__ */ (0, h.jsx)("svg", {
1382
+ className: Y.arrowIcon,
1383
+ width: "16",
1384
+ height: "16",
1385
+ viewBox: "0 0 24 24",
1386
+ fill: "none",
1387
+ stroke: "currentColor",
1388
+ strokeWidth: "2",
1389
+ strokeLinecap: "round",
1390
+ strokeLinejoin: "round",
1391
+ children: /* @__PURE__ */ (0, h.jsx)("polyline", { points: "9 18 15 12 9 6" })
1392
+ }), p && /* @__PURE__ */ (0, h.jsx)("div", {
1393
+ ref: _,
1394
+ className: Y.subMenu,
1395
+ children: r
1396
+ })] })]
1397
+ });
1398
+ }
1399
+ function ge({}) {
1400
+ return /* @__PURE__ */ (0, h.jsx)("div", { className: Y.separator });
1401
+ }
1402
+ var Q = {
1403
+ tabsContainer: "_tabsContainer_bvqc3_1",
1404
+ tabsList: "_tabsList_bvqc3_8",
1405
+ tab: "_tab_bvqc3_1",
1406
+ active: "_active_bvqc3_37",
1407
+ indicator: "_indicator_bvqc3_41"
1408
+ };
1409
+ //#endregion
1410
+ //#region src/components/tabs/Tabs.tsx
1411
+ function _e({ tabs: e, defaultValue: t, onChange: n, className: r, ...i }) {
1412
+ let [c, u] = s(t || e[0]?.value), [d, f] = s(!0), p = o(null), m = o(/* @__PURE__ */ new Map()), g = o(null), _ = (e) => {
1413
+ e !== c && (u(e), n?.(e));
1414
+ };
1415
+ a(() => {
1416
+ let e = m.current.get(c);
1417
+ if (!e || !p.current) return;
1418
+ let { offsetLeft: t, offsetWidth: n } = e, r = t - 6;
1419
+ d ? (l.set(p.current, {
1420
+ x: r,
1421
+ width: n
1422
+ }), f(!1)) : l.to(p.current, {
1423
+ x: r,
1424
+ width: n,
1425
+ duration: .3,
1426
+ ease: "power2.out"
1427
+ });
1428
+ }, [c, d]), a(() => {
1429
+ g.current && (d ? l.set(g.current, {
1430
+ opacity: 1,
1431
+ y: 0
1432
+ }) : l.fromTo(g.current, {
1433
+ opacity: 0,
1434
+ y: 10
1435
+ }, {
1436
+ opacity: 1,
1437
+ y: 0,
1438
+ duration: .3,
1439
+ ease: "power2.out"
1440
+ }));
1441
+ }, [c, d]);
1442
+ let v = e.find((e) => e.value === c)?.content;
1443
+ return /* @__PURE__ */ (0, h.jsxs)("div", {
1444
+ className: `${Q.tabsContainer} ${r || ""}`,
1445
+ ...i,
1446
+ children: [/* @__PURE__ */ (0, h.jsxs)("div", {
1447
+ className: Q.tabsList,
1448
+ children: [e.map((e) => /* @__PURE__ */ (0, h.jsx)("button", {
1449
+ ref: (t) => {
1450
+ t && m.current.set(e.value, t);
1451
+ },
1452
+ className: `${Q.tab} ${c === e.value ? Q.active : ""}`,
1453
+ onClick: () => _(e.value),
1454
+ children: e.label
1455
+ }, e.value)), /* @__PURE__ */ (0, h.jsx)("div", {
1456
+ ref: p,
1457
+ className: Q.indicator
1458
+ })]
1459
+ }), /* @__PURE__ */ (0, h.jsx)("div", {
1460
+ ref: g,
1461
+ className: Q.tabContent,
1462
+ children: v
1463
+ })]
1464
+ });
1465
+ }
1466
+ var $ = {
1467
+ tooltipWrapper: "_tooltipWrapper_39a7p_1",
1468
+ trigger: "_trigger_39a7p_7",
1469
+ tooltip: "_tooltip_39a7p_1",
1470
+ top: "_top_39a7p_28",
1471
+ bottom: "_bottom_39a7p_34",
1472
+ left: "_left_39a7p_40",
1473
+ right: "_right_39a7p_46",
1474
+ arrow: "_arrow_39a7p_52",
1475
+ "arrow-top": "_arrow-top_39a7p_61",
1476
+ "arrow-bottom": "_arrow-bottom_39a7p_69",
1477
+ "arrow-left": "_arrow-left_39a7p_77",
1478
+ "arrow-right": "_arrow-right_39a7p_85"
1479
+ };
1480
+ //#endregion
1481
+ //#region src/components/tooltip/Tooltip.tsx
1482
+ function ve({ children: e, content: t, position: n = "top", delay: r = 200, className: i, ...c }) {
1483
+ let [u, d] = s(!1), [f, p] = s(!1), [m, g] = s(n), _ = o(null), v = o(null), y = o(null), b = o(null), x = () => {
1484
+ if (!_.current || !v.current) return n;
1485
+ let e = _.current.getBoundingClientRect(), t = v.current.getBoundingClientRect(), r = window.innerWidth, i = window.innerHeight, a = {
1486
+ top: {
1487
+ available: e.top >= t.height + 12,
1488
+ priority: n === "top" ? 4 : 3
1489
+ },
1490
+ bottom: {
1491
+ available: i - e.bottom >= t.height + 12,
1492
+ priority: n === "bottom" ? 4 : 2
1493
+ },
1494
+ left: {
1495
+ available: e.left >= t.width + 12,
1496
+ priority: n === "left" ? 4 : 1
1497
+ },
1498
+ right: {
1499
+ available: r - e.right >= t.width + 12,
1500
+ priority: n === "right" ? 4 : 0
1501
+ }
1502
+ };
1503
+ return Object.keys(a).filter((e) => a[e].available).sort((e, t) => a[t].priority - a[e].priority)[0] || n;
1504
+ };
1505
+ return a(() => {
1506
+ if (u && v.current && y.current) {
1507
+ let e = x();
1508
+ g(e);
1509
+ let t = e === "top" || e === "bottom", n = e === "top" || e === "left" ? -1 : 1;
1510
+ l.fromTo(v.current, {
1511
+ opacity: 0,
1512
+ scale: .8,
1513
+ y: t ? n * 15 : 0,
1514
+ x: t ? 0 : n * 15,
1515
+ rotateX: t ? n * 15 : 0,
1516
+ rotateY: t ? 0 : n * 15
1517
+ }, {
1518
+ opacity: 1,
1519
+ scale: 1,
1520
+ y: 0,
1521
+ x: 0,
1522
+ rotateX: 0,
1523
+ rotateY: 0,
1524
+ duration: .4,
1525
+ ease: "back.out(1.7)"
1526
+ }), l.fromTo(y.current, {
1527
+ opacity: 0,
1528
+ scale: 0
1529
+ }, {
1530
+ opacity: 1,
1531
+ scale: 1,
1532
+ duration: .3,
1533
+ delay: .1,
1534
+ ease: "back.out(2)"
1535
+ });
1536
+ } else if (!u && v.current && y.current) {
1537
+ let e = m === "top" || m === "bottom", t = m === "top" || m === "left" ? -1 : 1;
1538
+ l.to(y.current, {
1539
+ opacity: 0,
1540
+ scale: 0,
1541
+ duration: .15,
1542
+ ease: "power2.in"
1543
+ }), l.to(v.current, {
1544
+ opacity: 0,
1545
+ scale: .8,
1546
+ y: e ? t * 10 : 0,
1547
+ x: e ? 0 : t * 10,
1548
+ duration: .2,
1549
+ ease: "power2.in",
1550
+ onComplete: () => {
1551
+ p(!1);
1552
+ }
1553
+ });
1554
+ }
1555
+ }, [u, m]), a(() => () => {
1556
+ b.current && clearTimeout(b.current);
1557
+ }, []), /* @__PURE__ */ (0, h.jsxs)("div", {
1558
+ className: `${$.tooltipWrapper} ${i || ""}`,
1559
+ onMouseEnter: () => {
1560
+ b.current = setTimeout(() => {
1561
+ p(!0), d(!0);
1562
+ }, r);
1563
+ },
1564
+ onMouseLeave: () => {
1565
+ b.current &&= (clearTimeout(b.current), null), d(!1);
1566
+ },
1567
+ ...c,
1568
+ children: [/* @__PURE__ */ (0, h.jsx)("div", {
1569
+ ref: _,
1570
+ className: $.trigger,
1571
+ children: e
1572
+ }), f && /* @__PURE__ */ (0, h.jsxs)("div", {
1573
+ ref: v,
1574
+ className: `${$.tooltip} ${$[m]}`,
1575
+ role: "tooltip",
1576
+ children: [t, /* @__PURE__ */ (0, h.jsx)("div", {
1577
+ ref: y,
1578
+ className: `${$.arrow} ${$[`arrow-${m}`]}`
1579
+ })]
1580
+ })]
1581
+ });
1582
+ }
1583
+ //#endregion
1584
+ export { se as Accordion, ue as AccordionContent, ce as AccordionItem, le as AccordionTrigger, de as Badge, g as Button, b as Card, pe as Checkbox, he as DropdownItem, me as DropdownMenu, ge as DropdownSeparator, w as HeroSheet, fe as HoverCard, v as Input, M as Modal, I as ModalBody, R as ModalContent, te as ModalFooter, P as ModalHeader, oe as OTPInput, T as Sheet, D as SheetContent, k as SheetFooter, _e as Tabs, ae as ToastContainer, ve as Tooltip, ie as toast };