@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.
@@ -3301,6 +3301,13 @@ function getHeadbarItemStyle(active, useTokenRadius = true) {
3301
3301
  fontWeight: "var(--monkeys-component-navigation-headbar-item-font-weight, 500)"
3302
3302
  };
3303
3303
  }
3304
+ function getHeadbarCompoundStyle(active, useTokenRadius = true) {
3305
+ return {
3306
+ ...getHeadbarItemStyle(active, useTokenRadius),
3307
+ paddingInline: void 0,
3308
+ columnGap: void 0
3309
+ };
3310
+ }
3304
3311
  function findNavigationRootId(items, activeItemId) {
3305
3312
  for (const item of items) {
3306
3313
  if (item.id === activeItemId) return item.id;
@@ -3646,6 +3653,7 @@ function HeadbarChevronIcon({ open }) {
3646
3653
  }
3647
3654
  function HeadbarNavMenuItem({
3648
3655
  activeItemId,
3656
+ compound,
3649
3657
  isActive,
3650
3658
  item,
3651
3659
  label,
@@ -3711,13 +3719,17 @@ function HeadbarNavMenuItem({
3711
3719
  },
3712
3720
  onMouseEnter: openMenu,
3713
3721
  onMouseLeave: scheduleCloseMenu,
3714
- style: getHeadbarItemStyle(isActive || open, useTokenRadius),
3722
+ style: getHeadbarItemStyle(
3723
+ isActive || open,
3724
+ compound ? false : useTokenRadius
3725
+ ),
3715
3726
  classNames: {
3716
3727
  icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3717
3728
  label: "text-[inherit] [&_*]:!text-[inherit]"
3718
3729
  },
3719
3730
  className: cn2(
3720
3731
  "max-w-[12rem] shrink-0 border shadow-none",
3732
+ compound && "!rounded-none !border-0 !bg-transparent",
3721
3733
  menuButtonRadiusClass,
3722
3734
  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)))]"
3723
3735
  )
@@ -3784,11 +3796,13 @@ function NavigationHeadbarMenu({
3784
3796
  const useTokenRadius = menuRadius === "default";
3785
3797
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
3786
3798
  const isActive = activeRootId === item.id || activeItemId === item.id;
3799
+ const hasSecondaryAction = Boolean(item.headbarSecondaryAction);
3787
3800
  const label = item.headbarLabel ?? item.label;
3788
3801
  const primaryAction = item.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(
3789
3802
  HeadbarNavMenuItem,
3790
3803
  {
3791
3804
  activeItemId,
3805
+ compound: hasSecondaryAction,
3792
3806
  isActive,
3793
3807
  item,
3794
3808
  label,
@@ -3811,26 +3825,35 @@ function NavigationHeadbarMenu({
3811
3825
  item.trailing
3812
3826
  ] }),
3813
3827
  onClick: () => onNavigate?.(item.id),
3814
- style: getHeadbarItemStyle(isActive, useTokenRadius),
3828
+ style: getHeadbarItemStyle(
3829
+ isActive,
3830
+ hasSecondaryAction ? false : useTokenRadius
3831
+ ),
3815
3832
  classNames: {
3816
3833
  icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3817
3834
  label: "text-[inherit] [&_*]:!text-[inherit]"
3818
3835
  },
3819
3836
  className: cn2(
3820
3837
  "max-w-[12rem] shrink-0 border shadow-none",
3838
+ hasSecondaryAction && "!rounded-none !border-0 !bg-transparent",
3821
3839
  menuButtonRadiusClass,
3822
3840
  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)))]"
3823
3841
  )
3824
3842
  }
3825
3843
  );
3826
- if (!item.headbarSecondaryAction) {
3844
+ if (!hasSecondaryAction) {
3827
3845
  return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: primaryAction }, item.id);
3828
3846
  }
3829
3847
  return /* @__PURE__ */ jsxRuntime.jsxs(
3830
3848
  "div",
3831
3849
  {
3832
3850
  "data-navigation-headbar-compound-item": item.id,
3833
- className: "inline-flex min-w-0 shrink-0 items-center gap-1",
3851
+ className: cn2(
3852
+ "inline-flex min-w-0 shrink-0 items-center gap-0 overflow-hidden border shadow-none",
3853
+ menuButtonRadiusClass,
3854
+ 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)))]"
3855
+ ),
3856
+ style: getHeadbarCompoundStyle(isActive, useTokenRadius),
3834
3857
  children: [
3835
3858
  /* @__PURE__ */ jsxRuntime.jsx(
3836
3859
  "span",