cetec-design-system 1.1.0 → 1.1.1-next.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.
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15207,8 +15207,10 @@ const Menu = (props) => {
|
|
|
15207
15207
|
const isOpen = isControlled ? open : uncontrolledOpen;
|
|
15208
15208
|
const isMenuVisible = hasReference ? isOpen : true;
|
|
15209
15209
|
const setOpenState = (nextOpen, _event, reason) => {
|
|
15210
|
-
if (
|
|
15211
|
-
|
|
15210
|
+
if (!nextOpen && (reason === "hover" || reason === "safe-polygon")) {
|
|
15211
|
+
if (triggerInteraction === "hover" || triggerInteraction === "click-and-hover") {
|
|
15212
|
+
return;
|
|
15213
|
+
}
|
|
15212
15214
|
}
|
|
15213
15215
|
if (!isControlled) {
|
|
15214
15216
|
setUncontrolledOpen(nextOpen);
|
|
@@ -15240,7 +15242,7 @@ const Menu = (props) => {
|
|
|
15240
15242
|
const labelsRef = useRef([]);
|
|
15241
15243
|
const [activeIndex, setActiveIndex] = useState(null);
|
|
15242
15244
|
const hover = useHover(floating.context, {
|
|
15243
|
-
enabled: hasReference && triggerInteraction === "hover",
|
|
15245
|
+
enabled: hasReference && (triggerInteraction === "hover" || triggerInteraction === "click-and-hover"),
|
|
15244
15246
|
delay: {
|
|
15245
15247
|
open: triggerOpenDelay,
|
|
15246
15248
|
close: triggerCloseDelay
|
|
@@ -15250,7 +15252,7 @@ const Menu = (props) => {
|
|
|
15250
15252
|
})
|
|
15251
15253
|
});
|
|
15252
15254
|
const click = useClick(floating.context, {
|
|
15253
|
-
enabled: hasReference && triggerInteraction === "click"
|
|
15255
|
+
enabled: hasReference && (triggerInteraction === "click" || triggerInteraction === "click-and-hover")
|
|
15254
15256
|
});
|
|
15255
15257
|
const dismiss = useDismiss(floating.context, { enabled: hasReference });
|
|
15256
15258
|
const role = useRole(floating.context, { role: "menu" });
|