import { type PropType } from "vue"; export type PopperStrategy = "absolute" | "fixed"; export type PopperPlacement = "top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end"; export type PopperSide = "top" | "bottom" | "left" | "right"; export type PopperAlign = "start" | "center" | "end"; export type PopperProps = { /** Reference element the panel is positioned against. */ anchor: HTMLElement | null; /** Controlled open state. When false (or no anchor) nothing renders. */ open?: boolean; /** Wanted placement of the panel relative to the anchor. */ placement?: PopperPlacement; /** Main-axis distance (px) between the anchor and the panel. */ offset?: number; /** Flip to the opposite side when the panel would overflow the viewport. */ flip?: boolean; /** Shift along the cross axis to keep the panel within the viewport. */ shift?: boolean; /** Expose a positioned arrow element. */ arrow?: boolean; /** CSS positioning strategy. */ strategy?: PopperStrategy; /** Render the panel into `document.body` via a Teleport. */ portal?: boolean; /** Optional class applied to the floating panel. */ class?: string; /** Notified whenever the resolved placement changes (after flip). */ onPlacementChange?: (placement: PopperPlacement) => void; /** * (a11y, opt-in) When true, traps keyboard focus inside the panel while it * is open (Tab cycles through focusable children; Shift+Tab cycles backward). * Intended for modal overlays built on top of Popper. Non-modal usage (menus, * tooltips) should leave this false (default) to keep the natural tab order. */ trapFocus?: boolean; /** * (a11y) When true (default when open), pressing Escape calls `onClose` so * the consumer can set `open = false`. Set to false to suppress this behavior. */ closeOnEscape?: boolean; /** * Called when the panel requests closing (Escape key, or future outside-click). * The consumer is responsible for updating `open` in response. */ onClose?: () => void; }; /** Split a placement into its side and (optional) alignment. */ export declare function splitPlacement(placement: PopperPlacement): { side: PopperSide; align: PopperAlign; }; /** Recompose a side + alignment into a placement string. */ export declare function joinPlacement(side: PopperSide, align: PopperAlign): PopperPlacement; export type Rect = { top: number; left: number; right: number; bottom: number; width: number; height: number; }; /** * Pure geometry: compute the panel coordinates (in the chosen strategy's * coordinate space) given the anchor rect, the panel size, and options. * Returns the resolved placement (after flip) and the top/left coordinates, * plus the arrow offset along the main edge. * * Coordinates are viewport-relative; callers add scroll offsets for the * `absolute` strategy. No DOM access here — safe to unit test. */ export declare function computePosition(anchorRect: Rect, panelWidth: number, panelHeight: number, options: { placement: PopperPlacement; offset: number; flip: boolean; shift: boolean; viewportWidth: number; viewportHeight: number; }): { placement: PopperPlacement; top: number; left: number; }; /** * Float a panel next to an anchor element. Positioning is recomputed on open, * scroll, and resize via `computePosition` (pure geometry shared across * frameworks). Renders nothing unless `open` and an `anchor` are provided. * SSR-safe: all DOM access happens inside `onMounted` / watchers. * * A11y: optional `trapFocus` traps keyboard focus inside the panel (Tab/Shift+Tab * cycle, Escape calls `onClose`, focus restored to the pre-open element on close). */ export declare const Popper: import("vue").DefineComponent; default: null; }; open: { type: BooleanConstructor; default: boolean; }; placement: { type: PropType; default: string; }; offset: { type: NumberConstructor; default: number; }; flip: { type: BooleanConstructor; default: boolean; }; shift: { type: BooleanConstructor; default: boolean; }; arrow: { type: BooleanConstructor; default: boolean; }; strategy: { type: PropType; default: string; }; portal: { type: BooleanConstructor; default: boolean; }; class: { type: StringConstructor; default: undefined; }; onPlacementChange: { type: PropType<(placement: PopperPlacement) => void>; default: undefined; }; trapFocus: { type: BooleanConstructor; default: boolean; }; closeOnEscape: { type: BooleanConstructor; default: boolean; }; onClose: { type: PropType<() => void>; default: undefined; }; }>, () => import("vue").VNode | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { placementChange: (_placement: PopperPlacement) => true; }, string, import("vue").PublicProps, Readonly; default: null; }; open: { type: BooleanConstructor; default: boolean; }; placement: { type: PropType; default: string; }; offset: { type: NumberConstructor; default: number; }; flip: { type: BooleanConstructor; default: boolean; }; shift: { type: BooleanConstructor; default: boolean; }; arrow: { type: BooleanConstructor; default: boolean; }; strategy: { type: PropType; default: string; }; portal: { type: BooleanConstructor; default: boolean; }; class: { type: StringConstructor; default: undefined; }; onPlacementChange: { type: PropType<(placement: PopperPlacement) => void>; default: undefined; }; trapFocus: { type: BooleanConstructor; default: boolean; }; closeOnEscape: { type: BooleanConstructor; default: boolean; }; onClose: { type: PropType<() => void>; default: undefined; }; }>> & Readonly<{ onPlacementChange?: ((_placement: PopperPlacement) => any) | undefined; }>, { open: boolean; class: string; shift: boolean; onClose: () => void; offset: number; anchor: HTMLElement | null; flip: boolean; placement: PopperPlacement; closeOnEscape: boolean; arrow: boolean; strategy: PopperStrategy; portal: boolean; onPlacementChange: (placement: PopperPlacement) => void; trapFocus: boolean; }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; //# sourceMappingURL=Popper.d.ts.map