@vaadin/tooltip 25.2.0-alpha10 → 25.2.0-alpha12
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 +12 -12
- package/src/vaadin-tooltip-mixin.js +8 -5
- package/src/vaadin-tooltip-overlay.js +0 -3
- package/src/vaadin-tooltip.js +0 -3
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/tooltip",
|
|
3
|
-
"version": "25.2.0-
|
|
3
|
+
"version": "25.2.0-alpha12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.2.0-
|
|
39
|
-
"@vaadin/component-base": "25.2.0-
|
|
40
|
-
"@vaadin/markdown": "25.2.0-
|
|
41
|
-
"@vaadin/overlay": "25.2.0-
|
|
42
|
-
"@vaadin/popover": "25.2.0-
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.2.0-alpha12",
|
|
39
|
+
"@vaadin/component-base": "25.2.0-alpha12",
|
|
40
|
+
"@vaadin/markdown": "25.2.0-alpha12",
|
|
41
|
+
"@vaadin/overlay": "25.2.0-alpha12",
|
|
42
|
+
"@vaadin/popover": "25.2.0-alpha12",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-alpha12",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vaadin/aura": "25.2.0-
|
|
48
|
-
"@vaadin/chai-plugins": "25.2.0-
|
|
49
|
-
"@vaadin/test-runner-commands": "25.2.0-
|
|
47
|
+
"@vaadin/aura": "25.2.0-alpha12",
|
|
48
|
+
"@vaadin/chai-plugins": "25.2.0-alpha12",
|
|
49
|
+
"@vaadin/test-runner-commands": "25.2.0-alpha12",
|
|
50
50
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
51
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
51
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-alpha12",
|
|
52
52
|
"sinon": "^21.0.2"
|
|
53
53
|
},
|
|
54
54
|
"customElements": "custom-elements.json",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"web-types.json",
|
|
57
57
|
"web-types.lit.json"
|
|
58
58
|
],
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "ae1e4373aec3653d63a45b6be18eee36f4b245a1"
|
|
60
60
|
}
|
|
@@ -216,10 +216,6 @@ class TooltipStateController {
|
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* A mixin providing common tooltip functionality.
|
|
219
|
-
*
|
|
220
|
-
* @polymerMixin
|
|
221
|
-
* @mixes PopoverPositionMixin
|
|
222
|
-
* @mixes PopoverTargetMixin
|
|
223
219
|
*/
|
|
224
220
|
export const TooltipMixin = (superClass) =>
|
|
225
221
|
class TooltipMixinClass extends PopoverPositionMixin(PopoverTargetMixin(superClass)) {
|
|
@@ -241,6 +237,7 @@ export const TooltipMixin = (superClass) =>
|
|
|
241
237
|
*/
|
|
242
238
|
context: {
|
|
243
239
|
type: Object,
|
|
240
|
+
sync: true,
|
|
244
241
|
value: () => {
|
|
245
242
|
return {};
|
|
246
243
|
},
|
|
@@ -706,6 +703,8 @@ export const TooltipMixin = (superClass) =>
|
|
|
706
703
|
async __updateContent() {
|
|
707
704
|
const content = typeof this.generator === 'function' ? this.generator(this.context) : this.text;
|
|
708
705
|
|
|
706
|
+
const oldTextContent = this.__contentNode.textContent;
|
|
707
|
+
|
|
709
708
|
if (this.markdown && content) {
|
|
710
709
|
const helpers = await this.constructor.__importMarkdownHelpers();
|
|
711
710
|
helpers.renderMarkdownToElement(this.__contentNode, content);
|
|
@@ -714,7 +713,11 @@ export const TooltipMixin = (superClass) =>
|
|
|
714
713
|
}
|
|
715
714
|
|
|
716
715
|
this.$.overlay.toggleAttribute('hidden', this.__contentNode.textContent.trim() === '');
|
|
717
|
-
|
|
716
|
+
|
|
717
|
+
const newTextContent = this.__contentNode.textContent;
|
|
718
|
+
if (newTextContent !== oldTextContent) {
|
|
719
|
+
this.dispatchEvent(new CustomEvent('content-changed', { detail: { content: newTextContent } }));
|
|
720
|
+
}
|
|
718
721
|
}
|
|
719
722
|
|
|
720
723
|
/** @private */
|
|
@@ -18,9 +18,6 @@ import { tooltipOverlayStyles } from './styles/vaadin-tooltip-overlay-base-style
|
|
|
18
18
|
*
|
|
19
19
|
* @customElement vaadin-tooltip-overlay
|
|
20
20
|
* @extends HTMLElement
|
|
21
|
-
* @mixes DirMixin
|
|
22
|
-
* @mixes ThemableMixin
|
|
23
|
-
* @mixes PopoverOverlayMixin
|
|
24
21
|
* @private
|
|
25
22
|
*/
|
|
26
23
|
class TooltipOverlay extends PopoverOverlayMixin(
|
package/src/vaadin-tooltip.js
CHANGED
|
@@ -75,9 +75,6 @@ import { TooltipMixin } from './vaadin-tooltip-mixin.js';
|
|
|
75
75
|
*
|
|
76
76
|
* @customElement vaadin-tooltip
|
|
77
77
|
* @extends HTMLElement
|
|
78
|
-
* @mixes ElementMixin
|
|
79
|
-
* @mixes ThemePropertyMixin
|
|
80
|
-
* @mixes TooltipMixin
|
|
81
78
|
*/
|
|
82
79
|
class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement)))) {
|
|
83
80
|
static get is() {
|
package/web-types.json
CHANGED