@exmg/exm-navigation 1.1.0 → 1.1.1-alpha.9

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.
Files changed (93) hide show
  1. package/README.md +73 -0
  2. package/{src → dist}/exm-navigation-base.d.ts +37 -11
  3. package/{src → dist}/exm-navigation-base.js +161 -85
  4. package/{src → dist}/exm-navigation-drawer-base.d.ts +1 -4
  5. package/{src → dist}/exm-navigation-drawer-base.js +10 -7
  6. package/{src → dist}/exm-navigation-drawer-nav-item-base.js +12 -8
  7. package/{src → dist}/exm-navigation-icon-button-base.js +2 -0
  8. package/{src → dist}/exm-navigation-rail-base.js +2 -2
  9. package/{src → dist}/exm-navigation-sub-menu-base.d.ts +11 -0
  10. package/dist/exm-navigation-sub-menu-base.js +153 -0
  11. package/{src → dist}/exm-navigation-topbar-base.js +5 -5
  12. package/dist/index.d.ts +12 -0
  13. package/dist/index.js +13 -0
  14. package/{src → dist}/mixins/media-queries.d.ts +1 -0
  15. package/{src → dist}/mixins/media-queries.js +16 -4
  16. package/{src → dist}/styles/exm-navigation-css.d.ts +0 -1
  17. package/dist/styles/exm-navigation-css.js +72 -0
  18. package/{src → dist}/styles/exm-navigation-drawer-css.d.ts +0 -1
  19. package/dist/styles/exm-navigation-drawer-css.js +35 -0
  20. package/{src → dist}/styles/exm-navigation-drawer-nav-item-css.d.ts +0 -1
  21. package/dist/styles/exm-navigation-drawer-nav-item-css.js +84 -0
  22. package/{src → dist}/styles/exm-navigation-icon-button-css.d.ts +0 -1
  23. package/dist/styles/exm-navigation-icon-button-css.js +29 -0
  24. package/{src → dist}/styles/exm-navigation-icon-css.d.ts +0 -1
  25. package/dist/styles/exm-navigation-icon-css.js +22 -0
  26. package/{src → dist}/styles/exm-navigation-rail-css.d.ts +0 -1
  27. package/dist/styles/exm-navigation-rail-css.js +50 -0
  28. package/{src → dist}/styles/exm-navigation-rail-nav-item-css.d.ts +0 -1
  29. package/dist/styles/exm-navigation-rail-nav-item-css.js +94 -0
  30. package/{src → dist}/styles/exm-navigation-sub-menu-css.d.ts +0 -1
  31. package/dist/styles/exm-navigation-sub-menu-css.js +21 -0
  32. package/{src → dist}/styles/exm-navigation-topbar-css.d.ts +0 -1
  33. package/dist/styles/exm-navigation-topbar-css.js +30 -0
  34. package/package.json +20 -22
  35. package/index.d.ts +0 -12
  36. package/index.js +0 -13
  37. package/src/exm-navigation-menu-button-base.d.ts +0 -7
  38. package/src/exm-navigation-menu-button.d.ts +0 -9
  39. package/src/exm-navigation-signals.d.ts +0 -4
  40. package/src/exm-navigation-sub-menu-base.js +0 -88
  41. package/src/mediaQueries.d.ts +0 -7
  42. package/src/styles/exm-navigate-drawer-nav-item-css.d.ts +0 -2
  43. package/src/styles/exm-navigate-drawer-nav-item-css.js +0 -4
  44. package/src/styles/exm-navigation-css.js +0 -4
  45. package/src/styles/exm-navigation-drawer-css.js +0 -4
  46. package/src/styles/exm-navigation-drawer-nav-item-css.js +0 -4
  47. package/src/styles/exm-navigation-drawer-nav-item.scss +0 -36
  48. package/src/styles/exm-navigation-drawer.scss +0 -24
  49. package/src/styles/exm-navigation-icon-button-css.js +0 -4
  50. package/src/styles/exm-navigation-icon-button.scss +0 -19
  51. package/src/styles/exm-navigation-icon-css.js +0 -4
  52. package/src/styles/exm-navigation-icon.scss +0 -18
  53. package/src/styles/exm-navigation-rail-css.js +0 -4
  54. package/src/styles/exm-navigation-rail-nav-item-css.js +0 -4
  55. package/src/styles/exm-navigation-rail-nav-item.scss +0 -92
  56. package/src/styles/exm-navigation-rail.scss +0 -44
  57. package/src/styles/exm-navigation-sub-menu-css.js +0 -4
  58. package/src/styles/exm-navigation-sub-menu.scss +0 -34
  59. package/src/styles/exm-navigation-topbar-css.js +0 -4
  60. package/src/styles/exm-navigation-topbar.scss +0 -27
  61. package/src/styles/exm-navigation.scss +0 -52
  62. /package/{src → dist}/exm-navigation-drawer-menu-base.d.ts +0 -0
  63. /package/{src → dist}/exm-navigation-drawer-menu-base.js +0 -0
  64. /package/{src → dist}/exm-navigation-drawer-menu.d.ts +0 -0
  65. /package/{src → dist}/exm-navigation-drawer-menu.js +0 -0
  66. /package/{src → dist}/exm-navigation-drawer-nav-item-base.d.ts +0 -0
  67. /package/{src → dist}/exm-navigation-drawer-nav-item.d.ts +0 -0
  68. /package/{src → dist}/exm-navigation-drawer-nav-item.js +0 -0
  69. /package/{src → dist}/exm-navigation-drawer.d.ts +0 -0
  70. /package/{src → dist}/exm-navigation-drawer.js +0 -0
  71. /package/{src → dist}/exm-navigation-icon-base.d.ts +0 -0
  72. /package/{src → dist}/exm-navigation-icon-base.js +0 -0
  73. /package/{src → dist}/exm-navigation-icon-button-base.d.ts +0 -0
  74. /package/{src → dist}/exm-navigation-icon-button.d.ts +0 -0
  75. /package/{src → dist}/exm-navigation-icon-button.js +0 -0
  76. /package/{src → dist}/exm-navigation-icon.d.ts +0 -0
  77. /package/{src → dist}/exm-navigation-icon.js +0 -0
  78. /package/{src → dist}/exm-navigation-rail-base.d.ts +0 -0
  79. /package/{src → dist}/exm-navigation-rail-nav-item-base.d.ts +0 -0
  80. /package/{src → dist}/exm-navigation-rail-nav-item-base.js +0 -0
  81. /package/{src → dist}/exm-navigation-rail-nav-item.d.ts +0 -0
  82. /package/{src → dist}/exm-navigation-rail-nav-item.js +0 -0
  83. /package/{src → dist}/exm-navigation-rail.d.ts +0 -0
  84. /package/{src → dist}/exm-navigation-rail.js +0 -0
  85. /package/{src → dist}/exm-navigation-sub-menu.d.ts +0 -0
  86. /package/{src → dist}/exm-navigation-sub-menu.js +0 -0
  87. /package/{src → dist}/exm-navigation-topbar-base.d.ts +0 -0
  88. /package/{src → dist}/exm-navigation-topbar.d.ts +0 -0
  89. /package/{src → dist}/exm-navigation-topbar.js +0 -0
  90. /package/{src → dist}/exm-navigation.d.ts +0 -0
  91. /package/{src → dist}/exm-navigation.js +0 -0
  92. /package/{src → dist}/types.d.ts +0 -0
  93. /package/{src → dist}/types.js +0 -0
@@ -21,7 +21,7 @@ export class ExmNavigationRailBase extends ExmgElement {
21
21
  this.fire('rail-item-mouseleave', itemId);
22
22
  }
23
23
  render() {
24
- return html `<div class="top"><slot name="top"></slot></div>
24
+ return html `<div class="rail-top"><slot name="rail-top"></slot></div>
25
25
  <nav class="nav">
26
26
  <ul>
27
27
  ${repeat(this.items, (item) => {
@@ -42,7 +42,7 @@ export class ExmNavigationRailBase extends ExmgElement {
42
42
  })}
43
43
  </ul>
44
44
  </nav>
45
- <div class="bottom"><slot name="bottom"></slot></div>`;
45
+ <div class="rail-bottom"><slot name="rail-bottom"></slot></div>`;
46
46
  }
47
47
  }
48
48
  ExmNavigationRailBase.styles = [style];
@@ -8,10 +8,21 @@ import '@exmg/exm-collapsed/exm-collapsed.js';
8
8
  export declare class ExmNavigationSubMenuBase extends ExmgElement {
9
9
  items: MenuItem[];
10
10
  path: (string | null)[];
11
+ hasBackButton: boolean;
11
12
  currentItem?: MenuItem['items'];
13
+ static itemIndex: number;
14
+ navigationElement?: HTMLElement;
12
15
  static styles: import("lit").CSSResult[];
13
16
  protected updated(changedProperties: PropertyValues): void;
17
+ connectedCallback(): void;
18
+ disconnectedCallback(): void;
14
19
  private handleSubMenuItemClick;
20
+ /**
21
+ * If a collapsable menuitem is not selected we can just pass the path.
22
+ * If it is selected, we remove the item from the path to collapse the menu again
23
+ */
24
+ private handleCollapsableSubMenuItemClick;
25
+ private getItemStyle;
15
26
  private renderSubMenu;
16
27
  render(): import("lit-html").TemplateResult<1>;
17
28
  }
@@ -0,0 +1,153 @@
1
+ import { __decorate } from "tslib";
2
+ import { html } from 'lit';
3
+ import { ExmgElement } from '@exmg/lit-base/index.js';
4
+ import { property, query, state } from 'lit/decorators.js';
5
+ import { repeat } from 'lit/directives/repeat.js';
6
+ import { style } from './styles/exm-navigation-sub-menu-css.js';
7
+ import { animate, fadeOut, fadeIn } from '@lit-labs/motion';
8
+ import './exm-navigation-rail-nav-item.js';
9
+ import './exm-navigation-drawer-nav-item.js';
10
+ import '@material/web/list/list.js';
11
+ import '@exmg/exm-collapsed/exm-collapsed.js';
12
+ import { classMap } from 'lit/directives/class-map.js';
13
+ import { styleMap } from 'lit/directives/style-map.js';
14
+ export class ExmNavigationSubMenuBase extends ExmgElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.items = [];
18
+ this.path = [];
19
+ this.hasBackButton = false;
20
+ }
21
+ updated(changedProperties) {
22
+ var _a;
23
+ if (changedProperties.has('path') || changedProperties.has('items')) {
24
+ this.currentItem = ((_a = this.items.find((item) => item.id === this.path[0])) === null || _a === void 0 ? void 0 : _a.items) || [];
25
+ }
26
+ }
27
+ connectedCallback() {
28
+ super.connectedCallback();
29
+ }
30
+ disconnectedCallback() {
31
+ if (this.navigationElement) {
32
+ this.navigationElement.classList.remove('show');
33
+ }
34
+ super.disconnectedCallback();
35
+ }
36
+ handleSubMenuItemClick(path) {
37
+ this.fire('sub-menu-item-click', path);
38
+ }
39
+ /**
40
+ * If a collapsable menuitem is not selected we can just pass the path.
41
+ * If it is selected, we remove the item from the path to collapse the menu again
42
+ */
43
+ handleCollapsableSubMenuItemClick(path, id, selected) {
44
+ if (!selected) {
45
+ this.handleSubMenuItemClick(path);
46
+ return;
47
+ }
48
+ const index = path.findIndex((item) => item === id);
49
+ this.fire('sub-menu-item-click', path.splice(0, index));
50
+ }
51
+ getItemStyle() {
52
+ return {
53
+ 'grid-area': `${ExmNavigationSubMenuBase.itemIndex}/1/${ExmNavigationSubMenuBase.itemIndex + 1}/2`,
54
+ };
55
+ }
56
+ renderSubMenu(item, path) {
57
+ const selected = this.path.includes(item.id);
58
+ return html `
59
+ <exm-navigation-drawer-nav-item
60
+ ${animate({
61
+ keyframeOptions: {
62
+ duration: 300,
63
+ },
64
+ out: fadeOut,
65
+ in: fadeIn,
66
+ properties: ['opacity'],
67
+ })}
68
+ style=${styleMap(this.getItemStyle())}
69
+ type="button"
70
+ ?selected=${selected}
71
+ class="has-submenu ${this.path.includes(item.id) ? 'selected' : ''}"
72
+ @click=${this.handleCollapsableSubMenuItemClick.bind(this, [...path], item.id, selected)}
73
+ ?has-submenu=${true}
74
+ submenu-icon=${this.path.includes(item.id) ? 'expand_less' : 'expand_more'}
75
+ >${item.label}
76
+ </exm-navigation-drawer-nav-item>
77
+ <exm-collapsed id="collapsed" ?opened=${this.path.includes(item.id)}>
78
+ <div class="sub-menu">
79
+ <md-list>
80
+ <!-- Need to check for multiple items -->
81
+ ${(item.items || []).map((subItem) => {
82
+ ExmNavigationSubMenuBase.itemIndex += 1;
83
+ return (subItem.items || []).length === 0
84
+ ? html `
85
+ <exm-navigation-drawer-nav-item
86
+ style=${styleMap(this.getItemStyle())}
87
+ class="collapsed-item"
88
+ ?selected=${this.path.includes(subItem.id)}
89
+ @click=${this.handleSubMenuItemClick.bind(this, [...path, subItem.id])}
90
+ >
91
+ ${subItem.label}
92
+ </exm-navigation-drawer-nav-item>
93
+ `
94
+ : this.renderSubMenu(item, [this.path[0] || '', item.id]);
95
+ })}
96
+ </md-list>
97
+ </div>
98
+ </exm-collapsed>
99
+ `;
100
+ }
101
+ render() {
102
+ const navClass = { nav: true, 'has-back-button': this.hasBackButton };
103
+ ExmNavigationSubMenuBase.itemIndex = 0;
104
+ return html `<div class="top"><slot name="top"></slot></div>
105
+ <nav id="exm-navigation-sub-menu" class=${classMap(navClass)}>
106
+ <md-list>
107
+ ${repeat(this.currentItem || [], ({ id }) => id, (item) => {
108
+ ExmNavigationSubMenuBase.itemIndex += 1;
109
+ return (item.items || []).length === 0
110
+ ? html `
111
+ <exm-navigation-drawer-nav-item
112
+ ${animate({
113
+ keyframeOptions: {
114
+ duration: 300,
115
+ },
116
+ stabilizeOut: true,
117
+ out: fadeOut,
118
+ in: fadeIn,
119
+ properties: ['opacity'],
120
+ })}
121
+ style="${styleMap(this.getItemStyle())}"
122
+ type="button"
123
+ ?selected=${this.path.includes(item.id)}
124
+ @click=${this.handleSubMenuItemClick.bind(this, [this.path[0] || '', item.id])}
125
+ >
126
+ ${item.label}
127
+ </exm-navigation-drawer-nav-item>
128
+ `
129
+ : this.renderSubMenu(item, [this.path[0] || '', item.id]);
130
+ })}
131
+ </md-list>
132
+ </nav>
133
+ <div class="bottom"><slot name="bottom"></slot></div>`;
134
+ }
135
+ }
136
+ ExmNavigationSubMenuBase.itemIndex = 0;
137
+ ExmNavigationSubMenuBase.styles = [style];
138
+ __decorate([
139
+ property({ type: Array })
140
+ ], ExmNavigationSubMenuBase.prototype, "items", void 0);
141
+ __decorate([
142
+ property({ type: Array })
143
+ ], ExmNavigationSubMenuBase.prototype, "path", void 0);
144
+ __decorate([
145
+ property({ type: Boolean, attribute: 'has-back-button' })
146
+ ], ExmNavigationSubMenuBase.prototype, "hasBackButton", void 0);
147
+ __decorate([
148
+ state()
149
+ ], ExmNavigationSubMenuBase.prototype, "currentItem", void 0);
150
+ __decorate([
151
+ query('nav')
152
+ ], ExmNavigationSubMenuBase.prototype, "navigationElement", void 0);
153
+ //# sourceMappingURL=exm-navigation-sub-menu-base.js.map
@@ -15,11 +15,11 @@ export class ExmNavigationTopbarBase extends ExmgElement {
15
15
  }
16
16
  render() {
17
17
  return html `
18
- <exm-navigation-icon-button
19
- icon=${this.drawerOpen ? 'menu_open' : 'menu'}
20
- @navigation-icon-button-click=${this.handleMenuButtonClick}
21
- ></exm-navigation-icon-button>
22
- <slot name="topbar-title"></slot>
18
+ <md-icon-button @click=${this.handleMenuButtonClick}
19
+ ><md-icon>${this.drawerOpen ? 'menu_open' : 'menu'}</md-icon></md-icon-button
20
+ >
21
+ <slot name="topbar-title" class="topbar-title"></slot>
22
+ <slot name="topbar-actions"></slot>
23
23
  `;
24
24
  }
25
25
  }
@@ -0,0 +1,12 @@
1
+ export { ExmNavigation } from './exm-navigation.js';
2
+ export { ExmNavigationBase } from './exm-navigation-base.js';
3
+ export { ExmNavigationDrawerBase } from './exm-navigation-drawer-base.js';
4
+ export { ExmNavigationDrawerMenuBase } from './exm-navigation-drawer-menu-base.js';
5
+ export { ExmNavigationDrawerNavItemBase } from './exm-navigation-drawer-nav-item-base.js';
6
+ export { ExmNavigationIconBase } from './exm-navigation-icon-base.js';
7
+ export { ExmNavigationIconButtonBase } from './exm-navigation-icon-button-base.js';
8
+ export { ExmNavigationRailBase } from './exm-navigation-rail-base.js';
9
+ export { ExmNavigationRailNavItemBase } from './exm-navigation-rail-nav-item-base.js';
10
+ export { ExmNavigationSubMenuBase } from './exm-navigation-sub-menu-base.js';
11
+ export { ExmNavigationTopbarBase } from './exm-navigation-topbar-base.js';
12
+ export { style as exmgNavigationStyles } from './styles/exm-navigation-css.js';
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ export { ExmNavigation } from './exm-navigation.js';
2
+ export { ExmNavigationBase } from './exm-navigation-base.js';
3
+ export { ExmNavigationDrawerBase } from './exm-navigation-drawer-base.js';
4
+ export { ExmNavigationDrawerMenuBase } from './exm-navigation-drawer-menu-base.js';
5
+ export { ExmNavigationDrawerNavItemBase } from './exm-navigation-drawer-nav-item-base.js';
6
+ export { ExmNavigationIconBase } from './exm-navigation-icon-base.js';
7
+ export { ExmNavigationIconButtonBase } from './exm-navigation-icon-button-base.js';
8
+ export { ExmNavigationRailBase } from './exm-navigation-rail-base.js';
9
+ export { ExmNavigationRailNavItemBase } from './exm-navigation-rail-nav-item-base.js';
10
+ export { ExmNavigationSubMenuBase } from './exm-navigation-sub-menu-base.js';
11
+ export { ExmNavigationTopbarBase } from './exm-navigation-topbar-base.js';
12
+ export { style as exmgNavigationStyles } from './styles/exm-navigation-css.js';
13
+ //# sourceMappingURL=index.js.map
@@ -3,5 +3,6 @@ type Constructor<T = {}> = new (...args: any[]) => T;
3
3
  type MediaType = 'mobile' | 'tablet' | 'desktop';
4
4
  export declare const MediaQueries: <T extends Constructor<LitElement>>(superClass: T) => Constructor<{
5
5
  media: MediaType;
6
+ touch: boolean;
6
7
  }> & T;
7
8
  export {};
@@ -5,9 +5,11 @@ export const MediaQueries = (superClass) => {
5
5
  constructor() {
6
6
  super(...arguments);
7
7
  this.media = 'desktop';
8
- this.mobileMedia = window.matchMedia('(max-width: 400px)');
9
- this.tabletMedia = window.matchMedia('(min-width: 401px) and (max-width: 1200px)');
8
+ this.touch = false;
9
+ this.mobileMedia = window.matchMedia('(max-width: 960px)');
10
+ this.tabletMedia = window.matchMedia('(min-width: 961px) and (max-width: 1200px)');
10
11
  this.desktopMedia = window.matchMedia('(min-width: 1201px)');
12
+ this.hoverMedia = window.matchMedia('(hover: hover)');
11
13
  }
12
14
  updateMedia(media) {
13
15
  return (mediaMatch) => {
@@ -15,7 +17,12 @@ export const MediaQueries = (superClass) => {
15
17
  this.media = media;
16
18
  this.requestUpdate();
17
19
  }
18
- console.log(media, mediaMatch.matches);
20
+ };
21
+ }
22
+ updateTouch() {
23
+ return (mediaMatch) => {
24
+ this.touch = !mediaMatch.matches;
25
+ this.requestUpdate();
19
26
  };
20
27
  }
21
28
  connectedCallback() {
@@ -26,10 +33,12 @@ export const MediaQueries = (superClass) => {
26
33
  this.updateMedia('tablet')(this.tabletMedia);
27
34
  // @ts-ignore
28
35
  this.updateMedia('desktop')(this.desktopMedia);
29
- // eslint-disable-next-line
36
+ // @ts-ignore
37
+ this.updateTouch()(this.hoverMedia);
30
38
  this.mobileMedia.addEventListener('change', this.updateMedia('mobile').bind(this));
31
39
  this.tabletMedia.addEventListener('change', this.updateMedia('tablet').bind(this));
32
40
  this.desktopMedia.addEventListener('change', this.updateMedia('desktop').bind(this));
41
+ this.hoverMedia.addEventListener('change', this.updateTouch().bind(this));
33
42
  }
34
43
  updated(changedProperties) {
35
44
  var _a;
@@ -40,6 +49,9 @@ export const MediaQueries = (superClass) => {
40
49
  __decorate([
41
50
  property({ type: String })
42
51
  ], MediaQueryClass.prototype, "media", void 0);
52
+ __decorate([
53
+ property({ type: Boolean })
54
+ ], MediaQueryClass.prototype, "touch", void 0);
43
55
  return MediaQueryClass;
44
56
  };
45
57
  //# sourceMappingURL=media-queries.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -0,0 +1,72 @@
1
+ import { css } from 'lit';
2
+ export const style = css `
3
+ .navigation-container {
4
+ display: grid;
5
+ grid-template-columns: auto var(--exm-drawer-width, 500px) 1fr;
6
+ grid-template-rows: 1fr;
7
+ width: 100%;
8
+ transition: grid-template-columns 0.3s ease;
9
+ max-height: 100vh;
10
+ }
11
+
12
+ .navigation-container.show-topbar {
13
+ grid-template-columns: 1fr;
14
+ grid-template-rows: auto 1fr;
15
+ }
16
+
17
+ .navigation-container.show-topbar exm-navigation-topbar {
18
+ grid-area: 1/1/2/2;
19
+ z-index: 2;
20
+ }
21
+
22
+ .navigation-container.show-topbar exm-navigation-drawer {
23
+ grid-area: 1/1/3/2;
24
+ }
25
+
26
+ .navigation-container.show-topbar .content {
27
+ grid-area: 2/1/3/2;
28
+ }
29
+
30
+ exm-navigation-rail {
31
+ grid-area: 1/1/2/2;
32
+ }
33
+
34
+ exm-navigation-drawer {
35
+ grid-area: 1/2/2/3;
36
+ }
37
+
38
+ .content {
39
+ grid-area: 1/3/2/4;
40
+ z-index: 1;
41
+ overflow: scroll;
42
+ }
43
+
44
+ exm-navigation-drawer {
45
+ --md-list-container-color: none;
46
+ --md-list-item-label-text-color: var(--md-sys-color-on-surface-variant);
47
+ --md-list-item-supporting-text-color: var(--md-sys-color-on-surface-variant);
48
+ --md-list-item-trailing-supporting-text-color: var(--md-sys-color-on-surface-variant);
49
+ --md-list-item-container-shape: 24px;
50
+ --mdc-theme-surface: var(--md-sys-color-surface-container-high);
51
+ --mdc-shape-large: 1rem;
52
+ }
53
+
54
+ .left-margin {
55
+ margin-left: 2.5rem;
56
+ }
57
+
58
+ .drawer-menu-button {
59
+ padding: 0 8px;
60
+ height: var(--_exm-navigation-top-bar-height, 64px);
61
+ box-sizing: border-box;
62
+ display: grid;
63
+ grid-template-columns: 48px 1fr;
64
+ align-items: center;
65
+ justify-items: center;
66
+ }
67
+
68
+ .drawer-back-button {
69
+ padding: 0 8px;
70
+ }
71
+ `;
72
+ //# sourceMappingURL=exm-navigation-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -0,0 +1,35 @@
1
+ import { css } from 'lit';
2
+ export const style = css `
3
+ :root {
4
+ --md-sys-color-background: var(--md-sys-color-surface-container-high);
5
+ }
6
+
7
+ :host {
8
+ --exm-drawer-max-width: 319px;
9
+ display: grid;
10
+ grid-template-columns: var(--mdc-drawer-width, 300px) 1fr;
11
+ height: 100vh;
12
+ width: 100%;
13
+ box-sizing: border-box;
14
+ transition: grid-template-columns 0.3s ease;
15
+ position: relative;
16
+ }
17
+
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;
32
+ }
33
+ }
34
+ `;
35
+ //# sourceMappingURL=exm-navigation-drawer-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -0,0 +1,84 @@
1
+ import { css } from 'lit';
2
+ export const style = css `
3
+ :host {
4
+ --_exm-navigation-item-background-color-selected: var(
5
+ --exm-navigation-item-background-color-selected,
6
+ var(--md-sys-color-secondary)
7
+ );
8
+ --_exm-navigation-item-color-selected: var(--exm-navigation-item-color-selected, var(--md-sys-color-on-secondary));
9
+ --_exm-navigation-item-color-sub-selected: var(
10
+ --exm-navigation-item-color-sub-selected,
11
+ var(--md-sys-color-on-surface)
12
+ );
13
+ --_exm-navigation-item-background-color-sub-selected: var(
14
+ --exm-navigation-item-background-color-sub-selected,
15
+ var(--md-sys-color-surface-container-highest)
16
+ );
17
+ --md-list-item-container-shape: 2rem;
18
+ --md-list-item-one-line-container-height: 48px;
19
+ }
20
+
21
+ button {
22
+ --background-color: transparent;
23
+ --text-color: var(--md-list-item-label-text-color);
24
+
25
+ border-radius: var(--md-list-item-container-shape);
26
+ height: var(--md-list-item-one-line-container-height);
27
+ font-size: 16px;
28
+ padding: 0 16px;
29
+ display: grid;
30
+ align-items: center;
31
+ width: 100%;
32
+ grid-template-columns: auto 1fr auto;
33
+ background-color: var(--background-color);
34
+ position: relative;
35
+ border: none;
36
+ color: var(--md-sys-color-on-surface, black);
37
+ outline: none;
38
+
39
+ .label {
40
+ grid-area: 1/2/2/3;
41
+ text-align: start;
42
+ }
43
+
44
+ &.selected {
45
+ --background-color: var(--_exm-navigation-item-background-color-selected);
46
+ --text-color: var(--_exm-navigation-item-color-selected);
47
+ color: var(--text-color, black);
48
+
49
+ &.has-sub-menu {
50
+ --background-color: var(--_exm-navigation-item-background-color-sub-selected);
51
+ --text-color: var(--_exm-navigation-item-color-sub-selected);
52
+ }
53
+ }
54
+
55
+ &.has-icon {
56
+ padding-left: 4px;
57
+ }
58
+
59
+ &.has-sub-menu {
60
+ padding-right: 4px;
61
+ }
62
+
63
+ & + button {
64
+ margin-top: 4px;
65
+ }
66
+
67
+ md-focus-ring {
68
+ color: white;
69
+ }
70
+
71
+ exm-navigation-icon {
72
+ width: 48px;
73
+
74
+ &.item-icon {
75
+ grid-area: 1/1/2/2;
76
+ }
77
+
78
+ &.has-submenu {
79
+ grid-area: 1/3/2/4;
80
+ }
81
+ }
82
+ }
83
+ `;
84
+ //# sourceMappingURL=exm-navigation-drawer-nav-item-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -0,0 +1,29 @@
1
+ import { css } from 'lit';
2
+ export const style = css `
3
+ .icon-button {
4
+ display: inline-grid;
5
+ grid-template-columns: 48px;
6
+ border: none;
7
+ background-color: rgba(0, 0, 0, 0);
8
+ height: 48px;
9
+ align-items: center;
10
+ justify-content: start;
11
+ padding: 0;
12
+ color: var(--md-sys-color-on-surface, black);
13
+ position: relative;
14
+ border-radius: 2rem;
15
+ outline: none;
16
+ }
17
+
18
+ .icon-button.has-label {
19
+ grid-template-columns: 48px auto;
20
+ width: 100%;
21
+ }
22
+
23
+ .icon-button .label {
24
+ padding: 0 8px;
25
+ white-space: nowrap;
26
+ font-size: 16px;
27
+ }
28
+ `;
29
+ //# sourceMappingURL=exm-navigation-icon-button-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -0,0 +1,22 @@
1
+ import { css } from 'lit';
2
+ export const style = css `
3
+ .icon {
4
+ align-items: center;
5
+ justify-content: center;
6
+ display: flex;
7
+ position: relative;
8
+ height: 100%;
9
+ width: 100%;
10
+ font-variation-settings:
11
+ 'wght' 400,
12
+ 'opsz' 24;
13
+ transition: font-variation-settings 0.2s cubic-bezier(0.2, 0, 0, 1);
14
+ border-radius: 16px;
15
+ font-family: 'Material Symbols Outlined';
16
+ font-size: 24px;
17
+ line-height: 1;
18
+ direction: ltr;
19
+ -webkit-font-smoothing: antialiased;
20
+ }
21
+ `;
22
+ //# sourceMappingURL=exm-navigation-icon-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;
@@ -0,0 +1,50 @@
1
+ import { css } from 'lit';
2
+ export const style = css `
3
+ :host {
4
+ --_exm-navigation-rail-background-color: var(
5
+ --exm-navigation-rail-background-color,
6
+ var(--md-sys-color-surface-container)
7
+ );
8
+ --_exm-navigation-rail-width: var(--exm-navigation-rail-nav-width, 88px);
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 16px;
12
+ justify-content: space-between;
13
+ height: 100%;
14
+ background: var(--_exm-navigation-rail-background-color);
15
+ overflow-y: auto;
16
+ z-index: 8;
17
+ box-sizing: border-box;
18
+ width: var(--_exm-navigation-rail-width);
19
+ scrollbar-width: none;
20
+ }
21
+
22
+ @media screen and (min-width: 961px) {
23
+ :host {
24
+ display: flex;
25
+ }
26
+ }
27
+
28
+ nav {
29
+ flex: 1;
30
+ }
31
+
32
+ nav ul {
33
+ list-style: none;
34
+ padding: 0;
35
+ margin: 0;
36
+ }
37
+
38
+ nav li {
39
+ padding: 0;
40
+ margin: 0;
41
+ }
42
+
43
+ .bottom {
44
+ display: flex;
45
+ flex-direction: column;
46
+ flex-grow: 1;
47
+ justify-content: flex-end;
48
+ }
49
+ `;
50
+ //# sourceMappingURL=exm-navigation-rail-css.js.map
@@ -1,2 +1 @@
1
1
  export declare const style: import("lit").CSSResult;
2
- export default style;