Commit Graph

1365 Commits

Author SHA1 Message Date
mmalerba 21cbf346e4 fix(input): make start and end hints interact well when their text needs to wrap (#3979) 2017-04-11 08:48:02 -07:00
Kristiyan Kostadinov eaf16c8c66 fix(select): wrong panel width if element is hidden initially (#3647)
Fixes the select not having a proper width if it became visible after it was initialized.

Fixes #3639.
Fixes #3244.
2017-04-11 08:47:39 -07:00
Paul Gschwendtner e22b55e811 fix(checkbox, radio): ripple error on focus event (#3869)
* The checkbox and radio disable the ripples using a `*ngFor` check. This causes the `ViewChildren` instance to turn null. The reference is required for the focus indicators.

* If ripples are disabled there will be still ripples on click. This is due to the fact that label elements redirect focus to the underlying input element. The `focusOrigin` is therefore `program` and a focus ripple will show up.

* Tests had to be adjusted because the `[md-ripple]` element won't be removed anymore. Therefore the tests now confirm that no ripples are showing up.

Fixes #3856.
2017-04-11 08:47:22 -07:00
Paul Gschwendtner 7f65f31ef8 fix(button): ripple color for raised buttons (#3829)
* fix(button): ripple color for raised buttons

* Fixes the incorrect ripple color for raised buttons. Currently the ripple color is always based on black. This is incorrect on palettes like Indigo.

Fixes #2901

* Address feedback

* Distinguish between buttons with focus overlay

* Fix comment
2017-04-11 08:42:26 -07:00
Thomas Shafer da33c03c70 fix(overlay): Render the templates before placing them in the overlay. (#2989)
This fixes positioning issues when rendering templates which contain embedded templates.
The templates need to be rendered in order to properly determine width which can then determine placement.
2017-04-11 08:40:27 -07:00
Kristiyan Kostadinov eef57f601c fix(snack-bar): allow multi-line text (#3626)
* Wraps multi-line text, instead of truncating it, inside of snack bars. **Note:** While the spec only mentions multi-line text on mobile, this seems to be a better approach than cutting it off at ~500px. We can revisit this if we start using media queries.
* Aligns the snack bar button margin to the spec.
* Simplifies some of the CSS to remove the need for a hardcoded height and negative margins.

Fixes #1951.
2017-04-11 08:37:13 -07:00
Kristiyan Kostadinov edf01c025e fix(tooltip): wrong position when using OnPush change detection (#3671)
* fix(tooltip): wrong position when using OnPush change detection

Fixes the tooltip having a wrong position if it is inside a component with `OnPush` change detection. The issue was due to the fact that when `OnPush` is used, the tooltip text isn't rendered at the moment when the element is positioned.

Fixes #3497.
2017-04-11 08:26:27 -07:00
Kristiyan Kostadinov 3796f69f9d fix(dialog): unable to press escape to close in lazy-loaded module (#3788)
Fixes not being able to use the escape key to close a dialog that was opened from a lazy-loaded module.

Fixes #3737.
2017-04-11 08:25:53 -07:00
Alex Weber 033fe8db75 docs(sidenav): add "push" mode to api docs (#3803) 2017-04-11 08:22:00 -07:00
Kristiyan Kostadinov cc8f871e8d fix(slider,slide-toggle): use the grab cursor (#3821)
Uses the `grab` cursor when hovering over an active slider's thumb and thumb labels, as well as on active slide toggles.

Fixes #3778.
2017-04-11 08:20:57 -07:00
Jeremy Elbourn 9490c905fd docs: clarify points to address common issues (#4021)
* Repeated reminders to only include mat-core once.
* Note about including a theme file via styleUrls
* Add section for theming only certain components
* Move section on overlay theming after section for multiple themes
2017-04-11 08:15:36 -07:00
Jeremy Elbourn b1e31bda29 chore: add more naming and inheritence guidance to coding standards (#3933) 2017-04-10 14:27:39 -07:00
Jeremy Elbourn 3b2f66d010 chore: add api design section to coding standards (#4017) 2017-04-10 12:22:50 -06:00
Jeremy Elbourn e0124bba38 chore: publish examples assets for plunker with docs content (#3987) 2017-04-10 09:52:19 -06:00
Jeremy Elbourn c38c9c333a chore: update getting-started guide for beta.3 (#3986)
No longer mentions `MaterialModule` and instead offers some guidance on building your own NgModule for Angular Material components.
2017-04-08 18:10:02 -06:00
Jonathan Leon 2a1a070273 docs: fixed stylesheet path to match the relevant path that is produced by angular-cli (#3982) 2017-04-08 17:55:43 -06:00
Jeremy Elbourn 1da2b70668 chore: add additional structure to generated docs (#3985)
* For API docs, wrap each generated document in `.docs-api`
* For markdown docs, wrap each generated document in `.docs-markdown`
* Remove the `h1` from API docs that contained only the component name
* Change the `h2` for API docs to be a friendlier title followed by an example import.
* Increase header level for API by one across the board (so that they're "under" the new `h2`)
* A few misc. docs fixes
2017-04-08 16:27:10 -06:00
Paul Gschwendtner b1e5ff6d4f docs: fix package paths (#3966) 2017-04-08 00:19:17 -06:00
Heo 449b882069 docs(guide): theme scss path update (for beta 3) (#3964) 2017-04-08 00:08:30 -06:00
Gabriel Kohen 8a029143e0 chore: fix typo in beta.3 changelog (#3962)
Modul is used instead of module

See: https://github.com/angular/material2/issues/3961
2017-04-08 00:07:19 -06:00
Jeremy Elbourn 3819cc6904 chore: copy LICENSE to release package (#3957) 2017-04-07 17:03:25 -06:00
Jeremy Elbourn 94320c4e68 chore: update tslint to v5 and fix newly surfaced issues (#3958) 2017-04-07 16:59:03 -06:00
Jeremy Elbourn f396657b04 chore: bump version to beta.3 and add changelog (#3953) 2017-04-07 14:59:46 -06:00
Paul Gschwendtner 1326234117 ci: run with LTS node version (#3906)
* Updates the previous LTS version to the current LTS version of node.
2017-04-06 09:51:09 -06:00
Daniel H 98c0b1d58e build: fix build script in package.json (#3915)
Previously the build script tried to run an invalid gulp task.
2017-04-05 11:18:50 -06:00
Mac 59c62893ac docs(dialog): document viewContainerRef config option (#3825) 2017-04-04 17:49:44 -07:00
Mac 1d865640b0 docs(theming): list prebuilt themes (#3826) 2017-04-04 17:22:59 -07:00
Jeremy Elbourn 3f5894efc7 fix: deprecate MaterialModule (#3840)
We've found that, with the current state of tree-shaking in the world,
that using an aggregate NgModule like `MaterialModule` leads to tools
not being able to eliminate code for components that aren't used.

In order to ensure that users end up with the smallest code size
possible, we're deprecating MaterialModule, to be removed in the a
subsequent release.

To replace `MaterialModule`, users can create their own "Material"
modul within their application (e.g., `GmailMaterialModule`) that
imports only the set of components actually used in the application.
2017-04-04 17:22:04 -07:00
Mac 4c407f0dc8 docs(tabs): use two-way binding syntax in API doc (#3885) 2017-04-04 17:19:40 -07:00
tinayuangao 9361ced850 chore: fix screenshot results to be per-sha (#3887) 2017-04-04 17:18:20 -07:00
Johan Bruning bc074a19b9 docs(dialog): fix misleading code comment (#3894) 2017-04-04 17:17:27 -07:00
Kristiyan Kostadinov c486cf817a test(select): various test inconsistencies (#3861)
* test(select): various test inconsistencies

* Fixes a select test that occasionally fails to capture the error inside the expect, causing it to get logged without actually being thrown. This seems to be a Zone-related issue since wrapping a few calls in `async` makes it behave correctly.
* Fixes an RTL test that fails if it is made async. This incorporates the changes from #3866 and #3163 and fixes the underlying issue. It appears that the test was failing, because IE does a slight twitch on the select panel since it goes from a pixel-based `min-width` to one with `calc` and percentages to just percentages. I've set the default width to 100% which is the same as the pixel-based one, which appears to make IE happy.

* chore: verify that changing the min-width causes failures

* chore: revert min-width change

* chore: remove a few unnecessary expressions
2017-04-04 17:17:09 -07:00
Paul Gschwendtner f40296e0fa fix: aot runtime issues (#3807)
* fix: aot runtime issues

Currently when using the `MdSnackBar` in AOT, there will be runtime exceptions from the NgFactory. Those are caused by the re-exports of DI tokens.

The Angular compiler will then look for the first export e.g `MdLiveAnnouncer` and the normal `LiveAnnouncer` export wont be included in the factory.

This is breaking at runtime now, because the NgFactory searches for `LiveAnnouncer` but there is only the `LiveAnnouncer` (DI exception)

Since this deprecation is pretty old we can safely remove it anyways. Although this is probably an Angular that should be reported separately.

Also this commit fixes the output directory of the `aot` gulp task. Currently it outputs the factories in a wrong directory. (This allows us to serve the aot demo-app in the future)

* Remove MdUniqueSelectionDispatcher
2017-04-01 07:14:25 +08:00
Jeremy Elbourn e7a4a03d68 fix: use correct access tokens for artifact publishing (#3860) 2017-04-01 02:51:22 +08:00
Paul Gschwendtner 904c71e17f fix(slide-toggle): fix unavailable unmonitor call (#3862)
* fix(slide-toggle): fix unavailable unmonitor call

* Remove variable
2017-04-01 02:50:43 +08:00
Paul Gschwendtner 724170df24 demo(slide-toggle): fix slide-toggle required demo (#3793)
Fixes the slide-toggle required demo, where the component will be compared with the native required state.

Basically in the demo, the form should be validated native and should show the browsers popup if the slide-toggle is required.
2017-04-01 01:43:13 +08:00
Paul Gschwendtner a225b77fc4 build: silent sass bundling (#3784)
* No longer prints the whole SASS file-tree when running the `build:release` task.
* Added a new options that allows disabling STDOUT messages. STDERR is important for error messages.
2017-04-01 01:42:44 +08:00
Paul Gschwendtner 2240b6c5a8 refactor(focus-origin-monitor): rename unmonitor to stopMonitoring (#3783)
* Renames the `unmonitor` function to `stopMonitoring`.
* Removes unnecessary code that keeps track of the `FocusOriginMonitor` subscription. After calling `stopMonitoring` the observable will complete.
2017-04-01 01:42:35 +08:00
Kristiyan Kostadinov a71a5af2ea feat(dialog): allow for the dialog dimensions to be updated (#2940)
* feat(dialog): allow for the dialog dimensions to be updated

Adds an `updateDimensions` method to the `MdDialogRef` which allows the user to update a dialog's dimensions after it has been created.

Fixes #2930.

* refactor: split dimensions method into two

* refactor: rename updateDimensions to updateSize

* refactor: add back _getOverlayState method

* chore: fix aot issue
2017-04-01 01:42:24 +08:00
Paul Gschwendtner ab77fa95da build: fix closure tsconfig path (#3835)
* Due to the TSConfig file renaming in #3791 and the fact that they were merged at the same time, the path in the closure-compiler script is now invalid.
2017-03-30 05:32:24 +08:00
Kristiyan Kostadinov e82457c118 fix(select): exception if selected value is accessed on init (#3785)
Fixes an error that is thrown if something attempts to access the `selected` value of `md-select` too early. The issue comes from the fact that the underlying `SelectionModel` gets initialized too late in `ngAfterContentInit`.

Fixes #3750.
2017-03-30 05:32:10 +08:00
Kristiyan Kostadinov 4282917f0c feat(theming): log a warning if core theme isn't loaded (#3781)
* feat(theming): log a warning if core theme isn't loaded

* Checks the user's loaded stylesheets and logs a warning if the Material core theme isn't loaded.
* Fixes a wrong `typeof` check when determining the doctype.

Fixes #2828.

Note: I originally went with looping through the `document.styleSheets` to check whether the selector is defined, however I had to switch back to `getComputedStyle`, because browsers don't expose the `document.styleSheets`, if the CSS file is being loaded from another domain. This would've caused the warning to be logged if the user loads over a CDN.

* refactor: address feedback
2017-03-30 05:31:55 +08:00
Paul Gschwendtner c4ec662390 feat(slide-toggle): add ripple focus indicator (#3739)
* feat(slide-toggle): add ripple focus indicator

* Introduces a focus indiactor using the persistent ripples.

* Address comments
2017-03-30 05:31:42 +08:00
Jeferson Estevo bedf5a1e42 fix(autocomplete): do not trigger submit on ENTER (#3727)
* fix(autocomplete): do not trigger submit on ENTER

When an option is selected with the ENTER key, it should not submit the form and prevent the default input behavior

Fixes #3159

* test(autocomplete): removing extra detectChanges
2017-03-30 05:31:28 +08:00
mmalerba 6d6c12dc16 fix(input): don't add empty prefix & suffix wrappers (#3724)
* fix(input): don't add empty prefix & suffix wrappers

* add tests
2017-03-30 05:31:17 +08:00
Kristiyan Kostadinov 07793a48ea fix(tabs): re-align ink bar on direction change (#3622)
Re-aligns the ink bar if the user's layout direction changed.

Fixes #3615.
2017-03-30 05:31:04 +08:00
Kristiyan Kostadinov 52ea7a34e2 fix(select): wrong item order in label in rtl (#3567)
Fixes selected items not having the proper order in the label when `md-select` is in `multiple` mode and in RTL.
2017-03-30 05:30:32 +08:00
Kristiyan Kostadinov 8e6720b602 fix(dialog): leaking MdDialogContainer references (#2944)
* fix(dialog): leaking MdDialogContainer references

Fixes an issue that caused the `MdDialogContainer` references to not be cleaned up, and as a result, any of the `MdDialogRef` and `MdDialogConfig` instances as well. The issue seems to come from the fact that a couple of blocks that look like:
```
this._ngZone.onMicrotaskEmpty.first().subscribe(() => {
  this._elementFocusedBeforeDialogWasOpened = document.activeElement;
  this._focusTrap.focusFirstTabbableElement();
});
```

End up being transpiled to:
```
var _this = this;
this._ngZone.onMicrotaskEmpty.first().subscribe(function () {
    _this._elementFocusedBeforeDialogWasOpened = document.activeElement;
    _this._focusTrap.focusFirstTabbableElement();
});
```

This seems to cause the browser to retain the `_this` reference after the dialog has been destroyed.

Fixes #2876.

* chore: add comment about `this` usage in zone
2017-03-30 05:30:20 +08:00
Paul Gschwendtner 07bc4add13 build: fix serve task (#3794)
* build: fix serve task

* Currently when serving the dev-app or e2e-app and chanages are recognized, the library task will run. This task clears the whole `dist/` and rebuilds then.

* This is problematic because sometimes only the library will be rebuilt and for example the `dev-app` won't be rebuilt. After the task ran, the `dev-app` is removed and the serve task will crash.

* Rename to library:clean-build
2017-03-30 02:13:45 +08:00
Paul Gschwendtner becb7a87e0 build: tsconfig for editor warnings (#3791)
* build: tsconfig for editor warnings

Currently when using a code editor that uses the TypeScript language service (Webstorm / VS Code / Atom / Sublime) there will be TypeScript errors in the `.spec` files.

This is because the editor finds the `tsconfig.json` file that doesn't match the spec files. Therefore it complains about the `experimentalDecorators`.

In `angular/angular` there is a global `tsconfig` file that matches everything and is therefore fixing the editor warnings. This file is also used to compile all `.spec` files for the whole project.

We can add such a `tsconfig.json` file as well, and in the future we can use it for compiling the specs as well.

* Add docs for tsconfig files
2017-03-30 02:13:33 +08:00