import React from "react"; import { type PopoverMenuContextProps } from "./contexts"; import { TagProps } from "../utils/helpers/tags"; interface ListProps { $size: PopoverMenuContextProps["size"]; } export declare const List: import("styled-components").StyledComponent<"ul", any, ListProps, never>; interface PopoverControlProps { "aria-haspopup": "listbox" | "menu"; "aria-controls"?: string; "aria-expanded"?: boolean; role?: string; "aria-activedescendant"?: string; } type FocusableHandle = HTMLElement; export interface PopoverMenuProps extends TagProps { /** The content of the popover menu */ children: React.ReactNode; /** Whether the popover menu is open or not */ open: boolean; /** The element that the popover menu is anchored to */ popoverControl?: (ref: React.RefObject, props: PopoverControlProps) => React.ReactNode; size?: PopoverMenuContextProps["size"]; /** Placement of the popover menu */ placement?: "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end"; /** Middleware for the popover menu */ middleware?: typeof menuPopoverMiddleware; /** Ref for the submenu control element */ submenuControlRef?: React.RefObject; /** id applied to the outer wrapper element (e.g. for aria-controls) */ id?: string; /** Blur handler for the outer wrapper element */ onBlur?: React.FocusEventHandler; /** Callback when the popover menu is opened */ onOpen: () => void; /** Callback when the popover menu is closed */ onClose: (e?: Event, value?: string) => void; /** Set the custom width of the menu */ width?: string; /** Aria labelledby for the listbox */ listboxAriaLabelledBy?: string; } declare const menuPopoverMiddleware: (width?: string) => { name: string; options?: any; fn: (state: import("@floating-ui/dom").MiddlewareState) => import("@floating-ui/core").MiddlewareReturn | Promise; }[]; declare const PopoverMenu: ({ children, open, popoverControl, size, placement, onOpen, onClose, width, listboxAriaLabelledBy, ...rest }: PopoverMenuProps) => React.JSX.Element; export default PopoverMenu;