@vaadin/vaadin-overlay 22.0.21 → 22.1.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/LICENSE +1119 -190
- package/README.md +1 -1
- package/package.json +10 -10
- package/src/vaadin-focusables-helper.js +7 -2
- package/src/vaadin-overlay-position-mixin.js +23 -4
- package/src/vaadin-overlay.d.ts +7 -2
- package/src/vaadin-overlay.js +7 -2
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-overlay",
|
|
3
|
-
"version": "22.0
|
|
3
|
+
"version": "22.1.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "vaadin-overlay",
|
|
8
|
-
"license": "
|
|
8
|
+
"license": "https://raw.githubusercontent.com/vaadin/web-components/22.1/LICENSE",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/vaadin/web-components.git",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@polymer/polymer": "^3.0.0",
|
|
37
|
-
"@vaadin/component-base": "
|
|
38
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
39
|
-
"@vaadin/vaadin-material-styles": "
|
|
40
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
37
|
+
"@vaadin/component-base": "22.1.0-alpha1",
|
|
38
|
+
"@vaadin/vaadin-lumo-styles": "22.1.0-alpha1",
|
|
39
|
+
"@vaadin/vaadin-material-styles": "22.1.0-alpha1",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "22.1.0-alpha1"
|
|
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": "
|
|
46
|
-
"@vaadin/radio-group": "
|
|
45
|
+
"@vaadin/button": "22.1.0-alpha1",
|
|
46
|
+
"@vaadin/radio-group": "22.1.0-alpha1",
|
|
47
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
48
|
-
"@vaadin/text-field": "
|
|
48
|
+
"@vaadin/text-field": "22.1.0-alpha1",
|
|
49
49
|
"lit": "^2.0.0",
|
|
50
50
|
"sinon": "^9.2.1"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "e387194c2c3608b7567b43b788b504c3a12194d9"
|
|
53
53
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
|
|
7
12
|
/**
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
|
|
7
12
|
const PROP_NAMES_VERTICAL = {
|
|
@@ -74,11 +79,24 @@ export const PositionMixin = (superClass) =>
|
|
|
74
79
|
type: Boolean,
|
|
75
80
|
value: false,
|
|
76
81
|
},
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* If the overlay content has no intrinsic height, this property can be used to set
|
|
85
|
+
* the minimum vertical space (in pixels) required by the overlay. Setting a value to
|
|
86
|
+
* the property effectively disables the content measurement in favor of using this
|
|
87
|
+
* fixed value for determining the open direction.
|
|
88
|
+
*
|
|
89
|
+
* @attr {number} required-vertical-space
|
|
90
|
+
*/
|
|
91
|
+
requiredVerticalSpace: {
|
|
92
|
+
type: Number,
|
|
93
|
+
value: 0,
|
|
94
|
+
},
|
|
77
95
|
};
|
|
78
96
|
}
|
|
79
97
|
static get observers() {
|
|
80
98
|
return [
|
|
81
|
-
'__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)',
|
|
99
|
+
'__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)',
|
|
82
100
|
'__overlayOpenedChanged(opened)',
|
|
83
101
|
];
|
|
84
102
|
}
|
|
@@ -195,7 +213,8 @@ export const PositionMixin = (superClass) =>
|
|
|
195
213
|
__shouldAlignStartVertically(targetRect) {
|
|
196
214
|
// Using previous size to fix a case where window resize may cause the overlay to be squeezed
|
|
197
215
|
// smaller than its current space before the fit-calculations.
|
|
198
|
-
const contentHeight =
|
|
216
|
+
const contentHeight =
|
|
217
|
+
this.requiredVerticalSpace || Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);
|
|
199
218
|
this.__oldContentHeight = this.$.overlay.offsetHeight;
|
|
200
219
|
|
|
201
220
|
const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);
|
package/src/vaadin-overlay.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
7
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
package/src/vaadin-overlay.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c)
|
|
4
|
-
*
|
|
3
|
+
* Copyright (c) 2000 - 2023 Vaadin Ltd.
|
|
4
|
+
*
|
|
5
|
+
* This program is available under Vaadin Commercial License and Service Terms.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* See https://vaadin.com/commercial-license-and-service-terms for the full
|
|
9
|
+
* license.
|
|
5
10
|
*/
|
|
6
11
|
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
|
|
7
12
|
import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';
|