@exmg/exm-navigation 1.1.9 → 1.1.10-alpha.35
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.
|
@@ -10,6 +10,8 @@ import './exm-navigation-rail.js';
|
|
|
10
10
|
import './exm-navigation-sub-menu.js';
|
|
11
11
|
import './exm-navigation-drawer-menu.js';
|
|
12
12
|
import './exm-navigation-drawer.js';
|
|
13
|
+
import '@material/web/icon/icon.js';
|
|
14
|
+
import '@material/web/iconbutton/icon-button.js';
|
|
13
15
|
declare const ExmNavigationBase_base: (new (...args: any[]) => {
|
|
14
16
|
media: "mobile" | "tablet" | "desktop";
|
|
15
17
|
touch: boolean;
|
|
@@ -14,6 +14,8 @@ import './exm-navigation-rail.js';
|
|
|
14
14
|
import './exm-navigation-sub-menu.js';
|
|
15
15
|
import './exm-navigation-drawer-menu.js';
|
|
16
16
|
import './exm-navigation-drawer.js';
|
|
17
|
+
import '@material/web/icon/icon.js';
|
|
18
|
+
import '@material/web/iconbutton/icon-button.js';
|
|
17
19
|
// eslint-disable-next-line new-cap
|
|
18
20
|
export class ExmNavigationBase extends MediaQueries(ExmgElement) {
|
|
19
21
|
constructor() {
|
|
@@ -78,7 +80,7 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
|
|
|
78
80
|
path = [];
|
|
79
81
|
}
|
|
80
82
|
path[depth] = item.id;
|
|
81
|
-
if (item.path === window.location.pathname) {
|
|
83
|
+
if (item.path === window.location.pathname || `${item.path}/` === window.location.pathname) {
|
|
82
84
|
finished = true;
|
|
83
85
|
break;
|
|
84
86
|
}
|
|
@@ -110,6 +112,7 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
|
|
|
110
112
|
if (changedProperties.has('media')) {
|
|
111
113
|
this.handleMediaTypeChange.bind(this)();
|
|
112
114
|
}
|
|
115
|
+
document.documentElement.style.setProperty('--exm-navigation-submenu-width', `${this.drawerWidth}px`);
|
|
113
116
|
/**
|
|
114
117
|
* Set the start path
|
|
115
118
|
*/
|
|
@@ -387,7 +390,7 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
|
|
|
387
390
|
}
|
|
388
391
|
render() {
|
|
389
392
|
const containerStyle = {
|
|
390
|
-
'--exm-
|
|
393
|
+
'--exm-navigation-submenu-column-width': `${this.getDrawerWidth()}px`,
|
|
391
394
|
};
|
|
392
395
|
const containerClass = { 'show-topbar': !this.railOpen };
|
|
393
396
|
return html `
|
|
@@ -2,7 +2,7 @@ import { css } from 'lit';
|
|
|
2
2
|
export const style = css `
|
|
3
3
|
.navigation-container {
|
|
4
4
|
display: grid;
|
|
5
|
-
grid-template-columns: auto var(--exm-
|
|
5
|
+
grid-template-columns: auto var(--exm-navigation-submenu-column-width, 500px) 1fr;
|
|
6
6
|
grid-template-rows: 1fr;
|
|
7
7
|
width: 100%;
|
|
8
8
|
transition: grid-template-columns 0.3s ease;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
export const style = css `
|
|
3
|
-
:root {
|
|
4
|
-
--md-sys-color-background: var(--md-sys-color-surface-container-high);
|
|
5
|
-
--exm-drawer-max-width: 319px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
3
|
:host {
|
|
4
|
+
--md-sys-color-background: var(--md-sys-color-surface-container-high);
|
|
5
|
+
--_exm-navigation-submenu-width: var(--exm-navigation-submenu-width);
|
|
9
6
|
display: grid;
|
|
10
|
-
grid-template-columns: var(--
|
|
7
|
+
grid-template-columns: var(--_exm-navigation-submenu-width, 300px) 1fr;
|
|
11
8
|
height: 100vh;
|
|
12
9
|
width: 100%;
|
|
13
10
|
box-sizing: border-box;
|
|
@@ -17,15 +14,15 @@ export const style = css `
|
|
|
17
14
|
|
|
18
15
|
aside {
|
|
19
16
|
position: absolute;
|
|
20
|
-
left: calc(-1 * var(--
|
|
21
|
-
width: var(--
|
|
17
|
+
left: calc(-1 * var(--_exm-navigation-submenu-width, 300px) - 1px);
|
|
18
|
+
width: var(--_exm-navigation-submenu-width, 300px);
|
|
22
19
|
height: 100%;
|
|
23
20
|
transition: left 0.3s ease-out;
|
|
24
21
|
z-index: 4;
|
|
25
22
|
background-color: var(--exm-drawer-container-color, var(--md-sys-color-surface-container, #f3edf7));
|
|
26
23
|
color: var(--exm-drawer-container-on-color, var(--md-sys-color-on-surface-container, #f3edf7));
|
|
27
24
|
border-radius: 0 var(--mdc-shape-large, 0) var(--mdc-shape-large, 0) 0;
|
|
28
|
-
border-left: 1px solid var(--md-sys-color-outline);
|
|
25
|
+
border-left: 1px solid var(--md-sys-color-outline-variant);
|
|
29
26
|
|
|
30
27
|
&.open {
|
|
31
28
|
left: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exmg/exm-navigation",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10-alpha.35+671db4b",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,20 +15,17 @@
|
|
|
15
15
|
"./exm-navigation-icon-button.js": "./dist/exm-navigation-icon-button.js",
|
|
16
16
|
"./exm-navigation-rail.js": "./dist/exm-navigation-rail.js",
|
|
17
17
|
"./exm-navigation-rail-nav-item.js": "./dist/exm-navigation-rail-nav-item.js",
|
|
18
|
-
"./exm-navigation-topbar.js": "./dist/exm-navigation-topbar.js"
|
|
19
|
-
"./exm-navigation-base.js": "./dist/ExmNavigationBase.js"
|
|
18
|
+
"./exm-navigation-topbar.js": "./dist/exm-navigation-topbar.js"
|
|
20
19
|
},
|
|
21
20
|
"dependencies": {
|
|
22
|
-
"@
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
"@lit-labs/motion": "^1.0.7"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@exmg/lit-base": "^3.0.3",
|
|
25
25
|
"@material/web": "^2.2.0",
|
|
26
|
-
"lit": "^3.
|
|
26
|
+
"lit": "^3.2.1",
|
|
27
27
|
"tslib": "^2.6.2"
|
|
28
28
|
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@exmg/lit-cli": "1.1.13"
|
|
31
|
-
},
|
|
32
29
|
"keywords": [
|
|
33
30
|
"web-components",
|
|
34
31
|
"lit",
|
|
@@ -50,5 +47,5 @@
|
|
|
50
47
|
"publishConfig": {
|
|
51
48
|
"access": "public"
|
|
52
49
|
},
|
|
53
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "671db4b2e04ae387cc0eba60fc4419b02036b70b"
|
|
54
51
|
}
|