@dimasbaguspm/versaur 0.0.33 → 0.0.35

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 (36) hide show
  1. package/dist/js/{bottom-sheet-B3Rt2JC5.js → bottom-sheet-BYq9Nf57.js} +99 -108
  2. package/dist/js/{bottom-sheet-input-DRcyjeGh.js → bottom-sheet-input-Bo5LLNVg.js} +2 -2
  3. package/dist/js/forms/index.js +1 -1
  4. package/dist/js/{image-rectangle-oPc5hFMM.js → image-rectangle-BPmnlpnT.js} +904 -436
  5. package/dist/js/index.js +54 -51
  6. package/dist/js/layouts/index.js +1 -1
  7. package/dist/js/navigation/index.js +1 -1
  8. package/dist/js/overlays/index.js +3 -3
  9. package/dist/js/primitive/index.js +24 -21
  10. package/dist/js/{tabs-CKLbsCWq.js → tabs-C3wTfqhW.js} +1 -1
  11. package/dist/js/{tooltip-DNKTNCQm.js → tooltip-Dh1adQMb.js} +1 -1
  12. package/dist/js/{top-bar-Bg-zMaFY.js → top-bar-DNHnNH-S.js} +158 -138
  13. package/dist/types/layouts/badge-group/types.d.ts +5 -0
  14. package/dist/types/layouts/bottom-bar/bottom-bar.atoms.d.ts +1 -1
  15. package/dist/types/layouts/bottom-bar/bottom-bar.d.ts +1 -1
  16. package/dist/types/layouts/bottom-bar/types.d.ts +4 -3
  17. package/dist/types/layouts/button-group/types.d.ts +5 -0
  18. package/dist/types/layouts/filter-chip-group/types.d.ts +5 -0
  19. package/dist/types/overlays/menu/menu.atoms.d.ts +0 -6
  20. package/dist/types/overlays/menu/types.d.ts +6 -3
  21. package/dist/types/overlays/menu/use-menu.d.ts +4 -5
  22. package/dist/types/primitive/accordion/accordion.atoms.d.ts +23 -0
  23. package/dist/types/primitive/accordion/accordion.d.ts +20 -0
  24. package/dist/types/primitive/accordion/index.d.ts +2 -0
  25. package/dist/types/primitive/accordion/types.d.ts +76 -0
  26. package/dist/types/primitive/attribute/types.d.ts +5 -0
  27. package/dist/types/primitive/button-menu-icon/types.d.ts +2 -1
  28. package/dist/types/primitive/heading/heading.d.ts +7 -0
  29. package/dist/types/primitive/heading/index.d.ts +2 -0
  30. package/dist/types/primitive/heading/types.d.ts +37 -0
  31. package/dist/types/primitive/hr/hr.d.ts +20 -0
  32. package/dist/types/primitive/hr/index.d.ts +2 -0
  33. package/dist/types/primitive/hr/types.d.ts +13 -0
  34. package/dist/types/primitive/index.d.ts +3 -0
  35. package/dist/utils/enforce-subpath-import.js +3 -0
  36. package/package.json +1 -1
@@ -1,9 +1,324 @@
1
1
  import { c as cva, j as jsxRuntimeExports, a as cn } from "./index-DOdDlCoL.js";
2
2
  import * as React from "react";
3
- import React__default, { forwardRef, useState, useEffect, useCallback, useRef, useId, cloneElement, createContext, useContext } from "react";
4
- import { EllipsisVerticalIcon, X, XIcon, ImageOff } from "lucide-react";
3
+ import React__default, { createContext, useContext, forwardRef, useState, useEffect, useCallback, useRef, useId, cloneElement } from "react";
4
+ import { ChevronDown, EllipsisVerticalIcon, X, XIcon, ImageOff } from "lucide-react";
5
+ import ReactDOM from "react-dom";
5
6
  import { S as Skeleton } from "./skeleton-BNZyaRjo.js";
6
- const alertVariants = cva(
7
+ const AccordionContext = createContext(
8
+ null
9
+ ), useAccordionContext = () => {
10
+ const e = useContext(AccordionContext);
11
+ if (!e)
12
+ throw new Error(
13
+ "Accordion compound components must be used within Accordion"
14
+ );
15
+ return e;
16
+ }, accordionVariants = cva(
17
+ "border-b border-border bg-background overflow-hidden",
18
+ {
19
+ variants: {
20
+ disabled: {
21
+ true: "opacity-50 cursor-not-allowed",
22
+ false: ""
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ disabled: !1
27
+ }
28
+ }
29
+ ), accordionHeaderVariants = cva(
30
+ "flex items-center justify-between w-full p-4 text-left transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-light focus-visible:ring-inset",
31
+ {
32
+ variants: {
33
+ disabled: {
34
+ true: "cursor-not-allowed",
35
+ false: "cursor-pointer hover:bg-neutral-soft"
36
+ },
37
+ isOpen: {
38
+ true: "",
39
+ false: "bg-background"
40
+ }
41
+ },
42
+ defaultVariants: {
43
+ disabled: !1,
44
+ isOpen: !1
45
+ }
46
+ }
47
+ ), accordionContentVariants = cva(
48
+ "overflow-hidden transition-all duration-300",
49
+ {
50
+ variants: {
51
+ isOpen: {
52
+ true: "max-h-screen opacity-100",
53
+ false: "max-h-0 opacity-0"
54
+ }
55
+ },
56
+ defaultVariants: {
57
+ isOpen: !1
58
+ }
59
+ }
60
+ ), accordionContentInnerVariants = cva("p-4 pt-0"), accordionIconVariants = cva("transition-transform duration-200", {
61
+ variants: {
62
+ isOpen: {
63
+ true: "rotate-180",
64
+ false: "rotate-0"
65
+ }
66
+ },
67
+ defaultVariants: {
68
+ isOpen: !1
69
+ }
70
+ }), headingVariants = cva("", {
71
+ variants: {
72
+ color: {
73
+ primary: "text-primary",
74
+ secondary: "text-secondary",
75
+ tertiary: "text-tertiary",
76
+ ghost: "text-ghost",
77
+ neutral: "text-ghost",
78
+ success: "text-success",
79
+ info: "text-info",
80
+ warning: "text-warning",
81
+ danger: "text-danger",
82
+ inherit: "",
83
+ gray: "text-gray-500",
84
+ black: "text-black",
85
+ white: "text-white"
86
+ },
87
+ hasUnderline: {
88
+ true: "underline",
89
+ false: ""
90
+ },
91
+ isCapitalize: {
92
+ true: "capitalize",
93
+ false: ""
94
+ },
95
+ hasMargin: {
96
+ true: "mb-4",
97
+ false: ""
98
+ },
99
+ align: {
100
+ left: "text-left",
101
+ center: "text-center",
102
+ right: "text-right",
103
+ justify: "text-justify"
104
+ },
105
+ italic: {
106
+ true: "italic",
107
+ false: ""
108
+ },
109
+ clamp: {
110
+ 1: "line-clamp-1",
111
+ 2: "line-clamp-2",
112
+ 3: "line-clamp-3",
113
+ 4: "line-clamp-4",
114
+ 5: "line-clamp-5",
115
+ none: ""
116
+ },
117
+ ellipsis: {
118
+ true: "truncate",
119
+ false: ""
120
+ },
121
+ level: {
122
+ 1: "font-bold text-2xl leading-loose",
123
+ 2: "font-semibold text-xl leading-relaxed",
124
+ 3: "font-medium text-base leading-relaxed",
125
+ 4: "font-bold text-sm leading-normal",
126
+ 5: "font-semibold text-sm leading-normal",
127
+ 6: "font-medium text-xs leading-normal"
128
+ }
129
+ },
130
+ defaultVariants: {
131
+ color: "ghost",
132
+ hasUnderline: !1,
133
+ isCapitalize: !1,
134
+ hasMargin: !1,
135
+ align: "left",
136
+ italic: !1,
137
+ clamp: "none",
138
+ ellipsis: !1,
139
+ level: 1
140
+ }
141
+ }), Heading = forwardRef(
142
+ ({
143
+ level: e = 3,
144
+ color: t = "ghost",
145
+ hasUnderline: r = !1,
146
+ isCapitalize: i = !1,
147
+ hasMargin: s = !1,
148
+ align: o = "left",
149
+ italic: n = !1,
150
+ clamp: l = "none",
151
+ ellipsis: u = !1,
152
+ className: c,
153
+ children: f,
154
+ ...a
155
+ }, d) => {
156
+ const b = `h${e}`;
157
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
158
+ b,
159
+ {
160
+ ref: d,
161
+ className: cn(
162
+ headingVariants({
163
+ color: t,
164
+ hasUnderline: r,
165
+ isCapitalize: i,
166
+ hasMargin: s,
167
+ align: o,
168
+ italic: n,
169
+ clamp: l,
170
+ ellipsis: u,
171
+ level: e
172
+ }),
173
+ c
174
+ ),
175
+ ...a,
176
+ children: f
177
+ }
178
+ );
179
+ }
180
+ );
181
+ Heading.displayName = "Heading";
182
+ const iconVariants = cva("inline-flex items-center justify-center", {
183
+ variants: {
184
+ size: {
185
+ xs: "w-3 h-3",
186
+ sm: "w-4 h-4",
187
+ md: "w-5 h-5",
188
+ lg: "w-6 h-6",
189
+ xl: "w-8 h-8",
190
+ inherit: "w-auto h-auto"
191
+ },
192
+ color: {
193
+ primary: "text-primary",
194
+ secondary: "text-secondary",
195
+ tertiary: "text-tertiary",
196
+ ghost: "text-ghost",
197
+ neutral: "text-neutral",
198
+ success: "text-success",
199
+ info: "text-info",
200
+ warning: "text-warning",
201
+ danger: "text-danger",
202
+ gray: "text-gray-500",
203
+ black: "text-black",
204
+ white: "text-white",
205
+ inherit: ""
206
+ }
207
+ },
208
+ defaultVariants: {
209
+ size: "md",
210
+ color: "primary"
211
+ }
212
+ }), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: i = "md", className: s, ...o }, n) {
213
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
214
+ t,
215
+ {
216
+ ref: n,
217
+ className: iconVariants({ color: r, size: i, className: s }),
218
+ ...o
219
+ }
220
+ );
221
+ }), AccordionTitle = forwardRef(function({ className: t, children: r, ...i }, s) {
222
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
223
+ Heading,
224
+ {
225
+ ref: s,
226
+ level: 4,
227
+ className: cn("font-medium", t),
228
+ ...i,
229
+ color: "black",
230
+ children: r
231
+ }
232
+ );
233
+ }), AccordionContent = forwardRef(function({ className: t, children: r, ...i }, s) {
234
+ const { isOpen: o } = useAccordionContext();
235
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
236
+ "div",
237
+ {
238
+ ref: s,
239
+ className: cn(accordionContentVariants({ isOpen: o }), t),
240
+ ...i,
241
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: accordionContentInnerVariants(), children: r })
242
+ }
243
+ );
244
+ }), AccordionIcon = forwardRef(function({ as: t, ...r }, i) {
245
+ const { isOpen: s } = useAccordionContext();
246
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
247
+ Icon,
248
+ {
249
+ ref: i,
250
+ as: t,
251
+ color: "ghost",
252
+ size: "sm",
253
+ className: accordionIconVariants({ isOpen: s }),
254
+ ...r
255
+ }
256
+ );
257
+ }), AccordionRoot = forwardRef(
258
+ function({
259
+ title: t,
260
+ subtitle: r,
261
+ isDefaultOpen: i = !1,
262
+ disabled: s = !1,
263
+ hasMargin: o,
264
+ className: n,
265
+ children: l,
266
+ ...u
267
+ }, c) {
268
+ const [f, a] = useState(i), d = () => {
269
+ s || a((v) => !v);
270
+ }, b = {
271
+ isOpen: f,
272
+ toggle: d,
273
+ disabled: s
274
+ };
275
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContext.Provider, { value: b, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
276
+ "div",
277
+ {
278
+ ref: c,
279
+ className: cn(
280
+ accordionVariants({ disabled: s }),
281
+ n,
282
+ o && "mb-4"
283
+ ),
284
+ ...u,
285
+ children: [
286
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
287
+ "div",
288
+ {
289
+ role: "button",
290
+ className: accordionHeaderVariants({ disabled: s, isOpen: f }),
291
+ onClick: d,
292
+ "aria-disabled": s,
293
+ "aria-expanded": f,
294
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between w-full gap-2", children: [
295
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 flex-grow", children: [
296
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: t }),
297
+ r && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: r })
298
+ ] }),
299
+ /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionIcon, { as: ChevronDown })
300
+ ] })
301
+ }
302
+ ),
303
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
304
+ "div",
305
+ {
306
+ className: cn(
307
+ "overflow-hidden transition-all duration-300",
308
+ f ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
309
+ ),
310
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 pt-2", children: l })
311
+ }
312
+ )
313
+ ]
314
+ }
315
+ ) });
316
+ }
317
+ ), Accordion = Object.assign(AccordionRoot, {
318
+ Title: AccordionTitle,
319
+ Content: AccordionContent,
320
+ Icon: AccordionIcon
321
+ }), alertVariants = cva(
7
322
  "relative flex items-center gap-2 rounded-md p-2 text-sm transition-all duration-200",
8
323
  {
9
324
  variants: {
@@ -139,25 +454,25 @@ const alertVariants = cva(
139
454
  }
140
455
  }
141
456
  ), AlertIcon = forwardRef(
142
- ({ className: e, children: t, ...r }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: s, className: cn(alertIconVariants(), e), ...r, children: t })
457
+ ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: i, className: cn(alertIconVariants(), e), ...r, children: t })
143
458
  ), AlertRoot = forwardRef(
144
459
  ({
145
460
  variant: e = "default",
146
461
  color: t = "neutral",
147
462
  icon: r,
148
- className: s,
149
- children: i,
463
+ className: i,
464
+ children: s,
150
465
  ...o
151
- }, a) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
466
+ }, n) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
152
467
  "div",
153
468
  {
154
- ref: a,
469
+ ref: n,
155
470
  role: "alert",
156
- className: cn(alertVariants({ variant: e, color: t }), s),
471
+ className: cn(alertVariants({ variant: e, color: t }), i),
157
472
  ...o,
158
473
  children: [
159
474
  r && /* @__PURE__ */ jsxRuntimeExports.jsx(AlertIcon, { children: r }),
160
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: i })
475
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1", children: s })
161
476
  ]
162
477
  }
163
478
  )
@@ -225,19 +540,19 @@ const alertVariants = cva(
225
540
  children: e,
226
541
  className: t,
227
542
  color: r = "primary",
228
- fontSize: s = "base",
229
- fontWeight: i = "medium",
543
+ fontSize: i = "base",
544
+ fontWeight: s = "medium",
230
545
  quiet: o = !1,
231
- ...a
232
- }, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
546
+ ...n
547
+ }, l) => /* @__PURE__ */ jsxRuntimeExports.jsx(
233
548
  "a",
234
549
  {
235
- ref: n,
550
+ ref: l,
236
551
  className: cn(
237
- anchorVariants({ color: r, fontSize: s, fontWeight: i, quiet: o }),
552
+ anchorVariants({ color: r, fontSize: i, fontWeight: s, quiet: o }),
238
553
  t
239
554
  ),
240
- ...a,
555
+ ...n,
241
556
  children: e
242
557
  }
243
558
  )
@@ -315,18 +630,18 @@ const alertVariants = cva(
315
630
  as: e = "span",
316
631
  color: t = "ghost",
317
632
  hasUnderline: r = !1,
318
- isCapitalize: s = !1,
319
- align: i = "left",
633
+ isCapitalize: i = !1,
634
+ align: s = "left",
320
635
  italic: o = !1,
321
- clamp: a = "none",
322
- ellipsis: n = !1,
323
- fontSize: l,
636
+ clamp: n = "none",
637
+ ellipsis: l = !1,
638
+ fontSize: u,
324
639
  fontWeight: c,
325
- className: u,
326
- children: g,
640
+ className: f,
641
+ children: a,
327
642
  ...d
328
- }, m) => {
329
- const w = [
643
+ }, b) => {
644
+ const j = [
330
645
  "h1",
331
646
  "h2",
332
647
  "h3",
@@ -336,48 +651,56 @@ const alertVariants = cva(
336
651
  "p",
337
652
  "span",
338
653
  "label"
339
- ].includes(e) ? e : "span", p = l ? `text-${l}` : "", v = c ? `font-${c}` : "";
654
+ ].includes(e) ? e : "span", w = u ? `text-${u}` : "", R = c ? `font-${c}` : "";
340
655
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
341
656
  e,
342
657
  {
343
- ref: m,
658
+ ref: b,
344
659
  className: cn(
345
660
  textVariants({
346
661
  color: t,
347
662
  hasUnderline: r,
348
- isCapitalize: s,
349
- align: i,
663
+ isCapitalize: i,
664
+ align: s,
350
665
  italic: o,
351
- clamp: a,
352
- ellipsis: n,
666
+ clamp: n,
667
+ ellipsis: l,
353
668
  // @ts-expect-error - `as` is not a valid variant
354
- as: w
669
+ as: j
355
670
  }),
356
- p,
357
- v,
358
- u
671
+ w,
672
+ R,
673
+ f
359
674
  ),
360
675
  ...d,
361
- children: g
676
+ children: a
362
677
  }
363
678
  );
364
679
  }
365
680
  ), Attribute = forwardRef(
366
- function({ title: t, children: r, className: s, ...i }, o) {
367
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: o, className: cn("space-y-1", s), ...i, children: [
368
- /* @__PURE__ */ jsxRuntimeExports.jsx(
369
- Text,
370
- {
371
- as: "h4",
372
- fontSize: "sm",
373
- fontWeight: "normal",
374
- color: "gray",
375
- className: "leading-none",
376
- children: t
377
- }
378
- ),
379
- /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "base", fontWeight: "normal", children: r })
380
- ] });
681
+ function({ title: t, children: r, className: i, hasMargin: s, ...o }, n) {
682
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
683
+ "div",
684
+ {
685
+ ref: n,
686
+ className: cn("space-y-1", i, s && "mb-4"),
687
+ ...o,
688
+ children: [
689
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
690
+ Text,
691
+ {
692
+ as: "h4",
693
+ fontSize: "sm",
694
+ fontWeight: "normal",
695
+ color: "gray",
696
+ className: "leading-none",
697
+ children: t
698
+ }
699
+ ),
700
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "base", fontWeight: "normal", children: r })
701
+ ]
702
+ }
703
+ );
381
704
  }
382
705
  );
383
706
  function getColSpan(e = 1) {
@@ -440,18 +763,18 @@ function getGridCols(e = 4) {
440
763
  return "grid-cols-4";
441
764
  }
442
765
  }
443
- const AttributeListItem = forwardRef(function({ children: t, className: r, span: s = 1, title: i, ...o }, a) {
444
- const n = getColSpan(s);
445
- return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: a, className: cn(n, r), ...o, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Attribute, { title: i, children: t }) });
766
+ const AttributeListItem = forwardRef(function({ children: t, className: r, span: i = 1, title: s, ...o }, n) {
767
+ const l = getColSpan(i);
768
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: n, className: cn(l, r), ...o, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Attribute, { title: s, children: t }) });
446
769
  }), AttributeListRoot = forwardRef(
447
- function({ children: t, className: r, columns: s = 4, ...i }, o) {
448
- const a = getGridCols(s);
770
+ function({ children: t, className: r, columns: i = 4, ...s }, o) {
771
+ const n = getGridCols(i);
449
772
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
450
773
  "ul",
451
774
  {
452
775
  ref: o,
453
- className: cn("grid gap-4", a, r),
454
- ...i,
776
+ className: cn("grid gap-4", n, r),
777
+ ...s,
455
778
  children: t
456
779
  }
457
780
  );
@@ -501,39 +824,39 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
501
824
  variant: e = "primary",
502
825
  size: t = "md",
503
826
  shape: r = "circle",
504
- className: s,
505
- children: i,
827
+ className: i,
828
+ children: s,
506
829
  ...o
507
- }, a) => /* @__PURE__ */ jsxRuntimeExports.jsx(
830
+ }, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
508
831
  "div",
509
832
  {
510
- ref: a,
511
- className: cn(avatarVariants({ variant: e, size: t, shape: r }), s),
833
+ ref: n,
834
+ className: cn(avatarVariants({ variant: e, size: t, shape: r }), i),
512
835
  ...o,
513
- children: i
836
+ children: s
514
837
  }
515
838
  )
516
839
  ), AvatarImage = forwardRef(
517
- ({ src: e, alt: t, className: r, onError: s, ...i }, o) => {
518
- const [a, n] = useState(!1);
840
+ ({ src: e, alt: t, className: r, onError: i, ...s }, o) => {
841
+ const [n, l] = useState(!1);
519
842
  useEffect(() => {
520
- n(!1);
843
+ l(!1);
521
844
  }, [e]);
522
- const l = useCallback(
845
+ const u = useCallback(
523
846
  (c) => {
524
- n(!0), s?.(c);
847
+ l(!0), i?.(c);
525
848
  },
526
- [s]
849
+ [i]
527
850
  );
528
- return a ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
851
+ return n ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
529
852
  "img",
530
853
  {
531
854
  ref: o,
532
855
  src: e,
533
856
  alt: t,
534
857
  className: cn(avatarImageVariants(), r),
535
- onError: l,
536
- ...i
858
+ onError: u,
859
+ ...s
537
860
  }
538
861
  );
539
862
  }
@@ -700,14 +1023,14 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
700
1023
  variant: e = "default",
701
1024
  shape: t = "square",
702
1025
  color: r = "primary",
703
- size: s = "md",
704
- iconLeft: i,
1026
+ size: i = "md",
1027
+ iconLeft: s,
705
1028
  iconRight: o,
706
- className: a,
707
- children: n,
708
- ...l
1029
+ className: n,
1030
+ children: l,
1031
+ ...u
709
1032
  }, c) => {
710
- const d = !(n != null && n !== "") && !!(i || o);
1033
+ const d = !(l != null && l !== "") && !!(s || o);
711
1034
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
712
1035
  "span",
713
1036
  {
@@ -717,20 +1040,20 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
717
1040
  variant: e,
718
1041
  color: r,
719
1042
  shape: t,
720
- size: s,
1043
+ size: i,
721
1044
  iconOnly: d
722
1045
  }),
723
- a
1046
+ n
724
1047
  ),
725
- ...l,
1048
+ ...u,
726
1049
  children: d ? (
727
1050
  // Icon-only mode: display only the icon
728
- i || o
1051
+ s || o
729
1052
  ) : (
730
1053
  // Normal mode: display icon(s) and text
731
1054
  /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
732
- i,
733
- n,
1055
+ s,
1056
+ l,
734
1057
  o
735
1058
  ] })
736
1059
  )
@@ -751,7 +1074,7 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
751
1074
  size: "md"
752
1075
  }
753
1076
  }), BrandLogo = forwardRef(
754
- ({ shape: e = "square", size: t, ...r }, s) => {
1077
+ ({ shape: e = "square", size: t, ...r }, i) => {
755
1078
  const o = {
756
1079
  square: SvgSpenicleSquare,
757
1080
  rounded: SvgSpenicleRounded,
@@ -760,19 +1083,19 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
760
1083
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
761
1084
  o,
762
1085
  {
763
- ref: s,
1086
+ ref: i,
764
1087
  ...r,
765
1088
  className: cn("inline-block", brandSizeClass({ size: t }))
766
1089
  }
767
1090
  );
768
1091
  }
769
1092
  ), Brand = forwardRef(
770
- ({ name: e = "spenicle", size: t = "md", shape: r, ...s }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1093
+ ({ name: e = "spenicle", size: t = "md", shape: r, ...i }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx(
771
1094
  "span",
772
1095
  {
773
- ref: i,
1096
+ ref: s,
774
1097
  className: cn("inline-flex items-center gap-2"),
775
- ...s,
1098
+ ...i,
776
1099
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(BrandLogo, { shape: r, size: t, "aria-hidden": "true" })
777
1100
  }
778
1101
  )
@@ -830,28 +1153,36 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
830
1153
  function({
831
1154
  className: t,
832
1155
  variant: r = "primary",
833
- size: s = "md",
834
- disabled: i = !1,
1156
+ size: i = "md",
1157
+ disabled: s = !1,
835
1158
  type: o = "button",
836
- children: a,
837
- ...n
838
- }, l) {
1159
+ children: n,
1160
+ ...l
1161
+ }, u) {
839
1162
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
840
1163
  "button",
841
1164
  {
842
- ref: l,
1165
+ ref: u,
843
1166
  type: o,
844
- className: cn(buttonVariants({ variant: r, size: s }), t),
845
- disabled: i,
846
- "aria-disabled": i,
847
- inert: i ? !0 : void 0,
848
- ...n,
849
- children: a
1167
+ className: cn(buttonVariants({ variant: r, size: i }), t),
1168
+ disabled: s,
1169
+ "aria-disabled": s,
1170
+ inert: s ? !0 : void 0,
1171
+ ...l,
1172
+ children: n
850
1173
  }
851
1174
  );
852
1175
  }
853
- ), menuVariants = cva(
854
- "absolute z-70 min-w-40 bg-background rounded-lg border border-border transition-all duration-200 ease-out will-change-transform shadow-lg",
1176
+ ), OverlayPortal = ({
1177
+ container: e,
1178
+ children: t
1179
+ }) => {
1180
+ if (typeof window > "u" || typeof document > "u")
1181
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: t });
1182
+ const r = e ?? document.body;
1183
+ return r ? ReactDOM.createPortal(t, r) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: t });
1184
+ }, menuVariants = cva(
1185
+ "z-70 min-w-40 bg-background rounded-lg border border-border transition-all duration-200 ease-out will-change-transform shadow-lg",
855
1186
  {
856
1187
  variants: {
857
1188
  size: {
@@ -869,139 +1200,286 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
869
1200
  }
870
1201
  }
871
1202
  );
872
- function useMenuOutsideClick(e, t, r, s) {
1203
+ function useMenuOutsideClick(e, t, r, i) {
873
1204
  useEffect(() => {
874
1205
  if (!e) return;
875
- function i(o) {
876
- !t.current?.contains(o.target) && !r.current?.contains(o.target) && s();
1206
+ function s(o) {
1207
+ !t.current?.contains(o.target) && !r.current?.contains(o.target) && i();
877
1208
  }
878
- return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
879
- }, [e, s, t, r]);
1209
+ return document.addEventListener("mousedown", s), () => document.removeEventListener("mousedown", s);
1210
+ }, [e, i, t, r]);
880
1211
  }
881
- function useMenuEscapeClose(e, t) {
882
- useEffect(() => {
883
- if (!e) return;
884
- const r = (s) => {
885
- s.key === "Escape" && t();
886
- };
887
- return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
888
- }, [e, t]);
1212
+ function getScrollableAncestors(e) {
1213
+ const t = [];
1214
+ let r = e.parentElement;
1215
+ for (; r && r !== document.documentElement; ) {
1216
+ const i = getComputedStyle(r);
1217
+ (i.overflow === "auto" || i.overflow === "scroll" || i.overflowY === "auto" || i.overflowY === "scroll" || i.overflowX === "auto" || i.overflowX === "scroll") && t.push(r), r = r.parentElement;
1218
+ }
1219
+ return t.push(document.documentElement), t;
889
1220
  }
890
- function useMenuPosition(e, t, r, s = "bottom-start", i) {
891
- const [o, a] = useState({});
892
- return useEffect(() => {
893
- if (!e || !t.current || !r.current) {
894
- a({});
1221
+ function isTriggerVisible(e, t) {
1222
+ const r = e.getBoundingClientRect();
1223
+ if (r.bottom < 0 || r.top > window.innerHeight || r.right < 0 || r.left > window.innerWidth)
1224
+ return !1;
1225
+ for (const i of t) {
1226
+ if (i === document.documentElement) continue;
1227
+ const s = i.getBoundingClientRect();
1228
+ if (r.bottom < s.top || r.top > s.bottom || r.right < s.left || r.left > s.right)
1229
+ return !1;
1230
+ }
1231
+ return !0;
1232
+ }
1233
+ function useMenuPosition(e, t, r, i = "bottom-start", s) {
1234
+ const [o, n] = useState({ isReady: !1 }), l = useCallback(() => {
1235
+ if (!e || !t.current) {
1236
+ n({ isReady: !1 });
1237
+ return;
1238
+ }
1239
+ if (!r.current) {
1240
+ const m = setTimeout(() => {
1241
+ n({ isReady: !1 });
1242
+ }, 0);
1243
+ return () => clearTimeout(m);
1244
+ }
1245
+ const u = t.current, c = r.current, f = getScrollableAncestors(u);
1246
+ if (!isTriggerVisible(u, f)) {
1247
+ n({ isReady: !1 });
895
1248
  return;
896
1249
  }
897
- const n = t.current, l = r.current, c = i || document.documentElement, u = n.getBoundingClientRect(), g = c.getBoundingClientRect(), d = l.style.visibility, m = l.style.position;
898
- l.style.visibility = "hidden", l.style.position = "absolute";
899
- const h = l.getBoundingClientRect();
900
- l.style.visibility = d, l.style.position = m;
901
- const w = g.bottom - u.bottom - 8, p = u.top - g.top - 8, v = g.right - u.left - 8, y = u.right - g.left - 8;
902
- let b = s;
903
- s === "auto" && (w >= h.height && v >= h.width ? b = "bottom-start" : w >= h.height && y >= h.width ? b = "bottom-end" : p >= h.height && v >= h.width ? b = "top-start" : p >= h.height && y >= h.width ? b = "top-end" : b = w >= p ? "bottom-start" : "top-start");
904
- const f = {};
905
- switch (b) {
906
- case "bottom-start":
907
- f.top = u.height + 4, f.left = 0;
908
- break;
909
- case "bottom-end":
910
- f.top = u.height + 4, f.right = 0;
911
- break;
912
- case "top-start":
913
- f.bottom = u.height + 4, f.left = 0;
914
- break;
915
- case "top-end":
916
- f.bottom = u.height + 4, f.right = 0;
917
- break;
1250
+ const a = u.getBoundingClientRect(), d = window.innerWidth, b = window.innerHeight;
1251
+ let v = null;
1252
+ s && ("getBoundingClientRect" in s ? v = s : "current" in s && (v = s.current));
1253
+ const j = v || document.documentElement, w = j === document.documentElement ? { top: 0, bottom: b, left: 0, right: d } : j.getBoundingClientRect(), R = c.style.visibility, E = c.style.position, C = c.style.opacity;
1254
+ c.style.visibility = "hidden", c.style.position = "absolute", c.style.opacity = "0";
1255
+ const x = c.getBoundingClientRect();
1256
+ c.style.visibility = R, c.style.position = E, c.style.opacity = C;
1257
+ const N = w.bottom - a.bottom - 8, I = a.top - w.top - 8, V = w.right - a.left - 8, A = a.right - w.left - 8;
1258
+ let p = i;
1259
+ if (i === "auto") {
1260
+ const h = [
1261
+ {
1262
+ name: "bottom-start",
1263
+ fits: N >= x.height && V >= x.width,
1264
+ spaceUsed: N,
1265
+ priority: 1
1266
+ // Prefer bottom-start as default
1267
+ },
1268
+ {
1269
+ name: "bottom-end",
1270
+ fits: N >= x.height && A >= x.width,
1271
+ spaceUsed: N,
1272
+ priority: 2
1273
+ },
1274
+ {
1275
+ name: "top-start",
1276
+ fits: I >= x.height && V >= x.width,
1277
+ spaceUsed: I,
1278
+ priority: 3
1279
+ },
1280
+ {
1281
+ name: "top-end",
1282
+ fits: I >= x.height && A >= x.width,
1283
+ spaceUsed: I,
1284
+ priority: 4
1285
+ }
1286
+ ].filter((y) => y.fits);
1287
+ h.length > 0 ? p = h.sort(
1288
+ (y, S) => y.priority - S.priority
1289
+ )[0].name : N >= I ? p = V >= A ? "bottom-start" : "bottom-end" : p = V >= A ? "top-start" : "top-end";
918
1290
  }
919
- if (i) {
920
- const R = {
921
- top: b.startsWith("bottom") ? u.bottom + 4 : u.top - h.height - 4,
922
- left: b.endsWith("start") ? u.left : u.right - h.width,
923
- width: h.width,
924
- height: h.height
1291
+ const g = {};
1292
+ if (s)
1293
+ switch (g.position = "fixed", p) {
1294
+ case "bottom-start":
1295
+ g.top = a.bottom + 4, g.left = a.left;
1296
+ break;
1297
+ case "bottom-end":
1298
+ g.top = a.bottom + 4, g.right = window.innerWidth - a.right;
1299
+ break;
1300
+ case "top-start":
1301
+ g.bottom = window.innerHeight - a.top + 4, g.left = a.left;
1302
+ break;
1303
+ case "top-end":
1304
+ g.bottom = window.innerHeight - a.top + 4, g.right = window.innerWidth - a.right;
1305
+ break;
1306
+ }
1307
+ else
1308
+ switch (g.position = "absolute", p) {
1309
+ case "bottom-start":
1310
+ g.top = a.height + 4, g.left = 0;
1311
+ break;
1312
+ case "bottom-end":
1313
+ g.top = a.height + 4, g.right = 0;
1314
+ break;
1315
+ case "top-start":
1316
+ g.bottom = a.height + 4, g.left = 0;
1317
+ break;
1318
+ case "top-end":
1319
+ g.bottom = a.height + 4, g.right = 0;
1320
+ break;
1321
+ }
1322
+ if (s) {
1323
+ const m = {
1324
+ top: p.startsWith("bottom") ? a.bottom + 4 : a.top - x.height - 4,
1325
+ left: p.endsWith("start") ? a.left : a.right - x.width,
1326
+ width: x.width,
1327
+ height: x.height
925
1328
  };
926
- if (R.left < g.left + 8) {
927
- const x = g.left + 8 - R.left;
928
- b.endsWith("start") ? f.left = (f.left || 0) + x : f.right = (f.right || 0) - x;
929
- } else if (R.left + R.width > g.right - 8) {
930
- const x = R.left + R.width - (g.right - 8);
931
- b.endsWith("start") ? f.left = (f.left || 0) - x : f.right = (f.right || 0) + x;
1329
+ if (m.left < w.left + 8) {
1330
+ const h = w.left + 8 - m.left;
1331
+ p.endsWith("start") ? g.left = (g.left || 0) + h : g.right = (g.right || 0) - h;
1332
+ } else if (m.left + m.width > w.right - 8) {
1333
+ const h = m.left + m.width - (w.right - 8);
1334
+ p.endsWith("start") ? g.left = (g.left || 0) - h : g.right = (g.right || 0) + h;
932
1335
  }
933
- if (b.startsWith("bottom")) {
934
- const x = Math.max(
1336
+ if (p.startsWith("bottom")) {
1337
+ const h = Math.max(
935
1338
  50,
936
- g.bottom - u.bottom - 16
1339
+ w.bottom - a.bottom - 16
937
1340
  );
938
- h.height > x && (f.maxHeight = x);
1341
+ x.height > h && (g.maxHeight = h);
939
1342
  } else {
940
- const x = Math.max(
1343
+ const h = Math.max(
941
1344
  50,
942
- u.top - g.top - 16
1345
+ a.top - w.top - 16
943
1346
  );
944
- h.height > x && (f.maxHeight = x);
1347
+ x.height > h && (g.maxHeight = h);
1348
+ }
1349
+ } else {
1350
+ const m = {
1351
+ top: p.startsWith("bottom") ? a.height + 4 : -x.height - 4,
1352
+ left: p.endsWith("start") ? 0 : -x.width,
1353
+ width: x.width,
1354
+ height: x.height
1355
+ }, h = {
1356
+ left: a.left,
1357
+ right: a.right,
1358
+ top: a.top,
1359
+ bottom: a.bottom
1360
+ };
1361
+ if (h.left + m.left < 8) {
1362
+ const y = 8 - (h.left + m.left);
1363
+ p.endsWith("start") ? g.left = (g.left || 0) + y : g.right = (g.right || 0) - y;
1364
+ } else if (h.left + m.left + m.width > d - 8) {
1365
+ const y = h.left + m.left + m.width - (d - 8);
1366
+ p.endsWith("start") ? g.left = (g.left || 0) - y : g.right = (g.right || 0) + y;
945
1367
  }
946
1368
  }
947
- a(f);
948
- }, [e, s, i, t, r]), o;
1369
+ g.isReady = !0, n(g);
1370
+ }, [e, i, t, r, s]);
1371
+ return useEffect(() => {
1372
+ l();
1373
+ }, [l]), useEffect(() => {
1374
+ if (!e || !t.current) return;
1375
+ const u = t.current, c = getScrollableAncestors(u);
1376
+ let f = !1;
1377
+ const a = () => {
1378
+ f || (requestAnimationFrame(() => {
1379
+ l(), f = !1;
1380
+ }), f = !0);
1381
+ };
1382
+ return c.forEach((d) => {
1383
+ d === document.documentElement ? (window.addEventListener("scroll", a, { passive: !0 }), window.addEventListener("resize", a, { passive: !0 })) : d.addEventListener("scroll", a, { passive: !0 });
1384
+ }), () => {
1385
+ c.forEach((d) => {
1386
+ d === document.documentElement ? (window.removeEventListener("scroll", a), window.removeEventListener("resize", a)) : d.removeEventListener("scroll", a);
1387
+ });
1388
+ };
1389
+ }, [e, l, t]), o;
949
1390
  }
950
- const MenuContent = forwardRef(
1391
+ const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider, useMenuProvider = () => {
1392
+ const e = useContext(MenuContext);
1393
+ if (!e)
1394
+ throw new Error("useMenuProvider must be used within a MenuProvider");
1395
+ return e;
1396
+ }, MenuContent = forwardRef(
951
1397
  ({ children: e }, t) => /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { ref: t, className: "flex flex-col gap-1", children: e })
952
1398
  ), MenuItem = forwardRef(
953
- ({ children: e, disabled: t, ...r }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: s, ...r, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
954
- Button,
955
- {
956
- variant: "ghost",
957
- className: cn("block text-left w-full"),
958
- disabled: t,
959
- children: e
960
- }
961
- ) })
1399
+ ({ children: e, disabled: t, onClick: r, ...i }, s) => {
1400
+ const { preserve: o, onClose: n } = useMenuProvider(), l = (u) => {
1401
+ r?.(u), o || n();
1402
+ };
1403
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: s, ...i, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1404
+ Button,
1405
+ {
1406
+ variant: "ghost",
1407
+ className: cn("block text-left w-full"),
1408
+ disabled: t,
1409
+ onClick: l,
1410
+ children: e
1411
+ }
1412
+ ) });
1413
+ }
962
1414
  ), MenuRoot = ({
963
1415
  isOpen: e,
964
1416
  onOutsideClick: t,
965
1417
  size: r = "md",
966
- content: s,
967
- children: i,
968
- placement: o = "bottom-start",
969
- container: a
1418
+ content: i,
1419
+ children: s,
1420
+ placement: o = "auto",
1421
+ container: n,
1422
+ preserve: l
970
1423
  }) => {
971
- const n = useRef(null), l = useRef(null), c = useId();
972
- useMenuOutsideClick(e, l, n, t), useMenuEscapeClose(e, t);
973
- const u = useMenuPosition(
1424
+ const u = useRef(null), c = useRef(null), f = useId();
1425
+ useMenuOutsideClick(e, c, u, t);
1426
+ const a = useMenuPosition(
974
1427
  e,
975
- n,
976
- l,
1428
+ u,
1429
+ c,
977
1430
  o,
978
- a
979
- ), g = {
980
- ...u,
981
- overflowY: u.maxHeight ? "auto" : void 0,
982
- overflowX: u.maxWidth ? "auto" : void 0
983
- };
984
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-fit", children: [
985
- cloneElement(i, {
986
- // @ts-expect-error: ref is valid for button or forwardRef components
987
- ref: n,
988
- "aria-haspopup": "menu",
989
- "aria-expanded": e,
990
- "aria-controls": c
991
- }),
992
- e && /* @__PURE__ */ jsxRuntimeExports.jsx(
993
- "div",
994
- {
995
- id: c,
996
- ref: l,
997
- className: cn(menuVariants({ size: r, open: e })),
998
- style: g,
999
- role: "menu",
1000
- "aria-hidden": !e,
1001
- children: s
1002
- }
1003
- )
1004
- ] });
1431
+ n || null
1432
+ ), d = {
1433
+ ...a,
1434
+ position: a.position || "absolute",
1435
+ overflowY: a.maxHeight ? "auto" : void 0,
1436
+ overflowX: a.maxWidth ? "auto" : void 0
1437
+ }, b = e && a.isReady, v = /* @__PURE__ */ jsxRuntimeExports.jsx(
1438
+ "div",
1439
+ {
1440
+ id: f,
1441
+ ref: c,
1442
+ className: cn(menuVariants({ size: r, open: b })),
1443
+ style: d,
1444
+ role: "menu",
1445
+ "aria-hidden": !b,
1446
+ children: i
1447
+ }
1448
+ );
1449
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
1450
+ MenuProvider,
1451
+ {
1452
+ value: { onClose: t, preserve: !!l },
1453
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-fit", children: [
1454
+ cloneElement(s, {
1455
+ // @ts-expect-error: ref is valid for button or forwardRef components
1456
+ ref: u,
1457
+ "aria-haspopup": "menu",
1458
+ "aria-expanded": e,
1459
+ "aria-controls": f
1460
+ }),
1461
+ e && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
1462
+ !a.isReady && /* @__PURE__ */ jsxRuntimeExports.jsx(
1463
+ "div",
1464
+ {
1465
+ ref: c,
1466
+ className: cn(menuVariants({ size: r, open: !1 })),
1467
+ style: {
1468
+ position: "absolute",
1469
+ visibility: "hidden",
1470
+ opacity: 0,
1471
+ pointerEvents: "none"
1472
+ },
1473
+ role: "menu",
1474
+ "aria-hidden": !0,
1475
+ children: i
1476
+ }
1477
+ ),
1478
+ a.isReady && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: a.position === "fixed" ? /* @__PURE__ */ jsxRuntimeExports.jsx(OverlayPortal, { children: v }) : v })
1479
+ ] })
1480
+ ] })
1481
+ }
1482
+ );
1005
1483
  }, Menu = Object.assign(MenuRoot, {
1006
1484
  Content: MenuContent,
1007
1485
  Item: MenuItem
@@ -1015,7 +1493,7 @@ function getIconColorFromVariant(e = "primary") {
1015
1493
  case "outline":
1016
1494
  return "ghost";
1017
1495
  default:
1018
- return "neutral";
1496
+ return "white";
1019
1497
  }
1020
1498
  if (t?.[1] === "outline") return "inherit";
1021
1499
  switch (t[0]) {
@@ -1094,54 +1572,16 @@ const buttonIconVariants = cva(
1094
1572
  shape: "rounded"
1095
1573
  }
1096
1574
  }
1097
- ), iconVariants = cva("inline-flex items-center justify-center", {
1098
- variants: {
1099
- size: {
1100
- xs: "w-3 h-3",
1101
- sm: "w-4 h-4",
1102
- md: "w-5 h-5",
1103
- lg: "w-6 h-6",
1104
- xl: "w-8 h-8"
1105
- },
1106
- color: {
1107
- primary: "text-primary",
1108
- secondary: "text-secondary",
1109
- tertiary: "text-tertiary",
1110
- ghost: "text-ghost",
1111
- neutral: "text-neutral",
1112
- success: "text-success",
1113
- info: "text-info",
1114
- warning: "text-warning",
1115
- danger: "text-danger",
1116
- gray: "text-gray-500",
1117
- black: "text-black",
1118
- white: "text-white",
1119
- inherit: ""
1120
- }
1121
- },
1122
- defaultVariants: {
1123
- size: "md",
1124
- color: "primary"
1125
- }
1126
- }), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: s = "md", className: i, ...o }, a) {
1127
- return /* @__PURE__ */ jsxRuntimeExports.jsx(
1128
- t,
1129
- {
1130
- ref: a,
1131
- className: iconVariants({ color: r, size: s, className: i }),
1132
- ...o
1133
- }
1134
- );
1135
- }), ButtonIcon = React__default.forwardRef(
1575
+ ), ButtonIcon = React__default.forwardRef(
1136
1576
  function({
1137
1577
  className: t,
1138
1578
  variant: r = "primary",
1139
- size: s = "md",
1140
- shape: i = "rounded",
1579
+ size: i = "md",
1580
+ shape: s = "rounded",
1141
1581
  disabled: o = !1,
1142
- as: a,
1143
- "aria-label": n,
1144
- ...l
1582
+ as: n,
1583
+ "aria-label": l,
1584
+ ...u
1145
1585
  }, c) {
1146
1586
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1147
1587
  "button",
@@ -1151,20 +1591,20 @@ const buttonIconVariants = cva(
1151
1591
  className: cn(
1152
1592
  buttonIconVariants({
1153
1593
  variant: r,
1154
- size: s,
1155
- shape: i
1594
+ size: i,
1595
+ shape: s
1156
1596
  }),
1157
1597
  t
1158
1598
  ),
1159
1599
  disabled: o,
1160
1600
  "aria-disabled": o,
1161
- "aria-label": n,
1601
+ "aria-label": l,
1162
1602
  inert: o ? !0 : void 0,
1163
- ...l,
1603
+ ...u,
1164
1604
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1165
1605
  Icon,
1166
1606
  {
1167
- as: a,
1607
+ as: n,
1168
1608
  size: "sm",
1169
1609
  color: getIconColorFromVariant(r)
1170
1610
  }
@@ -1176,27 +1616,32 @@ const buttonIconVariants = cva(
1176
1616
  (e, t) => {
1177
1617
  const {
1178
1618
  as: r = EllipsisVerticalIcon,
1179
- children: s,
1180
- onOpenChange: i,
1619
+ children: i,
1620
+ onOpenChange: s,
1181
1621
  onClick: o,
1182
- ...a
1183
- } = e ?? {}, [n, l] = useState(!1);
1622
+ placement: n,
1623
+ container: l,
1624
+ preserve: u,
1625
+ ...c
1626
+ } = e ?? {}, [f, a] = useState(!1);
1184
1627
  useEffect(() => {
1185
- i?.(n);
1186
- }, [n, i]);
1187
- const c = () => {
1188
- l(!1);
1189
- }, u = (g) => {
1190
- l((d) => !d), o?.(g);
1628
+ s?.(f);
1629
+ }, [f, s]);
1630
+ const d = () => {
1631
+ a(!1);
1632
+ }, b = (v) => {
1633
+ a((j) => !j), o?.(v);
1191
1634
  };
1192
1635
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1193
1636
  Menu,
1194
1637
  {
1195
- isOpen: n,
1196
- onOutsideClick: c,
1197
- size: "md",
1198
- content: /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Content, { children: s }),
1199
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { ref: t, as: r, onClick: u, ...a })
1638
+ isOpen: f,
1639
+ onOutsideClick: d,
1640
+ placement: n,
1641
+ container: l,
1642
+ preserve: u,
1643
+ content: /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Content, { children: i }),
1644
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { ref: t, as: r, onClick: b, ...c })
1200
1645
  }
1201
1646
  );
1202
1647
  }
@@ -1270,65 +1715,65 @@ const buttonIconVariants = cva(
1270
1715
  }
1271
1716
  );
1272
1717
  function useFloatingPosition(e, t = "1rem") {
1273
- const r = useRef(null), [s, i] = useState({}), [o, a] = useState("fixed bottom-4 right-4"), n = useCallback(() => {
1718
+ const r = useRef(null), [i, s] = useState({}), [o, n] = useState("fixed bottom-4 right-4"), l = useCallback(() => {
1274
1719
  const c = r.current;
1275
1720
  if (!c) return;
1276
- const g = c.getBoundingClientRect().height > window.innerHeight;
1277
- let d = {}, m = "";
1278
- g ? (d = {
1721
+ const a = c.getBoundingClientRect().height > window.innerHeight;
1722
+ let d = {}, b = "";
1723
+ a ? (d = {
1279
1724
  position: "fixed",
1280
1725
  bottom: t,
1281
1726
  zIndex: 50,
1282
1727
  transform: `translateY(${c.scrollTop}px)`
1283
- }, m = `fixed bottom-4 ${e}-4`) : (d = {
1728
+ }, b = `fixed bottom-4 ${e}-4`) : (d = {
1284
1729
  position: "fixed",
1285
1730
  bottom: t,
1286
1731
  zIndex: 50
1287
- }, m = `fixed bottom-4 ${e}-4`), i(d), a(m);
1732
+ }, b = `fixed bottom-4 ${e}-4`), s(d), n(b);
1288
1733
  }, [e, t]);
1289
1734
  return useEffect(() => {
1290
- n();
1735
+ l();
1291
1736
  const c = r.current;
1292
- return c && c.addEventListener("scroll", n), window.addEventListener("resize", n), () => {
1293
- c && c.removeEventListener("scroll", n), window.removeEventListener("resize", n);
1737
+ return c && c.addEventListener("scroll", l), window.addEventListener("resize", l), () => {
1738
+ c && c.removeEventListener("scroll", l), window.removeEventListener("resize", l);
1294
1739
  };
1295
- }, [n]), useEffect(() => {
1296
- r.current && n();
1297
- }, [e, t, n]), [useCallback(
1740
+ }, [l]), useEffect(() => {
1741
+ r.current && l();
1742
+ }, [e, t, l]), [useCallback(
1298
1743
  (c) => {
1299
- r.current = c, c && n();
1744
+ r.current = c, c && l();
1300
1745
  },
1301
- [n]
1302
- ), s, o];
1746
+ [l]
1747
+ ), i, o];
1303
1748
  }
1304
1749
  const ButtonFloat = forwardRef(
1305
1750
  function({
1306
1751
  className: t,
1307
1752
  variant: r = "primary",
1308
- size: s = "md",
1309
- side: i = "right",
1753
+ size: i = "md",
1754
+ side: s = "right",
1310
1755
  offset: o = "1rem",
1311
- ...a
1312
- }, n) {
1313
- const [l, c, u] = useFloatingPosition(
1314
- i,
1756
+ ...n
1757
+ }, l) {
1758
+ const [u, c, f] = useFloatingPosition(
1759
+ s,
1315
1760
  o
1316
- ), [g, d] = useState(!1);
1761
+ ), [a, d] = useState(!1);
1317
1762
  return useEffect(() => {
1318
1763
  d(!0);
1319
- }, []), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: l, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1764
+ }, []), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: u, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1320
1765
  "button",
1321
1766
  {
1322
- ref: n,
1323
- type: a.type || "button",
1767
+ ref: l,
1768
+ type: n.type || "button",
1324
1769
  className: cn(
1325
- buttonFloatVariants({ variant: r, size: s }),
1326
- u,
1327
- g && "animate-fab-in",
1770
+ buttonFloatVariants({ variant: r, size: i }),
1771
+ f,
1772
+ a && "animate-fab-in",
1328
1773
  t
1329
1774
  ),
1330
1775
  style: c,
1331
- ...a
1776
+ ...n
1332
1777
  }
1333
1778
  ) });
1334
1779
  }
@@ -1365,10 +1810,10 @@ const ButtonFloat = forwardRef(
1365
1810
  disabled: !1
1366
1811
  }
1367
1812
  }
1368
- ), CalculatorButton = forwardRef(({ variant: e = "default", className: t, ...r }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1813
+ ), CalculatorButton = forwardRef(({ variant: e = "default", className: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1369
1814
  "button",
1370
1815
  {
1371
- ref: s,
1816
+ ref: i,
1372
1817
  type: "button",
1373
1818
  className: cn(
1374
1819
  calculatorButtonVariants({ variant: e, disabled: r.disabled }),
@@ -1447,10 +1892,10 @@ const BUTTONS = [
1447
1892
  initialValue: e = "",
1448
1893
  onChange: t,
1449
1894
  disabled: r,
1450
- className: s,
1451
- "aria-label": i
1895
+ className: i,
1896
+ "aria-label": s
1452
1897
  }, o) => {
1453
- const { input: a, inputRef: n, handleButton: l, handleInput: c } = useCalculator({
1898
+ const { input: n, inputRef: l, handleButton: u, handleInput: c } = useCalculator({
1454
1899
  initialValue: e,
1455
1900
  disabled: r,
1456
1901
  onChange: t
@@ -1459,30 +1904,30 @@ const BUTTONS = [
1459
1904
  "div",
1460
1905
  {
1461
1906
  ref: o,
1462
- className: cn(calculatorRootVariants({ disabled: r }), s),
1463
- "aria-label": i || "Calculator",
1907
+ className: cn(calculatorRootVariants({ disabled: r }), i),
1908
+ "aria-label": s || "Calculator",
1464
1909
  role: "region",
1465
1910
  children: [
1466
1911
  /* @__PURE__ */ jsxRuntimeExports.jsx(
1467
1912
  "input",
1468
1913
  {
1469
- ref: n,
1914
+ ref: l,
1470
1915
  className: "w-full mb-3 px-3 py-2 rounded border border-[var(--color-neutral)] bg-[var(--color-neutral-soft)] text-right text-xl font-mono focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]",
1471
- value: a,
1916
+ value: n,
1472
1917
  onChange: c,
1473
1918
  disabled: r,
1474
1919
  inputMode: "decimal",
1475
1920
  "aria-label": "Calculator input"
1476
1921
  }
1477
1922
  ),
1478
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((u, g) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full", children: u.map((d) => d === "⌫" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
1923
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((f, a) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full", children: f.map((d) => d === "⌫" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
1479
1924
  ButtonIcon,
1480
1925
  {
1481
1926
  as: X,
1482
1927
  variant: "danger-ghost",
1483
1928
  "aria-label": "Backspace",
1484
1929
  size: "md",
1485
- onClick: () => l("⌫"),
1930
+ onClick: () => u("⌫"),
1486
1931
  disabled: r
1487
1932
  },
1488
1933
  "backspace"
@@ -1490,13 +1935,13 @@ const BUTTONS = [
1490
1935
  CalculatorButton,
1491
1936
  {
1492
1937
  variant: d === "=" ? "action" : d === "C" ? "danger" : ["/", "*", "-", "+", "/"].includes(d) ? "operator" : "default",
1493
- onClick: () => l(d),
1938
+ onClick: () => u(d),
1494
1939
  disabled: r,
1495
1940
  "aria-label": d,
1496
1941
  children: d
1497
1942
  },
1498
1943
  d
1499
- )) }, g)) })
1944
+ )) }, a)) })
1500
1945
  ]
1501
1946
  }
1502
1947
  );
@@ -1545,29 +1990,29 @@ const cardVariants = cva(
1545
1990
  size: e = "md",
1546
1991
  shape: t = "rounded",
1547
1992
  avatar: r,
1548
- title: s,
1549
- subtitle: i,
1993
+ title: i,
1994
+ subtitle: s,
1550
1995
  badge: o,
1551
- supplementaryInfo: a,
1552
- bordered: n = !1,
1553
- className: l,
1996
+ supplementaryInfo: n,
1997
+ bordered: l = !1,
1998
+ className: u,
1554
1999
  ...c
1555
- }, u) => /* @__PURE__ */ jsxRuntimeExports.jsx(
2000
+ }, f) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1556
2001
  "button",
1557
2002
  {
1558
- ref: u,
1559
- className: cn(cardVariants({ size: e, shape: t, bordered: n }), l),
2003
+ ref: f,
2004
+ className: cn(cardVariants({ size: e, shape: t, bordered: l }), u),
1560
2005
  ...c,
1561
2006
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-4", children: [
1562
2007
  r && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: r }),
1563
2008
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full", children: [
1564
2009
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-2", children: [
1565
- s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h3", fontSize: "base", fontWeight: "semibold", children: s }),
1566
- i && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "sm", color: "gray", children: i })
2010
+ i && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h3", fontSize: "base", fontWeight: "semibold", children: i }),
2011
+ s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "sm", color: "gray", children: s })
1567
2012
  ] }),
1568
- (o || a) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
2013
+ (o || n) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
1569
2014
  o,
1570
- typeof a == "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "sm", color: "gray", children: a }) : a
2015
+ typeof n == "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "sm", color: "gray", children: n }) : n
1571
2016
  ] })
1572
2017
  ] })
1573
2018
  ] })
@@ -1618,29 +2063,48 @@ const cardVariants = cva(
1618
2063
  function e({
1619
2064
  className: t,
1620
2065
  variant: r = "neutral-outline",
1621
- size: s = "md",
1622
- disabled: i = !1,
2066
+ size: i = "md",
2067
+ disabled: s = !1,
1623
2068
  children: o,
1624
- ...a
1625
- }, n) {
2069
+ ...n
2070
+ }, l) {
1626
2071
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1627
2072
  "button",
1628
2073
  {
1629
- ref: n,
2074
+ ref: l,
1630
2075
  type: "button",
1631
- className: cn(filterChipVariants({ variant: r, size: s }), t),
1632
- disabled: i,
1633
- "aria-disabled": i,
2076
+ className: cn(filterChipVariants({ variant: r, size: i }), t),
2077
+ disabled: s,
2078
+ "aria-disabled": s,
1634
2079
  "aria-label": `${o}, removable`,
1635
- inert: i ? !0 : void 0,
1636
- ...a,
2080
+ inert: s ? !0 : void 0,
2081
+ ...n,
1637
2082
  children: [
1638
2083
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0", children: o }),
1639
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: XIcon, color: "inherit", size: s === "lg" ? "md" : "sm" })
2084
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: XIcon, color: "inherit", size: i === "lg" ? "md" : "sm" })
1640
2085
  ]
1641
2086
  }
1642
2087
  );
1643
2088
  }
2089
+ ), hrVariants = cva("h-px w-full bg-border border-0", {
2090
+ variants: {
2091
+ hasMargin: {
2092
+ true: "mb-4",
2093
+ false: ""
2094
+ }
2095
+ },
2096
+ defaultVariants: {
2097
+ hasMargin: !1
2098
+ }
2099
+ }), Hr = forwardRef(
2100
+ ({ hasMargin: e = !1, className: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(
2101
+ "hr",
2102
+ {
2103
+ ref: i,
2104
+ className: cn(hrVariants({ hasMargin: e }), t),
2105
+ ...r
2106
+ }
2107
+ )
1644
2108
  ), noResultsVariants = cva(
1645
2109
  "flex flex-col items-center justify-center text-center border border-border rounded-lg bg-background",
1646
2110
  {
@@ -1663,22 +2127,22 @@ const cardVariants = cva(
1663
2127
  ), noResultsHeaderVariants = cva(
1664
2128
  "flex flex-row items-center gap-3 mb-2"
1665
2129
  ), NoResults = React__default.forwardRef(
1666
- function e({ icon: t, title: r, subtitle: s, action: i, className: o, hasGrayBackground: a, ...n }, l) {
2130
+ function e({ icon: t, title: r, subtitle: i, action: s, className: o, hasGrayBackground: n, ...l }, u) {
1667
2131
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1668
2132
  "section",
1669
2133
  {
1670
- ref: l,
1671
- className: cn(noResultsVariants({ hasGrayBackground: a }), o),
2134
+ ref: u,
2135
+ className: cn(noResultsVariants({ hasGrayBackground: n }), o),
1672
2136
  role: "status",
1673
2137
  "aria-label": "No results found",
1674
- ...n,
2138
+ ...l,
1675
2139
  children: [
1676
2140
  /* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: noResultsHeaderVariants(), children: [
1677
2141
  /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: t, size: "lg", color: "ghost", "aria-hidden": "true" }),
1678
2142
  /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "h2", fontSize: "lg", children: r })
1679
2143
  ] }),
1680
- s && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", align: "center", color: "gray", className: "mb-4", children: s }),
1681
- i && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "group", "aria-label": "Available actions", children: i })
2144
+ i && /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", align: "center", color: "gray", className: "mb-4", children: i }),
2145
+ s && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "group", "aria-label": "Available actions", children: s })
1682
2146
  ]
1683
2147
  }
1684
2148
  );
@@ -1753,20 +2217,20 @@ const getTableColumnClass = (e) => {
1753
2217
  return "col-span-2";
1754
2218
  }
1755
2219
  }, TableHeader = forwardRef(
1756
- ({ children: e, className: t, ...r }, s) => {
1757
- const { columns: i } = useTableContext();
2220
+ ({ children: e, className: t, ...r }, i) => {
2221
+ const { columns: s } = useTableContext();
1758
2222
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1759
2223
  "div",
1760
2224
  {
1761
2225
  role: "rowgroup",
1762
2226
  className: cn("bg-neutral-soft", t),
1763
2227
  ...r,
1764
- ref: s,
2228
+ ref: i,
1765
2229
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1766
2230
  "div",
1767
2231
  {
1768
2232
  role: "row",
1769
- className: cn("grid gap-4", getTableColumnClass(i)),
2233
+ className: cn("grid gap-4", getTableColumnClass(s)),
1770
2234
  children: e
1771
2235
  }
1772
2236
  )
@@ -1774,22 +2238,22 @@ const getTableColumnClass = (e) => {
1774
2238
  );
1775
2239
  }
1776
2240
  ), TableBody = forwardRef(
1777
- ({ children: e, className: t, ...r }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "rowgroup", ref: s, className: cn(t), ...r, children: e })
2241
+ ({ children: e, className: t, ...r }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { role: "rowgroup", ref: i, className: cn(t), ...r, children: e })
1778
2242
  ), TableFooter = forwardRef(
1779
- ({ children: e, className: t, ...r }, s) => {
1780
- const { columns: i } = useTableContext();
2243
+ ({ children: e, className: t, ...r }, i) => {
2244
+ const { columns: s } = useTableContext();
1781
2245
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1782
2246
  "div",
1783
2247
  {
1784
2248
  role: "rowgroup",
1785
2249
  className: cn("bg-neutral-soft", t),
1786
2250
  ...r,
1787
- ref: s,
2251
+ ref: i,
1788
2252
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1789
2253
  "div",
1790
2254
  {
1791
2255
  role: "row",
1792
- className: cn("grid gap-4", getTableColumnClass(i)),
2256
+ className: cn("grid gap-4", getTableColumnClass(s)),
1793
2257
  children: e
1794
2258
  }
1795
2259
  )
@@ -1797,43 +2261,43 @@ const getTableColumnClass = (e) => {
1797
2261
  );
1798
2262
  }
1799
2263
  ), TableRow = forwardRef(
1800
- ({ children: e, className: t, ...r }, s) => {
1801
- const { columns: i } = useTableContext();
2264
+ ({ children: e, className: t, ...r }, i) => {
2265
+ const { columns: s } = useTableContext();
1802
2266
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
1803
2267
  "div",
1804
2268
  {
1805
2269
  role: "row",
1806
2270
  className: cn(
1807
2271
  "grid gap-4",
1808
- getTableColumnClass(i),
2272
+ getTableColumnClass(s),
1809
2273
  "border-b border-border last:border-0",
1810
2274
  t
1811
2275
  ),
1812
- ref: s,
2276
+ ref: i,
1813
2277
  ...r,
1814
2278
  children: e
1815
2279
  }
1816
2280
  );
1817
2281
  }
1818
2282
  ), TableColumn = forwardRef(
1819
- ({ as: e = "td", span: t, align: r = "left", children: s, className: i, ...o }, a) => {
1820
- const n = e === "th" ? "columnheader" : "cell";
1821
- let l = "text-left";
1822
- return r === "center" ? l = "text-center" : r === "right" && (l = "text-right"), /* @__PURE__ */ jsxRuntimeExports.jsx(
2283
+ ({ as: e = "td", span: t, align: r = "left", children: i, className: s, ...o }, n) => {
2284
+ const l = e === "th" ? "columnheader" : "cell";
2285
+ let u = "text-left";
2286
+ return r === "center" ? u = "text-center" : r === "right" && (u = "text-right"), /* @__PURE__ */ jsxRuntimeExports.jsx(
1823
2287
  "div",
1824
2288
  {
1825
- ref: a,
1826
- role: n,
2289
+ ref: n,
2290
+ role: l,
1827
2291
  className: cn(
1828
2292
  "px-4 py-2",
1829
2293
  "[&:not(:last-child)]:border-r [&:not(:last-child)]:border-border",
1830
2294
  getRowSpanClass(t),
1831
- l,
2295
+ u,
1832
2296
  "truncate overflow-hidden whitespace-nowrap",
1833
- i
2297
+ s
1834
2298
  ),
1835
2299
  ...o,
1836
- children: s
2300
+ children: i
1837
2301
  }
1838
2302
  );
1839
2303
  }
@@ -1864,10 +2328,10 @@ const getTableColumnClass = (e) => {
1864
2328
  }
1865
2329
  )
1866
2330
  ), TableRoot = forwardRef(
1867
- ({ children: e, className: t, columns: r = 12, ...s }, i) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableProvider, { value: { columns: r }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
2331
+ ({ children: e, className: t, columns: r = 12, ...i }, s) => /* @__PURE__ */ jsxRuntimeExports.jsx(TableProvider, { value: { columns: r }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1868
2332
  "div",
1869
2333
  {
1870
- ref: i,
2334
+ ref: s,
1871
2335
  role: "table",
1872
2336
  className: cn(
1873
2337
  // Versaur design system: border, background, shadow, rounded, spacing
@@ -1877,7 +2341,7 @@ const getTableColumnClass = (e) => {
1877
2341
  "transition-colors",
1878
2342
  t
1879
2343
  ),
1880
- ...s,
2344
+ ...i,
1881
2345
  children: e
1882
2346
  }
1883
2347
  ) })
@@ -1924,36 +2388,36 @@ const getTableColumnClass = (e) => {
1924
2388
  }
1925
2389
  }
1926
2390
  ), Tile = forwardRef(
1927
- ({ variant: e = "white", size: t = "md", shape: r = "rounded", className: s, ...i }, o) => /* @__PURE__ */ jsxRuntimeExports.jsx(
2391
+ ({ variant: e = "white", size: t = "md", shape: r = "rounded", className: i, ...s }, o) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1928
2392
  "div",
1929
2393
  {
1930
2394
  ref: o,
1931
- className: cn(tileVariants({ variant: e, size: t, shape: r }), s),
1932
- ...i
2395
+ className: cn(tileVariants({ variant: e, size: t, shape: r }), i),
2396
+ ...s
1933
2397
  }
1934
2398
  )
1935
2399
  );
1936
2400
  function useImage({ src: e }) {
1937
- const [t, r] = useState(!1), [s, i] = useState(!1), o = useRef(!1), a = () => {
2401
+ const [t, r] = useState(!1), [i, s] = useState(!1), o = useRef(!1), n = () => {
1938
2402
  r(!0);
1939
- }, n = () => {
1940
- i(!0);
2403
+ }, l = () => {
2404
+ s(!0);
1941
2405
  };
1942
2406
  return useEffect(() => {
1943
2407
  if (!e) return;
1944
- const l = new Image();
1945
- return l.src = e, l.onload = () => {
2408
+ const u = new Image();
2409
+ return u.src = e, u.onload = () => {
1946
2410
  o.current || r(!0);
1947
- }, l.onerror = () => {
1948
- o.current || i(!0);
2411
+ }, u.onerror = () => {
2412
+ o.current || s(!0);
1949
2413
  }, () => {
1950
2414
  o.current = !0;
1951
2415
  };
1952
2416
  }, [e]), {
1953
2417
  loaded: t,
1954
- errored: s,
1955
- handleLoad: a,
1956
- handleError: n
2418
+ errored: i,
2419
+ handleLoad: n,
2420
+ handleError: l
1957
2421
  };
1958
2422
  }
1959
2423
  const imageVariants = cva("block object-cover", {
@@ -2013,14 +2477,14 @@ function BaseImageSkeleton({
2013
2477
  className: e,
2014
2478
  shape: t,
2015
2479
  size: r,
2016
- height: s,
2017
- width: i
2480
+ height: i,
2481
+ width: s
2018
2482
  }) {
2019
2483
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
2020
2484
  Skeleton,
2021
2485
  {
2022
2486
  className: cn(imageAtomVariants({ shape: t, size: r }), e),
2023
- style: { height: s, width: i }
2487
+ style: { height: i, width: s }
2024
2488
  }
2025
2489
  );
2026
2490
  }
@@ -2028,16 +2492,16 @@ function BaseImageFallback({
2028
2492
  alt: e,
2029
2493
  width: t,
2030
2494
  height: r,
2031
- className: s,
2032
- style: i,
2495
+ className: i,
2496
+ style: s,
2033
2497
  shape: o,
2034
- size: a
2498
+ size: n
2035
2499
  }) {
2036
2500
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
2037
2501
  "div",
2038
2502
  {
2039
- className: imageAtomVariants({ shape: o, size: a, className: s }),
2040
- style: { width: t, height: r, ...i },
2503
+ className: imageAtomVariants({ shape: o, size: n, className: i }),
2504
+ style: { width: t, height: r, ...s },
2041
2505
  "aria-label": e,
2042
2506
  role: "img",
2043
2507
  children: [
@@ -2059,33 +2523,33 @@ const BaseImage = forwardRef(
2059
2523
  src: e,
2060
2524
  alt: t,
2061
2525
  onLoad: r,
2062
- onError: s,
2063
- width: i,
2526
+ onError: i,
2527
+ width: s,
2064
2528
  height: o,
2065
- loading: a = "lazy",
2066
- position: n = "cover",
2067
- size: l = "auto",
2529
+ loading: n = "lazy",
2530
+ position: l = "cover",
2531
+ size: u = "auto",
2068
2532
  shape: c,
2069
- className: u,
2070
- ...g
2533
+ className: f,
2534
+ ...a
2071
2535
  }, d) => {
2072
- const { loaded: m, errored: h, handleLoad: w, handleError: p } = useImage({
2536
+ const { loaded: b, errored: v, handleLoad: j, handleError: w } = useImage({
2073
2537
  src: e
2074
- }), v = typeof i == "number" ? i : Number(i), y = typeof o == "number" ? o : Number(o);
2075
- return !m && !h ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2538
+ }), R = typeof s == "number" ? s : Number(s), E = typeof o == "number" ? o : Number(o);
2539
+ return !b && !v ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2076
2540
  BaseImageSkeleton,
2077
2541
  {
2078
2542
  shape: c,
2079
- width: v,
2080
- height: y
2543
+ width: R,
2544
+ height: E
2081
2545
  }
2082
- ) : h ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2546
+ ) : v ? /* @__PURE__ */ jsxRuntimeExports.jsx(
2083
2547
  BaseImageFallback,
2084
2548
  {
2085
2549
  shape: c,
2086
2550
  alt: t,
2087
- width: v,
2088
- height: y
2551
+ width: R,
2552
+ height: E
2089
2553
  }
2090
2554
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
2091
2555
  "img",
@@ -2093,51 +2557,55 @@ const BaseImage = forwardRef(
2093
2557
  ref: d,
2094
2558
  src: e,
2095
2559
  alt: t,
2096
- width: v,
2097
- height: y,
2098
- loading: a,
2560
+ width: R,
2561
+ height: E,
2562
+ loading: n,
2099
2563
  className: cn(
2100
2564
  imageVariants({
2101
- position: n,
2102
- size: l,
2565
+ position: l,
2566
+ size: u,
2103
2567
  shape: c
2104
2568
  }),
2105
- u
2569
+ f
2106
2570
  ),
2107
- onLoad: (b) => {
2108
- w(), r?.(b);
2571
+ onLoad: (C) => {
2572
+ j(), r?.(C);
2109
2573
  },
2110
- onError: (b) => {
2111
- p(), s?.(b);
2574
+ onError: (C) => {
2575
+ w(), i?.(C);
2112
2576
  },
2113
- ...g
2577
+ ...a
2114
2578
  }
2115
2579
  );
2116
2580
  }
2117
2581
  ), ImageCircle = forwardRef((e, t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BaseImage, { ref: t, ...e, shape: "circle" })), ImageSquare = forwardRef((e, t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BaseImage, { ref: t, ...e, shape: "square" })), ImageRectangle = forwardRef((e, t) => /* @__PURE__ */ jsxRuntimeExports.jsx(BaseImage, { ref: t, ...e, shape: "rectangle" }));
2118
2582
  export {
2119
- Alert as A,
2583
+ Accordion as A,
2120
2584
  Badge as B,
2121
2585
  Calculator as C,
2122
2586
  FilterChip as F,
2587
+ Heading as H,
2123
2588
  Icon as I,
2124
2589
  Menu as M,
2125
2590
  NoResults as N,
2591
+ OverlayPortal as O,
2126
2592
  Table as T,
2127
- Anchor as a,
2128
- Attribute as b,
2129
- AttributeList as c,
2130
- Avatar as d,
2131
- Brand as e,
2132
- Button as f,
2133
- ButtonMenuIcon as g,
2134
- ButtonFloat as h,
2135
- ButtonIcon as i,
2136
- Card as j,
2137
- Text as k,
2138
- Tile as l,
2139
- ImageCircle as m,
2140
- ImageSquare as n,
2141
- ImageRectangle as o,
2142
- BaseImage as p
2593
+ Alert as a,
2594
+ Anchor as b,
2595
+ Attribute as c,
2596
+ AttributeList as d,
2597
+ Avatar as e,
2598
+ Brand as f,
2599
+ Button as g,
2600
+ ButtonMenuIcon as h,
2601
+ ButtonFloat as i,
2602
+ ButtonIcon as j,
2603
+ Card as k,
2604
+ Hr as l,
2605
+ Text as m,
2606
+ Tile as n,
2607
+ ImageCircle as o,
2608
+ ImageSquare as p,
2609
+ ImageRectangle as q,
2610
+ BaseImage as r
2143
2611
  };