sander-ui 0.1.3 → 0.1.4

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.
Files changed (76) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +75 -1611
  3. package/dist/index10.js +39 -0
  4. package/dist/index11.js +24 -0
  5. package/dist/index12.js +79 -0
  6. package/dist/index13.js +172 -0
  7. package/dist/index14.js +25 -0
  8. package/dist/index15.js +22 -0
  9. package/dist/index16.js +77 -0
  10. package/dist/index17.js +64 -0
  11. package/dist/index18.js +43 -0
  12. package/dist/index19.js +34 -0
  13. package/dist/index20.js +29 -0
  14. package/dist/index21.js +21 -0
  15. package/dist/index22.js +42 -0
  16. package/dist/index23.js +49 -0
  17. package/dist/index24.js +134 -0
  18. package/dist/index25.js +20 -0
  19. package/dist/index26.js +25 -0
  20. package/dist/index27.js +57 -0
  21. package/dist/index28.js +21 -0
  22. package/dist/index29.js +48 -0
  23. package/dist/index3.js +67 -0
  24. package/dist/index30.js +7 -0
  25. package/dist/index31.js +19 -0
  26. package/dist/index32.js +10 -0
  27. package/dist/index33.js +6 -0
  28. package/dist/index34.js +29 -0
  29. package/dist/index35.js +28 -0
  30. package/dist/index36.js +21 -0
  31. package/dist/index37.js +25 -0
  32. package/dist/index38.js +10 -0
  33. package/dist/index39.js +16 -0
  34. package/dist/index4.js +50 -0
  35. package/dist/index40.js +10 -0
  36. package/dist/index41.js +9 -0
  37. package/dist/index42.js +9 -0
  38. package/dist/index43.js +28 -0
  39. package/dist/index44.js +15 -0
  40. package/dist/index45.js +42 -0
  41. package/dist/index46.js +25 -0
  42. package/dist/index47.js +29 -0
  43. package/dist/index48.js +15 -0
  44. package/dist/index49.js +23 -0
  45. package/dist/index5.js +62 -0
  46. package/dist/index50.js +17 -0
  47. package/dist/index51.js +6 -0
  48. package/dist/index52.js +19 -0
  49. package/dist/index53.js +28 -0
  50. package/dist/index54.js +17 -0
  51. package/dist/index55.js +15 -0
  52. package/dist/index56.js +44 -0
  53. package/dist/index57.js +6 -0
  54. package/dist/index58.js +19 -0
  55. package/dist/index59.js +19 -0
  56. package/dist/index6.js +42 -0
  57. package/dist/index60.js +25 -0
  58. package/dist/index61.js +23 -0
  59. package/dist/index62.js +19 -0
  60. package/dist/index63.js +15 -0
  61. package/dist/index64.js +33 -0
  62. package/dist/index65.js +37 -0
  63. package/dist/index66.js +4 -0
  64. package/dist/index67.js +6 -0
  65. package/dist/index68.js +23 -0
  66. package/dist/index69.js +4 -0
  67. package/dist/index7.js +44 -0
  68. package/dist/index70.js +4 -0
  69. package/dist/index71.js +8 -0
  70. package/dist/index72.js +36 -0
  71. package/dist/index73.js +14 -0
  72. package/dist/index74.js +9 -0
  73. package/dist/index75.js +7 -0
  74. package/dist/index8.js +30 -0
  75. package/dist/index9.js +41 -0
  76. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,1614 +1,78 @@
1
- import { jsx as s, jsxs as h, Fragment as ve } from "react/jsx-runtime";
2
- import { useState as v, useCallback as ce, useId as ee, useContext as ie, useRef as k, createContext as le, forwardRef as F, createElement as Q, Children as ke, useEffect as A, cloneElement as de } from "react";
3
- import { createPortal as _e } from "react-dom";
4
- function ye(e) {
5
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
- }
7
- var J = { exports: {} };
8
- var se;
9
- function $e() {
10
- return se || (se = 1, (function(e) {
11
- (function() {
12
- var t = {}.hasOwnProperty;
13
- function n() {
14
- for (var o = "", c = 0; c < arguments.length; c++) {
15
- var i = arguments[c];
16
- i && (o = a(o, r(i)));
17
- }
18
- return o;
19
- }
20
- function r(o) {
21
- if (typeof o == "string" || typeof o == "number")
22
- return o;
23
- if (typeof o != "object")
24
- return "";
25
- if (Array.isArray(o))
26
- return n.apply(null, o);
27
- if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
28
- return o.toString();
29
- var c = "";
30
- for (var i in o)
31
- t.call(o, i) && o[i] && (c = a(c, i));
32
- return c;
33
- }
34
- function a(o, c) {
35
- return c ? o ? o + " " + c : o + c : o;
36
- }
37
- e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
38
- })();
39
- })(J)), J.exports;
40
- }
41
- var Ne = $e();
42
- const l = /* @__PURE__ */ ye(Ne), xe = "_accordion_7j7b7_1", Ce = "_item_7j7b7_6", je = "_disabled_7j7b7_14", Ee = "_trigger_7j7b7_19", ze = "_content_7j7b7_64", Ae = "_contentOpen_7j7b7_70", De = "_contentInner_7j7b7_74", L = {
43
- accordion: xe,
44
- item: Ce,
45
- disabled: je,
46
- trigger: Ee,
47
- content: ze,
48
- contentOpen: Ae,
49
- contentInner: De
50
- }, ue = le({
51
- openId: null,
52
- toggle: () => {
53
- },
54
- exclusive: !1
55
- }), Wr = ({
56
- exclusive: e = !1,
57
- children: t,
58
- className: n,
59
- ...r
60
- }) => {
61
- const [a, o] = v(null), c = ce(
62
- (i) => {
63
- o((d) => d === i ? null : i);
64
- },
65
- []
66
- );
67
- return /* @__PURE__ */ s(ue.Provider, { value: { openId: a, toggle: c, exclusive: e }, children: /* @__PURE__ */ s("div", { className: l(L.accordion, n), ...r, children: t }) });
68
- }, Zr = ({
69
- title: e,
70
- children: t,
71
- defaultOpen: n,
72
- disabled: r,
73
- className: a,
74
- ...o
75
- }) => {
76
- const c = ee(), { openId: i, toggle: d, exclusive: _ } = ie(ue), u = k(null), [f, p] = v(
77
- n ?? !1
78
- ), w = _ ? i === c : f, m = (b) => {
79
- b.preventDefault(), !r && (_ ? d(c) : p((g) => !g));
80
- };
81
- return /* @__PURE__ */ h(
82
- "details",
83
- {
84
- open: w,
85
- className: l(L.item, { [L.disabled]: r }, a),
86
- ...o,
87
- children: [
88
- /* @__PURE__ */ s(
89
- "summary",
90
- {
91
- className: L.trigger,
92
- onClick: m,
93
- "aria-disabled": r || void 0,
94
- children: e
95
- }
96
- ),
97
- /* @__PURE__ */ s(
98
- "div",
99
- {
100
- ref: u,
101
- className: l(L.content, { [L.contentOpen]: w }),
102
- children: /* @__PURE__ */ s("div", { className: L.contentInner, children: t })
103
- }
104
- )
105
- ]
106
- }
107
- );
108
- };
109
- const pe = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim();
110
- const Ie = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
111
- const Re = (e) => e.replace(
112
- /^([A-Z])|[\s-_]+(\w)/g,
113
- (t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
114
- );
115
- const re = (e) => {
116
- const t = Re(e);
117
- return t.charAt(0).toUpperCase() + t.slice(1);
118
- };
119
- var qe = {
120
- xmlns: "http://www.w3.org/2000/svg",
121
- width: 24,
122
- height: 24,
123
- viewBox: "0 0 24 24",
124
- fill: "none",
125
- stroke: "currentColor",
126
- strokeWidth: 2,
127
- strokeLinecap: "round",
128
- strokeLinejoin: "round"
129
- };
130
- const Me = (e) => {
131
- for (const t in e)
132
- if (t.startsWith("aria-") || t === "role" || t === "title")
133
- return !0;
134
- return !1;
135
- };
136
- const Be = F(
137
- ({
138
- color: e = "currentColor",
139
- size: t = 24,
140
- strokeWidth: n = 2,
141
- absoluteStrokeWidth: r,
142
- className: a = "",
143
- children: o,
144
- iconNode: c,
145
- ...i
146
- }, d) => Q(
147
- "svg",
148
- {
149
- ref: d,
150
- ...qe,
151
- width: t,
152
- height: t,
153
- stroke: e,
154
- strokeWidth: r ? Number(n) * 24 / Number(t) : n,
155
- className: pe("lucide", a),
156
- ...!o && !Me(i) && { "aria-hidden": "true" },
157
- ...i
158
- },
159
- [
160
- ...c.map(([_, u]) => Q(_, u)),
161
- ...Array.isArray(o) ? o : [o]
162
- ]
163
- )
164
- );
165
- const D = (e, t) => {
166
- const n = F(
167
- ({ className: r, ...a }, o) => Q(Be, {
168
- ref: o,
169
- iconNode: t,
170
- className: pe(
171
- `lucide-${Ie(re(e))}`,
172
- `lucide-${e}`,
173
- r
174
- ),
175
- ...a
176
- })
177
- );
178
- return n.displayName = re(e), n;
179
- };
180
- const Te = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Le = D("chevron-left", Te);
181
- const Se = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], me = D("chevron-right", Se);
182
- const Fe = [
183
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
184
- ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
185
- ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
186
- ], he = D("circle-alert", Fe);
187
- const Oe = [
188
- ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
189
- ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
190
- ], fe = D("circle-check-big", Oe);
191
- const He = [
192
- ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
193
- ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
194
- ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
195
- ], Pe = D("ellipsis", He);
196
- const Ke = [
197
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
198
- ["path", { d: "M12 16v-4", key: "1dtifu" }],
199
- ["path", { d: "M12 8h.01", key: "e9boi3" }]
200
- ], Y = D("info", Ke);
201
- const Ue = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ve = D("loader-circle", Ue);
202
- const Ge = [
203
- [
204
- "path",
205
- {
206
- 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-3",
207
- key: "wmoenq"
208
- }
209
- ],
210
- ["path", { d: "M12 9v4", key: "juzpu7" }],
211
- ["path", { d: "M12 17h.01", key: "p32p05" }]
212
- ], be = D("triangle-alert", Ge);
213
- const We = [
214
- ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
215
- ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
216
- ], W = D("x", We), Ze = "_alert_16i4u_1", Xe = "_icon_16i4u_11", Je = "_content_16i4u_18", Qe = "_title_16i4u_23", Ye = "_description_16i4u_27", et = "_dismiss_16i4u_35", tt = "_success_16i4u_62", nt = "_error_16i4u_68", st = "_warning_16i4u_74", rt = "_info_16i4u_80", B = {
217
- alert: Ze,
218
- icon: Xe,
219
- content: Je,
220
- title: Qe,
221
- description: Ye,
222
- dismiss: et,
223
- success: tt,
224
- error: nt,
225
- warning: st,
226
- info: rt
227
- }, ot = {
228
- success: fe,
229
- error: he,
230
- warning: be,
231
- info: Y
232
- }, Xr = ({
233
- variant: e = "info",
234
- title: t,
235
- children: n,
236
- onDismiss: r,
237
- className: a,
238
- ...o
239
- }) => {
240
- const c = ot[e];
241
- return /* @__PURE__ */ h(
242
- "div",
243
- {
244
- role: e === "error" || e === "warning" ? "alert" : "status",
245
- className: l(B.alert, B[e], a),
246
- ...o,
247
- children: [
248
- /* @__PURE__ */ s(c, { className: B.icon }),
249
- /* @__PURE__ */ h("div", { className: B.content, children: [
250
- t && /* @__PURE__ */ s("div", { className: B.title, children: t }),
251
- n && /* @__PURE__ */ s("div", { className: B.description, children: n })
252
- ] }),
253
- r && /* @__PURE__ */ s(
254
- "button",
255
- {
256
- onClick: r,
257
- "aria-label": "Dismiss",
258
- className: B.dismiss,
259
- children: /* @__PURE__ */ s(W, { size: 16 })
260
- }
261
- )
262
- ]
263
- }
264
- );
265
- }, at = /* @__PURE__ */ new Set([
266
- "van",
267
- "von",
268
- "de",
269
- "del",
270
- "den",
271
- "der",
272
- "di",
273
- "du",
274
- "el",
275
- "la",
276
- "le",
277
- "los",
278
- "het",
279
- "ten",
280
- "ter",
281
- "op"
282
- ]);
283
- function ct(e, t = "?") {
284
- if (!e?.trim()) return t;
285
- const n = e.trim().split(/\s+/), r = n.filter((c) => !at.has(c.toLowerCase()));
286
- if (r.length === 0) return n[0][0].toUpperCase();
287
- if (r.length === 1) return r[0][0].toUpperCase();
288
- const a = r[0][0], o = r[r.length - 1][0];
289
- return (a + o).toUpperCase();
290
- }
291
- const it = "_wrapper_1p6ce_1", lt = "_sm_1p6ce_8", dt = "_md_1p6ce_14", _t = "_lg_1p6ce_20", ut = "_xl_1p6ce_26", pt = "_image_1p6ce_38", mt = "_fallback_1p6ce_45", ht = "_status_1p6ce_59", ft = "_group_1p6ce_88", N = {
292
- wrapper: it,
293
- sm: lt,
294
- md: dt,
295
- lg: _t,
296
- xl: ut,
297
- "2xl": "_2xl_1p6ce_32",
298
- image: pt,
299
- fallback: mt,
300
- status: ht,
301
- "status-online": "_status-online_1p6ce_71",
302
- "status-offline": "_status-offline_1p6ce_75",
303
- "status-busy": "_status-busy_1p6ce_79",
304
- "status-away": "_status-away_1p6ce_83",
305
- group: ft
306
- }, bt = { sm: 24, md: 32, lg: 40, xl: 56, "2xl": 80 }, Jr = ({
307
- src: e,
308
- name: t,
309
- size: n = "md",
310
- status: r,
311
- className: a,
312
- ...o
313
- }) => {
314
- const [c, i] = v(!1), d = bt[n];
315
- return /* @__PURE__ */ h(
316
- "div",
317
- {
318
- className: l(N.wrapper, N[n], a),
319
- role: "img",
320
- "aria-label": t || "Avatar",
321
- ...o,
322
- children: [
323
- e && !c ? /* @__PURE__ */ s(
324
- "img",
325
- {
326
- src: e,
327
- alt: t || "Avatar",
328
- width: d,
329
- height: d,
330
- className: N.image,
331
- onError: () => i(!0)
332
- }
333
- ) : /* @__PURE__ */ s("div", { className: N.fallback, children: ct(t) }),
334
- r ? /* @__PURE__ */ s(
335
- "span",
336
- {
337
- className: l(N.status, N[`status-${r}`]),
338
- "aria-label": r
339
- }
340
- ) : null
341
- ]
342
- }
343
- );
344
- }, Qr = ({
345
- max: e,
346
- children: t,
347
- className: n,
348
- ...r
349
- }) => {
350
- const a = ke.toArray(t), o = e ? a.slice(0, e) : a, c = e ? a.length - e : 0;
351
- return /* @__PURE__ */ h("div", { className: l(N.group, n), ...r, children: [
352
- o,
353
- c > 0 ? /* @__PURE__ */ s("div", { className: l(N.wrapper, N.md), children: /* @__PURE__ */ h("div", { className: N.fallback, children: [
354
- "+",
355
- c
356
- ] }) }) : null
357
- ] });
358
- }, gt = "_badge_19d90_1", wt = "_sm_19d90_10", vt = "_md_19d90_15", kt = "_dot_19d90_21", yt = "_remove_19d90_30", $t = "_filled_19d90_56", Nt = "_success_19d90_61", xt = "_warning_19d90_66", Ct = "_error_19d90_71", jt = "_info_19d90_76", Et = "_outline_19d90_82", O = {
359
- badge: gt,
360
- sm: wt,
361
- md: vt,
362
- dot: kt,
363
- remove: yt,
364
- filled: $t,
365
- default: "_default_19d90_56",
366
- success: Nt,
367
- warning: xt,
368
- error: Ct,
369
- info: jt,
370
- outline: Et
371
- }, Yr = ({
372
- children: e,
373
- variant: t = "default",
374
- appearance: n = "filled",
375
- size: r = "sm",
376
- dot: a,
377
- onRemove: o,
378
- className: c,
379
- ...i
380
- }) => /* @__PURE__ */ h(
381
- "span",
382
- {
383
- className: l(
384
- O.badge,
385
- O[t],
386
- O[n],
387
- O[r],
388
- c
389
- ),
390
- ...i,
391
- children: [
392
- a && /* @__PURE__ */ s("span", { className: O.dot }),
393
- e,
394
- o && /* @__PURE__ */ s(
395
- "button",
396
- {
397
- onClick: o,
398
- "aria-label": "Remove",
399
- className: O.remove,
400
- children: /* @__PURE__ */ s(W, { size: r === "sm" ? 10 : 12 })
401
- }
402
- )
403
- ]
404
- }
405
- ), zt = "_list_2tzve_1", At = "_item_2tzve_9", Dt = "_separator_2tzve_15", It = "_link_2tzve_22", Rt = "_current_2tzve_37", qt = "_text_2tzve_42", Mt = "_ellipsis_2tzve_46", q = {
406
- list: zt,
407
- item: At,
408
- separator: Dt,
409
- link: It,
410
- current: Rt,
411
- text: qt,
412
- ellipsis: Mt
413
- }, Bt = () => /* @__PURE__ */ s(me, { className: q.separator }), eo = ({
414
- items: e,
415
- separator: t,
416
- maxItems: n,
417
- className: r,
418
- ...a
419
- }) => {
420
- const [o, c] = v(!1), i = n && n > 1 && e.length > n && !o, d = i ? [e[0], ...e.slice(-(n - 1))] : e, _ = (u) => t ? /* @__PURE__ */ s("span", { className: q.separator, children: t }, u) : /* @__PURE__ */ s(Bt, {}, u);
421
- return /* @__PURE__ */ s("nav", { "aria-label": "Breadcrumb", className: l(r), ...a, children: /* @__PURE__ */ s("ol", { className: q.list, children: d.map((u, f) => {
422
- const p = i ? f === d.length - 1 : f === e.length - 1, w = typeof u.label == "string" ? u.label : `crumb-${f}`;
423
- return /* @__PURE__ */ h("li", { className: q.item, children: [
424
- f > 0 && _(`sep-${w}`),
425
- i && f === 1 && /* @__PURE__ */ h(ve, { children: [
426
- /* @__PURE__ */ s(
427
- "button",
428
- {
429
- className: q.ellipsis,
430
- onClick: () => c(!0),
431
- "aria-label": "Show full breadcrumb trail",
432
- children: /* @__PURE__ */ s(Pe, { size: 14 })
433
- }
434
- ),
435
- _("sep-ellipsis")
436
- ] }),
437
- u.href && !p ? /* @__PURE__ */ s("a", { href: u.href, className: q.link, children: u.label }) : /* @__PURE__ */ s(
438
- "span",
439
- {
440
- className: p ? q.current : q.text,
441
- ...p && { "aria-current": "page" },
442
- children: u.label
443
- }
444
- )
445
- ] }, w);
446
- }) }) });
447
- }, Tt = "_spinner_9eqlb_10", Lt = "_spin_9eqlb_10", St = "_spinnerTrack_9eqlb_14", Ft = "_spinnerHead_9eqlb_18", Ot = "_sm_9eqlb_23", Ht = "_md_9eqlb_28", Pt = "_lg_9eqlb_33", X = {
448
- spinner: Tt,
449
- spin: Lt,
450
- spinnerTrack: St,
451
- spinnerHead: Ft,
452
- sm: Ot,
453
- md: Ht,
454
- lg: Pt
455
- }, Kt = ({
456
- size: e = "md",
457
- className: t,
458
- ...n
459
- }) => /* @__PURE__ */ h(
460
- "svg",
461
- {
462
- className: l(X.spinner, X[e], t),
463
- xmlns: "http://www.w3.org/2000/svg",
464
- fill: "none",
465
- viewBox: "0 0 24 24",
466
- "aria-hidden": "true",
467
- ...n,
468
- children: [
469
- /* @__PURE__ */ s(
470
- "circle",
471
- {
472
- className: X.spinnerTrack,
473
- cx: "12",
474
- cy: "12",
475
- r: "10",
476
- stroke: "currentColor",
477
- strokeWidth: "4"
478
- }
479
- ),
480
- /* @__PURE__ */ s(
481
- "path",
482
- {
483
- className: X.spinnerHead,
484
- fill: "currentColor",
485
- d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
486
- }
487
- )
488
- ]
489
- }
490
- ), Ut = "_button_dajne_1", Vt = "_primary_dajne_28", Gt = "_secondary_dajne_37", Wt = "_outline_dajne_46", Zt = "_ghost_dajne_56", Xt = "_danger_dajne_65", Jt = "_sm_dajne_75", Qt = "_md_dajne_80", Yt = "_lg_dajne_85", en = "_content_dajne_91", tn = "_hidden_dajne_97", nn = "_spinner_dajne_101", E = {
491
- button: Ut,
492
- primary: Vt,
493
- secondary: Gt,
494
- outline: Wt,
495
- ghost: Zt,
496
- danger: Xt,
497
- sm: Jt,
498
- md: Qt,
499
- lg: Yt,
500
- content: en,
501
- hidden: tn,
502
- spinner: nn
503
- }, oe = ({
504
- variant: e = "primary",
505
- size: t = "md",
506
- type: n = "button",
507
- loading: r,
508
- disabled: a,
509
- children: o,
510
- className: c,
511
- ...i
512
- }) => /* @__PURE__ */ h(
513
- "button",
514
- {
515
- type: n,
516
- disabled: r || a,
517
- "aria-busy": r || void 0,
518
- className: l(E.button, E[e], E[t], c),
519
- ...i,
520
- children: [
521
- r ? /* @__PURE__ */ s(Kt, { className: E.spinner }) : null,
522
- /* @__PURE__ */ s("span", { className: l(E.content, { [E.hidden]: r }), children: o })
523
- ]
524
- }
525
- ), to = ({
526
- variant: e = "primary",
527
- size: t = "md",
528
- children: n,
529
- className: r,
530
- href: a,
531
- ...o
532
- }) => /* @__PURE__ */ s(
533
- "a",
534
- {
535
- href: a,
536
- className: l(E.button, E[e], E[t], r),
537
- ...o,
538
- children: n
539
- }
540
- ), sn = "_card_2a53z_1", rn = "_elevated_2a53z_7", on = "_outlined_2a53z_12", an = "_flat_2a53z_16", cn = "_header_2a53z_38", ln = "_body_2a53z_44", dn = "_footer_2a53z_48", K = {
541
- card: sn,
542
- elevated: rn,
543
- outlined: on,
544
- flat: an,
545
- "padding-none": "_padding-none_2a53z_21",
546
- "padding-sm": "_padding-sm_2a53z_25",
547
- "padding-md": "_padding-md_2a53z_29",
548
- "padding-lg": "_padding-lg_2a53z_33",
549
- header: cn,
550
- body: ln,
551
- footer: dn
552
- }, no = ({
553
- as: e = "div",
554
- variant: t = "elevated",
555
- padding: n = "md",
556
- children: r,
557
- className: a,
558
- ...o
559
- }) => /* @__PURE__ */ s(
560
- e,
561
- {
562
- className: l(
563
- K.card,
564
- K[t],
565
- K[`padding-${n}`],
566
- a
567
- ),
568
- ...o,
569
- children: r
570
- }
571
- ), so = ({
572
- children: e,
573
- className: t,
574
- ...n
575
- }) => /* @__PURE__ */ s("div", { className: l(K.header, t), ...n, children: e }), ro = ({
576
- children: e,
577
- className: t,
578
- ...n
579
- }) => /* @__PURE__ */ s("div", { className: l(K.body, t), ...n, children: e }), oo = ({
580
- children: e,
581
- className: t,
582
- ...n
583
- }) => /* @__PURE__ */ s("div", { className: l(K.footer, t), ...n, children: e }), _n = "_wrapper_tjwht_1", un = "_row_tjwht_6", pn = "_checkbox_tjwht_12", mn = "_checkboxError_tjwht_54", hn = "_label_tjwht_58", fn = "_description_tjwht_65", bn = "_error_tjwht_72", T = {
584
- wrapper: _n,
585
- row: un,
586
- checkbox: pn,
587
- checkboxError: mn,
588
- label: hn,
589
- description: fn,
590
- error: bn
591
- }, gn = F(
592
- ({ label: e, description: t, error: n, indeterminate: r, id: a, className: o, ...c }, i) => {
593
- const d = k(null);
594
- A(() => {
595
- const p = d.current;
596
- p && (p.indeterminate = !!r);
597
- }, [r]);
598
- const _ = n ? `${a}-error` : void 0, u = t ? `${a}-description` : void 0, f = [u, _].filter(Boolean).join(" ") || void 0;
599
- return /* @__PURE__ */ h("div", { className: l(T.wrapper, o), children: [
600
- /* @__PURE__ */ h("div", { className: T.row, children: [
601
- /* @__PURE__ */ s(
602
- "input",
603
- {
604
- id: a,
605
- ref: (p) => {
606
- d.current = p, typeof i == "function" ? i(p) : i && (i.current = p);
607
- },
608
- type: "checkbox",
609
- "aria-invalid": n ? !0 : void 0,
610
- "aria-describedby": f,
611
- className: l(T.checkbox, n && T.checkboxError),
612
- ...c
613
- }
614
- ),
615
- e && /* @__PURE__ */ s("label", { htmlFor: a, className: T.label, children: e })
616
- ] }),
617
- t && /* @__PURE__ */ s("p", { id: u, className: T.description, children: t }),
618
- n && /* @__PURE__ */ s("p", { id: _, className: T.error, role: "alert", children: n })
619
- ] });
620
- }
621
- );
622
- gn.displayName = "Checkbox";
623
- const wn = "_dialog_vdk0r_51", vn = "_closing_vdk0r_69", kn = "_right_vdk0r_75", yn = "_left_vdk0r_76", $n = "_top_vdk0r_97", Nn = "_bottom_vdk0r_98", xn = "_content_vdk0r_144", Cn = "_header_vdk0r_150", jn = "_title_vdk0r_158", En = "_closeButton_vdk0r_164", zn = "_body_vdk0r_185", An = "_footer_vdk0r_193", x = {
624
- dialog: wn,
625
- "fade-in": "_fade-in_vdk0r_1",
626
- "fade-out": "_fade-out_vdk0r_1",
627
- closing: vn,
628
- right: kn,
629
- left: yn,
630
- "slide-in-right": "_slide-in-right_vdk0r_1",
631
- "slide-out-right": "_slide-out-right_vdk0r_1",
632
- "slide-in-left": "_slide-in-left_vdk0r_1",
633
- "slide-out-left": "_slide-out-left_vdk0r_1",
634
- top: $n,
635
- bottom: Nn,
636
- "slide-in-top": "_slide-in-top_vdk0r_1",
637
- "slide-out-top": "_slide-out-top_vdk0r_1",
638
- "slide-in-bottom": "_slide-in-bottom_vdk0r_1",
639
- "slide-out-bottom": "_slide-out-bottom_vdk0r_1",
640
- "size-sm": "_size-sm_vdk0r_119",
641
- "size-md": "_size-md_vdk0r_121",
642
- "size-lg": "_size-lg_vdk0r_123",
643
- content: xn,
644
- header: Cn,
645
- title: jn,
646
- closeButton: En,
647
- body: zn,
648
- footer: An
649
- }, ao = ({
650
- open: e,
651
- onClose: t,
652
- children: n,
653
- side: r = "right",
654
- size: a = "md",
655
- className: o,
656
- ...c
657
- }) => {
658
- const i = k(null), [d, _] = v(!1), [u, f] = v(!1);
659
- return A(() => {
660
- e ? (_(!0), f(!1)) : _((p) => (p && f(!0), p));
661
- }, [e]), A(() => {
662
- const p = i.current;
663
- d && !u && p && !p.open && p.showModal();
664
- }, [d, u]), d ? _e(
665
- /* @__PURE__ */ s(
666
- "dialog",
667
- {
668
- ref: i,
669
- className: l(
670
- x.dialog,
671
- x[r],
672
- x[`size-${a}`],
673
- u && x.closing,
674
- o
675
- ),
676
- onAnimationEnd: () => {
677
- u && (i.current?.close(), _(!1), f(!1));
678
- },
679
- onCancel: (p) => {
680
- p.preventDefault(), t();
681
- },
682
- onClick: (p) => {
683
- p.target === i.current && t();
684
- },
685
- ...c,
686
- children: /* @__PURE__ */ s("div", { className: x.content, children: n })
687
- }
688
- ),
689
- document.body
690
- ) : null;
691
- }, co = ({
692
- children: e,
693
- onClose: t,
694
- className: n,
695
- ...r
696
- }) => /* @__PURE__ */ h("div", { className: l(x.header, n), ...r, children: [
697
- /* @__PURE__ */ s("h2", { className: x.title, children: e }),
698
- t && /* @__PURE__ */ s(
699
- "button",
700
- {
701
- onClick: t,
702
- "aria-label": "Close",
703
- className: x.closeButton,
704
- children: /* @__PURE__ */ s(W, { size: 20 })
705
- }
706
- )
707
- ] }), io = ({
708
- children: e,
709
- className: t,
710
- ...n
711
- }) => /* @__PURE__ */ s("div", { className: l(x.body, t), ...n, children: e }), lo = ({
712
- children: e,
713
- className: t,
714
- ...n
715
- }) => /* @__PURE__ */ s("div", { className: l(x.footer, t), ...n, children: e }), Dn = "_wrapper_1s9du_1", In = "_trigger_1s9du_5", Rn = "_menu_1s9du_37", qn = "_closing_1s9du_52", Mn = "_alignRight_1s9du_56", Bn = "_alignLeft_1s9du_60", Tn = "_item_1s9du_64", Ln = "_divider_1s9du_85", M = {
716
- wrapper: Dn,
717
- trigger: In,
718
- menu: Rn,
719
- closing: qn,
720
- alignRight: Mn,
721
- alignLeft: Bn,
722
- item: Tn,
723
- divider: Ln
724
- }, ge = le(null);
725
- function te() {
726
- const e = ie(ge);
727
- if (!e)
728
- throw new Error("Dropdown components must be used within <Dropdown>");
729
- return e;
730
- }
731
- const _o = ({ children: e }) => {
732
- const [t, n] = v(!1), [r, a] = v(!1), o = k(null), c = k(null), i = k([]), d = k(0), _ = k(null), u = ee(), f = (m) => {
733
- _.current = m, n(!0), a(!1);
734
- }, p = (m = !0) => {
735
- a(!0), m && o.current?.focus();
736
- }, w = k(p);
737
- return w.current = p, A(() => {
738
- if (!t || r) return;
739
- function m(b) {
740
- c.current && !c.current.contains(b.target) && w.current(!1);
741
- }
742
- return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
743
- }, [t, r]), /* @__PURE__ */ s(
744
- ge.Provider,
745
- {
746
- value: {
747
- visible: t,
748
- closing: r,
749
- menuId: u,
750
- triggerRef: o,
751
- openMenu: f,
752
- closeMenu: p,
753
- setVisible: n,
754
- setClosing: a,
755
- itemRefs: i,
756
- itemCount: d,
757
- pendingFocusIndex: _
758
- },
759
- children: /* @__PURE__ */ s("div", { ref: c, className: M.wrapper, children: e })
760
- }
761
- );
762
- }, uo = ({
763
- asChild: e,
764
- children: t
765
- }) => {
766
- const { visible: n, menuId: r, triggerRef: a, openMenu: o, closeMenu: c } = te(), _ = {
767
- ref: (u) => {
768
- a.current = u;
769
- },
770
- "aria-haspopup": "menu",
771
- "aria-expanded": n,
772
- "aria-controls": n ? r : void 0,
773
- onClick: () => n ? c() : o(0),
774
- onKeyDown: (u) => {
775
- switch (u.key) {
776
- case "ArrowDown":
777
- case "Enter":
778
- case " ":
779
- u.preventDefault(), o(0);
780
- break;
781
- case "ArrowUp":
782
- u.preventDefault(), o(-1);
783
- break;
784
- }
785
- }
786
- };
787
- return e ? de(t, _) : /* @__PURE__ */ s("button", { ..._, className: M.trigger, children: t });
788
- }, po = ({
789
- align: e = "right",
790
- children: t
791
- }) => {
792
- const {
793
- visible: n,
794
- closing: r,
795
- menuId: a,
796
- closeMenu: o,
797
- setVisible: c,
798
- setClosing: i,
799
- itemRefs: d,
800
- itemCount: _,
801
- pendingFocusIndex: u
802
- } = te();
803
- _.current = 0, d.current = [], A(() => {
804
- if (!n || r || u.current === null) return;
805
- const p = u.current;
806
- u.current = null;
807
- const w = d.current.filter(Boolean), m = p < 0 ? w.length + p : p;
808
- w[m]?.focus();
809
- }, [n, r, d, u]);
810
- const f = (p) => {
811
- const w = d.current.findIndex(
812
- (b) => b === document.activeElement
813
- ), m = d.current.filter(Boolean).length;
814
- switch (p.key) {
815
- case "ArrowDown": {
816
- p.preventDefault();
817
- const b = (w + 1) % m;
818
- d.current[b]?.focus();
819
- break;
820
- }
821
- case "ArrowUp": {
822
- p.preventDefault();
823
- const b = (w - 1 + m) % m;
824
- d.current[b]?.focus();
825
- break;
826
- }
827
- case "Home":
828
- p.preventDefault(), d.current[0]?.focus();
829
- break;
830
- case "End":
831
- p.preventDefault(), d.current[m - 1]?.focus();
832
- break;
833
- case "Escape":
834
- case "Tab":
835
- o();
836
- break;
837
- }
838
- };
839
- return n ? /* @__PURE__ */ s(
840
- "div",
841
- {
842
- id: a,
843
- role: "menu",
844
- onKeyDown: f,
845
- onAnimationEnd: () => {
846
- r && (c(!1), i(!1));
847
- },
848
- className: l(
849
- M.menu,
850
- e === "right" ? M.alignRight : M.alignLeft,
851
- r && M.closing
852
- ),
853
- children: t
854
- }
855
- ) : null;
856
- }, mo = ({
857
- children: e,
858
- onClick: t,
859
- href: n,
860
- className: r,
861
- ...a
862
- }) => {
863
- const { closeMenu: o, itemRefs: c, itemCount: i } = te(), d = i.current++, _ = {
864
- ref: (u) => {
865
- c.current[d] = u;
866
- },
867
- role: "menuitem",
868
- tabIndex: -1,
869
- className: l(M.item, r)
870
- };
871
- return n ? /* @__PURE__ */ s("a", { ..._, ...a, href: n, onClick: () => o(!1), children: e }) : /* @__PURE__ */ s(
872
- "button",
873
- {
874
- ..._,
875
- ...a,
876
- onClick: () => {
877
- o(!1), t?.();
878
- },
879
- children: e
880
- }
881
- );
882
- }, ho = ({
883
- className: e
884
- }) => /* @__PURE__ */ s("div", { role: "separator", className: l(M.divider, e) }), Sn = "_wrapper_1rkkq_1", Fn = "_label_1rkkq_6", On = "_input_1rkkq_13", Hn = "_inputError_1rkkq_33", Pn = "_error_1rkkq_42", U = {
885
- wrapper: Sn,
886
- label: Fn,
887
- input: On,
888
- inputError: Hn,
889
- error: Pn
890
- }, Kn = F(
891
- ({ label: e, error: t, id: n, className: r, ...a }, o) => /* @__PURE__ */ h("div", { className: U.wrapper, children: [
892
- e && /* @__PURE__ */ s("label", { htmlFor: n, className: U.label, children: e }),
893
- /* @__PURE__ */ s(
894
- "input",
895
- {
896
- id: n,
897
- ref: o,
898
- "aria-invalid": t ? !0 : void 0,
899
- "aria-describedby": t ? `${n}-error` : void 0,
900
- className: l(U.input, t && U.inputError, r),
901
- ...a
902
- }
903
- ),
904
- t && /* @__PURE__ */ s("p", { id: `${n}-error`, role: "alert", className: U.error, children: t })
905
- ] })
906
- );
907
- Kn.displayName = "Input";
908
- const Un = "_dialog_9xkb2_33", Vn = "_closing_9xkb2_54", Gn = "_content_9xkb2_76", Wn = "_header_9xkb2_83", Zn = "_title_9xkb2_90", Xn = "_closeButton_9xkb2_96", Jn = "_body_9xkb2_117", Qn = "_footer_9xkb2_125", z = {
909
- dialog: Un,
910
- "modal-scale-in": "_modal-scale-in_9xkb2_1",
911
- "modal-fade-in": "_modal-fade-in_9xkb2_1",
912
- "modal-scale-out": "_modal-scale-out_9xkb2_1",
913
- "modal-fade-out": "_modal-fade-out_9xkb2_1",
914
- closing: Vn,
915
- "size-sm": "_size-sm_9xkb2_64",
916
- "size-md": "_size-md_9xkb2_68",
917
- "size-lg": "_size-lg_9xkb2_72",
918
- content: Gn,
919
- header: Wn,
920
- title: Zn,
921
- closeButton: Xn,
922
- body: Jn,
923
- footer: Qn
924
- }, Yn = ({
925
- open: e,
926
- onClose: t,
927
- children: n,
928
- size: r = "sm",
929
- className: a,
930
- ...o
931
- }) => {
932
- const c = k(null), [i, d] = v(!1), [_, u] = v(!1);
933
- return A(() => {
934
- e ? (d(!0), u(!1)) : d((f) => (f && u(!0), f));
935
- }, [e]), A(() => {
936
- const f = c.current;
937
- i && !_ && f && !f.open && f.showModal();
938
- }, [i, _]), i ? _e(
939
- /* @__PURE__ */ s(
940
- "dialog",
941
- {
942
- ref: c,
943
- className: l(
944
- z.dialog,
945
- z[`size-${r}`],
946
- _ && z.closing,
947
- a
948
- ),
949
- onAnimationEnd: () => {
950
- _ && (c.current?.close(), d(!1), u(!1));
951
- },
952
- onCancel: (f) => {
953
- f.preventDefault(), t();
954
- },
955
- onClick: (f) => {
956
- f.target === c.current && t();
957
- },
958
- ...o,
959
- children: /* @__PURE__ */ s("div", { className: z.content, children: n })
960
- }
961
- ),
962
- document.body
963
- ) : null;
964
- }, es = ({
965
- children: e,
966
- onClose: t,
967
- className: n,
968
- ...r
969
- }) => /* @__PURE__ */ h("div", { className: l(z.header, n), ...r, children: [
970
- /* @__PURE__ */ s("h2", { className: z.title, children: e }),
971
- t && /* @__PURE__ */ s(
972
- "button",
973
- {
974
- onClick: t,
975
- "aria-label": "Close",
976
- className: z.closeButton,
977
- children: /* @__PURE__ */ s(W, { size: 20 })
978
- }
979
- )
980
- ] }), ts = ({
981
- children: e,
982
- className: t,
983
- ...n
984
- }) => /* @__PURE__ */ s("div", { className: l(z.body, t), ...n, children: e }), ns = ({
985
- children: e,
986
- className: t,
987
- ...n
988
- }) => /* @__PURE__ */ s("div", { className: l(z.footer, t), ...n, children: e }), fo = ({
989
- open: e,
990
- onClose: t,
991
- onConfirm: n,
992
- title: r = "Are you sure?",
993
- description: a = "This action cannot be undone.",
994
- confirmLabel: o = "Confirm",
995
- cancelLabel: c = "Cancel",
996
- variant: i = "danger",
997
- loading: d = !1
998
- }) => /* @__PURE__ */ h(Yn, { open: e, onClose: t, children: [
999
- /* @__PURE__ */ s(es, { onClose: t, children: r }),
1000
- /* @__PURE__ */ s(ts, { children: a }),
1001
- /* @__PURE__ */ h(ns, { children: [
1002
- /* @__PURE__ */ s(oe, { variant: "ghost", onClick: t, disabled: d, children: c }),
1003
- /* @__PURE__ */ s(oe, { variant: i, onClick: n, loading: d, children: o })
1004
- ] })
1005
- ] }), ss = "_pagination_ydf1l_1", rs = "_page_ydf1l_7", os = "_arrow_ydf1l_8", as = "_active_ydf1l_38", cs = "_ellipsis_ydf1l_47", is = "_icon_ydf1l_57", I = {
1006
- pagination: ss,
1007
- page: rs,
1008
- arrow: os,
1009
- active: as,
1010
- ellipsis: cs,
1011
- icon: is
1012
- };
1013
- function ls(e, t, n) {
1014
- const r = [], a = Math.max(2, e - n), o = Math.min(t - 1, e + n);
1015
- r.push(1), a > 2 && r.push("ellipsis");
1016
- for (let c = a; c <= o; c++)
1017
- r.push(c);
1018
- return o < t - 1 && r.push("ellipsis"), t > 1 && r.push(t), r;
1019
- }
1020
- const bo = ({
1021
- page: e,
1022
- totalPages: t,
1023
- onChange: n,
1024
- siblings: r = 1,
1025
- className: a,
1026
- ...o
1027
- }) => {
1028
- if (t <= 1) return null;
1029
- const c = ls(e, t, r);
1030
- return /* @__PURE__ */ h("nav", { "aria-label": "Pagination", className: l(I.pagination, a), ...o, children: [
1031
- /* @__PURE__ */ s(
1032
- "button",
1033
- {
1034
- "aria-label": "Previous page",
1035
- disabled: e <= 1,
1036
- onClick: () => n(e - 1),
1037
- className: I.arrow,
1038
- children: /* @__PURE__ */ s(Le, { className: I.icon })
1039
- }
1040
- ),
1041
- c.map((i, d) => {
1042
- if (i === "ellipsis")
1043
- return /* @__PURE__ */ s("span", { className: I.ellipsis, children: "..." }, `ellipsis-${d}`);
1044
- const _ = i === e;
1045
- return /* @__PURE__ */ s(
1046
- "button",
1047
- {
1048
- "aria-label": `Page ${i}`,
1049
- "aria-current": _ ? "page" : void 0,
1050
- onClick: () => n(i),
1051
- className: l(I.page, _ && I.active),
1052
- children: i
1053
- },
1054
- i
1055
- );
1056
- }),
1057
- /* @__PURE__ */ s(
1058
- "button",
1059
- {
1060
- "aria-label": "Next page",
1061
- disabled: e >= t,
1062
- onClick: () => n(e + 1),
1063
- className: I.arrow,
1064
- children: /* @__PURE__ */ s(me, { className: I.icon })
1065
- }
1066
- )
1067
- ] });
1068
- }, ds = "_wrapper_14k2c_1", _s = "_header_14k2c_7", us = "_label_14k2c_13", ps = "_value_14k2c_19", ms = "_track_14k2c_24", hs = "_sm_14k2c_31", fs = "_md_14k2c_35", bs = "_lg_14k2c_39", gs = "_bar_14k2c_43", ws = "_indeterminate_14k2c_59", R = {
1069
- wrapper: ds,
1070
- header: _s,
1071
- label: us,
1072
- value: ps,
1073
- track: ms,
1074
- sm: hs,
1075
- md: fs,
1076
- lg: bs,
1077
- bar: gs,
1078
- indeterminate: ws
1079
- }, go = ({
1080
- value: e,
1081
- max: t = 100,
1082
- label: n,
1083
- size: r = "md",
1084
- className: a,
1085
- ...o
1086
- }) => {
1087
- const c = e === void 0, i = c ? 0 : Math.round(e / t * 100);
1088
- return /* @__PURE__ */ h("div", { className: l(R.wrapper, a), ...o, children: [
1089
- n && /* @__PURE__ */ h("div", { className: R.header, children: [
1090
- /* @__PURE__ */ s("span", { className: R.label, children: n }),
1091
- !c && /* @__PURE__ */ h("span", { className: R.value, children: [
1092
- i,
1093
- "%"
1094
- ] })
1095
- ] }),
1096
- /* @__PURE__ */ s(
1097
- "div",
1098
- {
1099
- role: "progressbar",
1100
- "aria-valuenow": c ? void 0 : e,
1101
- "aria-valuemin": 0,
1102
- "aria-valuemax": t,
1103
- "aria-label": n || "Progress",
1104
- className: l(R.track, R[r]),
1105
- children: /* @__PURE__ */ s(
1106
- "div",
1107
- {
1108
- className: l(R.bar, c && R.indeterminate),
1109
- style: c ? void 0 : { width: `${i}%` }
1110
- }
1111
- )
1112
- }
1113
- )
1114
- ] });
1115
- }, vs = "_fieldset_ap4x3_1", ks = "_legend_ap4x3_7", ys = "_options_ap4x3_14", $s = "_option_ap4x3_14", Ns = "_radio_ap4x3_27", xs = "_radioError_ap4x3_61", Cs = "_labels_ap4x3_65", js = "_label_ap4x3_65", Es = "_description_ap4x3_76", zs = "_error_ap4x3_82", $ = {
1116
- fieldset: vs,
1117
- legend: ks,
1118
- options: ys,
1119
- option: $s,
1120
- radio: Ns,
1121
- radioError: xs,
1122
- labels: Cs,
1123
- label: js,
1124
- description: Es,
1125
- error: zs
1126
- }, As = F(
1127
- ({ label: e, error: t, options: n, value: r, onChange: a, name: o, className: c, ...i }, d) => /* @__PURE__ */ h("fieldset", { className: l($.fieldset, c), children: [
1128
- e && /* @__PURE__ */ s("legend", { className: $.legend, children: e }),
1129
- /* @__PURE__ */ s("div", { className: $.options, children: n.map((_) => /* @__PURE__ */ h("label", { className: $.option, children: [
1130
- /* @__PURE__ */ s(
1131
- "input",
1132
- {
1133
- ref: d,
1134
- type: "radio",
1135
- name: o,
1136
- value: _.value,
1137
- checked: r === _.value,
1138
- onChange: () => a?.(_.value),
1139
- "aria-describedby": _.description ? `${o}-${_.value}-description` : void 0,
1140
- className: l($.radio, t && $.radioError),
1141
- ...i
1142
- }
1143
- ),
1144
- /* @__PURE__ */ h("div", { className: $.labels, children: [
1145
- /* @__PURE__ */ s("span", { className: $.label, children: _.label }),
1146
- _.description && /* @__PURE__ */ s("span", { id: `${o}-${_.value}-description`, className: $.description, children: _.description })
1147
- ] })
1148
- ] }, _.value)) }),
1149
- t && /* @__PURE__ */ s("p", { role: "alert", className: $.error, children: t })
1150
- ] })
1151
- );
1152
- As.displayName = "RadioGroup";
1153
- const Ds = "_wrapper_z5w4u_1", Is = "_label_z5w4u_6", Rs = "_select_z5w4u_13", qs = "_selectError_z5w4u_37", Ms = "_error_z5w4u_46", V = {
1154
- wrapper: Ds,
1155
- label: Is,
1156
- select: Rs,
1157
- selectError: qs,
1158
- error: Ms
1159
- }, Bs = F(
1160
- ({ label: e, error: t, id: n, options: r, placeholder: a, className: o, ...c }, i) => /* @__PURE__ */ h("div", { className: V.wrapper, children: [
1161
- e && /* @__PURE__ */ s("label", { htmlFor: n, className: V.label, children: e }),
1162
- /* @__PURE__ */ h(
1163
- "select",
1164
- {
1165
- id: n,
1166
- ref: i,
1167
- "aria-invalid": t ? !0 : void 0,
1168
- "aria-describedby": t ? `${n}-error` : void 0,
1169
- className: l(V.select, t && V.selectError, o),
1170
- ...c,
1171
- children: [
1172
- a && /* @__PURE__ */ s("option", { value: "", disabled: !0, children: a }),
1173
- r.map((d) => /* @__PURE__ */ s("option", { value: d.value, children: d.label }, d.value))
1174
- ]
1175
- }
1176
- ),
1177
- t && /* @__PURE__ */ s("p", { id: `${n}-error`, role: "alert", className: V.error, children: t })
1178
- ] })
1179
- );
1180
- Bs.displayName = "Select";
1181
- const Ts = "_skeleton_17jqz_10", Ls = "_shimmer_17jqz_1", Ss = "_text_17jqz_21", Fs = "_circular_17jqz_27", Os = "_rectangular_17jqz_33", ae = {
1182
- skeleton: Ts,
1183
- shimmer: Ls,
1184
- text: Ss,
1185
- circular: Fs,
1186
- rectangular: Os
1187
- }, wo = ({
1188
- width: e,
1189
- height: t,
1190
- variant: n = "text",
1191
- className: r,
1192
- ...a
1193
- }) => /* @__PURE__ */ s(
1194
- "div",
1195
- {
1196
- "aria-hidden": "true",
1197
- className: l(ae.skeleton, ae[n], r),
1198
- style: { width: e, height: t },
1199
- ...a
1200
- }
1201
- ), Hs = "_wrapper_8eiej_1", Ps = "_wrapperDisabled_8eiej_8", Ks = "_track_8eiej_13", Us = "_trackChecked_8eiej_37", Vs = "_thumb_8eiej_41", Gs = "_thumbChecked_8eiej_52", Ws = "_labels_8eiej_56", Zs = "_label_8eiej_56", Xs = "_description_8eiej_66", C = {
1202
- wrapper: Hs,
1203
- wrapperDisabled: Ps,
1204
- track: Ks,
1205
- trackChecked: Us,
1206
- thumb: Vs,
1207
- thumbChecked: Gs,
1208
- labels: Ws,
1209
- label: Zs,
1210
- description: Xs
1211
- }, vo = ({
1212
- id: e,
1213
- checked: t,
1214
- onChange: n,
1215
- label: r,
1216
- description: a,
1217
- disabled: o = !1,
1218
- className: c,
1219
- ...i
1220
- }) => {
1221
- const d = a && e ? `${e}-description` : void 0;
1222
- return /* @__PURE__ */ h(
1223
- "label",
1224
- {
1225
- className: l(
1226
- C.wrapper,
1227
- o && C.wrapperDisabled,
1228
- c
1229
- ),
1230
- ...i,
1231
- children: [
1232
- /* @__PURE__ */ s(
1233
- "button",
1234
- {
1235
- id: e,
1236
- type: "button",
1237
- role: "switch",
1238
- "aria-checked": t,
1239
- "aria-describedby": d,
1240
- disabled: o,
1241
- onClick: () => n(!t),
1242
- className: l(C.track, t && C.trackChecked),
1243
- children: /* @__PURE__ */ s("span", { className: l(C.thumb, t && C.thumbChecked) })
1244
- }
1245
- ),
1246
- (r || a) && /* @__PURE__ */ h("div", { className: C.labels, children: [
1247
- r && /* @__PURE__ */ s("p", { className: C.label, children: r }),
1248
- a && /* @__PURE__ */ s("p", { id: d, className: C.description, children: a })
1249
- ] })
1250
- ]
1251
- }
1252
- );
1253
- }, Js = "_wrapper_wwjw1_1", Qs = "_table_wwjw1_7", Ys = "_header_wwjw1_13", er = "_body_wwjw1_18", tr = "_row_wwjw1_22", nr = "_head_wwjw1_13", sr = "_cell_wwjw1_40", S = {
1254
- wrapper: Js,
1255
- table: Qs,
1256
- header: Ys,
1257
- body: er,
1258
- row: tr,
1259
- head: nr,
1260
- cell: sr
1261
- }, ko = ({ children: e, className: t, ...n }) => /* @__PURE__ */ s("div", { className: l(S.wrapper, t), children: /* @__PURE__ */ s("table", { className: S.table, ...n, children: e }) }), yo = ({ children: e, className: t, ...n }) => /* @__PURE__ */ s("thead", { className: l(S.header, t), ...n, children: e }), $o = ({ children: e, className: t, ...n }) => /* @__PURE__ */ s("tbody", { className: l(S.body, t), ...n, children: e }), No = ({ children: e, className: t, ...n }) => /* @__PURE__ */ s("tr", { className: l(S.row, t), ...n, children: e }), xo = ({
1262
- children: e,
1263
- className: t,
1264
- ...n
1265
- }) => /* @__PURE__ */ s("th", { className: l(S.head, t), ...n, children: e }), Co = ({
1266
- children: e,
1267
- className: t,
1268
- ...n
1269
- }) => /* @__PURE__ */ s("td", { className: l(S.cell, t), ...n, children: e }), rr = "_tabList_194xi_1", or = "_tab_194xi_1", ar = "_tabActive_194xi_37", cr = "_tabDisabled_194xi_41", ir = "_indicator_194xi_50", lr = "_indicatorAnimated_194xi_58", H = {
1270
- tabList: rr,
1271
- tab: or,
1272
- tabActive: ar,
1273
- tabDisabled: cr,
1274
- indicator: ir,
1275
- indicatorAnimated: lr
1276
- }, jo = ({
1277
- tabs: e,
1278
- value: t,
1279
- onChange: n,
1280
- className: r,
1281
- ...a
1282
- }) => {
1283
- const o = k(null), c = k(/* @__PURE__ */ new Map()), [i, d] = v({
1284
- left: 0,
1285
- width: 0
1286
- }), [_, u] = v(!1), f = ce(() => {
1287
- const m = c.current.get(t), b = o.current;
1288
- if (m && b) {
1289
- const g = b.getBoundingClientRect(), y = m.getBoundingClientRect();
1290
- d({
1291
- left: y.left - g.left + b.scrollLeft,
1292
- width: y.width
1293
- });
1294
- }
1295
- }, [t]);
1296
- A(() => {
1297
- f();
1298
- }, [f]), A(() => {
1299
- const m = requestAnimationFrame(() => u(!0));
1300
- return () => cancelAnimationFrame(m);
1301
- }, []);
1302
- const p = (m, b) => {
1303
- const g = e.length;
1304
- let y = (m + b + g) % g;
1305
- for (; e[y].disabled && y !== m; )
1306
- y = (y + b + g) % g;
1307
- return y;
1308
- }, w = (m) => {
1309
- const b = e.findIndex((Z) => Z.value === t);
1310
- let g = null;
1311
- switch (m.key) {
1312
- case "ArrowRight":
1313
- g = p(b, 1);
1314
- break;
1315
- case "ArrowLeft":
1316
- g = p(b, -1);
1317
- break;
1318
- case "Home":
1319
- g = e.findIndex((Z) => !Z.disabled);
1320
- break;
1321
- case "End": {
1322
- const ne = [...e].reverse().findIndex((we) => !we.disabled);
1323
- g = ne !== -1 ? e.length - 1 - ne : null;
1324
- break;
1325
- }
1326
- default:
1327
- return;
1328
- }
1329
- if (g === null || g === -1) return;
1330
- m.preventDefault();
1331
- const y = e[g];
1332
- n(y.value), c.current.get(y.value)?.focus();
1333
- };
1334
- return /* @__PURE__ */ h(
1335
- "div",
1336
- {
1337
- ref: o,
1338
- className: l(H.tabList, r),
1339
- role: "tablist",
1340
- onKeyDown: w,
1341
- ...a,
1342
- children: [
1343
- e.map((m) => {
1344
- const b = t === m.value;
1345
- return /* @__PURE__ */ s(
1346
- "button",
1347
- {
1348
- ref: (g) => {
1349
- g ? c.current.set(m.value, g) : c.current.delete(m.value);
1350
- },
1351
- id: `tab-${m.value}`,
1352
- role: "tab",
1353
- "aria-selected": b,
1354
- "aria-controls": `tabpanel-${m.value}`,
1355
- "aria-disabled": m.disabled || void 0,
1356
- tabIndex: b ? 0 : -1,
1357
- onClick: () => {
1358
- m.disabled || n(m.value);
1359
- },
1360
- className: l(
1361
- H.tab,
1362
- b && H.tabActive,
1363
- m.disabled && H.tabDisabled
1364
- ),
1365
- children: m.label
1366
- },
1367
- m.value
1368
- );
1369
- }),
1370
- /* @__PURE__ */ s(
1371
- "span",
1372
- {
1373
- className: l(
1374
- H.indicator,
1375
- _ && H.indicatorAnimated
1376
- ),
1377
- style: { left: i.left, width: i.width },
1378
- "aria-hidden": "true"
1379
- }
1380
- )
1381
- ]
1382
- }
1383
- );
1384
- }, Eo = ({
1385
- value: e,
1386
- activeValue: t,
1387
- children: n,
1388
- className: r,
1389
- ...a
1390
- }) => e !== t ? null : /* @__PURE__ */ s(
1391
- "div",
1392
- {
1393
- id: `tabpanel-${e}`,
1394
- role: "tabpanel",
1395
- "aria-labelledby": `tab-${e}`,
1396
- tabIndex: 0,
1397
- className: r,
1398
- ...a,
1399
- children: n
1400
- }
1401
- ), dr = "_wrapper_1aqpy_1", _r = "_label_1aqpy_6", ur = "_textarea_1aqpy_13", pr = "_textareaError_1aqpy_36", mr = "_error_1aqpy_45", G = {
1402
- wrapper: dr,
1403
- label: _r,
1404
- textarea: ur,
1405
- textareaError: pr,
1406
- error: mr
1407
- }, hr = F(
1408
- ({ label: e, error: t, id: n, className: r, ...a }, o) => /* @__PURE__ */ h("div", { className: G.wrapper, children: [
1409
- e && /* @__PURE__ */ s("label", { htmlFor: n, className: G.label, children: e }),
1410
- /* @__PURE__ */ s(
1411
- "textarea",
1412
- {
1413
- id: n,
1414
- ref: o,
1415
- "aria-invalid": t ? !0 : void 0,
1416
- "aria-describedby": t ? `${n}-error` : void 0,
1417
- className: l(G.textarea, t && G.textareaError, r),
1418
- ...a
1419
- }
1420
- ),
1421
- t && /* @__PURE__ */ s("p", { id: `${n}-error`, role: "alert", className: G.error, children: t })
1422
- ] })
1423
- );
1424
- hr.displayName = "Textarea";
1425
- const fr = "_container_1wipo_1", br = "_toast_1wipo_66", gr = "_dismissing_1wipo_82", wr = "_icon_1wipo_102", vr = "_iconSpin_1wipo_106", kr = "_spin_1wipo_1", yr = "_message_1wipo_110", $r = "_dismiss_1wipo_82", Nr = "_success_1wipo_146", xr = "_error_1wipo_152", Cr = "_warning_1wipo_158", jr = "_info_1wipo_164", Er = "_loading_1wipo_170", j = {
1426
- container: fr,
1427
- "bottom-right": "_bottom-right_1wipo_12",
1428
- "bottom-left": "_bottom-left_1wipo_13",
1429
- "top-right": "_top-right_1wipo_17",
1430
- "top-left": "_top-left_1wipo_18",
1431
- toast: br,
1432
- "slide-in-bottom": "_slide-in-bottom_1wipo_1",
1433
- dismissing: gr,
1434
- "slide-out-bottom": "_slide-out-bottom_1wipo_1",
1435
- "slide-in-top": "_slide-in-top_1wipo_1",
1436
- "slide-out-top": "_slide-out-top_1wipo_1",
1437
- icon: wr,
1438
- iconSpin: vr,
1439
- spin: kr,
1440
- message: yr,
1441
- dismiss: $r,
1442
- default: "_default_1wipo_140",
1443
- success: Nr,
1444
- error: xr,
1445
- warning: Cr,
1446
- info: jr,
1447
- loading: Er,
1448
- "slide-in-right": "_slide-in-right_1wipo_1",
1449
- "slide-out-right": "_slide-out-right_1wipo_1",
1450
- "slide-in-left": "_slide-in-left_1wipo_1",
1451
- "slide-out-left": "_slide-out-left_1wipo_1"
1452
- }, zr = {
1453
- default: Y,
1454
- success: fe,
1455
- error: he,
1456
- warning: be,
1457
- info: Y,
1458
- loading: Ve
1459
- }, Ar = ({ toast: e, onDismiss: t, onRemove: n }) => {
1460
- const r = e.variant === "error", a = zr[e.variant];
1461
- return /* @__PURE__ */ h(
1462
- "div",
1463
- {
1464
- role: r ? "alert" : "status",
1465
- "aria-atomic": "true",
1466
- className: l(
1467
- j.toast,
1468
- j[e.variant],
1469
- e.dismissing && j.dismissing
1470
- ),
1471
- onAnimationEnd: () => {
1472
- e.dismissing && n(e.id);
1473
- },
1474
- children: [
1475
- /* @__PURE__ */ s(
1476
- a,
1477
- {
1478
- size: 18,
1479
- className: l(j.icon, e.variant === "loading" && j.iconSpin),
1480
- "aria-hidden": "true"
1481
- }
1482
- ),
1483
- /* @__PURE__ */ s("p", { className: j.message, children: e.message }),
1484
- /* @__PURE__ */ s(
1485
- "button",
1486
- {
1487
- onClick: () => t(e.id),
1488
- "aria-label": "Dismiss notification",
1489
- className: j.dismiss,
1490
- children: /* @__PURE__ */ s(W, { size: 16 })
1491
- }
1492
- )
1493
- ]
1494
- }
1495
- );
1496
- }, zo = ({
1497
- toasts: e,
1498
- position: t = "top-right",
1499
- onDismiss: n,
1500
- onRemove: r
1501
- }) => e.length === 0 ? null : /* @__PURE__ */ s(
1502
- "div",
1503
- {
1504
- className: l(j.container, j[t]),
1505
- "aria-live": "polite",
1506
- "aria-relevant": "additions",
1507
- children: e.map((a) => /* @__PURE__ */ s(Ar, { toast: a, onDismiss: n, onRemove: r }, a.id))
1508
- }
1509
- ), Dr = "_trigger_9r84s_1", Ir = "_tooltip_9r84s_6", Rr = "_dismissed_9r84s_30", qr = "_dark_9r84s_36", Mr = "_light_9r84s_42", Br = "_success_9r84s_51", Tr = "_error_9r84s_59", Lr = "_warning_9r84s_67", Sr = "_info_9r84s_75", Fr = "_top_9r84s_84", Or = "_bottom_9r84s_90", Hr = "_left_9r84s_96", Pr = "_right_9r84s_102", Kr = "_arrow_9r84s_109", P = {
1510
- trigger: Dr,
1511
- tooltip: Ir,
1512
- dismissed: Rr,
1513
- dark: qr,
1514
- light: Mr,
1515
- success: Br,
1516
- error: Tr,
1517
- warning: Lr,
1518
- info: Sr,
1519
- top: Fr,
1520
- bottom: Or,
1521
- left: Hr,
1522
- right: Pr,
1523
- arrow: Kr
1524
- }, Ao = ({
1525
- content: e,
1526
- placement: t = "top",
1527
- variant: n = "dark",
1528
- children: r,
1529
- id: a,
1530
- className: o
1531
- }) => {
1532
- const c = ee(), i = a ?? `tooltip-${c}`, [d, _] = v(!1);
1533
- return /* @__PURE__ */ h(
1534
- "span",
1535
- {
1536
- className: l(P.trigger, o),
1537
- onKeyDown: (u) => {
1538
- u.key === "Escape" && _(!0);
1539
- },
1540
- onMouseEnter: () => _(!1),
1541
- onFocus: () => _(!1),
1542
- children: [
1543
- de(r, { "aria-describedby": i }),
1544
- /* @__PURE__ */ h(
1545
- "span",
1546
- {
1547
- id: i,
1548
- role: "tooltip",
1549
- className: l(
1550
- P.tooltip,
1551
- P[n],
1552
- P[t],
1553
- d && P.dismissed
1554
- ),
1555
- children: [
1556
- /* @__PURE__ */ s("span", { className: P.arrow }),
1557
- e
1558
- ]
1559
- }
1560
- )
1561
- ]
1562
- }
1563
- );
1564
- };
1
+ /* empty css */
2
+ import { Accordion as t, AccordionItem as a } from "./index3.js";
3
+ import { Alert as m } from "./index4.js";
4
+ import { Avatar as d, AvatarGroup as f } from "./index5.js";
5
+ import { Badge as l } from "./index6.js";
6
+ import { Breadcrumbs as T } from "./index7.js";
7
+ import { Button as b } from "./index8.js";
8
+ import { Card as D, CardBody as c, CardFooter as B, CardHeader as s } from "./index9.js";
9
+ import { Checkbox as g } from "./index10.js";
10
+ import { ConfirmModal as H } from "./index11.js";
11
+ import { Drawer as S, DrawerBody as y, DrawerFooter as k, DrawerHeader as F } from "./index12.js";
12
+ import { Dropdown as P, DropdownContent as h, DropdownItem as v, DropdownSeparator as G, DropdownTrigger as R } from "./index13.js";
13
+ import { Input as j } from "./index14.js";
14
+ import { LinkButton as z } from "./index15.js";
15
+ import { Modal as J, ModalBody as K, ModalFooter as N, ModalHeader as O } from "./index16.js";
16
+ import { Pagination as U } from "./index17.js";
17
+ import { Progress as W } from "./index18.js";
18
+ import { RadioGroup as Y } from "./index19.js";
19
+ import { Select as _ } from "./index20.js";
20
+ import { Skeleton as oo } from "./index21.js";
21
+ import { Spinner as eo } from "./index22.js";
22
+ import { Switch as ao } from "./index23.js";
23
+ import { TabPanel as mo, Tabs as xo } from "./index24.js";
24
+ import { Table as no, TableBody as lo, TableCell as io, TableHead as To, TableHeader as wo, TableRow as bo } from "./index25.js";
25
+ import { Textarea as Do } from "./index26.js";
26
+ import { Toast as Bo } from "./index27.js";
27
+ import { ToastContainer as uo } from "./index28.js";
28
+ import { Tooltip as Ao } from "./index29.js";
1565
29
  export {
1566
- Wr as Accordion,
1567
- Zr as AccordionItem,
1568
- Xr as Alert,
1569
- Jr as Avatar,
1570
- Qr as AvatarGroup,
1571
- Yr as Badge,
1572
- eo as Breadcrumbs,
1573
- oe as Button,
1574
- no as Card,
1575
- ro as CardBody,
1576
- oo as CardFooter,
1577
- so as CardHeader,
1578
- gn as Checkbox,
1579
- fo as ConfirmModal,
1580
- ao as Drawer,
1581
- io as DrawerBody,
1582
- lo as DrawerFooter,
1583
- co as DrawerHeader,
1584
- _o as Dropdown,
1585
- po as DropdownContent,
1586
- mo as DropdownItem,
1587
- ho as DropdownSeparator,
1588
- uo as DropdownTrigger,
1589
- Kn as Input,
1590
- to as LinkButton,
1591
- Yn as Modal,
1592
- ts as ModalBody,
1593
- ns as ModalFooter,
1594
- es as ModalHeader,
1595
- bo as Pagination,
1596
- go as Progress,
1597
- As as RadioGroup,
1598
- Bs as Select,
1599
- wo as Skeleton,
1600
- Kt as Spinner,
1601
- vo as Switch,
1602
- Eo as TabPanel,
1603
- ko as Table,
1604
- $o as TableBody,
1605
- Co as TableCell,
1606
- xo as TableHead,
1607
- yo as TableHeader,
1608
- No as TableRow,
1609
- jo as Tabs,
1610
- hr as Textarea,
1611
- Ar as Toast,
1612
- zo as ToastContainer,
30
+ t as Accordion,
31
+ a as AccordionItem,
32
+ m as Alert,
33
+ d as Avatar,
34
+ f as AvatarGroup,
35
+ l as Badge,
36
+ T as Breadcrumbs,
37
+ b as Button,
38
+ D as Card,
39
+ c as CardBody,
40
+ B as CardFooter,
41
+ s as CardHeader,
42
+ g as Checkbox,
43
+ H as ConfirmModal,
44
+ S as Drawer,
45
+ y as DrawerBody,
46
+ k as DrawerFooter,
47
+ F as DrawerHeader,
48
+ P as Dropdown,
49
+ h as DropdownContent,
50
+ v as DropdownItem,
51
+ G as DropdownSeparator,
52
+ R as DropdownTrigger,
53
+ j as Input,
54
+ z as LinkButton,
55
+ J as Modal,
56
+ K as ModalBody,
57
+ N as ModalFooter,
58
+ O as ModalHeader,
59
+ U as Pagination,
60
+ W as Progress,
61
+ Y as RadioGroup,
62
+ _ as Select,
63
+ oo as Skeleton,
64
+ eo as Spinner,
65
+ ao as Switch,
66
+ mo as TabPanel,
67
+ no as Table,
68
+ lo as TableBody,
69
+ io as TableCell,
70
+ To as TableHead,
71
+ wo as TableHeader,
72
+ bo as TableRow,
73
+ xo as Tabs,
74
+ Do as Textarea,
75
+ Bo as Toast,
76
+ uo as ToastContainer,
1613
77
  Ao as Tooltip
1614
78
  };