@vaadin/overlay 25.2.0-alpha9 → 25.2.0-beta1
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": "25.2.0-
|
|
3
|
+
"version": "25.2.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,19 +34,19 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.2.0-
|
|
38
|
-
"@vaadin/component-base": "25.2.0-
|
|
39
|
-
"@vaadin/vaadin-themable-mixin": "25.2.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.2.0-beta1",
|
|
38
|
+
"@vaadin/component-base": "25.2.0-beta1",
|
|
39
|
+
"@vaadin/vaadin-themable-mixin": "25.2.0-beta1",
|
|
40
40
|
"lit": "^3.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@vaadin/aura": "25.2.0-
|
|
44
|
-
"@vaadin/chai-plugins": "25.2.0-
|
|
45
|
-
"@vaadin/test-runner-commands": "25.2.0-
|
|
43
|
+
"@vaadin/aura": "25.2.0-beta1",
|
|
44
|
+
"@vaadin/chai-plugins": "25.2.0-beta1",
|
|
45
|
+
"@vaadin/test-runner-commands": "25.2.0-beta1",
|
|
46
46
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
47
|
-
"@vaadin/vaadin-lumo-styles": "25.2.0-
|
|
47
|
+
"@vaadin/vaadin-lumo-styles": "25.2.0-beta1",
|
|
48
48
|
"sinon": "^21.0.2"
|
|
49
49
|
},
|
|
50
50
|
"customElements": "custom-elements.json",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
|
|
52
52
|
}
|
|
@@ -7,9 +7,6 @@ import { FocusRestorationController } from '@vaadin/a11y-base/src/focus-restorat
|
|
|
7
7
|
import { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';
|
|
8
8
|
import { getDeepActiveElement, isElementHidden, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* @polymerMixin
|
|
12
|
-
*/
|
|
13
10
|
export const OverlayFocusMixin = (superClass) =>
|
|
14
11
|
class OverlayFocusMixin extends superClass {
|
|
15
12
|
static get properties() {
|
|
@@ -8,11 +8,6 @@ import { OverlayFocusMixin } from './vaadin-overlay-focus-mixin.js';
|
|
|
8
8
|
import { OverlayStackMixin } from './vaadin-overlay-stack-mixin.js';
|
|
9
9
|
import { setOverlayStateAttribute } from './vaadin-overlay-utils.js';
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* @polymerMixin
|
|
13
|
-
* @mixes OverlayFocusMixin
|
|
14
|
-
* @mixes OverlayStackMixin
|
|
15
|
-
*/
|
|
16
11
|
export const OverlayMixin = (superClass) =>
|
|
17
12
|
class OverlayMixin extends OverlayFocusMixin(OverlayStackMixin(superClass)) {
|
|
18
13
|
static get properties() {
|
|
@@ -26,9 +26,6 @@ const targetResizeObserver = new ResizeObserver((entries) => {
|
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* @polymerMixin
|
|
31
|
-
*/
|
|
32
29
|
export const PositionMixin = (superClass) =>
|
|
33
30
|
class PositionMixin extends superClass {
|
|
34
31
|
static get properties() {
|
|
@@ -145,6 +142,12 @@ export const PositionMixin = (superClass) =>
|
|
|
145
142
|
if (props.has('positionTarget')) {
|
|
146
143
|
const oldTarget = props.get('positionTarget');
|
|
147
144
|
|
|
145
|
+
// Invalidate the cached content size so the next `_updatePosition` call
|
|
146
|
+
// measures the overlay against the new target instead of carrying over
|
|
147
|
+
// a larger size from the previous one.
|
|
148
|
+
this.__oldContentWidth = undefined;
|
|
149
|
+
this.__oldContentHeight = undefined;
|
|
150
|
+
|
|
148
151
|
// 1. When position target is removed, always reset position settings
|
|
149
152
|
// 2. When position target is set, reset if overlay was opened before
|
|
150
153
|
if ((!this.positionTarget && oldTarget) || (this.positionTarget && !oldTarget && !!this.__margins)) {
|
|
@@ -43,9 +43,6 @@ export const isLastOverlay = (overlay, filter = (_overlay) => true) => {
|
|
|
43
43
|
return overlay === filteredOverlays.pop();
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* @polymerMixin
|
|
48
|
-
*/
|
|
49
46
|
export const OverlayStackMixin = (superClass) =>
|
|
50
47
|
class OverlayStackMixin extends superClass {
|
|
51
48
|
/**
|
package/src/vaadin-overlay.js
CHANGED
|
@@ -73,9 +73,6 @@ import { OverlayMixin } from './vaadin-overlay-mixin.js';
|
|
|
73
73
|
*
|
|
74
74
|
* @customElement vaadin-overlay
|
|
75
75
|
* @extends HTMLElement
|
|
76
|
-
* @mixes ThemableMixin
|
|
77
|
-
* @mixes DirMixin
|
|
78
|
-
* @mixes OverlayMixin
|
|
79
76
|
*/
|
|
80
77
|
class Overlay extends OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
|
|
81
78
|
static get is() {
|
|
@@ -97,40 +94,6 @@ class Overlay extends OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjec
|
|
|
97
94
|
</div>
|
|
98
95
|
`;
|
|
99
96
|
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @event vaadin-overlay-open
|
|
103
|
-
* Fired after the overlay is opened.
|
|
104
|
-
*/
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* @event vaadin-overlay-close
|
|
108
|
-
* Fired when the opened overlay is about to be closed.
|
|
109
|
-
* Calling `preventDefault()` on the event cancels the closing.
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* @event vaadin-overlay-closing
|
|
114
|
-
* Fired when the overlay starts to close.
|
|
115
|
-
* Closing the overlay can be asynchronous depending on the animation.
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* @event vaadin-overlay-closed
|
|
120
|
-
* Fired after the overlay is closed.
|
|
121
|
-
*/
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* @event vaadin-overlay-escape-press
|
|
125
|
-
* Fired before the overlay is closed on Escape key press.
|
|
126
|
-
* Calling `preventDefault()` on the event cancels the closing.
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @event vaadin-overlay-outside-click
|
|
131
|
-
* Fired before the overlay is closed on outside click.
|
|
132
|
-
* Calling `preventDefault()` on the event cancels the closing.
|
|
133
|
-
*/
|
|
134
97
|
}
|
|
135
98
|
|
|
136
99
|
defineCustomElement(Overlay);
|