UNPKG

894 BTypeScriptView Raw
1import { BasePlacement, Placement } from "@popperjs/core";
2/** Converts a full placement to one of the four positions by stripping text after the `-`. */
3export declare function getBasePlacement(placement: Placement): BasePlacement;
4/** Returns true if position is left or right. */
5export declare function isVerticalPlacement(side: BasePlacement): boolean;
6/** Returns the opposite position. */
7export declare function getOppositePlacement(side: BasePlacement): "bottom" | "left" | "right" | "top";
8/** Returns the CSS alignment keyword corresponding to given placement. */
9export declare function getAlignment(placement: Placement): "left" | "right" | "center";
10/** Modifier helper function to compute popper transform-origin based on arrow position */
11export declare function getTransformOrigin(placement: Placement, arrowStyles: {
12 left: string;
13 top: string;
14} | undefined): string;