@muraldevkit/ui-toolkit 2.64.0 → 2.65.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.
@@ -1,4 +1,5 @@
1
1
  import React, { RefObject } from 'react';
2
+ import { PortalProps } from '../../../components';
2
3
  import { MenuPosition, MenuAlignment, ActionState, CustomMenuPosition } from '../constants';
3
4
  export interface MrlMenuProps {
4
5
  /** Custom position for the menu */
@@ -7,6 +8,15 @@ export interface MrlMenuProps {
7
8
  children: React.ReactNode;
8
9
  /** Event to close the menu */
9
10
  clickOutsideEvent?: 'mouseup' | 'mousedown' | 'click';
11
+ /**
12
+ * Disable arrows from opening the menu
13
+ * - This is useful when you want to disable the default browser behavior of opening a menu on arrow down.
14
+ *
15
+ * Example usage: the menu is within a vertical toolbar and you want to use the arrow keys to navigate the toolbar.
16
+ * By using this prop you can disable the arrow key open/close so that navigating the toolbar does not conflict
17
+ * with opening/closing the menu.
18
+ */
19
+ disableArrowOpen?: boolean;
10
20
  /** Unique identifier for the menu */
11
21
  id?: string;
12
22
  /**
@@ -39,6 +49,10 @@ export interface MrlMenuProps {
39
49
  * @default 10px
40
50
  */
41
51
  menuOffset?: number;
52
+ /**
53
+ * Configuration for the portal component
54
+ */
55
+ portalProps?: Omit<PortalProps, 'children'>;
42
56
  /**
43
57
  * Horizontal and vertical alignment of the menu relative to the trigger element
44
58
  * - position 'left', 'right', 'top', 'bottom' position relative to the trigger
@@ -91,7 +105,7 @@ export interface MrlMenuProps {
91
105
  * @param {MrlMenuProps} props - The props for the MrlMenu component
92
106
  * @returns {Element} - rendered MrlMenu component
93
107
  */
94
- export declare function MrlMenu({ actionState, alignment, children, customPosition, clickOutsideEvent, id, isInternal, isSubMenu, spacing, menuOffset, position, triggerStopPropagation, onClose, triggerRef, ...remainingProps }: MrlMenuProps): JSX.Element;
108
+ export declare function MrlMenu({ actionState, alignment, children, customPosition, clickOutsideEvent, disableArrowOpen, id, isInternal, isSubMenu, spacing, menuOffset, portalProps, position, triggerStopPropagation, onClose, triggerRef, ...remainingProps }: MrlMenuProps): JSX.Element;
95
109
  export declare namespace MrlMenu {
96
110
  var componentType: string;
97
111
  }