1 | import * as React from 'react';
|
2 | import { StandardProps } from '..';
|
3 | import { ListProps, ListClassKey } from '../List';
|
4 |
|
5 | export interface MenuListProps extends StandardProps<ListProps, MenuListClassKey> {
|
6 | /**
|
7 | * If `true`, will focus the `[role="menu"]` container and move into tab order.
|
8 | */
|
9 | autoFocus?: boolean;
|
10 | /**
|
11 | * If `true`, will focus the first menuitem if `variant="menu"` or selected item
|
12 | * if `variant="selectedMenu"`.
|
13 | */
|
14 | autoFocusItem?: boolean;
|
15 | /**
|
16 | * MenuList contents, normally `MenuItem`s.
|
17 | */
|
18 | children?: React.ReactNode;
|
19 | /**
|
20 | * If `true`, will allow focus on disabled items.
|
21 | */
|
22 | disabledItemsFocusable?: boolean;
|
23 | /**
|
24 | * If `true`, the menu items will not wrap focus.
|
25 | */
|
26 | disableListWrap?: boolean;
|
27 | /**
|
28 | * The variant to use. Use `menu` to prevent selected items from impacting the initial focus
|
29 | * and the vertical alignment relative to the anchor element.
|
30 | */
|
31 | variant?: 'menu' | 'selectedMenu';
|
32 | }
|
33 |
|
34 | export type MenuListClassKey = ListClassKey;
|
35 |
|
36 | /**
|
37 | * A permanently displayed menu following <https://www.w3.org/TR/wai-aria-practices/#menubutton>.
|
38 | * It's exposed to help customization of the [`Menu`](https://mui.com/api/menu/) component. If you
|
39 | * use it separately you need to move focus into the component manually. Once
|
40 | * the focus is placed inside the component it is fully keyboard accessible.
|
41 | * Demos:
|
42 | *
|
43 | * - [Menus](https://mui.com/components/menus/)
|
44 | *
|
45 | * API:
|
46 | *
|
47 | * - [MenuList API](https://mui.com/api/menu-list/)
|
48 | * - inherits [List API](https://mui.com/api/list/)
|
49 | */
|
50 | export default function MenuList(props: MenuListProps): JSX.Element;
|