import type { JSX } from "@solidjs/web"; import { type MaybeAccessor } from "../../internals/maybe-accessor.js"; import { type TooltipHandle } from "../store/tooltip-store.js"; import { type TooltipRootChangeEventDetails, type TooltipRootChangeEventReason, type TooltipRootState } from "../tooltip-root-context.js"; export type { TooltipRootChangeEventDetails, TooltipRootChangeEventReason, TooltipRootState, }; export interface TooltipRootActions { close: () => void; unmount: () => void; } export type TooltipPayloadChildRenderFunction = (ctx: { payload: Payload | undefined; }) => JSX.Element; export interface TooltipRootProps { /** * Controlled open state. When provided (resolved value not * `undefined`), the consumer owns the state — pair with * {@link onOpenChange}. When omitted, the tooltip manages its own open * state (seeded from {@link defaultOpen}), matching React Base UI. */ open?: MaybeAccessor; /** * Initial open state when uncontrolled. Read once at mount. * @default false */ defaultOpen?: MaybeAccessor; /** * Fires on every open/close request (hover, focus, Escape, etc.). * Calling `eventDetails.cancel()` keeps the tooltip's own * (uncontrolled) state unchanged, mirroring React Base UI; controlled * consumers simply don't update their signal. */ onOpenChange?: ((open: boolean, eventDetails: TooltipRootChangeEventDetails) => void) | undefined; onOpenChangeComplete?: ((open: boolean) => void) | undefined; /** @default false */ disabled?: MaybeAccessor; /** * Axis on which to track the cursor position. When set (!= `"none"`), * the tooltip positioner anchors to the cursor rather than to the * trigger's bounding box. Matches React's `trackCursorAxis`. * @default "none" */ trackCursorAxis?: MaybeAccessor<"none" | "x" | "y" | "both" | undefined>; /** * When true, the hover-intent `safePolygon` handler is NOT installed, * so the popup is not considered hoverable — any cursor movement off * the trigger closes the tooltip. Matches React's `disableHoverablePopup`. * @default false */ disableHoverablePopup?: MaybeAccessor; /** * Handle to associate the root with detached ``s. */ handle?: TooltipHandle | undefined; /** @default null */ triggerId?: string | null | undefined; /** Callback-ref variant of React's actionsRef. */ actionsRef?: ((actions: TooltipRootActions | null) => void) | { current: TooltipRootActions | null; } | undefined; children?: JSX.Element | TooltipPayloadChildRenderFunction; } /** * Groups all parts of the tooltip. Does not render its own HTML element. */ export declare function TooltipRoot(props: TooltipRootProps): JSX.Element; //# sourceMappingURL=tooltip-root.d.ts.map