import React from 'react'; import { MenuItem } from '../MenuItem'; import type { MenuGroupTheme, OtherHTMLAttributes } from '@instructure/shared-types'; import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'; import type { MenuItemProps } from '../MenuItem/props'; import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'; type MenuGroupOwnProps = { label: React.ReactNode; allowMultiple?: boolean; /** * children of type `Menu.Item`, `Menu.Separator` */ children?: React.ReactNode; /** * an array of the values (or indices by default) for the selected items */ selected?: (string | number)[]; /** * an array of the values (or indices by default) for the selected items on initial render */ defaultSelected?: (string | number)[]; /** * call this function when a menu item is selected */ onSelect?: (e: React.MouseEvent, updated: MenuItemProps['value'][], selected: MenuItemProps['selected'], item: MenuItem) => void; onMouseOver?: (e: React.MouseEvent, args: MenuItem) => void; /** * the id of the element that the menu items will act upon */ controls?: string; /** * returns a reference to the `MenuItem` */ itemRef?: (element: MenuItem | null) => void; disabled?: boolean; /** * should the group appear in the tab order (the first item will have a tabIndex of 0) */ isTabbable?: boolean; }; type PropKeys = keyof MenuGroupOwnProps; type AllowedPropKeys = Readonly>; type MenuGroupProps = MenuGroupOwnProps & WithStyleProps & OtherHTMLAttributes & WithDeterministicIdProps; type MenuGroupStyle = ComponentStyle<'menuItemGroup' | 'label' | 'items'>; declare const allowedProps: AllowedPropKeys; type MenuGroupState = { selected: (string | number)[]; }; export type { MenuGroupProps, MenuGroupStyle, MenuGroupState }; export { allowedProps }; //# sourceMappingURL=props.d.ts.map