import type { JSX, ValidComponent } from "@solidjs/web"; import type { BaseUIComponentProps } from "../../internals/types.js"; import { type PopoverAlign, type PopoverSide } from "./popover-positioner-context.js"; export interface PopoverPositionerState { /** Whether the popover is currently open. */ open: boolean; /** The side of the anchor the component is placed on. */ side: PopoverSide; /** The alignment of the component relative to the anchor. */ align: PopoverAlign; /** Whether the anchor element is hidden. */ anchorHidden: boolean; } export interface PopoverPositionerProps extends BaseUIComponentProps<"div", PopoverPositionerState> { /** * Tag/component to render. Defaults to `"div"`. Replaces the * pre-spike `render` prop (axis G). */ as?: ValidComponent; /** * Which side of the trigger to place the popover on. * @default "bottom" */ side?: PopoverSide | undefined; /** * How to align the popover along the chosen side. * @default "center" */ align?: PopoverAlign | undefined; /** * Gap (px) between the trigger and the popover. * @default 0 */ sideOffset?: number | undefined; /** * Shift (px) along the side for finer `start` / `end` alignment. * @default 0 */ alignOffset?: number | undefined; /** * Padding (px) between the arrow element and the positioner's edges. * @default 5 */ arrowPadding?: number | undefined; /** * Padding (px) between the positioner and the collision boundary. * @default 5 */ collisionPadding?: number | undefined; /** * `absolute` (default) or `fixed` CSS positioning strategy. * @default "absolute" */ positionMethod?: "absolute" | "fixed" | undefined; } /** * Positions the popover against the trigger. Renders a `
` element. * * ### React → Solid deviations * * - **No `anchor` prop**. React's `useAnchorPositioning` supports custom * anchor elements / refs / virtual-element functions; the Solid port * anchors to the trigger element exclusively (matches the common-case * usage). Easy to extend later. * - **No `collisionBoundary` prop**. Uses the viewport by default via * `@floating-ui/dom`'s `shift`/`flip` middleware defaults. * - **No `sticky` / `disableAnchorTracking` / `collisionAvoidance`**. The * floating-ui `autoUpdate` loop is always enabled when the popup is * mounted. * - **No `adaptiveOrigin` / viewport integration**. Viewport is not a * ported component. * - **No `useAnchoredPopupScrollLock`**. Modal scroll-lock is deferred — * `modal={true}` still traps focus and blocks outside pointer events via * `FloatingFocusManager` + `useDismiss`, just without scroll locking. * - **No `InternalBackdrop` cutout**. The user-facing `` * still works; the internal non-visible backdrop used to block outside * pointer events during modal mode is skipped. * * `happy-dom` returns 0 for every geometry function, so assertions on the * computed `--anchor-width` / `left` / `top` values are not meaningful. Real * positioning correctness needs browser-level coverage. */ export declare function PopoverPositioner(props: PopoverPositionerProps): JSX.Element; //# sourceMappingURL=popover-positioner.d.ts.map