UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

47 lines 1.45 kB
import { BoundingBox, Dimensions, InternalPosition, PopoverProps, Rect } from '../interfaces'; interface CalculatedPosition { scrollable?: boolean; internalPosition: InternalPosition; rect: BoundingBox; } export declare const PRIORITY_MAPPING: Record<PopoverProps.Position, InternalPosition[]>; /** * Returns the area of the intersection of passed in rectangles or a null, if there is no intersection */ export declare function intersectRectangles(rectangles: BoundingBox[]): number | null; /** * A functions that returns the correct popover position based on screen dimensions. */ export declare function calculatePosition({ preferredPosition, fixedInternalPosition, trigger, arrow, body, container, viewport, renderWithPortal, allowVerticalOverflow, minVisibleBlockSize }: { preferredPosition: PopoverProps.Position; fixedInternalPosition?: InternalPosition; trigger: BoundingBox; arrow: Dimensions; body: Dimensions; container: BoundingBox; viewport: BoundingBox; renderWithPortal?: boolean; allowVerticalOverflow?: boolean; minVisibleBlockSize?: number; }): CalculatedPosition; export declare function getOffsetDimensions(element: HTMLElement): { offsetHeight: number; offsetWidth: number; }; export declare function getDimensions(element: HTMLElement): { inlineSize: number; blockSize: number; }; export declare function isCenterOutside(child: Rect, parent: Rect): boolean; export {};