@muraldevkit/ui-toolkit 4.52.2 → 4.52.4-dev-65WH.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.
@@ -11,6 +11,8 @@ export interface MrlMenuItemProps {
11
11
  className?: string;
12
12
  /** If the menu item is disabled */
13
13
  disabled?: boolean;
14
+ /** If the menu item has a popup (modal or popover) */
15
+ hasPopup?: boolean;
14
16
  /** Icon for menu item */
15
17
  icon?: DSIconType;
16
18
  /** Unique ID for the menu item */
@@ -23,7 +25,16 @@ export interface MrlMenuItemProps {
23
25
  onMouseOut?: (e?: React.MouseEvent) => void;
24
26
  /** Data-qa attribute for the menu item */
25
27
  dataQa?: string;
26
- /** Role for the menu item */
28
+ /**
29
+ * Role for the menu item
30
+ *
31
+ * When using `menuitemcheckbox` or `menuitemradio`, the menu item will be treated as a selectable item,
32
+ * aria-checked will be set to 'true' or 'false' based on the selected state.
33
+ *
34
+ * @default 'menuitem' - for regular menu items
35
+ * @example 'menuitemcheckbox' - for checkbox menu items
36
+ * @example 'menuitemradio' - for radio menu items
37
+ */
27
38
  role?: 'menuitem' | 'menuitemcheckbox' | 'menuitemradio';
28
39
  /** If the menu item is selected */
29
40
  selected?: boolean;
@@ -35,4 +46,4 @@ export interface MrlMenuItemProps {
35
46
  * @param {MrlMenuItemProps} props - The props for the MrlMenuItem component
36
47
  * @returns {Element} - rendered MrlMenuItem component
37
48
  */
38
- export declare function MrlMenuItem({ ariaDescribedBy, children, className, dataQa, disabled, icon, id, onClick, onMouseOut, onMouseOver, role, selected, ...rest }: MrlMenuItemProps): JSX.Element;
49
+ export declare function MrlMenuItem({ ariaDescribedBy, children, className, dataQa, disabled, hasPopup, icon, id, onClick, onMouseOut, onMouseOver, role, selected, ...rest }: MrlMenuItemProps): JSX.Element;
@@ -12,6 +12,10 @@ type MrlMenuContext = {
12
12
  * @returns {void}
13
13
  */
14
14
  closeParent?: () => void;
15
+ /**
16
+ * Reference to the menu trigger button for focus restoration
17
+ */
18
+ triggerRef?: React.RefObject<HTMLElement>;
15
19
  };
16
20
  /**
17
21
  * Adds context for the MrlMenu component