@geomak/ui 5.9.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 +34 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -11
- package/dist/index.d.ts +35 -11
- package/dist/index.js +34 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -918,7 +918,8 @@ function Tooltip({
|
|
|
918
918
|
title,
|
|
919
919
|
placement = "top",
|
|
920
920
|
delayDuration = 300,
|
|
921
|
-
sideOffset = 8
|
|
921
|
+
sideOffset = 8,
|
|
922
|
+
className = ""
|
|
922
923
|
}) {
|
|
923
924
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Provider, { delayDuration, children: /* @__PURE__ */ jsxRuntime.jsxs(TooltipPrimitive__namespace.Root, { children: [
|
|
924
925
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex", children }) }),
|
|
@@ -938,8 +939,9 @@ function Tooltip({
|
|
|
938
939
|
// Out animation (always the same — just fade)
|
|
939
940
|
"data-[state=closed]:animate-tooltip-out",
|
|
940
941
|
// In animation — direction-aware
|
|
941
|
-
ANIMATION[placement]
|
|
942
|
-
|
|
942
|
+
ANIMATION[placement],
|
|
943
|
+
className
|
|
944
|
+
].filter(Boolean).join(" "),
|
|
943
945
|
children: [
|
|
944
946
|
title,
|
|
945
947
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1172,9 +1174,11 @@ function Tree({
|
|
|
1172
1174
|
nodes,
|
|
1173
1175
|
onNodeClick,
|
|
1174
1176
|
defaultExpandAll = false,
|
|
1175
|
-
defaultExpandedKeys = []
|
|
1177
|
+
defaultExpandedKeys = [],
|
|
1178
|
+
className = "",
|
|
1179
|
+
style
|
|
1176
1180
|
}) {
|
|
1177
|
-
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(
|
|
1178
1182
|
TreeNodeItem,
|
|
1179
1183
|
{
|
|
1180
1184
|
item,
|
|
@@ -1441,7 +1445,8 @@ function LoadingSpinner({
|
|
|
1441
1445
|
inline = false,
|
|
1442
1446
|
spinnerColor,
|
|
1443
1447
|
textColor,
|
|
1444
|
-
backdropOpacity = 0.8
|
|
1448
|
+
backdropOpacity = 0.8,
|
|
1449
|
+
className = ""
|
|
1445
1450
|
}) {
|
|
1446
1451
|
const reduced = framerMotion.useReducedMotion();
|
|
1447
1452
|
const letters = prompt ? Array.from(prompt) : [];
|
|
@@ -1476,7 +1481,7 @@ function LoadingSpinner({
|
|
|
1476
1481
|
role: "status",
|
|
1477
1482
|
"aria-live": "polite",
|
|
1478
1483
|
"aria-label": prompt ?? "Loading",
|
|
1479
|
-
className:
|
|
1484
|
+
className: `flex flex-col items-center justify-center gap-3 ${className}`.trim(),
|
|
1480
1485
|
children: content
|
|
1481
1486
|
}
|
|
1482
1487
|
);
|
|
@@ -1487,7 +1492,7 @@ function LoadingSpinner({
|
|
|
1487
1492
|
role: "status",
|
|
1488
1493
|
"aria-live": "polite",
|
|
1489
1494
|
"aria-label": prompt ?? "Loading",
|
|
1490
|
-
className:
|
|
1495
|
+
className: `fixed inset-0 z-[8000000] flex flex-col items-center justify-center gap-6 bg-background backdrop-blur-sm ${className}`.trim(),
|
|
1491
1496
|
style: { opacity: backdropOpacity },
|
|
1492
1497
|
children: content
|
|
1493
1498
|
}
|
|
@@ -1596,7 +1601,8 @@ function ScalableContainer({
|
|
|
1596
1601
|
assignClassOnClick,
|
|
1597
1602
|
expandIcon,
|
|
1598
1603
|
collapseIcon,
|
|
1599
|
-
togglePosition = "top-right"
|
|
1604
|
+
togglePosition = "top-right",
|
|
1605
|
+
className = ""
|
|
1600
1606
|
}) {
|
|
1601
1607
|
const containerRef = React8.useRef(null);
|
|
1602
1608
|
const [internalScaled, setInternalScaled] = React8.useState(false);
|
|
@@ -1631,8 +1637,9 @@ function ScalableContainer({
|
|
|
1631
1637
|
// OS-window aesthetic: subtle elevation at rest, lifted shadow
|
|
1632
1638
|
// when expanded. No background colour change.
|
|
1633
1639
|
isScaled ? "shadow-2xl" : "shadow-md",
|
|
1634
|
-
"transition-shadow duration-300"
|
|
1635
|
-
|
|
1640
|
+
"transition-shadow duration-300",
|
|
1641
|
+
className
|
|
1642
|
+
].filter(Boolean).join(" "),
|
|
1636
1643
|
children: [
|
|
1637
1644
|
/* @__PURE__ */ jsxRuntime.jsx(Tooltip, { placement: "bottom", title: isScaled ? "Collapse" : "Expand", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1638
1645
|
"button",
|
|
@@ -1684,12 +1691,13 @@ function OpaqueGridCard({
|
|
|
1684
1691
|
item,
|
|
1685
1692
|
isRight = false,
|
|
1686
1693
|
buttonText = "Open Application",
|
|
1687
|
-
onOpen
|
|
1694
|
+
onOpen,
|
|
1695
|
+
className = ""
|
|
1688
1696
|
}) {
|
|
1689
1697
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1690
1698
|
"div",
|
|
1691
1699
|
{
|
|
1692
|
-
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(),
|
|
1693
1701
|
children: [
|
|
1694
1702
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1695
1703
|
"div",
|
|
@@ -1731,10 +1739,10 @@ function OpaqueGridCard({
|
|
|
1731
1739
|
}
|
|
1732
1740
|
);
|
|
1733
1741
|
}
|
|
1734
|
-
function CatalogGrid({ items, buttonText, onOpen }) {
|
|
1735
|
-
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)) });
|
|
1736
1744
|
}
|
|
1737
|
-
function CatalogCarousel({ items, buttonText, onOpen }) {
|
|
1745
|
+
function CatalogCarousel({ items, buttonText, onOpen, className = "" }) {
|
|
1738
1746
|
const [activeIndex, setActiveIndex] = React8.useState(0);
|
|
1739
1747
|
const [indexPool, setIndexPool] = React8.useState([]);
|
|
1740
1748
|
const cardRefs = React8.useRef([]);
|
|
@@ -1771,7 +1779,7 @@ function CatalogCarousel({ items, buttonText, onOpen }) {
|
|
|
1771
1779
|
}, [activeIndex, getIndexes, items.length]);
|
|
1772
1780
|
const nextApp = () => setActiveIndex((prev) => prev + 1 === items.length ? 0 : prev + 1);
|
|
1773
1781
|
const previousApp = () => setActiveIndex((prev) => prev - 1 === -1 ? items.length - 1 : prev - 1);
|
|
1774
|
-
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: [
|
|
1775
1783
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1776
1784
|
"button",
|
|
1777
1785
|
{
|
|
@@ -1821,16 +1829,16 @@ function CatalogCarousel({ items, buttonText, onOpen }) {
|
|
|
1821
1829
|
)
|
|
1822
1830
|
] }) });
|
|
1823
1831
|
}
|
|
1824
|
-
function Catalog({ display: display2 = "grid", items = [], buttonText, onOpen }) {
|
|
1825
|
-
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 }) });
|
|
1826
1834
|
}
|
|
1827
|
-
function ContextMenu({ items, children }) {
|
|
1835
|
+
function ContextMenu({ items, children, className = "" }) {
|
|
1828
1836
|
return /* @__PURE__ */ jsxRuntime.jsxs(ContextMenuPrimitive__namespace.Root, { children: [
|
|
1829
1837
|
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Trigger, { asChild: true, children }),
|
|
1830
1838
|
/* @__PURE__ */ jsxRuntime.jsx(ContextMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1831
1839
|
ContextMenuPrimitive__namespace.Content,
|
|
1832
1840
|
{
|
|
1833
|
-
className: CONTENT_CLASSNAME,
|
|
1841
|
+
className: `${CONTENT_CLASSNAME} ${className}`.trim(),
|
|
1834
1842
|
collisionPadding: 8,
|
|
1835
1843
|
children: items.map((item) => renderItem(item))
|
|
1836
1844
|
}
|
|
@@ -3015,9 +3023,9 @@ function TableSkeletonBody({
|
|
|
3015
3023
|
i
|
|
3016
3024
|
)) });
|
|
3017
3025
|
}
|
|
3018
|
-
function ThemeSwitch({ checked, onChange, label = "Toggle dark mode" }) {
|
|
3026
|
+
function ThemeSwitch({ checked, onChange, label = "Toggle dark mode", className = "" }) {
|
|
3019
3027
|
const id = React8.useId();
|
|
3020
|
-
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(
|
|
3021
3029
|
SwitchPrimitive__namespace.Root,
|
|
3022
3030
|
{
|
|
3023
3031
|
id,
|
|
@@ -4639,7 +4647,8 @@ function DatePicker({
|
|
|
4639
4647
|
format = defaultFormat,
|
|
4640
4648
|
weekStartsOn = 0,
|
|
4641
4649
|
clearable = true,
|
|
4642
|
-
size = "md"
|
|
4650
|
+
size = "md",
|
|
4651
|
+
className = ""
|
|
4643
4652
|
}) {
|
|
4644
4653
|
const errorId = React8.useId();
|
|
4645
4654
|
const hasError = errorMessage != null;
|
|
@@ -4720,7 +4729,7 @@ function DatePicker({
|
|
|
4720
4729
|
}
|
|
4721
4730
|
};
|
|
4722
4731
|
const displayValue = value ? format(value) : "";
|
|
4723
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
4732
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex flex-col gap-1 ${className}`.trim(), children: [
|
|
4724
4733
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex ${layout === "vertical" ? "flex-col gap-1.5" : "flex-row items-start gap-3"}`, children: [
|
|
4725
4734
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4726
4735
|
FieldLabel,
|