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

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.
@@ -3278,6 +3278,13 @@ function getHeadbarItemStyle(active, useTokenRadius = true) {
3278
3278
  fontWeight: "var(--monkeys-component-navigation-headbar-item-font-weight, 500)"
3279
3279
  };
3280
3280
  }
3281
+ function getHeadbarCompoundStyle(active, useTokenRadius = true) {
3282
+ return {
3283
+ ...getHeadbarItemStyle(active, useTokenRadius),
3284
+ paddingInline: void 0,
3285
+ columnGap: void 0
3286
+ };
3287
+ }
3281
3288
  function findNavigationRootId(items, activeItemId) {
3282
3289
  for (const item of items) {
3283
3290
  if (item.id === activeItemId) return item.id;
@@ -3623,6 +3630,7 @@ function HeadbarChevronIcon({ open }) {
3623
3630
  }
3624
3631
  function HeadbarNavMenuItem({
3625
3632
  activeItemId,
3633
+ compound,
3626
3634
  isActive,
3627
3635
  item,
3628
3636
  label,
@@ -3688,13 +3696,17 @@ function HeadbarNavMenuItem({
3688
3696
  },
3689
3697
  onMouseEnter: openMenu,
3690
3698
  onMouseLeave: scheduleCloseMenu,
3691
- style: getHeadbarItemStyle(isActive || open, useTokenRadius),
3699
+ style: getHeadbarItemStyle(
3700
+ isActive || open,
3701
+ compound ? false : useTokenRadius
3702
+ ),
3692
3703
  classNames: {
3693
3704
  icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3694
3705
  label: "text-[inherit] [&_*]:!text-[inherit]"
3695
3706
  },
3696
3707
  className: cn2(
3697
3708
  "max-w-[12rem] shrink-0 border shadow-none",
3709
+ compound && "!rounded-none !border-0 !bg-transparent",
3698
3710
  menuButtonRadiusClass,
3699
3711
  isActive || open ? "" : "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)))]"
3700
3712
  )
@@ -3761,11 +3773,13 @@ function NavigationHeadbarMenu({
3761
3773
  const useTokenRadius = menuRadius === "default";
3762
3774
  return /* @__PURE__ */ jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
3763
3775
  const isActive = activeRootId === item.id || activeItemId === item.id;
3776
+ const hasSecondaryAction = Boolean(item.headbarSecondaryAction);
3764
3777
  const label = item.headbarLabel ?? item.label;
3765
3778
  const primaryAction = item.children?.length ? /* @__PURE__ */ jsx(
3766
3779
  HeadbarNavMenuItem,
3767
3780
  {
3768
3781
  activeItemId,
3782
+ compound: hasSecondaryAction,
3769
3783
  isActive,
3770
3784
  item,
3771
3785
  label,
@@ -3788,26 +3802,35 @@ function NavigationHeadbarMenu({
3788
3802
  item.trailing
3789
3803
  ] }),
3790
3804
  onClick: () => onNavigate?.(item.id),
3791
- style: getHeadbarItemStyle(isActive, useTokenRadius),
3805
+ style: getHeadbarItemStyle(
3806
+ isActive,
3807
+ hasSecondaryAction ? false : useTokenRadius
3808
+ ),
3792
3809
  classNames: {
3793
3810
  icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3794
3811
  label: "text-[inherit] [&_*]:!text-[inherit]"
3795
3812
  },
3796
3813
  className: cn2(
3797
3814
  "max-w-[12rem] shrink-0 border shadow-none",
3815
+ hasSecondaryAction && "!rounded-none !border-0 !bg-transparent",
3798
3816
  menuButtonRadiusClass,
3799
3817
  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)))]"
3800
3818
  )
3801
3819
  }
3802
3820
  );
3803
- if (!item.headbarSecondaryAction) {
3821
+ if (!hasSecondaryAction) {
3804
3822
  return /* @__PURE__ */ jsx(Fragment, { children: primaryAction }, item.id);
3805
3823
  }
3806
3824
  return /* @__PURE__ */ jsxs(
3807
3825
  "div",
3808
3826
  {
3809
3827
  "data-navigation-headbar-compound-item": item.id,
3810
- className: "inline-flex min-w-0 shrink-0 items-center gap-1",
3828
+ className: cn2(
3829
+ "inline-flex min-w-0 shrink-0 items-center gap-0 overflow-hidden border shadow-none",
3830
+ menuButtonRadiusClass,
3831
+ 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)))]"
3832
+ ),
3833
+ style: getHeadbarCompoundStyle(isActive, useTokenRadius),
3811
3834
  children: [
3812
3835
  /* @__PURE__ */ jsx(
3813
3836
  "span",