@vaadin/app-layout 25.3.0-alpha1 → 25.3.0-alpha11
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/custom-elements.json +43 -29
- package/package.json +10 -10
- package/src/vaadin-app-layout-mixin.js +22 -12
- package/src/vaadin-app-layout.js +1 -0
- package/src/vaadin-drawer-toggle.js +1 -0
- package/web-types.json +3 -7
- package/web-types.lit.json +1 -1
package/custom-elements.json
CHANGED
|
@@ -287,34 +287,6 @@
|
|
|
287
287
|
"name": "primary-section-changed"
|
|
288
288
|
}
|
|
289
289
|
],
|
|
290
|
-
"mixins": [
|
|
291
|
-
{
|
|
292
|
-
"name": "AppLayoutMixin",
|
|
293
|
-
"module": "src/vaadin-app-layout-mixin.js"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"name": "ElementMixin",
|
|
297
|
-
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"name": "ThemableMixin",
|
|
301
|
-
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"name": "PolylitMixin",
|
|
305
|
-
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
"name": "LumoInjectionMixin",
|
|
309
|
-
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"superclass": {
|
|
313
|
-
"name": "LitElement",
|
|
314
|
-
"package": "lit"
|
|
315
|
-
},
|
|
316
|
-
"tagName": "vaadin-app-layout",
|
|
317
|
-
"customElement": true,
|
|
318
290
|
"attributes": [
|
|
319
291
|
{
|
|
320
292
|
"name": "close-drawer-on",
|
|
@@ -375,8 +347,43 @@
|
|
|
375
347
|
"name": "AppLayoutMixin",
|
|
376
348
|
"module": "src/vaadin-app-layout-mixin.js"
|
|
377
349
|
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"type": {
|
|
353
|
+
"text": "string"
|
|
354
|
+
},
|
|
355
|
+
"description": "The theme variants to apply to the component.",
|
|
356
|
+
"name": "theme"
|
|
378
357
|
}
|
|
379
|
-
]
|
|
358
|
+
],
|
|
359
|
+
"mixins": [
|
|
360
|
+
{
|
|
361
|
+
"name": "AppLayoutMixin",
|
|
362
|
+
"module": "src/vaadin-app-layout-mixin.js"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "ElementMixin",
|
|
366
|
+
"package": "@vaadin/component-base/src/element-mixin.js"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "ThemableMixin",
|
|
370
|
+
"package": "@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "PolylitMixin",
|
|
374
|
+
"package": "@vaadin/component-base/src/polylit-mixin.js"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"name": "LumoInjectionMixin",
|
|
378
|
+
"package": "@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"superclass": {
|
|
382
|
+
"name": "LitElement",
|
|
383
|
+
"package": "lit"
|
|
384
|
+
},
|
|
385
|
+
"tagName": "vaadin-app-layout",
|
|
386
|
+
"customElement": true
|
|
380
387
|
}
|
|
381
388
|
],
|
|
382
389
|
"exports": [
|
|
@@ -442,6 +449,13 @@
|
|
|
442
449
|
"name": "DisabledMixin",
|
|
443
450
|
"package": "@vaadin/a11y-base/src/disabled-mixin.js"
|
|
444
451
|
}
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"type": {
|
|
455
|
+
"text": "string"
|
|
456
|
+
},
|
|
457
|
+
"description": "The theme variants to apply to the component.",
|
|
458
|
+
"name": "theme"
|
|
445
459
|
}
|
|
446
460
|
],
|
|
447
461
|
"mixins": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/app-layout",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
39
|
-
"@vaadin/button": "25.3.0-
|
|
40
|
-
"@vaadin/component-base": "25.3.0-
|
|
41
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.3.0-alpha11",
|
|
39
|
+
"@vaadin/button": "25.3.0-alpha11",
|
|
40
|
+
"@vaadin/component-base": "25.3.0-alpha11",
|
|
41
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-alpha11",
|
|
42
42
|
"lit": "^3.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@vaadin/aura": "25.3.0-
|
|
46
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
47
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
45
|
+
"@vaadin/aura": "25.3.0-alpha11",
|
|
46
|
+
"@vaadin/chai-plugins": "25.3.0-alpha11",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.3.0-alpha11",
|
|
48
48
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-alpha11",
|
|
50
50
|
"sinon": "^22.0.0"
|
|
51
51
|
},
|
|
52
52
|
"customElements": "custom-elements.json",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "7e0c61a37e68d8971def9cdf28ad0548a0f530a9"
|
|
58
58
|
}
|
|
@@ -154,6 +154,8 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
154
154
|
this.addController(this.__focusTrapController);
|
|
155
155
|
this.__setAriaExpanded();
|
|
156
156
|
|
|
157
|
+
this.__updateDrawerSize();
|
|
158
|
+
|
|
157
159
|
this.$.drawer.addEventListener('transitionstart', () => {
|
|
158
160
|
this.__isDrawerAnimating = true;
|
|
159
161
|
});
|
|
@@ -169,7 +171,7 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
169
171
|
super.disconnectedCallback();
|
|
170
172
|
this.__resizeObserver.disconnect();
|
|
171
173
|
this.removeEventListener('drawer-toggle-click', this.__drawerToggleClickListener);
|
|
172
|
-
window.removeEventListener('close-overlay-drawer', this.
|
|
174
|
+
window.removeEventListener('close-overlay-drawer', this.__closeOverlayDrawerListener);
|
|
173
175
|
window.removeEventListener('keydown', this.__onDrawerKeyDown);
|
|
174
176
|
}
|
|
175
177
|
|
|
@@ -448,7 +450,9 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
448
450
|
}
|
|
449
451
|
|
|
450
452
|
/** @private */
|
|
451
|
-
_onBackdropClick() {
|
|
453
|
+
_onBackdropClick(event) {
|
|
454
|
+
// End the ghost click window on the first click (see `_onBackdropTouchend`).
|
|
455
|
+
event.currentTarget.style.removeProperty('pointer-events');
|
|
452
456
|
this._close();
|
|
453
457
|
}
|
|
454
458
|
|
|
@@ -458,6 +462,18 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
458
462
|
// on clickable element behind the backdrop
|
|
459
463
|
event.preventDefault();
|
|
460
464
|
|
|
465
|
+
// On iOS home screen (standalone) apps, `preventDefault()` on `touchend`
|
|
466
|
+
// does not reliably suppress the synthesized "ghost" click, which occurs
|
|
467
|
+
// on medium-length taps only. Keep the invisible backdrop hit-testable for
|
|
468
|
+
// a short while after closing, so that if a ghost click occurs it lands on
|
|
469
|
+
// the backdrop instead of the element behind it.
|
|
470
|
+
if (navigator.standalone) {
|
|
471
|
+
const backdrop = event.currentTarget;
|
|
472
|
+
backdrop.style.pointerEvents = 'auto';
|
|
473
|
+
// The ghost click arrives shortly after `touchend`.
|
|
474
|
+
setTimeout(() => backdrop.style.removeProperty('pointer-events'), 400);
|
|
475
|
+
}
|
|
476
|
+
|
|
461
477
|
this._close();
|
|
462
478
|
}
|
|
463
479
|
|
|
@@ -489,17 +505,11 @@ export const AppLayoutMixin = (superclass) =>
|
|
|
489
505
|
});
|
|
490
506
|
}
|
|
491
507
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
} else {
|
|
495
|
-
this.$.navbarTop.removeAttribute('hidden');
|
|
496
|
-
}
|
|
508
|
+
const hasNavbar = this.$.navbarTop.querySelector('[name=navbar]').assignedNodes().length > 0;
|
|
509
|
+
this.$.navbarTop.toggleAttribute('hidden', !hasNavbar);
|
|
497
510
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
} else {
|
|
501
|
-
this.$.navbarBottom.removeAttribute('hidden');
|
|
502
|
-
}
|
|
511
|
+
const hasNavbarBottom = this.$.navbarBottom.querySelector('[name=navbar-bottom]').assignedNodes().length > 0;
|
|
512
|
+
this.$.navbarBottom.toggleAttribute('hidden', !hasNavbarBottom);
|
|
503
513
|
}
|
|
504
514
|
|
|
505
515
|
/** @protected */
|
package/src/vaadin-app-layout.js
CHANGED
|
@@ -127,6 +127,7 @@ import { AppLayoutMixin } from './vaadin-app-layout-mixin.js';
|
|
|
127
127
|
* @fires {CustomEvent} overlay-changed - Fired when the `overlay` property changes.
|
|
128
128
|
* @fires {CustomEvent} primary-section-changed - Fired when the `primarySection` property changes.
|
|
129
129
|
*
|
|
130
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
130
131
|
* @customElement vaadin-app-layout
|
|
131
132
|
* @extends HTMLElement
|
|
132
133
|
*/
|
|
@@ -55,6 +55,7 @@ import { drawerToggle } from './styles/vaadin-drawer-toggle-base-styles.js';
|
|
|
55
55
|
*
|
|
56
56
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
57
57
|
*
|
|
58
|
+
* @attr {string} theme - The theme variants to apply to the component.
|
|
58
59
|
* @customElement vaadin-drawer-toggle
|
|
59
60
|
* @extends HTMLElement
|
|
60
61
|
*/
|
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": "25.3.0-
|
|
4
|
+
"version": "25.3.0-alpha11",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
"description": "The theme variants to apply to the component.",
|
|
43
43
|
"value": {
|
|
44
44
|
"type": [
|
|
45
|
-
"string"
|
|
46
|
-
"null",
|
|
47
|
-
"undefined"
|
|
45
|
+
"string"
|
|
48
46
|
]
|
|
49
47
|
}
|
|
50
48
|
}
|
|
@@ -131,9 +129,7 @@
|
|
|
131
129
|
"description": "The theme variants to apply to the component.",
|
|
132
130
|
"value": {
|
|
133
131
|
"type": [
|
|
134
|
-
"string"
|
|
135
|
-
"null",
|
|
136
|
-
"undefined"
|
|
132
|
+
"string"
|
|
137
133
|
]
|
|
138
134
|
}
|
|
139
135
|
}
|
package/web-types.lit.json
CHANGED