@dimasbaguspm/versaur 0.0.58 → 0.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1074 @@
1
+ import { j as s } from "./jsx-runtime-C5mzlN2N.js";
2
+ import * as j from "react";
3
+ import { forwardRef as l, createContext as S, useContext as C, useState as w } from "react";
4
+ import { c as n, a as d } from "./index-BDtz_hQY.js";
5
+ import { n as x, I as N } from "./image-rectangle-CCvXv24a.js";
6
+ import "./snackbar-CTq4MLir.js";
7
+ import { L as V } from "./skeleton-BRwIW26B.js";
8
+ import { ChevronDown as z, ChevronRight as B, ChevronLeft as H } from "lucide-react";
9
+ const T = n(
10
+ [
11
+ "h-screen w-full grid bg-background overflow-hidden",
12
+ "grid-rows-[auto_1fr_auto]",
13
+ "grid-cols-[auto_1fr_auto]",
14
+ '[grid-template-areas:"top_top_top"_"left_main_right"_"bottom_bottom_bottom"]'
15
+ ].join(" "),
16
+ {
17
+ variants: {},
18
+ defaultVariants: {}
19
+ }
20
+ ), P = n("[grid-area:top] z-30 sticky top-0"), A = n(
21
+ "[grid-area:left] z-20 border-r border-border bg-white"
22
+ ), _ = n(
23
+ "[grid-area:right] z-20 border-l border-border bg-white"
24
+ ), I = n(
25
+ "[grid-area:bottom] z-30 border-t border-border bg-white"
26
+ ), k = n(
27
+ "[grid-area:main] overflow-y-auto min-h-0"
28
+ ), G = l(function({ children: t, className: e, ...a }, o) {
29
+ return /* @__PURE__ */ s.jsx(
30
+ "div",
31
+ {
32
+ ref: o,
33
+ className: P({ className: e }),
34
+ ...a,
35
+ children: t
36
+ }
37
+ );
38
+ }), M = l(function({ children: t, className: e, ...a }, o) {
39
+ return /* @__PURE__ */ s.jsx(
40
+ "aside",
41
+ {
42
+ ref: o,
43
+ className: A({ className: e }),
44
+ ...a,
45
+ children: t
46
+ }
47
+ );
48
+ }), F = l(function({ children: t, className: e, ...a }, o) {
49
+ return /* @__PURE__ */ s.jsx(
50
+ "aside",
51
+ {
52
+ ref: o,
53
+ className: _({ className: e }),
54
+ ...a,
55
+ children: t
56
+ }
57
+ );
58
+ }), O = l(function({ children: t, className: e, ...a }, o) {
59
+ return /* @__PURE__ */ s.jsx(
60
+ "div",
61
+ {
62
+ ref: o,
63
+ className: I({ className: e }),
64
+ ...a,
65
+ children: t
66
+ }
67
+ );
68
+ }), E = l(function({ children: t, className: e, ...a }, o) {
69
+ return /* @__PURE__ */ s.jsx(
70
+ "main",
71
+ {
72
+ ref: o,
73
+ className: k({ className: e }),
74
+ ...a,
75
+ children: t
76
+ }
77
+ );
78
+ }), W = l(
79
+ ({ children: r, className: t, ...e }, a) => /* @__PURE__ */ s.jsx("div", { ref: a, className: T({ className: t }), ...e, children: r })
80
+ ), ta = Object.assign(W, {
81
+ TopRegion: G,
82
+ SideLeftRegion: M,
83
+ SideRightRegion: F,
84
+ BottomRegion: O,
85
+ MainRegion: E
86
+ }), D = n(
87
+ "sticky bottom-0 w-full flex justify-around items-center bg-white border-t border-border shadow-xs z-40 safe-bottom gap-4 select-none px-8",
88
+ {
89
+ variants: {
90
+ variant: {
91
+ primary: "",
92
+ secondary: "",
93
+ ghost: "",
94
+ neutral: "",
95
+ tertiary: ""
96
+ },
97
+ size: {
98
+ sm: "h-12 text-sm",
99
+ md: "h-16 text-base",
100
+ lg: "h-20 text-lg"
101
+ }
102
+ },
103
+ defaultVariants: {
104
+ variant: "primary",
105
+ size: "md"
106
+ }
107
+ }
108
+ ), $ = n(
109
+ "flex flex-col items-center justify-center gap-1",
110
+ {
111
+ variants: {
112
+ active: {
113
+ true: "text-primary",
114
+ false: "text-ghost"
115
+ },
116
+ as: {
117
+ button: "transition-all duration-200 h-8 w-8 outline-none cursor-pointer active:scale-98 focus-visible:ring-2 focus-visible:ring-primary-light focus-visible:rounded-full",
118
+ div: ""
119
+ }
120
+ },
121
+ defaultVariants: {
122
+ active: !1,
123
+ as: "button"
124
+ }
125
+ }
126
+ ), q = l(
127
+ ({
128
+ as: r = "button",
129
+ icon: t,
130
+ label: e,
131
+ active: a = !1,
132
+ className: o,
133
+ children: i,
134
+ ...c
135
+ }, u) => /* @__PURE__ */ s.jsxs(
136
+ r,
137
+ {
138
+ ref: u,
139
+ "aria-current": a ? "page" : void 0,
140
+ className: $({ active: a, className: o, as: r }),
141
+ ...c,
142
+ children: [
143
+ t && t,
144
+ i && i,
145
+ e && /* @__PURE__ */ s.jsx("span", { className: "text-xs mt-0.5", children: e })
146
+ ]
147
+ }
148
+ )
149
+ ), J = ({
150
+ children: r,
151
+ variant: t = "primary",
152
+ size: e = "md",
153
+ className: a,
154
+ ...o
155
+ }) => /* @__PURE__ */ s.jsx(
156
+ "nav",
157
+ {
158
+ role: "navigation",
159
+ "aria-label": "Bottom navigation",
160
+ className: D({ variant: t, size: e, className: a }),
161
+ ...o,
162
+ children: r
163
+ }
164
+ ), sa = Object.assign(J, {
165
+ Item: q
166
+ }), K = n("flex items-center", {
167
+ variants: {
168
+ orientation: {
169
+ horizontal: "flex-row",
170
+ vertical: "flex-col"
171
+ },
172
+ alignment: {
173
+ start: "justify-start",
174
+ center: "justify-center",
175
+ end: "justify-end",
176
+ between: "justify-between",
177
+ around: "justify-around",
178
+ evenly: "justify-evenly"
179
+ },
180
+ gap: {
181
+ xs: "gap-1",
182
+ sm: "gap-2",
183
+ md: "gap-3",
184
+ lg: "gap-4",
185
+ xl: "gap-6"
186
+ },
187
+ fluid: {
188
+ true: "[&>*]:flex-1",
189
+ false: ""
190
+ },
191
+ overlay: {
192
+ true: "flex-nowrap overflow-x-auto",
193
+ false: "flex-wrap"
194
+ }
195
+ },
196
+ defaultVariants: {
197
+ orientation: "horizontal",
198
+ alignment: "start",
199
+ gap: "md",
200
+ fluid: !1,
201
+ overlay: !1
202
+ }
203
+ }), ra = l(
204
+ function({
205
+ className: t,
206
+ children: e,
207
+ orientation: a = "horizontal",
208
+ alignment: o = "start",
209
+ gap: i = "md",
210
+ fluid: c = !1,
211
+ hasMargin: u,
212
+ overlay: f = !1,
213
+ ...p
214
+ }, m) {
215
+ return /* @__PURE__ */ s.jsx(
216
+ "div",
217
+ {
218
+ ref: m,
219
+ className: d(
220
+ K({
221
+ orientation: a,
222
+ alignment: o,
223
+ gap: i,
224
+ fluid: c,
225
+ overlay: f
226
+ }),
227
+ u && "mb-4",
228
+ t
229
+ ),
230
+ role: "group",
231
+ ...p,
232
+ children: e
233
+ }
234
+ );
235
+ }
236
+ ), Q = n("flex items-center", {
237
+ variants: {
238
+ orientation: {
239
+ horizontal: "flex-row",
240
+ vertical: "flex-col"
241
+ },
242
+ alignment: {
243
+ start: "justify-start",
244
+ center: "justify-center",
245
+ end: "justify-end",
246
+ between: "justify-between",
247
+ around: "justify-around",
248
+ evenly: "justify-evenly"
249
+ },
250
+ gap: {
251
+ xs: "gap-1",
252
+ sm: "gap-2",
253
+ md: "gap-3",
254
+ lg: "gap-4",
255
+ xl: "gap-6"
256
+ },
257
+ fluid: {
258
+ true: "[&>*]:flex-1",
259
+ false: ""
260
+ },
261
+ overlay: {
262
+ true: "flex-nowrap overflow-x-auto",
263
+ false: "flex-wrap"
264
+ }
265
+ },
266
+ defaultVariants: {
267
+ orientation: "horizontal",
268
+ alignment: "start",
269
+ gap: "md",
270
+ fluid: !1,
271
+ overlay: !1
272
+ }
273
+ }), oa = l(
274
+ function({
275
+ className: t,
276
+ children: e,
277
+ orientation: a = "horizontal",
278
+ alignment: o = "start",
279
+ gap: i = "md",
280
+ fluid: c = !1,
281
+ hasMargin: u,
282
+ overlay: f = !1,
283
+ ...p
284
+ }, m) {
285
+ return /* @__PURE__ */ s.jsx(
286
+ "div",
287
+ {
288
+ ref: m,
289
+ className: d(
290
+ Q({
291
+ orientation: a,
292
+ alignment: o,
293
+ gap: i,
294
+ fluid: c,
295
+ overlay: f
296
+ }),
297
+ u && "mb-4",
298
+ t
299
+ ),
300
+ role: "group",
301
+ ...p,
302
+ children: e
303
+ }
304
+ );
305
+ }
306
+ ), U = n("flex items-center", {
307
+ variants: {
308
+ orientation: {
309
+ horizontal: "flex-row",
310
+ vertical: "flex-col"
311
+ },
312
+ alignment: {
313
+ start: "justify-start",
314
+ center: "justify-center",
315
+ end: "justify-end",
316
+ between: "justify-between",
317
+ around: "justify-around",
318
+ evenly: "justify-evenly"
319
+ },
320
+ gap: {
321
+ xs: "gap-1",
322
+ sm: "gap-2",
323
+ md: "gap-3",
324
+ lg: "gap-4",
325
+ xl: "gap-6"
326
+ },
327
+ fluid: {
328
+ true: "[&>*]:flex-1",
329
+ false: ""
330
+ },
331
+ overlay: {
332
+ true: "flex-nowrap overflow-x-auto",
333
+ false: "flex-wrap"
334
+ }
335
+ },
336
+ defaultVariants: {
337
+ orientation: "horizontal",
338
+ alignment: "start",
339
+ gap: "md",
340
+ fluid: !1,
341
+ overlay: !1
342
+ }
343
+ }), na = l(
344
+ function({
345
+ className: t,
346
+ children: e,
347
+ orientation: a = "horizontal",
348
+ alignment: o = "start",
349
+ gap: i = "md",
350
+ fluid: c = !1,
351
+ hasMargin: u,
352
+ overlay: f = !1,
353
+ ...p
354
+ }, m) {
355
+ return /* @__PURE__ */ s.jsx(
356
+ "div",
357
+ {
358
+ ref: m,
359
+ className: d(
360
+ U({
361
+ orientation: a,
362
+ alignment: o,
363
+ gap: i,
364
+ fluid: c,
365
+ overlay: f
366
+ }),
367
+ u && "mb-4",
368
+ t
369
+ ),
370
+ role: "group",
371
+ ...p,
372
+ children: e
373
+ }
374
+ );
375
+ }
376
+ ), X = n("w-full mb-4"), Y = n("w-full mx-auto pt-4 md:pt-10", {
377
+ variants: {
378
+ size: {
379
+ fluid: "max-w-full",
380
+ wide: "max-w-7xl",
381
+ narrow: "max-w-3xl"
382
+ }
383
+ },
384
+ defaultVariants: {
385
+ size: "fluid"
386
+ }
387
+ }), Z = n(
388
+ "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 mb-4",
389
+ {
390
+ variants: {
391
+ size: {
392
+ fluid: "px-0",
393
+ wide: "px-6",
394
+ narrow: "px-4"
395
+ }
396
+ },
397
+ defaultVariants: {
398
+ size: "fluid"
399
+ }
400
+ }
401
+ ), ee = n("mb-4", {
402
+ variants: {
403
+ size: {
404
+ fluid: "px-0",
405
+ wide: "px-6",
406
+ narrow: "px-4"
407
+ }
408
+ },
409
+ defaultVariants: {
410
+ size: "fluid"
411
+ }
412
+ }), ae = n(
413
+ "flex-1 min-w-0 flex flex-col gap-2 w-full sm:w-auto"
414
+ ), te = n("flex items-center gap-2 flex-wrap"), se = n(
415
+ "hidden md:flex flex-col sm:flex-row gap-2 sm:gap-3 w-full w-auto sm:ml-auto sm:shrink-0 [&>*]:w-full sm:[&>*]:w-auto"
416
+ ), re = n("md:hidden"), oe = n(
417
+ "w-full flex items-center py-0 overflow-x-auto"
418
+ ), ne = l(
419
+ ({ children: r, className: t, size: e = "fluid", ...a }, o) => /* @__PURE__ */ s.jsx(
420
+ "div",
421
+ {
422
+ ref: o,
423
+ className: d(Z({ size: e }), t),
424
+ "data-versaur-page-header-top": !0,
425
+ ...a,
426
+ children: r
427
+ }
428
+ )
429
+ ), ie = l(({ children: r, className: t, size: e = "fluid", ...a }, o) => /* @__PURE__ */ s.jsx(
430
+ "div",
431
+ {
432
+ ref: o,
433
+ className: d(ee({ size: e }), t),
434
+ "data-versaur-page-header-breadcrumbs": !0,
435
+ ...a,
436
+ children: r
437
+ }
438
+ )), le = l(({ children: r, className: t, ...e }, a) => /* @__PURE__ */ s.jsx(
439
+ "div",
440
+ {
441
+ ref: a,
442
+ className: d(ae(), t),
443
+ "data-versaur-page-header-content": !0,
444
+ ...e,
445
+ children: r
446
+ }
447
+ )), ce = l((r, t) => /* @__PURE__ */ s.jsx(
448
+ x,
449
+ {
450
+ ...r,
451
+ as: "h1",
452
+ fontSize: "xl",
453
+ fontWeight: "semibold",
454
+ ellipsis: !0,
455
+ ref: t
456
+ }
457
+ )), de = l(({ className: r, ...t }, e) => /* @__PURE__ */ s.jsx(
458
+ x,
459
+ {
460
+ as: "p",
461
+ fontSize: "sm",
462
+ fontWeight: "normal",
463
+ clamp: 2,
464
+ ref: e,
465
+ className: d("mb-2 sm:clamp-3", r),
466
+ ...t
467
+ }
468
+ )), ue = l(({ children: r, className: t, ...e }, a) => /* @__PURE__ */ s.jsx(
469
+ "div",
470
+ {
471
+ ref: a,
472
+ className: d(te(), t),
473
+ "data-versaur-page-header-badges": !0,
474
+ ...e,
475
+ children: r
476
+ }
477
+ )), pe = l(({ children: r, className: t, ...e }, a) => /* @__PURE__ */ s.jsx(
478
+ "div",
479
+ {
480
+ ref: a,
481
+ className: d(se(), t),
482
+ "data-versaur-page-header-actions": !0,
483
+ ...e,
484
+ children: r
485
+ }
486
+ )), fe = l(({ children: r, className: t, ...e }, a) => /* @__PURE__ */ s.jsx(
487
+ "div",
488
+ {
489
+ ref: a,
490
+ className: d(re(), t),
491
+ "data-versaur-page-header-mobile-actions": !0,
492
+ ...e,
493
+ children: r
494
+ }
495
+ )), me = l(({ children: r, className: t, ...e }, a) => /* @__PURE__ */ s.jsx(
496
+ "div",
497
+ {
498
+ ref: a,
499
+ className: d(oe(), t),
500
+ "data-versaur-page-header-bottom": !0,
501
+ ...e,
502
+ children: r
503
+ }
504
+ )), ge = l(
505
+ ({
506
+ children: r,
507
+ className: t,
508
+ size: e = "fluid",
509
+ title: a,
510
+ subtitle: o,
511
+ breadcrumbs: i,
512
+ badges: c,
513
+ actions: u,
514
+ mobileActions: f,
515
+ tabs: p,
516
+ ...m
517
+ }, g) => {
518
+ const v = p;
519
+ return /* @__PURE__ */ s.jsx(
520
+ "header",
521
+ {
522
+ ref: g,
523
+ className: d(X()),
524
+ role: "banner",
525
+ ...m,
526
+ children: /* @__PURE__ */ s.jsxs("div", { className: d(Y({ size: e }), t), children: [
527
+ i && /* @__PURE__ */ s.jsx(ie, { size: e, children: i }),
528
+ /* @__PURE__ */ s.jsxs(ne, { size: e, children: [
529
+ /* @__PURE__ */ s.jsxs(le, { children: [
530
+ /* @__PURE__ */ s.jsxs("div", { className: "flex items-center justify-between", children: [
531
+ /* @__PURE__ */ s.jsx(ce, { children: a }),
532
+ f && /* @__PURE__ */ s.jsx(fe, { children: f })
533
+ ] }),
534
+ o && /* @__PURE__ */ s.jsx(de, { children: o }),
535
+ c && /* @__PURE__ */ s.jsx(ue, { children: c })
536
+ ] }),
537
+ u && /* @__PURE__ */ s.jsx(pe, { children: u })
538
+ ] }),
539
+ v && /* @__PURE__ */ s.jsx(me, { children: p }),
540
+ r
541
+ ] })
542
+ }
543
+ );
544
+ }
545
+ ), ia = ge, xe = n("w-full"), he = n("w-full mx-auto relative", {
546
+ variants: {
547
+ size: {
548
+ fluid: "max-w-full px-0",
549
+ wide: "max-w-7xl px-6 pb-10",
550
+ narrow: "max-w-3xl px-4 pb-10"
551
+ },
552
+ template: {
553
+ "single-column": "grid grid-cols-1",
554
+ "two-column": "grid grid-cols-1 md:grid-cols-2 gap-6",
555
+ "two-column-asymmetric-left": "grid grid-cols-1 md:grid-cols-3 gap-6",
556
+ "two-column-asymmetric-right": "grid grid-cols-1 md:grid-cols-3 gap-6"
557
+ }
558
+ },
559
+ defaultVariants: {
560
+ size: "fluid",
561
+ template: "single-column"
562
+ }
563
+ }), la = j.forwardRef(
564
+ function({
565
+ size: t = "fluid",
566
+ template: e = "single-column",
567
+ className: a,
568
+ children: o,
569
+ ...i
570
+ }, c) {
571
+ return /* @__PURE__ */ s.jsx("div", { ref: c, className: d(xe()), ...i, children: /* @__PURE__ */ s.jsx(
572
+ "div",
573
+ {
574
+ className: d(
575
+ he({ size: t, template: e }),
576
+ a
577
+ ),
578
+ children: /* @__PURE__ */ s.jsx("div", { children: o })
579
+ }
580
+ ) });
581
+ }
582
+ ), ve = n(
583
+ [
584
+ "grid",
585
+ "grid-rows-[auto_1fr]",
586
+ '[grid-template-areas:"header"_"content"]'
587
+ ].join(" "),
588
+ {
589
+ variants: {
590
+ hasMargin: {
591
+ true: '[&_[class*="grid-area:header"]]:px-4 [&_[class*="grid-area:header"]]:sm:px-6 [&_[class*="grid-area:header"]]:lg:px-8 [&_[class*="grid-area:content"]]:px-4 [&_[class*="grid-area:content"]]:sm:px-6 [&_[class*="grid-area:content"]]:lg:px-8',
592
+ false: ""
593
+ }
594
+ },
595
+ defaultVariants: {
596
+ hasMargin: !1
597
+ }
598
+ }
599
+ ), ye = n("[grid-area:header]", {
600
+ variants: {
601
+ backgroundColor: {
602
+ white: "bg-transparent",
603
+ gray: "bg-gray-100"
604
+ }
605
+ },
606
+ defaultVariants: {
607
+ backgroundColor: "white"
608
+ }
609
+ }), be = n(
610
+ "[grid-area:content] overflow-y-auto min-h-0",
611
+ {
612
+ variants: {
613
+ backgroundColor: {
614
+ white: "bg-transparent",
615
+ gray: "bg-gray-100"
616
+ }
617
+ },
618
+ defaultVariants: {
619
+ backgroundColor: "white"
620
+ }
621
+ }
622
+ ), je = l(function({ children: t, className: e, backgroundColor: a = "white", ...o }, i) {
623
+ return /* @__PURE__ */ s.jsx(
624
+ "div",
625
+ {
626
+ ref: i,
627
+ className: ye({ backgroundColor: a, className: e }),
628
+ ...o,
629
+ children: t
630
+ }
631
+ );
632
+ }), we = l(function({ children: t, className: e, backgroundColor: a = "white", ...o }, i) {
633
+ return /* @__PURE__ */ s.jsx(
634
+ "div",
635
+ {
636
+ ref: i,
637
+ className: be({ backgroundColor: a, className: e }),
638
+ ...o,
639
+ children: t
640
+ }
641
+ );
642
+ }), Ne = l(
643
+ ({ children: r, className: t, hasMargin: e = !1, ...a }, o) => /* @__PURE__ */ s.jsx(
644
+ "div",
645
+ {
646
+ ref: o,
647
+ className: ve({ hasMargin: e, className: t }),
648
+ ...a,
649
+ children: r
650
+ }
651
+ )
652
+ ), ca = Object.assign(Ne, {
653
+ HeaderRegion: je,
654
+ ContentRegion: we
655
+ }), Be = n(
656
+ [
657
+ // Base styles: flex container that centers content
658
+ "flex",
659
+ "items-center",
660
+ "justify-center",
661
+ "flex-col",
662
+ "gap-3",
663
+ // Ensure it takes available space
664
+ "flex-grow",
665
+ "w-full"
666
+ ],
667
+ {
668
+ variants: {
669
+ minimal: {
670
+ false: [
671
+ // Full height for standalone page loading
672
+ "min-h-96",
673
+ "h-full"
674
+ ],
675
+ true: [
676
+ // Minimal height for inline loading states
677
+ "min-h-32",
678
+ "py-8"
679
+ ]
680
+ },
681
+ fullscreen: {
682
+ true: ["fixed", "inset-0", "z-100", "bg-background"],
683
+ false: []
684
+ }
685
+ },
686
+ defaultVariants: {
687
+ minimal: !1,
688
+ fullscreen: !1
689
+ }
690
+ }
691
+ ), Re = n([
692
+ "text-foreground-light",
693
+ "text-sm",
694
+ "text-center",
695
+ "max-w-xs"
696
+ ]), da = j.forwardRef(
697
+ function({
698
+ type: t = "bar",
699
+ size: e = "sm",
700
+ color: a = "primary",
701
+ ariaLabel: o = "Loading page",
702
+ message: i,
703
+ fullscreen: c = !1,
704
+ minimal: u = !1,
705
+ className: f,
706
+ children: p,
707
+ ...m
708
+ }, g) {
709
+ return /* @__PURE__ */ s.jsxs(
710
+ "div",
711
+ {
712
+ ref: g,
713
+ className: d(Be({ minimal: u, fullscreen: c }), f),
714
+ ...m,
715
+ children: [
716
+ /* @__PURE__ */ s.jsx("div", { className: "max-w-xs w-full flex justify-center", children: /* @__PURE__ */ s.jsx(
717
+ V,
718
+ {
719
+ type: t,
720
+ size: e,
721
+ color: a,
722
+ ariaLabel: o
723
+ }
724
+ ) }),
725
+ i && /* @__PURE__ */ s.jsx("p", { className: Re(), "aria-live": "polite", children: i }),
726
+ p
727
+ ]
728
+ }
729
+ );
730
+ }
731
+ ), Le = n("grid w-full gap-4 grid-cols-12"), Se = n("", {
732
+ variants: {
733
+ span: {
734
+ 1: "col-span-1",
735
+ 2: "col-span-2",
736
+ 3: "col-span-3",
737
+ 4: "col-span-4",
738
+ 5: "col-span-5",
739
+ 6: "col-span-6",
740
+ 7: "col-span-7",
741
+ 8: "col-span-8",
742
+ 9: "col-span-9",
743
+ 10: "col-span-10",
744
+ 11: "col-span-11",
745
+ 12: "col-span-12"
746
+ }
747
+ },
748
+ defaultVariants: {
749
+ span: "4"
750
+ }
751
+ }), Ce = l(
752
+ function({ className: t, children: e, ...a }, o) {
753
+ return /* @__PURE__ */ s.jsx(
754
+ "div",
755
+ {
756
+ ref: o,
757
+ className: d(Le(), t),
758
+ ...a,
759
+ children: e
760
+ }
761
+ );
762
+ }
763
+ ), Ve = l(
764
+ function({ span: t = 4, className: e, children: a, ...o }, i) {
765
+ const c = Math.min(12, Math.max(1, t));
766
+ return /* @__PURE__ */ s.jsx(
767
+ "div",
768
+ {
769
+ ref: i,
770
+ className: d(
771
+ Se({ span: `${c}` }),
772
+ e
773
+ ),
774
+ ...o,
775
+ children: a
776
+ }
777
+ );
778
+ }
779
+ ), ua = Object.assign(Ce, {
780
+ Column: Ve
781
+ }), ze = n(
782
+ "bg-background flex flex-col h-full ease-in-out justify-between",
783
+ {
784
+ variants: {
785
+ collapsed: {
786
+ true: "w-16",
787
+ false: "w-56"
788
+ }
789
+ },
790
+ defaultVariants: {
791
+ collapsed: !1
792
+ }
793
+ }
794
+ ), b = n(
795
+ "w-full flex p-3 items-center gap-2 rounded-md hover:text-primary hover:bg-primary-soft focus:outline-none focus-visible:ring-2 focus-visible:ring-primary transition-all",
796
+ {
797
+ variants: {
798
+ active: {
799
+ true: "bg-primary/10 text-primary",
800
+ false: "text-ghost"
801
+ },
802
+ disabled: {
803
+ true: "opacity-50 pointer-events-none",
804
+ false: ""
805
+ },
806
+ collapsed: {
807
+ true: "justify-center",
808
+ false: ""
809
+ }
810
+ },
811
+ defaultVariants: {
812
+ active: !1,
813
+ disabled: !1,
814
+ collapsed: !1
815
+ }
816
+ }
817
+ ), He = n("", {
818
+ variants: {
819
+ expanded: {
820
+ true: "bg-neutral-light",
821
+ false: ""
822
+ }
823
+ },
824
+ defaultVariants: {
825
+ expanded: !1
826
+ }
827
+ }), Te = n(
828
+ "w-full flex p-3 items-center gap-2 rounded-md hover:text-primary hover:bg-primary-soft focus:outline-none focus-visible:ring-2 focus-visible:ring-primary transition-all",
829
+ {
830
+ variants: {
831
+ collapsed: {
832
+ true: "justify-center",
833
+ false: ""
834
+ }
835
+ },
836
+ defaultVariants: {
837
+ collapsed: !1
838
+ }
839
+ }
840
+ ), Pe = n("flex flex-col gap-2 ml-3"), h = n("flex items-center justify-center size-5"), R = S(null), L = () => {
841
+ const r = C(R);
842
+ if (!r)
843
+ throw new Error("SideBar compound components must be used within SideBar");
844
+ return r;
845
+ }, Ae = l(
846
+ (r, t) => {
847
+ const { icon: e, children: a, href: o, active: i, ...c } = r, { isCollapsed: u } = L(), f = c;
848
+ return /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsxs(
849
+ "a",
850
+ {
851
+ ref: t,
852
+ href: o,
853
+ className: b({
854
+ disabled: !!r["aria-disabled"],
855
+ active: i,
856
+ collapsed: u
857
+ }),
858
+ title: u ? String(a) : void 0,
859
+ ...f,
860
+ children: [
861
+ e && /* @__PURE__ */ s.jsx("span", { className: d(h()), children: e }),
862
+ !u && /* @__PURE__ */ s.jsx(
863
+ x,
864
+ {
865
+ as: "span",
866
+ color: "inherit",
867
+ fontSize: "sm",
868
+ fontWeight: "normal",
869
+ className: "truncate",
870
+ children: a
871
+ }
872
+ )
873
+ ]
874
+ }
875
+ ) });
876
+ }
877
+ ), _e = l(
878
+ function({ children: t, label: e, icon: a, defaultExpanded: o = !0, ...i }, c) {
879
+ const { isCollapsed: u, expandSidebar: f } = L(), [p, m] = w(o), g = (y) => {
880
+ y.preventDefault(), m(!p);
881
+ }, v = (y) => {
882
+ y.preventDefault(), f(), m(!0);
883
+ };
884
+ return u ? /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
885
+ "button",
886
+ {
887
+ type: "button",
888
+ className: b({
889
+ active: !1,
890
+ collapsed: !0
891
+ }),
892
+ title: String(e),
893
+ onClick: v,
894
+ children: a && /* @__PURE__ */ s.jsx("span", { className: d(h()), children: a })
895
+ }
896
+ ) }) : /* @__PURE__ */ s.jsxs(
897
+ "li",
898
+ {
899
+ ref: c,
900
+ className: He({
901
+ expanded: p
902
+ }),
903
+ ...i,
904
+ children: [
905
+ /* @__PURE__ */ s.jsxs(
906
+ "button",
907
+ {
908
+ type: "button",
909
+ className: Te({
910
+ collapsed: !1
911
+ }),
912
+ onClick: g,
913
+ children: [
914
+ a && /* @__PURE__ */ s.jsx("span", { className: d(h()), children: a }),
915
+ /* @__PURE__ */ s.jsx(
916
+ x,
917
+ {
918
+ as: "span",
919
+ color: "inherit",
920
+ fontSize: "sm",
921
+ className: "flex-1 truncate",
922
+ children: e
923
+ }
924
+ ),
925
+ /* @__PURE__ */ s.jsx(
926
+ N,
927
+ {
928
+ as: p ? z : B,
929
+ size: "xs",
930
+ color: "inherit"
931
+ }
932
+ )
933
+ ]
934
+ }
935
+ ),
936
+ p && /* @__PURE__ */ s.jsx("ul", { className: d(Pe()), children: t })
937
+ ]
938
+ }
939
+ );
940
+ }
941
+ ), Ie = l(
942
+ ({ children: r, defaultCollapsed: t = !1, onCollapseChange: e, ...a }, o) => {
943
+ const [i, c] = w(t), u = () => {
944
+ const p = !i;
945
+ c(p), e?.(p);
946
+ }, f = () => {
947
+ i && (c(!1), e?.(!1));
948
+ };
949
+ return /* @__PURE__ */ s.jsx(
950
+ R.Provider,
951
+ {
952
+ value: { isCollapsed: i, toggleCollapsed: u, expandSidebar: f },
953
+ children: /* @__PURE__ */ s.jsxs(
954
+ "nav",
955
+ {
956
+ ref: o,
957
+ className: ze({ collapsed: i }),
958
+ "aria-label": "Sidebar",
959
+ ...a,
960
+ children: [
961
+ /* @__PURE__ */ s.jsx("div", { className: "flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-background py-2", children: /* @__PURE__ */ s.jsx("ul", { className: "flex flex-col gap-1 mx-2", children: r }) }),
962
+ /* @__PURE__ */ s.jsx("div", { className: "mx-2 mb-2", children: /* @__PURE__ */ s.jsxs(
963
+ "button",
964
+ {
965
+ onClick: u,
966
+ className: b({
967
+ collapsed: i,
968
+ active: !1,
969
+ disabled: !1
970
+ }),
971
+ "aria-label": i ? "Expand sidebar" : "Collapse sidebar",
972
+ title: i ? "Expand sidebar" : "Collapse sidebar",
973
+ children: [
974
+ /* @__PURE__ */ s.jsx("span", { className: d(h()), children: /* @__PURE__ */ s.jsx(
975
+ N,
976
+ {
977
+ as: i ? B : H,
978
+ size: "sm",
979
+ color: "inherit"
980
+ }
981
+ ) }),
982
+ !i && /* @__PURE__ */ s.jsx(
983
+ x,
984
+ {
985
+ as: "span",
986
+ color: "inherit",
987
+ fontSize: "sm",
988
+ className: "truncate",
989
+ children: "Collapse"
990
+ }
991
+ )
992
+ ]
993
+ }
994
+ ) })
995
+ ]
996
+ }
997
+ )
998
+ }
999
+ );
1000
+ }
1001
+ ), pa = Object.assign(Ie, {
1002
+ Item: Ae,
1003
+ Group: _e
1004
+ }), ke = n(
1005
+ "w-full flex items-center px-6 py-4 border-b border-border shadow-xs bg-white",
1006
+ {
1007
+ variants: {},
1008
+ defaultVariants: {}
1009
+ }
1010
+ ), Ge = n("flex items-center gap-3 min-w-0 flex-1"), Me = n("flex items-center gap-2 ml-auto"), Fe = n(
1011
+ "px-2.5 py-1.5 rounded-md text-sm cursor-pointer transition-colors",
1012
+ {
1013
+ variants: {
1014
+ active: {
1015
+ true: "bg-primary/10 text-primary",
1016
+ false: "hover:text-primary text-ghost"
1017
+ }
1018
+ },
1019
+ defaultVariants: {
1020
+ active: !1
1021
+ }
1022
+ }
1023
+ ), Oe = n("flex items-center gap-2 ml-4"), Ee = n("flex items-center gap-2 mr-4"), We = l(
1024
+ function({ children: t, className: e, ...a }, o) {
1025
+ return /* @__PURE__ */ s.jsx("nav", { ref: o, className: Oe({ className: e }), ...a, children: t });
1026
+ }
1027
+ ), De = l(
1028
+ function({ children: t, className: e, ...a }, o) {
1029
+ return /* @__PURE__ */ s.jsx("div", { ref: o, className: Ee({ className: e }), ...a, children: t });
1030
+ }
1031
+ ), $e = l(
1032
+ function({ children: t, className: e, ...a }, o) {
1033
+ return /* @__PURE__ */ s.jsx("div", { ref: o, className: Ge({ className: e }), ...a, children: t });
1034
+ }
1035
+ ), qe = l(
1036
+ function({ children: t, className: e, ...a }, o) {
1037
+ return /* @__PURE__ */ s.jsx("div", { ref: o, className: Me({ className: e }), ...a, children: t });
1038
+ }
1039
+ ), Je = l(
1040
+ function({ children: t, className: e, active: a, ...o }, i) {
1041
+ return /* @__PURE__ */ s.jsx(
1042
+ "div",
1043
+ {
1044
+ ref: i,
1045
+ className: Fe({ active: a, className: e }),
1046
+ "aria-current": a ? "page" : void 0,
1047
+ ...o,
1048
+ children: t
1049
+ }
1050
+ );
1051
+ }
1052
+ ), Ke = l(
1053
+ ({ children: r, className: t, ...e }, a) => /* @__PURE__ */ s.jsx("header", { ref: a, className: ke({ className: t }), ...e, children: r })
1054
+ ), fa = Object.assign(Ke, {
1055
+ Leading: $e,
1056
+ Trailing: qe,
1057
+ NavItem: Je,
1058
+ Nav: We,
1059
+ Actions: De
1060
+ });
1061
+ export {
1062
+ ta as A,
1063
+ sa as B,
1064
+ na as F,
1065
+ ia as P,
1066
+ pa as S,
1067
+ fa as T,
1068
+ ra as a,
1069
+ oa as b,
1070
+ la as c,
1071
+ ca as d,
1072
+ da as e,
1073
+ ua as f
1074
+ };