diff --git a/lib/components/SideMenu/side-menu-items.html b/lib/components/SideMenu/side-menu-items.html
new file mode 100644
index 00000000..d286695d
--- /dev/null
+++ b/lib/components/SideMenu/side-menu-items.html
@@ -0,0 +1,7 @@
+
diff --git a/lib/components/SideMenu/side-menu-items.scss b/lib/components/SideMenu/side-menu-items.scss
new file mode 100644
index 00000000..f59ce73c
--- /dev/null
+++ b/lib/components/SideMenu/side-menu-items.scss
@@ -0,0 +1,83 @@
+@import '../../shared/styles/variables';
+
+.menu-item-header {
+ cursor: pointer;
+ color: rgba($text-color, .6);
+ -webkit-transition: all .15s ease-in-out;
+ -moz-transition: all .15s ease-in-out;
+ -ms-transition: all .15s ease-in-out;
+ -o-transition: all .15s ease-in-out;
+ transition: all .15s ease-in-out;
+ display: block;
+ padding: $side-menu-item-vpadding*2.5 $side-menu-item-hpadding;
+
+ &[hidden] {
+ display: none;
+ }
+
+ &.disabled, &.disabled:hover {
+ cursor: default;
+ color: lighten($text-color, 60%);
+ }
+}
+
+.menu-item {
+ -webkit-transition: all .15s ease-in-out;
+ -moz-transition: all .15s ease-in-out;
+ -ms-transition: all .15s ease-in-out;
+ -o-transition: all .15s ease-in-out;
+ transition: all .15s ease-in-out;
+ list-style: none inside none;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ padding: 0;
+}
+
+.menu-item:hover,
+.menu-item.active {
+ background: darken($side-menu-active-bg-color, 6%);
+}
+
+.menu-subitems {
+ margin: 0;
+ font-size: 0.929em;
+ line-height: 1.2em;
+ font-weight: $light;
+ color: rgba($text-color, .9);
+ padding: 0;
+ overflow: hidden;
+ height: 0;
+
+ .active > & {
+ height: auto;
+ }
+}
+
+.menu-item-level-0 {
+ > .menu-item-header {
+ font-family: $headers-font, $headers-font-family;
+ font-weight: $light;
+ font-size: $h5;
+ text-transform: uppercase;
+ }
+
+ > .menu-item-header:hover,
+ &.active > .menu-item-header {
+ color: $primary-color;
+ background: $side-menu-active-bg-color;
+ }
+ &.active {
+ background: $side-menu-active-bg-color;
+ }
+}
+
+.menu-item-level-1 {
+ > .menu-item-header {
+ padding-left: 2*$side-menu-item-hpadding;
+ }
+
+ > .menu-item-header:hover,
+ &.active > .menu-item-header {
+ background: darken($side-menu-active-bg-color, 6%);
+ }
+}
diff --git a/lib/components/SideMenu/side-menu.html b/lib/components/SideMenu/side-menu.html
index 3328bd3b..638ff025 100644
--- a/lib/components/SideMenu/side-menu.html
+++ b/lib/components/SideMenu/side-menu.html
@@ -7,17 +7,7 @@
-
+
diff --git a/lib/components/SideMenu/side-menu.scss b/lib/components/SideMenu/side-menu.scss
index 22144b21..2cd849c2 100644
--- a/lib/components/SideMenu/side-menu.scss
+++ b/lib/components/SideMenu/side-menu.scss
@@ -6,6 +6,11 @@ $mobile-menu-compact-breakpoint: 550px;
box-sizing: border-box;
}
+ul.menu-root {
+ margin: 0;
+ padding: 0;
+}
+
.menu-header {
text-transform: uppercase;
color: $headers-color;
@@ -13,81 +18,6 @@ $mobile-menu-compact-breakpoint: 550px;
margin: 10px 0;
}
-.menu-cat-header {
- font-size: $h5;
- font-family: $headers-font, $headers-font-family;
- font-weight: $light;
- cursor: pointer;
- color: rgba($text-color, .6);
- text-transform: uppercase;
- background-color: $side-bar-bg-color;
- -webkit-transition: all .15s ease-in-out;
- -moz-transition: all .15s ease-in-out;
- -ms-transition: all .15s ease-in-out;
- -o-transition: all .15s ease-in-out;
- transition: all .15s ease-in-out;
- display: block;
- padding: $side-menu-item-vpadding*2.5 $side-menu-item-hpadding;
-
- &:hover,
- &.active {
- color: $primary-color;
- background-color: $side-menu-active-bg-color;
- }
-
- &[hidden] {
- display: none;
- }
-
- &.disabled, &.disabled:hover {
- cursor: default;
- color: lighten($text-color, 60%);
- }
-}
-
-.menu-subitems {
- margin: 0;
- font-size: 0.929em;
- line-height: 1.2em;
- font-weight: $light;
- color: rgba($text-color, .9);
- padding: 0;
- overflow: hidden;
-
- &.active {
- height: auto;
- }
-
- & li {
- -webkit-transition: all .15s ease-in-out;
- -moz-transition: all .15s ease-in-out;
- -ms-transition: all .15s ease-in-out;
- -o-transition: all .15s ease-in-out;
- transition: all .15s ease-in-out;
- list-style: none inside none;
- cursor: pointer;
- background-color: $side-menu-active-bg-color;
- padding: $side-menu-item-vpadding*2 $side-menu-item-hpadding*2;
- padding-left: $side-menu-item-hpadding*2;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- & li:hover,
- & li.active {
- background: darken($side-menu-active-bg-color, 6%);
- }
-
- &.disabled, &.disabled:hover {
- cursor: default;
- color: lighten($text-color, 60%);
- }
-}
-
-
-.menu-subitems li.active {
-}
-
.mobile-nav {
display: none;
height: 3em;
diff --git a/lib/components/SideMenu/side-menu.ts b/lib/components/SideMenu/side-menu.ts
index 63a36c59..fc3d1925 100644
--- a/lib/components/SideMenu/side-menu.ts
+++ b/lib/components/SideMenu/side-menu.ts
@@ -1,36 +1,50 @@
'use strict';
-import { Component, ElementRef, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';
+import { Component, EventEmitter, Input, Output, ElementRef, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';
//import { global } from '@angular/core/src/facade/lang';
import { trigger, state, animate, transition, style } from '@angular/core';
import { BaseComponent, SpecManager } from '../base';
import { ScrollService, MenuService, OptionsService } from '../../services/index';
import { BrowserDomAdapter as DOM } from '../../utils/browser-adapter';
-import { MenuCategory } from '../../services/schema-helper.service';
+import { MenuItem } from '../../services/schema-helper.service';
const global = window;
+@Component({
+ selector: 'side-menu-items',
+ templateUrl: './side-menu-items.html',
+ styleUrls: ['./side-menu-items.css']
+})
+export class SideMenuItems {
+ @Input() items: MenuItem[];
+ @Output() activate = new EventEmitter