@vaadin/vaadin-overlay 22.0.13 → 22.0.16
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 +9 -9
- package/src/vaadin-overlay-position-mixin.js +14 -14
- package/src/vaadin-overlay.d.ts +2 -2
- package/src/vaadin-overlay.js +18 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/vaadin-overlay",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.16",
|
|
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.16",
|
|
38
|
+
"@vaadin/vaadin-lumo-styles": "^22.0.16",
|
|
39
|
+
"@vaadin/vaadin-material-styles": "^22.0.16",
|
|
40
|
+
"@vaadin/vaadin-themable-mixin": "^22.0.16"
|
|
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.16",
|
|
46
|
+
"@vaadin/radio-group": "^22.0.16",
|
|
47
47
|
"@vaadin/testing-helpers": "^0.3.2",
|
|
48
|
-
"@vaadin/text-field": "^22.0.
|
|
48
|
+
"@vaadin/text-field": "^22.0.16",
|
|
49
49
|
"lit": "^2.0.0",
|
|
50
50
|
"sinon": "^9.2.1"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "dac6f243594ea700bb796d3b41d7b17736d90be8"
|
|
53
53
|
}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
const PROP_NAMES_VERTICAL = {
|
|
8
8
|
start: 'top',
|
|
9
|
-
end: 'bottom'
|
|
9
|
+
end: 'bottom',
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const PROP_NAMES_HORIZONTAL = {
|
|
13
13
|
start: 'left',
|
|
14
|
-
end: 'right'
|
|
14
|
+
end: 'right',
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -29,7 +29,7 @@ export const PositionMixin = (superClass) =>
|
|
|
29
29
|
*/
|
|
30
30
|
positionTarget: {
|
|
31
31
|
type: Object,
|
|
32
|
-
value: null
|
|
32
|
+
value: null,
|
|
33
33
|
},
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -42,7 +42,7 @@ export const PositionMixin = (superClass) =>
|
|
|
42
42
|
*/
|
|
43
43
|
horizontalAlign: {
|
|
44
44
|
type: String,
|
|
45
|
-
value: 'start'
|
|
45
|
+
value: 'start',
|
|
46
46
|
},
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -54,7 +54,7 @@ export const PositionMixin = (superClass) =>
|
|
|
54
54
|
*/
|
|
55
55
|
verticalAlign: {
|
|
56
56
|
type: String,
|
|
57
|
-
value: 'top'
|
|
57
|
+
value: 'top',
|
|
58
58
|
},
|
|
59
59
|
|
|
60
60
|
/**
|
|
@@ -63,7 +63,7 @@ export const PositionMixin = (superClass) =>
|
|
|
63
63
|
*/
|
|
64
64
|
noHorizontalOverlap: {
|
|
65
65
|
type: Boolean,
|
|
66
|
-
value: false
|
|
66
|
+
value: false,
|
|
67
67
|
},
|
|
68
68
|
|
|
69
69
|
/**
|
|
@@ -72,14 +72,14 @@ export const PositionMixin = (superClass) =>
|
|
|
72
72
|
*/
|
|
73
73
|
noVerticalOverlap: {
|
|
74
74
|
type: Boolean,
|
|
75
|
-
value: false
|
|
76
|
-
}
|
|
75
|
+
value: false,
|
|
76
|
+
},
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
static get observers() {
|
|
80
80
|
return [
|
|
81
81
|
'__positionSettingsChanged(positionTarget, horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap)',
|
|
82
|
-
'__overlayOpenedChanged(opened)'
|
|
82
|
+
'__overlayOpenedChanged(opened)',
|
|
83
83
|
];
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -149,7 +149,7 @@ export const PositionMixin = (superClass) =>
|
|
|
149
149
|
this.noVerticalOverlap,
|
|
150
150
|
PROP_NAMES_VERTICAL,
|
|
151
151
|
this,
|
|
152
|
-
shouldAlignStartVertically
|
|
152
|
+
shouldAlignStartVertically,
|
|
153
153
|
);
|
|
154
154
|
|
|
155
155
|
// Obtain horizontal positioning properties
|
|
@@ -159,7 +159,7 @@ export const PositionMixin = (superClass) =>
|
|
|
159
159
|
this.noHorizontalOverlap,
|
|
160
160
|
PROP_NAMES_HORIZONTAL,
|
|
161
161
|
this,
|
|
162
|
-
shouldAlignStartHorizontally
|
|
162
|
+
shouldAlignStartHorizontally,
|
|
163
163
|
);
|
|
164
164
|
|
|
165
165
|
// Apply the positioning properties to the overlay
|
|
@@ -188,7 +188,7 @@ export const PositionMixin = (superClass) =>
|
|
|
188
188
|
this.__margins,
|
|
189
189
|
defaultAlignLeft,
|
|
190
190
|
this.noHorizontalOverlap,
|
|
191
|
-
PROP_NAMES_HORIZONTAL
|
|
191
|
+
PROP_NAMES_HORIZONTAL,
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -208,7 +208,7 @@ export const PositionMixin = (superClass) =>
|
|
|
208
208
|
this.__margins,
|
|
209
209
|
defaultAlignTop,
|
|
210
210
|
this.noVerticalOverlap,
|
|
211
|
-
PROP_NAMES_VERTICAL
|
|
211
|
+
PROP_NAMES_VERTICAL,
|
|
212
212
|
);
|
|
213
213
|
}
|
|
214
214
|
|
|
@@ -242,7 +242,7 @@ export const PositionMixin = (superClass) =>
|
|
|
242
242
|
|
|
243
243
|
return {
|
|
244
244
|
[cssPropNameToSet]: currentValue + diff * (shouldAlignStart ? -1 : 1) + 'px',
|
|
245
|
-
[cssPropNameToClear]: ''
|
|
245
|
+
[cssPropNameToClear]: '',
|
|
246
246
|
};
|
|
247
247
|
}
|
|
248
248
|
};
|
package/src/vaadin-overlay.d.ts
CHANGED
|
@@ -197,13 +197,13 @@ declare class OverlayElement extends ThemableMixin(DirMixin(HTMLElement)) {
|
|
|
197
197
|
addEventListener<K extends keyof OverlayEventMap>(
|
|
198
198
|
type: K,
|
|
199
199
|
listener: (this: OverlayElement, ev: OverlayEventMap[K]) => void,
|
|
200
|
-
options?: boolean | AddEventListenerOptions
|
|
200
|
+
options?: boolean | AddEventListenerOptions,
|
|
201
201
|
): void;
|
|
202
202
|
|
|
203
203
|
removeEventListener<K extends keyof OverlayEventMap>(
|
|
204
204
|
type: K,
|
|
205
205
|
listener: (this: OverlayElement, ev: OverlayEventMap[K]) => void,
|
|
206
|
-
options?: boolean | EventListenerOptions
|
|
206
|
+
options?: boolean | EventListenerOptions,
|
|
207
207
|
): void;
|
|
208
208
|
}
|
|
209
209
|
|
package/src/vaadin-overlay.js
CHANGED
|
@@ -198,7 +198,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
198
198
|
type: Boolean,
|
|
199
199
|
notify: true,
|
|
200
200
|
observer: '_openedChanged',
|
|
201
|
-
reflectToAttribute: true
|
|
201
|
+
reflectToAttribute: true,
|
|
202
202
|
},
|
|
203
203
|
|
|
204
204
|
/**
|
|
@@ -224,14 +224,14 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
224
224
|
*/
|
|
225
225
|
template: {
|
|
226
226
|
type: Object,
|
|
227
|
-
notify: true
|
|
227
|
+
notify: true,
|
|
228
228
|
},
|
|
229
229
|
|
|
230
230
|
/**
|
|
231
231
|
* Optional argument for `Polymer.Templatize.templatize`.
|
|
232
232
|
*/
|
|
233
233
|
instanceProps: {
|
|
234
|
-
type: Object
|
|
234
|
+
type: Object,
|
|
235
235
|
},
|
|
236
236
|
|
|
237
237
|
/**
|
|
@@ -240,7 +240,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
240
240
|
*/
|
|
241
241
|
content: {
|
|
242
242
|
type: Object,
|
|
243
|
-
notify: true
|
|
243
|
+
notify: true,
|
|
244
244
|
},
|
|
245
245
|
|
|
246
246
|
/**
|
|
@@ -250,7 +250,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
250
250
|
withBackdrop: {
|
|
251
251
|
type: Boolean,
|
|
252
252
|
value: false,
|
|
253
|
-
reflectToAttribute: true
|
|
253
|
+
reflectToAttribute: true,
|
|
254
254
|
},
|
|
255
255
|
|
|
256
256
|
/**
|
|
@@ -267,7 +267,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
267
267
|
type: Boolean,
|
|
268
268
|
value: false,
|
|
269
269
|
reflectToAttribute: true,
|
|
270
|
-
observer: '_modelessChanged'
|
|
270
|
+
observer: '_modelessChanged',
|
|
271
271
|
},
|
|
272
272
|
|
|
273
273
|
/**
|
|
@@ -278,7 +278,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
278
278
|
hidden: {
|
|
279
279
|
type: Boolean,
|
|
280
280
|
reflectToAttribute: true,
|
|
281
|
-
observer: '_hiddenChanged'
|
|
281
|
+
observer: '_hiddenChanged',
|
|
282
282
|
},
|
|
283
283
|
|
|
284
284
|
/**
|
|
@@ -288,7 +288,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
288
288
|
*/
|
|
289
289
|
focusTrap: {
|
|
290
290
|
type: Boolean,
|
|
291
|
-
value: false
|
|
291
|
+
value: false,
|
|
292
292
|
},
|
|
293
293
|
|
|
294
294
|
/**
|
|
@@ -297,22 +297,22 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
297
297
|
*/
|
|
298
298
|
restoreFocusOnClose: {
|
|
299
299
|
type: Boolean,
|
|
300
|
-
value: false
|
|
300
|
+
value: false,
|
|
301
301
|
},
|
|
302
302
|
|
|
303
303
|
/** @private */
|
|
304
304
|
_mouseDownInside: {
|
|
305
|
-
type: Boolean
|
|
305
|
+
type: Boolean,
|
|
306
306
|
},
|
|
307
307
|
|
|
308
308
|
/** @private */
|
|
309
309
|
_mouseUpInside: {
|
|
310
|
-
type: Boolean
|
|
310
|
+
type: Boolean,
|
|
311
311
|
},
|
|
312
312
|
|
|
313
313
|
/** @private */
|
|
314
314
|
_instance: {
|
|
315
|
-
type: Object
|
|
315
|
+
type: Object,
|
|
316
316
|
},
|
|
317
317
|
|
|
318
318
|
/** @private */
|
|
@@ -337,7 +337,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
337
337
|
_oldRenderer: Object,
|
|
338
338
|
|
|
339
339
|
/** @private */
|
|
340
|
-
_oldOpened: Boolean
|
|
340
|
+
_oldOpened: Boolean,
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
343
|
|
|
@@ -417,7 +417,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
417
417
|
var evt = new CustomEvent('vaadin-overlay-close', {
|
|
418
418
|
bubbles: true,
|
|
419
419
|
cancelable: true,
|
|
420
|
-
detail: { sourceEvent: sourceEvent }
|
|
420
|
+
detail: { sourceEvent: sourceEvent },
|
|
421
421
|
});
|
|
422
422
|
this.dispatchEvent(evt);
|
|
423
423
|
if (!evt.defaultPrevented) {
|
|
@@ -496,7 +496,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
496
496
|
const evt = new CustomEvent('vaadin-overlay-outside-click', {
|
|
497
497
|
bubbles: true,
|
|
498
498
|
cancelable: true,
|
|
499
|
-
detail: { sourceEvent: event }
|
|
499
|
+
detail: { sourceEvent: event },
|
|
500
500
|
});
|
|
501
501
|
this.dispatchEvent(evt);
|
|
502
502
|
|
|
@@ -528,7 +528,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
528
528
|
const evt = new CustomEvent('vaadin-overlay-escape-press', {
|
|
529
529
|
bubbles: true,
|
|
530
530
|
cancelable: true,
|
|
531
|
-
detail: { sourceEvent: event }
|
|
531
|
+
detail: { sourceEvent: event },
|
|
532
532
|
});
|
|
533
533
|
this.dispatchEvent(evt);
|
|
534
534
|
|
|
@@ -838,7 +838,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
838
838
|
if (this._instance) {
|
|
839
839
|
this._instance.forwardHostProp(prop, value);
|
|
840
840
|
}
|
|
841
|
-
}
|
|
841
|
+
},
|
|
842
842
|
});
|
|
843
843
|
}
|
|
844
844
|
|
|
@@ -854,7 +854,7 @@ class OverlayElement extends ThemableMixin(DirMixin(PolymerElement)) {
|
|
|
854
854
|
|
|
855
855
|
let scopeCssText = Array.from(templateRoot.querySelectorAll('style')).reduce(
|
|
856
856
|
(result, style) => result + style.textContent,
|
|
857
|
-
''
|
|
857
|
+
'',
|
|
858
858
|
);
|
|
859
859
|
|
|
860
860
|
// The overlay root’s :host styles should not apply inside the overlay
|