@progress/kendo-vue-tooltip 5.3.0-dev.202410141143 → 5.3.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.
Files changed (53) hide show
  1. package/README.md +24 -29
  2. package/Tooltip.js +8 -0
  3. package/Tooltip.mjs +271 -0
  4. package/dist/cdn/js/kendo-vue-tooltip.js +8 -1
  5. package/index.d.mts +304 -0
  6. package/index.d.ts +304 -0
  7. package/index.js +8 -0
  8. package/index.mjs +11 -0
  9. package/package-metadata.js +8 -0
  10. package/package-metadata.mjs +18 -0
  11. package/package.json +22 -39
  12. package/utils.js +8 -0
  13. package/utils.mjs +52 -0
  14. package/dist/es/Tooltip.d.ts +0 -52
  15. package/dist/es/Tooltip.js +0 -420
  16. package/dist/es/TooltipProps.d.ts +0 -100
  17. package/dist/es/TooltipProps.js +0 -2
  18. package/dist/es/additionalTypes.ts +0 -21
  19. package/dist/es/events.d.ts +0 -34
  20. package/dist/es/events.js +0 -1
  21. package/dist/es/main.d.ts +0 -5
  22. package/dist/es/main.js +0 -2
  23. package/dist/es/package-metadata.d.ts +0 -5
  24. package/dist/es/package-metadata.js +0 -11
  25. package/dist/es/utils.d.ts +0 -24
  26. package/dist/es/utils.js +0 -76
  27. package/dist/esm/Tooltip.d.ts +0 -52
  28. package/dist/esm/Tooltip.js +0 -420
  29. package/dist/esm/TooltipProps.d.ts +0 -100
  30. package/dist/esm/TooltipProps.js +0 -2
  31. package/dist/esm/additionalTypes.ts +0 -21
  32. package/dist/esm/events.d.ts +0 -34
  33. package/dist/esm/events.js +0 -1
  34. package/dist/esm/main.d.ts +0 -5
  35. package/dist/esm/main.js +0 -2
  36. package/dist/esm/package-metadata.d.ts +0 -5
  37. package/dist/esm/package-metadata.js +0 -11
  38. package/dist/esm/package.json +0 -3
  39. package/dist/esm/utils.d.ts +0 -24
  40. package/dist/esm/utils.js +0 -76
  41. package/dist/npm/Tooltip.d.ts +0 -52
  42. package/dist/npm/Tooltip.js +0 -427
  43. package/dist/npm/TooltipProps.d.ts +0 -100
  44. package/dist/npm/TooltipProps.js +0 -3
  45. package/dist/npm/additionalTypes.ts +0 -21
  46. package/dist/npm/events.d.ts +0 -34
  47. package/dist/npm/events.js +0 -2
  48. package/dist/npm/main.d.ts +0 -5
  49. package/dist/npm/main.js +0 -6
  50. package/dist/npm/package-metadata.d.ts +0 -5
  51. package/dist/npm/package-metadata.js +0 -14
  52. package/dist/npm/utils.d.ts +0 -24
  53. package/dist/npm/utils.js +0 -86
@@ -1,100 +0,0 @@
1
- import { TooltipEvent, TooltipPositionEvent } from './events';
2
- import { TooltipPosition } from './utils';
3
- /**
4
- * Represents the props of the [Kendo UI for Vue Tooltip component]({% slug overview_tooltip %}).
5
- */
6
- export interface TooltipProps {
7
- /**
8
- * Sets the anchor element of the Tooltip.
9
- *
10
- * The available options are:
11
- * - (Default) `pointer`—Shows a Tooltip where the cursor is located.
12
- * - `target`—Positions the Tooltip based on the anchor element.
13
- */
14
- anchorElement?: string;
15
- /**
16
- * Defines the container to which the Tooltip will be appended. Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
17
- */
18
- appendTo?: HTMLElement | null;
19
- /**
20
- * Sets the position of the Tooltip ([see example]({% slug positioning_tooltip %})).
21
- *
22
- * The available options are:
23
- * - (Default) `auto`—Positions the Tooltip depending on the available space.
24
- * - `right`—Positions the Tooltip to the right side of the element.
25
- * - `left`—Positions the Tooltip to the left side of the element.
26
- * - `bottom`—Positions the Tooltip at the bottom of the element.
27
- * - `top`—Positions the Tooltip at the top of the element.
28
- */
29
- position?: TooltipPosition | String;
30
- /**
31
- * Sets a class of the Tooltip animation container.
32
- */
33
- className?: string;
34
- /**
35
- * Sets a class of the Tooltip animation container.
36
- */
37
- wrapperStyle?: object;
38
- /**
39
- * Sets the content of the Tooltip ([see example]({% slug templates_tooltip %})).
40
- */
41
- content?: any;
42
- /**
43
- * Specifies if the Tooltip will be open.
44
- * Sets the Tooltip in its controlled mode ([see example]({% slug controlledmode_tooltip %})).
45
- * Requires you to set the `targetElement` property.
46
- */
47
- open?: boolean;
48
- /**
49
- * Sets a delay in milliseconds.
50
- */
51
- openDelay?: number;
52
- /**
53
- * If any of the parent elements has a title, displays a Tooltip.
54
- */
55
- parentTitle?: boolean;
56
- /**
57
- * Specifies if the Tooltip callout will be displayed.
58
- */
59
- showCallout?: boolean;
60
- /**
61
- * When the position is set to `auto`, sets the start point of the Tooltip callout (in pixels).
62
- */
63
- setCalloutOnPositionAuto?: any;
64
- /**
65
- * Sets the Tooltip target element. You have to use it with the `open` property.
66
- */
67
- targetElement?: any;
68
- /**
69
- * Specifies the CSS class names which are set to the Tooltip DOM element.
70
- */
71
- tooltipClassName?: string;
72
- /**
73
- * Specifies the styles which are set to the Tooltip DOM element.
74
- */
75
- tooltipStyle?: any;
76
- /**
77
- * Callback called when the Tooltip calculates it's position. Useful to modify the default position behavior.
78
- * Require to return the `top` and `left` position of the Tooltip.
79
- */
80
- updatePosition?: (event: TooltipPositionEvent) => {
81
- top: number;
82
- left: number;
83
- };
84
- /**
85
- * Fires when the Tooltip is shown.
86
- */
87
- onOpen?: (event: TooltipEvent) => void;
88
- /**
89
- * Fires when the Tooltip is hidden.
90
- */
91
- onClose?: (event: TooltipEvent) => void;
92
- /**
93
- * Represents a callback function which determines if a Tooltip will be displayed ([see example]({% slug filter_elements_tooltip %})).
94
- */
95
- filter?: (target: HTMLElement) => void;
96
- /**
97
- * The milliseconds interval on which the Tooltip will check for title change. By default the Tooltip does not track for title updates.
98
- */
99
- updateInterval?: number;
100
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- // tslint:enable:max-line-length
@@ -1,21 +0,0 @@
1
- // @ts-ignore
2
- import { DefineComponent } from 'vue';
3
- // @ts-ignore
4
- import * as Vue from 'vue';
5
-
6
- /**
7
- * @hidden
8
- */
9
- // @ts-ignore
10
- type Vue2type = Vue.default;
11
-
12
- /**
13
- * @hidden
14
- */
15
- // @ts-ignore
16
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
17
- /**
18
- * @hidden
19
- */
20
- // @ts-ignore
21
- export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
@@ -1,34 +0,0 @@
1
- import { TooltipPosition } from './utils';
2
- export interface TooltipEvent {
3
- event: any;
4
- }
5
- export interface TooltipPositionEvent {
6
- /**
7
- * The Tooltip element. Useful to get the actual `width` and `height` of rendered Tooltip.
8
- */
9
- element: HTMLDivElement;
10
- /**
11
- * The current target element. Useful to calculate `top` and `left` position of the Tooltip element.
12
- */
13
- targetElement: HTMLElement | null;
14
- /**
15
- * The current mouse `top` position;
16
- */
17
- mouseTop: number;
18
- /**
19
- * The current mouse `left` position.
20
- */
21
- mouseLeft: number;
22
- /**
23
- * The Tooltip anchor element prop.
24
- */
25
- anchorElement?: string;
26
- /**
27
- * The Tooltip position prop.
28
- */
29
- position?: TooltipPosition;
30
- /**
31
- * The Tooltip default calculated position.
32
- */
33
- defaultPosition?: TooltipPosition;
34
- }
package/dist/es/events.js DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/es/main.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import { Tooltip, TooltipVue2 } from './Tooltip';
2
- import { TooltipProps } from './TooltipProps';
3
- import { TooltipEvent, TooltipPositionEvent } from './events';
4
- import { TooltipPosition } from './utils';
5
- export { Tooltip, TooltipVue2, TooltipEvent, TooltipPositionEvent, TooltipProps, TooltipPosition };
package/dist/es/main.js DELETED
@@ -1,2 +0,0 @@
1
- import { Tooltip, TooltipVue2 } from './Tooltip';
2
- export { Tooltip, TooltipVue2 };
@@ -1,5 +0,0 @@
1
- import { PackageMetadata } from '@progress/kendo-licensing';
2
- /**
3
- * @hidden
4
- */
5
- export declare const packageMetadata: PackageMetadata;
@@ -1,11 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export var packageMetadata = {
5
- name: '@progress/kendo-vue-tooltip',
6
- productName: 'Kendo UI for Vue',
7
- productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
8
- publishDate: 1728906101,
9
- version: '',
10
- licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
11
- };
@@ -1,24 +0,0 @@
1
- /**
2
- * @hidden
3
- */
4
- export declare type TooltipPosition = 'right' | 'left' | 'bottom' | 'top' | 'auto';
5
- /**
6
- * @hidden
7
- */
8
- export declare const getLeftPosition: (left: any, elementWidth: any, targetElement: any, anchorElement: any, position: any) => any;
9
- /**
10
- * @hidden
11
- */
12
- export declare const getTopPosition: (top: any, targetElement: any, elementHeight: any, anchorElement: any, position: any) => any;
13
- /**
14
- * @hidden
15
- */
16
- export declare const getDomRect: (currentTarget: any) => any;
17
- /**
18
- * @hidden
19
- */
20
- export declare const toolTipSelectors: string[];
21
- /**
22
- * @hidden
23
- */
24
- export declare const isTooltipElement: (element: any) => boolean;
package/dist/es/utils.js DELETED
@@ -1,76 +0,0 @@
1
- import { canUseDOM } from '@progress/kendo-vue-common';
2
- var arrowWidth = 10;
3
- var arrowHeight = 10;
4
- /**
5
- * @hidden
6
- */
7
- export var getLeftPosition = function getLeftPosition(left, elementWidth, targetElement, anchorElement, position) {
8
- switch (position) {
9
- case 'bottom':
10
- return anchorElement === 'pointer' ? left - elementWidth / 2 : targetElement.left - elementWidth / 2 + targetElement.width / 2;
11
- case 'left':
12
- return anchorElement === 'pointer' ? left - elementWidth - arrowWidth : targetElement.left - elementWidth - arrowWidth;
13
- case 'right':
14
- return anchorElement === 'pointer' ? left + arrowWidth : targetElement.right + arrowWidth;
15
- case 'top':
16
- return anchorElement === 'pointer' ? left - elementWidth / 2 : targetElement.left - elementWidth / 2 + targetElement.width / 2;
17
- default:
18
- if (anchorElement === 'pointer') {
19
- return canUseDOM && left < window.screen.availWidth / 2 ? left - arrowWidth : left - elementWidth + arrowWidth;
20
- } else {
21
- return canUseDOM && left < window.screen.availWidth / 2 ? targetElement.left : targetElement.right - elementWidth;
22
- }
23
- }
24
- };
25
- /**
26
- * @hidden
27
- */
28
- export var getTopPosition = function getTopPosition(top, targetElement, elementHeight, anchorElement, position) {
29
- switch (position) {
30
- case 'bottom':
31
- return anchorElement === 'pointer' ? top + arrowHeight : targetElement.bottom + arrowHeight;
32
- case 'left':
33
- return anchorElement === 'pointer' ? top - elementHeight / 2 : targetElement.top - elementHeight / 2 + targetElement.height / 2;
34
- case 'right':
35
- return anchorElement === 'pointer' ? top - elementHeight / 2 : targetElement.top - elementHeight / 2 + targetElement.height / 2;
36
- case 'top':
37
- return anchorElement === 'pointer' ? top - elementHeight - arrowHeight : targetElement.top - elementHeight - arrowHeight;
38
- default:
39
- if (anchorElement === 'pointer') {
40
- return canUseDOM && top < window.innerHeight / 2 ? top + arrowWidth : top - elementHeight - arrowWidth;
41
- } else {
42
- return canUseDOM && top < window.innerHeight / 2 ? targetElement.bottom + arrowHeight : targetElement.top - elementHeight - arrowHeight;
43
- }
44
- }
45
- };
46
- /**
47
- * @hidden
48
- */
49
- export var getDomRect = function getDomRect(currentTarget) {
50
- if (currentTarget !== null) {
51
- return currentTarget.getBoundingClientRect();
52
- }
53
- return document.body.getBoundingClientRect();
54
- };
55
- /**
56
- * @hidden
57
- */
58
- export var toolTipSelectors = ['k-tooltip-content', 'k-animation-container', 'k-tooltip', 'k-tooltip-title', 'k-tooltip k-tooltip-closable', 'k-icon k-i-x', 'k-svg-icon k-svg-i-x'];
59
- /**
60
- * @hidden
61
- */
62
- export var isTooltipElement = function isTooltipElement(element) {
63
- if (element === null) {
64
- return false;
65
- }
66
- var node = element;
67
- while (node) {
68
- if (node !== null && node.classList && node.classList.contains('k-tooltip')) {
69
- return true;
70
- }
71
- node.parentNode !== null ? node = node.parentNode : node = false;
72
- }
73
- return toolTipSelectors.filter(function (t) {
74
- return t === element.className;
75
- }).length > 0;
76
- };
@@ -1,52 +0,0 @@
1
- import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
2
- declare type DefaultData<V> = object | ((this: V) => {});
3
- declare type DefaultMethods<V> = {
4
- [key: string]: (this: V, ...args: any[]) => any;
5
- };
6
- import { TooltipProps } from './TooltipProps';
7
- /**
8
- * @hidden
9
- */
10
- interface TooltipData {
11
- targetElement: HTMLElement | null;
12
- open: boolean;
13
- title: string;
14
- }
15
- /**
16
- * @hidden
17
- */
18
- export interface TooltipComputed {
19
- [key: string]: any;
20
- computedTarget: any;
21
- computedOpen: any;
22
- }
23
- /**
24
- * @hidden
25
- */
26
- export interface TooltipMethods {
27
- [key: string]: any;
28
- }
29
- /**
30
- * @hidden
31
- */
32
- export interface TooltipState {
33
- top: number;
34
- left: number;
35
- openTimeoutId?: any;
36
- updateIntervalId?: any;
37
- willOpen: boolean;
38
- }
39
- /**
40
- * @hidden
41
- */
42
- export interface TooltipAll extends Vue2type, TooltipMethods, TooltipData, TooltipComputed, TooltipState {
43
- }
44
- /**
45
- * @hidden
46
- */
47
- declare let TooltipVue2: ComponentOptions<TooltipAll, DefaultData<TooltipData>, DefaultMethods<TooltipAll>, TooltipComputed, RecordPropsDefinition<TooltipProps>>;
48
- /**
49
- * @hidden
50
- */
51
- declare const Tooltip: DefineComponent<TooltipProps, any, TooltipData, TooltipComputed, TooltipMethods, {}, {}, {}, string, TooltipProps, TooltipProps, {}>;
52
- export { Tooltip, TooltipVue2 };