@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.
@@ -925,7 +925,9 @@ interface WorkbenchRadarNavigationItem {
925
925
  interface WorkbenchRadarWorkspaceProps {
926
926
  navigationItems?: WorkbenchRadarNavigationItem[];
927
927
  activeNavigationId?: string;
928
+ activeNavigationChildId?: string;
928
929
  onNavigationSelect?: (item: WorkbenchRadarNavigationItem) => void;
930
+ onNavigationChildSelect?: (child: WorkbenchRadarNavigationChild, parent: WorkbenchRadarNavigationItem) => void;
929
931
  navigationFooter?: ReactNode;
930
932
  navigation?: ReactNode;
931
933
  children: ReactNode;
@@ -939,12 +941,14 @@ interface WorkbenchRadarWorkspaceProps {
939
941
  interface WorkbenchRadarNavigationProps {
940
942
  items: WorkbenchRadarNavigationItem[];
941
943
  activeItemId?: string;
944
+ activeChildId?: string;
942
945
  onItemSelect?: (item: WorkbenchRadarNavigationItem) => void;
946
+ onChildSelect?: (child: WorkbenchRadarNavigationChild, parent: WorkbenchRadarNavigationItem) => void;
943
947
  footer?: ReactNode;
944
948
  ariaLabel?: string;
945
949
  }
946
- declare function WorkbenchRadarNavigation({ items, activeItemId, onItemSelect, footer, ariaLabel, }: WorkbenchRadarNavigationProps): react_jsx_runtime.JSX.Element;
947
- declare function WorkbenchRadarWorkspace({ navigationItems, activeNavigationId, onNavigationSelect, navigationFooter, navigation, children, inspector, inspectorLabel, className, contentClassName, minimumHeight, ariaLabel, }: WorkbenchRadarWorkspaceProps): react_jsx_runtime.JSX.Element;
950
+ declare function WorkbenchRadarNavigation({ items, activeItemId, activeChildId, onItemSelect, onChildSelect, footer, ariaLabel, }: WorkbenchRadarNavigationProps): react_jsx_runtime.JSX.Element;
951
+ declare function WorkbenchRadarWorkspace({ navigationItems, activeNavigationId, activeNavigationChildId, onNavigationSelect, onNavigationChildSelect, navigationFooter, navigation, children, inspector, inspectorLabel, className, contentClassName, minimumHeight, ariaLabel, }: WorkbenchRadarWorkspaceProps): react_jsx_runtime.JSX.Element;
948
952
  declare function WorkbenchRadarInspectorSection({ title, icon, description, children, className, }: {
949
953
  title: ReactNode;
950
954
  icon?: ReactNode;
@@ -925,7 +925,9 @@ interface WorkbenchRadarNavigationItem {
925
925
  interface WorkbenchRadarWorkspaceProps {
926
926
  navigationItems?: WorkbenchRadarNavigationItem[];
927
927
  activeNavigationId?: string;
928
+ activeNavigationChildId?: string;
928
929
  onNavigationSelect?: (item: WorkbenchRadarNavigationItem) => void;
930
+ onNavigationChildSelect?: (child: WorkbenchRadarNavigationChild, parent: WorkbenchRadarNavigationItem) => void;
929
931
  navigationFooter?: ReactNode;
930
932
  navigation?: ReactNode;
931
933
  children: ReactNode;
@@ -939,12 +941,14 @@ interface WorkbenchRadarWorkspaceProps {
939
941
  interface WorkbenchRadarNavigationProps {
940
942
  items: WorkbenchRadarNavigationItem[];
941
943
  activeItemId?: string;
944
+ activeChildId?: string;
942
945
  onItemSelect?: (item: WorkbenchRadarNavigationItem) => void;
946
+ onChildSelect?: (child: WorkbenchRadarNavigationChild, parent: WorkbenchRadarNavigationItem) => void;
943
947
  footer?: ReactNode;
944
948
  ariaLabel?: string;
945
949
  }
946
- declare function WorkbenchRadarNavigation({ items, activeItemId, onItemSelect, footer, ariaLabel, }: WorkbenchRadarNavigationProps): react_jsx_runtime.JSX.Element;
947
- declare function WorkbenchRadarWorkspace({ navigationItems, activeNavigationId, onNavigationSelect, navigationFooter, navigation, children, inspector, inspectorLabel, className, contentClassName, minimumHeight, ariaLabel, }: WorkbenchRadarWorkspaceProps): react_jsx_runtime.JSX.Element;
950
+ declare function WorkbenchRadarNavigation({ items, activeItemId, activeChildId, onItemSelect, onChildSelect, footer, ariaLabel, }: WorkbenchRadarNavigationProps): react_jsx_runtime.JSX.Element;
951
+ declare function WorkbenchRadarWorkspace({ navigationItems, activeNavigationId, activeNavigationChildId, onNavigationSelect, onNavigationChildSelect, navigationFooter, navigation, children, inspector, inspectorLabel, className, contentClassName, minimumHeight, ariaLabel, }: WorkbenchRadarWorkspaceProps): react_jsx_runtime.JSX.Element;
948
952
  declare function WorkbenchRadarInspectorSection({ title, icon, description, children, className, }: {
949
953
  title: ReactNode;
950
954
  icon?: ReactNode;
@@ -9776,7 +9776,9 @@ var radarPanelStyle = {
9776
9776
  function WorkbenchRadarNavigation({
9777
9777
  items,
9778
9778
  activeItemId,
9779
+ activeChildId,
9779
9780
  onItemSelect,
9781
+ onChildSelect,
9780
9782
  footer,
9781
9783
  ariaLabel = "Radar navigation"
9782
9784
  }) {
@@ -9807,10 +9809,27 @@ function WorkbenchRadarNavigation({
9807
9809
  ]
9808
9810
  }
9809
9811
  ),
9810
- item.children?.length ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ml-5 grid gap-0.5 border-l border-border/70 py-1 pl-3", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-9 items-center gap-2 rounded-md px-2 text-xs font-medium text-muted-foreground", children: [
9811
- hasRenderableNode(child.icon) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-4 shrink-0 items-center justify-center", "aria-hidden": "true", children: child.icon }) : null,
9812
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: child.label })
9813
- ] }) }, child.id)) }) : null
9812
+ item.children?.length ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ml-5 grid gap-0.5 border-l border-border/70 py-1 pl-3", children: item.children.map((child) => {
9813
+ const childActive = child.id === activeChildId;
9814
+ const Comp = onChildSelect ? "button" : "div";
9815
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
9816
+ Comp,
9817
+ {
9818
+ type: onChildSelect ? "button" : void 0,
9819
+ "data-radar-navigation-child-id": child.id,
9820
+ "aria-current": onChildSelect && childActive ? "page" : void 0,
9821
+ onClick: onChildSelect ? () => onChildSelect(child, item) : void 0,
9822
+ className: cn(
9823
+ "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",
9824
+ childActive ? "border-primary/40 bg-primary/15 text-primary" : "text-muted-foreground hover:border-border hover:bg-muted/60 hover:text-foreground"
9825
+ ),
9826
+ children: [
9827
+ hasRenderableNode(child.icon) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-4 shrink-0 items-center justify-center", "aria-hidden": "true", children: child.icon }) : null,
9828
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: child.label })
9829
+ ]
9830
+ }
9831
+ ) }, child.id);
9832
+ }) }) : null
9814
9833
  ] }, item.id);
9815
9834
  }) }) }),
9816
9835
  hasRenderableNode(footer) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/70 p-3", children: footer }) : null
@@ -9821,7 +9840,9 @@ function WorkbenchRadarNavigation({
9821
9840
  function WorkbenchRadarWorkspace({
9822
9841
  navigationItems = [],
9823
9842
  activeNavigationId,
9843
+ activeNavigationChildId,
9824
9844
  onNavigationSelect,
9845
+ onNavigationChildSelect,
9825
9846
  navigationFooter,
9826
9847
  navigation,
9827
9848
  children,
@@ -9849,7 +9870,9 @@ function WorkbenchRadarWorkspace({
9849
9870
  {
9850
9871
  items: navigationItems,
9851
9872
  activeItemId: activeNavigationId,
9873
+ activeChildId: activeNavigationChildId,
9852
9874
  onItemSelect: onNavigationSelect,
9875
+ onChildSelect: onNavigationChildSelect,
9853
9876
  footer: navigationFooter
9854
9877
  }
9855
9878
  ),