@vaadin/component-base 24.2.0-alpha15 → 24.2.0-alpha16

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/component-base",
3
- "version": "24.2.0-alpha15",
3
+ "version": "24.2.0-alpha16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,5 +42,5 @@
42
42
  "@vaadin/testing-helpers": "^0.5.0",
43
43
  "sinon": "^13.0.2"
44
44
  },
45
- "gitHead": "043dbb1c2513685a98354921876d35fa18bca7a2"
45
+ "gitHead": "133d3aeb00dedc8be975affa81c7af4b4d22acf6"
46
46
  }
@@ -45,7 +45,7 @@ const registered = new Set();
45
45
  export const ElementMixin = (superClass) =>
46
46
  class VaadinElementMixin extends DirMixin(superClass) {
47
47
  static get version() {
48
- return '24.2.0-alpha15';
48
+ return '24.2.0-alpha16';
49
49
  }
50
50
 
51
51
  /** @protected */
@@ -28,7 +28,7 @@ export class TooltipController extends SlotController {
28
28
  * via `aria-describedby` attribute used by screen readers.
29
29
  * When not set, defaults to `target`.
30
30
  */
31
- ariaTarget: HTMLElement;
31
+ ariaTarget: HTMLElement | HTMLElement[];
32
32
 
33
33
  /**
34
34
  * Object with properties passed to `generator`
@@ -62,7 +62,7 @@ export class TooltipController extends SlotController {
62
62
  * Set an HTML element for linking with the tooltip overlay
63
63
  * via `aria-describedby` attribute used by screen readers.
64
64
  */
65
- setAriaTarget(ariaTarget: HTMLElement): void;
65
+ setAriaTarget(ariaTarget: HTMLElement | HTMLElement[]): void;
66
66
 
67
67
  /**
68
68
  * Set a context object to be used by generator.
@@ -49,6 +49,19 @@ export class TooltipController extends SlotController {
49
49
  if (this.shouldShow !== undefined) {
50
50
  tooltipNode.shouldShow = this.shouldShow;
51
51
  }
52
+
53
+ this.__notifyChange();
54
+ }
55
+
56
+ /**
57
+ * Override to notify the host when the tooltip is removed.
58
+ *
59
+ * @param {Node} tooltipNode
60
+ * @protected
61
+ * @override
62
+ */
63
+ teardownNode() {
64
+ this.__notifyChange();
52
65
  }
53
66
 
54
67
  /**
@@ -145,4 +158,9 @@ export class TooltipController extends SlotController {
145
158
  tooltipNode.target = target;
146
159
  }
147
160
  }
161
+
162
+ /** @private */
163
+ __notifyChange() {
164
+ this.dispatchEvent(new CustomEvent('tooltip-changed', { detail: { node: this.node } }));
165
+ }
148
166
  }