import * as React from "react"; import { type PopperProps } from "../Popper"; import type { MergeElementProps } from "../typings"; interface MenuBaseProps { /** The content of the component. */ children?: React.ReactNode; /** * An HTML element. * It's used to set the position of the menu. */ anchorNodeReference: React.RefObject; /** * Append to the classNames applied to the component so you can override or * extend the styles. */ className?: string; /** * The menu positioning alignment. * @default "start" */ alignment?: PopperProps["alignment"]; /** * The `min-width` css property of the menu. */ minWidth?: "anchorWidth" | number; /** * The `max-width` css property of the menu. */ maxWidth?: "anchorWidth" | number; /** * The `placeholder` property of the search field. */ searchPlaceholder?: string; /** * The empty statement text when search results are empty. */ searchEmptyStatementText?: string; /** * If `true`, the menu will be disabled. * @default false */ disabled?: boolean; /** * If `true`, the menu will be searchable. * @default false */ searchable?: boolean; /** * If `true`, the menu will block the page's scrolling. * @default false */ preventPageScrolling?: boolean; /** * If `true`, the menu will appear denser. * @default false */ dense?: boolean; /** * If `true`, the menu will be open. * @default false */ open?: boolean; /** * The Callback fires when the menu has opened. */ onOpen?: () => void; /** * The Callback fires when the menu has closed. */ onClose?: () => void; /** * The callback fires when the `Escape` key is released. */ onEscapeKeyDown?: (event: KeyboardEvent) => void; /** * The Callback fires when user has clicked outside of the menu. */ onOutsideClick?: (event: MouseEvent) => void; /** * The Callback fires when the user has clicked, * and determines whether the click occured outside of the menu or not. * * It only fires when the menu is open! */ outsideClickDetector?: (event: MouseEvent) => boolean; } export declare type MenuProps = MergeElementProps<"div", MenuBaseProps>; declare type Component = { (props: MenuProps): React.ReactElement | null; propTypes?: React.WeakValidationMap | undefined; displayName?: string | undefined; }; declare const Menu: Component; export default Menu;