import { RadiantElement } from '@ecopages/radiant'; import type { RuiPlacement } from '../shared/placement'; export type RuiTooltipProps = { /** Accessible description shown in the tooltip. */ content?: string; /** Placement of the tooltip surface relative to its anchor. Default: `top`. */ placement?: RuiPlacement; /** Delay in ms before showing on hover/focus. Default: `200`. */ delay?: number; }; type RuiTooltipBindings = { content: string; }; /** * `` — a popup that describes a trigger on hover or focus. * * Implements the WAI-ARIA APG Tooltip pattern: the popup has `role="tooltip"` * and the focusable trigger references it with `aria-describedby`. The tooltip * itself never receives focus. * * Event wiring: * - Bubbling events (`focusin` / `focusout`, document `keydown`) use `@onEvent`. * - `pointerenter` / `pointerleave` are bound directly on the host — they do not * bubble, so `@onEvent` delegation cannot see them on the slotted trigger. * * @see https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/ * * @element rui-tooltip * @slot - The trigger element (typically a button or focusable control). * @cssclass rui-tooltip - Root wrapper. * @cssclass rui-tooltip__trigger - Host wrapper for the slotted trigger. * @cssclass rui-tooltip__content - Tooltip surface (`role="tooltip"`); `on-background` fill. */ export declare class RuiTooltip extends RadiantElement { content: string; placement: RuiPlacement; delay: number; tooltipTarget: HTMLElement; /** * Plain (non-reactive) field, not a JSX binding target: `hidden` is toggled * imperatively in `setOpen()` rather than bound, since it flips on every * hover/focus in/out — high-frequency enough that a plain synchronous DOM * write is preferable to routing it through the reactive binding system. */ private open; private showTimer; private hideTimer; private tooltipId; private describedEl; private cleanupFloating; /** * Pointer enter/leave must be host listeners: those events do not bubble, and * `@onEvent` only supports delegated (bubbling) listeners. */ connectedCallback(): void; disconnectedCallback(): void; private clearTimers; private teardownFloating; private getAnchor; private wireTrigger; private attachFloating; onDescribedPropsUpdated(): void; private setOpen; private scheduleShow; private scheduleHide; onDocumentKeydown(event: KeyboardEvent): void; onFocusIn(): void; onFocusOut(event: FocusEvent): void; onPointerEnter(): void; onPointerLeave(): void; render(): import("@ecopages/jsx").JsxRenderable; } export {};