Skip to content

Commit 928396e

Browse files
committed
Merge branch 'master' into fix-md-input-date
2 parents a0b2e26 + 883e2fb commit 928396e

File tree

340 files changed

+7907
-9046
lines changed

Some content is hidden

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

340 files changed

+7907
-9046
lines changed

.travis.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,11 @@ env:
2424
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
2525
- ARCH=linux-x64
2626
- BROWSER_PROVIDER_READY_FILE=/tmp/angular-material2-build/readyfile
27-
# Token for tsd to increase github rate limit
28-
# See https://github.com/DefinitelyTyped/tsd#tsdrc
29-
# This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
30-
# because those are not visible for pull requests, and those should also be reliable.
31-
# This SSO token belongs to github account angular-github-ratelimit-token which has no access
32-
# (password is in Valentine)
33-
- TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}'
3427
# GITHUB_TOKEN_ANGULAR
3528
- secure: "fq/U7VDMWO8O8SnAQkdbkoSe2X92PVqg4d044HmRYVmcf6YbO48+xeGJ8yOk0pCBwl3ISO4Q2ot0x546kxfiYBuHkZetlngZxZCtQiFT9kyId8ZKcYdXaIW9OVdw3Gh3tQyUwDucfkVhqcs52D6NZjyE2aWZ4/d1V4kWRO/LMgo="
3629
matrix:
3730
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
3831
- MODE=lint
39-
- MODE=circular_deps
4032
- MODE=extract_metadata
4133
- MODE=e2e
4234
- MODE=saucelabs_required
@@ -45,19 +37,19 @@ env:
4537
- MODE=browserstack_optional
4638

4739
matrix:
40+
fast_finish: true
4841
allow_failures:
4942
- env: "MODE=saucelabs_optional"
5043
- env: "MODE=browserstack_optional"
5144

5245
install:
5346
- npm install
54-
- npm run typings
5547

5648
before_script:
5749
- mkdir -p $LOGS_DIR
5850

5951
script:
60-
- ./scripts/ci/build-and-test.sh
52+
- ./scripts/ci/build-and-test.sh
6153

6254
cache:
6355
directories:

CHANGELOG.md

Lines changed: 118 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,117 @@
1+
<a name="2.0.0-alpha.8"></a>
2+
# [2.0.0-alpha.8 ectoplasm-helicopter](https://github.com/angular/material2/compare/g3_v2_0...2.0.0-alpha.8) (2016-09-01)
3+
4+
### Breaking Changes
5+
6+
* all: we've updated our packaging to match angular/angular's packaging. If you're using SystemJS in your project, you will probably want to
7+
switch to using our UMD bundles. Example config:
8+
9+
```ts
10+
'@angular2-material/core': {
11+
format: 'cjs',
12+
main: 'core.umd.js'
13+
}
14+
```
15+
16+
You can see a more detailed example in our demo app's system config [here](https://github.com/angular/material2/blob/master/src/demo-app/system-config.ts).
17+
18+
* all: material modules must be included with `forRoot()` when bootstrapping. See the [ngModules guide](https://angular.io/docs/ts/latest/cookbook/ngmodule-faq.html#!#q-for-root) for
19+
more information.
20+
21+
```ts
22+
@NgModule({
23+
imports: [
24+
MdCoreModule.forRoot()
25+
MdRadioModule.forRoot(),
26+
MdIconModule.forRoot()
27+
]
28+
...
29+
});
30+
```
31+
32+
* input: `md-input` attributes now match the casing of native attributes. Previously they were camel-cased; now they are all lowercase.
33+
Example: `autoComplete` is now `autocomplete`. See [#1066](https://github.com/angular/material2/pull/1066) for a full list.
34+
35+
* overlay: overlays are now synchronous. This means actions like creating an overlay no longer return a promise.
36+
37+
38+
### Bug Fixes
39+
40+
* **button:** hover styles no longer applied to disabled buttons ([#909](https://github.com/angular/material2/issues/909)) ([21e419d](https://github.com/angular/material2/commit/21e419d)), closes [#866](https://github.com/angular/material2/issues/866)
41+
* **button:** stop using `Type` from [@angular](https://github.com/angular) ([#991](https://github.com/angular/material2/issues/991)) ([97d3ed3](https://github.com/angular/material2/commit/97d3ed3))
42+
* **button-toggle:** toggle group should not emit an initial change event. ([#1144](https://github.com/angular/material2/issues/1144)) ([e5830d1](https://github.com/angular/material2/commit/e5830d1))
43+
* **card:** remove unnecessary intermediate div ([#1068](https://github.com/angular/material2/issues/1068)) ([b5e1e33](https://github.com/angular/material2/commit/b5e1e33))
44+
* **checkbox:** export TransitionCheckState enum ([#1147](https://github.com/angular/material2/issues/1147)) ([cda90f3](https://github.com/angular/material2/commit/cda90f3))
45+
* **input:** make attributes match native ones ([#1066](https://github.com/angular/material2/issues/1066)) ([f3a7b91](https://github.com/angular/material2/commit/f3a7b91)), closes [#1065](https://github.com/angular/material2/issues/1065)
46+
* **ngc:** _onDragStart/End are called with one param ([#1113](https://github.com/angular/material2/issues/1113)) ([6e5d260](https://github.com/angular/material2/commit/6e5d260)), closes [#1112](https://github.com/angular/material2/issues/1112)
47+
* **ngc:** don't emit HTMLElement in JS files ([#1061](https://github.com/angular/material2/issues/1061)) ([32eacd2](https://github.com/angular/material2/commit/32eacd2))
48+
* **rc6:** add directives for custom elements that are part of the APIs. ([#1121](https://github.com/angular/material2/issues/1121)) ([2c0dfcb](https://github.com/angular/material2/commit/2c0dfcb))
49+
* **sidenav:** turn off view encapsulation and refactor css ([#1114](https://github.com/angular/material2/issues/1114)) ([97fe211](https://github.com/angular/material2/commit/97fe211))
50+
* **tabs:** change missed md-active to md-tab-active ([#1044](https://github.com/angular/material2/issues/1044)) ([87b6193](https://github.com/angular/material2/commit/87b6193))
51+
52+
### Features
53+
54+
* **menu:** add keyboard events and improve accessibility ([#1132](https://github.com/angular/material2/issues/1132)) ([3669f06](https://github.com/angular/material2/commit/3669f06))
55+
* **modules:** add `forRoot()` to material modules with providers ([#1122](https://github.com/angular/material2/issues/1122)) ([9ff6196](https://github.com/angular/material2/commit/9ff6196))
56+
* **modules:** add `forRoot()` to all modules ([#1166](https://github.com/angular/material2/issues/1166)) ([21dc44a](https://github.com/angular/material2/commit/21dc44a))
57+
* **overlay:** make overlays synchronous ([#1079](https://github.com/angular/material2/issues/1079)) ([cdad90b](https://github.com/angular/material2/commit/cdad90b))
58+
* **slider:** add thumb-label ([#976](https://github.com/angular/material2/issues/976)) ([22d70ae](https://github.com/angular/material2/commit/22d70ae))
59+
* **slider:** support ngModel ([#1029](https://github.com/angular/material2/issues/1029)) ([8828358](https://github.com/angular/material2/commit/8828358))
60+
* **tabs:** support for `disabled` tabs ([#934](https://github.com/angular/material2/issues/934)) ([9d51deb](https://github.com/angular/material2/commit/9d51deb)), closes [#880](https://github.com/angular/material2/issues/880)
61+
62+
<a name="2.0.0-alpha.7"></a>
63+
# [2.0.0-alpha.7 wax-umpire](https://github.com/angular/material2/compare/2.0.0-alpha.6...2.0.0-alpha.7) (2016-08-09)
64+
65+
66+
### Bug Fixes
67+
68+
* **checkbox:** wrong cursor when disabled ([#908](https://github.com/angular/material2/issues/908)) ([5251c27](https://github.com/angular/material2/commit/5251c27)), closes [#907](https://github.com/angular/material2/issues/907)
69+
* **checkbox, slide-toggle:** only emit change event if native input emitted one. ([#820](https://github.com/angular/material2/issues/820)) ([d52e6e0](https://github.com/angular/material2/commit/d52e6e0)), closes [#575](https://github.com/angular/material2/issues/575)
70+
* **gestures:** custom recognizers should not inherit twice. ([#902](https://github.com/angular/material2/issues/902)) ([c68efbd](https://github.com/angular/material2/commit/c68efbd))
71+
* **gestures:** ensure drag and pan are recognized with slide ([#901](https://github.com/angular/material2/issues/901)) ([3179fec](https://github.com/angular/material2/commit/3179fec))
72+
* **input:** ensure all of label displays on safari ([#871](https://github.com/angular/material2/issues/871)) ([c8303b4](https://github.com/angular/material2/commit/c8303b4)), closes [#795](https://github.com/angular/material2/issues/795)
73+
* **overlay:** lazily create container ([#894](https://github.com/angular/material2/issues/894)) ([1efbbb9](https://github.com/angular/material2/commit/1efbbb9))
74+
* **progress-circle:** correct elapsed time calculation ([#927](https://github.com/angular/material2/issues/927)) ([0b17cd3](https://github.com/angular/material2/commit/0b17cd3)), closes [#926](https://github.com/angular/material2/issues/926)
75+
* **progress-circle:** remove performance.now to support non browser envs ([#857](https://github.com/angular/material2/issues/857)) ([14c1765](https://github.com/angular/material2/commit/14c1765))
76+
* **progress-circle:** remove references to window ([#838](https://github.com/angular/material2/issues/838)) ([66ddd3a](https://github.com/angular/material2/commit/66ddd3a)), closes [#837](https://github.com/angular/material2/issues/837)
77+
* **radio:** only emit change event if native input does. ([#911](https://github.com/angular/material2/issues/911)) ([23a61ab](https://github.com/angular/material2/commit/23a61ab)), closes [#791](https://github.com/angular/material2/issues/791)
78+
* **slide-toggle:** fix runtime exception for incorrect mousedown binding. ([#828](https://github.com/angular/material2/issues/828)) ([bbbc87f](https://github.com/angular/material2/commit/bbbc87f)), closes [#828](https://github.com/angular/material2/issues/828)
79+
* fix type mismatches when offline compiling. ([#835](https://github.com/angular/material2/issues/835)) ([4bb7790](https://github.com/angular/material2/commit/4bb7790))
80+
81+
82+
### Features
83+
84+
* Add NgModules ([#950](https://github.com/angular/material2/issues/950)) ([ca351b2](https://github.com/angular/material2/commit/ca351b2))
85+
86+
Note that NgModules are now the supported way of including the Material components in your app.
87+
The MD_XXX_DIRECTIVES constants are now deprecated and will be removed in alpha.8.
88+
89+
90+
* **tooltip:** initial tooltip implementation ([#799](https://github.com/angular/material2/issues/799)) ([f5e2a81](https://github.com/angular/material2/commit/f5e2a81))
91+
* **md-slider:** initial version for md-slider ([#779](https://github.com/angular/material2/issues/779)) ([8354750](https://github.com/angular/material2/commit/8354750))
92+
* **md-menu** initial version for md-menu (more features coming in alpha.8) ([#893](https://github.com/angular/material2/issues/893)) ([16eb6be](https://github.com/angular/material2/commit/16eb6be)) ([#855](https://github.com/angular/material2/issues/855)) ([e324e47](https://github.com/angular/material2/commit/e324e47)) ([#867](https://github.com/angular/material2/issues/867)) ([9a32489](https://github.com/angular/material2/commit/9a32489))
93+
* **ripple:** initial mdInkRipple implementation ([#681](https://github.com/angular/material2/issues/681)) ([47448cb](https://github.com/angular/material2/commit/47448cb))
94+
* **button:** add ripple to md-button ([32aa461](https://github.com/angular/material2/commit/32aa461))
95+
* **input:** support autocapitalize and autocorrect attributes ([#858](https://github.com/angular/material2/issues/858)) ([b2471f2](https://github.com/angular/material2/commit/b2471f2))
96+
* **slide-toggle:** add drag functionality to thumb ([#750](https://github.com/angular/material2/issues/750)) ([25b4f21](https://github.com/angular/material2/commit/25b4f21))
97+
98+
99+
### In-progress, not yet released
100+
* **dialog:** add styles and ability to close. ([#862](https://github.com/angular/material2/issues/862)) ([758b851](https://github.com/angular/material2/commit/758b851))
101+
* **dialog:** initial framework for md-dialog ([#761](https://github.com/angular/material2/issues/761)) ([9552ed5](https://github.com/angular/material2/commit/9552ed5))
102+
103+
104+
### Code health
105+
* **tabs:** adds e2e tests for tabs ([#650](https://github.com/angular/material2/issues/650)) ([3c74ae0](https://github.com/angular/material2/commit/3c74ae0)), closes [#549](https://github.com/angular/material2/issues/549)
106+
107+
### BREAKING CHANGES
108+
109+
* radio: radio-button will no longer emit change event on de-select.
110+
111+
112+
1113
<a name="2.0.0-alpha.6"></a>
2-
# [2.0.0-alpha.6 carbonfiber-discotheque](https://github.com/angular/material2/compare/2.0.0-alpha.5...v2.0.0-alpha.6) (2016-06-30)
114+
# [2.0.0-alpha.6 carbonfiber-discotheque](https://github.com/angular/material2/compare/2.0.0-alpha.5...2.0.0-alpha.6) (2016-06-30)
3115

4116
### Breaking changes
5117
* `MdRadioDispatcher` is now `MdUniqueSelectionDispatcher` and is imported from `core`
@@ -59,7 +171,7 @@
59171

60172

61173
<a name="2.0.0-alpha.5"></a>
62-
# [2.0.0-alpha.5 granite-gouda](https://github.com/angular/material2/compare/2.0.0-alpha.4...v2.0.0-alpha.5) (2016-05-25)
174+
# [2.0.0-alpha.5 granite-gouda](https://github.com/angular/material2/compare/2.0.0-alpha.4...2.0.0-alpha.5) (2016-05-25)
63175

64176

65177
### Bug Fixes
@@ -101,7 +213,7 @@
101213

102214

103215
<a name="2.0.0-alpha.4"></a>
104-
# [2.0.0-alpha.4 mahogany-tambourine](https://github.com/angular/material2/compare/2.0.0-alpha.3...v2.0.0-alpha.4) (2016-05-04)
216+
# [2.0.0-alpha.4 mahogany-tambourine](https://github.com/angular/material2/compare/2.0.0-alpha.3...2.0.0-alpha.4) (2016-05-04)
105217

106218

107219
### Bug Fixes
@@ -125,7 +237,7 @@
125237

126238

127239
<a name="2.0.0-alpha.3"></a>
128-
# [2.0.0-alpha.3 cotton-candelabrum](https://github.com/angular/material2/compare/2.0.0-alpha.2...v2.0.0-alpha.3) (2016-04-21)
240+
# [2.0.0-alpha.3 cotton-candelabrum](https://github.com/angular/material2/compare/2.0.0-alpha.2...2.0.0-alpha.3) (2016-04-21)
129241

130242

131243
### Bug Fixes
@@ -147,7 +259,7 @@
147259

148260

149261
<a name="2.0.0-alpha.2"></a>
150-
# [2.0.0-alpha.2 diamond-haircut](https://github.com/angular/material2/compare/2.0.0-alpha.1...v2.0.0-alpha.2) (2016-04-06)
262+
# [2.0.0-alpha.2 diamond-haircut](https://github.com/angular/material2/compare/2.0.0-alpha.1...2.0.0-alpha.2) (2016-04-06)
151263

152264

153265
### Bug Fixes
@@ -180,7 +292,7 @@
180292

181293

182294
<a name="2.0.0-alpha.1"></a>
183-
# [2.0.0-alpha.1 nylon-hyperdrive](https://github.com/angular/material2/compare/2.0.0-alpha.0...v2.0.0-alpha.1) (2016-03-16)
295+
# [2.0.0-alpha.1 nylon-hyperdrive](https://github.com/angular/material2/compare/2.0.0-alpha.0...2.0.0-alpha.1) (2016-03-16)
184296

185297

186298
### Features

GETTING_STARTED.md

Lines changed: 30 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ some initial config for the SystemJS module loader.
2121
### Install Angular Material 2 components
2222

2323
Now that your project has been created, you can install any Angular Material 2 components you'd like
24-
to use through npm. You can see our [list of published packages here](https://www.npmjs.com/~angular2-material).
24+
to use through npm. You can see our [list of published packages here](https://www.npmjs.com/~angular2-material).
25+
26+
Note that only packages published under the `@latest` npm tag are officially released.
2527

2628
```bash
2729
npm install --save @angular2-material/core @angular2-material/button @angular2-material/card
2830
```
29-
Note: the core module is required as a peer dependency of other components.
31+
(the core module is required as a peer dependency of other components)
3032

3133
### Add components to vendor bundle
3234

@@ -98,96 +100,53 @@ Now you should be able to import the components normally wherever you'd like to
98100

99101
**src/app/my-project.component.ts**
100102
```ts
101-
import { MD_CARD_DIRECTIVES } from '@angular2-material/card';
102-
import { MD_BUTTON_DIRECTIVES } from '@angular2-material/button';
103+
import { MdCardModule } from '@angular2-material/card';
104+
import { MdButtonModule } from '@angular2-material/button';
103105
```
104106

105-
And don't forget to add the directives to your directives array:
107+
Import the components in your application module:
106108

107-
**src/app/my-project.component.ts**
109+
**my-app-module.ts**
108110
```ts
109-
directives: [MD_CARD_DIRECTIVES, MD_BUTTON_DIRECTIVES]
111+
@NgModule({
112+
imports: [MdButtonModule, MdCardModule],
113+
...
114+
})
110115
```
111116

112117
### Sample Angular Material 2 projects
113118

114-
- [Puppy Love (ng-conf 2016)](https://github.com/kara/puppy-love) - see live demo [here](https://youtu.be/rRiV_b3WsoY?t=4m20s)
115-
- [Puppy Love Mobile (Google IO 2016)](https://github.com/kara/puppy-love-io)
116119
- [Material 2 Sample App](https://github.com/jelbourn/material2-app)
117120

118-
### Additional steps for using Material components with forms
119-
120-
If you're using Angular Material 2 version alpha.6 or later, you'll need to upgrade to Angular 2's
121-
new forms module. Here's how:
121+
(the following are slightly out of date now)
122+
- [Puppy Love (ng-conf 2016)](https://github.com/kara/puppy-love) - see live demo [here](https://youtu.be/rRiV_b3WsoY?t=4m20s)
123+
- [Puppy Love Mobile (Google IO 2016)](https://github.com/kara/puppy-love-io)
122124

123-
- Install the `@angular/forms` package. If you're on Angular RC.4, install version 0.2.0.
124125

125-
```bash
126-
npm install @angular/forms
126+
### Additional setup for `md-menu` and `md-tooltip`:
127+
For alpha.7, you need to include the overlay styles in your app via a `link` element. This will
128+
look something like
129+
```html
130+
<link href="vendor/@angular2-material/core/overlay/overlay.css" rel="stylesheet">
127131
```
128132

129-
- Change your bootstrap file to disable the old form directives and provide the new form
130-
directives.
133+
In future releases, all of the core styles will be combined into a single distributed css file.
131134

132-
**main.ts**
133-
```ts
134-
import {disableDeprecatedForms, provideForms} from '@angular/forms';
135135

136-
bootstrap(MyAppComponent, [
137-
disableDeprecatedForms(),
138-
provideForms()
139-
]);
140-
```
136+
### Additional setup for `md-slide-toggle` and `md-slider`:
137+
The slide-toggle and slider components have a dependency on [HammerJS](http://hammerjs.github.io/).
138+
1) Add HammerJS to your application via [npm](https://www.npmjs.com/package/hammerjs), a CDN
139+
(such as the [Google CDN](https://developers.google.com/speed/libraries/#hammerjs)),
140+
or served directly from your app.
141+
2) Include the typings for HammerJS in your typescript build ([more info on @types](https://blogs.msdn.microsoft.com/typescript/2016/06/15/the-future-of-declaration-files))
141142

142-
- Import any and all forms symbols - `NgForm`, `Validators`, etc - from `@angular/forms`.
143-
Importing them from `@angular/common` will result in a `No value accessor found` error.
144143

145-
- Update your form code to use the new APIs. See more information about the changes in the proposal
146-
doc [here](https://docs.google.com/document/u/1/d/1RIezQqE4aEhBRmArIAS1mRIZtWFf6JxN_7B4meyWK0Y/pub)
147-
and the official documentation [here](https://angular.io/docs/ts/latest/guide/forms.html).
144+
### Additional setup for `md-icon`:
148145

149-
### Additional steps for `md-icon` setup:
150-
151-
- If you want to use Material Design icons, load the Material Design font in your `index.html`. `md-icon` supports any font icons or svg icons,
152-
so this is only one potential option.
146+
- If you want to use Material Design icons, load the Material Design font in your `index.html`.
147+
`md-icon` supports any font icons or svg icons, so this is only one potential option.
153148

154149
**src/index.html**
155150
```html
156151
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
157152
```
158-
159-
- Include http providers in your `main.ts`:
160-
161-
**src/main.ts**
162-
```ts
163-
import { HTTP_PROVIDERS } from '@angular/http';
164-
...
165-
bootstrap(MyAppComponent, [
166-
HTTP_PROVIDERS
167-
]);
168-
```
169-
170-
- Provide the icon registry at or above the component where you're using the icon:
171-
172-
**src/app/my-project.component.ts**
173-
```ts
174-
import {MdIcon, MdIconRegistry} from '@angular2-material/icon';
175-
...
176-
directives: [MD_CARD_DIRECTIVES, MD_BUTTON_DIRECTIVES, MdIcon],
177-
providers: [MdIconRegistry]
178-
```
179-
180-
- Add the icon package to the list of Material components in your `system-config.ts`:
181-
182-
**src/system-config.ts**
183-
```ts
184-
// put the names of any of your Material components here
185-
const materialPkgs:string[] = [
186-
...
187-
'icon'
188-
];
189-
```
190-
191-
192-
193-

0 commit comments

Comments
 (0)