@vaadin/app-layout 24.8.4 → 24.9.0-alpha1
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/web-types.json +1 -1
- package/web-types.lit.json +1 -1
- package/src/vaadin-lit-app-layout.js +0 -59
- package/src/vaadin-lit-drawer-toggle.js +0 -87
- package/theme/lumo/vaadin-lit-app-layout.d.ts +0 -2
- package/theme/lumo/vaadin-lit-app-layout.js +0 -2
- package/theme/lumo/vaadin-lit-drawer-toggle.d.ts +0 -2
- package/theme/lumo/vaadin-lit-drawer-toggle.js +0 -2
- package/theme/material/vaadin-lit-app-layout.d.ts +0 -2
- package/theme/material/vaadin-lit-app-layout.js +0 -2
- package/theme/material/vaadin-lit-drawer-toggle.d.ts +0 -2
- package/theme/material/vaadin-lit-drawer-toggle.js +0 -2
- package/vaadin-lit-app-layout.d.ts +0 -1
- package/vaadin-lit-app-layout.js +0 -2
- package/vaadin-lit-drawer-toggle.d.ts +0 -1
- package/vaadin-lit-drawer-toggle.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/app-layout",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.9.0-alpha1",
|
|
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": "
|
|
41
|
-
"@vaadin/button": "
|
|
42
|
-
"@vaadin/component-base": "
|
|
43
|
-
"@vaadin/vaadin-lumo-styles": "
|
|
44
|
-
"@vaadin/vaadin-material-styles": "
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "
|
|
40
|
+
"@vaadin/a11y-base": "24.9.0-alpha1",
|
|
41
|
+
"@vaadin/button": "24.9.0-alpha1",
|
|
42
|
+
"@vaadin/component-base": "24.9.0-alpha1",
|
|
43
|
+
"@vaadin/vaadin-lumo-styles": "24.9.0-alpha1",
|
|
44
|
+
"@vaadin/vaadin-material-styles": "24.9.0-alpha1",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "24.9.0-alpha1",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/chai-plugins": "
|
|
50
|
-
"@vaadin/test-runner-commands": "
|
|
49
|
+
"@vaadin/chai-plugins": "24.9.0-alpha1",
|
|
50
|
+
"@vaadin/test-runner-commands": "24.9.0-alpha1",
|
|
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": "cc13d59f0e3cd1a3b0c19c1a900a5308446fe7ac"
|
|
59
59
|
}
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './detect-ios-navbar.js';
|
|
7
|
-
import './safe-area-inset.js';
|
|
8
|
-
import { html, LitElement } from 'lit';
|
|
9
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
|
-
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
12
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
-
import { AppLayoutMixin } from './vaadin-app-layout-mixin.js';
|
|
14
|
-
import { appLayoutStyles } from './vaadin-app-layout-styles.js';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* LitElement based version of `<vaadin-app-layout>` web component.
|
|
18
|
-
*
|
|
19
|
-
* ## Disclaimer
|
|
20
|
-
*
|
|
21
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
22
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
23
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
24
|
-
*/
|
|
25
|
-
class AppLayout extends AppLayoutMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
26
|
-
static get is() {
|
|
27
|
-
return 'vaadin-app-layout';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static get styles() {
|
|
31
|
-
return appLayoutStyles;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** @protected */
|
|
35
|
-
render() {
|
|
36
|
-
return html`
|
|
37
|
-
<div part="navbar" id="navbarTop">
|
|
38
|
-
<slot name="navbar" @slotchange="${this._updateTouchOptimizedMode}"></slot>
|
|
39
|
-
</div>
|
|
40
|
-
<div part="backdrop" @click="${this._onBackdropClick}" @touchend="${this._onBackdropTouchend}"></div>
|
|
41
|
-
<div part="drawer" id="drawer">
|
|
42
|
-
<slot name="drawer" id="drawerSlot" @slotchange="${this._updateDrawerSize}"></slot>
|
|
43
|
-
</div>
|
|
44
|
-
<div content>
|
|
45
|
-
<slot></slot>
|
|
46
|
-
</div>
|
|
47
|
-
<div part="navbar" id="navbarBottom" bottom hidden>
|
|
48
|
-
<slot name="navbar-bottom"></slot>
|
|
49
|
-
</div>
|
|
50
|
-
<div hidden>
|
|
51
|
-
<slot id="touchSlot" name="navbar touch-optimized" @slotchange="${this._updateTouchOptimizedMode}"></slot>
|
|
52
|
-
</div>
|
|
53
|
-
`;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
defineCustomElement(AppLayout);
|
|
58
|
-
|
|
59
|
-
export { AppLayout };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { html, LitElement } from 'lit';
|
|
7
|
-
import { buttonStyles } from '@vaadin/button/src/vaadin-button-core-styles.js';
|
|
8
|
-
import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
|
|
9
|
-
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
|
-
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
11
|
-
import { isEmptyTextNode } from '@vaadin/component-base/src/dom-utils.js';
|
|
12
|
-
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
13
|
-
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
14
|
-
import { drawerToggle } from './vaadin-drawer-toggle-styles.js';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* LitElement based version of `<vaadin-drawer-toggle>` web component.
|
|
18
|
-
*
|
|
19
|
-
* ## Disclaimer
|
|
20
|
-
*
|
|
21
|
-
* This component is an experiment and not yet a part of Vaadin platform.
|
|
22
|
-
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
23
|
-
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
24
|
-
*/
|
|
25
|
-
class DrawerToggle extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
26
|
-
static get is() {
|
|
27
|
-
return 'vaadin-drawer-toggle';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static get styles() {
|
|
31
|
-
return [buttonStyles, drawerToggle];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
static get properties() {
|
|
35
|
-
return {
|
|
36
|
-
ariaLabel: {
|
|
37
|
-
type: String,
|
|
38
|
-
value: 'Toggle navigation panel',
|
|
39
|
-
reflectToAttribute: true,
|
|
40
|
-
sync: true,
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
/** @private */
|
|
44
|
-
_showFallbackIcon: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
value: false,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
constructor() {
|
|
52
|
-
super();
|
|
53
|
-
|
|
54
|
-
this.addEventListener('click', () => {
|
|
55
|
-
this.dispatchEvent(new CustomEvent('drawer-toggle-click', { bubbles: true, composed: true }));
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** @protected */
|
|
60
|
-
render() {
|
|
61
|
-
return html`
|
|
62
|
-
<slot id="slot" @slotchange="${this._toggleFallbackIcon}">
|
|
63
|
-
<div part="icon"></div>
|
|
64
|
-
</slot>
|
|
65
|
-
<div part="icon" ?hidden="${!this._showFallbackIcon}"></div>
|
|
66
|
-
`;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/** @protected */
|
|
70
|
-
ready() {
|
|
71
|
-
super.ready();
|
|
72
|
-
|
|
73
|
-
this._toggleFallbackIcon();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** @private */
|
|
77
|
-
_toggleFallbackIcon() {
|
|
78
|
-
const nodes = this.$.slot.assignedNodes();
|
|
79
|
-
|
|
80
|
-
// Show fallback icon if there are 1-2 empty text nodes assigned to the default slot.
|
|
81
|
-
this._showFallbackIcon = nodes.length > 0 && nodes.every((node) => isEmptyTextNode(node));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
defineCustomElement(DrawerToggle);
|
|
86
|
-
|
|
87
|
-
export { DrawerToggle };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-app-layout.js';
|
package/vaadin-lit-app-layout.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/vaadin-drawer-toggle.js';
|