@ship-it-ui/ui 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -32,6 +32,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
32
32
  // src/index.ts
33
33
  var index_exports = {};
34
34
  __export(index_exports, {
35
+ ActivityTimeline: () => ActivityTimeline,
35
36
  Alert: () => Alert,
36
37
  AlertDialog: () => AlertDialog,
37
38
  AlertDialogAction: () => AlertDialogAction,
@@ -79,10 +80,13 @@ __export(index_exports, {
79
80
  DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
80
81
  DropdownMenuRoot: () => DropdownMenuRoot,
81
82
  DropdownMenuTrigger: () => DropdownMenuTrigger,
83
+ Dropzone: () => Dropzone,
82
84
  EmptyState: () => EmptyState,
83
85
  FAB: () => FAB,
84
86
  Field: () => Field,
85
87
  FileChip: () => FileChip,
88
+ FilterPanel: () => FilterPanel,
89
+ HealthScore: () => HealthScore,
86
90
  HoverCard: () => HoverCard,
87
91
  HoverCardContent: () => HoverCardContent,
88
92
  HoverCardPortal: () => HoverCardPortal,
@@ -100,9 +104,11 @@ __export(index_exports, {
100
104
  MenubarMenu: () => MenubarMenu,
101
105
  MenubarSeparator: () => MenubarSeparator,
102
106
  MenubarTrigger: () => MenubarTrigger,
107
+ NavBar: () => NavBar,
103
108
  NavItem: () => NavItem,
104
109
  NavSection: () => NavSection,
105
110
  OTP: () => OTP,
111
+ OnboardingChecklist: () => OnboardingChecklist,
106
112
  Pagination: () => Pagination,
107
113
  Popover: () => Popover,
108
114
  PopoverAnchor: () => PopoverAnchor,
@@ -116,6 +122,7 @@ __export(index_exports, {
116
122
  RadialProgress: () => RadialProgress,
117
123
  Radio: () => Radio,
118
124
  RadioGroup: () => RadioGroup,
125
+ ScrollArea: () => ScrollArea,
119
126
  SearchInput: () => SearchInput,
120
127
  Select: () => Select,
121
128
  SelectContent: () => SelectContent,
@@ -156,11 +163,13 @@ __export(index_exports, {
156
163
  TooltipTrigger: () => TooltipTrigger,
157
164
  Topbar: () => Topbar,
158
165
  Tree: () => Tree,
166
+ WizardDialog: () => WizardDialog,
159
167
  badgeStyles: () => badgeStyles,
160
168
  buttonStyles: () => buttonStyles,
161
169
  cardStyles: () => cardStyles,
162
170
  cn: () => cn,
163
171
  filterCommandItems: () => filterCommandItems,
172
+ formatRelative: () => formatRelative,
164
173
  iconButtonStyles: () => iconButtonStyles,
165
174
  useControllableState: () => useControllableState,
166
175
  useDisclosure: () => useDisclosure,
@@ -1007,6 +1016,7 @@ var Slider = (0, import_react20.forwardRef)(function Slider2({
1007
1016
  className,
1008
1017
  value,
1009
1018
  defaultValue,
1019
+ onValueChange,
1010
1020
  thumbLabels,
1011
1021
  "aria-label": ariaLabel,
1012
1022
  "aria-labelledby": ariaLabelledBy,
@@ -1014,7 +1024,20 @@ var Slider = (0, import_react20.forwardRef)(function Slider2({
1014
1024
  }, ref) {
1015
1025
  const arrValue = Array.isArray(value) ? value : value !== void 0 ? [value] : void 0;
1016
1026
  const arrDefault = Array.isArray(defaultValue) ? defaultValue : defaultValue !== void 0 ? [defaultValue] : void 0;
1017
- const display = arrValue?.[0] ?? arrDefault?.[0] ?? props.min ?? 0;
1027
+ const isControlled = arrValue !== void 0;
1028
+ const [uncontrolledValue, setUncontrolledValue] = (0, import_react20.useState)(arrDefault);
1029
+ const currentValue = isControlled ? arrValue : uncontrolledValue;
1030
+ const wasScalar = !Array.isArray(value ?? defaultValue) && (value ?? defaultValue) !== void 0;
1031
+ const handleValueChange = (0, import_react20.useCallback)(
1032
+ (next) => {
1033
+ if (!isControlled) setUncontrolledValue(next);
1034
+ if (onValueChange) {
1035
+ onValueChange(wasScalar ? next[0] ?? 0 : next);
1036
+ }
1037
+ },
1038
+ [isControlled, onValueChange, wasScalar]
1039
+ );
1040
+ const display = currentValue?.[0] ?? props.min ?? 0;
1018
1041
  const thumbCount = (arrValue ?? arrDefault)?.length ?? 1;
1019
1042
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1020
1043
  "span",
@@ -1028,6 +1051,7 @@ var Slider = (0, import_react20.forwardRef)(function Slider2({
1028
1051
  {
1029
1052
  value: arrValue,
1030
1053
  defaultValue: arrDefault,
1054
+ onValueChange: handleValueChange,
1031
1055
  className: "relative flex h-4 flex-1 touch-none items-center select-none",
1032
1056
  ...props,
1033
1057
  children: [
@@ -1556,10 +1580,71 @@ var Kbd = (0, import_react30.forwardRef)(function Kbd2({ className, children, ..
1556
1580
  });
1557
1581
  Kbd.displayName = "Kbd";
1558
1582
 
1559
- // src/components/Skeleton/Skeleton.tsx
1560
- var import_class_variance_authority7 = require("class-variance-authority");
1583
+ // src/components/ScrollArea/ScrollArea.tsx
1584
+ var RadixScrollArea = __toESM(require("@radix-ui/react-scroll-area"), 1);
1561
1585
  var import_react31 = require("react");
1562
1586
  var import_jsx_runtime24 = require("react/jsx-runtime");
1587
+ var scrollbarBase = "flex touch-none select-none p-[2px] transition-colors duration-(--duration-micro)";
1588
+ var thumbBase = 'relative flex-1 rounded-full bg-text-muted/40 hover:bg-text-muted/60 before:absolute before:inset-1/2 before:size-full before:min-h-[44px] before:min-w-[44px] before:-translate-x-1/2 before:-translate-y-1/2 before:content-[""]';
1589
+ var ScrollArea = (0, import_react31.forwardRef)(function ScrollArea2({
1590
+ type = "hover",
1591
+ orientation = "vertical",
1592
+ scrollHideDelay = 600,
1593
+ className,
1594
+ viewportClassName,
1595
+ viewportRef,
1596
+ children,
1597
+ ...props
1598
+ }, ref) {
1599
+ const showVertical = orientation === "vertical" || orientation === "both";
1600
+ const showHorizontal = orientation === "horizontal" || orientation === "both";
1601
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1602
+ RadixScrollArea.Root,
1603
+ {
1604
+ ref,
1605
+ type,
1606
+ scrollHideDelay,
1607
+ className: cn("relative overflow-hidden", className),
1608
+ ...props,
1609
+ children: [
1610
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1611
+ RadixScrollArea.Viewport,
1612
+ {
1613
+ ref: viewportRef,
1614
+ className: cn("h-full w-full rounded-[inherit]", viewportClassName),
1615
+ children
1616
+ }
1617
+ ),
1618
+ showVertical && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1619
+ RadixScrollArea.Scrollbar,
1620
+ {
1621
+ orientation: "vertical",
1622
+ className: cn(scrollbarBase, "bg-panel-2/40 hover:bg-panel-2/80 h-full w-[10px]"),
1623
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadixScrollArea.Thumb, { className: thumbBase })
1624
+ }
1625
+ ),
1626
+ showHorizontal && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1627
+ RadixScrollArea.Scrollbar,
1628
+ {
1629
+ orientation: "horizontal",
1630
+ className: cn(
1631
+ scrollbarBase,
1632
+ "bg-panel-2/40 hover:bg-panel-2/80 h-[10px] w-full flex-col"
1633
+ ),
1634
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadixScrollArea.Thumb, { className: thumbBase })
1635
+ }
1636
+ ),
1637
+ orientation === "both" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadixScrollArea.Corner, { className: "bg-panel-2/60" })
1638
+ ]
1639
+ }
1640
+ );
1641
+ });
1642
+ ScrollArea.displayName = "ScrollArea";
1643
+
1644
+ // src/components/Skeleton/Skeleton.tsx
1645
+ var import_class_variance_authority7 = require("class-variance-authority");
1646
+ var import_react32 = require("react");
1647
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1563
1648
  var skeletonStyles = (0, import_class_variance_authority7.cva)("block bg-panel-2 animate-[ship-skeleton_1.4s_infinite]", {
1564
1649
  variants: {
1565
1650
  shape: {
@@ -1571,11 +1656,11 @@ var skeletonStyles = (0, import_class_variance_authority7.cva)("block bg-panel-2
1571
1656
  defaultVariants: { shape: "line" }
1572
1657
  });
1573
1658
  var defaultHeight = { line: 14, block: 80, circle: 40 };
1574
- var Skeleton = (0, import_react31.forwardRef)(function Skeleton2({ shape = "line", width = "100%", height, standalone = false, className, style, ...props }, ref) {
1659
+ var Skeleton = (0, import_react32.forwardRef)(function Skeleton2({ shape = "line", width = "100%", height, standalone = false, className, style, ...props }, ref) {
1575
1660
  const h = height ?? defaultHeight[shape];
1576
1661
  const w = shape === "circle" ? h : width;
1577
1662
  const a11yProps = standalone ? { role: "status", "aria-busy": true, "aria-label": "Loading" } : { "aria-hidden": true };
1578
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1663
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1579
1664
  "div",
1580
1665
  {
1581
1666
  ref,
@@ -1587,11 +1672,11 @@ var Skeleton = (0, import_react31.forwardRef)(function Skeleton2({ shape = "line
1587
1672
  );
1588
1673
  });
1589
1674
  Skeleton.displayName = "Skeleton";
1590
- var SkeletonGroup = (0, import_react31.forwardRef)(function SkeletonGroup2({ label = "Loading", loading = true, className, children, ...props }, ref) {
1675
+ var SkeletonGroup = (0, import_react32.forwardRef)(function SkeletonGroup2({ label = "Loading", loading = true, className, children, ...props }, ref) {
1591
1676
  if (!loading) {
1592
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, className, ...props, children });
1677
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref, className, ...props, children });
1593
1678
  }
1594
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1679
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1595
1680
  "div",
1596
1681
  {
1597
1682
  ref,
@@ -1607,10 +1692,10 @@ var SkeletonGroup = (0, import_react31.forwardRef)(function SkeletonGroup2({ lab
1607
1692
  SkeletonGroup.displayName = "SkeletonGroup";
1608
1693
 
1609
1694
  // src/components/Tag/Tag.tsx
1610
- var import_react32 = require("react");
1611
- var import_jsx_runtime25 = require("react/jsx-runtime");
1612
- var Tag = (0, import_react32.forwardRef)(function Tag2({ onRemove, icon, size = 22, className, children, ...props }, ref) {
1613
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
1695
+ var import_react33 = require("react");
1696
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1697
+ var Tag = (0, import_react33.forwardRef)(function Tag2({ onRemove, icon, size = 22, className, children, ...props }, ref) {
1698
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1614
1699
  "span",
1615
1700
  {
1616
1701
  ref,
@@ -1622,9 +1707,9 @@ var Tag = (0, import_react32.forwardRef)(function Tag2({ onRemove, icon, size =
1622
1707
  style: { height: size },
1623
1708
  ...props,
1624
1709
  children: [
1625
- icon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-text-dim inline-flex", children: icon }),
1710
+ icon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-text-dim inline-flex", children: icon }),
1626
1711
  children,
1627
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1712
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1628
1713
  "button",
1629
1714
  {
1630
1715
  type: "button",
@@ -1642,14 +1727,14 @@ Tag.displayName = "Tag";
1642
1727
 
1643
1728
  // src/components/ContextMenu/ContextMenu.tsx
1644
1729
  var RadixContext = __toESM(require("@radix-ui/react-context-menu"), 1);
1645
- var import_react33 = require("react");
1646
- var import_jsx_runtime26 = require("react/jsx-runtime");
1730
+ var import_react34 = require("react");
1731
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1647
1732
  var ContextMenuRoot = RadixContext.Root;
1648
1733
  var ContextMenuTrigger = RadixContext.Trigger;
1649
1734
  var ContextMenuPortal = RadixContext.Portal;
1650
- var ContextMenuContent = (0, import_react33.forwardRef)(
1735
+ var ContextMenuContent = (0, import_react34.forwardRef)(
1651
1736
  function ContextMenuContent2({ className, ...props }, ref) {
1652
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadixContext.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1737
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixContext.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1653
1738
  RadixContext.Content,
1654
1739
  {
1655
1740
  ref,
@@ -1669,26 +1754,26 @@ var itemBase = cn(
1669
1754
  "data-[highlighted]:bg-panel-2",
1670
1755
  "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed"
1671
1756
  );
1672
- var ContextMenuItem = (0, import_react33.forwardRef)(
1757
+ var ContextMenuItem = (0, import_react34.forwardRef)(
1673
1758
  function ContextMenuItem2({ icon, trailing, destructive, className, children, ...props }, ref) {
1674
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1759
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1675
1760
  RadixContext.Item,
1676
1761
  {
1677
1762
  ref,
1678
1763
  className: cn(itemBase, destructive ? "text-err" : "text-text", className),
1679
1764
  ...props,
1680
1765
  children: [
1681
- icon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "w-[14px] text-[12px] opacity-70", children: icon }),
1682
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "flex-1", children }),
1683
- trailing && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
1766
+ icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "w-[14px] text-[12px] opacity-70", children: icon }),
1767
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "flex-1", children }),
1768
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
1684
1769
  ]
1685
1770
  }
1686
1771
  );
1687
1772
  }
1688
1773
  );
1689
1774
  ContextMenuItem.displayName = "ContextMenuItem";
1690
- var ContextMenuSeparator = (0, import_react33.forwardRef)(function ContextMenuSeparator2({ className, ...props }, ref) {
1691
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1775
+ var ContextMenuSeparator = (0, import_react34.forwardRef)(function ContextMenuSeparator2({ className, ...props }, ref) {
1776
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1692
1777
  RadixContext.Separator,
1693
1778
  {
1694
1779
  ref,
@@ -1702,15 +1787,15 @@ var ContextMenu = RadixContext.Root;
1702
1787
 
1703
1788
  // src/components/Dialog/Dialog.tsx
1704
1789
  var RadixDialog = __toESM(require("@radix-ui/react-dialog"), 1);
1705
- var import_react34 = require("react");
1706
- var import_jsx_runtime27 = require("react/jsx-runtime");
1790
+ var import_react35 = require("react");
1791
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1707
1792
  var DialogRoot = RadixDialog.Root;
1708
1793
  var DialogTrigger = RadixDialog.Trigger;
1709
1794
  var DialogClose = RadixDialog.Close;
1710
1795
  var DialogPortal = RadixDialog.Portal;
1711
- var DialogOverlay = (0, import_react34.forwardRef)(
1796
+ var DialogOverlay = (0, import_react35.forwardRef)(
1712
1797
  function DialogOverlay2({ className, ...props }, ref) {
1713
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1798
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1714
1799
  RadixDialog.Overlay,
1715
1800
  {
1716
1801
  ref,
@@ -1725,10 +1810,10 @@ var DialogOverlay = (0, import_react34.forwardRef)(
1725
1810
  }
1726
1811
  );
1727
1812
  DialogOverlay.displayName = "DialogOverlay";
1728
- var DialogContent = (0, import_react34.forwardRef)(function DialogContent2({ className, width = 460, style, children, ...props }, ref) {
1729
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DialogPortal, { children: [
1730
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogOverlay, {}),
1731
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1813
+ var DialogContent = (0, import_react35.forwardRef)(function DialogContent2({ className, width = 460, style, children, ...props }, ref) {
1814
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DialogPortal, { children: [
1815
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogOverlay, {}),
1816
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1732
1817
  RadixDialog.Content,
1733
1818
  {
1734
1819
  ref,
@@ -1748,31 +1833,31 @@ var DialogContent = (0, import_react34.forwardRef)(function DialogContent2({ cla
1748
1833
  });
1749
1834
  DialogContent.displayName = "DialogContent";
1750
1835
  function Dialog({ title, description, footer, width, children, ...rootProps }) {
1751
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DialogContent, { width, children: [
1752
- title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1836
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DialogContent, { width, children: [
1837
+ title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1753
1838
  RadixDialog.Title,
1754
1839
  {
1755
1840
  className: cn("text-[16px] font-medium", description ? "mb-[6px]" : "mb-4"),
1756
1841
  children: title
1757
1842
  }
1758
1843
  ),
1759
- description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(RadixDialog.Description, { className: "text-text-muted mb-[18px] text-[13px] leading-[1.55]", children: description }),
1844
+ description && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadixDialog.Description, { className: "text-text-muted mb-[18px] text-[13px] leading-[1.55]", children: description }),
1760
1845
  children,
1761
- footer && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-5 flex justify-end gap-2", children: footer })
1846
+ footer && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mt-5 flex justify-end gap-2", children: footer })
1762
1847
  ] }) });
1763
1848
  }
1764
1849
 
1765
1850
  // src/components/Dialog/Drawer.tsx
1766
1851
  var RadixDialog2 = __toESM(require("@radix-ui/react-dialog"), 1);
1767
- var import_react35 = require("react");
1768
- var import_jsx_runtime28 = require("react/jsx-runtime");
1852
+ var import_react36 = require("react");
1853
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1769
1854
  var sideClasses = {
1770
1855
  left: "left-0 border-r border-border-strong data-[state=open]:animate-[ship-slide-in-left_220ms_var(--easing-out)]",
1771
1856
  right: "right-0 border-l border-border-strong data-[state=open]:animate-[ship-slide-in-right_220ms_var(--easing-out)]"
1772
1857
  };
1773
- var DrawerHeader = ({ title, onClose }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "border-border flex items-center justify-between border-b p-[16px] px-5", children: [
1774
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadixDialog2.Title, { className: "text-[14px] font-medium", children: title }),
1775
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1858
+ var DrawerHeader = ({ title, onClose }) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "border-border flex items-center justify-between border-b p-[16px] px-5", children: [
1859
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixDialog2.Title, { className: "text-[14px] font-medium", children: title }),
1860
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1776
1861
  RadixDialog2.Close,
1777
1862
  {
1778
1863
  onClick: onClose,
@@ -1782,10 +1867,10 @@ var DrawerHeader = ({ title, onClose }) => /* @__PURE__ */ (0, import_jsx_runtim
1782
1867
  }
1783
1868
  )
1784
1869
  ] });
1785
- var Drawer = (0, import_react35.forwardRef)(function Drawer2({ side = "right", title, width = 420, children, ...rootProps }, ref) {
1786
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DialogPortal, { children: [
1787
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogOverlay, {}),
1788
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1870
+ var Drawer = (0, import_react36.forwardRef)(function Drawer2({ side = "right", title, width = 420, children, ...rootProps }, ref) {
1871
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DialogPortal, { children: [
1872
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogOverlay, {}),
1873
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1789
1874
  RadixDialog2.Content,
1790
1875
  {
1791
1876
  ref,
@@ -1796,8 +1881,8 @@ var Drawer = (0, import_react35.forwardRef)(function Drawer2({ side = "right", t
1796
1881
  ),
1797
1882
  style: { width },
1798
1883
  children: [
1799
- title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DrawerHeader, { title }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RadixDialog2.Title, { className: "sr-only", children: "Drawer" }),
1800
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex-1 overflow-auto p-5", children })
1884
+ title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DrawerHeader, { title }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixDialog2.Title, { className: "sr-only", children: "Drawer" }),
1885
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1 overflow-auto p-5", children })
1801
1886
  ]
1802
1887
  }
1803
1888
  )
@@ -1807,12 +1892,12 @@ Drawer.displayName = "Drawer";
1807
1892
 
1808
1893
  // src/components/Dialog/Sheet.tsx
1809
1894
  var RadixDialog3 = __toESM(require("@radix-ui/react-dialog"), 1);
1810
- var import_react36 = require("react");
1811
- var import_jsx_runtime29 = require("react/jsx-runtime");
1812
- var Sheet = (0, import_react36.forwardRef)(function Sheet2({ title, width = "min(640px, 90vw)", children, ...rootProps }, ref) {
1813
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(DialogPortal, { children: [
1814
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DialogOverlay, {}),
1815
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1895
+ var import_react37 = require("react");
1896
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1897
+ var Sheet = (0, import_react37.forwardRef)(function Sheet2({ title, width = "min(640px, 90vw)", children, ...rootProps }, ref) {
1898
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(DialogPortal, { children: [
1899
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DialogOverlay, {}),
1900
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1816
1901
  RadixDialog3.Content,
1817
1902
  {
1818
1903
  ref,
@@ -1824,7 +1909,7 @@ var Sheet = (0, import_react36.forwardRef)(function Sheet2({ title, width = "min
1824
1909
  ),
1825
1910
  style: { width },
1826
1911
  children: [
1827
- title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixDialog3.Title, { className: "mb-1 text-[15px] font-medium", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadixDialog3.Title, { className: "sr-only", children: "Sheet" }),
1912
+ title ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadixDialog3.Title, { className: "mb-1 text-[15px] font-medium", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadixDialog3.Title, { className: "sr-only", children: "Sheet" }),
1828
1913
  children
1829
1914
  ]
1830
1915
  }
@@ -1835,15 +1920,15 @@ Sheet.displayName = "Sheet";
1835
1920
 
1836
1921
  // src/components/Dialog/AlertDialog.tsx
1837
1922
  var RadixAlert = __toESM(require("@radix-ui/react-alert-dialog"), 1);
1838
- var import_react37 = require("react");
1839
- var import_jsx_runtime30 = require("react/jsx-runtime");
1923
+ var import_react38 = require("react");
1924
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1840
1925
  var AlertDialogRoot = RadixAlert.Root;
1841
1926
  var AlertDialogTrigger = RadixAlert.Trigger;
1842
1927
  var AlertDialogAction = RadixAlert.Action;
1843
1928
  var AlertDialogCancel = RadixAlert.Cancel;
1844
- var AlertDialog = (0, import_react37.forwardRef)(function AlertDialog2({ title, description, footer, width = 460, children, ...rootProps }, ref) {
1845
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AlertDialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(RadixAlert.Portal, { children: [
1846
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1929
+ var AlertDialog = (0, import_react38.forwardRef)(function AlertDialog2({ title, description, footer, width = 460, children, ...rootProps }, ref) {
1930
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(AlertDialogRoot, { ...rootProps, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(RadixAlert.Portal, { children: [
1931
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1847
1932
  RadixAlert.Overlay,
1848
1933
  {
1849
1934
  className: cn(
@@ -1852,7 +1937,7 @@ var AlertDialog = (0, import_react37.forwardRef)(function AlertDialog2({ title,
1852
1937
  )
1853
1938
  }
1854
1939
  ),
1855
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1940
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1856
1941
  RadixAlert.Content,
1857
1942
  {
1858
1943
  ref,
@@ -1863,16 +1948,16 @@ var AlertDialog = (0, import_react37.forwardRef)(function AlertDialog2({ title,
1863
1948
  "data-[state=open]:animate-[ship-dialog-in_180ms_var(--easing-out)]"
1864
1949
  ),
1865
1950
  children: [
1866
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1951
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1867
1952
  RadixAlert.Title,
1868
1953
  {
1869
1954
  className: cn("text-[16px] font-medium", description ? "mb-[6px]" : "mb-4"),
1870
1955
  children: title
1871
1956
  }
1872
1957
  ),
1873
- description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RadixAlert.Description, { className: "text-text-muted mb-[18px] text-[13px] leading-[1.55]", children: description }),
1958
+ description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixAlert.Description, { className: "text-text-muted mb-[18px] text-[13px] leading-[1.55]", children: description }),
1874
1959
  children,
1875
- footer && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "mt-5 flex justify-end gap-2", children: footer })
1960
+ footer && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mt-5 flex justify-end gap-2", children: footer })
1876
1961
  ]
1877
1962
  }
1878
1963
  )
@@ -1882,17 +1967,17 @@ AlertDialog.displayName = "AlertDialog";
1882
1967
 
1883
1968
  // src/components/DropdownMenu/DropdownMenu.tsx
1884
1969
  var RadixMenu = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
1885
- var import_react38 = require("react");
1886
- var import_jsx_runtime31 = require("react/jsx-runtime");
1970
+ var import_react39 = require("react");
1971
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1887
1972
  var DropdownMenuRoot = RadixMenu.Root;
1888
1973
  var DropdownMenuTrigger = RadixMenu.Trigger;
1889
1974
  var DropdownMenuPortal = RadixMenu.Portal;
1890
1975
  var DropdownMenuGroup = RadixMenu.Group;
1891
1976
  var DropdownMenuLabel = RadixMenu.Label;
1892
1977
  var DropdownMenuRadioGroup = RadixMenu.RadioGroup;
1893
- var DropdownMenuContent = (0, import_react38.forwardRef)(
1978
+ var DropdownMenuContent = (0, import_react39.forwardRef)(
1894
1979
  function DropdownMenuContent2({ className, sideOffset = 6, align = "start", ...props }, ref) {
1895
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1980
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1896
1981
  RadixMenu.Content,
1897
1982
  {
1898
1983
  ref,
@@ -1914,32 +1999,32 @@ var itemBase2 = cn(
1914
1999
  "data-[highlighted]:bg-panel-2",
1915
2000
  "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed"
1916
2001
  );
1917
- var MenuItem = (0, import_react38.forwardRef)(function MenuItem2({ icon, trailing, destructive, className, children, ...props }, ref) {
1918
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2002
+ var MenuItem = (0, import_react39.forwardRef)(function MenuItem2({ icon, trailing, destructive, className, children, ...props }, ref) {
2003
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1919
2004
  RadixMenu.Item,
1920
2005
  {
1921
2006
  ref,
1922
2007
  className: cn(itemBase2, destructive ? "text-err" : "text-text", className),
1923
2008
  ...props,
1924
2009
  children: [
1925
- icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "w-[14px] text-[12px] opacity-70", children: icon }),
1926
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "flex-1", children }),
1927
- trailing && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
2010
+ icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "w-[14px] text-[12px] opacity-70", children: icon }),
2011
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "flex-1", children }),
2012
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
1928
2013
  ]
1929
2014
  }
1930
2015
  );
1931
2016
  });
1932
2017
  MenuItem.displayName = "MenuItem";
1933
- var MenuCheckboxItem = (0, import_react38.forwardRef)(
2018
+ var MenuCheckboxItem = (0, import_react39.forwardRef)(
1934
2019
  function MenuCheckboxItem2({ className, children, ...props }, ref) {
1935
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2020
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1936
2021
  RadixMenu.CheckboxItem,
1937
2022
  {
1938
2023
  ref,
1939
2024
  className: cn(itemBase2, "text-text relative pl-[26px]", className),
1940
2025
  ...props,
1941
2026
  children: [
1942
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RadixMenu.ItemIndicator, { className: "text-accent absolute top-1/2 left-2 -translate-y-1/2 text-[10px]", children: "\u2713" }),
2027
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixMenu.ItemIndicator, { className: "text-accent absolute top-1/2 left-2 -translate-y-1/2 text-[10px]", children: "\u2713" }),
1943
2028
  children
1944
2029
  ]
1945
2030
  }
@@ -1947,9 +2032,9 @@ var MenuCheckboxItem = (0, import_react38.forwardRef)(
1947
2032
  }
1948
2033
  );
1949
2034
  MenuCheckboxItem.displayName = "MenuCheckboxItem";
1950
- var MenuSeparator = (0, import_react38.forwardRef)(
2035
+ var MenuSeparator = (0, import_react39.forwardRef)(
1951
2036
  function MenuSeparator2({ className, ...props }, ref) {
1952
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2037
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1953
2038
  RadixMenu.Separator,
1954
2039
  {
1955
2040
  ref,
@@ -1964,14 +2049,14 @@ var DropdownMenu = RadixMenu.Root;
1964
2049
 
1965
2050
  // src/components/HoverCard/HoverCard.tsx
1966
2051
  var RadixHoverCard = __toESM(require("@radix-ui/react-hover-card"), 1);
1967
- var import_react39 = require("react");
1968
- var import_jsx_runtime32 = require("react/jsx-runtime");
2052
+ var import_react40 = require("react");
2053
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1969
2054
  var HoverCardRoot = RadixHoverCard.Root;
1970
2055
  var HoverCardTrigger = RadixHoverCard.Trigger;
1971
2056
  var HoverCardPortal = RadixHoverCard.Portal;
1972
- var HoverCardContent = (0, import_react39.forwardRef)(
2057
+ var HoverCardContent = (0, import_react40.forwardRef)(
1973
2058
  function HoverCardContent2({ className, sideOffset = 4, ...props }, ref) {
1974
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixHoverCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2059
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixHoverCard.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1975
2060
  RadixHoverCard.Content,
1976
2061
  {
1977
2062
  ref,
@@ -1988,25 +2073,25 @@ var HoverCardContent = (0, import_react39.forwardRef)(
1988
2073
  );
1989
2074
  HoverCardContent.displayName = "HoverCardContent";
1990
2075
  function HoverCard({ trigger, content, ...rootProps }) {
1991
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(RadixHoverCard.Root, { openDelay: 200, closeDelay: 120, ...rootProps, children: [
1992
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RadixHoverCard.Trigger, { asChild: true, children: trigger }),
1993
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HoverCardContent, { children: content })
2076
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(RadixHoverCard.Root, { openDelay: 200, closeDelay: 120, ...rootProps, children: [
2077
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixHoverCard.Trigger, { asChild: true, children: trigger }),
2078
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(HoverCardContent, { children: content })
1994
2079
  ] });
1995
2080
  }
1996
2081
 
1997
2082
  // src/components/Popover/Popover.tsx
1998
2083
  var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
1999
- var import_react40 = require("react");
2000
- var import_jsx_runtime33 = require("react/jsx-runtime");
2084
+ var import_react41 = require("react");
2085
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2001
2086
  var PopoverRoot = RadixPopover.Root;
2002
2087
  var PopoverTrigger = RadixPopover.Trigger;
2003
2088
  var PopoverAnchor = RadixPopover.Anchor;
2004
2089
  var PopoverPortal = RadixPopover.Portal;
2005
2090
  var PopoverClose = RadixPopover.Close;
2006
2091
  var PopoverArrow = RadixPopover.Arrow;
2007
- var PopoverContent = (0, import_react40.forwardRef)(
2092
+ var PopoverContent = (0, import_react41.forwardRef)(
2008
2093
  function PopoverContent2({ className, align = "start", sideOffset = 6, ...props }, ref) {
2009
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2094
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2010
2095
  RadixPopover.Content,
2011
2096
  {
2012
2097
  ref,
@@ -2027,9 +2112,9 @@ var Popover = RadixPopover.Root;
2027
2112
 
2028
2113
  // src/components/Toast/Toast.tsx
2029
2114
  var RadixToast = __toESM(require("@radix-ui/react-toast"), 1);
2030
- var import_react41 = require("react");
2031
- var import_jsx_runtime34 = require("react/jsx-runtime");
2032
- var ToastContext = (0, import_react41.createContext)(null);
2115
+ var import_react42 = require("react");
2116
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2117
+ var ToastContext = (0, import_react42.createContext)(null);
2033
2118
  var variantIcon = {
2034
2119
  default: "\u25CF",
2035
2120
  info: "\u2139",
@@ -2054,8 +2139,8 @@ var variantBorderLeft = {
2054
2139
  var toastIdCounter = 0;
2055
2140
  var nextToastId = () => `toast-${++toastIdCounter}`;
2056
2141
  function ToastProvider({ children }) {
2057
- const [toasts, setToasts] = (0, import_react41.useState)([]);
2058
- const toast = (0, import_react41.useCallback)((t) => {
2142
+ const [toasts, setToasts] = (0, import_react42.useState)([]);
2143
+ const toast = (0, import_react42.useCallback)((t) => {
2059
2144
  const explicitId = t.id;
2060
2145
  const id = explicitId ?? nextToastId();
2061
2146
  const entry = { ...t, id };
@@ -2067,24 +2152,24 @@ function ToastProvider({ children }) {
2067
2152
  });
2068
2153
  return id;
2069
2154
  }, []);
2070
- const dismiss = (0, import_react41.useCallback)((id) => {
2155
+ const dismiss = (0, import_react42.useCallback)((id) => {
2071
2156
  setToasts((prev) => prev.filter((t) => t.id !== id));
2072
2157
  }, []);
2073
- const value = (0, import_react41.useMemo)(() => ({ toast, dismiss }), [toast, dismiss]);
2074
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToastContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(RadixToast.Provider, { swipeDirection: "right", children: [
2158
+ const value = (0, import_react42.useMemo)(() => ({ toast, dismiss }), [toast, dismiss]);
2159
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToastContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(RadixToast.Provider, { swipeDirection: "right", children: [
2075
2160
  children,
2076
- toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToastCard, { toast: t, onDismiss: () => dismiss(t.id) }, t.id)),
2077
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixToast.Viewport, { className: "z-toast fixed right-5 bottom-5 flex w-[380px] max-w-[calc(100vw-40px)] flex-col gap-2 outline-none" })
2161
+ toasts.map((t) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToastCard, { toast: t, onDismiss: () => dismiss(t.id) }, t.id)),
2162
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixToast.Viewport, { className: "z-toast fixed right-5 bottom-5 flex w-[380px] max-w-[calc(100vw-40px)] flex-col gap-2 outline-none" })
2078
2163
  ] }) });
2079
2164
  }
2080
2165
  function useToast() {
2081
- const ctx = (0, import_react41.useContext)(ToastContext);
2166
+ const ctx = (0, import_react42.useContext)(ToastContext);
2082
2167
  if (!ctx) throw new Error("useToast must be inside <ToastProvider>");
2083
2168
  return ctx;
2084
2169
  }
2085
- var ToastCard = (0, import_react41.forwardRef)(function ToastCard2({ toast, onDismiss }, ref) {
2170
+ var ToastCard = (0, import_react42.forwardRef)(function ToastCard2({ toast, onDismiss }, ref) {
2086
2171
  const variant = toast.variant ?? "default";
2087
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2172
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2088
2173
  RadixToast.Root,
2089
2174
  {
2090
2175
  ref,
@@ -2099,13 +2184,13 @@ var ToastCard = (0, import_react41.forwardRef)(function ToastCard2({ toast, onDi
2099
2184
  variantBorderLeft[variant]
2100
2185
  ),
2101
2186
  children: [
2102
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: cn("mt-px text-[14px] leading-none", variantTextColor[variant]), children: variantIcon[variant] }),
2103
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0 flex-1", children: [
2104
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixToast.Title, { className: "text-text text-[13px] font-medium", children: toast.title }),
2105
- toast.description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RadixToast.Description, { className: "text-text-muted mt-[2px] text-[12px] leading-[1.5]", children: toast.description }),
2106
- toast.action && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-2", children: toast.action })
2187
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn("mt-px text-[14px] leading-none", variantTextColor[variant]), children: variantIcon[variant] }),
2188
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0 flex-1", children: [
2189
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixToast.Title, { className: "text-text text-[13px] font-medium", children: toast.title }),
2190
+ toast.description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixToast.Description, { className: "text-text-muted mt-[2px] text-[12px] leading-[1.5]", children: toast.description }),
2191
+ toast.action && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-2", children: toast.action })
2107
2192
  ] }),
2108
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2193
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2109
2194
  RadixToast.Close,
2110
2195
  {
2111
2196
  "aria-label": "Dismiss",
@@ -2121,16 +2206,16 @@ ToastCard.displayName = "ToastCard";
2121
2206
 
2122
2207
  // src/components/Tooltip/Tooltip.tsx
2123
2208
  var RadixTooltip = __toESM(require("@radix-ui/react-tooltip"), 1);
2124
- var import_react42 = require("react");
2125
- var import_jsx_runtime35 = require("react/jsx-runtime");
2209
+ var import_react43 = require("react");
2210
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2126
2211
  var TooltipProvider = RadixTooltip.Provider;
2127
2212
  var TooltipRoot = RadixTooltip.Root;
2128
2213
  var TooltipTrigger = RadixTooltip.Trigger;
2129
2214
  var TooltipPortal = RadixTooltip.Portal;
2130
2215
  var TooltipArrow = RadixTooltip.Arrow;
2131
- var TooltipContent = (0, import_react42.forwardRef)(
2216
+ var TooltipContent = (0, import_react43.forwardRef)(
2132
2217
  function TooltipContent2({ className, sideOffset = 6, ...props }, ref) {
2133
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixTooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2218
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RadixTooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2134
2219
  RadixTooltip.Content,
2135
2220
  {
2136
2221
  ref,
@@ -2148,16 +2233,16 @@ var TooltipContent = (0, import_react42.forwardRef)(
2148
2233
  );
2149
2234
  TooltipContent.displayName = "TooltipContent";
2150
2235
  function Tooltip({ content, children, side = "top", delayDuration = 400 }) {
2151
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipProvider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(TooltipRoot, { children: [
2152
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipTrigger, { asChild: true, children }),
2153
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { side, children: content })
2236
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipProvider, { delayDuration, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(TooltipRoot, { children: [
2237
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipTrigger, { asChild: true, children }),
2238
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipContent, { side, children: content })
2154
2239
  ] }) });
2155
2240
  }
2156
2241
 
2157
2242
  // src/patterns/Alert/Alert.tsx
2158
2243
  var import_class_variance_authority8 = require("class-variance-authority");
2159
- var import_react43 = require("react");
2160
- var import_jsx_runtime36 = require("react/jsx-runtime");
2244
+ var import_react44 = require("react");
2245
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2161
2246
  var alertStyles = (0, import_class_variance_authority8.cva)("flex items-start gap-3 rounded-base border bg-panel p-3 text-[13px]", {
2162
2247
  variants: {
2163
2248
  tone: {
@@ -2181,7 +2266,7 @@ var defaultGlyph = {
2181
2266
  warn: "!",
2182
2267
  err: "\xD7"
2183
2268
  };
2184
- var Alert = (0, import_react43.forwardRef)(function Alert2({
2269
+ var Alert = (0, import_react44.forwardRef)(function Alert2({
2185
2270
  tone = "accent",
2186
2271
  title,
2187
2272
  description,
@@ -2193,7 +2278,7 @@ var Alert = (0, import_react43.forwardRef)(function Alert2({
2193
2278
  ...props
2194
2279
  }, ref) {
2195
2280
  const t = tone ?? "accent";
2196
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2281
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2197
2282
  "div",
2198
2283
  {
2199
2284
  ref,
@@ -2202,13 +2287,13 @@ var Alert = (0, import_react43.forwardRef)(function Alert2({
2202
2287
  className: cn(alertStyles({ tone }), className),
2203
2288
  ...props,
2204
2289
  children: [
2205
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { "aria-hidden": true, className: cn("mt-[1px] text-[14px] leading-none", iconColorClass[t]), children: icon ?? defaultGlyph[t] }),
2206
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "min-w-0 flex-1", children: [
2207
- title && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "font-medium", children: title }),
2208
- description && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "text-text-muted mt-[2px] text-[12px]", children: description }),
2290
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { "aria-hidden": true, className: cn("mt-[1px] text-[14px] leading-none", iconColorClass[t]), children: icon ?? defaultGlyph[t] }),
2291
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "min-w-0 flex-1", children: [
2292
+ title && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "font-medium", children: title }),
2293
+ description && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "text-text-muted mt-[2px] text-[12px]", children: description }),
2209
2294
  children
2210
2295
  ] }),
2211
- action && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "ml-1 shrink-0", children: action })
2296
+ action && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ml-1 shrink-0", children: action })
2212
2297
  ]
2213
2298
  }
2214
2299
  );
@@ -2217,8 +2302,8 @@ Alert.displayName = "Alert";
2217
2302
 
2218
2303
  // src/patterns/Banner/Banner.tsx
2219
2304
  var import_class_variance_authority9 = require("class-variance-authority");
2220
- var import_react44 = require("react");
2221
- var import_jsx_runtime37 = require("react/jsx-runtime");
2305
+ var import_react45 = require("react");
2306
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2222
2307
  var bannerStyles = (0, import_class_variance_authority9.cva)(
2223
2308
  "flex items-center gap-3 border-b border-border px-[14px] py-2 text-[12px]",
2224
2309
  {
@@ -2243,9 +2328,9 @@ var defaultGlyph2 = {
2243
2328
  warn: "!",
2244
2329
  err: "\xD7"
2245
2330
  };
2246
- var Banner = (0, import_react44.forwardRef)(function Banner2({ tone = "accent", sticky, icon, action, live = "polite", className, children, ...props }, ref) {
2331
+ var Banner = (0, import_react45.forwardRef)(function Banner2({ tone = "accent", sticky, icon, action, live = "polite", className, children, ...props }, ref) {
2247
2332
  const t = tone ?? "accent";
2248
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2333
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2249
2334
  "div",
2250
2335
  {
2251
2336
  ref,
@@ -2254,9 +2339,9 @@ var Banner = (0, import_react44.forwardRef)(function Banner2({ tone = "accent",
2254
2339
  className: cn(bannerStyles({ tone, sticky }), className),
2255
2340
  ...props,
2256
2341
  children: [
2257
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { "aria-hidden": true, className: "leading-none", children: icon ?? defaultGlyph2[t] }),
2258
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "min-w-0 flex-1", children }),
2259
- action && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ml-auto", children: action })
2342
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "leading-none", children: icon ?? defaultGlyph2[t] }),
2343
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "min-w-0 flex-1", children }),
2344
+ action && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "ml-auto", children: action })
2260
2345
  ]
2261
2346
  }
2262
2347
  );
@@ -2264,28 +2349,28 @@ var Banner = (0, import_react44.forwardRef)(function Banner2({ tone = "accent",
2264
2349
  Banner.displayName = "Banner";
2265
2350
 
2266
2351
  // src/patterns/Breadcrumbs/Breadcrumbs.tsx
2267
- var import_react45 = require("react");
2268
- var import_jsx_runtime38 = require("react/jsx-runtime");
2269
- var Breadcrumbs = (0, import_react45.forwardRef)(function Breadcrumbs2({ separator = "/", className, children, ...props }, ref) {
2270
- const crumbs = import_react45.Children.toArray(children).filter(import_react45.isValidElement);
2352
+ var import_react46 = require("react");
2353
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2354
+ var Breadcrumbs = (0, import_react46.forwardRef)(function Breadcrumbs2({ separator = "/", className, children, ...props }, ref) {
2355
+ const crumbs = import_react46.Children.toArray(children).filter(import_react46.isValidElement);
2271
2356
  const last = crumbs.length - 1;
2272
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("nav", { ref, "aria-label": "Breadcrumb", className: cn("text-[13px]", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("ol", { className: "text-text-muted flex flex-wrap items-center gap-[6px]", children: crumbs.map((crumb, i) => {
2357
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("nav", { ref, "aria-label": "Breadcrumb", className: cn("text-[13px]", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ol", { className: "text-text-muted flex flex-wrap items-center gap-[6px]", children: crumbs.map((crumb, i) => {
2273
2358
  const isCurrent = i === last;
2274
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("li", { className: "inline-flex items-center gap-[6px]", children: [
2275
- isCurrent ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Crumb, { ...crumb.props, current: true }) : crumb,
2276
- !isCurrent && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": true, className: "text-text-dim", children: separator })
2359
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("li", { className: "inline-flex items-center gap-[6px]", children: [
2360
+ isCurrent ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Crumb, { ...crumb.props, current: true }) : crumb,
2361
+ !isCurrent && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": true, className: "text-text-dim", children: separator })
2277
2362
  ] }, i);
2278
2363
  }) }) });
2279
2364
  });
2280
2365
  Breadcrumbs.displayName = "Breadcrumbs";
2281
- var Crumb = (0, import_react45.forwardRef)(function Crumb2({ current, className, href, children, ...props }, ref) {
2366
+ var Crumb = (0, import_react46.forwardRef)(function Crumb2({ current, className, href, children, ...props }, ref) {
2282
2367
  if (current) {
2283
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-current": "page", className: cn("text-text", className), children });
2368
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-current": "page", className: cn("text-text", className), children });
2284
2369
  }
2285
2370
  if (href === void 0) {
2286
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("text-text-dim", className), children });
2371
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("text-text-dim", className), children });
2287
2372
  }
2288
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2373
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2289
2374
  "a",
2290
2375
  {
2291
2376
  ref,
@@ -2299,8 +2384,8 @@ var Crumb = (0, import_react45.forwardRef)(function Crumb2({ current, className,
2299
2384
  Crumb.displayName = "Crumb";
2300
2385
 
2301
2386
  // src/patterns/Combobox/Combobox.tsx
2302
- var import_react46 = require("react");
2303
- var import_jsx_runtime39 = require("react/jsx-runtime");
2387
+ var import_react47 = require("react");
2388
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2304
2389
  function normalize(option) {
2305
2390
  if (typeof option === "string") {
2306
2391
  return { value: option, label: option, searchText: option.toLowerCase() };
@@ -2316,7 +2401,7 @@ function normalize(option) {
2316
2401
  };
2317
2402
  }
2318
2403
  var defaultFilter = (option, query) => option.searchText.includes(query.toLowerCase());
2319
- var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2404
+ var Combobox = (0, import_react47.forwardRef)(function Combobox2({
2320
2405
  options,
2321
2406
  value: valueProp,
2322
2407
  defaultValue,
@@ -2333,16 +2418,16 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2333
2418
  id,
2334
2419
  "aria-label": ariaLabel
2335
2420
  }, ref) {
2336
- const reactId = (0, import_react46.useId)();
2421
+ const reactId = (0, import_react47.useId)();
2337
2422
  const listboxId = `${id ?? reactId}-listbox`;
2338
2423
  const inputId = id ?? `${reactId}-input`;
2339
- const normalized = (0, import_react46.useMemo)(() => options.map(normalize), [options]);
2424
+ const normalized = (0, import_react47.useMemo)(() => options.map(normalize), [options]);
2340
2425
  const [value, setValue] = useControllableState({
2341
2426
  value: valueProp,
2342
2427
  defaultValue,
2343
2428
  onChange: onValueChange
2344
2429
  });
2345
- const initialQuery = (0, import_react46.useMemo)(() => {
2430
+ const initialQuery = (0, import_react47.useMemo)(() => {
2346
2431
  if (defaultQuery !== void 0) return defaultQuery;
2347
2432
  if (defaultValue !== void 0) {
2348
2433
  const opt = normalized.find((o) => o.value === defaultValue);
@@ -2355,10 +2440,10 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2355
2440
  defaultValue: initialQuery,
2356
2441
  onChange: onQueryChange
2357
2442
  });
2358
- const [open, setOpen] = (0, import_react46.useState)(false);
2359
- const wrapperRef = (0, import_react46.useRef)(null);
2443
+ const [open, setOpen] = (0, import_react47.useState)(false);
2444
+ const wrapperRef = (0, import_react47.useRef)(null);
2360
2445
  useOutsideClick(wrapperRef, () => setOpen(false));
2361
- const filtered = (0, import_react46.useMemo)(
2446
+ const filtered = (0, import_react47.useMemo)(
2362
2447
  () => query ? normalized.filter((o) => filter(o, query)) : normalized,
2363
2448
  [normalized, query, filter]
2364
2449
  );
@@ -2370,7 +2455,7 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2370
2455
  if (item && !item.disabled) commit(item);
2371
2456
  }
2372
2457
  });
2373
- (0, import_react46.useEffect)(() => {
2458
+ (0, import_react47.useEffect)(() => {
2374
2459
  setCursor(0);
2375
2460
  }, [query, setCursor]);
2376
2461
  function commit(option) {
@@ -2393,8 +2478,8 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2393
2478
  setOpen(false);
2394
2479
  }
2395
2480
  };
2396
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref: wrapperRef, className: "relative", style: { width }, children: [
2397
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2481
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { ref: wrapperRef, className: "relative", style: { width }, children: [
2482
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2398
2483
  "input",
2399
2484
  {
2400
2485
  ref,
@@ -2428,7 +2513,7 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2428
2513
  )
2429
2514
  }
2430
2515
  ),
2431
- open && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2516
+ open && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2432
2517
  "ul",
2433
2518
  {
2434
2519
  id: listboxId,
@@ -2438,9 +2523,9 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2438
2523
  "z-dropdown absolute top-full right-0 left-0 mt-1 max-h-[220px] overflow-auto",
2439
2524
  "border-border bg-panel rounded-md border p-1 shadow-lg"
2440
2525
  ),
2441
- children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { className: "text-text-dim px-2 py-3 text-center text-[12px]", role: "presentation", children: emptyState ?? "No matches" }) : filtered.map((option, i) => {
2526
+ children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("li", { className: "text-text-dim px-2 py-3 text-center text-[12px]", role: "presentation", children: emptyState ?? "No matches" }) : filtered.map((option, i) => {
2442
2527
  const isActive = i === cursor;
2443
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2528
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2444
2529
  "li",
2445
2530
  {
2446
2531
  id: `${listboxId}-option-${i}`,
@@ -2458,8 +2543,8 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2458
2543
  option.disabled && "pointer-events-none opacity-40"
2459
2544
  ),
2460
2545
  children: [
2461
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: option.label }),
2462
- option.description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-text-dim text-[11px]", children: option.description })
2546
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { children: option.label }),
2547
+ option.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "text-text-dim text-[11px]", children: option.description })
2463
2548
  ]
2464
2549
  },
2465
2550
  option.value
@@ -2467,19 +2552,19 @@ var Combobox = (0, import_react46.forwardRef)(function Combobox2({
2467
2552
  })
2468
2553
  }
2469
2554
  ),
2470
- name && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("input", { type: "hidden", name, value: value ?? "", readOnly: true })
2555
+ name && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("input", { type: "hidden", name, value: value ?? "", readOnly: true })
2471
2556
  ] });
2472
2557
  });
2473
2558
  Combobox.displayName = "Combobox";
2474
2559
 
2475
2560
  // src/patterns/CommandPalette/CommandPalette.tsx
2476
2561
  var RadixDialog4 = __toESM(require("@radix-ui/react-dialog"), 1);
2477
- var import_react47 = require("react");
2478
- var import_jsx_runtime40 = require("react/jsx-runtime");
2562
+ var import_react48 = require("react");
2563
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2479
2564
  function flatItems(groups) {
2480
2565
  return groups.flatMap((g) => g.items);
2481
2566
  }
2482
- var CommandPalette = (0, import_react47.forwardRef)(
2567
+ var CommandPalette = (0, import_react48.forwardRef)(
2483
2568
  function CommandPalette2({
2484
2569
  open,
2485
2570
  onOpenChange,
@@ -2492,7 +2577,7 @@ var CommandPalette = (0, import_react47.forwardRef)(
2492
2577
  emptyState,
2493
2578
  width = 540
2494
2579
  }, ref) {
2495
- const flat = (0, import_react47.useMemo)(() => flatItems(groups), [groups]);
2580
+ const flat = (0, import_react48.useMemo)(() => flatItems(groups), [groups]);
2496
2581
  const { cursor, setCursor, onKeyDown } = useKeyboardList({
2497
2582
  count: flat.length,
2498
2583
  defaultCursor: 0,
@@ -2501,15 +2586,15 @@ var CommandPalette = (0, import_react47.forwardRef)(
2501
2586
  if (item) onSelect(item.id);
2502
2587
  }
2503
2588
  });
2504
- const reactId = (0, import_react47.useId)();
2589
+ const reactId = (0, import_react48.useId)();
2505
2590
  const listboxId = `${reactId}-listbox`;
2506
2591
  const optionId = (i) => `${listboxId}-option-${i}`;
2507
2592
  const hasMatches = flat.length > 0;
2508
- (0, import_react47.useEffect)(() => {
2593
+ (0, import_react48.useEffect)(() => {
2509
2594
  setCursor(0);
2510
2595
  }, [query, groups, setCursor]);
2511
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixDialog4.Root, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(RadixDialog4.Portal, { children: [
2512
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2596
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadixDialog4.Root, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(RadixDialog4.Portal, { children: [
2597
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2513
2598
  RadixDialog4.Overlay,
2514
2599
  {
2515
2600
  className: cn(
@@ -2518,7 +2603,7 @@ var CommandPalette = (0, import_react47.forwardRef)(
2518
2603
  )
2519
2604
  }
2520
2605
  ),
2521
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2606
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2522
2607
  RadixDialog4.Content,
2523
2608
  {
2524
2609
  ref,
@@ -2532,10 +2617,10 @@ var CommandPalette = (0, import_react47.forwardRef)(
2532
2617
  ),
2533
2618
  onKeyDown,
2534
2619
  children: [
2535
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RadixDialog4.Title, { className: "sr-only", children: "Command palette" }),
2536
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "border-border flex items-center gap-[10px] border-b px-4 py-[14px]", children: [
2537
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { "aria-hidden": true, className: "text-text-dim", children: "\u2315" }),
2538
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2620
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(RadixDialog4.Title, { className: "sr-only", children: "Command palette" }),
2621
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "border-border flex items-center gap-[10px] border-b px-4 py-[14px]", children: [
2622
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { "aria-hidden": true, className: "text-text-dim", children: "\u2315" }),
2623
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2539
2624
  "input",
2540
2625
  {
2541
2626
  autoFocus: true,
@@ -2552,9 +2637,9 @@ var CommandPalette = (0, import_react47.forwardRef)(
2552
2637
  className: "text-text placeholder:text-text-dim flex-1 border-0 bg-transparent text-[14px] outline-none"
2553
2638
  }
2554
2639
  ),
2555
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "border-border text-text-dim rounded-xs border px-[6px] py-[2px] font-mono text-[10px]", children: "ESC" })
2640
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "border-border text-text-dim rounded-xs border px-[6px] py-[2px] font-mono text-[10px]", children: "ESC" })
2556
2641
  ] }),
2557
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { id: listboxId, className: "min-h-[220px] p-2", role: "listbox", "aria-label": "Results", children: flat.length === 0 ? emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "text-text-dim px-3 py-5 text-center text-[12px]", children: "No matches" }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2642
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { id: listboxId, className: "min-h-[220px] p-2", role: "listbox", "aria-label": "Results", children: flat.length === 0 ? emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-text-dim px-3 py-5 text-center text-[12px]", children: "No matches" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2558
2643
  CommandGroups,
2559
2644
  {
2560
2645
  groups,
@@ -2564,7 +2649,7 @@ var CommandPalette = (0, import_react47.forwardRef)(
2564
2649
  optionId
2565
2650
  }
2566
2651
  ) }),
2567
- footer && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "border-border text-text-dim flex gap-4 border-t px-[14px] py-[10px] font-mono text-[10px]", children: footer })
2652
+ footer && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "border-border text-text-dim flex gap-4 border-t px-[14px] py-[10px] font-mono text-[10px]", children: footer })
2568
2653
  ]
2569
2654
  }
2570
2655
  )
@@ -2574,10 +2659,10 @@ var CommandPalette = (0, import_react47.forwardRef)(
2574
2659
  CommandPalette.displayName = "CommandPalette";
2575
2660
  function CommandGroups({ groups, cursor, setCursor, onSelect, optionId }) {
2576
2661
  let runningIndex = 0;
2577
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children: groups.map((group, gIdx) => {
2662
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: groups.map((group, gIdx) => {
2578
2663
  if (group.items.length === 0) return null;
2579
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
2580
- group.label && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "text-text-dim px-2 pt-2 pb-1 font-mono text-[9px] tracking-[1.4px] uppercase", children: [
2664
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { children: [
2665
+ group.label && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "text-text-dim px-2 pt-2 pb-1 font-mono text-[9px] tracking-[1.4px] uppercase", children: [
2581
2666
  group.label,
2582
2667
  " \xB7 ",
2583
2668
  group.items.length
@@ -2585,7 +2670,7 @@ function CommandGroups({ groups, cursor, setCursor, onSelect, optionId }) {
2585
2670
  group.items.map((item) => {
2586
2671
  const myIndex = runningIndex++;
2587
2672
  const isActive = cursor === myIndex;
2588
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2673
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2589
2674
  "button",
2590
2675
  {
2591
2676
  id: optionId(myIndex),
@@ -2599,7 +2684,7 @@ function CommandGroups({ groups, cursor, setCursor, onSelect, optionId }) {
2599
2684
  isActive ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2"
2600
2685
  ),
2601
2686
  children: [
2602
- item.glyph != null && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2687
+ item.glyph != null && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2603
2688
  "span",
2604
2689
  {
2605
2690
  "aria-hidden": true,
@@ -2610,11 +2695,11 @@ function CommandGroups({ groups, cursor, setCursor, onSelect, optionId }) {
2610
2695
  children: item.glyph
2611
2696
  }
2612
2697
  ),
2613
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "min-w-0 flex-1", children: [
2614
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "block truncate text-[13px]", children: item.label }),
2615
- item.description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-text-dim block truncate text-[11px]", children: item.description })
2698
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "min-w-0 flex-1", children: [
2699
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "block truncate text-[13px]", children: item.label }),
2700
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-text-dim block truncate text-[11px]", children: item.description })
2616
2701
  ] }),
2617
- item.trailing && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: item.trailing })
2702
+ item.trailing && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: item.trailing })
2618
2703
  ]
2619
2704
  },
2620
2705
  item.id
@@ -2636,8 +2721,8 @@ function filterCommandItems(query, groups) {
2636
2721
  }
2637
2722
 
2638
2723
  // src/patterns/DataTable/DataTable.tsx
2639
- var import_react48 = require("react");
2640
- var import_jsx_runtime41 = require("react/jsx-runtime");
2724
+ var import_react49 = require("react");
2725
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2641
2726
  var alignClass = {
2642
2727
  left: "text-left",
2643
2728
  right: "text-right",
@@ -2672,12 +2757,12 @@ function DataTable(props) {
2672
2757
  defaultValue: new Set(defaultSelected ?? []),
2673
2758
  onChange: onSelectionChange
2674
2759
  });
2675
- const sortableMap = (0, import_react48.useMemo)(() => {
2760
+ const sortableMap = (0, import_react49.useMemo)(() => {
2676
2761
  const m = /* @__PURE__ */ new Map();
2677
2762
  for (const c of columns) if (c.accessor) m.set(c.key, c);
2678
2763
  return m;
2679
2764
  }, [columns]);
2680
- const sortedData = (0, import_react48.useMemo)(() => {
2765
+ const sortedData = (0, import_react49.useMemo)(() => {
2681
2766
  if (!sort) return [...data];
2682
2767
  const col = sortableMap.get(sort.key);
2683
2768
  if (!col || !col.accessor) return [...data];
@@ -2689,12 +2774,12 @@ function DataTable(props) {
2689
2774
  return String(av).localeCompare(String(bv)) * factor;
2690
2775
  });
2691
2776
  }, [data, sort, sortableMap]);
2692
- const allIds = (0, import_react48.useMemo)(() => sortedData.map(rowKey), [sortedData, rowKey]);
2777
+ const allIds = (0, import_react49.useMemo)(() => sortedData.map(rowKey), [sortedData, rowKey]);
2693
2778
  const selectedSet = selected ?? EMPTY_SET;
2694
2779
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedSet.has(id));
2695
2780
  const someSelected = !allSelected && allIds.some((id) => selectedSet.has(id));
2696
- const headerCheckRef = (0, import_react48.useRef)(null);
2697
- (0, import_react48.useEffect)(() => {
2781
+ const headerCheckRef = (0, import_react49.useRef)(null);
2782
+ (0, import_react49.useEffect)(() => {
2698
2783
  if (headerCheckRef.current) headerCheckRef.current.indeterminate = someSelected;
2699
2784
  }, [someSelected]);
2700
2785
  const toggleSort = (key) => {
@@ -2725,10 +2810,10 @@ function DataTable(props) {
2725
2810
  return next;
2726
2811
  });
2727
2812
  };
2728
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("table", { ref, className: cn("w-full border-collapse text-[12px]", className), children: [
2729
- caption && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("caption", { className: "sr-only", children: caption }),
2730
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("thead", { className: cn("bg-panel-2", stickyHeader && "z-raised sticky top-0"), children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("tr", { children: [
2731
- selectable && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("th", { scope: "col", className: "border-border w-8 border-b px-3 py-2 text-left", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2813
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("table", { ref, className: cn("w-full border-collapse text-[12px]", className), children: [
2814
+ caption && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("caption", { className: "sr-only", children: caption }),
2815
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("thead", { className: cn("bg-panel-2", stickyHeader && "z-raised sticky top-0"), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("tr", { children: [
2816
+ selectable && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("th", { scope: "col", className: "border-border w-8 border-b px-3 py-2 text-left", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2732
2817
  "input",
2733
2818
  {
2734
2819
  ref: headerCheckRef,
@@ -2744,8 +2829,8 @@ function DataTable(props) {
2744
2829
  const isSorted = sort?.key === col.key;
2745
2830
  const ariaSort = !sortable ? void 0 : isSorted ? sort?.direction === "asc" ? "ascending" : "descending" : "none";
2746
2831
  const align = col.align ?? "left";
2747
- const indicator = sortable && isSorted && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { "aria-hidden": true, className: "ml-1", children: sort?.direction === "asc" ? "\u2191" : "\u2193" });
2748
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2832
+ const indicator = sortable && isSorted && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { "aria-hidden": true, className: "ml-1", children: sort?.direction === "asc" ? "\u2191" : "\u2193" });
2833
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2749
2834
  "th",
2750
2835
  {
2751
2836
  scope: "col",
@@ -2757,7 +2842,7 @@ function DataTable(props) {
2757
2842
  sortable && "cursor-pointer",
2758
2843
  isSorted ? "text-accent" : "text-text-dim"
2759
2844
  ),
2760
- children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2845
+ children: sortable ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2761
2846
  "button",
2762
2847
  {
2763
2848
  type: "button",
@@ -2774,8 +2859,8 @@ function DataTable(props) {
2774
2859
  );
2775
2860
  })
2776
2861
  ] }) }),
2777
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("tbody", { children: [
2778
- sortedData.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2862
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("tbody", { children: [
2863
+ sortedData.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2779
2864
  "td",
2780
2865
  {
2781
2866
  colSpan: columns.length + (selectable ? 1 : 0),
@@ -2786,7 +2871,7 @@ function DataTable(props) {
2786
2871
  sortedData.map((row) => {
2787
2872
  const id = rowKey(row);
2788
2873
  const isSelected = selectedSet.has(id);
2789
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2874
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2790
2875
  "tr",
2791
2876
  {
2792
2877
  "data-state": isSelected ? "selected" : void 0,
@@ -2795,7 +2880,7 @@ function DataTable(props) {
2795
2880
  isSelected ? "bg-accent-dim/50" : "hover:bg-panel-2"
2796
2881
  ),
2797
2882
  children: [
2798
- selectable && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("td", { className: "px-3 py-[10px]", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2883
+ selectable && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: "px-3 py-[10px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2799
2884
  "input",
2800
2885
  {
2801
2886
  type: "checkbox",
@@ -2805,7 +2890,7 @@ function DataTable(props) {
2805
2890
  className: "cursor-pointer accent-[var(--color-accent)]"
2806
2891
  }
2807
2892
  ) }),
2808
- columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("td", { className: cn("px-3 py-[10px]", alignClass[col.align ?? "left"]), children: col.cell ? col.cell(row) : col.accessor ? String(col.accessor(row)) : null }, col.key))
2893
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("td", { className: cn("px-3 py-[10px]", alignClass[col.align ?? "left"]), children: col.cell ? col.cell(row) : col.accessor ? String(col.accessor(row)) : null }, col.key))
2809
2894
  ]
2810
2895
  },
2811
2896
  id
@@ -2816,8 +2901,8 @@ function DataTable(props) {
2816
2901
  }
2817
2902
 
2818
2903
  // src/patterns/DatePicker/Calendar.tsx
2819
- var import_react49 = require("react");
2820
- var import_jsx_runtime42 = require("react/jsx-runtime");
2904
+ var import_react50 = require("react");
2905
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2821
2906
  var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2822
2907
  var DAYS = ["S", "M", "T", "W", "T", "F", "S"];
2823
2908
  function isSameDay(a, b) {
@@ -2828,7 +2913,7 @@ function clampDay(year, month, day) {
2828
2913
  const max = new Date(year, month + 1, 0).getDate();
2829
2914
  return Math.min(Math.max(1, day), max);
2830
2915
  }
2831
- var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2916
+ var Calendar = (0, import_react50.forwardRef)(function Calendar2({
2832
2917
  value,
2833
2918
  defaultValue,
2834
2919
  onValueChange,
@@ -2841,9 +2926,9 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2841
2926
  className,
2842
2927
  ...props
2843
2928
  }, ref) {
2844
- const [today] = (0, import_react49.useState)(() => /* @__PURE__ */ new Date());
2845
- const [hydrated, setHydrated] = (0, import_react49.useState)(false);
2846
- (0, import_react49.useEffect)(() => setHydrated(true), []);
2929
+ const [today] = (0, import_react50.useState)(() => /* @__PURE__ */ new Date());
2930
+ const [hydrated, setHydrated] = (0, import_react50.useState)(false);
2931
+ (0, import_react50.useEffect)(() => setHydrated(true), []);
2847
2932
  const [selectedDate, setSelectedDate] = useControllableState({
2848
2933
  value,
2849
2934
  defaultValue,
@@ -2851,12 +2936,12 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2851
2936
  });
2852
2937
  const initialMonth = defaultMonth ?? defaultValue?.getMonth() ?? today.getMonth();
2853
2938
  const initialYear = defaultYear ?? defaultValue?.getFullYear() ?? today.getFullYear();
2854
- const [internalMonth, setInternalMonth] = (0, import_react49.useState)(initialMonth);
2855
- const [internalYear, setInternalYear] = (0, import_react49.useState)(initialYear);
2939
+ const [internalMonth, setInternalMonth] = (0, import_react50.useState)(initialMonth);
2940
+ const [internalYear, setInternalYear] = (0, import_react50.useState)(initialYear);
2856
2941
  const month = monthProp ?? internalMonth;
2857
2942
  const year = yearProp ?? internalYear;
2858
2943
  const isControlled = monthProp !== void 0 && yearProp !== void 0;
2859
- const setVisible = (0, import_react49.useCallback)(
2944
+ const setVisible = (0, import_react50.useCallback)(
2860
2945
  (m, y) => {
2861
2946
  if (!isControlled) {
2862
2947
  setInternalMonth(m);
@@ -2866,36 +2951,36 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2866
2951
  },
2867
2952
  [isControlled, onVisibleMonthChange]
2868
2953
  );
2869
- const goPrev = (0, import_react49.useCallback)(() => {
2954
+ const goPrev = (0, import_react50.useCallback)(() => {
2870
2955
  const m = month === 0 ? 11 : month - 1;
2871
2956
  const y = month === 0 ? year - 1 : year;
2872
2957
  setVisible(m, y);
2873
2958
  }, [month, year, setVisible]);
2874
- const goNext = (0, import_react49.useCallback)(() => {
2959
+ const goNext = (0, import_react50.useCallback)(() => {
2875
2960
  const m = month === 11 ? 0 : month + 1;
2876
2961
  const y = month === 11 ? year + 1 : year;
2877
2962
  setVisible(m, y);
2878
2963
  }, [month, year, setVisible]);
2879
2964
  const daysInMonth = new Date(year, month + 1, 0).getDate();
2880
2965
  const firstDayOfMonth = new Date(year, month, 1).getDay();
2881
- const [focusedDate, setFocusedDate] = (0, import_react49.useState)(() => {
2966
+ const [focusedDate, setFocusedDate] = (0, import_react50.useState)(() => {
2882
2967
  if (selectedDate) return selectedDate;
2883
2968
  return new Date(initialYear, initialMonth, 1);
2884
2969
  });
2885
- (0, import_react49.useEffect)(() => {
2970
+ (0, import_react50.useEffect)(() => {
2886
2971
  if (selectedDate) setFocusedDate(selectedDate);
2887
2972
  }, [selectedDate]);
2888
2973
  const focusedInVisibleMonth = focusedDate.getMonth() === month && focusedDate.getFullYear() === year;
2889
2974
  const effectiveFocusDay = focusedInVisibleMonth ? focusedDate.getDate() : clampDay(year, month, focusedDate.getDate());
2890
- const dayRefs = (0, import_react49.useRef)(/* @__PURE__ */ new Map());
2891
- const shouldFocusRef = (0, import_react49.useRef)(false);
2892
- (0, import_react49.useEffect)(() => {
2975
+ const dayRefs = (0, import_react50.useRef)(/* @__PURE__ */ new Map());
2976
+ const shouldFocusRef = (0, import_react50.useRef)(false);
2977
+ (0, import_react50.useEffect)(() => {
2893
2978
  if (!shouldFocusRef.current) return;
2894
2979
  shouldFocusRef.current = false;
2895
2980
  const node = dayRefs.current.get(effectiveFocusDay);
2896
2981
  node?.focus();
2897
2982
  }, [effectiveFocusDay, month, year]);
2898
- const moveFocus = (0, import_react49.useCallback)(
2983
+ const moveFocus = (0, import_react50.useCallback)(
2899
2984
  (next) => {
2900
2985
  setFocusedDate(next);
2901
2986
  shouldFocusRef.current = true;
@@ -2907,7 +2992,7 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2907
2992
  },
2908
2993
  [month, year, setVisible]
2909
2994
  );
2910
- const onCellKeyDown = (0, import_react49.useCallback)(
2995
+ const onCellKeyDown = (0, import_react50.useCallback)(
2911
2996
  (e, day) => {
2912
2997
  const current = new Date(year, month, day);
2913
2998
  let next = null;
@@ -2959,7 +3044,7 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2959
3044
  },
2960
3045
  [month, year, moveFocus]
2961
3046
  );
2962
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3047
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
2963
3048
  "div",
2964
3049
  {
2965
3050
  ref,
@@ -2971,14 +3056,14 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2971
3056
  ),
2972
3057
  ...props,
2973
3058
  children: [
2974
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "mb-3 flex items-center justify-between", children: [
2975
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "text-[13px] font-medium", "aria-live": "polite", children: [
3059
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "mb-3 flex items-center justify-between", children: [
3060
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "text-[13px] font-medium", "aria-live": "polite", children: [
2976
3061
  MONTHS[month],
2977
3062
  " ",
2978
3063
  year
2979
3064
  ] }),
2980
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex gap-1", children: [
2981
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3065
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex gap-1", children: [
3066
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2982
3067
  IconButton,
2983
3068
  {
2984
3069
  size: "sm",
@@ -2988,11 +3073,11 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
2988
3073
  onClick: goPrev
2989
3074
  }
2990
3075
  ),
2991
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconButton, { size: "sm", variant: "ghost", icon: "\u203A", "aria-label": "Next month", onClick: goNext })
3076
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(IconButton, { size: "sm", variant: "ghost", icon: "\u203A", "aria-label": "Next month", onClick: goNext })
2992
3077
  ] })
2993
3078
  ] }),
2994
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { role: "grid", "aria-label": `${MONTHS[month]} ${year}`, className: "flex flex-col gap-[2px]", children: [
2995
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-[2px]", children: DAYS.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3079
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { role: "grid", "aria-label": `${MONTHS[month]} ${year}`, className: "flex flex-col gap-[2px]", children: [
3080
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-[2px]", children: DAYS.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2996
3081
  "div",
2997
3082
  {
2998
3083
  role: "columnheader",
@@ -3012,7 +3097,7 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
3012
3097
  const cellIndex = r * 7 + c;
3013
3098
  const dayNum = cellIndex - firstDayOfMonth + 1;
3014
3099
  if (dayNum < 1 || dayNum > daysInMonth) {
3015
- cells.push(/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { role: "gridcell", "aria-hidden": true }, `pad-${r}-${c}`));
3100
+ cells.push(/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { role: "gridcell", "aria-hidden": true }, `pad-${r}-${c}`));
3016
3101
  continue;
3017
3102
  }
3018
3103
  const date = new Date(year, month, dayNum);
@@ -3022,7 +3107,7 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
3022
3107
  const isFocused = dayNum === effectiveFocusDay;
3023
3108
  const day = dayNum;
3024
3109
  cells.push(
3025
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { role: "gridcell", "aria-selected": isSelected, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3110
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { role: "gridcell", "aria-selected": isSelected, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3026
3111
  "button",
3027
3112
  {
3028
3113
  ref: (node) => {
@@ -3053,7 +3138,7 @@ var Calendar = (0, import_react49.forwardRef)(function Calendar2({
3053
3138
  );
3054
3139
  }
3055
3140
  rows.push(
3056
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-[2px]", children: cells }, `row-${r}`)
3141
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-[2px]", children: cells }, `row-${r}`)
3057
3142
  );
3058
3143
  }
3059
3144
  return rows;
@@ -3067,10 +3152,10 @@ Calendar.displayName = "Calendar";
3067
3152
 
3068
3153
  // src/patterns/DatePicker/DatePicker.tsx
3069
3154
  var RadixPopover2 = __toESM(require("@radix-ui/react-popover"), 1);
3070
- var import_react50 = require("react");
3071
- var import_jsx_runtime43 = require("react/jsx-runtime");
3155
+ var import_react51 = require("react");
3156
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3072
3157
  var defaultFormat = (d) => d.toLocaleDateString();
3073
- var DatePicker = (0, import_react50.forwardRef)(function DatePicker2({
3158
+ var DatePicker = (0, import_react51.forwardRef)(function DatePicker2({
3074
3159
  value: valueProp,
3075
3160
  defaultValue,
3076
3161
  onValueChange,
@@ -3084,14 +3169,14 @@ var DatePicker = (0, import_react50.forwardRef)(function DatePicker2({
3084
3169
  id,
3085
3170
  name
3086
3171
  }, ref) {
3087
- const [open, setOpen] = (0, import_react50.useState)(false);
3172
+ const [open, setOpen] = (0, import_react51.useState)(false);
3088
3173
  const [value, setValue] = useControllableState({
3089
3174
  value: valueProp,
3090
3175
  defaultValue,
3091
3176
  onChange: onValueChange
3092
3177
  });
3093
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(RadixPopover2.Root, { open, onOpenChange: setOpen, children: [
3094
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RadixPopover2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3178
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(RadixPopover2.Root, { open, onOpenChange: setOpen, children: [
3179
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(RadixPopover2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3095
3180
  "button",
3096
3181
  {
3097
3182
  ref,
@@ -3108,18 +3193,18 @@ var DatePicker = (0, import_react50.forwardRef)(function DatePicker2({
3108
3193
  ),
3109
3194
  style: { width },
3110
3195
  children: [
3111
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { "aria-hidden": true, className: "text-text-dim", children: "\u25A2" }),
3112
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: cn("flex-1 truncate", !value && "text-text-dim"), children: value ? format(value) : emptyLabel ?? placeholder })
3196
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { "aria-hidden": true, className: "text-text-dim", children: "\u25A2" }),
3197
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: cn("flex-1 truncate", !value && "text-text-dim"), children: value ? format(value) : emptyLabel ?? placeholder })
3113
3198
  ]
3114
3199
  }
3115
3200
  ) }),
3116
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(RadixPopover2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3201
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(RadixPopover2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3117
3202
  RadixPopover2.Content,
3118
3203
  {
3119
3204
  align: "start",
3120
3205
  sideOffset: 6,
3121
3206
  className: "z-popover outline-none data-[state=open]:animate-[ship-pop-in_140ms_var(--easing-out)]",
3122
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3207
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3123
3208
  Calendar,
3124
3209
  {
3125
3210
  value,
@@ -3134,17 +3219,17 @@ var DatePicker = (0, import_react50.forwardRef)(function DatePicker2({
3134
3219
  )
3135
3220
  }
3136
3221
  ) }),
3137
- name && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("input", { type: "hidden", name, value: value ? value.toISOString() : "", readOnly: true })
3222
+ name && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("input", { type: "hidden", name, value: value ? value.toISOString() : "", readOnly: true })
3138
3223
  ] });
3139
3224
  });
3140
3225
  DatePicker.displayName = "DatePicker";
3141
3226
 
3142
3227
  // src/patterns/Dots/Dots.tsx
3143
- var import_react51 = require("react");
3144
- var import_jsx_runtime44 = require("react/jsx-runtime");
3145
- var Dots = (0, import_react51.forwardRef)(function Dots2({ total, current, onChange, className, "aria-label": ariaLabel = "Progress", ...props }, ref) {
3228
+ var import_react52 = require("react");
3229
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3230
+ var Dots = (0, import_react52.forwardRef)(function Dots2({ total, current, onChange, className, "aria-label": ariaLabel = "Progress", ...props }, ref) {
3146
3231
  const interactive = typeof onChange === "function";
3147
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3232
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3148
3233
  "nav",
3149
3234
  {
3150
3235
  ref,
@@ -3158,7 +3243,7 @@ var Dots = (0, import_react51.forwardRef)(function Dots2({ total, current, onCha
3158
3243
  isActive ? "w-[18px] bg-accent" : "w-[6px] bg-panel-2"
3159
3244
  );
3160
3245
  if (interactive) {
3161
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3246
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3162
3247
  "button",
3163
3248
  {
3164
3249
  type: "button",
@@ -3175,17 +3260,98 @@ var Dots = (0, import_react51.forwardRef)(function Dots2({ total, current, onCha
3175
3260
  i
3176
3261
  );
3177
3262
  }
3178
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { "aria-hidden": true, className: sharedClass }, i);
3263
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "aria-hidden": true, className: sharedClass }, i);
3179
3264
  })
3180
3265
  }
3181
3266
  );
3182
3267
  });
3183
3268
  Dots.displayName = "Dots";
3184
3269
 
3270
+ // src/patterns/Dropzone/Dropzone.tsx
3271
+ var import_react53 = require("react");
3272
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3273
+ function listToArray(list) {
3274
+ if (!list) return [];
3275
+ return Array.from(list);
3276
+ }
3277
+ var Dropzone = (0, import_react53.forwardRef)(function Dropzone2({
3278
+ onFiles,
3279
+ accept,
3280
+ multiple = true,
3281
+ title = "Drop files to ingest",
3282
+ description,
3283
+ icon = "\u21A5",
3284
+ disabled,
3285
+ className,
3286
+ ...props
3287
+ }, ref) {
3288
+ const [isDragging, setIsDragging] = (0, import_react53.useState)(false);
3289
+ const onDragOver = (e) => {
3290
+ if (disabled) return;
3291
+ e.preventDefault();
3292
+ setIsDragging(true);
3293
+ };
3294
+ const onDragLeave = () => setIsDragging(false);
3295
+ const onDrop = (e) => {
3296
+ if (disabled) return;
3297
+ e.preventDefault();
3298
+ setIsDragging(false);
3299
+ const files = listToArray(e.dataTransfer.files);
3300
+ if (files.length) onFiles?.(files);
3301
+ };
3302
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3303
+ "label",
3304
+ {
3305
+ ref,
3306
+ onDragOver,
3307
+ onDragLeave,
3308
+ onDrop,
3309
+ className: cn(
3310
+ "rounded-base flex max-w-[420px] cursor-pointer flex-col items-center border-[1.5px] border-dashed p-8 text-center",
3311
+ "transition-[background,border] duration-(--duration-micro)",
3312
+ "focus-within:ring-accent-dim focus-within:ring-[3px]",
3313
+ isDragging ? "border-accent bg-accent-dim" : "border-border-strong bg-panel hover:bg-panel-2",
3314
+ disabled && "pointer-events-none cursor-not-allowed opacity-50",
3315
+ className
3316
+ ),
3317
+ ...props,
3318
+ children: [
3319
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3320
+ "input",
3321
+ {
3322
+ type: "file",
3323
+ accept,
3324
+ multiple,
3325
+ disabled,
3326
+ "aria-label": typeof title === "string" ? title : "Upload files",
3327
+ className: "sr-only",
3328
+ onChange: (e) => {
3329
+ const files = listToArray(e.target.files);
3330
+ if (files.length) onFiles?.(files);
3331
+ e.target.value = "";
3332
+ }
3333
+ }
3334
+ ),
3335
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3336
+ "div",
3337
+ {
3338
+ "aria-hidden": true,
3339
+ className: cn("mb-2 text-[28px]", isDragging ? "text-accent" : "text-text-dim"),
3340
+ children: icon
3341
+ }
3342
+ ),
3343
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "mb-1 text-[13px] font-medium", children: title }),
3344
+ description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "text-text-dim text-[11px]", children: description })
3345
+ ]
3346
+ }
3347
+ );
3348
+ });
3349
+ Dropzone.displayName = "Dropzone";
3350
+
3185
3351
  // src/patterns/EmptyState/EmptyState.tsx
3186
3352
  var import_class_variance_authority10 = require("class-variance-authority");
3187
- var import_react52 = require("react");
3188
- var import_jsx_runtime45 = require("react/jsx-runtime");
3353
+ var import_react54 = require("react");
3354
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3189
3355
  var plateStyles = (0, import_class_variance_authority10.cva)("grid h-12 w-12 place-items-center rounded-base text-[22px]", {
3190
3356
  variants: {
3191
3357
  tone: {
@@ -3198,8 +3364,8 @@ var plateStyles = (0, import_class_variance_authority10.cva)("grid h-12 w-12 pla
3198
3364
  },
3199
3365
  defaultVariants: { tone: "neutral" }
3200
3366
  });
3201
- var EmptyState = (0, import_react52.forwardRef)(function EmptyState2({ icon, title, description, action, chips, tone, className, ...props }, ref) {
3202
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3367
+ var EmptyState = (0, import_react54.forwardRef)(function EmptyState2({ icon, title, description, action, chips, tone, className, ...props }, ref) {
3368
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3203
3369
  "div",
3204
3370
  {
3205
3371
  ref,
@@ -3209,10 +3375,10 @@ var EmptyState = (0, import_react52.forwardRef)(function EmptyState2({ icon, tit
3209
3375
  ),
3210
3376
  ...props,
3211
3377
  children: [
3212
- icon != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "aria-hidden": true, className: plateStyles({ tone: tone ?? "neutral" }), children: icon }),
3213
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-[14px] font-medium", children: title }),
3214
- description && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-text-muted max-w-[260px] text-[12px] leading-[1.5]", children: description }),
3215
- chips && chips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex w-full flex-col gap-1", children: chips.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3378
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { "aria-hidden": true, className: plateStyles({ tone: tone ?? "neutral" }), children: icon }),
3379
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-[14px] font-medium", children: title }),
3380
+ description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-text-muted max-w-[260px] text-[12px] leading-[1.5]", children: description }),
3381
+ chips && chips.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex w-full flex-col gap-1", children: chips.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3216
3382
  "button",
3217
3383
  {
3218
3384
  type: "button",
@@ -3234,18 +3400,18 @@ var EmptyState = (0, import_react52.forwardRef)(function EmptyState2({ icon, tit
3234
3400
  EmptyState.displayName = "EmptyState";
3235
3401
 
3236
3402
  // src/patterns/FileChip/FileChip.tsx
3237
- var import_react53 = require("react");
3238
- var import_jsx_runtime46 = require("react/jsx-runtime");
3403
+ var import_react55 = require("react");
3404
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3239
3405
  function deriveExt(name) {
3240
3406
  const dot = name.lastIndexOf(".");
3241
3407
  if (dot < 0) return "FILE";
3242
3408
  return name.slice(dot + 1).slice(0, 4).toUpperCase();
3243
3409
  }
3244
- var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, progress, icon, onRemove, failed, className, ...props }, ref) {
3410
+ var FileChip = (0, import_react55.forwardRef)(function FileChip2({ name, size, progress, icon, onRemove, failed, className, ...props }, ref) {
3245
3411
  const ext = deriveExt(name);
3246
3412
  const showProgress = typeof progress === "number";
3247
3413
  const isComplete = showProgress && progress >= 100;
3248
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3414
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
3249
3415
  "div",
3250
3416
  {
3251
3417
  ref,
@@ -3255,7 +3421,7 @@ var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, p
3255
3421
  ),
3256
3422
  ...props,
3257
3423
  children: [
3258
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3424
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3259
3425
  "span",
3260
3426
  {
3261
3427
  "aria-hidden": true,
@@ -3263,17 +3429,17 @@ var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, p
3263
3429
  children: icon ?? ext
3264
3430
  }
3265
3431
  ),
3266
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0 flex-1", children: [
3267
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "truncate text-[12px] font-medium", children: name }),
3268
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("font-mono text-[10px]", failed ? "text-err" : "text-text-dim"), children: [
3432
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "min-w-0 flex-1", children: [
3433
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "truncate text-[12px] font-medium", children: name }),
3434
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("font-mono text-[10px]", failed ? "text-err" : "text-text-dim"), children: [
3269
3435
  size,
3270
- showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
3436
+ showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { children: [
3271
3437
  " \xB7 ",
3272
3438
  Math.round(progress),
3273
3439
  "%"
3274
3440
  ] })
3275
3441
  ] }),
3276
- showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "bg-panel mt-1 h-[2px] overflow-hidden rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3442
+ showProgress && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "bg-panel mt-1 h-[2px] overflow-hidden rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3277
3443
  "div",
3278
3444
  {
3279
3445
  className: cn(
@@ -3284,7 +3450,7 @@ var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, p
3284
3450
  }
3285
3451
  ) })
3286
3452
  ] }),
3287
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3453
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3288
3454
  "button",
3289
3455
  {
3290
3456
  type: "button",
@@ -3303,100 +3469,979 @@ var FileChip = (0, import_react53.forwardRef)(function FileChip2({ name, size, p
3303
3469
  });
3304
3470
  FileChip.displayName = "FileChip";
3305
3471
 
3306
- // src/patterns/Menubar/Menubar.tsx
3307
- var RadixMenubar = __toESM(require("@radix-ui/react-menubar"), 1);
3308
- var import_react54 = require("react");
3309
- var import_jsx_runtime47 = require("react/jsx-runtime");
3310
- var Menubar = (0, import_react54.forwardRef)(function Menubar2({ className, ...props }, ref) {
3311
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3312
- RadixMenubar.Root,
3472
+ // src/patterns/FilterPanel/FilterPanel.tsx
3473
+ var import_react56 = require("react");
3474
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3475
+ var EMPTY = Object.freeze({});
3476
+ var FilterPanel = (0, import_react56.forwardRef)(function FilterPanel2({
3477
+ facets,
3478
+ value,
3479
+ defaultValue,
3480
+ onValueChange,
3481
+ onReset,
3482
+ counts,
3483
+ title = "Filter",
3484
+ resetLabel = "Reset",
3485
+ className,
3486
+ ...props
3487
+ }, ref) {
3488
+ const [selection, setSelection] = useControllableState({
3489
+ value,
3490
+ defaultValue: defaultValue ?? EMPTY,
3491
+ onChange: onValueChange
3492
+ });
3493
+ const total = facets.reduce((sum, facet) => sum + (selection[facet.id]?.length ?? 0), 0);
3494
+ const toggle = (0, import_react56.useCallback)(
3495
+ (facetId, optionValue, next) => {
3496
+ setSelection((prev) => {
3497
+ const current = prev?.[facetId] ?? [];
3498
+ const filtered = current.filter((v) => v !== optionValue);
3499
+ const updated = next ? [...filtered, optionValue] : filtered;
3500
+ return { ...prev ?? {}, [facetId]: updated };
3501
+ });
3502
+ },
3503
+ [setSelection]
3504
+ );
3505
+ const handleReset = (0, import_react56.useCallback)(() => {
3506
+ setSelection(EMPTY);
3507
+ onReset?.();
3508
+ }, [setSelection, onReset]);
3509
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3510
+ "div",
3313
3511
  {
3314
3512
  ref,
3513
+ role: "group",
3514
+ "aria-label": typeof title === "string" ? title : void 0,
3315
3515
  className: cn(
3316
- "border-border bg-panel flex h-[30px] items-center gap-[2px] border-b px-3",
3516
+ "rounded-base border-border bg-panel flex w-[260px] flex-col gap-3 border p-4",
3317
3517
  className
3318
3518
  ),
3319
- ...props
3519
+ ...props,
3520
+ children: [
3521
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2", children: [
3522
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-text-dim font-mono text-[10px] tracking-[1.4px] uppercase", children: title }),
3523
+ total > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge, { size: "sm", variant: "accent", children: total }),
3524
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3525
+ Button,
3526
+ {
3527
+ type: "button",
3528
+ variant: "ghost",
3529
+ size: "sm",
3530
+ onClick: handleReset,
3531
+ disabled: total === 0,
3532
+ className: "ml-auto",
3533
+ children: resetLabel
3534
+ }
3535
+ )
3536
+ ] }),
3537
+ facets.map((facet) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3538
+ FilterFacetGroup,
3539
+ {
3540
+ facet,
3541
+ selected: selection[facet.id] ?? [],
3542
+ counts: counts?.[facet.id],
3543
+ onToggle: toggle
3544
+ },
3545
+ facet.id
3546
+ ))
3547
+ ]
3320
3548
  }
3321
3549
  );
3322
3550
  });
3323
- Menubar.displayName = "Menubar";
3324
- var MenubarMenu = RadixMenubar.Menu;
3325
- var MenubarTrigger = (0, import_react54.forwardRef)(
3326
- function MenubarTrigger2({ className, ...props }, ref) {
3327
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3328
- RadixMenubar.Trigger,
3551
+ FilterPanel.displayName = "FilterPanel";
3552
+ function FilterFacetGroup({ facet, selected, counts, onToggle }) {
3553
+ const collapsible = facet.collapsible ?? true;
3554
+ const [open, setOpen] = (0, import_react56.useState)(facet.defaultOpen ?? true);
3555
+ const isOpen = !collapsible || open;
3556
+ const selectedCount = selected.length;
3557
+ const headingClass = "text-text-muted flex items-center gap-[6px] font-mono text-[10px] tracking-[1.4px] uppercase";
3558
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("section", { className: "flex flex-col gap-1", children: [
3559
+ collapsible ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3560
+ "button",
3329
3561
  {
3330
- ref,
3562
+ type: "button",
3563
+ "aria-expanded": isOpen,
3564
+ onClick: () => setOpen((v) => !v),
3331
3565
  className: cn(
3332
- "text-text cursor-pointer rounded-xs border-0 bg-transparent px-[10px] py-1 text-[12px] outline-none",
3333
- "transition-colors duration-(--duration-micro)",
3334
- "data-[state=open]:bg-panel-2 hover:bg-panel-2",
3566
+ headingClass,
3567
+ "cursor-pointer rounded-xs px-1 py-[2px] outline-none",
3335
3568
  "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3336
- className
3569
+ "hover:text-text"
3337
3570
  ),
3338
- ...props
3571
+ children: [
3572
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex-1 text-left", children: facet.label }),
3573
+ selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge, { size: "sm", variant: "neutral", children: selectedCount }),
3574
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-70", children: isOpen ? "\u25BE" : "\u25B8" })
3575
+ ]
3339
3576
  }
3340
- );
3341
- }
3342
- );
3343
- MenubarTrigger.displayName = "MenubarTrigger";
3344
- var MenubarContent = (0, import_react54.forwardRef)(
3345
- function MenubarContent2({ className, sideOffset = 6, align = "start", ...props }, ref) {
3346
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(RadixMenubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3347
- RadixMenubar.Content,
3348
- {
3349
- ref,
3350
- sideOffset,
3351
- align,
3352
- className: cn(
3353
- "border-border-strong bg-panel z-popover min-w-[180px] rounded-md border p-1 shadow-lg outline-none",
3354
- "data-[state=open]:animate-[ship-pop-in_140ms_var(--easing-out)]",
3355
- className
3577
+ ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: cn(headingClass, "px-1 py-[2px]"), children: [
3578
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex-1", children: facet.label }),
3579
+ selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge, { size: "sm", variant: "neutral", children: selectedCount })
3580
+ ] }),
3581
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { className: "m-0 flex list-none flex-col gap-[2px] p-0", children: facet.options.map((option) => {
3582
+ const isSelected = selected.includes(option.value);
3583
+ const count = counts?.[option.value];
3584
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("li", { className: "flex items-center gap-2 px-1 py-[3px]", children: [
3585
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3586
+ Checkbox,
3587
+ {
3588
+ checked: isSelected,
3589
+ onCheckedChange: (next) => onToggle(facet.id, option.value, next === true),
3590
+ label: option.label
3591
+ }
3356
3592
  ),
3357
- ...props
3358
- }
3359
- ) });
3360
- }
3361
- );
3362
- MenubarContent.displayName = "MenubarContent";
3363
- var itemBase3 = cn(
3364
- "flex items-center gap-2 rounded-sm px-[10px] py-[6px] text-[12px] cursor-pointer outline-none",
3365
- "data-[highlighted]:bg-panel-2",
3366
- "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed"
3593
+ typeof count === "number" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-text-dim ml-auto font-mono text-[10px] tabular-nums", children: count })
3594
+ ] }, option.value);
3595
+ }) })
3596
+ ] });
3597
+ }
3598
+
3599
+ // src/patterns/HealthScore/HealthScore.tsx
3600
+ var import_react58 = require("react");
3601
+
3602
+ // src/patterns/RadialProgress/RadialProgress.tsx
3603
+ var import_react57 = require("react");
3604
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3605
+ var toneStrokeClass = {
3606
+ accent: "stroke-accent",
3607
+ ok: "stroke-ok",
3608
+ warn: "stroke-warn",
3609
+ err: "stroke-err"
3610
+ };
3611
+ var RadialProgress = (0, import_react57.forwardRef)(
3612
+ function RadialProgress2({
3613
+ value,
3614
+ max = 100,
3615
+ size = 64,
3616
+ thickness = 4,
3617
+ tone,
3618
+ children,
3619
+ className,
3620
+ "aria-label": ariaLabel,
3621
+ ...props
3622
+ }, ref) {
3623
+ const clamped = Math.min(max, Math.max(0, value));
3624
+ const pct = max > 0 ? clamped / max * 100 : 0;
3625
+ const r = (size - thickness) / 2;
3626
+ const c = 2 * Math.PI * r;
3627
+ const dash = pct / 100 * c;
3628
+ const resolvedTone = tone ?? (clamped >= max ? "ok" : "accent");
3629
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3630
+ "div",
3631
+ {
3632
+ ref,
3633
+ role: "progressbar",
3634
+ "aria-valuemin": 0,
3635
+ "aria-valuemax": max,
3636
+ "aria-valuenow": Math.round(pct),
3637
+ "aria-label": ariaLabel ?? `${Math.round(pct)}%`,
3638
+ className: cn("relative inline-grid place-items-center", className),
3639
+ style: { width: size, height: size },
3640
+ ...props,
3641
+ children: [
3642
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
3643
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3644
+ "circle",
3645
+ {
3646
+ cx: size / 2,
3647
+ cy: size / 2,
3648
+ r,
3649
+ fill: "none",
3650
+ strokeWidth: thickness,
3651
+ className: "stroke-panel-2"
3652
+ }
3653
+ ),
3654
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3655
+ "circle",
3656
+ {
3657
+ cx: size / 2,
3658
+ cy: size / 2,
3659
+ r,
3660
+ fill: "none",
3661
+ strokeWidth: thickness,
3662
+ strokeLinecap: "round",
3663
+ strokeDasharray: `${dash} ${c}`,
3664
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
3665
+ className: cn(
3666
+ "transition-[stroke-dasharray] duration-(--duration-step)",
3667
+ toneStrokeClass[resolvedTone]
3668
+ )
3669
+ }
3670
+ )
3671
+ ] }),
3672
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "absolute inset-0 grid place-items-center font-mono text-[11px] font-medium tabular-nums", children: children ?? `${Math.round(pct)}%` })
3673
+ ]
3674
+ }
3675
+ );
3676
+ }
3367
3677
  );
3368
- var MenubarItem = (0, import_react54.forwardRef)(function MenubarItem2({ trailing, destructive, className, children, ...props }, ref) {
3369
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3678
+ RadialProgress.displayName = "RadialProgress";
3679
+
3680
+ // src/patterns/HealthScore/HealthScore.tsx
3681
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3682
+ function deltaTone(delta) {
3683
+ if (delta > 0) return "ok";
3684
+ if (delta < 0) return "err";
3685
+ return "accent";
3686
+ }
3687
+ function deltaGlyph(delta) {
3688
+ if (delta > 0) return "\u2191";
3689
+ if (delta < 0) return "\u2193";
3690
+ return "\xB7";
3691
+ }
3692
+ var toneTextClass = {
3693
+ accent: "text-text-muted",
3694
+ ok: "text-ok",
3695
+ warn: "text-warn",
3696
+ err: "text-err"
3697
+ };
3698
+ var HealthScore = (0, import_react58.forwardRef)(function HealthScore2({
3699
+ value,
3700
+ max = 100,
3701
+ delta,
3702
+ label,
3703
+ breakdown,
3704
+ size = 72,
3705
+ tone,
3706
+ className,
3707
+ "aria-label": ariaLabel,
3708
+ ...props
3709
+ }, ref) {
3710
+ const pct = max > 0 ? Math.round(Math.min(max, Math.max(0, value)) / max * 100) : 0;
3711
+ const resolvedTone = tone ?? (pct >= 80 ? "ok" : pct >= 50 ? "accent" : "warn");
3712
+ const indicatorTone = typeof delta === "number" ? deltaTone(delta) : "accent";
3713
+ const core = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
3714
+ "div",
3715
+ {
3716
+ ref,
3717
+ className: cn("inline-flex flex-col items-center gap-1", className),
3718
+ "aria-label": ariaLabel ?? `${pct}% health`,
3719
+ ...props,
3720
+ children: [
3721
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(RadialProgress, { value, max, size, tone: resolvedTone }),
3722
+ label && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "text-text-muted mt-1 text-[12px] leading-tight", children: label }),
3723
+ typeof delta === "number" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("font-mono text-[11px] tabular-nums", toneTextClass[indicatorTone]), children: [
3724
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": true, children: deltaGlyph(delta) }),
3725
+ " ",
3726
+ Math.abs(delta)
3727
+ ] })
3728
+ ]
3729
+ }
3730
+ );
3731
+ if (!breakdown || breakdown.length === 0) {
3732
+ return core;
3733
+ }
3734
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3735
+ HoverCard,
3736
+ {
3737
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "inline-flex", children: core }),
3738
+ content: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex min-w-[180px] flex-col gap-2", children: [
3739
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "text-text-dim font-mono text-[9px] tracking-[1.4px] uppercase", children: "Breakdown" }),
3740
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("ul", { className: "m-0 flex list-none flex-col gap-1 p-0 text-[12px]", children: breakdown.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("li", { className: "flex items-center gap-2", children: [
3741
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-muted flex-1 truncate", children: entry.label }),
3742
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3743
+ "span",
3744
+ {
3745
+ className: cn(
3746
+ "font-mono tabular-nums",
3747
+ entry.tone ? toneTextClass[entry.tone] : "text-text"
3748
+ ),
3749
+ children: entry.value
3750
+ }
3751
+ )
3752
+ ] }, i)) })
3753
+ ] })
3754
+ }
3755
+ );
3756
+ });
3757
+ HealthScore.displayName = "HealthScore";
3758
+
3759
+ // src/patterns/Menubar/Menubar.tsx
3760
+ var RadixMenubar = __toESM(require("@radix-ui/react-menubar"), 1);
3761
+ var import_react59 = require("react");
3762
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3763
+ var Menubar = (0, import_react59.forwardRef)(function Menubar2({ className, ...props }, ref) {
3764
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3765
+ RadixMenubar.Root,
3766
+ {
3767
+ ref,
3768
+ className: cn(
3769
+ "border-border bg-panel flex h-[30px] items-center gap-[2px] border-b px-3",
3770
+ className
3771
+ ),
3772
+ ...props
3773
+ }
3774
+ );
3775
+ });
3776
+ Menubar.displayName = "Menubar";
3777
+ var MenubarMenu = RadixMenubar.Menu;
3778
+ var MenubarTrigger = (0, import_react59.forwardRef)(
3779
+ function MenubarTrigger2({ className, ...props }, ref) {
3780
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3781
+ RadixMenubar.Trigger,
3782
+ {
3783
+ ref,
3784
+ className: cn(
3785
+ "text-text cursor-pointer rounded-xs border-0 bg-transparent px-[10px] py-1 text-[12px] outline-none",
3786
+ "transition-colors duration-(--duration-micro)",
3787
+ "data-[state=open]:bg-panel-2 hover:bg-panel-2",
3788
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3789
+ className
3790
+ ),
3791
+ ...props
3792
+ }
3793
+ );
3794
+ }
3795
+ );
3796
+ MenubarTrigger.displayName = "MenubarTrigger";
3797
+ var MenubarContent = (0, import_react59.forwardRef)(
3798
+ function MenubarContent2({ className, sideOffset = 6, align = "start", ...props }, ref) {
3799
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(RadixMenubar.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3800
+ RadixMenubar.Content,
3801
+ {
3802
+ ref,
3803
+ sideOffset,
3804
+ align,
3805
+ className: cn(
3806
+ "border-border-strong bg-panel z-popover min-w-[180px] rounded-md border p-1 shadow-lg outline-none",
3807
+ "data-[state=open]:animate-[ship-pop-in_140ms_var(--easing-out)]",
3808
+ className
3809
+ ),
3810
+ ...props
3811
+ }
3812
+ ) });
3813
+ }
3814
+ );
3815
+ MenubarContent.displayName = "MenubarContent";
3816
+ var itemBase3 = cn(
3817
+ "flex items-center gap-2 rounded-sm px-[10px] py-[6px] text-[12px] cursor-pointer outline-none",
3818
+ "data-[highlighted]:bg-panel-2",
3819
+ "data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed"
3820
+ );
3821
+ var MenubarItem = (0, import_react59.forwardRef)(function MenubarItem2({ trailing, destructive, className, children, ...props }, ref) {
3822
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
3370
3823
  RadixMenubar.Item,
3371
3824
  {
3372
3825
  ref,
3373
3826
  className: cn(itemBase3, destructive ? "text-err" : "text-text", className),
3374
3827
  ...props,
3375
3828
  children: [
3376
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex-1", children }),
3377
- trailing && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
3829
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1", children }),
3830
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-text-dim font-mono text-[10px]", children: trailing })
3378
3831
  ]
3379
3832
  }
3380
3833
  );
3381
3834
  });
3382
3835
  MenubarItem.displayName = "MenubarItem";
3383
- var MenubarSeparator = (0, import_react54.forwardRef)(
3836
+ var MenubarSeparator = (0, import_react59.forwardRef)(
3384
3837
  function MenubarSeparator2({ className, ...props }, ref) {
3385
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3838
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3386
3839
  RadixMenubar.Separator,
3387
3840
  {
3388
3841
  ref,
3389
- className: cn("bg-border my-1 h-px", className),
3390
- ...props
3842
+ className: cn("bg-border my-1 h-px", className),
3843
+ ...props
3844
+ }
3845
+ );
3846
+ }
3847
+ );
3848
+ MenubarSeparator.displayName = "MenubarSeparator";
3849
+
3850
+ // src/patterns/NavBar/NavBar.tsx
3851
+ var RadixNav = __toESM(require("@radix-ui/react-navigation-menu"), 1);
3852
+ var import_react61 = require("react");
3853
+
3854
+ // src/patterns/Sidebar/Sidebar.tsx
3855
+ var import_react60 = require("react");
3856
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3857
+ var Sidebar = (0, import_react60.forwardRef)(function Sidebar2({ width = 240, className, style, ...props }, ref) {
3858
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3859
+ "aside",
3860
+ {
3861
+ ref,
3862
+ style: { width, ...style },
3863
+ className: cn(
3864
+ "border-border bg-panel flex h-full flex-col gap-2 border-r p-[14px]",
3865
+ className
3866
+ ),
3867
+ ...props
3868
+ }
3869
+ );
3870
+ });
3871
+ Sidebar.displayName = "Sidebar";
3872
+ var NavItem = (0, import_react60.forwardRef)(
3873
+ function NavItem2({ icon, label, active, badge, href, disabled, className, ...props }, ref) {
3874
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
3875
+ icon && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: icon }),
3876
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "flex-1 truncate", children: label }),
3877
+ badge != null && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3878
+ "span",
3879
+ {
3880
+ className: cn(
3881
+ "rounded-xs px-[6px] py-px font-mono text-[10px]",
3882
+ active ? "bg-accent text-on-accent" : "bg-panel-2 text-text-muted"
3883
+ ),
3884
+ children: badge
3885
+ }
3886
+ )
3887
+ ] });
3888
+ const baseClass = cn(
3889
+ "flex cursor-pointer items-center gap-[10px] rounded-xs px-2 py-[6px] text-[13px] outline-none",
3890
+ "transition-colors duration-(--duration-micro)",
3891
+ "focus-visible:ring-[3px] focus-visible:ring-accent-dim",
3892
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
3893
+ disabled && "opacity-50 pointer-events-none",
3894
+ className
3895
+ );
3896
+ if (href) {
3897
+ const anchorProps = props;
3898
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3899
+ "a",
3900
+ {
3901
+ ref,
3902
+ href,
3903
+ "aria-current": active ? "page" : void 0,
3904
+ "aria-disabled": disabled || void 0,
3905
+ className: baseClass,
3906
+ ...anchorProps,
3907
+ children: inner
3908
+ }
3909
+ );
3910
+ }
3911
+ const buttonProps = props;
3912
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3913
+ "button",
3914
+ {
3915
+ ref,
3916
+ type: "button",
3917
+ "aria-current": active ? "page" : void 0,
3918
+ disabled,
3919
+ className: cn(baseClass, "w-full text-left"),
3920
+ ...buttonProps,
3921
+ children: inner
3922
+ }
3923
+ );
3924
+ }
3925
+ );
3926
+ NavItem.displayName = "NavItem";
3927
+ var NavSection = (0, import_react60.forwardRef)(function NavSection2({
3928
+ label,
3929
+ icon,
3930
+ action,
3931
+ collapsible = false,
3932
+ defaultOpen = true,
3933
+ open,
3934
+ onOpenChange,
3935
+ indent = 0,
3936
+ className,
3937
+ children,
3938
+ ...props
3939
+ }, ref) {
3940
+ const isControlled = open !== void 0;
3941
+ const [internalOpen, setInternalOpen] = (0, import_react60.useState)(defaultOpen);
3942
+ const isOpen = !collapsible || (isControlled ? open : internalOpen);
3943
+ const toggle = (0, import_react60.useCallback)(() => {
3944
+ const next = !isOpen;
3945
+ if (!isControlled) setInternalOpen(next);
3946
+ onOpenChange?.(next);
3947
+ }, [isOpen, isControlled, onOpenChange]);
3948
+ const eyebrowClass = "text-text-dim flex items-center gap-[6px] px-2 pt-2 font-mono text-[9px] tracking-[1.4px] uppercase";
3949
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
3950
+ collapsible ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
3951
+ "button",
3952
+ {
3953
+ type: "button",
3954
+ "aria-expanded": isOpen,
3955
+ onClick: toggle,
3956
+ className: cn(
3957
+ eyebrowClass,
3958
+ "cursor-pointer rounded-xs outline-none",
3959
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
3960
+ "hover:text-text-muted"
3961
+ ),
3962
+ children: [
3963
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: icon }),
3964
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "flex-1 text-left", children: label }),
3965
+ action,
3966
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-70", children: isOpen ? "\u25BE" : "\u25B8" })
3967
+ ]
3968
+ }
3969
+ ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: eyebrowClass, children: [
3970
+ icon != null && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: icon }),
3971
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "flex-1", children: label }),
3972
+ action
3973
+ ] }),
3974
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3975
+ "div",
3976
+ {
3977
+ className: cn("flex flex-col gap-[2px]", indent > 0 && "border-border ml-2 border-l"),
3978
+ style: indent > 0 ? { paddingLeft: indent } : void 0,
3979
+ children
3980
+ }
3981
+ )
3982
+ ] });
3983
+ });
3984
+ NavSection.displayName = "NavSection";
3985
+
3986
+ // src/patterns/NavBar/NavBar.tsx
3987
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3988
+ function isActiveTree(item, activeId) {
3989
+ if (item.id === activeId) return true;
3990
+ return item.children?.some((c) => isActiveTree(c, activeId)) ?? false;
3991
+ }
3992
+ var NavBar = (0, import_react61.forwardRef)(function NavBar2({
3993
+ orientation = "horizontal",
3994
+ items,
3995
+ brand,
3996
+ actions,
3997
+ value,
3998
+ defaultValue,
3999
+ onValueChange,
4000
+ width = 240,
4001
+ responsive = true,
4002
+ className,
4003
+ ...props
4004
+ }, ref) {
4005
+ const isControlled = value !== void 0;
4006
+ const [internalValue, setInternalValue] = (0, import_react61.useState)(defaultValue);
4007
+ const activeId = isControlled ? value : internalValue;
4008
+ const [drawerOpen, setDrawerOpen] = (0, import_react61.useState)(false);
4009
+ const select = (0, import_react61.useCallback)(
4010
+ (id) => {
4011
+ if (!isControlled) setInternalValue(id);
4012
+ onValueChange?.(id);
4013
+ },
4014
+ [isControlled, onValueChange]
4015
+ );
4016
+ const handleItemActivate = (0, import_react61.useCallback)(
4017
+ (id) => {
4018
+ select(id);
4019
+ setDrawerOpen(false);
4020
+ },
4021
+ [select]
4022
+ );
4023
+ const drawerBody = (
4024
+ // Distinct aria-label from the desktop <aside>'s <nav> below — when the
4025
+ // drawer is open on a viewport that's resizing past `md`, both navs can
4026
+ // sit in the DOM together. Identical accessible names would trip axe's
4027
+ // `landmark-unique` rule.
4028
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("nav", { "aria-label": "Mobile navigation", className: "flex flex-col gap-1", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4029
+ VerticalItem,
4030
+ {
4031
+ item,
4032
+ activeId,
4033
+ onActivate: handleItemActivate
4034
+ },
4035
+ item.id
4036
+ )) })
4037
+ );
4038
+ const mobileBar = responsive ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4039
+ "div",
4040
+ {
4041
+ className: cn(
4042
+ "border-border bg-panel z-overlay sticky top-0 flex h-[52px] items-center gap-4 border-b px-5 md:hidden"
4043
+ ),
4044
+ children: [
4045
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4046
+ "button",
4047
+ {
4048
+ type: "button",
4049
+ onClick: () => setDrawerOpen(true),
4050
+ "aria-label": "Open navigation",
4051
+ className: "text-text-muted hover:text-text focus-visible:ring-accent-dim rounded-xs px-2 py-1 text-[18px] outline-none focus-visible:ring-[3px]",
4052
+ children: "\u2630"
4053
+ }
4054
+ ),
4055
+ brand && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex flex-1 items-center text-[13px] font-medium whitespace-nowrap", children: brand }),
4056
+ actions && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-center gap-3", children: actions })
4057
+ ]
4058
+ }
4059
+ ) : null;
4060
+ if (orientation === "horizontal") {
4061
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4062
+ mobileBar,
4063
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4064
+ "header",
4065
+ {
4066
+ ref,
4067
+ className: cn(
4068
+ "border-border bg-panel flex h-[52px] items-center gap-4 border-b px-5",
4069
+ responsive && "hidden md:flex",
4070
+ className
4071
+ ),
4072
+ ...props,
4073
+ children: [
4074
+ brand && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "shrink-0 text-[13px] font-medium whitespace-nowrap", children: brand }),
4075
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(RadixNav.Root, { className: "relative flex-1", delayDuration: 120, children: [
4076
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.List, { className: "m-0! flex list-none! items-center gap-1 p-0! [&_li]:m-0!", children: items.map(
4077
+ (item) => item.children?.length ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4078
+ HorizontalDropdown,
4079
+ {
4080
+ item,
4081
+ active: isActiveTree(item, activeId),
4082
+ activeId,
4083
+ onActivate: handleItemActivate
4084
+ },
4085
+ item.id
4086
+ ) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4087
+ HorizontalLink,
4088
+ {
4089
+ item,
4090
+ active: item.id === activeId,
4091
+ onActivate: handleItemActivate
4092
+ }
4093
+ ) }, item.id)
4094
+ ) }),
4095
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "z-popover absolute top-full left-0 flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.Viewport, { className: "origin-top-left data-[state=open]:animate-[ship-fade-in_120ms_var(--easing-out)]" }) })
4096
+ ] }),
4097
+ actions && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex items-center gap-3", children: actions })
4098
+ ]
4099
+ }
4100
+ ),
4101
+ responsive && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4102
+ Drawer,
4103
+ {
4104
+ open: drawerOpen,
4105
+ onOpenChange: setDrawerOpen,
4106
+ side: "left",
4107
+ title: brand ?? "Navigation",
4108
+ width: 300,
4109
+ children: drawerBody
4110
+ }
4111
+ )
4112
+ ] });
4113
+ }
4114
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4115
+ mobileBar,
4116
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4117
+ "aside",
4118
+ {
4119
+ ref,
4120
+ "aria-label": "Primary navigation",
4121
+ style: { width },
4122
+ className: cn(
4123
+ "border-border bg-panel flex h-full flex-col gap-2 border-r p-[14px]",
4124
+ responsive && "hidden md:flex",
4125
+ className
4126
+ ),
4127
+ ...props,
4128
+ children: [
4129
+ brand && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "px-2 py-1 text-[13px] font-medium", children: brand }),
4130
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("nav", { "aria-label": "Sidebar navigation", className: "flex flex-1 flex-col gap-1 overflow-y-auto", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4131
+ VerticalItem,
4132
+ {
4133
+ item,
4134
+ activeId,
4135
+ onActivate: handleItemActivate
4136
+ },
4137
+ item.id
4138
+ )) }),
4139
+ actions && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "border-border mt-auto flex flex-col gap-2 border-t pt-3", children: actions })
4140
+ ]
4141
+ }
4142
+ ),
4143
+ responsive && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4144
+ Drawer,
4145
+ {
4146
+ open: drawerOpen,
4147
+ onOpenChange: setDrawerOpen,
4148
+ side: "left",
4149
+ title: brand ?? "Navigation",
4150
+ width: 300,
4151
+ children: drawerBody
4152
+ }
4153
+ )
4154
+ ] });
4155
+ });
4156
+ NavBar.displayName = "NavBar";
4157
+ function HorizontalLink({ item, active, onActivate }) {
4158
+ const baseClass = cn(
4159
+ "flex items-center gap-[6px] rounded-xs px-3 py-[6px] text-[13px] outline-none",
4160
+ "transition-colors duration-(--duration-micro)",
4161
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
4162
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
4163
+ item.disabled && "pointer-events-none opacity-50"
4164
+ );
4165
+ const handleClick = (e) => {
4166
+ if (item.disabled) {
4167
+ e.preventDefault();
4168
+ return;
4169
+ }
4170
+ onActivate(item.id);
4171
+ };
4172
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4173
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
4174
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: item.label }),
4175
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ItemBadge, { active, children: item.badge })
4176
+ ] });
4177
+ if (item.href) {
4178
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4179
+ "a",
4180
+ {
4181
+ href: item.href,
4182
+ "aria-current": active ? "page" : void 0,
4183
+ "aria-disabled": item.disabled || void 0,
4184
+ className: baseClass,
4185
+ onClick: handleClick,
4186
+ children: inner
4187
+ }
4188
+ ) });
4189
+ }
4190
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4191
+ "button",
4192
+ {
4193
+ type: "button",
4194
+ "aria-current": active ? "page" : void 0,
4195
+ disabled: item.disabled,
4196
+ className: baseClass,
4197
+ onClick: handleClick,
4198
+ children: inner
4199
+ }
4200
+ ) });
4201
+ }
4202
+ function HorizontalDropdown({ item, active, activeId, onActivate }) {
4203
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(RadixNav.Item, { children: [
4204
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4205
+ RadixNav.Trigger,
4206
+ {
4207
+ className: cn(
4208
+ "group flex items-center gap-1 rounded-xs px-3 py-[6px] text-[13px] outline-none",
4209
+ "transition-colors duration-(--duration-micro)",
4210
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
4211
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
4212
+ "data-[state=open]:bg-panel-2"
4213
+ ),
4214
+ disabled: item.disabled,
4215
+ children: [
4216
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
4217
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children: item.label }),
4218
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4219
+ "span",
4220
+ {
4221
+ "aria-hidden": true,
4222
+ className: "ml-1 text-[10px] opacity-70 transition-transform group-data-[state=open]:rotate-180",
4223
+ children: "\u25BE"
4224
+ }
4225
+ )
4226
+ ]
4227
+ }
4228
+ ),
4229
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.Content, { className: "border-border bg-panel min-w-[220px] rounded-xs border p-2 shadow-lg", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: "m-0! flex list-none! flex-col gap-[2px] p-0! [&_li]:m-0!", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownLink, { item: child, active: child.id === activeId, onActivate }) }, child.id)) }) })
4230
+ ] });
4231
+ }
4232
+ function DropdownLink({ item, active, onActivate }) {
4233
+ const baseClass = cn(
4234
+ "flex w-full items-center gap-2 rounded-xs px-2 py-[6px] text-left text-[13px] outline-none",
4235
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
4236
+ active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
4237
+ item.disabled && "pointer-events-none opacity-50"
4238
+ );
4239
+ const handleClick = (e) => {
4240
+ if (item.disabled) {
4241
+ e.preventDefault();
4242
+ return;
4243
+ }
4244
+ onActivate(item.id);
4245
+ };
4246
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
4247
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: "opacity-80", children: item.icon }),
4248
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "flex-1", children: item.label }),
4249
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ItemBadge, { active, children: item.badge })
4250
+ ] });
4251
+ if (item.href) {
4252
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4253
+ "a",
4254
+ {
4255
+ href: item.href,
4256
+ "aria-current": active ? "page" : void 0,
4257
+ "aria-disabled": item.disabled || void 0,
4258
+ className: baseClass,
4259
+ onClick: handleClick,
4260
+ children: inner
4261
+ }
4262
+ ) });
4263
+ }
4264
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(RadixNav.Link, { asChild: true, active, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4265
+ "button",
4266
+ {
4267
+ type: "button",
4268
+ "aria-current": active ? "page" : void 0,
4269
+ disabled: item.disabled,
4270
+ className: baseClass,
4271
+ onClick: handleClick,
4272
+ children: inner
4273
+ }
4274
+ ) });
4275
+ }
4276
+ function VerticalItem({ item, activeId, onActivate }) {
4277
+ const hasChildren = (item.children?.length ?? 0) > 0;
4278
+ const treeActive = isActiveTree(item, activeId);
4279
+ const [open, setOpen] = (0, import_react61.useState)(treeActive);
4280
+ const prevTreeActive = (0, import_react61.useRef)(treeActive);
4281
+ (0, import_react61.useEffect)(() => {
4282
+ if (treeActive && !prevTreeActive.current) setOpen(true);
4283
+ prevTreeActive.current = treeActive;
4284
+ }, [treeActive]);
4285
+ if (!hasChildren) {
4286
+ const handleClick = (e) => {
4287
+ if (item.disabled) {
4288
+ e.preventDefault();
4289
+ return;
4290
+ }
4291
+ onActivate(item.id);
4292
+ };
4293
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4294
+ NavItem,
4295
+ {
4296
+ icon: item.icon,
4297
+ label: item.label,
4298
+ active: item.id === activeId,
4299
+ badge: item.badge,
4300
+ disabled: item.disabled,
4301
+ href: item.href,
4302
+ onClick: handleClick
4303
+ }
4304
+ );
4305
+ }
4306
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col", children: [
4307
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4308
+ "button",
4309
+ {
4310
+ type: "button",
4311
+ "aria-expanded": open,
4312
+ onClick: () => setOpen((o) => !o),
4313
+ disabled: item.disabled,
4314
+ className: cn(
4315
+ "flex w-full items-center gap-[10px] rounded-xs px-2 py-[6px] text-left text-[13px] outline-none",
4316
+ "transition-colors duration-(--duration-micro)",
4317
+ "focus-visible:ring-accent-dim focus-visible:ring-[3px]",
4318
+ treeActive ? "text-text" : "text-text-muted",
4319
+ "hover:bg-panel-2",
4320
+ item.disabled && "pointer-events-none opacity-50"
4321
+ ),
4322
+ children: [
4323
+ item.icon != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: item.icon }),
4324
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "flex-1 truncate", children: item.label }),
4325
+ item.badge != null && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ItemBadge, { active: treeActive, children: item.badge }),
4326
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: "text-[10px] opacity-60", children: open ? "\u25BE" : "\u25B8" })
4327
+ ]
4328
+ }
4329
+ ),
4330
+ open && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "border-border mt-1 ml-[18px] flex flex-col gap-[2px] border-l pl-3", children: item.children.map((child) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(VerticalItem, { item: child, activeId, onActivate }, child.id)) })
4331
+ ] });
4332
+ }
4333
+ function ItemBadge({ active, children }) {
4334
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4335
+ "span",
4336
+ {
4337
+ className: cn(
4338
+ "rounded-xs px-[6px] py-px font-mono text-[10px]",
4339
+ active ? "bg-accent text-on-accent" : "bg-panel-2 text-text-muted"
4340
+ ),
4341
+ children
4342
+ }
4343
+ );
4344
+ }
4345
+
4346
+ // src/patterns/OnboardingChecklist/OnboardingChecklist.tsx
4347
+ var import_react62 = require("react");
4348
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4349
+ var statusDot = {
4350
+ pending: "off",
4351
+ "in-progress": "sync",
4352
+ done: "ok"
4353
+ };
4354
+ var labelStateClass = {
4355
+ pending: "text-text",
4356
+ "in-progress": "text-text",
4357
+ done: "text-text-dim line-through"
4358
+ };
4359
+ var OnboardingChecklist = (0, import_react62.forwardRef)(
4360
+ function OnboardingChecklist2({ items, onItemClick, title = "Get started", progressLabel, hideProgress, className, ...props }, ref) {
4361
+ const total = items.length;
4362
+ const done = items.filter((i) => i.status === "done").length;
4363
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4364
+ "section",
4365
+ {
4366
+ ref,
4367
+ "aria-label": typeof title === "string" ? title : void 0,
4368
+ className: cn(
4369
+ "rounded-base border-border bg-panel flex flex-col gap-3 border p-5",
4370
+ className
4371
+ ),
4372
+ ...props,
4373
+ children: [
4374
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("header", { className: "flex items-center gap-2", children: [
4375
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-[14px] font-medium", children: title }),
4376
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-text-dim ml-auto font-mono text-[11px] tabular-nums", children: progressLabel ?? `${done} of ${total} complete` })
4377
+ ] }),
4378
+ !hideProgress && total > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4379
+ "div",
4380
+ {
4381
+ role: "progressbar",
4382
+ "aria-valuemin": 0,
4383
+ "aria-valuemax": total,
4384
+ "aria-valuenow": done,
4385
+ "aria-label": typeof title === "string" ? `${title} progress` : "Setup progress",
4386
+ className: "bg-panel-2 h-[3px] w-full overflow-hidden rounded-full",
4387
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4388
+ "span",
4389
+ {
4390
+ "aria-hidden": true,
4391
+ className: cn(
4392
+ "block h-full rounded-full transition-[width] duration-(--duration-step)",
4393
+ done === total ? "bg-ok" : "bg-accent"
4394
+ ),
4395
+ style: { width: `${total > 0 ? done / total * 100 : 0}%` }
4396
+ }
4397
+ )
4398
+ }
4399
+ ),
4400
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("ul", { className: "m-0 flex list-none flex-col gap-1 p-0", children: items.map((item) => {
4401
+ const interactive = typeof onItemClick === "function";
4402
+ const labelBlock = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4403
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4404
+ StatusDot,
4405
+ {
4406
+ state: statusDot[item.status],
4407
+ pulse: item.status === "in-progress",
4408
+ size: 10,
4409
+ className: "mt-[3px]"
4410
+ }
4411
+ ),
4412
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-[2px]", children: [
4413
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: cn("text-[13px]", labelStateClass[item.status]), children: item.label }),
4414
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-text-muted text-[12px] leading-[1.45]", children: item.description })
4415
+ ] })
4416
+ ] });
4417
+ const labelRegionClass = cn(
4418
+ "flex flex-1 items-start gap-3 rounded-md px-2 py-2 text-left transition-colors duration-(--duration-micro)",
4419
+ interactive && "cursor-pointer outline-none hover:bg-panel-2 focus-visible:ring-[3px] focus-visible:ring-accent-dim"
4420
+ );
4421
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("li", { className: "flex items-start gap-2", children: [
4422
+ interactive ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4423
+ "button",
4424
+ {
4425
+ type: "button",
4426
+ "aria-current": item.status === "in-progress" ? "step" : void 0,
4427
+ onClick: () => onItemClick(item.id),
4428
+ className: labelRegionClass,
4429
+ children: labelBlock
4430
+ }
4431
+ ) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: labelRegionClass, children: labelBlock }),
4432
+ item.action && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "shrink-0 self-center", children: item.action })
4433
+ ] }, item.id);
4434
+ }) })
4435
+ ]
3391
4436
  }
3392
4437
  );
3393
4438
  }
3394
4439
  );
3395
- MenubarSeparator.displayName = "MenubarSeparator";
4440
+ OnboardingChecklist.displayName = "OnboardingChecklist";
3396
4441
 
3397
4442
  // src/patterns/Pagination/Pagination.tsx
3398
- var import_react55 = require("react");
3399
- var import_jsx_runtime48 = require("react/jsx-runtime");
4443
+ var import_react63 = require("react");
4444
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3400
4445
  function buildRange(page, total, siblings) {
3401
4446
  if (total <= 0) return [];
3402
4447
  const items = [];
@@ -3409,9 +4454,9 @@ function buildRange(page, total, siblings) {
3409
4454
  if (total > 1) items.push(total);
3410
4455
  return items;
3411
4456
  }
3412
- var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, total, onPageChange, siblings = 1, className, ...props }, ref) {
4457
+ var Pagination = (0, import_react63.forwardRef)(function Pagination2({ page, total, onPageChange, siblings = 1, className, ...props }, ref) {
3413
4458
  const items = buildRange(page, total, siblings);
3414
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
4459
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
3415
4460
  "nav",
3416
4461
  {
3417
4462
  ref,
@@ -3419,7 +4464,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3419
4464
  className: cn("inline-flex items-center gap-1", className),
3420
4465
  ...props,
3421
4466
  children: [
3422
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4467
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3423
4468
  IconButton,
3424
4469
  {
3425
4470
  size: "sm",
@@ -3432,7 +4477,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3432
4477
  ),
3433
4478
  items.map((item, i) => {
3434
4479
  if (item === "start-ellipsis" || item === "end-ellipsis") {
3435
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4480
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3436
4481
  "span",
3437
4482
  {
3438
4483
  "aria-hidden": true,
@@ -3443,7 +4488,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3443
4488
  );
3444
4489
  }
3445
4490
  const isActive = item === page;
3446
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4491
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3447
4492
  "button",
3448
4493
  {
3449
4494
  type: "button",
@@ -3461,7 +4506,7 @@ var Pagination = (0, import_react55.forwardRef)(function Pagination2({ page, tot
3461
4506
  item
3462
4507
  );
3463
4508
  }),
3464
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4509
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3465
4510
  IconButton,
3466
4511
  {
3467
4512
  size: "sm",
@@ -3480,8 +4525,8 @@ Pagination.displayName = "Pagination";
3480
4525
 
3481
4526
  // src/patterns/Progress/Progress.tsx
3482
4527
  var import_class_variance_authority11 = require("class-variance-authority");
3483
- var import_react56 = require("react");
3484
- var import_jsx_runtime49 = require("react/jsx-runtime");
4528
+ var import_react64 = require("react");
4529
+ var import_jsx_runtime57 = require("react/jsx-runtime");
3485
4530
  var trackStyles = (0, import_class_variance_authority11.cva)("w-full rounded-full bg-panel-2 overflow-hidden", {
3486
4531
  variants: {
3487
4532
  size: {
@@ -3503,7 +4548,7 @@ var fillStyles = (0, import_class_variance_authority11.cva)("h-full rounded-full
3503
4548
  },
3504
4549
  defaultVariants: { tone: "accent" }
3505
4550
  });
3506
- var Progress = (0, import_react56.forwardRef)(function Progress2({
4551
+ var Progress = (0, import_react64.forwardRef)(function Progress2({
3507
4552
  value = 0,
3508
4553
  max = 100,
3509
4554
  indeterminate = false,
@@ -3517,15 +4562,15 @@ var Progress = (0, import_react56.forwardRef)(function Progress2({
3517
4562
  const clamped = Math.min(max, Math.max(0, value));
3518
4563
  const pct = max > 0 ? clamped / max * 100 : 0;
3519
4564
  const display = Math.round(pct);
3520
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
3521
- label != null && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex text-[12px]", children: [
3522
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-text-muted", children: label }),
3523
- showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "text-text ml-auto font-mono tabular-nums", children: [
4565
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
4566
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex text-[12px]", children: [
4567
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-text-muted", children: label }),
4568
+ showValue && !indeterminate && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "text-text ml-auto font-mono tabular-nums", children: [
3524
4569
  display,
3525
4570
  "%"
3526
4571
  ] })
3527
4572
  ] }),
3528
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4573
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3529
4574
  "div",
3530
4575
  {
3531
4576
  role: "progressbar",
@@ -3534,7 +4579,7 @@ var Progress = (0, import_react56.forwardRef)(function Progress2({
3534
4579
  "aria-valuenow": indeterminate ? void 0 : display,
3535
4580
  "aria-label": typeof label === "string" ? label : void 0,
3536
4581
  className: trackStyles({ size }),
3537
- children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4582
+ children: indeterminate ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
3538
4583
  "span",
3539
4584
  {
3540
4585
  "aria-hidden": true,
@@ -3544,178 +4589,16 @@ var Progress = (0, import_react56.forwardRef)(function Progress2({
3544
4589
  "animate-[ship-indeterminate_1.4s_linear_infinite]"
3545
4590
  )
3546
4591
  }
3547
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { "aria-hidden": true, className: fillStyles({ tone }), style: { width: `${pct}%` } })
4592
+ ) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { "aria-hidden": true, className: fillStyles({ tone }), style: { width: `${pct}%` } })
3548
4593
  }
3549
4594
  )
3550
4595
  ] });
3551
4596
  });
3552
4597
  Progress.displayName = "Progress";
3553
4598
 
3554
- // src/patterns/RadialProgress/RadialProgress.tsx
3555
- var import_react57 = require("react");
3556
- var import_jsx_runtime50 = require("react/jsx-runtime");
3557
- var toneStrokeClass = {
3558
- accent: "stroke-accent",
3559
- ok: "stroke-ok",
3560
- warn: "stroke-warn",
3561
- err: "stroke-err"
3562
- };
3563
- var RadialProgress = (0, import_react57.forwardRef)(
3564
- function RadialProgress2({
3565
- value,
3566
- max = 100,
3567
- size = 64,
3568
- thickness = 4,
3569
- tone,
3570
- children,
3571
- className,
3572
- "aria-label": ariaLabel,
3573
- ...props
3574
- }, ref) {
3575
- const clamped = Math.min(max, Math.max(0, value));
3576
- const pct = max > 0 ? clamped / max * 100 : 0;
3577
- const r = (size - thickness) / 2;
3578
- const c = 2 * Math.PI * r;
3579
- const dash = pct / 100 * c;
3580
- const resolvedTone = tone ?? (clamped >= max ? "ok" : "accent");
3581
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
3582
- "div",
3583
- {
3584
- ref,
3585
- role: "progressbar",
3586
- "aria-valuemin": 0,
3587
- "aria-valuemax": max,
3588
- "aria-valuenow": Math.round(pct),
3589
- "aria-label": ariaLabel ?? `${Math.round(pct)}%`,
3590
- className: cn("relative inline-grid place-items-center", className),
3591
- style: { width: size, height: size },
3592
- ...props,
3593
- children: [
3594
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
3595
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3596
- "circle",
3597
- {
3598
- cx: size / 2,
3599
- cy: size / 2,
3600
- r,
3601
- fill: "none",
3602
- strokeWidth: thickness,
3603
- className: "stroke-panel-2"
3604
- }
3605
- ),
3606
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3607
- "circle",
3608
- {
3609
- cx: size / 2,
3610
- cy: size / 2,
3611
- r,
3612
- fill: "none",
3613
- strokeWidth: thickness,
3614
- strokeLinecap: "round",
3615
- strokeDasharray: `${dash} ${c}`,
3616
- transform: `rotate(-90 ${size / 2} ${size / 2})`,
3617
- className: cn(
3618
- "transition-[stroke-dasharray] duration-(--duration-step)",
3619
- toneStrokeClass[resolvedTone]
3620
- )
3621
- }
3622
- )
3623
- ] }),
3624
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "absolute inset-0 grid place-items-center font-mono text-[11px] font-medium tabular-nums", children: children ?? `${Math.round(pct)}%` })
3625
- ]
3626
- }
3627
- );
3628
- }
3629
- );
3630
- RadialProgress.displayName = "RadialProgress";
3631
-
3632
- // src/patterns/Sidebar/Sidebar.tsx
3633
- var import_react58 = require("react");
3634
- var import_jsx_runtime51 = require("react/jsx-runtime");
3635
- var Sidebar = (0, import_react58.forwardRef)(function Sidebar2({ width = 240, className, style, ...props }, ref) {
3636
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3637
- "aside",
3638
- {
3639
- ref,
3640
- style: { width, ...style },
3641
- className: cn(
3642
- "border-border bg-panel flex h-full flex-col gap-2 border-r p-[14px]",
3643
- className
3644
- ),
3645
- ...props
3646
- }
3647
- );
3648
- });
3649
- Sidebar.displayName = "Sidebar";
3650
- var NavItem = (0, import_react58.forwardRef)(
3651
- function NavItem2({ icon, label, active, badge, href, disabled, className, ...props }, ref) {
3652
- const inner = /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
3653
- icon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { "aria-hidden": true, className: "w-[14px] text-center opacity-80", children: icon }),
3654
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex-1 truncate", children: label }),
3655
- badge != null && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3656
- "span",
3657
- {
3658
- className: cn(
3659
- "rounded-xs px-[6px] py-px font-mono text-[10px]",
3660
- active ? "bg-accent text-on-accent" : "bg-panel-2 text-text-muted"
3661
- ),
3662
- children: badge
3663
- }
3664
- )
3665
- ] });
3666
- const baseClass = cn(
3667
- "flex cursor-pointer items-center gap-[10px] rounded-xs px-2 py-[6px] text-[13px] outline-none",
3668
- "transition-colors duration-(--duration-micro)",
3669
- "focus-visible:ring-[3px] focus-visible:ring-accent-dim",
3670
- active ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2",
3671
- disabled && "opacity-50 pointer-events-none",
3672
- className
3673
- );
3674
- if (href) {
3675
- const anchorProps = props;
3676
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3677
- "a",
3678
- {
3679
- ref,
3680
- href,
3681
- "aria-current": active ? "page" : void 0,
3682
- "aria-disabled": disabled || void 0,
3683
- className: baseClass,
3684
- ...anchorProps,
3685
- children: inner
3686
- }
3687
- );
3688
- }
3689
- const buttonProps = props;
3690
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3691
- "button",
3692
- {
3693
- ref,
3694
- type: "button",
3695
- "aria-current": active ? "page" : void 0,
3696
- disabled,
3697
- className: cn(baseClass, "w-full text-left"),
3698
- ...buttonProps,
3699
- children: inner
3700
- }
3701
- );
3702
- }
3703
- );
3704
- NavItem.displayName = "NavItem";
3705
- var NavSection = (0, import_react58.forwardRef)(function NavSection2({ label, action, className, children, ...props }, ref) {
3706
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { ref, className: cn("flex flex-col gap-1", className), ...props, children: [
3707
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "text-text-dim flex items-center px-2 pt-2 font-mono text-[9px] tracking-[1.4px] uppercase", children: [
3708
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex-1", children: label }),
3709
- action
3710
- ] }),
3711
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-[2px]", children })
3712
- ] });
3713
- });
3714
- NavSection.displayName = "NavSection";
3715
-
3716
4599
  // src/patterns/Sparkline/Sparkline.tsx
3717
- var import_react59 = require("react");
3718
- var import_jsx_runtime52 = require("react/jsx-runtime");
4600
+ var import_react65 = require("react");
4601
+ var import_jsx_runtime58 = require("react/jsx-runtime");
3719
4602
  function buildPath(values, w, h) {
3720
4603
  if (values.length === 0) return { line: "", area: "" };
3721
4604
  const pad = 2;
@@ -3734,7 +4617,7 @@ function buildPath(values, w, h) {
3734
4617
  )} L${pad.toFixed(2)},${(h - pad).toFixed(2)} Z`;
3735
4618
  return { line, area };
3736
4619
  }
3737
- var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
4620
+ var Sparkline = (0, import_react65.forwardRef)(function Sparkline2({
3738
4621
  values,
3739
4622
  width = 160,
3740
4623
  height = 32,
@@ -3745,8 +4628,8 @@ var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
3745
4628
  "aria-label": ariaLabel = "Trend",
3746
4629
  ...props
3747
4630
  }, ref) {
3748
- const { line, area } = (0, import_react59.useMemo)(() => buildPath(values, width, height), [values, width, height]);
3749
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4631
+ const { line, area } = (0, import_react65.useMemo)(() => buildPath(values, width, height), [values, width, height]);
4632
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
3750
4633
  "svg",
3751
4634
  {
3752
4635
  ref,
@@ -3758,8 +4641,8 @@ var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
3758
4641
  className: cn("inline-block", className),
3759
4642
  ...props,
3760
4643
  children: [
3761
- fill && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: area, fill: stroke, fillOpacity: 0.16, stroke: "none" }),
3762
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4644
+ fill && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { d: area, fill: stroke, fillOpacity: 0.16, stroke: "none" }),
4645
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3763
4646
  "path",
3764
4647
  {
3765
4648
  d: line,
@@ -3777,16 +4660,16 @@ var Sparkline = (0, import_react59.forwardRef)(function Sparkline2({
3777
4660
  Sparkline.displayName = "Sparkline";
3778
4661
 
3779
4662
  // src/patterns/Spinner/Spinner.tsx
3780
- var import_react60 = require("react");
3781
- var import_jsx_runtime53 = require("react/jsx-runtime");
4663
+ var import_react66 = require("react");
4664
+ var import_jsx_runtime59 = require("react/jsx-runtime");
3782
4665
  var sizes = {
3783
4666
  sm: { box: "h-3 w-3", border: "border-[2px]" },
3784
4667
  md: { box: "h-4 w-4", border: "border-[2px]" },
3785
4668
  lg: { box: "h-5 w-5", border: "border-[2px]" }
3786
4669
  };
3787
- var Spinner2 = (0, import_react60.forwardRef)(function Spinner3({ size = "md", label = "Loading", className, ...props }, ref) {
4670
+ var Spinner2 = (0, import_react66.forwardRef)(function Spinner3({ size = "md", label = "Loading", className, ...props }, ref) {
3788
4671
  const s = sizes[size];
3789
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4672
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3790
4673
  "span",
3791
4674
  {
3792
4675
  ref,
@@ -3794,7 +4677,7 @@ var Spinner2 = (0, import_react60.forwardRef)(function Spinner3({ size = "md", l
3794
4677
  "aria-label": label,
3795
4678
  className: cn("inline-block", className),
3796
4679
  ...props,
3797
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4680
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3798
4681
  "span",
3799
4682
  {
3800
4683
  "aria-hidden": true,
@@ -3811,15 +4694,15 @@ var Spinner2 = (0, import_react60.forwardRef)(function Spinner3({ size = "md", l
3811
4694
  Spinner2.displayName = "Spinner";
3812
4695
 
3813
4696
  // src/patterns/Stepper/Stepper.tsx
3814
- var import_react61 = require("react");
3815
- var import_jsx_runtime54 = require("react/jsx-runtime");
4697
+ var import_react67 = require("react");
4698
+ var import_jsx_runtime60 = require("react/jsx-runtime");
3816
4699
  var dotBase = "h-6 w-6 rounded-full grid place-items-center text-[11px] font-mono font-semibold border";
3817
4700
  var dotStateClass = {
3818
4701
  done: "bg-accent text-on-accent border-accent",
3819
4702
  current: "bg-accent-dim text-accent border-accent",
3820
4703
  upcoming: "bg-panel text-text-dim border-border"
3821
4704
  };
3822
- var labelStateClass = {
4705
+ var labelStateClass2 = {
3823
4706
  done: "text-text",
3824
4707
  current: "text-text font-medium",
3825
4708
  upcoming: "text-text-dim"
@@ -3829,8 +4712,8 @@ function stateFor(index, current) {
3829
4712
  if (index === current) return "current";
3830
4713
  return "upcoming";
3831
4714
  }
3832
- var Stepper = (0, import_react61.forwardRef)(function Stepper2({ steps, current, className, ...props }, ref) {
3833
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4715
+ var Stepper = (0, import_react67.forwardRef)(function Stepper2({ steps, current, className, ...props }, ref) {
4716
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
3834
4717
  "ol",
3835
4718
  {
3836
4719
  ref,
@@ -3842,19 +4725,19 @@ var Stepper = (0, import_react61.forwardRef)(function Stepper2({ steps, current,
3842
4725
  const id = typeof step === "string" ? void 0 : step.id;
3843
4726
  const state = stateFor(i, current);
3844
4727
  const connectorActive = i < current;
3845
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_react61.Fragment, { children: [
3846
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4728
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react67.Fragment, { children: [
4729
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
3847
4730
  "li",
3848
4731
  {
3849
4732
  "aria-current": state === "current" ? "step" : void 0,
3850
4733
  className: "flex items-center gap-2",
3851
4734
  children: [
3852
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": true, className: cn(dotBase, dotStateClass[state]), children: state === "done" ? "\u2713" : i + 1 }),
3853
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("text-[12px]", labelStateClass[state]), children: label })
4735
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { "aria-hidden": true, className: cn(dotBase, dotStateClass[state]), children: state === "done" ? "\u2713" : i + 1 }),
4736
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: cn("text-[12px]", labelStateClass2[state]), children: label })
3854
4737
  ]
3855
4738
  }
3856
4739
  ),
3857
- i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4740
+ i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
3858
4741
  "span",
3859
4742
  {
3860
4743
  "aria-hidden": true,
@@ -3871,9 +4754,9 @@ Stepper.displayName = "Stepper";
3871
4754
  // src/patterns/Tabs/Tabs.tsx
3872
4755
  var RadixTabs = __toESM(require("@radix-ui/react-tabs"), 1);
3873
4756
  var import_class_variance_authority12 = require("class-variance-authority");
3874
- var import_react62 = require("react");
3875
- var import_jsx_runtime55 = require("react/jsx-runtime");
3876
- var TabsVariantContext = (0, import_react62.createContext)("underline");
4757
+ var import_react68 = require("react");
4758
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4759
+ var TabsVariantContext = (0, import_react68.createContext)("underline");
3877
4760
  var tabsListStyles = (0, import_class_variance_authority12.cva)("", {
3878
4761
  variants: {
3879
4762
  variant: {
@@ -3903,8 +4786,8 @@ var tabsTriggerStyles = (0, import_class_variance_authority12.cva)(
3903
4786
  }
3904
4787
  }
3905
4788
  );
3906
- var Tabs = (0, import_react62.forwardRef)(function Tabs2({ variant = "underline", className, ...props }, ref) {
3907
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4789
+ var Tabs = (0, import_react68.forwardRef)(function Tabs2({ variant = "underline", className, ...props }, ref) {
4790
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3908
4791
  RadixTabs.Root,
3909
4792
  {
3910
4793
  ref,
@@ -3914,14 +4797,14 @@ var Tabs = (0, import_react62.forwardRef)(function Tabs2({ variant = "underline"
3914
4797
  ) });
3915
4798
  });
3916
4799
  Tabs.displayName = "Tabs";
3917
- var TabsList = (0, import_react62.forwardRef)(function TabsList2({ className, ...props }, ref) {
3918
- const variant = (0, import_react62.useContext)(TabsVariantContext);
3919
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(RadixTabs.List, { ref, className: cn(tabsListStyles({ variant }), className), ...props });
4800
+ var TabsList = (0, import_react68.forwardRef)(function TabsList2({ className, ...props }, ref) {
4801
+ const variant = (0, import_react68.useContext)(TabsVariantContext);
4802
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(RadixTabs.List, { ref, className: cn(tabsListStyles({ variant }), className), ...props });
3920
4803
  });
3921
4804
  TabsList.displayName = "TabsList";
3922
- var Tab = (0, import_react62.forwardRef)(function Tab2({ className, ...props }, ref) {
3923
- const variant = (0, import_react62.useContext)(TabsVariantContext);
3924
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4805
+ var Tab = (0, import_react68.forwardRef)(function Tab2({ className, ...props }, ref) {
4806
+ const variant = (0, import_react68.useContext)(TabsVariantContext);
4807
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3925
4808
  RadixTabs.Trigger,
3926
4809
  {
3927
4810
  ref,
@@ -3931,9 +4814,9 @@ var Tab = (0, import_react62.forwardRef)(function Tab2({ className, ...props },
3931
4814
  );
3932
4815
  });
3933
4816
  Tab.displayName = "Tab";
3934
- var TabsContent = (0, import_react62.forwardRef)(
4817
+ var TabsContent = (0, import_react68.forwardRef)(
3935
4818
  function TabsContent2({ className, ...props }, ref) {
3936
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4819
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3937
4820
  RadixTabs.Content,
3938
4821
  {
3939
4822
  ref,
@@ -3949,8 +4832,8 @@ var TabsContent = (0, import_react62.forwardRef)(
3949
4832
  TabsContent.displayName = "TabsContent";
3950
4833
 
3951
4834
  // src/patterns/Timeline/Timeline.tsx
3952
- var import_react63 = require("react");
3953
- var import_jsx_runtime56 = require("react/jsx-runtime");
4835
+ var import_react69 = require("react");
4836
+ var import_jsx_runtime62 = require("react/jsx-runtime");
3954
4837
  var ringClass = {
3955
4838
  accent: "border-accent",
3956
4839
  ok: "border-ok",
@@ -3958,8 +4841,8 @@ var ringClass = {
3958
4841
  err: "border-err",
3959
4842
  muted: "border-text-dim"
3960
4843
  };
3961
- var Timeline = (0, import_react63.forwardRef)(function Timeline2({ events, className, children, ...props }, ref) {
3962
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4844
+ var Timeline = (0, import_react69.forwardRef)(function Timeline2({ events, className, children, ...props }, ref) {
4845
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3963
4846
  "ol",
3964
4847
  {
3965
4848
  ref,
@@ -3969,14 +4852,14 @@ var Timeline = (0, import_react63.forwardRef)(function Timeline2({ events, class
3969
4852
  className
3970
4853
  ),
3971
4854
  ...props,
3972
- children: events ? events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TimelineItem, { tone: e.tone, time: e.time, description: e.description, children: e.title }, i)) : children
4855
+ children: events ? events.map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TimelineItem, { tone: e.tone, time: e.time, description: e.description, children: e.title }, i)) : children
3973
4856
  }
3974
4857
  );
3975
4858
  });
3976
4859
  Timeline.displayName = "Timeline";
3977
- var TimelineItem = (0, import_react63.forwardRef)(function TimelineItem2({ tone = "accent", description, time, className, children, ...props }, ref) {
3978
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("li", { ref, className: cn("relative mb-[18px] last:mb-0", className), ...props, children: [
3979
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4860
+ var TimelineItem = (0, import_react69.forwardRef)(function TimelineItem2({ tone = "accent", description, time, className, children, ...props }, ref) {
4861
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("li", { ref, className: cn("relative mb-[18px] last:mb-0", className), ...props, children: [
4862
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3980
4863
  "span",
3981
4864
  {
3982
4865
  "aria-hidden": true,
@@ -3986,18 +4869,107 @@ var TimelineItem = (0, import_react63.forwardRef)(function TimelineItem2({ tone
3986
4869
  )
3987
4870
  }
3988
4871
  ),
3989
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-[13px] font-medium", children }),
3990
- description && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-text-muted text-[12px]", children: description }),
3991
- time && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-text-dim mt-[2px] font-mono text-[10px]", children: time })
4872
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-[13px] font-medium", children }),
4873
+ description && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-text-muted text-[12px]", children: description }),
4874
+ time && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-text-dim mt-[2px] font-mono text-[10px]", children: time })
3992
4875
  ] });
3993
4876
  });
3994
4877
  TimelineItem.displayName = "TimelineItem";
3995
4878
 
4879
+ // src/patterns/Timeline/ActivityTimeline.tsx
4880
+ var import_react70 = require("react");
4881
+
4882
+ // src/patterns/Timeline/formatRelative.ts
4883
+ var SECOND = 1e3;
4884
+ var MINUTE = 60 * SECOND;
4885
+ var HOUR = 60 * MINUTE;
4886
+ var DAY = 24 * HOUR;
4887
+ var WEEK = 7 * DAY;
4888
+ var MONTH = 30 * DAY;
4889
+ var YEAR = 365 * DAY;
4890
+ var UNITS = [
4891
+ { ms: YEAR, short: "y" },
4892
+ { ms: MONTH, short: "mo" },
4893
+ { ms: WEEK, short: "w" },
4894
+ { ms: DAY, short: "d" },
4895
+ { ms: HOUR, short: "h" },
4896
+ { ms: MINUTE, short: "m" },
4897
+ { ms: SECOND, short: "s" }
4898
+ ];
4899
+ function formatRelative(input, now = /* @__PURE__ */ new Date()) {
4900
+ const target = input instanceof Date ? input : new Date(input);
4901
+ if (Number.isNaN(target.getTime())) return "";
4902
+ const diffMs = now.getTime() - target.getTime();
4903
+ const abs = Math.abs(diffMs);
4904
+ if (abs < 5 * SECOND) return "just now";
4905
+ for (const unit of UNITS) {
4906
+ if (abs >= unit.ms) {
4907
+ const n = Math.floor(abs / unit.ms);
4908
+ return diffMs >= 0 ? `${n}${unit.short} ago` : `in ${n}${unit.short}`;
4909
+ }
4910
+ }
4911
+ return "just now";
4912
+ }
4913
+
4914
+ // src/patterns/Timeline/ActivityTimeline.tsx
4915
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4916
+ var ringClass2 = {
4917
+ accent: "border-accent",
4918
+ ok: "border-ok",
4919
+ warn: "border-warn",
4920
+ err: "border-err",
4921
+ muted: "border-text-dim"
4922
+ };
4923
+ var ActivityTimeline = (0, import_react70.forwardRef)(
4924
+ function ActivityTimeline2({ events, relativeNow, className, ...props }, ref) {
4925
+ const now = relativeNow ?? /* @__PURE__ */ new Date();
4926
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4927
+ "ol",
4928
+ {
4929
+ ref,
4930
+ className: cn(
4931
+ "relative m-0 list-none p-0 pl-6",
4932
+ "before:bg-border before:absolute before:top-[6px] before:bottom-[6px] before:left-[7px] before:w-px",
4933
+ className
4934
+ ),
4935
+ ...props,
4936
+ children: events.map((event) => {
4937
+ const tone = event.tone ?? "accent";
4938
+ const time = formatRelative(event.at, now);
4939
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("li", { className: "relative mb-4 last:mb-0", children: [
4940
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4941
+ "span",
4942
+ {
4943
+ "aria-hidden": true,
4944
+ className: cn(
4945
+ "bg-bg absolute top-[4px] -left-6 h-[14px] w-[14px] rounded-full border-2",
4946
+ ringClass2[tone]
4947
+ )
4948
+ }
4949
+ ),
4950
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex items-baseline gap-2", children: [
4951
+ event.icon && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { "aria-hidden": true, className: "text-text-muted font-mono text-[12px]", children: event.icon }),
4952
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "text-[13px] font-medium", children: event.title }),
4953
+ time && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("time", { className: "text-text-dim ml-auto font-mono text-[10px]", children: time })
4954
+ ] }),
4955
+ event.actor && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "text-text-muted mt-[2px] flex items-center gap-[6px] text-[12px]", children: [
4956
+ event.actor.avatar && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { "aria-hidden": true, className: "inline-flex", children: event.actor.avatar }),
4957
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: event.actor.name })
4958
+ ] }),
4959
+ event.payload && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "border-border bg-panel-2 mt-2 rounded-md border px-3 py-2 font-mono text-[11px] leading-[1.5]", children: event.payload })
4960
+ ] }, event.id);
4961
+ })
4962
+ }
4963
+ );
4964
+ }
4965
+ );
4966
+ ActivityTimeline.displayName = "ActivityTimeline";
4967
+
3996
4968
  // src/patterns/Topbar/Topbar.tsx
3997
- var import_react64 = require("react");
3998
- var import_jsx_runtime57 = require("react/jsx-runtime");
3999
- var Topbar = (0, import_react64.forwardRef)(function Topbar2({ title, leading, actions, className, children, ...props }, ref) {
4000
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
4969
+ var import_react71 = require("react");
4970
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4971
+ var Topbar = (0, import_react71.forwardRef)(function Topbar2({ title, leading, actions, className, children, ...props }, ref) {
4972
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4001
4973
  "header",
4002
4974
  {
4003
4975
  ref,
@@ -4008,9 +4980,9 @@ var Topbar = (0, import_react64.forwardRef)(function Topbar2({ title, leading, a
4008
4980
  ...props,
4009
4981
  children: [
4010
4982
  leading,
4011
- title && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "text-[13px] font-medium", children: title }),
4012
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-1 items-center" }),
4013
- actions && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-center gap-3", children: actions }),
4983
+ title && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "text-[13px] font-medium", children: title }),
4984
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex flex-1 items-center" }),
4985
+ actions && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "flex items-center gap-3", children: actions }),
4014
4986
  children
4015
4987
  ]
4016
4988
  }
@@ -4019,8 +4991,8 @@ var Topbar = (0, import_react64.forwardRef)(function Topbar2({ title, leading, a
4019
4991
  Topbar.displayName = "Topbar";
4020
4992
 
4021
4993
  // src/patterns/Tree/Tree.tsx
4022
- var import_react65 = require("react");
4023
- var import_jsx_runtime58 = require("react/jsx-runtime");
4994
+ var import_react72 = require("react");
4995
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4024
4996
  var EMPTY_SET2 = /* @__PURE__ */ new Set();
4025
4997
  function flattenVisible(items, expanded, level, parentId, out) {
4026
4998
  for (const item of items) {
@@ -4031,7 +5003,7 @@ function flattenVisible(items, expanded, level, parentId, out) {
4031
5003
  }
4032
5004
  }
4033
5005
  }
4034
- var Tree = (0, import_react65.forwardRef)(function Tree2({
5006
+ var Tree = (0, import_react72.forwardRef)(function Tree2({
4035
5007
  items,
4036
5008
  expanded: expandedProp,
4037
5009
  defaultExpanded,
@@ -4054,24 +5026,24 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4054
5026
  onChange: onValueChange
4055
5027
  });
4056
5028
  const expandedSet = expanded ?? EMPTY_SET2;
4057
- const flatVisible = (0, import_react65.useMemo)(() => {
5029
+ const flatVisible = (0, import_react72.useMemo)(() => {
4058
5030
  const out = [];
4059
5031
  flattenVisible(items, expandedSet, 1, null, out);
4060
5032
  return out;
4061
5033
  }, [items, expandedSet]);
4062
- const [activeId, setActiveId] = (0, import_react65.useState)(null);
4063
- (0, import_react65.useEffect)(() => {
5034
+ const [activeId, setActiveId] = (0, import_react72.useState)(null);
5035
+ (0, import_react72.useEffect)(() => {
4064
5036
  if (activeId && !flatVisible.some((f) => f.id === activeId)) {
4065
5037
  setActiveId(null);
4066
5038
  }
4067
5039
  }, [activeId, flatVisible]);
4068
- const tabStopId = (0, import_react65.useMemo)(() => {
5040
+ const tabStopId = (0, import_react72.useMemo)(() => {
4069
5041
  if (activeId && flatVisible.some((f) => f.id === activeId)) return activeId;
4070
5042
  if (value && flatVisible.some((f) => f.id === value)) return value;
4071
5043
  return flatVisible[0]?.id ?? null;
4072
5044
  }, [activeId, flatVisible, value]);
4073
- const listRef = (0, import_react65.useRef)(null);
4074
- const setRefs = (0, import_react65.useCallback)(
5045
+ const listRef = (0, import_react72.useRef)(null);
5046
+ const setRefs = (0, import_react72.useCallback)(
4075
5047
  (node) => {
4076
5048
  listRef.current = node;
4077
5049
  if (typeof ref === "function") ref(node);
@@ -4079,20 +5051,20 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4079
5051
  },
4080
5052
  [ref]
4081
5053
  );
4082
- const focusItem = (0, import_react65.useCallback)((id) => {
5054
+ const focusItem = (0, import_react72.useCallback)((id) => {
4083
5055
  const root = listRef.current;
4084
5056
  if (!root) return;
4085
5057
  const el = root.querySelector(`[data-treeitem-id="${CSS.escape(id)}"]`);
4086
5058
  el?.focus();
4087
5059
  }, []);
4088
- const moveActive = (0, import_react65.useCallback)(
5060
+ const moveActive = (0, import_react72.useCallback)(
4089
5061
  (id) => {
4090
5062
  setActiveId(id);
4091
5063
  queueMicrotask(() => focusItem(id));
4092
5064
  },
4093
5065
  [focusItem]
4094
5066
  );
4095
- const toggle = (0, import_react65.useCallback)(
5067
+ const toggle = (0, import_react72.useCallback)(
4096
5068
  (id) => {
4097
5069
  setExpanded((prev) => {
4098
5070
  const next = new Set(prev ?? EMPTY_SET2);
@@ -4103,7 +5075,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4103
5075
  },
4104
5076
  [setExpanded]
4105
5077
  );
4106
- const expand = (0, import_react65.useCallback)(
5078
+ const expand = (0, import_react72.useCallback)(
4107
5079
  (id) => {
4108
5080
  setExpanded((prev) => {
4109
5081
  const base = prev ?? EMPTY_SET2;
@@ -4115,7 +5087,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4115
5087
  },
4116
5088
  [setExpanded]
4117
5089
  );
4118
- const collapse = (0, import_react65.useCallback)(
5090
+ const collapse = (0, import_react72.useCallback)(
4119
5091
  (id) => {
4120
5092
  setExpanded((prev) => {
4121
5093
  const base = prev ?? EMPTY_SET2;
@@ -4127,13 +5099,13 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4127
5099
  },
4128
5100
  [setExpanded]
4129
5101
  );
4130
- const selectItem = (0, import_react65.useCallback)(
5102
+ const selectItem = (0, import_react72.useCallback)(
4131
5103
  (id) => {
4132
5104
  setValue(id);
4133
5105
  },
4134
5106
  [setValue]
4135
5107
  );
4136
- const handleKeyDown = (0, import_react65.useCallback)(
5108
+ const handleKeyDown = (0, import_react72.useCallback)(
4137
5109
  (e) => {
4138
5110
  onKeyDown?.(e);
4139
5111
  if (e.defaultPrevented) return;
@@ -4213,7 +5185,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4213
5185
  toggle
4214
5186
  ]
4215
5187
  );
4216
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5188
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4217
5189
  "ul",
4218
5190
  {
4219
5191
  ref: setRefs,
@@ -4221,7 +5193,7 @@ var Tree = (0, import_react65.forwardRef)(function Tree2({
4221
5193
  className: cn("flex flex-col gap-px text-[12px]", className),
4222
5194
  onKeyDown: handleKeyDown,
4223
5195
  ...props,
4224
- children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5196
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4225
5197
  TreeItemRow,
4226
5198
  {
4227
5199
  item,
@@ -4256,8 +5228,8 @@ function TreeItemRow({
4256
5228
  const isExpanded = hasChildren && expanded.has(item.id);
4257
5229
  const isSelected = selected === item.id;
4258
5230
  const isTabStop = tabStopId === item.id;
4259
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("li", { role: "none", children: [
4260
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
5231
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("li", { role: "none", children: [
5232
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
4261
5233
  "div",
4262
5234
  {
4263
5235
  role: "treeitem",
@@ -4280,14 +5252,14 @@ function TreeItemRow({
4280
5252
  isSelected ? "bg-accent-dim text-accent" : "text-text hover:bg-panel-2"
4281
5253
  ),
4282
5254
  children: [
4283
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": true, className: "text-text-dim grid w-3 place-items-center text-[10px]", children: hasChildren ? isExpanded ? "\u25BE" : "\u25B8" : "" }),
4284
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { "aria-hidden": true, className: "text-[12px] opacity-80", children: item.icon }),
4285
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "flex-1 truncate", children: item.label }),
5255
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { "aria-hidden": true, className: "text-text-dim grid w-3 place-items-center text-[10px]", children: hasChildren ? isExpanded ? "\u25BE" : "\u25B8" : "" }),
5256
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { "aria-hidden": true, className: "text-[12px] opacity-80", children: item.icon }),
5257
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "flex-1 truncate", children: item.label }),
4286
5258
  item.trailing
4287
5259
  ]
4288
5260
  }
4289
5261
  ),
4290
- hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("ul", { role: "group", className: "flex flex-col gap-px", children: (item.children ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5262
+ hasChildren && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("ul", { role: "group", className: "flex flex-col gap-px", children: (item.children ?? []).map((child) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4291
5263
  TreeItemRow,
4292
5264
  {
4293
5265
  item: child,
@@ -4303,8 +5275,84 @@ function TreeItemRow({
4303
5275
  )) })
4304
5276
  ] });
4305
5277
  }
5278
+
5279
+ // src/patterns/WizardDialog/WizardDialog.tsx
5280
+ var RadixDialog5 = __toESM(require("@radix-ui/react-dialog"), 1);
5281
+ var import_react73 = require("react");
5282
+ var import_jsx_runtime66 = require("react/jsx-runtime");
5283
+ var WizardDialog = (0, import_react73.forwardRef)(function WizardDialog2({
5284
+ open,
5285
+ defaultOpen,
5286
+ onOpenChange,
5287
+ steps,
5288
+ initialStep = 0,
5289
+ onComplete,
5290
+ title,
5291
+ description,
5292
+ width = 560,
5293
+ nextLabel = "Next",
5294
+ completeLabel = "Done",
5295
+ backLabel = "Back",
5296
+ cancelLabel,
5297
+ onCancel
5298
+ }, ref) {
5299
+ const [current, setCurrent] = (0, import_react73.useState)(initialStep);
5300
+ const total = steps.length;
5301
+ const safeCurrent = Math.min(current, Math.max(0, total - 1));
5302
+ const step = steps[safeCurrent];
5303
+ const goTo = (0, import_react73.useCallback)(
5304
+ (index) => {
5305
+ setCurrent(Math.min(Math.max(0, index), Math.max(0, total - 1)));
5306
+ },
5307
+ [total]
5308
+ );
5309
+ const goNext = (0, import_react73.useCallback)(() => setCurrent((c) => Math.min(c + 1, total - 1)), [total]);
5310
+ const goBack = (0, import_react73.useCallback)(() => setCurrent((c) => Math.max(c - 1, 0)), []);
5311
+ const ctx = (0, import_react73.useMemo)(
5312
+ () => ({
5313
+ current: safeCurrent,
5314
+ total,
5315
+ goNext,
5316
+ goBack,
5317
+ goTo,
5318
+ isFirst: safeCurrent === 0,
5319
+ isLast: safeCurrent >= total - 1
5320
+ }),
5321
+ [safeCurrent, total, goNext, goBack, goTo]
5322
+ );
5323
+ const stepperSteps = (0, import_react73.useMemo)(() => steps.map((s) => ({ id: s.id, label: s.label })), [steps]);
5324
+ if (!step) return null;
5325
+ const canAdvance = step.canAdvance ? step.canAdvance(ctx) : true;
5326
+ const body = typeof step.content === "function" ? step.content(ctx) : step.content;
5327
+ const handlePrimary = () => {
5328
+ if (ctx.isLast) {
5329
+ onComplete?.();
5330
+ } else {
5331
+ goNext();
5332
+ }
5333
+ };
5334
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DialogRoot, { open, defaultOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(DialogContent, { ref, width, children: [
5335
+ title && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(WizardTitle, { children: title }),
5336
+ description && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(WizardDescription, { children: description }),
5337
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-5", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Stepper, { steps: stepperSteps, current: safeCurrent }) }),
5338
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mb-5", children: body }),
5339
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex justify-end gap-2", children: [
5340
+ cancelLabel && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { type: "button", variant: "ghost", onClick: onCancel, children: cancelLabel }),
5341
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { type: "button", variant: "secondary", onClick: goBack, disabled: ctx.isFirst, children: backLabel }),
5342
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Button, { type: "button", variant: "primary", onClick: handlePrimary, disabled: !canAdvance, children: ctx.isLast ? completeLabel : nextLabel })
5343
+ ] })
5344
+ ] }) });
5345
+ });
5346
+ function WizardTitle({ children }) {
5347
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RadixDialog5.Title, { className: "mb-2 text-[16px] font-medium", children });
5348
+ }
5349
+ function WizardDescription({ children }) {
5350
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(RadixDialog5.Description, { className: "text-text-muted mb-4 text-[13px] leading-[1.55]", children });
5351
+ }
5352
+ WizardDialog.displayName = "WizardDialog";
4306
5353
  // Annotate the CommonJS export names for ESM import in node:
4307
5354
  0 && (module.exports = {
5355
+ ActivityTimeline,
4308
5356
  Alert,
4309
5357
  AlertDialog,
4310
5358
  AlertDialogAction,
@@ -4352,10 +5400,13 @@ function TreeItemRow({
4352
5400
  DropdownMenuRadioGroup,
4353
5401
  DropdownMenuRoot,
4354
5402
  DropdownMenuTrigger,
5403
+ Dropzone,
4355
5404
  EmptyState,
4356
5405
  FAB,
4357
5406
  Field,
4358
5407
  FileChip,
5408
+ FilterPanel,
5409
+ HealthScore,
4359
5410
  HoverCard,
4360
5411
  HoverCardContent,
4361
5412
  HoverCardPortal,
@@ -4373,9 +5424,11 @@ function TreeItemRow({
4373
5424
  MenubarMenu,
4374
5425
  MenubarSeparator,
4375
5426
  MenubarTrigger,
5427
+ NavBar,
4376
5428
  NavItem,
4377
5429
  NavSection,
4378
5430
  OTP,
5431
+ OnboardingChecklist,
4379
5432
  Pagination,
4380
5433
  Popover,
4381
5434
  PopoverAnchor,
@@ -4389,6 +5442,7 @@ function TreeItemRow({
4389
5442
  RadialProgress,
4390
5443
  Radio,
4391
5444
  RadioGroup,
5445
+ ScrollArea,
4392
5446
  SearchInput,
4393
5447
  Select,
4394
5448
  SelectContent,
@@ -4429,11 +5483,13 @@ function TreeItemRow({
4429
5483
  TooltipTrigger,
4430
5484
  Topbar,
4431
5485
  Tree,
5486
+ WizardDialog,
4432
5487
  badgeStyles,
4433
5488
  buttonStyles,
4434
5489
  cardStyles,
4435
5490
  cn,
4436
5491
  filterCommandItems,
5492
+ formatRelative,
4437
5493
  iconButtonStyles,
4438
5494
  useControllableState,
4439
5495
  useDisclosure,