@vaadin/overlay 24.6.0-beta1 → 24.7.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/overlay",
3
- "version": "24.6.0-beta1",
3
+ "version": "24.7.0-alpha1",
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.6.0-beta1",
40
- "@vaadin/component-base": "24.6.0-beta1",
41
- "@vaadin/vaadin-lumo-styles": "24.6.0-beta1",
42
- "@vaadin/vaadin-material-styles": "24.6.0-beta1",
43
- "@vaadin/vaadin-themable-mixin": "24.6.0-beta1",
39
+ "@vaadin/a11y-base": "24.7.0-alpha1",
40
+ "@vaadin/component-base": "24.7.0-alpha1",
41
+ "@vaadin/vaadin-lumo-styles": "24.7.0-alpha1",
42
+ "@vaadin/vaadin-material-styles": "24.7.0-alpha1",
43
+ "@vaadin/vaadin-themable-mixin": "24.7.0-alpha1",
44
44
  "lit": "^3.0.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@vaadin/chai-plugins": "24.6.0-beta1",
47
+ "@vaadin/chai-plugins": "24.7.0-alpha1",
48
48
  "@vaadin/testing-helpers": "^1.0.0",
49
49
  "sinon": "^18.0.0"
50
50
  },
51
- "gitHead": "ab28efb0dcf2cd1ef72100e2e8f32232fa49aacc"
51
+ "gitHead": "04be941c9a7b659871c97f31b9cc3ffd7528087b"
52
52
  }
@@ -25,6 +25,7 @@ export const OverlayMixin = (superClass) =>
25
25
  notify: true,
26
26
  observer: '_openedChanged',
27
27
  reflectToAttribute: true,
28
+ sync: true,
28
29
  },
29
30
 
30
31
  /**
@@ -33,6 +34,7 @@ export const OverlayMixin = (superClass) =>
33
34
  */
34
35
  owner: {
35
36
  type: Object,
37
+ sync: true,
36
38
  },
37
39
 
38
40
  /**
@@ -40,6 +42,7 @@ export const OverlayMixin = (superClass) =>
40
42
  */
41
43
  model: {
42
44
  type: Object,
45
+ sync: true,
43
46
  },
44
47
 
45
48
  /**
@@ -53,6 +56,7 @@ export const OverlayMixin = (superClass) =>
53
56
  */
54
57
  renderer: {
55
58
  type: Object,
59
+ sync: true,
56
60
  },
57
61
 
58
62
  /**
@@ -65,6 +69,7 @@ export const OverlayMixin = (superClass) =>
65
69
  value: false,
66
70
  reflectToAttribute: true,
67
71
  observer: '_modelessChanged',
72
+ sync: true,
68
73
  },
69
74
 
70
75
  /**
@@ -76,6 +81,7 @@ export const OverlayMixin = (superClass) =>
76
81
  type: Boolean,
77
82
  reflectToAttribute: true,
78
83
  observer: '_hiddenChanged',
84
+ sync: true,
79
85
  },
80
86
 
81
87
  /**
@@ -86,6 +92,7 @@ export const OverlayMixin = (superClass) =>
86
92
  type: Boolean,
87
93
  value: false,
88
94
  reflectToAttribute: true,
95
+ sync: true,
89
96
  },
90
97
  };
91
98
  }
@@ -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 === getAttachedInstances().pop();
29
+ export const isLastOverlay = (overlay) => overlay === getOverlayInstances().pop();
23
30
 
24
31
  /**
25
32
  * @polymerMixin
@@ -68,7 +75,7 @@ export const OverlayStackMixin = (superClass) =>
68
75
  }
69
76
 
70
77
  // Disable pointer events in other attached overlays
71
- getAttachedInstances().forEach((el) => {
78
+ getOverlayInstances().forEach((el) => {
72
79
  if (el !== this) {
73
80
  el.$.overlay.style.pointerEvents = 'none';
74
81
  }
@@ -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 = getAttachedInstances();
94
+ const instances = getOverlayInstances();
88
95
 
89
96
  let el;
90
97
  // Use instances.pop() to ensure the reverse order