@exmg/exm-navigation 1.1.2-alpha.0 → 1.1.2-alpha.2

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.
@@ -139,7 +139,7 @@ export class ExmNavigationBase extends MediaQueries(ExmgElement) {
139
139
  */
140
140
  handleRailItemClick({ detail }) {
141
141
  var _a;
142
- if (this.activeItem[0] !== detail || this.media === 'mobile') {
142
+ if (this.activeItem[0] !== detail || this.media !== 'desktop') {
143
143
  const items = ((_a = this.items.find((item) => item.id === detail)) === null || _a === void 0 ? void 0 : _a.items) || [];
144
144
  if (items.length && !this.touch) {
145
145
  this.selectedItem = [detail, items[0].id];
@@ -1,14 +1,11 @@
1
- import { Drawer } from '@material/mwc-drawer';
2
1
  import { ExmgElement } from '@exmg/lit-base';
3
- import '@material/mwc-drawer';
4
2
  export declare class ExmNavigationDrawerBase extends ExmgElement {
5
3
  open: boolean;
6
4
  persistent: boolean;
7
- drawer?: Drawer;
5
+ drawer?: HTMLDivElement;
8
6
  static styles: import("lit").CSSResult[];
9
7
  private handleMouseEnter;
10
8
  private handleMouseLeave;
11
- private handleDrawerClose;
12
9
  protected firstUpdated(): Promise<void>;
13
10
  render(): import("lit-html").TemplateResult<1>;
14
11
  }
@@ -3,7 +3,7 @@ import { html } from 'lit';
3
3
  import { property, query } from 'lit/decorators.js';
4
4
  import { ExmgElement } from '@exmg/lit-base';
5
5
  import { style } from './styles/exm-navigation-drawer-css.js';
6
- import '@material/mwc-drawer';
6
+ import { classMap } from 'lit/directives/class-map.js';
7
7
  export class ExmNavigationDrawerBase extends ExmgElement {
8
8
  constructor() {
9
9
  super(...arguments);
@@ -16,9 +16,6 @@ export class ExmNavigationDrawerBase extends ExmgElement {
16
16
  handleMouseLeave() {
17
17
  this.fire('drawer-mouseleave');
18
18
  }
19
- handleDrawerClose() {
20
- this.fire('drawer-mouseleave');
21
- }
22
19
  async firstUpdated() {
23
20
  var _a;
24
21
  await this.updateComplete;
@@ -30,12 +27,16 @@ export class ExmNavigationDrawerBase extends ExmgElement {
30
27
  asideElement.addEventListener('mouseleave', this.handleMouseLeave.bind(this));
31
28
  }
32
29
  }
33
- this.addEventListener('drawer-close', this.handleDrawerClose.bind(this));
34
30
  }
35
31
  render() {
36
- return html `<mwc-drawer type="dismissible" ?open=${this.open}>
32
+ const classNames = { open: this.open };
33
+ return html `<aside
34
+ class="${classMap(classNames)}"
35
+ @mouseenter=${this.handleMouseEnter}
36
+ @mouseleave=${this.handleMouseLeave}
37
+ >
37
38
  <slot></slot>
38
- </mwc-drawer>`;
39
+ </aside> `;
39
40
  }
40
41
  }
41
42
  ExmNavigationDrawerBase.styles = [style];
@@ -46,6 +47,6 @@ __decorate([
46
47
  property({ type: Boolean })
47
48
  ], ExmNavigationDrawerBase.prototype, "persistent", void 0);
48
49
  __decorate([
49
- query('mwc-drawer')
50
+ query('aside')
50
51
  ], ExmNavigationDrawerBase.prototype, "drawer", void 0);
51
52
  //# sourceMappingURL=exm-navigation-drawer-base.js.map
@@ -5,7 +5,7 @@ export const style = css `
5
5
  }
6
6
 
7
7
  :host {
8
- --mdc-drawer-width: 319px;
8
+ --exm-drawer-max-width: 319px;
9
9
  display: grid;
10
10
  grid-template-columns: var(--mdc-drawer-width, 300px) 1fr;
11
11
  height: 100vh;
@@ -15,9 +15,20 @@ export const style = css `
15
15
  position: relative;
16
16
  }
17
17
 
18
- @media screen and (min-width: 961px) {
19
- slot[name='appContent'] {
20
- background-color: rgba(0, 0, 0, 0);
18
+ aside {
19
+ position: absolute;
20
+ left: -300px;
21
+ width: var(--exm-drawer-max-width, 300px);
22
+ height: 100%;
23
+ transition: left 0.3s ease-out;
24
+ z-index: 4;
25
+ background-color: var(--exm-drawer-container-color, var(--md-sys-color-surface-container, #f3edf7));
26
+ color: var(--exm-drawer-container-on-color, var(--md-sys-color-on-surface-container, #f3edf7));
27
+ border-radius: 0 var(--mdc-shape-large, 0) var(--mdc-shape-large, 0) 0;
28
+ border-left: 1px solid var(--md-sys-color-outline);
29
+
30
+ &.open {
31
+ left: 0;
21
32
  }
22
33
  }
23
34
  `;
@@ -16,6 +16,7 @@ export const style = css `
16
16
  z-index: 8;
17
17
  box-sizing: border-box;
18
18
  width: var(--_exm-navigation-rail-width);
19
+ scrollbar-width: none;
19
20
  }
20
21
 
21
22
  @media screen and (min-width: 961px) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exmg/exm-navigation",
3
- "version": "1.1.2-alpha.0+a516f61",
3
+ "version": "1.1.2-alpha.2+b22c94c",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -49,5 +49,5 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "gitHead": "a516f61188b6b85df0fc04b26af5c0483a3d5392"
52
+ "gitHead": "b22c94c314417991814f6ce678ef9559dfe96e7d"
53
53
  }