@geomak/ui 5.8.0 → 5.10.0
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/index.cjs +105 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +126 -38
- package/dist/index.d.ts +126 -38
- package/dist/index.js +105 -54
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -642,7 +642,9 @@ function IconButton({
|
|
|
642
642
|
disabled = false,
|
|
643
643
|
size = "lg",
|
|
644
644
|
loading = false,
|
|
645
|
-
loadingIcon
|
|
645
|
+
loadingIcon,
|
|
646
|
+
className = "",
|
|
647
|
+
style
|
|
646
648
|
}) {
|
|
647
649
|
const colorScheme = React8.useMemo(() => {
|
|
648
650
|
if (type === "primary") {
|
|
@@ -659,7 +661,8 @@ function IconButton({
|
|
|
659
661
|
type: buttonType,
|
|
660
662
|
disabled: disabled || loading,
|
|
661
663
|
onClick,
|
|
662
|
-
|
|
664
|
+
style,
|
|
665
|
+
className: `${size === "sm" ? "p-1" : "p-2"} rounded-lg shadow-md transition-colors duration-150 ${colorScheme} disabled:bg-surface-raised disabled:text-foreground-muted disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-accent ${className}`.trim(),
|
|
663
666
|
children: loading ? loadingIcon : icon
|
|
664
667
|
}
|
|
665
668
|
);
|
|
@@ -710,7 +713,8 @@ function Button({
|
|
|
710
713
|
disabled,
|
|
711
714
|
style,
|
|
712
715
|
icon,
|
|
713
|
-
onClick
|
|
716
|
+
onClick,
|
|
717
|
+
className = ""
|
|
714
718
|
}) {
|
|
715
719
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
716
720
|
"button",
|
|
@@ -725,8 +729,9 @@ function Button({
|
|
|
725
729
|
"outline-none transition-colors duration-150 select-none",
|
|
726
730
|
"whitespace-nowrap",
|
|
727
731
|
SIZE_CLASSES[size],
|
|
728
|
-
VARIANT_CLASSES[variant]
|
|
729
|
-
|
|
732
|
+
VARIANT_CLASSES[variant],
|
|
733
|
+
className
|
|
734
|
+
].filter(Boolean).join(" "),
|
|
730
735
|
children: [
|
|
731
736
|
loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
732
737
|
"svg",
|
|
@@ -761,7 +766,8 @@ function Modal({
|
|
|
761
766
|
cancelText = "Cancel",
|
|
762
767
|
hasFooter = true,
|
|
763
768
|
title,
|
|
764
|
-
children
|
|
769
|
+
children,
|
|
770
|
+
className = ""
|
|
765
771
|
}) {
|
|
766
772
|
const reduced = framerMotion.useReducedMotion();
|
|
767
773
|
const maxWidth = width ?? size?.[0] ?? 600;
|
|
@@ -781,7 +787,7 @@ function Modal({
|
|
|
781
787
|
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Content, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
782
788
|
framerMotion.motion.div,
|
|
783
789
|
{
|
|
784
|
-
className:
|
|
790
|
+
className: `fixed left-1/2 top-1/2 z-modal flex flex-col w-[calc(100%-2rem)] max-h-[90dvh] bg-surface rounded-2xl shadow-xl overflow-hidden focus:outline-none ${className}`.trim(),
|
|
785
791
|
style: {
|
|
786
792
|
maxWidth,
|
|
787
793
|
x: "-50%",
|
|
@@ -843,7 +849,8 @@ function Drawer({
|
|
|
843
849
|
onOk,
|
|
844
850
|
onCancel,
|
|
845
851
|
title,
|
|
846
|
-
children
|
|
852
|
+
children,
|
|
853
|
+
className = ""
|
|
847
854
|
}) {
|
|
848
855
|
const reduced = framerMotion.useReducedMotion();
|
|
849
856
|
const isRight = placement === "right";
|
|
@@ -864,7 +871,7 @@ function Drawer({
|
|
|
864
871
|
/* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Content, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
865
872
|
framerMotion.motion.div,
|
|
866
873
|
{
|
|
867
|
-
className: `fixed top-0 bottom-0 ${isRight ? "right-0" : "left-0"} z-modal flex flex-col bg-surface shadow-xl focus:outline-none
|
|
874
|
+
className: `fixed top-0 bottom-0 ${isRight ? "right-0" : "left-0"} z-modal flex flex-col bg-surface shadow-xl focus:outline-none ${className}`.trim(),
|
|
868
875
|
style: { width: `min(calc(100vw - 1rem), ${width}px)` },
|
|
869
876
|
initial: { x: reduced ? 0 : hiddenX, opacity: reduced ? 0 : 1 },
|
|
870
877
|
animate: { x: 0, opacity: 1 },
|
|
@@ -911,7 +918,8 @@ function Tooltip({
|
|
|
911
918
|
title,
|
|
912
919
|
placement = "top",
|
|
913
920
|
delayDuration = 300,
|
|
914
|
-
sideOffset = 8
|
|
921
|
+
sideOffset = 8,
|
|
922
|
+
className = ""
|
|
915
923
|
}) {
|
|
916
924
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { children: [
|
|
917
925
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex", children }) }),
|
|
@@ -931,8 +939,9 @@ function Tooltip({
|
|
|
931
939
|
// Out animation (always the same — just fade)
|
|
932
940
|
"data-[state=closed]:animate-tooltip-out",
|
|
933
941
|
// In animation — direction-aware
|
|
934
|
-
ANIMATION[placement]
|
|
935
|
-
|
|
942
|
+
ANIMATION[placement],
|
|
943
|
+
className
|
|
944
|
+
].filter(Boolean).join(" "),
|
|
936
945
|
children: [
|
|
937
946
|
title,
|
|
938
947
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1165,9 +1174,11 @@ function Tree({
|
|
|
1165
1174
|
nodes,
|
|
1166
1175
|
onNodeClick,
|
|
1167
1176
|
defaultExpandAll = false,
|
|
1168
|
-
defaultExpandedKeys = []
|
|
1177
|
+
defaultExpandedKeys = [],
|
|
1178
|
+
className = "",
|
|
1179
|
+
style
|
|
1169
1180
|
}) {
|
|
1170
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1181
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `p-1 w-full ${className}`.trim(), style, children: nodes.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1171
1182
|
TreeNodeItem,
|
|
1172
1183
|
{
|
|
1173
1184
|
item,
|
|
@@ -1434,7 +1445,8 @@ function LoadingSpinner({
|
|
|
1434
1445
|
inline = false,
|
|
1435
1446
|
spinnerColor,
|
|
1436
1447
|
textColor,
|
|
1437
|
-
backdropOpacity = 0.8
|
|
1448
|
+
backdropOpacity = 0.8,
|
|
1449
|
+
className = ""
|
|
1438
1450
|
}) {
|
|
1439
1451
|
const reduced = framerMotion.useReducedMotion();
|
|
1440
1452
|
const letters = prompt ? Array.from(prompt) : [];
|
|
@@ -1469,7 +1481,7 @@ function LoadingSpinner({
|
|
|
1469
1481
|
role: "status",
|
|
1470
1482
|
"aria-live": "polite",
|
|
1471
1483
|
"aria-label": prompt ?? "Loading",
|
|
1472
|
-
className:
|
|
1484
|
+
className: `flex flex-col items-center justify-center gap-3 ${className}`.trim(),
|
|
1473
1485
|
children: content
|
|
1474
1486
|
}
|
|
1475
1487
|
);
|
|
@@ -1480,7 +1492,7 @@ function LoadingSpinner({
|
|
|
1480
1492
|
role: "status",
|
|
1481
1493
|
"aria-live": "polite",
|
|
1482
1494
|
"aria-label": prompt ?? "Loading",
|
|
1483
|
-
className:
|
|
1495
|
+
className: `fixed inset-0 z-[8000000] flex flex-col items-center justify-center gap-6 bg-background backdrop-blur-sm ${className}`.trim(),
|
|
1484
1496
|
style: { opacity: backdropOpacity },
|
|
1485
1497
|
children: content
|
|
1486
1498
|
}
|
|
@@ -1531,9 +1543,11 @@ function List2({
|
|
|
1531
1543
|
items,
|
|
1532
1544
|
onItemClick,
|
|
1533
1545
|
activeKey,
|
|
1534
|
-
density = "comfortable"
|
|
1546
|
+
density = "comfortable",
|
|
1547
|
+
className = "",
|
|
1548
|
+
style
|
|
1535
1549
|
}) {
|
|
1536
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "listbox", className:
|
|
1550
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "listbox", className: `flex flex-col ${className}`.trim(), style, children: items.map((item) => {
|
|
1537
1551
|
const isActive = activeKey === item.key;
|
|
1538
1552
|
const isDisabled = !!item.disabled;
|
|
1539
1553
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1587,7 +1601,8 @@ function ScalableContainer({
|
|
|
1587
1601
|
assignClassOnClick,
|
|
1588
1602
|
expandIcon,
|
|
1589
1603
|
collapseIcon,
|
|
1590
|
-
togglePosition = "top-right"
|
|
1604
|
+
togglePosition = "top-right",
|
|
1605
|
+
className = ""
|
|
1591
1606
|
}) {
|
|
1592
1607
|
const containerRef = React8.useRef(null);
|
|
1593
1608
|
const [internalScaled, setInternalScaled] = React8.useState(false);
|
|
@@ -1622,8 +1637,9 @@ function ScalableContainer({
|
|
|
1622
1637
|
// OS-window aesthetic: subtle elevation at rest, lifted shadow
|
|
1623
1638
|
// when expanded. No background colour change.
|
|
1624
1639
|
isScaled ? "shadow-2xl" : "shadow-md",
|
|
1625
|
-
"transition-shadow duration-300"
|
|
1626
|
-
|
|
1640
|
+
"transition-shadow duration-300",
|
|
1641
|
+
className
|
|
1642
|
+
].filter(Boolean).join(" "),
|
|
1627
1643
|
children: [
|
|
1628
1644
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip, { placement: "bottom", title: isScaled ? "Collapse" : "Expand", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1629
1645
|
"button",
|
|
@@ -1655,8 +1671,8 @@ function CollapseIcon() {
|
|
|
1655
1671
|
function ExpandIcon() {
|
|
1656
1672
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 8V4h4M20 8V4h-4M4 16v4h4M20 16v4h-4" }) });
|
|
1657
1673
|
}
|
|
1658
|
-
function GridCard({ item, buttonText = "Open Application", onOpen }) {
|
|
1659
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1674
|
+
function GridCard({ item, buttonText = "Open Application", onOpen, className = "", style }) {
|
|
1675
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col w-[200px] h-[250px] rounded-lg bg-ice dark:bg-independence items-center justify-between p-2 shadow-2xl ${className}`.trim(), style, children: [
|
|
1660
1676
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-prussian-blue dark:text-white text-lg font-bold text-center h-1/4", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { children: item.title }) }),
|
|
1661
1677
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1/4 flex items-center justify-center", children: typeof item.cover === "string" ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.cover, alt: "Grid Card Cover" }) : item.cover }),
|
|
1662
1678
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-prussian-blue text-sm dark:text-white text-center h-1/4", children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: item.description }) }),
|
|
@@ -1675,12 +1691,13 @@ function OpaqueGridCard({
|
|
|
1675
1691
|
item,
|
|
1676
1692
|
isRight = false,
|
|
1677
1693
|
buttonText = "Open Application",
|
|
1678
|
-
onOpen
|
|
1694
|
+
onOpen,
|
|
1695
|
+
className = ""
|
|
1679
1696
|
}) {
|
|
1680
1697
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1681
1698
|
"div",
|
|
1682
1699
|
{
|
|
1683
|
-
className: `flex flex-col w-[200px] h-[250px] rounded-lg items-center p-2 ${!isRight ? "opaque-carousel-card-left dark:opaque-carousel-card-dark-left" : "opaque-carousel-card-right dark:opaque-carousel-card-dark-right"}
|
|
1700
|
+
className: `flex flex-col w-[200px] h-[250px] rounded-lg items-center p-2 ${!isRight ? "opaque-carousel-card-left dark:opaque-carousel-card-dark-left" : "opaque-carousel-card-right dark:opaque-carousel-card-dark-right"} ${className}`.trim(),
|
|
1684
1701
|
children: [
|
|
1685
1702
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1686
1703
|
"div",
|
|
@@ -1722,10 +1739,10 @@ function OpaqueGridCard({
|
|
|
1722
1739
|
}
|
|
1723
1740
|
);
|
|
1724
1741
|
}
|
|
1725
|
-
function CatalogGrid({ items, buttonText, onOpen }) {
|
|
1726
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1742
|
+
function CatalogGrid({ items, buttonText, onOpen, className = "" }) {
|
|
1743
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex flex-wrap gap-2 ${className}`.trim(), children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(GridCard, { item, buttonText, onOpen }, item.key)) });
|
|
1727
1744
|
}
|
|
1728
|
-
function CatalogCarousel({ items, buttonText, onOpen }) {
|
|
1745
|
+
function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
1729
1746
|
const [activeIndex, setActiveIndex] = React8.useState(0);
|
|
1730
1747
|
const [indexPool, setIndexPool] = React8.useState([]);
|
|
1731
1748
|
const cardRefs = React8.useRef([]);
|
|
@@ -1762,7 +1779,7 @@ function CatalogCarousel({ items, buttonText, onOpen }) {
|
|
|
1762
1779
|
}, [activeIndex, getIndexes, items.length]);
|
|
1763
1780
|
const nextApp = () => setActiveIndex((prev) => prev + 1 === items.length ? 0 : prev + 1);
|
|
1764
1781
|
const previousApp = () => setActiveIndex((prev) => prev - 1 === -1 ? items.length - 1 : prev - 1);
|
|
1765
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1782
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex items-center justify-center w-full h-full ${className}`.trim(), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-10", children: [
|
|
1766
1783
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1767
1784
|
"button",
|
|
1768
1785
|
{
|
|
@@ -1812,16 +1829,16 @@ function CatalogCarousel({ items, buttonText, onOpen }) {
|
|
|
1812
1829
|
)
|
|
1813
1830
|
] }) });
|
|
1814
1831
|
}
|
|
1815
|
-
function Catalog({ display: display2 = "grid", items = [], buttonText, onOpen }) {
|
|
1816
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1832
|
+
function Catalog({ display: display2 = "grid", items = [], buttonText, onOpen, className = "" }) {
|
|
1833
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `w-full h-full ${className}`.trim(), children: display2 === "grid" ? /* @__PURE__ */ jsxRuntime.jsx(CatalogGrid, { items, buttonText, onOpen }) : /* @__PURE__ */ jsxRuntime.jsx(CatalogCarousel, { items, buttonText, onOpen }) });
|
|
1817
1834
|
}
|
|
1818
|
-
function ContextMenu({ items, children }) {
|
|
1835
|
+
function ContextMenu({ items, children, className = "" }) {
|
|
1819
1836
|
return /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.Root, { children: [
|
|
1820
1837
|
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Trigger, { asChild: true, children }),
|
|
1821
1838
|
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1822
1839
|
ContextMenuPrimitive__namespace.Content,
|
|
1823
1840
|
{
|
|
1824
|
-
className: CONTENT_CLASSNAME,
|
|
1841
|
+
className: `${CONTENT_CLASSNAME} ${className}`.trim(),
|
|
1825
1842
|
collisionPadding: 8,
|
|
1826
1843
|
children: items.map((item) => renderItem(item))
|
|
1827
1844
|
}
|
|
@@ -2275,8 +2292,8 @@ function Field({
|
|
|
2275
2292
|
);
|
|
2276
2293
|
}
|
|
2277
2294
|
var SearchIcon = /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "w-4 h-4", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", d: "M10.5 3.75a6.75 6.75 0 100 13.5 6.75 6.75 0 000-13.5zM2.25 10.5a8.25 8.25 0 1114.59 5.28l4.69 4.69a.75.75 0 11-1.06 1.06l-4.69-4.69A8.25 8.25 0 012.25 10.5z", clipRule: "evenodd" }) });
|
|
2278
|
-
var SearchInput = React8__default.default.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText }, ref) {
|
|
2279
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, htmlFor, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2295
|
+
var SearchInput = React8__default.default.forwardRef(function SearchInput2({ value, onChange, disabled, label, htmlFor, placeholder, name, inputStyle, style, layout = "vertical", size = "md", icon, helperText, className }, ref) {
|
|
2296
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2280
2297
|
"div",
|
|
2281
2298
|
{
|
|
2282
2299
|
className: `flex items-center ${fieldShell({ size, disabled, focusWithin: true })}`,
|
|
@@ -2424,7 +2441,8 @@ function Dropdown({
|
|
|
2424
2441
|
items = [],
|
|
2425
2442
|
labelStyle = {},
|
|
2426
2443
|
placeholder,
|
|
2427
|
-
size = "md"
|
|
2444
|
+
size = "md",
|
|
2445
|
+
className = ""
|
|
2428
2446
|
}) {
|
|
2429
2447
|
const [open, setOpen] = React8.useState(false);
|
|
2430
2448
|
const [selectedItems, setSelectedItems] = React8.useState([]);
|
|
@@ -2472,7 +2490,7 @@ function Dropdown({
|
|
|
2472
2490
|
);
|
|
2473
2491
|
};
|
|
2474
2492
|
const isSelected = (key) => Array.isArray(value) ? value.includes(key) : value === key;
|
|
2475
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2493
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: className || void 0, children: [
|
|
2476
2494
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2477
2495
|
"div",
|
|
2478
2496
|
{
|
|
@@ -2880,7 +2898,9 @@ function Table({
|
|
|
2880
2898
|
footer = null,
|
|
2881
2899
|
header = null,
|
|
2882
2900
|
loading = false,
|
|
2883
|
-
loadingRowCount = 8
|
|
2901
|
+
loadingRowCount = 8,
|
|
2902
|
+
className = "",
|
|
2903
|
+
style
|
|
2884
2904
|
}) {
|
|
2885
2905
|
const searchRef = React8.useRef(null);
|
|
2886
2906
|
const [searchTerm, setSearchTerm] = React8.useState("");
|
|
@@ -2940,7 +2960,7 @@ function Table({
|
|
|
2940
2960
|
}
|
|
2941
2961
|
setActivePage(newPage);
|
|
2942
2962
|
};
|
|
2943
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
2963
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `w-full h-max rounded-lg ${className}`.trim(), style, children: [
|
|
2944
2964
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
2945
2965
|
hasSearch && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2946
2966
|
SearchInput_default,
|
|
@@ -3003,9 +3023,9 @@ function TableSkeletonBody({
|
|
|
3003
3023
|
i
|
|
3004
3024
|
)) });
|
|
3005
3025
|
}
|
|
3006
|
-
function ThemeSwitch({ checked, onChange, label = "Toggle dark mode" }) {
|
|
3026
|
+
function ThemeSwitch({ checked, onChange, label = "Toggle dark mode", className = "" }) {
|
|
3007
3027
|
const id = React8.useId();
|
|
3008
|
-
return /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className:
|
|
3028
|
+
return /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: id, className: `flex items-center gap-2 cursor-pointer select-none ${className}`.trim(), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3009
3029
|
SwitchPrimitive__namespace.Root,
|
|
3010
3030
|
{
|
|
3011
3031
|
id,
|
|
@@ -3117,7 +3137,8 @@ function Sidebar({
|
|
|
3117
3137
|
onToggle,
|
|
3118
3138
|
expandedWidth = 220,
|
|
3119
3139
|
collapsedWidth = 52,
|
|
3120
|
-
footer
|
|
3140
|
+
footer,
|
|
3141
|
+
className = ""
|
|
3121
3142
|
}) {
|
|
3122
3143
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { delayDuration: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3123
3144
|
framerMotion.motion.aside,
|
|
@@ -3125,7 +3146,7 @@ function Sidebar({
|
|
|
3125
3146
|
initial: false,
|
|
3126
3147
|
animate: { width: isExpanded ? expandedWidth : collapsedWidth },
|
|
3127
3148
|
transition: { type: "tween", duration: 0.22, ease: [0.16, 1, 0.3, 1] },
|
|
3128
|
-
className:
|
|
3149
|
+
className: `relative flex h-full flex-col border-r border-border bg-surface overflow-hidden flex-shrink-0 ${className}`.trim(),
|
|
3129
3150
|
children: [
|
|
3130
3151
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: [
|
|
3131
3152
|
"flex h-14 flex-shrink-0 items-center border-b border-border",
|
|
@@ -3451,6 +3472,7 @@ function TextInput({
|
|
|
3451
3472
|
onBlur,
|
|
3452
3473
|
errorMessage,
|
|
3453
3474
|
helperText,
|
|
3475
|
+
className,
|
|
3454
3476
|
required,
|
|
3455
3477
|
prefix,
|
|
3456
3478
|
suffix
|
|
@@ -3479,6 +3501,7 @@ function TextInput({
|
|
|
3479
3501
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3480
3502
|
Field,
|
|
3481
3503
|
{
|
|
3504
|
+
className,
|
|
3482
3505
|
label,
|
|
3483
3506
|
htmlFor,
|
|
3484
3507
|
errorId,
|
|
@@ -3513,6 +3536,7 @@ function NumberInput({
|
|
|
3513
3536
|
size = "md",
|
|
3514
3537
|
errorMessage,
|
|
3515
3538
|
helperText,
|
|
3539
|
+
className,
|
|
3516
3540
|
required,
|
|
3517
3541
|
inputStyle,
|
|
3518
3542
|
labelStyle,
|
|
@@ -3557,6 +3581,7 @@ function NumberInput({
|
|
|
3557
3581
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3558
3582
|
Field,
|
|
3559
3583
|
{
|
|
3584
|
+
className,
|
|
3560
3585
|
label,
|
|
3561
3586
|
htmlFor,
|
|
3562
3587
|
errorId,
|
|
@@ -3648,6 +3673,7 @@ function Password({
|
|
|
3648
3673
|
onBlur,
|
|
3649
3674
|
errorMessage,
|
|
3650
3675
|
helperText,
|
|
3676
|
+
className,
|
|
3651
3677
|
required,
|
|
3652
3678
|
showIcon,
|
|
3653
3679
|
hideIcon
|
|
@@ -3658,6 +3684,7 @@ function Password({
|
|
|
3658
3684
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3659
3685
|
Field,
|
|
3660
3686
|
{
|
|
3687
|
+
className,
|
|
3661
3688
|
label,
|
|
3662
3689
|
htmlFor,
|
|
3663
3690
|
errorId,
|
|
@@ -3720,7 +3747,8 @@ function Checkbox({
|
|
|
3720
3747
|
disabled = false,
|
|
3721
3748
|
required,
|
|
3722
3749
|
layout = "horizontal",
|
|
3723
|
-
labelPosition = "right"
|
|
3750
|
+
labelPosition = "right",
|
|
3751
|
+
className = ""
|
|
3724
3752
|
}) {
|
|
3725
3753
|
const isChecked = checked ?? value ?? false;
|
|
3726
3754
|
const labelFirst = labelPosition === "left";
|
|
@@ -3798,7 +3826,7 @@ function Checkbox({
|
|
|
3798
3826
|
] })
|
|
3799
3827
|
] });
|
|
3800
3828
|
}
|
|
3801
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
3829
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 ${className}`.trim(), children: [
|
|
3802
3830
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-1", children: [
|
|
3803
3831
|
content,
|
|
3804
3832
|
helperText != null && /* @__PURE__ */ jsxRuntime.jsx(FieldHelpIcon, { text: helperText })
|
|
@@ -3829,6 +3857,7 @@ function RadioGroup({
|
|
|
3829
3857
|
disabled,
|
|
3830
3858
|
required,
|
|
3831
3859
|
helperText,
|
|
3860
|
+
className,
|
|
3832
3861
|
errorMessage
|
|
3833
3862
|
}) {
|
|
3834
3863
|
const errorId = React8.useId();
|
|
@@ -3838,6 +3867,7 @@ function RadioGroup({
|
|
|
3838
3867
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3839
3868
|
Field,
|
|
3840
3869
|
{
|
|
3870
|
+
className,
|
|
3841
3871
|
label,
|
|
3842
3872
|
htmlFor: groupId,
|
|
3843
3873
|
errorId,
|
|
@@ -3923,6 +3953,7 @@ function Switch({
|
|
|
3923
3953
|
label,
|
|
3924
3954
|
layout = "horizontal",
|
|
3925
3955
|
helperText,
|
|
3956
|
+
className,
|
|
3926
3957
|
offLabel,
|
|
3927
3958
|
onLabel,
|
|
3928
3959
|
name,
|
|
@@ -3948,6 +3979,7 @@ function Switch({
|
|
|
3948
3979
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3949
3980
|
Field,
|
|
3950
3981
|
{
|
|
3982
|
+
className,
|
|
3951
3983
|
label,
|
|
3952
3984
|
htmlFor: id,
|
|
3953
3985
|
errorId,
|
|
@@ -4002,6 +4034,7 @@ function AutoComplete({
|
|
|
4002
4034
|
icon,
|
|
4003
4035
|
errorMessage,
|
|
4004
4036
|
helperText,
|
|
4037
|
+
className,
|
|
4005
4038
|
required,
|
|
4006
4039
|
htmlFor
|
|
4007
4040
|
}) {
|
|
@@ -4056,6 +4089,7 @@ function AutoComplete({
|
|
|
4056
4089
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4057
4090
|
Field,
|
|
4058
4091
|
{
|
|
4092
|
+
className,
|
|
4059
4093
|
label,
|
|
4060
4094
|
htmlFor,
|
|
4061
4095
|
errorId,
|
|
@@ -4161,6 +4195,7 @@ function TreeSelect({
|
|
|
4161
4195
|
disabled,
|
|
4162
4196
|
layout = "horizontal",
|
|
4163
4197
|
helperText,
|
|
4198
|
+
className,
|
|
4164
4199
|
required,
|
|
4165
4200
|
errorMessage,
|
|
4166
4201
|
style,
|
|
@@ -4248,6 +4283,7 @@ function TreeSelect({
|
|
|
4248
4283
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4249
4284
|
Field,
|
|
4250
4285
|
{
|
|
4286
|
+
className,
|
|
4251
4287
|
label,
|
|
4252
4288
|
htmlFor,
|
|
4253
4289
|
errorId,
|
|
@@ -4414,6 +4450,7 @@ function FileInput({
|
|
|
4414
4450
|
maxSize,
|
|
4415
4451
|
errorMessage,
|
|
4416
4452
|
helperText,
|
|
4453
|
+
className,
|
|
4417
4454
|
disabled,
|
|
4418
4455
|
required,
|
|
4419
4456
|
icon
|
|
@@ -4456,6 +4493,7 @@ function FileInput({
|
|
|
4456
4493
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4457
4494
|
Field,
|
|
4458
4495
|
{
|
|
4496
|
+
className,
|
|
4459
4497
|
label,
|
|
4460
4498
|
htmlFor,
|
|
4461
4499
|
errorId,
|
|
@@ -4609,7 +4647,8 @@ function DatePicker({
|
|
|
4609
4647
|
format = defaultFormat,
|
|
4610
4648
|
weekStartsOn = 0,
|
|
4611
4649
|
clearable = true,
|
|
4612
|
-
size = "md"
|
|
4650
|
+
size = "md",
|
|
4651
|
+
className = ""
|
|
4613
4652
|
}) {
|
|
4614
4653
|
const errorId = React8.useId();
|
|
4615
4654
|
const hasError = errorMessage != null;
|
|
@@ -4690,7 +4729,7 @@ function DatePicker({
|
|
|
4690
4729
|
}
|
|
4691
4730
|
};
|
|
4692
4731
|
const displayValue = value ? format(value) : "";
|
|
4693
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
4732
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 ${className}`.trim(), children: [
|
|
4694
4733
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex ${layout === "vertical" ? "flex-col gap-1.5" : "flex-row items-start gap-3"}`, children: [
|
|
4695
4734
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4696
4735
|
FieldLabel,
|
|
@@ -4919,6 +4958,7 @@ function TextArea({
|
|
|
4919
4958
|
resize,
|
|
4920
4959
|
errorMessage,
|
|
4921
4960
|
helperText,
|
|
4961
|
+
className,
|
|
4922
4962
|
required,
|
|
4923
4963
|
style,
|
|
4924
4964
|
inputStyle
|
|
@@ -4940,6 +4980,7 @@ function TextArea({
|
|
|
4940
4980
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4941
4981
|
Field,
|
|
4942
4982
|
{
|
|
4983
|
+
className,
|
|
4943
4984
|
label,
|
|
4944
4985
|
htmlFor,
|
|
4945
4986
|
errorId,
|
|
@@ -4988,6 +5029,7 @@ function SegmentedControl({
|
|
|
4988
5029
|
label,
|
|
4989
5030
|
layout = "vertical",
|
|
4990
5031
|
helperText,
|
|
5032
|
+
className,
|
|
4991
5033
|
name,
|
|
4992
5034
|
required,
|
|
4993
5035
|
errorMessage,
|
|
@@ -5008,6 +5050,7 @@ function SegmentedControl({
|
|
|
5008
5050
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5009
5051
|
Field,
|
|
5010
5052
|
{
|
|
5053
|
+
className,
|
|
5011
5054
|
label,
|
|
5012
5055
|
htmlFor: groupId,
|
|
5013
5056
|
errorId,
|
|
@@ -5086,6 +5129,7 @@ function Slider({
|
|
|
5086
5129
|
disabled,
|
|
5087
5130
|
errorMessage,
|
|
5088
5131
|
helperText,
|
|
5132
|
+
className,
|
|
5089
5133
|
required,
|
|
5090
5134
|
name,
|
|
5091
5135
|
htmlFor
|
|
@@ -5104,7 +5148,7 @@ function Slider({
|
|
|
5104
5148
|
onChange?.(next);
|
|
5105
5149
|
};
|
|
5106
5150
|
const valueText = current.map(formatValue).join(" \u2013 ");
|
|
5107
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Field, { label: void 0, errorId, errorMessage, children: [
|
|
5151
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Field, { className, label: void 0, errorId, errorMessage, children: [
|
|
5108
5152
|
(label || showValue) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
5109
5153
|
label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
5110
5154
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor, className: "text-sm font-medium text-foreground select-none", children: [
|
|
@@ -5185,6 +5229,7 @@ function TagsInput({
|
|
|
5185
5229
|
disabled,
|
|
5186
5230
|
errorMessage,
|
|
5187
5231
|
helperText,
|
|
5232
|
+
className,
|
|
5188
5233
|
required,
|
|
5189
5234
|
maxTags,
|
|
5190
5235
|
dedupe = true,
|
|
@@ -5248,6 +5293,7 @@ function TagsInput({
|
|
|
5248
5293
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5249
5294
|
Field,
|
|
5250
5295
|
{
|
|
5296
|
+
className,
|
|
5251
5297
|
label,
|
|
5252
5298
|
htmlFor,
|
|
5253
5299
|
errorId,
|
|
@@ -5322,6 +5368,7 @@ function OtpInput({
|
|
|
5322
5368
|
required,
|
|
5323
5369
|
layout = "vertical",
|
|
5324
5370
|
helperText,
|
|
5371
|
+
className,
|
|
5325
5372
|
groupAfter
|
|
5326
5373
|
}) {
|
|
5327
5374
|
const errorId = React8.useId();
|
|
@@ -5375,7 +5422,7 @@ function OtpInput({
|
|
|
5375
5422
|
emit(valid.join(""));
|
|
5376
5423
|
focusBox(valid.length);
|
|
5377
5424
|
};
|
|
5378
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React8__default.default.Fragment, { children: [
|
|
5425
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, required, layout, helperText, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", role: "group", "aria-label": typeof label === "string" ? label : "One-time code", children: chars.map((char, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React8__default.default.Fragment, { children: [
|
|
5379
5426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5380
5427
|
"input",
|
|
5381
5428
|
{
|
|
@@ -5430,6 +5477,7 @@ function Rating({
|
|
|
5430
5477
|
name,
|
|
5431
5478
|
layout = "vertical",
|
|
5432
5479
|
helperText,
|
|
5480
|
+
className,
|
|
5433
5481
|
required
|
|
5434
5482
|
}) {
|
|
5435
5483
|
const errorId = React8.useId();
|
|
@@ -5460,7 +5508,7 @@ function Rating({
|
|
|
5460
5508
|
commit(count);
|
|
5461
5509
|
}
|
|
5462
5510
|
};
|
|
5463
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, errorId, errorMessage, layout, required, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5511
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, errorId, errorMessage, layout, required, helperText, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5464
5512
|
"div",
|
|
5465
5513
|
{
|
|
5466
5514
|
role: interactive ? "slider" : "img",
|
|
@@ -5553,6 +5601,7 @@ function TimePicker({
|
|
|
5553
5601
|
disabled,
|
|
5554
5602
|
errorMessage,
|
|
5555
5603
|
helperText,
|
|
5604
|
+
className,
|
|
5556
5605
|
required,
|
|
5557
5606
|
style
|
|
5558
5607
|
}) {
|
|
@@ -5585,7 +5634,7 @@ function TimePicker({
|
|
|
5585
5634
|
},
|
|
5586
5635
|
n
|
|
5587
5636
|
)) });
|
|
5588
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Field, { label, htmlFor, errorId, errorMessage, helperText, layout, required, children: [
|
|
5637
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Field, { className, label, htmlFor, errorId, errorMessage, helperText, layout, required, children: [
|
|
5589
5638
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: open && !disabled, onOpenChange: (o) => !disabled && setOpen(o), children: [
|
|
5590
5639
|
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5591
5640
|
"button",
|
|
@@ -5678,6 +5727,7 @@ function DateRangePicker({
|
|
|
5678
5727
|
disabled,
|
|
5679
5728
|
errorMessage,
|
|
5680
5729
|
helperText,
|
|
5730
|
+
className,
|
|
5681
5731
|
required,
|
|
5682
5732
|
style
|
|
5683
5733
|
}) {
|
|
@@ -5750,7 +5800,7 @@ function DateRangePicker({
|
|
|
5750
5800
|
] })
|
|
5751
5801
|
] });
|
|
5752
5802
|
};
|
|
5753
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Field, { label, htmlFor, errorId, errorMessage, helperText, layout, required, children: /* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: open && !disabled, onOpenChange: (o) => {
|
|
5803
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Field, { className, label, htmlFor, errorId, errorMessage, helperText, layout, required, children: /* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: open && !disabled, onOpenChange: (o) => {
|
|
5754
5804
|
if (!disabled) {
|
|
5755
5805
|
setOpen(o);
|
|
5756
5806
|
if (!o) {
|
|
@@ -5859,6 +5909,7 @@ function ColorPicker({
|
|
|
5859
5909
|
disabled,
|
|
5860
5910
|
errorMessage,
|
|
5861
5911
|
helperText,
|
|
5912
|
+
className,
|
|
5862
5913
|
required,
|
|
5863
5914
|
placeholder = "Pick a colour\u2026"
|
|
5864
5915
|
}) {
|
|
@@ -5876,7 +5927,7 @@ function ColorPicker({
|
|
|
5876
5927
|
setDraft(hex);
|
|
5877
5928
|
if (HEX_RE.test(hex)) onChange?.(hex);
|
|
5878
5929
|
};
|
|
5879
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Field, { label, htmlFor, errorId, errorMessage, helperText, layout, required, children: [
|
|
5930
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Field, { className, label, htmlFor, errorId, errorMessage, helperText, layout, required, children: [
|
|
5880
5931
|
/* @__PURE__ */ jsxRuntime.jsxs(Popover__namespace.Root, { open: open && !disabled, onOpenChange: (o) => !disabled && setOpen(o), children: [
|
|
5881
5932
|
/* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5882
5933
|
"button",
|