@exmg/exm-navigation 1.1.9-alpha.0 → 1.1.10

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,13 +14,15 @@ 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() {
20
22
  super();
21
23
  this.items = [];
22
24
  this.path = ['chat'];
23
- this.drawerWidth = 319;
25
+ this.drawerWidth = 275;
24
26
  this.disableNavigate = false;
25
27
  /**
26
28
  * The menu item triggered by hovering and entering submenu's
@@ -91,6 +93,7 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
91
93
  this.path = path;
92
94
  this.selectedItem = path;
93
95
  this.activeItem = path;
96
+ this.handleDrawerOpen();
94
97
  }
95
98
  updated(changedProperties) {
96
99
  if (changedProperties.has('media')) {
@@ -109,6 +112,7 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
109
112
  if (changedProperties.has('media')) {
110
113
  this.handleMediaTypeChange.bind(this)();
111
114
  }
115
+ document.documentElement.style.setProperty('--exm-navigation-submenu-width', `${this.drawerWidth}px`);
112
116
  /**
113
117
  * Set the start path
114
118
  */
@@ -386,7 +390,7 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
386
390
  }
387
391
  render() {
388
392
  const containerStyle = {
389
- '--exm-drawer-width': `${this.getDrawerWidth()}px`,
393
+ '--exm-navigation-submenu-column-width': `${this.getDrawerWidth()}px`,
390
394
  };
391
395
  const containerClass = { 'show-topbar': !this.railOpen };
392
396
  return html `
@@ -7,8 +7,8 @@ export const MediaQueries = (superClass) => {
7
7
  this.media = 'desktop';
8
8
  this.touch = false;
9
9
  this.mobileMedia = window.matchMedia('(max-width: 960px)');
10
- this.tabletMedia = window.matchMedia('(min-width: 961px) and (max-width: 1200px)');
11
- this.desktopMedia = window.matchMedia('(min-width: 1201px)');
10
+ this.tabletMedia = window.matchMedia('(min-width: 961px) and (max-width: 1600px)');
11
+ this.desktopMedia = window.matchMedia('(min-width: 1601px)');
12
12
  this.hoverMedia = window.matchMedia('(hover: hover)');
13
13
  }
14
14
  updateMedia(media) {
@@ -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-drawer-width, 500px) 1fr;
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
- }
6
-
7
3
  :host {
8
- --exm-drawer-max-width: 319px;
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(--mdc-drawer-width, 300px) 1fr;
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,8 +14,8 @@ export const style = css `
17
14
 
18
15
  aside {
19
16
  position: absolute;
20
- left: calc(-1 * var(--exm-drawer-max-width, 300px) - 1px);
21
- width: var(--exm-drawer-max-width, 300px);
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exmg/exm-navigation",
3
- "version": "1.1.9-alpha.0",
3
+ "version": "1.1.10",
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
- "@exmg/lit-base": "^3.0.0",
23
- "@lit-labs/motion": "^1.0.7",
24
- "@material/mwc-top-app-bar-fixed": "^0.27.0",
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.0.0",
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": "1973df6ecaaf0a57b688f5eb8852516295bc04d6"
50
+ "gitHead": "36f7f6dd58a96ea7edda7af31b25e679555d79c4"
54
51
  }