@vaadin/popover 25.0.0-alpha8 → 25.0.0-alpha9
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/popover",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha9",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,17 +39,17 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
42
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
43
|
-
"@vaadin/component-base": "25.0.0-
|
|
44
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
45
|
-
"@vaadin/overlay": "25.0.0-
|
|
46
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
42
|
+
"@vaadin/a11y-base": "25.0.0-alpha9",
|
|
43
|
+
"@vaadin/component-base": "25.0.0-alpha9",
|
|
44
|
+
"@vaadin/lit-renderer": "25.0.0-alpha9",
|
|
45
|
+
"@vaadin/overlay": "25.0.0-alpha9",
|
|
46
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
52
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
51
|
+
"@vaadin/chai-plugins": "25.0.0-alpha9",
|
|
52
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha9",
|
|
53
53
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
54
54
|
"sinon": "^18.0.0"
|
|
55
55
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"web-types.json",
|
|
58
58
|
"web-types.lit.json"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
|
|
61
61
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { html, LitElement } from 'lit';
|
|
7
|
+
import { isElementFocused } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
7
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
9
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
@@ -44,6 +45,21 @@ class PopoverOverlay extends PopoverOverlayMixin(
|
|
|
44
45
|
`;
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
/** @protected */
|
|
49
|
+
updated(props) {
|
|
50
|
+
super.updated(props);
|
|
51
|
+
|
|
52
|
+
if (props.has('restoreFocusNode') && this.opened) {
|
|
53
|
+
// Save focus to be restored when target is set while opened
|
|
54
|
+
if (this.restoreFocusNode && isElementFocused(this.restoreFocusNode.focusElement || this.restoreFocusNode)) {
|
|
55
|
+
this.__focusRestorationController.saveFocus();
|
|
56
|
+
} else if (!this.restoreFocusNode) {
|
|
57
|
+
// Do not restore focus when target is cleared while opened
|
|
58
|
+
this.__focusRestorationController.focusNode = null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
47
63
|
/**
|
|
48
64
|
* @override
|
|
49
65
|
* @protected
|
|
@@ -59,22 +75,6 @@ class PopoverOverlay extends PopoverOverlayMixin(
|
|
|
59
75
|
get _modalRoot() {
|
|
60
76
|
return this.owner;
|
|
61
77
|
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @protected
|
|
65
|
-
* @override
|
|
66
|
-
*/
|
|
67
|
-
_attachOverlay() {
|
|
68
|
-
this.showPopover();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @protected
|
|
73
|
-
* @override
|
|
74
|
-
*/
|
|
75
|
-
_detachOverlay() {
|
|
76
|
-
this.hidePopover();
|
|
77
|
-
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
defineCustomElement(PopoverOverlay);
|
package/src/vaadin-popover.js
CHANGED
package/web-types.json
CHANGED