@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.
package/dist/index.js CHANGED
@@ -16762,24 +16762,20 @@ function NavigationHeadbarMenu({
16762
16762
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
16763
16763
  const isActive = activeRootId === item.id || activeItemId === item.id;
16764
16764
  const label = item.headbarLabel ?? item.label;
16765
- if (item.children?.length) {
16766
- return /* @__PURE__ */ jsxRuntime.jsx(
16767
- HeadbarNavMenuItem,
16768
- {
16769
- activeItemId,
16770
- isActive,
16771
- item,
16772
- label,
16773
- menuButtonRadiusClass,
16774
- menuContentRadiusClass,
16775
- menuItemRadiusClass,
16776
- onNavigate,
16777
- useTokenRadius
16778
- },
16779
- item.id
16780
- );
16781
- }
16782
- return /* @__PURE__ */ jsxRuntime.jsx(
16765
+ const primaryAction = item.children?.length ? /* @__PURE__ */ jsxRuntime.jsx(
16766
+ HeadbarNavMenuItem,
16767
+ {
16768
+ activeItemId,
16769
+ isActive,
16770
+ item,
16771
+ label,
16772
+ menuButtonRadiusClass,
16773
+ menuContentRadiusClass,
16774
+ menuItemRadiusClass,
16775
+ onNavigate,
16776
+ useTokenRadius
16777
+ }
16778
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
16783
16779
  BaseButton,
16784
16780
  {
16785
16781
  appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
@@ -16802,6 +16798,34 @@ function NavigationHeadbarMenu({
16802
16798
  menuButtonRadiusClass,
16803
16799
  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)))]"
16804
16800
  )
16801
+ }
16802
+ );
16803
+ if (!item.headbarSecondaryAction) {
16804
+ return /* @__PURE__ */ jsxRuntime.jsx(React2.Fragment, { children: primaryAction }, item.id);
16805
+ }
16806
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16807
+ "div",
16808
+ {
16809
+ "data-navigation-headbar-compound-item": item.id,
16810
+ className: "inline-flex min-w-0 shrink-0 items-center gap-1",
16811
+ children: [
16812
+ /* @__PURE__ */ jsxRuntime.jsx(
16813
+ "span",
16814
+ {
16815
+ "data-navigation-headbar-primary-action": "",
16816
+ className: "inline-flex min-w-0 shrink-0",
16817
+ children: primaryAction
16818
+ }
16819
+ ),
16820
+ /* @__PURE__ */ jsxRuntime.jsx(
16821
+ "span",
16822
+ {
16823
+ "data-navigation-headbar-secondary-action": item.id,
16824
+ className: "inline-flex min-w-0 shrink-0 items-center",
16825
+ children: item.headbarSecondaryAction
16826
+ }
16827
+ )
16828
+ ]
16805
16829
  },
16806
16830
  item.id
16807
16831
  );