@ai-matrx/design-system 0.10.0 → 0.11.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/CHANGELOG.md +85 -2
- package/README.md +20 -1
- package/dist/index.cjs +395 -284
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +105 -1
- package/dist/index.d.ts +105 -1
- package/dist/index.js +432 -318
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
package/dist/index.cjs
CHANGED
|
@@ -82,6 +82,8 @@ __export(src_exports, {
|
|
|
82
82
|
CommandList: () => CommandList,
|
|
83
83
|
CommandSeparator: () => CommandSeparator,
|
|
84
84
|
CommandShortcut: () => CommandShortcut,
|
|
85
|
+
ConfirmDialog: () => ConfirmDialog,
|
|
86
|
+
ConfirmDialogHost: () => ConfirmDialogHost,
|
|
85
87
|
ContextMenu: () => ContextMenu,
|
|
86
88
|
ContextMenuCheckboxItem: () => ContextMenuCheckboxItem,
|
|
87
89
|
ContextMenuContent: () => ContextMenuContent,
|
|
@@ -1539,10 +1541,119 @@ var CommandShortcut = ({
|
|
|
1539
1541
|
};
|
|
1540
1542
|
CommandShortcut.displayName = "CommandShortcut";
|
|
1541
1543
|
|
|
1544
|
+
// src/confirm-dialog.tsx
|
|
1545
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1546
|
+
function ConfirmDialog({
|
|
1547
|
+
open,
|
|
1548
|
+
onOpenChange,
|
|
1549
|
+
title,
|
|
1550
|
+
description,
|
|
1551
|
+
content,
|
|
1552
|
+
contentClassName,
|
|
1553
|
+
confirmLabel = "Confirm",
|
|
1554
|
+
cancelLabel = "Cancel",
|
|
1555
|
+
variant = "default",
|
|
1556
|
+
busy = false,
|
|
1557
|
+
confirmDisabled = false,
|
|
1558
|
+
portalContainer,
|
|
1559
|
+
onConfirm
|
|
1560
|
+
}) {
|
|
1561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1562
|
+
AlertDialogContent,
|
|
1563
|
+
{
|
|
1564
|
+
className: contentClassName,
|
|
1565
|
+
...portalContainer === void 0 ? {} : { container: portalContainer },
|
|
1566
|
+
children: [
|
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(AlertDialogHeader, { children: [
|
|
1568
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AlertDialogTitle, { children: title }),
|
|
1569
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AlertDialogDescription, { children: description }) : null
|
|
1570
|
+
] }),
|
|
1571
|
+
content ?? null,
|
|
1572
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(AlertDialogFooter, { children: [
|
|
1573
|
+
cancelLabel === null ? null : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AlertDialogCancel, { className: "max-lg:min-h-11", disabled: busy, children: cancelLabel }),
|
|
1574
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1575
|
+
AlertDialogAction,
|
|
1576
|
+
{
|
|
1577
|
+
disabled: busy || confirmDisabled,
|
|
1578
|
+
onClick: (event) => {
|
|
1579
|
+
event.preventDefault();
|
|
1580
|
+
void onConfirm();
|
|
1581
|
+
},
|
|
1582
|
+
className: cn(
|
|
1583
|
+
"max-lg:min-h-11",
|
|
1584
|
+
// One source of button appearance: the destructive look comes
|
|
1585
|
+
// from `buttonVariants`, not a second hand-written copy of it.
|
|
1586
|
+
// tailwind-merge makes it WIN over the default variant classes.
|
|
1587
|
+
variant === "destructive" && buttonVariants({ variant: "destructive" })
|
|
1588
|
+
),
|
|
1589
|
+
children: [
|
|
1590
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Loader2Icon, { className: cn("mr-2 h-4 w-4", MOTION_SPIN) }) : null,
|
|
1591
|
+
confirmLabel
|
|
1592
|
+
]
|
|
1593
|
+
}
|
|
1594
|
+
)
|
|
1595
|
+
] })
|
|
1596
|
+
]
|
|
1597
|
+
}
|
|
1598
|
+
) });
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
// src/confirm-host.tsx
|
|
1602
|
+
var import_confirm_opener = require("@ai-matrx/kit/confirm-opener");
|
|
1603
|
+
var React14 = __toESM(require("react"), 1);
|
|
1604
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1605
|
+
function ConfirmDialogHost() {
|
|
1606
|
+
const [active, setActive] = React14.useState(null);
|
|
1607
|
+
const [tick, setTick] = React14.useState(0);
|
|
1608
|
+
const queueRef = React14.useRef([]);
|
|
1609
|
+
React14.useEffect(() => {
|
|
1610
|
+
const controller = {
|
|
1611
|
+
show: (opts, resolve) => {
|
|
1612
|
+
queueRef.current.push({ opts, resolve });
|
|
1613
|
+
setTick((n) => n + 1);
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
(0, import_confirm_opener._registerHost)(controller);
|
|
1617
|
+
return () => (0, import_confirm_opener._unregisterHost)(controller);
|
|
1618
|
+
}, []);
|
|
1619
|
+
React14.useEffect(() => {
|
|
1620
|
+
if (active === null && queueRef.current.length > 0) {
|
|
1621
|
+
setActive(queueRef.current.shift());
|
|
1622
|
+
}
|
|
1623
|
+
}, [active, tick]);
|
|
1624
|
+
const handleConfirm = React14.useCallback(() => {
|
|
1625
|
+
if (!active) return;
|
|
1626
|
+
active.resolve(true);
|
|
1627
|
+
setActive(null);
|
|
1628
|
+
}, [active]);
|
|
1629
|
+
const handleOpenChange = React14.useCallback(
|
|
1630
|
+
(open) => {
|
|
1631
|
+
if (!open && active) {
|
|
1632
|
+
active.resolve(false);
|
|
1633
|
+
setActive(null);
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
[active]
|
|
1637
|
+
);
|
|
1638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1639
|
+
ConfirmDialog,
|
|
1640
|
+
{
|
|
1641
|
+
open: !!active,
|
|
1642
|
+
onOpenChange: handleOpenChange,
|
|
1643
|
+
title: active?.opts.title ?? "",
|
|
1644
|
+
description: active?.opts.description,
|
|
1645
|
+
confirmLabel: active?.opts.confirmLabel,
|
|
1646
|
+
cancelLabel: active?.opts.cancelLabel,
|
|
1647
|
+
variant: active?.opts.variant,
|
|
1648
|
+
onConfirm: handleConfirm
|
|
1649
|
+
}
|
|
1650
|
+
);
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1542
1653
|
// src/context-menu.tsx
|
|
1543
1654
|
var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
|
|
1544
|
-
var
|
|
1545
|
-
var
|
|
1655
|
+
var React15 = __toESM(require("react"), 1);
|
|
1656
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1546
1657
|
var ContextMenu = ContextMenuPrimitive.Root;
|
|
1547
1658
|
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
1548
1659
|
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
@@ -1552,7 +1663,7 @@ var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
|
1552
1663
|
var SURFACE_CLASS = "z-50 min-w-[8rem] max-h-[var(--radix-context-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
1553
1664
|
var ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1554
1665
|
var INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1555
|
-
var ContextMenuSubTrigger =
|
|
1666
|
+
var ContextMenuSubTrigger = React15.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1556
1667
|
ContextMenuPrimitive.SubTrigger,
|
|
1557
1668
|
{
|
|
1558
1669
|
ref,
|
|
@@ -1565,12 +1676,12 @@ var ContextMenuSubTrigger = React14.forwardRef(({ className, inset, children, ..
|
|
|
1565
1676
|
...props,
|
|
1566
1677
|
children: [
|
|
1567
1678
|
children,
|
|
1568
|
-
/* @__PURE__ */ (0,
|
|
1679
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
1569
1680
|
]
|
|
1570
1681
|
}
|
|
1571
1682
|
));
|
|
1572
1683
|
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1573
|
-
var ContextMenuSubContent =
|
|
1684
|
+
var ContextMenuSubContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1574
1685
|
ContextMenuPrimitive.SubContent,
|
|
1575
1686
|
{
|
|
1576
1687
|
ref,
|
|
@@ -1580,9 +1691,9 @@ var ContextMenuSubContent = React14.forwardRef(({ className, ...props }, ref) =>
|
|
|
1580
1691
|
}
|
|
1581
1692
|
));
|
|
1582
1693
|
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1583
|
-
var ContextMenuContent =
|
|
1694
|
+
var ContextMenuContent = React15.forwardRef(({ className, container, ...props }, ref) => {
|
|
1584
1695
|
const portalContainer = usePortalContainer(container);
|
|
1585
|
-
return /* @__PURE__ */ (0,
|
|
1696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ContextMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1586
1697
|
ContextMenuPrimitive.Content,
|
|
1587
1698
|
{
|
|
1588
1699
|
ref,
|
|
@@ -1593,7 +1704,7 @@ var ContextMenuContent = React14.forwardRef(({ className, container, ...props },
|
|
|
1593
1704
|
) });
|
|
1594
1705
|
});
|
|
1595
1706
|
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1596
|
-
var ContextMenuItem =
|
|
1707
|
+
var ContextMenuItem = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1597
1708
|
ContextMenuPrimitive.Item,
|
|
1598
1709
|
{
|
|
1599
1710
|
ref,
|
|
@@ -1608,7 +1719,7 @@ var ContextMenuItem = React14.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1608
1719
|
}
|
|
1609
1720
|
));
|
|
1610
1721
|
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1611
|
-
var ContextMenuCheckboxItem =
|
|
1722
|
+
var ContextMenuCheckboxItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1612
1723
|
ContextMenuPrimitive.CheckboxItem,
|
|
1613
1724
|
{
|
|
1614
1725
|
ref,
|
|
@@ -1616,13 +1727,13 @@ var ContextMenuCheckboxItem = React14.forwardRef(({ className, children, ...prop
|
|
|
1616
1727
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1617
1728
|
...props,
|
|
1618
1729
|
children: [
|
|
1619
|
-
/* @__PURE__ */ (0,
|
|
1730
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
1620
1731
|
children
|
|
1621
1732
|
]
|
|
1622
1733
|
}
|
|
1623
1734
|
));
|
|
1624
1735
|
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1625
|
-
var ContextMenuRadioItem =
|
|
1736
|
+
var ContextMenuRadioItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1626
1737
|
ContextMenuPrimitive.RadioItem,
|
|
1627
1738
|
{
|
|
1628
1739
|
ref,
|
|
@@ -1630,13 +1741,13 @@ var ContextMenuRadioItem = React14.forwardRef(({ className, children, ...props }
|
|
|
1630
1741
|
className: cn(INDICATOR_ITEM_CLASS, className),
|
|
1631
1742
|
...props,
|
|
1632
1743
|
children: [
|
|
1633
|
-
/* @__PURE__ */ (0,
|
|
1744
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1634
1745
|
children
|
|
1635
1746
|
]
|
|
1636
1747
|
}
|
|
1637
1748
|
));
|
|
1638
1749
|
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1639
|
-
var ContextMenuLabel =
|
|
1750
|
+
var ContextMenuLabel = React15.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1640
1751
|
ContextMenuPrimitive.Label,
|
|
1641
1752
|
{
|
|
1642
1753
|
ref,
|
|
@@ -1650,7 +1761,7 @@ var ContextMenuLabel = React14.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1650
1761
|
}
|
|
1651
1762
|
));
|
|
1652
1763
|
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1653
|
-
var ContextMenuSeparator =
|
|
1764
|
+
var ContextMenuSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1654
1765
|
ContextMenuPrimitive.Separator,
|
|
1655
1766
|
{
|
|
1656
1767
|
ref,
|
|
@@ -1663,7 +1774,7 @@ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
|
1663
1774
|
var ContextMenuShortcut = ({
|
|
1664
1775
|
className,
|
|
1665
1776
|
...props
|
|
1666
|
-
}) => /* @__PURE__ */ (0,
|
|
1777
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1667
1778
|
"span",
|
|
1668
1779
|
{
|
|
1669
1780
|
"data-slot": "context-menu-shortcut",
|
|
@@ -1678,12 +1789,12 @@ var import_react = require("react");
|
|
|
1678
1789
|
|
|
1679
1790
|
// src/popover.tsx
|
|
1680
1791
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
1681
|
-
var
|
|
1682
|
-
var
|
|
1792
|
+
var React16 = __toESM(require("react"), 1);
|
|
1793
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1683
1794
|
var Popover = PopoverPrimitive.Root;
|
|
1684
1795
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1685
1796
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1686
|
-
var PopoverContent =
|
|
1797
|
+
var PopoverContent = React16.forwardRef(
|
|
1687
1798
|
({
|
|
1688
1799
|
className,
|
|
1689
1800
|
align = "center",
|
|
@@ -1693,7 +1804,7 @@ var PopoverContent = React15.forwardRef(
|
|
|
1693
1804
|
...props
|
|
1694
1805
|
}, ref) => {
|
|
1695
1806
|
const portalContainer = usePortalContainer(container);
|
|
1696
|
-
return /* @__PURE__ */ (0,
|
|
1807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1697
1808
|
PopoverPrimitive.Content,
|
|
1698
1809
|
{
|
|
1699
1810
|
ref,
|
|
@@ -1718,7 +1829,7 @@ var PopoverContent = React15.forwardRef(
|
|
|
1718
1829
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
1719
1830
|
|
|
1720
1831
|
// src/creatable-picker.tsx
|
|
1721
|
-
var
|
|
1832
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1722
1833
|
function article(noun) {
|
|
1723
1834
|
return /^[aeiou]/i.test(noun.trim()) ? `an ${noun}` : `a ${noun}`;
|
|
1724
1835
|
}
|
|
@@ -1793,8 +1904,8 @@ function CreatablePicker({
|
|
|
1793
1904
|
setBusy(false);
|
|
1794
1905
|
}
|
|
1795
1906
|
};
|
|
1796
|
-
return /* @__PURE__ */ (0,
|
|
1797
|
-
/* @__PURE__ */ (0,
|
|
1907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Popover, { open, onOpenChange: (next) => next ? setOpen(true) : close(), children: [
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PopoverTrigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1798
1909
|
"button",
|
|
1799
1910
|
{
|
|
1800
1911
|
type: "button",
|
|
@@ -1808,12 +1919,12 @@ function CreatablePicker({
|
|
|
1808
1919
|
triggerClassName
|
|
1809
1920
|
),
|
|
1810
1921
|
children: [
|
|
1811
|
-
/* @__PURE__ */ (0,
|
|
1812
|
-
/* @__PURE__ */ (0,
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 flex-1 truncate", children: selected ? renderSelected ?? selected.render ?? selected.label : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-muted-foreground", children: loading ? "Loading\u2026" : placeholder }) }),
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ChevronsUpDownIcon, { className: "size-3.5 shrink-0 opacity-50" })
|
|
1813
1924
|
]
|
|
1814
1925
|
}
|
|
1815
1926
|
) }),
|
|
1816
|
-
/* @__PURE__ */ (0,
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PopoverContent, { align: "start", className: "w-[--radix-popover-trigger-width] min-w-56 p-0", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1817
1928
|
Command,
|
|
1818
1929
|
{
|
|
1819
1930
|
filter: (itemValue, search, keywords) => {
|
|
@@ -1821,7 +1932,7 @@ function CreatablePicker({
|
|
|
1821
1932
|
return haystack.includes(search.toLowerCase()) ? 1 : 0;
|
|
1822
1933
|
},
|
|
1823
1934
|
children: [
|
|
1824
|
-
/* @__PURE__ */ (0,
|
|
1935
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1825
1936
|
CommandInput,
|
|
1826
1937
|
{
|
|
1827
1938
|
ref: inputRef,
|
|
@@ -1833,13 +1944,13 @@ function CreatablePicker({
|
|
|
1833
1944
|
placeholder: searchPlaceholder ?? `Search or add ${article(noun)}\u2026`
|
|
1834
1945
|
}
|
|
1835
1946
|
),
|
|
1836
|
-
/* @__PURE__ */ (0,
|
|
1837
|
-
/* @__PURE__ */ (0,
|
|
1838
|
-
groups.map((group) => /* @__PURE__ */ (0,
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(CommandList, { children: [
|
|
1948
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CommandEmpty, { children: emptyLabel }),
|
|
1949
|
+
groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1839
1950
|
CommandGroup,
|
|
1840
1951
|
{
|
|
1841
1952
|
...group.heading === void 0 ? {} : { heading: group.heading },
|
|
1842
|
-
children: group.options.map((option) => /* @__PURE__ */ (0,
|
|
1953
|
+
children: group.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1843
1954
|
CommandItem,
|
|
1844
1955
|
{
|
|
1845
1956
|
value: option.label,
|
|
@@ -1850,7 +1961,7 @@ function CreatablePicker({
|
|
|
1850
1961
|
},
|
|
1851
1962
|
className: "gap-2 text-xs",
|
|
1852
1963
|
children: [
|
|
1853
|
-
/* @__PURE__ */ (0,
|
|
1964
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1854
1965
|
LucideCheckIcon,
|
|
1855
1966
|
{
|
|
1856
1967
|
className: cn(
|
|
@@ -1859,8 +1970,8 @@ function CreatablePicker({
|
|
|
1859
1970
|
)
|
|
1860
1971
|
}
|
|
1861
1972
|
),
|
|
1862
|
-
/* @__PURE__ */ (0,
|
|
1863
|
-
option.hint ? /* @__PURE__ */ (0,
|
|
1973
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 flex-1 truncate", children: option.render ?? option.label }),
|
|
1974
|
+
option.hint ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "shrink-0 text-[10px] text-muted-foreground", children: option.hint }) : null
|
|
1864
1975
|
]
|
|
1865
1976
|
},
|
|
1866
1977
|
option.value
|
|
@@ -1869,9 +1980,9 @@ function CreatablePicker({
|
|
|
1869
1980
|
group.heading ?? "__ungrouped__"
|
|
1870
1981
|
))
|
|
1871
1982
|
] }),
|
|
1872
|
-
canCreate ? /* @__PURE__ */ (0,
|
|
1873
|
-
createExtra && typed && !exactMatch ? /* @__PURE__ */ (0,
|
|
1874
|
-
/* @__PURE__ */ (0,
|
|
1983
|
+
canCreate ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1 border-t border-border p-1", children: [
|
|
1984
|
+
createExtra && typed && !exactMatch ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "px-1 pt-0.5", children: typeof createExtra === "function" ? createExtra(typed) : createExtra }) : null,
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1875
1986
|
"button",
|
|
1876
1987
|
{
|
|
1877
1988
|
type: "button",
|
|
@@ -1879,22 +1990,22 @@ function CreatablePicker({
|
|
|
1879
1990
|
onClick: () => void create(typed),
|
|
1880
1991
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
|
|
1881
1992
|
children: [
|
|
1882
|
-
busy ? /* @__PURE__ */ (0,
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
1993
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1994
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1884
1995
|
]
|
|
1885
1996
|
}
|
|
1886
1997
|
),
|
|
1887
|
-
needsName ? /* @__PURE__ */ (0,
|
|
1998
|
+
needsName ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "px-2 pb-0.5 text-[11px] leading-snug text-muted-foreground", children: [
|
|
1888
1999
|
"Type the name of the ",
|
|
1889
2000
|
noun,
|
|
1890
2001
|
" you want to add \u2014 then this creates it."
|
|
1891
2002
|
] }) : null
|
|
1892
2003
|
] }) : null,
|
|
1893
|
-
footerActions?.length || manageAction ? /* @__PURE__ */ (0,
|
|
2004
|
+
footerActions?.length || manageAction ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-0.5 border-t border-border p-1", children: [
|
|
1894
2005
|
footerActions?.map((action) => {
|
|
1895
2006
|
const Icon2 = action.icon;
|
|
1896
|
-
return /* @__PURE__ */ (0,
|
|
1897
|
-
/* @__PURE__ */ (0,
|
|
2007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
|
|
2008
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1898
2009
|
"button",
|
|
1899
2010
|
{
|
|
1900
2011
|
type: "button",
|
|
@@ -1904,15 +2015,15 @@ function CreatablePicker({
|
|
|
1904
2015
|
},
|
|
1905
2016
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1906
2017
|
children: [
|
|
1907
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
1908
|
-
/* @__PURE__ */ (0,
|
|
2018
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon2, { className: "size-3.5 shrink-0" }) : null,
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 truncate", children: action.label })
|
|
1909
2020
|
]
|
|
1910
2021
|
}
|
|
1911
2022
|
),
|
|
1912
|
-
action.note ? /* @__PURE__ */ (0,
|
|
2023
|
+
action.note ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "px-2 pb-1 text-[10px] leading-snug text-muted-foreground", children: action.note }) : null
|
|
1913
2024
|
] }, action.label);
|
|
1914
2025
|
}),
|
|
1915
|
-
manageAction ? /* @__PURE__ */ (0,
|
|
2026
|
+
manageAction ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1916
2027
|
"a",
|
|
1917
2028
|
{
|
|
1918
2029
|
href: manageAction.href,
|
|
@@ -1921,18 +2032,18 @@ function CreatablePicker({
|
|
|
1921
2032
|
onClick: close,
|
|
1922
2033
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
1923
2034
|
children: [
|
|
1924
|
-
/* @__PURE__ */ (0,
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ExternalLinkIcon, { className: "size-3.5 shrink-0" }),
|
|
2036
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 truncate", children: manageAction.label })
|
|
1926
2037
|
]
|
|
1927
2038
|
}
|
|
1928
2039
|
) : null
|
|
1929
2040
|
] }) : null,
|
|
1930
|
-
lockedNote ? /* @__PURE__ */ (0,
|
|
1931
|
-
/* @__PURE__ */ (0,
|
|
1932
|
-
/* @__PURE__ */ (0,
|
|
1933
|
-
/* @__PURE__ */ (0,
|
|
2041
|
+
lockedNote ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "space-y-1 border-t border-border p-2", children: [
|
|
2042
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("p", { className: "flex gap-1.5 text-[11px] leading-snug text-muted-foreground", children: [
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LockIcon, { className: "mt-px size-3 shrink-0" }),
|
|
2044
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { children: lockedNote })
|
|
1934
2045
|
] }),
|
|
1935
|
-
lockedAction ? /* @__PURE__ */ (0,
|
|
2046
|
+
lockedAction ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1936
2047
|
"button",
|
|
1937
2048
|
{
|
|
1938
2049
|
type: "button",
|
|
@@ -1942,8 +2053,8 @@ function CreatablePicker({
|
|
|
1942
2053
|
},
|
|
1943
2054
|
className: "flex w-full items-center gap-2 rounded-sm px-1 py-1 text-left text-xs font-medium text-primary transition-colors hover:bg-accent",
|
|
1944
2055
|
children: [
|
|
1945
|
-
/* @__PURE__ */ (0,
|
|
1946
|
-
/* @__PURE__ */ (0,
|
|
2056
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "min-w-0 truncate", children: lockedAction.label })
|
|
1947
2058
|
]
|
|
1948
2059
|
}
|
|
1949
2060
|
) : null
|
|
@@ -1958,14 +2069,14 @@ function CreatablePicker({
|
|
|
1958
2069
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1959
2070
|
var VisuallyHidden2 = __toESM(require("@radix-ui/react-visually-hidden"), 1);
|
|
1960
2071
|
var import_react_tree3 = require("@ai-matrx/kit/react-tree");
|
|
1961
|
-
var
|
|
1962
|
-
var
|
|
2072
|
+
var React17 = __toESM(require("react"), 1);
|
|
2073
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1963
2074
|
var Dialog = ({
|
|
1964
2075
|
children,
|
|
1965
2076
|
...props
|
|
1966
2077
|
}) => {
|
|
1967
2078
|
const modal = props.modal ?? true;
|
|
1968
|
-
return /* @__PURE__ */ (0,
|
|
2079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogPrimitive2.Root, { ...props, modal, children }) });
|
|
1969
2080
|
};
|
|
1970
2081
|
Dialog.displayName = "Dialog";
|
|
1971
2082
|
var DialogTrigger = DialogPrimitive2.Trigger;
|
|
@@ -1975,12 +2086,12 @@ var DialogPortal = ({
|
|
|
1975
2086
|
...props
|
|
1976
2087
|
}) => {
|
|
1977
2088
|
const resolved = usePortalContainer(container);
|
|
1978
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogPrimitive2.Portal, { container: resolved ?? null, ...props });
|
|
1979
2090
|
};
|
|
1980
2091
|
DialogPortal.displayName = "DialogPortal";
|
|
1981
|
-
var DialogContainerContext =
|
|
1982
|
-
var useDialogContainer = () =>
|
|
1983
|
-
var DialogOverlay =
|
|
2092
|
+
var DialogContainerContext = React17.createContext(null);
|
|
2093
|
+
var useDialogContainer = () => React17.useContext(DialogContainerContext);
|
|
2094
|
+
var DialogOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1984
2095
|
DialogPrimitive2.Overlay,
|
|
1985
2096
|
{
|
|
1986
2097
|
ref,
|
|
@@ -1996,9 +2107,9 @@ var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1996
2107
|
}
|
|
1997
2108
|
));
|
|
1998
2109
|
DialogOverlay.displayName = DialogPrimitive2.Overlay.displayName;
|
|
1999
|
-
var DialogContentPrimitive =
|
|
2110
|
+
var DialogContentPrimitive = React17.forwardRef((props, ref) => {
|
|
2000
2111
|
const isModal = useRadixDialogModal();
|
|
2001
|
-
return /* @__PURE__ */ (0,
|
|
2112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2002
2113
|
DialogPrimitive2.Content,
|
|
2003
2114
|
{
|
|
2004
2115
|
...props,
|
|
@@ -2011,7 +2122,7 @@ DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
|
2011
2122
|
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
|
|
2012
2123
|
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
|
|
2013
2124
|
var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
2014
|
-
var DialogContent =
|
|
2125
|
+
var DialogContent = React17.forwardRef(
|
|
2015
2126
|
({
|
|
2016
2127
|
className,
|
|
2017
2128
|
children,
|
|
@@ -2025,10 +2136,10 @@ var DialogContent = React16.forwardRef(
|
|
|
2025
2136
|
const isModal = useRadixDialogModal();
|
|
2026
2137
|
const injectedContainer = usePortalContainer(container);
|
|
2027
2138
|
const asSheet = mobileSheet && isMobile;
|
|
2028
|
-
const [containerEl, setContainerEl] =
|
|
2139
|
+
const [containerEl, setContainerEl] = React17.useState(
|
|
2029
2140
|
null
|
|
2030
2141
|
);
|
|
2031
|
-
const mergedRef =
|
|
2142
|
+
const mergedRef = React17.useCallback(
|
|
2032
2143
|
(node) => {
|
|
2033
2144
|
setContainerEl(node);
|
|
2034
2145
|
if (typeof ref === "function") ref(node);
|
|
@@ -2039,9 +2150,9 @@ var DialogContent = React16.forwardRef(
|
|
|
2039
2150
|
);
|
|
2040
2151
|
const hasTitle = (0, import_react_tree3.treeContainsComponent)(children, DialogTitle) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Title);
|
|
2041
2152
|
const hasDescription = (0, import_react_tree3.treeContainsComponent)(children, DialogDescription) || (0, import_react_tree3.treeContainsComponent)(children, DialogPrimitive2.Description);
|
|
2042
|
-
return /* @__PURE__ */ (0,
|
|
2043
|
-
isModal ? /* @__PURE__ */ (0,
|
|
2044
|
-
/* @__PURE__ */ (0,
|
|
2153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogPortal, { container, children: [
|
|
2154
|
+
isModal ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogOverlay, {}) : null,
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2045
2156
|
DialogContentPrimitive,
|
|
2046
2157
|
{
|
|
2047
2158
|
ref: mergedRef,
|
|
@@ -2060,23 +2171,23 @@ var DialogContent = React16.forwardRef(
|
|
|
2060
2171
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
2061
2172
|
...props,
|
|
2062
2173
|
children: [
|
|
2063
|
-
hasTitle ? null : /* @__PURE__ */ (0,
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2174
|
+
hasTitle ? null : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(VisuallyHidden2.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogPrimitive2.Title, { children: "Dialog" }) }),
|
|
2175
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogContainerContext.Provider, { value: containerEl, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2065
2176
|
PortalContainerProvider,
|
|
2066
2177
|
{
|
|
2067
2178
|
container: containerEl ?? injectedContainer ?? null,
|
|
2068
2179
|
children
|
|
2069
2180
|
}
|
|
2070
2181
|
) }),
|
|
2071
|
-
showCloseButton ? /* @__PURE__ */ (0,
|
|
2182
|
+
showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2072
2183
|
DialogPrimitive2.Close,
|
|
2073
2184
|
{
|
|
2074
2185
|
"data-slot": "dialog-close",
|
|
2075
2186
|
"aria-label": "Close",
|
|
2076
2187
|
className: "absolute right-2 top-4 flex h-11 w-11 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground sm:right-4 lg:h-10 lg:w-10",
|
|
2077
2188
|
children: [
|
|
2078
|
-
/* @__PURE__ */ (0,
|
|
2079
|
-
/* @__PURE__ */ (0,
|
|
2189
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(XIcon, { className: "h-4 w-4" }),
|
|
2190
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2080
2191
|
]
|
|
2081
2192
|
}
|
|
2082
2193
|
) : null
|
|
@@ -2090,7 +2201,7 @@ DialogContent.displayName = DialogPrimitive2.Content.displayName;
|
|
|
2090
2201
|
var DialogHeader = ({
|
|
2091
2202
|
className,
|
|
2092
2203
|
...props
|
|
2093
|
-
}) => /* @__PURE__ */ (0,
|
|
2204
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2094
2205
|
"div",
|
|
2095
2206
|
{
|
|
2096
2207
|
"data-slot": "dialog-header",
|
|
@@ -2107,7 +2218,7 @@ DialogHeader.displayName = "DialogHeader";
|
|
|
2107
2218
|
var DialogFooter = ({
|
|
2108
2219
|
className,
|
|
2109
2220
|
...props
|
|
2110
|
-
}) => /* @__PURE__ */ (0,
|
|
2221
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2111
2222
|
"div",
|
|
2112
2223
|
{
|
|
2113
2224
|
"data-slot": "dialog-footer",
|
|
@@ -2121,7 +2232,7 @@ var DialogFooter = ({
|
|
|
2121
2232
|
}
|
|
2122
2233
|
);
|
|
2123
2234
|
DialogFooter.displayName = "DialogFooter";
|
|
2124
|
-
var DialogTitle =
|
|
2235
|
+
var DialogTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2125
2236
|
DialogPrimitive2.Title,
|
|
2126
2237
|
{
|
|
2127
2238
|
ref,
|
|
@@ -2131,7 +2242,7 @@ var DialogTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2131
2242
|
}
|
|
2132
2243
|
));
|
|
2133
2244
|
DialogTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
2134
|
-
var DialogDescription =
|
|
2245
|
+
var DialogDescription = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2135
2246
|
DialogPrimitive2.Description,
|
|
2136
2247
|
{
|
|
2137
2248
|
ref,
|
|
@@ -2144,8 +2255,8 @@ DialogDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
|
2144
2255
|
|
|
2145
2256
|
// src/dropdown-menu.tsx
|
|
2146
2257
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
2147
|
-
var
|
|
2148
|
-
var
|
|
2258
|
+
var React18 = __toESM(require("react"), 1);
|
|
2259
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2149
2260
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
2150
2261
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
2151
2262
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
@@ -2155,7 +2266,7 @@ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
|
2155
2266
|
var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
2156
2267
|
var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
2157
2268
|
var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
2158
|
-
var DropdownMenuSubTrigger =
|
|
2269
|
+
var DropdownMenuSubTrigger = React18.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2159
2270
|
DropdownMenuPrimitive.SubTrigger,
|
|
2160
2271
|
{
|
|
2161
2272
|
ref,
|
|
@@ -2168,12 +2279,12 @@ var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, .
|
|
|
2168
2279
|
...props,
|
|
2169
2280
|
children: [
|
|
2170
2281
|
children,
|
|
2171
|
-
/* @__PURE__ */ (0,
|
|
2282
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RadixChevronRightIcon, { className: "ml-auto h-4 w-4" })
|
|
2172
2283
|
]
|
|
2173
2284
|
}
|
|
2174
2285
|
));
|
|
2175
2286
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
2176
|
-
var DropdownMenuSubContent =
|
|
2287
|
+
var DropdownMenuSubContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2177
2288
|
DropdownMenuPrimitive.SubContent,
|
|
2178
2289
|
{
|
|
2179
2290
|
ref,
|
|
@@ -2183,9 +2294,9 @@ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
2183
2294
|
}
|
|
2184
2295
|
));
|
|
2185
2296
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
2186
|
-
var DropdownMenuContent =
|
|
2297
|
+
var DropdownMenuContent = React18.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
2187
2298
|
const portalContainer = usePortalContainer(container);
|
|
2188
|
-
return /* @__PURE__ */ (0,
|
|
2299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2189
2300
|
DropdownMenuPrimitive.Content,
|
|
2190
2301
|
{
|
|
2191
2302
|
ref,
|
|
@@ -2202,7 +2313,7 @@ var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, conta
|
|
|
2202
2313
|
) });
|
|
2203
2314
|
});
|
|
2204
2315
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2205
|
-
var DropdownMenuItem =
|
|
2316
|
+
var DropdownMenuItem = React18.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2206
2317
|
DropdownMenuPrimitive.Item,
|
|
2207
2318
|
{
|
|
2208
2319
|
ref,
|
|
@@ -2212,7 +2323,7 @@ var DropdownMenuItem = React17.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2212
2323
|
}
|
|
2213
2324
|
));
|
|
2214
2325
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2215
|
-
var DropdownMenuCheckboxItem =
|
|
2326
|
+
var DropdownMenuCheckboxItem = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2216
2327
|
DropdownMenuPrimitive.CheckboxItem,
|
|
2217
2328
|
{
|
|
2218
2329
|
ref,
|
|
@@ -2220,13 +2331,13 @@ var DropdownMenuCheckboxItem = React17.forwardRef(({ className, children, ...pro
|
|
|
2220
2331
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
2221
2332
|
...props,
|
|
2222
2333
|
children: [
|
|
2223
|
-
/* @__PURE__ */ (0,
|
|
2334
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
2224
2335
|
children
|
|
2225
2336
|
]
|
|
2226
2337
|
}
|
|
2227
2338
|
));
|
|
2228
2339
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
2229
|
-
var DropdownMenuRadioItem =
|
|
2340
|
+
var DropdownMenuRadioItem = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2230
2341
|
DropdownMenuPrimitive.RadioItem,
|
|
2231
2342
|
{
|
|
2232
2343
|
ref,
|
|
@@ -2234,13 +2345,13 @@ var DropdownMenuRadioItem = React17.forwardRef(({ className, children, ...props
|
|
|
2234
2345
|
className: cn(MENU_INDICATOR_ITEM_CLASS, className),
|
|
2235
2346
|
...props,
|
|
2236
2347
|
children: [
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DotFilledIcon, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2238
2349
|
children
|
|
2239
2350
|
]
|
|
2240
2351
|
}
|
|
2241
2352
|
));
|
|
2242
2353
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2243
|
-
var DropdownMenuLabel =
|
|
2354
|
+
var DropdownMenuLabel = React18.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2244
2355
|
DropdownMenuPrimitive.Label,
|
|
2245
2356
|
{
|
|
2246
2357
|
ref,
|
|
@@ -2250,7 +2361,7 @@ var DropdownMenuLabel = React17.forwardRef(({ className, inset, ...props }, ref)
|
|
|
2250
2361
|
}
|
|
2251
2362
|
));
|
|
2252
2363
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2253
|
-
var DropdownMenuSeparator =
|
|
2364
|
+
var DropdownMenuSeparator = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2254
2365
|
DropdownMenuPrimitive.Separator,
|
|
2255
2366
|
{
|
|
2256
2367
|
ref,
|
|
@@ -2263,7 +2374,7 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
|
2263
2374
|
var DropdownMenuShortcut = ({
|
|
2264
2375
|
className,
|
|
2265
2376
|
...props
|
|
2266
|
-
}) => /* @__PURE__ */ (0,
|
|
2377
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2267
2378
|
"span",
|
|
2268
2379
|
{
|
|
2269
2380
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -2275,7 +2386,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
|
2275
2386
|
|
|
2276
2387
|
// src/editable-label.tsx
|
|
2277
2388
|
var import_react2 = require("react");
|
|
2278
|
-
var
|
|
2389
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2279
2390
|
function EditableLabel({
|
|
2280
2391
|
value,
|
|
2281
2392
|
onCommit,
|
|
@@ -2382,8 +2493,8 @@ function EditableLabel({
|
|
|
2382
2493
|
setEditing
|
|
2383
2494
|
]);
|
|
2384
2495
|
if (editing) {
|
|
2385
|
-
return /* @__PURE__ */ (0,
|
|
2386
|
-
/* @__PURE__ */ (0,
|
|
2496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: cn("relative flex min-w-0 flex-1 items-center", className), children: [
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2387
2498
|
"input",
|
|
2388
2499
|
{
|
|
2389
2500
|
ref: inputRef,
|
|
@@ -2423,12 +2534,12 @@ function EditableLabel({
|
|
|
2423
2534
|
)
|
|
2424
2535
|
}
|
|
2425
2536
|
),
|
|
2426
|
-
busy && /* @__PURE__ */ (0,
|
|
2427
|
-
error && /* @__PURE__ */ (0,
|
|
2537
|
+
busy && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
|
|
2538
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
|
|
2428
2539
|
] });
|
|
2429
2540
|
}
|
|
2430
2541
|
if (controlled) return null;
|
|
2431
|
-
return /* @__PURE__ */ (0,
|
|
2542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2432
2543
|
"button",
|
|
2433
2544
|
{
|
|
2434
2545
|
type: "button",
|
|
@@ -2462,8 +2573,8 @@ function EditableLabel({
|
|
|
2462
2573
|
}
|
|
2463
2574
|
|
|
2464
2575
|
// src/input.tsx
|
|
2465
|
-
var
|
|
2466
|
-
var
|
|
2576
|
+
var React19 = __toESM(require("react"), 1);
|
|
2577
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2467
2578
|
var getVariantStyles = (variant = "default") => {
|
|
2468
2579
|
const baseStyles = `flex h-10 w-full border border-border bg-background text-foreground shadow-input rounded-md px-3 py-2 text-sm file:border-0 file:bg-transparent
|
|
2469
2580
|
file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground
|
|
@@ -2491,9 +2602,9 @@ var getVariantStyles = (variant = "default") => {
|
|
|
2491
2602
|
return baseStyles;
|
|
2492
2603
|
}
|
|
2493
2604
|
};
|
|
2494
|
-
var Input =
|
|
2605
|
+
var Input = React19.forwardRef(
|
|
2495
2606
|
({ className, type, variant = "default", ...props }, ref) => {
|
|
2496
|
-
return /* @__PURE__ */ (0,
|
|
2607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2497
2608
|
"input",
|
|
2498
2609
|
{
|
|
2499
2610
|
type,
|
|
@@ -2505,7 +2616,7 @@ var Input = React18.forwardRef(
|
|
|
2505
2616
|
}
|
|
2506
2617
|
);
|
|
2507
2618
|
Input.displayName = "Input";
|
|
2508
|
-
var EnterInput =
|
|
2619
|
+
var EnterInput = React19.forwardRef(
|
|
2509
2620
|
({ onEnter, ...props }, ref) => {
|
|
2510
2621
|
const handleKeyDown = (e) => {
|
|
2511
2622
|
if (e.key === "Enter" && onEnter) {
|
|
@@ -2513,7 +2624,7 @@ var EnterInput = React18.forwardRef(
|
|
|
2513
2624
|
onEnter();
|
|
2514
2625
|
}
|
|
2515
2626
|
};
|
|
2516
|
-
return /* @__PURE__ */ (0,
|
|
2627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2517
2628
|
Input,
|
|
2518
2629
|
{
|
|
2519
2630
|
...props,
|
|
@@ -2529,11 +2640,11 @@ var EnterInput = React18.forwardRef(
|
|
|
2529
2640
|
}
|
|
2530
2641
|
);
|
|
2531
2642
|
EnterInput.displayName = "EnterInput";
|
|
2532
|
-
var BasicInput =
|
|
2643
|
+
var BasicInput = React19.forwardRef(
|
|
2533
2644
|
// `variant` is accepted (prop-compatible with Input) but intentionally
|
|
2534
2645
|
// unused — and destructured so it never leaks onto the DOM element.
|
|
2535
2646
|
({ className, type, variant: _variant = "default", ...props }, ref) => {
|
|
2536
|
-
return /* @__PURE__ */ (0,
|
|
2647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2537
2648
|
"input",
|
|
2538
2649
|
{
|
|
2539
2650
|
type,
|
|
@@ -2548,10 +2659,10 @@ var BasicInput = React18.forwardRef(
|
|
|
2548
2659
|
}
|
|
2549
2660
|
);
|
|
2550
2661
|
BasicInput.displayName = "BasicInput";
|
|
2551
|
-
var InputWithPrefix =
|
|
2552
|
-
return /* @__PURE__ */ (0,
|
|
2553
|
-
prefix && /* @__PURE__ */ (0,
|
|
2554
|
-
/* @__PURE__ */ (0,
|
|
2662
|
+
var InputWithPrefix = React19.forwardRef(({ prefix, className, wrapperClassName, ...props }, ref) => {
|
|
2663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
|
|
2664
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: prefix }),
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2555
2666
|
Input,
|
|
2556
2667
|
{
|
|
2557
2668
|
ref,
|
|
@@ -2565,9 +2676,9 @@ InputWithPrefix.displayName = "InputWithPrefix";
|
|
|
2565
2676
|
|
|
2566
2677
|
// src/label.tsx
|
|
2567
2678
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
2568
|
-
var
|
|
2569
|
-
var
|
|
2570
|
-
var Label3 =
|
|
2679
|
+
var React20 = __toESM(require("react"), 1);
|
|
2680
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2681
|
+
var Label3 = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2571
2682
|
LabelPrimitive.Root,
|
|
2572
2683
|
{
|
|
2573
2684
|
ref,
|
|
@@ -2582,7 +2693,7 @@ Label3.displayName = LabelPrimitive.Root.displayName;
|
|
|
2582
2693
|
|
|
2583
2694
|
// src/overflow-toolbar.tsx
|
|
2584
2695
|
var import_react3 = require("react");
|
|
2585
|
-
var
|
|
2696
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2586
2697
|
var GAP_PX = 6;
|
|
2587
2698
|
var TONE = {
|
|
2588
2699
|
default: "border border-border bg-background hover:bg-accent text-foreground",
|
|
@@ -2604,16 +2715,16 @@ function ToolbarButton({
|
|
|
2604
2715
|
action.hideLabel && !action.running ? "w-7 justify-center px-0" : "px-2",
|
|
2605
2716
|
TONE[tone]
|
|
2606
2717
|
);
|
|
2607
|
-
const inner = /* @__PURE__ */ (0,
|
|
2608
|
-
/* @__PURE__ */ (0,
|
|
2718
|
+
const inner = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2609
2720
|
Icon2,
|
|
2610
2721
|
{
|
|
2611
2722
|
className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
|
|
2612
2723
|
}
|
|
2613
2724
|
),
|
|
2614
|
-
showLabel && /* @__PURE__ */ (0,
|
|
2725
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: text })
|
|
2615
2726
|
] });
|
|
2616
|
-
const control = action.href && !action.disabled ? /* @__PURE__ */ (0,
|
|
2727
|
+
const control = action.href && !action.disabled ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2617
2728
|
"a",
|
|
2618
2729
|
{
|
|
2619
2730
|
href: action.href,
|
|
@@ -2623,7 +2734,7 @@ function ToolbarButton({
|
|
|
2623
2734
|
"aria-label": action.label,
|
|
2624
2735
|
children: inner
|
|
2625
2736
|
}
|
|
2626
|
-
) : /* @__PURE__ */ (0,
|
|
2737
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2627
2738
|
"button",
|
|
2628
2739
|
{
|
|
2629
2740
|
type: "button",
|
|
@@ -2635,12 +2746,12 @@ function ToolbarButton({
|
|
|
2635
2746
|
}
|
|
2636
2747
|
);
|
|
2637
2748
|
if (enableTooltip && action.hideLabel && renderTooltip) {
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
2749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: renderTooltip(control, action.label) });
|
|
2639
2750
|
}
|
|
2640
2751
|
return control;
|
|
2641
2752
|
}
|
|
2642
2753
|
function OverflowTrigger({ ariaLabel }) {
|
|
2643
|
-
return /* @__PURE__ */ (0,
|
|
2754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2644
2755
|
"button",
|
|
2645
2756
|
{
|
|
2646
2757
|
type: "button",
|
|
@@ -2651,7 +2762,7 @@ function OverflowTrigger({ ariaLabel }) {
|
|
|
2651
2762
|
"inline-flex items-center justify-center h-7 w-7 rounded-md transition-colors",
|
|
2652
2763
|
"border border-border bg-background hover:bg-accent text-foreground"
|
|
2653
2764
|
),
|
|
2654
|
-
children: /* @__PURE__ */ (0,
|
|
2765
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MoreHorizontalIcon, { className: "w-3.5 h-3.5" })
|
|
2655
2766
|
}
|
|
2656
2767
|
);
|
|
2657
2768
|
}
|
|
@@ -2711,22 +2822,22 @@ function OverflowToolbar({
|
|
|
2711
2822
|
}, [signature, leading != null]);
|
|
2712
2823
|
const shown = visibleActions.slice(0, visibleCount);
|
|
2713
2824
|
const hidden = visibleActions.slice(visibleCount);
|
|
2714
|
-
return /* @__PURE__ */ (0,
|
|
2715
|
-
/* @__PURE__ */ (0,
|
|
2825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref: containerRef, className: cn("relative min-w-0", className), children: [
|
|
2826
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2716
2827
|
"div",
|
|
2717
2828
|
{
|
|
2718
2829
|
ref: ghostRef,
|
|
2719
2830
|
"aria-hidden": true,
|
|
2720
2831
|
className: "pointer-events-none absolute left-0 top-0 flex items-center gap-1.5 opacity-0",
|
|
2721
2832
|
children: [
|
|
2722
|
-
visibleActions.map((a) => /* @__PURE__ */ (0,
|
|
2723
|
-
/* @__PURE__ */ (0,
|
|
2833
|
+
visibleActions.map((a) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ToolbarButton, { action: a }, a.id)),
|
|
2834
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2724
2835
|
]
|
|
2725
2836
|
}
|
|
2726
2837
|
),
|
|
2727
|
-
/* @__PURE__ */ (0,
|
|
2728
|
-
leading != null && /* @__PURE__ */ (0,
|
|
2729
|
-
shown.map((a) => /* @__PURE__ */ (0,
|
|
2838
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-end gap-1.5", children: [
|
|
2839
|
+
leading != null && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { ref: leadingRef, className: "shrink-0", children: leading }),
|
|
2840
|
+
shown.map((a) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2730
2841
|
ToolbarButton,
|
|
2731
2842
|
{
|
|
2732
2843
|
action: a,
|
|
@@ -2737,7 +2848,7 @@ function OverflowToolbar({
|
|
|
2737
2848
|
)),
|
|
2738
2849
|
hidden.length > 0 && renderOverflowMenu({
|
|
2739
2850
|
actions: hidden,
|
|
2740
|
-
trigger: /* @__PURE__ */ (0,
|
|
2851
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(OverflowTrigger, { ariaLabel: overflowAriaLabel })
|
|
2741
2852
|
})
|
|
2742
2853
|
] })
|
|
2743
2854
|
] });
|
|
@@ -2745,20 +2856,20 @@ function OverflowToolbar({
|
|
|
2745
2856
|
|
|
2746
2857
|
// src/progress.tsx
|
|
2747
2858
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
2748
|
-
var
|
|
2749
|
-
var
|
|
2859
|
+
var React22 = __toESM(require("react"), 1);
|
|
2860
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2750
2861
|
var PROGRESS_TONES = {
|
|
2751
2862
|
default: "bg-primary",
|
|
2752
2863
|
success: "bg-success",
|
|
2753
2864
|
warning: "bg-warning",
|
|
2754
2865
|
destructive: "bg-destructive"
|
|
2755
2866
|
};
|
|
2756
|
-
var Progress =
|
|
2867
|
+
var Progress = React22.forwardRef(({ className, tone = "default", indicatorClassName, ...props }, ref) => {
|
|
2757
2868
|
const { value, max } = props;
|
|
2758
2869
|
const ceiling = max ?? 100;
|
|
2759
2870
|
const isIndeterminate = value === null || value === void 0;
|
|
2760
2871
|
const pct = isIndeterminate ? 0 : Math.min(100, Math.max(0, value / ceiling * 100));
|
|
2761
|
-
return /* @__PURE__ */ (0,
|
|
2872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2762
2873
|
ProgressPrimitive.Root,
|
|
2763
2874
|
{
|
|
2764
2875
|
ref,
|
|
@@ -2768,7 +2879,7 @@ var Progress = React21.forwardRef(({ className, tone = "default", indicatorClass
|
|
|
2768
2879
|
className
|
|
2769
2880
|
),
|
|
2770
2881
|
...props,
|
|
2771
|
-
children: /* @__PURE__ */ (0,
|
|
2882
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2772
2883
|
ProgressPrimitive.Indicator,
|
|
2773
2884
|
{
|
|
2774
2885
|
"data-slot": "progress-indicator",
|
|
@@ -2788,9 +2899,9 @@ Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
|
2788
2899
|
|
|
2789
2900
|
// src/scroll-area.tsx
|
|
2790
2901
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
2791
|
-
var
|
|
2792
|
-
var
|
|
2793
|
-
var ScrollArea =
|
|
2902
|
+
var React23 = __toESM(require("react"), 1);
|
|
2903
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2904
|
+
var ScrollArea = React23.forwardRef(
|
|
2794
2905
|
({
|
|
2795
2906
|
className,
|
|
2796
2907
|
children,
|
|
@@ -2799,7 +2910,7 @@ var ScrollArea = React22.forwardRef(
|
|
|
2799
2910
|
scrollBarClassName,
|
|
2800
2911
|
orientation = "vertical",
|
|
2801
2912
|
...props
|
|
2802
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
2913
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2803
2914
|
ScrollAreaPrimitive.Root,
|
|
2804
2915
|
{
|
|
2805
2916
|
ref,
|
|
@@ -2807,7 +2918,7 @@ var ScrollArea = React22.forwardRef(
|
|
|
2807
2918
|
className: cn("relative overflow-hidden", className),
|
|
2808
2919
|
...props,
|
|
2809
2920
|
children: [
|
|
2810
|
-
/* @__PURE__ */ (0,
|
|
2921
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2811
2922
|
ScrollAreaPrimitive.Viewport,
|
|
2812
2923
|
{
|
|
2813
2924
|
ref: viewportRef,
|
|
@@ -2816,14 +2927,14 @@ var ScrollArea = React22.forwardRef(
|
|
|
2816
2927
|
children
|
|
2817
2928
|
}
|
|
2818
2929
|
),
|
|
2819
|
-
/* @__PURE__ */ (0,
|
|
2820
|
-
/* @__PURE__ */ (0,
|
|
2930
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ScrollBar, { orientation, className: scrollBarClassName }),
|
|
2931
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
2821
2932
|
]
|
|
2822
2933
|
}
|
|
2823
2934
|
)
|
|
2824
2935
|
);
|
|
2825
2936
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2826
|
-
var ScrollBar =
|
|
2937
|
+
var ScrollBar = React23.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2827
2938
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2828
2939
|
{
|
|
2829
2940
|
ref,
|
|
@@ -2836,7 +2947,7 @@ var ScrollBar = React22.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2836
2947
|
className
|
|
2837
2948
|
),
|
|
2838
2949
|
...props,
|
|
2839
|
-
children: /* @__PURE__ */ (0,
|
|
2950
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2840
2951
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
2841
2952
|
{
|
|
2842
2953
|
"data-slot": "scroll-area-thumb",
|
|
@@ -2848,7 +2959,7 @@ var ScrollBar = React22.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
2848
2959
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2849
2960
|
|
|
2850
2961
|
// src/score-ring.tsx
|
|
2851
|
-
var
|
|
2962
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2852
2963
|
var DEFAULT_SCORE_THRESHOLDS = {
|
|
2853
2964
|
good: 75,
|
|
2854
2965
|
warning: 50
|
|
@@ -2879,7 +2990,7 @@ function ScoreRing({
|
|
|
2879
2990
|
const circumference = 2 * Math.PI * radius;
|
|
2880
2991
|
const boundedPct = pct === null ? 0 : Math.max(0, Math.min(100, pct));
|
|
2881
2992
|
const dashOffset = circumference * (1 - boundedPct / 100);
|
|
2882
|
-
return /* @__PURE__ */ (0,
|
|
2993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2883
2994
|
"div",
|
|
2884
2995
|
{
|
|
2885
2996
|
className: cn(
|
|
@@ -2890,8 +3001,8 @@ function ScoreRing({
|
|
|
2890
3001
|
role: "img",
|
|
2891
3002
|
"aria-label": `${label ?? "Score"}: ${pct === null ? "not available" : `${pct} out of 100`}`,
|
|
2892
3003
|
children: [
|
|
2893
|
-
/* @__PURE__ */ (0,
|
|
2894
|
-
/* @__PURE__ */ (0,
|
|
3004
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("svg", { viewBox: "0 0 100 100", className: "h-full w-full -rotate-90", children: [
|
|
3005
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2895
3006
|
"circle",
|
|
2896
3007
|
{
|
|
2897
3008
|
cx: "50",
|
|
@@ -2902,7 +3013,7 @@ function ScoreRing({
|
|
|
2902
3013
|
fill: "none"
|
|
2903
3014
|
}
|
|
2904
3015
|
),
|
|
2905
|
-
pct !== null ? /* @__PURE__ */ (0,
|
|
3016
|
+
pct !== null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2906
3017
|
"circle",
|
|
2907
3018
|
{
|
|
2908
3019
|
cx: "50",
|
|
@@ -2921,8 +3032,8 @@ function ScoreRing({
|
|
|
2921
3032
|
}
|
|
2922
3033
|
) : null
|
|
2923
3034
|
] }),
|
|
2924
|
-
/* @__PURE__ */ (0,
|
|
2925
|
-
/* @__PURE__ */ (0,
|
|
3035
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "absolute flex flex-col items-center justify-center", children: [
|
|
3036
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2926
3037
|
"span",
|
|
2927
3038
|
{
|
|
2928
3039
|
className: cn(
|
|
@@ -2932,7 +3043,7 @@ function ScoreRing({
|
|
|
2932
3043
|
children: pct === null ? "\u2014" : `${pct}${suffix}`
|
|
2933
3044
|
}
|
|
2934
3045
|
),
|
|
2935
|
-
label ? /* @__PURE__ */ (0,
|
|
3046
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "max-w-[74px] truncate text-[9px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }) : null
|
|
2936
3047
|
] })
|
|
2937
3048
|
]
|
|
2938
3049
|
}
|
|
@@ -2940,7 +3051,7 @@ function ScoreRing({
|
|
|
2940
3051
|
}
|
|
2941
3052
|
|
|
2942
3053
|
// src/segmented-control.tsx
|
|
2943
|
-
var
|
|
3054
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2944
3055
|
function SegmentedControl({
|
|
2945
3056
|
value,
|
|
2946
3057
|
onValueChange,
|
|
@@ -2955,7 +3066,7 @@ function SegmentedControl({
|
|
|
2955
3066
|
md: "h-9 text-sm",
|
|
2956
3067
|
lg: "h-10 text-base"
|
|
2957
3068
|
};
|
|
2958
|
-
return /* @__PURE__ */ (0,
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2959
3070
|
"div",
|
|
2960
3071
|
{
|
|
2961
3072
|
className: cn(
|
|
@@ -2966,7 +3077,7 @@ function SegmentedControl({
|
|
|
2966
3077
|
role: "tablist",
|
|
2967
3078
|
children: data.map((option) => {
|
|
2968
3079
|
const isActive = value === option.value;
|
|
2969
|
-
return /* @__PURE__ */ (0,
|
|
3080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2970
3081
|
"button",
|
|
2971
3082
|
{
|
|
2972
3083
|
type: "button",
|
|
@@ -2993,8 +3104,8 @@ function SegmentedControl({
|
|
|
2993
3104
|
// src/select.tsx
|
|
2994
3105
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2995
3106
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
2996
|
-
var
|
|
2997
|
-
var
|
|
3107
|
+
var React24 = __toESM(require("react"), 1);
|
|
3108
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2998
3109
|
var Select = SelectPrimitive.Root;
|
|
2999
3110
|
var SelectGroup = SelectPrimitive.Group;
|
|
3000
3111
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -3013,7 +3124,7 @@ var selectTriggerVariants = (0, import_class_variance_authority4.cva)(
|
|
|
3013
3124
|
}
|
|
3014
3125
|
}
|
|
3015
3126
|
);
|
|
3016
|
-
var SelectTrigger =
|
|
3127
|
+
var SelectTrigger = React24.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3017
3128
|
SelectPrimitive.Trigger,
|
|
3018
3129
|
{
|
|
3019
3130
|
ref,
|
|
@@ -3021,12 +3132,12 @@ var SelectTrigger = React23.forwardRef(({ className, children, hideArrow = false
|
|
|
3021
3132
|
...props,
|
|
3022
3133
|
children: [
|
|
3023
3134
|
children,
|
|
3024
|
-
!hideArrow && /* @__PURE__ */ (0,
|
|
3135
|
+
!hideArrow && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixChevronDownIcon, { className: "h-4 w-4 opacity-50" }) })
|
|
3025
3136
|
]
|
|
3026
3137
|
}
|
|
3027
3138
|
));
|
|
3028
3139
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
3029
|
-
var SelectScrollUpButton =
|
|
3140
|
+
var SelectScrollUpButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3030
3141
|
SelectPrimitive.ScrollUpButton,
|
|
3031
3142
|
{
|
|
3032
3143
|
ref,
|
|
@@ -3035,11 +3146,11 @@ var SelectScrollUpButton = React23.forwardRef(({ className, ...props }, ref) =>
|
|
|
3035
3146
|
className
|
|
3036
3147
|
),
|
|
3037
3148
|
...props,
|
|
3038
|
-
children: /* @__PURE__ */ (0,
|
|
3149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixChevronUpIcon, {})
|
|
3039
3150
|
}
|
|
3040
3151
|
));
|
|
3041
3152
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
3042
|
-
var SelectScrollDownButton =
|
|
3153
|
+
var SelectScrollDownButton = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3043
3154
|
SelectPrimitive.ScrollDownButton,
|
|
3044
3155
|
{
|
|
3045
3156
|
ref,
|
|
@@ -3048,11 +3159,11 @@ var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) =
|
|
|
3048
3159
|
className
|
|
3049
3160
|
),
|
|
3050
3161
|
...props,
|
|
3051
|
-
children: /* @__PURE__ */ (0,
|
|
3162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixChevronDownIcon, {})
|
|
3052
3163
|
}
|
|
3053
3164
|
));
|
|
3054
3165
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
3055
|
-
var SelectContent =
|
|
3166
|
+
var SelectContent = React24.forwardRef(
|
|
3056
3167
|
({
|
|
3057
3168
|
className,
|
|
3058
3169
|
children,
|
|
@@ -3062,7 +3173,7 @@ var SelectContent = React23.forwardRef(
|
|
|
3062
3173
|
...props
|
|
3063
3174
|
}, ref) => {
|
|
3064
3175
|
const portalContainer = usePortalContainer(container);
|
|
3065
|
-
return /* @__PURE__ */ (0,
|
|
3176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3066
3177
|
SelectPrimitive.Content,
|
|
3067
3178
|
{
|
|
3068
3179
|
ref,
|
|
@@ -3075,8 +3186,8 @@ var SelectContent = React23.forwardRef(
|
|
|
3075
3186
|
position,
|
|
3076
3187
|
...props,
|
|
3077
3188
|
children: [
|
|
3078
|
-
/* @__PURE__ */ (0,
|
|
3079
|
-
/* @__PURE__ */ (0,
|
|
3189
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectScrollUpButton, {}),
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3080
3191
|
SelectPrimitive.Viewport,
|
|
3081
3192
|
{
|
|
3082
3193
|
className: cn(
|
|
@@ -3086,14 +3197,14 @@ var SelectContent = React23.forwardRef(
|
|
|
3086
3197
|
children
|
|
3087
3198
|
}
|
|
3088
3199
|
),
|
|
3089
|
-
/* @__PURE__ */ (0,
|
|
3200
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectScrollDownButton, {})
|
|
3090
3201
|
]
|
|
3091
3202
|
}
|
|
3092
3203
|
) });
|
|
3093
3204
|
}
|
|
3094
3205
|
);
|
|
3095
3206
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3096
|
-
var SelectLabel =
|
|
3207
|
+
var SelectLabel = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3097
3208
|
SelectPrimitive.Label,
|
|
3098
3209
|
{
|
|
3099
3210
|
ref,
|
|
@@ -3102,7 +3213,7 @@ var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3102
3213
|
}
|
|
3103
3214
|
));
|
|
3104
3215
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3105
|
-
var SelectItem =
|
|
3216
|
+
var SelectItem = React24.forwardRef(({ className, children, description, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3106
3217
|
SelectPrimitive.Item,
|
|
3107
3218
|
{
|
|
3108
3219
|
ref,
|
|
@@ -3113,14 +3224,14 @@ var SelectItem = React23.forwardRef(({ className, children, description, ...prop
|
|
|
3113
3224
|
),
|
|
3114
3225
|
...props,
|
|
3115
3226
|
children: [
|
|
3116
|
-
/* @__PURE__ */ (0,
|
|
3117
|
-
/* @__PURE__ */ (0,
|
|
3118
|
-
description ? /* @__PURE__ */ (0,
|
|
3227
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckIcon, { className: "h-4 w-4" }) }) }),
|
|
3228
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(SelectPrimitive.ItemText, { children }),
|
|
3229
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "block text-xs leading-snug text-muted-foreground", children: description }) : null
|
|
3119
3230
|
]
|
|
3120
3231
|
}
|
|
3121
3232
|
));
|
|
3122
3233
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3123
|
-
var SelectSeparator =
|
|
3234
|
+
var SelectSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3124
3235
|
SelectPrimitive.Separator,
|
|
3125
3236
|
{
|
|
3126
3237
|
ref,
|
|
@@ -3132,9 +3243,9 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
3132
3243
|
|
|
3133
3244
|
// src/separator.tsx
|
|
3134
3245
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
3135
|
-
var
|
|
3136
|
-
var
|
|
3137
|
-
var Separator4 =
|
|
3246
|
+
var React25 = __toESM(require("react"), 1);
|
|
3247
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3248
|
+
var Separator4 = React25.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3138
3249
|
SeparatorPrimitive.Root,
|
|
3139
3250
|
{
|
|
3140
3251
|
ref,
|
|
@@ -3154,11 +3265,11 @@ Separator4.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
3154
3265
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
3155
3266
|
var import_react_tree4 = require("@ai-matrx/kit/react-tree");
|
|
3156
3267
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
3157
|
-
var
|
|
3158
|
-
var
|
|
3159
|
-
var SheetContentBase =
|
|
3268
|
+
var React26 = __toESM(require("react"), 1);
|
|
3269
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3270
|
+
var SheetContentBase = React26.forwardRef(({ ...props }, ref) => {
|
|
3160
3271
|
const isModal = useRadixDialogModal();
|
|
3161
|
-
return /* @__PURE__ */ (0,
|
|
3272
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3162
3273
|
SheetPrimitive.Content,
|
|
3163
3274
|
{
|
|
3164
3275
|
...props,
|
|
@@ -3168,15 +3279,15 @@ var SheetContentBase = React25.forwardRef(({ ...props }, ref) => {
|
|
|
3168
3279
|
);
|
|
3169
3280
|
});
|
|
3170
3281
|
SheetContentBase.displayName = "SheetContentBase";
|
|
3171
|
-
var Sheet =
|
|
3282
|
+
var Sheet = React26.forwardRef(({ children, ...props }, _ref) => {
|
|
3172
3283
|
const modal = props.modal ?? true;
|
|
3173
|
-
return /* @__PURE__ */ (0,
|
|
3284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixDialogModalProvider, { modal, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SheetPrimitive.Root, { ...props, modal, children }) });
|
|
3174
3285
|
});
|
|
3175
3286
|
Sheet.displayName = "Sheet";
|
|
3176
3287
|
var SheetTrigger = SheetPrimitive.Trigger;
|
|
3177
3288
|
var SheetClose = SheetPrimitive.Close;
|
|
3178
3289
|
var SheetPortal = SheetPrimitive.Portal;
|
|
3179
|
-
var SheetOverlay =
|
|
3290
|
+
var SheetOverlay = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3180
3291
|
SheetPrimitive.Overlay,
|
|
3181
3292
|
{
|
|
3182
3293
|
className: cn(
|
|
@@ -3213,7 +3324,7 @@ var sheetVariants = (0, import_class_variance_authority5.cva)(
|
|
|
3213
3324
|
}
|
|
3214
3325
|
}
|
|
3215
3326
|
);
|
|
3216
|
-
var SheetDescription =
|
|
3327
|
+
var SheetDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3217
3328
|
SheetPrimitive.Description,
|
|
3218
3329
|
{
|
|
3219
3330
|
ref,
|
|
@@ -3222,7 +3333,7 @@ var SheetDescription = React25.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3222
3333
|
}
|
|
3223
3334
|
));
|
|
3224
3335
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
3225
|
-
var SheetContent =
|
|
3336
|
+
var SheetContent = React26.forwardRef(
|
|
3226
3337
|
({
|
|
3227
3338
|
side = "right",
|
|
3228
3339
|
className,
|
|
@@ -3234,9 +3345,9 @@ var SheetContent = React25.forwardRef(
|
|
|
3234
3345
|
...props
|
|
3235
3346
|
}, ref) => {
|
|
3236
3347
|
const hasDescription = (0, import_react_tree4.treeContainsComponent)(children, SheetDescription) || (0, import_react_tree4.treeContainsComponent)(children, SheetPrimitive.Description);
|
|
3237
|
-
return /* @__PURE__ */ (0,
|
|
3238
|
-
!hideOverlay && /* @__PURE__ */ (0,
|
|
3239
|
-
/* @__PURE__ */ (0,
|
|
3348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(SheetPortal, { children: [
|
|
3349
|
+
!hideOverlay && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SheetOverlay, { className: overlayClassName }),
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3240
3351
|
SheetContentBase,
|
|
3241
3352
|
{
|
|
3242
3353
|
ref,
|
|
@@ -3248,9 +3359,9 @@ var SheetContent = React25.forwardRef(
|
|
|
3248
3359
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
3249
3360
|
...props,
|
|
3250
3361
|
children: [
|
|
3251
|
-
!hideCloseButton && /* @__PURE__ */ (0,
|
|
3252
|
-
/* @__PURE__ */ (0,
|
|
3253
|
-
/* @__PURE__ */ (0,
|
|
3362
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
3363
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Cross2Icon, { className: "h-4 w-4" }),
|
|
3364
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", children: "Close" })
|
|
3254
3365
|
] }),
|
|
3255
3366
|
children
|
|
3256
3367
|
]
|
|
@@ -3263,7 +3374,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
3263
3374
|
var SheetHeader = ({
|
|
3264
3375
|
className,
|
|
3265
3376
|
...props
|
|
3266
|
-
}) => /* @__PURE__ */ (0,
|
|
3377
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3267
3378
|
"div",
|
|
3268
3379
|
{
|
|
3269
3380
|
className: cn(
|
|
@@ -3277,7 +3388,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
3277
3388
|
var SheetFooter = ({
|
|
3278
3389
|
className,
|
|
3279
3390
|
...props
|
|
3280
|
-
}) => /* @__PURE__ */ (0,
|
|
3391
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3281
3392
|
"div",
|
|
3282
3393
|
{
|
|
3283
3394
|
className: cn(
|
|
@@ -3288,7 +3399,7 @@ var SheetFooter = ({
|
|
|
3288
3399
|
}
|
|
3289
3400
|
);
|
|
3290
3401
|
SheetFooter.displayName = "SheetFooter";
|
|
3291
|
-
var SheetTitle =
|
|
3402
|
+
var SheetTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3292
3403
|
SheetPrimitive.Title,
|
|
3293
3404
|
{
|
|
3294
3405
|
ref,
|
|
@@ -3299,9 +3410,9 @@ var SheetTitle = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3299
3410
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
3300
3411
|
|
|
3301
3412
|
// src/skeleton.tsx
|
|
3302
|
-
var
|
|
3413
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3303
3414
|
function Skeleton({ className, animated = true, ...props }) {
|
|
3304
|
-
return /* @__PURE__ */ (0,
|
|
3415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
3305
3416
|
"div",
|
|
3306
3417
|
{
|
|
3307
3418
|
"data-slot": "skeleton",
|
|
@@ -3317,8 +3428,8 @@ function Skeleton({ className, animated = true, ...props }) {
|
|
|
3317
3428
|
|
|
3318
3429
|
// src/switch.tsx
|
|
3319
3430
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
3320
|
-
var
|
|
3321
|
-
var
|
|
3431
|
+
var React27 = __toESM(require("react"), 1);
|
|
3432
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3322
3433
|
var SWITCH_SIZES = {
|
|
3323
3434
|
sm: {
|
|
3324
3435
|
root: "h-4 w-9 border-border data-[state=unchecked]:bg-input",
|
|
@@ -3329,7 +3440,7 @@ var SWITCH_SIZES = {
|
|
|
3329
3440
|
thumb: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
3330
3441
|
}
|
|
3331
3442
|
};
|
|
3332
|
-
var Switch =
|
|
3443
|
+
var Switch = React27.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3333
3444
|
SwitchPrimitives.Root,
|
|
3334
3445
|
{
|
|
3335
3446
|
ref,
|
|
@@ -3340,7 +3451,7 @@ var Switch = React26.forwardRef(({ className, size = "md", ...props }, ref) => /
|
|
|
3340
3451
|
className
|
|
3341
3452
|
),
|
|
3342
3453
|
...props,
|
|
3343
|
-
children: /* @__PURE__ */ (0,
|
|
3454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3344
3455
|
SwitchPrimitives.Thumb,
|
|
3345
3456
|
{
|
|
3346
3457
|
"data-slot": "switch-thumb",
|
|
@@ -3356,7 +3467,7 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
3356
3467
|
|
|
3357
3468
|
// src/tabbed-bottom-sheet.tsx
|
|
3358
3469
|
var import_react4 = require("react");
|
|
3359
|
-
var
|
|
3470
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3360
3471
|
function TabbedBottomSheet({
|
|
3361
3472
|
open,
|
|
3362
3473
|
onOpenChange,
|
|
@@ -3370,15 +3481,15 @@ function TabbedBottomSheet({
|
|
|
3370
3481
|
if (open) setSelectedTabId(null);
|
|
3371
3482
|
}
|
|
3372
3483
|
const selectedTab = selectedTabId ? tabs.find((tab) => tab.id === selectedTabId) : null;
|
|
3373
|
-
return /* @__PURE__ */ (0,
|
|
3484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3374
3485
|
BottomSheet,
|
|
3375
3486
|
{
|
|
3376
3487
|
open,
|
|
3377
3488
|
onOpenChange,
|
|
3378
3489
|
title,
|
|
3379
3490
|
size: "full",
|
|
3380
|
-
children: /* @__PURE__ */ (0,
|
|
3381
|
-
/* @__PURE__ */ (0,
|
|
3491
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "matrx-mobile-sheet flex min-h-0 flex-1 flex-col", children: [
|
|
3492
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3382
3493
|
BottomSheetHeader,
|
|
3383
3494
|
{
|
|
3384
3495
|
title: selectedTab ? selectedTab.label : title,
|
|
@@ -3386,19 +3497,19 @@ function TabbedBottomSheet({
|
|
|
3386
3497
|
onBack: () => setSelectedTabId(null)
|
|
3387
3498
|
}
|
|
3388
3499
|
),
|
|
3389
|
-
selectedTab ? /* @__PURE__ */ (0,
|
|
3500
|
+
selectedTab ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden pb-safe", children: selectedTab.content }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(BottomSheetBody, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("ul", { className: "divide-y divide-border", children: tabs.map((tab) => {
|
|
3390
3501
|
const Icon2 = tab.icon;
|
|
3391
|
-
return /* @__PURE__ */ (0,
|
|
3502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3392
3503
|
"button",
|
|
3393
3504
|
{
|
|
3394
3505
|
type: "button",
|
|
3395
3506
|
onClick: () => setSelectedTabId(tab.id),
|
|
3396
3507
|
className: "flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-muted/60 active:bg-muted",
|
|
3397
3508
|
children: [
|
|
3398
|
-
Icon2 ? /* @__PURE__ */ (0,
|
|
3399
|
-
/* @__PURE__ */ (0,
|
|
3509
|
+
Icon2 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Icon2, { className: "h-5 w-5 shrink-0 text-muted-foreground" }) : null,
|
|
3510
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "min-w-0 flex-1 text-base text-foreground", children: tab.label }),
|
|
3400
3511
|
tab.trailing,
|
|
3401
|
-
/* @__PURE__ */ (0,
|
|
3512
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ChevronRightIcon, { className: "h-5 w-5 shrink-0 text-muted-foreground" })
|
|
3402
3513
|
]
|
|
3403
3514
|
}
|
|
3404
3515
|
) }, tab.id);
|
|
@@ -3409,19 +3520,19 @@ function TabbedBottomSheet({
|
|
|
3409
3520
|
}
|
|
3410
3521
|
|
|
3411
3522
|
// src/table.tsx
|
|
3412
|
-
var
|
|
3413
|
-
var
|
|
3523
|
+
var React28 = __toESM(require("react"), 1);
|
|
3524
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3414
3525
|
var TABLE_SIZES = {
|
|
3415
3526
|
sm: { head: "px-2", cell: "p-2" },
|
|
3416
3527
|
md: { head: "px-3", cell: "p-3" }
|
|
3417
3528
|
};
|
|
3418
|
-
var TableSizeContext =
|
|
3529
|
+
var TableSizeContext = React28.createContext("md");
|
|
3419
3530
|
function useTableSize() {
|
|
3420
|
-
return
|
|
3531
|
+
return React28.useContext(TableSizeContext);
|
|
3421
3532
|
}
|
|
3422
|
-
var Table =
|
|
3533
|
+
var Table = React28.forwardRef(
|
|
3423
3534
|
({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
|
|
3424
|
-
const table = /* @__PURE__ */ (0,
|
|
3535
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3425
3536
|
"table",
|
|
3426
3537
|
{
|
|
3427
3538
|
ref,
|
|
@@ -3431,7 +3542,7 @@ var Table = React27.forwardRef(
|
|
|
3431
3542
|
...props
|
|
3432
3543
|
}
|
|
3433
3544
|
);
|
|
3434
|
-
return /* @__PURE__ */ (0,
|
|
3545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TableSizeContext.Provider, { value: size, children: wrap ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3435
3546
|
"div",
|
|
3436
3547
|
{
|
|
3437
3548
|
"data-slot": "table-wrapper",
|
|
@@ -3442,7 +3553,7 @@ var Table = React27.forwardRef(
|
|
|
3442
3553
|
}
|
|
3443
3554
|
);
|
|
3444
3555
|
Table.displayName = "Table";
|
|
3445
|
-
var TableHeader =
|
|
3556
|
+
var TableHeader = React28.forwardRef(({ className, sticky = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3446
3557
|
"thead",
|
|
3447
3558
|
{
|
|
3448
3559
|
ref,
|
|
@@ -3456,7 +3567,7 @@ var TableHeader = React27.forwardRef(({ className, sticky = false, ...props }, r
|
|
|
3456
3567
|
}
|
|
3457
3568
|
));
|
|
3458
3569
|
TableHeader.displayName = "TableHeader";
|
|
3459
|
-
var TableBody =
|
|
3570
|
+
var TableBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3460
3571
|
"tbody",
|
|
3461
3572
|
{
|
|
3462
3573
|
ref,
|
|
@@ -3466,7 +3577,7 @@ var TableBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3466
3577
|
}
|
|
3467
3578
|
));
|
|
3468
3579
|
TableBody.displayName = "TableBody";
|
|
3469
|
-
var TableFooter =
|
|
3580
|
+
var TableFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3470
3581
|
"tfoot",
|
|
3471
3582
|
{
|
|
3472
3583
|
ref,
|
|
@@ -3479,7 +3590,7 @@ var TableFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3479
3590
|
}
|
|
3480
3591
|
));
|
|
3481
3592
|
TableFooter.displayName = "TableFooter";
|
|
3482
|
-
var TableRow =
|
|
3593
|
+
var TableRow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3483
3594
|
"tr",
|
|
3484
3595
|
{
|
|
3485
3596
|
ref,
|
|
@@ -3492,9 +3603,9 @@ var TableRow = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3492
3603
|
}
|
|
3493
3604
|
));
|
|
3494
3605
|
TableRow.displayName = "TableRow";
|
|
3495
|
-
var TableHead =
|
|
3606
|
+
var TableHead = React28.forwardRef(({ className, ...props }, ref) => {
|
|
3496
3607
|
const size = useTableSize();
|
|
3497
|
-
return /* @__PURE__ */ (0,
|
|
3608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3498
3609
|
"th",
|
|
3499
3610
|
{
|
|
3500
3611
|
ref,
|
|
@@ -3509,9 +3620,9 @@ var TableHead = React27.forwardRef(({ className, ...props }, ref) => {
|
|
|
3509
3620
|
);
|
|
3510
3621
|
});
|
|
3511
3622
|
TableHead.displayName = "TableHead";
|
|
3512
|
-
var TableCell =
|
|
3623
|
+
var TableCell = React28.forwardRef(({ className, ...props }, ref) => {
|
|
3513
3624
|
const size = useTableSize();
|
|
3514
|
-
return /* @__PURE__ */ (0,
|
|
3625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3515
3626
|
"td",
|
|
3516
3627
|
{
|
|
3517
3628
|
ref,
|
|
@@ -3526,7 +3637,7 @@ var TableCell = React27.forwardRef(({ className, ...props }, ref) => {
|
|
|
3526
3637
|
);
|
|
3527
3638
|
});
|
|
3528
3639
|
TableCell.displayName = "TableCell";
|
|
3529
|
-
var TableCaption =
|
|
3640
|
+
var TableCaption = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3530
3641
|
"caption",
|
|
3531
3642
|
{
|
|
3532
3643
|
ref,
|
|
@@ -3539,11 +3650,11 @@ TableCaption.displayName = "TableCaption";
|
|
|
3539
3650
|
|
|
3540
3651
|
// src/tabs.tsx
|
|
3541
3652
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
3542
|
-
var
|
|
3543
|
-
var
|
|
3653
|
+
var React29 = __toESM(require("react"), 1);
|
|
3654
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3544
3655
|
var Tabs = TabsPrimitive.Root;
|
|
3545
3656
|
var TABS_TRIGGER_BASE = "inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm";
|
|
3546
|
-
var TabsList =
|
|
3657
|
+
var TabsList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3547
3658
|
TabsPrimitive.List,
|
|
3548
3659
|
{
|
|
3549
3660
|
ref,
|
|
@@ -3556,7 +3667,7 @@ var TabsList = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3556
3667
|
}
|
|
3557
3668
|
));
|
|
3558
3669
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3559
|
-
var TabsTrigger =
|
|
3670
|
+
var TabsTrigger = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3560
3671
|
TabsPrimitive.Trigger,
|
|
3561
3672
|
{
|
|
3562
3673
|
ref,
|
|
@@ -3570,7 +3681,7 @@ var TabsTrigger = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3570
3681
|
}
|
|
3571
3682
|
));
|
|
3572
3683
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3573
|
-
var TabsTriggerCore =
|
|
3684
|
+
var TabsTriggerCore = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3574
3685
|
TabsPrimitive.Trigger,
|
|
3575
3686
|
{
|
|
3576
3687
|
ref,
|
|
@@ -3580,7 +3691,7 @@ var TabsTriggerCore = React28.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3580
3691
|
}
|
|
3581
3692
|
));
|
|
3582
3693
|
TabsTriggerCore.displayName = TabsPrimitive.Trigger.displayName;
|
|
3583
|
-
var TabsContent =
|
|
3694
|
+
var TabsContent = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3584
3695
|
TabsPrimitive.Content,
|
|
3585
3696
|
{
|
|
3586
3697
|
ref,
|
|
@@ -3596,8 +3707,8 @@ var TabsContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3596
3707
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3597
3708
|
|
|
3598
3709
|
// src/textarea.tsx
|
|
3599
|
-
var
|
|
3600
|
-
var
|
|
3710
|
+
var React30 = __toESM(require("react"), 1);
|
|
3711
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3601
3712
|
var FILL_HEIGHT_REGEX = /(?:^|\s)(h-full|h-dvh|flex-1|grow)(?:\s|$)/;
|
|
3602
3713
|
var FILL_WIDTH_REGEX = /(?:^|\s)(w-full|w-screen)(?:\s|$)/;
|
|
3603
3714
|
function getStretchClasses(className) {
|
|
@@ -3610,7 +3721,7 @@ function getStretchClasses(className) {
|
|
|
3610
3721
|
var TEXTAREA_ELEVATED_CLASS = "flex h-auto w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-textarea transition duration-400 placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3611
3722
|
var TEXTAREA_CONTROL_CLASS = "flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm text-foreground shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50";
|
|
3612
3723
|
function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
3613
|
-
|
|
3724
|
+
React30.useEffect(() => {
|
|
3614
3725
|
if (!autoGrow || !ref.current) return;
|
|
3615
3726
|
const textarea = ref.current;
|
|
3616
3727
|
textarea.style.height = "auto";
|
|
@@ -3626,8 +3737,8 @@ function useAutoGrow(ref, value, autoGrow = false, minHeight, maxHeight) {
|
|
|
3626
3737
|
}, [value, autoGrow, minHeight, maxHeight, ref]);
|
|
3627
3738
|
}
|
|
3628
3739
|
function useMergedTextareaRef(forwarded) {
|
|
3629
|
-
const internal =
|
|
3630
|
-
const callback =
|
|
3740
|
+
const internal = React30.useRef(null);
|
|
3741
|
+
const callback = React30.useCallback(
|
|
3631
3742
|
(node) => {
|
|
3632
3743
|
internal.current = node;
|
|
3633
3744
|
if (typeof forwarded === "function") forwarded(node);
|
|
@@ -3644,13 +3755,13 @@ function boxStyle(minHeight, maxHeight) {
|
|
|
3644
3755
|
maxHeight: maxHeight ? `${maxHeight}px` : void 0
|
|
3645
3756
|
};
|
|
3646
3757
|
}
|
|
3647
|
-
var Textarea =
|
|
3758
|
+
var Textarea = React30.forwardRef(
|
|
3648
3759
|
({ className, autoGrow, minHeight, maxHeight, wrapperClassName, ...props }, forwarded) => {
|
|
3649
3760
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3650
3761
|
const stretchClasses = getStretchClasses(className);
|
|
3651
3762
|
const needsWrapper = Boolean(wrapperClassName || stretchClasses);
|
|
3652
3763
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3653
|
-
const textarea = /* @__PURE__ */ (0,
|
|
3764
|
+
const textarea = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3654
3765
|
"textarea",
|
|
3655
3766
|
{
|
|
3656
3767
|
ref: callback,
|
|
@@ -3666,15 +3777,15 @@ var Textarea = React29.forwardRef(
|
|
|
3666
3777
|
}
|
|
3667
3778
|
);
|
|
3668
3779
|
if (!needsWrapper) return textarea;
|
|
3669
|
-
return /* @__PURE__ */ (0,
|
|
3780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn(stretchClasses, wrapperClassName), children: textarea });
|
|
3670
3781
|
}
|
|
3671
3782
|
);
|
|
3672
3783
|
Textarea.displayName = "Textarea";
|
|
3673
|
-
var BasicTextarea =
|
|
3784
|
+
var BasicTextarea = React30.forwardRef(
|
|
3674
3785
|
({ className, autoGrow, minHeight, maxHeight, ...props }, forwarded) => {
|
|
3675
3786
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3676
3787
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3677
|
-
return /* @__PURE__ */ (0,
|
|
3788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3678
3789
|
"textarea",
|
|
3679
3790
|
{
|
|
3680
3791
|
ref: callback,
|
|
@@ -3692,7 +3803,7 @@ var BasicTextarea = React29.forwardRef(
|
|
|
3692
3803
|
}
|
|
3693
3804
|
);
|
|
3694
3805
|
BasicTextarea.displayName = "BasicTextarea";
|
|
3695
|
-
var TextareaWithPrefix =
|
|
3806
|
+
var TextareaWithPrefix = React30.forwardRef(
|
|
3696
3807
|
({
|
|
3697
3808
|
prefix,
|
|
3698
3809
|
className,
|
|
@@ -3704,13 +3815,13 @@ var TextareaWithPrefix = React29.forwardRef(
|
|
|
3704
3815
|
}, forwarded) => {
|
|
3705
3816
|
const { ref, callback } = useMergedTextareaRef(forwarded);
|
|
3706
3817
|
useAutoGrow(ref, props.value, autoGrow, minHeight, maxHeight);
|
|
3707
|
-
return /* @__PURE__ */ (0,
|
|
3818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3708
3819
|
"div",
|
|
3709
3820
|
{
|
|
3710
3821
|
className: cn("relative", getStretchClasses(className), wrapperClassName),
|
|
3711
3822
|
children: [
|
|
3712
|
-
prefix ? /* @__PURE__ */ (0,
|
|
3713
|
-
/* @__PURE__ */ (0,
|
|
3823
|
+
prefix ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "pointer-events-none absolute left-3 top-3 z-10 text-muted-foreground", children: prefix }) : null,
|
|
3824
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3714
3825
|
"textarea",
|
|
3715
3826
|
{
|
|
3716
3827
|
ref: callback,
|
|
@@ -3789,14 +3900,14 @@ function useScrollFade() {
|
|
|
3789
3900
|
|
|
3790
3901
|
// src/hover-card.tsx
|
|
3791
3902
|
var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
|
|
3792
|
-
var
|
|
3793
|
-
var
|
|
3903
|
+
var React31 = __toESM(require("react"), 1);
|
|
3904
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3794
3905
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3795
3906
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3796
|
-
var HoverCardContent =
|
|
3907
|
+
var HoverCardContent = React31.forwardRef(
|
|
3797
3908
|
({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3798
3909
|
const resolved = usePortalContainer(container);
|
|
3799
|
-
return /* @__PURE__ */ (0,
|
|
3910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3800
3911
|
HoverCardPrimitive.Content,
|
|
3801
3912
|
{
|
|
3802
3913
|
ref,
|
|
@@ -3817,9 +3928,9 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
|
3817
3928
|
|
|
3818
3929
|
// src/radio-group.tsx
|
|
3819
3930
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
3820
|
-
var
|
|
3821
|
-
var
|
|
3822
|
-
var RadioGroupSizeContext =
|
|
3931
|
+
var React32 = __toESM(require("react"), 1);
|
|
3932
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3933
|
+
var RadioGroupSizeContext = React32.createContext("md");
|
|
3823
3934
|
var CONTROL_CLASSES = {
|
|
3824
3935
|
sm: "h-3.5 w-3.5",
|
|
3825
3936
|
md: "h-4 w-4",
|
|
@@ -3830,7 +3941,7 @@ var DOT_CLASSES = {
|
|
|
3830
3941
|
md: "h-1.5 w-1.5",
|
|
3831
3942
|
lg: "h-2 w-2"
|
|
3832
3943
|
};
|
|
3833
|
-
var RadioGroup3 =
|
|
3944
|
+
var RadioGroup3 = React32.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3834
3945
|
RadioGroupPrimitive.Root,
|
|
3835
3946
|
{
|
|
3836
3947
|
ref,
|
|
@@ -3840,10 +3951,10 @@ var RadioGroup3 = React31.forwardRef(({ className, size = "md", ...props }, ref)
|
|
|
3840
3951
|
}
|
|
3841
3952
|
) }));
|
|
3842
3953
|
RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
|
|
3843
|
-
var RadioGroupItem =
|
|
3844
|
-
const groupSize =
|
|
3954
|
+
var RadioGroupItem = React32.forwardRef(({ className, size, ...props }, ref) => {
|
|
3955
|
+
const groupSize = React32.useContext(RadioGroupSizeContext);
|
|
3845
3956
|
const resolved = size ?? groupSize;
|
|
3846
|
-
return /* @__PURE__ */ (0,
|
|
3957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3847
3958
|
RadioGroupPrimitive.Item,
|
|
3848
3959
|
{
|
|
3849
3960
|
ref,
|
|
@@ -3860,7 +3971,7 @@ var RadioGroupItem = React31.forwardRef(({ className, size, ...props }, ref) =>
|
|
|
3860
3971
|
className
|
|
3861
3972
|
),
|
|
3862
3973
|
...props,
|
|
3863
|
-
children: /* @__PURE__ */ (0,
|
|
3974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3864
3975
|
"div",
|
|
3865
3976
|
{
|
|
3866
3977
|
className: cn("rounded-full bg-primary-foreground", DOT_CLASSES[resolved])
|
|
@@ -3873,7 +3984,7 @@ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
|
3873
3984
|
|
|
3874
3985
|
// src/resizable.tsx
|
|
3875
3986
|
var import_react_resizable_panels = require("react-resizable-panels");
|
|
3876
|
-
var
|
|
3987
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3877
3988
|
var HANDLE_SIZES = {
|
|
3878
3989
|
xs: "w-0.5 [&[aria-orientation=horizontal]]:h-0.5 [&[aria-orientation=horizontal]]:w-full",
|
|
3879
3990
|
sm: "w-1 [&[aria-orientation=horizontal]]:h-1 [&[aria-orientation=horizontal]]:w-full",
|
|
@@ -3887,7 +3998,7 @@ var HANDLE_SIZES = {
|
|
|
3887
3998
|
var ResizablePanelGroup = ({
|
|
3888
3999
|
className,
|
|
3889
4000
|
...props
|
|
3890
|
-
}) => /* @__PURE__ */ (0,
|
|
4001
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3891
4002
|
import_react_resizable_panels.Group,
|
|
3892
4003
|
{
|
|
3893
4004
|
"data-slot": "resizable-group",
|
|
@@ -3902,7 +4013,7 @@ var ResizableHandle = ({
|
|
|
3902
4013
|
size = "xs",
|
|
3903
4014
|
className,
|
|
3904
4015
|
...props
|
|
3905
|
-
}) => /* @__PURE__ */ (0,
|
|
4016
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3906
4017
|
import_react_resizable_panels.Separator,
|
|
3907
4018
|
{
|
|
3908
4019
|
"data-slot": "resizable-handle",
|
|
@@ -3922,15 +4033,15 @@ var ResizableHandle = ({
|
|
|
3922
4033
|
className
|
|
3923
4034
|
),
|
|
3924
4035
|
...props,
|
|
3925
|
-
children: withHandle ? /* @__PURE__ */ (0,
|
|
4036
|
+
children: withHandle ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "z-10 flex h-8 w-4 items-center justify-center rounded-sm border bg-border group-aria-[orientation=horizontal]/handle:h-4 group-aria-[orientation=horizontal]/handle:w-8", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DragHandleDots2Icon, { className: "h-2.5 w-2.5 group-aria-[orientation=horizontal]/handle:rotate-90" }) }) : null
|
|
3926
4037
|
}
|
|
3927
4038
|
);
|
|
3928
4039
|
ResizableHandle.displayName = "ResizableHandle";
|
|
3929
4040
|
|
|
3930
4041
|
// src/slider.tsx
|
|
3931
4042
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
3932
|
-
var
|
|
3933
|
-
var
|
|
4043
|
+
var React33 = __toESM(require("react"), 1);
|
|
4044
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3934
4045
|
var TRACK_CLASSES = {
|
|
3935
4046
|
sm: "h-1",
|
|
3936
4047
|
md: "h-1.5",
|
|
@@ -3941,12 +4052,12 @@ var THUMB_CLASSES = {
|
|
|
3941
4052
|
md: "h-4 w-4",
|
|
3942
4053
|
lg: "h-5 w-5"
|
|
3943
4054
|
};
|
|
3944
|
-
var Slider =
|
|
4055
|
+
var Slider = React33.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
3945
4056
|
const thumbCount = Math.max(
|
|
3946
4057
|
1,
|
|
3947
4058
|
(props.value ?? props.defaultValue ?? [0]).length
|
|
3948
4059
|
);
|
|
3949
|
-
return /* @__PURE__ */ (0,
|
|
4060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3950
4061
|
SliderPrimitive.Root,
|
|
3951
4062
|
{
|
|
3952
4063
|
ref,
|
|
@@ -3958,7 +4069,7 @@ var Slider = React32.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3958
4069
|
),
|
|
3959
4070
|
...props,
|
|
3960
4071
|
children: [
|
|
3961
|
-
/* @__PURE__ */ (0,
|
|
4072
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3962
4073
|
SliderPrimitive.Track,
|
|
3963
4074
|
{
|
|
3964
4075
|
"data-slot": "slider-track",
|
|
@@ -3967,7 +4078,7 @@ var Slider = React32.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3967
4078
|
TRACK_CLASSES[size],
|
|
3968
4079
|
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
3969
4080
|
),
|
|
3970
|
-
children: /* @__PURE__ */ (0,
|
|
4081
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3971
4082
|
SliderPrimitive.Range,
|
|
3972
4083
|
{
|
|
3973
4084
|
"data-slot": "slider-range",
|
|
@@ -3976,7 +4087,7 @@ var Slider = React32.forwardRef(({ className, size = "md", ...props }, ref) => {
|
|
|
3976
4087
|
)
|
|
3977
4088
|
}
|
|
3978
4089
|
),
|
|
3979
|
-
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0,
|
|
4090
|
+
Array.from({ length: thumbCount }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3980
4091
|
SliderPrimitive.Thumb,
|
|
3981
4092
|
{
|
|
3982
4093
|
"data-slot": "slider-thumb",
|
|
@@ -4003,8 +4114,8 @@ Slider.displayName = SliderPrimitive.Root.displayName;
|
|
|
4003
4114
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
4004
4115
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
4005
4116
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
4006
|
-
var
|
|
4007
|
-
var
|
|
4117
|
+
var React34 = __toESM(require("react"), 1);
|
|
4118
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
4008
4119
|
var toggleVariants = (0, import_class_variance_authority6.cva)(
|
|
4009
4120
|
"inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
4010
4121
|
{
|
|
@@ -4025,7 +4136,7 @@ var toggleVariants = (0, import_class_variance_authority6.cva)(
|
|
|
4025
4136
|
}
|
|
4026
4137
|
}
|
|
4027
4138
|
);
|
|
4028
|
-
var Toggle =
|
|
4139
|
+
var Toggle = React34.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4029
4140
|
TogglePrimitive.Root,
|
|
4030
4141
|
{
|
|
4031
4142
|
ref,
|
|
@@ -4035,21 +4146,21 @@ var Toggle = React33.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
4035
4146
|
}
|
|
4036
4147
|
));
|
|
4037
4148
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
4038
|
-
var ToggleGroupContext =
|
|
4039
|
-
var ToggleGroup =
|
|
4149
|
+
var ToggleGroupContext = React34.createContext({ size: "default", variant: "default" });
|
|
4150
|
+
var ToggleGroup = React34.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4040
4151
|
ToggleGroupPrimitive.Root,
|
|
4041
4152
|
{
|
|
4042
4153
|
ref,
|
|
4043
4154
|
"data-slot": "toggle-group",
|
|
4044
4155
|
className: cn("flex items-center justify-center gap-1", className),
|
|
4045
4156
|
...props,
|
|
4046
|
-
children: /* @__PURE__ */ (0,
|
|
4157
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
4047
4158
|
}
|
|
4048
4159
|
));
|
|
4049
4160
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
4050
|
-
var ToggleGroupItem =
|
|
4051
|
-
const context =
|
|
4052
|
-
return /* @__PURE__ */ (0,
|
|
4161
|
+
var ToggleGroupItem = React34.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
4162
|
+
const context = React34.useContext(ToggleGroupContext);
|
|
4163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4053
4164
|
ToggleGroupPrimitive.Item,
|
|
4054
4165
|
{
|
|
4055
4166
|
ref,
|
|
@@ -4070,14 +4181,14 @@ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
|
4070
4181
|
|
|
4071
4182
|
// src/tooltip.tsx
|
|
4072
4183
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4073
|
-
var
|
|
4074
|
-
var
|
|
4184
|
+
var React35 = __toESM(require("react"), 1);
|
|
4185
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4075
4186
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4076
4187
|
var Tooltip = TooltipPrimitive.Root;
|
|
4077
4188
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4078
|
-
var TooltipContent =
|
|
4189
|
+
var TooltipContent = React35.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
4079
4190
|
const resolved = usePortalContainer(container);
|
|
4080
|
-
return /* @__PURE__ */ (0,
|
|
4191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4081
4192
|
TooltipPrimitive.Content,
|
|
4082
4193
|
{
|
|
4083
4194
|
ref,
|