Fixes a silent error that was being logged by IE when running the snack bar tests. It seems to be due to the specific test case not triggering change detection and not passing in a `viewContainerRef` so it could be triggered automatically.
Currently, some of the datepicker tests will fail if the browser's locale is different from en-US. These changes set the locale to en-US in order to avoid potential issues in the future.
Removes some premature optimization that was being done via `will-change` in the elevation styles. [As per MDN](https://developer.mozilla.org/en/docs/Web/CSS/will-change), we should be careful about how we use `will-change` since it could end up hurting performance.
* Reworks the typography mappings to avoid excessively large headers. Previously the `display-*` breakpoints were mapped to `h*` elements, which was inaccurate. Now the `display-*` breakpoints aren't mapped to anything and the headers start from the `headline` breakpoint.
* Replaces the `subheader` breakpoint with `subheader-2` and `subheader-1`. `subheader-2` correspond to the old `subheader`.
* Adds margins to the headers and paragraphs.
* Adds aliases that correspond exactly to the terminology from the spec.
Removes the overlay that gets added when tapping on something on a mobile Webkit browser. It is unnecessary in our case, because we render a ripple and we have an overlay that darkens focused buttons.
Removes an unnecessary `touchstart` listener on the button toggle. It was initially added to prevent it from capturing user events, however it's no longer necessary, because we have `pointer-events: none` on the element. This also fixes a warning that is being logged by Chrome.
Fixes#4221.
* Recently Angular core fixed their `noUnusedParameters` warnings in https://github.com/angular/angular/issues/15532
* When using Angular with Material and the users has `noUnusedParameters` enabled the library will be checked and will throw.
Fixes#4443
* fix(checkbox): margin for empty checkboxes incorrectly added
With #2121 the margin will be removed for checkboxes that don't have any label set.
A problem is that the Checkbox uses the OnPush change detection strategy and therefore the checkbox is not able to detect any delayed / async label change.
This means that checkboxes that set their label from an async binding will not have any margin until the users clicks on the checkbox.
Using the `cdkObserveContent` seems to be an elegant approach when using the OnPush strategy.
The `:empty` CSS selector would be more elegant but it's very sensitive about whitespaces and therefore it doesn't work properly.
Fixes#4720
* Updates
* With the typography the slide-toggle was switched accidentally from a font-weight of 500 to a font-weight of 400.
* The slide-toggle label should not be treated as a button because it's basically a normal body text.
* fix(autocopmplete): regex metacharacter escape
autocomplete material example fails if regex metacharacter (ie *) is provided. Fixed by adding escapeSpecChars function
* Update autocomplete-overview-example.ts
* fix(autocopmplete): regex replaced with includes
* Extra newline removed
* Update autocomplete-overview-example.ts
* feat(select): add md-optgroup component
Adds the `md-optgroup` component, which can be used to group options inside of `md-select`, in a similar way to the native `optgroup`.
Fixes#3182.
* fix: address feedback
* fix: address feedback
* Exposes the disableClose option via the `MdDialogRef` and allows for it to be updated.
* Makes the `containerInstance` private to `MdDialogRef` since it doesn't make sense for it to be public anymore.
* Completes the `backdropClick` observable once the associated `overlayRef` is destroyed. This avoids having to unsubscribe manually or having to use `Observable.first`.
Fixes#3938.
The automatic application of aria-label for md-icon, in hindsight, was
not a great idea. Neither the ligature string nor the SVG filename are
likely to be meaningful descriptions. Even in cases where they *are*,
the icon may be used in such a way that the application of a label is
still the wrong thing. On top of that, adding `role="img"` is usually
not the right approach for an icon, as that role typically refers to
*content* images, rather than icons that are part of the UI.
Ultimately, it is up to the application developer to add the appropriate
meaning for icons based on how they're used. To this end, we add
guidance to the documentation for what to do in different situations.
* refactor(button): use color binding for fab button color
* No longer creates extra CSS selectors to set the default color for round buttons to `accent`.
* Server-side rendering improvements
* Use forwardRef for constructor DI
* Fixes the select panel in multiple mode not overlapping the trigger completely.
* Reformats the select.html to make it a little more manageable.
Fixes#4943.
* refactor: replace color getters and setters with mixin
* Replaces the color getters and setters with a Mixin function (similar as for the disabled property)
* This should reduce payload and also should make it way easier to maintain the color functionality.
* Address comments
* Updates
* Emits the `attachments` when everything has been attached.
* Emits the `detachments` when everything has been detached.
* Completes the `attachments` observable before the `detachments`.
Fixes#4871.
In dark themes the dialog container will have a dark background and the text should therefore have a light text color.
Currently the text color is still dark on a dark background which causes the dialog to look bad in dark themes.
* Fixes IE always adding a scrollbar to Material textareas, even if they don't overflow.
* Removes a double theme toggle from the demo app. It was probably the result of a bad merge.
Recently the Universal App has been added to the repository. The universal-app contains a script that runs inside of Node and therefore uses Node APIs.
The global tsconfig file that is used to provide proper autocompletion in IDEs includes every TS file inside of `src/` and therefore the `prerender.ts` file is also included.
This is problematic because now the NodeJS @types are being loaded as well and ambiguous imports appear in editors. Causing for example `setTimeout` calls to return a `Timer` instead of a number (error in your IDEs)
Fixes the tooltip not being rendered in IE and Edge, if there is no web animations polyfill. When we don't animate the element, for some reason IE and Edge decide not to lay it out at all. We force the element to be shown by using the `zoom: 1` hack.
Fixes#4935.
* The autosize directive now sets the rows property of the textarea to one by default.
* This is necessary because browsers by default set the rows property to two and therefore setting the minRows and maxRows binding to something below two doesn't work.
Fixes#4852
* fix(focus-trap): focus initial element when zone stabilizes
* Focuses the first element when the zone stabilizes, instead of when the microtask queue is empty. This avoids issues where the element might be focused before Angular is done doing change detection.
* Only runs the `onStable` callback if the zone is unstable.
* Avoids an extra DOM lookup by combining a couple of selectors.
Fixes#4864.
* chore: switch to for loop
* feat(overlay): more flexible scroll strategy API and ability to define/override custom strategies
* Refactors the overlay setup to allow for scroll strategies to be passed in by name, instead of by instance.
* Handles the scroll strategy dependency injection automatically.
* Adds an API for registering custom scroll strategies and overriding the existing ones.
* Adds a second parameter to the `attach` method, allowing for a config object to be passed in.
* Throws an error if there's an attempt to attach a scroll strategy multiple times. This is mostly a sanity check to ensure that we don't cache the scroll strategy instances.
Relates to #4093.
* refactor: switch to new approach without ReflectiveInjector
* refactor: switch to better approach
* refactor: switch to even simpler approach
* chore: address feedback
Adds a more informative error if the user tries to open an autocomplete that doesn't exist or hasn't been defined yet by the `@ViewChild` query.
Fixes#4844.