UNPKG

@blueprintjs/table

Version:

Scalable interactive table component

41 lines (40 loc) 1.35 kB
/// <reference types="react" /> export type AnyRect = Rect | DOMRect; /** * A simple object for storing the client bounds of HTMLElements. Since * ClientRects are immutable, this object enables editing and some simple * manipulation methods. */ export declare class Rect { left: number; top: number; width: number; height: number; static ORIGIN: Rect; /** * Returns the smallest Rect that entirely contains the supplied rects */ static union(anyRect0: AnyRect, anyRect1: AnyRect): Rect; /** * Returns a new Rect that subtracts the origin of the second argument * from the first. */ static subtractOrigin(anyRect0: AnyRect, anyRect1: AnyRect): Rect; /** * Returns the CSS properties representing the absolute positioning of * this Rect. */ static style(rect: AnyRect): React.CSSProperties; /** * Given a DOMRect or Rect object, returns a Rect object. */ static wrap(rect: AnyRect): Rect; constructor(left: number, top: number, width: number, height: number); subtractOrigin(anyRect: AnyRect): Rect; union(anyRect: AnyRect): Rect; style(): import("react").CSSProperties; sizeStyle(): React.CSSProperties; containsX(clientX: number): boolean; containsY(clientY: number): boolean; equals(rect: Rect): boolean; }