@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.
package/dist/index.js CHANGED
@@ -16278,6 +16278,13 @@ function getHeadbarItemStyle(active, useTokenRadius = true) {
16278
16278
  fontWeight: "var(--monkeys-component-navigation-headbar-item-font-weight, 500)"
16279
16279
  };
16280
16280
  }
16281
+ function getHeadbarCompoundStyle(active, useTokenRadius = true) {
16282
+ return {
16283
+ ...getHeadbarItemStyle(active, useTokenRadius),
16284
+ paddingInline: void 0,
16285
+ columnGap: void 0
16286
+ };
16287
+ }
16281
16288
  function findNavigationRootId(items, activeItemId) {
16282
16289
  for (const item of items) {
16283
16290
  if (item.id === activeItemId) return item.id;
@@ -16623,6 +16630,7 @@ function HeadbarChevronIcon({ open }) {
16623
16630
  }
16624
16631
  function HeadbarNavMenuItem({
16625
16632
  activeItemId,
16633
+ compound,
16626
16634
  isActive,
16627
16635
  item,
16628
16636
  label,
@@ -16688,13 +16696,17 @@ function HeadbarNavMenuItem({
16688
16696
  },
16689
16697
  onMouseEnter: openMenu,
16690
16698
  onMouseLeave: scheduleCloseMenu,
16691
- style: getHeadbarItemStyle(isActive || open, useTokenRadius),
16699
+ style: getHeadbarItemStyle(
16700
+ isActive || open,
16701
+ compound ? false : useTokenRadius
16702
+ ),
16692
16703
  classNames: {
16693
16704
  icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
16694
16705
  label: "text-[inherit] [&_*]:!text-[inherit]"
16695
16706
  },
16696
16707
  className: cn2(
16697
16708
  "max-w-[12rem] shrink-0 border shadow-none",
16709
+ compound && "!rounded-none !border-0 !bg-transparent",
16698
16710
  menuButtonRadiusClass,
16699
16711
  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)))]"
16700
16712
  )
@@ -16761,11 +16773,13 @@ function NavigationHeadbarMenu({
16761
16773
  const useTokenRadius = menuRadius === "default";
16762
16774
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
16763
16775
  const isActive = activeRootId === item.id || activeItemId === item.id;
16776
+ const hasSecondaryAction = Boolean(item.headbarSecondaryAction);
16764
16777
  const label = item.headbarLabel ?? item.label;
16765
16778
  const primaryAction = item.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(
16766
16779
  HeadbarNavMenuItem,
16767
16780
  {
16768
16781
  activeItemId,
16782
+ compound: hasSecondaryAction,
16769
16783
  isActive,
16770
16784
  item,
16771
16785
  label,
@@ -16788,26 +16802,35 @@ function NavigationHeadbarMenu({
16788
16802
  item.trailing
16789
16803
  ] }),
16790
16804
  onClick: () => onNavigate?.(item.id),
16791
- style: getHeadbarItemStyle(isActive, useTokenRadius),
16805
+ style: getHeadbarItemStyle(
16806
+ isActive,
16807
+ hasSecondaryAction ? false : useTokenRadius
16808
+ ),
16792
16809
  classNames: {
16793
16810
  icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
16794
16811
  label: "text-[inherit] [&_*]:!text-[inherit]"
16795
16812
  },
16796
16813
  className: cn2(
16797
16814
  "max-w-[12rem] shrink-0 border shadow-none",
16815
+ hasSecondaryAction && "!rounded-none !border-0 !bg-transparent",
16798
16816
  menuButtonRadiusClass,
16799
16817
  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)))]"
16800
16818
  )
16801
16819
  }
16802
16820
  );
16803
- if (!item.headbarSecondaryAction) {
16821
+ if (!hasSecondaryAction) {
16804
16822
  return /* @__PURE__ */ jsxRuntime.jsx(React2.Fragment, { children: primaryAction }, item.id);
16805
16823
  }
16806
16824
  return /* @__PURE__ */ jsxRuntime.jsxs(
16807
16825
  "div",
16808
16826
  {
16809
16827
  "data-navigation-headbar-compound-item": item.id,
16810
- className: "inline-flex min-w-0 shrink-0 items-center gap-1",
16828
+ className: cn2(
16829
+ "inline-flex min-w-0 shrink-0 items-center gap-0 overflow-hidden border shadow-none",
16830
+ menuButtonRadiusClass,
16831
+ 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)))]"
16832
+ ),
16833
+ style: getHeadbarCompoundStyle(isActive, useTokenRadius),
16811
16834
  children: [
16812
16835
  /* @__PURE__ */ jsxRuntime.jsx(
16813
16836
  "span",