@inf-monkeys-tech/monkeys-design 2.0.5 → 2.0.7

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.
@@ -1297,6 +1297,7 @@ function DataExplorerViewTree({
1297
1297
  onSelectNode?.(node, context);
1298
1298
  },
1299
1299
  onKeyDown: (event) => {
1300
+ if (event.target !== event.currentTarget) return;
1300
1301
  if (!isSelectable) return;
1301
1302
  if (event.key !== "Enter" && event.key !== " ") return;
1302
1303
  event.preventDefault();
@@ -1423,7 +1424,7 @@ function DataExplorerViewTree({
1423
1424
  "div",
1424
1425
  {
1425
1426
  className: cn(theme.slots.treeRoot, classNames?.root, className),
1426
- role: hasAnyNodes ? "tree" : void 0,
1427
+ role: hasAnyNodes || resolvedGroups.some((group) => !group.hideHeader) ? "tree" : void 0,
1427
1428
  children: resolvedGroups.map((group) => {
1428
1429
  const groupExpanded = group.hideHeader || group.collapsible === false || resolvedExpandedGroupIds.has(group.id);
1429
1430
  const groupNodeCount = group.nodes?.length ?? 0;
@@ -1440,6 +1441,10 @@ function DataExplorerViewTree({
1440
1441
  !group.hideHeader ? /* @__PURE__ */ jsxs(
1441
1442
  "div",
1442
1443
  {
1444
+ role: "treeitem",
1445
+ "aria-label": typeof group.label === "string" ? group.label : void 0,
1446
+ "aria-selected": group.selectable ? groupSelected : void 0,
1447
+ "aria-expanded": groupCollapsible ? groupExpanded : void 0,
1443
1448
  className: cn(
1444
1449
  theme.slots.treeGroupHeader,
1445
1450
  theme.slots.treeGroupHeaderButton,
@@ -1524,6 +1529,7 @@ function DataExplorerViewTree({
1524
1529
  groupExpanded ? /* @__PURE__ */ jsx(
1525
1530
  "div",
1526
1531
  {
1532
+ role: "group",
1527
1533
  className: cn(
1528
1534
  theme.slots.treeGroupContent,
1529
1535
  classNames?.groupContent,
@@ -1552,6 +1558,72 @@ function DataExplorerViewTree({
1552
1558
  }
1553
1559
  );
1554
1560
  }
1561
+
1562
+ // src/components/navigation-sidebar/unified-appearance.ts
1563
+ var unifiedRow = "gap-2 rounded-[var(--radius)] border border-transparent text-sm font-medium motion-reduce:transition-none";
1564
+ var unifiedIcon = "size-[var(--monkeys-component-navigation-sidebar-icon-size,1.125rem)] shrink-0 text-inherit [&_svg]:size-full";
1565
+ var unifiedInactive = "text-foreground hover:border-transparent hover:bg-[var(--navigation-internal-hover-background)] hover:text-[var(--navigation-internal-hover-foreground)]";
1566
+ var unifiedSelected = "border-[var(--navigation-internal-selected-border)] bg-[var(--navigation-internal-selected-background)] text-[var(--navigation-internal-selected-foreground)] hover:border-[var(--navigation-internal-selected-border)] hover:bg-[var(--navigation-internal-selected-background)] hover:text-[var(--navigation-internal-selected-foreground)]";
1567
+ var unifiedThemeDefaults = "[--navigation-internal-theme-selected-background:color-mix(in_srgb,hsl(var(--monkeys-color-primary,var(--primary)))_10%,transparent)] [--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-primary,var(--primary)))] dark:[--navigation-internal-theme-selected-background:hsl(var(--monkeys-color-accent,var(--accent)))] dark:[--navigation-internal-theme-selected-foreground:hsl(var(--monkeys-color-foreground,var(--foreground)))]";
1568
+ function unifiedStyle(activeVariant) {
1569
+ const background = {
1570
+ muted: "hsl(var(--monkeys-color-accent,var(--accent)))",
1571
+ soft: "color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 10%,transparent)",
1572
+ solid: "hsl(var(--monkeys-color-primary,var(--primary)))",
1573
+ outline: "hsl(var(--monkeys-color-background,var(--background)))"
1574
+ }[activeVariant ?? "muted"];
1575
+ const foreground = activeVariant === "solid" ? "hsl(var(--monkeys-color-primary-foreground,var(--primary-foreground)))" : "hsl(var(--monkeys-color-foreground,var(--foreground)))";
1576
+ const border = activeVariant === void 0 || activeVariant === "muted" ? "transparent" : activeVariant === "soft" ? "color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 25%,transparent)" : activeVariant === "outline" ? "color-mix(in srgb,hsl(var(--monkeys-color-primary,var(--primary))) 55%,transparent)" : "hsl(var(--monkeys-color-primary,var(--primary)))";
1577
+ return {
1578
+ "--navigation-internal-default-selected-background": activeVariant === void 0 ? "var(--navigation-internal-theme-selected-background)" : background,
1579
+ "--navigation-internal-default-selected-foreground": activeVariant === void 0 ? "var(--navigation-internal-theme-selected-foreground)" : foreground,
1580
+ "--navigation-internal-selected-background": "var(--monkeys-component-navigation-sidebar-row-selected-background,var(--navigation-internal-default-selected-background))",
1581
+ "--navigation-internal-selected-foreground": "var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--navigation-internal-default-selected-foreground))",
1582
+ "--navigation-internal-selected-border": `var(--monkeys-component-navigation-sidebar-row-selected-border,${border})`,
1583
+ "--navigation-internal-hover-background": "var(--monkeys-component-navigation-sidebar-row-hover-background,color-mix(in srgb,hsl(var(--monkeys-color-accent,var(--accent))) 65%,transparent))",
1584
+ "--navigation-internal-hover-foreground": "var(--monkeys-component-navigation-sidebar-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground))))"
1585
+ };
1586
+ }
1587
+ var treeStateVariables = "[--navigation-internal-selected-background:var(--monkeys-component-navigation-sidebar-row-selected-background,var(--monkeys-component-navigation-sidebar-tree-row-selected-background,var(--navigation-internal-default-selected-background)))] [--navigation-internal-selected-foreground:var(--monkeys-component-navigation-sidebar-row-selected-foreground,var(--monkeys-component-navigation-sidebar-tree-row-selected-foreground,var(--navigation-internal-default-selected-foreground)))] [--navigation-internal-hover-background:var(--monkeys-component-navigation-sidebar-row-hover-background,var(--monkeys-component-navigation-sidebar-tree-row-hover-background,color-mix(in_srgb,hsl(var(--monkeys-color-accent,var(--accent)))_65%,transparent)))] [--navigation-internal-hover-foreground:var(--monkeys-component-navigation-sidebar-row-hover-foreground,var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--monkeys-color-foreground,var(--foreground)))))]";
1588
+ var selectedTreeNode = "aria-selected:border-[var(--navigation-internal-selected-border)] aria-selected:bg-[var(--navigation-internal-selected-background)] aria-selected:text-[var(--navigation-internal-selected-foreground)] aria-selected:hover:border-[var(--navigation-internal-selected-border)] aria-selected:hover:bg-[var(--navigation-internal-selected-background)] aria-selected:hover:text-[var(--navigation-internal-selected-foreground)]";
1589
+ var nestedControl = "text-inherit hover:bg-foreground/10 hover:text-inherit focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none";
1590
+ function unifiedTreeClassNames(height, padding, overrides = {}) {
1591
+ const row = cn(unifiedRow, height, padding, unifiedInactive);
1592
+ return {
1593
+ ...overrides,
1594
+ root: cn(treeStateVariables, "space-y-0.5", overrides.root),
1595
+ group: cn(
1596
+ "space-y-0.5",
1597
+ // A visible group header adds a level; headerless groups contain root items.
1598
+ "[&>[role=treeitem]+[role=group]]:pl-[var(--monkeys-component-navigation-sidebar-tree-group-indent,1rem)]",
1599
+ overrides.group
1600
+ ),
1601
+ groupHeaderButton: cn("h-auto", row, overrides.groupHeaderButton),
1602
+ nodeButton: cn(row, selectedTreeNode, overrides.nodeButton),
1603
+ itemSelected: cn(unifiedSelected, overrides.itemSelected),
1604
+ nodeIcon: cn(
1605
+ unifiedIcon,
1606
+ "group-hover/tree-node:text-inherit",
1607
+ overrides.nodeIcon
1608
+ ),
1609
+ nodeLabel: cn("font-medium", overrides.nodeLabel),
1610
+ nodeDescription: cn("text-inherit", overrides.nodeDescription),
1611
+ nodeDisabled: cn("opacity-50", overrides.nodeDisabled),
1612
+ groupActions: cn(
1613
+ nestedControl,
1614
+ "order-2 size-5 p-0 group-focus-within/tree-group:opacity-100",
1615
+ overrides.groupActions
1616
+ ),
1617
+ nodeActions: cn(
1618
+ nestedControl,
1619
+ "order-2 size-5 p-0 group-focus-within/tree-node:opacity-100",
1620
+ overrides.nodeActions
1621
+ ),
1622
+ nodeToggle: cn(nestedControl, "order-1", overrides.nodeToggle),
1623
+ expander: cn(nestedControl, "order-1", overrides.expander),
1624
+ nodeDragHandle: cn(nestedControl, overrides.nodeDragHandle)
1625
+ };
1626
+ }
1555
1627
  function CollapseIcon({ collapsed }) {
1556
1628
  return /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-4 w-4", fill: "none", children: /* @__PURE__ */ jsx(
1557
1629
  "path",
@@ -1737,22 +1809,34 @@ function activeVariantClassName(activeVariant) {
1737
1809
  return "border-primary/25 bg-primary/10 text-foreground";
1738
1810
  }
1739
1811
  function resolveAppearance(appearance) {
1740
- const density = appearance?.density ?? "default";
1812
+ if (appearance?.preset !== void 0 && appearance.preset !== "unified") {
1813
+ throw new TypeError(
1814
+ `Unknown NavigationSidebar preset "${appearance.preset}". Supported preset: unified.`
1815
+ );
1816
+ }
1817
+ const unified = appearance?.preset === "unified";
1818
+ const density = appearance?.density ?? (unified ? "compact" : "default");
1741
1819
  const surface = appearance?.surface ?? "panel";
1742
- const activeVariant = appearance?.activeVariant ?? "soft";
1820
+ const activeVariant = appearance?.activeVariant ?? (unified ? "muted" : "soft");
1743
1821
  return {
1822
+ unified,
1744
1823
  density,
1745
1824
  surface,
1746
1825
  activeVariant,
1826
+ selected: unified ? unifiedSelected : activeVariantClassName(activeVariant),
1827
+ inactive: unified ? unifiedInactive : "text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground",
1747
1828
  root: cn(
1748
1829
  surface === "plain" && "border-transparent bg-transparent shadow-none",
1749
1830
  surface === "panel" && "border-border/70 bg-card text-card-foreground shadow-sm",
1750
1831
  surface === "frosted" && "border-border/55 bg-card/80 text-card-foreground shadow-sm backdrop-blur-xl",
1751
- surface === "outlined" && "border-border bg-background text-foreground shadow-none"
1832
+ surface === "outlined" && "border-border bg-background text-foreground shadow-none",
1833
+ unified && "rounded-[var(--radius)] shadow-none",
1834
+ unified && unifiedThemeDefaults,
1835
+ unified && surface === "panel" && "border-[var(--monkeys-component-navigation-sidebar-border,hsl(var(--monkeys-color-border,var(--border))))] bg-[var(--monkeys-component-navigation-sidebar-background,hsl(var(--monkeys-color-card,var(--card))))] text-foreground"
1752
1836
  ),
1753
- itemHeight: density === "compact" ? "min-h-9" : density === "comfortable" ? "min-h-14" : "min-h-11",
1754
- itemPadding: density === "compact" ? "px-2 py-1.5" : density === "comfortable" ? "px-3 py-3" : "px-3 py-2",
1755
- searchHeight: density === "compact" ? "h-8" : density === "comfortable" ? "h-10" : "h-9"
1837
+ itemHeight: density === "compact" ? unified ? "min-h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]" : "min-h-9" : density === "comfortable" ? "min-h-14" : "min-h-11",
1838
+ itemPadding: density === "compact" ? unified ? "px-2 py-2" : "px-2 py-1.5" : density === "comfortable" ? "px-3 py-3" : "px-3 py-2",
1839
+ searchHeight: density === "compact" ? unified ? "h-[var(--monkeys-component-navigation-sidebar-row-height,2.5rem)]" : "h-8" : density === "comfortable" ? "h-10" : "h-9"
1756
1840
  };
1757
1841
  }
1758
1842
  var navigationTreeRowHoverClassName = "hover:bg-[var(--monkeys-component-navigation-sidebar-tree-row-hover-background,hsl(var(--muted)))] hover:text-[var(--monkeys-component-navigation-sidebar-tree-row-hover-foreground,hsl(var(--foreground)))]";
@@ -1807,7 +1891,8 @@ function entryClassName({
1807
1891
  "group/navigation-item relative flex w-full min-w-0 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm outline-none transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
1808
1892
  appearance.itemHeight,
1809
1893
  appearance.itemPadding,
1810
- embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? activeVariantClassName(appearance.activeVariant) : "text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground",
1894
+ appearance.unified && unifiedRow,
1895
+ embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? appearance.selected : appearance.inactive,
1811
1896
  collapsed && !mobile && "justify-center px-0",
1812
1897
  item.disabled && "pointer-events-none opacity-50",
1813
1898
  classNames?.item,
@@ -1822,7 +1907,8 @@ function EntryContent({
1822
1907
  collapsed,
1823
1908
  mobile,
1824
1909
  classNames,
1825
- endIndicator
1910
+ endIndicator,
1911
+ appearance
1826
1912
  }) {
1827
1913
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1828
1914
  hasRenderableNode(item.icon) ? /* @__PURE__ */ jsx(
@@ -1830,6 +1916,7 @@ function EntryContent({
1830
1916
  {
1831
1917
  className: cn(
1832
1918
  "flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",
1919
+ appearance.unified && unifiedIcon,
1833
1920
  classNames?.itemIcon
1834
1921
  ),
1835
1922
  "aria-hidden": "true",
@@ -1849,6 +1936,7 @@ function EntryContent({
1849
1936
  {
1850
1937
  className: cn(
1851
1938
  "min-w-0 truncate font-semibold",
1939
+ appearance.unified && "font-medium",
1852
1940
  classNames?.itemLabel
1853
1941
  ),
1854
1942
  children: item.label
@@ -1859,6 +1947,7 @@ function EntryContent({
1859
1947
  {
1860
1948
  className: cn(
1861
1949
  "mt-0.5 truncate text-xs font-normal",
1950
+ appearance.unified && "text-inherit",
1862
1951
  classNames?.itemDescription
1863
1952
  ),
1864
1953
  children: item.description
@@ -1939,6 +2028,7 @@ function EntryButton({
1939
2028
  children: /* @__PURE__ */ jsx(
1940
2029
  EntryContent,
1941
2030
  {
2031
+ appearance,
1942
2032
  item,
1943
2033
  collapsed,
1944
2034
  mobile,
@@ -1975,6 +2065,7 @@ function EntryPresentation({
1975
2065
  children: /* @__PURE__ */ jsx(
1976
2066
  EntryContent,
1977
2067
  {
2068
+ appearance,
1978
2069
  item,
1979
2070
  collapsed: false,
1980
2071
  mobile: true,
@@ -1991,7 +2082,8 @@ function routeRowClassName({
1991
2082
  return cn(
1992
2083
  "flex w-full min-w-0 items-center gap-0.5 rounded-[var(--radius)] border border-transparent pr-1 text-sm transition-[background-color,border-color,color,box-shadow] motion-reduce:transition-none",
1993
2084
  appearance.itemHeight,
1994
- active ? activeVariantClassName(appearance.activeVariant) : "text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground"
2085
+ appearance.unified && unifiedRow,
2086
+ active ? appearance.selected : appearance.inactive
1995
2087
  );
1996
2088
  }
1997
2089
  function filterCatalogItems(items, activeFilterId) {
@@ -2145,7 +2237,8 @@ function ChildEntry({
2145
2237
  "flex w-full min-w-0 flex-1 items-center gap-3 rounded-[var(--radius)] border border-transparent text-left text-sm font-semibold outline-none transition-[background-color,border-color,color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
2146
2238
  appearance.itemHeight,
2147
2239
  appearance.itemPadding,
2148
- embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? activeVariantClassName(appearance.activeVariant) : "text-muted-foreground hover:border-border/70 hover:bg-muted/60 hover:text-foreground",
2240
+ appearance.unified && unifiedRow,
2241
+ embedded ? "min-h-0 self-stretch border-0 bg-transparent text-inherit hover:bg-transparent hover:text-inherit" : active ? appearance.selected : appearance.inactive,
2149
2242
  child.disabled && "pointer-events-none opacity-50",
2150
2243
  classNames?.childItem,
2151
2244
  active && classNames?.childItemActive,
@@ -2157,7 +2250,10 @@ function ChildEntry({
2157
2250
  hasRenderableNode(child.icon) ? /* @__PURE__ */ jsx(
2158
2251
  "span",
2159
2252
  {
2160
- className: "flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",
2253
+ className: cn(
2254
+ "flex size-5 shrink-0 items-center justify-center [&_svg]:size-full",
2255
+ appearance.unified && unifiedIcon
2256
+ ),
2161
2257
  "aria-hidden": "true",
2162
2258
  children: child.icon
2163
2259
  }
@@ -2306,6 +2402,7 @@ function CollapsedChildMenu({
2306
2402
  children: /* @__PURE__ */ jsx(
2307
2403
  EntryContent,
2308
2404
  {
2405
+ appearance,
2309
2406
  item,
2310
2407
  collapsed: !mobile,
2311
2408
  mobile,
@@ -2419,137 +2516,148 @@ function RouteContent({
2419
2516
  onExpandedItemIdsChange
2420
2517
  ]
2421
2518
  );
2422
- return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, children: /* @__PURE__ */ jsx("ul", { className: cn("grid list-none gap-2 p-0", classNames?.list), children: routeItems.map((item, itemIndex) => {
2423
- const disclosure = isDisclosureRouteItem(item);
2424
- const active = !disclosure && item.id === activeItemId;
2425
- const hasChildren = Boolean(item.children?.length);
2426
- const childrenCollapsible = collapsibleItemIds.has(item.id);
2427
- const childrenExpanded = !childrenCollapsible || expandedItemIdSet.has(item.id);
2428
- const showItemActions = !collapsed && hasRenderableNode(item.actions);
2429
- const compoundItemRow = collapsed && hasChildren && Boolean(onChildSelect) || !collapsed && childrenCollapsible && !disclosure || showItemActions;
2430
- const childListId = `${disclosureId}-route-children-${itemIndex}`;
2431
- return /* @__PURE__ */ jsxs("li", { className: "grid min-w-0 gap-1", children: [
2432
- collapsed && disclosure ? /* @__PURE__ */ jsx(
2433
- CollapsedChildMenu,
2434
- {
2435
- item,
2436
- activeChildId,
2437
- label: collapsedChildMenuLabel,
2438
- onChildSelect,
2439
- classNames,
2440
- appearance,
2441
- triggerVariant: "item"
2442
- }
2443
- ) : /* @__PURE__ */ jsxs(
2444
- "div",
2445
- {
2446
- "data-navigation-sidebar-item-row": compoundItemRow ? item.id : void 0,
2447
- "data-active": compoundItemRow ? String(active) : void 0,
2448
- className: compoundItemRow ? routeRowClassName({ active, appearance }) : void 0,
2449
- children: [
2450
- /* @__PURE__ */ jsx(
2451
- EntryButton,
2452
- {
2453
- item,
2454
- active,
2455
- collapsed,
2456
- embedded: compoundItemRow,
2457
- itemAs: disclosure ? "button" : itemAs,
2458
- appearance,
2459
- classNames,
2460
- onSelect: disclosure ? () => toggleItemExpanded(item) : onItemSelect ? () => onItemSelect(item) : void 0,
2461
- ariaControls: !collapsed && childrenCollapsible && disclosure ? childListId : void 0,
2462
- ariaExpanded: !collapsed && childrenCollapsible && disclosure ? childrenExpanded : void 0,
2463
- endIndicator: !collapsed && disclosure && !showItemActions ? /* @__PURE__ */ jsx(DisclosureIcon, { expanded: childrenExpanded }) : void 0
2464
- }
2465
- ),
2466
- showItemActions ? /* @__PURE__ */ jsx(
2467
- RouteActions,
2468
- {
2469
- itemId: item.id,
2470
- actions: item.actions,
2471
- kind: "item",
2472
- className: classNames?.itemActions
2473
- }
2474
- ) : null,
2475
- collapsed && onChildSelect ? /* @__PURE__ */ jsx(
2476
- CollapsedChildMenu,
2477
- {
2478
- item,
2479
- activeChildId,
2480
- label: collapsedChildMenuLabel,
2481
- onChildSelect,
2482
- classNames
2483
- }
2484
- ) : null,
2485
- !collapsed && childrenCollapsible && (!disclosure || showItemActions) ? /* @__PURE__ */ jsx(
2486
- RouteChildrenToggle,
2487
- {
2488
- item,
2489
- expanded: childrenExpanded,
2490
- controls: childListId,
2491
- label: disclosureLabel,
2492
- onToggle: () => toggleItemExpanded(item),
2493
- classNames
2494
- }
2495
- ) : null
2496
- ]
2497
- }
2519
+ return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(
2520
+ "ul",
2521
+ {
2522
+ className: cn(
2523
+ "grid list-none gap-2 p-0",
2524
+ appearance.unified && "gap-0.5",
2525
+ classNames?.list
2498
2526
  ),
2499
- !collapsed && hasChildren ? /* @__PURE__ */ jsx(
2500
- "ul",
2501
- {
2502
- id: childListId,
2503
- hidden: !childrenExpanded,
2504
- style: childrenExpanded ? void 0 : { display: "none" },
2505
- className: cn(
2506
- "ml-5 grid list-none gap-0.5 border-l border-border/70 py-1 pl-3",
2507
- classNames?.childList
2527
+ children: routeItems.map((item, itemIndex) => {
2528
+ const disclosure = isDisclosureRouteItem(item);
2529
+ const active = !disclosure && item.id === activeItemId;
2530
+ const hasChildren = Boolean(item.children?.length);
2531
+ const childrenCollapsible = collapsibleItemIds.has(item.id);
2532
+ const childrenExpanded = !childrenCollapsible || expandedItemIdSet.has(item.id);
2533
+ const showItemActions = !collapsed && hasRenderableNode(item.actions);
2534
+ const compoundItemRow = collapsed && hasChildren && Boolean(onChildSelect) || !collapsed && childrenCollapsible && !disclosure || showItemActions;
2535
+ const childListId = `${disclosureId}-route-children-${itemIndex}`;
2536
+ return /* @__PURE__ */ jsxs("li", { className: "grid min-w-0 gap-1", children: [
2537
+ collapsed && disclosure ? /* @__PURE__ */ jsx(
2538
+ CollapsedChildMenu,
2539
+ {
2540
+ item,
2541
+ activeChildId,
2542
+ label: collapsedChildMenuLabel,
2543
+ onChildSelect,
2544
+ classNames,
2545
+ appearance,
2546
+ triggerVariant: "item"
2547
+ }
2548
+ ) : /* @__PURE__ */ jsxs(
2549
+ "div",
2550
+ {
2551
+ "data-navigation-sidebar-item-row": compoundItemRow ? item.id : void 0,
2552
+ "data-active": compoundItemRow ? String(active) : void 0,
2553
+ className: compoundItemRow ? routeRowClassName({ active, appearance }) : void 0,
2554
+ children: [
2555
+ /* @__PURE__ */ jsx(
2556
+ EntryButton,
2557
+ {
2558
+ item,
2559
+ active,
2560
+ collapsed,
2561
+ embedded: compoundItemRow,
2562
+ itemAs: disclosure ? "button" : itemAs,
2563
+ appearance,
2564
+ classNames,
2565
+ onSelect: disclosure ? () => toggleItemExpanded(item) : onItemSelect ? () => onItemSelect(item) : void 0,
2566
+ ariaControls: !collapsed && childrenCollapsible && disclosure ? childListId : void 0,
2567
+ ariaExpanded: !collapsed && childrenCollapsible && disclosure ? childrenExpanded : void 0,
2568
+ endIndicator: !collapsed && disclosure && !showItemActions ? /* @__PURE__ */ jsx(DisclosureIcon, { expanded: childrenExpanded }) : void 0
2569
+ }
2570
+ ),
2571
+ showItemActions ? /* @__PURE__ */ jsx(
2572
+ RouteActions,
2573
+ {
2574
+ itemId: item.id,
2575
+ actions: item.actions,
2576
+ kind: "item",
2577
+ className: classNames?.itemActions
2578
+ }
2579
+ ) : null,
2580
+ collapsed && onChildSelect ? /* @__PURE__ */ jsx(
2581
+ CollapsedChildMenu,
2582
+ {
2583
+ item,
2584
+ activeChildId,
2585
+ label: collapsedChildMenuLabel,
2586
+ onChildSelect,
2587
+ classNames
2588
+ }
2589
+ ) : null,
2590
+ !collapsed && childrenCollapsible && (!disclosure || showItemActions) ? /* @__PURE__ */ jsx(
2591
+ RouteChildrenToggle,
2592
+ {
2593
+ item,
2594
+ expanded: childrenExpanded,
2595
+ controls: childListId,
2596
+ label: disclosureLabel,
2597
+ onToggle: () => toggleItemExpanded(item),
2598
+ classNames
2599
+ }
2600
+ ) : null
2601
+ ]
2602
+ }
2508
2603
  ),
2509
- children: item.children?.map((child) => {
2510
- const hasChildActions = hasRenderableNode(child.actions);
2511
- const childActive = child.id === activeChildId;
2512
- const childEntry = /* @__PURE__ */ jsx(
2513
- ChildEntry,
2514
- {
2515
- child,
2516
- parent: item,
2517
- active: childActive,
2518
- interactive: Boolean(onChildSelect),
2519
- onSelect: onChildSelect,
2520
- appearance,
2521
- classNames,
2522
- embedded: hasChildActions
2523
- }
2524
- );
2525
- return /* @__PURE__ */ jsx("li", { children: hasChildActions ? /* @__PURE__ */ jsxs(
2526
- "div",
2527
- {
2528
- "data-navigation-sidebar-child-row": child.id,
2529
- "data-active": String(childActive),
2530
- className: routeRowClassName({
2531
- active: childActive,
2532
- appearance
2533
- }),
2534
- children: [
2535
- childEntry,
2536
- /* @__PURE__ */ jsx(
2537
- RouteActions,
2538
- {
2539
- itemId: child.id,
2540
- actions: child.actions,
2541
- kind: "child",
2542
- className: classNames?.childActions
2543
- }
2544
- )
2545
- ]
2546
- }
2547
- ) : childEntry }, child.id);
2548
- })
2549
- }
2550
- ) : null
2551
- ] }, item.id);
2552
- }) }) });
2604
+ !collapsed && hasChildren ? /* @__PURE__ */ jsx(
2605
+ "ul",
2606
+ {
2607
+ id: childListId,
2608
+ hidden: !childrenExpanded,
2609
+ style: childrenExpanded ? void 0 : { display: "none" },
2610
+ className: cn(
2611
+ "ml-5 grid list-none gap-0.5 border-l border-border/70 py-1 pl-3",
2612
+ appearance.unified && "border-border",
2613
+ classNames?.childList
2614
+ ),
2615
+ children: item.children?.map((child) => {
2616
+ const hasChildActions = hasRenderableNode(child.actions);
2617
+ const childActive = child.id === activeChildId;
2618
+ const childEntry = /* @__PURE__ */ jsx(
2619
+ ChildEntry,
2620
+ {
2621
+ child,
2622
+ parent: item,
2623
+ active: childActive,
2624
+ interactive: Boolean(onChildSelect),
2625
+ onSelect: onChildSelect,
2626
+ appearance,
2627
+ classNames,
2628
+ embedded: hasChildActions
2629
+ }
2630
+ );
2631
+ return /* @__PURE__ */ jsx("li", { children: hasChildActions ? /* @__PURE__ */ jsxs(
2632
+ "div",
2633
+ {
2634
+ "data-navigation-sidebar-child-row": child.id,
2635
+ "data-active": String(childActive),
2636
+ className: routeRowClassName({
2637
+ active: childActive,
2638
+ appearance
2639
+ }),
2640
+ children: [
2641
+ childEntry,
2642
+ /* @__PURE__ */ jsx(
2643
+ RouteActions,
2644
+ {
2645
+ itemId: child.id,
2646
+ actions: child.actions,
2647
+ kind: "child",
2648
+ className: classNames?.childActions
2649
+ }
2650
+ )
2651
+ ]
2652
+ }
2653
+ ) : childEntry }, child.id);
2654
+ })
2655
+ }
2656
+ ) : null
2657
+ ] }, item.id);
2658
+ })
2659
+ }
2660
+ ) });
2553
2661
  }
2554
2662
  function flattenCatalogItems(items, sections, activeFilterId) {
2555
2663
  return [
@@ -2859,7 +2967,11 @@ function NavigationSidebarInner(props, ref) {
2859
2967
  DataExplorerViewTree,
2860
2968
  {
2861
2969
  ...treeProps,
2862
- classNames: resolveNavigationTreeClassNames(treeProps.classNames)
2970
+ classNames: appearance.unified ? unifiedTreeClassNames(
2971
+ appearance.itemHeight,
2972
+ appearance.itemPadding,
2973
+ treeProps.classNames
2974
+ ) : resolveNavigationTreeClassNames(treeProps.classNames)
2863
2975
  }
2864
2976
  );
2865
2977
  };
@@ -2872,6 +2984,7 @@ function NavigationSidebarInner(props, ref) {
2872
2984
  "aria-label": props.ariaLabel,
2873
2985
  "data-monkeys-component": props.dataComponent ?? "navigation-sidebar",
2874
2986
  "data-navigation-sidebar-kind": props.kind,
2987
+ "data-navigation-sidebar-preset": props.appearance?.preset,
2875
2988
  "data-collapsed": resolvedCollapsed ? "true" : "false",
2876
2989
  className: cn(
2877
2990
  "relative flex h-full min-h-0 shrink-0 flex-col overflow-visible rounded-[calc(var(--radius)+0.25rem)] border transition-[width,opacity] duration-300 motion-reduce:transition-none",
@@ -2882,6 +2995,7 @@ function NavigationSidebarInner(props, ref) {
2882
2995
  props.className
2883
2996
  ),
2884
2997
  style: {
2998
+ ...appearance.unified ? unifiedStyle(props.appearance?.activeVariant) : {},
2885
2999
  ...props.style,
2886
3000
  width: props.widthMode === "fill" ? void 0 : resolvedCollapsed ? bounds.collapsedWidth : resolvedWidth,
2887
3001
  transition: isResizing ? "none" : props.style?.transition
@@ -2919,6 +3033,7 @@ function NavigationSidebarInner(props, ref) {
2919
3033
  {
2920
3034
  className: cn(
2921
3035
  "flex min-h-12 min-w-0 items-center gap-2 border-b border-border/60 px-3",
3036
+ appearance.unified && "min-h-14 border-border px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))]",
2922
3037
  resolvedCollapsed && "justify-center px-1",
2923
3038
  props.classNames?.header
2924
3039
  ),
@@ -2962,6 +3077,7 @@ function NavigationSidebarInner(props, ref) {
2962
3077
  {
2963
3078
  className: cn(
2964
3079
  "px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] pb-2 pt-3",
3080
+ appearance.unified && "pb-1",
2965
3081
  props.classNames?.search
2966
3082
  ),
2967
3083
  children: /* @__PURE__ */ jsxs(
@@ -2969,7 +3085,8 @@ function NavigationSidebarInner(props, ref) {
2969
3085
  {
2970
3086
  className: cn(
2971
3087
  "flex items-center gap-2 rounded-md border border-input bg-[var(--monkeys-component-navigation-sidebar-search-background,hsl(var(--monkeys-color-control-surface)))] px-3 text-muted-foreground ring-offset-control-surface focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
2972
- appearance.searchHeight
3088
+ appearance.searchHeight,
3089
+ appearance.unified && "rounded-[var(--radius)] border-border bg-[var(--monkeys-component-navigation-sidebar-search-background,transparent)] px-2"
2973
3090
  ),
2974
3091
  children: [
2975
3092
  /* @__PURE__ */ jsx(
@@ -2977,6 +3094,7 @@ function NavigationSidebarInner(props, ref) {
2977
3094
  {
2978
3095
  className: cn(
2979
3096
  "flex shrink-0",
3097
+ appearance.unified && unifiedIcon,
2980
3098
  props.classNames?.searchIcon
2981
3099
  ),
2982
3100
  "aria-hidden": "true",
@@ -3030,6 +3148,7 @@ function NavigationSidebarInner(props, ref) {
3030
3148
  {
3031
3149
  className: cn(
3032
3150
  "min-h-0 flex-1 overflow-y-auto px-[var(--monkeys-component-navigation-sidebar-content-inline-padding,var(--global-spacing,0.75rem))] py-3",
3151
+ appearance.unified && props.search && "pt-1",
3033
3152
  resolvedCollapsed && "px-1.5",
3034
3153
  props.classNames?.content
3035
3154
  ),
@@ -3041,6 +3160,7 @@ function NavigationSidebarInner(props, ref) {
3041
3160
  {
3042
3161
  className: cn(
3043
3162
  "flex shrink-0 items-center gap-2 border-t border-border/70 p-3",
3163
+ appearance.unified && "border-border",
3044
3164
  resolvedCollapsed && "justify-center px-1",
3045
3165
  props.classNames?.footer
3046
3166
  ),