@progress/kendo-react-layout
Version:
React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package
34 lines (33 loc) • 1.27 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
class n {
constructor(e, s, i) {
this.openOnClick = e, this.resetMenu = s, this.openItem = i, this.mouseDown = !1, this.openOnClick = e, this.isMouseOverEnabled = !e;
}
set OpenOnClick(e) {
!!e != !!this.openOnClick && (this.mouseDown = !1, this.isMouseOverEnabled = !e), this.openOnClick = e;
}
handleItemSelectedViaKeyboard() {
this.openOnClick && (this.isMouseOverEnabled = !1, this.resetMenu());
}
get IsMouseOverEnabled() {
return this.isMouseOverEnabled;
}
handleItemMouseDown() {
this.mouseDown = !0;
}
handleItemFocus() {
this.openOnClick && !this.mouseDown && (this.isMouseOverEnabled = !0), this.mouseDown = !1;
}
handleItemClick(e, s) {
this.openOnClick && (this.isMouseOverEnabled ? s && (this.isMouseOverEnabled = !1, this.resetMenu()) : (this.isMouseOverEnabled = !0, this.openItem(e)));
}
}
export {
n as MouseOverHandler
};