@inf-monkeys-tech/monkeys-design 1.0.37 → 1.0.38

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.
@@ -107,6 +107,8 @@ declare function cn(...inputs: (false | null | string | undefined)[]): string;
107
107
  interface NavButtonProps {
108
108
  /** 是否处于激活状态 */
109
109
  active?: boolean;
110
+ /** 是否显示但禁止交互 */
111
+ disabled?: boolean;
110
112
  /** 左侧图标 */
111
113
  icon?: ReactNode;
112
114
  /** 右侧附加内容(如 chevron) */
@@ -116,7 +118,7 @@ interface NavButtonProps {
116
118
  className?: string;
117
119
  children: ReactNode;
118
120
  }
119
- declare function NavButton({ active, icon, postfix, onClick, className, children, }: NavButtonProps): react_jsx_runtime.JSX.Element;
121
+ declare function NavButton({ active, disabled, icon, postfix, onClick, className, children, }: NavButtonProps): react_jsx_runtime.JSX.Element;
120
122
  interface HeaderTab {
121
123
  id: string;
122
124
  label: string;
@@ -160,6 +162,7 @@ interface SidebarNavItem {
160
162
  id: string;
161
163
  label: string;
162
164
  icon?: ReactNode;
165
+ disabled?: boolean;
163
166
  /** 如果有 children 则为分组,点击展开/折叠 */
164
167
  children?: SidebarNavItem[];
165
168
  }
@@ -107,6 +107,8 @@ declare function cn(...inputs: (false | null | string | undefined)[]): string;
107
107
  interface NavButtonProps {
108
108
  /** 是否处于激活状态 */
109
109
  active?: boolean;
110
+ /** 是否显示但禁止交互 */
111
+ disabled?: boolean;
110
112
  /** 左侧图标 */
111
113
  icon?: ReactNode;
112
114
  /** 右侧附加内容(如 chevron) */
@@ -116,7 +118,7 @@ interface NavButtonProps {
116
118
  className?: string;
117
119
  children: ReactNode;
118
120
  }
119
- declare function NavButton({ active, icon, postfix, onClick, className, children, }: NavButtonProps): react_jsx_runtime.JSX.Element;
121
+ declare function NavButton({ active, disabled, icon, postfix, onClick, className, children, }: NavButtonProps): react_jsx_runtime.JSX.Element;
120
122
  interface HeaderTab {
121
123
  id: string;
122
124
  label: string;
@@ -160,6 +162,7 @@ interface SidebarNavItem {
160
162
  id: string;
161
163
  label: string;
162
164
  icon?: ReactNode;
165
+ disabled?: boolean;
163
166
  /** 如果有 children 则为分组,点击展开/折叠 */
164
167
  children?: SidebarNavItem[];
165
168
  }
@@ -2789,7 +2789,7 @@ function UserAccountMenu({
2789
2789
  DropdownMenu__namespace.Item,
2790
2790
  {
2791
2791
  disabled: item.disabled,
2792
- onSelect: item.onSelect,
2792
+ onSelect: item.disabled ? void 0 : item.onSelect,
2793
2793
  className: cn(
2794
2794
  "relative flex cursor-pointer select-none items-center gap-2 px-2 py-2 text-sm outline-none transition-colors hover:bg-[hsl(var(--accent))] hover:text-[hsl(var(--accent-foreground))] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2795
2795
  radiusClass,
@@ -2815,6 +2815,7 @@ function cn2(...inputs) {
2815
2815
  }
2816
2816
  function NavButton({
2817
2817
  active,
2818
+ disabled,
2818
2819
  icon,
2819
2820
  postfix,
2820
2821
  onClick,
@@ -2822,11 +2823,16 @@ function NavButton({
2822
2823
  children
2823
2824
  }) {
2824
2825
  return /* @__PURE__ */ jsxRuntime.jsxs(
2825
- "div",
2826
+ "button",
2826
2827
  {
2828
+ type: "button",
2829
+ "aria-disabled": disabled,
2830
+ "aria-pressed": active,
2831
+ disabled,
2827
2832
  className: cn2(
2828
- "flex w-full cursor-pointer select-none items-center gap-2 rounded-xl border p-2 text-xs text-[hsl(var(--foreground))] transition-colors",
2829
- active ? "border-[hsl(var(--input))] bg-[hsl(var(--muted))] font-bold" : "border-transparent hover:border-[hsl(var(--input))]/60 hover:bg-[hsl(var(--muted))]/60",
2833
+ "flex w-full cursor-pointer select-none items-center gap-2 rounded-xl border p-2 text-left text-xs text-[hsl(var(--foreground))] transition-colors",
2834
+ active ? "border-[hsl(var(--input))] bg-[hsl(var(--muted))] font-bold" : disabled ? "border-transparent" : "border-transparent hover:border-[hsl(var(--input))]/60 hover:bg-[hsl(var(--muted))]/60",
2835
+ disabled && "!cursor-not-allowed opacity-60",
2830
2836
  className
2831
2837
  ),
2832
2838
  onClick,
@@ -3119,6 +3125,8 @@ function SidebarNavList({
3119
3125
  /* @__PURE__ */ jsxRuntime.jsx(
3120
3126
  NavButton,
3121
3127
  {
3128
+ active: item.id === resolvedActiveItemId,
3129
+ disabled: item.disabled,
3122
3130
  icon: item.icon,
3123
3131
  onClick: () => toggle(item.id),
3124
3132
  postfix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3143,10 +3151,11 @@ function SidebarNavList({
3143
3151
  children: item.label
3144
3152
  }
3145
3153
  ),
3146
- isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1 mt-1", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
3154
+ isExpanded && !item.disabled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1 mt-1", children: item.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
3147
3155
  NavButton,
3148
3156
  {
3149
3157
  active: child.id === resolvedActiveItemId,
3158
+ disabled: child.disabled,
3150
3159
  onClick: () => {
3151
3160
  setLocalActiveItemId(child.id);
3152
3161
  onNavigate?.(child.id);
@@ -3162,6 +3171,7 @@ function SidebarNavList({
3162
3171
  {
3163
3172
  icon: item.icon,
3164
3173
  active: item.id === resolvedActiveItemId,
3174
+ disabled: item.disabled,
3165
3175
  onClick: () => {
3166
3176
  setLocalActiveItemId(item.id);
3167
3177
  onNavigate?.(item.id);
@@ -3411,6 +3421,10 @@ function SidebarNavigationList({
3411
3421
  const [expandedByRoot, setExpandedByRoot] = react.useState(
3412
3422
  {}
3413
3423
  );
3424
+ const canReveal = revealRequest ? items.some(
3425
+ (item) => item.id === revealRequest.id && !item.disabled
3426
+ ) : false;
3427
+ const activeRootId = findNavigationRootId(items, activeItemId);
3414
3428
  const toggleRoot = (id) => {
3415
3429
  setExpandedByRoot((current) => ({
3416
3430
  ...current,
@@ -3418,7 +3432,7 @@ function SidebarNavigationList({
3418
3432
  }));
3419
3433
  };
3420
3434
  react.useEffect(() => {
3421
- if (!revealRequest) return;
3435
+ if (!revealRequest || !canReveal) return;
3422
3436
  setExpandedByRoot((current) => ({
3423
3437
  ...current,
3424
3438
  [revealRequest.id]: true
@@ -3436,7 +3450,7 @@ function SidebarNavigationList({
3436
3450
  }
3437
3451
  });
3438
3452
  return () => window.cancelAnimationFrame(frameId);
3439
- }, [revealRequest]);
3453
+ }, [canReveal, revealRequest]);
3440
3454
  return /* @__PURE__ */ jsxRuntime.jsxs(
3441
3455
  "div",
3442
3456
  {
@@ -3451,13 +3465,15 @@ function SidebarNavigationList({
3451
3465
  className: "monkeys-navigation-sidebar-nav flex w-full flex-col gap-2 text-xs text-[hsl(var(--foreground))]",
3452
3466
  children: items.map((item) => {
3453
3467
  const isGroup = Boolean(item.children?.length);
3454
- const isExpanded = Boolean(expandedByRoot[item.id]);
3455
- const isActive = activeItemId === item.id;
3468
+ const isExpanded = !item.disabled && Boolean(expandedByRoot[item.id]);
3469
+ const isActive = activeRootId === item.id;
3456
3470
  if (isGroup) {
3457
3471
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-navigation-sidebar-root-id": item.id, children: [
3458
3472
  /* @__PURE__ */ jsxRuntime.jsx(
3459
3473
  NavButton,
3460
3474
  {
3475
+ active: isActive,
3476
+ disabled: item.disabled,
3461
3477
  icon: item.icon,
3462
3478
  onClick: () => toggleRoot(item.id),
3463
3479
  postfix: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3486,6 +3502,7 @@ function SidebarNavigationList({
3486
3502
  NavButton,
3487
3503
  {
3488
3504
  active: activeItemId === child.id,
3505
+ disabled: child.disabled,
3489
3506
  onClick: () => onNavigate?.(child.id),
3490
3507
  children: child.label
3491
3508
  },
@@ -3497,6 +3514,7 @@ function SidebarNavigationList({
3497
3514
  NavButton,
3498
3515
  {
3499
3516
  active: isActive,
3517
+ disabled: item.disabled,
3500
3518
  icon: item.icon,
3501
3519
  onClick: () => onNavigate?.(item.id),
3502
3520
  children: item.label
@@ -3612,9 +3630,11 @@ function Sidebar({
3612
3630
  appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
3613
3631
  tone: "muted",
3614
3632
  active: isActive,
3633
+ disabled: item.disabled,
3615
3634
  iconOnly: true,
3616
3635
  icon: item.icon,
3617
3636
  onClick: () => {
3637
+ if (item.disabled) return;
3618
3638
  onRevealRoot?.(item.id);
3619
3639
  onCollapsedChange?.(false);
3620
3640
  if (item.children?.length) return;
@@ -3691,6 +3711,7 @@ function HeadbarNavMenuItem({
3691
3711
  useTokenRadius
3692
3712
  }) {
3693
3713
  const [open, setOpen] = react.useState(false);
3714
+ const isOpen = !item.disabled && open;
3694
3715
  const closeTimerRef = react.useRef(null);
3695
3716
  const wasOpenOnPointerDownRef = react.useRef(false);
3696
3717
  const clearCloseTimer = () => {
@@ -3699,6 +3720,7 @@ function HeadbarNavMenuItem({
3699
3720
  closeTimerRef.current = null;
3700
3721
  };
3701
3722
  const openMenu = () => {
3723
+ if (item.disabled) return;
3702
3724
  clearCloseTimer();
3703
3725
  setOpen(true);
3704
3726
  };
@@ -3717,98 +3739,111 @@ function HeadbarNavMenuItem({
3717
3739
  return true;
3718
3740
  };
3719
3741
  react.useEffect(() => clearCloseTimer, []);
3720
- return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu__namespace.Root, { modal: false, open, onOpenChange: setOpen, children: [
3721
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
3722
- BaseButton,
3723
- {
3724
- appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
3725
- tone: "muted",
3726
- active: isActive || open,
3727
- icon: item.icon,
3728
- endIcon: /* @__PURE__ */ jsxRuntime.jsx(HeadbarChevronIcon, { open }),
3729
- label: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap", children: label }),
3730
- disabled: item.disabled,
3731
- onClick: () => {
3732
- const wasOpenOnPointerDown = wasOpenOnPointerDownRef.current;
3733
- wasOpenOnPointerDownRef.current = false;
3734
- if (wasOpenOnPointerDown && navigateToFirstEnabledChild()) return;
3735
- setOpen(true);
3736
- },
3737
- onPointerDown: () => {
3738
- wasOpenOnPointerDownRef.current = open;
3739
- },
3740
- onPointerCancel: () => {
3741
- wasOpenOnPointerDownRef.current = false;
3742
- },
3743
- onKeyDown: (event) => {
3744
- if (!open || event.key !== "Enter" && event.key !== " ") return;
3745
- if (navigateToFirstEnabledChild()) event.preventDefault();
3746
- },
3747
- onMouseEnter: openMenu,
3748
- onMouseLeave: scheduleCloseMenu,
3749
- style: getHeadbarItemStyle(
3750
- isActive || open,
3751
- compound ? false : useTokenRadius
3752
- ),
3753
- classNames: {
3754
- icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3755
- label: "text-[inherit] [&_*]:!text-[inherit]"
3756
- },
3757
- className: cn2(
3758
- "max-w-[12rem] shrink-0 border shadow-none",
3759
- compound && "!rounded-none !border-0 !bg-transparent",
3760
- menuButtonRadiusClass,
3761
- 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)))]"
3762
- )
3763
- }
3764
- ) }),
3765
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
3766
- DropdownMenu__namespace.Content,
3767
- {
3768
- align: "start",
3769
- sideOffset: 5,
3770
- onCloseAutoFocus: (event) => event.preventDefault(),
3771
- onMouseEnter: openMenu,
3772
- onMouseLeave: scheduleCloseMenu,
3773
- className: cn2(
3774
- "z-50 min-w-56 border p-1.5 animate-in fade-in-0 zoom-in-95",
3775
- menuContentRadiusClass
3776
- ),
3777
- style: {
3778
- background: "var(--monkeys-component-navigation-headbar-menu-background, hsl(var(--popover)))",
3779
- borderColor: "var(--monkeys-component-navigation-headbar-menu-border-color, hsl(var(--border)))",
3780
- color: "var(--monkeys-component-navigation-headbar-menu-foreground, hsl(var(--popover-foreground)))",
3781
- boxShadow: "var(--monkeys-component-navigation-headbar-menu-shadow, 0 10px 15px -3px rgb(0 0 0 / 0.1))",
3782
- backdropFilter: "blur(var(--monkeys-component-navigation-headbar-menu-backdrop-blur, 0px))"
3783
- },
3784
- children: item.children?.map((child) => /* @__PURE__ */ jsxRuntime.jsxs(
3785
- DropdownMenu__namespace.Item,
3742
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3743
+ DropdownMenu__namespace.Root,
3744
+ {
3745
+ modal: false,
3746
+ open: isOpen,
3747
+ onOpenChange: (nextOpen) => setOpen(!item.disabled && nextOpen),
3748
+ children: [
3749
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
3750
+ BaseButton,
3786
3751
  {
3787
- disabled: child.disabled,
3788
- className: cn2(
3789
- "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)))] hover:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))] focus:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))] focus:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))] data-[highlighted]:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))] data-[highlighted]:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))]",
3790
- menuItemRadiusClass
3791
- ),
3752
+ appearance: NAVIGATION_LAYOUT_DEFAULT_APPEARANCE,
3753
+ tone: "muted",
3754
+ active: isActive || isOpen,
3755
+ icon: item.icon,
3756
+ endIcon: /* @__PURE__ */ jsxRuntime.jsx(HeadbarChevronIcon, { open: isOpen }),
3757
+ label: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate whitespace-nowrap", children: label }),
3758
+ disabled: item.disabled,
3759
+ onClick: () => {
3760
+ const wasOpenOnPointerDown = wasOpenOnPointerDownRef.current;
3761
+ wasOpenOnPointerDownRef.current = false;
3762
+ if (wasOpenOnPointerDown && navigateToFirstEnabledChild()) return;
3763
+ setOpen(true);
3764
+ },
3765
+ onPointerDown: () => {
3766
+ wasOpenOnPointerDownRef.current = isOpen;
3767
+ },
3768
+ onPointerCancel: () => {
3769
+ wasOpenOnPointerDownRef.current = false;
3770
+ },
3771
+ onKeyDown: (event) => {
3772
+ if (!isOpen || event.key !== "Enter" && event.key !== " ")
3773
+ return;
3774
+ if (navigateToFirstEnabledChild()) event.preventDefault();
3775
+ },
3776
+ onMouseEnter: openMenu,
3777
+ onMouseLeave: scheduleCloseMenu,
3792
3778
  style: getHeadbarItemStyle(
3793
- child.id === activeItemId,
3794
- useTokenRadius
3779
+ isActive || isOpen,
3780
+ compound ? false : useTokenRadius
3795
3781
  ),
3796
- onSelect: () => {
3797
- if (child.disabled) return;
3798
- setOpen(false);
3799
- onNavigate?.(child.id);
3782
+ classNames: {
3783
+ icon: "text-[inherit] [&_*]:!text-[inherit] [&_svg]:!stroke-current",
3784
+ label: "text-[inherit] [&_*]:!text-[inherit]"
3800
3785
  },
3801
- children: [
3802
- 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,
3803
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: child.headbarLabel ?? child.label }),
3804
- child.trailing
3805
- ]
3806
- },
3807
- child.id
3808
- ))
3809
- }
3810
- ) })
3811
- ] });
3786
+ className: cn2(
3787
+ "max-w-[12rem] shrink-0 border shadow-none",
3788
+ compound && "!rounded-none !border-0 !bg-transparent",
3789
+ menuButtonRadiusClass,
3790
+ isActive || isOpen ? "" : "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)))]"
3791
+ )
3792
+ }
3793
+ ) }),
3794
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
3795
+ DropdownMenu__namespace.Content,
3796
+ {
3797
+ align: "start",
3798
+ sideOffset: 5,
3799
+ onCloseAutoFocus: (event) => event.preventDefault(),
3800
+ onMouseEnter: openMenu,
3801
+ onMouseLeave: scheduleCloseMenu,
3802
+ className: cn2(
3803
+ "z-50 min-w-56 border p-1.5 animate-in fade-in-0 zoom-in-95",
3804
+ menuContentRadiusClass
3805
+ ),
3806
+ style: {
3807
+ background: "var(--monkeys-component-navigation-headbar-menu-background, hsl(var(--popover)))",
3808
+ borderColor: "var(--monkeys-component-navigation-headbar-menu-border-color, hsl(var(--border)))",
3809
+ color: "var(--monkeys-component-navigation-headbar-menu-foreground, hsl(var(--popover-foreground)))",
3810
+ boxShadow: "var(--monkeys-component-navigation-headbar-menu-shadow, 0 10px 15px -3px rgb(0 0 0 / 0.1))",
3811
+ backdropFilter: "blur(var(--monkeys-component-navigation-headbar-menu-backdrop-blur, 0px))"
3812
+ },
3813
+ children: item.children?.map((child) => /* @__PURE__ */ jsxRuntime.jsxs(
3814
+ DropdownMenu__namespace.Item,
3815
+ {
3816
+ disabled: child.disabled,
3817
+ className: cn2(
3818
+ "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)))] hover:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))] focus:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))] focus:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))] data-[highlighted]:!bg-[var(--monkeys-component-navigation-headbar-item-hover-background,hsl(var(--accent)))] data-[highlighted]:!text-[var(--monkeys-component-navigation-headbar-item-hover-foreground,hsl(var(--accent-foreground)))]",
3819
+ menuItemRadiusClass
3820
+ ),
3821
+ style: getHeadbarItemStyle(
3822
+ child.id === activeItemId,
3823
+ useTokenRadius
3824
+ ),
3825
+ onSelect: () => {
3826
+ if (child.disabled) return;
3827
+ setOpen(false);
3828
+ onNavigate?.(child.id);
3829
+ },
3830
+ children: [
3831
+ 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,
3832
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 truncate", children: child.headbarLabel ?? child.label }),
3833
+ child.trailing
3834
+ ]
3835
+ },
3836
+ child.id
3837
+ ))
3838
+ }
3839
+ ) })
3840
+ ]
3841
+ }
3842
+ );
3843
+ }
3844
+ function blockEvent(event) {
3845
+ event.preventDefault();
3846
+ event.stopPropagation();
3812
3847
  }
3813
3848
  function NavigationHeadbarMenu({
3814
3849
  activeItemId,
@@ -3875,6 +3910,7 @@ function NavigationHeadbarMenu({
3875
3910
  "div",
3876
3911
  {
3877
3912
  "data-navigation-headbar-compound-item": item.id,
3913
+ "aria-disabled": item.disabled,
3878
3914
  className: cn2(
3879
3915
  "inline-flex min-w-0 shrink-0 items-center gap-0 overflow-hidden border shadow-none",
3880
3916
  menuButtonRadiusClass,
@@ -3894,7 +3930,17 @@ function NavigationHeadbarMenu({
3894
3930
  "span",
3895
3931
  {
3896
3932
  "data-navigation-headbar-secondary-action": item.id,
3897
- className: "inline-flex min-w-0 shrink-0 items-center",
3933
+ ...item.disabled && {
3934
+ inert: "",
3935
+ onClickCapture: blockEvent,
3936
+ onKeyDownCapture: blockEvent,
3937
+ onKeyUpCapture: blockEvent,
3938
+ onPointerDownCapture: blockEvent
3939
+ },
3940
+ className: cn2(
3941
+ "inline-flex min-w-0 shrink-0 items-center",
3942
+ item.disabled && "!cursor-not-allowed opacity-60"
3943
+ ),
3898
3944
  children: item.headbarSecondaryAction
3899
3945
  }
3900
3946
  )