@inf-monkeys-tech/monkeys-design 1.0.6 → 1.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.
package/dist/index.js CHANGED
@@ -15444,6 +15444,93 @@ var BaseVisuallyHidden = React.forwardRef(function BaseVisuallyHidden2({
15444
15444
  }
15445
15445
  );
15446
15446
  });
15447
+ var rootTokenStyles = {
15448
+ width: "var(--monkeys-component-app-shell-sidebar-width, 16rem)",
15449
+ borderRadius: "var(--monkeys-component-app-shell-sidebar-radius, var(--radius, 0.75rem))",
15450
+ background: "var(--monkeys-component-app-shell-sidebar-background, hsl(var(--card)))",
15451
+ color: "var(--monkeys-component-app-shell-sidebar-foreground, hsl(var(--card-foreground)))",
15452
+ borderColor: "var(--monkeys-component-app-shell-sidebar-border-color, hsl(var(--border)))",
15453
+ boxShadow: "var(--monkeys-component-app-shell-sidebar-shadow, none)"
15454
+ };
15455
+ var headerTokenStyles = {
15456
+ padding: "var(--monkeys-component-app-shell-sidebar-header-padding, var(--global-spacing, 0.75rem))",
15457
+ borderColor: "var(--monkeys-component-app-shell-sidebar-header-border-color, hsl(var(--border)))"
15458
+ };
15459
+ var navigationTokenStyles = {
15460
+ padding: "var(--monkeys-component-app-shell-sidebar-navigation-padding, var(--global-spacing, 0.75rem))",
15461
+ "--monkeys-component-accordion-item-border-color": "transparent"
15462
+ };
15463
+ var footerTokenStyles = {
15464
+ padding: "var(--monkeys-component-app-shell-sidebar-footer-padding, var(--global-spacing, 0.75rem))",
15465
+ background: "var(--monkeys-component-app-shell-sidebar-footer-background, hsl(var(--muted) / 0.22))",
15466
+ borderColor: "var(--monkeys-component-app-shell-sidebar-footer-border-color, hsl(var(--border)))"
15467
+ };
15468
+ var AppShellSidebar = React.forwardRef(
15469
+ function AppShellSidebar2({
15470
+ navigation,
15471
+ header,
15472
+ footer,
15473
+ width,
15474
+ className,
15475
+ classNames,
15476
+ style,
15477
+ "aria-label": ariaLabel = "Application navigation",
15478
+ ...props
15479
+ }, ref) {
15480
+ return /* @__PURE__ */ jsxRuntime.jsxs(
15481
+ "aside",
15482
+ {
15483
+ ref,
15484
+ "aria-label": ariaLabel,
15485
+ "data-app-shell-sidebar": "",
15486
+ className: cn(
15487
+ "relative isolate flex h-full min-h-0 shrink-0 flex-col overflow-hidden border",
15488
+ classNames?.root,
15489
+ className
15490
+ ),
15491
+ style: {
15492
+ ...rootTokenStyles,
15493
+ ...width === void 0 ? null : { width },
15494
+ ...style
15495
+ },
15496
+ ...props,
15497
+ children: [
15498
+ header ? /* @__PURE__ */ jsxRuntime.jsx(
15499
+ "div",
15500
+ {
15501
+ "data-slot": "header",
15502
+ className: cn("shrink-0 border-b", classNames?.header),
15503
+ style: headerTokenStyles,
15504
+ children: header
15505
+ }
15506
+ ) : null,
15507
+ /* @__PURE__ */ jsxRuntime.jsx(
15508
+ "div",
15509
+ {
15510
+ "data-slot": "navigation",
15511
+ className: cn(
15512
+ "relative min-h-0 flex-1 overflow-hidden",
15513
+ classNames?.navigation
15514
+ ),
15515
+ style: navigationTokenStyles,
15516
+ children: navigation
15517
+ }
15518
+ ),
15519
+ footer ? /* @__PURE__ */ jsxRuntime.jsx(
15520
+ "div",
15521
+ {
15522
+ "data-slot": "footer",
15523
+ className: cn("shrink-0 border-t", classNames?.footer),
15524
+ style: footerTokenStyles,
15525
+ children: footer
15526
+ }
15527
+ ) : null
15528
+ ]
15529
+ }
15530
+ );
15531
+ }
15532
+ );
15533
+ AppShellSidebar.displayName = "AppShellSidebar";
15447
15534
  var defaultAppearance = {
15448
15535
  preset: "soft",
15449
15536
  density: "compact",
@@ -15718,7 +15805,14 @@ function UserAccountMenu({
15718
15805
  function cn2(...inputs) {
15719
15806
  return inputs.filter(Boolean).join(" ");
15720
15807
  }
15721
- function NavButton({ active, icon, postfix, onClick, className, children }) {
15808
+ function NavButton({
15809
+ active,
15810
+ icon,
15811
+ postfix,
15812
+ onClick,
15813
+ className,
15814
+ children
15815
+ }) {
15722
15816
  return /* @__PURE__ */ jsxRuntime.jsxs(
15723
15817
  "div",
15724
15818
  {
@@ -15770,7 +15864,14 @@ function AppHeader({
15770
15864
  "flex h-8 w-8 items-center justify-center rounded-lg overflow-hidden",
15771
15865
  logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
15772
15866
  ),
15773
- children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.url, alt: logo.title, className: "h-full w-full object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
15867
+ children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx(
15868
+ "img",
15869
+ {
15870
+ src: logo.url,
15871
+ alt: logo.title,
15872
+ className: "h-full w-full object-contain"
15873
+ }
15874
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
15774
15875
  }
15775
15876
  ),
15776
15877
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold whitespace-nowrap", children: logo.title })
@@ -15796,7 +15897,14 @@ function AppHeader({
15796
15897
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-4", children: [
15797
15898
  extra,
15798
15899
  user && /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu2__namespace.Root, { children: [
15799
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: "flex h-8 w-8 items-center justify-center rounded-full hover:ring-2 hover:ring-[hsl(var(--ring))]/20 transition-all overflow-hidden focus-visible:outline-none", children: user.photo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: user.photo, alt: user.name, className: "h-8 w-8 rounded-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }) }) }),
15900
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { className: "flex h-8 w-8 items-center justify-center rounded-full hover:ring-2 hover:ring-[hsl(var(--ring))]/20 transition-all overflow-hidden focus-visible:outline-none", children: user.photo ? /* @__PURE__ */ jsxRuntime.jsx(
15901
+ "img",
15902
+ {
15903
+ src: user.photo,
15904
+ alt: user.name,
15905
+ className: "h-8 w-8 rounded-full object-cover"
15906
+ }
15907
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }) }) }),
15800
15908
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu2__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
15801
15909
  DropdownMenu2__namespace.Content,
15802
15910
  {
@@ -15805,7 +15913,14 @@ function AppHeader({
15805
15913
  align: "end",
15806
15914
  children: [
15807
15915
  /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu2__namespace.Label, { className: "flex items-center gap-2 px-2 py-1.5 font-normal", children: [
15808
- user.photo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: user.photo, alt: user.name, className: "h-8 w-8 rounded-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }),
15916
+ user.photo ? /* @__PURE__ */ jsxRuntime.jsx(
15917
+ "img",
15918
+ {
15919
+ src: user.photo,
15920
+ alt: user.name,
15921
+ className: "h-8 w-8 rounded-full object-cover"
15922
+ }
15923
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-xs font-medium", children: user.name ? getUserInitials(user.name) : "U" }),
15809
15924
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
15810
15925
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium leading-none", children: user.name }),
15811
15926
  user.email && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[hsl(var(--muted-foreground))] leading-none mt-1", children: user.email })
@@ -15820,11 +15935,25 @@ function AppHeader({
15820
15935
  className: "relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-[hsl(var(--destructive))] outline-none transition-colors hover:bg-[hsl(var(--accent))]",
15821
15936
  onSelect: () => onLogout?.(),
15822
15937
  children: [
15823
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
15824
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
15825
- /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 17 21 12 16 7" }),
15826
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
15827
- ] }),
15938
+ /* @__PURE__ */ jsxRuntime.jsxs(
15939
+ "svg",
15940
+ {
15941
+ xmlns: "http://www.w3.org/2000/svg",
15942
+ width: "16",
15943
+ height: "16",
15944
+ viewBox: "0 0 24 24",
15945
+ fill: "none",
15946
+ stroke: "currentColor",
15947
+ strokeWidth: "1.5",
15948
+ strokeLinecap: "round",
15949
+ strokeLinejoin: "round",
15950
+ children: [
15951
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
15952
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 17 21 12 16 7" }),
15953
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
15954
+ ]
15955
+ }
15956
+ ),
15828
15957
  logoutLabel
15829
15958
  ]
15830
15959
  }
@@ -15859,19 +15988,33 @@ function AppSidebar({
15859
15988
  className
15860
15989
  ),
15861
15990
  children: [
15862
- logo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 cursor-pointer items-center gap-2", onClick: logo.onClick, children: [
15863
- /* @__PURE__ */ jsxRuntime.jsx(
15864
- "div",
15865
- {
15866
- className: cn2(
15867
- "flex h-8 w-8 items-center justify-center rounded-lg overflow-hidden",
15868
- logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
15991
+ logo && /* @__PURE__ */ jsxRuntime.jsxs(
15992
+ "div",
15993
+ {
15994
+ className: "flex shrink-0 cursor-pointer items-center gap-2",
15995
+ onClick: logo.onClick,
15996
+ children: [
15997
+ /* @__PURE__ */ jsxRuntime.jsx(
15998
+ "div",
15999
+ {
16000
+ className: cn2(
16001
+ "flex h-8 w-8 items-center justify-center rounded-lg overflow-hidden",
16002
+ logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
16003
+ ),
16004
+ children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx(
16005
+ "img",
16006
+ {
16007
+ src: logo.url,
16008
+ alt: logo.title,
16009
+ className: "h-full w-full object-contain"
16010
+ }
16011
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
16012
+ }
15869
16013
  ),
15870
- children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.url, alt: logo.title, className: "h-full w-full object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
15871
- }
15872
- ),
15873
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold whitespace-nowrap", children: logo.title })
15874
- ] }),
16014
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold whitespace-nowrap", children: logo.title })
16015
+ ]
16016
+ }
16017
+ ),
15875
16018
  /* @__PURE__ */ jsxRuntime.jsx(
15876
16019
  SidebarNavList,
15877
16020
  {
@@ -15884,7 +16027,14 @@ function AppSidebar({
15884
16027
  (account || footer) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
15885
16028
  account && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full flex-col gap-2 rounded-lg bg-[hsl(var(--muted))] p-2 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between px-3 py-1", children: [
15886
16029
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
15887
- account.photo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: account.photo, alt: account.name, className: "h-5 w-5 rounded-full object-cover" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[10px] font-medium", children: account.name ? account.name.charAt(0).toUpperCase() : "U" }),
16030
+ account.photo ? /* @__PURE__ */ jsxRuntime.jsx(
16031
+ "img",
16032
+ {
16033
+ src: account.photo,
16034
+ alt: account.name,
16035
+ className: "h-5 w-5 rounded-full object-cover"
16036
+ }
16037
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-[hsl(var(--muted))] text-[10px] font-medium", children: account.name ? account.name.charAt(0).toUpperCase() : "U" }),
15888
16038
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium truncate max-w-[100px]", children: account.name })
15889
16039
  ] }),
15890
16040
  onLogout && /* @__PURE__ */ jsxRuntime.jsx(
@@ -15893,11 +16043,25 @@ function AppSidebar({
15893
16043
  onClick: onLogout,
15894
16044
  className: "flex items-center justify-center text-[hsl(var(--destructive))] hover:opacity-80 transition-opacity",
15895
16045
  title: logoutLabel,
15896
- children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
15897
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
15898
- /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 17 21 12 16 7" }),
15899
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
15900
- ] })
16046
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
16047
+ "svg",
16048
+ {
16049
+ xmlns: "http://www.w3.org/2000/svg",
16050
+ width: "16",
16051
+ height: "16",
16052
+ viewBox: "0 0 24 24",
16053
+ fill: "none",
16054
+ stroke: "currentColor",
16055
+ strokeWidth: "1.5",
16056
+ strokeLinecap: "round",
16057
+ strokeLinejoin: "round",
16058
+ children: [
16059
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
16060
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "16 17 21 12 16 7" }),
16061
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
16062
+ ]
16063
+ }
16064
+ )
15901
16065
  }
15902
16066
  )
15903
16067
  ] }) }),
@@ -15907,7 +16071,12 @@ function AppSidebar({
15907
16071
  }
15908
16072
  );
15909
16073
  }
15910
- function SidebarNavList({ items, activeItemId, onNavigate, defaultExpandedGroups }) {
16074
+ function SidebarNavList({
16075
+ items,
16076
+ activeItemId,
16077
+ onNavigate,
16078
+ defaultExpandedGroups
16079
+ }) {
15911
16080
  const [expanded, setExpanded] = React.useState(() => {
15912
16081
  const map = {};
15913
16082
  (defaultExpandedGroups ?? items.map((i) => i.id)).forEach((id) => {
@@ -15922,84 +16091,115 @@ function SidebarNavList({ items, activeItemId, onNavigate, defaultExpandedGroups
15922
16091
  }
15923
16092
  }, [activeItemId]);
15924
16093
  const toggle = (id) => {
15925
- setExpanded((prev) => ({ ...prev, [id]: !prev[id] }));
16094
+ setExpanded((prev) => ({
16095
+ ...prev,
16096
+ [id]: !prev[id]
16097
+ }));
15926
16098
  };
15927
16099
  const resolvedActiveItemId = activeItemId ?? localActiveItemId;
15928
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex-1 overflow-y-auto", style: { scrollbarWidth: "none", msOverflowStyle: "none" }, children: [
15929
- /* @__PURE__ */ jsxRuntime.jsx("style", { children: `.monkeys-sidebar-nav::-webkit-scrollbar { display: none; }` }),
15930
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "monkeys-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]", children: items.map((item) => {
15931
- if (item.children && item.children.length > 0) {
15932
- const isExpanded = expanded[item.id] ?? true;
15933
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
15934
- /* @__PURE__ */ jsxRuntime.jsx(
15935
- NavButton,
15936
- {
15937
- icon: item.icon,
15938
- onClick: () => toggle(item.id),
15939
- postfix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
15940
- "svg",
16100
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16101
+ "div",
16102
+ {
16103
+ className: "h-full flex-1 overflow-y-auto",
16104
+ style: { scrollbarWidth: "none", msOverflowStyle: "none" },
16105
+ children: [
16106
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `.monkeys-sidebar-nav::-webkit-scrollbar { display: none; }` }),
16107
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "monkeys-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]", children: items.map((item) => {
16108
+ if (item.children && item.children.length > 0) {
16109
+ const isExpanded = expanded[item.id] ?? true;
16110
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
16111
+ /* @__PURE__ */ jsxRuntime.jsx(
16112
+ NavButton,
15941
16113
  {
15942
- xmlns: "http://www.w3.org/2000/svg",
15943
- width: "16",
15944
- height: "16",
15945
- viewBox: "0 0 24 24",
15946
- fill: "none",
15947
- stroke: "currentColor",
15948
- strokeWidth: "2",
15949
- strokeLinecap: "round",
15950
- strokeLinejoin: "round",
15951
- className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
15952
- style: { transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)" },
15953
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
16114
+ icon: item.icon,
16115
+ onClick: () => toggle(item.id),
16116
+ postfix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
16117
+ "svg",
16118
+ {
16119
+ xmlns: "http://www.w3.org/2000/svg",
16120
+ width: "16",
16121
+ height: "16",
16122
+ viewBox: "0 0 24 24",
16123
+ fill: "none",
16124
+ stroke: "currentColor",
16125
+ strokeWidth: "2",
16126
+ strokeLinecap: "round",
16127
+ strokeLinejoin: "round",
16128
+ className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
16129
+ style: {
16130
+ transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
16131
+ },
16132
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
16133
+ }
16134
+ ) }),
16135
+ children: item.label
15954
16136
  }
15955
- ) }),
15956
- children: item.label
15957
- }
15958
- ),
15959
- isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1 mt-1", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
16137
+ ),
16138
+ isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1 mt-1", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
16139
+ NavButton,
16140
+ {
16141
+ active: child.id === resolvedActiveItemId,
16142
+ onClick: () => {
16143
+ setLocalActiveItemId(child.id);
16144
+ onNavigate?.(child.id);
16145
+ },
16146
+ children: child.label
16147
+ },
16148
+ child.id
16149
+ )) })
16150
+ ] }, item.id);
16151
+ }
16152
+ return /* @__PURE__ */ jsxRuntime.jsx(
15960
16153
  NavButton,
15961
16154
  {
15962
- active: child.id === resolvedActiveItemId,
16155
+ icon: item.icon,
16156
+ active: item.id === resolvedActiveItemId,
15963
16157
  onClick: () => {
15964
- setLocalActiveItemId(child.id);
15965
- onNavigate?.(child.id);
16158
+ setLocalActiveItemId(item.id);
16159
+ onNavigate?.(item.id);
15966
16160
  },
15967
- children: child.label
16161
+ children: item.label
15968
16162
  },
15969
- child.id
15970
- )) })
15971
- ] }, item.id);
15972
- }
15973
- return /* @__PURE__ */ jsxRuntime.jsx(
15974
- NavButton,
15975
- {
15976
- icon: item.icon,
15977
- active: item.id === resolvedActiveItemId,
15978
- onClick: () => {
15979
- setLocalActiveItemId(item.id);
15980
- onNavigate?.(item.id);
15981
- },
15982
- children: item.label
15983
- },
15984
- item.id
15985
- );
15986
- }) })
15987
- ] });
16163
+ item.id
16164
+ );
16165
+ }) })
16166
+ ]
16167
+ }
16168
+ );
15988
16169
  }
15989
- function AppLayout({ header, sidebar, children, flush = false, className }) {
15990
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn2(
15991
- "flex h-screen flex-col gap-[var(--global-spacing,0.75rem)] overflow-hidden p-[var(--global-spacing,0.75rem)]",
15992
- className
15993
- ), style: { backgroundColor: "hsl(var(--muted))" }, children: [
15994
- header ? header : null,
15995
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 gap-[var(--global-spacing,0.75rem)] overflow-hidden min-h-0", children: [
15996
- sidebar ? sidebar : null,
15997
- /* @__PURE__ */ jsxRuntime.jsx("main", { className: cn2(
15998
- "flex-1 min-h-0 overflow-hidden rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))]",
15999
- !flush && "overflow-y-auto"
16000
- ), children: flush ? children : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full overflow-y-auto", children }) })
16001
- ] })
16002
- ] });
16170
+ function AppLayout({
16171
+ header,
16172
+ sidebar,
16173
+ children,
16174
+ flush = false,
16175
+ className
16176
+ }) {
16177
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16178
+ "div",
16179
+ {
16180
+ className: cn2(
16181
+ "flex h-screen flex-col gap-[var(--global-spacing,0.75rem)] overflow-hidden p-[var(--global-spacing,0.75rem)]",
16182
+ className
16183
+ ),
16184
+ style: { backgroundColor: "hsl(var(--muted))" },
16185
+ children: [
16186
+ header ? header : null,
16187
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 gap-[var(--global-spacing,0.75rem)] overflow-hidden min-h-0", children: [
16188
+ sidebar ? sidebar : null,
16189
+ /* @__PURE__ */ jsxRuntime.jsx(
16190
+ "main",
16191
+ {
16192
+ className: cn2(
16193
+ "flex-1 min-h-0 overflow-hidden rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))]",
16194
+ !flush && "overflow-y-auto"
16195
+ ),
16196
+ children: flush ? children : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full overflow-y-auto", children })
16197
+ }
16198
+ )
16199
+ ] })
16200
+ ]
16201
+ }
16202
+ );
16003
16203
  }
16004
16204
  var NAVIGATION_LAYOUT_SIDEBAR_EXPANDED_WIDTH = "13.7rem";
16005
16205
  var NAVIGATION_LAYOUT_SIDEBAR_COLLAPSED_WIDTH = "4.25rem";
@@ -16021,15 +16221,39 @@ var NAVIGATION_LAYOUT_DEFAULT_APPEARANCE = {
16021
16221
  };
16022
16222
  var NAVIGATION_LAYOUT_MENU_RADIUS_CLASS_MAP = {
16023
16223
  none: { all: "rounded-none", left: "!rounded-none", right: "!rounded-none" },
16024
- sm: { all: "rounded-sm", left: "!rounded-l-sm !rounded-r-none", right: "!rounded-l-none !rounded-r-sm" },
16025
- md: { all: "rounded-md", left: "!rounded-l-md !rounded-r-none", right: "!rounded-l-none !rounded-r-md" },
16026
- lg: { all: "rounded-lg", left: "!rounded-l-lg !rounded-r-none", right: "!rounded-l-none !rounded-r-lg" },
16027
- xl: { all: "rounded-xl", left: "!rounded-l-xl !rounded-r-none", right: "!rounded-l-none !rounded-r-xl" },
16028
- full: { all: "rounded-full", left: "!rounded-l-full !rounded-r-none", right: "!rounded-l-none !rounded-r-full" }
16224
+ sm: {
16225
+ all: "rounded-sm",
16226
+ left: "!rounded-l-sm !rounded-r-none",
16227
+ right: "!rounded-l-none !rounded-r-sm"
16228
+ },
16229
+ md: {
16230
+ all: "rounded-md",
16231
+ left: "!rounded-l-md !rounded-r-none",
16232
+ right: "!rounded-l-none !rounded-r-md"
16233
+ },
16234
+ lg: {
16235
+ all: "rounded-lg",
16236
+ left: "!rounded-l-lg !rounded-r-none",
16237
+ right: "!rounded-l-none !rounded-r-lg"
16238
+ },
16239
+ xl: {
16240
+ all: "rounded-xl",
16241
+ left: "!rounded-l-xl !rounded-r-none",
16242
+ right: "!rounded-l-none !rounded-r-xl"
16243
+ },
16244
+ full: {
16245
+ all: "rounded-full",
16246
+ left: "!rounded-l-full !rounded-r-none",
16247
+ right: "!rounded-l-none !rounded-r-full"
16248
+ }
16029
16249
  };
16030
16250
  function clampHeadbarHeight(value) {
16031
- if (typeof value !== "number" || !Number.isFinite(value)) return NAVIGATION_LAYOUT_HEADBAR_DEFAULT_HEIGHT_PX;
16032
- return Math.min(NAVIGATION_LAYOUT_HEADBAR_MAX_HEIGHT_PX, Math.max(NAVIGATION_LAYOUT_HEADBAR_MIN_HEIGHT_PX, Math.round(value)));
16251
+ if (typeof value !== "number" || !Number.isFinite(value))
16252
+ return NAVIGATION_LAYOUT_HEADBAR_DEFAULT_HEIGHT_PX;
16253
+ return Math.min(
16254
+ NAVIGATION_LAYOUT_HEADBAR_MAX_HEIGHT_PX,
16255
+ Math.max(NAVIGATION_LAYOUT_HEADBAR_MIN_HEIGHT_PX, Math.round(value))
16256
+ );
16033
16257
  }
16034
16258
  function getHeadbarVerticalPaddingPx(heightPx) {
16035
16259
  return heightPx <= NAVIGATION_LAYOUT_HEADBAR_COMPACT_HEIGHT_THRESHOLD_PX ? NAVIGATION_LAYOUT_HEADBAR_COMPACT_VERTICAL_PADDING_PX : NAVIGATION_LAYOUT_HEADBAR_BOXED_VERTICAL_PADDING_PX;
@@ -16047,7 +16271,13 @@ function getHeadbarMenuRadiusClass(menuRadius = "default", part = "all") {
16047
16271
  }
16048
16272
  function getHeadbarFrameClass(layoutMode = "boxed", navPosition = "center") {
16049
16273
  const columns = navPosition === "center" ? "grid-cols-[minmax(max-content,1fr)_minmax(0,max-content)_minmax(max-content,1fr)]" : "grid-cols-[max-content_minmax(0,1fr)_max-content]";
16050
- return layoutMode === "full-bleed" ? cn2("sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-none border-b border-x-0 border-t-0 border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]", columns) : cn2("sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]", columns);
16274
+ return layoutMode === "full-bleed" ? cn2(
16275
+ "sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-none border-b border-x-0 border-t-0 border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]",
16276
+ columns
16277
+ ) : cn2(
16278
+ "sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]",
16279
+ columns
16280
+ );
16051
16281
  }
16052
16282
  function getHeadbarFrameStyle(layoutMode = "boxed", heightPx, surface = "card") {
16053
16283
  const verticalPaddingPx = getHeadbarVerticalPaddingPx(heightPx);
@@ -16093,7 +16323,8 @@ function getHeadbarItemStyle(active, useTokenRadius = true) {
16093
16323
  function findNavigationRootId(items, activeItemId) {
16094
16324
  for (const item of items) {
16095
16325
  if (item.id === activeItemId) return item.id;
16096
- if (item.children?.some((child) => child.id === activeItemId)) return item.id;
16326
+ if (item.children?.some((child) => child.id === activeItemId))
16327
+ return item.id;
16097
16328
  }
16098
16329
  return activeItemId;
16099
16330
  }
@@ -16162,7 +16393,9 @@ function SidebarNavigationList({
16162
16393
  revealRequest
16163
16394
  }) {
16164
16395
  const navRef = React.useRef(null);
16165
- const [expandedByRoot, setExpandedByRoot] = React.useState({});
16396
+ const [expandedByRoot, setExpandedByRoot] = React.useState(
16397
+ {}
16398
+ );
16166
16399
  const toggleRoot = (id) => {
16167
16400
  setExpandedByRoot((current) => ({
16168
16401
  ...current,
@@ -16180,65 +16413,86 @@ function SidebarNavigationList({
16180
16413
  `[data-navigation-sidebar-root-id="${CSS.escape(revealRequest.id)}"]`
16181
16414
  );
16182
16415
  if (targetElement instanceof HTMLElement) {
16183
- targetElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
16416
+ targetElement.scrollIntoView({
16417
+ behavior: "auto",
16418
+ block: "nearest",
16419
+ inline: "nearest"
16420
+ });
16184
16421
  }
16185
16422
  });
16186
16423
  return () => window.cancelAnimationFrame(frameId);
16187
16424
  }, [revealRequest]);
16188
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex-1 overflow-y-auto", style: { scrollbarWidth: "none", msOverflowStyle: "none" }, children: [
16189
- /* @__PURE__ */ jsxRuntime.jsx("style", { children: `.monkeys-navigation-sidebar-nav::-webkit-scrollbar { display: none; }` }),
16190
- /* @__PURE__ */ jsxRuntime.jsx(
16191
- "div",
16192
- {
16193
- ref: navRef,
16194
- className: "monkeys-navigation-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]",
16195
- children: items.map((item) => {
16196
- const isGroup = Boolean(item.children?.length);
16197
- const isExpanded = Boolean(expandedByRoot[item.id]);
16198
- const isActive = activeItemId === item.id;
16199
- if (isGroup) {
16200
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-navigation-sidebar-root-id": item.id, children: [
16201
- /* @__PURE__ */ jsxRuntime.jsx(
16425
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16426
+ "div",
16427
+ {
16428
+ className: "h-full flex-1 overflow-y-auto",
16429
+ style: { scrollbarWidth: "none", msOverflowStyle: "none" },
16430
+ children: [
16431
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `.monkeys-navigation-sidebar-nav::-webkit-scrollbar { display: none; }` }),
16432
+ /* @__PURE__ */ jsxRuntime.jsx(
16433
+ "div",
16434
+ {
16435
+ ref: navRef,
16436
+ className: "monkeys-navigation-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]",
16437
+ children: items.map((item) => {
16438
+ const isGroup = Boolean(item.children?.length);
16439
+ const isExpanded = Boolean(expandedByRoot[item.id]);
16440
+ const isActive = activeItemId === item.id;
16441
+ if (isGroup) {
16442
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-navigation-sidebar-root-id": item.id, children: [
16443
+ /* @__PURE__ */ jsxRuntime.jsx(
16444
+ NavButton,
16445
+ {
16446
+ icon: item.icon,
16447
+ onClick: () => toggleRoot(item.id),
16448
+ postfix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
16449
+ "svg",
16450
+ {
16451
+ xmlns: "http://www.w3.org/2000/svg",
16452
+ width: "16",
16453
+ height: "16",
16454
+ viewBox: "0 0 24 24",
16455
+ fill: "none",
16456
+ stroke: "currentColor",
16457
+ strokeWidth: "2",
16458
+ strokeLinecap: "round",
16459
+ strokeLinejoin: "round",
16460
+ className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
16461
+ style: {
16462
+ transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)"
16463
+ },
16464
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
16465
+ }
16466
+ ) }),
16467
+ children: item.label
16468
+ }
16469
+ ),
16470
+ isExpanded ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-col gap-1", children: item.children?.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
16471
+ NavButton,
16472
+ {
16473
+ active: activeItemId === child.id,
16474
+ onClick: () => onNavigate?.(child.id),
16475
+ children: child.label
16476
+ },
16477
+ child.id
16478
+ )) }) : null
16479
+ ] }, item.id);
16480
+ }
16481
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-navigation-sidebar-root-id": item.id, children: /* @__PURE__ */ jsxRuntime.jsx(
16202
16482
  NavButton,
16203
16483
  {
16484
+ active: isActive,
16204
16485
  icon: item.icon,
16205
- onClick: () => toggleRoot(item.id),
16206
- postfix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
16207
- "svg",
16208
- {
16209
- xmlns: "http://www.w3.org/2000/svg",
16210
- width: "16",
16211
- height: "16",
16212
- viewBox: "0 0 24 24",
16213
- fill: "none",
16214
- stroke: "currentColor",
16215
- strokeWidth: "2",
16216
- strokeLinecap: "round",
16217
- strokeLinejoin: "round",
16218
- className: "shrink-0 text-[hsl(var(--foreground))] transition-transform duration-200",
16219
- style: { transform: isExpanded ? "rotate(90deg)" : "rotate(0deg)" },
16220
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m9 18 6-6-6-6" })
16221
- }
16222
- ) }),
16486
+ onClick: () => onNavigate?.(item.id),
16223
16487
  children: item.label
16224
16488
  }
16225
- ),
16226
- isExpanded ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex flex-col gap-1", children: item.children?.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
16227
- NavButton,
16228
- {
16229
- active: activeItemId === child.id,
16230
- onClick: () => onNavigate?.(child.id),
16231
- children: child.label
16232
- },
16233
- child.id
16234
- )) }) : null
16235
- ] }, item.id);
16489
+ ) }, item.id);
16490
+ })
16236
16491
  }
16237
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-navigation-sidebar-root-id": item.id, children: /* @__PURE__ */ jsxRuntime.jsx(NavButton, { active: isActive, icon: item.icon, onClick: () => onNavigate?.(item.id), children: item.label }) }, item.id);
16238
- })
16239
- }
16240
- )
16241
- ] });
16492
+ )
16493
+ ]
16494
+ }
16495
+ );
16242
16496
  }
16243
16497
  function SidebarBrand({
16244
16498
  collapsed,
@@ -16254,7 +16508,14 @@ function SidebarBrand({
16254
16508
  "flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",
16255
16509
  logo.url ? "bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
16256
16510
  ),
16257
- children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.url, alt: logo.title, className: "h-full w-full object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
16511
+ children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx(
16512
+ "img",
16513
+ {
16514
+ src: logo.url,
16515
+ alt: logo.title,
16516
+ className: "h-full w-full object-contain"
16517
+ }
16518
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold", children: logo.title.charAt(0) })
16258
16519
  }
16259
16520
  );
16260
16521
  if (collapsed) {
@@ -16388,7 +16649,10 @@ function HeadbarChevronIcon({ open }) {
16388
16649
  "svg",
16389
16650
  {
16390
16651
  "aria-hidden": "true",
16391
- className: cn2("h-4 w-4 shrink-0 transition-transform duration-200", open && "rotate-180"),
16652
+ className: cn2(
16653
+ "h-4 w-4 shrink-0 transition-transform duration-200",
16654
+ open && "rotate-180"
16655
+ ),
16392
16656
  viewBox: "0 0 24 24",
16393
16657
  fill: "none",
16394
16658
  stroke: "currentColor",
@@ -16482,7 +16746,10 @@ function HeadbarNavMenuItem({
16482
16746
  "relative flex cursor-pointer select-none items-center gap-2.5 px-3 py-2 text-sm outline-none transition-colors hover:bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))]",
16483
16747
  menuItemRadiusClass
16484
16748
  ),
16485
- style: getHeadbarItemStyle(child.id === activeItemId, useTokenRadius),
16749
+ style: getHeadbarItemStyle(
16750
+ child.id === activeItemId,
16751
+ useTokenRadius
16752
+ ),
16486
16753
  onSelect: () => {
16487
16754
  if (child.disabled) return;
16488
16755
  setOpen(false);
@@ -16583,7 +16850,10 @@ function NavigationHeadbar({
16583
16850
  return /* @__PURE__ */ jsxRuntime.jsxs(
16584
16851
  "header",
16585
16852
  {
16586
- className: cn2(getHeadbarFrameClass(layoutMode, layout?.navPosition), className),
16853
+ className: cn2(
16854
+ getHeadbarFrameClass(layoutMode, layout?.navPosition),
16855
+ className
16856
+ ),
16587
16857
  "data-navigation-headbar": "",
16588
16858
  "data-navigation-headbar-surface": surface,
16589
16859
  style: frameStyle,
@@ -16601,7 +16871,14 @@ function NavigationHeadbar({
16601
16871
  logo.url ? "w-auto max-w-[min(22rem,30vw)] bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
16602
16872
  ),
16603
16873
  style: logo.url ? { height: logoHeightPx } : { width: logoHeightPx, height: logoHeightPx },
16604
- children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.url, alt: logo.title, className: "block h-full w-auto object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: logo.title.charAt(0) })
16874
+ children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx(
16875
+ "img",
16876
+ {
16877
+ src: logo.url,
16878
+ alt: logo.title,
16879
+ className: "block h-full w-auto object-contain"
16880
+ }
16881
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: logo.title.charAt(0) })
16605
16882
  }
16606
16883
  ),
16607
16884
  label: showBrandTitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap text-base font-medium text-[hsl(var(--foreground))]", children: layout?.brandTitle }) : null,
@@ -16612,16 +16889,25 @@ function NavigationHeadbar({
16612
16889
  onClick: logo.onClick
16613
16890
  }
16614
16891
  ) : null) }),
16615
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("flex min-w-0 items-center", getHeadbarNavClass(layout?.navPosition)), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "no-scrollbar flex max-w-full min-w-0 items-center overflow-x-auto overscroll-x-contain", children: navigation ?? /* @__PURE__ */ jsxRuntime.jsx(
16616
- NavigationHeadbarMenu,
16892
+ /* @__PURE__ */ jsxRuntime.jsx(
16893
+ "div",
16617
16894
  {
16618
- activeItemId,
16619
- activeRootId,
16620
- items: navItems,
16621
- menuRadius,
16622
- onNavigate
16895
+ className: cn2(
16896
+ "flex min-w-0 items-center",
16897
+ getHeadbarNavClass(layout?.navPosition)
16898
+ ),
16899
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "no-scrollbar flex max-w-full min-w-0 items-center overflow-x-auto overscroll-x-contain", children: navigation ?? /* @__PURE__ */ jsxRuntime.jsx(
16900
+ NavigationHeadbarMenu,
16901
+ {
16902
+ activeItemId,
16903
+ activeRootId,
16904
+ items: navItems,
16905
+ menuRadius,
16906
+ onNavigate
16907
+ }
16908
+ ) })
16623
16909
  }
16624
- ) }) }),
16910
+ ),
16625
16911
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center justify-end gap-3", children: [
16626
16912
  actions,
16627
16913
  extra,
@@ -16699,21 +16985,47 @@ function NavigationLayout({
16699
16985
  id: "toggle-headbar",
16700
16986
  label: switchToHeadbarLabel,
16701
16987
  onClick: () => setNavigationMode("headbar"),
16702
- icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-[18px] w-[18px] rotate-180", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
16703
- /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16704
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 9h18" })
16705
- ] })
16988
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
16989
+ "svg",
16990
+ {
16991
+ xmlns: "http://www.w3.org/2000/svg",
16992
+ className: "h-[18px] w-[18px] rotate-180",
16993
+ viewBox: "0 0 24 24",
16994
+ fill: "none",
16995
+ stroke: "currentColor",
16996
+ strokeWidth: "1.8",
16997
+ strokeLinecap: "round",
16998
+ strokeLinejoin: "round",
16999
+ children: [
17000
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
17001
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 9h18" })
17002
+ ]
17003
+ }
17004
+ )
16706
17005
  });
16707
17006
  }
16708
17007
  navigationActions.push({
16709
17008
  id: "toggle-sidebar",
16710
17009
  label: sidebarCollapsed ? expandSidebarLabel : collapseSidebarLabel,
16711
17010
  onClick: () => setCollapsed(!sidebarCollapsed),
16712
- icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-[18px] w-[18px]", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
16713
- /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16714
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 3v18" }),
16715
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: sidebarCollapsed ? "m14 9 3 3-3 3" : "m16 15-3-3 3-3" })
16716
- ] })
17011
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
17012
+ "svg",
17013
+ {
17014
+ xmlns: "http://www.w3.org/2000/svg",
17015
+ className: "h-[18px] w-[18px]",
17016
+ viewBox: "0 0 24 24",
17017
+ fill: "none",
17018
+ stroke: "currentColor",
17019
+ strokeWidth: "1.8",
17020
+ strokeLinecap: "round",
17021
+ strokeLinejoin: "round",
17022
+ children: [
17023
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
17024
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 3v18" }),
17025
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: sidebarCollapsed ? "m14 9 3 3-3 3" : "m16 15-3-3 3-3" })
17026
+ ]
17027
+ }
17028
+ )
16717
17029
  });
16718
17030
  const sidebar = isHeadbarMode ? null : /* @__PURE__ */ jsxRuntime.jsx(
16719
17031
  "div",
@@ -16722,7 +17034,10 @@ function NavigationLayout({
16722
17034
  "relative h-full min-h-0 shrink-0 transition-[width] duration-260",
16723
17035
  sidebarCollapsed ? "z-20 overflow-visible" : "z-10 overflow-hidden"
16724
17036
  ),
16725
- style: { width: sidebarWidth, transitionTimingFunction: NAVIGATION_LAYOUT_TRANSITION_TIMING },
17037
+ style: {
17038
+ width: sidebarWidth,
17039
+ transitionTimingFunction: NAVIGATION_LAYOUT_TRANSITION_TIMING
17040
+ },
16726
17041
  children: /* @__PURE__ */ jsxRuntime.jsx(
16727
17042
  Sidebar,
16728
17043
  {
@@ -16737,7 +17052,10 @@ function NavigationLayout({
16737
17052
  logo,
16738
17053
  onCollapsedChange: setCollapsed,
16739
17054
  onNavigate,
16740
- onRevealRoot: (rootId) => setRevealRequest((prev) => ({ id: rootId, nonce: (prev?.nonce ?? 0) + 1 })),
17055
+ onRevealRoot: (rootId) => setRevealRequest((prev) => ({
17056
+ id: rootId,
17057
+ nonce: (prev?.nonce ?? 0) + 1
17058
+ })),
16741
17059
  revealRequest,
16742
17060
  title: headbarLayout?.brandTitle
16743
17061
  }
@@ -16756,11 +17074,24 @@ function NavigationLayout({
16756
17074
  {
16757
17075
  appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
16758
17076
  tone: "muted",
16759
- icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-4 w-4 shrink-0", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: [
16760
- /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
16761
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 3v18" }),
16762
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m14 9 3 3-3 3" })
16763
- ] }),
17077
+ icon: /* @__PURE__ */ jsxRuntime.jsxs(
17078
+ "svg",
17079
+ {
17080
+ xmlns: "http://www.w3.org/2000/svg",
17081
+ className: "h-4 w-4 shrink-0",
17082
+ viewBox: "0 0 24 24",
17083
+ fill: "none",
17084
+ stroke: "currentColor",
17085
+ strokeWidth: "1.8",
17086
+ strokeLinecap: "round",
17087
+ strokeLinejoin: "round",
17088
+ children: [
17089
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
17090
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 3v18" }),
17091
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m14 9 3 3-3 3" })
17092
+ ]
17093
+ }
17094
+ ),
16764
17095
  label: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap", children: switchToSidebarLabel }),
16765
17096
  onClick: () => setNavigationMode("sidebar"),
16766
17097
  className: cn2(
@@ -16778,7 +17109,16 @@ function NavigationLayout({
16778
17109
  onNavigate
16779
17110
  }
16780
17111
  ) : null;
16781
- return /* @__PURE__ */ jsxRuntime.jsx(AppLayout, { header, sidebar, flush, className, children });
17112
+ return /* @__PURE__ */ jsxRuntime.jsx(
17113
+ AppLayout,
17114
+ {
17115
+ header,
17116
+ sidebar,
17117
+ flush,
17118
+ className,
17119
+ children
17120
+ }
17121
+ );
16782
17122
  }
16783
17123
  function ClampIcon({ expanded }) {
16784
17124
  return /* @__PURE__ */ jsxRuntime.jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 20 20", className: "h-4 w-4", fill: "none", children: [
@@ -16851,6 +17191,7 @@ var WorkbenchResizableSidebar = React.forwardRef(
16851
17191
  function WorkbenchResizableSidebar2({
16852
17192
  title,
16853
17193
  items,
17194
+ sections = [],
16854
17195
  activeItemId,
16855
17196
  itemAs,
16856
17197
  collapsed,
@@ -16967,6 +17308,7 @@ var WorkbenchResizableSidebar = React.forwardRef(
16967
17308
  document.body.style.userSelect = "";
16968
17309
  };
16969
17310
  }, [collapseThreshold, collapsible, isResizing, maxWidth, minWidth, resolvedWidth, resolvedCollapsed]);
17311
+ const resolvedItems = sections.length ? [...items, ...sections.flatMap((section) => section.items)] : items;
16970
17312
  const renderItem = (item, mobile = false) => {
16971
17313
  const active = item.active ?? item.id === activeItemId;
16972
17314
  const ItemComponent = itemAs ?? (item.href ? "a" : "button");
@@ -17003,7 +17345,7 @@ var WorkbenchResizableSidebar = React.forwardRef(
17003
17345
  children: [
17004
17346
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("inline-flex h-4 w-4 shrink-0 items-center justify-center [&_svg]:h-3.5 [&_svg]:w-3.5", classNames?.itemIcon), children: item.icon }),
17005
17347
  mobile || !resolvedCollapsed ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("min-w-0 flex-1 truncate", classNames?.itemLabel), children: item.label }) : null,
17006
- !mobile && !resolvedCollapsed && item.endContent ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: item.endContent }) : null
17348
+ !mobile && !resolvedCollapsed && item.endContent !== void 0 && item.endContent !== null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: item.endContent }) : null
17007
17349
  ]
17008
17350
  },
17009
17351
  item.id
@@ -17057,12 +17399,35 @@ var WorkbenchResizableSidebar = React.forwardRef(
17057
17399
  }
17058
17400
  ) : null
17059
17401
  ] }),
17060
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("min-h-0 flex-1 space-y-2 overflow-y-auto", resolvedCollapsed && "flex w-full flex-col items-center", classNames?.list), children: items.map((item) => renderItem(item)) })
17402
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("min-h-0 flex-1 space-y-2 overflow-y-auto", resolvedCollapsed && "flex w-full flex-col items-center", classNames?.list), children: [
17403
+ items.map((item) => renderItem(item)),
17404
+ sections.map((section) => /* @__PURE__ */ jsxRuntime.jsxs(
17405
+ "div",
17406
+ {
17407
+ className: cn("flex w-full flex-col gap-2", classNames?.section, section.className),
17408
+ children: [
17409
+ !resolvedCollapsed && section.label ? /* @__PURE__ */ jsxRuntime.jsx(
17410
+ "div",
17411
+ {
17412
+ className: cn(
17413
+ "px-2 text-[11px] font-medium text-muted-foreground",
17414
+ classNames?.sectionLabel,
17415
+ section.labelClassName
17416
+ ),
17417
+ children: section.label
17418
+ }
17419
+ ) : null,
17420
+ section.items.map((item) => renderItem(item))
17421
+ ]
17422
+ },
17423
+ section.id
17424
+ ))
17425
+ ] })
17061
17426
  ] })
17062
17427
  ]
17063
17428
  }
17064
17429
  ),
17065
- /* @__PURE__ */ jsxRuntime.jsx("nav", { className: cn("gap-2 overflow-x-auto pb-1", mobileClassName, classNames?.mobileNav), "aria-label": typeof title === "string" ? title : void 0, children: items.map((item) => renderItem(item, true)) })
17430
+ /* @__PURE__ */ jsxRuntime.jsx("nav", { className: cn("gap-2 overflow-x-auto pb-1", mobileClassName, classNames?.mobileNav), "aria-label": typeof title === "string" ? title : void 0, children: resolvedItems.map((item) => renderItem(item, true)) })
17066
17431
  ] });
17067
17432
  }
17068
17433
  );
@@ -27193,6 +27558,7 @@ function useDarkMode() {
27193
27558
 
27194
27559
  exports.AppHeader = AppHeader;
27195
27560
  exports.AppLayout = AppLayout;
27561
+ exports.AppShellSidebar = AppShellSidebar;
27196
27562
  exports.AppSidebar = AppSidebar;
27197
27563
  exports.ApplicationHandoffLink = ApplicationHandoffLink;
27198
27564
  exports.BaseAccordion = BaseAccordion;