@progress/kendo-react-tooltip 7.2.4-develop.3 → 7.3.0-develop.1
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 +8 -5
- package/index.d.mts +520 -5
- package/index.d.ts +520 -23
- package/index.js +8 -5
- package/index.mjs +13 -466
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +3 -3
- package/popover/Popover.js +8 -0
- package/popover/Popover.mjs +185 -0
- package/popover/PopoverActionsBar.js +8 -0
- package/popover/PopoverActionsBar.mjs +45 -0
- package/tooltip/Tooltip.js +8 -0
- package/tooltip/Tooltip.mjs +220 -0
- package/tooltip/utils.js +8 -0
- package/tooltip/utils.mjs +59 -0
- package/package-metadata.d.ts +0 -9
- package/popover/Popover.d.ts +0 -19
- package/popover/PopoverActionsBar.d.ts +0 -23
- package/popover/interfaces/Align.d.ts +0 -28
- package/popover/interfaces/PopoverActionsBarProps.d.ts +0 -31
- package/popover/interfaces/PopoverAnimation.d.ts +0 -10
- package/popover/interfaces/PopoverCloseEvent.d.ts +0 -14
- package/popover/interfaces/PopoverCollision.d.ts +0 -18
- package/popover/interfaces/PopoverCollisionType.d.ts +0 -14
- package/popover/interfaces/PopoverMargin.d.ts +0 -18
- package/popover/interfaces/PopoverOffset.d.ts +0 -18
- package/popover/interfaces/PopoverOpenEvent.d.ts +0 -14
- package/popover/interfaces/PopoverPosition.d.ts +0 -13
- package/popover/interfaces/PopoverPositionEvent.d.ts +0 -22
- package/popover/interfaces/PopoverPositionMode.d.ts +0 -9
- package/popover/interfaces/PopoverProps.d.ts +0 -115
- package/tooltip/Tooltip.d.ts +0 -89
- package/tooltip/TooltipProps.d.ts +0 -112
- package/tooltip/events.d.ts +0 -35
- package/tooltip/utils.d.ts +0 -28
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PopupAnimation } from '@progress/kendo-react-popup';
|
|
6
|
-
/**
|
|
7
|
-
* The animation settings of the Popover.
|
|
8
|
-
*/
|
|
9
|
-
export interface PopoverAnimation extends PopupAnimation {
|
|
10
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PopoverHandle } from '../Popover';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the object of the `Close` Popover event.
|
|
8
|
-
*/
|
|
9
|
-
export interface PopoverCloseEvent {
|
|
10
|
-
/**
|
|
11
|
-
* An event target.
|
|
12
|
-
*/
|
|
13
|
-
target: PopoverHandle;
|
|
14
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PopoverCollisionType } from './PopoverCollisionType';
|
|
6
|
-
/**
|
|
7
|
-
* Defines the horizontal and vertical collision behavior of the Popover.
|
|
8
|
-
*/
|
|
9
|
-
export interface PopoverCollision {
|
|
10
|
-
/**
|
|
11
|
-
* Defines the horizontal collision behavior of the Popover.
|
|
12
|
-
*/
|
|
13
|
-
horizontal: PopoverCollisionType;
|
|
14
|
-
/**
|
|
15
|
-
* Defines the vertical collision behavior of the Popover.
|
|
16
|
-
*/
|
|
17
|
-
vertical: PopoverCollisionType;
|
|
18
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { CollisionType as CollisionTypeBase } from '@progress/kendo-react-popup';
|
|
6
|
-
/**
|
|
7
|
-
* Defines the possible collision behavior when the Popover is not fully visible.
|
|
8
|
-
*
|
|
9
|
-
* The available options are:
|
|
10
|
-
* - `fit`—Moves the Popover horizontally until it is fully displayed in the viewport.
|
|
11
|
-
* - `flip`—Flips the Popover position based on the origin and the position properties.
|
|
12
|
-
* - `none`—The Popover is rendered at its original position. Usable when the Popover is focused on open and the page is scrolled to it.
|
|
13
|
-
*/
|
|
14
|
-
export type PopoverCollisionType = CollisionTypeBase;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Margin as MarginBase } from '@progress/kendo-react-popup';
|
|
6
|
-
/**
|
|
7
|
-
* Defines the horizontal and the vertical margin offset of the component.
|
|
8
|
-
*/
|
|
9
|
-
export interface PopoverMargin extends MarginBase {
|
|
10
|
-
/**
|
|
11
|
-
* Defines the possible horizontal margin value.
|
|
12
|
-
*/
|
|
13
|
-
horizontal: number;
|
|
14
|
-
/**
|
|
15
|
-
* Defines the possible vertical margin value.
|
|
16
|
-
*/
|
|
17
|
-
vertical: number;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Offset as OffsetBase } from '@progress/kendo-react-popup';
|
|
6
|
-
/**
|
|
7
|
-
* The offset position of the Popover.
|
|
8
|
-
*/
|
|
9
|
-
export interface PopoverOffset extends OffsetBase {
|
|
10
|
-
/**
|
|
11
|
-
* Defines the top position of the Popover.
|
|
12
|
-
*/
|
|
13
|
-
top: number;
|
|
14
|
-
/**
|
|
15
|
-
* Defines the left position of the Popover.
|
|
16
|
-
*/
|
|
17
|
-
left: number;
|
|
18
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PopoverHandle } from '../Popover';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the object of the `Open` Popover event.
|
|
8
|
-
*/
|
|
9
|
-
export interface PopoverOpenEvent {
|
|
10
|
-
/**
|
|
11
|
-
* An event target.
|
|
12
|
-
*/
|
|
13
|
-
target: PopoverHandle;
|
|
14
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* The position of the Popover.
|
|
7
|
-
* The available options are:
|
|
8
|
-
* - `top`
|
|
9
|
-
* - `left`
|
|
10
|
-
* - `bottom`
|
|
11
|
-
* - `right`
|
|
12
|
-
*/
|
|
13
|
-
export type PopoverPosition = 'top' | 'left' | 'bottom' | 'right';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PopoverHandle } from '../Popover';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the object of the `Position` Popover event.
|
|
8
|
-
*/
|
|
9
|
-
export interface PopoverPositionEvent {
|
|
10
|
-
/**
|
|
11
|
-
* An event target.
|
|
12
|
-
*/
|
|
13
|
-
target: PopoverHandle;
|
|
14
|
-
/**
|
|
15
|
-
* Indicates if the position is fitted.
|
|
16
|
-
*/
|
|
17
|
-
fitted: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Indicates if the position is flipped.
|
|
20
|
-
*/
|
|
21
|
-
flipped: boolean;
|
|
22
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PositionMode as PositionModeBase } from '@progress/kendo-react-popup';
|
|
6
|
-
/**
|
|
7
|
-
* The type which defines all possible position modes of the Popover.
|
|
8
|
-
*/
|
|
9
|
-
export type PopoverPositionMode = PositionModeBase;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { PopoverCollision } from './PopoverCollision';
|
|
6
|
-
import { PopoverMargin } from './PopoverMargin';
|
|
7
|
-
import { PopoverOffset } from './PopoverOffset';
|
|
8
|
-
import { PopoverOpenEvent } from './PopoverOpenEvent';
|
|
9
|
-
import { PopoverCloseEvent } from './PopoverCloseEvent';
|
|
10
|
-
import { PopoverAnimation } from './PopoverAnimation';
|
|
11
|
-
import { PopoverPosition } from './PopoverPosition';
|
|
12
|
-
import { PopoverPositionEvent } from './PopoverPositionEvent';
|
|
13
|
-
import { PopoverPositionMode } from './PopoverPositionMode';
|
|
14
|
-
export interface PopoverProps {
|
|
15
|
-
/**
|
|
16
|
-
* Specifies the title of the Popover component.
|
|
17
|
-
*/
|
|
18
|
-
title?: React.ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* Specifies the position of the Popover element relative to the current anchor or offset.
|
|
21
|
-
*/
|
|
22
|
-
position?: PopoverPosition;
|
|
23
|
-
/**
|
|
24
|
-
* Controls the Popover callout element. If set to `false`, the callout element will not be rendered.
|
|
25
|
-
*/
|
|
26
|
-
callout?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Controls the Popover animation. By default, the opening and closing animations are enabled.
|
|
29
|
-
*/
|
|
30
|
-
animate?: boolean | PopoverAnimation;
|
|
31
|
-
/**
|
|
32
|
-
* Specifies the element which will be used as an anchor. The Popover opens next to that element.
|
|
33
|
-
*/
|
|
34
|
-
anchor?: HTMLElement | null;
|
|
35
|
-
/**
|
|
36
|
-
* Defines the container to which the Popover will be appended. Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
|
|
37
|
-
* * If set to `null` the Popover will be rendered without React Portal.
|
|
38
|
-
*/
|
|
39
|
-
appendTo?: HTMLElement | null;
|
|
40
|
-
/**
|
|
41
|
-
* Configures the collision behavior of the Popover. By default, it's set to `none`.
|
|
42
|
-
*/
|
|
43
|
-
collision?: PopoverCollision;
|
|
44
|
-
/**
|
|
45
|
-
* Configures the margin value that will be added to the Popover dimensions
|
|
46
|
-
* in pixels and leaves a blank space between the Popover and the anchor.
|
|
47
|
-
* By default, it's automatically set based on the Popover position prop.
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
margin?: PopoverMargin;
|
|
51
|
-
/**
|
|
52
|
-
* Specifies the position mode of the component. By default, the Popover uses fixed positioning.
|
|
53
|
-
* To make the Popover acquire absolute positioning, set this option to `absolute`.
|
|
54
|
-
*
|
|
55
|
-
* > If you need to support mobile browsers with the zoom option, use the `absolute` positioning of the Popover.
|
|
56
|
-
*/
|
|
57
|
-
positionMode?: PopoverPositionMode;
|
|
58
|
-
/**
|
|
59
|
-
* Used to set the document scale when using a [scale transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale).
|
|
60
|
-
*
|
|
61
|
-
* The document or container scale is required to compute the popover position correctly. Detecting the scale is not reliable and must be set by providing a value for SCALE.
|
|
62
|
-
*
|
|
63
|
-
* > Using this token is not necessary for user-applied browser zoom.
|
|
64
|
-
*
|
|
65
|
-
*/
|
|
66
|
-
scale?: number;
|
|
67
|
-
/**
|
|
68
|
-
* Specifies the absolute position of the element.
|
|
69
|
-
* The Popover opens next to that point. The pivot point of the Popover is defined by the `position` configuration option.
|
|
70
|
-
* The boundary detection is applied by using the window viewport.
|
|
71
|
-
*/
|
|
72
|
-
offset?: PopoverOffset;
|
|
73
|
-
/**
|
|
74
|
-
* Specifies a list of CSS classes that will be added to the internal animated element.
|
|
75
|
-
*/
|
|
76
|
-
popoverClass?: string | Array<string> | {
|
|
77
|
-
[key: string]: boolean;
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Specifies a list of CSS classes that will be added to the Popover element.
|
|
81
|
-
*/
|
|
82
|
-
className?: string | Array<string>;
|
|
83
|
-
/**
|
|
84
|
-
* Specifies the id that will be added to the Popover element.
|
|
85
|
-
*/
|
|
86
|
-
id?: string;
|
|
87
|
-
/**
|
|
88
|
-
* Represents the styles that are applied to the Popover.
|
|
89
|
-
*/
|
|
90
|
-
style?: React.CSSProperties;
|
|
91
|
-
/**
|
|
92
|
-
* Represents the styles that are applied to the content element of the Popover.
|
|
93
|
-
*/
|
|
94
|
-
contentStyle?: React.CSSProperties;
|
|
95
|
-
/**
|
|
96
|
-
* Controls the Popover visibility. Defaults to `false`.
|
|
97
|
-
*/
|
|
98
|
-
show?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* Fires after the Popover is opened and the opening animation ends.
|
|
101
|
-
*/
|
|
102
|
-
onOpen?: (event: PopoverOpenEvent) => void;
|
|
103
|
-
/**
|
|
104
|
-
* Fires after the Popover is closed.
|
|
105
|
-
*/
|
|
106
|
-
onClose?: (event: PopoverCloseEvent) => void;
|
|
107
|
-
/**
|
|
108
|
-
* Fires after the Popover position is set.
|
|
109
|
-
*/
|
|
110
|
-
onPosition?: (event: PopoverPositionEvent) => void;
|
|
111
|
-
/**
|
|
112
|
-
* @hidden
|
|
113
|
-
*/
|
|
114
|
-
children?: React.ReactNode;
|
|
115
|
-
}
|
package/tooltip/Tooltip.d.ts
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { ZIndexContext } from '@progress/kendo-react-common';
|
|
8
|
-
import { TooltipProps } from './TooltipProps';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
interface TooltipState {
|
|
13
|
-
targetElement: HTMLElement | null;
|
|
14
|
-
open: boolean;
|
|
15
|
-
title: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class Tooltip extends React.PureComponent<TooltipProps, TooltipState> {
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
static propTypes: {
|
|
22
|
-
anchorElement: PropTypes.Requireable<string>;
|
|
23
|
-
content: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
-
filter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
25
|
-
openDelay: PropTypes.Requireable<number>;
|
|
26
|
-
position: PropTypes.Requireable<string>;
|
|
27
|
-
updateInterval: PropTypes.Requireable<number>;
|
|
28
|
-
};
|
|
29
|
-
static defaultProps: {
|
|
30
|
-
anchorElement: string;
|
|
31
|
-
openDelay: number;
|
|
32
|
-
position: string;
|
|
33
|
-
showCallout: boolean;
|
|
34
|
-
parentTitle: boolean;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* @hidden
|
|
38
|
-
*/
|
|
39
|
-
static contextType: React.Context<import("@progress/kendo-react-common").ZIndexContextType>;
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
context: React.ContextType<typeof ZIndexContext>;
|
|
44
|
-
/**
|
|
45
|
-
* @hidden
|
|
46
|
-
*/
|
|
47
|
-
readonly state: TooltipState;
|
|
48
|
-
private top;
|
|
49
|
-
private left;
|
|
50
|
-
private openTimeoutId?;
|
|
51
|
-
private updateIntervalId?;
|
|
52
|
-
private willOpen;
|
|
53
|
-
constructor(props: TooltipProps);
|
|
54
|
-
/**
|
|
55
|
-
* @hidden
|
|
56
|
-
*/
|
|
57
|
-
componentDidMount(): void;
|
|
58
|
-
/**
|
|
59
|
-
* @hidden
|
|
60
|
-
*/
|
|
61
|
-
componentWillUnmount(): void;
|
|
62
|
-
/**
|
|
63
|
-
* @hidden
|
|
64
|
-
*/
|
|
65
|
-
componentDidUpdate(): void;
|
|
66
|
-
/**
|
|
67
|
-
* The method is used on the MouseOut event to hide the Tooltip.
|
|
68
|
-
*/
|
|
69
|
-
handleMouseOut: (event: any) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Used on the `MouseOver` event to show the Tooltip.
|
|
72
|
-
*/
|
|
73
|
-
handleMouseOver: (event: any) => void;
|
|
74
|
-
/**
|
|
75
|
-
* @hidden
|
|
76
|
-
*/
|
|
77
|
-
render(): "" | import("react/jsx-runtime").JSX.Element | null;
|
|
78
|
-
private handleBodyMousemove;
|
|
79
|
-
private onClose;
|
|
80
|
-
private showToolTip;
|
|
81
|
-
private setUpdateInterval;
|
|
82
|
-
private onIntervalUpdate;
|
|
83
|
-
private isVisible;
|
|
84
|
-
private position;
|
|
85
|
-
private getTitle;
|
|
86
|
-
private calloutClassName;
|
|
87
|
-
private getCurrentZIndex;
|
|
88
|
-
}
|
|
89
|
-
export {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { TooltipEvent, TooltipPositionEvent } from './events';
|
|
6
|
-
import { TooltipPosition } from './utils';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the props of the [KendoReact Tooltip component]({% slug overview_tooltip %}).
|
|
9
|
-
*/
|
|
10
|
-
export interface TooltipProps {
|
|
11
|
-
/**
|
|
12
|
-
* Specifies the `id` of the wrapping element of the Tooltip component.
|
|
13
|
-
*/
|
|
14
|
-
id?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Sets the anchor element of the Tooltip.
|
|
17
|
-
*
|
|
18
|
-
* The available options are:
|
|
19
|
-
* - (Default) `pointer`—Shows a Tooltip where the cursor is located.
|
|
20
|
-
* - `target`—Positions the Tooltip based on the anchor element.
|
|
21
|
-
*/
|
|
22
|
-
anchorElement?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Defines the container to which the Tooltip will be appended. Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
|
|
25
|
-
*/
|
|
26
|
-
appendTo?: HTMLElement | null;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the position of the Tooltip ([see example]({% slug positioning_tooltip %})).
|
|
29
|
-
*
|
|
30
|
-
* The available options are:
|
|
31
|
-
* - (Default) `auto`—Positions the Tooltip depending on the available space.
|
|
32
|
-
* - `right`—Positions the Tooltip to the right side of the element.
|
|
33
|
-
* - `left`—Positions the Tooltip to the left side of the element.
|
|
34
|
-
* - `bottom`—Positions the Tooltip at the bottom of the element.
|
|
35
|
-
* - `top`—Positions the Tooltip at the top of the element.
|
|
36
|
-
*/
|
|
37
|
-
position?: TooltipPosition;
|
|
38
|
-
/**
|
|
39
|
-
* Sets a class of the Tooltip animation container.
|
|
40
|
-
*/
|
|
41
|
-
className?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Sets the content of the Tooltip ([see example]({% slug templates_tooltip %})).
|
|
44
|
-
*/
|
|
45
|
-
content?: any;
|
|
46
|
-
/**
|
|
47
|
-
* Sets the content of the Tooltip.
|
|
48
|
-
*/
|
|
49
|
-
children?: any;
|
|
50
|
-
/**
|
|
51
|
-
* Specifies if the Tooltip will be open.
|
|
52
|
-
* Sets the Tooltip in its controlled mode ([see example]({% slug controlledmode_tooltip %})).
|
|
53
|
-
* Requires you to set the `targetElement` property.
|
|
54
|
-
*/
|
|
55
|
-
open?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Sets a delay in milliseconds.
|
|
58
|
-
*/
|
|
59
|
-
openDelay?: number;
|
|
60
|
-
/**
|
|
61
|
-
* If any of the parent elements has a title, displays a Tooltip.
|
|
62
|
-
*/
|
|
63
|
-
parentTitle?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Specifies if the Tooltip callout will be displayed.
|
|
66
|
-
*/
|
|
67
|
-
showCallout?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* When the position is set to `auto`, sets the start point of the Tooltip callout (in pixels).
|
|
70
|
-
*/
|
|
71
|
-
setCalloutOnPositionAuto?: any;
|
|
72
|
-
/**
|
|
73
|
-
* Specifies the styles which are set to the Tooltip animation container.
|
|
74
|
-
*/
|
|
75
|
-
style?: React.CSSProperties;
|
|
76
|
-
/**
|
|
77
|
-
* Sets the Tooltip target element. You have to use it with the `open` property.
|
|
78
|
-
*/
|
|
79
|
-
targetElement?: any;
|
|
80
|
-
/**
|
|
81
|
-
* Specifies the CSS class names which are set to the Tooltip DOM element.
|
|
82
|
-
*/
|
|
83
|
-
tooltipClassName?: string;
|
|
84
|
-
/**
|
|
85
|
-
* Specifies the styles which are set to the Tooltip DOM element.
|
|
86
|
-
*/
|
|
87
|
-
tooltipStyle?: React.CSSProperties;
|
|
88
|
-
/**
|
|
89
|
-
* Fires when the Tooltip is shown.
|
|
90
|
-
*/
|
|
91
|
-
onOpen?: (event: TooltipEvent) => void;
|
|
92
|
-
/**
|
|
93
|
-
* Fires when the Tooltip is hidden.
|
|
94
|
-
*/
|
|
95
|
-
onClose?: (event: TooltipEvent) => void;
|
|
96
|
-
/**
|
|
97
|
-
* Callback called when the Tooltip calculates it's position. Useful to modify the default position behavior.
|
|
98
|
-
* Require to return the `top` and `left` position of the Tooltip.
|
|
99
|
-
*/
|
|
100
|
-
onPosition?: (event: TooltipPositionEvent) => {
|
|
101
|
-
top: number;
|
|
102
|
-
left: number;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Represents a callback function which determines if a Tooltip will be displayed ([see example]({% slug filter_elements_tooltip %})).
|
|
106
|
-
*/
|
|
107
|
-
filter?: (target: HTMLElement) => void;
|
|
108
|
-
/**
|
|
109
|
-
* The milliseconds interval on which the Tooltip will check for title change. By default the Tooltip does not track for title updates.
|
|
110
|
-
*/
|
|
111
|
-
updateInterval?: number;
|
|
112
|
-
}
|
package/tooltip/events.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { BaseEvent } from '@progress/kendo-react-common';
|
|
6
|
-
import { Tooltip } from './Tooltip';
|
|
7
|
-
import { TooltipPosition } from './utils';
|
|
8
|
-
export interface TooltipEvent extends BaseEvent<Tooltip> {
|
|
9
|
-
}
|
|
10
|
-
export interface TooltipPositionEvent extends BaseEvent<Tooltip> {
|
|
11
|
-
/**
|
|
12
|
-
* The Tooltip element. Useful to get the actual `width` and `height` of rendered Tooltip.
|
|
13
|
-
*/
|
|
14
|
-
element: HTMLDivElement;
|
|
15
|
-
/**
|
|
16
|
-
* The current target element. Useful to calculate `top` and `left` position of the Tooltip element.
|
|
17
|
-
*/
|
|
18
|
-
targetElement: HTMLElement | null;
|
|
19
|
-
/**
|
|
20
|
-
* The current mouse `top` position;
|
|
21
|
-
*/
|
|
22
|
-
mouseTop: number;
|
|
23
|
-
/**
|
|
24
|
-
* The current mouse `left` position.
|
|
25
|
-
*/
|
|
26
|
-
mouseLeft: number;
|
|
27
|
-
/**
|
|
28
|
-
* The Tooltip anchor element prop.
|
|
29
|
-
*/
|
|
30
|
-
anchorElement?: string;
|
|
31
|
-
/**
|
|
32
|
-
* The Tooltip position prop.
|
|
33
|
-
*/
|
|
34
|
-
position?: TooltipPosition;
|
|
35
|
-
}
|
package/tooltip/utils.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export type TooltipPosition = 'right' | 'left' | 'bottom' | 'top' | 'auto';
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*/
|
|
12
|
-
export declare const getLeftPosition: (left: any, elementWidth: any, targetElement: any, anchorElement: any, position: any) => any;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export declare const getTopPosition: (top: any, targetElement: any, elementHeight: any, anchorElement: any, position: any) => any;
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export declare const getDomRect: (currentTarget: any) => any;
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
export declare const toolTipSelectors: string[];
|
|
25
|
-
/**
|
|
26
|
-
* @hidden
|
|
27
|
-
*/
|
|
28
|
-
export declare const isTooltipElement: (element: any) => boolean;
|