Utils.d.ts 708 B

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