import type { CSSProperties, HTMLAttributes, KeyboardEventHandler, ReactNode, Ref, RefObject } from 'react';
import type { PopupAlign, PopupPlacement } from './helpers';
export type PositionsType = {
arrowLeft: number;
arrowTop: number;
arrowTransform: string;
placement: string;
rotate: number;
popupInitialPosition: string;
popupPosition: string;
};
type PopupRole = 'dialog' | 'tooltip' | 'popup' | (string & object);
type PopupProps = {
/**
* Id is automatically generated if not set. It is used for associating popup wrapper with popup portal.
*/
id?: string;
children: ReactNode | ((renderProps: {
className?: string;
onBlur: () => void;
onFocus: () => void;
onPointerEnter: () => void;
onPointerLeave: () => void;
ref: RefObject;
}) => ReactNode);
maxWidth?: number | string;
/**
* `auto` placement will change the position of the popup if it doesn't fit in the viewport.
*/
placement?: PopupPlacement;
/**
* Align the popup to the start or center of the children.
*/
align?: PopupAlign;
/**
* Content of the popup, preferably text inside.
*/
text?: ReactNode;
className?: string;
/**
* It will add `width: 100%` to the popup container.
*/
containerFullWidth?: boolean;
/**
* It will add `height: 100%` to the popup container.
*/
containerFullHeight?: boolean;
/**
* It will force display popup. This can be useful if you need to always display the popup without hover needed.
*/
visible?: boolean;
innerRef?: Ref;
role?: PopupRole;
'data-testid'?: string;
hasArrow?: boolean;
onClose?: () => void;
tabIndex?: number;
onKeyDown?: KeyboardEventHandler;
'aria-haspopup'?: HTMLAttributes['aria-haspopup'];
hideOnClickOutside?: boolean;
/**
* If you set debounceTime to false, the popup will not debounce the hover event and will be displayed instantly.
* If set to 0 it will disable debounce.
*/
debounceDelay?: number;
/**
* If you set a max height keep in mind that the animation is disabled, or it will not work properly on some browsers.
*/
maxHeight?: string | number;
/**
* Will remove the animation on the popup if set to false.
*/
disableAnimation?: boolean;
/**
* By default, the portal target is children container or document.body if children is a function. You can override this
* behavior by setting a portalTarget prop.
*/
portalTarget?: HTMLElement;
/**
* If you set this to true, the popup will be rendered in the DOM only when it is visible.
* When set to false, the popup will always be rendered in the DOM. By default this value is set to `true`, if for some
* reason you need to disable it, you can set it to `false`.
*/
dynamicDomRendering?: boolean;
style?: CSSProperties;
};
/**
* @experimental This component is experimental and may be subject to breaking changes in the future.
*/
export declare const Popup: import("react").ForwardRefExoticComponent>;
export {};
//# sourceMappingURL=index.d.ts.map