@inf-monkeys-tech/monkeys-design 1.0.4 → 1.0.6

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.
@@ -176,12 +176,15 @@ type NavigationMode = 'headbar' | 'sidebar';
176
176
  type HeadbarLayoutMode = 'boxed' | 'full-bleed';
177
177
  type HeadbarMenuRadius = 'default' | 'full' | 'lg' | 'md' | 'none' | 'sm' | 'xl';
178
178
  type HeadbarNavPosition = 'center' | 'left' | 'right';
179
+ type HeadbarSurface = 'card' | 'ghost' | 'glassy';
179
180
  interface LayoutNavItem {
180
181
  id: string;
181
182
  label: ReactNode;
182
183
  headbarLabel?: ReactNode;
183
184
  icon?: ReactNode;
184
185
  children?: LayoutNavItem[];
186
+ disabled?: boolean;
187
+ trailing?: ReactNode;
185
188
  }
186
189
  interface HeadbarLayout {
187
190
  brandTitle?: ReactNode;
@@ -189,6 +192,7 @@ interface HeadbarLayout {
189
192
  layoutMode?: HeadbarLayoutMode;
190
193
  menuRadius?: HeadbarMenuRadius;
191
194
  navPosition?: HeadbarNavPosition;
195
+ surface?: HeadbarSurface;
192
196
  }
193
197
  interface NavigationLayoutProps {
194
198
  activeItemId?: string;
@@ -221,5 +225,28 @@ interface NavigationLayoutProps {
221
225
  switchToHeadbarLabel?: string;
222
226
  switchToSidebarLabel?: string;
223
227
  }
228
+ interface NavigationHeadbarMenuProps {
229
+ activeItemId?: string;
230
+ activeRootId?: string;
231
+ items: LayoutNavItem[];
232
+ menuRadius?: HeadbarMenuRadius;
233
+ onNavigate?: (itemId: string) => void;
234
+ }
235
+ declare function NavigationHeadbarMenu({ activeItemId, activeRootId, items, menuRadius, onNavigate, }: NavigationHeadbarMenuProps): react_jsx_runtime.JSX.Element;
236
+ interface NavigationHeadbarProps {
237
+ activeItemId?: string;
238
+ activeRootId?: string;
239
+ actions?: ReactNode;
240
+ accountMenu?: ReactNode;
241
+ className?: string;
242
+ extra?: ReactNode;
243
+ layout?: HeadbarLayout;
244
+ brand?: ReactNode;
245
+ logo?: AppHeaderLogo;
246
+ navigation?: ReactNode;
247
+ navItems?: LayoutNavItem[];
248
+ onNavigate?: (itemId: string) => void;
249
+ }
250
+ declare function NavigationHeadbar({ activeItemId, activeRootId, actions, accountMenu, className, extra, layout, brand, logo, navigation, navItems, onNavigate, }: NavigationHeadbarProps): react_jsx_runtime.JSX.Element;
224
251
  declare function NavigationLayout({ activeItemId, activeRootId, allowModeSwitch, accountMenu, children, className, collapsedSidebarAccountMenu, collapsedSidebarWidth, defaultMode, defaultSidebarCollapsed, expandedSidebarWidth, expandSidebarLabel, flush, headbarActions, headbarLayout, logo, mode, navItems, onModeChange, onNavigate, onSidebarCollapsedChange, renderHeadbarExtra, collapseSidebarLabel, sidebarCollapsed: controlledSidebarCollapsed, sidebarAccountMenu, sidebarFooter, sidebarHeader, switchToHeadbarLabel, switchToSidebarLabel, }: NavigationLayoutProps): react_jsx_runtime.JSX.Element;
225
- export { AppHeader, type AppHeaderLogo, type AppHeaderProps, type AppHeaderUser, AppLayout, type AppLayoutProps, AppSidebar, type AppSidebarProps, type HeadbarLayout, type HeadbarLayoutMode, type HeadbarMenuRadius, type HeadbarNavPosition, type HeaderTab, type LayoutNavItem, NavButton, type NavButtonProps, NavigationLayout, type NavigationLayoutProps, type NavigationMode, type SidebarAccount, type SidebarNavItem, UserAccountMenu, type UserAccountMenuClassNames, type UserAccountMenuItem, type UserAccountMenuProps, type UserAccountMenuRadius, type UserAccountMenuSelectorConfig, type UserAccountMenuSelectorOption, type UserAccountMenuSide, type UserAccountMenuTriggerVariant, type UserAccountMenuUser, cn };
252
+ export { AppHeader, type AppHeaderLogo, type AppHeaderProps, type AppHeaderUser, AppLayout, type AppLayoutProps, AppSidebar, type AppSidebarProps, type HeadbarLayout, type HeadbarLayoutMode, type HeadbarMenuRadius, type HeadbarNavPosition, type HeadbarSurface, type HeaderTab, type LayoutNavItem, NavButton, type NavButtonProps, NavigationHeadbar, NavigationHeadbarMenu, type NavigationHeadbarMenuProps, type NavigationHeadbarProps, NavigationLayout, type NavigationLayoutProps, type NavigationMode, type SidebarAccount, type SidebarNavItem, UserAccountMenu, type UserAccountMenuClassNames, type UserAccountMenuItem, type UserAccountMenuProps, type UserAccountMenuRadius, type UserAccountMenuSelectorConfig, type UserAccountMenuSelectorOption, type UserAccountMenuSide, type UserAccountMenuTriggerVariant, type UserAccountMenuUser, cn };
@@ -176,12 +176,15 @@ type NavigationMode = 'headbar' | 'sidebar';
176
176
  type HeadbarLayoutMode = 'boxed' | 'full-bleed';
177
177
  type HeadbarMenuRadius = 'default' | 'full' | 'lg' | 'md' | 'none' | 'sm' | 'xl';
178
178
  type HeadbarNavPosition = 'center' | 'left' | 'right';
179
+ type HeadbarSurface = 'card' | 'ghost' | 'glassy';
179
180
  interface LayoutNavItem {
180
181
  id: string;
181
182
  label: ReactNode;
182
183
  headbarLabel?: ReactNode;
183
184
  icon?: ReactNode;
184
185
  children?: LayoutNavItem[];
186
+ disabled?: boolean;
187
+ trailing?: ReactNode;
185
188
  }
186
189
  interface HeadbarLayout {
187
190
  brandTitle?: ReactNode;
@@ -189,6 +192,7 @@ interface HeadbarLayout {
189
192
  layoutMode?: HeadbarLayoutMode;
190
193
  menuRadius?: HeadbarMenuRadius;
191
194
  navPosition?: HeadbarNavPosition;
195
+ surface?: HeadbarSurface;
192
196
  }
193
197
  interface NavigationLayoutProps {
194
198
  activeItemId?: string;
@@ -221,5 +225,28 @@ interface NavigationLayoutProps {
221
225
  switchToHeadbarLabel?: string;
222
226
  switchToSidebarLabel?: string;
223
227
  }
228
+ interface NavigationHeadbarMenuProps {
229
+ activeItemId?: string;
230
+ activeRootId?: string;
231
+ items: LayoutNavItem[];
232
+ menuRadius?: HeadbarMenuRadius;
233
+ onNavigate?: (itemId: string) => void;
234
+ }
235
+ declare function NavigationHeadbarMenu({ activeItemId, activeRootId, items, menuRadius, onNavigate, }: NavigationHeadbarMenuProps): react_jsx_runtime.JSX.Element;
236
+ interface NavigationHeadbarProps {
237
+ activeItemId?: string;
238
+ activeRootId?: string;
239
+ actions?: ReactNode;
240
+ accountMenu?: ReactNode;
241
+ className?: string;
242
+ extra?: ReactNode;
243
+ layout?: HeadbarLayout;
244
+ brand?: ReactNode;
245
+ logo?: AppHeaderLogo;
246
+ navigation?: ReactNode;
247
+ navItems?: LayoutNavItem[];
248
+ onNavigate?: (itemId: string) => void;
249
+ }
250
+ declare function NavigationHeadbar({ activeItemId, activeRootId, actions, accountMenu, className, extra, layout, brand, logo, navigation, navItems, onNavigate, }: NavigationHeadbarProps): react_jsx_runtime.JSX.Element;
224
251
  declare function NavigationLayout({ activeItemId, activeRootId, allowModeSwitch, accountMenu, children, className, collapsedSidebarAccountMenu, collapsedSidebarWidth, defaultMode, defaultSidebarCollapsed, expandedSidebarWidth, expandSidebarLabel, flush, headbarActions, headbarLayout, logo, mode, navItems, onModeChange, onNavigate, onSidebarCollapsedChange, renderHeadbarExtra, collapseSidebarLabel, sidebarCollapsed: controlledSidebarCollapsed, sidebarAccountMenu, sidebarFooter, sidebarHeader, switchToHeadbarLabel, switchToSidebarLabel, }: NavigationLayoutProps): react_jsx_runtime.JSX.Element;
225
- export { AppHeader, type AppHeaderLogo, type AppHeaderProps, type AppHeaderUser, AppLayout, type AppLayoutProps, AppSidebar, type AppSidebarProps, type HeadbarLayout, type HeadbarLayoutMode, type HeadbarMenuRadius, type HeadbarNavPosition, type HeaderTab, type LayoutNavItem, NavButton, type NavButtonProps, NavigationLayout, type NavigationLayoutProps, type NavigationMode, type SidebarAccount, type SidebarNavItem, UserAccountMenu, type UserAccountMenuClassNames, type UserAccountMenuItem, type UserAccountMenuProps, type UserAccountMenuRadius, type UserAccountMenuSelectorConfig, type UserAccountMenuSelectorOption, type UserAccountMenuSide, type UserAccountMenuTriggerVariant, type UserAccountMenuUser, cn };
252
+ export { AppHeader, type AppHeaderLogo, type AppHeaderProps, type AppHeaderUser, AppLayout, type AppLayoutProps, AppSidebar, type AppSidebarProps, type HeadbarLayout, type HeadbarLayoutMode, type HeadbarMenuRadius, type HeadbarNavPosition, type HeadbarSurface, type HeaderTab, type LayoutNavItem, NavButton, type NavButtonProps, NavigationHeadbar, NavigationHeadbarMenu, type NavigationHeadbarMenuProps, type NavigationHeadbarProps, NavigationLayout, type NavigationLayoutProps, type NavigationMode, type SidebarAccount, type SidebarNavItem, UserAccountMenu, type UserAccountMenuClassNames, type UserAccountMenuItem, type UserAccountMenuProps, type UserAccountMenuRadius, type UserAccountMenuSelectorConfig, type UserAccountMenuSelectorOption, type UserAccountMenuSide, type UserAccountMenuTriggerVariant, type UserAccountMenuUser, cn };
@@ -2879,16 +2879,24 @@ function getHeadbarMenuRadiusClass(menuRadius = "default", part = "all") {
2879
2879
  }
2880
2880
  return NAVIGATION_LAYOUT_MENU_RADIUS_CLASS_MAP[menuRadius][part];
2881
2881
  }
2882
- function getHeadbarFrameClass(layoutMode = "boxed") {
2883
- return layoutMode === "full-bleed" ? "relative z-40 grid w-full shrink-0 grid-cols-[minmax(max-content,1fr)_minmax(0,max-content)_minmax(max-content,1fr)] items-center gap-4 rounded-none border-b border-x-0 border-t-0 border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]" : "relative z-40 grid w-full shrink-0 grid-cols-[minmax(max-content,1fr)_minmax(0,max-content)_minmax(max-content,1fr)] items-center gap-4 rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]";
2882
+ function getHeadbarFrameClass(layoutMode = "boxed", navPosition = "center") {
2883
+ const columns = navPosition === "center" ? "grid-cols-[minmax(max-content,1fr)_minmax(0,max-content)_minmax(max-content,1fr)]" : "grid-cols-[max-content_minmax(0,1fr)_max-content]";
2884
+ return layoutMode === "full-bleed" ? cn2("sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-none border-b border-x-0 border-t-0 border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]", columns) : cn2("sticky top-0 z-40 grid w-full shrink-0 items-center gap-4 rounded-xl border border-[hsl(var(--input))] bg-[hsl(var(--background))] p-[var(--global-spacing,0.75rem)]", columns);
2884
2885
  }
2885
- function getHeadbarFrameStyle(layoutMode = "boxed", heightPx) {
2886
+ function getHeadbarFrameStyle(layoutMode = "boxed", heightPx, surface = "card") {
2886
2887
  const verticalPaddingPx = getHeadbarVerticalPaddingPx(heightPx);
2888
+ const fallbackBackground = "hsl(var(--background))";
2887
2889
  const style = {
2888
- height: `${heightPx}px`,
2889
- minHeight: `${heightPx}px`,
2890
+ height: `var(--monkeys-component-navigation-headbar-height, ${heightPx}px)`,
2891
+ minHeight: `var(--monkeys-component-navigation-headbar-height, ${heightPx}px)`,
2890
2892
  paddingTop: `${verticalPaddingPx}px`,
2891
- paddingBottom: `${verticalPaddingPx}px`
2893
+ paddingBottom: `${verticalPaddingPx}px`,
2894
+ background: `var(--monkeys-component-navigation-headbar-frame-background, ${fallbackBackground})`,
2895
+ color: "var(--monkeys-component-navigation-headbar-frame-foreground, hsl(var(--foreground)))",
2896
+ borderColor: surface === "glassy" ? "var(--monkeys-component-navigation-headbar-frame-border-color, rgb(255 255 255 / 0.5))" : "var(--monkeys-component-navigation-headbar-frame-border-color, hsl(var(--input)))",
2897
+ borderRadius: layoutMode === "full-bleed" ? "0" : "var(--monkeys-component-navigation-headbar-frame-radius, var(--radius, 0.75rem))",
2898
+ boxShadow: surface === "glassy" ? "var(--monkeys-component-navigation-headbar-frame-shadow, inset 0 0 0 0 rgb(0 0 0 / 0.1))" : "var(--monkeys-component-navigation-headbar-frame-shadow, none)",
2899
+ backdropFilter: `blur(var(--monkeys-component-navigation-headbar-frame-backdrop-blur, ${surface === "glassy" ? "45px" : "0px"}))`
2892
2900
  };
2893
2901
  if (layoutMode === "full-bleed") {
2894
2902
  style.marginLeft = "calc(var(--global-spacing,0.75rem) * -1)";
@@ -2903,6 +2911,19 @@ function getHeadbarNavClass(navPosition = "center") {
2903
2911
  if (navPosition === "right") return "justify-end";
2904
2912
  return "justify-center";
2905
2913
  }
2914
+ function getHeadbarItemStyle(active, useTokenRadius = true) {
2915
+ return {
2916
+ height: "var(--monkeys-component-navigation-headbar-item-height, 2.25rem)",
2917
+ borderRadius: useTokenRadius ? "var(--monkeys-component-navigation-headbar-item-radius, var(--radius, 0.5rem))" : void 0,
2918
+ paddingInline: "var(--monkeys-component-navigation-headbar-item-padding-inline, 0.75rem)",
2919
+ columnGap: "var(--monkeys-component-navigation-headbar-item-gap, 0.375rem)",
2920
+ color: active ? "var(--monkeys-component-navigation-headbar-item-active-foreground, hsl(var(--foreground)))" : "var(--monkeys-component-navigation-headbar-item-foreground, hsl(var(--muted-foreground)))",
2921
+ background: active ? "var(--monkeys-component-navigation-headbar-item-active-background, hsl(var(--muted)))" : "transparent",
2922
+ borderColor: active ? "var(--monkeys-component-navigation-headbar-item-active-border-color, transparent)" : "transparent",
2923
+ fontSize: "var(--monkeys-component-navigation-headbar-item-font-size, 0.875rem)",
2924
+ fontWeight: "var(--monkeys-component-navigation-headbar-item-font-weight, 500)"
2925
+ };
2926
+ }
2906
2927
  function findNavigationRootId(items, activeItemId) {
2907
2928
  for (const item of items) {
2908
2929
  if (item.id === activeItemId) return item.id;
@@ -3220,7 +3241,8 @@ function HeadbarNavMenuItem({
3220
3241
  menuButtonRadiusClass,
3221
3242
  menuContentRadiusClass,
3222
3243
  menuItemRadiusClass,
3223
- onNavigate
3244
+ onNavigate,
3245
+ useTokenRadius
3224
3246
  }) {
3225
3247
  const [open, setOpen] = react.useState(false);
3226
3248
  const closeTimerRef = react.useRef(null);
@@ -3251,13 +3273,19 @@ function HeadbarNavMenuItem({
3251
3273
  icon: item.icon,
3252
3274
  endIcon: /* @__PURE__ */ jsxRuntime.jsx(HeadbarChevronIcon, { open }),
3253
3275
  label: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap", children: label }),
3276
+ disabled: item.disabled,
3254
3277
  onClick: () => setOpen(true),
3255
3278
  onMouseEnter: openMenu,
3256
3279
  onMouseLeave: scheduleCloseMenu,
3280
+ style: getHeadbarItemStyle(isActive || open, useTokenRadius),
3281
+ classNames: {
3282
+ icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3283
+ label: "text-[inherit] [&_*]:!text-[inherit]"
3284
+ },
3257
3285
  className: cn2(
3258
- "h-9 max-w-[12rem] shrink-0 border-transparent px-3 text-sm font-medium shadow-none",
3286
+ "max-w-[12rem] shrink-0 border shadow-none",
3259
3287
  menuButtonRadiusClass,
3260
- isActive || open ? "!bg-[hsl(var(--muted))] text-[hsl(var(--foreground))]" : "!bg-transparent text-[hsl(var(--muted-foreground))] hover:!bg-[hsl(var(--muted))]/60 hover:text-[hsl(var(--foreground))]"
3288
+ 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)))]"
3261
3289
  )
3262
3290
  }
3263
3291
  ) }),
@@ -3270,24 +3298,34 @@ function HeadbarNavMenuItem({
3270
3298
  onMouseEnter: openMenu,
3271
3299
  onMouseLeave: scheduleCloseMenu,
3272
3300
  className: cn2(
3273
- "z-50 min-w-56 border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-1.5 text-[hsl(var(--popover-foreground))] shadow-md animate-in fade-in-0 zoom-in-95",
3301
+ "z-50 min-w-56 border p-1.5 animate-in fade-in-0 zoom-in-95",
3274
3302
  menuContentRadiusClass
3275
3303
  ),
3304
+ style: {
3305
+ background: "var(--monkeys-component-navigation-headbar-menu-background, hsl(var(--popover)))",
3306
+ borderColor: "var(--monkeys-component-navigation-headbar-menu-border-color, hsl(var(--border)))",
3307
+ color: "var(--monkeys-component-navigation-headbar-menu-foreground, hsl(var(--popover-foreground)))",
3308
+ boxShadow: "var(--monkeys-component-navigation-headbar-menu-shadow, 0 10px 15px -3px rgb(0 0 0 / 0.1))",
3309
+ backdropFilter: "blur(var(--monkeys-component-navigation-headbar-menu-backdrop-blur, 0px))"
3310
+ },
3276
3311
  children: item.children?.map((child) => /* @__PURE__ */ jsxRuntime.jsxs(
3277
3312
  DropdownMenu__namespace.Item,
3278
3313
  {
3314
+ disabled: child.disabled,
3279
3315
  className: cn2(
3280
- "relative flex cursor-pointer select-none items-center gap-2.5 px-3 py-2 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))]",
3281
- menuItemRadiusClass,
3282
- child.id === activeItemId && "bg-[hsl(var(--muted))] text-[hsl(var(--foreground))]"
3316
+ "relative flex cursor-pointer select-none items-center gap-2.5 px-3 py-2 text-sm outline-none transition-colors hover:bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))]",
3317
+ menuItemRadiusClass
3283
3318
  ),
3319
+ style: getHeadbarItemStyle(child.id === activeItemId, useTokenRadius),
3284
3320
  onSelect: () => {
3321
+ if (child.disabled) return;
3285
3322
  setOpen(false);
3286
3323
  onNavigate?.(child.id);
3287
3324
  },
3288
3325
  children: [
3289
3326
  child.icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex h-4 w-4 shrink-0 items-center justify-center text-[hsl(var(--muted-foreground))]", children: child.icon }) : null,
3290
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: child.headbarLabel ?? child.label })
3327
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: child.headbarLabel ?? child.label }),
3328
+ child.trailing
3291
3329
  ]
3292
3330
  },
3293
3331
  child.id
@@ -3296,16 +3334,17 @@ function HeadbarNavMenuItem({
3296
3334
  ) })
3297
3335
  ] });
3298
3336
  }
3299
- function HeadbarNav({
3337
+ function NavigationHeadbarMenu({
3300
3338
  activeItemId,
3301
3339
  activeRootId,
3302
3340
  items,
3303
- menuRadius,
3341
+ menuRadius = "default",
3304
3342
  onNavigate
3305
3343
  }) {
3306
3344
  const menuButtonRadiusClass = getHeadbarMenuRadiusClass(menuRadius);
3307
3345
  const menuContentRadiusClass = getHeadbarMenuRadiusClass(menuRadius);
3308
3346
  const menuItemRadiusClass = getHeadbarMenuRadiusClass(menuRadius);
3347
+ const useTokenRadius = menuRadius === "default";
3309
3348
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-max min-w-0 shrink-0 items-center gap-1", children: items.map((item) => {
3310
3349
  const isActive = activeRootId === item.id || activeItemId === item.id;
3311
3350
  const label = item.headbarLabel ?? item.label;
@@ -3320,7 +3359,8 @@ function HeadbarNav({
3320
3359
  menuButtonRadiusClass,
3321
3360
  menuContentRadiusClass,
3322
3361
  menuItemRadiusClass,
3323
- onNavigate
3362
+ onNavigate,
3363
+ useTokenRadius
3324
3364
  },
3325
3365
  item.id
3326
3366
  );
@@ -3331,77 +3371,99 @@ function HeadbarNav({
3331
3371
  appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
3332
3372
  tone: "muted",
3333
3373
  active: isActive,
3374
+ disabled: item.disabled,
3334
3375
  icon: item.icon,
3335
- label: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap", children: label }),
3376
+ label: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
3377
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap", children: label }),
3378
+ item.trailing
3379
+ ] }),
3336
3380
  onClick: () => onNavigate?.(item.id),
3381
+ style: getHeadbarItemStyle(isActive, useTokenRadius),
3382
+ classNames: {
3383
+ icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3384
+ label: "text-[inherit] [&_*]:!text-[inherit]"
3385
+ },
3337
3386
  className: cn2(
3338
- "h-9 max-w-[12rem] shrink-0 border-transparent px-3 text-sm font-medium shadow-none",
3387
+ "max-w-[12rem] shrink-0 border shadow-none",
3339
3388
  menuButtonRadiusClass,
3340
- isActive ? "!bg-[hsl(var(--muted))] text-[hsl(var(--foreground))]" : "!bg-transparent text-[hsl(var(--muted-foreground))] hover:!bg-[hsl(var(--muted))]/60 hover:text-[hsl(var(--foreground))]"
3389
+ 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)))]"
3341
3390
  )
3342
3391
  },
3343
3392
  item.id
3344
3393
  );
3345
3394
  }) });
3346
3395
  }
3347
- function Headbar({
3396
+ function NavigationHeadbar({
3348
3397
  activeItemId,
3349
3398
  activeRootId,
3350
3399
  actions,
3351
3400
  accountMenu,
3401
+ className,
3352
3402
  extra,
3353
3403
  layout,
3404
+ brand,
3354
3405
  logo,
3355
- navItems,
3406
+ navigation,
3407
+ navItems = [],
3356
3408
  onNavigate
3357
3409
  }) {
3358
3410
  const heightPx = clampHeadbarHeight(layout?.heightPx);
3359
3411
  const layoutMode = layout?.layoutMode ?? "boxed";
3360
3412
  const menuRadius = layout?.menuRadius ?? "default";
3413
+ const surface = layout?.surface ?? "card";
3361
3414
  const logoHeightPx = getHeadbarLogoSizePx(heightPx);
3362
- const frameStyle = getHeadbarFrameStyle(layoutMode, heightPx);
3415
+ const frameStyle = getHeadbarFrameStyle(layoutMode, heightPx, surface);
3363
3416
  const showBrandTitle = Boolean(layout?.brandTitle);
3364
- return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: getHeadbarFrameClass(layoutMode), style: frameStyle, children: [
3365
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center justify-start", children: logo ? /* @__PURE__ */ jsxRuntime.jsx(
3366
- BaseButton,
3367
- {
3368
- appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
3369
- tone: "muted",
3370
- icon: /* @__PURE__ */ jsxRuntime.jsx(
3371
- "div",
3417
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3418
+ "header",
3419
+ {
3420
+ className: cn2(getHeadbarFrameClass(layoutMode, layout?.navPosition), className),
3421
+ "data-navigation-headbar": "",
3422
+ "data-navigation-headbar-surface": surface,
3423
+ style: frameStyle,
3424
+ children: [
3425
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center justify-start", children: brand ?? (logo ? /* @__PURE__ */ jsxRuntime.jsx(
3426
+ BaseButton,
3372
3427
  {
3373
- className: cn2(
3374
- "flex items-center justify-center overflow-hidden rounded-lg",
3375
- logo.url ? "w-auto max-w-[min(22rem,30vw)] bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
3428
+ appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
3429
+ tone: "muted",
3430
+ icon: /* @__PURE__ */ jsxRuntime.jsx(
3431
+ "div",
3432
+ {
3433
+ className: cn2(
3434
+ "flex items-center justify-center overflow-hidden rounded-lg",
3435
+ logo.url ? "w-auto max-w-[min(22rem,30vw)] bg-transparent" : "bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]"
3436
+ ),
3437
+ style: logo.url ? { height: logoHeightPx } : { width: logoHeightPx, height: logoHeightPx },
3438
+ children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.url, alt: logo.title, className: "block h-full w-auto object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: logo.title.charAt(0) })
3439
+ }
3376
3440
  ),
3377
- style: logo.url ? { height: logoHeightPx } : { width: logoHeightPx, height: logoHeightPx },
3378
- children: logo.url ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo.url, alt: logo.title, className: "block h-full w-auto object-contain" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold", children: logo.title.charAt(0) })
3441
+ label: showBrandTitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap text-base font-medium text-[hsl(var(--foreground))]", children: layout?.brandTitle }) : null,
3442
+ ariaLabel: logo.title,
3443
+ title: logo.title,
3444
+ className: "h-auto min-w-0 justify-start border-transparent bg-transparent p-0 shadow-none hover:bg-transparent",
3445
+ classNames: logo.url ? { icon: "!h-auto !w-auto shrink-0" } : void 0,
3446
+ onClick: logo.onClick
3379
3447
  }
3380
- ),
3381
- label: showBrandTitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap text-base font-medium text-[hsl(var(--foreground))]", children: layout?.brandTitle }) : null,
3382
- ariaLabel: logo.title,
3383
- title: logo.title,
3384
- className: "h-auto min-w-0 justify-start border-transparent bg-transparent p-0 shadow-none hover:bg-transparent",
3385
- classNames: logo.url ? { icon: "!h-auto !w-auto shrink-0" } : void 0,
3386
- onClick: logo.onClick
3387
- }
3388
- ) : null }),
3389
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("flex min-w-0 items-center", getHeadbarNavClass(layout?.navPosition)), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "no-scrollbar flex max-w-full min-w-0 items-center overflow-x-auto overscroll-x-contain", children: /* @__PURE__ */ jsxRuntime.jsx(
3390
- HeadbarNav,
3391
- {
3392
- activeItemId,
3393
- activeRootId,
3394
- items: navItems,
3395
- menuRadius,
3396
- onNavigate
3397
- }
3398
- ) }) }),
3399
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center justify-end gap-3", children: [
3400
- actions,
3401
- extra,
3402
- accountMenu
3403
- ] })
3404
- ] });
3448
+ ) : null) }),
3449
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn2("flex min-w-0 items-center", getHeadbarNavClass(layout?.navPosition)), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "no-scrollbar flex max-w-full min-w-0 items-center overflow-x-auto overscroll-x-contain", children: navigation ?? /* @__PURE__ */ jsxRuntime.jsx(
3450
+ NavigationHeadbarMenu,
3451
+ {
3452
+ activeItemId,
3453
+ activeRootId,
3454
+ items: navItems,
3455
+ menuRadius,
3456
+ onNavigate
3457
+ }
3458
+ ) }) }),
3459
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center justify-end gap-3", children: [
3460
+ actions,
3461
+ extra,
3462
+ accountMenu
3463
+ ] })
3464
+ ]
3465
+ }
3466
+ );
3405
3467
  }
3406
3468
  function NavigationLayout({
3407
3469
  activeItemId,
@@ -3517,7 +3579,7 @@ function NavigationLayout({
3517
3579
  }
3518
3580
  );
3519
3581
  const header = isHeadbarMode ? /* @__PURE__ */ jsxRuntime.jsx(
3520
- Headbar,
3582
+ NavigationHeadbar,
3521
3583
  {
3522
3584
  activeItemId,
3523
3585
  activeRootId: activeRootId ?? findNavigationRootId(navItems, activeItemId),
@@ -3557,6 +3619,8 @@ exports.AppHeader = AppHeader;
3557
3619
  exports.AppLayout = AppLayout;
3558
3620
  exports.AppSidebar = AppSidebar;
3559
3621
  exports.NavButton = NavButton;
3622
+ exports.NavigationHeadbar = NavigationHeadbar;
3623
+ exports.NavigationHeadbarMenu = NavigationHeadbarMenu;
3560
3624
  exports.NavigationLayout = NavigationLayout;
3561
3625
  exports.UserAccountMenu = UserAccountMenu;
3562
3626
  exports.cn = cn2;