@marianmeres/stuic 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,7 @@ export declare class PopoverConfig {
|
|
|
16
16
|
static defaultOptions: Partial<TooltipOptions>;
|
|
17
17
|
}
|
|
18
18
|
export type TooltipLogger = (...args: any[]) => void;
|
|
19
|
+
export type TooltipTrigger = 'hover' | 'focus' | 'click';
|
|
19
20
|
export interface TooltipOptions {
|
|
20
21
|
content: string;
|
|
21
22
|
popover: HTMLElement | null;
|
|
@@ -24,7 +25,7 @@ export interface TooltipOptions {
|
|
|
24
25
|
delay: number;
|
|
25
26
|
class: string;
|
|
26
27
|
arrowClass: string;
|
|
27
|
-
triggers:
|
|
28
|
+
triggers: TooltipTrigger[];
|
|
28
29
|
logger?: TooltipLogger;
|
|
29
30
|
boundaryRoot?: HTMLElement;
|
|
30
31
|
arrowSize: number;
|
|
@@ -195,6 +195,9 @@ export function tooltip(node, initialOptions = {}) {
|
|
|
195
195
|
};
|
|
196
196
|
//
|
|
197
197
|
const destroy = () => {
|
|
198
|
+
// for obscure cases, where parent node might have be removed from DOM
|
|
199
|
+
// before the planned show/hide happens
|
|
200
|
+
_resetDelayTimer();
|
|
198
201
|
if (!div && !arrow && !opts.popover && !storeGet(_isOn))
|
|
199
202
|
return;
|
|
200
203
|
_log('destroy');
|