UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

26 lines (25 loc) 1.25 kB
import { Boundary, ClientRectObject, Rect, RootBoundary, Strategy } from '../types'; /** * Get the client inner rect (with borders) */ export declare const getInnerBoundingClientRect: (element: Element, strategy: Strategy) => Rect; export declare const getClientRectFromClippingAncestor: (clippingAncestor: Element | RootBoundary, strategy: Strategy) => ClientRectObject; export declare const hasFixedPositionAncestor: (element: Element, stopNode: Node) => boolean; /** * A "clipping ancestor" is an `overflow` element with the characteristic of * clipping (or hiding) child elements. This returns all clipping ancestors * of the given element up the tree. */ export declare const getClippingElementAncestors: (element: Element) => Array<Element>; /** * Gets the maximum area that the element is visible in due to any number of clipping ancestors. * A "clipping ancestor" is an `overflow` element with the characteristic of * clipping (or hiding) child elements. This returns all clipping ancestors * of the given element up the tree. */ export declare const getClippingRect: ({ element, boundary, rootBoundary, strategy, }: { element: Element; boundary: Boundary; rootBoundary: RootBoundary; strategy: Strategy; }) => Rect;