@dimasbaguspm/versaur 0.0.58 → 0.0.60

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