1 | import { Disposable, Tooltip } from "../index";
|
2 |
|
3 | export type TooltipPlacement =
|
4 | | "top"
|
5 | | "bottom"
|
6 | | "left"
|
7 | | "right"
|
8 | | "auto"
|
9 | | "auto top"
|
10 | | "auto bottom"
|
11 | | "auto left"
|
12 | | "auto right";
|
13 |
|
14 |
|
15 | export interface TooltipManager {
|
16 |
|
17 | add(
|
18 | target: HTMLElement | JQueryCompatible,
|
19 | options:
|
20 | | {
|
21 | item?: object | undefined;
|
22 | }
|
23 | | ({
|
24 | title?: string | (() => string) | undefined;
|
25 | html?: boolean | undefined;
|
26 | keyBindingCommand?: string | undefined;
|
27 | keyBindingTarget?: HTMLElement | undefined;
|
28 | } & {
|
29 | class?: string | undefined;
|
30 | placement?: TooltipPlacement | (() => TooltipPlacement) | undefined;
|
31 | trigger?: "click" | "hover" | "focus" | "manual" | undefined;
|
32 | delay?: { show: number; hide: number } | undefined;
|
33 | }),
|
34 | ): Disposable;
|
35 |
|
36 | /** Find the tooltips that have been applied to the given element. */
|
37 | findTooltips(target: HTMLElement): Tooltip[];
|
38 | }
|
39 |
|
40 | export interface JQueryCompatible<Element extends Node = HTMLElement> extends Iterable<Element> {
|
41 | jquery: string;
|
42 | }
|
43 |
|
\ | No newline at end of file |