@muraldevkit/ui-toolkit 4.52.4-dev-65WH.1 → 4.52.4-dev-e85K.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.
@@ -1,8 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { DSIconType } from '../../../';
3
+ import { AriaHasPopup } from '../constants';
3
4
  export interface MrlMenuItemProps {
4
5
  /** ID for associated description */
5
6
  ariaDescribedBy?: string;
7
+ /** Indicates whether the menu item has a popup menu using aria-haspopup attribute */
8
+ ariaHasPopup?: AriaHasPopup;
6
9
  /**
7
10
  Children to be rendered within the menu component
8
11
  */
@@ -11,8 +14,6 @@ export interface MrlMenuItemProps {
11
14
  className?: string;
12
15
  /** If the menu item is disabled */
13
16
  disabled?: boolean;
14
- /** If the menu item has a popup (modal or popover) */
15
- hasPopup?: boolean;
16
17
  /** Icon for menu item */
17
18
  icon?: DSIconType;
18
19
  /** Unique ID for the menu item */
@@ -46,4 +47,4 @@ export interface MrlMenuItemProps {
46
47
  * @param {MrlMenuItemProps} props - The props for the MrlMenuItem component
47
48
  * @returns {Element} - rendered MrlMenuItem component
48
49
  */
49
- export declare function MrlMenuItem({ ariaDescribedBy, children, className, dataQa, disabled, hasPopup, icon, id, onClick, onMouseOut, onMouseOver, role, selected, ...rest }: MrlMenuItemProps): JSX.Element;
50
+ export declare function MrlMenuItem({ ariaDescribedBy, ariaHasPopup, children, className, dataQa, disabled, icon, id, onClick, onMouseOut, onMouseOver, role, selected, ...rest }: MrlMenuItemProps): JSX.Element;
@@ -28,6 +28,10 @@ export interface ActionState {
28
28
  * Accepted component types for use as a submenu
29
29
  */
30
30
  export type SubMenuTypes = 'Menu' | 'Popover';
31
+ /**
32
+ * Accepted values for aria-haspopup attribute
33
+ */
34
+ export type AriaHasPopup = boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
31
35
  /**
32
36
  * Extension of the React.FunctionComponent type to include a componentType property.
33
37
  *