@vaadin/app-layout 24.7.10 → 24.7.11
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 +10 -10
- package/src/vaadin-app-layout-mixin.js +25 -3
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/app-layout",
|
|
3
|
-
"version": "24.7.
|
|
3
|
+
"version": "24.7.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
39
|
"@polymer/polymer": "^3.0.0",
|
|
40
|
-
"@vaadin/a11y-base": "~24.7.
|
|
41
|
-
"@vaadin/button": "~24.7.
|
|
42
|
-
"@vaadin/component-base": "~24.7.
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "~24.7.
|
|
44
|
-
"@vaadin/vaadin-material-styles": "~24.7.
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "~24.7.
|
|
40
|
+
"@vaadin/a11y-base": "~24.7.11",
|
|
41
|
+
"@vaadin/button": "~24.7.11",
|
|
42
|
+
"@vaadin/component-base": "~24.7.11",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "~24.7.11",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "~24.7.11",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "~24.7.11",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/chai-plugins": "~24.7.
|
|
50
|
-
"@vaadin/test-runner-commands": "~24.7.
|
|
49
|
+
"@vaadin/chai-plugins": "~24.7.11",
|
|
50
|
+
"@vaadin/test-runner-commands": "~24.7.11",
|
|
51
51
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
52
52
|
"sinon": "^18.0.0"
|
|
53
53
|
},
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "a241a409438dcdad7edcb25eed6f13a37324b2c0"
|
|
59
59
|
}
|
|
@@ -68,6 +68,7 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
68
68
|
readOnly: true,
|
|
69
69
|
value: false,
|
|
70
70
|
reflectToAttribute: true,
|
|
71
|
+
observer: '__overlayChanged',
|
|
71
72
|
sync: true,
|
|
72
73
|
},
|
|
73
74
|
|
|
@@ -244,6 +245,22 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
244
245
|
this.__setAriaExpanded();
|
|
245
246
|
}
|
|
246
247
|
|
|
248
|
+
/**
|
|
249
|
+
* A callback for the `overlay` property observer.
|
|
250
|
+
*
|
|
251
|
+
* When layout resizes while in the overlay mode, drawer opened state
|
|
252
|
+
* is not changed, but focus trap needs to be removed.
|
|
253
|
+
*
|
|
254
|
+
* @param {boolean} overlay
|
|
255
|
+
* @param {boolean} oldOverlay
|
|
256
|
+
* @private
|
|
257
|
+
*/
|
|
258
|
+
__overlayChanged(_overlay, oldOverlay) {
|
|
259
|
+
if (oldOverlay) {
|
|
260
|
+
this.__restoreFocus();
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
247
264
|
/**
|
|
248
265
|
* A callback for the `i18n` property observer.
|
|
249
266
|
*
|
|
@@ -412,9 +429,7 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
412
429
|
return;
|
|
413
430
|
}
|
|
414
431
|
|
|
415
|
-
this.
|
|
416
|
-
this.__focusTrapController.releaseFocus();
|
|
417
|
-
this.$.drawer.removeAttribute('tabindex');
|
|
432
|
+
this.__restoreFocus();
|
|
418
433
|
|
|
419
434
|
// Move focus to the drawer toggle when closing the drawer.
|
|
420
435
|
const toggle = this.querySelector('vaadin-drawer-toggle');
|
|
@@ -424,6 +439,13 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
424
439
|
}
|
|
425
440
|
}
|
|
426
441
|
|
|
442
|
+
/** @private */
|
|
443
|
+
__restoreFocus() {
|
|
444
|
+
this.__ariaModalController.close();
|
|
445
|
+
this.__focusTrapController.releaseFocus();
|
|
446
|
+
this.$.drawer.removeAttribute('tabindex');
|
|
447
|
+
}
|
|
448
|
+
|
|
427
449
|
/**
|
|
428
450
|
* Closes the drawer on Escape press if it has been opened in the overlay mode.
|
|
429
451
|
*
|
package/web-types.json
CHANGED