@vaadin/vaadin-overlay 22.0.21 → 22.0.23
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/vaadin-overlay",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.23",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "^22.0.
|
|
38
|
-
"@vaadin/vaadin-lumo-styles": "^22.0.
|
|
39
|
-
"@vaadin/vaadin-material-styles": "^22.0.
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "^22.0.
|
|
37
|
+
"@vaadin/component-base": "^22.0.23",
|
|
38
|
+
"@vaadin/vaadin-lumo-styles": "^22.0.23",
|
|
39
|
+
"@vaadin/vaadin-material-styles": "^22.0.23",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "^22.0.23"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@esm-bundle/chai": "^4.3.4",
|
|
44
44
|
"@polymer/iron-overlay-behavior": "^3.0.0",
|
|
45
|
-
"@vaadin/button": "^22.0.
|
|
46
|
-
"@vaadin/radio-group": "^22.0.
|
|
45
|
+
"@vaadin/button": "^22.0.23",
|
|
46
|
+
"@vaadin/radio-group": "^22.0.23",
|
|
47
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
48
|
-
"@vaadin/text-field": "^22.0.
|
|
48
|
+
"@vaadin/text-field": "^22.0.23",
|
|
49
49
|
"lit": "^2.0.0",
|
|
50
50
|
"sinon": "^9.2.1"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "22d985fbd88ad5d3ae75ab93a8870d1df723d0e9"
|
|
53
53
|
}
|
|
@@ -74,11 +74,24 @@ export const PositionMixin = (superClass) =>
|
|
|
74
74
|
type: Boolean,
|
|
75
75
|
value: false,
|
|
76
76
|
},
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* If the overlay content has no intrinsic height, this property can be used to set
|
|
80
|
+
* the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
81
|
+
* the property effectively disables the content measurement in favor of using this
|
|
82
|
+
* fixed value for determining the open direction.
|
|
83
|
+
*
|
|
84
|
+
* @attr {number} required-vertical-space
|
|
85
|
+
*/
|
|
86
|
+
requiredVerticalSpace: {
|
|
87
|
+
type: Number,
|
|
88
|
+
value: 0,
|
|
89
|
+
},
|
|
77
90
|
};
|
|
78
91
|
}
|
|
79
92
|
static get observers() {
|
|
80
93
|
return [
|
|
81
|
-
'__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)',
|
|
94
|
+
'__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)',
|
|
82
95
|
'__overlayOpenedChanged(opened)',
|
|
83
96
|
];
|
|
84
97
|
}
|
|
@@ -195,7 +208,8 @@ export const PositionMixin = (superClass) =>
|
|
|
195
208
|
__shouldAlignStartVertically(targetRect) {
|
|
196
209
|
// Using previous size to fix a case where window resize may cause the overlay to be squeezed
|
|
197
210
|
// smaller than its current space before the fit-calculations.
|
|
198
|
-
const contentHeight =
|
|
211
|
+
const contentHeight =
|
|
212
|
+
this.requiredVerticalSpace || Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);
|
|
199
213
|
this.__oldContentHeight = this.$.overlay.offsetHeight;
|
|
200
214
|
|
|
201
215
|
const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
|