@vaadin/tooltip
Advanced tools
Comparing version 24.1.0-alpha1 to 24.1.0-alpha10
{ | ||
"name": "@vaadin/tooltip", | ||
"version": "24.1.0-alpha1", | ||
"version": "24.1.0-alpha10", | ||
"publishConfig": { | ||
@@ -38,8 +38,8 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.1.0-alpha1", | ||
"@vaadin/component-base": "24.1.0-alpha1", | ||
"@vaadin/overlay": "24.1.0-alpha1", | ||
"@vaadin/vaadin-lumo-styles": "24.1.0-alpha1", | ||
"@vaadin/vaadin-material-styles": "24.1.0-alpha1", | ||
"@vaadin/vaadin-themable-mixin": "24.1.0-alpha1" | ||
"@vaadin/a11y-base": "24.1.0-alpha10", | ||
"@vaadin/component-base": "24.1.0-alpha10", | ||
"@vaadin/overlay": "24.1.0-alpha10", | ||
"@vaadin/vaadin-lumo-styles": "24.1.0-alpha10", | ||
"@vaadin/vaadin-material-styles": "24.1.0-alpha10", | ||
"@vaadin/vaadin-themable-mixin": "24.1.0-alpha10" | ||
}, | ||
@@ -55,3 +55,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "599a339181595923b9ad6373d6888d8a79540141" | ||
"gitHead": "12e39be7eb3b49c68708e8ca3de2fb22e91051a1" | ||
} |
@@ -36,2 +36,8 @@ /** | ||
} | ||
@media (forced-colors: active) { | ||
[part='overlay'] { | ||
outline: 1px dashed; | ||
} | ||
} | ||
`, | ||
@@ -38,0 +44,0 @@ { moduleId: 'vaadin-tooltip-overlay-styles' }, |
@@ -9,2 +9,4 @@ /** | ||
import { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js'; | ||
import { microTask } from '@vaadin/component-base/src/async.js'; | ||
import { Debouncer } from '@vaadin/component-base/src/debounce.js'; | ||
import { addValueToAttribute, removeValueFromAttribute } from '@vaadin/component-base/src/dom-utils.js'; | ||
@@ -478,4 +480,4 @@ import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
this.__targetVisibilityObserver = new IntersectionObserver( | ||
([entry]) => { | ||
this.__onTargetVisibilityChange(entry.isIntersecting); | ||
(entries) => { | ||
entries.forEach((entry) => this.__onTargetVisibilityChange(entry.isIntersecting)); | ||
}, | ||
@@ -556,10 +558,21 @@ { threshold: 1 }, | ||
if (forId) { | ||
const target = this.getRootNode().getElementById(forId); | ||
this.__setTargetByIdDebouncer = Debouncer.debounce(this.__setTargetByIdDebouncer, microTask, () => | ||
this.__setTargetById(forId), | ||
); | ||
} | ||
} | ||
if (target) { | ||
this.target = target; | ||
} else { | ||
console.warn(`No element with id="${forId}" found to show tooltip.`); | ||
} | ||
/** @private */ | ||
__setTargetById(targetId) { | ||
if (!this.isConnected) { | ||
return; | ||
} | ||
const target = this.getRootNode().getElementById(targetId); | ||
if (target) { | ||
this.target = target; | ||
} else { | ||
console.warn(`No element with id="${targetId}" found to show tooltip.`); | ||
} | ||
} | ||
@@ -566,0 +579,0 @@ |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/tooltip", | ||
"version": "24.1.0-alpha1", | ||
"version": "24.1.0-alpha10", | ||
"description-markup": "markdown", | ||
@@ -11,3 +11,3 @@ "contributions": { | ||
"name": "vaadin-tooltip", | ||
"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.1.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/custom-theme/styling-components) documentation.", | ||
"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.1.0-alpha10/#/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/custom-theme/styling-components) documentation.", | ||
"attributes": [ | ||
@@ -14,0 +14,0 @@ { |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/tooltip", | ||
"version": "24.1.0-alpha1", | ||
"version": "24.1.0-alpha10", | ||
"description-markup": "markdown", | ||
@@ -19,3 +19,3 @@ "framework": "lit", | ||
"name": "vaadin-tooltip", | ||
"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.1.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/custom-theme/styling-components) documentation.", | ||
"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.1.0-alpha10/#/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/custom-theme/styling-components) documentation.", | ||
"extension": true, | ||
@@ -22,0 +22,0 @@ "attributes": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65476
1399
+ Added@vaadin/a11y-base@24.1.0-alpha10(transitive)
+ Added@vaadin/component-base@24.1.0-alpha10(transitive)
+ Added@vaadin/icon@24.1.0-alpha10(transitive)
+ Added@vaadin/overlay@24.1.0-alpha10(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.1.0-alpha10(transitive)
+ Added@vaadin/vaadin-material-styles@24.1.0-alpha10(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.1.0-alpha10(transitive)
- Removed@vaadin/a11y-base@24.1.0-alpha1(transitive)
- Removed@vaadin/component-base@24.1.0-alpha1(transitive)
- Removed@vaadin/icon@24.1.0-alpha1(transitive)
- Removed@vaadin/overlay@24.1.0-alpha1(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.1.0-alpha1(transitive)
- Removed@vaadin/vaadin-material-styles@24.1.0-alpha1(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.1.0-alpha1(transitive)