UNPKG

708 BTypeScriptView Raw
1import { PopupPosition } from './types';
2export declare const POSITION_TYPES: PopupPosition[];
3declare type CordsType = {
4 top: number;
5 left: number;
6 transform: string;
7 arrowLeft: string;
8 arrowTop: string;
9};
10export declare const getTooltipBoundary: (keepTooltipInside: string | Boolean) => {
11 top: number;
12 left: number;
13 width: number;
14 height: number;
15};
16declare const calculatePosition: (triggerBounding: DOMRect, ContentBounding: DOMRect, position: PopupPosition | PopupPosition[], arrow: boolean, { offsetX, offsetY }: {
17 offsetX: number;
18 offsetY: number;
19}, keepTooltipInside: string | boolean) => CordsType;
20export default calculatePosition;