@muraldevkit/ui-toolkit 4.35.2-dev-6GR3.1 → 4.36.0-dev-o8OA.1
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.
|
@@ -8,6 +8,11 @@ export interface MrlMenuProps {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
/** Event to close the menu */
|
|
10
10
|
clickOutsideEvent?: 'mouseup' | 'mousedown' | 'click';
|
|
11
|
+
/**
|
|
12
|
+
* Enables closing the menu when scrolling. Default is false.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
closeOnScroll?: boolean;
|
|
11
16
|
/**
|
|
12
17
|
* Private closeParent prop for use with MrlMenuItem
|
|
13
18
|
*
|
|
@@ -113,7 +118,7 @@ export interface MrlMenuProps {
|
|
|
113
118
|
* @param {MrlMenuProps} props - The props for the MrlMenu component
|
|
114
119
|
* @returns {Element} - rendered MrlMenu component
|
|
115
120
|
*/
|
|
116
|
-
export declare function MrlMenu({ actionState, alignment, children, closeParent, customPosition, clickOutsideEvent, disableArrowOpen, id, isInternal, isSubMenu, spacing, menuOffset, portalProps, position, triggerStopPropagation, onClose, triggerRef, ...remainingProps }: MrlMenuProps): JSX.Element;
|
|
121
|
+
export declare function MrlMenu({ actionState, alignment, children, closeOnScroll, closeParent, customPosition, clickOutsideEvent, disableArrowOpen, id, isInternal, isSubMenu, spacing, menuOffset, portalProps, position, triggerStopPropagation, onClose, triggerRef, ...remainingProps }: MrlMenuProps): JSX.Element;
|
|
117
122
|
export declare namespace MrlMenu {
|
|
118
123
|
var componentType: string;
|
|
119
124
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the closest scrollable parent of the provided element.
|
|
3
|
+
*
|
|
4
|
+
* @param element - The element to start from
|
|
5
|
+
* @returns The closest scrollable ancestor or the document's scrolling element
|
|
6
|
+
*/
|
|
7
|
+
export declare function getScrollableParent(element: HTMLElement | null): HTMLElement | Window;
|
|
@@ -8,4 +8,4 @@ import { Alignment, Position } from './constants';
|
|
|
8
8
|
* @param {DOMRect} [triggerRect] - The bounding rectangle of the trigger element.
|
|
9
9
|
* @returns {Position} The calculated position of the menu.
|
|
10
10
|
*/
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const getPosition: (menuAlign: Alignment, offset: number, elementRect: DOMRect, triggerRect?: DOMRect) => Position;
|