import { PopoverContentProps } from "@radix-ui/react-popover"; import { ComponentProps, ExcludedProps } from "@vitality-ds/system"; import React from "react"; import { valueof } from "../helpers/logic/type-helpers"; import { PopoverRoot } from "./styled"; declare type RadixOnInteractOutsideProp = valueof>; export declare type RadixOnInteractOutsideEvent = Parameters[0]; export declare type PopoverProps = ExcludedProps & ComponentProps & { /** * The element that toggles the popover when clicked */ triggerElement: React.ReactNode; /** * The component that pops out when the popover is open. */ content: React.ReactNode; /** * The controlled open state of the popover. false is closed, true is open. */ isOpen?: boolean; /** * The function run when focus exits the popover's container */ onInteractOutside?: PopoverContentProps["onInteractOutside"]; /** * The preferred side of the anchor to render against when open. Will be reversed when collisions occur. * @default "bottom" */ side?: PopoverContentProps["side"]; /** * The preferred alignment against the anchor. May change when collisions occur * @default "center" */ align?: PopoverContentProps["align"]; /** * Function to run when the escape key is pressed while the popover is open. */ onEscapeKeyDown?: PopoverContentProps["onEscapeKeyDown"]; }; export {};