import { type ElementType, type ReactEventHandler, type ReactElement } from 'react'; import { AriaDisabledProps, AriaLabelingProps } from '../../core/types/a11y-props.js'; import { DataTestId } from '../../core/types/data-props.js'; import { PolymorphicComponentProps } from '../../core/types/polymorph.js'; import { StylingProps } from '../../core/types/styling-props.js'; import { WithChildren } from '../../core/types/with-children.js'; /** * @public */ export interface MenuItemOwnProps extends WithChildren, AriaLabelingProps, AriaDisabledProps, StylingProps, DataTestId { /** * Whether the menu item is disabled. * If `true`, it prevents the user from interacting with the item and removes * it from the tab order and keyboard navigation. * * For a soft-disabled item that stays focusable, is announced to screen * readers, and can reveal its `Menu.ItemTooltip` on desktop, set * `aria-disabled` instead. A soft-disabled item stays interactive and still * fires `onSelect`, but selecting it does not close the menu. */ disabled?: boolean; /** * Optional text used for typeahead purposes. By default, the typeahead * behavior will use the `.textContent` of the item. Use this when the content * is complex, or you have non-textual content inside. */ textValue?: string; /** * Event handler called when the user selects an item (via mouse or keyboard). * Calling `event.preventDefault()` in this handler prevents the dropdown menu * from closing when selecting that item. */ onSelect: ReactEventHandler; } /** * @public */ export type MenuItemProps = PolymorphicComponentProps; /** * The component that contains the dropdown menu Items. * @public */ export declare const Item: (props: MenuItemProps) => ReactElement | null; //# sourceMappingURL=Item.d.ts.map