-
+
@@ -206,8 +208,8 @@ exports[`Login Page should compile 1`] = `
-
+
Login
@@ -231,10 +233,10 @@ exports[`Login Page should compile 1`] = `
-
+
-
+
diff --git a/example-app/app/auth/containers/login-page.component.spec.ts b/example-app/app/auth/containers/login-page.component.spec.ts
index 7b52bb2ea3..44326a104f 100644
--- a/example-app/app/auth/containers/login-page.component.spec.ts
+++ b/example-app/app/auth/containers/login-page.component.spec.ts
@@ -1,5 +1,5 @@
import { TestBed, ComponentFixture } from '@angular/core/testing';
-import { MdInputModule, MdCardModule } from '@angular/material';
+import { MatInputModule, MatCardModule } from '@angular/material';
import { ReactiveFormsModule } from '@angular/forms';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { StoreModule, Store, combineReducers } from '@ngrx/store';
@@ -20,8 +20,8 @@ describe('Login Page', () => {
StoreModule.forRoot({
auth: combineReducers(fromAuth.reducers),
}),
- MdInputModule,
- MdCardModule,
+ MatInputModule,
+ MatCardModule,
ReactiveFormsModule,
],
declarations: [LoginPageComponent, LoginFormComponent],
diff --git a/example-app/app/books/books.module.ts b/example-app/app/books/books.module.ts
index 9617a7c8db..01cb00d388 100644
--- a/example-app/app/books/books.module.ts
+++ b/example-app/app/books/books.module.ts
@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { MaterialModule } from '@angular/material';
import { RouterModule } from '@angular/router';
import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';
@@ -14,6 +13,7 @@ import { FindBookPageComponent } from './containers/find-book-page';
import { ViewBookPageComponent } from './containers/view-book-page';
import { SelectedBookPageComponent } from './containers/selected-book-page';
import { CollectionPageComponent } from './containers/collection-page';
+import { MaterialModule } from '../material';
import { reducers } from './reducers';
diff --git a/example-app/app/books/components/book-authors.ts b/example-app/app/books/components/book-authors.ts
index acd881654f..cac60c880e 100644
--- a/example-app/app/books/components/book-authors.ts
+++ b/example-app/app/books/components/book-authors.ts
@@ -5,7 +5,7 @@ import { Book } from '../models/book';
@Component({
selector: 'bc-book-authors',
template: `
-
Written By:
+
Written By:
{{ authors | bcAddCommas }}
diff --git a/example-app/app/books/components/book-detail.ts b/example-app/app/books/components/book-detail.ts
index ddb683b6c4..2b74254969 100644
--- a/example-app/app/books/components/book-detail.ts
+++ b/example-app/app/books/components/book-detail.ts
@@ -4,28 +4,28 @@ import { Book } from '../models/book';
@Component({
selector: 'bc-book-detail',
template: `
-
-
- {{ title }}
- {{ subtitle }}
-
-
-
+
+
+ {{ title }}
+ {{ subtitle }}
+
+
+
-
-
-
-
-
+
+
`,
styles: [
@@ -35,10 +35,10 @@ import { Book } from '../models/book';
justify-content: center;
margin: 75px 0;
}
- md-card {
+ mat-card {
max-width: 600px;
}
- md-card-title-group {
+ mat-card-title-group {
margin-left: 0;
}
img {
@@ -46,13 +46,13 @@ import { Book } from '../models/book';
min-width: 60px;
margin-left: 5px;
}
- md-card-content {
+ mat-card-content {
margin: 15px 0 50px;
}
- md-card-actions {
+ mat-card-actions {
margin: 25px 0 0 !important;
}
- md-card-footer {
+ mat-card-footer {
padding: 0 25px 25px;
position: relative;
}
diff --git a/example-app/app/books/components/book-preview.ts b/example-app/app/books/components/book-preview.ts
index ec958e2ec0..3484ea156a 100644
--- a/example-app/app/books/components/book-preview.ts
+++ b/example-app/app/books/components/book-preview.ts
@@ -5,40 +5,51 @@ import { Book } from '../models/book';
selector: 'bc-book-preview',
template: `
-
-
-
- {{ title | bcEllipsis:35 }}
- {{ subtitle | bcEllipsis:40 }}
-
-
+
+
+
+ {{ title | bcEllipsis:35 }}
+ {{ subtitle | bcEllipsis:40 }}
+
+
{{ description | bcEllipsis }}
-
-
+
+
-
-
+
+
`,
styles: [
`
- md-card {
+ :host {
+ display: flex;
+ }
+
+ :host a {
+ display: flex;
+ }
+
+ mat-card {
width: 400px;
- height: 300px;
margin: 15px;
+ display: flex;
+ flex-flow: column;
+ justify-content: space-between;
}
+
@media only screen and (max-width: 768px) {
- md-card {
+ mat-card {
margin: 15px 0 !important;
}
}
- md-card:hover {
+ mat-card:hover {
box-shadow: 3px 3px 16px -2px rgba(0, 0, 0, .5);
}
- md-card-title {
+ mat-card-title {
margin-right: 10px;
}
- md-card-title-group {
+ mat-card-title-group {
margin: 0;
}
a {
@@ -50,7 +61,7 @@ import { Book } from '../models/book';
min-width: 60px;
margin-left: 5px;
}
- md-card-content {
+ mat-card-content {
margin-top: 15px;
margin: 15px 0 0;
}
@@ -58,7 +69,7 @@ import { Book } from '../models/book';
display: inline-block;
font-size: 13px;
}
- md-card-footer {
+ mat-card-footer {
padding: 0 25px 25px;
}
`,
diff --git a/example-app/app/books/components/book-search.ts b/example-app/app/books/components/book-search.ts
index 46d3816c0d..fa82a5e4cd 100644
--- a/example-app/app/books/components/book-search.ts
+++ b/example-app/app/books/components/book-search.ts
@@ -6,49 +6,44 @@ import { Component, Output, Input, EventEmitter } from '@angular/core';
@Component({
selector: 'bc-book-search',
template: `
-
- Find a Book
-
-
-
-
-
-
- {{error}}
-
+
+ Find a Book
+
+
+
+
+
+
+ {{error}}
+
`,
styles: [
`
- md-card-title,
- md-card-content,
- md-card-footer {
+ mat-card-title,
+ mat-card-content,
+ mat-card-footer {
display: flex;
justify-content: center;
}
- md-card-footer {
+ mat-card-footer {
color: #FF0000;
padding: 5px 0;
}
- input {
- width: 300px;
+ .mat-form-field {
+ min-width: 300px;
}
- md-card-spinner {
- padding-left: 60px; // Make room for the spinner
- }
-
- md-spinner {
- width: 30px;
- height: 30px;
+ .mat-spinner {
position: relative;
top: 10px;
left: 10px;
opacity: 0.0;
+ padding-left: 60px; // Make room for the spinner
}
- md-spinner.show {
+ .mat-spinner.show {
opacity: 1.0;
}
`,
diff --git a/example-app/app/books/components/index.ts b/example-app/app/books/components/index.ts
index 1c4cf61459..c31ceabb3f 100644
--- a/example-app/app/books/components/index.ts
+++ b/example-app/app/books/components/index.ts
@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { MaterialModule } from '@angular/material';
import { ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
@@ -11,6 +10,7 @@ import { BookPreviewListComponent } from './book-preview-list';
import { BookSearchComponent } from './book-search';
import { PipesModule } from '../../shared/pipes';
+import { MaterialModule } from '../../material';
export const COMPONENTS = [
BookAuthorsComponent,
diff --git a/example-app/app/books/containers/collection-page.ts b/example-app/app/books/containers/collection-page.ts
index f4c61e9e32..af76fd48e4 100644
--- a/example-app/app/books/containers/collection-page.ts
+++ b/example-app/app/books/containers/collection-page.ts
@@ -11,9 +11,9 @@ import { Book } from '../models/book';
selector: 'bc-collection-page',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
-
- My Collection
-
+
+ My Collection
+
`,
@@ -25,7 +25,7 @@ import { Book } from '../models/book';
*/
styles: [
`
- md-card-title {
+ mat-card-title {
display: flex;
justify-content: center;
}
diff --git a/example-app/app/core/components/layout.ts b/example-app/app/core/components/layout.ts
index 6a58959980..899dca7ce8 100644
--- a/example-app/app/core/components/layout.ts
+++ b/example-app/app/core/components/layout.ts
@@ -3,15 +3,15 @@ import { Component } from '@angular/core';
@Component({
selector: 'bc-layout',
template: `
-
+
-
+
`,
styles: [
`
- md-sidenav-container {
+ mat-sidenav-container {
background: rgba(0, 0, 0, 0.03);
}
diff --git a/example-app/app/core/components/nav-item.ts b/example-app/app/core/components/nav-item.ts
index 61d1c247e1..c5c44e671d 100644
--- a/example-app/app/core/components/nav-item.ts
+++ b/example-app/app/core/components/nav-item.ts
@@ -3,10 +3,10 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'bc-nav-item',
template: `
-
- {{ icon }}
-
- {{ hint }}
+
+ {{ icon }}
+
+ {{ hint }}
`,
styles: [
diff --git a/example-app/app/core/components/sidenav.ts b/example-app/app/core/components/sidenav.ts
index e56fd18668..8f8e169d65 100644
--- a/example-app/app/core/components/sidenav.ts
+++ b/example-app/app/core/components/sidenav.ts
@@ -3,15 +3,15 @@ import { Component, Input } from '@angular/core';
@Component({
selector: 'bc-sidenav',
template: `
-
-
+
+
-
-
+
+
`,
styles: [
`
- md-sidenav {
+ mat-sidenav {
width: 300px;
}
`,
diff --git a/example-app/app/core/components/toolbar.ts b/example-app/app/core/components/toolbar.ts
index 6ed0d3c9ec..1c8958e20a 100644
--- a/example-app/app/core/components/toolbar.ts
+++ b/example-app/app/core/components/toolbar.ts
@@ -3,12 +3,12 @@ import { Component, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'bc-toolbar',
template: `
-
-
- menu
+
+
+ menu
-
+
`,
})
export class ToolbarComponent {
diff --git a/example-app/app/core/containers/not-found-page.ts b/example-app/app/core/containers/not-found-page.ts
index 4b569ac310..77900ad138 100644
--- a/example-app/app/core/containers/not-found-page.ts
+++ b/example-app/app/core/containers/not-found-page.ts
@@ -4,15 +4,15 @@ import { Component, ChangeDetectionStrategy } from '@angular/core';
selector: 'bc-not-found-page',
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
-
- 404: Not Found
-
+
+ 404: Not Found
+
Hey! It looks like this page doesn't exist yet.
-
-
- Take Me Home
-
-
+
+
+ Take Me Home
+
+
`,
styles: [
`
diff --git a/example-app/app/core/core.module.ts b/example-app/app/core/core.module.ts
index 5f0d863112..de46938941 100644
--- a/example-app/app/core/core.module.ts
+++ b/example-app/app/core/core.module.ts
@@ -1,6 +1,5 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
-import { MaterialModule } from '@angular/material';
import { RouterModule } from '@angular/router';
import { AppComponent } from './containers/app';
@@ -9,6 +8,7 @@ import { LayoutComponent } from './components/layout';
import { NavItemComponent } from './components/nav-item';
import { SidenavComponent } from './components/sidenav';
import { ToolbarComponent } from './components/toolbar';
+import { MaterialModule } from '../material';
import { GoogleBooksService } from './services/google-books';
diff --git a/example-app/app/material/index.ts b/example-app/app/material/index.ts
new file mode 100644
index 0000000000..6b0631d612
--- /dev/null
+++ b/example-app/app/material/index.ts
@@ -0,0 +1 @@
+export * from './material.module';
diff --git a/example-app/app/material/material.module.ts b/example-app/app/material/material.module.ts
new file mode 100644
index 0000000000..cf0d35b71c
--- /dev/null
+++ b/example-app/app/material/material.module.ts
@@ -0,0 +1,36 @@
+import { NgModule } from '@angular/core';
+
+import {
+ MatInputModule,
+ MatCardModule,
+ MatButtonModule,
+ MatSidenavModule,
+ MatListModule,
+ MatIconModule,
+ MatToolbarModule,
+ MatProgressSpinnerModule,
+} from '@angular/material';
+
+@NgModule({
+ imports: [
+ MatInputModule,
+ MatCardModule,
+ MatButtonModule,
+ MatSidenavModule,
+ MatListModule,
+ MatIconModule,
+ MatToolbarModule,
+ MatProgressSpinnerModule,
+ ],
+ exports: [
+ MatInputModule,
+ MatCardModule,
+ MatButtonModule,
+ MatSidenavModule,
+ MatListModule,
+ MatIconModule,
+ MatToolbarModule,
+ MatProgressSpinnerModule,
+ ],
+})
+export class MaterialModule {}
diff --git a/example-app/styles.css b/example-app/styles.css
index 0674460363..af1fd6c4c6 100644
--- a/example-app/styles.css
+++ b/example-app/styles.css
@@ -10,3 +10,8 @@ html {
-ms-overflow-style: none;
overflow: auto;
}
+
+.mat-progress-spinner svg {
+ width: 30px !important;
+ height: 30px !important;
+}
diff --git a/package.json b/package.json
index cbde463e7f..36031c73e1 100644
--- a/package.json
+++ b/package.json
@@ -64,7 +64,7 @@
"@angular/core": "^4.2.0",
"@angular/forms": "^4.2.0",
"@angular/http": "^4.2.0",
- "@angular/material": "^2.0.0-beta.7",
+ "@angular/material": "2.0.0-beta.12",
"@angular/platform-browser": "^4.2.0",
"@angular/platform-browser-dynamic": "^4.2.0",
"@angular/platform-server": "^4.2.0",
@@ -125,8 +125,7 @@
"zone.js": "^0.8.12"
},
"dependencies": {
- "@angular/cdk": "^2.0.0-beta.8",
- "lodash": "^4.17.4",
+ "@angular/cdk": "^2.0.0-beta.12",
"opencollective": "^1.0.3"
},
"collective": {
diff --git a/setup-jest.ts b/setup-jest.ts
index 05a89c72cc..a1346f14d6 100644
--- a/setup-jest.ts
+++ b/setup-jest.ts
@@ -1,6 +1,2 @@
import 'jest-preset-angular';
-import { MdCommonModule } from '@angular/material';
-
global['CSS'] = null;
-MdCommonModule.prototype['_checkDoctype'] = function() {};
-MdCommonModule.prototype['_checkTheme'] = function() {};
diff --git a/yarn.lock b/yarn.lock
index f1c7813951..28ac41fb7c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -8,9 +8,9 @@
dependencies:
tslib "^1.7.1"
-"@angular/cdk@^2.0.0-beta.8":
- version "2.0.0-beta.8"
- resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-2.0.0-beta.8.tgz#71961c851dfbeb19e085e898bf5e4461408f8b57"
+"@angular/cdk@^2.0.0-beta.12":
+ version "2.0.0-beta.12"
+ resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-2.0.0-beta.12.tgz#3a243cb62b93f4e039120ba70f900dc9e235622e"
dependencies:
tslib "^1.7.1"
@@ -120,9 +120,9 @@
dependencies:
tslib "^1.7.1"
-"@angular/material@^2.0.0-beta.7":
- version "2.0.0-beta.8"
- resolved "https://registry.yarnpkg.com/@angular/material/-/material-2.0.0-beta.8.tgz#a92852abc9261aea26c2401f576645470be2cf38"
+"@angular/material@2.0.0-beta.12":
+ version "2.0.0-beta.12"
+ resolved "https://registry.yarnpkg.com/@angular/material/-/material-2.0.0-beta.12.tgz#71b6d0b7b021891e5d0e3688c1d4bd78c7457f58"
dependencies:
tslib "^1.7.1"