vue-tippy 6.0.0-alpha.9 → 6.0.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +106 -3
- package/dist/{vue-tippy.cjs.prod.js → vue-tippy.cjs} +1029 -266
- package/dist/vue-tippy.d.ts +698 -29
- package/dist/{vue-tippy.esm-bundler.js → vue-tippy.esm-browser.js} +699 -256
- package/dist/{vue-tippy.global.js → vue-tippy.iife.js} +1030 -267
- package/dist/vue-tippy.iife.prod.js +6 -0
- package/dist/{vue-tippy.esm.js → vue-tippy.mjs} +699 -256
- package/dist/{vue-tippy.cjs.js → vue-tippy.prod.cjs} +713 -266
- package/index.cjs +7 -0
- package/index.js +7 -0
- package/package.json +36 -13
- package/src/components/Tippy.ts +158 -0
- package/src/components/TippySingleton.ts +74 -0
- package/src/composables/index.ts +3 -0
- package/src/composables/useSingleton.ts +44 -0
- package/src/composables/useTippy.ts +255 -0
- package/src/composables/useTippyComponent.ts +25 -0
- package/src/directive/index.ts +89 -0
- package/src/global.d.ts +4 -0
- package/src/index.ts +39 -0
- package/src/plugin/index.ts +18 -0
- package/src/types/index.ts +37 -0
- package/tsconfig.json +31 -0
- package/dist/vue-tippy.global.prod.js +0 -6
package/dist/vue-tippy.d.ts
CHANGED
@@ -1,64 +1,719 @@
|
|
1
|
-
import { Component } from 'vue
|
2
|
-
import { ComponentObjectPropsOptions } from 'vue
|
1
|
+
import { Component } from 'vue';
|
2
|
+
import { ComponentObjectPropsOptions } from 'vue';
|
3
3
|
import { Content } from 'tippy.js';
|
4
4
|
import { CreateSingletonProps } from 'tippy.js';
|
5
5
|
import { DefaultProps } from 'tippy.js';
|
6
|
-
import { Directive } from 'vue
|
6
|
+
import { Directive } from 'vue';
|
7
7
|
import { Instance } from 'tippy.js';
|
8
|
-
import { Plugin as Plugin_2 } from 'vue
|
8
|
+
import { Plugin as Plugin_2 } from 'vue';
|
9
9
|
import { Props } from 'tippy.js';
|
10
|
-
import {
|
10
|
+
import { PropType } from 'vue';
|
11
|
+
import { Ref } from 'vue';
|
12
|
+
import { roundArrow } from 'tippy.js';
|
11
13
|
import tippy from 'tippy.js';
|
12
|
-
import {
|
14
|
+
import { UnwrapNestedRefs } from 'vue';
|
15
|
+
import { VNode } from 'vue';
|
13
16
|
|
14
17
|
export declare const directive: Directive;
|
15
18
|
|
16
19
|
declare const plugin: Plugin_2;
|
17
20
|
export default plugin;
|
21
|
+
export { plugin }
|
22
|
+
export { roundArrow }
|
18
23
|
|
19
24
|
export declare const setDefaultProps: (partialProps: Partial<import("tippy.js").DefaultProps>) => void;
|
20
25
|
|
21
|
-
export declare const Tippy: import("vue
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
}
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
}
|
26
|
+
export declare const Tippy: import("vue").DefineComponent<{
|
27
|
+
to: {
|
28
|
+
type: PropType<string | Element>;
|
29
|
+
};
|
30
|
+
tag: {
|
31
|
+
type: StringConstructor;
|
32
|
+
default: string;
|
33
|
+
};
|
34
|
+
contentTag: {
|
35
|
+
type: StringConstructor;
|
36
|
+
default: string;
|
37
|
+
};
|
38
|
+
contentClass: {
|
39
|
+
type: StringConstructor;
|
40
|
+
default: null;
|
41
|
+
};
|
42
|
+
appendTo: {
|
43
|
+
default: () => Element | "parent" | ((ref: Element) => Element);
|
44
|
+
};
|
45
|
+
aria: {
|
46
|
+
default: () => {
|
47
|
+
content?: "auto" | "describedby" | "labelledby" | null | undefined;
|
48
|
+
expanded?: boolean | "auto" | undefined;
|
49
|
+
};
|
50
|
+
};
|
51
|
+
delay: {
|
52
|
+
default: () => number | [number, number];
|
53
|
+
};
|
54
|
+
duration: {
|
55
|
+
default: () => number | [number, number];
|
56
|
+
};
|
57
|
+
getReferenceClientRect: {
|
58
|
+
default: () => import("tippy.js").GetReferenceClientRect | null;
|
59
|
+
};
|
60
|
+
hideOnClick: {
|
61
|
+
type: (StringConstructor | BooleanConstructor)[];
|
62
|
+
default: () => boolean | "toggle";
|
63
|
+
};
|
64
|
+
ignoreAttributes: {
|
65
|
+
type: BooleanConstructor;
|
66
|
+
default: () => boolean;
|
67
|
+
};
|
68
|
+
interactive: {
|
69
|
+
type: BooleanConstructor;
|
70
|
+
default: () => boolean;
|
71
|
+
};
|
72
|
+
interactiveBorder: {
|
73
|
+
default: () => number;
|
74
|
+
};
|
75
|
+
interactiveDebounce: {
|
76
|
+
default: () => number;
|
77
|
+
};
|
78
|
+
moveTransition: {
|
79
|
+
default: () => string;
|
80
|
+
};
|
81
|
+
offset: {
|
82
|
+
default: () => [number, number] | (({ placement, popper, reference, }: {
|
83
|
+
placement: import("@popperjs/core").Placement;
|
84
|
+
popper: import("@popperjs/core").Rect;
|
85
|
+
reference: import("@popperjs/core").Rect;
|
86
|
+
}) => [number, number]);
|
87
|
+
};
|
88
|
+
onAfterUpdate: {
|
89
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, partialProps: Partial<import("tippy.js").Props>) => void;
|
90
|
+
};
|
91
|
+
onBeforeUpdate: {
|
92
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, partialProps: Partial<import("tippy.js").Props>) => void;
|
93
|
+
};
|
94
|
+
onCreate: {
|
95
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
96
|
+
};
|
97
|
+
onDestroy: {
|
98
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
99
|
+
};
|
100
|
+
onHidden: {
|
101
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
102
|
+
};
|
103
|
+
onHide: {
|
104
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => false | void;
|
105
|
+
};
|
106
|
+
onMount: {
|
107
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
108
|
+
};
|
109
|
+
onShow: {
|
110
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => false | void;
|
111
|
+
};
|
112
|
+
onShown: {
|
113
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
114
|
+
};
|
115
|
+
onTrigger: {
|
116
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
117
|
+
};
|
118
|
+
onUntrigger: {
|
119
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
120
|
+
};
|
121
|
+
onClickOutside: {
|
122
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
123
|
+
};
|
124
|
+
placement: {
|
125
|
+
default: () => import("@popperjs/core").Placement;
|
126
|
+
};
|
127
|
+
plugins: {
|
128
|
+
default: () => import("tippy.js").Plugin<unknown>[];
|
129
|
+
};
|
130
|
+
popperOptions: {
|
131
|
+
default: () => Partial<import("@popperjs/core").Options>;
|
132
|
+
};
|
133
|
+
render: {
|
134
|
+
default: () => ((instance: import("tippy.js").Instance<import("tippy.js").Props>) => {
|
135
|
+
popper: import("tippy.js").PopperElement<import("tippy.js").Props>;
|
136
|
+
onUpdate?: ((prevProps: import("tippy.js").Props, nextProps: import("tippy.js").Props) => void) | undefined;
|
137
|
+
}) | null;
|
138
|
+
};
|
139
|
+
showOnCreate: {
|
140
|
+
type: BooleanConstructor;
|
141
|
+
default: () => boolean;
|
142
|
+
};
|
143
|
+
touch: {
|
144
|
+
type: (StringConstructor | BooleanConstructor | ArrayConstructor)[];
|
145
|
+
default: () => boolean | "hold" | ["hold", number];
|
146
|
+
};
|
147
|
+
trigger: {
|
148
|
+
default: () => string;
|
149
|
+
};
|
150
|
+
triggerTarget: {
|
151
|
+
default: () => Element | Element[] | null;
|
152
|
+
};
|
153
|
+
animateFill: {
|
154
|
+
type: BooleanConstructor;
|
155
|
+
default: () => boolean;
|
156
|
+
};
|
157
|
+
followCursor: {
|
158
|
+
type: (StringConstructor | BooleanConstructor)[];
|
159
|
+
default: () => boolean | "horizontal" | "vertical" | "initial";
|
160
|
+
};
|
161
|
+
inlinePositioning: {
|
162
|
+
type: BooleanConstructor;
|
163
|
+
default: () => boolean;
|
164
|
+
};
|
165
|
+
sticky: {
|
166
|
+
type: (StringConstructor | BooleanConstructor)[];
|
167
|
+
default: () => boolean | "reference" | "popper";
|
168
|
+
};
|
169
|
+
allowHTML: {
|
170
|
+
type: BooleanConstructor;
|
171
|
+
default: () => boolean;
|
172
|
+
};
|
173
|
+
animation: {
|
174
|
+
default: () => string | boolean;
|
175
|
+
};
|
176
|
+
arrow: {
|
177
|
+
default: () => string | boolean | DocumentFragment | SVGElement;
|
178
|
+
};
|
179
|
+
content: {
|
180
|
+
default: () => import("tippy.js").Content;
|
181
|
+
};
|
182
|
+
inertia: {
|
183
|
+
default: () => boolean;
|
184
|
+
};
|
185
|
+
maxWidth: {
|
186
|
+
default: () => string | number;
|
187
|
+
};
|
188
|
+
role: {
|
189
|
+
default: () => string;
|
190
|
+
};
|
191
|
+
theme: {
|
192
|
+
default: () => string;
|
193
|
+
};
|
194
|
+
zIndex: {
|
195
|
+
default: () => number;
|
196
|
+
};
|
197
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
198
|
+
[key: string]: any;
|
199
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "state"[], "state", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
200
|
+
to: {
|
201
|
+
type: PropType<string | Element>;
|
202
|
+
};
|
203
|
+
tag: {
|
204
|
+
type: StringConstructor;
|
205
|
+
default: string;
|
206
|
+
};
|
207
|
+
contentTag: {
|
208
|
+
type: StringConstructor;
|
209
|
+
default: string;
|
210
|
+
};
|
211
|
+
contentClass: {
|
212
|
+
type: StringConstructor;
|
213
|
+
default: null;
|
214
|
+
};
|
215
|
+
appendTo: {
|
216
|
+
default: () => Element | "parent" | ((ref: Element) => Element);
|
217
|
+
};
|
218
|
+
aria: {
|
219
|
+
default: () => {
|
220
|
+
content?: "auto" | "describedby" | "labelledby" | null | undefined;
|
221
|
+
expanded?: boolean | "auto" | undefined;
|
222
|
+
};
|
223
|
+
};
|
224
|
+
delay: {
|
225
|
+
default: () => number | [number, number];
|
226
|
+
};
|
227
|
+
duration: {
|
228
|
+
default: () => number | [number, number];
|
229
|
+
};
|
230
|
+
getReferenceClientRect: {
|
231
|
+
default: () => import("tippy.js").GetReferenceClientRect | null;
|
232
|
+
};
|
233
|
+
hideOnClick: {
|
234
|
+
type: (StringConstructor | BooleanConstructor)[];
|
235
|
+
default: () => boolean | "toggle";
|
236
|
+
};
|
237
|
+
ignoreAttributes: {
|
238
|
+
type: BooleanConstructor;
|
239
|
+
default: () => boolean;
|
240
|
+
};
|
241
|
+
interactive: {
|
242
|
+
type: BooleanConstructor;
|
243
|
+
default: () => boolean;
|
244
|
+
};
|
245
|
+
interactiveBorder: {
|
246
|
+
default: () => number;
|
247
|
+
};
|
248
|
+
interactiveDebounce: {
|
249
|
+
default: () => number;
|
250
|
+
};
|
251
|
+
moveTransition: {
|
252
|
+
default: () => string;
|
253
|
+
};
|
254
|
+
offset: {
|
255
|
+
default: () => [number, number] | (({ placement, popper, reference, }: {
|
256
|
+
placement: import("@popperjs/core").Placement;
|
257
|
+
popper: import("@popperjs/core").Rect;
|
258
|
+
reference: import("@popperjs/core").Rect;
|
259
|
+
}) => [number, number]);
|
260
|
+
};
|
261
|
+
onAfterUpdate: {
|
262
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, partialProps: Partial<import("tippy.js").Props>) => void;
|
263
|
+
};
|
264
|
+
onBeforeUpdate: {
|
265
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, partialProps: Partial<import("tippy.js").Props>) => void;
|
266
|
+
};
|
267
|
+
onCreate: {
|
268
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
269
|
+
};
|
270
|
+
onDestroy: {
|
271
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
272
|
+
};
|
273
|
+
onHidden: {
|
274
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
275
|
+
};
|
276
|
+
onHide: {
|
277
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => false | void;
|
278
|
+
};
|
279
|
+
onMount: {
|
280
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
281
|
+
};
|
282
|
+
onShow: {
|
283
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => false | void;
|
284
|
+
};
|
285
|
+
onShown: {
|
286
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
287
|
+
};
|
288
|
+
onTrigger: {
|
289
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
290
|
+
};
|
291
|
+
onUntrigger: {
|
292
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
293
|
+
};
|
294
|
+
onClickOutside: {
|
295
|
+
default: () => (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
296
|
+
};
|
297
|
+
placement: {
|
298
|
+
default: () => import("@popperjs/core").Placement;
|
299
|
+
};
|
300
|
+
plugins: {
|
301
|
+
default: () => import("tippy.js").Plugin<unknown>[];
|
302
|
+
};
|
303
|
+
popperOptions: {
|
304
|
+
default: () => Partial<import("@popperjs/core").Options>;
|
305
|
+
};
|
306
|
+
render: {
|
307
|
+
default: () => ((instance: import("tippy.js").Instance<import("tippy.js").Props>) => {
|
308
|
+
popper: import("tippy.js").PopperElement<import("tippy.js").Props>;
|
309
|
+
onUpdate?: ((prevProps: import("tippy.js").Props, nextProps: import("tippy.js").Props) => void) | undefined;
|
310
|
+
}) | null;
|
311
|
+
};
|
312
|
+
showOnCreate: {
|
313
|
+
type: BooleanConstructor;
|
314
|
+
default: () => boolean;
|
315
|
+
};
|
316
|
+
touch: {
|
317
|
+
type: (StringConstructor | BooleanConstructor | ArrayConstructor)[];
|
318
|
+
default: () => boolean | "hold" | ["hold", number];
|
319
|
+
};
|
320
|
+
trigger: {
|
321
|
+
default: () => string;
|
322
|
+
};
|
323
|
+
triggerTarget: {
|
324
|
+
default: () => Element | Element[] | null;
|
325
|
+
};
|
326
|
+
animateFill: {
|
327
|
+
type: BooleanConstructor;
|
328
|
+
default: () => boolean;
|
329
|
+
};
|
330
|
+
followCursor: {
|
331
|
+
type: (StringConstructor | BooleanConstructor)[];
|
332
|
+
default: () => boolean | "horizontal" | "vertical" | "initial";
|
333
|
+
};
|
334
|
+
inlinePositioning: {
|
335
|
+
type: BooleanConstructor;
|
336
|
+
default: () => boolean;
|
337
|
+
};
|
338
|
+
sticky: {
|
339
|
+
type: (StringConstructor | BooleanConstructor)[];
|
340
|
+
default: () => boolean | "reference" | "popper";
|
341
|
+
};
|
342
|
+
allowHTML: {
|
343
|
+
type: BooleanConstructor;
|
344
|
+
default: () => boolean;
|
345
|
+
};
|
346
|
+
animation: {
|
347
|
+
default: () => string | boolean;
|
348
|
+
};
|
349
|
+
arrow: {
|
350
|
+
default: () => string | boolean | DocumentFragment | SVGElement;
|
351
|
+
};
|
352
|
+
content: {
|
353
|
+
default: () => import("tippy.js").Content;
|
354
|
+
};
|
355
|
+
inertia: {
|
356
|
+
default: () => boolean;
|
357
|
+
};
|
358
|
+
maxWidth: {
|
359
|
+
default: () => string | number;
|
360
|
+
};
|
361
|
+
role: {
|
362
|
+
default: () => string;
|
363
|
+
};
|
364
|
+
theme: {
|
365
|
+
default: () => string;
|
366
|
+
};
|
367
|
+
zIndex: {
|
368
|
+
default: () => number;
|
369
|
+
};
|
370
|
+
}>> & {
|
371
|
+
onState?: ((...args: any[]) => any) | undefined;
|
372
|
+
}, {
|
373
|
+
content: import("tippy.js").Content;
|
374
|
+
triggerTarget: Element | Element[];
|
375
|
+
getReferenceClientRect: import("tippy.js").GetReferenceClientRect;
|
376
|
+
animateFill: boolean;
|
377
|
+
appendTo: Element | "parent" | ((ref: Element) => Element);
|
378
|
+
aria: {
|
379
|
+
content?: "auto" | "describedby" | "labelledby" | null | undefined;
|
380
|
+
expanded?: boolean | "auto" | undefined;
|
381
|
+
};
|
382
|
+
delay: number | [number, number];
|
383
|
+
duration: number | [number, number];
|
384
|
+
followCursor: string | boolean;
|
385
|
+
hideOnClick: string | boolean;
|
386
|
+
ignoreAttributes: boolean;
|
387
|
+
inlinePositioning: boolean;
|
388
|
+
interactive: boolean;
|
389
|
+
interactiveBorder: number;
|
390
|
+
interactiveDebounce: number;
|
391
|
+
moveTransition: string;
|
392
|
+
offset: [number, number] | (({ placement, popper, reference, }: {
|
393
|
+
placement: import("@popperjs/core").Placement;
|
394
|
+
popper: import("@popperjs/core").Rect;
|
395
|
+
reference: import("@popperjs/core").Rect;
|
396
|
+
}) => [number, number]);
|
397
|
+
placement: import("@popperjs/core").Placement;
|
398
|
+
plugins: import("tippy.js").Plugin<unknown>[];
|
399
|
+
popperOptions: Partial<import("@popperjs/core").Options>;
|
400
|
+
render: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => {
|
401
|
+
popper: import("tippy.js").PopperElement<import("tippy.js").Props>;
|
402
|
+
onUpdate?: ((prevProps: import("tippy.js").Props, nextProps: import("tippy.js").Props) => void) | undefined;
|
403
|
+
};
|
404
|
+
showOnCreate: boolean;
|
405
|
+
sticky: string | boolean;
|
406
|
+
touch: string | boolean | unknown[];
|
407
|
+
trigger: string;
|
408
|
+
onAfterUpdate: (instance: import("tippy.js").Instance<import("tippy.js").Props>, partialProps: Partial<import("tippy.js").Props>) => void;
|
409
|
+
onBeforeUpdate: (instance: import("tippy.js").Instance<import("tippy.js").Props>, partialProps: Partial<import("tippy.js").Props>) => void;
|
410
|
+
onCreate: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
411
|
+
onDestroy: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
412
|
+
onHidden: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
413
|
+
onHide: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => false | void;
|
414
|
+
onMount: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
415
|
+
onShow: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => false | void;
|
416
|
+
onShown: (instance: import("tippy.js").Instance<import("tippy.js").Props>) => void;
|
417
|
+
onTrigger: (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
418
|
+
onUntrigger: (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
419
|
+
onClickOutside: (instance: import("tippy.js").Instance<import("tippy.js").Props>, event: Event) => void;
|
420
|
+
allowHTML: boolean;
|
421
|
+
animation: string | boolean;
|
422
|
+
arrow: string | boolean | DocumentFragment | SVGElement;
|
423
|
+
inertia: boolean;
|
424
|
+
maxWidth: string | number;
|
425
|
+
role: string;
|
426
|
+
theme: string;
|
427
|
+
zIndex: number;
|
428
|
+
tag: string;
|
429
|
+
contentTag: string;
|
430
|
+
contentClass: string;
|
431
|
+
}>;
|
40
432
|
export { tippy }
|
41
433
|
|
42
|
-
export declare type TippyComponent = InstanceType<typeof Tippy
|
434
|
+
export declare type TippyComponent = InstanceType<typeof Tippy> & UnwrapNestedRefs<Pick<ReturnType<typeof useTippy>, 'tippy' | 'refresh' | 'refreshContent' | 'setContent' | 'setProps' | 'destroy' | 'hide' | 'show' | 'disable' | 'enable' | 'unmount' | 'mount' | 'state'>>;
|
43
435
|
|
44
436
|
export declare type TippyContent = Content | VNode | Component | Ref;
|
45
437
|
|
46
438
|
export declare type TippyInstance = Instance | Element | undefined;
|
47
439
|
|
48
|
-
export declare type TippyInstances = Ref<TippyInstance>[] | Ref<TippyInstance[]
|
440
|
+
export declare type TippyInstances = Ref<TippyInstance>[] | Ref<TippyInstance[]> | (() => TippyInstance[]);
|
49
441
|
|
50
|
-
export declare type TippyOptions = Partial<Omit<Props, 'content'> & {
|
442
|
+
export declare type TippyOptions = Partial<Omit<Props, 'content' | 'triggerTarget' | 'getReferenceClientRect'> & {
|
51
443
|
content: TippyContent;
|
444
|
+
triggerTarget: TippyTarget;
|
445
|
+
getReferenceClientRect: null | (() => DOMRect & any);
|
52
446
|
}>;
|
53
447
|
|
54
448
|
export declare interface TippyPluginOptions {
|
55
449
|
directive?: string;
|
56
450
|
component?: string;
|
451
|
+
componentSingleton?: string;
|
57
452
|
defaultProps?: Partial<DefaultProps>;
|
58
453
|
}
|
59
454
|
|
455
|
+
export declare const TippySingleton: import("vue").DefineComponent<ComponentObjectPropsOptions<Record<string, unknown>>, {
|
456
|
+
instances: import("vue").Ref<{
|
457
|
+
clearDelayTimeouts: () => void;
|
458
|
+
destroy: () => void;
|
459
|
+
disable: () => void;
|
460
|
+
enable: () => void;
|
461
|
+
hide: () => void;
|
462
|
+
hideWithInteractivity: (event: MouseEvent) => void;
|
463
|
+
id: number;
|
464
|
+
plugins: {
|
465
|
+
name?: string | undefined;
|
466
|
+
defaultValue?: any;
|
467
|
+
fn: (instance: Instance<any>) => Partial<import("tippy.js").LifecycleHooks<any>>;
|
468
|
+
}[];
|
469
|
+
popper: import("tippy.js").PopperElement<any>;
|
470
|
+
popperInstance: {
|
471
|
+
state: {
|
472
|
+
elements: {
|
473
|
+
reference: Element | {
|
474
|
+
getBoundingClientRect: () => ClientRect | DOMRect;
|
475
|
+
contextElement?: Element | undefined;
|
476
|
+
};
|
477
|
+
popper: HTMLElement;
|
478
|
+
arrow?: HTMLElement | undefined;
|
479
|
+
};
|
480
|
+
options: {
|
481
|
+
placement: import("@popperjs/core").Placement;
|
482
|
+
modifiers: any[];
|
483
|
+
strategy: import("@popperjs/core").PositioningStrategy;
|
484
|
+
onFirstUpdate?: ((arg0: Partial<import("@popperjs/core").State>) => void) | undefined;
|
485
|
+
};
|
486
|
+
placement: import("@popperjs/core").Placement;
|
487
|
+
strategy: import("@popperjs/core").PositioningStrategy;
|
488
|
+
orderedModifiers: {
|
489
|
+
name: any;
|
490
|
+
enabled: boolean;
|
491
|
+
phase: import("@popperjs/core").ModifierPhases;
|
492
|
+
requires?: string[] | undefined;
|
493
|
+
requiresIfExists?: string[] | undefined;
|
494
|
+
fn: (arg0: import("@popperjs/core").ModifierArguments<any>) => void | import("@popperjs/core").State;
|
495
|
+
effect?: ((arg0: import("@popperjs/core").ModifierArguments<any>) => void | (() => void)) | undefined;
|
496
|
+
options?: Partial<any> | undefined;
|
497
|
+
data?: import("@popperjs/core").Obj | undefined;
|
498
|
+
}[];
|
499
|
+
rects: {
|
500
|
+
reference: {
|
501
|
+
width: number;
|
502
|
+
height: number;
|
503
|
+
x: number;
|
504
|
+
y: number;
|
505
|
+
};
|
506
|
+
popper: {
|
507
|
+
width: number;
|
508
|
+
height: number;
|
509
|
+
x: number;
|
510
|
+
y: number;
|
511
|
+
};
|
512
|
+
};
|
513
|
+
scrollParents: {
|
514
|
+
reference: (Element | {
|
515
|
+
innerHeight: number;
|
516
|
+
offsetHeight: number;
|
517
|
+
innerWidth: number;
|
518
|
+
offsetWidth: number;
|
519
|
+
pageXOffset: number;
|
520
|
+
pageYOffset: number;
|
521
|
+
getComputedStyle: typeof getComputedStyle;
|
522
|
+
addEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
523
|
+
removeEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
524
|
+
Element: Element;
|
525
|
+
HTMLElement: HTMLElement;
|
526
|
+
Node: Node;
|
527
|
+
toString: () => "[object Window]";
|
528
|
+
devicePixelRatio: number;
|
529
|
+
visualViewport?: {
|
530
|
+
addEventListener: (type: string, listener: EventListener | EventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
531
|
+
dispatchEvent: (event: Event) => boolean;
|
532
|
+
removeEventListener: (type: string, callback: EventListener | EventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
533
|
+
width: number;
|
534
|
+
height: number;
|
535
|
+
offsetLeft: number;
|
536
|
+
offsetTop: number;
|
537
|
+
scale: number;
|
538
|
+
} | undefined;
|
539
|
+
ShadowRoot: ShadowRoot;
|
540
|
+
} | {
|
541
|
+
addEventListener: (type: string, listener: EventListener | EventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
542
|
+
dispatchEvent: (event: Event) => boolean;
|
543
|
+
removeEventListener: (type: string, callback: EventListener | EventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
544
|
+
width: number;
|
545
|
+
height: number;
|
546
|
+
offsetLeft: number;
|
547
|
+
offsetTop: number;
|
548
|
+
scale: number;
|
549
|
+
})[];
|
550
|
+
popper: (Element | {
|
551
|
+
innerHeight: number;
|
552
|
+
offsetHeight: number;
|
553
|
+
innerWidth: number;
|
554
|
+
offsetWidth: number;
|
555
|
+
pageXOffset: number;
|
556
|
+
pageYOffset: number;
|
557
|
+
getComputedStyle: typeof getComputedStyle;
|
558
|
+
addEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
559
|
+
removeEventListener: (type: any, listener: any, optionsOrUseCapture?: any) => void;
|
560
|
+
Element: Element;
|
561
|
+
HTMLElement: HTMLElement;
|
562
|
+
Node: Node;
|
563
|
+
toString: () => "[object Window]";
|
564
|
+
devicePixelRatio: number;
|
565
|
+
visualViewport?: {
|
566
|
+
addEventListener: (type: string, listener: EventListener | EventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
567
|
+
dispatchEvent: (event: Event) => boolean;
|
568
|
+
removeEventListener: (type: string, callback: EventListener | EventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
569
|
+
width: number;
|
570
|
+
height: number;
|
571
|
+
offsetLeft: number;
|
572
|
+
offsetTop: number;
|
573
|
+
scale: number;
|
574
|
+
} | undefined;
|
575
|
+
ShadowRoot: ShadowRoot;
|
576
|
+
} | {
|
577
|
+
addEventListener: (type: string, listener: EventListener | EventListenerObject | null, options?: boolean | AddEventListenerOptions | undefined) => void;
|
578
|
+
dispatchEvent: (event: Event) => boolean;
|
579
|
+
removeEventListener: (type: string, callback: EventListener | EventListenerObject | null, options?: boolean | EventListenerOptions | undefined) => void;
|
580
|
+
width: number;
|
581
|
+
height: number;
|
582
|
+
offsetLeft: number;
|
583
|
+
offsetTop: number;
|
584
|
+
scale: number;
|
585
|
+
})[];
|
586
|
+
};
|
587
|
+
styles: {
|
588
|
+
[key: string]: Partial<CSSStyleDeclaration>;
|
589
|
+
};
|
590
|
+
attributes: {
|
591
|
+
[key: string]: {
|
592
|
+
[key: string]: string | boolean;
|
593
|
+
};
|
594
|
+
};
|
595
|
+
modifiersData: {
|
596
|
+
[x: string]: any;
|
597
|
+
arrow?: {
|
598
|
+
x?: number | undefined;
|
599
|
+
y?: number | undefined;
|
600
|
+
centerOffset: number;
|
601
|
+
} | undefined;
|
602
|
+
hide?: {
|
603
|
+
isReferenceHidden: boolean;
|
604
|
+
hasPopperEscaped: boolean;
|
605
|
+
referenceClippingOffsets: {
|
606
|
+
top: number;
|
607
|
+
left: number;
|
608
|
+
right: number;
|
609
|
+
bottom: number;
|
610
|
+
};
|
611
|
+
popperEscapeOffsets: {
|
612
|
+
top: number;
|
613
|
+
left: number;
|
614
|
+
right: number;
|
615
|
+
bottom: number;
|
616
|
+
};
|
617
|
+
} | undefined;
|
618
|
+
offset?: {
|
619
|
+
auto?: {
|
620
|
+
y: number;
|
621
|
+
x: number;
|
622
|
+
} | undefined;
|
623
|
+
"auto-start"?: {
|
624
|
+
y: number;
|
625
|
+
x: number;
|
626
|
+
} | undefined;
|
627
|
+
"auto-end"?: {
|
628
|
+
y: number;
|
629
|
+
x: number;
|
630
|
+
} | undefined;
|
631
|
+
top?: {
|
632
|
+
y: number;
|
633
|
+
x: number;
|
634
|
+
} | undefined;
|
635
|
+
bottom?: {
|
636
|
+
y: number;
|
637
|
+
x: number;
|
638
|
+
} | undefined;
|
639
|
+
right?: {
|
640
|
+
y: number;
|
641
|
+
x: number;
|
642
|
+
} | undefined;
|
643
|
+
left?: {
|
644
|
+
y: number;
|
645
|
+
x: number;
|
646
|
+
} | undefined;
|
647
|
+
"top-start"?: {
|
648
|
+
y: number;
|
649
|
+
x: number;
|
650
|
+
} | undefined;
|
651
|
+
"top-end"?: {
|
652
|
+
y: number;
|
653
|
+
x: number;
|
654
|
+
} | undefined;
|
655
|
+
"bottom-start"?: {
|
656
|
+
y: number;
|
657
|
+
x: number;
|
658
|
+
} | undefined;
|
659
|
+
"bottom-end"?: {
|
660
|
+
y: number;
|
661
|
+
x: number;
|
662
|
+
} | undefined;
|
663
|
+
"right-start"?: {
|
664
|
+
y: number;
|
665
|
+
x: number;
|
666
|
+
} | undefined;
|
667
|
+
"right-end"?: {
|
668
|
+
y: number;
|
669
|
+
x: number;
|
670
|
+
} | undefined;
|
671
|
+
"left-start"?: {
|
672
|
+
y: number;
|
673
|
+
x: number;
|
674
|
+
} | undefined;
|
675
|
+
"left-end"?: {
|
676
|
+
y: number;
|
677
|
+
x: number;
|
678
|
+
} | undefined;
|
679
|
+
} | undefined;
|
680
|
+
preventOverflow?: {
|
681
|
+
y: number;
|
682
|
+
x: number;
|
683
|
+
} | undefined;
|
684
|
+
popperOffsets?: {
|
685
|
+
y: number;
|
686
|
+
x: number;
|
687
|
+
} | undefined;
|
688
|
+
};
|
689
|
+
reset: boolean;
|
690
|
+
};
|
691
|
+
destroy: () => void;
|
692
|
+
forceUpdate: () => void;
|
693
|
+
update: () => Promise<Partial<import("@popperjs/core").State>>;
|
694
|
+
setOptions: (setOptionsAction: Partial<import("@popperjs/core").OptionsGeneric<any>> | ((prev: Partial<import("@popperjs/core").OptionsGeneric<any>>) => Partial<import("@popperjs/core").OptionsGeneric<any>>)) => Promise<Partial<import("@popperjs/core").State>>;
|
695
|
+
} | null;
|
696
|
+
props: any;
|
697
|
+
reference: import("tippy.js").ReferenceElement<any>;
|
698
|
+
setContent: (content: import("tippy.js").Content) => void;
|
699
|
+
setProps: (partialProps: Partial<any>) => void;
|
700
|
+
show: () => void;
|
701
|
+
state: {
|
702
|
+
isEnabled: boolean;
|
703
|
+
isVisible: boolean;
|
704
|
+
isDestroyed: boolean;
|
705
|
+
isMounted: boolean;
|
706
|
+
isShown: boolean;
|
707
|
+
};
|
708
|
+
unmount: () => void;
|
709
|
+
}[]>;
|
710
|
+
singleton: import("vue").Ref<import("tippy.js").CreateSingletonInstance<import("tippy.js").CreateSingletonProps<import("tippy.js").Props>> | undefined>;
|
711
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<ComponentObjectPropsOptions<Record<string, unknown>>>>, {}>;
|
712
|
+
|
713
|
+
export declare type TippyTarget = Element | Element[] | Ref<Element | undefined> | Ref<Element[] | undefined> | null;
|
714
|
+
|
60
715
|
export declare function useSingleton(instances: TippyInstances, optionalProps?: Partial<CreateSingletonProps<Props>>): {
|
61
|
-
singleton: import("vue
|
716
|
+
singleton: import("vue").Ref<import("tippy.js").CreateSingletonInstance<CreateSingletonProps<Props>> | undefined>;
|
62
717
|
};
|
63
718
|
|
64
719
|
export declare function useTippy(el: Element | (() => Element) | Ref<Element> | Ref<Element | undefined>, opts?: TippyOptions, settings?: {
|
@@ -76,6 +731,20 @@ export declare function useTippy(el: Element | (() => Element) | Ref<Element> |
|
|
76
731
|
enable: () => void;
|
77
732
|
unmount: () => void;
|
78
733
|
mount: () => void;
|
734
|
+
state: Ref<{
|
735
|
+
isEnabled: boolean;
|
736
|
+
isVisible: boolean;
|
737
|
+
isDestroyed: boolean;
|
738
|
+
isMounted: boolean;
|
739
|
+
isShown: boolean;
|
740
|
+
}>;
|
741
|
+
};
|
742
|
+
|
743
|
+
export declare function useTippyComponent(opts?: TippyOptions, children?: any): {
|
744
|
+
instance: import("vue").Ref<TippyComponent | undefined>;
|
745
|
+
TippyComponent: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
746
|
+
[key: string]: any;
|
747
|
+
}>;
|
79
748
|
};
|
80
749
|
|
81
750
|
export { }
|