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

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.
@@ -214,6 +214,7 @@ interface LayoutNavItem {
214
214
  children?: LayoutNavItem[];
215
215
  disabled?: boolean;
216
216
  trailing?: ReactNode;
217
+ headbarSecondaryAction?: ReactNode;
217
218
  }
218
219
  interface HeadbarLayout {
219
220
  brandTitle?: ReactNode;
@@ -214,6 +214,7 @@ interface LayoutNavItem {
214
214
  children?: LayoutNavItem[];
215
215
  disabled?: boolean;
216
216
  trailing?: ReactNode;
217
+ headbarSecondaryAction?: ReactNode;
217
218
  }
218
219
  interface HeadbarLayout {
219
220
  brandTitle?: ReactNode;
@@ -3785,24 +3785,20 @@ function NavigationHeadbarMenu({
3785
3785
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
3786
3786
  const isActive = activeRootId === item.id || activeItemId === item.id;
3787
3787
  const label = item.headbarLabel ?? item.label;
3788
- if (item.children?.length) {
3789
- return /* @__PURE__ */ jsxRuntime.jsx(
3790
- HeadbarNavMenuItem,
3791
- {
3792
- activeItemId,
3793
- isActive,
3794
- item,
3795
- label,
3796
- menuButtonRadiusClass,
3797
- menuContentRadiusClass,
3798
- menuItemRadiusClass,
3799
- onNavigate,
3800
- useTokenRadius
3801
- },
3802
- item.id
3803
- );
3804
- }
3805
- return /* @__PURE__ */ jsxRuntime.jsx(
3788
+ const primaryAction = item.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(
3789
+ HeadbarNavMenuItem,
3790
+ {
3791
+ activeItemId,
3792
+ isActive,
3793
+ item,
3794
+ label,
3795
+ menuButtonRadiusClass,
3796
+ menuContentRadiusClass,
3797
+ menuItemRadiusClass,
3798
+ onNavigate,
3799
+ useTokenRadius
3800
+ }
3801
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
3806
3802
  BaseButton,
3807
3803
  {
3808
3804
  appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
@@ -3825,6 +3821,34 @@ function NavigationHeadbarMenu({
3825
3821
  menuButtonRadiusClass,
3826
3822
  isActive ? "" : "hover:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--muted)))] hover:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--foreground)))]"
3827
3823
  )
3824
+ }
3825
+ );
3826
+ if (!item.headbarSecondaryAction) {
3827
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: primaryAction }, item.id);
3828
+ }
3829
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3830
+ "div",
3831
+ {
3832
+ "data-navigation-headbar-compound-item": item.id,
3833
+ className: "inline-flex min-w-0 shrink-0 items-center gap-1",
3834
+ children: [
3835
+ /* @__PURE__ */ jsxRuntime.jsx(
3836
+ "span",
3837
+ {
3838
+ "data-navigation-headbar-primary-action": "",
3839
+ className: "inline-flex min-w-0 shrink-0",
3840
+ children: primaryAction
3841
+ }
3842
+ ),
3843
+ /* @__PURE__ */ jsxRuntime.jsx(
3844
+ "span",
3845
+ {
3846
+ "data-navigation-headbar-secondary-action": item.id,
3847
+ className: "inline-flex min-w-0 shrink-0 items-center",
3848
+ children: item.headbarSecondaryAction
3849
+ }
3850
+ )
3851
+ ]
3828
3852
  },
3829
3853
  item.id
3830
3854
  );