@vaadin/tooltip 25.0.0-alpha6 → 25.0.0-alpha8

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/tooltip",
3
- "version": "25.0.0-alpha6",
3
+ "version": "25.0.0-alpha8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,17 +37,17 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.0.0-alpha6",
41
- "@vaadin/component-base": "25.0.0-alpha6",
42
- "@vaadin/overlay": "25.0.0-alpha6",
43
- "@vaadin/popover": "25.0.0-alpha6",
44
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha6",
45
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha6",
40
+ "@vaadin/a11y-base": "25.0.0-alpha8",
41
+ "@vaadin/component-base": "25.0.0-alpha8",
42
+ "@vaadin/overlay": "25.0.0-alpha8",
43
+ "@vaadin/popover": "25.0.0-alpha8",
44
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
45
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "25.0.0-alpha6",
50
- "@vaadin/test-runner-commands": "25.0.0-alpha6",
49
+ "@vaadin/chai-plugins": "25.0.0-alpha8",
50
+ "@vaadin/test-runner-commands": "25.0.0-alpha8",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
52
  "sinon": "^18.0.0"
53
53
  },
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "cd1d084198d2b326c58d44bb39fa4845b71ce551"
58
+ "gitHead": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
59
59
  }
@@ -7,50 +7,52 @@ import '@vaadin/component-base/src/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const tooltipOverlayStyles = css`
10
- @layer base {
11
- [part='overlay'] {
12
- max-width: var(--vaadin-tooltip-max-width, 40ch);
13
- padding: var(--vaadin-tooltip-padding, var(--vaadin-padding-container));
14
- border-radius: var(--vaadin-tooltip-border-radius, var(--vaadin-radius-m));
15
- background: var(--vaadin-tooltip-background, var(--vaadin-background-color));
16
- color: var(--vaadin-tooltip-color, inherit);
17
- font-size: var(--vaadin-tooltip-font-size, 0.9em);
18
- font-weight: var(--vaadin-tooltip-font-weight, inherit);
19
- line-height: var(--vaadin-tooltip-line-height, inherit);
20
- border: 0;
21
- box-shadow:
22
- 0 0 0 var(--vaadin-tooltip-border-width, 1px) var(--vaadin-tooltip-border-color, var(--vaadin-border-color)),
23
- var(--vaadin-tooltip-box-shadow, 0 3px 8px -1px rgba(0, 0, 0, 0.2));
24
- }
10
+ :host {
11
+ --_vaadin-tooltip-default-offset: 4px;
12
+ }
25
13
 
26
- [part='content'] {
27
- white-space: pre-wrap;
28
- }
14
+ [part='overlay'] {
15
+ max-width: var(--vaadin-tooltip-max-width, 40ch);
16
+ padding: var(--vaadin-tooltip-padding, var(--vaadin-padding-container));
17
+ border-radius: var(--vaadin-tooltip-border-radius, var(--vaadin-radius-m));
18
+ background: var(--vaadin-tooltip-background, var(--vaadin-background-color));
19
+ color: var(--vaadin-tooltip-color, inherit);
20
+ font-size: var(--vaadin-tooltip-font-size, 0.9em);
21
+ font-weight: var(--vaadin-tooltip-font-weight, inherit);
22
+ line-height: var(--vaadin-tooltip-line-height, inherit);
23
+ border: 0;
24
+ box-shadow:
25
+ 0 0 0 var(--vaadin-tooltip-border-width, 1px) var(--vaadin-tooltip-border-color, var(--vaadin-border-color)),
26
+ var(--vaadin-tooltip-box-shadow, 0 3px 8px -1px rgba(0, 0, 0, 0.2));
27
+ }
29
28
 
30
- :host([position^='top'][top-aligned]) [part='overlay'],
31
- :host([position^='bottom'][top-aligned]) [part='overlay'] {
32
- margin-top: var(--vaadin-tooltip-offset-top, 0.25rem);
33
- }
29
+ [part='content'] {
30
+ white-space: pre-wrap;
31
+ }
34
32
 
35
- :host([position^='top'][bottom-aligned]) [part='overlay'],
36
- :host([position^='bottom'][bottom-aligned]) [part='overlay'] {
37
- margin-bottom: var(--vaadin-tooltip-offset-bottom, 0.25rem);
38
- }
33
+ :host([position^='top'][top-aligned]) [part='overlay'],
34
+ :host([position^='bottom'][top-aligned]) [part='overlay'] {
35
+ margin-top: var(--vaadin-tooltip-offset-top, var(--_vaadin-tooltip-default-offset));
36
+ }
39
37
 
40
- :host([position^='start'][start-aligned]) [part='overlay'],
41
- :host([position^='end'][start-aligned]) [part='overlay'] {
42
- margin-inline-start: var(--vaadin-tooltip-offset-start, 0.25rem);
43
- }
38
+ :host([position^='top'][bottom-aligned]) [part='overlay'],
39
+ :host([position^='bottom'][bottom-aligned]) [part='overlay'] {
40
+ margin-bottom: var(--vaadin-tooltip-offset-bottom, var(--_vaadin-tooltip-default-offset));
41
+ }
44
42
 
45
- :host([position^='start'][end-aligned]) [part='overlay'],
46
- :host([position^='end'][end-aligned]) [part='overlay'] {
47
- margin-inline-end: var(--vaadin-tooltip-offset-end, 0.25rem);
48
- }
43
+ :host([position^='start'][start-aligned]) [part='overlay'],
44
+ :host([position^='end'][start-aligned]) [part='overlay'] {
45
+ margin-inline-start: var(--vaadin-tooltip-offset-start, var(--_vaadin-tooltip-default-offset));
46
+ }
47
+
48
+ :host([position^='start'][end-aligned]) [part='overlay'],
49
+ :host([position^='end'][end-aligned]) [part='overlay'] {
50
+ margin-inline-end: var(--vaadin-tooltip-offset-end, var(--_vaadin-tooltip-default-offset));
51
+ }
49
52
 
50
- @media (forced-colors: active) {
51
- [part='overlay'] {
52
- border: 1px dashed;
53
- }
53
+ @media (forced-colors: active) {
54
+ [part='overlay'] {
55
+ border: 1px dashed;
54
56
  }
55
57
  }
56
58
  `;
@@ -6,6 +6,10 @@
6
6
  import { css } from 'lit';
7
7
 
8
8
  export const tooltipOverlayStyles = css`
9
+ :host {
10
+ --_vaadin-tooltip-default-offset: 0;
11
+ }
12
+
9
13
  [part='overlay'] {
10
14
  max-width: 40ch;
11
15
  }
@@ -16,22 +20,22 @@ export const tooltipOverlayStyles = css`
16
20
 
17
21
  :host([position^='top'][top-aligned]) [part='overlay'],
18
22
  :host([position^='bottom'][top-aligned]) [part='overlay'] {
19
- margin-top: var(--vaadin-tooltip-offset-top, 0);
23
+ margin-top: var(--vaadin-tooltip-offset-top, var(--_vaadin-tooltip-default-offset));
20
24
  }
21
25
 
22
26
  :host([position^='top'][bottom-aligned]) [part='overlay'],
23
27
  :host([position^='bottom'][bottom-aligned]) [part='overlay'] {
24
- margin-bottom: var(--vaadin-tooltip-offset-bottom, 0);
28
+ margin-bottom: var(--vaadin-tooltip-offset-bottom, var(--_vaadin-tooltip-default-offset));
25
29
  }
26
30
 
27
31
  :host([position^='start'][start-aligned]) [part='overlay'],
28
32
  :host([position^='end'][start-aligned]) [part='overlay'] {
29
- margin-inline-start: var(--vaadin-tooltip-offset-start, 0);
33
+ margin-inline-start: var(--vaadin-tooltip-offset-start, var(--_vaadin-tooltip-default-offset));
30
34
  }
31
35
 
32
36
  :host([position^='start'][end-aligned]) [part='overlay'],
33
37
  :host([position^='end'][end-aligned]) [part='overlay'] {
34
- margin-inline-end: var(--vaadin-tooltip-offset-end, 0);
38
+ margin-inline-end: var(--vaadin-tooltip-offset-end, var(--_vaadin-tooltip-default-offset));
35
39
  }
36
40
 
37
41
  @media (forced-colors: active) {
@@ -330,7 +330,6 @@ export const TooltipMixin = (superClass) =>
330
330
  */
331
331
  text: {
332
332
  type: String,
333
- observer: '__textChanged',
334
333
  },
335
334
 
336
335
  /**
@@ -366,26 +365,9 @@ export const TooltipMixin = (superClass) =>
366
365
  type: Boolean,
367
366
  sync: true,
368
367
  },
369
-
370
- /** @private */
371
- _srLabel: {
372
- type: Object,
373
- },
374
-
375
- /** @private */
376
- _overlayContent: {
377
- type: String,
378
- },
379
368
  };
380
369
  }
381
370
 
382
- static get observers() {
383
- return [
384
- '__generatorChanged(_overlayElement, generator, context)',
385
- '__updateSrLabelText(_srLabel, _overlayContent)',
386
- ];
387
- }
388
-
389
371
  /**
390
372
  * Sets the default focus delay to be used by all tooltip instances,
391
373
  * except for those that have focus delay configured using property.
@@ -420,7 +402,6 @@ export const TooltipMixin = (superClass) =>
420
402
  super();
421
403
 
422
404
  this._uniqueId = `vaadin-tooltip-${generateUniqueId()}`;
423
- this._renderer = this.__tooltipRenderer.bind(this);
424
405
 
425
406
  this.__onFocusin = this.__onFocusin.bind(this);
426
407
  this.__onFocusout = this.__onFocusout.bind(this);
@@ -467,19 +448,24 @@ export const TooltipMixin = (superClass) =>
467
448
 
468
449
  this._overlayElement = this.$.overlay;
469
450
 
470
- this._srLabelController = new SlotController(this, 'sr-label', 'div', {
451
+ this.__contentController = new SlotController(this, 'overlay', 'div', {
471
452
  initializer: (element) => {
472
453
  element.id = this._uniqueId;
473
454
  element.setAttribute('role', 'tooltip');
474
- this._srLabel = element;
455
+ this.__contentNode = element;
475
456
  },
476
457
  });
477
- this.addController(this._srLabelController);
458
+ this.addController(this.__contentController);
478
459
  }
479
460
 
480
- /** @private */
481
- __computeOpened(manual, opened, autoOpened, connected) {
482
- return connected && (manual ? opened : autoOpened);
461
+ /** @protected */
462
+ updated(props) {
463
+ super.updated(props);
464
+
465
+ if (props.has('text') || props.has('generator') || props.has('context')) {
466
+ this.__updateContent();
467
+ this.$.overlay.toggleAttribute('hidden', this.__contentNode.textContent.trim() === '');
468
+ }
483
469
  }
484
470
 
485
471
  /** @private */
@@ -688,18 +674,8 @@ export const TooltipMixin = (superClass) =>
688
674
  }
689
675
 
690
676
  /** @private */
691
- __textChanged(text, oldText) {
692
- if (this._overlayElement && (text || oldText)) {
693
- this._overlayElement.requestContentUpdate();
694
- }
695
- }
696
-
697
- /** @private */
698
- __tooltipRenderer(root) {
699
- root.textContent = typeof this.generator === 'function' ? this.generator(this.context) : this.text;
700
-
701
- // Update the sr-only label text content
702
- this._overlayContent = root.textContent;
677
+ __updateContent() {
678
+ this.__contentNode.textContent = typeof this.generator === 'function' ? this.generator(this.context) : this.text;
703
679
  }
704
680
 
705
681
  /** @private */
@@ -723,23 +699,4 @@ export const TooltipMixin = (superClass) =>
723
699
  });
724
700
  }
725
701
  }
726
-
727
- /** @private */
728
- __generatorChanged(overlayElement, generator, context) {
729
- if (overlayElement) {
730
- if (generator !== this.__oldTextGenerator || context !== this.__oldContext) {
731
- overlayElement.requestContentUpdate();
732
- }
733
-
734
- this.__oldTextGenerator = generator;
735
- this.__oldContext = context;
736
- }
737
- }
738
-
739
- /** @private */
740
- __updateSrLabelText(srLabel, textContent) {
741
- if (srLabel) {
742
- srLabel.textContent = textContent;
743
- }
744
- }
745
702
  };
@@ -24,7 +24,7 @@ import { tooltipOverlayStyles } from './styles/vaadin-tooltip-overlay-core-style
24
24
  * @private
25
25
  */
26
26
  class TooltipOverlay extends PopoverOverlayMixin(
27
- DirMixin(ThemableMixin(LumoInjectionMixin(PolylitMixin(LitElement)))),
27
+ DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
28
28
  ) {
29
29
  static get is() {
30
30
  return 'vaadin-tooltip-overlay';
@@ -34,29 +34,29 @@ class TooltipOverlay extends PopoverOverlayMixin(
34
34
  return [overlayStyles, tooltipOverlayStyles];
35
35
  }
36
36
 
37
- /**
38
- * Tag name prefix used by custom properties.
39
- * @protected
40
- * @return {string}
41
- */
42
- get _tagNamePrefix() {
43
- return 'vaadin-tooltip';
44
- }
45
-
46
37
  /** @protected */
47
38
  render() {
48
39
  return html`
49
- <div id="backdrop" part="backdrop" hidden></div>
50
40
  <div part="overlay" id="overlay">
51
41
  <div part="content" id="content"><slot></slot></div>
52
42
  </div>
53
43
  `;
54
44
  }
55
45
 
56
- requestContentUpdate() {
57
- super.requestContentUpdate();
46
+ /**
47
+ * @protected
48
+ * @override
49
+ */
50
+ _attachOverlay() {
51
+ this.showPopover();
52
+ }
58
53
 
59
- this.toggleAttribute('hidden', this.textContent.trim() === '');
54
+ /**
55
+ * @protected
56
+ * @override
57
+ */
58
+ _detachOverlay() {
59
+ this.hidePopover();
60
60
  }
61
61
  }
62
62
 
@@ -19,11 +19,12 @@ export { TooltipPosition } from './vaadin-tooltip-mixin.js';
19
19
  *
20
20
  * ### Styling
21
21
  *
22
- * `<vaadin-tooltip>` uses `<vaadin-tooltip-overlay>` internal
23
- * themable component as the actual visible overlay.
22
+ * The following shadow DOM parts are available for styling:
24
23
  *
25
- * See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation
26
- * for `<vaadin-tooltip-overlay>` parts.
24
+ * Part name | Description
25
+ * ----------- | ---------------
26
+ * `overlay` | The overlay element
27
+ * `content` | The overlay content element
27
28
  *
28
29
  * The following state attributes are available for styling:
29
30
  *
@@ -9,7 +9,6 @@ import { ifDefined } from 'lit/directives/if-defined.js';
9
9
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
10
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
11
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
- import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
13
12
  import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
14
13
  import { TooltipMixin } from './vaadin-tooltip-mixin.js';
15
14
 
@@ -23,11 +22,12 @@ import { TooltipMixin } from './vaadin-tooltip-mixin.js';
23
22
  *
24
23
  * ### Styling
25
24
  *
26
- * `<vaadin-tooltip>` uses `<vaadin-tooltip-overlay>` internal
27
- * themable component as the actual visible overlay.
25
+ * The following shadow DOM parts are available for styling:
28
26
  *
29
- * See [`<vaadin-overlay>`](#/elements/vaadin-overlay) documentation
30
- * for `<vaadin-tooltip-overlay>` parts.
27
+ * Part name | Description
28
+ * ----------- | ---------------
29
+ * `overlay` | The overlay element
30
+ * `content` | The overlay content element
31
31
  *
32
32
  * The following state attributes are available for styling:
33
33
  *
@@ -57,7 +57,7 @@ import { TooltipMixin } from './vaadin-tooltip-mixin.js';
57
57
  * @mixes ThemePropertyMixin
58
58
  * @mixes TooltipMixin
59
59
  */
60
- class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(LumoInjectionMixin(PolylitMixin(LitElement))))) {
60
+ class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement)))) {
61
61
  static get is() {
62
62
  return 'vaadin-tooltip';
63
63
  }
@@ -65,7 +65,7 @@ class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(LumoInjection
65
65
  static get styles() {
66
66
  return css`
67
67
  :host {
68
- display: none;
68
+ display: contents;
69
69
  }
70
70
  `;
71
71
  }
@@ -77,7 +77,7 @@ class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(LumoInjection
77
77
  return html`
78
78
  <vaadin-tooltip-overlay
79
79
  id="overlay"
80
- .renderer="${this._renderer}"
80
+ popover="manual"
81
81
  .owner="${this}"
82
82
  theme="${ifDefined(this._theme)}"
83
83
  .opened="${this._isConnected && (this.manual ? this.opened : this._autoOpened)}"
@@ -90,9 +90,9 @@ class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(LumoInjection
90
90
  @mouseenter="${this.__onOverlayMouseEnter}"
91
91
  @mouseleave="${this.__onOverlayMouseLeave}"
92
92
  modeless
93
+ exportparts="overlay, content"
94
+ ><slot name="overlay"></slot
93
95
  ></vaadin-tooltip-overlay>
94
-
95
- <slot name="sr-label"></slot>
96
96
  `;
97
97
  }
98
98
  }
@@ -6,10 +6,7 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
6
6
 
7
7
  const tooltipOverlay = css`
8
8
  :host {
9
- --vaadin-tooltip-offset-top: var(--lumo-space-xs);
10
- --vaadin-tooltip-offset-bottom: var(--lumo-space-xs);
11
- --vaadin-tooltip-offset-start: var(--lumo-space-xs);
12
- --vaadin-tooltip-offset-end: var(--lumo-space-xs);
9
+ --_vaadin-tooltip-default-offset: var(--lumo-space-xs);
13
10
  }
14
11
 
15
12
  [part='overlay'] {
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/tooltip",
4
- "version": "25.0.0-alpha6",
4
+ "version": "25.0.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-tooltip",
11
- "description": "`<vaadin-tooltip>` is a Web Component for creating tooltips.\n\n```html\n<button id=\"confirm\">Confirm</button>\n<vaadin-tooltip text=\"Click to save changes\" for=\"confirm\"></vaadin-tooltip>\n```\n\n### Styling\n\n`<vaadin-tooltip>` uses `<vaadin-tooltip-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/elements/vaadin-overlay) documentation\nfor `<vaadin-tooltip-overlay>` parts.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-tooltip>` is\npropagated to the internal `<vaadin-tooltip-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-tooltip>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target\n`--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target\n`--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target\n`--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "description": "`<vaadin-tooltip>` is a Web Component for creating tooltips.\n\n```html\n<button id=\"confirm\">Confirm</button>\n<vaadin-tooltip text=\"Click to save changes\" for=\"confirm\"></vaadin-tooltip>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------- | ---------------\n`overlay` | The overlay element\n`content` | The overlay content element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-tooltip>` is\npropagated to the internal `<vaadin-tooltip-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-tooltip>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target\n`--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target\n`--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target\n`--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "overlay-class",
@@ -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-alpha6",
4
+ "version": "25.0.0-alpha8",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-tooltip",
19
- "description": "`<vaadin-tooltip>` is a Web Component for creating tooltips.\n\n```html\n<button id=\"confirm\">Confirm</button>\n<vaadin-tooltip text=\"Click to save changes\" for=\"confirm\"></vaadin-tooltip>\n```\n\n### Styling\n\n`<vaadin-tooltip>` uses `<vaadin-tooltip-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha6/#/elements/vaadin-overlay) documentation\nfor `<vaadin-tooltip-overlay>` parts.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-tooltip>` is\npropagated to the internal `<vaadin-tooltip-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-tooltip>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target\n`--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target\n`--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target\n`--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "description": "`<vaadin-tooltip>` is a Web Component for creating tooltips.\n\n```html\n<button id=\"confirm\">Confirm</button>\n<vaadin-tooltip text=\"Click to save changes\" for=\"confirm\"></vaadin-tooltip>\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n----------- | ---------------\n`overlay` | The overlay element\n`content` | The overlay content element\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-tooltip>` is\npropagated to the internal `<vaadin-tooltip-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-tooltip>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target\n`--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target\n`--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target\n`--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {