@vaadin/tooltip 24.8.4 → 24.9.0-alpha1

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": "24.8.4",
3
+ "version": "24.9.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,18 +36,18 @@
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
38
  "@polymer/polymer": "^3.0.0",
39
- "@vaadin/a11y-base": "~24.8.4",
40
- "@vaadin/component-base": "~24.8.4",
41
- "@vaadin/overlay": "~24.8.4",
42
- "@vaadin/popover": "~24.8.4",
43
- "@vaadin/vaadin-lumo-styles": "~24.8.4",
44
- "@vaadin/vaadin-material-styles": "~24.8.4",
45
- "@vaadin/vaadin-themable-mixin": "~24.8.4",
39
+ "@vaadin/a11y-base": "24.9.0-alpha1",
40
+ "@vaadin/component-base": "24.9.0-alpha1",
41
+ "@vaadin/overlay": "24.9.0-alpha1",
42
+ "@vaadin/popover": "24.9.0-alpha1",
43
+ "@vaadin/vaadin-lumo-styles": "24.9.0-alpha1",
44
+ "@vaadin/vaadin-material-styles": "24.9.0-alpha1",
45
+ "@vaadin/vaadin-themable-mixin": "24.9.0-alpha1",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "~24.8.4",
50
- "@vaadin/test-runner-commands": "~24.8.4",
49
+ "@vaadin/chai-plugins": "24.9.0-alpha1",
50
+ "@vaadin/test-runner-commands": "24.9.0-alpha1",
51
51
  "@vaadin/testing-helpers": "^1.1.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": "849e54e967563080a685965e2dced02060b3ab23"
58
+ "gitHead": "cc13d59f0e3cd1a3b0c19c1a900a5308446fe7ac"
59
59
  }
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": "24.8.4",
4
+ "version": "24.9.0-alpha1",
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/24.8.4/#/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\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/24.9.0-alpha1/#/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.",
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": "24.8.4",
4
+ "version": "24.9.0-alpha1",
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/24.8.4/#/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\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/24.9.0-alpha1/#/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.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -1,60 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2022 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import { html, LitElement } from 'lit';
7
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
- import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
10
- import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
11
- import { PopoverOverlayMixin } from '@vaadin/popover/src/vaadin-popover-overlay-mixin.js';
12
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
13
- import { tooltipOverlayStyles } from './vaadin-tooltip-overlay-styles.js';
14
-
15
- /**
16
- * An element used internally by `<vaadin-tooltip>`. Not intended to be used separately.
17
- *
18
- * @customElement
19
- * @extends HTMLElement
20
- * @mixes DirMixin
21
- * @mixes ThemableMixin
22
- * @mixes PopoverOverlayMixin
23
- * @private
24
- */
25
- class TooltipOverlay extends PopoverOverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {
26
- static get is() {
27
- return 'vaadin-tooltip-overlay';
28
- }
29
-
30
- static get styles() {
31
- return [overlayStyles, tooltipOverlayStyles];
32
- }
33
-
34
- /**
35
- * Tag name prefix used by custom properties.
36
- * @protected
37
- * @return {string}
38
- */
39
- get _tagNamePrefix() {
40
- return 'vaadin-tooltip';
41
- }
42
-
43
- /** @protected */
44
- render() {
45
- return html`
46
- <div id="backdrop" part="backdrop" hidden></div>
47
- <div part="overlay" id="overlay">
48
- <div part="content" id="content"><slot></slot></div>
49
- </div>
50
- `;
51
- }
52
-
53
- requestContentUpdate() {
54
- super.requestContentUpdate();
55
-
56
- this.toggleAttribute('hidden', this.textContent.trim() === '');
57
- }
58
- }
59
-
60
- defineCustomElement(TooltipOverlay);
@@ -1,71 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2022 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import './vaadin-lit-tooltip-overlay.js';
7
- import { css, html, LitElement } from 'lit';
8
- import { ifDefined } from 'lit/directives/if-defined.js';
9
- import { defineCustomElement } from '@vaadin/component-base/src/define.js';
10
- import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
11
- import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
12
- import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
13
- import { TooltipMixin } from './vaadin-tooltip-mixin.js';
14
-
15
- /**
16
- * LitElement based version of `<vaadin-tooltip>` web component.
17
- *
18
- * ## Disclaimer
19
- *
20
- * This component is an experiment and not yet a part of Vaadin platform.
21
- * There is no ETA regarding specific Vaadin version where it'll land.
22
- * Feel free to try this code in your apps as per Apache 2.0 license.
23
- *
24
- * @extends HTMLElement
25
- * @mixes ElementMixin
26
- * @mixes ThemePropertyMixin
27
- * @mixes TooltipMixin
28
- */
29
- class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement)))) {
30
- static get is() {
31
- return 'vaadin-tooltip';
32
- }
33
-
34
- static get styles() {
35
- return css`
36
- :host {
37
- display: none;
38
- }
39
- `;
40
- }
41
-
42
- /** @protected */
43
- render() {
44
- const effectivePosition = this.__effectivePosition;
45
-
46
- return html`
47
- <vaadin-tooltip-overlay
48
- id="overlay"
49
- .renderer="${this._renderer}"
50
- .owner="${this}"
51
- theme="${ifDefined(this._theme)}"
52
- .opened="${this._isConnected && (this.manual ? this.opened : this._autoOpened)}"
53
- .positionTarget="${this.target}"
54
- .position="${effectivePosition}"
55
- ?no-horizontal-overlap="${this.__computeNoHorizontalOverlap(effectivePosition)}"
56
- ?no-vertical-overlap="${this.__computeNoVerticalOverlap(effectivePosition)}"
57
- .horizontalAlign="${this.__computeHorizontalAlign(effectivePosition)}"
58
- .verticalAlign="${this.__computeVerticalAlign(effectivePosition)}"
59
- @mouseenter="${this.__onOverlayMouseEnter}"
60
- @mouseleave="${this.__onOverlayMouseLeave}"
61
- modeless
62
- ></vaadin-tooltip-overlay>
63
-
64
- <slot name="sr-label"></slot>
65
- `;
66
- }
67
- }
68
-
69
- defineCustomElement(Tooltip);
70
-
71
- export { Tooltip };
@@ -1,2 +0,0 @@
1
- import './vaadin-tooltip-styles.js';
2
- import '../../src/vaadin-lit-tooltip.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-tooltip-styles.js';
2
- import '../../src/vaadin-lit-tooltip.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-tooltip-styles.js';
2
- import '../../src/vaadin-lit-tooltip.js';
@@ -1,2 +0,0 @@
1
- import './vaadin-tooltip-styles.js';
2
- import '../../src/vaadin-lit-tooltip.js';
@@ -1 +0,0 @@
1
- export * from './src/vaadin-tooltip.js';
@@ -1,3 +0,0 @@
1
- import './theme/lumo/vaadin-lit-tooltip.js';
2
-
3
- export * from './src/vaadin-lit-tooltip.js';