import { Menu as HeadlessMenu, MenuItem as HeadlessMenuItem, MenuItems as HeadlessMenuItems, MenuButton as HeadlessMenuButton, MenuSection as HeadlessMenuSection, MenuHeading as HeadlessMenuHeading, MenuSeparator as HeadlessMenuSeparator } from '@headlessui/react'; import type { AnchorProps } from '@headlessui/react/dist/internal/floating'; import type { MouseEventHandler, HTMLAttributeAnchorTarget } from 'react'; import React from 'react'; import type { ExtractProps } from '../../util/utility-types'; import { type IconName } from '../Icon'; import type { PopoverListItemProps } from '../PopoverListItem/PopoverListItem'; export type MenuProps = ExtractProps & { /** * Allow custom classes to be applied to the menu container. */ className?: string; }; export type MenuButtonProps = { /** * The button contents placed left of the chevron icon. */ children: string; /** * Allow custom classes to be applied to the menu button. */ className?: string; /** * Icon override for component. Default is 'chevron-down' */ icon?: Extract; }; export type MenuSeparatorProps = ExtractProps; export type MenuPlainButtonProps = ExtractProps; export type MenuHeadingProps = ExtractProps; export type MenuSectionProps = ExtractProps; export type MenuItemsProps = ExtractProps; export type MenuItemProps = ExtractProps & PopoverListItemProps & { anchor?: AnchorProps; /** * Target URL for the menu item action */ href?: string; /** * Icons are able to appear next to each Option in the Options list if it is relevant; before using any icons, please refer to the appropriate icon usage guidelines. Deprecated in favor of `leadingContent` * @deprecated */ icon?: IconName; /** * Configurable action for the menu item upon click */ onClick?: MouseEventHandler; __type?: PopoverListItemProps['__type']; /** * Specify the target of the link if present */ target?: HTMLAttributeAnchorTarget; }; /** * `import {Menu} from "@chanzuckerberg/eds";` * * A popover that reveals or hides a list of actions. Menu items can contain icons (all should contain one, or none should), and other contents provided by `PopoverListItem`. */ export declare const Menu: { ({ className, ...other }: MenuProps): React.JSX.Element; displayName: string; PlainButton: { ({ className, ...other }: MenuPlainButtonProps): React.JSX.Element; displayName: string; }; Separator: { (props: MenuSeparatorProps): React.JSX.Element; displayName: string; }; Heading: { (props: MenuHeadingProps): React.JSX.Element; displayName: string; }; Section: { (props: MenuSectionProps): React.JSX.Element; displayName: string; }; Button: { ({ children, className, icon, ...other }: MenuButtonProps): React.JSX.Element; displayName: string; }; Items: { ({ anchor, ...other }: MenuItemsProps): React.JSX.Element; displayName: string; }; Item: { ({ children, className, href, onClick, target, icon, isDestructiveAction, isFocused, isDisabled, leadingContent, subLabel, trailingContent, __type, ...other }: MenuItemProps): React.JSX.Element; displayName: string; }; };