@clarlabs/ui 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,1625 @@
1
+ import { jsx as e, jsxs as u, Fragment as Ne } from "react/jsx-runtime";
2
+ import me, { useState as k, useRef as G, useEffect as j, forwardRef as Re, createContext as ze, useCallback as ke, useContext as Te } from "react";
3
+ const De = "styles-module__accordion__gf0fR", Ee = "styles-module__item__KZ8v2", Be = "styles-module__header__wApZ8", Ve = "styles-module__title__yCYjK", Me = "styles-module__icon__8N04V", je = "styles-module__iconOpen__PXmc8", Oe = "styles-module__content__WKJF6", Fe = "styles-module__contentOpen__l7aJG", Ke = "styles-module__contentInner__Co6a-", V = {
4
+ accordion: De,
5
+ item: Ee,
6
+ header: Be,
7
+ title: Ve,
8
+ icon: Me,
9
+ iconOpen: je,
10
+ content: Oe,
11
+ contentOpen: Fe,
12
+ contentInner: Ke
13
+ };
14
+ function Q_({ items: s, allowMultiple: t = !1, defaultOpenIds: o = [], className: l = "" }) {
15
+ const [n, a] = k(new Set(o)), _ = (c) => {
16
+ a((i) => {
17
+ const d = new Set(i);
18
+ return d.has(c) ? d.delete(c) : (t || d.clear(), d.add(c)), d;
19
+ });
20
+ };
21
+ return /* @__PURE__ */ e("div", { className: `${V.accordion} ${l}`, children: s.map((c) => /* @__PURE__ */ e(Pe, { item: c, isOpen: n.has(c.id), onToggle: () => _(c.id) }, c.id)) });
22
+ }
23
+ function Pe({ item: s, isOpen: t, onToggle: o }) {
24
+ return /* @__PURE__ */ u("div", { className: `${V.item} ${t ? V.open : ""}`, children: [
25
+ /* @__PURE__ */ u("button", { className: V.header, onClick: o, "aria-expanded": t, children: [
26
+ /* @__PURE__ */ e("span", { className: V.title, children: s.title }),
27
+ /* @__PURE__ */ e("span", { className: `${V.icon} ${t ? V.iconOpen : ""}`, children: "▼" })
28
+ ] }),
29
+ /* @__PURE__ */ e("div", { className: `${V.content} ${t ? V.contentOpen : ""}`, children: /* @__PURE__ */ e("div", { className: V.contentInner, children: s.content }) })
30
+ ] });
31
+ }
32
+ const Ae = "styles-module__alert__EMa3w", Ge = "styles-module__icon__7XvtI", Ze = "styles-module__content__qU8OK", Je = "styles-module__title__Jui7D", Xe = "styles-module__message__cazZX", Ue = "styles-module__dismissButton__RhF19", qe = "styles-module__info__Rb2nq", He = "styles-module__success__sQGN5", Qe = "styles-module__warning__Ev8EY", Ye = "styles-module__error__plkoU", ee = {
33
+ alert: Ae,
34
+ icon: Ge,
35
+ content: Ze,
36
+ title: Je,
37
+ message: Xe,
38
+ dismissButton: Ue,
39
+ info: qe,
40
+ success: He,
41
+ warning: Qe,
42
+ error: Ye
43
+ };
44
+ function Y_({ variant: s = "info", title: t, message: o, dismissible: l = !1, onDismiss: n, className: a = "" }) {
45
+ const _ = {
46
+ info: "ℹ",
47
+ success: "✓",
48
+ warning: "⚠",
49
+ error: "✕"
50
+ };
51
+ return /* @__PURE__ */ u("div", { className: `${ee.alert} ${ee[s]} ${a}`, role: "alert", children: [
52
+ /* @__PURE__ */ e("div", { className: ee.icon, children: _[s] }),
53
+ /* @__PURE__ */ u("div", { className: ee.content, children: [
54
+ t && /* @__PURE__ */ e("div", { className: ee.title, children: t }),
55
+ /* @__PURE__ */ e("div", { className: ee.message, children: o })
56
+ ] }),
57
+ l && /* @__PURE__ */ e("button", { className: ee.dismissButton, onClick: n, "aria-label": "Dismiss alert", children: "✕" })
58
+ ] });
59
+ }
60
+ const es = "styles-module__avatar__xMx8n", ss = "styles-module__image__rl-6T", ts = "styles-module__initials__d0Z0v", ls = "styles-module__sm__YBcEp", ns = "styles-module__md__4GVi1", os = "styles-module__lg__bEtEd", as = "styles-module__xl__WBAtD", cs = "styles-module__status__8qwum", _s = "styles-module__online__9lOl6", ds = "styles-module__offline__pi-XT", is = "styles-module__busy__Cer8C", rs = "styles-module__away__zT9iM", te = {
61
+ avatar: es,
62
+ image: ss,
63
+ initials: ts,
64
+ sm: ls,
65
+ md: ns,
66
+ lg: os,
67
+ xl: as,
68
+ status: cs,
69
+ online: _s,
70
+ offline: ds,
71
+ busy: is,
72
+ away: rs
73
+ };
74
+ function ed({ src: s, alt: t = "Avatar", initials: o, size: l = "md", status: n, className: a = "" }) {
75
+ const _ = () => {
76
+ if (o) return o;
77
+ if (t) {
78
+ const c = t.split(" ");
79
+ return c.length >= 2 ? `${c[0][0]}${c[1][0]}`.toUpperCase() : t.slice(0, 2).toUpperCase();
80
+ }
81
+ return "?";
82
+ };
83
+ return /* @__PURE__ */ u("div", { className: `${te.avatar} ${te[l]} ${a}`, children: [
84
+ s ? /* @__PURE__ */ e("img", { src: s, alt: t, className: te.image }) : /* @__PURE__ */ e("div", { className: te.initials, children: _() }),
85
+ n && /* @__PURE__ */ e("span", { className: `${te.status} ${te[n]}`, "aria-label": `Status: ${n}` })
86
+ ] });
87
+ }
88
+ const us = "styles-module__badge__d6igj", ms = "styles-module__dot__lsgxk", ps = "styles-module__sm__rstsk", ys = "styles-module__md__o-6j3", hs = "styles-module__lg__EXM1E", $s = "styles-module__primary__tHsyl", fs = "styles-module__success__okGOk", bs = "styles-module__warning__W-psO", gs = "styles-module__error__300RS", vs = "styles-module__info__Qec-V", pe = {
89
+ badge: us,
90
+ dot: ms,
91
+ sm: ps,
92
+ md: ys,
93
+ lg: hs,
94
+ default: "styles-module__default__lOwCs",
95
+ primary: $s,
96
+ success: fs,
97
+ warning: bs,
98
+ error: gs,
99
+ info: vs
100
+ };
101
+ function sd({ children: s, variant: t = "default", size: o = "md", dot: l = !1, className: n = "" }) {
102
+ return /* @__PURE__ */ u("span", { className: `${pe.badge} ${pe[t]} ${pe[o]} ${n}`, children: [
103
+ l && /* @__PURE__ */ e("span", { className: pe.dot }),
104
+ s
105
+ ] });
106
+ }
107
+ const Ns = "styles-module__breadcrumbs__jVeyK", ks = "styles-module__list__IBUYZ", ws = "styles-module__item__unpP2", Cs = "styles-module__link__n-LMO", xs = "styles-module__button__MamiK", Is = "styles-module__text__xQt-q", Ws = "styles-module__current__vuaM0", Ls = "styles-module__separator__81mEk", Z = {
108
+ breadcrumbs: Ns,
109
+ list: ks,
110
+ item: ws,
111
+ link: Cs,
112
+ button: xs,
113
+ text: Is,
114
+ current: Ws,
115
+ separator: Ls
116
+ };
117
+ function td({ items: s, separator: t = "/", className: o = "" }) {
118
+ return /* @__PURE__ */ e("nav", { className: `${Z.breadcrumbs} ${o}`, "aria-label": "Breadcrumb", children: /* @__PURE__ */ e("ol", { className: Z.list, children: s.map((l, n) => {
119
+ const a = n === s.length - 1;
120
+ return /* @__PURE__ */ u("li", { className: Z.item, children: [
121
+ l.href && !a ? /* @__PURE__ */ e("a", { href: l.href, className: Z.link, children: l.label }) : l.onClick && !a ? /* @__PURE__ */ e("button", { onClick: l.onClick, className: Z.button, children: l.label }) : /* @__PURE__ */ e("span", { className: `${Z.text} ${a ? Z.current : ""}`, children: l.label }),
122
+ !a && /* @__PURE__ */ e("span", { className: Z.separator, "aria-hidden": "true", children: t })
123
+ ] }, n);
124
+ }) }) });
125
+ }
126
+ const Ss = "styles-module__button__Sh-fr", Rs = "styles-module__sm__TZ7PA", zs = "styles-module__md__MdfAS", Ts = "styles-module__lg__zhBVx", Ds = "styles-module__fullWidth__KAUu7", Es = "styles-module__loading__jL3RT", Bs = "styles-module__spinner__cTprF", Vs = "styles-module__spin__aE1Nk", Ms = "styles-module__hiddenContent__lbKDI", js = "styles-module__primary__TRNPt", Os = "styles-module__secondary__QKgly", Fs = "styles-module__success__DI2AT", Ks = "styles-module__danger__dnMp7", Ps = "styles-module__outline__-o6rL", As = "styles-module__ghost__lca2R", se = {
127
+ button: Ss,
128
+ sm: Rs,
129
+ md: zs,
130
+ lg: Ts,
131
+ fullWidth: Ds,
132
+ loading: Es,
133
+ spinner: Bs,
134
+ spin: Vs,
135
+ hiddenContent: Ms,
136
+ primary: js,
137
+ secondary: Os,
138
+ success: Fs,
139
+ danger: Ks,
140
+ outline: Ps,
141
+ ghost: As
142
+ };
143
+ function ld({ variant: s = "primary", size: t = "md", fullWidth: o = !1, loading: l = !1, disabled: n, className: a = "", children: _, ...c }) {
144
+ return /* @__PURE__ */ u(
145
+ "button",
146
+ {
147
+ className: `
148
+ ${se.button}
149
+ ${se[s]}
150
+ ${se[t]}
151
+ ${o ? se.fullWidth : ""}
152
+ ${l ? se.loading : ""}
153
+ ${a}
154
+ `,
155
+ disabled: n || l,
156
+ ...c,
157
+ children: [
158
+ l && /* @__PURE__ */ e("span", { className: se.spinner }),
159
+ /* @__PURE__ */ e("span", { className: l ? se.hiddenContent : "", children: _ })
160
+ ]
161
+ }
162
+ );
163
+ }
164
+ const Gs = "styles-module__buttonGroup__Uqp-x", Zs = "styles-module__horizontal__oeLpW", Js = "styles-module__vertical__ZrJkT", Xs = "styles-module__fullWidth__sxqJJ", $e = {
165
+ buttonGroup: Gs,
166
+ horizontal: Zs,
167
+ vertical: Js,
168
+ fullWidth: Xs
169
+ };
170
+ function nd({ children: s, orientation: t = "horizontal", fullWidth: o = !1, className: l = "" }) {
171
+ return /* @__PURE__ */ e(
172
+ "div",
173
+ {
174
+ className: `
175
+ ${$e.buttonGroup}
176
+ ${$e[t]}
177
+ ${o ? $e.fullWidth : ""}
178
+ ${l}
179
+ `,
180
+ role: "group",
181
+ children: s
182
+ }
183
+ );
184
+ }
185
+ const Us = "styles-module__card__0iVez", qs = "styles-module__hoverable__7-MZP", Hs = "styles-module__clickable__WiARM", Qs = "styles-module__imageWrapper__LlBXL", Ys = "styles-module__image__5KApl", et = "styles-module__content__-0XZZ", st = "styles-module__header__WVGN7", tt = "styles-module__title__-Th-m", lt = "styles-module__subtitle__VDwvc", nt = "styles-module__body__iaDKl", ot = "styles-module__footer__b10VS", R = {
186
+ card: Us,
187
+ hoverable: qs,
188
+ clickable: Hs,
189
+ imageWrapper: Qs,
190
+ image: Ys,
191
+ content: et,
192
+ header: st,
193
+ title: tt,
194
+ subtitle: lt,
195
+ body: nt,
196
+ footer: ot
197
+ };
198
+ function od({ children: s, title: t, subtitle: o, footer: l, image: n, hoverable: a = !1, className: _ = "", onClick: c }) {
199
+ const i = !!c;
200
+ return /* @__PURE__ */ u(
201
+ "div",
202
+ {
203
+ className: `
204
+ ${R.card}
205
+ ${a ? R.hoverable : ""}
206
+ ${i ? R.clickable : ""}
207
+ ${_}
208
+ `,
209
+ onClick: c,
210
+ role: i ? "button" : void 0,
211
+ tabIndex: i ? 0 : void 0,
212
+ children: [
213
+ n && /* @__PURE__ */ e("div", { className: R.imageWrapper, children: /* @__PURE__ */ e("img", { src: n, alt: t || "", className: R.image }) }),
214
+ /* @__PURE__ */ u("div", { className: R.content, children: [
215
+ (t || o) && /* @__PURE__ */ u("div", { className: R.header, children: [
216
+ t && /* @__PURE__ */ e("h3", { className: R.title, children: t }),
217
+ o && /* @__PURE__ */ e("p", { className: R.subtitle, children: o })
218
+ ] }),
219
+ /* @__PURE__ */ e("div", { className: R.body, children: s }),
220
+ l && /* @__PURE__ */ e("div", { className: R.footer, children: l })
221
+ ] })
222
+ ]
223
+ }
224
+ );
225
+ }
226
+ const at = "styles-module__checkboxWrapper__5ECcg", ct = "styles-module__checkbox__AVGTi", _t = "styles-module__checkmark__xfDiG", dt = "styles-module__label__56KkR", it = "styles-module__checkIcon__B246P", rt = "styles-module__indeterminateIcon__L9Kf-", le = {
227
+ checkboxWrapper: at,
228
+ checkbox: ct,
229
+ checkmark: _t,
230
+ label: dt,
231
+ checkIcon: it,
232
+ indeterminateIcon: rt
233
+ };
234
+ function ad({ label: s, indeterminate: t = !1, className: o = "", ...l }) {
235
+ const n = me.useRef(null);
236
+ return me.useEffect(() => {
237
+ n.current && (n.current.indeterminate = t);
238
+ }, [t]), /* @__PURE__ */ u("label", { className: `${le.checkboxWrapper} ${o}`, children: [
239
+ /* @__PURE__ */ e("input", { ref: n, type: "checkbox", className: le.checkbox, ...l }),
240
+ /* @__PURE__ */ e("span", { className: le.checkmark, children: t ? /* @__PURE__ */ e("span", { className: le.indeterminateIcon, children: "−" }) : /* @__PURE__ */ e("span", { className: le.checkIcon, children: "✓" }) }),
241
+ s && /* @__PURE__ */ e("span", { className: le.label, children: s })
242
+ ] });
243
+ }
244
+ const ut = "styles-module__combobox__YH03u", mt = "styles-module__inputWrapper__UsIYk", pt = "styles-module__input__F-6BL", yt = "styles-module__disabled__UR9gQ", ht = "styles-module__arrow__LV12a", $t = "styles-module__open__-bJ28", ft = "styles-module__menu__twpPT", bt = "styles-module__option__v6IYz", gt = "styles-module__optionDisabled__vOMRI", vt = "styles-module__highlighted__pxy-X", Nt = "styles-module__noResults__-sgTv", z = {
245
+ combobox: ut,
246
+ inputWrapper: mt,
247
+ input: pt,
248
+ disabled: yt,
249
+ arrow: ht,
250
+ open: $t,
251
+ menu: ft,
252
+ option: bt,
253
+ optionDisabled: gt,
254
+ highlighted: vt,
255
+ noResults: Nt
256
+ };
257
+ function cd({
258
+ options: s,
259
+ value: t,
260
+ defaultValue: o = "",
261
+ onChange: l,
262
+ placeholder: n = "Select or type...",
263
+ disabled: a = !1,
264
+ className: _ = "",
265
+ allowCustomValue: c = !1,
266
+ filterFunction: i
267
+ }) {
268
+ const [d, r] = k(o), [m, y] = k(!1), [h, $] = k(-1), p = G(null), v = G(null), N = G(null), de = t !== void 0, O = de ? t : d, xe = i || ((f, w) => f.label.toLowerCase().includes(w.toLowerCase())), Y = s.filter((f) => xe(f, O));
269
+ j(() => {
270
+ const f = (w) => {
271
+ N.current && !N.current.contains(w.target) && y(!1);
272
+ };
273
+ return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
274
+ }, []), j(() => {
275
+ if (m && h >= 0 && v.current) {
276
+ const f = v.current.children[h];
277
+ f && f.scrollIntoView({ block: "nearest" });
278
+ }
279
+ }, [h, m]);
280
+ const Ie = (f) => {
281
+ const w = f.target.value;
282
+ de || r(w), l?.(w), y(!0), $(-1);
283
+ }, ge = (f) => {
284
+ if (f.disabled) return;
285
+ const w = f.value;
286
+ de || r(f.label), l?.(w), y(!1), $(-1), p.current?.blur();
287
+ }, We = (f) => {
288
+ if (!a)
289
+ switch (f.key) {
290
+ case "ArrowDown":
291
+ f.preventDefault(), y(!0), $((w) => {
292
+ const D = Y.length - 1;
293
+ if (w >= D) return D;
294
+ let ie = w + 1;
295
+ for (; ie <= D && Y[ie].disabled; )
296
+ ie++;
297
+ return ie <= D ? ie : w;
298
+ });
299
+ break;
300
+ case "ArrowUp":
301
+ f.preventDefault(), $((w) => {
302
+ if (w <= 0) return -1;
303
+ let D = w - 1;
304
+ for (; D >= 0 && Y[D].disabled; )
305
+ D--;
306
+ return D >= 0 ? D : -1;
307
+ });
308
+ break;
309
+ case "Enter":
310
+ f.preventDefault(), m && h >= 0 ? ge(Y[h]) : c && (l?.(O), y(!1));
311
+ break;
312
+ case "Escape":
313
+ f.preventDefault(), y(!1), $(-1), p.current?.blur();
314
+ break;
315
+ case "Tab":
316
+ y(!1);
317
+ break;
318
+ }
319
+ }, Le = () => {
320
+ a || y(!0);
321
+ }, ve = s.find((f) => f.value === O), Se = ve ? ve.label : O;
322
+ return /* @__PURE__ */ u("div", { ref: N, className: `${z.combobox} ${_}`, children: [
323
+ /* @__PURE__ */ u("div", { className: z.inputWrapper, children: [
324
+ /* @__PURE__ */ e(
325
+ "input",
326
+ {
327
+ ref: p,
328
+ type: "text",
329
+ className: `${z.input} ${a ? z.disabled : ""}`,
330
+ value: Se,
331
+ onChange: Ie,
332
+ onKeyDown: We,
333
+ onFocus: Le,
334
+ placeholder: n,
335
+ disabled: a,
336
+ autoComplete: "off",
337
+ role: "combobox",
338
+ "aria-expanded": m,
339
+ "aria-autocomplete": "list",
340
+ "aria-controls": "combobox-listbox"
341
+ }
342
+ ),
343
+ /* @__PURE__ */ e("span", { className: `${z.arrow} ${m ? z.open : ""}`, children: "▼" })
344
+ ] }),
345
+ m && Y.length > 0 && /* @__PURE__ */ e("ul", { ref: v, id: "combobox-listbox", className: z.menu, role: "listbox", children: Y.map((f, w) => /* @__PURE__ */ e(
346
+ "li",
347
+ {
348
+ className: `${z.option} ${h === w ? z.highlighted : ""} ${f.disabled ? z.optionDisabled : ""}`,
349
+ onClick: () => ge(f),
350
+ role: "option",
351
+ "aria-selected": f.value === O,
352
+ "aria-disabled": f.disabled,
353
+ children: f.label
354
+ },
355
+ f.value
356
+ )) }),
357
+ m && Y.length === 0 && /* @__PURE__ */ e("div", { className: z.noResults, children: c ? "Press Enter to use custom value" : "No results found" })
358
+ ] });
359
+ }
360
+ const kt = "styles-module__datagridWrapper__rcPKe", wt = "styles-module__datagrid__2KTB3", Ct = "styles-module__thead__VLK3H", xt = "styles-module__th__GVqEG", It = "styles-module__tbody__vIVcl", Wt = "styles-module__tr__Qn6CH", Lt = "styles-module__td__UsBhW", St = "styles-module__hoverable__6H3Yy", Rt = "styles-module__clickable__acA9M", zt = "styles-module__striped__1a6NP", E = {
361
+ datagridWrapper: kt,
362
+ datagrid: wt,
363
+ thead: Ct,
364
+ th: xt,
365
+ tbody: It,
366
+ tr: Wt,
367
+ td: Lt,
368
+ hoverable: St,
369
+ clickable: Rt,
370
+ striped: zt
371
+ };
372
+ function _d({ columns: s, data: t, onRowClick: o, striped: l = !1, hoverable: n = !0, className: a = "" }) {
373
+ return /* @__PURE__ */ e("div", { className: `${E.datagridWrapper} ${a}`, children: /* @__PURE__ */ u("table", { className: E.datagrid, children: [
374
+ /* @__PURE__ */ e("thead", { className: E.thead, children: /* @__PURE__ */ e("tr", { children: s.map((_) => /* @__PURE__ */ e("th", { className: E.th, style: { width: _.width }, children: _.header }, _.key)) }) }),
375
+ /* @__PURE__ */ e("tbody", { className: E.tbody, children: t.map((_, c) => /* @__PURE__ */ e(
376
+ "tr",
377
+ {
378
+ className: `
379
+ ${E.tr}
380
+ ${l && c % 2 === 1 ? E.striped : ""}
381
+ ${n ? E.hoverable : ""}
382
+ ${o ? E.clickable : ""}
383
+ `,
384
+ onClick: () => o?.(_),
385
+ children: s.map((i) => /* @__PURE__ */ e("td", { className: E.td, children: i.render ? i.render(_[i.key], _) : _[i.key] }, i.key))
386
+ },
387
+ c
388
+ )) })
389
+ ] }) });
390
+ }
391
+ const Tt = "styles-module__datePicker__uLxOg", Dt = "styles-module__input__0m5L3", Et = "styles-module__icon__0-EVW", fe = {
392
+ datePicker: Tt,
393
+ input: Dt,
394
+ icon: Et
395
+ };
396
+ function dd({ value: s, onChange: t, minDate: o, maxDate: l, className: n = "", ...a }) {
397
+ const [_, c] = k(s ? be(s) : ""), i = (d) => {
398
+ const r = d.target.value;
399
+ if (c(r), r) {
400
+ const m = new Date(r);
401
+ isNaN(m.getTime()) || t?.(m);
402
+ } else
403
+ t?.(null);
404
+ };
405
+ return /* @__PURE__ */ u("div", { className: `${fe.datePicker} ${n}`, children: [
406
+ /* @__PURE__ */ e(
407
+ "input",
408
+ {
409
+ type: "date",
410
+ className: fe.input,
411
+ value: _,
412
+ onChange: i,
413
+ min: o ? be(o) : void 0,
414
+ max: l ? be(l) : void 0,
415
+ ...a
416
+ }
417
+ ),
418
+ /* @__PURE__ */ e("span", { className: fe.icon, children: "📅" })
419
+ ] });
420
+ }
421
+ function be(s) {
422
+ const t = s.getFullYear(), o = String(s.getMonth() + 1).padStart(2, "0"), l = String(s.getDate()).padStart(2, "0");
423
+ return `${t}-${o}-${l}`;
424
+ }
425
+ const Bt = "styles-module__dateRangePicker__2-ckk", Vt = "styles-module__inputWrapper__gXzep", Mt = "styles-module__input__yirN1", jt = "styles-module__icon__k-Xdp", Ot = "styles-module__separator__Lxjed", J = {
426
+ dateRangePicker: Bt,
427
+ inputWrapper: Vt,
428
+ input: Mt,
429
+ icon: jt,
430
+ separator: Ot
431
+ };
432
+ function id({ value: s, onChange: t, minDate: o, maxDate: l, className: n = "" }) {
433
+ const [a, _] = k(s?.start ? ne(s.start) : ""), [c, i] = k(s?.end ? ne(s.end) : ""), d = (m) => {
434
+ const y = m.target.value;
435
+ _(y);
436
+ const h = y ? new Date(y) : null, $ = c ? new Date(c) : null;
437
+ h && !isNaN(h.getTime()) ? t?.({ start: h, end: $ }) : t?.({ start: null, end: $ });
438
+ }, r = (m) => {
439
+ const y = m.target.value;
440
+ i(y);
441
+ const h = a ? new Date(a) : null, $ = y ? new Date(y) : null;
442
+ $ && !isNaN($.getTime()) ? t?.({ start: h, end: $ }) : t?.({ start: h, end: null });
443
+ };
444
+ return /* @__PURE__ */ u("div", { className: `${J.dateRangePicker} ${n}`, children: [
445
+ /* @__PURE__ */ u("div", { className: J.inputWrapper, children: [
446
+ /* @__PURE__ */ e(
447
+ "input",
448
+ {
449
+ type: "date",
450
+ className: J.input,
451
+ value: a,
452
+ onChange: d,
453
+ min: o ? ne(o) : void 0,
454
+ max: c || (l ? ne(l) : void 0),
455
+ placeholder: "Start date"
456
+ }
457
+ ),
458
+ /* @__PURE__ */ e("span", { className: J.icon, children: "📅" })
459
+ ] }),
460
+ /* @__PURE__ */ e("span", { className: J.separator, children: "→" }),
461
+ /* @__PURE__ */ u("div", { className: J.inputWrapper, children: [
462
+ /* @__PURE__ */ e(
463
+ "input",
464
+ {
465
+ type: "date",
466
+ className: J.input,
467
+ value: c,
468
+ onChange: r,
469
+ min: a || (o ? ne(o) : void 0),
470
+ max: l ? ne(l) : void 0,
471
+ placeholder: "End date"
472
+ }
473
+ ),
474
+ /* @__PURE__ */ e("span", { className: J.icon, children: "📅" })
475
+ ] })
476
+ ] });
477
+ }
478
+ function ne(s) {
479
+ const t = s.getFullYear(), o = String(s.getMonth() + 1).padStart(2, "0"), l = String(s.getDate()).padStart(2, "0");
480
+ return `${t}-${o}-${l}`;
481
+ }
482
+ const Ft = "styles-module__divider__I6KTc", Kt = "styles-module__horizontal__rrjPy", Pt = "styles-module__solid__LhHPX", At = "styles-module__dashed__2ZL2z", Gt = "styles-module__dotted__N8tLr", Zt = "styles-module__line__ff0dO", Jt = "styles-module__label__izE2E", Xt = "styles-module__vertical__RBm03", oe = {
483
+ divider: Ft,
484
+ horizontal: Kt,
485
+ solid: Pt,
486
+ dashed: At,
487
+ dotted: Gt,
488
+ line: Zt,
489
+ label: Jt,
490
+ vertical: Xt
491
+ };
492
+ function rd({ orientation: s = "horizontal", variant: t = "solid", label: o, className: l = "" }) {
493
+ const n = `${oe.divider} ${oe[s]} ${oe[t]} ${l}`;
494
+ return o && s === "horizontal" ? /* @__PURE__ */ u("div", { className: n, children: [
495
+ /* @__PURE__ */ e("span", { className: oe.line }),
496
+ /* @__PURE__ */ e("span", { className: oe.label, children: o }),
497
+ /* @__PURE__ */ e("span", { className: oe.line })
498
+ ] }) : /* @__PURE__ */ e("div", { className: n });
499
+ }
500
+ const Ut = "styles-module__dropdown__uiKSF", qt = "styles-module__trigger__tVV7I", Ht = "styles-module__disabled__Xy0oo", Qt = "styles-module__selected__RnAL-", Yt = "styles-module__placeholder__aePOZ", el = "styles-module__arrow__QYBcO", sl = "styles-module__open__huthl", tl = "styles-module__menu__Fvg4d", ll = "styles-module__option__OLwBz", nl = "styles-module__optionDisabled__n9Gdm", ol = "styles-module__active__W7XbV", T = {
501
+ dropdown: Ut,
502
+ trigger: qt,
503
+ disabled: Ht,
504
+ selected: Qt,
505
+ placeholder: Yt,
506
+ arrow: el,
507
+ open: sl,
508
+ menu: tl,
509
+ option: ll,
510
+ optionDisabled: nl,
511
+ active: ol
512
+ };
513
+ function ud({ options: s, value: t, onChange: o, placeholder: l = "Select an option", disabled: n = !1, className: a = "" }) {
514
+ const [_, c] = k(!1), [i, d] = k(t || ""), r = G(null);
515
+ j(() => {
516
+ const $ = (p) => {
517
+ r.current && !r.current.contains(p.target) && c(!1);
518
+ };
519
+ return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
520
+ }, []);
521
+ const m = ($) => {
522
+ n || (d($), c(!1), o?.($));
523
+ }, y = s.find(($) => $.value === i), h = y?.label || l;
524
+ return /* @__PURE__ */ u("div", { className: `${T.dropdown} ${a}`, ref: r, children: [
525
+ /* @__PURE__ */ u(
526
+ "button",
527
+ {
528
+ className: `${T.trigger} ${n ? T.disabled : ""}`,
529
+ onClick: () => !n && c(!_),
530
+ disabled: n,
531
+ type: "button",
532
+ children: [
533
+ /* @__PURE__ */ e("span", { className: y ? T.selected : T.placeholder, children: h }),
534
+ /* @__PURE__ */ e("span", { className: `${T.arrow} ${_ ? T.open : ""}`, children: "▼" })
535
+ ]
536
+ }
537
+ ),
538
+ _ && /* @__PURE__ */ e("div", { className: T.menu, children: s.map(($) => /* @__PURE__ */ e(
539
+ "div",
540
+ {
541
+ className: `${T.option} ${$.value === i ? T.active : ""} ${$.disabled ? T.optionDisabled : ""}`,
542
+ onClick: () => !$.disabled && m($.value),
543
+ children: $.label
544
+ },
545
+ $.value
546
+ )) })
547
+ ] });
548
+ }
549
+ const al = "styles-module__filePicker__mq8yj", cl = "styles-module__dropzone__DdFZi", _l = "styles-module__disabled__PEgD4", dl = "styles-module__icon__lgApu", il = "styles-module__text__Djodx", rl = "styles-module__input__3Edc4", ul = "styles-module__fileList__mG9O1", ml = "styles-module__fileItem__NB3Uq", pl = "styles-module__processing__R-ZHY", yl = "styles-module__uploaded__gJ1od", hl = "styles-module__failed__MlKNj", $l = "styles-module__fileIcon__IUNOU", fl = "styles-module__fileName__E1M5I", bl = "styles-module__fileSize__Yiown", gl = "styles-module__error__KmdmE", vl = "styles-module__remove__JiGmS", x = {
550
+ filePicker: al,
551
+ dropzone: cl,
552
+ disabled: _l,
553
+ icon: dl,
554
+ text: il,
555
+ input: rl,
556
+ fileList: ul,
557
+ fileItem: ml,
558
+ processing: pl,
559
+ uploaded: yl,
560
+ failed: hl,
561
+ fileIcon: $l,
562
+ fileName: fl,
563
+ fileSize: bl,
564
+ error: gl,
565
+ remove: vl
566
+ };
567
+ function md({ accept: s, multiple: t = !1, maxSize: o, disabled: l = !1, onChange: n, onUpload: a, className: _ = "" }) {
568
+ const [c, i] = k([]), d = G(null), r = async (p) => {
569
+ if (!p || l) return;
570
+ const v = Array.from(p).map((N) => o && N.size > o ? { file: N, status: "failed", error: "File too large" } : { file: N, status: "idle" });
571
+ if (i((N) => [...N, ...v]), n?.(v), a)
572
+ for (const N of v)
573
+ N.status !== "failed" && await m(N);
574
+ }, m = async (p) => {
575
+ y(p.file.name, "processing");
576
+ try {
577
+ await a?.(p.file), y(p.file.name, "uploaded");
578
+ } catch (v) {
579
+ y(p.file.name, "failed", v.message);
580
+ }
581
+ }, y = (p, v, N) => {
582
+ i((de) => de.map((O) => O.file.name === p ? { ...O, status: v, error: N } : O));
583
+ }, h = (p) => {
584
+ i((v) => v.filter((N) => N.file.name !== p));
585
+ }, $ = (p) => {
586
+ switch (p) {
587
+ case "processing":
588
+ return "⏳";
589
+ case "uploaded":
590
+ return "✓";
591
+ case "failed":
592
+ return "✗";
593
+ default:
594
+ return "📄";
595
+ }
596
+ };
597
+ return /* @__PURE__ */ u("div", { className: `${x.filePicker} ${_}`, children: [
598
+ /* @__PURE__ */ u("div", { className: `${x.dropzone} ${l ? x.disabled : ""}`, onClick: () => !l && d.current?.click(), children: [
599
+ /* @__PURE__ */ e("span", { className: x.icon, children: "📁" }),
600
+ /* @__PURE__ */ e("span", { className: x.text, children: "Click to select files" })
601
+ ] }),
602
+ /* @__PURE__ */ e(
603
+ "input",
604
+ {
605
+ ref: d,
606
+ type: "file",
607
+ accept: s,
608
+ multiple: t,
609
+ disabled: l,
610
+ onChange: (p) => r(p.target.files),
611
+ className: x.input
612
+ }
613
+ ),
614
+ c.length > 0 && /* @__PURE__ */ e("div", { className: x.fileList, children: c.map((p, v) => /* @__PURE__ */ u("div", { className: `${x.fileItem} ${x[p.status]}`, children: [
615
+ /* @__PURE__ */ e("span", { className: x.fileIcon, children: $(p.status) }),
616
+ /* @__PURE__ */ e("span", { className: x.fileName, children: p.file.name }),
617
+ /* @__PURE__ */ u("span", { className: x.fileSize, children: [
618
+ (p.file.size / 1024).toFixed(1),
619
+ " KB"
620
+ ] }),
621
+ p.error && /* @__PURE__ */ e("span", { className: x.error, children: p.error }),
622
+ /* @__PURE__ */ e("button", { className: x.remove, onClick: () => h(p.file.name), children: "×" })
623
+ ] }, `${p.file.name}-${v}`)) })
624
+ ] });
625
+ }
626
+ const Nl = "styles-module__header__9QAJF", kl = "styles-module__sticky__wm-sd", wl = "styles-module__content__ZPdW7", Cl = "styles-module__brand__-0bx7", xl = "styles-module__logo__3KpY5", Il = "styles-module__title__yDhEG", Wl = "styles-module__nav__6MmHf", Ll = "styles-module__actions__yTPsJ", X = {
627
+ header: Nl,
628
+ sticky: kl,
629
+ content: wl,
630
+ brand: Cl,
631
+ logo: xl,
632
+ title: Il,
633
+ nav: Wl,
634
+ actions: Ll
635
+ };
636
+ function pd({ logo: s, title: t, children: o, actions: l, sticky: n = !1, className: a = "" }) {
637
+ return /* @__PURE__ */ e("header", { className: `${X.header} ${n ? X.sticky : ""} ${a}`, children: /* @__PURE__ */ u("div", { className: X.content, children: [
638
+ (s || t) && /* @__PURE__ */ u("div", { className: X.brand, children: [
639
+ s && /* @__PURE__ */ e("div", { className: X.logo, children: s }),
640
+ t && /* @__PURE__ */ e("h1", { className: X.title, children: t })
641
+ ] }),
642
+ o && /* @__PURE__ */ e("div", { className: X.nav, children: o }),
643
+ l && /* @__PURE__ */ e("div", { className: X.actions, children: l })
644
+ ] }) });
645
+ }
646
+ const Sl = "styles-module__inputContainer__KSDK-", Rl = "styles-module__fullWidth__rLaUj", zl = "styles-module__label__-uPCz", Tl = "styles-module__wrapper__JTZMt", Dl = "styles-module__input__KRJnF", El = "styles-module__withIcon__mikvP", Bl = "styles-module__disabled__NjJFs", Vl = "styles-module__sm__cr6Ko", Ml = "styles-module__lg__geHP2", jl = "styles-module__error__UCrFp", Ol = "styles-module__success__fKUT8", Fl = "styles-module__icon__qopq-", Kl = "styles-module__helperText__9ULK8", Pl = "styles-module__errorText__JTsOi", L = {
647
+ inputContainer: Sl,
648
+ fullWidth: Rl,
649
+ label: zl,
650
+ wrapper: Tl,
651
+ input: Dl,
652
+ withIcon: El,
653
+ disabled: Bl,
654
+ sm: Vl,
655
+ lg: Ml,
656
+ error: jl,
657
+ success: Ol,
658
+ icon: Fl,
659
+ helperText: Kl,
660
+ errorText: Pl
661
+ }, Al = Re(
662
+ ({ label: s, error: t, helperText: o, size: l = "md", variant: n = "default", icon: a, fullWidth: _ = !1, className: c = "", disabled: i = !1, ...d }, r) => {
663
+ const m = t ? "error" : n, y = `${L.inputContainer} ${_ ? L.fullWidth : ""} ${c}`, h = `${L.input} ${L[l]} ${L[m]} ${a ? L.withIcon : ""} ${i ? L.disabled : ""}`;
664
+ return /* @__PURE__ */ u("div", { className: y, children: [
665
+ s && /* @__PURE__ */ e("label", { className: L.label, children: s }),
666
+ /* @__PURE__ */ u("div", { className: L.wrapper, children: [
667
+ a && /* @__PURE__ */ e("span", { className: L.icon, children: a }),
668
+ /* @__PURE__ */ e("input", { ref: r, className: h, disabled: i, ...d })
669
+ ] }),
670
+ (t || o) && /* @__PURE__ */ e("span", { className: `${L.helperText} ${t ? L.errorText : ""}`, children: t || o })
671
+ ] });
672
+ }
673
+ );
674
+ Al.displayName = "Input";
675
+ const Gl = "styles-module__label__QjEAd", Zl = "styles-module__disabled__yJ4NK", Jl = "styles-module__sm__KnRgV", Xl = "styles-module__md__z8a54", Ul = "styles-module__lg__KOzy-", ql = "styles-module__required__ZBqbG", ye = {
676
+ label: Gl,
677
+ disabled: Zl,
678
+ sm: Jl,
679
+ md: Xl,
680
+ lg: Ul,
681
+ required: ql
682
+ };
683
+ function yd({ size: s = "md", required: t = !1, disabled: o = !1, className: l = "", children: n, ...a }) {
684
+ return /* @__PURE__ */ u("label", { className: `${ye.label} ${ye[s]} ${o ? ye.disabled : ""} ${l}`, ...a, children: [
685
+ n,
686
+ t && /* @__PURE__ */ e("span", { className: ye.required, children: "*" })
687
+ ] });
688
+ }
689
+ const Hl = "styles-module__list__i-PH3", Ql = "styles-module__dividers__klcR-", Yl = "styles-module__item__hLR7A", en = "styles-module__hoverable__6FbJF", sn = "styles-module__clickable__ahnDb", tn = "styles-module__disabled__W5Z3Y", ln = "styles-module__icon__fSr06", nn = "styles-module__content__ujdaE", on = "styles-module__badge__dwlRk", F = {
690
+ list: Hl,
691
+ dividers: Ql,
692
+ item: Yl,
693
+ hoverable: en,
694
+ clickable: sn,
695
+ disabled: tn,
696
+ icon: ln,
697
+ content: nn,
698
+ badge: on
699
+ };
700
+ function hd({ items: s, hoverable: t = !1, dividers: o = !1, className: l = "" }) {
701
+ return /* @__PURE__ */ e("ul", { className: `${F.list} ${o ? F.dividers : ""} ${l}`, children: s.map((n) => /* @__PURE__ */ u(
702
+ "li",
703
+ {
704
+ className: `${F.item} ${t && !n.disabled ? F.hoverable : ""} ${n.disabled ? F.disabled : ""} ${n.onClick && !n.disabled ? F.clickable : ""}`,
705
+ onClick: n.disabled ? void 0 : n.onClick,
706
+ children: [
707
+ n.icon && /* @__PURE__ */ e("span", { className: F.icon, children: n.icon }),
708
+ /* @__PURE__ */ e("span", { className: F.content, children: n.content }),
709
+ n.badge && /* @__PURE__ */ e("span", { className: F.badge, children: n.badge })
710
+ ]
711
+ },
712
+ n.id
713
+ )) });
714
+ }
715
+ const an = "styles-module__overlay__Ty-He", cn = "styles-module__fadeIn__vywQ8", _n = "styles-module__modal__bC015", dn = "styles-module__slideUp__i-uri", rn = "styles-module__sm__HasCZ", un = "styles-module__md__y-51k", mn = "styles-module__lg__bXotd", pn = "styles-module__xl__wKYbR", yn = "styles-module__header__agEZy", hn = "styles-module__title__91HGo", $n = "styles-module__closeButton__u-naO", fn = "styles-module__content__1xlis", bn = "styles-module__footer__m3SbZ", U = {
716
+ overlay: an,
717
+ fadeIn: cn,
718
+ modal: _n,
719
+ slideUp: dn,
720
+ sm: rn,
721
+ md: un,
722
+ lg: mn,
723
+ xl: pn,
724
+ header: yn,
725
+ title: hn,
726
+ closeButton: $n,
727
+ content: fn,
728
+ footer: bn
729
+ };
730
+ function $d({
731
+ isOpen: s,
732
+ onClose: t,
733
+ title: o,
734
+ children: l,
735
+ footer: n,
736
+ size: a = "md",
737
+ closeOnOverlayClick: _ = !0,
738
+ showCloseButton: c = !0,
739
+ className: i = ""
740
+ }) {
741
+ return j(() => (s ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
742
+ document.body.style.overflow = "";
743
+ }), [s]), j(() => {
744
+ const d = (r) => {
745
+ r.key === "Escape" && s && t();
746
+ };
747
+ return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
748
+ }, [s, t]), s ? /* @__PURE__ */ e("div", { className: U.overlay, onClick: _ ? t : void 0, children: /* @__PURE__ */ u("div", { className: `${U.modal} ${U[a]} ${i}`, onClick: (d) => d.stopPropagation(), children: [
749
+ (o || c) && /* @__PURE__ */ u("div", { className: U.header, children: [
750
+ o && /* @__PURE__ */ e("h2", { className: U.title, children: o }),
751
+ c && /* @__PURE__ */ e("button", { className: U.closeButton, onClick: t, type: "button", children: "×" })
752
+ ] }),
753
+ /* @__PURE__ */ e("div", { className: U.content, children: l }),
754
+ n && /* @__PURE__ */ e("div", { className: U.footer, children: n })
755
+ ] }) }) : null;
756
+ }
757
+ const gn = "styles-module__pagination__P-TuL", vn = "styles-module__pageButton__saWQq", Nn = "styles-module__active__6G9dp", kn = "styles-module__dots__HNsj1", q = {
758
+ pagination: gn,
759
+ pageButton: vn,
760
+ active: Nn,
761
+ dots: kn
762
+ };
763
+ function fd({ currentPage: s, totalPages: t, onPageChange: o, showFirstLast: l = !0, siblingCount: n = 1, className: a = "" }) {
764
+ const _ = (m, y) => Array.from({ length: y - m + 1 }, (h, $) => m + $), i = (() => {
765
+ const m = n + 5;
766
+ if (t <= m)
767
+ return _(1, t);
768
+ const y = Math.max(s - n, 1), h = Math.min(s + n, t), $ = y > 2, p = h < t - 1;
769
+ return !$ && p ? [..._(1, 3 + 2 * n), "...", t] : $ && !p ? [1, "...", ..._(t - (2 + 2 * n), t)] : [1, "...", ..._(y, h), "...", t];
770
+ })(), d = () => {
771
+ s > 1 && o(s - 1);
772
+ }, r = () => {
773
+ s < t && o(s + 1);
774
+ };
775
+ return /* @__PURE__ */ u("nav", { className: `${q.pagination} ${a}`, children: [
776
+ l && /* @__PURE__ */ e("button", { className: q.pageButton, onClick: () => o(1), disabled: s === 1, children: "«" }),
777
+ /* @__PURE__ */ e("button", { className: q.pageButton, onClick: d, disabled: s === 1, children: "‹" }),
778
+ i.map((m, y) => m === "..." ? /* @__PURE__ */ e("span", { className: q.dots, children: "..." }, `dots-${y}`) : /* @__PURE__ */ e(
779
+ "button",
780
+ {
781
+ className: `${q.pageButton} ${m === s ? q.active : ""}`,
782
+ onClick: () => o(m),
783
+ children: m
784
+ },
785
+ m
786
+ )),
787
+ /* @__PURE__ */ e("button", { className: q.pageButton, onClick: r, disabled: s === t, children: "›" }),
788
+ l && /* @__PURE__ */ e("button", { className: q.pageButton, onClick: () => o(t), disabled: s === t, children: "»" })
789
+ ] });
790
+ }
791
+ const wn = "styles-module__container__u4q5n", Cn = "styles-module__progressBar__wAUjD", xn = "styles-module__sm__ZBiyl", In = "styles-module__md__oXZzu", Wn = "styles-module__lg__JmNO0", Ln = "styles-module__fill__bDflZ", Sn = "styles-module__success__drT36", Rn = "styles-module__warning__p-mHQ", zn = "styles-module__error__ecpJB", Tn = "styles-module__info__vfjga", Dn = "styles-module__striped__El9o5", En = "styles-module__animated__9FN7u", Bn = "styles-module__progress-stripes__etVVj", Vn = "styles-module__label__TpB8Q", H = {
792
+ container: wn,
793
+ progressBar: Cn,
794
+ sm: xn,
795
+ md: In,
796
+ lg: Wn,
797
+ fill: Ln,
798
+ default: "styles-module__default__7qIAE",
799
+ success: Sn,
800
+ warning: Rn,
801
+ error: zn,
802
+ info: Tn,
803
+ striped: Dn,
804
+ animated: En,
805
+ "progress-stripes": "styles-module__progress-stripes__etVVj",
806
+ progressStripes: Bn,
807
+ label: Vn
808
+ };
809
+ function bd({
810
+ value: s,
811
+ max: t = 100,
812
+ variant: o = "default",
813
+ size: l = "md",
814
+ showLabel: n = !1,
815
+ label: a,
816
+ animated: _ = !1,
817
+ striped: c = !1,
818
+ className: i = ""
819
+ }) {
820
+ const d = Math.min(Math.max(s / t * 100, 0), 100), r = a || `${Math.round(d)}%`;
821
+ return /* @__PURE__ */ e("div", { className: `${H.container} ${i}`, children: /* @__PURE__ */ e("div", { className: `${H.progressBar} ${H[l]}`, children: /* @__PURE__ */ e(
822
+ "div",
823
+ {
824
+ className: `${H.fill} ${H[o]} ${c ? H.striped : ""} ${_ ? H.animated : ""}`,
825
+ style: { width: `${d}%` },
826
+ children: n && /* @__PURE__ */ e("span", { className: H.label, children: r })
827
+ }
828
+ ) }) });
829
+ }
830
+ const Mn = "styles-module__radioButton__30HVZ", jn = "styles-module__disabled__TuSU6", On = "styles-module__input__-NkgJ", Fn = "styles-module__radio__dKOL5", Kn = "styles-module__label__M94so", re = {
831
+ radioButton: Mn,
832
+ disabled: jn,
833
+ input: On,
834
+ radio: Fn,
835
+ label: Kn
836
+ };
837
+ function gd({ label: s, value: t, name: o, checked: l = !1, disabled: n = !1, onChange: a, className: _ = "", ...c }) {
838
+ return /* @__PURE__ */ u("label", { className: `${re.radioButton} ${n ? re.disabled : ""} ${_}`, children: [
839
+ /* @__PURE__ */ e("input", { type: "radio", name: o, value: t, checked: l, disabled: n, onChange: a, className: re.input, ...c }),
840
+ /* @__PURE__ */ e("span", { className: re.radio }),
841
+ s && /* @__PURE__ */ e("span", { className: re.label, children: s })
842
+ ] });
843
+ }
844
+ const Pn = "styles-module__container__KhKB7", An = "styles-module__label__nGyr8", Gn = "styles-module__rangeWrapper__dnhOv", Zn = "styles-module__inputWrapper__vVIhy", Jn = "styles-module__input__C9H5I", Xn = "styles-module__disabled__8xB9M", Un = "styles-module__minMax__5jVHq", qn = "styles-module__value__4hZJK", K = {
845
+ container: Pn,
846
+ label: An,
847
+ rangeWrapper: Gn,
848
+ inputWrapper: Zn,
849
+ input: Jn,
850
+ disabled: Xn,
851
+ minMax: Un,
852
+ value: qn
853
+ };
854
+ function vd({
855
+ label: s,
856
+ min: t = 0,
857
+ max: o = 100,
858
+ step: l = 1,
859
+ value: n = 50,
860
+ showValue: a = !1,
861
+ showMinMax: _ = !1,
862
+ onChange: c,
863
+ className: i = "",
864
+ disabled: d = !1,
865
+ ...r
866
+ }) {
867
+ const m = (n - t) / (o - t) * 100;
868
+ return /* @__PURE__ */ u("div", { className: `${K.container} ${i}`, children: [
869
+ s && /* @__PURE__ */ e("label", { className: K.label, children: s }),
870
+ /* @__PURE__ */ u("div", { className: K.rangeWrapper, children: [
871
+ _ && /* @__PURE__ */ e("span", { className: K.minMax, children: t }),
872
+ /* @__PURE__ */ e("div", { className: K.inputWrapper, children: /* @__PURE__ */ e(
873
+ "input",
874
+ {
875
+ type: "range",
876
+ min: t,
877
+ max: o,
878
+ step: l,
879
+ value: n,
880
+ onChange: c,
881
+ disabled: d,
882
+ className: `${K.input} ${d ? K.disabled : ""}`,
883
+ style: { "--percentage": `${m}%` },
884
+ ...r
885
+ }
886
+ ) }),
887
+ _ && /* @__PURE__ */ e("span", { className: K.minMax, children: o })
888
+ ] }),
889
+ a && /* @__PURE__ */ e("span", { className: K.value, children: n })
890
+ ] });
891
+ }
892
+ const Hn = "styles-module__richSelect__xtDdz", Qn = "styles-module__trigger__nkuFi", Yn = "styles-module__disabled__aRnNR", eo = "styles-module__selectedContent__1YUDI", so = "styles-module__textContent__sVML5", to = "styles-module__label__DYAVs", lo = "styles-module__description__-NG4t", no = "styles-module__placeholder__83U0w", oo = "styles-module__icon__v-J2b", ao = "styles-module__arrow__m-D1Y", co = "styles-module__open__gZef9", _o = "styles-module__menu__zMZHy", io = "styles-module__searchWrapper__yPXor", ro = "styles-module__searchInput__Vq3C6", uo = "styles-module__optionsList__OAhYK", mo = "styles-module__option__vTDi0", po = "styles-module__optionDisabled__spphz", yo = "styles-module__active__FRlKy", ho = "styles-module__noResults__DsPu8", b = {
893
+ richSelect: Hn,
894
+ trigger: Qn,
895
+ disabled: Yn,
896
+ selectedContent: eo,
897
+ textContent: so,
898
+ label: to,
899
+ description: lo,
900
+ placeholder: no,
901
+ icon: oo,
902
+ arrow: ao,
903
+ open: co,
904
+ menu: _o,
905
+ searchWrapper: io,
906
+ searchInput: ro,
907
+ optionsList: uo,
908
+ option: mo,
909
+ optionDisabled: po,
910
+ active: yo,
911
+ noResults: ho
912
+ };
913
+ function Nd({
914
+ options: s,
915
+ value: t,
916
+ onChange: o,
917
+ placeholder: l = "Select an option",
918
+ disabled: n = !1,
919
+ searchable: a = !1,
920
+ className: _ = ""
921
+ }) {
922
+ const [c, i] = k(!1), [d, r] = k(""), m = G(null);
923
+ j(() => {
924
+ const p = (v) => {
925
+ m.current && !m.current.contains(v.target) && (i(!1), r(""));
926
+ };
927
+ return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
928
+ }, []);
929
+ const y = (p) => {
930
+ n || (o?.(p), i(!1), r(""));
931
+ }, h = s.find((p) => p.value === t), $ = a ? s.filter((p) => p.label.toLowerCase().includes(d.toLowerCase())) : s;
932
+ return /* @__PURE__ */ u("div", { className: `${b.richSelect} ${_}`, ref: m, children: [
933
+ /* @__PURE__ */ u(
934
+ "button",
935
+ {
936
+ className: `${b.trigger} ${n ? b.disabled : ""}`,
937
+ onClick: () => !n && i(!c),
938
+ disabled: n,
939
+ type: "button",
940
+ children: [
941
+ h ? /* @__PURE__ */ u("div", { className: b.selectedContent, children: [
942
+ h.icon && /* @__PURE__ */ e("span", { className: b.icon, children: h.icon }),
943
+ /* @__PURE__ */ u("div", { className: b.textContent, children: [
944
+ /* @__PURE__ */ e("span", { className: b.label, children: h.label }),
945
+ h.description && /* @__PURE__ */ e("span", { className: b.description, children: h.description })
946
+ ] })
947
+ ] }) : /* @__PURE__ */ e("span", { className: b.placeholder, children: l }),
948
+ /* @__PURE__ */ e("span", { className: `${b.arrow} ${c ? b.open : ""}`, children: "▼" })
949
+ ]
950
+ }
951
+ ),
952
+ c && /* @__PURE__ */ u("div", { className: b.menu, children: [
953
+ a && /* @__PURE__ */ e("div", { className: b.searchWrapper, children: /* @__PURE__ */ e(
954
+ "input",
955
+ {
956
+ type: "text",
957
+ className: b.searchInput,
958
+ placeholder: "Search...",
959
+ value: d,
960
+ onChange: (p) => r(p.target.value),
961
+ autoFocus: !0
962
+ }
963
+ ) }),
964
+ /* @__PURE__ */ u("div", { className: b.optionsList, children: [
965
+ $.map((p) => /* @__PURE__ */ u(
966
+ "div",
967
+ {
968
+ className: `${b.option} ${p.value === t ? b.active : ""} ${p.disabled ? b.optionDisabled : ""}`,
969
+ onClick: () => !p.disabled && y(p.value),
970
+ children: [
971
+ p.icon && /* @__PURE__ */ e("span", { className: b.icon, children: p.icon }),
972
+ /* @__PURE__ */ u("div", { className: b.textContent, children: [
973
+ /* @__PURE__ */ e("span", { className: b.label, children: p.label }),
974
+ p.description && /* @__PURE__ */ e("span", { className: b.description, children: p.description })
975
+ ] })
976
+ ]
977
+ },
978
+ p.value
979
+ )),
980
+ $.length === 0 && /* @__PURE__ */ e("div", { className: b.noResults, children: "No results found" })
981
+ ] })
982
+ ] })
983
+ ] });
984
+ }
985
+ const $o = "styles-module__overlay__tP-g3", fo = "styles-module__fadeIn__MKn3S", bo = "styles-module__sidePanel__bfmoW", go = "styles-module__left__X7-S4", vo = "styles-module__slideInLeft__nE6Ff", No = "styles-module__right__Fvefe", ko = "styles-module__slideInRight__bvjTy", wo = "styles-module__sm__CHsFH", Co = "styles-module__md__17Q10", xo = "styles-module__lg__8XCJd", Io = "styles-module__header__-AKr-", Wo = "styles-module__title__8S4yp", Lo = "styles-module__closeButton__DQgJe", So = "styles-module__content__XGAif", Ro = "styles-module__footer__cX66N", P = {
986
+ overlay: $o,
987
+ fadeIn: fo,
988
+ sidePanel: bo,
989
+ left: go,
990
+ slideInLeft: vo,
991
+ right: No,
992
+ slideInRight: ko,
993
+ sm: wo,
994
+ md: Co,
995
+ lg: xo,
996
+ header: Io,
997
+ title: Wo,
998
+ closeButton: Lo,
999
+ content: So,
1000
+ footer: Ro
1001
+ };
1002
+ function kd({
1003
+ isOpen: s,
1004
+ onClose: t,
1005
+ title: o,
1006
+ children: l,
1007
+ footer: n,
1008
+ position: a = "right",
1009
+ size: _ = "md",
1010
+ closeOnOverlayClick: c = !0,
1011
+ showCloseButton: i = !0,
1012
+ className: d = ""
1013
+ }) {
1014
+ return j(() => (s ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1015
+ document.body.style.overflow = "";
1016
+ }), [s]), j(() => {
1017
+ const r = (m) => {
1018
+ m.key === "Escape" && s && t();
1019
+ };
1020
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
1021
+ }, [s, t]), s ? /* @__PURE__ */ e("div", { className: P.overlay, onClick: c ? t : void 0, children: /* @__PURE__ */ u("div", { className: `${P.sidePanel} ${P[a]} ${P[_]} ${d}`, onClick: (r) => r.stopPropagation(), children: [
1022
+ (o || i) && /* @__PURE__ */ u("div", { className: P.header, children: [
1023
+ o && /* @__PURE__ */ e("h2", { className: P.title, children: o }),
1024
+ i && /* @__PURE__ */ e("button", { className: P.closeButton, onClick: t, type: "button", children: "×" })
1025
+ ] }),
1026
+ /* @__PURE__ */ e("div", { className: P.content, children: l }),
1027
+ n && /* @__PURE__ */ e("div", { className: P.footer, children: n })
1028
+ ] }) }) : null;
1029
+ }
1030
+ const zo = "styles-module__signpost__tLnmc", To = "styles-module__trigger__25KnS", Do = "styles-module__content__z4pUG", Eo = "styles-module__fadeIn__0jB27", Bo = "styles-module__top__Jn5XX", Vo = "styles-module__bottom__CGe3J", Mo = "styles-module__left__zuDmF", jo = "styles-module__right__xnSw3", Oo = "styles-module__inner__7euCB", Fo = "styles-module__arrow__mGVpk", ae = {
1031
+ signpost: zo,
1032
+ trigger: To,
1033
+ content: Do,
1034
+ fadeIn: Eo,
1035
+ top: Bo,
1036
+ bottom: Vo,
1037
+ left: Mo,
1038
+ right: jo,
1039
+ inner: Oo,
1040
+ arrow: Fo
1041
+ };
1042
+ function wd({ trigger: s, children: t, position: o = "top", className: l = "" }) {
1043
+ const [n, a] = k(!1), _ = G(null);
1044
+ return j(() => {
1045
+ const c = (i) => {
1046
+ _.current && !_.current.contains(i.target) && a(!1);
1047
+ };
1048
+ return n && document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
1049
+ }, [n]), /* @__PURE__ */ u("div", { className: `${ae.signpost} ${l}`, ref: _, children: [
1050
+ /* @__PURE__ */ e("div", { className: ae.trigger, onClick: () => a(!n), children: s }),
1051
+ n && /* @__PURE__ */ u("div", { className: `${ae.content} ${ae[o]}`, children: [
1052
+ /* @__PURE__ */ e("div", { className: ae.arrow }),
1053
+ /* @__PURE__ */ e("div", { className: ae.inner, children: t })
1054
+ ] })
1055
+ ] });
1056
+ }
1057
+ const Ko = "styles-module__spinnerWrapper__ht5E9", Po = "styles-module__spinner__D8f-h", Ao = "styles-module__circle__z537L", Go = "styles-module__spin__Gt3A-", Zo = "styles-module__sm__Ukc8Q", Jo = "styles-module__md__Hg7EK", Xo = "styles-module__lg__ac6jQ", Uo = "styles-module__primary__Pah-x", qo = "styles-module__secondary__D29qO", Ho = "styles-module__label__nc2IY", ce = {
1058
+ spinnerWrapper: Ko,
1059
+ spinner: Po,
1060
+ circle: Ao,
1061
+ spin: Go,
1062
+ sm: Zo,
1063
+ md: Jo,
1064
+ lg: Xo,
1065
+ default: "styles-module__default__X7JGx",
1066
+ primary: Uo,
1067
+ secondary: qo,
1068
+ label: Ho
1069
+ };
1070
+ function Cd({ size: s = "md", variant: t = "default", className: o = "", label: l }) {
1071
+ return /* @__PURE__ */ u("div", { className: `${ce.spinnerWrapper} ${o}`, children: [
1072
+ /* @__PURE__ */ e("div", { className: `${ce.spinner} ${ce[s]} ${ce[t]}`, role: "status", "aria-label": l || "Loading", children: /* @__PURE__ */ e("div", { className: ce.circle }) }),
1073
+ l && /* @__PURE__ */ e("span", { className: ce.label, children: l })
1074
+ ] });
1075
+ }
1076
+ const Qo = "styles-module__stackView__wGZRw", Yo = "styles-module__horizontal__MCJ8E", ea = "styles-module__vertical__INW6v", sa = "styles-module__wrap__wvZPS", ta = "styles-module__align-start__TeH6Z", la = "styles-module__align-center__DWOt-", na = "styles-module__align-end__9Xsx4", oa = "styles-module__align-stretch__raPvB", aa = "styles-module__justify-start__YVdZp", ca = "styles-module__justify-center__VKg8-", _a = "styles-module__justify-end__kVPBC", da = "styles-module__justify-space-between__z5-wE", ia = "styles-module__justify-space-around__FP-0m", ra = "styles-module__justify-space-evenly__v5xco", ua = "styles-module__spacing-none__M23xt", ma = "styles-module__spacing-xs__zdXjS", pa = "styles-module__spacing-sm__G-5sR", ya = "styles-module__spacing-md__oa-Jw", ha = "styles-module__spacing-lg__5zhiQ", $a = "styles-module__spacing-xl__qSFPT", _e = {
1077
+ stackView: Qo,
1078
+ horizontal: Yo,
1079
+ vertical: ea,
1080
+ wrap: sa,
1081
+ "align-start": "styles-module__align-start__TeH6Z",
1082
+ alignStart: ta,
1083
+ "align-center": "styles-module__align-center__DWOt-",
1084
+ alignCenter: la,
1085
+ "align-end": "styles-module__align-end__9Xsx4",
1086
+ alignEnd: na,
1087
+ "align-stretch": "styles-module__align-stretch__raPvB",
1088
+ alignStretch: oa,
1089
+ "justify-start": "styles-module__justify-start__YVdZp",
1090
+ justifyStart: aa,
1091
+ "justify-center": "styles-module__justify-center__VKg8-",
1092
+ justifyCenter: ca,
1093
+ "justify-end": "styles-module__justify-end__kVPBC",
1094
+ justifyEnd: _a,
1095
+ "justify-space-between": "styles-module__justify-space-between__z5-wE",
1096
+ justifySpaceBetween: da,
1097
+ "justify-space-around": "styles-module__justify-space-around__FP-0m",
1098
+ justifySpaceAround: ia,
1099
+ "justify-space-evenly": "styles-module__justify-space-evenly__v5xco",
1100
+ justifySpaceEvenly: ra,
1101
+ "spacing-none": "styles-module__spacing-none__M23xt",
1102
+ spacingNone: ua,
1103
+ "spacing-xs": "styles-module__spacing-xs__zdXjS",
1104
+ spacingXs: ma,
1105
+ "spacing-sm": "styles-module__spacing-sm__G-5sR",
1106
+ spacingSm: pa,
1107
+ "spacing-md": "styles-module__spacing-md__oa-Jw",
1108
+ spacingMd: ya,
1109
+ "spacing-lg": "styles-module__spacing-lg__5zhiQ",
1110
+ spacingLg: ha,
1111
+ "spacing-xl": "styles-module__spacing-xl__qSFPT",
1112
+ spacingXl: $a
1113
+ };
1114
+ function xd({
1115
+ children: s,
1116
+ direction: t = "horizontal",
1117
+ align: o = "start",
1118
+ justify: l = "start",
1119
+ spacing: n = "md",
1120
+ wrap: a = !1,
1121
+ className: _ = "",
1122
+ style: c
1123
+ }) {
1124
+ return /* @__PURE__ */ e(
1125
+ "div",
1126
+ {
1127
+ className: `${_e.stackView} ${_e[t]} ${_e[`align-${o}`]} ${_e[`justify-${l}`]} ${_e[`spacing-${n}`]} ${a ? _e.wrap : ""} ${_}`,
1128
+ style: c,
1129
+ children: s
1130
+ }
1131
+ );
1132
+ }
1133
+ const fa = "styles-module__stepper__NUsL2", ba = "styles-module__horizontal__wW8by", ga = "styles-module__vertical__UqRFo", va = "styles-module__step__lmR8-", Na = "styles-module__clickable__-O5QE", ka = "styles-module__stepIndicator__GbO4U", wa = "styles-module__current__LW7L4", Ca = "styles-module__completed__MC9gq", xa = "styles-module__checkmark__GAoUn", Ia = "styles-module__stepNumber__qLNDJ", Wa = "styles-module__stepContent__pKC94", La = "styles-module__stepLabel__JK-4j", Sa = "styles-module__stepDescription__hlARr", Ra = "styles-module__connector__76Rsb", I = {
1134
+ stepper: fa,
1135
+ horizontal: ba,
1136
+ vertical: ga,
1137
+ step: va,
1138
+ clickable: Na,
1139
+ stepIndicator: ka,
1140
+ current: wa,
1141
+ completed: Ca,
1142
+ checkmark: xa,
1143
+ stepNumber: Ia,
1144
+ stepContent: Wa,
1145
+ stepLabel: La,
1146
+ stepDescription: Sa,
1147
+ connector: Ra
1148
+ };
1149
+ function Id({ steps: s, currentStep: t, orientation: o = "horizontal", onStepClick: l, className: n = "" }) {
1150
+ return /* @__PURE__ */ e("div", { className: `${I.stepper} ${I[o]} ${n}`, children: s.map((a, _) => {
1151
+ const c = _ < t, i = _ === t, d = l && (c || i);
1152
+ return /* @__PURE__ */ u(me.Fragment, { children: [
1153
+ /* @__PURE__ */ u(
1154
+ "div",
1155
+ {
1156
+ className: `${I.step} ${c ? I.completed : ""} ${i ? I.current : ""} ${d ? I.clickable : ""}`,
1157
+ onClick: () => d && l(_),
1158
+ children: [
1159
+ /* @__PURE__ */ e("div", { className: I.stepIndicator, children: c ? /* @__PURE__ */ e("span", { className: I.checkmark, children: "✓" }) : a.icon ? a.icon : /* @__PURE__ */ e("span", { className: I.stepNumber, children: _ + 1 }) }),
1160
+ /* @__PURE__ */ u("div", { className: I.stepContent, children: [
1161
+ /* @__PURE__ */ e("div", { className: I.stepLabel, children: a.label }),
1162
+ a.description && /* @__PURE__ */ e("div", { className: I.stepDescription, children: a.description })
1163
+ ] })
1164
+ ]
1165
+ }
1166
+ ),
1167
+ _ < s.length - 1 && /* @__PURE__ */ e("div", { className: `${I.connector} ${c ? I.completed : ""}` })
1168
+ ] }, _);
1169
+ }) });
1170
+ }
1171
+ const za = "styles-module__tableWrapper__7pbjW", Ta = "styles-module__table__G-UMw", Da = "styles-module__thead__uTTEj", Ea = "styles-module__th__tBFLB", Ba = "styles-module__tbody__-OiiP", Va = "styles-module__tr__ioLC7", Ma = "styles-module__td__mjOQt", ja = "styles-module__striped__iZ3bT", Oa = "styles-module__hoverable__ewlPb", Fa = "styles-module__bordered__IB5cr", Ka = "styles-module__compact__JfcIE", Pa = "styles-module__clickable__URnJc", Aa = "styles-module__empty__Xo2NZ", W = {
1172
+ tableWrapper: za,
1173
+ table: Ta,
1174
+ thead: Da,
1175
+ th: Ea,
1176
+ tbody: Ba,
1177
+ tr: Va,
1178
+ td: Ma,
1179
+ striped: ja,
1180
+ hoverable: Oa,
1181
+ bordered: Fa,
1182
+ compact: Ka,
1183
+ clickable: Pa,
1184
+ empty: Aa
1185
+ };
1186
+ function Wd({
1187
+ columns: s,
1188
+ data: t,
1189
+ striped: o = !1,
1190
+ hoverable: l = !1,
1191
+ bordered: n = !1,
1192
+ compact: a = !1,
1193
+ onRowClick: _,
1194
+ className: c = ""
1195
+ }) {
1196
+ return /* @__PURE__ */ u("div", { className: `${W.tableWrapper} ${c}`, children: [
1197
+ /* @__PURE__ */ u(
1198
+ "table",
1199
+ {
1200
+ className: `${W.table} ${o ? W.striped : ""} ${l ? W.hoverable : ""} ${n ? W.bordered : ""} ${a ? W.compact : ""}`,
1201
+ children: [
1202
+ /* @__PURE__ */ e("thead", { className: W.thead, children: /* @__PURE__ */ e("tr", { children: s.map((i) => /* @__PURE__ */ e("th", { className: W.th, style: { width: i.width }, children: i.header }, i.key)) }) }),
1203
+ /* @__PURE__ */ e("tbody", { className: W.tbody, children: t.map((i, d) => /* @__PURE__ */ e("tr", { className: `${W.tr} ${_ ? W.clickable : ""}`, onClick: () => _?.(i), children: s.map((r) => /* @__PURE__ */ e("td", { className: W.td, children: r.render ? r.render(i[r.key], i) : String(i[r.key] ?? "") }, r.key)) }, d)) })
1204
+ ]
1205
+ }
1206
+ ),
1207
+ t.length === 0 && /* @__PURE__ */ e("div", { className: W.empty, children: "No data available" })
1208
+ ] });
1209
+ }
1210
+ const Ga = "styles-module__tabsContainer__Jv3WS", Za = "styles-module__tabsList__G5a9Z", Ja = "styles-module__fullWidth__IiyGO", Xa = "styles-module__tab__Veki-", Ua = "styles-module__disabled__M9qZK", qa = "styles-module__active__PVi-W", Ha = "styles-module__icon__4sTw8", Qa = "styles-module__pills__VlbD0", Ya = "styles-module__underline__Jdu1g", ec = "styles-module__tabContent__bSDk7", sc = "styles-module__fadeIn__sgbzQ", A = {
1211
+ tabsContainer: Ga,
1212
+ tabsList: Za,
1213
+ fullWidth: Ja,
1214
+ tab: Xa,
1215
+ disabled: Ua,
1216
+ active: qa,
1217
+ icon: Ha,
1218
+ default: "styles-module__default__02SGT",
1219
+ pills: Qa,
1220
+ underline: Ya,
1221
+ tabContent: ec,
1222
+ fadeIn: sc
1223
+ };
1224
+ function Ld({ items: s, defaultActiveId: t, variant: o = "default", fullWidth: l = !1, onChange: n, className: a = "" }) {
1225
+ const [_, c] = k(t || s[0]?.id), i = (r, m) => {
1226
+ m || (c(r), n?.(r));
1227
+ }, d = s.find((r) => r.id === _);
1228
+ return /* @__PURE__ */ u("div", { className: `${A.tabsContainer} ${a}`, children: [
1229
+ /* @__PURE__ */ e("div", { className: `${A.tabsList} ${A[o]} ${l ? A.fullWidth : ""}`, role: "tablist", children: s.map((r) => /* @__PURE__ */ u(
1230
+ "button",
1231
+ {
1232
+ role: "tab",
1233
+ "aria-selected": r.id === _,
1234
+ "aria-disabled": r.disabled,
1235
+ className: `${A.tab} ${r.id === _ ? A.active : ""} ${r.disabled ? A.disabled : ""}`,
1236
+ onClick: () => i(r.id, r.disabled),
1237
+ disabled: r.disabled,
1238
+ children: [
1239
+ r.icon && /* @__PURE__ */ e("span", { className: A.icon, children: r.icon }),
1240
+ /* @__PURE__ */ e("span", { children: r.label })
1241
+ ]
1242
+ },
1243
+ r.id
1244
+ )) }),
1245
+ /* @__PURE__ */ e("div", { className: A.tabContent, role: "tabpanel", children: d?.content })
1246
+ ] });
1247
+ }
1248
+ const tc = "styles-module__textareaWrapper__xo-uo", lc = "styles-module__fullWidth__y5-Ce", nc = "styles-module__label__xONj0", oc = "styles-module__textarea__LmnbQ", ac = "styles-module__sm__uIQkQ", cc = "styles-module__md__qfL-2", _c = "styles-module__lg__s6Iey", dc = "styles-module__success__ehWww", ic = "styles-module__error__h9V4X", rc = "styles-module__resize-none__w4h2b", uc = "styles-module__resize-vertical__4lTu1", mc = "styles-module__resize-horizontal__3Fdb7", pc = "styles-module__resize-both__07ghL", yc = "styles-module__helperText__Zaq6O", hc = "styles-module__errorText__RI-rl", B = {
1249
+ textareaWrapper: tc,
1250
+ fullWidth: lc,
1251
+ label: nc,
1252
+ textarea: oc,
1253
+ sm: ac,
1254
+ md: cc,
1255
+ lg: _c,
1256
+ default: "styles-module__default__jlE7o",
1257
+ success: dc,
1258
+ error: ic,
1259
+ "resize-none": "styles-module__resize-none__w4h2b",
1260
+ resizeNone: rc,
1261
+ "resize-vertical": "styles-module__resize-vertical__4lTu1",
1262
+ resizeVertical: uc,
1263
+ "resize-horizontal": "styles-module__resize-horizontal__3Fdb7",
1264
+ resizeHorizontal: mc,
1265
+ "resize-both": "styles-module__resize-both__07ghL",
1266
+ resizeBoth: pc,
1267
+ helperText: yc,
1268
+ errorText: hc
1269
+ }, $c = me.forwardRef(
1270
+ ({ label: s, helperText: t, error: o, size: l = "md", variant: n = "default", fullWidth: a = !1, resize: _ = "vertical", className: c = "", disabled: i, ...d }, r) => {
1271
+ const m = o ? "error" : n;
1272
+ return /* @__PURE__ */ u("div", { className: `${B.textareaWrapper} ${a ? B.fullWidth : ""} ${c}`, children: [
1273
+ s && /* @__PURE__ */ e("label", { className: B.label, children: s }),
1274
+ /* @__PURE__ */ e(
1275
+ "textarea",
1276
+ {
1277
+ ref: r,
1278
+ className: `${B.textarea} ${B[l]} ${B[m]} ${B[`resize-${_}`]} ${i ? B.disabled : ""}`,
1279
+ disabled: i,
1280
+ ...d
1281
+ }
1282
+ ),
1283
+ o && /* @__PURE__ */ e("span", { className: B.errorText, children: o }),
1284
+ !o && t && /* @__PURE__ */ e("span", { className: B.helperText, children: t })
1285
+ ] });
1286
+ }
1287
+ );
1288
+ $c.displayName = "Textarea";
1289
+ const fc = "styles-module__timeline__khbcN", bc = "styles-module__vertical__EcI8f", gc = "styles-module__horizontal__kv46j", vc = "styles-module__timelineItem__j0IQ5", Nc = "styles-module__timelineMarker__qk22j", kc = "styles-module__dot__gfgUf", wc = "styles-module__icon__hWWJd", Cc = "styles-module__primary__t4Cyx", xc = "styles-module__success__NWp7i", Ic = "styles-module__warning__mfRNM", Wc = "styles-module__error__AwsC3", Lc = "styles-module__info__QaR5w", Sc = "styles-module__timelineConnector__deWEH", Rc = "styles-module__timelineContent__Yzy-t", zc = "styles-module__date__OIOdY", Tc = "styles-module__title__PZb8L", Dc = "styles-module__description__LesWv", C = {
1290
+ timeline: fc,
1291
+ vertical: bc,
1292
+ horizontal: gc,
1293
+ timelineItem: vc,
1294
+ timelineMarker: Nc,
1295
+ dot: kc,
1296
+ icon: wc,
1297
+ default: "styles-module__default__QmROp",
1298
+ primary: Cc,
1299
+ success: xc,
1300
+ warning: Ic,
1301
+ error: Wc,
1302
+ info: Lc,
1303
+ timelineConnector: Sc,
1304
+ timelineContent: Rc,
1305
+ date: zc,
1306
+ title: Tc,
1307
+ description: Dc
1308
+ };
1309
+ function Sd({ items: s, orientation: t = "vertical", className: o = "" }) {
1310
+ return /* @__PURE__ */ e("div", { className: `${C.timeline} ${C[t]} ${o}`, children: s.map((l, n) => /* @__PURE__ */ u("div", { className: C.timelineItem, children: [
1311
+ /* @__PURE__ */ e("div", { className: `${C.timelineMarker} ${l.color ? C[l.color] : C.default}`, children: l.icon ? /* @__PURE__ */ e("span", { className: C.icon, children: l.icon }) : /* @__PURE__ */ e("span", { className: C.dot }) }),
1312
+ n < s.length - 1 && /* @__PURE__ */ e("div", { className: `${C.timelineConnector} ${l.color ? C[l.color] : C.default}` }),
1313
+ /* @__PURE__ */ u("div", { className: C.timelineContent, children: [
1314
+ l.date && /* @__PURE__ */ e("span", { className: C.date, children: l.date }),
1315
+ /* @__PURE__ */ e("h4", { className: C.title, children: l.title }),
1316
+ l.description && /* @__PURE__ */ e("p", { className: C.description, children: l.description })
1317
+ ] })
1318
+ ] }, l.id)) });
1319
+ }
1320
+ const Ec = "styles-module__toggleSwitch__HDqFP", Bc = "styles-module__disabled__tbXNT", Vc = "styles-module__input__oBVdg", Mc = "styles-module__sm__O8zA8", jc = "styles-module__md__2vfHI", Oc = "styles-module__lg__S65-b", Fc = "styles-module__slider__gYGJ6", Kc = "styles-module__checked__-4pJ2", Pc = "styles-module__label__xIgTV", Q = {
1321
+ toggleSwitch: Ec,
1322
+ disabled: Bc,
1323
+ input: Vc,
1324
+ switch: "styles-module__switch__4NsVE",
1325
+ sm: Mc,
1326
+ md: jc,
1327
+ lg: Oc,
1328
+ slider: Fc,
1329
+ checked: Kc,
1330
+ label: Pc
1331
+ };
1332
+ function Rd({ checked: s, defaultChecked: t = !1, onChange: o, label: l, disabled: n = !1, size: a = "md", className: _ = "" }) {
1333
+ const [c, i] = me.useState(t), d = s !== void 0, r = d ? s : c, m = () => {
1334
+ if (n) return;
1335
+ const y = !r;
1336
+ d || i(y), o?.(y);
1337
+ };
1338
+ return /* @__PURE__ */ u("label", { className: `${Q.toggleSwitch} ${n ? Q.disabled : ""} ${_}`, children: [
1339
+ /* @__PURE__ */ e("input", { type: "checkbox", checked: r, onChange: m, disabled: n, className: Q.input }),
1340
+ /* @__PURE__ */ e("span", { className: `${Q.switch} ${Q[a]} ${r ? Q.checked : ""}`, children: /* @__PURE__ */ e("span", { className: Q.slider }) }),
1341
+ l && /* @__PURE__ */ e("span", { className: Q.label, children: l })
1342
+ ] });
1343
+ }
1344
+ const Ac = "styles-module__tooltipWrapper__jXXEP", Gc = "styles-module__tooltip__NP2ZM", Zc = "styles-module__fadeIn__5hHms", Jc = "styles-module__top__kvf2D", Xc = "styles-module__bottom__vkl92", Uc = "styles-module__left__q2e3D", qc = "styles-module__right__FRcXP", Hc = "styles-module__tooltipContent__3R4WL", Qc = "styles-module__tooltipArrow__11JdT", ue = {
1345
+ tooltipWrapper: Ac,
1346
+ tooltip: Gc,
1347
+ fadeIn: Zc,
1348
+ top: Jc,
1349
+ bottom: Xc,
1350
+ left: Uc,
1351
+ right: qc,
1352
+ tooltipContent: Hc,
1353
+ tooltipArrow: Qc
1354
+ };
1355
+ function zd({ children: s, content: t, position: o = "top", delay: l = 200, className: n = "" }) {
1356
+ const [a, _] = k(!1), c = G(), i = G(null), d = () => {
1357
+ c.current = setTimeout(() => {
1358
+ _(!0);
1359
+ }, l);
1360
+ }, r = () => {
1361
+ c.current && clearTimeout(c.current), _(!1);
1362
+ };
1363
+ return j(() => () => {
1364
+ c.current && clearTimeout(c.current);
1365
+ }, []), /* @__PURE__ */ u(
1366
+ "div",
1367
+ {
1368
+ className: `${ue.tooltipWrapper} ${n}`,
1369
+ ref: i,
1370
+ onMouseEnter: d,
1371
+ onMouseLeave: r,
1372
+ onFocus: d,
1373
+ onBlur: r,
1374
+ children: [
1375
+ s,
1376
+ a && /* @__PURE__ */ u("div", { className: `${ue.tooltip} ${ue[o]}`, role: "tooltip", children: [
1377
+ /* @__PURE__ */ e("div", { className: ue.tooltipContent, children: t }),
1378
+ /* @__PURE__ */ e("div", { className: ue.tooltipArrow })
1379
+ ] })
1380
+ ]
1381
+ }
1382
+ );
1383
+ }
1384
+ const Yc = "styles-module__toastContainer__-uOPe", e_ = "styles-module__topLeft__MCDhr", s_ = "styles-module__topCenter__loC-J", t_ = "styles-module__topRight__alKSR", l_ = "styles-module__bottomLeft__sPZ6I", n_ = "styles-module__bottomCenter__12yLT", o_ = "styles-module__bottomRight__EdLbD", a_ = "styles-module__toast__q9A3H", c_ = "styles-module__slideIn__-Mhbw", __ = "styles-module__fadeIn__I0huT", d_ = "styles-module__slideInLeft__Bs5x3", i_ = "styles-module__slideInDown__OUDGH", r_ = "styles-module__icon__iRAEt", u_ = "styles-module__message__id55d", m_ = "styles-module__closeButton__vnBxf", p_ = "styles-module__info__RjsXR", y_ = "styles-module__success__1qQf4", h_ = "styles-module__warning__UhEF-", $_ = "styles-module__error__sOYOC", S = {
1385
+ toastContainer: Yc,
1386
+ topLeft: e_,
1387
+ topCenter: s_,
1388
+ topRight: t_,
1389
+ bottomLeft: l_,
1390
+ bottomCenter: n_,
1391
+ bottomRight: o_,
1392
+ toast: a_,
1393
+ slideIn: c_,
1394
+ fadeIn: __,
1395
+ slideInLeft: d_,
1396
+ slideInDown: i_,
1397
+ icon: r_,
1398
+ message: u_,
1399
+ closeButton: m_,
1400
+ info: p_,
1401
+ success: y_,
1402
+ warning: h_,
1403
+ error: $_
1404
+ }, we = ze(void 0);
1405
+ function Td({ children: s, position: t = "top-right", maxToasts: o = 5 }) {
1406
+ const [l, n] = k([]), a = ke(
1407
+ (d, r = {}) => {
1408
+ const m = Math.random().toString(36).substring(2, 9), y = {
1409
+ id: m,
1410
+ message: d,
1411
+ variant: r.variant || "info",
1412
+ duration: r.duration ?? 5e3,
1413
+ dismissible: r.dismissible ?? !0
1414
+ };
1415
+ n((h) => [...h, y].slice(-o)), y.duration && y.duration > 0 && setTimeout(() => {
1416
+ _(m);
1417
+ }, y.duration);
1418
+ },
1419
+ [o]
1420
+ ), _ = ke((d) => {
1421
+ n((r) => r.filter((m) => m.id !== d));
1422
+ }, []), c = () => ({
1423
+ "top-left": S.topLeft,
1424
+ "top-center": S.topCenter,
1425
+ "top-right": S.topRight,
1426
+ "bottom-left": S.bottomLeft,
1427
+ "bottom-center": S.bottomCenter,
1428
+ "bottom-right": S.bottomRight
1429
+ })[t], i = (d) => ({
1430
+ info: "ℹ",
1431
+ success: "✓",
1432
+ warning: "⚠",
1433
+ error: "✕"
1434
+ })[d];
1435
+ return /* @__PURE__ */ u(we.Provider, { value: { showToast: a }, children: [
1436
+ s,
1437
+ /* @__PURE__ */ e("div", { className: `${S.toastContainer} ${c()}`, children: l.map((d) => /* @__PURE__ */ u("div", { className: `${S.toast} ${S[d.variant || "info"]}`, role: "alert", "aria-live": "polite", children: [
1438
+ /* @__PURE__ */ e("div", { className: S.icon, children: i(d.variant || "info") }),
1439
+ /* @__PURE__ */ e("div", { className: S.message, children: d.message }),
1440
+ d.dismissible && /* @__PURE__ */ e("button", { className: S.closeButton, onClick: () => _(d.id), "aria-label": "Close", children: "✕" })
1441
+ ] }, d.id)) })
1442
+ ] });
1443
+ }
1444
+ function Dd() {
1445
+ const s = Te(we);
1446
+ if (!s)
1447
+ throw new Error("useToast must be used within a ToastProvider");
1448
+ return s;
1449
+ }
1450
+ const f_ = "styles-module__treeView__qtZfC", b_ = "styles-module__treeNodeWrapper__6m8CE", g_ = "styles-module__treeNode__xhhOE", v_ = "styles-module__disabled__-brxQ", N_ = "styles-module__expandIcon__Zp-Yb", k_ = "styles-module__expanded__A4kyH", w_ = "styles-module__spacer__56WdM", C_ = "styles-module__icon__AIE-i", x_ = "styles-module__label__XDGcT", I_ = "styles-module__children__N1c5Z", M = {
1451
+ treeView: f_,
1452
+ treeNodeWrapper: b_,
1453
+ treeNode: g_,
1454
+ disabled: v_,
1455
+ expandIcon: N_,
1456
+ expanded: k_,
1457
+ spacer: w_,
1458
+ icon: C_,
1459
+ label: x_,
1460
+ children: I_
1461
+ };
1462
+ function Ce({ node: s, level: t, expandedIds: o, onToggle: l, onNodeClick: n }) {
1463
+ const a = s.children && s.children.length > 0, _ = o.has(s.id), c = () => {
1464
+ s.disabled || (a && l(s.id), n?.(s));
1465
+ };
1466
+ return /* @__PURE__ */ u("div", { className: M.treeNodeWrapper, children: [
1467
+ /* @__PURE__ */ u("div", { className: `${M.treeNode} ${s.disabled ? M.disabled : ""}`, style: { paddingLeft: `${t * 1.5}rem` }, onClick: c, children: [
1468
+ a && /* @__PURE__ */ e("span", { className: `${M.expandIcon} ${_ ? M.expanded : ""}`, children: "▶" }),
1469
+ !a && /* @__PURE__ */ e("span", { className: M.spacer }),
1470
+ s.icon && /* @__PURE__ */ e("span", { className: M.icon, children: s.icon }),
1471
+ /* @__PURE__ */ e("span", { className: M.label, children: s.label })
1472
+ ] }),
1473
+ a && _ && /* @__PURE__ */ e("div", { className: M.children, children: s.children.map((i) => /* @__PURE__ */ e(Ce, { node: i, level: t + 1, expandedIds: o, onToggle: l, onNodeClick: n }, i.id)) })
1474
+ ] });
1475
+ }
1476
+ function Ed({ data: s, defaultExpandedIds: t = [], onNodeClick: o, className: l = "" }) {
1477
+ const [n, a] = k(new Set(t)), _ = (c) => {
1478
+ a((i) => {
1479
+ const d = new Set(i);
1480
+ return d.has(c) ? d.delete(c) : d.add(c), d;
1481
+ });
1482
+ };
1483
+ return /* @__PURE__ */ e("div", { className: `${M.treeView} ${l}`, children: s.map((c) => /* @__PURE__ */ e(Ce, { node: c, level: 0, expandedIds: n, onToggle: _, onNodeClick: o }, c.id)) });
1484
+ }
1485
+ const W_ = "styles-module__nav__sMQSv", L_ = "styles-module__vertical__6EFeu", S_ = "styles-module__collapsed__eIVC7", R_ = "styles-module__horizontal__5UU20", z_ = "styles-module__navItemWrapper__Sc9wi", T_ = "styles-module__navItem__7O2YX", D_ = "styles-module__disabled__hvWkN", E_ = "styles-module__nested__oejUs", B_ = "styles-module__icon__SLdZe", V_ = "styles-module__label__pji80", M_ = "styles-module__badge__03qDH", j_ = "styles-module__expandIcon__bGlQG", O_ = "styles-module__dropdownIcon__uf35v", F_ = "styles-module__expanded__2R6-v", K_ = "styles-module__children__sfAGb", P_ = "styles-module__slideDown__xKrR1", A_ = "styles-module__dropdown__LuTLW", G_ = "styles-module__megaMenu__02Wp7", Z_ = "styles-module__megaMenuWrapper__yLvBH", J_ = "styles-module__megaMenuGrid__4FrxU", X_ = "styles-module__megaMenuColumn__DI0z2", g = {
1486
+ nav: W_,
1487
+ vertical: L_,
1488
+ collapsed: S_,
1489
+ horizontal: R_,
1490
+ navItemWrapper: z_,
1491
+ navItem: T_,
1492
+ disabled: D_,
1493
+ nested: E_,
1494
+ icon: B_,
1495
+ label: V_,
1496
+ badge: M_,
1497
+ expandIcon: j_,
1498
+ dropdownIcon: O_,
1499
+ expanded: F_,
1500
+ children: K_,
1501
+ slideDown: P_,
1502
+ dropdown: A_,
1503
+ megaMenu: G_,
1504
+ megaMenuWrapper: Z_,
1505
+ megaMenuGrid: J_,
1506
+ megaMenuColumn: X_
1507
+ };
1508
+ function he({ item: s, level: t, expandedIds: o, onToggle: l, onItemClick: n, orientation: a, collapsed: _ }) {
1509
+ const c = s.children && s.children.length > 0, i = o.has(s.id), d = s.megaMenu && c, r = (h) => {
1510
+ s.disabled || (c && a === "vertical" && (h.preventDefault(), l(s.id)), s.onClick && s.onClick(), n?.(s));
1511
+ }, m = () => /* @__PURE__ */ u(Ne, { children: [
1512
+ s.icon && /* @__PURE__ */ e("span", { className: g.icon, children: s.icon }),
1513
+ !_ && /* @__PURE__ */ e("span", { className: g.label, children: s.label }),
1514
+ !_ && s.badge && /* @__PURE__ */ e("span", { className: g.badge, children: s.badge }),
1515
+ !_ && c && a === "vertical" && /* @__PURE__ */ e("span", { className: `${g.expandIcon} ${i ? g.expanded : ""}`, children: "▶" }),
1516
+ !_ && c && a === "horizontal" && /* @__PURE__ */ e("span", { className: g.dropdownIcon, children: "▼" })
1517
+ ] }), y = s.href ? /* @__PURE__ */ e("a", { href: s.href, className: `${g.navItem} ${s.disabled ? g.disabled : ""} ${t > 0 ? g.nested : ""}`, onClick: r, children: m() }) : /* @__PURE__ */ e("button", { type: "button", className: `${g.navItem} ${s.disabled ? g.disabled : ""} ${t > 0 ? g.nested : ""}`, onClick: r, children: m() });
1518
+ return /* @__PURE__ */ u("div", { className: `${g.navItemWrapper} ${d ? g.megaMenuWrapper : ""}`, children: [
1519
+ y,
1520
+ c && /* @__PURE__ */ u(Ne, { children: [
1521
+ a === "vertical" && i && /* @__PURE__ */ e("div", { className: g.children, children: s.children.map((h) => /* @__PURE__ */ e(
1522
+ he,
1523
+ {
1524
+ item: h,
1525
+ level: t + 1,
1526
+ expandedIds: o,
1527
+ onToggle: l,
1528
+ onItemClick: n,
1529
+ orientation: a,
1530
+ collapsed: _
1531
+ },
1532
+ h.id
1533
+ )) }),
1534
+ a === "horizontal" && /* @__PURE__ */ e("div", { className: `${g.dropdown} ${d ? g.megaMenu : ""}`, children: d ? /* @__PURE__ */ e("div", { className: g.megaMenuGrid, children: s.children.map((h) => /* @__PURE__ */ e("div", { className: g.megaMenuColumn, children: /* @__PURE__ */ e(
1535
+ he,
1536
+ {
1537
+ item: h,
1538
+ level: t + 1,
1539
+ expandedIds: o,
1540
+ onToggle: l,
1541
+ onItemClick: n,
1542
+ orientation: a,
1543
+ collapsed: _
1544
+ }
1545
+ ) }, h.id)) }) : s.children.map((h) => /* @__PURE__ */ e(
1546
+ he,
1547
+ {
1548
+ item: h,
1549
+ level: t + 1,
1550
+ expandedIds: o,
1551
+ onToggle: l,
1552
+ onItemClick: n,
1553
+ orientation: a,
1554
+ collapsed: _
1555
+ },
1556
+ h.id
1557
+ )) })
1558
+ ] })
1559
+ ] });
1560
+ }
1561
+ function Bd({ items: s, orientation: t = "vertical", defaultExpandedIds: o = [], onItemClick: l, className: n = "", collapsed: a = !1 }) {
1562
+ const [_, c] = k(new Set(o)), i = (d) => {
1563
+ c((r) => {
1564
+ const m = new Set(r);
1565
+ return m.has(d) ? m.delete(d) : m.add(d), m;
1566
+ });
1567
+ };
1568
+ return /* @__PURE__ */ e("nav", { className: `${g.nav} ${g[t]} ${a ? g.collapsed : ""} ${n}`, children: s.map((d) => /* @__PURE__ */ e(
1569
+ he,
1570
+ {
1571
+ item: d,
1572
+ level: 0,
1573
+ expandedIds: _,
1574
+ onToggle: i,
1575
+ onItemClick: l,
1576
+ orientation: t,
1577
+ collapsed: a
1578
+ },
1579
+ d.id
1580
+ )) });
1581
+ }
1582
+ export {
1583
+ Q_ as Accordion,
1584
+ Y_ as Alert,
1585
+ ed as Avatar,
1586
+ sd as Badge,
1587
+ td as Breadcrumbs,
1588
+ ld as Button,
1589
+ nd as ButtonGroup,
1590
+ od as Card,
1591
+ ad as Checkbox,
1592
+ cd as Combobox,
1593
+ _d as Datagrid,
1594
+ dd as DatePicker,
1595
+ id as DateRangePicker,
1596
+ rd as Divider,
1597
+ ud as Dropdown,
1598
+ md as FilePicker,
1599
+ pd as Header,
1600
+ Al as Input,
1601
+ yd as Label,
1602
+ hd as List,
1603
+ $d as Modal,
1604
+ fd as Pagination,
1605
+ bd as ProgressBar,
1606
+ gd as RadioButton,
1607
+ vd as RangeInput,
1608
+ Nd as RichSelect,
1609
+ kd as SidePanel,
1610
+ wd as Signpost,
1611
+ Cd as Spinner,
1612
+ xd as StackView,
1613
+ Id as Stepper,
1614
+ Wd as Table,
1615
+ Ld as Tabs,
1616
+ $c as Textarea,
1617
+ Sd as Timeline,
1618
+ Td as ToastProvider,
1619
+ Rd as ToggleSwitch,
1620
+ zd as Tooltip,
1621
+ Ed as TreeView,
1622
+ Bd as VerticalNav,
1623
+ Dd as useToast
1624
+ };
1625
+ //# sourceMappingURL=index.mjs.map