import React, { ForwardRefExoticComponent } from 'react'; import { PopperProps } from '../../internal/Popper'; import { PopoverContent, PopoverContentProps, PopoverDivider, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps } from './components'; import { UseFocusTrapProps } from '../../hooks/useFocusTrap'; export interface PopoverPropsStrict { /** If there isn't enough space on the screen the Popover will be repositioned to the opposite side of the anchor */ autoFlipHorizontally?: boolean; /** 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; children?: React.ReactNode; /** 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'; /** Footer for the popover */ footer?: React.ReactElement; /** Basic alignment for footer */ footerAlign?: PopoverFooterProps['align']; /** Header for the popover */ header?: React.ReactElement | string; /** Basic alignment for header */ headerAlign?: PopoverHeaderProps['align']; /** Basic alignment for header */ headerNoPadding?: PopoverHeaderProps['noPadding']; /** Whether the Popover 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?: PopperProps['onClickOutside']; /** Define the overall padding of the popover */ padding?: 's' | 'm' | 'l' | null; /** Adds classnames to Popover's content wrapper */ popoverContentClassName?: string; /** * Renders Popover on document root through createPortal. * Effectively prevents Popover from being clipped by the boundaries of any container. */ portal?: boolean; /** Removes the padding content around the Popover content */ contentNoPadding?: PopoverContentProps['noPadding']; /** Add a specific max-height value to the popover body */ scrollHeight?: PopoverContentProps['contentScrollHeight']; /** Makes corners less rounded */ sharp?: boolean; /** Element wrapped around Popover */ trigger?: React.ReactNode; /** Define the width property of the popover */ width?: 'xs' | 's' | 'm' | 'l' | '100' | 'auto'; /** Adds one or more classnames to Popover's source element */ wrapperClassName?: string; /** Options passed into useFocusTrap */ focusTrapOptions?: UseFocusTrapProps; /** offset ammount between Popover and trigger */ offset?: PopperProps['offset']; /** Props to be passed to the portaled div */ portalDataAttributes?: PopperProps['portalDataAttributes']; } export interface PopoverProps extends PopoverPropsStrict { /** Unstrict Props */ [propName: string]: any; } export interface Popover extends ForwardRefExoticComponent { Header: typeof PopoverHeader; Footer: typeof PopoverFooter; Content: typeof PopoverContent; Divider: typeof PopoverDivider; } export declare const Popover: Popover;