@vaadin/overlay 24.5.4 → 24.5.6
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/overlay",
|
|
3
|
-
"version": "24.5.
|
|
3
|
+
"version": "24.5.6",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/a11y-base": "~24.5.
|
|
40
|
-
"@vaadin/component-base": "~24.5.
|
|
41
|
-
"@vaadin/vaadin-lumo-styles": "~24.5.
|
|
42
|
-
"@vaadin/vaadin-material-styles": "~24.5.
|
|
43
|
-
"@vaadin/vaadin-themable-mixin": "~24.5.
|
|
39
|
+
"@vaadin/a11y-base": "~24.5.6",
|
|
40
|
+
"@vaadin/component-base": "~24.5.6",
|
|
41
|
+
"@vaadin/vaadin-lumo-styles": "~24.5.6",
|
|
42
|
+
"@vaadin/vaadin-material-styles": "~24.5.6",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "~24.5.6",
|
|
44
44
|
"lit": "^3.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@vaadin/chai-plugins": "~24.5.
|
|
47
|
+
"@vaadin/chai-plugins": "~24.5.6",
|
|
48
48
|
"@vaadin/testing-helpers": "^1.0.0",
|
|
49
49
|
"sinon": "^18.0.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "2c20ec16149e8016e0733a80e349231da13660bc"
|
|
52
52
|
}
|
|
@@ -13,13 +13,20 @@ const getAttachedInstances = () =>
|
|
|
13
13
|
.filter((el) => el instanceof HTMLElement && el._hasOverlayStackMixin && !el.hasAttribute('closing'))
|
|
14
14
|
.sort((a, b) => a.__zIndex - b.__zIndex || 0);
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Returns all attached overlay instances excluding notification container,
|
|
18
|
+
* which only needs to be in the stack for zIndex but not pointer-events.
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
const getOverlayInstances = () => getAttachedInstances().filter((el) => el.$.overlay);
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
* Returns true if the overlay is the last one in the opened overlays stack.
|
|
18
25
|
* @param {HTMLElement} overlay
|
|
19
26
|
* @return {boolean}
|
|
20
27
|
* @protected
|
|
21
28
|
*/
|
|
22
|
-
export const isLastOverlay = (overlay) => overlay ===
|
|
29
|
+
export const isLastOverlay = (overlay) => overlay === getOverlayInstances().pop();
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
32
|
* @polymerMixin
|
|
@@ -68,8 +75,8 @@ export const OverlayStackMixin = (superClass) =>
|
|
|
68
75
|
}
|
|
69
76
|
|
|
70
77
|
// Disable pointer events in other attached overlays
|
|
71
|
-
|
|
72
|
-
if (el !== this
|
|
78
|
+
getOverlayInstances().forEach((el) => {
|
|
79
|
+
if (el !== this) {
|
|
73
80
|
el.$.overlay.style.pointerEvents = 'none';
|
|
74
81
|
}
|
|
75
82
|
});
|
|
@@ -84,7 +91,7 @@ export const OverlayStackMixin = (superClass) =>
|
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
// Restore pointer events in the previous overlay(s)
|
|
87
|
-
const instances =
|
|
94
|
+
const instances = getOverlayInstances();
|
|
88
95
|
|
|
89
96
|
let el;
|
|
90
97
|
// Use instances.pop() to ensure the reverse order
|
|
@@ -93,9 +100,7 @@ export const OverlayStackMixin = (superClass) =>
|
|
|
93
100
|
// Skip the current instance
|
|
94
101
|
continue;
|
|
95
102
|
}
|
|
96
|
-
|
|
97
|
-
el.$.overlay.style.removeProperty('pointer-events');
|
|
98
|
-
}
|
|
103
|
+
el.$.overlay.style.removeProperty('pointer-events');
|
|
99
104
|
if (!el.modeless) {
|
|
100
105
|
// Stop after the last modal
|
|
101
106
|
break;
|