Skip to content

Commit cf14d74

Browse files
authored
Merge branch 'master' into focus-trap-refactor
2 parents 016f9c2 + a4da08b commit cf14d74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1049
-327
lines changed

README.md

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ and which pieces are blocked) and make a comment.
3838
Also see our [`Good for community contribution`](https://github.com/angular/material2/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+for+community+contribution%22)
3939
label.
4040

41-
High level items planned for January 2017:
42-
43-
* Initial version of md-autocomplete
44-
* Prototyping for data-table
45-
* Improvements to https://material.angular.io
46-
* Continued expanding e2e test coverage
47-
* More work on scroll / resize handling for overlays
48-
* Screenshot tests
49-
* Better development automation
41+
High level items planned for next few months:
5042

43+
- Initial version of datepicker
44+
- Initial version of data table
45+
- Initial version of tree
46+
- Select improvements (multi-select, etc)
47+
- Screenshot test improvements
48+
- Docs site improvements
49+
- A11y audit
50+
- Various bug fixes
5151

5252
#### Feature status:
5353

@@ -76,7 +76,7 @@ High level items planned for January 2017:
7676
| snackbar / toast | Available | [README][21] | [#115][0115] |
7777
| select | Available | [README][23] | [#118][0118] |
7878
| textarea | Available | [README][5] | - |
79-
| autocomplete | In-progress | - | [#117][0117] |
79+
| autocomplete | Initial version, features evolving | [README][24] | [#117][0117] |
8080
| chips | Initial version, features evolving | - | [#120][0120] |
8181
| theming | Available, need guidance overlays | [Guide][20] | - |
8282
| docs site | UX design and tooling in progress | - | - |
@@ -86,36 +86,37 @@ High level items planned for January 2017:
8686
| bottom-sheet | Not started | - | - |
8787
| bottom-nav | Not started | - | [#408][0408] |
8888
| virtual-repeat | Not started | - | [#823][0823] |
89-
| datepicker | Not started | - | [#675][0675] |
89+
| datepicker | In progress | - | [#675][0675] |
9090
| data-table | Design in-progress | - | [#581][0581] |
9191
| stepper | Not started | - | [#508][0508] |
9292
| layout | See [angular/flex-layout][lay_rp] | [Wiki][0] | - |
9393

9494
[lay_rp]: https://github.com/angular/flex-layout
9595
[0]: https://github.com/angular/flex-layout/wiki
96-
[1]: https://github.com/angular/material2/blob/master/src/lib/button/README.md
97-
[2]: https://github.com/angular/material2/blob/master/src/lib/card/README.md
98-
[3]: https://github.com/angular/material2/blob/master/src/lib/checkbox/README.md
99-
[4]: https://github.com/angular/material2/blob/master/src/lib/radio/README.md
100-
[5]: https://github.com/angular/material2/blob/master/src/lib/input/README.md
101-
[6]: https://github.com/angular/material2/blob/master/src/lib/sidenav/README.md
102-
[7]: https://github.com/angular/material2/blob/master/src/lib/toolbar/README.md
103-
[8]: https://github.com/angular/material2/blob/master/src/lib/list/README.md
104-
[9]: https://github.com/angular/material2/blob/master/src/lib/grid-list/README.md
105-
[10]: https://github.com/angular/material2/blob/master/src/lib/icon/README.md
106-
[11]: https://github.com/angular/material2/blob/master/src/lib/progress-spinner/README.md
107-
[12]: https://github.com/angular/material2/blob/master/src/lib/progress-bar/README.md
108-
[13]: https://github.com/angular/material2/blob/master/src/lib/tabs/README.md
109-
[14]: https://github.com/angular/material2/blob/master/src/lib/slide-toggle/README.md
110-
[15]: https://github.com/angular/material2/blob/master/src/lib/button-toggle/README.md
111-
[16]: https://github.com/angular/material2/blob/master/src/lib/slider/README.md
112-
[17]: https://github.com/angular/material2/blob/master/src/lib/menu/README.md
113-
[18]: https://github.com/angular/material2/blob/master/src/lib/tooltip/README.md
96+
[1]: https://material.angular.io/components/component/button
97+
[2]: https://material.angular.io/components/component/card
98+
[3]: https://material.angular.io/components/component/checkbox
99+
[4]: https://material.angular.io/components/component/radio
100+
[5]: https://material.angular.io/components/component/input
101+
[6]: https://material.angular.io/components/component/sidenav
102+
[7]: https://material.angular.io/components/component/toolbar
103+
[8]: https://material.angular.io/components/component/list
104+
[9]: https://material.angular.io/components/component/grid-list
105+
[10]: https://material.angular.io/components/component/icon
106+
[11]: https://material.angular.io/components/component/progress-spinner
107+
[12]: https://material.angular.io/components/component/progress-bar
108+
[13]: https://material.angular.io/components/component/tabs
109+
[14]: https://material.angular.io/components/component/slide-toggle
110+
[15]: https://material.angular.io/components/component/button-toggle
111+
[16]: https://material.angular.io/components/component/slider
112+
[17]: https://material.angular.io/components/component/menu
113+
[18]: https://material.angular.io/components/component/tooltip
114114
[19]: https://github.com/angular/material2/blob/master/src/lib/core/ripple/README.md
115115
[20]: https://github.com/angular/material2/blob/master/guides/theming.md
116-
[21]: https://github.com/angular/material2/blob/master/src/lib/snack-bar/README.md
117-
[22]: https://github.com/angular/material2/blob/master/src/lib/dialog/README.md
118-
[23]: https://github.com/angular/material2/blob/master/src/lib/select/README.md
116+
[21]: https://material.angular.io/components/component/snack-bar
117+
[22]: https://material.angular.io/components/component/dialog
118+
[23]: https://material.angular.io/components/component/select
119+
[24]: https://material.angular.io/components/component/autocomplete
119120

120121
[0107]: https://github.com/angular/material2/issues/107
121122
[0119]: https://github.com/angular/material2/issues/119

e2e/components/slide-toggle/slide-toggle.e2e.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {browser, element, by, Key} from 'protractor';
1+
import {browser, element, by, Key, ExpectedConditions} from 'protractor';
22
import {expectToExist} from '../../util/asserts';
33
import {screenshot} from '../../screenshot';
44

@@ -21,7 +21,9 @@ describe('slide-toggle', () => {
2121
getNormalToggle().click();
2222

2323
expect(inputEl.getAttribute('checked')).toBeTruthy('Expect slide-toggle to be checked');
24-
screenshot();
24+
browser.wait(ExpectedConditions.not(
25+
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
26+
.then(() => screenshot());
2527
});
2628

2729
it('should change the checked state on click', () => {
@@ -32,7 +34,9 @@ describe('slide-toggle', () => {
3234
getNormalToggle().click();
3335

3436
expect(inputEl.getAttribute('checked')).toBeTruthy('Expect slide-toggle to be checked');
35-
screenshot();
37+
browser.wait(ExpectedConditions.not(
38+
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
39+
.then(() => screenshot());
3640
});
3741

3842
it('should not change the checked state on click when disabled', () => {
@@ -43,7 +47,9 @@ describe('slide-toggle', () => {
4347
element(by.css('#disabled-slide-toggle')).click();
4448

4549
expect(inputEl.getAttribute('checked')).toBeFalsy('Expect slide-toggle to be unchecked');
46-
screenshot();
50+
browser.wait(ExpectedConditions.not(
51+
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
52+
.then(() => screenshot());
4753
});
4854

4955
it('should move the thumb on state change', () => {
@@ -57,7 +63,9 @@ describe('slide-toggle', () => {
5763
let newX = thumbEl.getLocation().then(pos => pos.x);
5864

5965
expect(previousX).not.toBe(newX);
60-
screenshot();
66+
browser.wait(ExpectedConditions.not(
67+
ExpectedConditions.presenceOf(element(by.css('div.mat-ripple-element')))))
68+
.then(() => screenshot());
6169
});
6270

6371
it('should toggle the slide-toggle on space key', () => {

e2e/screenshot.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ import * as path from 'path';
33
import {browser} from 'protractor';
44

55
const OUTPUT_DIR = './screenshots/';
6+
const HEIGHT = 768;
7+
const WIDTH = 1024;
68

79
let currentJasmineSpecName = '';
810

911
/** Adds a custom jasmine reporter that simply keeps track of the current test name. */
1012
function initializeEnvironment(jasmine: any) {
13+
browser.manage().window().setSize(WIDTH, HEIGHT);
1114
let reporter = new jasmine.JsApiReporter({});
1215
reporter.specStarted = function(result: any) {
1316
currentJasmineSpecName = result.fullName;

guides/theming-your-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ All you need is to create a `@mixin` function in the custom-component-theme.scss
2222
$primary: map-get($theme, primary);
2323
$accent: map-get($theme, accent);
2424

25-
// Use md-color to extract individual colors from a palette as necessary.
25+
// Use mat-color to extract individual colors from a palette as necessary.
2626
.candy-carousel {
2727
background-color: mat-color($primary);
2828
border-color: mat-color($accent, A400);

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@angular/platform-browser-dynamic": "^2.3.0",
4242
"@angular/platform-server": "^2.3.0",
4343
"@angular/router": "^3.3.0",
44+
"@types/fs-extra": "0.0.37",
4445
"@types/glob": "^5.0.30",
4546
"@types/gulp": "^3.8.32",
4647
"@types/hammerjs": "^2.0.34",
@@ -59,6 +60,7 @@
5960
"firebase-tools": "^2.2.1",
6061
"fs-extra": "^2.0.0",
6162
"glob": "^7.1.1",
63+
"google-cloud": "^0.45.1",
6264
"gulp": "^3.9.1",
6365
"gulp-autoprefixer": "^3.1.1",
6466
"gulp-better-rollup": "^1.0.2",
@@ -77,6 +79,7 @@
7779
"gulp-transform": "^1.1.0",
7880
"hammerjs": "^2.0.8",
7981
"highlight.js": "^9.9.0",
82+
"image-diff": "^1.6.3",
8083
"jasmine-core": "^2.5.2",
8184
"karma": "^1.4.1",
8285
"karma-browserstack-launcher": "^1.2.0",

src/demo-app/button/button-demo.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
section {
99
display: flex;
1010
align-items: center;
11-
background-color: #f7f7f7;
1211
margin: 8px;
1312
}
1413

src/demo-app/checkbox/checkbox-demo.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,15 @@ <h1>md-checkbox: Basic Example</h1>
4343
</div>
4444
</div>
4545

46+
<h1>Pseudo checkboxes</h1>
47+
<md-pseudo-checkbox></md-pseudo-checkbox>
48+
<md-pseudo-checkbox [disabled]="true"></md-pseudo-checkbox>
49+
50+
<md-pseudo-checkbox state="checked"></md-pseudo-checkbox>
51+
<md-pseudo-checkbox state="checked" [disabled]="true"></md-pseudo-checkbox>
52+
53+
<md-pseudo-checkbox state="indeterminate"></md-pseudo-checkbox>
54+
<md-pseudo-checkbox state="indeterminate" [disabled]="true"></md-pseudo-checkbox>
55+
4656
<h1>Nested Checklist</h1>
4757
<md-checkbox-demo-nested-checklist></md-checkbox-demo-nested-checklist>

src/demo-app/demo-app-module.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import {HttpModule} from '@angular/http';
44
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
55
import {DemoApp, Home} from './demo-app/demo-app';
66
import {RouterModule} from '@angular/router';
7-
import {MaterialModule, OverlayContainer, FullscreenOverlayContainer} from '@angular/material';
7+
import {
8+
MaterialModule,
9+
OverlayContainer,
10+
FullscreenOverlayContainer,
11+
MdSelectionModule,
12+
} from '@angular/material';
813
import {DEMO_APP_ROUTES} from './demo-app/routes';
914
import {ProgressBarDemo} from './progress-bar/progress-bar-demo';
1015
import {JazzDialog, ContentElementDialog, DialogDemo, IFrameDialog} from './dialog/dialog-demo';
@@ -47,6 +52,7 @@ import {StyleDemo} from './style/style-demo';
4752
ReactiveFormsModule,
4853
RouterModule.forRoot(DEMO_APP_ROUTES),
4954
MaterialModule.forRoot(),
55+
MdSelectionModule,
5056
],
5157
declarations: [
5258
AutocompleteDemo,
@@ -93,7 +99,7 @@ import {StyleDemo} from './style/style-demo';
9399
SunnyTabContent,
94100
RainyTabContent,
95101
FoggyTabContent,
96-
PlatformDemo
102+
PlatformDemo,
97103
],
98104
providers: [
99105
{provide: OverlayContainer, useClass: FullscreenOverlayContainer}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@import '@angular/material/core/theming/all-theme';
2+
3+
// Include core material styles.
4+
@include mat-core();
5+
6+
$primary: mat-palette($mat-indigo);
7+
$accent: mat-palette($mat-pink);
8+
9+
$light-theme: mat-light-theme($primary, $accent);
10+
$dark-theme: mat-dark-theme($primary, $accent);
11+
12+
@include angular-material-theme($light-theme);
13+
14+
.demo-dark-theme {
15+
@include angular-material-theme($dark-theme);
16+
}

src/demo-app/demo-app/demo-app.html

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
1-
<md-sidenav-container class="demo-root" fullscreen>
2-
<md-sidenav #start>
3-
<md-nav-list>
4-
<a *ngFor="let navItem of navItems"
5-
md-list-item
6-
(click)="start.close()"
7-
[routerLink]="[navItem.route]">
8-
{{navItem.name}}
9-
</a>
1+
<!-- Theme class needs to be applied above sidenav-container to style content background. -->
2+
<div [class.demo-dark-theme]="isDarkTheme">
3+
<md-sidenav-container class="demo-root" fullscreen>
4+
<md-sidenav #start>
5+
<md-nav-list>
6+
<a *ngFor="let navItem of navItems"
7+
md-list-item
8+
(click)="start.close()"
9+
[routerLink]="[navItem.route]">
10+
{{navItem.name}}
11+
</a>
1012

11-
<hr>
13+
<hr>
1214

13-
<a md-list-item
14-
(click)="start.close()"
15-
[routerLink]="['baseline']">
16-
Baseline
17-
</a>
18-
</md-nav-list>
19-
<button md-button (click)="start.close()">CLOSE</button>
20-
</md-sidenav>
21-
<div>
22-
<md-toolbar color="primary">
23-
<button md-icon-button (click)="start.open()">
24-
<md-icon class="md-24" >menu</md-icon>
25-
</button>
26-
<div class="demo-toolbar">
27-
<h1>Angular Material Demos</h1>
28-
<button md-button (click)="toggleFullscreen()" title="Toggle fullscreen">
29-
Fullscreen
15+
<a md-list-item
16+
(click)="start.close()"
17+
[routerLink]="['baseline']">
18+
Baseline
19+
</a>
20+
</md-nav-list>
21+
<button md-button (click)="start.close()">CLOSE</button>
22+
</md-sidenav>
23+
<div>
24+
<md-toolbar color="primary">
25+
<button md-icon-button (click)="start.open()">
26+
<md-icon class="md-24" >menu</md-icon>
3027
</button>
31-
<button md-button (click)="root.dir = (root.dir == 'rtl' ? 'ltr' : 'rtl')" title="Toggle between RTL and LTR">
32-
{{root.dir.toUpperCase()}}
33-
</button>
34-
</div>
35-
</md-toolbar>
28+
<div class="demo-toolbar">
29+
<h1>Angular Material Demos</h1>
30+
<span class="demo-flex-fill"></span>
31+
<button md-button (click)="isDarkTheme = !isDarkTheme">Toggle Theme</button>
32+
<button md-button (click)="toggleFullscreen()" title="Toggle fullscreen">
33+
Fullscreen
34+
</button>
35+
<button md-button (click)="root.dir = (root.dir == 'rtl' ? 'ltr' : 'rtl')" title="Toggle between RTL and LTR">
36+
{{root.dir.toUpperCase()}}
37+
</button>
38+
</div>
39+
</md-toolbar>
3640

37-
<div #root="$implicit" dir="ltr" class="demo-content">
38-
<router-outlet></router-outlet>
41+
<div #root="$implicit" dir="ltr" class="demo-content">
42+
<router-outlet></router-outlet>
43+
</div>
3944
</div>
40-
</div>
41-
</md-sidenav-container>
45+
</md-sidenav-container>
46+
</div>

src/demo-app/demo-app/demo-app.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ body {
3131

3232
.demo-toolbar {
3333
display: flex;
34-
justify-content: space-between;
3534
width: 100%;
3635
}
3736
}
@@ -41,6 +40,11 @@ body {
4140
}
4241
}
4342

43+
// Fills remaining flex space.
44+
.demo-flex-fill {
45+
flex: 1 1 auto;
46+
}
47+
4448
// stretch to screen size in fullscreen mode
4549
.demo-content {
4650
width: 100%;

src/demo-app/demo-app/demo-app.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ export class Home {}
1515
selector: 'demo-app',
1616
providers: [],
1717
templateUrl: 'demo-app.html',
18-
styleUrls: ['demo-app.css'],
18+
styleUrls: ['demo-app.css', 'demo-app-theme.css'],
1919
encapsulation: ViewEncapsulation.None,
2020
})
2121
export class DemoApp {
22+
23+
/** Whether the demo-app should use a dark theme or not. */
24+
isDarkTheme: boolean = false;
25+
2226
navItems = [
2327
{name: 'Autocomplete', route: 'autocomplete'},
2428
{name: 'Button', route: 'button'},

src/demo-app/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
<link rel="icon" type="image/x-icon" href="favicon.ico">
1010
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
11-
<link href="@angular/material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet">
1211

1312
<!-- FontAwesome for md-icon demo. -->
1413
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

0 commit comments

Comments
 (0)