Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/Menu/Menu.d.ts

raw
1 /// <reference types="react" />
2 import { OUIAProps } from '../../helpers';
3 import type { MenuItemProps } from './MenuItem';
4 export interface MenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'ref' | 'onSelect'>, OUIAProps {
5 /** Anything that can be rendered inside of the Menu */
6 children?: React.ReactNode;
7 /** Additional classes added to the Menu */
8 className?: string;
9 /** ID of the menu */
10 id?: string;
11 /** Callback for updating when item selection changes. You can also specify onClick on the MenuItem. */
12 onSelect?: (event?: React.MouseEvent, itemId?: MenuItemProps['itemId']) => void;
13 /** Single itemId for single select menus, or array of itemIds for multi select. You can also specify isSelected on the MenuItem. */
14 selected?: any | any[];
15 /** Callback called when an MenuItems's action button is clicked. You can also specify it within a MenuItemAction. */
16 onActionClick?: (event?: any, itemId?: any, actionId?: any) => void;
17 /** Indicates if menu contains a flyout menu */
18 containsFlyout?: boolean;
19 /** Indicating that the menu should have nav flyout styling */
20 isNavFlyout?: boolean;
21 /** Indicates if menu contains a drilldown menu */
22 containsDrilldown?: boolean;
23 /** Indicates if a menu is drilled into */
24 isMenuDrilledIn?: boolean;
25 /** Indicates the path of drilled in menu itemIds */
26 drilldownItemPath?: string[];
27 /** Array of menus that are drilled in */
28 drilledInMenus?: string[];
29 /** Callback for drilling into a submenu */
30 onDrillIn?: (event: React.KeyboardEvent | React.MouseEvent, fromItemId: string, toItemId: string, itemId: string) => void;
31 /** Callback for drilling out of a submenu */
32 onDrillOut?: (event: React.KeyboardEvent | React.MouseEvent, toItemId: string, itemId: string) => void;
33 /** Callback for collecting menu heights */
34 onGetMenuHeight?: (menuId: string, height: number) => void;
35 /** ID of parent menu for drilldown menus */
36 parentMenu?: string;
37 /** ID of the currently active menu for the drilldown variant */
38 activeMenu?: string;
39 /** itemId of the currently active item. You can also specify isActive on the MenuItem. */
40 activeItemId?: string | number;
41 /** @hide Forwarded ref */
42 innerRef?: React.Ref<HTMLDivElement>;
43 /** Internal flag indicating if the Menu is the root of a menu tree */
44 isRootMenu?: boolean;
45 /** Indicates if the menu should be without the outer box-shadow */
46 isPlain?: boolean;
47 /** Indicates if the menu should be srollable */
48 isScrollable?: boolean;
49 /** Value to overwrite the randomly generated data-ouia-component-id.*/
50 ouiaId?: number | string;
51 /** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
52 ouiaSafe?: boolean;
53 /** Determines the accessible role of the menu. For a non-checkbox menu that can have
54 * one or more items selected, pass in "listbox". */
55 role?: string;
56 }
57 export interface MenuState {
58 transitionMoveTarget: HTMLElement;
59 flyoutRef: React.Ref<HTMLLIElement> | null;
60 currentDrilldownMenuId: string;
61 }
62 export declare const Menu: import("react").ForwardRefExoticComponent<MenuProps & import("react").RefAttributes<HTMLDivElement>>;
63 //# sourceMappingURL=Menu.d.ts.map