@vaadin/overlay 23.3.5 → 23.3.7
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": "23.3.
|
|
3
|
+
"version": "23.3.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "~23.3.
|
|
40
|
-
"@vaadin/vaadin-lumo-styles": "~23.3.
|
|
41
|
-
"@vaadin/vaadin-material-styles": "~23.3.
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "~23.3.
|
|
39
|
+
"@vaadin/component-base": "~23.3.7",
|
|
40
|
+
"@vaadin/vaadin-lumo-styles": "~23.3.7",
|
|
41
|
+
"@vaadin/vaadin-material-styles": "~23.3.7",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "~23.3.7"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@esm-bundle/chai": "^4.3.4",
|
|
46
46
|
"@polymer/iron-overlay-behavior": "^3.0.0",
|
|
47
|
-
"@vaadin/button": "~23.3.
|
|
48
|
-
"@vaadin/radio-group": "~23.3.
|
|
47
|
+
"@vaadin/button": "~23.3.7",
|
|
48
|
+
"@vaadin/radio-group": "~23.3.7",
|
|
49
49
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
50
|
-
"@vaadin/text-field": "~23.3.
|
|
50
|
+
"@vaadin/text-field": "~23.3.7",
|
|
51
51
|
"lit": "^2.0.0",
|
|
52
52
|
"sinon": "^13.0.2"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "9689f8650a9170b38c0ee691b9603ffb550e04ad"
|
|
55
55
|
}
|
|
@@ -54,4 +54,14 @@ export declare class PositionMixinClass {
|
|
|
54
54
|
* @attr {boolean} no-vertical-overlap
|
|
55
55
|
*/
|
|
56
56
|
noVerticalOverlap: boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* If the overlay content has no intrinsic height, this property can be used to set
|
|
60
|
+
* the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
61
|
+
* the property effectively disables the content measurement in favor of using this
|
|
62
|
+
* fixed value for determining the open direction.
|
|
63
|
+
*
|
|
64
|
+
* @attr {number} required-vertical-space
|
|
65
|
+
*/
|
|
66
|
+
requiredVerticalSpace: number;
|
|
57
67
|
}
|
|
@@ -93,12 +93,25 @@ export const PositionMixin = (superClass) =>
|
|
|
93
93
|
type: Boolean,
|
|
94
94
|
value: false,
|
|
95
95
|
},
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* If the overlay content has no intrinsic height, this property can be used to set
|
|
99
|
+
* the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
100
|
+
* the property effectively disables the content measurement in favor of using this
|
|
101
|
+
* fixed value for determining the open direction.
|
|
102
|
+
*
|
|
103
|
+
* @attr {number} required-vertical-space
|
|
104
|
+
*/
|
|
105
|
+
requiredVerticalSpace: {
|
|
106
|
+
type: Number,
|
|
107
|
+
value: 0,
|
|
108
|
+
},
|
|
96
109
|
};
|
|
97
110
|
}
|
|
98
111
|
|
|
99
112
|
static get observers() {
|
|
100
113
|
return [
|
|
101
|
-
'__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)',
|
|
114
|
+
'__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)',
|
|
102
115
|
'__overlayOpenedChanged(opened, positionTarget)',
|
|
103
116
|
];
|
|
104
117
|
}
|
|
@@ -266,7 +279,8 @@ export const PositionMixin = (superClass) =>
|
|
|
266
279
|
__shouldAlignStartVertically(targetRect) {
|
|
267
280
|
// Using previous size to fix a case where window resize may cause the overlay to be squeezed
|
|
268
281
|
// smaller than its current space before the fit-calculations.
|
|
269
|
-
const contentHeight =
|
|
282
|
+
const contentHeight =
|
|
283
|
+
this.requiredVerticalSpace || Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);
|
|
270
284
|
this.__oldContentHeight = this.$.overlay.offsetHeight;
|
|
271
285
|
|
|
272
286
|
const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
|