@muraldevkit/ui-toolkit 4.35.2-dev-6GR3.1 → 4.35.2-dev-9Ky7.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,8 @@ export interface MrlMenuProps {
8
8
  children: React.ReactNode;
9
9
  /** Event to close the menu */
10
10
  clickOutsideEvent?: 'mouseup' | 'mousedown' | 'click';
11
+ /** enables/disable menu closing on scroll */
12
+ closeOnScroll?: boolean;
11
13
  /**
12
14
  * Private closeParent prop for use with MrlMenuItem
13
15
  *
@@ -113,7 +115,7 @@ export interface MrlMenuProps {
113
115
  * @param {MrlMenuProps} props - The props for the MrlMenu component
114
116
  * @returns {Element} - rendered MrlMenu component
115
117
  */
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;
118
+ 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
119
  export declare namespace MrlMenu {
118
120
  var componentType: string;
119
121
  }
@@ -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;
@@ -80,7 +80,7 @@ export declare const colorPictoStoryData: {
80
80
  export declare const animateStoryData: {
81
81
  args: {
82
82
  delay: number;
83
- state: "stop" | "play";
83
+ state: "play" | "stop";
84
84
  };
85
85
  argTypes: {
86
86
  delay: {
@@ -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 calculatePosition: (menuAlign: Alignment, offset: number, elementRect: DOMRect, triggerRect?: DOMRect) => Position;
11
+ export declare const getPosition: (menuAlign: Alignment, offset: number, elementRect: DOMRect, triggerRect?: DOMRect) => Position;