diff --git a/src/demo-app/demo-material.module.ts b/src/demo-app/demo-material.module.ts index b7f487cd6..784c8c107 100644 --- a/src/demo-app/demo-material.module.ts +++ b/src/demo-app/demo-material.module.ts @@ -5,7 +5,6 @@ import { MdcCheckboxModule, MdcDialogModule, MdcDrawerModule, - MdcElevationModule, MdcFabModule, MdcFormFieldModule, MdcIconToggleModule, @@ -19,9 +18,7 @@ import { MdcSwitchModule, MdcTabModule, MdcTextfieldModule, - MdcThemeModule, MdcToolbarModule, - MdcRippleModule, // } from '@angular-mdc/web'; } from '../lib/public_api'; @@ -32,7 +29,6 @@ import { MdcCheckboxModule, MdcDialogModule, MdcDrawerModule, - MdcElevationModule, MdcFabModule, MdcFormFieldModule, MdcIconToggleModule, @@ -46,9 +42,7 @@ import { MdcSwitchModule, MdcTabModule, MdcTextfieldModule, - MdcThemeModule, MdcToolbarModule, - MdcRippleModule, ] }) export class DemoMaterialModule { } diff --git a/src/lib/core/index.ts b/src/lib/core/index.ts index e984a88bf..5c505b867 100644 --- a/src/lib/core/index.ts +++ b/src/lib/core/index.ts @@ -4,12 +4,14 @@ import { MdcRippleModule } from './ripple/index'; import { MdcMaterialIconModule } from './material-icon/index'; import { MdcTypographyModule } from './typography/index'; import { MdcElevationModule } from './elevation/index'; +import { MdcThemeModule } from './theme/index'; const CORE_DIRECTIVES = [ MdcElevationModule, MdcMaterialIconModule, MdcTypographyModule, MdcRippleModule, + MdcThemeModule, ]; @NgModule({ diff --git a/src/lib/core/public_api.ts b/src/lib/core/public_api.ts index cc4746427..d22296200 100644 --- a/src/lib/core/public_api.ts +++ b/src/lib/core/public_api.ts @@ -2,3 +2,4 @@ export * from './elevation/index'; export * from './material-icon/index'; export * from './typography/index'; export * from './ripple/index'; +export * from './theme/index'; diff --git a/src/lib/theme/index.ts b/src/lib/core/theme/index.ts similarity index 100% rename from src/lib/theme/index.ts rename to src/lib/core/theme/index.ts diff --git a/src/lib/theme/theme-dark.directive.ts b/src/lib/core/theme/theme-dark.directive.ts similarity index 56% rename from src/lib/theme/theme-dark.directive.ts rename to src/lib/core/theme/theme-dark.directive.ts index 76173024f..54c979b21 100644 --- a/src/lib/theme/theme-dark.directive.ts +++ b/src/lib/core/theme/theme-dark.directive.ts @@ -6,30 +6,28 @@ import { Renderer2, SimpleChange, } from '@angular/core'; -import { toBoolean } from '../common'; +import { toBoolean } from '../../common'; @Directive({ selector: '[mdc-theme-dark]' }) export class MdcThemeDark implements OnChanges { - private nativeEl: ElementRef; - private _mdcThemeDark: boolean; + private mdcThemeDark_: boolean; @Input('mdc-theme-dark') mdcThemeDark: boolean; constructor( - private _renderer: Renderer2, - private _root: ElementRef) { - this.nativeEl = this._root.nativeElement; + private renderer_: Renderer2, + public elementRef: ElementRef) { } ngOnChanges(changes: { [key: string]: SimpleChange }) { let change = changes['mdcThemeDark']; if (!toBoolean(change.currentValue)) { - this._renderer.removeClass(this.nativeEl, 'mdc-theme--dark'); + this.renderer_.removeClass(this.elementRef.nativeElement, 'mdc-theme--dark'); } else { - this._renderer.addClass(this.nativeEl, 'mdc-theme--dark'); + this.renderer_.addClass(this.elementRef.nativeElement, 'mdc-theme--dark'); } } } diff --git a/src/lib/module.ts b/src/lib/module.ts index 0ab7bbbd9..90ef5939e 100644 --- a/src/lib/module.ts +++ b/src/lib/module.ts @@ -8,6 +8,7 @@ import { MdcDialogModule } from './dialog/index'; import { MdcDrawerModule } from './drawer/index'; import { MdcFabModule } from './fab/index'; import { MdcFormFieldModule } from './form-field/index'; +import { MdcIconModule } from './icon/index'; import { MdcIconToggleModule } from './icon-toggle/index'; import { MdcLinearProgressModule } from './linear-progress/index'; import { MdcListModule } from './list/index'; @@ -18,7 +19,6 @@ import { MdcSnackbarModule } from './snackbar/index'; import { MdcSwitchModule } from './switch/index'; import { MdcTabModule } from './tabs/index'; import { MdcTextfieldModule } from './textfield/index'; -import { MdcThemeModule } from './theme/index'; import { MdcToolbarModule } from './toolbar/index'; const MATERIAL_MODULES = [ @@ -30,6 +30,7 @@ const MATERIAL_MODULES = [ MdcDrawerModule, MdcFabModule, MdcFormFieldModule, + MdcIconModule, MdcIconToggleModule, MdcLinearProgressModule, MdcListModule, @@ -40,7 +41,6 @@ const MATERIAL_MODULES = [ MdcSwitchModule, MdcTabModule, MdcTextfieldModule, - MdcThemeModule, MdcToolbarModule, ]; diff --git a/src/lib/public_api.ts b/src/lib/public_api.ts index 482b43553..f175015f3 100644 --- a/src/lib/public_api.ts +++ b/src/lib/public_api.ts @@ -19,7 +19,6 @@ export * from './snackbar/index'; export * from './switch/index'; export * from './tabs/index'; export * from './textfield/index'; -export * from './theme/index'; export * from './toolbar/index'; export * from './cdk/overlay/index';