/** * Positions a top-layer floating element (list, menu, calendar, tooltip, toggletip) next to its anchor. * * The floating element is `position: absolute` in the top layer, so its coordinates are document * coordinates and it scrolls with the page in the same frame — no one-frame lag / jitter, which is * what `position: fixed` + a scroll listener produces. This is Floating UI's default strategy and * what flatpickr (Carbon's date picker) does. core/popup `trackAnchor` re-places it whenever its anchor * moves otherwise (a scrolling ancestor, a layout shift, the visual viewport). */ import { type Placement, type Side } from '../../core/position.js'; import { type PlaceOptions } from '../../core/popup.js'; export type { Align, Placement, Side } from '../../core/position.js'; /** * Places `floating` (position: absolute, top layer) beside `anchor` with core/popup `placePopup`: flipped to the * opposite side when it doesn't fit (keeping its side while open), shifted along the anchor inside the viewport, * hidden while the anchor is out of view, and with `size` the room on its side written as `--ui-available-height` / * `-width` for its max-height. Start/end follow the text direction. Returns the side actually used. */ export declare function placeFloating(anchor: Element, floating: HTMLElement, placement: Placement, gap?: number, options?: Omit): Side; /** * `placeFloating` plus a caret (Carbon popover): writes `data-side` on the floating element and * `--_caret-pos`, the distance along the edge facing the anchor to the anchor's centre, for `caretStyles`. */ export declare function placeWithCaret(anchor: Element, floating: HTMLElement, placement: Placement, gap: number): Side; /** * The caret of a floating box (`.bubble[data-side]` from `placeWithCaret`): a triangle of the box's own * background, 12×6 by default (Carbon `popover-caret-width/height`), overridable with `--_caret-w/h`. */ export declare const caretStyles: import("lit").CSSResult;