@vaadin/popover
Advanced tools
Comparing version
{ | ||
"name": "@vaadin/popover", | ||
"version": "24.7.0-beta1", | ||
"version": "24.7.0-rc1", | ||
"publishConfig": { | ||
@@ -40,14 +40,14 @@ "access": "public" | ||
"@open-wc/dedupe-mixin": "^1.3.0", | ||
"@vaadin/a11y-base": "24.7.0-beta1", | ||
"@vaadin/component-base": "24.7.0-beta1", | ||
"@vaadin/lit-renderer": "24.7.0-beta1", | ||
"@vaadin/overlay": "24.7.0-beta1", | ||
"@vaadin/vaadin-lumo-styles": "24.7.0-beta1", | ||
"@vaadin/vaadin-material-styles": "24.7.0-beta1", | ||
"@vaadin/vaadin-themable-mixin": "24.7.0-beta1", | ||
"@vaadin/a11y-base": "24.7.0-rc1", | ||
"@vaadin/component-base": "24.7.0-rc1", | ||
"@vaadin/lit-renderer": "24.7.0-rc1", | ||
"@vaadin/overlay": "24.7.0-rc1", | ||
"@vaadin/vaadin-lumo-styles": "24.7.0-rc1", | ||
"@vaadin/vaadin-material-styles": "24.7.0-rc1", | ||
"@vaadin/vaadin-themable-mixin": "24.7.0-rc1", | ||
"lit": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vaadin/chai-plugins": "24.7.0-beta1", | ||
"@vaadin/test-runner-commands": "24.7.0-beta1", | ||
"@vaadin/chai-plugins": "24.7.0-rc1", | ||
"@vaadin/test-runner-commands": "24.7.0-rc1", | ||
"@vaadin/testing-helpers": "^1.1.0", | ||
@@ -60,3 +60,3 @@ "sinon": "^18.0.0" | ||
], | ||
"gitHead": "4043c518ef9b915cde612d2907ddc9bd10e5af17" | ||
"gitHead": "28f6d361ebf39070c0961cee75ee6c14089109b2" | ||
} |
@@ -669,3 +669,3 @@ /** | ||
// Move focus to the popover content on target element Tab | ||
if (this.target && isElementFocused(this.target)) { | ||
if (this.target && isElementFocused(this.__getTargetFocusable())) { | ||
event.preventDefault(); | ||
@@ -679,3 +679,3 @@ overlayPart.focus(); | ||
if (lastFocusable && isElementFocused(lastFocusable)) { | ||
const focusable = this.__getNextBodyFocusable(this.target); | ||
const focusable = this.__getNextBodyFocusable(this.__getTargetFocusable()); | ||
if (focusable && focusable !== overlayPart) { | ||
@@ -703,3 +703,3 @@ event.preventDefault(); | ||
// Prevent restoring focus after target blur on Shift + Tab | ||
if (this.target && isElementFocused(this.target) && this.__shouldRestoreFocus) { | ||
if (this.target && isElementFocused(this.__getTargetFocusable()) && this.__shouldRestoreFocus) { | ||
this.__shouldRestoreFocus = false; | ||
@@ -712,3 +712,3 @@ return; | ||
event.preventDefault(); | ||
this.target.focus(); | ||
this.__getTargetFocusable().focus(); | ||
return; | ||
@@ -718,3 +718,3 @@ } | ||
// Move focus back to the popover on next element Shift + Tab | ||
const nextFocusable = this.__getNextBodyFocusable(this.target); | ||
const nextFocusable = this.__getNextBodyFocusable(this.__getTargetFocusable()); | ||
if (nextFocusable && isElementFocused(nextFocusable)) { | ||
@@ -743,2 +743,12 @@ const lastFocusable = this.__getLastFocusable(overlayPart); | ||
/** @private */ | ||
__getTargetFocusable() { | ||
if (!this.target) { | ||
return null; | ||
} | ||
// If target has `focusElement`, check if that one is focused. | ||
return this.target.focusElement || this.target; | ||
} | ||
/** @private */ | ||
__onTargetFocusIn() { | ||
@@ -768,3 +778,3 @@ this.__focusInside = true; | ||
// without focusing parent popover overlay (e.g. using hover trigger). | ||
if (!isLastOverlay(this._overlayElement)) { | ||
if (this._overlayElement.opened && !isLastOverlay(this._overlayElement)) { | ||
return; | ||
@@ -771,0 +781,0 @@ } |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/popover", | ||
"version": "24.7.0-beta1", | ||
"version": "24.7.0-rc1", | ||
"description-markup": "markdown", | ||
@@ -11,3 +11,3 @@ "contributions": { | ||
"name": "vaadin-popover", | ||
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-beta1/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\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-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", | ||
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-rc1/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\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-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", | ||
"attributes": [ | ||
@@ -14,0 +14,0 @@ { |
{ | ||
"$schema": "https://json.schemastore.org/web-types", | ||
"name": "@vaadin/popover", | ||
"version": "24.7.0-beta1", | ||
"version": "24.7.0-rc1", | ||
"description-markup": "markdown", | ||
@@ -19,3 +19,3 @@ "framework": "lit", | ||
"name": "vaadin-popover", | ||
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-beta1/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\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-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", | ||
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.7.0-rc1/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\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-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.", | ||
"extension": true, | ||
@@ -22,0 +22,0 @@ "attributes": [ |
110450
0.27%2517
0.32%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated