@inf-monkeys-tech/monkeys-design 1.0.20 → 1.0.21

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.
@@ -9754,7 +9754,9 @@ var radarPanelStyle = {
9754
9754
  function WorkbenchRadarNavigation({
9755
9755
  items,
9756
9756
  activeItemId,
9757
+ activeChildId,
9757
9758
  onItemSelect,
9759
+ onChildSelect,
9758
9760
  footer,
9759
9761
  ariaLabel = "Radar navigation"
9760
9762
  }) {
@@ -9785,10 +9787,27 @@ function WorkbenchRadarNavigation({
9785
9787
  ]
9786
9788
  }
9787
9789
  ),
9788
- item.children?.length ? /* @__PURE__ */ jsx("ul", { className: "ml-5 grid gap-0.5 border-l border-border/70 py-1 pl-3", children: item.children.map((child) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("div", { className: "flex min-h-9 items-center gap-2 rounded-md px-2 text-xs font-medium text-muted-foreground", children: [
9789
- hasRenderableNode(child.icon) ? /* @__PURE__ */ jsx("span", { className: "flex size-4 shrink-0 items-center justify-center", "aria-hidden": "true", children: child.icon }) : null,
9790
- /* @__PURE__ */ jsx("span", { className: "truncate", children: child.label })
9791
- ] }) }, child.id)) }) : null
9790
+ item.children?.length ? /* @__PURE__ */ jsx("ul", { className: "ml-5 grid gap-0.5 border-l border-border/70 py-1 pl-3", children: item.children.map((child) => {
9791
+ const childActive = child.id === activeChildId;
9792
+ const Comp = onChildSelect ? "button" : "div";
9793
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
9794
+ Comp,
9795
+ {
9796
+ type: onChildSelect ? "button" : void 0,
9797
+ "data-radar-navigation-child-id": child.id,
9798
+ "aria-current": onChildSelect && childActive ? "page" : void 0,
9799
+ onClick: onChildSelect ? () => onChildSelect(child, item) : void 0,
9800
+ className: cn(
9801
+ "flex min-h-9 w-full items-center gap-2 rounded-md border border-transparent px-2 text-left text-xs font-medium outline-none transition-[background-color,border-color,color] focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
9802
+ childActive ? "border-primary/40 bg-primary/15 text-primary" : "text-muted-foreground hover:border-border hover:bg-muted/60 hover:text-foreground"
9803
+ ),
9804
+ children: [
9805
+ hasRenderableNode(child.icon) ? /* @__PURE__ */ jsx("span", { className: "flex size-4 shrink-0 items-center justify-center", "aria-hidden": "true", children: child.icon }) : null,
9806
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: child.label })
9807
+ ]
9808
+ }
9809
+ ) }, child.id);
9810
+ }) }) : null
9792
9811
  ] }, item.id);
9793
9812
  }) }) }),
9794
9813
  hasRenderableNode(footer) ? /* @__PURE__ */ jsx("div", { className: "border-t border-border/70 p-3", children: footer }) : null
@@ -9799,7 +9818,9 @@ function WorkbenchRadarNavigation({
9799
9818
  function WorkbenchRadarWorkspace({
9800
9819
  navigationItems = [],
9801
9820
  activeNavigationId,
9821
+ activeNavigationChildId,
9802
9822
  onNavigationSelect,
9823
+ onNavigationChildSelect,
9803
9824
  navigationFooter,
9804
9825
  navigation,
9805
9826
  children,
@@ -9827,7 +9848,9 @@ function WorkbenchRadarWorkspace({
9827
9848
  {
9828
9849
  items: navigationItems,
9829
9850
  activeItemId: activeNavigationId,
9851
+ activeChildId: activeNavigationChildId,
9830
9852
  onItemSelect: onNavigationSelect,
9853
+ onChildSelect: onNavigationChildSelect,
9831
9854
  footer: navigationFooter
9832
9855
  }
9833
9856
  ),