@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
35 lines (29 loc) • 840 B
TypeScript
import type { Strategy, VirtualElement } from "@floating-ui/dom";
export type ReferenceElement = VirtualElement | Element;
export type OverlayPositioning = Strategy;
export type LogicalPlacement = (typeof placements)[number];
export type FlipPlacement = Exclude<LogicalPlacement, "auto" | "auto-start" | "auto-end">;
export type MenuPlacement = Extract<LogicalPlacement, "top-start" | "top" | "top-end" | "bottom-start" | "bottom" | "bottom-end">;
export const placements: readonly [
"auto",
"auto-start",
"auto-end",
"top",
"top-start",
"top-end",
"bottom",
"bottom-start",
"bottom-end",
"right",
"right-start",
"right-end",
"left",
"left-start",
"left-end",
"leading-start",
"leading",
"leading-end",
"trailing-end",
"trailing",
"trailing-start"
];