@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.
@@ -3762,24 +3762,20 @@ function NavigationHeadbarMenu({
3762
3762
  return /* @__PURE__ */ jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
3763
3763
  const isActive = activeRootId === item.id || activeItemId === item.id;
3764
3764
  const label = item.headbarLabel ?? item.label;
3765
- if (item.children?.length) {
3766
- return /* @__PURE__ */ jsx(
3767
- HeadbarNavMenuItem,
3768
- {
3769
- activeItemId,
3770
- isActive,
3771
- item,
3772
- label,
3773
- menuButtonRadiusClass,
3774
- menuContentRadiusClass,
3775
- menuItemRadiusClass,
3776
- onNavigate,
3777
- useTokenRadius
3778
- },
3779
- item.id
3780
- );
3781
- }
3782
- return /* @__PURE__ */ jsx(
3765
+ const primaryAction = item.children?.length ? /* @__PURE__ */ jsx(
3766
+ HeadbarNavMenuItem,
3767
+ {
3768
+ activeItemId,
3769
+ isActive,
3770
+ item,
3771
+ label,
3772
+ menuButtonRadiusClass,
3773
+ menuContentRadiusClass,
3774
+ menuItemRadiusClass,
3775
+ onNavigate,
3776
+ useTokenRadius
3777
+ }
3778
+ ) : /* @__PURE__ */ jsx(
3783
3779
  BaseButton,
3784
3780
  {
3785
3781
  appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
@@ -3802,6 +3798,34 @@ function NavigationHeadbarMenu({
3802
3798
  menuButtonRadiusClass,
3803
3799
  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)))]"
3804
3800
  )
3801
+ }
3802
+ );
3803
+ if (!item.headbarSecondaryAction) {
3804
+ return /* @__PURE__ */ jsx(Fragment, { children: primaryAction }, item.id);
3805
+ }
3806
+ return /* @__PURE__ */ jsxs(
3807
+ "div",
3808
+ {
3809
+ "data-navigation-headbar-compound-item": item.id,
3810
+ className: "inline-flex min-w-0 shrink-0 items-center gap-1",
3811
+ children: [
3812
+ /* @__PURE__ */ jsx(
3813
+ "span",
3814
+ {
3815
+ "data-navigation-headbar-primary-action": "",
3816
+ className: "inline-flex min-w-0 shrink-0",
3817
+ children: primaryAction
3818
+ }
3819
+ ),
3820
+ /* @__PURE__ */ jsx(
3821
+ "span",
3822
+ {
3823
+ "data-navigation-headbar-secondary-action": item.id,
3824
+ className: "inline-flex min-w-0 shrink-0 items-center",
3825
+ children: item.headbarSecondaryAction
3826
+ }
3827
+ )
3828
+ ]
3805
3829
  },
3806
3830
  item.id
3807
3831
  );