@sikka/hawa 0.16.8-next → 0.16.9-next
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 +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1479,6 +1479,14 @@ var DropdownMenu = function(param) {
|
|
|
1479
1479
|
dir: direction
|
|
1480
1480
|
}, item.icon && item.icon, item.label && item.label), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map(function(subitem, subIndex) {
|
|
1481
1481
|
return /* @__PURE__ */ React8.createElement(DropdownMenuItem, {
|
|
1482
|
+
onMouseDown: function(event) {
|
|
1483
|
+
if (event.button === 1 || event.button === 0 && event.ctrlKey) {
|
|
1484
|
+
event.preventDefault();
|
|
1485
|
+
if (item.onMiddleClick) {
|
|
1486
|
+
item.onMiddleClick(item.value);
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1482
1490
|
key: subIndex,
|
|
1483
1491
|
className: cn(sizeStyles[size], !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"),
|
|
1484
1492
|
disabled: subitem.disabled,
|
|
@@ -1493,7 +1501,7 @@ var DropdownMenu = function(param) {
|
|
|
1493
1501
|
key: index,
|
|
1494
1502
|
disabled: item.disabled,
|
|
1495
1503
|
onMouseDown: function(event) {
|
|
1496
|
-
if (event.button === 1) {
|
|
1504
|
+
if (event.button === 1 || event.button === 0 && event.ctrlKey) {
|
|
1497
1505
|
event.preventDefault();
|
|
1498
1506
|
if (item.onMiddleClick) {
|
|
1499
1507
|
item.onMiddleClick(item.value);
|
package/dist/index.mjs
CHANGED
|
@@ -674,6 +674,14 @@ var DropdownMenu = ({
|
|
|
674
674
|
), /* @__PURE__ */ React8.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React8.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React8.createElement(
|
|
675
675
|
DropdownMenuItem,
|
|
676
676
|
{
|
|
677
|
+
onMouseDown: (event) => {
|
|
678
|
+
if (event.button === 1 || event.button === 0 && event.ctrlKey) {
|
|
679
|
+
event.preventDefault();
|
|
680
|
+
if (item.onMiddleClick) {
|
|
681
|
+
item.onMiddleClick(item.value);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
},
|
|
677
685
|
key: subIndex,
|
|
678
686
|
className: cn(
|
|
679
687
|
sizeStyles[size],
|
|
@@ -695,7 +703,7 @@ var DropdownMenu = ({
|
|
|
695
703
|
key: index,
|
|
696
704
|
disabled: item.disabled,
|
|
697
705
|
onMouseDown: (event) => {
|
|
698
|
-
if (event.button === 1) {
|
|
706
|
+
if (event.button === 1 || event.button === 0 && event.ctrlKey) {
|
|
699
707
|
event.preventDefault();
|
|
700
708
|
if (item.onMiddleClick) {
|
|
701
709
|
item.onMiddleClick(item.value);
|