@progress/kendo-react-tooltip 13.3.0 → 13.4.0-develop.2
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.
- package/dist/cdn/js/kendo-react-tooltip.js +1 -1
- package/index.d.mts +20 -842
- package/index.d.ts +20 -842
- package/package-metadata.d.ts +12 -0
- package/package-metadata.mjs +13 -0
- package/package.json +10 -4
- package/popover/Popover.d.ts +22 -0
- package/popover/PopoverActionsBar.d.ts +26 -0
- package/popover/interfaces/Align.d.ts +31 -0
- package/popover/interfaces/PopoverActionsBarProps.d.ts +34 -0
- package/popover/interfaces/PopoverAnimation.d.ts +12 -0
- package/popover/interfaces/PopoverCloseEvent.d.ts +17 -0
- package/popover/interfaces/PopoverCollision.d.ts +21 -0
- package/popover/interfaces/PopoverCollisionType.d.ts +17 -0
- package/popover/interfaces/PopoverKeyDownEvent.d.ts +21 -0
- package/popover/interfaces/PopoverMargin.d.ts +21 -0
- package/popover/interfaces/PopoverOffset.d.ts +21 -0
- package/popover/interfaces/PopoverOpenEvent.d.ts +17 -0
- package/popover/interfaces/PopoverPosition.d.ts +16 -0
- package/popover/interfaces/PopoverPositionEvent.d.ts +25 -0
- package/popover/interfaces/PopoverPositionMode.d.ts +12 -0
- package/popover/interfaces/PopoverProps.d.ts +258 -0
- package/popover/utils.d.ts +19 -0
- package/tooltip/Tooltip.d.ts +111 -0
- package/tooltip/TooltipProps.d.ts +257 -0
- package/tooltip/events.d.ts +38 -0
- package/tooltip/utils.d.ts +46 -0
package/index.d.ts
CHANGED
|
@@ -5,845 +5,23 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const PopoverActionsBar: React_2.ForwardRefExoticComponent<PopoverActionsBarProps & React_2.RefAttributes<PopoverActionsBarHandle | null>>;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) callback of the PopoverActionBar component.
|
|
32
|
-
*/
|
|
33
|
-
export declare interface PopoverActionsBarHandle {
|
|
34
|
-
/**
|
|
35
|
-
* The props of the PopoverActionsBar.
|
|
36
|
-
*/
|
|
37
|
-
props: PopoverActionsBarProps;
|
|
38
|
-
/**
|
|
39
|
-
* The current element or `null` if there is none.
|
|
40
|
-
*/
|
|
41
|
-
element: HTMLDivElement | null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Represents the props of the [KendoReact PopoverActionsBar](https://www.telerik.com/kendo-react-ui/components/tooltip/api/popoveractionsbar) component.
|
|
46
|
-
*/
|
|
47
|
-
export declare interface PopoverActionsBarProps {
|
|
48
|
-
/**
|
|
49
|
-
* Sets the horizontal alignment of the PopoverActionsBar buttons.
|
|
50
|
-
*
|
|
51
|
-
* The possible values are:
|
|
52
|
-
* * `start`
|
|
53
|
-
* * `center`
|
|
54
|
-
* * `end`
|
|
55
|
-
* * `stretched` (default)
|
|
56
|
-
*/
|
|
57
|
-
alignment?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Sets the orientation of the PopoverActionsBar buttons.
|
|
60
|
-
*
|
|
61
|
-
* The possible values are:
|
|
62
|
-
* * `horizontal` (default)
|
|
63
|
-
* * `vertical`
|
|
64
|
-
*/
|
|
65
|
-
orientation?: string;
|
|
66
|
-
/**
|
|
67
|
-
* @hidden
|
|
68
|
-
*/
|
|
69
|
-
children?: React.ReactNode;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The animation settings of the Popover.
|
|
74
|
-
*/
|
|
75
|
-
export declare type PopoverAnimation = PopupAnimation;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Represents the object of the `Close` Popover event.
|
|
79
|
-
*/
|
|
80
|
-
export declare interface PopoverCloseEvent {
|
|
81
|
-
/**
|
|
82
|
-
* An event target.
|
|
83
|
-
*/
|
|
84
|
-
target: PopoverHandle;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Defines the horizontal and vertical collision behavior of the Popover.
|
|
89
|
-
*/
|
|
90
|
-
export declare interface PopoverCollision {
|
|
91
|
-
/**
|
|
92
|
-
* Defines the horizontal collision behavior of the Popover.
|
|
93
|
-
*/
|
|
94
|
-
horizontal: PopoverCollisionType;
|
|
95
|
-
/**
|
|
96
|
-
* Defines the vertical collision behavior of the Popover.
|
|
97
|
-
*/
|
|
98
|
-
vertical: PopoverCollisionType;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Defines the possible collision behavior when the Popover is not fully visible.
|
|
103
|
-
*
|
|
104
|
-
* The available options are:
|
|
105
|
-
* - `fit`—Moves the Popover horizontally until it is fully displayed in the viewport.
|
|
106
|
-
* - `flip`—Flips the Popover position based on the origin and the position properties.
|
|
107
|
-
* - `none`—The Popover is rendered at its original position. Usable when the Popover is focused on open and the page is scrolled to it.
|
|
108
|
-
*/
|
|
109
|
-
export declare type PopoverCollisionType = CollisionType;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Represents the Object which is passed to the [`ref`](https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom) callback of the Popover component.
|
|
113
|
-
*/
|
|
114
|
-
export declare interface PopoverHandle {
|
|
115
|
-
/**
|
|
116
|
-
* The props of the Popover.
|
|
117
|
-
*/
|
|
118
|
-
props: PopoverProps;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Represents the object of the `KeyDown` Popover event.
|
|
123
|
-
*/
|
|
124
|
-
export declare interface PopoverKeyDownEvent {
|
|
125
|
-
/**
|
|
126
|
-
* An event target.
|
|
127
|
-
*/
|
|
128
|
-
target: PopoverHandle;
|
|
129
|
-
/**
|
|
130
|
-
* A boolean value that indicates whether the Popover is visible.
|
|
131
|
-
*/
|
|
132
|
-
show?: boolean;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Defines the horizontal and the vertical margin offset of the component.
|
|
137
|
-
*/
|
|
138
|
-
export declare interface PopoverMargin extends Margin {
|
|
139
|
-
/**
|
|
140
|
-
* Defines the possible horizontal margin value.
|
|
141
|
-
*/
|
|
142
|
-
horizontal: number;
|
|
143
|
-
/**
|
|
144
|
-
* Defines the possible vertical margin value.
|
|
145
|
-
*/
|
|
146
|
-
vertical: number;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* The offset position of the Popover.
|
|
151
|
-
*/
|
|
152
|
-
export declare interface PopoverOffset extends Offset {
|
|
153
|
-
/**
|
|
154
|
-
* Defines the top position of the Popover.
|
|
155
|
-
*/
|
|
156
|
-
top: number;
|
|
157
|
-
/**
|
|
158
|
-
* Defines the left position of the Popover.
|
|
159
|
-
*/
|
|
160
|
-
left: number;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Represents the object of the `Open` Popover event.
|
|
165
|
-
*/
|
|
166
|
-
export declare interface PopoverOpenEvent {
|
|
167
|
-
/**
|
|
168
|
-
* An event target.
|
|
169
|
-
*/
|
|
170
|
-
target: PopoverHandle;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* The position of the Popover.
|
|
175
|
-
* The available options are:
|
|
176
|
-
* - `top`
|
|
177
|
-
* - `left`
|
|
178
|
-
* - `bottom`
|
|
179
|
-
* - `right`
|
|
180
|
-
*/
|
|
181
|
-
export declare type PopoverPosition = 'top' | 'left' | 'bottom' | 'right';
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Represents the object of the `Position` Popover event.
|
|
185
|
-
*/
|
|
186
|
-
export declare interface PopoverPositionEvent {
|
|
187
|
-
/**
|
|
188
|
-
* An event target.
|
|
189
|
-
*/
|
|
190
|
-
target: PopoverHandle;
|
|
191
|
-
/**
|
|
192
|
-
* Indicates if the position is fitted.
|
|
193
|
-
*/
|
|
194
|
-
fitted: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Indicates if the position is flipped.
|
|
197
|
-
*/
|
|
198
|
-
flipped: boolean;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* The type which defines all possible position modes of the Popover.
|
|
203
|
-
*/
|
|
204
|
-
export declare type PopoverPositionMode = PositionMode;
|
|
205
|
-
|
|
206
|
-
export declare interface PopoverProps {
|
|
207
|
-
/**
|
|
208
|
-
* Set the focus the Popover container automatically when mounted.
|
|
209
|
-
*
|
|
210
|
-
* @default true
|
|
211
|
-
*
|
|
212
|
-
* @example
|
|
213
|
-
* ```jsx
|
|
214
|
-
* <Popover autoFocus={false} />
|
|
215
|
-
* ```
|
|
216
|
-
*/
|
|
217
|
-
autoFocus?: boolean;
|
|
218
|
-
/**
|
|
219
|
-
* Specifies the title of the Popover component.
|
|
220
|
-
* Can be a string or JSX content.
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* ```jsx
|
|
224
|
-
* <Popover title="Popover Title" />
|
|
225
|
-
* ```
|
|
226
|
-
*/
|
|
227
|
-
title?: React.ReactNode;
|
|
228
|
-
/**
|
|
229
|
-
* Specifies the position of the Popover relative to the anchor or offset.
|
|
230
|
-
* Accepts predefined position values.
|
|
231
|
-
*
|
|
232
|
-
* @default "top"
|
|
233
|
-
*
|
|
234
|
-
* @example
|
|
235
|
-
* ```jsx
|
|
236
|
-
* <Popover position="top" />
|
|
237
|
-
* ```
|
|
238
|
-
*/
|
|
239
|
-
position?: PopoverPosition;
|
|
240
|
-
/**
|
|
241
|
-
* Controls the visibility of the Popover callout (arrow).
|
|
242
|
-
* If set to `false`, the callout will not be rendered.
|
|
243
|
-
*
|
|
244
|
-
* @default true
|
|
245
|
-
*
|
|
246
|
-
* @example
|
|
247
|
-
* ```jsx
|
|
248
|
-
* <Popover callout={false} />
|
|
249
|
-
* ```
|
|
250
|
-
*/
|
|
251
|
-
callout?: boolean;
|
|
252
|
-
/**
|
|
253
|
-
* Configures the animation behavior of the Popover.
|
|
254
|
-
* Accepts a boolean or a configuration object.
|
|
255
|
-
*
|
|
256
|
-
* @example
|
|
257
|
-
* ```jsx
|
|
258
|
-
* <Popover animate={true} />
|
|
259
|
-
* ```
|
|
260
|
-
*/
|
|
261
|
-
animate?: boolean | PopoverAnimation;
|
|
262
|
-
/**
|
|
263
|
-
* Specifies the element to be used as the anchor for the Popover.
|
|
264
|
-
* The Popover opens relative to this element.
|
|
265
|
-
*
|
|
266
|
-
* @example
|
|
267
|
-
* ```jsx
|
|
268
|
-
* <Popover anchor={document.getElementById('anchor')} />
|
|
269
|
-
* ```
|
|
270
|
-
*/
|
|
271
|
-
anchor?: HTMLElement | null;
|
|
272
|
-
/**
|
|
273
|
-
* Defines the container to which the Popover will be appended.
|
|
274
|
-
* Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
|
|
275
|
-
* If set to `null`, the Popover will not use React Portal.
|
|
276
|
-
*
|
|
277
|
-
* @example
|
|
278
|
-
* ```jsx
|
|
279
|
-
* <Popover appendTo={document.getElementById('container')} />
|
|
280
|
-
* ```
|
|
281
|
-
*/
|
|
282
|
-
appendTo?: HTMLElement | null;
|
|
283
|
-
/**
|
|
284
|
-
* Configures the collision behavior of the Popover.
|
|
285
|
-
* Determines how the Popover adjusts its position when it overflows the viewport.
|
|
286
|
-
*
|
|
287
|
-
* @example
|
|
288
|
-
* ```jsx
|
|
289
|
-
* <Popover collision={{ horizontal: 'fit', vertical: 'flip' }} />
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
collision?: PopoverCollision;
|
|
293
|
-
/**
|
|
294
|
-
* Specifies the margin in pixels between the Popover and the anchor element.
|
|
295
|
-
* Automatically set based on the `position` property if not specified.
|
|
296
|
-
*
|
|
297
|
-
* @example
|
|
298
|
-
* ```jsx
|
|
299
|
-
* <Popover margin={{ top: 10, left: 5 }} />
|
|
300
|
-
* ```
|
|
301
|
-
*/
|
|
302
|
-
margin?: PopoverMargin;
|
|
303
|
-
/**
|
|
304
|
-
* Specifies the positioning mode of the Popover.
|
|
305
|
-
* Defaults to `fixed`. Use `absolute` for mobile browser support with zoom.
|
|
306
|
-
*
|
|
307
|
-
* @default "fixed"
|
|
308
|
-
*
|
|
309
|
-
* @example
|
|
310
|
-
* ```jsx
|
|
311
|
-
* <Popover positionMode="absolute" />
|
|
312
|
-
* ```
|
|
313
|
-
*/
|
|
314
|
-
positionMode?: PopoverPositionMode;
|
|
315
|
-
/**
|
|
316
|
-
* Specifies the document scale when using a [scale transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale).
|
|
317
|
-
* Required for accurate positioning when scaling is applied.
|
|
318
|
-
*
|
|
319
|
-
* @example
|
|
320
|
-
* ```jsx
|
|
321
|
-
* <Popover scale={1.5} />
|
|
322
|
-
* ```
|
|
323
|
-
*/
|
|
324
|
-
scale?: number;
|
|
325
|
-
/**
|
|
326
|
-
* Specifies the absolute position of the Popover.
|
|
327
|
-
* The Popover opens relative to this point.
|
|
328
|
-
*
|
|
329
|
-
* @example
|
|
330
|
-
* ```jsx
|
|
331
|
-
* <Popover offset={{ top: 100, left: 200 }} />
|
|
332
|
-
* ```
|
|
333
|
-
*/
|
|
334
|
-
offset?: PopoverOffset;
|
|
335
|
-
/**
|
|
336
|
-
* Specifies additional CSS classes for the animated Popover element.
|
|
337
|
-
*
|
|
338
|
-
* @example
|
|
339
|
-
* ```jsx
|
|
340
|
-
* <Popover popoverClass="custom-popover-class" />
|
|
341
|
-
* ```
|
|
342
|
-
*/
|
|
343
|
-
popoverClass?: string | Array<string> | {
|
|
344
|
-
[key: string]: boolean;
|
|
345
|
-
};
|
|
346
|
-
/**
|
|
347
|
-
* Specifies additional CSS classes for the Popover element.
|
|
348
|
-
*
|
|
349
|
-
* @example
|
|
350
|
-
* ```jsx
|
|
351
|
-
* <Popover className="custom-class" />
|
|
352
|
-
* ```
|
|
353
|
-
*/
|
|
354
|
-
className?: string | Array<string>;
|
|
355
|
-
/**
|
|
356
|
-
* Specifies the `id` attribute for the Popover element.
|
|
357
|
-
*
|
|
358
|
-
* @example
|
|
359
|
-
* ```jsx
|
|
360
|
-
* <Popover id="popover-id" />
|
|
361
|
-
* ```
|
|
362
|
-
*/
|
|
363
|
-
id?: string;
|
|
364
|
-
/**
|
|
365
|
-
* Specifies the styles applied to the Popover element.
|
|
366
|
-
*
|
|
367
|
-
* @example
|
|
368
|
-
* ```jsx
|
|
369
|
-
* <Popover style={{ backgroundColor: 'blue' }} />
|
|
370
|
-
* ```
|
|
371
|
-
*/
|
|
372
|
-
style?: React.CSSProperties;
|
|
373
|
-
/**
|
|
374
|
-
* Specifies the styles applied to the content element of the Popover.
|
|
375
|
-
*
|
|
376
|
-
* @example
|
|
377
|
-
* ```jsx
|
|
378
|
-
* <Popover contentStyle={{ padding: '10px' }} />
|
|
379
|
-
* ```
|
|
380
|
-
*/
|
|
381
|
-
contentStyle?: React.CSSProperties;
|
|
382
|
-
/**
|
|
383
|
-
* Controls the visibility of the Popover.
|
|
384
|
-
* Defaults to `false`.
|
|
385
|
-
*
|
|
386
|
-
* @default false
|
|
387
|
-
*
|
|
388
|
-
* @example
|
|
389
|
-
* ```jsx
|
|
390
|
-
* <Popover show={true} />
|
|
391
|
-
* ```
|
|
392
|
-
*/
|
|
393
|
-
show?: boolean;
|
|
394
|
-
/**
|
|
395
|
-
* Fires after the Popover is opened and the opening animation ends.
|
|
396
|
-
* Provides the event details.
|
|
397
|
-
*
|
|
398
|
-
* @example
|
|
399
|
-
* ```jsx
|
|
400
|
-
* <Popover onOpen={(event) => console.log('Popover opened', event)} />
|
|
401
|
-
* ```
|
|
402
|
-
*/
|
|
403
|
-
onOpen?: (event: PopoverOpenEvent) => void;
|
|
404
|
-
/**
|
|
405
|
-
* Fires after the Popover is closed.
|
|
406
|
-
* Provides the event details.
|
|
407
|
-
*
|
|
408
|
-
* @example
|
|
409
|
-
* ```jsx
|
|
410
|
-
* <Popover onClose={(event) => console.log('Popover closed', event)} />
|
|
411
|
-
* ```
|
|
412
|
-
*/
|
|
413
|
-
onClose?: (event: PopoverCloseEvent) => void;
|
|
414
|
-
/**
|
|
415
|
-
* Fires after the Popover position is calculated and set.
|
|
416
|
-
* Provides the event details.
|
|
417
|
-
*
|
|
418
|
-
* @example
|
|
419
|
-
* ```jsx
|
|
420
|
-
* <Popover onPosition={(event) => console.log('Popover positioned', event)} />
|
|
421
|
-
* ```
|
|
422
|
-
*/
|
|
423
|
-
onPosition?: (event: PopoverPositionEvent) => void;
|
|
424
|
-
/**
|
|
425
|
-
* Fires when the Popover is focused and a key is pressed.
|
|
426
|
-
* Provides the event details.
|
|
427
|
-
*
|
|
428
|
-
* @example
|
|
429
|
-
* ```jsx
|
|
430
|
-
* <Popover onKeyDown={(event) => console.log('Key pressed', event)} />
|
|
431
|
-
* ```
|
|
432
|
-
*/
|
|
433
|
-
onKeyDown?: (event: PopoverKeyDownEvent) => void;
|
|
434
|
-
/**
|
|
435
|
-
* Specifies the children elements of the Popover.
|
|
436
|
-
* Used to define the content of the Popover.
|
|
437
|
-
*
|
|
438
|
-
* @example
|
|
439
|
-
* ```jsx
|
|
440
|
-
* <Popover>
|
|
441
|
-
* <div>Popover Content</div>
|
|
442
|
-
* </Popover>
|
|
443
|
-
* ```
|
|
444
|
-
*/
|
|
445
|
-
children?: React.ReactNode;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Represents the [KendoReact Tooltip component](https://www.telerik.com/kendo-react-ui/components/tooltip/tooltip).
|
|
450
|
-
*
|
|
451
|
-
* Accepts properties of type [TooltipProps](https://www.telerik.com/kendo-react-ui/components/tooltip/api/tooltipprops).
|
|
452
|
-
*/
|
|
453
|
-
export declare class Tooltip extends React_2.PureComponent<TooltipProps, TooltipState> {
|
|
454
|
-
/**
|
|
455
|
-
* @hidden
|
|
456
|
-
*/
|
|
457
|
-
static propTypes: {
|
|
458
|
-
anchorElement: default_2.Requireable<string>;
|
|
459
|
-
content: default_2.Requireable<(...args: any[]) => any>;
|
|
460
|
-
filter: default_2.Requireable<(...args: any[]) => any>;
|
|
461
|
-
openDelay: default_2.Requireable<number>;
|
|
462
|
-
position: default_2.Requireable<string>;
|
|
463
|
-
updateInterval: default_2.Requireable<number>;
|
|
464
|
-
showOption: default_2.Requireable<object>;
|
|
465
|
-
};
|
|
466
|
-
/**
|
|
467
|
-
* The default properties of the Tooltip component.
|
|
468
|
-
*/
|
|
469
|
-
static defaultProps: {
|
|
470
|
-
anchorElement: string;
|
|
471
|
-
openDelay: number;
|
|
472
|
-
position: string;
|
|
473
|
-
showCallout: boolean;
|
|
474
|
-
parentTitle: boolean;
|
|
475
|
-
};
|
|
476
|
-
/**
|
|
477
|
-
* @hidden
|
|
478
|
-
*/
|
|
479
|
-
static contextType: React_2.Context<ZIndexContextType>;
|
|
480
|
-
/**
|
|
481
|
-
* @hidden
|
|
482
|
-
*/
|
|
483
|
-
context: React_2.ContextType<typeof ZIndexContext>;
|
|
484
|
-
/**
|
|
485
|
-
* @hidden
|
|
486
|
-
*/
|
|
487
|
-
readonly state: TooltipState;
|
|
488
|
-
private top;
|
|
489
|
-
private left;
|
|
490
|
-
private openTimeoutId?;
|
|
491
|
-
private updateIntervalId?;
|
|
492
|
-
private willOpen;
|
|
493
|
-
/**
|
|
494
|
-
* @hidden
|
|
495
|
-
*/
|
|
496
|
-
componentDidMount(): void;
|
|
497
|
-
/**
|
|
498
|
-
* @hidden
|
|
499
|
-
*/
|
|
500
|
-
componentWillUnmount(): void;
|
|
501
|
-
/**
|
|
502
|
-
* @hidden
|
|
503
|
-
*/
|
|
504
|
-
componentDidUpdate(): void;
|
|
505
|
-
/**
|
|
506
|
-
* The method is used on the MouseOut event to hide the Tooltip.
|
|
507
|
-
*
|
|
508
|
-
* @param event The mouse event object.
|
|
509
|
-
*/
|
|
510
|
-
handleMouseOut: (event: any) => void;
|
|
511
|
-
private compareTargets;
|
|
512
|
-
private handleEscape;
|
|
513
|
-
/**
|
|
514
|
-
* @hidden
|
|
515
|
-
*/
|
|
516
|
-
handleTargetItemClick: (event: React_2.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
517
|
-
private handleKeyDown;
|
|
518
|
-
/**
|
|
519
|
-
* Used on the `MouseOver` event to show the Tooltip.
|
|
520
|
-
*
|
|
521
|
-
* @param event The mouse event object.
|
|
522
|
-
*/
|
|
523
|
-
handleMouseOver: (event: any) => void;
|
|
524
|
-
/**
|
|
525
|
-
* @hidden
|
|
526
|
-
*/
|
|
527
|
-
render(): "" | JSX.Element | null;
|
|
528
|
-
private handleBodyMousemove;
|
|
529
|
-
private onClose;
|
|
530
|
-
private showToolTip;
|
|
531
|
-
private setUpdateInterval;
|
|
532
|
-
private onIntervalUpdate;
|
|
533
|
-
private isVisible;
|
|
534
|
-
private position;
|
|
535
|
-
private getTitle;
|
|
536
|
-
private calloutClassName;
|
|
537
|
-
private getCurrentZIndex;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
export declare interface TooltipEvent extends BaseEvent<Tooltip> {
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* @hidden
|
|
545
|
-
*/
|
|
546
|
-
export declare type TooltipPosition = 'right' | 'left' | 'bottom' | 'top' | 'auto';
|
|
547
|
-
|
|
548
|
-
export declare interface TooltipPositionEvent extends BaseEvent<Tooltip> {
|
|
549
|
-
/**
|
|
550
|
-
* The Tooltip element. Useful to get the actual `width` and `height` of rendered Tooltip.
|
|
551
|
-
*/
|
|
552
|
-
element: HTMLDivElement;
|
|
553
|
-
/**
|
|
554
|
-
* The current target element. Useful to calculate `top` and `left` position of the Tooltip element.
|
|
555
|
-
*/
|
|
556
|
-
targetElement: HTMLElement | null;
|
|
557
|
-
/**
|
|
558
|
-
* The current mouse `top` position;
|
|
559
|
-
*/
|
|
560
|
-
mouseTop: number;
|
|
561
|
-
/**
|
|
562
|
-
* The current mouse `left` position.
|
|
563
|
-
*/
|
|
564
|
-
mouseLeft: number;
|
|
565
|
-
/**
|
|
566
|
-
* The Tooltip anchor element prop.
|
|
567
|
-
*/
|
|
568
|
-
anchorElement?: string;
|
|
569
|
-
/**
|
|
570
|
-
* The Tooltip position prop.
|
|
571
|
-
*/
|
|
572
|
-
position?: TooltipPosition;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* Represents the props of the [KendoReact Tooltip component](https://www.telerik.com/kendo-react-ui/components/tooltip/tooltip).
|
|
577
|
-
*/
|
|
578
|
-
export declare interface TooltipProps {
|
|
579
|
-
/**
|
|
580
|
-
* Specifies the `id` of the wrapping element of the Tooltip component.
|
|
581
|
-
* Used to uniquely identify the Tooltip element in the DOM.
|
|
582
|
-
*
|
|
583
|
-
* @example
|
|
584
|
-
* ```jsx
|
|
585
|
-
* <Tooltip id="tooltip-id" />
|
|
586
|
-
* ```
|
|
587
|
-
*/
|
|
588
|
-
id?: string;
|
|
589
|
-
/**
|
|
590
|
-
* Sets the anchor element of the Tooltip.
|
|
591
|
-
*
|
|
592
|
-
* The available options are:
|
|
593
|
-
* - (Default) `pointer`—Positions the Tooltip where the cursor is located.
|
|
594
|
-
* - `target`—Positions the Tooltip relative to the target element.
|
|
595
|
-
*
|
|
596
|
-
* @default "pointer"
|
|
597
|
-
*
|
|
598
|
-
* @example
|
|
599
|
-
* ```jsx
|
|
600
|
-
* <Tooltip anchorElement="target" />
|
|
601
|
-
* ```
|
|
602
|
-
*/
|
|
603
|
-
anchorElement?: string;
|
|
604
|
-
/**
|
|
605
|
-
* Defines the container to which the Tooltip will be appended.
|
|
606
|
-
* Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
|
|
607
|
-
* If set to `null`, the Tooltip will not use React Portal.
|
|
608
|
-
*
|
|
609
|
-
* @example
|
|
610
|
-
* ```jsx
|
|
611
|
-
* <Tooltip appendTo={document.getElementById('container')} />
|
|
612
|
-
* ```
|
|
613
|
-
*/
|
|
614
|
-
appendTo?: HTMLElement | null;
|
|
615
|
-
/**
|
|
616
|
-
* Sets the position of the Tooltip ([see example](https://www.telerik.com/kendo-react-ui/components/tooltip/tooltip/positioning)).
|
|
617
|
-
*
|
|
618
|
-
* The available options are:
|
|
619
|
-
* - (Default) `auto`—Automatically positions the Tooltip based on available space.
|
|
620
|
-
* - `right`—Positions the Tooltip to the right of the element.
|
|
621
|
-
* - `left`—Positions the Tooltip to the left of the element.
|
|
622
|
-
* - `bottom`—Positions the Tooltip below the element.
|
|
623
|
-
* - `top`—Positions the Tooltip above the element.
|
|
624
|
-
*
|
|
625
|
-
* @default "auto"
|
|
626
|
-
*
|
|
627
|
-
* @example
|
|
628
|
-
* ```jsx
|
|
629
|
-
* <Tooltip position="top" />
|
|
630
|
-
* ```
|
|
631
|
-
*/
|
|
632
|
-
position?: TooltipPosition;
|
|
633
|
-
/**
|
|
634
|
-
* Specifies additional CSS classes for the Tooltip animation container.
|
|
635
|
-
*
|
|
636
|
-
* @example
|
|
637
|
-
* ```jsx
|
|
638
|
-
* <Tooltip className="custom-tooltip-class" />
|
|
639
|
-
* ```
|
|
640
|
-
*/
|
|
641
|
-
className?: string;
|
|
642
|
-
/**
|
|
643
|
-
* Configures when the Tooltip will be displayed.
|
|
644
|
-
* The available options are:
|
|
645
|
-
* - `hover`—Displays the Tooltip when the mouse hovers over the target element (default).
|
|
646
|
-
* - `click`—Displays the Tooltip when the target element is clicked.
|
|
647
|
-
* - `focus`—Displays the Tooltip when the target element is focused.
|
|
648
|
-
* - `keys`—Displays the Tooltip when a specific key is pressed while the target element is focused.
|
|
649
|
-
* - `none`—Disables the Tooltip display.
|
|
650
|
-
*
|
|
651
|
-
* @example
|
|
652
|
-
* ```jsx
|
|
653
|
-
* <Tooltip showOption={{ hover: true, click: false }} />
|
|
654
|
-
* ```
|
|
655
|
-
*/
|
|
656
|
-
showOption?: TooltipShowOptions;
|
|
657
|
-
/**
|
|
658
|
-
* Sets the content of the Tooltip ([see example](https://www.telerik.com/kendo-react-ui/components/tooltip/tooltip/templates)).
|
|
659
|
-
* Can be a string, JSX, or a function returning JSX.
|
|
660
|
-
*
|
|
661
|
-
* @example
|
|
662
|
-
* ```jsx
|
|
663
|
-
* <Tooltip content="This is a tooltip" />
|
|
664
|
-
* ```
|
|
665
|
-
*/
|
|
666
|
-
content?: any;
|
|
667
|
-
/**
|
|
668
|
-
* Specifies the children elements of the Tooltip.
|
|
669
|
-
* Used to define the content of the Tooltip.
|
|
670
|
-
*
|
|
671
|
-
* @example
|
|
672
|
-
* ```jsx
|
|
673
|
-
* <Tooltip>
|
|
674
|
-
* <span>Hover over me</span>
|
|
675
|
-
* </Tooltip>
|
|
676
|
-
* ```
|
|
677
|
-
*/
|
|
678
|
-
children?: any;
|
|
679
|
-
/**
|
|
680
|
-
* Controls the visibility of the Tooltip.
|
|
681
|
-
* When set, the Tooltip operates in controlled mode ([see example](https://www.telerik.com/kendo-react-ui/components/tooltip/tooltip/controlled-mode)).
|
|
682
|
-
* Requires the `targetElement` property to be set.
|
|
683
|
-
*
|
|
684
|
-
* @example
|
|
685
|
-
* ```jsx
|
|
686
|
-
* <Tooltip open={true} targetElement={document.getElementById('target')} />
|
|
687
|
-
* ```
|
|
688
|
-
*/
|
|
689
|
-
open?: boolean;
|
|
690
|
-
/**
|
|
691
|
-
* Specifies a delay in milliseconds before the Tooltip is displayed.
|
|
692
|
-
*
|
|
693
|
-
* @default 400
|
|
694
|
-
*
|
|
695
|
-
* @example
|
|
696
|
-
* ```jsx
|
|
697
|
-
* <Tooltip openDelay={500} />
|
|
698
|
-
* ```
|
|
699
|
-
*/
|
|
700
|
-
openDelay?: number;
|
|
701
|
-
/**
|
|
702
|
-
* Enables the Tooltip to display the title of any parent element with a `title` attribute.
|
|
703
|
-
*
|
|
704
|
-
* @default false
|
|
705
|
-
*
|
|
706
|
-
* @example
|
|
707
|
-
* ```jsx
|
|
708
|
-
* <Tooltip parentTitle={true} />
|
|
709
|
-
* ```
|
|
710
|
-
*/
|
|
711
|
-
parentTitle?: boolean;
|
|
712
|
-
/**
|
|
713
|
-
* Determines whether the Tooltip callout (arrow) is displayed.
|
|
714
|
-
*
|
|
715
|
-
* @default true
|
|
716
|
-
*
|
|
717
|
-
* @example
|
|
718
|
-
* ```jsx
|
|
719
|
-
* <Tooltip showCallout={false} />
|
|
720
|
-
* ```
|
|
721
|
-
*/
|
|
722
|
-
showCallout?: boolean;
|
|
723
|
-
/**
|
|
724
|
-
* Specifies the starting point of the Tooltip callout when the position is set to `auto`.
|
|
725
|
-
* Accepts a pixel value.
|
|
726
|
-
*
|
|
727
|
-
* @example
|
|
728
|
-
* ```jsx
|
|
729
|
-
* <Tooltip setCalloutOnPositionAuto="50%" />
|
|
730
|
-
* ```
|
|
731
|
-
*/
|
|
732
|
-
setCalloutOnPositionAuto?: any;
|
|
733
|
-
/**
|
|
734
|
-
* Specifies the styles applied to the Tooltip animation container.
|
|
735
|
-
*
|
|
736
|
-
* @example
|
|
737
|
-
* ```jsx
|
|
738
|
-
* <Tooltip style={{ backgroundColor: 'blue' }} />
|
|
739
|
-
* ```
|
|
740
|
-
*/
|
|
741
|
-
style?: React.CSSProperties;
|
|
742
|
-
/**
|
|
743
|
-
* Specifies the target element for the Tooltip.
|
|
744
|
-
* Required when the Tooltip is in controlled mode.
|
|
745
|
-
*
|
|
746
|
-
* @example
|
|
747
|
-
* ```jsx
|
|
748
|
-
* <Tooltip targetElement={document.getElementById('target')} />
|
|
749
|
-
* ```
|
|
750
|
-
*/
|
|
751
|
-
targetElement?: any;
|
|
752
|
-
/**
|
|
753
|
-
* Specifies additional CSS classes for the Tooltip DOM element.
|
|
754
|
-
*
|
|
755
|
-
* @example
|
|
756
|
-
* ```jsx
|
|
757
|
-
* <Tooltip tooltipClassName="custom-tooltip" />
|
|
758
|
-
* ```
|
|
759
|
-
*/
|
|
760
|
-
tooltipClassName?: string;
|
|
761
|
-
/**
|
|
762
|
-
* Specifies the styles applied to the Tooltip DOM element.
|
|
763
|
-
*
|
|
764
|
-
* @example
|
|
765
|
-
* ```jsx
|
|
766
|
-
* <Tooltip tooltipStyle={{ color: 'red' }} />
|
|
767
|
-
* ```
|
|
768
|
-
*/
|
|
769
|
-
tooltipStyle?: React.CSSProperties;
|
|
770
|
-
/**
|
|
771
|
-
* Fires when the Tooltip is shown.
|
|
772
|
-
* Provides the event details.
|
|
773
|
-
*
|
|
774
|
-
* @example
|
|
775
|
-
* ```jsx
|
|
776
|
-
* <Tooltip onOpen={(event) => console.log('Tooltip opened', event)} />
|
|
777
|
-
* ```
|
|
778
|
-
*/
|
|
779
|
-
onOpen?: (event: TooltipEvent) => void;
|
|
780
|
-
/**
|
|
781
|
-
* Fires when the Tooltip is hidden.
|
|
782
|
-
* Provides the event details.
|
|
783
|
-
*
|
|
784
|
-
* @example
|
|
785
|
-
* ```jsx
|
|
786
|
-
* <Tooltip onClose={(event) => console.log('Tooltip closed', event)} />
|
|
787
|
-
* ```
|
|
788
|
-
*/
|
|
789
|
-
onClose?: (event: TooltipEvent) => void;
|
|
790
|
-
/**
|
|
791
|
-
* Callback function triggered when the Tooltip calculates its position.
|
|
792
|
-
* Allows customization of the `top` and `left` position values.
|
|
793
|
-
*
|
|
794
|
-
* @example
|
|
795
|
-
* ```jsx
|
|
796
|
-
* <Tooltip onPosition={(event) => ({ top: 100, left: 200 })} />
|
|
797
|
-
* ```
|
|
798
|
-
*/
|
|
799
|
-
onPosition?: (event: TooltipPositionEvent) => {
|
|
800
|
-
top: number;
|
|
801
|
-
left: number;
|
|
802
|
-
};
|
|
803
|
-
/**
|
|
804
|
-
* Callback function to determine if the Tooltip should be displayed for a specific target element ([see example](https://www.telerik.com/kendo-react-ui/components/tooltip/tooltip/anchor-elements)).
|
|
805
|
-
*
|
|
806
|
-
* @example
|
|
807
|
-
* ```jsx
|
|
808
|
-
* <Tooltip filter={(target) => target.tagName === 'BUTTON'} />
|
|
809
|
-
* ```
|
|
810
|
-
*/
|
|
811
|
-
filter?: (target: HTMLElement) => void;
|
|
812
|
-
/**
|
|
813
|
-
* Specifies the interval in milliseconds for the Tooltip to check for title changes.
|
|
814
|
-
* By default, the Tooltip does not track title updates.
|
|
815
|
-
*
|
|
816
|
-
* @example
|
|
817
|
-
* ```jsx
|
|
818
|
-
* <Tooltip updateInterval={1000} />
|
|
819
|
-
* ```
|
|
820
|
-
*/
|
|
821
|
-
updateInterval?: number;
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* Specifies when the options of the [showTooltip](https://www.telerik.com/kendo-react-ui/components/tooltip/api/tooltipprops#toc-showoption) props.
|
|
826
|
-
* - `hover`—Shows the Tooltip when the mouse hovers over the target element(Set to `true` by default).
|
|
827
|
-
* - `click`—Shows the Tooltip when the target element is clicked(Set to `false` by default).
|
|
828
|
-
* - `focus`—Shows the Tooltip when the target element is focused(Set to `false` by default).
|
|
829
|
-
* - `keys`—Shows the Tooltip when the target element is focused and a specific key is pressed(Set to `false` by default).
|
|
830
|
-
* - `none`—Doesn't show the Tooltip(Set to `false` by default).
|
|
831
|
-
*/
|
|
832
|
-
declare type TooltipShowOptions = {
|
|
833
|
-
hover?: boolean;
|
|
834
|
-
click?: boolean;
|
|
835
|
-
focus?: boolean;
|
|
836
|
-
keys?: string[];
|
|
837
|
-
none?: boolean;
|
|
838
|
-
};
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* @hidden
|
|
842
|
-
*/
|
|
843
|
-
declare interface TooltipState {
|
|
844
|
-
targetElement: HTMLElement | null;
|
|
845
|
-
open: boolean;
|
|
846
|
-
title: string;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
export { }
|
|
8
|
+
import { Tooltip } from './tooltip/Tooltip.js';
|
|
9
|
+
import { TooltipProps } from './tooltip/TooltipProps.js';
|
|
10
|
+
import { TooltipEvent, TooltipPositionEvent } from './tooltip/events.js';
|
|
11
|
+
import { TooltipPosition } from './tooltip/utils.js';
|
|
12
|
+
import { PopoverCollision } from './popover/interfaces/PopoverCollision.js';
|
|
13
|
+
import { PopoverMargin } from './popover/interfaces/PopoverMargin.js';
|
|
14
|
+
import { PopoverOffset } from './popover/interfaces/PopoverOffset.js';
|
|
15
|
+
import { PopoverOpenEvent } from './popover/interfaces/PopoverOpenEvent.js';
|
|
16
|
+
import { PopoverCloseEvent } from './popover/interfaces/PopoverCloseEvent.js';
|
|
17
|
+
import { PopoverKeyDownEvent } from './popover/interfaces/PopoverKeyDownEvent.js';
|
|
18
|
+
import { PopoverPositionEvent } from './popover/interfaces/PopoverPositionEvent.js';
|
|
19
|
+
import { PopoverAnimation } from './popover/interfaces/PopoverAnimation.js';
|
|
20
|
+
import { PopoverPosition } from './popover/interfaces/PopoverPosition.js';
|
|
21
|
+
import { PopoverPositionMode } from './popover/interfaces/PopoverPositionMode.js';
|
|
22
|
+
import { PopoverProps } from './popover/interfaces/PopoverProps.js';
|
|
23
|
+
import { Popover, PopoverHandle } from './popover/Popover.js';
|
|
24
|
+
import { PopoverActionsBar, PopoverActionsBarHandle } from './popover/PopoverActionsBar.js';
|
|
25
|
+
import { PopoverActionsBarProps } from './popover/interfaces/PopoverActionsBarProps.js';
|
|
26
|
+
import { PopoverCollisionType } from './popover/interfaces/PopoverCollisionType.js';
|
|
27
|
+
export { Tooltip, TooltipEvent, TooltipPositionEvent, TooltipProps, TooltipPosition, PopoverCollision, PopoverCollisionType, PopoverMargin, PopoverOffset, PopoverPosition, PopoverPositionMode, PopoverAnimation, PopoverOpenEvent, PopoverCloseEvent, PopoverKeyDownEvent, PopoverPositionEvent, PopoverProps, PopoverHandle, Popover, PopoverActionsBarProps, PopoverActionsBarHandle, PopoverActionsBar };
|