@vaadin/app-layout 24.8.2 → 24.8.4

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/app-layout",
3
- "version": "24.8.2",
3
+ "version": "24.8.4",
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.8.2",
41
- "@vaadin/button": "~24.8.2",
42
- "@vaadin/component-base": "~24.8.2",
43
- "@vaadin/vaadin-lumo-styles": "~24.8.2",
44
- "@vaadin/vaadin-material-styles": "~24.8.2",
45
- "@vaadin/vaadin-themable-mixin": "~24.8.2",
40
+ "@vaadin/a11y-base": "~24.8.4",
41
+ "@vaadin/button": "~24.8.4",
42
+ "@vaadin/component-base": "~24.8.4",
43
+ "@vaadin/vaadin-lumo-styles": "~24.8.4",
44
+ "@vaadin/vaadin-material-styles": "~24.8.4",
45
+ "@vaadin/vaadin-themable-mixin": "~24.8.4",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/chai-plugins": "~24.8.2",
50
- "@vaadin/test-runner-commands": "~24.8.2",
49
+ "@vaadin/chai-plugins": "~24.8.4",
50
+ "@vaadin/test-runner-commands": "~24.8.4",
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": "f9e319ae7172ab06b3e567684465e36487f50bc6"
58
+ "gitHead": "849e54e967563080a685965e2dced02060b3ab23"
59
59
  }
@@ -69,6 +69,7 @@ export const AppLayoutMixin = (superclass) =>
69
69
  readOnly: true,
70
70
  value: false,
71
71
  reflectToAttribute: true,
72
+ observer: '__overlayChanged',
72
73
  sync: true,
73
74
  },
74
75
 
@@ -247,6 +248,22 @@ export const AppLayoutMixin = (superclass) =>
247
248
  this.__setAriaExpanded();
248
249
  }
249
250
 
251
+ /**
252
+ * A callback for the `overlay` property observer.
253
+ *
254
+ * When layout resizes while in the overlay mode, drawer opened state
255
+ * is not changed, but focus trap needs to be removed.
256
+ *
257
+ * @param {boolean} overlay
258
+ * @param {boolean} oldOverlay
259
+ * @private
260
+ */
261
+ __overlayChanged(_overlay, oldOverlay) {
262
+ if (oldOverlay) {
263
+ this.__restoreFocus();
264
+ }
265
+ }
266
+
250
267
  /**
251
268
  * A callback for the `i18n` property observer.
252
269
  *
@@ -409,9 +426,7 @@ export const AppLayoutMixin = (superclass) =>
409
426
  return;
410
427
  }
411
428
 
412
- this.__ariaModalController.close();
413
- this.__focusTrapController.releaseFocus();
414
- this.$.drawer.removeAttribute('tabindex');
429
+ this.__restoreFocus();
415
430
 
416
431
  // Move focus to the drawer toggle when closing the drawer.
417
432
  const toggle = this.querySelector('vaadin-drawer-toggle');
@@ -421,6 +436,13 @@ export const AppLayoutMixin = (superclass) =>
421
436
  }
422
437
  }
423
438
 
439
+ /** @private */
440
+ __restoreFocus() {
441
+ this.__ariaModalController.close();
442
+ this.__focusTrapController.releaseFocus();
443
+ this.$.drawer.removeAttribute('tabindex');
444
+ }
445
+
424
446
  /**
425
447
  * Closes the drawer on Escape press if it has been opened in the overlay mode.
426
448
  *
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/app-layout",
4
- "version": "24.8.2",
4
+ "version": "24.8.4",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/app-layout",
4
- "version": "24.8.2",
4
+ "version": "24.8.4",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {