@arvia-ui/react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,4217 @@
1
+ import "./styles.css";
2
+ import { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { createPortal } from "react-dom";
5
+ //#region generated/box.mjs
6
+ const _isObj$30 = (v) => v != null && typeof v === "object";
7
+ const _resolveStatic$30 = (v, fallback) => _isObj$30(v) ? v.initial ?? fallback : v ?? fallback;
8
+ const _applyVariant$30 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
9
+ if (_isObj$30(raw)) {
10
+ const initial = raw.initial ?? defaultVal;
11
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
12
+ for (const key in raw) {
13
+ if (key === "initial") continue;
14
+ const val = raw[key];
15
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
16
+ if (add) c += (c ? " " : "") + add;
17
+ }
18
+ } else {
19
+ const val = raw;
20
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
21
+ if (add) c += (c ? " " : "") + add;
22
+ }
23
+ return c;
24
+ };
25
+ const _h$30 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
26
+ const out = {};
27
+ for (const s of slots) {
28
+ let c = base[s] || "";
29
+ for (const v in variants) {
30
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
31
+ c = _applyVariant$30(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
32
+ }
33
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
34
+ if (props && props[v] !== void 0) continue;
35
+ const val = overrides[v];
36
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
37
+ if (add) c += (c ? " " : "") + add;
38
+ }
39
+ for (const [cq, overrides] of containers) for (const v in overrides) {
40
+ if (props && props[v] !== void 0) continue;
41
+ const val = overrides[v];
42
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
43
+ if (add) c += (c ? " " : "") + add;
44
+ }
45
+ for (const [match, cls] of compounds) {
46
+ let ok = true;
47
+ for (const v in match) if (_resolveStatic$30((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
48
+ ok = false;
49
+ break;
50
+ }
51
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
52
+ }
53
+ out[s] = c;
54
+ }
55
+ return out;
56
+ };
57
+ const Box_base = { "root": "r6ies3h8" };
58
+ const Box_variants = {
59
+ "padding": {
60
+ "1": { "root": "t8t5bqye" },
61
+ "2": { "root": "oxymgjkn" },
62
+ "3": { "root": "hvxmkzx9" },
63
+ "4": { "root": "a1l9v3rp" },
64
+ "5": { "root": "bvx55gfe" },
65
+ "6": { "root": "ia49zpnm" },
66
+ "none": { "root": "ukq2uiwj" }
67
+ },
68
+ "radius": {
69
+ "none": { "root": "l1hnapg7" },
70
+ "sm": { "root": "tghx2qva" },
71
+ "md": { "root": "qcq9vns9" },
72
+ "lg": { "root": "sdjmm1yj" },
73
+ "xl": { "root": "xm7ra8fy" },
74
+ "full": { "root": "m0ywry15" }
75
+ },
76
+ "background": {
77
+ "transparent": { "root": "x9m8aa1u" },
78
+ "surface": { "root": "u98u08q1" },
79
+ "raised": { "root": "rqa2453v" },
80
+ "muted": { "root": "c0ub21yp" }
81
+ }
82
+ };
83
+ const Box_compounds = [];
84
+ const Box_defaults = {
85
+ "padding": "none",
86
+ "radius": "none",
87
+ "background": "transparent"
88
+ };
89
+ const Box_responsive = [];
90
+ const Box_respClasses = {};
91
+ const Box_containers = [];
92
+ const Box_cqClasses = {};
93
+ function Box$1(props) {
94
+ return _h$30(Box_base, Box_variants, Box_compounds, Box_defaults, Box_responsive, Box_respClasses, Box_containers, Box_cqClasses, ["root"], props);
95
+ }
96
+ //#endregion
97
+ //#region src/Box.tsx
98
+ const Box = forwardRef(function Box({ as: Component = "div", children, className, padding, radius, background, ...props }, ref) {
99
+ const styles = Box$1({
100
+ padding,
101
+ radius,
102
+ background
103
+ });
104
+ return /* @__PURE__ */ jsx(Component, {
105
+ ref,
106
+ className: className ? `${styles.root} ${className}` : styles.root,
107
+ ...props,
108
+ children
109
+ });
110
+ });
111
+ //#endregion
112
+ //#region generated/stack.mjs
113
+ const _isObj$29 = (v) => v != null && typeof v === "object";
114
+ const _resolveStatic$29 = (v, fallback) => _isObj$29(v) ? v.initial ?? fallback : v ?? fallback;
115
+ const _applyVariant$29 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
116
+ if (_isObj$29(raw)) {
117
+ const initial = raw.initial ?? defaultVal;
118
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
119
+ for (const key in raw) {
120
+ if (key === "initial") continue;
121
+ const val = raw[key];
122
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
123
+ if (add) c += (c ? " " : "") + add;
124
+ }
125
+ } else {
126
+ const val = raw;
127
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
128
+ if (add) c += (c ? " " : "") + add;
129
+ }
130
+ return c;
131
+ };
132
+ const _h$29 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
133
+ const out = {};
134
+ for (const s of slots) {
135
+ let c = base[s] || "";
136
+ for (const v in variants) {
137
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
138
+ c = _applyVariant$29(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
139
+ }
140
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
141
+ if (props && props[v] !== void 0) continue;
142
+ const val = overrides[v];
143
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
144
+ if (add) c += (c ? " " : "") + add;
145
+ }
146
+ for (const [cq, overrides] of containers) for (const v in overrides) {
147
+ if (props && props[v] !== void 0) continue;
148
+ const val = overrides[v];
149
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
150
+ if (add) c += (c ? " " : "") + add;
151
+ }
152
+ for (const [match, cls] of compounds) {
153
+ let ok = true;
154
+ for (const v in match) if (_resolveStatic$29((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
155
+ ok = false;
156
+ break;
157
+ }
158
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
159
+ }
160
+ out[s] = c;
161
+ }
162
+ return out;
163
+ };
164
+ const Stack_base = { "root": "jix30ndq" };
165
+ const Stack_variants = {
166
+ "direction": {
167
+ "row": { "root": "kmf2jji6" },
168
+ "column": { "root": "o9ohxtw4" }
169
+ },
170
+ "gap": {
171
+ "0": { "root": "vg4e7jmh" },
172
+ "1": { "root": "sjvp16nl" },
173
+ "2": { "root": "huzwx9nm" },
174
+ "3": { "root": "m5mcgnq0" },
175
+ "4": { "root": "v632flth" },
176
+ "5": { "root": "mw0ckcqk" },
177
+ "6": { "root": "fhu8q2ic" },
178
+ "7": { "root": "omr0infx" },
179
+ "8": { "root": "pf15aoh2" }
180
+ },
181
+ "align": {
182
+ "start": { "root": "y5w4fr3q" },
183
+ "center": { "root": "pjmqeux3" },
184
+ "end": { "root": "b8ryy5sl" },
185
+ "stretch": { "root": "lr5r2j5s" },
186
+ "baseline": { "root": "p4wo0wdx" }
187
+ },
188
+ "justify": {
189
+ "start": { "root": "hfcsfkkx" },
190
+ "center": { "root": "u2b9msx5" },
191
+ "end": { "root": "yv5q9p6f" },
192
+ "between": { "root": "ney6jrw0" },
193
+ "around": { "root": "o1uttf46" }
194
+ },
195
+ "wrap": {
196
+ "yes": { "root": "ap14uc5f" },
197
+ "no": { "root": "eix7kvbn" }
198
+ }
199
+ };
200
+ const Stack_compounds = [];
201
+ const Stack_defaults = {
202
+ "direction": "column",
203
+ "gap": "3",
204
+ "align": "stretch",
205
+ "justify": "start",
206
+ "wrap": "no"
207
+ };
208
+ const Stack_responsive = [];
209
+ const Stack_respClasses = {};
210
+ const Stack_containers = [];
211
+ const Stack_cqClasses = {};
212
+ function Stack$1(props) {
213
+ return _h$29(Stack_base, Stack_variants, Stack_compounds, Stack_defaults, Stack_responsive, Stack_respClasses, Stack_containers, Stack_cqClasses, ["root"], props);
214
+ }
215
+ //#endregion
216
+ //#region src/Stack.tsx
217
+ const Stack = forwardRef(function Stack({ as: Component = "div", children, className, direction, gap, align, justify, wrap, ...props }, ref) {
218
+ const styles = Stack$1({
219
+ direction,
220
+ gap,
221
+ align,
222
+ justify,
223
+ wrap
224
+ });
225
+ return /* @__PURE__ */ jsx(Component, {
226
+ ref,
227
+ className: className ? `${styles.root} ${className}` : styles.root,
228
+ ...props,
229
+ children
230
+ });
231
+ });
232
+ //#endregion
233
+ //#region generated/text.mjs
234
+ const _isObj$28 = (v) => v != null && typeof v === "object";
235
+ const _resolveStatic$28 = (v, fallback) => _isObj$28(v) ? v.initial ?? fallback : v ?? fallback;
236
+ const _applyVariant$28 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
237
+ if (_isObj$28(raw)) {
238
+ const initial = raw.initial ?? defaultVal;
239
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
240
+ for (const key in raw) {
241
+ if (key === "initial") continue;
242
+ const val = raw[key];
243
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
244
+ if (add) c += (c ? " " : "") + add;
245
+ }
246
+ } else {
247
+ const val = raw;
248
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
249
+ if (add) c += (c ? " " : "") + add;
250
+ }
251
+ return c;
252
+ };
253
+ const _h$28 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
254
+ const out = {};
255
+ for (const s of slots) {
256
+ let c = base[s] || "";
257
+ for (const v in variants) {
258
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
259
+ c = _applyVariant$28(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
260
+ }
261
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
262
+ if (props && props[v] !== void 0) continue;
263
+ const val = overrides[v];
264
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
265
+ if (add) c += (c ? " " : "") + add;
266
+ }
267
+ for (const [cq, overrides] of containers) for (const v in overrides) {
268
+ if (props && props[v] !== void 0) continue;
269
+ const val = overrides[v];
270
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
271
+ if (add) c += (c ? " " : "") + add;
272
+ }
273
+ for (const [match, cls] of compounds) {
274
+ let ok = true;
275
+ for (const v in match) if (_resolveStatic$28((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
276
+ ok = false;
277
+ break;
278
+ }
279
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
280
+ }
281
+ out[s] = c;
282
+ }
283
+ return out;
284
+ };
285
+ const Text_base = { "root": "bcee3c8h" };
286
+ const Text_variants = {
287
+ "size": {
288
+ "xs": { "root": "f9rg77mu" },
289
+ "sm": { "root": "auo9r2t1" },
290
+ "md": { "root": "ds46qccs" },
291
+ "lg": { "root": "rfs2vw1e" },
292
+ "xl": { "root": "asohqxi0" }
293
+ },
294
+ "weight": {
295
+ "regular": { "root": "fn7nykve" },
296
+ "medium": { "root": "kp9nee52" },
297
+ "semibold": { "root": "o85iyv5t" },
298
+ "bold": { "root": "esm6934g" }
299
+ },
300
+ "tone": {
301
+ "default": { "root": "k56hyjpq" },
302
+ "muted": { "root": "ur70a4er" },
303
+ "subtle": { "root": "g662wuun" },
304
+ "primary": { "root": "t7bpl3jz" },
305
+ "danger": { "root": "ozqy8f5u" },
306
+ "success": { "root": "wuh8h0fn" }
307
+ }
308
+ };
309
+ const Text_compounds = [];
310
+ const Text_defaults = {
311
+ "size": "md",
312
+ "weight": "regular",
313
+ "tone": "default"
314
+ };
315
+ const Text_responsive = [];
316
+ const Text_respClasses = {};
317
+ const Text_containers = [];
318
+ const Text_cqClasses = {};
319
+ function Text$1(props) {
320
+ return _h$28(Text_base, Text_variants, Text_compounds, Text_defaults, Text_responsive, Text_respClasses, Text_containers, Text_cqClasses, ["root"], props);
321
+ }
322
+ //#endregion
323
+ //#region src/Text.tsx
324
+ const Text = forwardRef(function Text({ as: Component = "p", children, className, size, weight, tone, ...props }, ref) {
325
+ const styles = Text$1({
326
+ size,
327
+ weight,
328
+ tone
329
+ });
330
+ return /* @__PURE__ */ jsx(Component, {
331
+ ref,
332
+ className: className ? `${styles.root} ${className}` : styles.root,
333
+ ...props,
334
+ children
335
+ });
336
+ });
337
+ //#endregion
338
+ //#region generated/heading.mjs
339
+ const _isObj$27 = (v) => v != null && typeof v === "object";
340
+ const _resolveStatic$27 = (v, fallback) => _isObj$27(v) ? v.initial ?? fallback : v ?? fallback;
341
+ const _applyVariant$27 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
342
+ if (_isObj$27(raw)) {
343
+ const initial = raw.initial ?? defaultVal;
344
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
345
+ for (const key in raw) {
346
+ if (key === "initial") continue;
347
+ const val = raw[key];
348
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
349
+ if (add) c += (c ? " " : "") + add;
350
+ }
351
+ } else {
352
+ const val = raw;
353
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
354
+ if (add) c += (c ? " " : "") + add;
355
+ }
356
+ return c;
357
+ };
358
+ const _h$27 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
359
+ const out = {};
360
+ for (const s of slots) {
361
+ let c = base[s] || "";
362
+ for (const v in variants) {
363
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
364
+ c = _applyVariant$27(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
365
+ }
366
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
367
+ if (props && props[v] !== void 0) continue;
368
+ const val = overrides[v];
369
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
370
+ if (add) c += (c ? " " : "") + add;
371
+ }
372
+ for (const [cq, overrides] of containers) for (const v in overrides) {
373
+ if (props && props[v] !== void 0) continue;
374
+ const val = overrides[v];
375
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
376
+ if (add) c += (c ? " " : "") + add;
377
+ }
378
+ for (const [match, cls] of compounds) {
379
+ let ok = true;
380
+ for (const v in match) if (_resolveStatic$27((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
381
+ ok = false;
382
+ break;
383
+ }
384
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
385
+ }
386
+ out[s] = c;
387
+ }
388
+ return out;
389
+ };
390
+ const Heading_base = { "root": "nin5efs0" };
391
+ const Heading_variants = {
392
+ "level": {
393
+ "1": { "root": "g2b1cl7x" },
394
+ "2": { "root": "nmm29jlh" },
395
+ "3": { "root": "u40bloxk" },
396
+ "4": { "root": "nnfplws1" },
397
+ "5": { "root": "q3y11yk4" },
398
+ "6": { "root": "hrsw3zld" }
399
+ },
400
+ "tone": {
401
+ "default": { "root": "ekkf6wy5" },
402
+ "muted": { "root": "c0fstsps" },
403
+ "primary": { "root": "tfr0n3dl" }
404
+ }
405
+ };
406
+ const Heading_compounds = [];
407
+ const Heading_defaults = {
408
+ "level": "2",
409
+ "tone": "default"
410
+ };
411
+ const Heading_responsive = [];
412
+ const Heading_respClasses = {};
413
+ const Heading_containers = [];
414
+ const Heading_cqClasses = {};
415
+ function Heading$1(props) {
416
+ return _h$27(Heading_base, Heading_variants, Heading_compounds, Heading_defaults, Heading_responsive, Heading_respClasses, Heading_containers, Heading_cqClasses, ["root"], props);
417
+ }
418
+ //#endregion
419
+ //#region src/Heading.tsx
420
+ const LEVEL_TAGS = {
421
+ "1": "h1",
422
+ "2": "h2",
423
+ "3": "h3",
424
+ "4": "h4",
425
+ "5": "h5",
426
+ "6": "h6"
427
+ };
428
+ const Heading = forwardRef(function Heading({ children, className, level = "2", tone }, ref) {
429
+ const Tag = LEVEL_TAGS[level];
430
+ const styles = Heading$1({
431
+ level,
432
+ tone
433
+ });
434
+ return /* @__PURE__ */ jsx(Tag, {
435
+ ref,
436
+ className: className ? `${styles.root} ${className}` : styles.root,
437
+ children
438
+ });
439
+ });
440
+ //#endregion
441
+ //#region generated/button.mjs
442
+ const _isObj$26 = (v) => v != null && typeof v === "object";
443
+ const _resolveStatic$26 = (v, fallback) => _isObj$26(v) ? v.initial ?? fallback : v ?? fallback;
444
+ const _applyVariant$26 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
445
+ if (_isObj$26(raw)) {
446
+ const initial = raw.initial ?? defaultVal;
447
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
448
+ for (const key in raw) {
449
+ if (key === "initial") continue;
450
+ const val = raw[key];
451
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
452
+ if (add) c += (c ? " " : "") + add;
453
+ }
454
+ } else {
455
+ const val = raw;
456
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
457
+ if (add) c += (c ? " " : "") + add;
458
+ }
459
+ return c;
460
+ };
461
+ const _h$26 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
462
+ const out = {};
463
+ for (const s of slots) {
464
+ let c = base[s] || "";
465
+ for (const v in variants) {
466
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
467
+ c = _applyVariant$26(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
468
+ }
469
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
470
+ if (props && props[v] !== void 0) continue;
471
+ const val = overrides[v];
472
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
473
+ if (add) c += (c ? " " : "") + add;
474
+ }
475
+ for (const [cq, overrides] of containers) for (const v in overrides) {
476
+ if (props && props[v] !== void 0) continue;
477
+ const val = overrides[v];
478
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
479
+ if (add) c += (c ? " " : "") + add;
480
+ }
481
+ for (const [match, cls] of compounds) {
482
+ let ok = true;
483
+ for (const v in match) if (_resolveStatic$26((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
484
+ ok = false;
485
+ break;
486
+ }
487
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
488
+ }
489
+ out[s] = c;
490
+ }
491
+ return out;
492
+ };
493
+ const Button_base = {
494
+ "root": "xgbvfx0g",
495
+ "icon": "ipg1440v",
496
+ "label": "j1r8obbd"
497
+ };
498
+ const Button_variants = {
499
+ "size": {
500
+ "sm": { "root": "gkynpr1i" },
501
+ "md": { "root": "nadprot9" },
502
+ "lg": { "root": "zguglzyu" }
503
+ },
504
+ "tone": {
505
+ "primary": { "root": "z5b9mf8a" },
506
+ "secondary": { "root": "hwzb861t" },
507
+ "ghost": { "root": "i4724ebo" },
508
+ "danger": { "root": "ciuqjx1c" }
509
+ }
510
+ };
511
+ const Button_compounds = [];
512
+ const Button_defaults = {
513
+ "size": "md",
514
+ "tone": "primary"
515
+ };
516
+ const Button_responsive = [];
517
+ const Button_respClasses = {};
518
+ const Button_containers = [];
519
+ const Button_cqClasses = {};
520
+ function Button$1(props) {
521
+ return _h$26(Button_base, Button_variants, Button_compounds, Button_defaults, Button_responsive, Button_respClasses, Button_containers, Button_cqClasses, [
522
+ "root",
523
+ "icon",
524
+ "label"
525
+ ], props);
526
+ }
527
+ //#endregion
528
+ //#region src/Button.tsx
529
+ const Button = forwardRef(function Button({ children, icon, className, size, tone, type = "button", ...props }, ref) {
530
+ const styles = Button$1({
531
+ size,
532
+ tone
533
+ });
534
+ return /* @__PURE__ */ jsxs("button", {
535
+ ref,
536
+ type,
537
+ className: className ? `${styles.root} ${className}` : styles.root,
538
+ ...props,
539
+ children: [icon ? /* @__PURE__ */ jsx("span", {
540
+ className: styles.icon,
541
+ children: icon
542
+ }) : null, children ? /* @__PURE__ */ jsx("span", {
543
+ className: styles.label,
544
+ children
545
+ }) : null]
546
+ });
547
+ });
548
+ //#endregion
549
+ //#region generated/badge.mjs
550
+ const _isObj$25 = (v) => v != null && typeof v === "object";
551
+ const _resolveStatic$25 = (v, fallback) => _isObj$25(v) ? v.initial ?? fallback : v ?? fallback;
552
+ const _applyVariant$25 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
553
+ if (_isObj$25(raw)) {
554
+ const initial = raw.initial ?? defaultVal;
555
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
556
+ for (const key in raw) {
557
+ if (key === "initial") continue;
558
+ const val = raw[key];
559
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
560
+ if (add) c += (c ? " " : "") + add;
561
+ }
562
+ } else {
563
+ const val = raw;
564
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
565
+ if (add) c += (c ? " " : "") + add;
566
+ }
567
+ return c;
568
+ };
569
+ const _h$25 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
570
+ const out = {};
571
+ for (const s of slots) {
572
+ let c = base[s] || "";
573
+ for (const v in variants) {
574
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
575
+ c = _applyVariant$25(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
576
+ }
577
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
578
+ if (props && props[v] !== void 0) continue;
579
+ const val = overrides[v];
580
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
581
+ if (add) c += (c ? " " : "") + add;
582
+ }
583
+ for (const [cq, overrides] of containers) for (const v in overrides) {
584
+ if (props && props[v] !== void 0) continue;
585
+ const val = overrides[v];
586
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
587
+ if (add) c += (c ? " " : "") + add;
588
+ }
589
+ for (const [match, cls] of compounds) {
590
+ let ok = true;
591
+ for (const v in match) if (_resolveStatic$25((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
592
+ ok = false;
593
+ break;
594
+ }
595
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
596
+ }
597
+ out[s] = c;
598
+ }
599
+ return out;
600
+ };
601
+ const Badge_base = { "root": "xpt1ar4t" };
602
+ const Badge_variants = {
603
+ "tone": {
604
+ "neutral": { "root": "ssx2ecni" },
605
+ "primary": { "root": "feam7srm" },
606
+ "success": { "root": "oey12krg" },
607
+ "warning": { "root": "xihlucge" },
608
+ "danger": { "root": "y6j3o1f9" }
609
+ },
610
+ "size": {
611
+ "sm": { "root": "qi1gbv8s" },
612
+ "md": { "root": "xunxik6h" }
613
+ }
614
+ };
615
+ const Badge_compounds = [];
616
+ const Badge_defaults = {
617
+ "tone": "neutral",
618
+ "size": "md"
619
+ };
620
+ const Badge_responsive = [];
621
+ const Badge_respClasses = {};
622
+ const Badge_containers = [];
623
+ const Badge_cqClasses = {};
624
+ function Badge$1(props) {
625
+ return _h$25(Badge_base, Badge_variants, Badge_compounds, Badge_defaults, Badge_responsive, Badge_respClasses, Badge_containers, Badge_cqClasses, ["root"], props);
626
+ }
627
+ //#endregion
628
+ //#region src/Badge.tsx
629
+ const Badge = forwardRef(function Badge({ children, className, tone, size, ...props }, ref) {
630
+ const styles = Badge$1({
631
+ tone,
632
+ size
633
+ });
634
+ return /* @__PURE__ */ jsx("span", {
635
+ ref,
636
+ className: className ? `${styles.root} ${className}` : styles.root,
637
+ ...props,
638
+ children
639
+ });
640
+ });
641
+ //#endregion
642
+ //#region generated/link.mjs
643
+ const _isObj$24 = (v) => v != null && typeof v === "object";
644
+ const _resolveStatic$24 = (v, fallback) => _isObj$24(v) ? v.initial ?? fallback : v ?? fallback;
645
+ const _applyVariant$24 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
646
+ if (_isObj$24(raw)) {
647
+ const initial = raw.initial ?? defaultVal;
648
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
649
+ for (const key in raw) {
650
+ if (key === "initial") continue;
651
+ const val = raw[key];
652
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
653
+ if (add) c += (c ? " " : "") + add;
654
+ }
655
+ } else {
656
+ const val = raw;
657
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
658
+ if (add) c += (c ? " " : "") + add;
659
+ }
660
+ return c;
661
+ };
662
+ const _h$24 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
663
+ const out = {};
664
+ for (const s of slots) {
665
+ let c = base[s] || "";
666
+ for (const v in variants) {
667
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
668
+ c = _applyVariant$24(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
669
+ }
670
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
671
+ if (props && props[v] !== void 0) continue;
672
+ const val = overrides[v];
673
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
674
+ if (add) c += (c ? " " : "") + add;
675
+ }
676
+ for (const [cq, overrides] of containers) for (const v in overrides) {
677
+ if (props && props[v] !== void 0) continue;
678
+ const val = overrides[v];
679
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
680
+ if (add) c += (c ? " " : "") + add;
681
+ }
682
+ for (const [match, cls] of compounds) {
683
+ let ok = true;
684
+ for (const v in match) if (_resolveStatic$24((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
685
+ ok = false;
686
+ break;
687
+ }
688
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
689
+ }
690
+ out[s] = c;
691
+ }
692
+ return out;
693
+ };
694
+ const Link_base = { "root": "jx5u6w1h" };
695
+ const Link_variants = {
696
+ "tone": {
697
+ "primary": { "root": "pc9wa142" },
698
+ "muted": { "root": "isas0wni" },
699
+ "danger": { "root": "yt1oc8is" }
700
+ },
701
+ "size": {
702
+ "sm": { "root": "uvs9gkrj" },
703
+ "md": { "root": "xb5ha0ct" },
704
+ "lg": { "root": "jawy0v9h" }
705
+ }
706
+ };
707
+ const Link_compounds = [];
708
+ const Link_defaults = {
709
+ "tone": "primary",
710
+ "size": "md"
711
+ };
712
+ const Link_responsive = [];
713
+ const Link_respClasses = {};
714
+ const Link_containers = [];
715
+ const Link_cqClasses = {};
716
+ function Link$1(props) {
717
+ return _h$24(Link_base, Link_variants, Link_compounds, Link_defaults, Link_responsive, Link_respClasses, Link_containers, Link_cqClasses, ["root"], props);
718
+ }
719
+ //#endregion
720
+ //#region src/Link.tsx
721
+ const Link = forwardRef(function Link({ children, className, tone, size, ...props }, ref) {
722
+ const styles = Link$1({
723
+ tone,
724
+ size
725
+ });
726
+ return /* @__PURE__ */ jsx("a", {
727
+ ref,
728
+ className: className ? `${styles.root} ${className}` : styles.root,
729
+ ...props,
730
+ children
731
+ });
732
+ });
733
+ //#endregion
734
+ //#region generated/card.mjs
735
+ const _isObj$23 = (v) => v != null && typeof v === "object";
736
+ const _resolveStatic$23 = (v, fallback) => _isObj$23(v) ? v.initial ?? fallback : v ?? fallback;
737
+ const _applyVariant$23 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
738
+ if (_isObj$23(raw)) {
739
+ const initial = raw.initial ?? defaultVal;
740
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
741
+ for (const key in raw) {
742
+ if (key === "initial") continue;
743
+ const val = raw[key];
744
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
745
+ if (add) c += (c ? " " : "") + add;
746
+ }
747
+ } else {
748
+ const val = raw;
749
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
750
+ if (add) c += (c ? " " : "") + add;
751
+ }
752
+ return c;
753
+ };
754
+ const _h$23 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
755
+ const out = {};
756
+ for (const s of slots) {
757
+ let c = base[s] || "";
758
+ for (const v in variants) {
759
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
760
+ c = _applyVariant$23(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
761
+ }
762
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
763
+ if (props && props[v] !== void 0) continue;
764
+ const val = overrides[v];
765
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
766
+ if (add) c += (c ? " " : "") + add;
767
+ }
768
+ for (const [cq, overrides] of containers) for (const v in overrides) {
769
+ if (props && props[v] !== void 0) continue;
770
+ const val = overrides[v];
771
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
772
+ if (add) c += (c ? " " : "") + add;
773
+ }
774
+ for (const [match, cls] of compounds) {
775
+ let ok = true;
776
+ for (const v in match) if (_resolveStatic$23((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
777
+ ok = false;
778
+ break;
779
+ }
780
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
781
+ }
782
+ out[s] = c;
783
+ }
784
+ return out;
785
+ };
786
+ const Card_base = { "root": "ztav5xou" };
787
+ const Card_variants = {
788
+ "padding": {
789
+ "none": { "root": "q5hzl0g3" },
790
+ "sm": { "root": "acn0ncg0" },
791
+ "md": { "root": "lyfttkpl" },
792
+ "lg": { "root": "zd72rp8y" }
793
+ },
794
+ "shadow": {
795
+ "none": { "root": "js5lnge9" },
796
+ "sm": { "root": "bja9sgqj" },
797
+ "md": { "root": "o3zsliej" },
798
+ "lg": { "root": "g9rv3acc" }
799
+ }
800
+ };
801
+ const Card_compounds = [];
802
+ const Card_defaults = {
803
+ "padding": "md",
804
+ "shadow": "sm"
805
+ };
806
+ const Card_responsive = [];
807
+ const Card_respClasses = {};
808
+ const Card_containers = [];
809
+ const Card_cqClasses = {};
810
+ function Card$1(props) {
811
+ return _h$23(Card_base, Card_variants, Card_compounds, Card_defaults, Card_responsive, Card_respClasses, Card_containers, Card_cqClasses, ["root"], props);
812
+ }
813
+ //#endregion
814
+ //#region src/Card.tsx
815
+ const Card = forwardRef(function Card({ children, className, padding, shadow, ...props }, ref) {
816
+ const styles = Card$1({
817
+ padding,
818
+ shadow
819
+ });
820
+ return /* @__PURE__ */ jsx("div", {
821
+ ref,
822
+ className: className ? `${styles.root} ${className}` : styles.root,
823
+ ...props,
824
+ children
825
+ });
826
+ });
827
+ //#endregion
828
+ //#region generated/input.mjs
829
+ const _isObj$22 = (v) => v != null && typeof v === "object";
830
+ const _resolveStatic$22 = (v, fallback) => _isObj$22(v) ? v.initial ?? fallback : v ?? fallback;
831
+ const _applyVariant$22 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
832
+ if (_isObj$22(raw)) {
833
+ const initial = raw.initial ?? defaultVal;
834
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
835
+ for (const key in raw) {
836
+ if (key === "initial") continue;
837
+ const val = raw[key];
838
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
839
+ if (add) c += (c ? " " : "") + add;
840
+ }
841
+ } else {
842
+ const val = raw;
843
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
844
+ if (add) c += (c ? " " : "") + add;
845
+ }
846
+ return c;
847
+ };
848
+ const _h$22 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
849
+ const out = {};
850
+ for (const s of slots) {
851
+ let c = base[s] || "";
852
+ for (const v in variants) {
853
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
854
+ c = _applyVariant$22(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
855
+ }
856
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
857
+ if (props && props[v] !== void 0) continue;
858
+ const val = overrides[v];
859
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
860
+ if (add) c += (c ? " " : "") + add;
861
+ }
862
+ for (const [cq, overrides] of containers) for (const v in overrides) {
863
+ if (props && props[v] !== void 0) continue;
864
+ const val = overrides[v];
865
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
866
+ if (add) c += (c ? " " : "") + add;
867
+ }
868
+ for (const [match, cls] of compounds) {
869
+ let ok = true;
870
+ for (const v in match) if (_resolveStatic$22((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
871
+ ok = false;
872
+ break;
873
+ }
874
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
875
+ }
876
+ out[s] = c;
877
+ }
878
+ return out;
879
+ };
880
+ const Input_base = { "root": "tl1hxte7" };
881
+ const Input_variants = { "size": {
882
+ "sm": { "root": "sb6bhcgf" },
883
+ "md": { "root": "l29ltknw" },
884
+ "lg": { "root": "f7v49dzp" }
885
+ } };
886
+ const Input_compounds = [];
887
+ const Input_defaults = { "size": "md" };
888
+ const Input_responsive = [];
889
+ const Input_respClasses = {};
890
+ const Input_containers = [];
891
+ const Input_cqClasses = {};
892
+ function Input$1(props) {
893
+ return _h$22(Input_base, Input_variants, Input_compounds, Input_defaults, Input_responsive, Input_respClasses, Input_containers, Input_cqClasses, ["root"], props);
894
+ }
895
+ //#endregion
896
+ //#region src/Input.tsx
897
+ const Input = forwardRef(function Input({ className, size, ...props }, ref) {
898
+ const styles = Input$1({ size });
899
+ return /* @__PURE__ */ jsx("input", {
900
+ ref,
901
+ className: className ? `${styles.root} ${className}` : styles.root,
902
+ ...props
903
+ });
904
+ });
905
+ //#endregion
906
+ //#region generated/divider.mjs
907
+ const _isObj$21 = (v) => v != null && typeof v === "object";
908
+ const _resolveStatic$21 = (v, fallback) => _isObj$21(v) ? v.initial ?? fallback : v ?? fallback;
909
+ const _applyVariant$21 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
910
+ if (_isObj$21(raw)) {
911
+ const initial = raw.initial ?? defaultVal;
912
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
913
+ for (const key in raw) {
914
+ if (key === "initial") continue;
915
+ const val = raw[key];
916
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
917
+ if (add) c += (c ? " " : "") + add;
918
+ }
919
+ } else {
920
+ const val = raw;
921
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
922
+ if (add) c += (c ? " " : "") + add;
923
+ }
924
+ return c;
925
+ };
926
+ const _h$21 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
927
+ const out = {};
928
+ for (const s of slots) {
929
+ let c = base[s] || "";
930
+ for (const v in variants) {
931
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
932
+ c = _applyVariant$21(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
933
+ }
934
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
935
+ if (props && props[v] !== void 0) continue;
936
+ const val = overrides[v];
937
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
938
+ if (add) c += (c ? " " : "") + add;
939
+ }
940
+ for (const [cq, overrides] of containers) for (const v in overrides) {
941
+ if (props && props[v] !== void 0) continue;
942
+ const val = overrides[v];
943
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
944
+ if (add) c += (c ? " " : "") + add;
945
+ }
946
+ for (const [match, cls] of compounds) {
947
+ let ok = true;
948
+ for (const v in match) if (_resolveStatic$21((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
949
+ ok = false;
950
+ break;
951
+ }
952
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
953
+ }
954
+ out[s] = c;
955
+ }
956
+ return out;
957
+ };
958
+ const Divider_base = { "root": "n409hj8d" };
959
+ const Divider_variants = { "spacing": {
960
+ "none": { "root": "sdvh76a8" },
961
+ "sm": { "root": "er1l9o4w" },
962
+ "md": { "root": "r60peqx0" },
963
+ "lg": { "root": "ryzazrb7" }
964
+ } };
965
+ const Divider_compounds = [];
966
+ const Divider_defaults = { "spacing": "md" };
967
+ const Divider_responsive = [];
968
+ const Divider_respClasses = {};
969
+ const Divider_containers = [];
970
+ const Divider_cqClasses = {};
971
+ function Divider$1(props) {
972
+ return _h$21(Divider_base, Divider_variants, Divider_compounds, Divider_defaults, Divider_responsive, Divider_respClasses, Divider_containers, Divider_cqClasses, ["root"], props);
973
+ }
974
+ //#endregion
975
+ //#region src/Divider.tsx
976
+ const Divider = forwardRef(function Divider({ className, spacing, ...props }, ref) {
977
+ const styles = Divider$1({ spacing });
978
+ return /* @__PURE__ */ jsx("hr", {
979
+ ref,
980
+ className: className ? `${styles.root} ${className}` : styles.root,
981
+ ...props
982
+ });
983
+ });
984
+ //#endregion
985
+ //#region generated/spinner.mjs
986
+ const _isObj$20 = (v) => v != null && typeof v === "object";
987
+ const _resolveStatic$20 = (v, fallback) => _isObj$20(v) ? v.initial ?? fallback : v ?? fallback;
988
+ const _applyVariant$20 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
989
+ if (_isObj$20(raw)) {
990
+ const initial = raw.initial ?? defaultVal;
991
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
992
+ for (const key in raw) {
993
+ if (key === "initial") continue;
994
+ const val = raw[key];
995
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
996
+ if (add) c += (c ? " " : "") + add;
997
+ }
998
+ } else {
999
+ const val = raw;
1000
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
1001
+ if (add) c += (c ? " " : "") + add;
1002
+ }
1003
+ return c;
1004
+ };
1005
+ const _h$20 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
1006
+ const out = {};
1007
+ for (const s of slots) {
1008
+ let c = base[s] || "";
1009
+ for (const v in variants) {
1010
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
1011
+ c = _applyVariant$20(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
1012
+ }
1013
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
1014
+ if (props && props[v] !== void 0) continue;
1015
+ const val = overrides[v];
1016
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
1017
+ if (add) c += (c ? " " : "") + add;
1018
+ }
1019
+ for (const [cq, overrides] of containers) for (const v in overrides) {
1020
+ if (props && props[v] !== void 0) continue;
1021
+ const val = overrides[v];
1022
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
1023
+ if (add) c += (c ? " " : "") + add;
1024
+ }
1025
+ for (const [match, cls] of compounds) {
1026
+ let ok = true;
1027
+ for (const v in match) if (_resolveStatic$20((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
1028
+ ok = false;
1029
+ break;
1030
+ }
1031
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
1032
+ }
1033
+ out[s] = c;
1034
+ }
1035
+ return out;
1036
+ };
1037
+ const Spinner_base = { "root": "ldw2j5ug" };
1038
+ const Spinner_variants = { "size": {
1039
+ "sm": { "root": "euakcbqt" },
1040
+ "md": { "root": "xkduojxa" },
1041
+ "lg": { "root": "j98o1xut" }
1042
+ } };
1043
+ const Spinner_compounds = [];
1044
+ const Spinner_defaults = { "size": "md" };
1045
+ const Spinner_responsive = [];
1046
+ const Spinner_respClasses = {};
1047
+ const Spinner_containers = [];
1048
+ const Spinner_cqClasses = {};
1049
+ function Spinner$1(props) {
1050
+ return _h$20(Spinner_base, Spinner_variants, Spinner_compounds, Spinner_defaults, Spinner_responsive, Spinner_respClasses, Spinner_containers, Spinner_cqClasses, ["root"], props);
1051
+ }
1052
+ //#endregion
1053
+ //#region src/Spinner.tsx
1054
+ const Spinner = forwardRef(function Spinner({ className, size, label = "Loading", ...props }, ref) {
1055
+ const styles = Spinner$1({ size });
1056
+ return /* @__PURE__ */ jsx("span", {
1057
+ ref,
1058
+ role: "status",
1059
+ "aria-label": label,
1060
+ className: className ? `${styles.root} ${className}` : styles.root,
1061
+ ...props
1062
+ });
1063
+ });
1064
+ //#endregion
1065
+ //#region generated/tabs.mjs
1066
+ const _isObj$19 = (v) => v != null && typeof v === "object";
1067
+ const _resolveStatic$19 = (v, fallback) => _isObj$19(v) ? v.initial ?? fallback : v ?? fallback;
1068
+ const _applyVariant$19 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
1069
+ if (_isObj$19(raw)) {
1070
+ const initial = raw.initial ?? defaultVal;
1071
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
1072
+ for (const key in raw) {
1073
+ if (key === "initial") continue;
1074
+ const val = raw[key];
1075
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
1076
+ if (add) c += (c ? " " : "") + add;
1077
+ }
1078
+ } else {
1079
+ const val = raw;
1080
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
1081
+ if (add) c += (c ? " " : "") + add;
1082
+ }
1083
+ return c;
1084
+ };
1085
+ const _h$19 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
1086
+ const out = {};
1087
+ for (const s of slots) {
1088
+ let c = base[s] || "";
1089
+ for (const v in variants) {
1090
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
1091
+ c = _applyVariant$19(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
1092
+ }
1093
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
1094
+ if (props && props[v] !== void 0) continue;
1095
+ const val = overrides[v];
1096
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
1097
+ if (add) c += (c ? " " : "") + add;
1098
+ }
1099
+ for (const [cq, overrides] of containers) for (const v in overrides) {
1100
+ if (props && props[v] !== void 0) continue;
1101
+ const val = overrides[v];
1102
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
1103
+ if (add) c += (c ? " " : "") + add;
1104
+ }
1105
+ for (const [match, cls] of compounds) {
1106
+ let ok = true;
1107
+ for (const v in match) if (_resolveStatic$19((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
1108
+ ok = false;
1109
+ break;
1110
+ }
1111
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
1112
+ }
1113
+ out[s] = c;
1114
+ }
1115
+ return out;
1116
+ };
1117
+ const Tabs_base = {
1118
+ "root": "fvwj7m6o",
1119
+ "list": "nl000g8g",
1120
+ "tab": "irh9shtu",
1121
+ "panel": "hoxravzh"
1122
+ };
1123
+ const Tabs_variants = {};
1124
+ const Tabs_compounds = [];
1125
+ const Tabs_defaults = {};
1126
+ const Tabs_responsive = [];
1127
+ const Tabs_respClasses = {};
1128
+ const Tabs_containers = [];
1129
+ const Tabs_cqClasses = {};
1130
+ function Tabs$1(props) {
1131
+ return _h$19(Tabs_base, Tabs_variants, Tabs_compounds, Tabs_defaults, Tabs_responsive, Tabs_respClasses, Tabs_containers, Tabs_cqClasses, [
1132
+ "root",
1133
+ "list",
1134
+ "tab",
1135
+ "panel"
1136
+ ], props);
1137
+ }
1138
+ //#endregion
1139
+ //#region src/utils/useControllableState.ts
1140
+ /**
1141
+ * Supports both controlled (`value` + `onChange`) and uncontrolled (`defaultValue`)
1142
+ * usage with one API. When `value` is provided the component is controlled and the
1143
+ * internal state is ignored; otherwise state is local and `onChange` still fires.
1144
+ */
1145
+ function useControllableState(params) {
1146
+ const { value, defaultValue, onChange } = params;
1147
+ const isControlled = value !== void 0;
1148
+ const [uncontrolled, setUncontrolled] = useState(defaultValue);
1149
+ const onChangeRef = useRef(onChange);
1150
+ onChangeRef.current = onChange;
1151
+ return [isControlled ? value : uncontrolled, useCallback((next) => {
1152
+ if (!isControlled) setUncontrolled(next);
1153
+ onChangeRef.current?.(next);
1154
+ }, [isControlled])];
1155
+ }
1156
+ //#endregion
1157
+ //#region src/utils/useComposedRefs.ts
1158
+ function setRef(ref, value) {
1159
+ if (typeof ref === "function") ref(value);
1160
+ else if (ref != null) ref.current = value;
1161
+ }
1162
+ /** Merge several refs (e.g. a forwarded ref plus an internal one) into a single callback ref. */
1163
+ function useComposedRefs(...refs) {
1164
+ return useCallback((node) => {
1165
+ for (const ref of refs) setRef(ref, node);
1166
+ }, refs);
1167
+ }
1168
+ //#endregion
1169
+ //#region src/utils/useId.ts
1170
+ /** Stable SSR-safe id, honoring a caller-provided id when present. */
1171
+ function useId$1(provided) {
1172
+ const generated = useId();
1173
+ return provided ?? generated;
1174
+ }
1175
+ //#endregion
1176
+ //#region src/utils/Portal.tsx
1177
+ /**
1178
+ * Renders children into `container` (default document.body). Resolves the target
1179
+ * synchronously on the client so the portaled subtree mounts in the same commit
1180
+ * (important for refs/focus management); returns null during SSR.
1181
+ */
1182
+ function Portal(props) {
1183
+ const [target] = useState(() => typeof document !== "undefined" ? props.container ?? document.body : null);
1184
+ if (!target) return null;
1185
+ return createPortal(props.children, target);
1186
+ }
1187
+ //#endregion
1188
+ //#region src/utils/useScrollLock.ts
1189
+ /** Locks body scroll while `active`, compensating for the scrollbar width to avoid layout shift. */
1190
+ function useScrollLock(active) {
1191
+ useEffect(() => {
1192
+ if (!active) return;
1193
+ const { overflow, paddingRight } = document.body.style;
1194
+ const scrollbar = window.innerWidth - document.documentElement.clientWidth;
1195
+ document.body.style.overflow = "hidden";
1196
+ if (scrollbar > 0) document.body.style.paddingRight = `${scrollbar}px`;
1197
+ return () => {
1198
+ document.body.style.overflow = overflow;
1199
+ document.body.style.paddingRight = paddingRight;
1200
+ };
1201
+ }, [active]);
1202
+ }
1203
+ //#endregion
1204
+ //#region src/utils/useFocusTrap.ts
1205
+ const FOCUSABLE = [
1206
+ "a[href]",
1207
+ "button:not([disabled])",
1208
+ "textarea:not([disabled])",
1209
+ "input:not([disabled])",
1210
+ "select:not([disabled])",
1211
+ "[tabindex]:not([tabindex='-1'])"
1212
+ ].join(",");
1213
+ /**
1214
+ * Traps Tab focus inside the returned ref's element while `active`, focuses the first
1215
+ * focusable on activate, and restores focus to the previously focused element on cleanup.
1216
+ * Attach the ref to a container with tabIndex={-1} so it can receive initial focus.
1217
+ */
1218
+ function useFocusTrap(active) {
1219
+ const ref = useRef(null);
1220
+ useEffect(() => {
1221
+ if (!active) return;
1222
+ const node = ref.current;
1223
+ if (!node) return;
1224
+ const previouslyFocused = document.activeElement;
1225
+ const focusables = () => Array.from(node.querySelectorAll(FOCUSABLE)).filter((el) => el.offsetParent !== null);
1226
+ (focusables()[0] ?? node).focus();
1227
+ function onKeyDown(event) {
1228
+ if (event.key !== "Tab") return;
1229
+ const items = focusables();
1230
+ const first = items[0];
1231
+ const last = items[items.length - 1];
1232
+ if (!first || !last) {
1233
+ event.preventDefault();
1234
+ return;
1235
+ }
1236
+ const current = document.activeElement;
1237
+ if (event.shiftKey && current === first) {
1238
+ event.preventDefault();
1239
+ last.focus();
1240
+ } else if (!event.shiftKey && current === last) {
1241
+ event.preventDefault();
1242
+ first.focus();
1243
+ }
1244
+ }
1245
+ node.addEventListener("keydown", onKeyDown);
1246
+ return () => {
1247
+ node.removeEventListener("keydown", onKeyDown);
1248
+ previouslyFocused?.focus?.();
1249
+ };
1250
+ }, [active]);
1251
+ return ref;
1252
+ }
1253
+ //#endregion
1254
+ //#region src/utils/useOnEscape.ts
1255
+ /** Calls `handler` when Escape is pressed while `active`. */
1256
+ function useOnEscape(active, handler) {
1257
+ const handlerRef = useRef(handler);
1258
+ handlerRef.current = handler;
1259
+ useEffect(() => {
1260
+ if (!active) return;
1261
+ function onKeyDown(event) {
1262
+ if (event.key === "Escape") handlerRef.current();
1263
+ }
1264
+ document.addEventListener("keydown", onKeyDown);
1265
+ return () => document.removeEventListener("keydown", onKeyDown);
1266
+ }, [active]);
1267
+ }
1268
+ //#endregion
1269
+ //#region src/utils/useOnClickOutside.ts
1270
+ /**
1271
+ * Calls `handler` on a pointerdown outside every element in `refs`, while `active`.
1272
+ * Use for dismissing popovers/menus/selects on outside click.
1273
+ */
1274
+ function useOnClickOutside(active, handler, refs) {
1275
+ const handlerRef = useRef(handler);
1276
+ handlerRef.current = handler;
1277
+ useEffect(() => {
1278
+ if (!active) return;
1279
+ function onPointerDown(event) {
1280
+ const target = event.target;
1281
+ if (refs.some((ref) => ref.current?.contains(target))) return;
1282
+ handlerRef.current();
1283
+ }
1284
+ document.addEventListener("pointerdown", onPointerDown, true);
1285
+ return () => document.removeEventListener("pointerdown", onPointerDown, true);
1286
+ }, [active]);
1287
+ }
1288
+ //#endregion
1289
+ //#region src/utils/useAnchoredPosition.ts
1290
+ /**
1291
+ * Positions a floating element (e.g. popover/menu/listbox) below its anchor using
1292
+ * fixed coordinates, flipping above when there isn't room and clamping to the
1293
+ * viewport. Recomputes on scroll/resize. Hidden until the first measure to avoid a
1294
+ * flash at (0,0). Attach `anchorRef` to the trigger and `floatingRef`+`style` to
1295
+ * the floating element (rendered in a portal).
1296
+ */
1297
+ function useAnchoredPosition(open, options = {}) {
1298
+ const anchorRef = useRef(null);
1299
+ const floatingRef = useRef(null);
1300
+ const [style, setStyle] = useState({
1301
+ position: "fixed",
1302
+ top: 0,
1303
+ left: 0,
1304
+ visibility: "hidden"
1305
+ });
1306
+ useLayoutEffect(() => {
1307
+ if (!open) return;
1308
+ const { gap = 6, matchWidth = false, align = "start" } = options;
1309
+ function update() {
1310
+ const anchor = anchorRef.current;
1311
+ const floating = floatingRef.current;
1312
+ if (!anchor || !floating) return;
1313
+ const a = anchor.getBoundingClientRect();
1314
+ const f = floating.getBoundingClientRect();
1315
+ let top = a.bottom + gap;
1316
+ if (top + f.height > window.innerHeight - 8 && a.top - gap - f.height > 8) top = a.top - gap - f.height;
1317
+ let left = align === "end" ? a.right - f.width : a.left;
1318
+ left = Math.min(Math.max(8, left), Math.max(8, window.innerWidth - 8 - f.width));
1319
+ const next = {
1320
+ position: "fixed",
1321
+ top,
1322
+ left,
1323
+ visibility: "visible"
1324
+ };
1325
+ if (matchWidth) next.minWidth = a.width;
1326
+ setStyle(next);
1327
+ }
1328
+ update();
1329
+ window.addEventListener("scroll", update, true);
1330
+ window.addEventListener("resize", update);
1331
+ return () => {
1332
+ window.removeEventListener("scroll", update, true);
1333
+ window.removeEventListener("resize", update);
1334
+ };
1335
+ }, [open]);
1336
+ return {
1337
+ anchorRef,
1338
+ floatingRef,
1339
+ style
1340
+ };
1341
+ }
1342
+ //#endregion
1343
+ //#region src/Tabs.tsx
1344
+ const TabsContext = createContext(null);
1345
+ function useTabsContext(part) {
1346
+ const ctx = useContext(TabsContext);
1347
+ if (!ctx) throw new Error(`Tabs.${part} must be used within <Tabs>`);
1348
+ return ctx;
1349
+ }
1350
+ const TabsRoot = forwardRef(function Tabs({ value, defaultValue, onChange, children, className, id, ...props }, ref) {
1351
+ const styles = Tabs$1();
1352
+ const baseId = useId$1(id);
1353
+ const [active, setActive] = useControllableState({
1354
+ value,
1355
+ defaultValue: defaultValue ?? "",
1356
+ onChange
1357
+ });
1358
+ return /* @__PURE__ */ jsx(TabsContext.Provider, {
1359
+ value: {
1360
+ value: active,
1361
+ setValue: setActive,
1362
+ baseId
1363
+ },
1364
+ children: /* @__PURE__ */ jsx("div", {
1365
+ ref,
1366
+ className: className ? `${styles.root} ${className}` : styles.root,
1367
+ ...props,
1368
+ children
1369
+ })
1370
+ });
1371
+ });
1372
+ const TabsList = forwardRef(function TabsList({ children, className, ...props }, ref) {
1373
+ const styles = Tabs$1();
1374
+ const ctx = useTabsContext("List");
1375
+ function onKeyDown(event) {
1376
+ if (![
1377
+ "ArrowRight",
1378
+ "ArrowLeft",
1379
+ "Home",
1380
+ "End"
1381
+ ].includes(event.key)) return;
1382
+ const tabs = Array.from(event.currentTarget.querySelectorAll("[role=\"tab\"]:not([disabled])"));
1383
+ if (tabs.length === 0) return;
1384
+ const current = tabs.findIndex((tab) => tab === document.activeElement);
1385
+ let next = current;
1386
+ if (event.key === "ArrowRight") next = (current + 1) % tabs.length;
1387
+ else if (event.key === "ArrowLeft") next = (current - 1 + tabs.length) % tabs.length;
1388
+ else if (event.key === "Home") next = 0;
1389
+ else if (event.key === "End") next = tabs.length - 1;
1390
+ const target = tabs[next];
1391
+ if (!target) return;
1392
+ event.preventDefault();
1393
+ target.focus();
1394
+ const nextValue = target.getAttribute("data-value");
1395
+ if (nextValue != null) ctx.setValue(nextValue);
1396
+ }
1397
+ return /* @__PURE__ */ jsx("div", {
1398
+ ref,
1399
+ role: "tablist",
1400
+ className: className ? `${styles.list} ${className}` : styles.list,
1401
+ onKeyDown,
1402
+ ...props,
1403
+ children
1404
+ });
1405
+ });
1406
+ const Tab = forwardRef(function Tab({ value, children, className, disabled, onClick, ...props }, ref) {
1407
+ const styles = Tabs$1();
1408
+ const ctx = useTabsContext("Tab");
1409
+ const selected = ctx.value === value;
1410
+ return /* @__PURE__ */ jsx("button", {
1411
+ ref,
1412
+ type: "button",
1413
+ role: "tab",
1414
+ id: `${ctx.baseId}-tab-${value}`,
1415
+ "aria-selected": selected,
1416
+ "aria-controls": `${ctx.baseId}-panel-${value}`,
1417
+ tabIndex: selected ? 0 : -1,
1418
+ "data-state": selected ? "active" : "inactive",
1419
+ "data-value": value,
1420
+ disabled,
1421
+ className: className ? `${styles.tab} ${className}` : styles.tab,
1422
+ onClick: (event) => {
1423
+ onClick?.(event);
1424
+ if (!event.defaultPrevented) ctx.setValue(value);
1425
+ },
1426
+ ...props,
1427
+ children
1428
+ });
1429
+ });
1430
+ const TabPanel = forwardRef(function TabPanel({ value, children, className, ...props }, ref) {
1431
+ const styles = Tabs$1();
1432
+ const ctx = useTabsContext("Panel");
1433
+ if (ctx.value !== value) return null;
1434
+ return /* @__PURE__ */ jsx("div", {
1435
+ ref,
1436
+ role: "tabpanel",
1437
+ id: `${ctx.baseId}-panel-${value}`,
1438
+ "aria-labelledby": `${ctx.baseId}-tab-${value}`,
1439
+ tabIndex: 0,
1440
+ className: className ? `${styles.panel} ${className}` : styles.panel,
1441
+ ...props,
1442
+ children
1443
+ });
1444
+ });
1445
+ /**
1446
+ * Compound tabs. Compose with the attached parts:
1447
+ *
1448
+ * <Tabs defaultValue="a">
1449
+ * <Tabs.List>
1450
+ * <Tabs.Tab value="a">One</Tabs.Tab>
1451
+ * <Tabs.Tab value="b">Two</Tabs.Tab>
1452
+ * </Tabs.List>
1453
+ * <Tabs.Panel value="a">…</Tabs.Panel>
1454
+ * <Tabs.Panel value="b">…</Tabs.Panel>
1455
+ * </Tabs>
1456
+ */
1457
+ const Tabs = Object.assign(TabsRoot, {
1458
+ List: TabsList,
1459
+ Tab,
1460
+ Panel: TabPanel
1461
+ });
1462
+ //#endregion
1463
+ //#region generated/accordion.mjs
1464
+ const _isObj$18 = (v) => v != null && typeof v === "object";
1465
+ const _resolveStatic$18 = (v, fallback) => _isObj$18(v) ? v.initial ?? fallback : v ?? fallback;
1466
+ const _applyVariant$18 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
1467
+ if (_isObj$18(raw)) {
1468
+ const initial = raw.initial ?? defaultVal;
1469
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
1470
+ for (const key in raw) {
1471
+ if (key === "initial") continue;
1472
+ const val = raw[key];
1473
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
1474
+ if (add) c += (c ? " " : "") + add;
1475
+ }
1476
+ } else {
1477
+ const val = raw;
1478
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
1479
+ if (add) c += (c ? " " : "") + add;
1480
+ }
1481
+ return c;
1482
+ };
1483
+ const _h$18 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
1484
+ const out = {};
1485
+ for (const s of slots) {
1486
+ let c = base[s] || "";
1487
+ for (const v in variants) {
1488
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
1489
+ c = _applyVariant$18(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
1490
+ }
1491
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
1492
+ if (props && props[v] !== void 0) continue;
1493
+ const val = overrides[v];
1494
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
1495
+ if (add) c += (c ? " " : "") + add;
1496
+ }
1497
+ for (const [cq, overrides] of containers) for (const v in overrides) {
1498
+ if (props && props[v] !== void 0) continue;
1499
+ const val = overrides[v];
1500
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
1501
+ if (add) c += (c ? " " : "") + add;
1502
+ }
1503
+ for (const [match, cls] of compounds) {
1504
+ let ok = true;
1505
+ for (const v in match) if (_resolveStatic$18((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
1506
+ ok = false;
1507
+ break;
1508
+ }
1509
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
1510
+ }
1511
+ out[s] = c;
1512
+ }
1513
+ return out;
1514
+ };
1515
+ const Accordion_base = {
1516
+ "root": "lb1p2o63",
1517
+ "item": "k8d4oubi",
1518
+ "trigger": "b381rvf4",
1519
+ "icon": "uk9ok402",
1520
+ "content": "avxrzzyc",
1521
+ "contentInner": "y7azd1w7",
1522
+ "contentBody": "geakano4"
1523
+ };
1524
+ const Accordion_variants = {};
1525
+ const Accordion_compounds = [];
1526
+ const Accordion_defaults = {};
1527
+ const Accordion_responsive = [];
1528
+ const Accordion_respClasses = {};
1529
+ const Accordion_containers = [];
1530
+ const Accordion_cqClasses = {};
1531
+ function Accordion$1(props) {
1532
+ return _h$18(Accordion_base, Accordion_variants, Accordion_compounds, Accordion_defaults, Accordion_responsive, Accordion_respClasses, Accordion_containers, Accordion_cqClasses, [
1533
+ "root",
1534
+ "item",
1535
+ "trigger",
1536
+ "icon",
1537
+ "content",
1538
+ "contentInner",
1539
+ "contentBody"
1540
+ ], props);
1541
+ }
1542
+ //#endregion
1543
+ //#region src/Accordion.tsx
1544
+ function toArray(value) {
1545
+ if (value == null) return [];
1546
+ if (Array.isArray(value)) return value;
1547
+ return value ? [value] : [];
1548
+ }
1549
+ const AccordionContext = createContext(null);
1550
+ function useAccordionContext(part) {
1551
+ const ctx = useContext(AccordionContext);
1552
+ if (!ctx) throw new Error(`Accordion.${part} must be used within <Accordion>`);
1553
+ return ctx;
1554
+ }
1555
+ const ItemContext = createContext(null);
1556
+ function useItemContext(part) {
1557
+ const ctx = useContext(ItemContext);
1558
+ if (!ctx) throw new Error(`Accordion.${part} must be used within <Accordion.Item>`);
1559
+ return ctx;
1560
+ }
1561
+ const AccordionRoot = forwardRef(function Accordion({ type = "single", value, defaultValue, onChange, collapsible = true, children, className, id, ...props }, ref) {
1562
+ const styles = Accordion$1();
1563
+ const baseId = useId$1(id);
1564
+ const multiple = type === "multiple";
1565
+ const [open, setOpen] = useControllableState({
1566
+ value: value !== void 0 ? toArray(value) : void 0,
1567
+ defaultValue: toArray(defaultValue),
1568
+ onChange: onChange ? (next) => onChange(multiple ? next : next[0] ?? "") : void 0
1569
+ });
1570
+ const ctx = {
1571
+ baseId,
1572
+ isOpen: (v) => open.includes(v),
1573
+ toggle: (v) => {
1574
+ if (multiple) setOpen(open.includes(v) ? open.filter((item) => item !== v) : [...open, v]);
1575
+ else setOpen(open.includes(v) ? collapsible ? [] : open : [v]);
1576
+ }
1577
+ };
1578
+ return /* @__PURE__ */ jsx(AccordionContext.Provider, {
1579
+ value: ctx,
1580
+ children: /* @__PURE__ */ jsx("div", {
1581
+ ref,
1582
+ className: className ? `${styles.root} ${className}` : styles.root,
1583
+ ...props,
1584
+ children
1585
+ })
1586
+ });
1587
+ });
1588
+ const AccordionItem = forwardRef(function AccordionItem({ value, children, className, ...props }, ref) {
1589
+ const styles = Accordion$1();
1590
+ const open = useAccordionContext("Item").isOpen(value);
1591
+ return /* @__PURE__ */ jsx(ItemContext.Provider, {
1592
+ value: {
1593
+ value,
1594
+ open
1595
+ },
1596
+ children: /* @__PURE__ */ jsx("div", {
1597
+ ref,
1598
+ className: className ? `${styles.item} ${className}` : styles.item,
1599
+ ...props,
1600
+ children
1601
+ })
1602
+ });
1603
+ });
1604
+ const AccordionTrigger = forwardRef(function AccordionTrigger({ children, className, onClick, ...props }, ref) {
1605
+ const styles = Accordion$1();
1606
+ const ctx = useAccordionContext("Trigger");
1607
+ const item = useItemContext("Trigger");
1608
+ const state = item.open ? "open" : "closed";
1609
+ return /* @__PURE__ */ jsxs("button", {
1610
+ ref,
1611
+ type: "button",
1612
+ id: `${ctx.baseId}-trigger-${item.value}`,
1613
+ "aria-expanded": item.open,
1614
+ "aria-controls": `${ctx.baseId}-content-${item.value}`,
1615
+ "data-state": state,
1616
+ className: className ? `${styles.trigger} ${className}` : styles.trigger,
1617
+ onClick: (event) => {
1618
+ onClick?.(event);
1619
+ if (!event.defaultPrevented) ctx.toggle(item.value);
1620
+ },
1621
+ ...props,
1622
+ children: [children, /* @__PURE__ */ jsx("svg", {
1623
+ className: styles.icon,
1624
+ "data-state": state,
1625
+ width: "16",
1626
+ height: "16",
1627
+ viewBox: "0 0 24 24",
1628
+ fill: "none",
1629
+ stroke: "currentColor",
1630
+ strokeWidth: "2",
1631
+ strokeLinecap: "round",
1632
+ strokeLinejoin: "round",
1633
+ "aria-hidden": true,
1634
+ children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
1635
+ })]
1636
+ });
1637
+ });
1638
+ const AccordionContent = forwardRef(function AccordionContent({ children, className, ...props }, ref) {
1639
+ const styles = Accordion$1();
1640
+ const ctx = useAccordionContext("Content");
1641
+ const item = useItemContext("Content");
1642
+ return /* @__PURE__ */ jsx("div", {
1643
+ ref,
1644
+ role: "region",
1645
+ id: `${ctx.baseId}-content-${item.value}`,
1646
+ "aria-labelledby": `${ctx.baseId}-trigger-${item.value}`,
1647
+ "data-state": item.open ? "open" : "closed",
1648
+ className: className ? `${styles.content} ${className}` : styles.content,
1649
+ ...props,
1650
+ children: /* @__PURE__ */ jsx("div", {
1651
+ className: styles.contentInner,
1652
+ inert: item.open ? void 0 : true,
1653
+ children: /* @__PURE__ */ jsx("div", {
1654
+ className: styles.contentBody,
1655
+ children
1656
+ })
1657
+ })
1658
+ });
1659
+ });
1660
+ /**
1661
+ * Compound accordion. Compose with the attached parts:
1662
+ *
1663
+ * <Accordion type="single" defaultValue="a">
1664
+ * <Accordion.Item value="a">
1665
+ * <Accordion.Trigger>Section A</Accordion.Trigger>
1666
+ * <Accordion.Content>…</Accordion.Content>
1667
+ * </Accordion.Item>
1668
+ * </Accordion>
1669
+ */
1670
+ const Accordion = Object.assign(AccordionRoot, {
1671
+ Item: AccordionItem,
1672
+ Trigger: AccordionTrigger,
1673
+ Content: AccordionContent
1674
+ });
1675
+ //#endregion
1676
+ //#region generated/dialog.mjs
1677
+ const _isObj$17 = (v) => v != null && typeof v === "object";
1678
+ const _resolveStatic$17 = (v, fallback) => _isObj$17(v) ? v.initial ?? fallback : v ?? fallback;
1679
+ const _applyVariant$17 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
1680
+ if (_isObj$17(raw)) {
1681
+ const initial = raw.initial ?? defaultVal;
1682
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
1683
+ for (const key in raw) {
1684
+ if (key === "initial") continue;
1685
+ const val = raw[key];
1686
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
1687
+ if (add) c += (c ? " " : "") + add;
1688
+ }
1689
+ } else {
1690
+ const val = raw;
1691
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
1692
+ if (add) c += (c ? " " : "") + add;
1693
+ }
1694
+ return c;
1695
+ };
1696
+ const _h$17 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
1697
+ const out = {};
1698
+ for (const s of slots) {
1699
+ let c = base[s] || "";
1700
+ for (const v in variants) {
1701
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
1702
+ c = _applyVariant$17(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
1703
+ }
1704
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
1705
+ if (props && props[v] !== void 0) continue;
1706
+ const val = overrides[v];
1707
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
1708
+ if (add) c += (c ? " " : "") + add;
1709
+ }
1710
+ for (const [cq, overrides] of containers) for (const v in overrides) {
1711
+ if (props && props[v] !== void 0) continue;
1712
+ const val = overrides[v];
1713
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
1714
+ if (add) c += (c ? " " : "") + add;
1715
+ }
1716
+ for (const [match, cls] of compounds) {
1717
+ let ok = true;
1718
+ for (const v in match) if (_resolveStatic$17((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
1719
+ ok = false;
1720
+ break;
1721
+ }
1722
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
1723
+ }
1724
+ out[s] = c;
1725
+ }
1726
+ return out;
1727
+ };
1728
+ const Dialog_base = {
1729
+ "root": "njoga9sy",
1730
+ "overlay": "txyurvo3",
1731
+ "content": "u6a2wuss",
1732
+ "header": "ceyumvpm",
1733
+ "title": "pkl6aiul",
1734
+ "description": "l84j6wu4",
1735
+ "body": "x4myfjhj",
1736
+ "footer": "kpgi8yil",
1737
+ "close": "pjqzkzc9"
1738
+ };
1739
+ const Dialog_variants = {};
1740
+ const Dialog_compounds = [];
1741
+ const Dialog_defaults = {};
1742
+ const Dialog_responsive = [];
1743
+ const Dialog_respClasses = {};
1744
+ const Dialog_containers = [];
1745
+ const Dialog_cqClasses = {};
1746
+ function Dialog$1(props) {
1747
+ return _h$17(Dialog_base, Dialog_variants, Dialog_compounds, Dialog_defaults, Dialog_responsive, Dialog_respClasses, Dialog_containers, Dialog_cqClasses, [
1748
+ "root",
1749
+ "overlay",
1750
+ "content",
1751
+ "header",
1752
+ "title",
1753
+ "description",
1754
+ "body",
1755
+ "footer",
1756
+ "close"
1757
+ ], props);
1758
+ }
1759
+ //#endregion
1760
+ //#region src/Dialog.tsx
1761
+ const DialogContext = createContext(null);
1762
+ function useDialogContext(part) {
1763
+ const ctx = useContext(DialogContext);
1764
+ if (!ctx) throw new Error(`Dialog.${part} must be used within <Dialog>`);
1765
+ return ctx;
1766
+ }
1767
+ /** Clone a single child element, composing our handler with the child's own onClick. */
1768
+ function cloneWithClick(child, handler, extra) {
1769
+ if (!isValidElement(child)) throw new Error("Dialog.Trigger / Dialog.Close with `asChild` expects a single React element child.");
1770
+ const element = child;
1771
+ return cloneElement(element, {
1772
+ ...extra,
1773
+ onClick: (event) => {
1774
+ element.props.onClick?.(event);
1775
+ if (!event.defaultPrevented) handler(event);
1776
+ }
1777
+ });
1778
+ }
1779
+ function DialogRoot({ open, defaultOpen, onChange, children }) {
1780
+ const baseId = useId$1();
1781
+ const [value, setOpen] = useControllableState({
1782
+ value: open,
1783
+ defaultValue: defaultOpen ?? false,
1784
+ onChange
1785
+ });
1786
+ return /* @__PURE__ */ jsx(DialogContext.Provider, {
1787
+ value: {
1788
+ open: value,
1789
+ setOpen,
1790
+ baseId
1791
+ },
1792
+ children
1793
+ });
1794
+ }
1795
+ function DialogTrigger({ children }) {
1796
+ const ctx = useDialogContext("Trigger");
1797
+ return cloneWithClick(children, () => ctx.setOpen(true), {
1798
+ "aria-haspopup": "dialog",
1799
+ "aria-expanded": ctx.open
1800
+ });
1801
+ }
1802
+ const DialogContent = forwardRef(function DialogContent({ children, className, ...props }, ref) {
1803
+ const styles = Dialog$1();
1804
+ const ctx = useDialogContext("Content");
1805
+ const trapRef = useFocusTrap(ctx.open);
1806
+ useScrollLock(ctx.open);
1807
+ useOnEscape(ctx.open, () => ctx.setOpen(false));
1808
+ if (!ctx.open) return null;
1809
+ const setRefs = (node) => {
1810
+ trapRef.current = node;
1811
+ if (typeof ref === "function") ref(node);
1812
+ else if (ref) ref.current = node;
1813
+ };
1814
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx("div", {
1815
+ className: styles.overlay,
1816
+ onClick: (event) => {
1817
+ if (event.target === event.currentTarget) ctx.setOpen(false);
1818
+ },
1819
+ children: /* @__PURE__ */ jsx("div", {
1820
+ ref: setRefs,
1821
+ role: "dialog",
1822
+ "aria-modal": "true",
1823
+ "aria-labelledby": `${ctx.baseId}-title`,
1824
+ "aria-describedby": `${ctx.baseId}-desc`,
1825
+ tabIndex: -1,
1826
+ className: className ? `${styles.content} ${className}` : styles.content,
1827
+ ...props,
1828
+ children
1829
+ })
1830
+ }) });
1831
+ });
1832
+ function DialogHeader({ children, className, ...props }) {
1833
+ const styles = Dialog$1();
1834
+ return /* @__PURE__ */ jsx("div", {
1835
+ className: className ? `${styles.header} ${className}` : styles.header,
1836
+ ...props,
1837
+ children
1838
+ });
1839
+ }
1840
+ function DialogTitle({ children, className, ...props }) {
1841
+ const styles = Dialog$1();
1842
+ return /* @__PURE__ */ jsx("h2", {
1843
+ id: `${useDialogContext("Title").baseId}-title`,
1844
+ className: className ? `${styles.title} ${className}` : styles.title,
1845
+ ...props,
1846
+ children
1847
+ });
1848
+ }
1849
+ function DialogDescription({ children, className, ...props }) {
1850
+ const styles = Dialog$1();
1851
+ return /* @__PURE__ */ jsx("p", {
1852
+ id: `${useDialogContext("Description").baseId}-desc`,
1853
+ className: className ? `${styles.description} ${className}` : styles.description,
1854
+ ...props,
1855
+ children
1856
+ });
1857
+ }
1858
+ function DialogBody({ children, className, ...props }) {
1859
+ const styles = Dialog$1();
1860
+ return /* @__PURE__ */ jsx("div", {
1861
+ className: className ? `${styles.body} ${className}` : styles.body,
1862
+ ...props,
1863
+ children
1864
+ });
1865
+ }
1866
+ function DialogFooter({ children, className, ...props }) {
1867
+ const styles = Dialog$1();
1868
+ return /* @__PURE__ */ jsx("div", {
1869
+ className: className ? `${styles.footer} ${className}` : styles.footer,
1870
+ ...props,
1871
+ children
1872
+ });
1873
+ }
1874
+ function DialogClose({ asChild, children, className, ...props }) {
1875
+ const styles = Dialog$1();
1876
+ const ctx = useDialogContext("Close");
1877
+ if (asChild) return cloneWithClick(children, () => ctx.setOpen(false));
1878
+ return /* @__PURE__ */ jsx("button", {
1879
+ type: "button",
1880
+ "aria-label": props["aria-label"] ?? "Close",
1881
+ className: className ? `${styles.close} ${className}` : styles.close,
1882
+ onClick: () => ctx.setOpen(false),
1883
+ children: children ?? /* @__PURE__ */ jsxs("svg", {
1884
+ width: "16",
1885
+ height: "16",
1886
+ viewBox: "0 0 24 24",
1887
+ fill: "none",
1888
+ stroke: "currentColor",
1889
+ strokeWidth: "2",
1890
+ strokeLinecap: "round",
1891
+ strokeLinejoin: "round",
1892
+ "aria-hidden": true,
1893
+ children: [/* @__PURE__ */ jsx("line", {
1894
+ x1: "18",
1895
+ y1: "6",
1896
+ x2: "6",
1897
+ y2: "18"
1898
+ }), /* @__PURE__ */ jsx("line", {
1899
+ x1: "6",
1900
+ y1: "6",
1901
+ x2: "18",
1902
+ y2: "18"
1903
+ })]
1904
+ })
1905
+ });
1906
+ }
1907
+ /**
1908
+ * Compound modal dialog. Open via `open`/`onChange` or `Dialog.Trigger`:
1909
+ *
1910
+ * <Dialog>
1911
+ * <Dialog.Trigger><Button>Open</Button></Dialog.Trigger>
1912
+ * <Dialog.Content>
1913
+ * <Dialog.Close />
1914
+ * <Dialog.Header>
1915
+ * <Dialog.Title>Title</Dialog.Title>
1916
+ * <Dialog.Description>…</Dialog.Description>
1917
+ * </Dialog.Header>
1918
+ * <Dialog.Body>…</Dialog.Body>
1919
+ * <Dialog.Footer>
1920
+ * <Dialog.Close asChild><Button tone="secondary">Cancel</Button></Dialog.Close>
1921
+ * </Dialog.Footer>
1922
+ * </Dialog.Content>
1923
+ * </Dialog>
1924
+ */
1925
+ const Dialog = Object.assign(DialogRoot, {
1926
+ Trigger: DialogTrigger,
1927
+ Content: DialogContent,
1928
+ Header: DialogHeader,
1929
+ Title: DialogTitle,
1930
+ Description: DialogDescription,
1931
+ Body: DialogBody,
1932
+ Footer: DialogFooter,
1933
+ Close: DialogClose
1934
+ });
1935
+ //#endregion
1936
+ //#region generated/avatar.mjs
1937
+ const _isObj$16 = (v) => v != null && typeof v === "object";
1938
+ const _resolveStatic$16 = (v, fallback) => _isObj$16(v) ? v.initial ?? fallback : v ?? fallback;
1939
+ const _applyVariant$16 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
1940
+ if (_isObj$16(raw)) {
1941
+ const initial = raw.initial ?? defaultVal;
1942
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
1943
+ for (const key in raw) {
1944
+ if (key === "initial") continue;
1945
+ const val = raw[key];
1946
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
1947
+ if (add) c += (c ? " " : "") + add;
1948
+ }
1949
+ } else {
1950
+ const val = raw;
1951
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
1952
+ if (add) c += (c ? " " : "") + add;
1953
+ }
1954
+ return c;
1955
+ };
1956
+ const _h$16 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
1957
+ const out = {};
1958
+ for (const s of slots) {
1959
+ let c = base[s] || "";
1960
+ for (const v in variants) {
1961
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
1962
+ c = _applyVariant$16(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
1963
+ }
1964
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
1965
+ if (props && props[v] !== void 0) continue;
1966
+ const val = overrides[v];
1967
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
1968
+ if (add) c += (c ? " " : "") + add;
1969
+ }
1970
+ for (const [cq, overrides] of containers) for (const v in overrides) {
1971
+ if (props && props[v] !== void 0) continue;
1972
+ const val = overrides[v];
1973
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
1974
+ if (add) c += (c ? " " : "") + add;
1975
+ }
1976
+ for (const [match, cls] of compounds) {
1977
+ let ok = true;
1978
+ for (const v in match) if (_resolveStatic$16((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
1979
+ ok = false;
1980
+ break;
1981
+ }
1982
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
1983
+ }
1984
+ out[s] = c;
1985
+ }
1986
+ return out;
1987
+ };
1988
+ const Avatar_base = {
1989
+ "root": "zoazr53g",
1990
+ "image": "owfl4t6l"
1991
+ };
1992
+ const Avatar_variants = { "size": {
1993
+ "sm": { "root": "wbpsqbow" },
1994
+ "md": { "root": "xaeuvgy0" },
1995
+ "lg": { "root": "dun95otk" }
1996
+ } };
1997
+ const Avatar_compounds = [];
1998
+ const Avatar_defaults = { "size": "md" };
1999
+ const Avatar_responsive = [];
2000
+ const Avatar_respClasses = {};
2001
+ const Avatar_containers = [];
2002
+ const Avatar_cqClasses = {};
2003
+ function Avatar$1(props) {
2004
+ return _h$16(Avatar_base, Avatar_variants, Avatar_compounds, Avatar_defaults, Avatar_responsive, Avatar_respClasses, Avatar_containers, Avatar_cqClasses, ["root", "image"], props);
2005
+ }
2006
+ //#endregion
2007
+ //#region src/Avatar.tsx
2008
+ function initials(name) {
2009
+ if (!name) return "";
2010
+ return name.trim().split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("");
2011
+ }
2012
+ const Avatar = forwardRef(function Avatar({ src, alt, name, size, children, className, ...props }, ref) {
2013
+ const styles = Avatar$1({ size });
2014
+ const [errored, setErrored] = useState(false);
2015
+ const showImage = Boolean(src) && !errored;
2016
+ return /* @__PURE__ */ jsx("span", {
2017
+ ref,
2018
+ className: className ? `${styles.root} ${className}` : styles.root,
2019
+ ...props,
2020
+ children: showImage ? /* @__PURE__ */ jsx("img", {
2021
+ className: styles.image,
2022
+ src,
2023
+ alt: alt ?? name ?? "",
2024
+ onError: () => setErrored(true)
2025
+ }) : children ?? initials(name)
2026
+ });
2027
+ });
2028
+ //#endregion
2029
+ //#region generated/switch.mjs
2030
+ const _isObj$15 = (v) => v != null && typeof v === "object";
2031
+ const _resolveStatic$15 = (v, fallback) => _isObj$15(v) ? v.initial ?? fallback : v ?? fallback;
2032
+ const _applyVariant$15 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2033
+ if (_isObj$15(raw)) {
2034
+ const initial = raw.initial ?? defaultVal;
2035
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2036
+ for (const key in raw) {
2037
+ if (key === "initial") continue;
2038
+ const val = raw[key];
2039
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2040
+ if (add) c += (c ? " " : "") + add;
2041
+ }
2042
+ } else {
2043
+ const val = raw;
2044
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2045
+ if (add) c += (c ? " " : "") + add;
2046
+ }
2047
+ return c;
2048
+ };
2049
+ const _h$15 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2050
+ const out = {};
2051
+ for (const s of slots) {
2052
+ let c = base[s] || "";
2053
+ for (const v in variants) {
2054
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2055
+ c = _applyVariant$15(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2056
+ }
2057
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2058
+ if (props && props[v] !== void 0) continue;
2059
+ const val = overrides[v];
2060
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2061
+ if (add) c += (c ? " " : "") + add;
2062
+ }
2063
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2064
+ if (props && props[v] !== void 0) continue;
2065
+ const val = overrides[v];
2066
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2067
+ if (add) c += (c ? " " : "") + add;
2068
+ }
2069
+ for (const [match, cls] of compounds) {
2070
+ let ok = true;
2071
+ for (const v in match) if (_resolveStatic$15((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2072
+ ok = false;
2073
+ break;
2074
+ }
2075
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2076
+ }
2077
+ out[s] = c;
2078
+ }
2079
+ return out;
2080
+ };
2081
+ const Switch_base = {
2082
+ "root": "x4n96fys",
2083
+ "thumb": "x1agfwqx"
2084
+ };
2085
+ const Switch_variants = { "size": {
2086
+ "sm": { "root": "o4k6383u" },
2087
+ "md": { "root": "r0kye8hj" },
2088
+ "lg": { "root": "vyfeolfy" }
2089
+ } };
2090
+ const Switch_compounds = [];
2091
+ const Switch_defaults = { "size": "md" };
2092
+ const Switch_responsive = [];
2093
+ const Switch_respClasses = {};
2094
+ const Switch_containers = [];
2095
+ const Switch_cqClasses = {};
2096
+ function Switch$1(props) {
2097
+ return _h$15(Switch_base, Switch_variants, Switch_compounds, Switch_defaults, Switch_responsive, Switch_respClasses, Switch_containers, Switch_cqClasses, ["root", "thumb"], props);
2098
+ }
2099
+ //#endregion
2100
+ //#region src/Switch.tsx
2101
+ const Switch = forwardRef(function Switch({ checked, defaultChecked, onChange, size, disabled, className, onClick, ...props }, ref) {
2102
+ const styles = Switch$1({ size });
2103
+ const [on, setOn] = useControllableState({
2104
+ value: checked,
2105
+ defaultValue: defaultChecked ?? false,
2106
+ onChange
2107
+ });
2108
+ return /* @__PURE__ */ jsx("button", {
2109
+ ref,
2110
+ type: "button",
2111
+ role: "switch",
2112
+ "aria-checked": on,
2113
+ "data-state": on ? "checked" : "unchecked",
2114
+ disabled,
2115
+ className: className ? `${styles.root} ${className}` : styles.root,
2116
+ onClick: (event) => {
2117
+ onClick?.(event);
2118
+ if (!event.defaultPrevented) setOn(!on);
2119
+ },
2120
+ ...props,
2121
+ children: /* @__PURE__ */ jsx("span", { className: styles.thumb })
2122
+ });
2123
+ });
2124
+ //#endregion
2125
+ //#region generated/checkbox.mjs
2126
+ const _isObj$14 = (v) => v != null && typeof v === "object";
2127
+ const _resolveStatic$14 = (v, fallback) => _isObj$14(v) ? v.initial ?? fallback : v ?? fallback;
2128
+ const _applyVariant$14 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2129
+ if (_isObj$14(raw)) {
2130
+ const initial = raw.initial ?? defaultVal;
2131
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2132
+ for (const key in raw) {
2133
+ if (key === "initial") continue;
2134
+ const val = raw[key];
2135
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2136
+ if (add) c += (c ? " " : "") + add;
2137
+ }
2138
+ } else {
2139
+ const val = raw;
2140
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2141
+ if (add) c += (c ? " " : "") + add;
2142
+ }
2143
+ return c;
2144
+ };
2145
+ const _h$14 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2146
+ const out = {};
2147
+ for (const s of slots) {
2148
+ let c = base[s] || "";
2149
+ for (const v in variants) {
2150
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2151
+ c = _applyVariant$14(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2152
+ }
2153
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2154
+ if (props && props[v] !== void 0) continue;
2155
+ const val = overrides[v];
2156
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2157
+ if (add) c += (c ? " " : "") + add;
2158
+ }
2159
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2160
+ if (props && props[v] !== void 0) continue;
2161
+ const val = overrides[v];
2162
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2163
+ if (add) c += (c ? " " : "") + add;
2164
+ }
2165
+ for (const [match, cls] of compounds) {
2166
+ let ok = true;
2167
+ for (const v in match) if (_resolveStatic$14((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2168
+ ok = false;
2169
+ break;
2170
+ }
2171
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2172
+ }
2173
+ out[s] = c;
2174
+ }
2175
+ return out;
2176
+ };
2177
+ const Checkbox_base = {
2178
+ "root": "prncq0g7",
2179
+ "control": "g4uuxbit"
2180
+ };
2181
+ const Checkbox_variants = { "size": {
2182
+ "sm": { "root": "ohi5h5dd" },
2183
+ "md": { "root": "f10vx08e" },
2184
+ "lg": { "root": "l4jl6sbe" }
2185
+ } };
2186
+ const Checkbox_compounds = [];
2187
+ const Checkbox_defaults = { "size": "md" };
2188
+ const Checkbox_responsive = [];
2189
+ const Checkbox_respClasses = {};
2190
+ const Checkbox_containers = [];
2191
+ const Checkbox_cqClasses = {};
2192
+ function Checkbox$1(props) {
2193
+ return _h$14(Checkbox_base, Checkbox_variants, Checkbox_compounds, Checkbox_defaults, Checkbox_responsive, Checkbox_respClasses, Checkbox_containers, Checkbox_cqClasses, ["root", "control"], props);
2194
+ }
2195
+ //#endregion
2196
+ //#region generated/checkbox-group.mjs
2197
+ const _isObj$13 = (v) => v != null && typeof v === "object";
2198
+ const _resolveStatic$13 = (v, fallback) => _isObj$13(v) ? v.initial ?? fallback : v ?? fallback;
2199
+ const _applyVariant$13 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2200
+ if (_isObj$13(raw)) {
2201
+ const initial = raw.initial ?? defaultVal;
2202
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2203
+ for (const key in raw) {
2204
+ if (key === "initial") continue;
2205
+ const val = raw[key];
2206
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2207
+ if (add) c += (c ? " " : "") + add;
2208
+ }
2209
+ } else {
2210
+ const val = raw;
2211
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2212
+ if (add) c += (c ? " " : "") + add;
2213
+ }
2214
+ return c;
2215
+ };
2216
+ const _h$13 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2217
+ const out = {};
2218
+ for (const s of slots) {
2219
+ let c = base[s] || "";
2220
+ for (const v in variants) {
2221
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2222
+ c = _applyVariant$13(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2223
+ }
2224
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2225
+ if (props && props[v] !== void 0) continue;
2226
+ const val = overrides[v];
2227
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2228
+ if (add) c += (c ? " " : "") + add;
2229
+ }
2230
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2231
+ if (props && props[v] !== void 0) continue;
2232
+ const val = overrides[v];
2233
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2234
+ if (add) c += (c ? " " : "") + add;
2235
+ }
2236
+ for (const [match, cls] of compounds) {
2237
+ let ok = true;
2238
+ for (const v in match) if (_resolveStatic$13((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2239
+ ok = false;
2240
+ break;
2241
+ }
2242
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2243
+ }
2244
+ out[s] = c;
2245
+ }
2246
+ return out;
2247
+ };
2248
+ const CheckboxGroup_base = { "root": "qqzuscir" };
2249
+ const CheckboxGroup_variants = {};
2250
+ const CheckboxGroup_compounds = [];
2251
+ const CheckboxGroup_defaults = {};
2252
+ const CheckboxGroup_responsive = [];
2253
+ const CheckboxGroup_respClasses = {};
2254
+ const CheckboxGroup_containers = [];
2255
+ const CheckboxGroup_cqClasses = {};
2256
+ function CheckboxGroup$1(props) {
2257
+ return _h$13(CheckboxGroup_base, CheckboxGroup_variants, CheckboxGroup_compounds, CheckboxGroup_defaults, CheckboxGroup_responsive, CheckboxGroup_respClasses, CheckboxGroup_containers, CheckboxGroup_cqClasses, ["root"], props);
2258
+ }
2259
+ //#endregion
2260
+ //#region src/Checkbox.tsx
2261
+ const CheckboxGroupContext = createContext(null);
2262
+ const CheckboxGroupRoot = forwardRef(function CheckboxGroup({ value, defaultValue, onChange, size, children, className, ...props }, ref) {
2263
+ const styles = CheckboxGroup$1();
2264
+ const [values, setValues] = useControllableState({
2265
+ value,
2266
+ defaultValue: defaultValue ?? [],
2267
+ onChange
2268
+ });
2269
+ const ctx = {
2270
+ values,
2271
+ toggle: (v) => setValues(values.includes(v) ? values.filter((x) => x !== v) : [...values, v]),
2272
+ size
2273
+ };
2274
+ return /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, {
2275
+ value: ctx,
2276
+ children: /* @__PURE__ */ jsx("div", {
2277
+ ref,
2278
+ role: "group",
2279
+ className: className ? `${styles.root} ${className}` : styles.root,
2280
+ ...props,
2281
+ children
2282
+ })
2283
+ });
2284
+ });
2285
+ const Checkbox = forwardRef(function Checkbox({ value, checked, defaultChecked, onChange, size, children, className, disabled, ...props }, ref) {
2286
+ const group = useContext(CheckboxGroupContext);
2287
+ const [ownChecked, setOwnChecked] = useControllableState({
2288
+ value: checked,
2289
+ defaultValue: defaultChecked ?? false,
2290
+ onChange
2291
+ });
2292
+ const inGroup = group !== null;
2293
+ const isChecked = inGroup ? group.values.includes(value ?? "") : ownChecked;
2294
+ const styles = Checkbox$1({ size: size ?? group?.size });
2295
+ return /* @__PURE__ */ jsxs("button", {
2296
+ ref,
2297
+ type: "button",
2298
+ role: "checkbox",
2299
+ "aria-checked": isChecked,
2300
+ "data-value": value,
2301
+ disabled,
2302
+ className: className ? `${styles.root} ${className}` : styles.root,
2303
+ onClick: () => {
2304
+ if (inGroup) {
2305
+ if (value != null) group.toggle(value);
2306
+ } else setOwnChecked(!ownChecked);
2307
+ },
2308
+ ...props,
2309
+ children: [/* @__PURE__ */ jsx("span", {
2310
+ className: styles.control,
2311
+ "data-state": isChecked ? "checked" : "unchecked",
2312
+ children: isChecked ? /* @__PURE__ */ jsx("svg", {
2313
+ width: "65%",
2314
+ height: "65%",
2315
+ viewBox: "0 0 24 24",
2316
+ fill: "none",
2317
+ stroke: "currentColor",
2318
+ strokeWidth: "3",
2319
+ strokeLinecap: "round",
2320
+ strokeLinejoin: "round",
2321
+ "aria-hidden": true,
2322
+ children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" })
2323
+ }) : null
2324
+ }), children]
2325
+ });
2326
+ });
2327
+ /**
2328
+ * Multi-select group. Compose with `Checkbox` (also exported standalone):
2329
+ *
2330
+ * <CheckboxGroup defaultValue={["a"]} onChange={setValues}>
2331
+ * <Checkbox value="a">Option A</Checkbox>
2332
+ * <Checkbox value="b">Option B</Checkbox>
2333
+ * </CheckboxGroup>
2334
+ */
2335
+ const CheckboxGroup = Object.assign(CheckboxGroupRoot, { Item: Checkbox });
2336
+ //#endregion
2337
+ //#region generated/tooltip.mjs
2338
+ const _isObj$12 = (v) => v != null && typeof v === "object";
2339
+ const _resolveStatic$12 = (v, fallback) => _isObj$12(v) ? v.initial ?? fallback : v ?? fallback;
2340
+ const _applyVariant$12 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2341
+ if (_isObj$12(raw)) {
2342
+ const initial = raw.initial ?? defaultVal;
2343
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2344
+ for (const key in raw) {
2345
+ if (key === "initial") continue;
2346
+ const val = raw[key];
2347
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2348
+ if (add) c += (c ? " " : "") + add;
2349
+ }
2350
+ } else {
2351
+ const val = raw;
2352
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2353
+ if (add) c += (c ? " " : "") + add;
2354
+ }
2355
+ return c;
2356
+ };
2357
+ const _h$12 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2358
+ const out = {};
2359
+ for (const s of slots) {
2360
+ let c = base[s] || "";
2361
+ for (const v in variants) {
2362
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2363
+ c = _applyVariant$12(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2364
+ }
2365
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2366
+ if (props && props[v] !== void 0) continue;
2367
+ const val = overrides[v];
2368
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2369
+ if (add) c += (c ? " " : "") + add;
2370
+ }
2371
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2372
+ if (props && props[v] !== void 0) continue;
2373
+ const val = overrides[v];
2374
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2375
+ if (add) c += (c ? " " : "") + add;
2376
+ }
2377
+ for (const [match, cls] of compounds) {
2378
+ let ok = true;
2379
+ for (const v in match) if (_resolveStatic$12((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2380
+ ok = false;
2381
+ break;
2382
+ }
2383
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2384
+ }
2385
+ out[s] = c;
2386
+ }
2387
+ return out;
2388
+ };
2389
+ const Tooltip_base = {
2390
+ "root": "xhnw18tc",
2391
+ "bubble": "zdzv6vix"
2392
+ };
2393
+ const Tooltip_variants = {};
2394
+ const Tooltip_compounds = [];
2395
+ const Tooltip_defaults = {};
2396
+ const Tooltip_responsive = [];
2397
+ const Tooltip_respClasses = {};
2398
+ const Tooltip_containers = [];
2399
+ const Tooltip_cqClasses = {};
2400
+ function Tooltip$1(props) {
2401
+ return _h$12(Tooltip_base, Tooltip_variants, Tooltip_compounds, Tooltip_defaults, Tooltip_responsive, Tooltip_respClasses, Tooltip_containers, Tooltip_cqClasses, ["root", "bubble"], props);
2402
+ }
2403
+ //#endregion
2404
+ //#region src/Tooltip.tsx
2405
+ function Tooltip({ label, children, className }) {
2406
+ const styles = Tooltip$1();
2407
+ const [open, setOpen] = useState(false);
2408
+ const id = useId$1();
2409
+ const trigger = isValidElement(children) ? cloneElement(children, { "aria-describedby": open ? id : void 0 }) : children;
2410
+ return /* @__PURE__ */ jsxs("span", {
2411
+ className: className ? `${styles.root} ${className}` : styles.root,
2412
+ onMouseEnter: () => setOpen(true),
2413
+ onMouseLeave: () => setOpen(false),
2414
+ onFocus: () => setOpen(true),
2415
+ onBlur: () => setOpen(false),
2416
+ children: [trigger, open ? /* @__PURE__ */ jsx("span", {
2417
+ role: "tooltip",
2418
+ id,
2419
+ className: styles.bubble,
2420
+ children: label
2421
+ }) : null]
2422
+ });
2423
+ }
2424
+ //#endregion
2425
+ //#region generated/alert.mjs
2426
+ const _isObj$11 = (v) => v != null && typeof v === "object";
2427
+ const _resolveStatic$11 = (v, fallback) => _isObj$11(v) ? v.initial ?? fallback : v ?? fallback;
2428
+ const _applyVariant$11 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2429
+ if (_isObj$11(raw)) {
2430
+ const initial = raw.initial ?? defaultVal;
2431
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2432
+ for (const key in raw) {
2433
+ if (key === "initial") continue;
2434
+ const val = raw[key];
2435
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2436
+ if (add) c += (c ? " " : "") + add;
2437
+ }
2438
+ } else {
2439
+ const val = raw;
2440
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2441
+ if (add) c += (c ? " " : "") + add;
2442
+ }
2443
+ return c;
2444
+ };
2445
+ const _h$11 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2446
+ const out = {};
2447
+ for (const s of slots) {
2448
+ let c = base[s] || "";
2449
+ for (const v in variants) {
2450
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2451
+ c = _applyVariant$11(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2452
+ }
2453
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2454
+ if (props && props[v] !== void 0) continue;
2455
+ const val = overrides[v];
2456
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2457
+ if (add) c += (c ? " " : "") + add;
2458
+ }
2459
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2460
+ if (props && props[v] !== void 0) continue;
2461
+ const val = overrides[v];
2462
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2463
+ if (add) c += (c ? " " : "") + add;
2464
+ }
2465
+ for (const [match, cls] of compounds) {
2466
+ let ok = true;
2467
+ for (const v in match) if (_resolveStatic$11((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2468
+ ok = false;
2469
+ break;
2470
+ }
2471
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2472
+ }
2473
+ out[s] = c;
2474
+ }
2475
+ return out;
2476
+ };
2477
+ const Alert_base = {
2478
+ "root": "htpm4ahp",
2479
+ "icon": "spvuvqtj",
2480
+ "content": "u94v63tk",
2481
+ "title": "nofqqk7w",
2482
+ "body": "lntvd50j"
2483
+ };
2484
+ const Alert_variants = { "tone": {
2485
+ "info": { "root": "jqxpbwvr" },
2486
+ "success": { "root": "itrxr3xc" },
2487
+ "warning": { "root": "dsagqfqu" },
2488
+ "danger": { "root": "ugwth56n" }
2489
+ } };
2490
+ const Alert_compounds = [];
2491
+ const Alert_defaults = { "tone": "info" };
2492
+ const Alert_responsive = [];
2493
+ const Alert_respClasses = {};
2494
+ const Alert_containers = [];
2495
+ const Alert_cqClasses = {};
2496
+ function Alert$1(props) {
2497
+ return _h$11(Alert_base, Alert_variants, Alert_compounds, Alert_defaults, Alert_responsive, Alert_respClasses, Alert_containers, Alert_cqClasses, [
2498
+ "root",
2499
+ "icon",
2500
+ "content",
2501
+ "title",
2502
+ "body"
2503
+ ], props);
2504
+ }
2505
+ //#endregion
2506
+ //#region src/Alert.tsx
2507
+ const DEFAULT_ICONS = {
2508
+ info: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
2509
+ cx: "12",
2510
+ cy: "12",
2511
+ r: "10"
2512
+ }), /* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })] }),
2513
+ success: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
2514
+ cx: "12",
2515
+ cy: "12",
2516
+ r: "10"
2517
+ }), /* @__PURE__ */ jsx("polyline", { points: "8 12 11 15 16 9" })] }),
2518
+ warning: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z" }), /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01" })] }),
2519
+ danger: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
2520
+ cx: "12",
2521
+ cy: "12",
2522
+ r: "10"
2523
+ }), /* @__PURE__ */ jsx("path", { d: "M15 9l-6 6M9 9l6 6" })] })
2524
+ };
2525
+ const Alert = forwardRef(function Alert({ tone = "info", title, icon, children, className, ...props }, ref) {
2526
+ const styles = Alert$1({ tone });
2527
+ return /* @__PURE__ */ jsxs("div", {
2528
+ ref,
2529
+ role: "alert",
2530
+ className: className ? `${styles.root} ${className}` : styles.root,
2531
+ ...props,
2532
+ children: [/* @__PURE__ */ jsx("span", {
2533
+ className: styles.icon,
2534
+ children: icon ?? /* @__PURE__ */ jsx("svg", {
2535
+ width: "18",
2536
+ height: "18",
2537
+ viewBox: "0 0 24 24",
2538
+ fill: "none",
2539
+ stroke: "currentColor",
2540
+ strokeWidth: "2",
2541
+ strokeLinecap: "round",
2542
+ strokeLinejoin: "round",
2543
+ "aria-hidden": true,
2544
+ children: DEFAULT_ICONS[tone]
2545
+ })
2546
+ }), /* @__PURE__ */ jsxs("div", {
2547
+ className: styles.content,
2548
+ children: [title ? /* @__PURE__ */ jsx("p", {
2549
+ className: styles.title,
2550
+ children: title
2551
+ }) : null, children ? /* @__PURE__ */ jsx("div", {
2552
+ className: styles.body,
2553
+ children
2554
+ }) : null]
2555
+ })]
2556
+ });
2557
+ });
2558
+ //#endregion
2559
+ //#region generated/radio.mjs
2560
+ const _isObj$10 = (v) => v != null && typeof v === "object";
2561
+ const _resolveStatic$10 = (v, fallback) => _isObj$10(v) ? v.initial ?? fallback : v ?? fallback;
2562
+ const _applyVariant$10 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2563
+ if (_isObj$10(raw)) {
2564
+ const initial = raw.initial ?? defaultVal;
2565
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2566
+ for (const key in raw) {
2567
+ if (key === "initial") continue;
2568
+ const val = raw[key];
2569
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2570
+ if (add) c += (c ? " " : "") + add;
2571
+ }
2572
+ } else {
2573
+ const val = raw;
2574
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2575
+ if (add) c += (c ? " " : "") + add;
2576
+ }
2577
+ return c;
2578
+ };
2579
+ const _h$10 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2580
+ const out = {};
2581
+ for (const s of slots) {
2582
+ let c = base[s] || "";
2583
+ for (const v in variants) {
2584
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2585
+ c = _applyVariant$10(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2586
+ }
2587
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2588
+ if (props && props[v] !== void 0) continue;
2589
+ const val = overrides[v];
2590
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2591
+ if (add) c += (c ? " " : "") + add;
2592
+ }
2593
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2594
+ if (props && props[v] !== void 0) continue;
2595
+ const val = overrides[v];
2596
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2597
+ if (add) c += (c ? " " : "") + add;
2598
+ }
2599
+ for (const [match, cls] of compounds) {
2600
+ let ok = true;
2601
+ for (const v in match) if (_resolveStatic$10((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2602
+ ok = false;
2603
+ break;
2604
+ }
2605
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2606
+ }
2607
+ out[s] = c;
2608
+ }
2609
+ return out;
2610
+ };
2611
+ const Radio_base = {
2612
+ "root": "hdgr5sa5",
2613
+ "control": "qha4wyk8",
2614
+ "dot": "i2ou6y6p"
2615
+ };
2616
+ const Radio_variants = { "size": {
2617
+ "sm": { "root": "wnytspqc" },
2618
+ "md": { "root": "l0owhk94" },
2619
+ "lg": { "root": "vhbs7ap7" }
2620
+ } };
2621
+ const Radio_compounds = [];
2622
+ const Radio_defaults = { "size": "md" };
2623
+ const Radio_responsive = [];
2624
+ const Radio_respClasses = {};
2625
+ const Radio_containers = [];
2626
+ const Radio_cqClasses = {};
2627
+ function Radio$1(props) {
2628
+ return _h$10(Radio_base, Radio_variants, Radio_compounds, Radio_defaults, Radio_responsive, Radio_respClasses, Radio_containers, Radio_cqClasses, [
2629
+ "root",
2630
+ "control",
2631
+ "dot"
2632
+ ], props);
2633
+ }
2634
+ //#endregion
2635
+ //#region generated/radiogroup.mjs
2636
+ const _isObj$9 = (v) => v != null && typeof v === "object";
2637
+ const _resolveStatic$9 = (v, fallback) => _isObj$9(v) ? v.initial ?? fallback : v ?? fallback;
2638
+ const _applyVariant$9 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2639
+ if (_isObj$9(raw)) {
2640
+ const initial = raw.initial ?? defaultVal;
2641
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2642
+ for (const key in raw) {
2643
+ if (key === "initial") continue;
2644
+ const val = raw[key];
2645
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2646
+ if (add) c += (c ? " " : "") + add;
2647
+ }
2648
+ } else {
2649
+ const val = raw;
2650
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2651
+ if (add) c += (c ? " " : "") + add;
2652
+ }
2653
+ return c;
2654
+ };
2655
+ const _h$9 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2656
+ const out = {};
2657
+ for (const s of slots) {
2658
+ let c = base[s] || "";
2659
+ for (const v in variants) {
2660
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2661
+ c = _applyVariant$9(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2662
+ }
2663
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2664
+ if (props && props[v] !== void 0) continue;
2665
+ const val = overrides[v];
2666
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2667
+ if (add) c += (c ? " " : "") + add;
2668
+ }
2669
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2670
+ if (props && props[v] !== void 0) continue;
2671
+ const val = overrides[v];
2672
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2673
+ if (add) c += (c ? " " : "") + add;
2674
+ }
2675
+ for (const [match, cls] of compounds) {
2676
+ let ok = true;
2677
+ for (const v in match) if (_resolveStatic$9((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2678
+ ok = false;
2679
+ break;
2680
+ }
2681
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2682
+ }
2683
+ out[s] = c;
2684
+ }
2685
+ return out;
2686
+ };
2687
+ const RadioGroup_base = { "root": "hemlm0d9" };
2688
+ const RadioGroup_variants = {};
2689
+ const RadioGroup_compounds = [];
2690
+ const RadioGroup_defaults = {};
2691
+ const RadioGroup_responsive = [];
2692
+ const RadioGroup_respClasses = {};
2693
+ const RadioGroup_containers = [];
2694
+ const RadioGroup_cqClasses = {};
2695
+ function RadioGroup$1(props) {
2696
+ return _h$9(RadioGroup_base, RadioGroup_variants, RadioGroup_compounds, RadioGroup_defaults, RadioGroup_responsive, RadioGroup_respClasses, RadioGroup_containers, RadioGroup_cqClasses, ["root"], props);
2697
+ }
2698
+ //#endregion
2699
+ //#region src/RadioGroup.tsx
2700
+ const RadioGroupContext = createContext(null);
2701
+ const RadioGroupRoot = forwardRef(function RadioGroup({ value, defaultValue, onChange, size, children, className, ...props }, ref) {
2702
+ const styles = RadioGroup$1();
2703
+ const [val, setVal] = useControllableState({
2704
+ value,
2705
+ defaultValue: defaultValue ?? "",
2706
+ onChange
2707
+ });
2708
+ function onKeyDown(event) {
2709
+ if (![
2710
+ "ArrowDown",
2711
+ "ArrowRight",
2712
+ "ArrowUp",
2713
+ "ArrowLeft"
2714
+ ].includes(event.key)) return;
2715
+ const radios = Array.from(event.currentTarget.querySelectorAll("[role=\"radio\"]:not([disabled])"));
2716
+ const index = radios.findIndex((radio) => radio === document.activeElement);
2717
+ if (index === -1) return;
2718
+ event.preventDefault();
2719
+ const next = radios[(index + (event.key === "ArrowDown" || event.key === "ArrowRight" ? 1 : -1) + radios.length) % radios.length];
2720
+ if (!next) return;
2721
+ next.focus();
2722
+ const nextValue = next.getAttribute("data-value");
2723
+ if (nextValue != null) setVal(nextValue);
2724
+ }
2725
+ function onFocus(event) {
2726
+ if (event.target !== event.currentTarget) return;
2727
+ event.currentTarget.querySelector("[role=\"radio\"]:not([disabled])")?.focus();
2728
+ }
2729
+ return /* @__PURE__ */ jsx(RadioGroupContext.Provider, {
2730
+ value: {
2731
+ value: val,
2732
+ setValue: setVal,
2733
+ size
2734
+ },
2735
+ children: /* @__PURE__ */ jsx("div", {
2736
+ ref,
2737
+ role: "radiogroup",
2738
+ tabIndex: val ? -1 : 0,
2739
+ className: className ? `${styles.root} ${className}` : styles.root,
2740
+ onKeyDown,
2741
+ onFocus,
2742
+ ...props,
2743
+ children
2744
+ })
2745
+ });
2746
+ });
2747
+ const Radio = forwardRef(function Radio({ value, checked, defaultChecked, onChange, size, children, className, disabled, ...props }, ref) {
2748
+ const group = useContext(RadioGroupContext);
2749
+ const [ownChecked, setOwnChecked] = useControllableState({
2750
+ value: checked,
2751
+ defaultValue: defaultChecked ?? false,
2752
+ onChange
2753
+ });
2754
+ const inGroup = group !== null;
2755
+ const isChecked = inGroup ? group.value === value : ownChecked;
2756
+ const styles = Radio$1({ size: size ?? group?.size });
2757
+ const state = isChecked ? "checked" : "unchecked";
2758
+ return /* @__PURE__ */ jsxs("button", {
2759
+ ref,
2760
+ type: "button",
2761
+ role: "radio",
2762
+ "aria-checked": isChecked,
2763
+ "data-value": value,
2764
+ tabIndex: inGroup ? isChecked ? 0 : -1 : 0,
2765
+ disabled,
2766
+ className: className ? `${styles.root} ${className}` : styles.root,
2767
+ onClick: () => {
2768
+ if (inGroup) {
2769
+ if (value != null) group.setValue(value);
2770
+ } else setOwnChecked(true);
2771
+ },
2772
+ ...props,
2773
+ children: [/* @__PURE__ */ jsx("span", {
2774
+ className: styles.control,
2775
+ "data-state": state,
2776
+ children: /* @__PURE__ */ jsx("span", {
2777
+ className: styles.dot,
2778
+ "data-state": state
2779
+ })
2780
+ }), children]
2781
+ });
2782
+ });
2783
+ /**
2784
+ * Single-select group. Compose with `Radio` (also exported standalone):
2785
+ *
2786
+ * <RadioGroup defaultValue="a" onChange={setV}>
2787
+ * <Radio value="a">Option A</Radio>
2788
+ * <Radio value="b">Option B</Radio>
2789
+ * </RadioGroup>
2790
+ */
2791
+ const RadioGroup = Object.assign(RadioGroupRoot, { Item: Radio });
2792
+ //#endregion
2793
+ //#region generated/slider.mjs
2794
+ const _isObj$8 = (v) => v != null && typeof v === "object";
2795
+ const _resolveStatic$8 = (v, fallback) => _isObj$8(v) ? v.initial ?? fallback : v ?? fallback;
2796
+ const _applyVariant$8 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2797
+ if (_isObj$8(raw)) {
2798
+ const initial = raw.initial ?? defaultVal;
2799
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2800
+ for (const key in raw) {
2801
+ if (key === "initial") continue;
2802
+ const val = raw[key];
2803
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2804
+ if (add) c += (c ? " " : "") + add;
2805
+ }
2806
+ } else {
2807
+ const val = raw;
2808
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2809
+ if (add) c += (c ? " " : "") + add;
2810
+ }
2811
+ return c;
2812
+ };
2813
+ const _h$8 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2814
+ const out = {};
2815
+ for (const s of slots) {
2816
+ let c = base[s] || "";
2817
+ for (const v in variants) {
2818
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2819
+ c = _applyVariant$8(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2820
+ }
2821
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2822
+ if (props && props[v] !== void 0) continue;
2823
+ const val = overrides[v];
2824
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2825
+ if (add) c += (c ? " " : "") + add;
2826
+ }
2827
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2828
+ if (props && props[v] !== void 0) continue;
2829
+ const val = overrides[v];
2830
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2831
+ if (add) c += (c ? " " : "") + add;
2832
+ }
2833
+ for (const [match, cls] of compounds) {
2834
+ let ok = true;
2835
+ for (const v in match) if (_resolveStatic$8((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2836
+ ok = false;
2837
+ break;
2838
+ }
2839
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2840
+ }
2841
+ out[s] = c;
2842
+ }
2843
+ return out;
2844
+ };
2845
+ const Slider_base = {
2846
+ "root": "rkd35818",
2847
+ "track": "aw2jpwgu",
2848
+ "range": "sq62ubq7",
2849
+ "thumb": "z7vkltsv"
2850
+ };
2851
+ const Slider_variants = {};
2852
+ const Slider_compounds = [];
2853
+ const Slider_defaults = {};
2854
+ const Slider_responsive = [];
2855
+ const Slider_respClasses = {};
2856
+ const Slider_containers = [];
2857
+ const Slider_cqClasses = {};
2858
+ function Slider$1(props) {
2859
+ return _h$8(Slider_base, Slider_variants, Slider_compounds, Slider_defaults, Slider_responsive, Slider_respClasses, Slider_containers, Slider_cqClasses, [
2860
+ "root",
2861
+ "track",
2862
+ "range",
2863
+ "thumb"
2864
+ ], props);
2865
+ }
2866
+ //#endregion
2867
+ //#region src/Slider.tsx
2868
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
2869
+ const Slider = forwardRef(function Slider({ value, defaultValue, onChange, min = 0, max = 100, step = 1, disabled, className, ...props }, ref) {
2870
+ const styles = Slider$1();
2871
+ const trackRef = useRef(null);
2872
+ const composedRef = useComposedRefs(trackRef, ref);
2873
+ const [val, setVal] = useControllableState({
2874
+ value,
2875
+ defaultValue: defaultValue ?? min,
2876
+ onChange
2877
+ });
2878
+ const current = clamp(val, min, max);
2879
+ const pct = (current - min) / (max - min) * 100;
2880
+ function setFromClientX(clientX) {
2881
+ const el = trackRef.current;
2882
+ if (!el) return;
2883
+ const rect = el.getBoundingClientRect();
2884
+ const raw = min + clamp((clientX - rect.left) / rect.width, 0, 1) * (max - min);
2885
+ setVal(clamp(min + Math.round((raw - min) / step) * step, min, max));
2886
+ }
2887
+ function onPointerDown(event) {
2888
+ if (disabled) return;
2889
+ event.currentTarget.setPointerCapture(event.pointerId);
2890
+ setFromClientX(event.clientX);
2891
+ }
2892
+ function onPointerMove(event) {
2893
+ if (disabled || !event.currentTarget.hasPointerCapture(event.pointerId)) return;
2894
+ setFromClientX(event.clientX);
2895
+ }
2896
+ function onKeyDown(event) {
2897
+ if (disabled) return;
2898
+ let next = current;
2899
+ if (event.key === "ArrowRight" || event.key === "ArrowUp") next = current + step;
2900
+ else if (event.key === "ArrowLeft" || event.key === "ArrowDown") next = current - step;
2901
+ else if (event.key === "Home") next = min;
2902
+ else if (event.key === "End") next = max;
2903
+ else return;
2904
+ event.preventDefault();
2905
+ setVal(clamp(next, min, max));
2906
+ }
2907
+ return /* @__PURE__ */ jsxs("div", {
2908
+ ref: composedRef,
2909
+ className: className ? `${styles.root} ${className}` : styles.root,
2910
+ "data-disabled": disabled || void 0,
2911
+ onPointerDown,
2912
+ onPointerMove,
2913
+ ...props,
2914
+ children: [
2915
+ /* @__PURE__ */ jsx("span", { className: styles.track }),
2916
+ /* @__PURE__ */ jsx("span", {
2917
+ className: styles.range,
2918
+ style: { width: `${pct}%` }
2919
+ }),
2920
+ /* @__PURE__ */ jsx("span", {
2921
+ className: styles.thumb,
2922
+ role: "slider",
2923
+ tabIndex: disabled ? -1 : 0,
2924
+ "aria-valuemin": min,
2925
+ "aria-valuemax": max,
2926
+ "aria-valuenow": current,
2927
+ "aria-disabled": disabled || void 0,
2928
+ style: { left: `${pct}%` },
2929
+ onKeyDown
2930
+ })
2931
+ ]
2932
+ });
2933
+ });
2934
+ //#endregion
2935
+ //#region generated/breadcrumb.mjs
2936
+ const _isObj$7 = (v) => v != null && typeof v === "object";
2937
+ const _resolveStatic$7 = (v, fallback) => _isObj$7(v) ? v.initial ?? fallback : v ?? fallback;
2938
+ const _applyVariant$7 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
2939
+ if (_isObj$7(raw)) {
2940
+ const initial = raw.initial ?? defaultVal;
2941
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
2942
+ for (const key in raw) {
2943
+ if (key === "initial") continue;
2944
+ const val = raw[key];
2945
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
2946
+ if (add) c += (c ? " " : "") + add;
2947
+ }
2948
+ } else {
2949
+ const val = raw;
2950
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
2951
+ if (add) c += (c ? " " : "") + add;
2952
+ }
2953
+ return c;
2954
+ };
2955
+ const _h$7 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
2956
+ const out = {};
2957
+ for (const s of slots) {
2958
+ let c = base[s] || "";
2959
+ for (const v in variants) {
2960
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
2961
+ c = _applyVariant$7(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
2962
+ }
2963
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
2964
+ if (props && props[v] !== void 0) continue;
2965
+ const val = overrides[v];
2966
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
2967
+ if (add) c += (c ? " " : "") + add;
2968
+ }
2969
+ for (const [cq, overrides] of containers) for (const v in overrides) {
2970
+ if (props && props[v] !== void 0) continue;
2971
+ const val = overrides[v];
2972
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
2973
+ if (add) c += (c ? " " : "") + add;
2974
+ }
2975
+ for (const [match, cls] of compounds) {
2976
+ let ok = true;
2977
+ for (const v in match) if (_resolveStatic$7((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
2978
+ ok = false;
2979
+ break;
2980
+ }
2981
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
2982
+ }
2983
+ out[s] = c;
2984
+ }
2985
+ return out;
2986
+ };
2987
+ const Breadcrumb_base = {
2988
+ "root": "f4byio2q",
2989
+ "list": "zw5u8ysk",
2990
+ "item": "w062ieic",
2991
+ "link": "t3l864mj",
2992
+ "current": "sg5aifky",
2993
+ "separator": "aipq13uz"
2994
+ };
2995
+ const Breadcrumb_variants = {};
2996
+ const Breadcrumb_compounds = [];
2997
+ const Breadcrumb_defaults = {};
2998
+ const Breadcrumb_responsive = [];
2999
+ const Breadcrumb_respClasses = {};
3000
+ const Breadcrumb_containers = [];
3001
+ const Breadcrumb_cqClasses = {};
3002
+ function Breadcrumb$1(props) {
3003
+ return _h$7(Breadcrumb_base, Breadcrumb_variants, Breadcrumb_compounds, Breadcrumb_defaults, Breadcrumb_responsive, Breadcrumb_respClasses, Breadcrumb_containers, Breadcrumb_cqClasses, [
3004
+ "root",
3005
+ "list",
3006
+ "item",
3007
+ "link",
3008
+ "current",
3009
+ "separator"
3010
+ ], props);
3011
+ }
3012
+ //#endregion
3013
+ //#region src/Breadcrumb.tsx
3014
+ const BreadcrumbRoot = forwardRef(function Breadcrumb({ separator = "/", children, className, "aria-label": ariaLabel, ...props }, ref) {
3015
+ const styles = Breadcrumb$1();
3016
+ const items = Children.toArray(children).filter(isValidElement);
3017
+ return /* @__PURE__ */ jsx("nav", {
3018
+ ref,
3019
+ "aria-label": ariaLabel ?? "Breadcrumb",
3020
+ className: className ? `${styles.root} ${className}` : styles.root,
3021
+ ...props,
3022
+ children: /* @__PURE__ */ jsx("ol", {
3023
+ className: styles.list,
3024
+ children: items.map((item, index) => /* @__PURE__ */ jsxs("li", {
3025
+ className: styles.item,
3026
+ children: [item, index < items.length - 1 ? /* @__PURE__ */ jsx("span", {
3027
+ className: styles.separator,
3028
+ "aria-hidden": true,
3029
+ children: separator
3030
+ }) : null]
3031
+ }, index))
3032
+ })
3033
+ });
3034
+ });
3035
+ const BreadcrumbItem = forwardRef(function BreadcrumbItem({ current, href, children, className, ...props }, ref) {
3036
+ const styles = Breadcrumb$1();
3037
+ if (current || !href) return /* @__PURE__ */ jsx("span", {
3038
+ className: className ? `${styles.current} ${className}` : styles.current,
3039
+ "aria-current": "page",
3040
+ children
3041
+ });
3042
+ return /* @__PURE__ */ jsx("a", {
3043
+ ref,
3044
+ href,
3045
+ className: className ? `${styles.link} ${className}` : styles.link,
3046
+ ...props,
3047
+ children
3048
+ });
3049
+ });
3050
+ /**
3051
+ * Breadcrumb trail:
3052
+ *
3053
+ * <Breadcrumb>
3054
+ * <Breadcrumb.Item href="/">Home</Breadcrumb.Item>
3055
+ * <Breadcrumb.Item href="/docs">Docs</Breadcrumb.Item>
3056
+ * <Breadcrumb.Item current>Breadcrumb</Breadcrumb.Item>
3057
+ * </Breadcrumb>
3058
+ */
3059
+ const Breadcrumb = Object.assign(BreadcrumbRoot, { Item: BreadcrumbItem });
3060
+ //#endregion
3061
+ //#region generated/skeleton.mjs
3062
+ const _isObj$6 = (v) => v != null && typeof v === "object";
3063
+ const _resolveStatic$6 = (v, fallback) => _isObj$6(v) ? v.initial ?? fallback : v ?? fallback;
3064
+ const _applyVariant$6 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
3065
+ if (_isObj$6(raw)) {
3066
+ const initial = raw.initial ?? defaultVal;
3067
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
3068
+ for (const key in raw) {
3069
+ if (key === "initial") continue;
3070
+ const val = raw[key];
3071
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
3072
+ if (add) c += (c ? " " : "") + add;
3073
+ }
3074
+ } else {
3075
+ const val = raw;
3076
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
3077
+ if (add) c += (c ? " " : "") + add;
3078
+ }
3079
+ return c;
3080
+ };
3081
+ const _h$6 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
3082
+ const out = {};
3083
+ for (const s of slots) {
3084
+ let c = base[s] || "";
3085
+ for (const v in variants) {
3086
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
3087
+ c = _applyVariant$6(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
3088
+ }
3089
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
3090
+ if (props && props[v] !== void 0) continue;
3091
+ const val = overrides[v];
3092
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
3093
+ if (add) c += (c ? " " : "") + add;
3094
+ }
3095
+ for (const [cq, overrides] of containers) for (const v in overrides) {
3096
+ if (props && props[v] !== void 0) continue;
3097
+ const val = overrides[v];
3098
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
3099
+ if (add) c += (c ? " " : "") + add;
3100
+ }
3101
+ for (const [match, cls] of compounds) {
3102
+ let ok = true;
3103
+ for (const v in match) if (_resolveStatic$6((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
3104
+ ok = false;
3105
+ break;
3106
+ }
3107
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
3108
+ }
3109
+ out[s] = c;
3110
+ }
3111
+ return out;
3112
+ };
3113
+ const Skeleton_base = { "root": "xx5rz59i" };
3114
+ const Skeleton_variants = { "animated": { "yes": { "root": "f2bf0xw1" } } };
3115
+ const Skeleton_compounds = [];
3116
+ const Skeleton_defaults = { "animated": "yes" };
3117
+ const Skeleton_responsive = [];
3118
+ const Skeleton_respClasses = {};
3119
+ const Skeleton_containers = [];
3120
+ const Skeleton_cqClasses = {};
3121
+ function Skeleton$1(props) {
3122
+ return _h$6(Skeleton_base, Skeleton_variants, Skeleton_compounds, Skeleton_defaults, Skeleton_responsive, Skeleton_respClasses, Skeleton_containers, Skeleton_cqClasses, ["root"], props);
3123
+ }
3124
+ //#endregion
3125
+ //#region src/Skeleton.tsx
3126
+ const Skeleton = forwardRef(function Skeleton({ animated = true, width, height, radius, className, style, ...props }, ref) {
3127
+ const styles = Skeleton$1({ animated: animated ? "yes" : "no" });
3128
+ return /* @__PURE__ */ jsx("div", {
3129
+ ref,
3130
+ "aria-hidden": true,
3131
+ className: className ? `${styles.root} ${className}` : styles.root,
3132
+ style: {
3133
+ width,
3134
+ height,
3135
+ borderRadius: radius,
3136
+ ...style
3137
+ },
3138
+ ...props
3139
+ });
3140
+ });
3141
+ //#endregion
3142
+ //#region generated/progress.mjs
3143
+ const _isObj$5 = (v) => v != null && typeof v === "object";
3144
+ const _resolveStatic$5 = (v, fallback) => _isObj$5(v) ? v.initial ?? fallback : v ?? fallback;
3145
+ const _applyVariant$5 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
3146
+ if (_isObj$5(raw)) {
3147
+ const initial = raw.initial ?? defaultVal;
3148
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
3149
+ for (const key in raw) {
3150
+ if (key === "initial") continue;
3151
+ const val = raw[key];
3152
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
3153
+ if (add) c += (c ? " " : "") + add;
3154
+ }
3155
+ } else {
3156
+ const val = raw;
3157
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
3158
+ if (add) c += (c ? " " : "") + add;
3159
+ }
3160
+ return c;
3161
+ };
3162
+ const _h$5 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
3163
+ const out = {};
3164
+ for (const s of slots) {
3165
+ let c = base[s] || "";
3166
+ for (const v in variants) {
3167
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
3168
+ c = _applyVariant$5(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
3169
+ }
3170
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
3171
+ if (props && props[v] !== void 0) continue;
3172
+ const val = overrides[v];
3173
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
3174
+ if (add) c += (c ? " " : "") + add;
3175
+ }
3176
+ for (const [cq, overrides] of containers) for (const v in overrides) {
3177
+ if (props && props[v] !== void 0) continue;
3178
+ const val = overrides[v];
3179
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
3180
+ if (add) c += (c ? " " : "") + add;
3181
+ }
3182
+ for (const [match, cls] of compounds) {
3183
+ let ok = true;
3184
+ for (const v in match) if (_resolveStatic$5((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
3185
+ ok = false;
3186
+ break;
3187
+ }
3188
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
3189
+ }
3190
+ out[s] = c;
3191
+ }
3192
+ return out;
3193
+ };
3194
+ const Progress_base = {
3195
+ "root": "ny4jwkim",
3196
+ "bar": "mtrt0137"
3197
+ };
3198
+ const Progress_variants = {
3199
+ "tone": {
3200
+ "primary": { "root": "zchbxkzj" },
3201
+ "success": { "root": "eft9vsnt" },
3202
+ "warning": { "root": "b1mmrkaq" },
3203
+ "danger": { "root": "uomaptqh" }
3204
+ },
3205
+ "size": {
3206
+ "sm": { "root": "wv36bxhj" },
3207
+ "md": { "root": "tc7mew7z" },
3208
+ "lg": { "root": "nxzu1ou7" }
3209
+ }
3210
+ };
3211
+ const Progress_compounds = [];
3212
+ const Progress_defaults = {
3213
+ "tone": "primary",
3214
+ "size": "md"
3215
+ };
3216
+ const Progress_responsive = [];
3217
+ const Progress_respClasses = {};
3218
+ const Progress_containers = [];
3219
+ const Progress_cqClasses = {};
3220
+ function Progress$1(props) {
3221
+ return _h$5(Progress_base, Progress_variants, Progress_compounds, Progress_defaults, Progress_responsive, Progress_respClasses, Progress_containers, Progress_cqClasses, ["root", "bar"], props);
3222
+ }
3223
+ //#endregion
3224
+ //#region src/Progress.tsx
3225
+ const Progress = forwardRef(function Progress({ value, max = 100, tone, size, className, ...props }, ref) {
3226
+ const styles = Progress$1({
3227
+ tone,
3228
+ size
3229
+ });
3230
+ const pct = Math.min(Math.max(value / max * 100, 0), 100);
3231
+ return /* @__PURE__ */ jsx("div", {
3232
+ ref,
3233
+ role: "progressbar",
3234
+ "aria-valuenow": value,
3235
+ "aria-valuemin": 0,
3236
+ "aria-valuemax": max,
3237
+ className: className ? `${styles.root} ${className}` : styles.root,
3238
+ ...props,
3239
+ children: /* @__PURE__ */ jsx("div", {
3240
+ className: styles.bar,
3241
+ style: { width: `${pct}%` }
3242
+ })
3243
+ });
3244
+ });
3245
+ //#endregion
3246
+ //#region generated/progress-circle.mjs
3247
+ const _isObj$4 = (v) => v != null && typeof v === "object";
3248
+ const _resolveStatic$4 = (v, fallback) => _isObj$4(v) ? v.initial ?? fallback : v ?? fallback;
3249
+ const _applyVariant$4 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
3250
+ if (_isObj$4(raw)) {
3251
+ const initial = raw.initial ?? defaultVal;
3252
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
3253
+ for (const key in raw) {
3254
+ if (key === "initial") continue;
3255
+ const val = raw[key];
3256
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
3257
+ if (add) c += (c ? " " : "") + add;
3258
+ }
3259
+ } else {
3260
+ const val = raw;
3261
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
3262
+ if (add) c += (c ? " " : "") + add;
3263
+ }
3264
+ return c;
3265
+ };
3266
+ const _h$4 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
3267
+ const out = {};
3268
+ for (const s of slots) {
3269
+ let c = base[s] || "";
3270
+ for (const v in variants) {
3271
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
3272
+ c = _applyVariant$4(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
3273
+ }
3274
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
3275
+ if (props && props[v] !== void 0) continue;
3276
+ const val = overrides[v];
3277
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
3278
+ if (add) c += (c ? " " : "") + add;
3279
+ }
3280
+ for (const [cq, overrides] of containers) for (const v in overrides) {
3281
+ if (props && props[v] !== void 0) continue;
3282
+ const val = overrides[v];
3283
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
3284
+ if (add) c += (c ? " " : "") + add;
3285
+ }
3286
+ for (const [match, cls] of compounds) {
3287
+ let ok = true;
3288
+ for (const v in match) if (_resolveStatic$4((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
3289
+ ok = false;
3290
+ break;
3291
+ }
3292
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
3293
+ }
3294
+ out[s] = c;
3295
+ }
3296
+ return out;
3297
+ };
3298
+ const ProgressCircle_base = {
3299
+ "root": "yglog7a0",
3300
+ "track": "tajidsr1",
3301
+ "indicator": "tf4wsm99"
3302
+ };
3303
+ const ProgressCircle_variants = { "tone": {
3304
+ "primary": { "root": "cgk00oib" },
3305
+ "success": { "root": "hhlub968" },
3306
+ "warning": { "root": "m60dxjou" },
3307
+ "danger": { "root": "tp2eulgb" }
3308
+ } };
3309
+ const ProgressCircle_compounds = [];
3310
+ const ProgressCircle_defaults = { "tone": "primary" };
3311
+ const ProgressCircle_responsive = [];
3312
+ const ProgressCircle_respClasses = {};
3313
+ const ProgressCircle_containers = [];
3314
+ const ProgressCircle_cqClasses = {};
3315
+ function ProgressCircle$1(props) {
3316
+ return _h$4(ProgressCircle_base, ProgressCircle_variants, ProgressCircle_compounds, ProgressCircle_defaults, ProgressCircle_responsive, ProgressCircle_respClasses, ProgressCircle_containers, ProgressCircle_cqClasses, [
3317
+ "root",
3318
+ "track",
3319
+ "indicator"
3320
+ ], props);
3321
+ }
3322
+ //#endregion
3323
+ //#region src/ProgressCircle.tsx
3324
+ const DIMENSIONS = {
3325
+ sm: {
3326
+ diameter: 32,
3327
+ stroke: 4
3328
+ },
3329
+ md: {
3330
+ diameter: 48,
3331
+ stroke: 5
3332
+ },
3333
+ lg: {
3334
+ diameter: 64,
3335
+ stroke: 6
3336
+ }
3337
+ };
3338
+ const ProgressCircle = forwardRef(function ProgressCircle({ value, max = 100, size = "md", strokeWidth, tone, className, ...props }, ref) {
3339
+ const styles = ProgressCircle$1({ tone });
3340
+ const { diameter, stroke } = DIMENSIONS[size];
3341
+ const ringStroke = strokeWidth ?? stroke;
3342
+ const pct = Math.min(Math.max(value / max, 0), 1);
3343
+ const radius = (diameter - ringStroke) / 2;
3344
+ const circumference = 2 * Math.PI * radius;
3345
+ const offset = circumference * (1 - pct);
3346
+ const center = diameter / 2;
3347
+ return /* @__PURE__ */ jsx("div", {
3348
+ ref,
3349
+ role: "progressbar",
3350
+ "aria-valuenow": value,
3351
+ "aria-valuemin": 0,
3352
+ "aria-valuemax": max,
3353
+ className: className ? `${styles.root} ${className}` : styles.root,
3354
+ style: {
3355
+ width: diameter,
3356
+ height: diameter
3357
+ },
3358
+ ...props,
3359
+ children: /* @__PURE__ */ jsxs("svg", {
3360
+ width: diameter,
3361
+ height: diameter,
3362
+ viewBox: `0 0 ${diameter} ${diameter}`,
3363
+ children: [/* @__PURE__ */ jsx("circle", {
3364
+ className: styles.track,
3365
+ cx: center,
3366
+ cy: center,
3367
+ r: radius,
3368
+ strokeWidth: ringStroke
3369
+ }), /* @__PURE__ */ jsx("circle", {
3370
+ className: styles.indicator,
3371
+ cx: center,
3372
+ cy: center,
3373
+ r: radius,
3374
+ strokeWidth: ringStroke,
3375
+ strokeDasharray: circumference,
3376
+ strokeDashoffset: offset,
3377
+ transform: `rotate(-90 ${center} ${center})`
3378
+ })]
3379
+ })
3380
+ });
3381
+ });
3382
+ //#endregion
3383
+ //#region generated/popover.mjs
3384
+ const _isObj$3 = (v) => v != null && typeof v === "object";
3385
+ const _resolveStatic$3 = (v, fallback) => _isObj$3(v) ? v.initial ?? fallback : v ?? fallback;
3386
+ const _applyVariant$3 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
3387
+ if (_isObj$3(raw)) {
3388
+ const initial = raw.initial ?? defaultVal;
3389
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
3390
+ for (const key in raw) {
3391
+ if (key === "initial") continue;
3392
+ const val = raw[key];
3393
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
3394
+ if (add) c += (c ? " " : "") + add;
3395
+ }
3396
+ } else {
3397
+ const val = raw;
3398
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
3399
+ if (add) c += (c ? " " : "") + add;
3400
+ }
3401
+ return c;
3402
+ };
3403
+ const _h$3 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
3404
+ const out = {};
3405
+ for (const s of slots) {
3406
+ let c = base[s] || "";
3407
+ for (const v in variants) {
3408
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
3409
+ c = _applyVariant$3(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
3410
+ }
3411
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
3412
+ if (props && props[v] !== void 0) continue;
3413
+ const val = overrides[v];
3414
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
3415
+ if (add) c += (c ? " " : "") + add;
3416
+ }
3417
+ for (const [cq, overrides] of containers) for (const v in overrides) {
3418
+ if (props && props[v] !== void 0) continue;
3419
+ const val = overrides[v];
3420
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
3421
+ if (add) c += (c ? " " : "") + add;
3422
+ }
3423
+ for (const [match, cls] of compounds) {
3424
+ let ok = true;
3425
+ for (const v in match) if (_resolveStatic$3((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
3426
+ ok = false;
3427
+ break;
3428
+ }
3429
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
3430
+ }
3431
+ out[s] = c;
3432
+ }
3433
+ return out;
3434
+ };
3435
+ const Popover_base = {
3436
+ "root": "pvrfebr0",
3437
+ "content": "enivpyrf"
3438
+ };
3439
+ const Popover_variants = {};
3440
+ const Popover_compounds = [];
3441
+ const Popover_defaults = {};
3442
+ const Popover_responsive = [];
3443
+ const Popover_respClasses = {};
3444
+ const Popover_containers = [];
3445
+ const Popover_cqClasses = {};
3446
+ function Popover$1(props) {
3447
+ return _h$3(Popover_base, Popover_variants, Popover_compounds, Popover_defaults, Popover_responsive, Popover_respClasses, Popover_containers, Popover_cqClasses, ["root", "content"], props);
3448
+ }
3449
+ //#endregion
3450
+ //#region src/Popover.tsx
3451
+ const PopoverContext = createContext(null);
3452
+ function usePopoverContext(part) {
3453
+ const ctx = useContext(PopoverContext);
3454
+ if (!ctx) throw new Error(`Popover.${part} must be used within <Popover>`);
3455
+ return ctx;
3456
+ }
3457
+ function PopoverRoot({ open, defaultOpen, onChange, children }) {
3458
+ const baseId = useId$1();
3459
+ const [isOpen, setOpen] = useControllableState({
3460
+ value: open,
3461
+ defaultValue: defaultOpen ?? false,
3462
+ onChange
3463
+ });
3464
+ const { anchorRef, floatingRef, style } = useAnchoredPosition(isOpen, { gap: 6 });
3465
+ return /* @__PURE__ */ jsx(PopoverContext.Provider, {
3466
+ value: {
3467
+ open: isOpen,
3468
+ setOpen,
3469
+ baseId,
3470
+ anchorRef,
3471
+ floatingRef,
3472
+ style
3473
+ },
3474
+ children
3475
+ });
3476
+ }
3477
+ function PopoverTrigger({ children }) {
3478
+ const ctx = usePopoverContext("Trigger");
3479
+ const child = children;
3480
+ const childRef = child.ref ?? child.props.ref;
3481
+ const ref = useComposedRefs(ctx.anchorRef, childRef);
3482
+ if (!isValidElement(child)) throw new Error("Popover.Trigger expects a single element child.");
3483
+ return cloneElement(child, {
3484
+ ref,
3485
+ "aria-haspopup": "dialog",
3486
+ "aria-expanded": ctx.open,
3487
+ onClick: (event) => {
3488
+ child.props.onClick?.(event);
3489
+ if (!event.defaultPrevented) ctx.setOpen(!ctx.open);
3490
+ }
3491
+ });
3492
+ }
3493
+ const PopoverContent = forwardRef(function PopoverContent({ children, className, style, ...props }, ref) {
3494
+ const styles = Popover$1();
3495
+ const ctx = usePopoverContext("Content");
3496
+ const composedRef = useComposedRefs(ctx.floatingRef, ref);
3497
+ useOnEscape(ctx.open, () => ctx.setOpen(false));
3498
+ useOnClickOutside(ctx.open, () => ctx.setOpen(false), [ctx.anchorRef, ctx.floatingRef]);
3499
+ if (!ctx.open) return null;
3500
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx("div", {
3501
+ ref: composedRef,
3502
+ role: "dialog",
3503
+ id: `${ctx.baseId}-content`,
3504
+ tabIndex: -1,
3505
+ className: className ? `${styles.content} ${className}` : styles.content,
3506
+ style: {
3507
+ ...ctx.style,
3508
+ ...style
3509
+ },
3510
+ ...props,
3511
+ children
3512
+ }) });
3513
+ });
3514
+ /**
3515
+ * Anchored popover:
3516
+ *
3517
+ * <Popover>
3518
+ * <Popover.Trigger><Button>Open</Button></Popover.Trigger>
3519
+ * <Popover.Content>…</Popover.Content>
3520
+ * </Popover>
3521
+ */
3522
+ const Popover = Object.assign(PopoverRoot, {
3523
+ Trigger: PopoverTrigger,
3524
+ Content: PopoverContent
3525
+ });
3526
+ //#endregion
3527
+ //#region generated/menu.mjs
3528
+ const _isObj$2 = (v) => v != null && typeof v === "object";
3529
+ const _resolveStatic$2 = (v, fallback) => _isObj$2(v) ? v.initial ?? fallback : v ?? fallback;
3530
+ const _applyVariant$2 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
3531
+ if (_isObj$2(raw)) {
3532
+ const initial = raw.initial ?? defaultVal;
3533
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
3534
+ for (const key in raw) {
3535
+ if (key === "initial") continue;
3536
+ const val = raw[key];
3537
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
3538
+ if (add) c += (c ? " " : "") + add;
3539
+ }
3540
+ } else {
3541
+ const val = raw;
3542
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
3543
+ if (add) c += (c ? " " : "") + add;
3544
+ }
3545
+ return c;
3546
+ };
3547
+ const _h$2 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
3548
+ const out = {};
3549
+ for (const s of slots) {
3550
+ let c = base[s] || "";
3551
+ for (const v in variants) {
3552
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
3553
+ c = _applyVariant$2(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
3554
+ }
3555
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
3556
+ if (props && props[v] !== void 0) continue;
3557
+ const val = overrides[v];
3558
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
3559
+ if (add) c += (c ? " " : "") + add;
3560
+ }
3561
+ for (const [cq, overrides] of containers) for (const v in overrides) {
3562
+ if (props && props[v] !== void 0) continue;
3563
+ const val = overrides[v];
3564
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
3565
+ if (add) c += (c ? " " : "") + add;
3566
+ }
3567
+ for (const [match, cls] of compounds) {
3568
+ let ok = true;
3569
+ for (const v in match) if (_resolveStatic$2((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
3570
+ ok = false;
3571
+ break;
3572
+ }
3573
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
3574
+ }
3575
+ out[s] = c;
3576
+ }
3577
+ return out;
3578
+ };
3579
+ const Menu_base = {
3580
+ "root": "fiq2od5l",
3581
+ "content": "kuey3dkx",
3582
+ "item": "i52nopjj",
3583
+ "separator": "ywqy4l1d",
3584
+ "label": "vm39lz0q"
3585
+ };
3586
+ const Menu_variants = {};
3587
+ const Menu_compounds = [];
3588
+ const Menu_defaults = {};
3589
+ const Menu_responsive = [];
3590
+ const Menu_respClasses = {};
3591
+ const Menu_containers = [];
3592
+ const Menu_cqClasses = {};
3593
+ function Menu$1(props) {
3594
+ return _h$2(Menu_base, Menu_variants, Menu_compounds, Menu_defaults, Menu_responsive, Menu_respClasses, Menu_containers, Menu_cqClasses, [
3595
+ "root",
3596
+ "content",
3597
+ "item",
3598
+ "separator",
3599
+ "label"
3600
+ ], props);
3601
+ }
3602
+ //#endregion
3603
+ //#region src/Menu.tsx
3604
+ const MenuContext = createContext(null);
3605
+ function useMenuContext(part) {
3606
+ const ctx = useContext(MenuContext);
3607
+ if (!ctx) throw new Error(`Menu.${part} must be used within <Menu>`);
3608
+ return ctx;
3609
+ }
3610
+ function MenuRoot({ open, defaultOpen, onChange, children }) {
3611
+ const baseId = useId$1();
3612
+ const [isOpen, setOpen] = useControllableState({
3613
+ value: open,
3614
+ defaultValue: defaultOpen ?? false,
3615
+ onChange
3616
+ });
3617
+ const { anchorRef, floatingRef, style } = useAnchoredPosition(isOpen, { gap: 4 });
3618
+ return /* @__PURE__ */ jsx(MenuContext.Provider, {
3619
+ value: {
3620
+ open: isOpen,
3621
+ setOpen,
3622
+ baseId,
3623
+ anchorRef,
3624
+ floatingRef,
3625
+ style
3626
+ },
3627
+ children
3628
+ });
3629
+ }
3630
+ function MenuTrigger({ children }) {
3631
+ const ctx = useMenuContext("Trigger");
3632
+ const child = children;
3633
+ const childRef = child.ref ?? child.props.ref;
3634
+ const ref = useComposedRefs(ctx.anchorRef, childRef);
3635
+ if (!isValidElement(child)) throw new Error("Menu.Trigger expects a single element child.");
3636
+ return cloneElement(child, {
3637
+ ref,
3638
+ "aria-haspopup": "menu",
3639
+ "aria-expanded": ctx.open,
3640
+ onClick: (event) => {
3641
+ child.props.onClick?.(event);
3642
+ if (!event.defaultPrevented) ctx.setOpen(!ctx.open);
3643
+ }
3644
+ });
3645
+ }
3646
+ const MenuContent = forwardRef(function MenuContent({ children, className, style, ...props }, ref) {
3647
+ const styles = Menu$1();
3648
+ const ctx = useMenuContext("Content");
3649
+ const composedRef = useComposedRefs(ctx.floatingRef, ref);
3650
+ useOnEscape(ctx.open, () => ctx.setOpen(false));
3651
+ useOnClickOutside(ctx.open, () => ctx.setOpen(false), [ctx.anchorRef, ctx.floatingRef]);
3652
+ useEffect(() => {
3653
+ if (!ctx.open) return;
3654
+ ctx.floatingRef.current?.querySelector("[role=\"menuitem\"]:not([disabled])")?.focus();
3655
+ }, [ctx.open]);
3656
+ if (!ctx.open) return null;
3657
+ function onKeyDown(event) {
3658
+ const items = Array.from(event.currentTarget.querySelectorAll("[role=\"menuitem\"]:not([disabled])"));
3659
+ if (items.length === 0) return;
3660
+ const index = items.indexOf(document.activeElement);
3661
+ if (event.key === "ArrowDown") {
3662
+ event.preventDefault();
3663
+ items[(index + 1) % items.length]?.focus();
3664
+ } else if (event.key === "ArrowUp") {
3665
+ event.preventDefault();
3666
+ items[(index - 1 + items.length) % items.length]?.focus();
3667
+ } else if (event.key === "Home") {
3668
+ event.preventDefault();
3669
+ items[0]?.focus();
3670
+ } else if (event.key === "End") {
3671
+ event.preventDefault();
3672
+ items[items.length - 1]?.focus();
3673
+ } else if (event.key === "Tab") ctx.setOpen(false);
3674
+ }
3675
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx("div", {
3676
+ ref: composedRef,
3677
+ role: "menu",
3678
+ id: `${ctx.baseId}-menu`,
3679
+ tabIndex: -1,
3680
+ className: className ? `${styles.content} ${className}` : styles.content,
3681
+ style: {
3682
+ ...ctx.style,
3683
+ ...style
3684
+ },
3685
+ onKeyDown,
3686
+ ...props,
3687
+ children
3688
+ }) });
3689
+ });
3690
+ const MenuItem = forwardRef(function MenuItem({ onSelect, danger, children, className, disabled, onClick, ...props }, ref) {
3691
+ const styles = Menu$1();
3692
+ const ctx = useMenuContext("Item");
3693
+ return /* @__PURE__ */ jsx("button", {
3694
+ ref,
3695
+ type: "button",
3696
+ role: "menuitem",
3697
+ tabIndex: -1,
3698
+ disabled,
3699
+ "data-danger": danger || void 0,
3700
+ className: className ? `${styles.item} ${className}` : styles.item,
3701
+ onClick: (event) => {
3702
+ onClick?.(event);
3703
+ onSelect?.();
3704
+ ctx.setOpen(false);
3705
+ },
3706
+ ...props,
3707
+ children
3708
+ });
3709
+ });
3710
+ function MenuSeparator({ className, ...props }) {
3711
+ const styles = Menu$1();
3712
+ return /* @__PURE__ */ jsx("div", {
3713
+ role: "separator",
3714
+ className: className ? `${styles.separator} ${className}` : styles.separator,
3715
+ ...props
3716
+ });
3717
+ }
3718
+ function MenuLabel({ children, className, ...props }) {
3719
+ const styles = Menu$1();
3720
+ return /* @__PURE__ */ jsx("div", {
3721
+ className: className ? `${styles.label} ${className}` : styles.label,
3722
+ ...props,
3723
+ children
3724
+ });
3725
+ }
3726
+ /**
3727
+ * Dropdown menu:
3728
+ *
3729
+ * <Menu>
3730
+ * <Menu.Trigger><Button>Actions</Button></Menu.Trigger>
3731
+ * <Menu.Content>
3732
+ * <Menu.Item onSelect={…}>Edit</Menu.Item>
3733
+ * <Menu.Separator />
3734
+ * <Menu.Item danger onSelect={…}>Delete</Menu.Item>
3735
+ * </Menu.Content>
3736
+ * </Menu>
3737
+ */
3738
+ const Menu = Object.assign(MenuRoot, {
3739
+ Trigger: MenuTrigger,
3740
+ Content: MenuContent,
3741
+ Item: MenuItem,
3742
+ Separator: MenuSeparator,
3743
+ Label: MenuLabel
3744
+ });
3745
+ //#endregion
3746
+ //#region generated/select.mjs
3747
+ const _isObj$1 = (v) => v != null && typeof v === "object";
3748
+ const _resolveStatic$1 = (v, fallback) => _isObj$1(v) ? v.initial ?? fallback : v ?? fallback;
3749
+ const _applyVariant$1 = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
3750
+ if (_isObj$1(raw)) {
3751
+ const initial = raw.initial ?? defaultVal;
3752
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
3753
+ for (const key in raw) {
3754
+ if (key === "initial") continue;
3755
+ const val = raw[key];
3756
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
3757
+ if (add) c += (c ? " " : "") + add;
3758
+ }
3759
+ } else {
3760
+ const val = raw;
3761
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
3762
+ if (add) c += (c ? " " : "") + add;
3763
+ }
3764
+ return c;
3765
+ };
3766
+ const _h$1 = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
3767
+ const out = {};
3768
+ for (const s of slots) {
3769
+ let c = base[s] || "";
3770
+ for (const v in variants) {
3771
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
3772
+ c = _applyVariant$1(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
3773
+ }
3774
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
3775
+ if (props && props[v] !== void 0) continue;
3776
+ const val = overrides[v];
3777
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
3778
+ if (add) c += (c ? " " : "") + add;
3779
+ }
3780
+ for (const [cq, overrides] of containers) for (const v in overrides) {
3781
+ if (props && props[v] !== void 0) continue;
3782
+ const val = overrides[v];
3783
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
3784
+ if (add) c += (c ? " " : "") + add;
3785
+ }
3786
+ for (const [match, cls] of compounds) {
3787
+ let ok = true;
3788
+ for (const v in match) if (_resolveStatic$1((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
3789
+ ok = false;
3790
+ break;
3791
+ }
3792
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
3793
+ }
3794
+ out[s] = c;
3795
+ }
3796
+ return out;
3797
+ };
3798
+ const Select_base = {
3799
+ "root": "nt58pz4u",
3800
+ "trigger": "zarkr9v6",
3801
+ "icon": "w2ujx0yf",
3802
+ "content": "qi9rhfy0",
3803
+ "option": "mpq26i18",
3804
+ "native": "q4u6nw49"
3805
+ };
3806
+ const Select_variants = {};
3807
+ const Select_compounds = [];
3808
+ const Select_defaults = {};
3809
+ const Select_responsive = [];
3810
+ const Select_respClasses = {};
3811
+ const Select_containers = [];
3812
+ const Select_cqClasses = {};
3813
+ function Select$1(props) {
3814
+ return _h$1(Select_base, Select_variants, Select_compounds, Select_defaults, Select_responsive, Select_respClasses, Select_containers, Select_cqClasses, [
3815
+ "root",
3816
+ "trigger",
3817
+ "icon",
3818
+ "content",
3819
+ "option",
3820
+ "native"
3821
+ ], props);
3822
+ }
3823
+ //#endregion
3824
+ //#region src/Select.tsx
3825
+ /** Config-only — Select reads its props; it renders nothing itself. */
3826
+ function SelectOption(_props) {
3827
+ return null;
3828
+ }
3829
+ function extractOptions(children) {
3830
+ const out = [];
3831
+ Children.forEach(children, (child) => {
3832
+ if (isValidElement(child)) out.push({
3833
+ value: child.props.value,
3834
+ label: child.props.children,
3835
+ disabled: child.props.disabled
3836
+ });
3837
+ });
3838
+ return out;
3839
+ }
3840
+ function Chevron({ className }) {
3841
+ return /* @__PURE__ */ jsx("svg", {
3842
+ className,
3843
+ width: "16",
3844
+ height: "16",
3845
+ viewBox: "0 0 24 24",
3846
+ fill: "none",
3847
+ stroke: "currentColor",
3848
+ strokeWidth: "2",
3849
+ strokeLinecap: "round",
3850
+ strokeLinejoin: "round",
3851
+ "aria-hidden": true,
3852
+ children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
3853
+ });
3854
+ }
3855
+ function Check() {
3856
+ return /* @__PURE__ */ jsx("svg", {
3857
+ width: "14",
3858
+ height: "14",
3859
+ viewBox: "0 0 24 24",
3860
+ fill: "none",
3861
+ stroke: "currentColor",
3862
+ strokeWidth: "2.5",
3863
+ strokeLinecap: "round",
3864
+ strokeLinejoin: "round",
3865
+ "aria-hidden": true,
3866
+ children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" })
3867
+ });
3868
+ }
3869
+ function SelectRoot({ value, defaultValue, onChange, native, placeholder, disabled, name, children, className, "aria-label": ariaLabel, id }) {
3870
+ const styles = Select$1();
3871
+ const baseId = useId$1(id);
3872
+ const [val, setVal] = useControllableState({
3873
+ value,
3874
+ defaultValue: defaultValue ?? "",
3875
+ onChange
3876
+ });
3877
+ const options = extractOptions(children);
3878
+ const selected = options.find((option) => option.value === val);
3879
+ const [open, setOpen] = useState(false);
3880
+ const [highlight, setHighlight] = useState(0);
3881
+ const { anchorRef, floatingRef, style } = useAnchoredPosition(open, {
3882
+ gap: 4,
3883
+ matchWidth: true
3884
+ });
3885
+ useOnEscape(open && !native, () => {
3886
+ setOpen(false);
3887
+ anchorRef.current?.focus();
3888
+ });
3889
+ useOnClickOutside(open && !native, () => setOpen(false), [anchorRef, floatingRef]);
3890
+ useEffect(() => {
3891
+ if (!open) return;
3892
+ const index = options.findIndex((option) => option.value === val);
3893
+ setHighlight(index >= 0 ? index : options.findIndex((option) => !option.disabled));
3894
+ floatingRef.current?.focus();
3895
+ }, [open]);
3896
+ if (native) return /* @__PURE__ */ jsxs("select", {
3897
+ id: baseId,
3898
+ name,
3899
+ value: val,
3900
+ disabled,
3901
+ "aria-label": ariaLabel,
3902
+ className: className ? `${styles.native} ${className}` : styles.native,
3903
+ onChange: (event) => setVal(event.target.value),
3904
+ children: [placeholder !== void 0 ? /* @__PURE__ */ jsx("option", {
3905
+ value: "",
3906
+ disabled: true,
3907
+ hidden: true,
3908
+ children: placeholder
3909
+ }) : null, options.map((option) => /* @__PURE__ */ jsx("option", {
3910
+ value: option.value,
3911
+ disabled: option.disabled,
3912
+ children: option.label
3913
+ }, option.value))]
3914
+ });
3915
+ function step(from, dir) {
3916
+ const n = options.length;
3917
+ if (n === 0) return from;
3918
+ let i = from;
3919
+ for (let k = 0; k < n; k++) {
3920
+ i = (i + dir + n) % n;
3921
+ if (!options[i]?.disabled) return i;
3922
+ }
3923
+ return from;
3924
+ }
3925
+ function commit(optionValue) {
3926
+ setVal(optionValue);
3927
+ setOpen(false);
3928
+ anchorRef.current?.focus();
3929
+ }
3930
+ function onListKeyDown(event) {
3931
+ if (event.key === "ArrowDown") {
3932
+ event.preventDefault();
3933
+ setHighlight((h) => step(h, 1));
3934
+ } else if (event.key === "ArrowUp") {
3935
+ event.preventDefault();
3936
+ setHighlight((h) => step(h, -1));
3937
+ } else if (event.key === "Home") {
3938
+ event.preventDefault();
3939
+ setHighlight(step(-1, 1));
3940
+ } else if (event.key === "End") {
3941
+ event.preventDefault();
3942
+ setHighlight(step(0, -1));
3943
+ } else if (event.key === "Enter" || event.key === " ") {
3944
+ event.preventDefault();
3945
+ const option = options[highlight];
3946
+ if (option && !option.disabled) commit(option.value);
3947
+ }
3948
+ }
3949
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("button", {
3950
+ ref: anchorRef,
3951
+ type: "button",
3952
+ id: baseId,
3953
+ disabled,
3954
+ "aria-haspopup": "listbox",
3955
+ "aria-expanded": open,
3956
+ "aria-label": ariaLabel,
3957
+ "data-placeholder": selected ? void 0 : true,
3958
+ className: className ? `${styles.trigger} ${className}` : styles.trigger,
3959
+ onClick: () => setOpen((o) => !o),
3960
+ onKeyDown: (event) => {
3961
+ if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
3962
+ event.preventDefault();
3963
+ setOpen(true);
3964
+ }
3965
+ },
3966
+ children: [/* @__PURE__ */ jsx("span", { children: selected ? selected.label : placeholder ?? "Select…" }), /* @__PURE__ */ jsx(Chevron, { className: styles.icon })]
3967
+ }), open ? /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx("div", {
3968
+ ref: floatingRef,
3969
+ role: "listbox",
3970
+ tabIndex: -1,
3971
+ className: styles.content,
3972
+ style,
3973
+ onKeyDown: onListKeyDown,
3974
+ children: options.map((option, index) => /* @__PURE__ */ jsxs("div", {
3975
+ role: "option",
3976
+ "aria-selected": option.value === val,
3977
+ "aria-disabled": option.disabled || void 0,
3978
+ "data-selected": option.value === val || void 0,
3979
+ "data-highlighted": index === highlight || void 0,
3980
+ className: styles.option,
3981
+ onMouseEnter: () => setHighlight(index),
3982
+ onClick: () => {
3983
+ if (!option.disabled) commit(option.value);
3984
+ },
3985
+ children: [/* @__PURE__ */ jsx("span", { children: option.label }), option.value === val ? /* @__PURE__ */ jsx(Check, {}) : null]
3986
+ }, option.value))
3987
+ }) }) : null] });
3988
+ }
3989
+ /**
3990
+ * Select with a custom listbox, or a styled native control via `native`:
3991
+ *
3992
+ * <Select defaultValue="a" placeholder="Pick one">
3993
+ * <Select.Option value="a">Apple</Select.Option>
3994
+ * <Select.Option value="b">Banana</Select.Option>
3995
+ * </Select>
3996
+ */
3997
+ const Select = Object.assign(SelectRoot, { Option: SelectOption });
3998
+ //#endregion
3999
+ //#region generated/toast.mjs
4000
+ const _isObj = (v) => v != null && typeof v === "object";
4001
+ const _resolveStatic = (v, fallback) => _isObj(v) ? v.initial ?? fallback : v ?? fallback;
4002
+ const _applyVariant = (c, variants, respClasses, cqClasses, v, raw, defaultVal, s) => {
4003
+ if (_isObj(raw)) {
4004
+ const initial = raw.initial ?? defaultVal;
4005
+ if (initial != null && variants[v] && variants[v][initial] && variants[v][initial][s]) c += (c ? " " : "") + variants[v][initial][s];
4006
+ for (const key in raw) {
4007
+ if (key === "initial") continue;
4008
+ const val = raw[key];
4009
+ const add = key.startsWith("$") ? cqClasses[key.slice(1)] && cqClasses[key.slice(1)][v] && cqClasses[key.slice(1)][v][val] ? cqClasses[key.slice(1)][v][val][s] : void 0 : respClasses[key] && respClasses[key][v] && respClasses[key][v][val] ? respClasses[key][v][val][s] : void 0;
4010
+ if (add) c += (c ? " " : "") + add;
4011
+ }
4012
+ } else {
4013
+ const val = raw;
4014
+ const add = val != null && variants[v][val] ? variants[v][val][s] : void 0;
4015
+ if (add) c += (c ? " " : "") + add;
4016
+ }
4017
+ return c;
4018
+ };
4019
+ const _h = (base, variants, compounds, defaults, responsive, respClasses, containers, cqClasses, slots, props) => {
4020
+ const out = {};
4021
+ for (const s of slots) {
4022
+ let c = base[s] || "";
4023
+ for (const v in variants) {
4024
+ const raw = props && props[v] !== void 0 ? props[v] : defaults[v];
4025
+ c = _applyVariant(c, variants, respClasses, cqClasses, v, raw, defaults[v], s);
4026
+ }
4027
+ for (const [bp, overrides] of responsive) for (const v in overrides) {
4028
+ if (props && props[v] !== void 0) continue;
4029
+ const val = overrides[v];
4030
+ const add = respClasses[bp] && respClasses[bp][v] && respClasses[bp][v][val] ? respClasses[bp][v][val][s] : void 0;
4031
+ if (add) c += (c ? " " : "") + add;
4032
+ }
4033
+ for (const [cq, overrides] of containers) for (const v in overrides) {
4034
+ if (props && props[v] !== void 0) continue;
4035
+ const val = overrides[v];
4036
+ const add = cqClasses[cq] && cqClasses[cq][v] && cqClasses[cq][v][val] ? cqClasses[cq][v][val][s] : void 0;
4037
+ if (add) c += (c ? " " : "") + add;
4038
+ }
4039
+ for (const [match, cls] of compounds) {
4040
+ let ok = true;
4041
+ for (const v in match) if (_resolveStatic((props && props[v]) ?? defaults[v], defaults[v]) !== match[v]) {
4042
+ ok = false;
4043
+ break;
4044
+ }
4045
+ if (ok && cls[s]) c += (c ? " " : "") + cls[s];
4046
+ }
4047
+ out[s] = c;
4048
+ }
4049
+ return out;
4050
+ };
4051
+ const Toast_base = {
4052
+ "root": "fawtqa74",
4053
+ "viewport": "x4fanrl6",
4054
+ "toast": "sxqt066j",
4055
+ "icon": "qqz8pvth",
4056
+ "content": "y7r81l6a",
4057
+ "title": "hzr0ljp5",
4058
+ "description": "pfazk913",
4059
+ "close": "lak199be"
4060
+ };
4061
+ const Toast_variants = {};
4062
+ const Toast_compounds = [];
4063
+ const Toast_defaults = {};
4064
+ const Toast_responsive = [];
4065
+ const Toast_respClasses = {};
4066
+ const Toast_containers = [];
4067
+ const Toast_cqClasses = {};
4068
+ function Toast(props) {
4069
+ return _h(Toast_base, Toast_variants, Toast_compounds, Toast_defaults, Toast_responsive, Toast_respClasses, Toast_containers, Toast_cqClasses, [
4070
+ "root",
4071
+ "viewport",
4072
+ "toast",
4073
+ "icon",
4074
+ "content",
4075
+ "title",
4076
+ "description",
4077
+ "close"
4078
+ ], props);
4079
+ }
4080
+ //#endregion
4081
+ //#region src/Toast.tsx
4082
+ const ToastContext = createContext(null);
4083
+ function useToast() {
4084
+ const ctx = useContext(ToastContext);
4085
+ if (!ctx) throw new Error("useToast must be used within <ToastProvider>");
4086
+ return ctx;
4087
+ }
4088
+ const ICON_PATHS = {
4089
+ neutral: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
4090
+ cx: "12",
4091
+ cy: "12",
4092
+ r: "10"
4093
+ }), /* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })] }),
4094
+ info: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
4095
+ cx: "12",
4096
+ cy: "12",
4097
+ r: "10"
4098
+ }), /* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })] }),
4099
+ success: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
4100
+ cx: "12",
4101
+ cy: "12",
4102
+ r: "10"
4103
+ }), /* @__PURE__ */ jsx("polyline", { points: "8 12 11 15 16 9" })] }),
4104
+ warning: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z" }), /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01" })] }),
4105
+ danger: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
4106
+ cx: "12",
4107
+ cy: "12",
4108
+ r: "10"
4109
+ }), /* @__PURE__ */ jsx("path", { d: "M15 9l-6 6M9 9l6 6" })] })
4110
+ };
4111
+ function ToastProvider({ children, duration = 5e3 }) {
4112
+ const styles = Toast();
4113
+ const [toasts, setToasts] = useState([]);
4114
+ const timers = useRef(/* @__PURE__ */ new Map());
4115
+ const counter = useRef(0);
4116
+ const dismiss = useCallback((id) => {
4117
+ setToasts((list) => list.filter((item) => item.id !== id));
4118
+ const timer = timers.current.get(id);
4119
+ if (timer) {
4120
+ clearTimeout(timer);
4121
+ timers.current.delete(id);
4122
+ }
4123
+ }, []);
4124
+ const toast = useCallback((options) => {
4125
+ counter.current += 1;
4126
+ const id = `toast-${counter.current}`;
4127
+ setToasts((list) => [...list, {
4128
+ ...options,
4129
+ id
4130
+ }]);
4131
+ const ms = options.duration ?? duration;
4132
+ if (ms > 0) timers.current.set(id, setTimeout(() => dismiss(id), ms));
4133
+ return id;
4134
+ }, [dismiss, duration]);
4135
+ return /* @__PURE__ */ jsxs(ToastContext.Provider, {
4136
+ value: {
4137
+ toast,
4138
+ dismiss
4139
+ },
4140
+ children: [children, /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx("div", {
4141
+ className: styles.viewport,
4142
+ children: toasts.map((item) => {
4143
+ const tone = item.tone ?? "neutral";
4144
+ return /* @__PURE__ */ jsxs("div", {
4145
+ role: "status",
4146
+ "aria-live": "polite",
4147
+ className: styles.toast,
4148
+ "data-tone": tone === "neutral" ? void 0 : tone,
4149
+ children: [
4150
+ /* @__PURE__ */ jsx("span", {
4151
+ className: styles.icon,
4152
+ children: /* @__PURE__ */ jsx("svg", {
4153
+ width: "18",
4154
+ height: "18",
4155
+ viewBox: "0 0 24 24",
4156
+ fill: "none",
4157
+ stroke: "currentColor",
4158
+ strokeWidth: "2",
4159
+ strokeLinecap: "round",
4160
+ strokeLinejoin: "round",
4161
+ "aria-hidden": true,
4162
+ children: ICON_PATHS[tone]
4163
+ })
4164
+ }),
4165
+ /* @__PURE__ */ jsxs("div", {
4166
+ className: styles.content,
4167
+ children: [item.title ? /* @__PURE__ */ jsx("p", {
4168
+ className: styles.title,
4169
+ children: item.title
4170
+ }) : null, item.description ? /* @__PURE__ */ jsx("p", {
4171
+ className: styles.description,
4172
+ children: item.description
4173
+ }) : null]
4174
+ }),
4175
+ /* @__PURE__ */ jsx("button", {
4176
+ type: "button",
4177
+ className: styles.close,
4178
+ "aria-label": "Dismiss",
4179
+ onClick: () => dismiss(item.id),
4180
+ children: /* @__PURE__ */ jsxs("svg", {
4181
+ width: "14",
4182
+ height: "14",
4183
+ viewBox: "0 0 24 24",
4184
+ fill: "none",
4185
+ stroke: "currentColor",
4186
+ strokeWidth: "2",
4187
+ strokeLinecap: "round",
4188
+ strokeLinejoin: "round",
4189
+ "aria-hidden": true,
4190
+ children: [/* @__PURE__ */ jsx("line", {
4191
+ x1: "18",
4192
+ y1: "6",
4193
+ x2: "6",
4194
+ y2: "18"
4195
+ }), /* @__PURE__ */ jsx("line", {
4196
+ x1: "6",
4197
+ y1: "6",
4198
+ x2: "18",
4199
+ y2: "18"
4200
+ })]
4201
+ })
4202
+ })
4203
+ ]
4204
+ }, item.id);
4205
+ })
4206
+ }) })]
4207
+ });
4208
+ }
4209
+ //#endregion
4210
+ //#region src/arvia-theme.ts
4211
+ const THEME_ATTR = "data-arvia-theme";
4212
+ /** Sets the active Arvia theme mode on `<html>`, overriding the OS color scheme. */
4213
+ function setTheme(mode) {
4214
+ document.documentElement.setAttribute(THEME_ATTR, mode);
4215
+ }
4216
+ //#endregion
4217
+ export { Accordion, Alert, Avatar, Badge, Box, Breadcrumb, Button, Card, Checkbox, CheckboxGroup, Dialog, Divider, Heading, Input, Link, Menu, Popover, Progress, ProgressCircle, Radio, RadioGroup, Select, Skeleton, Slider, Spinner, Stack, Switch, Tabs, Text, ToastProvider, Tooltip, setTheme, useToast };