@dimasbaguspm/versaur 0.0.57 → 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.
Files changed (61) hide show
  1. package/dist/js/desktop-breakpoint-CuSom-sN.js +47 -0
  2. package/dist/js/feedbacks/index.js +1 -1
  3. package/dist/js/forms/index.js +1 -1
  4. package/dist/js/helpers/index.js +14 -0
  5. package/dist/js/{image-rectangle-K9jmTTED.js → image-rectangle-CCvXv24a.js} +819 -926
  6. package/dist/js/{index-DOdDlCoL.js → index-BDtz_hQY.js} +520 -802
  7. package/dist/js/index.js +72 -59
  8. package/dist/js/jsx-runtime-C5mzlN2N.js +284 -0
  9. package/dist/js/layouts/index.js +9 -8
  10. package/dist/js/navigation/index.js +1 -1
  11. package/dist/js/overlays/index.js +2 -2
  12. package/dist/js/primitive/index.js +2 -2
  13. package/dist/js/providers/index.js +1 -1
  14. package/dist/js/{skeleton-BNZyaRjo.js → skeleton-BRwIW26B.js} +6 -5
  15. package/dist/js/{snackbar-DH8jCh2V.js → snackbar-CTq4MLir.js} +14 -13
  16. package/dist/js/{tabs-CmfJNCe6.js → tabs-BQs53hHL.js} +8 -7
  17. package/dist/js/{time-picker-input-BgbyllDK.js → time-picker-input-Disd231b.js} +24 -23
  18. package/dist/js/{tooltip-nZW9TUz3.js → tooltip-Dpx3TpR6.js} +211 -205
  19. package/dist/js/top-bar-B2nzldfs.js +1074 -0
  20. package/dist/js/{use-snackbars-Cou8L41F.js → use-snackbars-B6lnVjrX.js} +14 -13
  21. package/dist/types/helpers/index.d.ts +1 -0
  22. package/dist/types/helpers/match-media/built-in/components/desktop-breakpoint.d.ts +18 -0
  23. package/dist/types/helpers/match-media/built-in/components/index.d.ts +3 -0
  24. package/dist/types/helpers/match-media/built-in/components/mobile-breakpoint.d.ts +18 -0
  25. package/dist/types/helpers/match-media/built-in/components/tablet-breakpoint.d.ts +18 -0
  26. package/dist/types/helpers/match-media/built-in/hooks/index.d.ts +3 -0
  27. package/dist/types/helpers/match-media/built-in/hooks/use-desktop-breakpoint.d.ts +11 -0
  28. package/dist/types/helpers/match-media/built-in/hooks/use-mobile-breakpoint.d.ts +11 -0
  29. package/dist/types/helpers/match-media/built-in/hooks/use-tablet-breakpoint.d.ts +11 -0
  30. package/dist/types/helpers/match-media/built-in/index.d.ts +2 -0
  31. package/dist/types/helpers/match-media/constants.d.ts +7 -0
  32. package/dist/types/helpers/match-media/index.d.ts +4 -0
  33. package/dist/types/helpers/match-media/match-media.d.ts +25 -0
  34. package/dist/types/helpers/match-media/test-helpers.d.ts +21 -0
  35. package/dist/types/helpers/match-media/use-match-media.d.ts +15 -0
  36. package/dist/types/index.d.ts +1 -0
  37. package/dist/types/layouts/app-layout/app-layout.atoms.d.ts +6 -0
  38. package/dist/types/layouts/app-layout/app-layout.d.ts +8 -0
  39. package/dist/types/layouts/app-layout/index.d.ts +2 -0
  40. package/dist/types/layouts/app-layout/types.d.ts +52 -0
  41. package/dist/types/layouts/index.d.ts +2 -1
  42. package/dist/types/layouts/page-content/types.d.ts +0 -6
  43. package/dist/types/layouts/page-header/types.d.ts +14 -6
  44. package/dist/types/layouts/page-layout/index.d.ts +2 -0
  45. package/dist/types/layouts/page-layout/page-layout.atoms.d.ts +3 -0
  46. package/dist/types/layouts/page-layout/page-layout.d.ts +5 -0
  47. package/dist/types/layouts/page-layout/types.d.ts +37 -0
  48. package/dist/types/layouts/side-bar/side-bar.atoms.d.ts +1 -1
  49. package/dist/types/layouts/side-bar/side-bar.d.ts +1 -1
  50. package/dist/types/layouts/side-bar/types.d.ts +55 -18
  51. package/dist/types/overlays/menu/types.d.ts +8 -8
  52. package/dist/types/primitive/button-menu/types.d.ts +1 -1
  53. package/dist/types/primitive/button-menu-icon/types.d.ts +1 -1
  54. package/dist/utils/enforce-subpath-import.js +5 -2
  55. package/package.json +5 -1
  56. package/dist/js/top-bar-Do2JqSqe.js +0 -908
  57. package/dist/types/layouts/app-bar/app-bar.atoms.d.ts +0 -25
  58. package/dist/types/layouts/app-bar/app-bar.d.ts +0 -9
  59. package/dist/types/layouts/app-bar/index.d.ts +0 -2
  60. package/dist/types/layouts/app-bar/types.d.ts +0 -46
  61. package/dist/types/overlays/menu/use-menu.d.ts +0 -15
@@ -1,908 +0,0 @@
1
- import { c as l, j as t, a as i } from "./index-DOdDlCoL.js";
2
- import * as b from "react";
3
- import { forwardRef as o } from "react";
4
- import { n as x } from "./image-rectangle-K9jmTTED.js";
5
- import "./snackbar-DH8jCh2V.js";
6
- import { L as y } from "./skeleton-BNZyaRjo.js";
7
- const w = l(
8
- "w-full flex flex-wrap items-center pt-3 mb-3 gap-2 bg-white [&>[data-versaur-appbar-bottom]]:basis-full [&>[data-versaur-appbar-bottom]]:w-full [&:has([data-versaur-appbar-bottom])>[data-versaur-appbar-leading]]:pl-4 [&:has([data-versaur-appbar-bottom])>[data-versaur-appbar-trailing]]:pr-4 [&:not(:has([data-versaur-appbar-bottom]))]:px-4",
9
- {
10
- variants: {
11
- variant: {
12
- primary: "",
13
- secondary: "",
14
- tertiary: "",
15
- ghost: "",
16
- neutral: ""
17
- }
18
- },
19
- defaultVariants: {
20
- variant: "primary"
21
- }
22
- }
23
- ), B = l(
24
- "flex flex-col justify-center min-w-0 flex-grow",
25
- {
26
- variants: {
27
- placement: {
28
- start: "items-start",
29
- center: "items-center",
30
- end: "items-end"
31
- }
32
- },
33
- defaultVariants: {
34
- placement: "start"
35
- }
36
- }
37
- ), N = o(
38
- ({ children: s, className: a }, e) => /* @__PURE__ */ t.jsx(
39
- "div",
40
- {
41
- ref: e,
42
- "data-versaur-appbar-bottom": !0,
43
- className: i("w-full flex items-center min-h-[2.5rem] mt-2", a),
44
- children: s
45
- }
46
- )
47
- ), V = o(
48
- ({ children: s, className: a }, e) => /* @__PURE__ */ t.jsx(
49
- "div",
50
- {
51
- ref: e,
52
- className: i("flex items-center", a),
53
- "data-versaur-appbar-leading": !0,
54
- children: s
55
- }
56
- )
57
- ), z = o(({ children: s, ...a }, e) => /* @__PURE__ */ t.jsx(
58
- x,
59
- {
60
- ...a,
61
- as: "h1",
62
- ref: e,
63
- fontSize: "lg",
64
- fontWeight: "semibold",
65
- ellipsis: !0,
66
- clamp: 1,
67
- children: s
68
- }
69
- )), S = o(({ children: s, ...a }, e) => /* @__PURE__ */ t.jsx(
70
- x,
71
- {
72
- ...a,
73
- ref: e,
74
- as: "p",
75
- fontSize: "xs",
76
- fontWeight: "normal",
77
- ellipsis: !0,
78
- clamp: 1,
79
- color: "gray",
80
- children: s
81
- }
82
- )), T = o(
83
- ({ children: s, className: a }, e) => /* @__PURE__ */ t.jsx(
84
- "div",
85
- {
86
- ref: e,
87
- className: i("flex items-center justify-end gap-2", a),
88
- "data-versaur-appbar-trailing": !0,
89
- children: s
90
- }
91
- )
92
- ), C = o(
93
- ({ children: s, className: a, placement: e }, r) => /* @__PURE__ */ t.jsx(
94
- "div",
95
- {
96
- ref: r,
97
- className: i(B({ placement: e }), a),
98
- children: s
99
- }
100
- )
101
- ), H = ({
102
- children: s,
103
- className: a,
104
- variant: e = "primary"
105
- }) => /* @__PURE__ */ t.jsx(
106
- "header",
107
- {
108
- className: i(w({ variant: e }), a),
109
- role: "banner",
110
- children: s
111
- }
112
- ), La = Object.assign(H, {
113
- Leading: V,
114
- Headline: z,
115
- Subtitle: S,
116
- Trailing: T,
117
- Center: C,
118
- Bottom: N
119
- }), L = l(
120
- "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",
121
- {
122
- variants: {
123
- variant: {
124
- primary: "",
125
- secondary: "",
126
- ghost: "",
127
- neutral: "",
128
- tertiary: ""
129
- },
130
- size: {
131
- sm: "h-12 text-sm",
132
- md: "h-16 text-base",
133
- lg: "h-20 text-lg"
134
- }
135
- },
136
- defaultVariants: {
137
- variant: "primary",
138
- size: "md"
139
- }
140
- }
141
- ), A = l(
142
- "flex flex-col items-center justify-center gap-1",
143
- {
144
- variants: {
145
- active: {
146
- true: "text-primary",
147
- false: "text-ghost"
148
- },
149
- as: {
150
- 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",
151
- div: ""
152
- }
153
- },
154
- defaultVariants: {
155
- active: !1,
156
- as: "button"
157
- }
158
- }
159
- ), P = o(
160
- ({
161
- as: s = "button",
162
- icon: a,
163
- label: e,
164
- active: r = !1,
165
- className: n,
166
- children: c,
167
- ...d
168
- }, u) => /* @__PURE__ */ t.jsxs(
169
- s,
170
- {
171
- ref: u,
172
- "aria-current": r ? "page" : void 0,
173
- className: A({ active: r, className: n, as: s }),
174
- ...d,
175
- children: [
176
- a && a,
177
- c && c,
178
- e && /* @__PURE__ */ t.jsx("span", { className: "text-xs mt-0.5", children: e })
179
- ]
180
- }
181
- )
182
- ), I = ({
183
- children: s,
184
- variant: a = "primary",
185
- size: e = "md",
186
- className: r,
187
- ...n
188
- }) => /* @__PURE__ */ t.jsx(
189
- "nav",
190
- {
191
- role: "navigation",
192
- "aria-label": "Bottom navigation",
193
- className: L({ variant: a, size: e, className: r }),
194
- ...n,
195
- children: s
196
- }
197
- ), Aa = Object.assign(I, {
198
- Item: P
199
- }), R = l("flex items-center", {
200
- variants: {
201
- orientation: {
202
- horizontal: "flex-row",
203
- vertical: "flex-col"
204
- },
205
- alignment: {
206
- start: "justify-start",
207
- center: "justify-center",
208
- end: "justify-end",
209
- between: "justify-between",
210
- around: "justify-around",
211
- evenly: "justify-evenly"
212
- },
213
- gap: {
214
- xs: "gap-1",
215
- sm: "gap-2",
216
- md: "gap-3",
217
- lg: "gap-4",
218
- xl: "gap-6"
219
- },
220
- fluid: {
221
- true: "[&>*]:flex-1",
222
- false: ""
223
- },
224
- overlay: {
225
- true: "flex-nowrap overflow-x-auto",
226
- false: "flex-wrap"
227
- }
228
- },
229
- defaultVariants: {
230
- orientation: "horizontal",
231
- alignment: "start",
232
- gap: "md",
233
- fluid: !1,
234
- overlay: !1
235
- }
236
- }), Pa = o(
237
- function({
238
- className: a,
239
- children: e,
240
- orientation: r = "horizontal",
241
- alignment: n = "start",
242
- gap: c = "md",
243
- fluid: d = !1,
244
- hasMargin: u,
245
- overlay: p = !1,
246
- ...m
247
- }, f) {
248
- return /* @__PURE__ */ t.jsx(
249
- "div",
250
- {
251
- ref: f,
252
- className: i(
253
- R({
254
- orientation: r,
255
- alignment: n,
256
- gap: c,
257
- fluid: d,
258
- overlay: p
259
- }),
260
- u && "mb-4",
261
- a
262
- ),
263
- role: "group",
264
- ...m,
265
- children: e
266
- }
267
- );
268
- }
269
- ), G = l("flex items-center", {
270
- variants: {
271
- orientation: {
272
- horizontal: "flex-row",
273
- vertical: "flex-col"
274
- },
275
- alignment: {
276
- start: "justify-start",
277
- center: "justify-center",
278
- end: "justify-end",
279
- between: "justify-between",
280
- around: "justify-around",
281
- evenly: "justify-evenly"
282
- },
283
- gap: {
284
- xs: "gap-1",
285
- sm: "gap-2",
286
- md: "gap-3",
287
- lg: "gap-4",
288
- xl: "gap-6"
289
- },
290
- fluid: {
291
- true: "[&>*]:flex-1",
292
- false: ""
293
- },
294
- overlay: {
295
- true: "flex-nowrap overflow-x-auto",
296
- false: "flex-wrap"
297
- }
298
- },
299
- defaultVariants: {
300
- orientation: "horizontal",
301
- alignment: "start",
302
- gap: "md",
303
- fluid: !1,
304
- overlay: !1
305
- }
306
- }), Ia = o(
307
- function({
308
- className: a,
309
- children: e,
310
- orientation: r = "horizontal",
311
- alignment: n = "start",
312
- gap: c = "md",
313
- fluid: d = !1,
314
- hasMargin: u,
315
- overlay: p = !1,
316
- ...m
317
- }, f) {
318
- return /* @__PURE__ */ t.jsx(
319
- "div",
320
- {
321
- ref: f,
322
- className: i(
323
- G({
324
- orientation: r,
325
- alignment: n,
326
- gap: c,
327
- fluid: d,
328
- overlay: p
329
- }),
330
- u && "mb-4",
331
- a
332
- ),
333
- role: "group",
334
- ...m,
335
- children: e
336
- }
337
- );
338
- }
339
- ), k = l("flex items-center", {
340
- variants: {
341
- orientation: {
342
- horizontal: "flex-row",
343
- vertical: "flex-col"
344
- },
345
- alignment: {
346
- start: "justify-start",
347
- center: "justify-center",
348
- end: "justify-end",
349
- between: "justify-between",
350
- around: "justify-around",
351
- evenly: "justify-evenly"
352
- },
353
- gap: {
354
- xs: "gap-1",
355
- sm: "gap-2",
356
- md: "gap-3",
357
- lg: "gap-4",
358
- xl: "gap-6"
359
- },
360
- fluid: {
361
- true: "[&>*]:flex-1",
362
- false: ""
363
- },
364
- overlay: {
365
- true: "flex-nowrap overflow-x-auto",
366
- false: "flex-wrap"
367
- }
368
- },
369
- defaultVariants: {
370
- orientation: "horizontal",
371
- alignment: "start",
372
- gap: "md",
373
- fluid: !1,
374
- overlay: !1
375
- }
376
- }), Ra = o(
377
- function({
378
- className: a,
379
- children: e,
380
- orientation: r = "horizontal",
381
- alignment: n = "start",
382
- gap: c = "md",
383
- fluid: d = !1,
384
- hasMargin: u,
385
- overlay: p = !1,
386
- ...m
387
- }, f) {
388
- return /* @__PURE__ */ t.jsx(
389
- "div",
390
- {
391
- ref: f,
392
- className: i(
393
- k({
394
- orientation: r,
395
- alignment: n,
396
- gap: c,
397
- fluid: d,
398
- overlay: p
399
- }),
400
- u && "mb-4",
401
- a
402
- ),
403
- role: "group",
404
- ...m,
405
- children: e
406
- }
407
- );
408
- }
409
- ), F = l("w-full mb-4", {
410
- variants: {
411
- backgroundColor: {
412
- white: "bg-white",
413
- gray: "bg-neutral"
414
- }
415
- },
416
- defaultVariants: {
417
- backgroundColor: "white"
418
- }
419
- }), O = l("w-full mx-auto pt-4 md:pt-10", {
420
- variants: {
421
- size: {
422
- fluid: "max-w-full px-0",
423
- wide: "max-w-7xl px-6",
424
- narrow: "max-w-3xl px-4"
425
- }
426
- },
427
- defaultVariants: {
428
- size: "fluid"
429
- }
430
- }), W = l(
431
- "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4 mb-4"
432
- ), M = l("mb-4"), E = l(
433
- "flex-1 min-w-0 flex flex-col gap-2 w-full sm:w-auto"
434
- ), $ = l("flex items-center gap-2 flex-wrap"), q = l(
435
- "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"
436
- ), D = l("md:hidden"), J = l(
437
- "w-full flex items-center py-0 overflow-x-auto"
438
- ), K = o(
439
- ({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx(
440
- "div",
441
- {
442
- ref: r,
443
- className: i(W(), a),
444
- "data-versaur-page-header-top": !0,
445
- ...e,
446
- children: s
447
- }
448
- )
449
- ), Q = o(({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx(
450
- "div",
451
- {
452
- ref: r,
453
- className: i(M(), a),
454
- "data-versaur-page-header-breadcrumbs": !0,
455
- ...e,
456
- children: s
457
- }
458
- )), U = o(({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx(
459
- "div",
460
- {
461
- ref: r,
462
- className: i(E(), a),
463
- "data-versaur-page-header-content": !0,
464
- ...e,
465
- children: s
466
- }
467
- )), X = o((s, a) => /* @__PURE__ */ t.jsx(
468
- x,
469
- {
470
- ...s,
471
- as: "h1",
472
- fontSize: "xl",
473
- fontWeight: "semibold",
474
- ellipsis: !0,
475
- ref: a
476
- }
477
- )), Y = o(({ className: s, ...a }, e) => /* @__PURE__ */ t.jsx(
478
- x,
479
- {
480
- as: "p",
481
- fontSize: "sm",
482
- fontWeight: "normal",
483
- clamp: 2,
484
- ref: e,
485
- className: i("mb-2 sm:clamp-3", s),
486
- ...a
487
- }
488
- )), Z = o(({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx(
489
- "div",
490
- {
491
- ref: r,
492
- className: i($(), a),
493
- "data-versaur-page-header-badges": !0,
494
- ...e,
495
- children: s
496
- }
497
- )), _ = o(({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx(
498
- "div",
499
- {
500
- ref: r,
501
- className: i(q(), a),
502
- "data-versaur-page-header-actions": !0,
503
- ...e,
504
- children: s
505
- }
506
- )), aa = o(({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx(
507
- "div",
508
- {
509
- ref: r,
510
- className: i(D(), a),
511
- "data-versaur-page-header-mobile-actions": !0,
512
- ...e,
513
- children: s
514
- }
515
- )), ea = o(({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx(
516
- "div",
517
- {
518
- ref: r,
519
- className: i(J(), a),
520
- "data-versaur-page-header-bottom": !0,
521
- ...e,
522
- children: s
523
- }
524
- )), ta = o(
525
- ({
526
- children: s,
527
- className: a,
528
- size: e = "fluid",
529
- backgroundColor: r = "white",
530
- title: n,
531
- subtitle: c,
532
- breadcrumbs: d,
533
- badges: u,
534
- actions: p,
535
- mobileActions: m,
536
- tabs: f,
537
- ...g
538
- }, h) => {
539
- const j = f;
540
- return /* @__PURE__ */ t.jsx(
541
- "header",
542
- {
543
- ref: h,
544
- className: i(F({ backgroundColor: r })),
545
- role: "banner",
546
- ...g,
547
- children: /* @__PURE__ */ t.jsxs("div", { className: i(O({ size: e }), a), children: [
548
- d && /* @__PURE__ */ t.jsx(Q, { children: d }),
549
- /* @__PURE__ */ t.jsxs(K, { children: [
550
- /* @__PURE__ */ t.jsxs(U, { children: [
551
- /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
552
- /* @__PURE__ */ t.jsx(X, { children: n }),
553
- m && /* @__PURE__ */ t.jsx(aa, { children: m })
554
- ] }),
555
- c && /* @__PURE__ */ t.jsx(Y, { children: c }),
556
- u && /* @__PURE__ */ t.jsx(Z, { children: u })
557
- ] }),
558
- p && /* @__PURE__ */ t.jsx(_, { children: p })
559
- ] }),
560
- j && /* @__PURE__ */ t.jsx(ea, { children: f }),
561
- s
562
- ] })
563
- }
564
- );
565
- }
566
- ), Ga = ta, sa = l("w-full", {
567
- variants: {
568
- backgroundColor: {
569
- white: "bg-white",
570
- gray: "bg-neutral"
571
- }
572
- },
573
- defaultVariants: {
574
- backgroundColor: "white"
575
- }
576
- }), ra = l("w-full mx-auto relative", {
577
- variants: {
578
- size: {
579
- fluid: "max-w-full px-0",
580
- wide: "max-w-7xl px-6 pb-10",
581
- narrow: "max-w-3xl px-4 pb-10"
582
- },
583
- template: {
584
- "single-column": "grid grid-cols-1",
585
- "two-column": "grid grid-cols-1 md:grid-cols-2 gap-6",
586
- "two-column-asymmetric-left": "grid grid-cols-1 md:grid-cols-3 gap-6",
587
- "two-column-asymmetric-right": "grid grid-cols-1 md:grid-cols-3 gap-6"
588
- }
589
- },
590
- defaultVariants: {
591
- size: "fluid",
592
- template: "single-column"
593
- }
594
- }), ka = b.forwardRef(
595
- function({
596
- size: a = "fluid",
597
- template: e = "single-column",
598
- backgroundColor: r = "white",
599
- className: n,
600
- children: c,
601
- ...d
602
- }, u) {
603
- return /* @__PURE__ */ t.jsx(
604
- "div",
605
- {
606
- ref: u,
607
- className: i(sa({ backgroundColor: r })),
608
- ...d,
609
- children: /* @__PURE__ */ t.jsx(
610
- "div",
611
- {
612
- className: i(
613
- ra({ size: a, template: e }),
614
- n
615
- ),
616
- children: /* @__PURE__ */ t.jsx("div", { children: c })
617
- }
618
- )
619
- }
620
- );
621
- }
622
- ), na = l(
623
- [
624
- // Base styles: flex container that centers content
625
- "flex",
626
- "items-center",
627
- "justify-center",
628
- "flex-col",
629
- "gap-3",
630
- // Ensure it takes available space
631
- "flex-grow",
632
- "w-full"
633
- ],
634
- {
635
- variants: {
636
- minimal: {
637
- false: [
638
- // Full height for standalone page loading
639
- "min-h-96",
640
- "h-full"
641
- ],
642
- true: [
643
- // Minimal height for inline loading states
644
- "min-h-32",
645
- "py-8"
646
- ]
647
- },
648
- fullscreen: {
649
- true: ["fixed", "inset-0", "z-100", "bg-background"],
650
- false: []
651
- }
652
- },
653
- defaultVariants: {
654
- minimal: !1,
655
- fullscreen: !1
656
- }
657
- }
658
- ), oa = l([
659
- "text-foreground-light",
660
- "text-sm",
661
- "text-center",
662
- "max-w-xs"
663
- ]), Fa = b.forwardRef(
664
- function({
665
- type: a = "bar",
666
- size: e = "sm",
667
- color: r = "primary",
668
- ariaLabel: n = "Loading page",
669
- message: c,
670
- fullscreen: d = !1,
671
- minimal: u = !1,
672
- className: p,
673
- children: m,
674
- ...f
675
- }, g) {
676
- return /* @__PURE__ */ t.jsxs(
677
- "div",
678
- {
679
- ref: g,
680
- className: i(na({ minimal: u, fullscreen: d }), p),
681
- ...f,
682
- children: [
683
- /* @__PURE__ */ t.jsx("div", { className: "max-w-xs w-full flex justify-center", children: /* @__PURE__ */ t.jsx(
684
- y,
685
- {
686
- type: a,
687
- size: e,
688
- color: r,
689
- ariaLabel: n
690
- }
691
- ) }),
692
- c && /* @__PURE__ */ t.jsx("p", { className: oa(), "aria-live": "polite", children: c }),
693
- m
694
- ]
695
- }
696
- );
697
- }
698
- ), la = l("grid w-full gap-4 grid-cols-12"), ia = l("", {
699
- variants: {
700
- span: {
701
- 1: "col-span-1",
702
- 2: "col-span-2",
703
- 3: "col-span-3",
704
- 4: "col-span-4",
705
- 5: "col-span-5",
706
- 6: "col-span-6",
707
- 7: "col-span-7",
708
- 8: "col-span-8",
709
- 9: "col-span-9",
710
- 10: "col-span-10",
711
- 11: "col-span-11",
712
- 12: "col-span-12"
713
- }
714
- },
715
- defaultVariants: {
716
- span: "4"
717
- }
718
- }), ca = o(
719
- function({ className: a, children: e, ...r }, n) {
720
- return /* @__PURE__ */ t.jsx(
721
- "div",
722
- {
723
- ref: n,
724
- className: i(la(), a),
725
- ...r,
726
- children: e
727
- }
728
- );
729
- }
730
- ), da = o(
731
- function({ span: a = 4, className: e, children: r, ...n }, c) {
732
- const d = Math.min(12, Math.max(1, a));
733
- return /* @__PURE__ */ t.jsx(
734
- "div",
735
- {
736
- ref: c,
737
- className: i(
738
- ia({ span: `${d}` }),
739
- e
740
- ),
741
- ...n,
742
- children: r
743
- }
744
- );
745
- }
746
- ), Oa = Object.assign(ca, {
747
- Column: da
748
- }), v = l(
749
- "flex items-center gap-2 px-4 py-2 rounded-md hover:text-primary focus:outline-none transition-colors",
750
- {
751
- variants: {
752
- active: {
753
- true: "bg-primary/10 text-primary",
754
- false: "text-ghost"
755
- },
756
- disabled: {
757
- true: "opacity-50 pointer-events-none",
758
- false: ""
759
- }
760
- },
761
- defaultVariants: {
762
- active: !1,
763
- disabled: !1
764
- }
765
- }
766
- ), ua = o(
767
- (s, a) => {
768
- const { icon: e, children: r, href: n, onClick: c, active: d, ...u } = s;
769
- if (typeof n == "string") {
770
- const m = u;
771
- return /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsxs(
772
- "a",
773
- {
774
- ref: a,
775
- href: n,
776
- className: v({
777
- disabled: !!s["aria-disabled"],
778
- active: d
779
- }),
780
- ...m,
781
- children: [
782
- e,
783
- /* @__PURE__ */ t.jsx(x, { as: "span", color: "inherit", fontSize: "sm", children: r })
784
- ]
785
- }
786
- ) });
787
- } else {
788
- const m = u;
789
- return /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsxs(
790
- "button",
791
- {
792
- ref: a,
793
- type: "button",
794
- onClick: c,
795
- className: i(
796
- v({ disabled: !!m.disabled, active: d }),
797
- "w-full text-left"
798
- ),
799
- ...m,
800
- children: [
801
- e,
802
- /* @__PURE__ */ t.jsx(x, { as: "span", color: "inherit", fontSize: "sm", children: r })
803
- ]
804
- }
805
- ) });
806
- }
807
- }
808
- ), ma = o(
809
- function({ children: a, label: e, ...r }, n) {
810
- return /* @__PURE__ */ t.jsxs("li", { ref: n, className: "flex flex-col gap-2 mt-2", ...r, children: [
811
- /* @__PURE__ */ t.jsx(
812
- x,
813
- {
814
- as: "h2",
815
- fontSize: "xs",
816
- fontWeight: "semibold",
817
- color: "gray",
818
- className: "px-2",
819
- children: e
820
- }
821
- ),
822
- /* @__PURE__ */ t.jsx("ul", { className: "flex flex-col gap-1", children: a })
823
- ] });
824
- }
825
- ), pa = o(
826
- ({ children: s, ...a }, e) => /* @__PURE__ */ t.jsx(
827
- "nav",
828
- {
829
- ref: e,
830
- className: "w-56 bg-background border-r border-border flex flex-col my-2",
831
- "aria-label": "Sidebar",
832
- ...a,
833
- children: /* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-background", children: /* @__PURE__ */ t.jsx("ul", { className: "flex flex-col gap-1 mx-2", children: s }) })
834
- }
835
- )
836
- ), Wa = Object.assign(pa, {
837
- Item: ua,
838
- Group: ma
839
- }), fa = l(
840
- "w-full flex items-center px-6 py-4 border-b border-border shadow-xs bg-white",
841
- {
842
- variants: {},
843
- defaultVariants: {}
844
- }
845
- ), xa = l("flex items-center gap-3 min-w-0 flex-1"), ga = l("flex items-center gap-2 ml-auto"), va = l(
846
- "px-2.5 py-1.5 rounded-md text-sm cursor-pointer transition-colors",
847
- {
848
- variants: {
849
- active: {
850
- true: "bg-primary/10 text-primary",
851
- false: "hover:text-primary text-ghost"
852
- }
853
- },
854
- defaultVariants: {
855
- active: !1
856
- }
857
- }
858
- ), ba = l("flex items-center gap-2 ml-4"), ha = l("flex items-center gap-2 mr-4"), ja = o(
859
- function({ children: a, className: e, ...r }, n) {
860
- return /* @__PURE__ */ t.jsx("nav", { ref: n, className: ba({ className: e }), ...r, children: a });
861
- }
862
- ), ya = o(
863
- function({ children: a, className: e, ...r }, n) {
864
- return /* @__PURE__ */ t.jsx("div", { ref: n, className: ha({ className: e }), ...r, children: a });
865
- }
866
- ), wa = o(
867
- function({ children: a, className: e, ...r }, n) {
868
- return /* @__PURE__ */ t.jsx("div", { ref: n, className: xa({ className: e }), ...r, children: a });
869
- }
870
- ), Ba = o(
871
- function({ children: a, className: e, ...r }, n) {
872
- return /* @__PURE__ */ t.jsx("div", { ref: n, className: ga({ className: e }), ...r, children: a });
873
- }
874
- ), Na = o(
875
- function({ children: a, className: e, active: r, ...n }, c) {
876
- return /* @__PURE__ */ t.jsx(
877
- "div",
878
- {
879
- ref: c,
880
- className: va({ active: r, className: e }),
881
- "aria-current": r ? "page" : void 0,
882
- ...n,
883
- children: a
884
- }
885
- );
886
- }
887
- ), Va = o(
888
- ({ children: s, className: a, ...e }, r) => /* @__PURE__ */ t.jsx("header", { ref: r, className: fa({ className: a }), ...e, children: s })
889
- ), Ma = Object.assign(Va, {
890
- Leading: wa,
891
- Trailing: Ba,
892
- NavItem: Na,
893
- Nav: ja,
894
- Actions: ya
895
- });
896
- export {
897
- La as A,
898
- Aa as B,
899
- Ra as F,
900
- Ga as P,
901
- Wa as S,
902
- Ma as T,
903
- Pa as a,
904
- Ia as b,
905
- ka as c,
906
- Fa as d,
907
- Oa as e
908
- };