import type { Color, SeverityColors } from '@digdir/designsystemet-types'; import type { HTMLAttributes } from 'react'; import '@digdir/designsystemet-web'; import type { DefaultProps, Placement } from '../../types'; import type { MergeRight } from '../../utilities'; export type PopoverProps = MergeRight, { /** * id to connect the trigger with the popover - required when not using Popover.Context. */ id?: string; /** * Placement of the popover on the trigger. * @default 'top' */ placement?: Placement; /** * When a boolean is provided, the popover will be controlled. * @default undefined */ open?: boolean; /** * Change the background color of the popover. * * @default 'default' */ variant?: 'default' | 'tinted'; /** * Change the color scheme of the popover */ 'data-color'?: Color | SeverityColors; /** * Callback when the popover wants to open. */ onOpen?: () => void; /** * Callback when the popover wants to close. */ onClose?: () => void; /** * Whether to enable auto placement. * @default true */ autoPlacement?: boolean; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * @default false */ asChild?: boolean; }>; /** * Popover component, used to display content in a popover over an element. * * @example with TriggerContext * * Open Popover * * Content * * * * @example without TriggerContext * * * Content * */ export declare const Popover: import("react").ForwardRefExoticComponent, "id" | "data-color" | "variant" | "asChild" | "open" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & { /** * id to connect the trigger with the popover - required when not using Popover.Context. */ id?: string; /** * Placement of the popover on the trigger. * @default 'top' */ placement?: Placement; /** * When a boolean is provided, the popover will be controlled. * @default undefined */ open?: boolean; /** * Change the background color of the popover. * * @default 'default' */ variant?: "default" | "tinted"; /** * Change the color scheme of the popover */ 'data-color'?: Color | SeverityColors; /** * Callback when the popover wants to open. */ onOpen?: () => void; /** * Callback when the popover wants to close. */ onClose?: () => void; /** * Whether to enable auto placement. * @default true */ autoPlacement?: boolean; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * @default false */ asChild?: boolean; } & import("react").RefAttributes>; //# sourceMappingURL=popover.d.ts.map