@seastudio/sdk 3.2.4 → 3.3.0

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.
@@ -84,14 +84,21 @@ function MenuItem({
84
84
  onClick,
85
85
  className
86
86
  }) {
87
+ const handlePressStart = (event) => {
88
+ event.stopPropagation();
89
+ if (disabled || event.button !== 0) return;
90
+ onClick();
91
+ };
92
+ const handleKeyboardClick = (event) => {
93
+ event.stopPropagation();
94
+ if (disabled || event.detail !== 0) return;
95
+ onClick();
96
+ };
87
97
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
88
98
  "button",
89
99
  {
90
- onClick: () => {
91
- if (!disabled) {
92
- onClick();
93
- }
94
- },
100
+ onMouseDown: handlePressStart,
101
+ onClick: handleKeyboardClick,
95
102
  disabled,
96
103
  className: cn(
97
104
  "w-full flex items-center gap-2 px-2 py-1.5 text-xs text-left transition-colors rounded-md",