@vaadin/tooltip 25.0.0-alpha16 → 25.0.0-alpha17
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/package.json +11 -11
- package/src/vaadin-tooltip-mixin.js +7 -0
- package/src/vaadin-tooltip.d.ts +25 -0
- package/src/vaadin-tooltip.js +2 -0
- package/web-types.json +7 -2
- package/web-types.lit.json +8 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/tooltip",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
38
|
-
"@vaadin/component-base": "25.0.0-
|
|
39
|
-
"@vaadin/overlay": "25.0.0-
|
|
40
|
-
"@vaadin/popover": "25.0.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha17",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha17",
|
|
39
|
+
"@vaadin/overlay": "25.0.0-alpha17",
|
|
40
|
+
"@vaadin/popover": "25.0.0-alpha17",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha17",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
46
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
45
|
+
"@vaadin/chai-plugins": "25.0.0-alpha17",
|
|
46
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha17",
|
|
47
47
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
49
|
-
"sinon": "^
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha17",
|
|
49
|
+
"sinon": "^21.0.0"
|
|
50
50
|
},
|
|
51
51
|
"web-types": [
|
|
52
52
|
"web-types.json",
|
|
53
53
|
"web-types.lit.json"
|
|
54
54
|
],
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "8264c71309907be99368b09414f0f8d7f591e0b9"
|
|
56
56
|
}
|
|
@@ -669,6 +669,7 @@ export const TooltipMixin = (superClass) =>
|
|
|
669
669
|
/** @private */
|
|
670
670
|
__updateContent() {
|
|
671
671
|
this.__contentNode.textContent = typeof this.generator === 'function' ? this.generator(this.context) : this.text;
|
|
672
|
+
this.dispatchEvent(new CustomEvent('content-changed', { detail: { content: this.__contentNode.textContent } }));
|
|
672
673
|
}
|
|
673
674
|
|
|
674
675
|
/** @private */
|
|
@@ -692,4 +693,10 @@ export const TooltipMixin = (superClass) =>
|
|
|
692
693
|
});
|
|
693
694
|
}
|
|
694
695
|
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Fired when the tooltip text content is changed.
|
|
699
|
+
*
|
|
700
|
+
* @event content-changed
|
|
701
|
+
*/
|
|
695
702
|
};
|
package/src/vaadin-tooltip.d.ts
CHANGED
|
@@ -9,6 +9,17 @@ import { TooltipMixin } from './vaadin-tooltip-mixin.js';
|
|
|
9
9
|
|
|
10
10
|
export { TooltipPosition } from './vaadin-tooltip-mixin.js';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Fired when the tooltip text content is changed.
|
|
14
|
+
*/
|
|
15
|
+
export type TooltipContentChangedEvent = CustomEvent<{ content: string }>;
|
|
16
|
+
|
|
17
|
+
export interface TooltipCustomEventMap {
|
|
18
|
+
'content-changed': TooltipContentChangedEvent;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface TooltipEventMap extends HTMLElementEventMap, TooltipCustomEventMap {}
|
|
22
|
+
|
|
12
23
|
/**
|
|
13
24
|
* `<vaadin-tooltip>` is a Web Component for creating tooltips.
|
|
14
25
|
*
|
|
@@ -44,6 +55,8 @@ export { TooltipPosition } from './vaadin-tooltip-mixin.js';
|
|
|
44
55
|
* `--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target
|
|
45
56
|
*
|
|
46
57
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
58
|
+
*
|
|
59
|
+
* @fires {CustomEvent} content-changed - Fired when the tooltip text content is changed.
|
|
47
60
|
*/
|
|
48
61
|
declare class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(HTMLElement))) {
|
|
49
62
|
/**
|
|
@@ -63,6 +76,18 @@ declare class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(HTMLE
|
|
|
63
76
|
* except for those that have hover delay configured using property.
|
|
64
77
|
*/
|
|
65
78
|
static setDefaultHoverDelay(hoverDelay: number): void;
|
|
79
|
+
|
|
80
|
+
addEventListener<K extends keyof TooltipEventMap>(
|
|
81
|
+
type: K,
|
|
82
|
+
listener: (this: Tooltip, ev: TooltipEventMap[K]) => void,
|
|
83
|
+
options?: AddEventListenerOptions | boolean,
|
|
84
|
+
): void;
|
|
85
|
+
|
|
86
|
+
removeEventListener<K extends keyof TooltipEventMap>(
|
|
87
|
+
type: K,
|
|
88
|
+
listener: (this: Tooltip, ev: TooltipEventMap[K]) => void,
|
|
89
|
+
options?: EventListenerOptions | boolean,
|
|
90
|
+
): void;
|
|
66
91
|
}
|
|
67
92
|
|
|
68
93
|
declare global {
|
package/src/vaadin-tooltip.js
CHANGED
|
@@ -48,6 +48,8 @@ import { TooltipMixin } from './vaadin-tooltip-mixin.js';
|
|
|
48
48
|
*
|
|
49
49
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
50
50
|
*
|
|
51
|
+
* @fires {CustomEvent} content-changed - Fired when the tooltip text content is changed.
|
|
52
|
+
*
|
|
51
53
|
* @customElement
|
|
52
54
|
* @extends HTMLElement
|
|
53
55
|
* @mixes ElementMixin
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/tooltip",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha17",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -256,7 +256,12 @@
|
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
],
|
|
259
|
-
"events": [
|
|
259
|
+
"events": [
|
|
260
|
+
{
|
|
261
|
+
"name": "content-changed",
|
|
262
|
+
"description": "Fired when the tooltip text content is changed."
|
|
263
|
+
}
|
|
264
|
+
]
|
|
260
265
|
}
|
|
261
266
|
}
|
|
262
267
|
]
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/tooltip",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha17",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -109,6 +109,13 @@
|
|
|
109
109
|
"value": {
|
|
110
110
|
"kind": "expression"
|
|
111
111
|
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "@content-changed",
|
|
115
|
+
"description": "Fired when the tooltip text content is changed.",
|
|
116
|
+
"value": {
|
|
117
|
+
"kind": "expression"
|
|
118
|
+
}
|
|
112
119
|
}
|
|
113
120
|
]
|
|
114
121
|
}
|