import { BasePopoverController } from "./popover"; export interface TooltipOptions { placement: string; } export declare class TooltipController extends BasePopoverController { static targets: never[]; protected popoverSelectorAttribute: string; private boundScheduleShow; private boundHide; private boundHideIfWithin; private boundHideOnEscapeKeyEvent; private boundHideIfNotFocused; private boundClearActiveTimeout; private activeTimeout; /** * Binds mouseover and mouseout events in addition to BasePopoverController.connect */ connect(): void; /** * Unbinds mouse events in addition to BasePopoverController.disconnect */ disconnect(): void; /** * Attempts to show the tooltip popover so long as no other Stacks-managed popover is * present on the page. */ show(dispatcher?: Event | Element | null): void; /** * Sets up a tooltip popover show after a delay. */ scheduleShow(dispatcher?: Event | Element | null): void; /** * Cancels the scheduled tooltip popover display and hides it if already displayed */ scheduleHide(dispatcher?: Event | Element | null): void; /** * Cancels the activeTimeout */ clearActiveTimeout(): void; /** * Applies data-s-tooltip-html-title and title attributes. */ applyTitleAttributes(): HTMLElement | null; /** * Automatically hides the tooltip popover when a Stacks popover is shown anywhere on * the page. */ protected bindDocumentEvents(): void; /** * Unbinds all mouse events */ protected unbindDocumentEvents(): void; /** * Attempts to generate a new tooltip popover from the title attribute if no popover * was present when requested, otherwise throws an error. */ protected generatePopover(): HTMLElement | null; /** * Hides the tooltip if is or is within the event's target. * @param event An event object from s-popover:shown */ private hideIfWithin; /** * Hides the tooltip if the focus is not on the popover element. * @param event A focusout event object from the reference or popover element */ private hideIfNotFocused; private hideOnEscapeKeyEvent; /** * Binds mouse events to show/hide on reference element hover */ private bindKeyboardEvents; /** * Unbinds all mouse events */ private unbindKeyboardEvents; /** * Binds mouse events to show/hide on reference element hover */ private bindMouseEvents; /** * Unbinds all mouse events */ private unbindMouseEvents; /** * Generates an ID for tooltips created with setTooltip. */ private static generateId; } /** * Adds or updates a Stacks tooltip on a given element, initializing the controller if necessary * @param element The element to add a tooltip to. * @param html An HTML string to populate the tooltip with. * @param options Options for rendering the tooltip. */ export declare function setTooltipHtml(element: Element, html: string, options?: TooltipOptions): void; /** * Adds or updates a Stacks tooltip on a given element, initializing the controller if necessary * @param element The element to add a tooltip to. * @param text A plain text string to populate the tooltip with. * @param options Options for rendering the tooltip. */ export declare function setTooltipText(element: Element, text: string, options?: TooltipOptions): void;