@geomak/ui 6.4.0 → 6.5.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 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +105 -3
- package/dist/index.js.map +1 -1
- package/dist/styles.css +21 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1550,6 +1550,108 @@ function Breadcrumbs({
|
|
|
1550
1550
|
] }, entry === "ellipsis" ? "ellipsis" : entry.index);
|
|
1551
1551
|
}) }) });
|
|
1552
1552
|
}
|
|
1553
|
+
var TONE = {
|
|
1554
|
+
neutral: {
|
|
1555
|
+
solid: "bg-foreground-secondary text-background",
|
|
1556
|
+
soft: "bg-surface-raised text-foreground-secondary",
|
|
1557
|
+
outline: "border border-border text-foreground-secondary",
|
|
1558
|
+
dot: "bg-foreground-secondary"
|
|
1559
|
+
},
|
|
1560
|
+
accent: {
|
|
1561
|
+
solid: "bg-accent text-accent-fg",
|
|
1562
|
+
soft: "bg-accent/10 text-accent",
|
|
1563
|
+
outline: "border border-accent text-accent",
|
|
1564
|
+
dot: "bg-accent"
|
|
1565
|
+
},
|
|
1566
|
+
success: {
|
|
1567
|
+
solid: "bg-status-success text-white",
|
|
1568
|
+
soft: "bg-status-success/12 text-status-success",
|
|
1569
|
+
outline: "border border-status-success text-status-success",
|
|
1570
|
+
dot: "bg-status-success"
|
|
1571
|
+
},
|
|
1572
|
+
warning: {
|
|
1573
|
+
solid: "bg-status-warning text-white",
|
|
1574
|
+
soft: "bg-status-warning/15 text-status-warning",
|
|
1575
|
+
outline: "border border-status-warning text-status-warning",
|
|
1576
|
+
dot: "bg-status-warning"
|
|
1577
|
+
},
|
|
1578
|
+
error: {
|
|
1579
|
+
solid: "bg-status-error text-white",
|
|
1580
|
+
soft: "bg-status-error/12 text-status-error",
|
|
1581
|
+
outline: "border border-status-error text-status-error",
|
|
1582
|
+
dot: "bg-status-error"
|
|
1583
|
+
},
|
|
1584
|
+
info: {
|
|
1585
|
+
solid: "bg-status-info text-white",
|
|
1586
|
+
soft: "bg-status-info/12 text-status-info",
|
|
1587
|
+
outline: "border border-status-info text-status-info",
|
|
1588
|
+
dot: "bg-status-info"
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
var SIZE2 = {
|
|
1592
|
+
sm: "h-[18px] px-1.5 text-[11px] gap-1 rounded-full",
|
|
1593
|
+
md: "h-5 px-2 text-xs gap-1 rounded-full"
|
|
1594
|
+
};
|
|
1595
|
+
function Badge({
|
|
1596
|
+
children,
|
|
1597
|
+
tone = "neutral",
|
|
1598
|
+
variant = "soft",
|
|
1599
|
+
size = "md",
|
|
1600
|
+
icon,
|
|
1601
|
+
count,
|
|
1602
|
+
max = 99,
|
|
1603
|
+
dot = false,
|
|
1604
|
+
showZero = false,
|
|
1605
|
+
className = "",
|
|
1606
|
+
style
|
|
1607
|
+
}) {
|
|
1608
|
+
const isIndicator = dot || count != null;
|
|
1609
|
+
const hidden = !dot && count != null && count === 0 && !showZero;
|
|
1610
|
+
const display2 = count != null && count > max ? `${max}+` : count;
|
|
1611
|
+
if (!isIndicator) {
|
|
1612
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1613
|
+
"span",
|
|
1614
|
+
{
|
|
1615
|
+
className: [
|
|
1616
|
+
"inline-flex items-center font-medium select-none whitespace-nowrap leading-none",
|
|
1617
|
+
SIZE2[size],
|
|
1618
|
+
TONE[tone][variant],
|
|
1619
|
+
className
|
|
1620
|
+
].filter(Boolean).join(" "),
|
|
1621
|
+
style,
|
|
1622
|
+
children: [
|
|
1623
|
+
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-3.5 w-3.5 items-center justify-center", children: icon }),
|
|
1624
|
+
children
|
|
1625
|
+
]
|
|
1626
|
+
}
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
const indicator = dot ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1630
|
+
"span",
|
|
1631
|
+
{
|
|
1632
|
+
className: ["inline-block rounded-full", size === "sm" ? "h-2 w-2" : "h-2.5 w-2.5", TONE[tone].dot, className].filter(Boolean).join(" "),
|
|
1633
|
+
style: children ? void 0 : style,
|
|
1634
|
+
"aria-hidden": children ? true : void 0
|
|
1635
|
+
}
|
|
1636
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1637
|
+
"span",
|
|
1638
|
+
{
|
|
1639
|
+
className: [
|
|
1640
|
+
"inline-flex items-center justify-center rounded-full font-semibold leading-none tabular-nums",
|
|
1641
|
+
size === "sm" ? "h-4 min-w-4 px-1 text-[10px]" : "h-[18px] min-w-[18px] px-1.5 text-[11px]",
|
|
1642
|
+
TONE[tone].solid,
|
|
1643
|
+
className
|
|
1644
|
+
].filter(Boolean).join(" "),
|
|
1645
|
+
style: children ? void 0 : style,
|
|
1646
|
+
children: display2
|
|
1647
|
+
}
|
|
1648
|
+
);
|
|
1649
|
+
if (!children) return hidden ? null : indicator;
|
|
1650
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex", style, children: [
|
|
1651
|
+
children,
|
|
1652
|
+
!hidden && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-1 flex", children: indicator })
|
|
1653
|
+
] });
|
|
1654
|
+
}
|
|
1553
1655
|
var NotificationContext = React14.createContext({
|
|
1554
1656
|
open: () => void 0,
|
|
1555
1657
|
close: () => void 0
|
|
@@ -5626,7 +5728,7 @@ function TextArea({
|
|
|
5626
5728
|
}
|
|
5627
5729
|
);
|
|
5628
5730
|
}
|
|
5629
|
-
var
|
|
5731
|
+
var SIZE3 = {
|
|
5630
5732
|
sm: { h: "h-control-sm", text: "text-xs", pad: "px-2.5" },
|
|
5631
5733
|
md: { h: "h-control-md", text: "text-sm", pad: "px-3.5" },
|
|
5632
5734
|
lg: { h: "h-control-lg", text: "text-sm", pad: "px-4" }
|
|
@@ -5648,7 +5750,7 @@ function SegmentedControl({
|
|
|
5648
5750
|
errorMessage,
|
|
5649
5751
|
"aria-label": ariaLabel
|
|
5650
5752
|
}) {
|
|
5651
|
-
const sz =
|
|
5753
|
+
const sz = SIZE3[size];
|
|
5652
5754
|
const groupId = React14.useId();
|
|
5653
5755
|
const errorId = React14.useId();
|
|
5654
5756
|
const hasError = errorMessage != null;
|
|
@@ -7269,6 +7371,7 @@ exports.Accordion = Accordion_default;
|
|
|
7269
7371
|
exports.AppShell = AppShell;
|
|
7270
7372
|
exports.AutoComplete = AutoComplete;
|
|
7271
7373
|
exports.Avatar = Avatar;
|
|
7374
|
+
exports.Badge = Badge;
|
|
7272
7375
|
exports.Box = Box;
|
|
7273
7376
|
exports.Breadcrumbs = Breadcrumbs;
|
|
7274
7377
|
exports.Button = Button;
|