import type { ArrowPosition, FloatingAxesOffsets, FloatingPosition, FloatingStrategy } from "./Popover.types"; import type { PortalProps } from "../Portal"; import type { TransitionProps } from "../Transition"; import type { PopoverMiddlewares, PopoverWidth } from "./Popover.types"; import { PopoverDropdown } from "./PopoverDropdown/PopoverDropdown"; import { PopoverTarget } from "./PopoverTarget/PopoverTarget"; import type { ThemeColor, ThemeRadius, ThemeShadow } from "../theme.types"; export interface PopoverProps { /** id base to create accessibility connections */ id?: string; /** If set, popover dropdown will not be rendered */ disabled?: boolean; /** Dropdown `z-index` * @default 50 */ zIndex?: string | number; /** Determines whether dropdown and target elements should have accessible roles * @default true */ withRoles?: boolean; /** Key of `theme.radius` or any valid CSS value to set border-radius * @default "md" */ radius?: ThemeRadius; /** Key of `theme.shadows` or any other valid CSS `box-shadow` value * @default "md" */ shadow?: ThemeShadow; /** `Popover.Target` and `Popover.Dropdown` components */ children?: React.ReactNode; /** Determines whether focus should be trapped within dropdown * @default false */ trapFocus?: boolean; /** Determines whether dropdown should be closed when `Escape` key is pressed * @default true */ closeOnEscape?: boolean; /** Determines whether dropdown should be closed on outside clicks * @default true */ closeOnClickOutside?: boolean; /** Events that trigger outside clicks * @default["mousedown", "touchstart"] */ clickOutsideEvents?: string[]; /** Determines whether dropdown should be rendered within the `Portal` * @default true */ withinPortal?: boolean; /** Props to pass down to the `Portal` when `withinPortal` is true */ portalProps?: Omit; /** If set dropdown will not be unmounted from the DOM when it is hidden, `display: none` styles will be added instead */ keepMounted?: boolean; /** Determines whether focus should be automatically returned to control when dropdown closes * @default false */ returnFocus?: boolean; /** * background color of dropdown and arrow, default 'bg-base-100' */ dropdownColor?: ThemeColor; /** Dropdown position relative to the target element * @default "bottom" */ position?: FloatingPosition; /** Called when dropdown position changes */ onPositionChange?: (position: FloatingPosition) => void; /** `useEffect` dependencies to force update dropdown position * @default [] */ positionDependencies?: any[]; /** Offset of the dropdown element * @default 8 */ offset?: number | FloatingAxesOffsets; /** Props passed down to the `Transition` component that used to animate dropdown presence, use to configure duration and animation type * @default{duration: 150, transition: 'fade'} */ transitionProps?: Omit; /** Dropdown width, or `'target'` to make dropdown width the same as target element * @default "max-content" */ width?: PopoverWidth; /** Floating ui middlewares to configure position handling * @default{ flip: true, shift: true, inline: false } */ middlewares?: PopoverMiddlewares; /** Determines whether component should have an arrow * @default false */ withArrow?: boolean; /** Arrow size in px * @default 7 */ arrowSize?: number; /** Arrow offset in px * @default 10 */ arrowOffset?: number; /** Arrow `border-radius` in px * @default 0 */ arrowRadius?: number; /** Arrow position * @default "side" */ arrowPosition?: ArrowPosition; /** Changes floating ui [position strategy](https://floating-ui.com/docs/usefloating#strategy) * @default "absolute" */ floatingStrategy?: FloatingStrategy; /** Controlled dropdown opened state */ opened?: boolean; /** Initial opened state for uncontrolled component */ defaultOpened?: boolean; /** Called with current state when dropdown opens or closes */ onChange?: (opened: boolean) => void; /** Called when dropdown closes */ onClose?: () => void; /** Called when dropdown opens */ onOpen?: () => void; } export declare function Popover(props: PopoverProps): import("react").JSX.Element; export declare namespace Popover { var Target: typeof PopoverTarget; var Trigger: typeof PopoverTarget; var Dropdown: typeof PopoverDropdown; }