import type { ReactNode, RefObject } from 'react'; import { type PopoverProps as RACPopoverProps } from 'react-aria-components'; import type { AriaLabelingProps, CommonProps } from '../types.js'; export interface PopoverRootProps { /** The popover trigger with its associated popover. Provide the trigger as the first child, and the popover as the second child. */ children: ReactNode; /** Whether the popover is open (controlled). */ isOpen?: boolean; /** Whether the popover is open by default (uncontrolled). */ defaultOpen?: boolean; /** Handler that is called when the popover's open state changes. */ onOpenChange?: (isOpen: boolean) => void; } /** * Encapsulates a popover trigger and its associated popover. * The trigger can be any Cimpress UI button, and the popover will be displayed when the trigger is activated. */ export declare function PopoverRoot(props: PopoverRootProps): import("react/jsx-runtime").JSX.Element; export declare namespace PopoverRoot { var displayName: string; } export interface PopoverRenderProps { /** Closes the popover when called. */ close: () => void; } export interface PopoverProps extends CommonProps, AriaLabelingProps, Pick { /** The contents of the popover. A function may be provided to access a function to close the popover. */ children: ReactNode | ((renderProps: PopoverRenderProps) => ReactNode); /** The title of the popover. */ title?: string; /** * Whether the popover is open (controlled). * If using `PopoverRoot`, this prop has no effect - provide `isOpen` to `PopoverRoot` instead. */ isOpen?: boolean; /** * Whether the popover is open by default (uncontrolled). * If using `PopoverRoot`, this prop has no effect - provide `defaultOpen` to `PopoverRoot` instead. */ defaultOpen?: boolean; /** * Handler that is called when the popover's open state changes. * If using `PopoverRoot`, this prop has no effect - provide `onOpenChange` to `PopoverRoot` instead. */ onOpenChange?: (isOpen: boolean) => void; /** * The ref for the element which the popover positions itself with respect to. * When used within `PopoverRoot`, this is set automatically. Provide `triggerRef` only when `Popover` is used standalone. */ triggerRef?: RefObject; } /** * Displays an overlay element positioned relative to a trigger. * * See [popover usage guidelines](https://ui.cimpress.io/components/popover/). */ declare const _Popover: (props: PopoverProps & import("react").RefAttributes) => import("react").JSX.Element | null; export { _Popover as Popover }; //# sourceMappingURL=popover.d.ts.map