@geomak/ui 7.5.3 → 7.6.1
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 +58 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +59 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +47 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1630,6 +1630,47 @@ function Badge({
|
|
|
1630
1630
|
!hidden && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-1 flex", children: indicator })
|
|
1631
1631
|
] });
|
|
1632
1632
|
}
|
|
1633
|
+
var TONE_BG = {
|
|
1634
|
+
info: "bg-[color-mix(in_srgb,var(--color-info)_20%,transparent)] border border-[color-mix(in_srgb,var(--color-info)_30%,transparent)]",
|
|
1635
|
+
success: "bg-[color-mix(in_srgb,var(--color-success)_20%,transparent)] border border-[color-mix(in_srgb,var(--color-success)_30%,transparent)]",
|
|
1636
|
+
warning: "bg-[color-mix(in_srgb,var(--color-warning)_22%,transparent)] border border-[color-mix(in_srgb,var(--color-warning)_32%,transparent)]",
|
|
1637
|
+
danger: "bg-[color-mix(in_srgb,var(--color-error)_20%,transparent)] border border-[color-mix(in_srgb,var(--color-error)_30%,transparent)]"
|
|
1638
|
+
};
|
|
1639
|
+
var TONE_FG = {
|
|
1640
|
+
info: "text-status-info",
|
|
1641
|
+
success: "text-status-success",
|
|
1642
|
+
warning: "text-status-warning",
|
|
1643
|
+
danger: "text-status-error"
|
|
1644
|
+
};
|
|
1645
|
+
var DEFAULT_ICON = {
|
|
1646
|
+
info: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.Info, { size: 18 }),
|
|
1647
|
+
success: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.CheckCircle, { size: 18 }),
|
|
1648
|
+
warning: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.Warning, { size: 18 }),
|
|
1649
|
+
danger: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.Error, { size: 18 })
|
|
1650
|
+
};
|
|
1651
|
+
function Banner({ tone, children, icon, onDismiss, className = "" }) {
|
|
1652
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1653
|
+
"div",
|
|
1654
|
+
{
|
|
1655
|
+
role: tone === "warning" || tone === "danger" ? "alert" : "status",
|
|
1656
|
+
className: cx("flex w-full items-start gap-2.5 rounded-md p-3 text-sm text-foreground", TONE_BG[tone], className),
|
|
1657
|
+
children: [
|
|
1658
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("mt-0.5 flex h-[18px] w-[18px] flex-shrink-0 items-center justify-center", TONE_FG[tone]), children: icon ?? DEFAULT_ICON[tone] }),
|
|
1659
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children }),
|
|
1660
|
+
onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1661
|
+
"button",
|
|
1662
|
+
{
|
|
1663
|
+
type: "button",
|
|
1664
|
+
onClick: onDismiss,
|
|
1665
|
+
"aria-label": "Dismiss",
|
|
1666
|
+
className: "-mr-1 -mt-1 flex h-6 w-6 flex-shrink-0 self-start items-center justify-center rounded-md text-foreground-muted transition-colors hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-accent",
|
|
1667
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunk4V4U2W7K_cjs.X, { size: 16 })
|
|
1668
|
+
}
|
|
1669
|
+
)
|
|
1670
|
+
]
|
|
1671
|
+
}
|
|
1672
|
+
);
|
|
1673
|
+
}
|
|
1633
1674
|
var SIZES = {
|
|
1634
1675
|
sm: { box: "h-7 w-7 text-xs", center: 14, title: "text-xs", desc: "text-[11px]" },
|
|
1635
1676
|
md: { box: "h-9 w-9 text-sm", center: 18, title: "text-sm", desc: "text-xs" }
|
|
@@ -4564,9 +4605,17 @@ function FadingBase({
|
|
|
4564
4605
|
);
|
|
4565
4606
|
}
|
|
4566
4607
|
var DENSITY_PADDING = {
|
|
4567
|
-
"compact": "py-1.5
|
|
4568
|
-
"comfortable": "py-2.5
|
|
4569
|
-
"spacious": "py-3.5
|
|
4608
|
+
"compact": "py-1.5 pr-2",
|
|
4609
|
+
"comfortable": "py-2.5 pr-3",
|
|
4610
|
+
"spacious": "py-3.5 pr-4"
|
|
4611
|
+
};
|
|
4612
|
+
var DENSITY_PAD_LEFT = {
|
|
4613
|
+
"compact": "pl-[calc(0.5rem-1px)]",
|
|
4614
|
+
// px-2 = 0.5rem
|
|
4615
|
+
"comfortable": "pl-[calc(0.75rem-1px)]",
|
|
4616
|
+
// px-3 = 0.75rem
|
|
4617
|
+
"spacious": "pl-[calc(1rem-1px)]"
|
|
4618
|
+
// px-4 = 1rem
|
|
4570
4619
|
};
|
|
4571
4620
|
function List2({
|
|
4572
4621
|
items,
|
|
@@ -4595,10 +4644,11 @@ function List2({
|
|
|
4595
4644
|
}
|
|
4596
4645
|
},
|
|
4597
4646
|
className: [
|
|
4598
|
-
"flex items-center gap-3 cursor-pointer border-b border-border transition-colors duration-150",
|
|
4647
|
+
"flex items-center gap-3 cursor-pointer border-b border-border border-l transition-colors duration-150",
|
|
4599
4648
|
DENSITY_PADDING[density],
|
|
4649
|
+
DENSITY_PAD_LEFT[density],
|
|
4600
4650
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-inset",
|
|
4601
|
-
isDisabled ? "opacity-50 cursor-not-allowed" : isActive ? "bg-surface-raised text-foreground" : "text-foreground-secondary hover:bg-surface-raised hover:text-foreground"
|
|
4651
|
+
isDisabled ? "border-l-transparent opacity-50 cursor-not-allowed" : isActive ? "border-l-accent bg-surface-raised text-foreground font-medium" : "border-l-transparent text-foreground-secondary hover:bg-surface-raised hover:text-foreground"
|
|
4602
4652
|
].join(" "),
|
|
4603
4653
|
children: [
|
|
4604
4654
|
item.avatar && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: item.avatar }),
|
|
@@ -6884,7 +6934,7 @@ function NumberInput({
|
|
|
6884
6934
|
"div",
|
|
6885
6935
|
{
|
|
6886
6936
|
style,
|
|
6887
|
-
className: `flex items-center overflow-hidden pr-0 ${fieldShell({ size, hasError, disabled, focusWithin: true })}`,
|
|
6937
|
+
className: `flex items-center overflow-hidden !pr-0 ${fieldShell({ size, hasError, disabled, focusWithin: true })}`,
|
|
6888
6938
|
children: [
|
|
6889
6939
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6890
6940
|
"input",
|
|
@@ -7702,7 +7752,7 @@ function Dropdown({
|
|
|
7702
7752
|
align: "start",
|
|
7703
7753
|
sideOffset: 4,
|
|
7704
7754
|
collisionPadding: 8,
|
|
7705
|
-
style: { width: style?.width
|
|
7755
|
+
style: { width: style?.width ?? "var(--radix-popover-trigger-width)" },
|
|
7706
7756
|
className: "bg-surface text-foreground border border-border rounded-lg shadow-md z-popover p-2 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
7707
7757
|
onInteractOutside: () => setOpen(false),
|
|
7708
7758
|
children: [
|
|
@@ -10345,6 +10395,7 @@ exports.AppShell = AppShell;
|
|
|
10345
10395
|
exports.AutoComplete = AutoComplete;
|
|
10346
10396
|
exports.Avatar = Avatar;
|
|
10347
10397
|
exports.Badge = Badge;
|
|
10398
|
+
exports.Banner = Banner;
|
|
10348
10399
|
exports.Blog = Blog;
|
|
10349
10400
|
exports.Box = Box;
|
|
10350
10401
|
exports.Breadcrumbs = Breadcrumbs;
|