Currently we normalize any values that aren't `ltr` or `rtl` to `ltr` in order to have a predictable value when using the directionality in components, however this ends up overwriting the consumer's value which might not necessarily be used by Angular (e.g. setting it to `auto`). These changes switch to preserving the attribute while normalizing the value for when it gets injected.
Fixes#13855.
Currently if the consumer sets the `cdkFocusInitial` group on a non-focusable element, nothing will happen. These changes add a warning if the app is running in dev mode.
Relates to #13953.
Adds the `dateClass` function which allows consumers to apply custom CSS classes to specific dates. This is useful for highlighting specific dates like a holiday.
Fixes#13943.
Fixes the button toggle host element not being able to receive focus which means that it can't be used with the focus trap directives. Also fixes that when it does receive focus, it won't forward it to the underlying `button` element.
Currently the `mat-slide-toggle` doesn't redirect focus to the underlying `input` element. This means that things like the focus trap's `cdkFocusInitial` won't work when they're set on the toggle host. These changes add a `tabindex` and set up a `focus` listener to forward focus to the input.
Relates to #13953.
Something I noticed while putting together an example for the `enterPredicate` a while ago. Currently we allow an item to be returned to its initial container, even if the initial container isn't connected to the new one, however we don't do the same for the `enterPredicate`. This means that the user can get into the situation where they drag an item out, but then they're not allowed to return it, which seems weird. These changes will ignore the `enterPredicate`, if an item is being returned to the initial container.
If the `ScrollDispatcher.register` method is called twice in a row, the consumer will end up with a subscription that can't be cleaned up. These changes add an extra check to prevent the same scrollable from being re-registered.
We initialize the `rootElement` in an `NgZone.onStable` callback, however if the zone doesn't stabilize before the `cdkDrag` is destroyed, we'll throw an error because there is no `rootElement`. These changes add an extra check to ensure that we don't throw.
Even though we're using `yarn` for everything, it's still easy to fall into the old habit of running `npm i` which could mess up the `node_modules` and generate a new lock file. These changes add a script that throws an error when trying to `npm install`, similar to angular/angular.
* Since we going to move from Travis to CircleCI we don't want to use the dashboard anymore. Since nobody has been
looking at the dashboard frequently, it just makes things more complicated and additionally we will be using
the Github robot in order to keep track of size changes.
This reverts commit 235add9401.
This change broke an app inside of Google where tabs appear inside of a
dialog. The tabs get stuck in a weird frozen animation state.
This reverts commit 28e3d3641b.
This change caused a problem in at least one Google app where tabs
inside of a dialog would end up in some kind of frozen animation state
and not rendering.
* In case someone uses both Gulp and Bazel to build Angular Material, there will be an error because our gulp process generates the `example-module` as an actual source file. This is problematic because the `genrule` cannot have the `example-module` as an `input` and an `output` at the same time.
Sets up ripples for the items inside an action list and makes it a little easier to set ripples up in the future, if we add other list types.
Fixes#13795.
Currently the enter animations for the Material dialog, CDK dialog and bottom sheet are set up to be blocking, which means that any components with an initial animation inside them will be blocked until they're done. These changes allow for the child animations to run in parallel.
Fixes#13870.
Fixes all the animation-related events from the tab body being fired twice. Since a lot of the tabs functionality is tied to animations, this could cause multiple consecutive style recalculations, in addition to the `animationDone` event being fired too many times.
Negates the `:hover` state on touch devices, in order to prevent it from lingering after the user taps on a button toggle. Also fixes the native tap highlight showing up if the user taps on a disabled toggle group.
Currently if we have a `cdkDrag` nested inside another `cdkDrag`, the user can start dragging both of the items at the same time if they starting dragging from the appropriate area. These change stop event propagation so only one drag sequence can be started from a certain area at a time.
Currently the `CdkDropList` makes some assumptions about the items not having a margin between each other. It also won't lay out and animate items with varying heights, in some cases. The following changes rework the directive to allow it to handle both varying heights and different margins.
Fixes#13483.
Currently we always have a `role` of `alert` on the snack bar container which has an implicit politeness of `assertive` and which can override the message announced by the live announcer. These changes set the role to `status` if it's set to `polite` or remove the role completely if the politeness is turned off.
Fixes#13493.
Currently when detaching a view, we check whether it would fit in the cache, and if it doesn't, we destroy it. Since we destroy the view on it's own, the `ViewContainerRef` still has a reference to it, which means that we'll trigger change detection on it the next time the data changes. These changes switch to destroying the view through the view container.
Fixes#13901.
* Due to the fact that we try to run `git config --global` before
CircleCI set up the global Git configuration, the publish task is still
broken. This _should_ fix it.
* Running `ng update` doesn't necessarily mean that the `typescript` version is updated automatically. Therefore we need to avoid using the `isStringLiteralLike` method which has been added in `2.8`. Note that this does not mean that we cannot _compile_ with a higher TypeScript version.. we should just ensure that _at runtime_, imports from `typescript` are working for TypeScript@2.x.x
* Currently the `ng update` could potentially fail if the version of `@schematics/angular` is outdated on the given project. We should avoid to depend on `@schematics/angular` for the `ng-update` schematic.
* No longer fails if the workspace configuration could not be found. It's very uncommon that someone tries to update a CLI project that still uses `.angular-cli.json` because:
1) The CLI version for the project doesn't support `ng update` with custom downstream migrations
2) In case the developer runs a different CLI version for _that_ outdated project, the CLI technically does run for an invalid project.
Even though, this is a rare case, it doesn't hurt not throwing if the workspace configuration couldn't be found when running `ng update`.
Since we have the ability to only build specific parts of Material with Bazel, the `material-moment-adapter` should just depend on it's *actual* dependencies and not on the _whole set_ of Material entry-points.
Since we hide overflow for stroked buttons in order to properly handle the `border-radius` for the child ripple container and focus overlay, badges which are applied on the button will be clipped.
In order to fix this bug, we just remove the `overflow: hidden` and go back to the initial implemenation where the border radius is inherited for the child elements. Just to keep https://github.com/angular/material2/issues/13738 resolved, we ensure that the child elements fully cover the actual button element for the _correct_ border radius.
Fixes#13909