@dimasbaguspm/versaur 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/{bottom-sheet-BjNMFNXp.js → bottom-sheet-DHMq1-Di.js} +1 -1
- package/dist/js/{bottom-sheet-input-BnuL4Cci.js → bottom-sheet-input-IzuwB7Zy.js} +10 -10
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-DGO9R_ox.js → image-rectangle-DPZAgdEa.js} +163 -148
- package/dist/js/index.js +64 -63
- package/dist/js/layouts/index.js +6 -5
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +3 -3
- package/dist/js/primitive/index.js +1 -1
- package/dist/js/providers/index.js +1 -1
- package/dist/js/{tabs-lPDgArjA.js → tabs-BRMO0ktc.js} +1 -1
- package/dist/js/{tooltip-uCpYAX_O.js → tooltip-D_laXWIT.js} +1 -1
- package/dist/js/{top-bar-D8P4uwtN.js → top-bar-BKeQ6yXv.js} +256 -178
- package/dist/js/{use-snackbars-CKi6BQDT.js → use-snackbars-Cou8L41F.js} +9 -12
- package/dist/types/layouts/index.d.ts +1 -0
- package/dist/types/layouts/page-loader/index.d.ts +2 -0
- package/dist/types/layouts/page-loader/page-loader.d.ts +11 -0
- package/dist/types/layouts/page-loader/types.d.ts +40 -0
- package/dist/types/primitive/card/types.d.ts +1 -5
- package/dist/utils/enforce-subpath-import.js +1 -0
- package/package.json +1 -1
|
@@ -146,8 +146,8 @@ const AccordionContext = createContext(
|
|
|
146
146
|
isCapitalize: i = !1,
|
|
147
147
|
hasMargin: s = !1,
|
|
148
148
|
align: o = "left",
|
|
149
|
-
italic:
|
|
150
|
-
clamp:
|
|
149
|
+
italic: a = !1,
|
|
150
|
+
clamp: l = "none",
|
|
151
151
|
ellipsis: u = !1,
|
|
152
152
|
className: c,
|
|
153
153
|
children: f,
|
|
@@ -165,8 +165,8 @@ const AccordionContext = createContext(
|
|
|
165
165
|
isCapitalize: i,
|
|
166
166
|
hasMargin: s,
|
|
167
167
|
align: o,
|
|
168
|
-
italic:
|
|
169
|
-
clamp:
|
|
168
|
+
italic: a,
|
|
169
|
+
clamp: l,
|
|
170
170
|
ellipsis: u,
|
|
171
171
|
level: e
|
|
172
172
|
}),
|
|
@@ -209,11 +209,11 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
209
209
|
size: "md",
|
|
210
210
|
color: "primary"
|
|
211
211
|
}
|
|
212
|
-
}), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: i = "md", className: s, ...o },
|
|
212
|
+
}), Icon = React__default.forwardRef(function({ as: t, color: r = "primary", size: i = "md", className: s, ...o }, a) {
|
|
213
213
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
214
214
|
t,
|
|
215
215
|
{
|
|
216
|
-
ref:
|
|
216
|
+
ref: a,
|
|
217
217
|
className: iconVariants({ color: r, size: i, className: s }),
|
|
218
218
|
...o
|
|
219
219
|
}
|
|
@@ -261,8 +261,8 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
261
261
|
isDefaultOpen: i = !1,
|
|
262
262
|
disabled: s = !1,
|
|
263
263
|
hasMargin: o,
|
|
264
|
-
className:
|
|
265
|
-
children:
|
|
264
|
+
className: a,
|
|
265
|
+
children: l,
|
|
266
266
|
...u
|
|
267
267
|
}, c) {
|
|
268
268
|
const [f, n] = useState(i), d = () => {
|
|
@@ -278,7 +278,7 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
278
278
|
ref: c,
|
|
279
279
|
className: cn(
|
|
280
280
|
accordionVariants({ disabled: s }),
|
|
281
|
-
|
|
281
|
+
a,
|
|
282
282
|
o && "mb-4"
|
|
283
283
|
),
|
|
284
284
|
...u,
|
|
@@ -307,7 +307,7 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
307
307
|
"overflow-hidden transition-all duration-300",
|
|
308
308
|
f ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
309
309
|
),
|
|
310
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 pt-2", children:
|
|
310
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 pt-2", children: l })
|
|
311
311
|
}
|
|
312
312
|
)
|
|
313
313
|
]
|
|
@@ -463,10 +463,10 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
463
463
|
className: i,
|
|
464
464
|
children: s,
|
|
465
465
|
...o
|
|
466
|
-
},
|
|
466
|
+
}, a) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
467
467
|
"div",
|
|
468
468
|
{
|
|
469
|
-
ref:
|
|
469
|
+
ref: a,
|
|
470
470
|
role: "alert",
|
|
471
471
|
className: cn(alertVariants({ variant: e, color: t }), i),
|
|
472
472
|
...o,
|
|
@@ -543,16 +543,16 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
543
543
|
fontSize: i = "base",
|
|
544
544
|
fontWeight: s = "medium",
|
|
545
545
|
quiet: o = !1,
|
|
546
|
-
...
|
|
547
|
-
},
|
|
546
|
+
...a
|
|
547
|
+
}, l) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
548
548
|
"a",
|
|
549
549
|
{
|
|
550
|
-
ref:
|
|
550
|
+
ref: l,
|
|
551
551
|
className: cn(
|
|
552
552
|
anchorVariants({ color: r, fontSize: i, fontWeight: s, quiet: o }),
|
|
553
553
|
t
|
|
554
554
|
),
|
|
555
|
-
...
|
|
555
|
+
...a,
|
|
556
556
|
children: e
|
|
557
557
|
}
|
|
558
558
|
)
|
|
@@ -633,8 +633,8 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
633
633
|
isCapitalize: i = !1,
|
|
634
634
|
align: s = "left",
|
|
635
635
|
italic: o = !1,
|
|
636
|
-
clamp:
|
|
637
|
-
ellipsis:
|
|
636
|
+
clamp: a = "none",
|
|
637
|
+
ellipsis: l = !1,
|
|
638
638
|
fontSize: u,
|
|
639
639
|
fontWeight: c,
|
|
640
640
|
className: f,
|
|
@@ -663,8 +663,8 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
663
663
|
isCapitalize: i,
|
|
664
664
|
align: s,
|
|
665
665
|
italic: o,
|
|
666
|
-
clamp:
|
|
667
|
-
ellipsis:
|
|
666
|
+
clamp: a,
|
|
667
|
+
ellipsis: l,
|
|
668
668
|
// @ts-expect-error - `as` is not a valid variant
|
|
669
669
|
as: y
|
|
670
670
|
}),
|
|
@@ -678,11 +678,11 @@ const iconVariants = cva("inline-flex items-center justify-center", {
|
|
|
678
678
|
);
|
|
679
679
|
}
|
|
680
680
|
), Attribute = forwardRef(
|
|
681
|
-
function({ title: t, children: r, className: i, hasMargin: s, ...o },
|
|
681
|
+
function({ title: t, children: r, className: i, hasMargin: s, ...o }, a) {
|
|
682
682
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
683
683
|
"div",
|
|
684
684
|
{
|
|
685
|
-
ref:
|
|
685
|
+
ref: a,
|
|
686
686
|
className: cn("space-y-1", i, s && "mb-4"),
|
|
687
687
|
...o,
|
|
688
688
|
children: [
|
|
@@ -763,17 +763,17 @@ function getGridCols(e = 4) {
|
|
|
763
763
|
return "grid-cols-4";
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
|
-
const AttributeListItem = forwardRef(function({ children: t, className: r, span: i = 1, title: s, ...o },
|
|
767
|
-
const
|
|
768
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref:
|
|
766
|
+
const AttributeListItem = forwardRef(function({ children: t, className: r, span: i = 1, title: s, ...o }, a) {
|
|
767
|
+
const l = getColSpan(i);
|
|
768
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: a, className: cn(l, r), ...o, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Attribute, { title: s, children: t }) });
|
|
769
769
|
}), AttributeListRoot = forwardRef(
|
|
770
770
|
function({ children: t, className: r, columns: i = 4, ...s }, o) {
|
|
771
|
-
const
|
|
771
|
+
const a = getGridCols(i);
|
|
772
772
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
773
773
|
"ul",
|
|
774
774
|
{
|
|
775
775
|
ref: o,
|
|
776
|
-
className: cn("grid gap-4",
|
|
776
|
+
className: cn("grid gap-4", a, r),
|
|
777
777
|
...s,
|
|
778
778
|
children: t
|
|
779
779
|
}
|
|
@@ -831,10 +831,10 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
831
831
|
className: i,
|
|
832
832
|
children: s,
|
|
833
833
|
...o
|
|
834
|
-
},
|
|
834
|
+
}, a) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
835
835
|
"div",
|
|
836
836
|
{
|
|
837
|
-
ref:
|
|
837
|
+
ref: a,
|
|
838
838
|
className: cn(avatarVariants({ variant: e, size: t, shape: r }), i),
|
|
839
839
|
...o,
|
|
840
840
|
children: s
|
|
@@ -842,17 +842,17 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
842
842
|
)
|
|
843
843
|
), AvatarImage = forwardRef(
|
|
844
844
|
({ src: e, alt: t, className: r, onError: i, ...s }, o) => {
|
|
845
|
-
const [
|
|
845
|
+
const [a, l] = useState(!1);
|
|
846
846
|
useEffect(() => {
|
|
847
|
-
|
|
847
|
+
l(!1);
|
|
848
848
|
}, [e]);
|
|
849
849
|
const u = useCallback(
|
|
850
850
|
(c) => {
|
|
851
|
-
|
|
851
|
+
l(!0), i?.(c);
|
|
852
852
|
},
|
|
853
853
|
[i]
|
|
854
854
|
);
|
|
855
|
-
return
|
|
855
|
+
return a ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
856
856
|
"img",
|
|
857
857
|
{
|
|
858
858
|
ref: o,
|
|
@@ -1064,11 +1064,11 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
1064
1064
|
size: i = "md",
|
|
1065
1065
|
iconLeft: s,
|
|
1066
1066
|
iconRight: o,
|
|
1067
|
-
className:
|
|
1068
|
-
children:
|
|
1067
|
+
className: a,
|
|
1068
|
+
children: l,
|
|
1069
1069
|
...u
|
|
1070
1070
|
}, c) => {
|
|
1071
|
-
const d = !(
|
|
1071
|
+
const d = !(l != null && l !== "") && !!(s || o);
|
|
1072
1072
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1073
1073
|
"span",
|
|
1074
1074
|
{
|
|
@@ -1081,7 +1081,7 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
1081
1081
|
size: i,
|
|
1082
1082
|
iconOnly: d
|
|
1083
1083
|
}),
|
|
1084
|
-
|
|
1084
|
+
a
|
|
1085
1085
|
),
|
|
1086
1086
|
...u,
|
|
1087
1087
|
children: d ? (
|
|
@@ -1091,7 +1091,7 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
1091
1091
|
// Normal mode: display icon(s) and text
|
|
1092
1092
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
1093
1093
|
s,
|
|
1094
|
-
|
|
1094
|
+
l,
|
|
1095
1095
|
o
|
|
1096
1096
|
] })
|
|
1097
1097
|
)
|
|
@@ -1203,8 +1203,8 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
1203
1203
|
size: i = "md",
|
|
1204
1204
|
disabled: s = !1,
|
|
1205
1205
|
type: o = "button",
|
|
1206
|
-
children:
|
|
1207
|
-
...
|
|
1206
|
+
children: a,
|
|
1207
|
+
...l
|
|
1208
1208
|
}, u) {
|
|
1209
1209
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1210
1210
|
"button",
|
|
@@ -1215,8 +1215,8 @@ const AttributeListItem = forwardRef(function({ children: t, className: r, span:
|
|
|
1215
1215
|
disabled: s,
|
|
1216
1216
|
"aria-disabled": s,
|
|
1217
1217
|
inert: s ? !0 : void 0,
|
|
1218
|
-
...
|
|
1219
|
-
children:
|
|
1218
|
+
...l,
|
|
1219
|
+
children: a
|
|
1220
1220
|
}
|
|
1221
1221
|
);
|
|
1222
1222
|
}
|
|
@@ -1278,20 +1278,20 @@ function isTriggerVisible(e, t) {
|
|
|
1278
1278
|
return !0;
|
|
1279
1279
|
}
|
|
1280
1280
|
function useMenuPosition(e, t, r, i = "bottom-start", s) {
|
|
1281
|
-
const [o,
|
|
1281
|
+
const [o, a] = useState({ isReady: !1 }), l = useCallback(() => {
|
|
1282
1282
|
if (!e || !t.current) {
|
|
1283
|
-
|
|
1283
|
+
a({ isReady: !1 });
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
1286
|
if (!r.current) {
|
|
1287
1287
|
const v = setTimeout(() => {
|
|
1288
|
-
|
|
1288
|
+
a({ isReady: !1 });
|
|
1289
1289
|
}, 0);
|
|
1290
1290
|
return () => clearTimeout(v);
|
|
1291
1291
|
}
|
|
1292
1292
|
const u = t.current, c = r.current, f = getScrollableAncestors(u);
|
|
1293
1293
|
if (!isTriggerVisible(u, f)) {
|
|
1294
|
-
|
|
1294
|
+
a({ isReady: !1 });
|
|
1295
1295
|
return;
|
|
1296
1296
|
}
|
|
1297
1297
|
const n = u.getBoundingClientRect(), d = window.innerWidth, h = window.innerHeight;
|
|
@@ -1413,17 +1413,17 @@ function useMenuPosition(e, t, r, i = "bottom-start", s) {
|
|
|
1413
1413
|
p.endsWith("start") ? g.left = (g.left || 0) - j : g.right = (g.right || 0) + j;
|
|
1414
1414
|
}
|
|
1415
1415
|
}
|
|
1416
|
-
g.isReady = !0,
|
|
1416
|
+
g.isReady = !0, a(g);
|
|
1417
1417
|
}, [e, i, t, r, s]);
|
|
1418
1418
|
return useEffect(() => {
|
|
1419
|
-
|
|
1420
|
-
}, [
|
|
1419
|
+
l();
|
|
1420
|
+
}, [l]), useEffect(() => {
|
|
1421
1421
|
if (!e || !t.current) return;
|
|
1422
1422
|
const u = t.current, c = getScrollableAncestors(u);
|
|
1423
1423
|
let f = !1;
|
|
1424
1424
|
const n = () => {
|
|
1425
1425
|
f || (requestAnimationFrame(() => {
|
|
1426
|
-
|
|
1426
|
+
l(), f = !1;
|
|
1427
1427
|
}), f = !0);
|
|
1428
1428
|
};
|
|
1429
1429
|
return c.forEach((d) => {
|
|
@@ -1433,7 +1433,7 @@ function useMenuPosition(e, t, r, i = "bottom-start", s) {
|
|
|
1433
1433
|
d === document.documentElement ? (window.removeEventListener("scroll", n), window.removeEventListener("resize", n)) : d.removeEventListener("scroll", n);
|
|
1434
1434
|
});
|
|
1435
1435
|
};
|
|
1436
|
-
}, [e,
|
|
1436
|
+
}, [e, l, t]), o;
|
|
1437
1437
|
}
|
|
1438
1438
|
const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider, useMenuProvider = () => {
|
|
1439
1439
|
const e = useContext(MenuContext);
|
|
@@ -1444,8 +1444,8 @@ const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider,
|
|
|
1444
1444
|
({ children: e }, t) => /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { ref: t, className: "flex flex-col gap-1", children: e })
|
|
1445
1445
|
), MenuItem = forwardRef(
|
|
1446
1446
|
({ children: e, disabled: t, onClick: r, active: i, ...s }, o) => {
|
|
1447
|
-
const { preserve:
|
|
1448
|
-
r?.(c),
|
|
1447
|
+
const { preserve: a, onClose: l } = useMenuProvider(), u = (c) => {
|
|
1448
|
+
r?.(c), a || l();
|
|
1449
1449
|
};
|
|
1450
1450
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("li", { ref: o, ...s, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
1451
1451
|
Button,
|
|
@@ -1476,8 +1476,8 @@ const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider,
|
|
|
1476
1476
|
content: i,
|
|
1477
1477
|
children: s,
|
|
1478
1478
|
placement: o = "auto",
|
|
1479
|
-
container:
|
|
1480
|
-
preserve:
|
|
1479
|
+
container: a,
|
|
1480
|
+
preserve: l
|
|
1481
1481
|
}) => {
|
|
1482
1482
|
const u = useRef(null), c = useRef(null), f = useId();
|
|
1483
1483
|
useMenuOutsideClick(e, c, u, t);
|
|
@@ -1486,7 +1486,7 @@ const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider,
|
|
|
1486
1486
|
u,
|
|
1487
1487
|
c,
|
|
1488
1488
|
o,
|
|
1489
|
-
|
|
1489
|
+
a || null
|
|
1490
1490
|
), d = {
|
|
1491
1491
|
...n,
|
|
1492
1492
|
position: n.position || "absolute",
|
|
@@ -1507,7 +1507,7 @@ const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider,
|
|
|
1507
1507
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1508
1508
|
MenuProvider,
|
|
1509
1509
|
{
|
|
1510
|
-
value: { onClose: t, preserve: !!
|
|
1510
|
+
value: { onClose: t, preserve: !!l },
|
|
1511
1511
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative w-fit", children: [
|
|
1512
1512
|
cloneElement(s, {
|
|
1513
1513
|
// @ts-expect-error: ref is valid for button or forwardRef components
|
|
@@ -1548,8 +1548,8 @@ const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider,
|
|
|
1548
1548
|
onOpenChange: i,
|
|
1549
1549
|
onClick: s,
|
|
1550
1550
|
placement: o,
|
|
1551
|
-
container:
|
|
1552
|
-
preserve:
|
|
1551
|
+
container: a,
|
|
1552
|
+
preserve: l,
|
|
1553
1553
|
label: u,
|
|
1554
1554
|
...c
|
|
1555
1555
|
} = e ?? {}, [f, n] = useState(!1);
|
|
@@ -1567,8 +1567,8 @@ const MenuContext = createContext(void 0), MenuProvider = MenuContext.Provider,
|
|
|
1567
1567
|
isOpen: f,
|
|
1568
1568
|
onOutsideClick: d,
|
|
1569
1569
|
placement: o,
|
|
1570
|
-
container:
|
|
1571
|
-
preserve:
|
|
1570
|
+
container: a,
|
|
1571
|
+
preserve: l,
|
|
1572
1572
|
content: /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Content, { children: r }),
|
|
1573
1573
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { ref: t, onClick: h, ...c, children: u })
|
|
1574
1574
|
}
|
|
@@ -1672,8 +1672,8 @@ const buttonIconVariants = cva(
|
|
|
1672
1672
|
size: i = "md",
|
|
1673
1673
|
shape: s = "rounded",
|
|
1674
1674
|
disabled: o = !1,
|
|
1675
|
-
as:
|
|
1676
|
-
"aria-label":
|
|
1675
|
+
as: a,
|
|
1676
|
+
"aria-label": l,
|
|
1677
1677
|
...u
|
|
1678
1678
|
}, c) {
|
|
1679
1679
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -1691,13 +1691,13 @@ const buttonIconVariants = cva(
|
|
|
1691
1691
|
),
|
|
1692
1692
|
disabled: o,
|
|
1693
1693
|
"aria-disabled": o,
|
|
1694
|
-
"aria-label":
|
|
1694
|
+
"aria-label": l,
|
|
1695
1695
|
inert: o ? !0 : void 0,
|
|
1696
1696
|
...u,
|
|
1697
1697
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1698
1698
|
Icon,
|
|
1699
1699
|
{
|
|
1700
|
-
as:
|
|
1700
|
+
as: a,
|
|
1701
1701
|
size: "sm",
|
|
1702
1702
|
color: getIconColorFromVariant(r)
|
|
1703
1703
|
}
|
|
@@ -1712,8 +1712,8 @@ const buttonIconVariants = cva(
|
|
|
1712
1712
|
children: i,
|
|
1713
1713
|
onOpenChange: s,
|
|
1714
1714
|
onClick: o,
|
|
1715
|
-
placement:
|
|
1716
|
-
container:
|
|
1715
|
+
placement: a,
|
|
1716
|
+
container: l,
|
|
1717
1717
|
preserve: u,
|
|
1718
1718
|
...c
|
|
1719
1719
|
} = e ?? {}, [f, n] = useState(!1);
|
|
@@ -1730,8 +1730,8 @@ const buttonIconVariants = cva(
|
|
|
1730
1730
|
{
|
|
1731
1731
|
isOpen: f,
|
|
1732
1732
|
onOutsideClick: d,
|
|
1733
|
-
placement:
|
|
1734
|
-
container:
|
|
1733
|
+
placement: a,
|
|
1734
|
+
container: l,
|
|
1735
1735
|
preserve: u,
|
|
1736
1736
|
content: /* @__PURE__ */ jsxRuntimeExports.jsx(Menu.Content, { children: i }),
|
|
1737
1737
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonIcon, { ref: t, as: r, onClick: h, ...c })
|
|
@@ -1808,7 +1808,7 @@ const buttonIconVariants = cva(
|
|
|
1808
1808
|
}
|
|
1809
1809
|
);
|
|
1810
1810
|
function useFloatingPosition(e, t = "1rem") {
|
|
1811
|
-
const r = useRef(null), [i, s] = useState({}), [o,
|
|
1811
|
+
const r = useRef(null), [i, s] = useState({}), [o, a] = useState("fixed bottom-4 right-4"), l = useCallback(() => {
|
|
1812
1812
|
const c = r.current;
|
|
1813
1813
|
if (!c) return;
|
|
1814
1814
|
const n = c.getBoundingClientRect().height > window.innerHeight;
|
|
@@ -1822,21 +1822,21 @@ function useFloatingPosition(e, t = "1rem") {
|
|
|
1822
1822
|
position: "fixed",
|
|
1823
1823
|
bottom: t,
|
|
1824
1824
|
zIndex: 50
|
|
1825
|
-
}, h = `fixed bottom-4 ${e}-4`), s(d),
|
|
1825
|
+
}, h = `fixed bottom-4 ${e}-4`), s(d), a(h);
|
|
1826
1826
|
}, [e, t]);
|
|
1827
1827
|
return useEffect(() => {
|
|
1828
|
-
|
|
1828
|
+
l();
|
|
1829
1829
|
const c = r.current;
|
|
1830
|
-
return c && c.addEventListener("scroll",
|
|
1831
|
-
c && c.removeEventListener("scroll",
|
|
1830
|
+
return c && c.addEventListener("scroll", l), window.addEventListener("resize", l), () => {
|
|
1831
|
+
c && c.removeEventListener("scroll", l), window.removeEventListener("resize", l);
|
|
1832
1832
|
};
|
|
1833
|
-
}, [
|
|
1834
|
-
r.current &&
|
|
1835
|
-
}, [e, t,
|
|
1833
|
+
}, [l]), useEffect(() => {
|
|
1834
|
+
r.current && l();
|
|
1835
|
+
}, [e, t, l]), [useCallback(
|
|
1836
1836
|
(c) => {
|
|
1837
|
-
r.current = c, c &&
|
|
1837
|
+
r.current = c, c && l();
|
|
1838
1838
|
},
|
|
1839
|
-
[
|
|
1839
|
+
[l]
|
|
1840
1840
|
), i, o];
|
|
1841
1841
|
}
|
|
1842
1842
|
const ButtonFloat = forwardRef(
|
|
@@ -1846,8 +1846,8 @@ const ButtonFloat = forwardRef(
|
|
|
1846
1846
|
size: i = "md",
|
|
1847
1847
|
side: s = "right",
|
|
1848
1848
|
offset: o = "1rem",
|
|
1849
|
-
...
|
|
1850
|
-
},
|
|
1849
|
+
...a
|
|
1850
|
+
}, l) {
|
|
1851
1851
|
const [u, c, f] = useFloatingPosition(
|
|
1852
1852
|
s,
|
|
1853
1853
|
o
|
|
@@ -1857,8 +1857,8 @@ const ButtonFloat = forwardRef(
|
|
|
1857
1857
|
}, []), /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: u, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1858
1858
|
"button",
|
|
1859
1859
|
{
|
|
1860
|
-
ref:
|
|
1861
|
-
type:
|
|
1860
|
+
ref: l,
|
|
1861
|
+
type: a.type || "button",
|
|
1862
1862
|
className: cn(
|
|
1863
1863
|
buttonFloatVariants({ variant: r, size: i }),
|
|
1864
1864
|
f,
|
|
@@ -1866,7 +1866,7 @@ const ButtonFloat = forwardRef(
|
|
|
1866
1866
|
t
|
|
1867
1867
|
),
|
|
1868
1868
|
style: c,
|
|
1869
|
-
...
|
|
1869
|
+
...a
|
|
1870
1870
|
}
|
|
1871
1871
|
) });
|
|
1872
1872
|
}
|
|
@@ -1988,7 +1988,7 @@ const BUTTONS = [
|
|
|
1988
1988
|
className: i,
|
|
1989
1989
|
"aria-label": s
|
|
1990
1990
|
}, o) => {
|
|
1991
|
-
const { input:
|
|
1991
|
+
const { input: a, inputRef: l, handleButton: u, handleInput: c } = useCalculator({
|
|
1992
1992
|
initialValue: e,
|
|
1993
1993
|
disabled: r,
|
|
1994
1994
|
onChange: t
|
|
@@ -2004,9 +2004,9 @@ const BUTTONS = [
|
|
|
2004
2004
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2005
2005
|
"input",
|
|
2006
2006
|
{
|
|
2007
|
-
ref:
|
|
2007
|
+
ref: l,
|
|
2008
2008
|
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)]",
|
|
2009
|
-
value:
|
|
2009
|
+
value: a,
|
|
2010
2010
|
onChange: c,
|
|
2011
2011
|
disabled: r,
|
|
2012
2012
|
inputMode: "decimal",
|
|
@@ -2042,15 +2042,16 @@ const BUTTONS = [
|
|
|
2042
2042
|
);
|
|
2043
2043
|
Calculator.displayName = "Calculator";
|
|
2044
2044
|
const cardVariants = cva(
|
|
2045
|
-
"flex justify-between transition-colors duration-200
|
|
2045
|
+
"flex justify-between transition-colors duration-200 w-full",
|
|
2046
2046
|
{
|
|
2047
2047
|
variants: {
|
|
2048
2048
|
size: {
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2049
|
+
none: "p-0",
|
|
2050
|
+
xs: "p-2 sm:p-2",
|
|
2051
|
+
sm: "p-2 sm:p-3",
|
|
2052
|
+
md: "p-3 sm:p-4",
|
|
2053
|
+
lg: "p-4 sm:p-6",
|
|
2054
|
+
xl: "p-6 sm:p-8"
|
|
2054
2055
|
},
|
|
2055
2056
|
shape: {
|
|
2056
2057
|
rounded: "rounded-lg",
|
|
@@ -2059,12 +2060,17 @@ const cardVariants = cva(
|
|
|
2059
2060
|
bordered: {
|
|
2060
2061
|
true: "border border-border",
|
|
2061
2062
|
false: ""
|
|
2063
|
+
},
|
|
2064
|
+
as: {
|
|
2065
|
+
button: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-light hover:bg-gray-50 cursor-pointer",
|
|
2066
|
+
div: ""
|
|
2062
2067
|
}
|
|
2063
2068
|
},
|
|
2064
2069
|
defaultVariants: {
|
|
2065
2070
|
size: "md",
|
|
2066
2071
|
shape: "rounded",
|
|
2067
|
-
bordered: !1
|
|
2072
|
+
bordered: !1,
|
|
2073
|
+
as: "button"
|
|
2068
2074
|
}
|
|
2069
2075
|
}
|
|
2070
2076
|
), CardList = forwardRef(
|
|
@@ -2072,7 +2078,7 @@ const cardVariants = cva(
|
|
|
2072
2078
|
"ul",
|
|
2073
2079
|
{
|
|
2074
2080
|
ref: t,
|
|
2075
|
-
className: "flex items-center min-w-0 overflow-hidden w-full",
|
|
2081
|
+
className: "flex flex-wrap items-center min-w-0 overflow-hidden w-full gap-x-0",
|
|
2076
2082
|
children: e
|
|
2077
2083
|
}
|
|
2078
2084
|
)
|
|
@@ -2081,8 +2087,8 @@ const cardVariants = cva(
|
|
|
2081
2087
|
"li",
|
|
2082
2088
|
{
|
|
2083
2089
|
ref: t,
|
|
2084
|
-
className: "flex items-center min-w-0 flex-shrink after:content-[''] after:inline-block after:mx-2 after:w-1 after:h-1 after:rounded-full after:bg-ghost last:after:hidden after:flex-shrink-0",
|
|
2085
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span",
|
|
2090
|
+
className: "flex items-center min-w-0 flex-shrink-0 after:content-[''] after:inline-block after:mx-1.5 sm:after:mx-2 after:w-1 after:h-1 after:rounded-full after:bg-ghost last:after:hidden after:flex-shrink-0",
|
|
2091
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "span", fontSize: "sm", color: "gray", ellipsis: !0, clamp: 1, children: e })
|
|
2086
2092
|
}
|
|
2087
2093
|
)
|
|
2088
2094
|
), CardRoot = forwardRef(
|
|
@@ -2093,40 +2099,49 @@ const cardVariants = cva(
|
|
|
2093
2099
|
title: i,
|
|
2094
2100
|
subtitle: s,
|
|
2095
2101
|
badge: o,
|
|
2096
|
-
actions: l,
|
|
2097
2102
|
supplementaryInfo: a,
|
|
2098
|
-
bordered:
|
|
2099
|
-
as:
|
|
2100
|
-
className:
|
|
2101
|
-
...
|
|
2102
|
-
},
|
|
2103
|
-
|
|
2103
|
+
bordered: l = !1,
|
|
2104
|
+
as: u = "button",
|
|
2105
|
+
className: c,
|
|
2106
|
+
...f
|
|
2107
|
+
}, n) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2108
|
+
u,
|
|
2104
2109
|
{
|
|
2105
|
-
ref:
|
|
2106
|
-
className: cn(
|
|
2107
|
-
|
|
2108
|
-
|
|
2110
|
+
ref: n,
|
|
2111
|
+
className: cn(
|
|
2112
|
+
cardVariants({ size: e, shape: t, bordered: l, as: u }),
|
|
2113
|
+
c
|
|
2114
|
+
),
|
|
2115
|
+
...f,
|
|
2116
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-3 sm:gap-4 w-full", children: [
|
|
2109
2117
|
r && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0", children: r }),
|
|
2110
2118
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full min-w-0", children: [
|
|
2111
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
2112
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2119
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2120
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2121
|
+
Text,
|
|
2122
|
+
{
|
|
2123
|
+
as: "h3",
|
|
2124
|
+
fontSize: "base",
|
|
2125
|
+
fontWeight: "semibold",
|
|
2126
|
+
className: "break-words leading-tight",
|
|
2127
|
+
children: i
|
|
2128
|
+
}
|
|
2129
|
+
),
|
|
2130
|
+
s && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mt-1", children: typeof s == "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { as: "p", fontSize: "sm", color: "gray", children: s }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-w-0 overflow-hidden", children: s }) })
|
|
2131
|
+
] }) }) }),
|
|
2132
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:justify-between sm:items-center", children: [
|
|
2133
|
+
o && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "order-1 sm:order-none overflow-hidden", children: o }),
|
|
2134
|
+
a && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-shrink-0 order-2 sm:order-none sm:ml-auto", children: typeof a == "string" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2135
|
+
Text,
|
|
2136
|
+
{
|
|
2137
|
+
as: "p",
|
|
2138
|
+
fontSize: "sm",
|
|
2139
|
+
color: "gray",
|
|
2140
|
+
className: "truncate",
|
|
2141
|
+
align: "right",
|
|
2142
|
+
children: a
|
|
2143
|
+
}
|
|
2144
|
+
) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "overflow-hidden", children: a }) })
|
|
2130
2145
|
] })
|
|
2131
2146
|
] })
|
|
2132
2147
|
] })
|
|
@@ -2180,19 +2195,19 @@ const cardVariants = cva(
|
|
|
2180
2195
|
size: i = "md",
|
|
2181
2196
|
disabled: s = !1,
|
|
2182
2197
|
children: o,
|
|
2183
|
-
...
|
|
2184
|
-
},
|
|
2198
|
+
...a
|
|
2199
|
+
}, l) {
|
|
2185
2200
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2186
2201
|
"button",
|
|
2187
2202
|
{
|
|
2188
|
-
ref:
|
|
2203
|
+
ref: l,
|
|
2189
2204
|
type: "button",
|
|
2190
2205
|
className: cn(filterChipVariants({ variant: r, size: i }), t),
|
|
2191
2206
|
disabled: s,
|
|
2192
2207
|
"aria-disabled": s,
|
|
2193
2208
|
"aria-label": `${o}, removable`,
|
|
2194
2209
|
inert: s ? !0 : void 0,
|
|
2195
|
-
...
|
|
2210
|
+
...a,
|
|
2196
2211
|
children: [
|
|
2197
2212
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "flex-shrink-0", children: o }),
|
|
2198
2213
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: XIcon, color: "inherit", size: i === "lg" ? "md" : "sm" })
|
|
@@ -2241,15 +2256,15 @@ const cardVariants = cva(
|
|
|
2241
2256
|
), noResultsHeaderVariants = cva(
|
|
2242
2257
|
"flex flex-row items-center gap-3 mb-2"
|
|
2243
2258
|
), NoResults = React__default.forwardRef(
|
|
2244
|
-
function e({ icon: t, title: r, subtitle: i, action: s, className: o, hasGrayBackground:
|
|
2259
|
+
function e({ icon: t, title: r, subtitle: i, action: s, className: o, hasGrayBackground: a, ...l }, u) {
|
|
2245
2260
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2246
2261
|
"section",
|
|
2247
2262
|
{
|
|
2248
2263
|
ref: u,
|
|
2249
|
-
className: cn(noResultsVariants({ hasGrayBackground:
|
|
2264
|
+
className: cn(noResultsVariants({ hasGrayBackground: a }), o),
|
|
2250
2265
|
role: "status",
|
|
2251
2266
|
"aria-label": "No results found",
|
|
2252
|
-
...
|
|
2267
|
+
...l,
|
|
2253
2268
|
children: [
|
|
2254
2269
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: noResultsHeaderVariants(), children: [
|
|
2255
2270
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { as: t, size: "lg", color: "ghost", "aria-hidden": "true" }),
|
|
@@ -2394,14 +2409,14 @@ const getTableColumnClass = (e) => {
|
|
|
2394
2409
|
);
|
|
2395
2410
|
}
|
|
2396
2411
|
), TableColumn = forwardRef(
|
|
2397
|
-
({ as: e = "td", span: t, align: r = "left", children: i, className: s, ...o },
|
|
2398
|
-
const
|
|
2412
|
+
({ as: e = "td", span: t, align: r = "left", children: i, className: s, ...o }, a) => {
|
|
2413
|
+
const l = e === "th" ? "columnheader" : "cell";
|
|
2399
2414
|
let u = "text-left";
|
|
2400
2415
|
return r === "center" ? u = "text-center" : r === "right" && (u = "text-right"), /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2401
2416
|
"div",
|
|
2402
2417
|
{
|
|
2403
|
-
ref:
|
|
2404
|
-
role:
|
|
2418
|
+
ref: a,
|
|
2419
|
+
role: l,
|
|
2405
2420
|
className: cn(
|
|
2406
2421
|
"px-4 py-2",
|
|
2407
2422
|
"[&:not(:last-child)]:border-r [&:not(:last-child)]:border-border",
|
|
@@ -2512,9 +2527,9 @@ const getTableColumnClass = (e) => {
|
|
|
2512
2527
|
)
|
|
2513
2528
|
);
|
|
2514
2529
|
function useImage({ src: e }) {
|
|
2515
|
-
const [t, r] = useState(!1), [i, s] = useState(!1), o = useRef(!1),
|
|
2530
|
+
const [t, r] = useState(!1), [i, s] = useState(!1), o = useRef(!1), a = () => {
|
|
2516
2531
|
r(!0);
|
|
2517
|
-
},
|
|
2532
|
+
}, l = () => {
|
|
2518
2533
|
s(!0);
|
|
2519
2534
|
};
|
|
2520
2535
|
return useEffect(() => {
|
|
@@ -2530,8 +2545,8 @@ function useImage({ src: e }) {
|
|
|
2530
2545
|
}, [e]), {
|
|
2531
2546
|
loaded: t,
|
|
2532
2547
|
errored: i,
|
|
2533
|
-
handleLoad:
|
|
2534
|
-
handleError:
|
|
2548
|
+
handleLoad: a,
|
|
2549
|
+
handleError: l
|
|
2535
2550
|
};
|
|
2536
2551
|
}
|
|
2537
2552
|
const imageVariants = cva("block object-cover", {
|
|
@@ -2609,12 +2624,12 @@ function BaseImageFallback({
|
|
|
2609
2624
|
className: i,
|
|
2610
2625
|
style: s,
|
|
2611
2626
|
shape: o,
|
|
2612
|
-
size:
|
|
2627
|
+
size: a
|
|
2613
2628
|
}) {
|
|
2614
2629
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2615
2630
|
"div",
|
|
2616
2631
|
{
|
|
2617
|
-
className: imageAtomVariants({ shape: o, size:
|
|
2632
|
+
className: imageAtomVariants({ shape: o, size: a, className: i }),
|
|
2618
2633
|
style: { width: t, height: r, ...s },
|
|
2619
2634
|
"aria-label": e,
|
|
2620
2635
|
role: "img",
|
|
@@ -2640,8 +2655,8 @@ const BaseImage = forwardRef(
|
|
|
2640
2655
|
onError: i,
|
|
2641
2656
|
width: s,
|
|
2642
2657
|
height: o,
|
|
2643
|
-
loading:
|
|
2644
|
-
position:
|
|
2658
|
+
loading: a = "lazy",
|
|
2659
|
+
position: l = "cover",
|
|
2645
2660
|
size: u = "auto",
|
|
2646
2661
|
shape: c,
|
|
2647
2662
|
className: f,
|
|
@@ -2673,10 +2688,10 @@ const BaseImage = forwardRef(
|
|
|
2673
2688
|
alt: t,
|
|
2674
2689
|
width: R,
|
|
2675
2690
|
height: E,
|
|
2676
|
-
loading:
|
|
2691
|
+
loading: a,
|
|
2677
2692
|
className: cn(
|
|
2678
2693
|
imageVariants({
|
|
2679
|
-
position:
|
|
2694
|
+
position: l,
|
|
2680
2695
|
size: u,
|
|
2681
2696
|
shape: c
|
|
2682
2697
|
}),
|