import React, { ElementType, MutableRefObject, Ref, MouseEventHandler } from 'react'; import { Props } from '../../types.js'; import { PropsForFeatures, HasDisplayName, RefProp } from '../../utils/render.js'; type MouseEvent = Parameters>[0]; declare let DEFAULT_POPOVER_TAG: "div"; interface PopoverRenderPropArg { open: boolean; close(focusableElement?: HTMLElement | MutableRefObject | MouseEvent): void; } export type PopoverProps = Props; declare function PopoverFn(props: PopoverProps, ref: Ref): JSX.Element; declare let DEFAULT_BUTTON_TAG: "button"; interface ButtonRenderPropArg { open: boolean; } type ButtonPropsWeControl = 'aria-controls' | 'aria-expanded'; export type PopoverButtonProps = Props; declare function ButtonFn(props: PopoverButtonProps, ref: Ref): JSX.Element; declare let DEFAULT_OVERLAY_TAG: "div"; interface OverlayRenderPropArg { open: boolean; } type OverlayPropsWeControl = 'aria-hidden'; declare let OverlayRenderFeatures: number; export type PopoverOverlayProps = Props & PropsForFeatures; declare function OverlayFn(props: PopoverOverlayProps, ref: Ref): React.ReactElement> | null; declare let DEFAULT_PANEL_TAG: "div"; interface PanelRenderPropArg { open: boolean; close: (focusableElement?: HTMLElement | MutableRefObject) => void; } declare let PanelRenderFeatures: number; type PanelPropsWeControl = 'tabIndex'; export type PopoverPanelProps = Props & { focus?: boolean; }>; declare function PanelFn(props: PopoverPanelProps, ref: Ref): JSX.Element; declare let DEFAULT_GROUP_TAG: "div"; interface GroupRenderPropArg { } export type PopoverGroupProps = Props; declare function GroupFn(props: PopoverGroupProps, ref: Ref): JSX.Element; interface ComponentPopover extends HasDisplayName { (props: PopoverProps & RefProp): JSX.Element; } interface ComponentPopoverButton extends HasDisplayName { (props: PopoverButtonProps & RefProp): JSX.Element; } interface ComponentPopoverOverlay extends HasDisplayName { (props: PopoverOverlayProps & RefProp): JSX.Element; } interface ComponentPopoverPanel extends HasDisplayName { (props: PopoverPanelProps & RefProp): JSX.Element; } interface ComponentPopoverGroup extends HasDisplayName { (props: PopoverGroupProps & RefProp): JSX.Element; } export declare let Popover: ComponentPopover & { Button: ComponentPopoverButton; Overlay: ComponentPopoverOverlay; Panel: ComponentPopoverPanel; Group: ComponentPopoverGroup; }; export {};