import React, { FC } from 'react'; import { UseFocusTrapProps } from '../../hooks/useFocusTrap'; import { MotionProps } from 'framer-motion'; export interface DataAttributeProps { [key: `data-${string}`]: string; } export interface PopperPropsStrict { /** * *Caution* This can make unexpected experiences for small screens. * *Warning* Only works when portal={true} * If there isn't enough space on the screen the Popover will be repositioned to the opposite side of the anchor */ autoFlipHorizontally?: boolean; /** * *Warning* Only works when portal={true} * If there isn't enough space on the screen the Popover will be repositioned to the opposite side of the anchor */ autoFlipVertically?: boolean; /** Adds one or more classnames for Popover's overlay element */ className?: string; /** Popover direction relative to the element its apart of */ direction?: 't' | 'tr' | 'tl' | 'r' | 'rt' | 'rb' | 'b' | 'br' | 'bl' | 'l' | 'lt' | 'lb' | 'c'; /** Change the HTML element of the Popover's source element */ el?: 'span' | 'div'; /** Whether the Popper is open or not */ open?: boolean; /** * *Warning* Only works when portal={true} * A handler that is called on every click on any element outside of the anchor element and the stick node */ onClickOutside?: (event?: React.MouseEvent) => void; /** * Renders Popper on document root through createPortal. * Effectively prevents Popper from being clipped by the boundaries of any container. */ portal?: boolean; /** Element wrapped around Popover */ trigger?: React.ReactNode; /** Define the width property of the popover */ width?: number | '100' | 'auto'; /** Adds one or more classnames to Popover's body element */ bodyClassName?: string; /** Adds one or more classname to Popper's outer element */ popperClassName?: string; /** If true, caret will be available for Popover's body */ caret?: caretProps; /** props to control animation of motion component */ animation?: MotionProps; /** offset ammount between popper and reference */ offset?: offset; /** Options passed into useFocusTrap */ focusTrapOptions?: UseFocusTrapProps; /** data-* attributes passed to the portaled div */ portalDataAttributes?: DataAttributeProps; } export interface offset { /** Displaces the popper along the reference element */ skidding?: number; /** Displaces the popper away from, or toward, the reference element in the direction of its placement */ distance?: number; } interface caretProps { /** Adds caret arrow */ show?: boolean; /** Adds one or more classnames to Caret element */ className?: string; } export interface PopperProps extends PopperPropsStrict { /** Unstrict Props */ [propName: string]: any; } export declare const Popper: FC; export {};