Commit Graph

4796 Commits

Author SHA1 Message Date
Paul Gschwendtner af7a3d4c4b fix(bazel): theming bundle not exposed as sass_library (#14071)
* Expose the theming bundle as a `sass_library` that can be used to generate a custom theme with Bazel.
2018-11-09 16:12:18 -08:00
Justin Tappert 10cb578f22 Docs: Simple grammatical error fix (#14073)
docs (autocomplete.md): simple grammatical error fix

Change 'an' to 'a' before `mat-option` because how it is currently is passive voice misuse.
2018-11-09 16:11:35 -08:00
Kristiyan Kostadinov 06fb4087bc build: example list outputting quoted components (#13955)
In c64503e0bf the logic that outputs the list of components was reworked to use `JSON.stringify`. As a result, the data that is generated has the `component` inside quotes, rather than a reference to the component class itself. This breaks the demo app. The following changes add some extra logic to remove the quotes around the `component`.
2018-11-09 16:09:56 -08:00
Joey Perrott ae5b10f9d8 fix(stepper): fix text contrast ratio of stepper labels (#14012) 2018-11-09 16:08:33 -08:00
Kristiyan Kostadinov 6136ee7209 feat(experimental/dialog): add the ability to control the animation duration (#13694)
For keeping parity with the Material dialog (#13466), adds the ability for consumers to configure the animation duration of the dialog.
2018-11-09 16:07:29 -08:00
Kristiyan Kostadinov 5851c915c6 fix(button-toggle): svg icon not align inside toggle (#13839)
Fixes the `svg` node inside the icon being shifted down inside a button toggle.

Fixes #13726.
2018-11-09 16:06:27 -08:00
Paul Gschwendtner 41bb296995 build: remove @angular/upgrade from dev dependencies (#14068)
* Removes `@angular/upgrade` from the dev dependencies.
2018-11-09 11:16:15 -08:00
Paul Gschwendtner 3e7ae68c52 build: no longer use travis-ci (#14064) 2018-11-09 11:15:27 -08:00
Kristiyan Kostadinov 4a1c8ed5f9 feat(live-announcer): add ability to clear live element (#11996)
Currently when we announce a message, we leave the element in place, however this can cause the element to be read out again when the user continues navigating using the arrow keys. These changes add an API where the consumer can clear the element manually or after a duration. Doing this automatically is tricky, because we'd have to make a lot of assumptions that might not be correct in all cases or may break some screen readers. These are some alternatives that were considered:

* Removing the element from the a11y tree via `aria-hidden` after the screen reader has started announcing it. This works, but because of the politeness, we can't know exactly when the screen reader will announce the text, which could end up hiding it too early.
* Clearing the element on the next `keydown`/`click`/`focus`. This could be flaky and might end up interrupting the screen reader when it doesn't have to (e.g. clicking on a non-focusable element).
* Moving the element to a different place in the DOM (e.g. prepending it to the `body` instead of appending). This works, but we'd have to keep moving the element based on the focus direction.

Fixes #11991.
2018-11-09 10:19:59 -08:00
Kristiyan Kostadinov ba31c7207a refactor(drag-drop): expose method for resetting the drag position (#13673)
Exposes an API that allows people to reset the position of a `cdkDrag`.

Fixes #13661.
2018-11-08 10:09:05 -08:00
Paul Gschwendtner 95a1abe1ac build: update to angular 7.0.3 (#14034)
* Updates our Bazel build as well us the Gulp build to Angular 7.0.3.
2018-11-08 10:05:50 -08:00
Paul Gschwendtner b104e75bea fix(button): ripple color not correct for standard, icon and stroked buttons (#13235)
With https://github.com/angular/material2/commit/c3a8d0cab118cadf647954f610cb54df5cac6bf0, we already ensured that the text color is **inherited** in order to make sure that buttons without a background color are readable on various themed backgrounds (e.g. themed toolbars)

This is a follow-up that ensures that the ripple color for such transparent buttons is contrasting to the background color (e.g. in themed toolbars).

Fixes #13232
2018-11-08 10:05:06 -08:00
Paul Gschwendtner caf65e560d fix(checkbox): no focus indicator in high contrast (#13255)
* Fixes that the checkbox does not have a focus indicator in high-contrast. Similarly to native checkboxes, the Material checkbox should have a dotted border/outline on keyboard focus.

Fixes #13227
2018-11-08 10:03:43 -08:00
Kristiyan Kostadinov a150494202 fix(a11y): aria-live directive announcing the same text multiple times (#13467)
The `CdkAriaLive` directive uses a `MutationObserver` to monitor for DOM content changes and to announce them through the `LiveAnnouncer`. Since the `MutationObserver` also fires for things like attribute changes, the same text can be announced more than once. This is visible on the calendar where the same text is announced twice when changing views.
2018-11-08 10:00:43 -08:00
Kristiyan Kostadinov 1ef16ac78a fix(a11y): key manager preventing arrow key events with modifier keys (#13503)
* Skips handling arrow key events that have a modifier key. Previously we would prevent the default action which can get in the way of some of the native keyboard shortcuts (e.g. marking all of the text using shift + up arrow). This has come up before in #11987, however these changes expand it to the key manager.
* Adds an API that allows consumers to opt into having the key manager handle some modifier keys. This is an exception for some of our components where we have custom functionality for shift + arrow key.
* Fixes the `metaKey` always being set to true on our fake keyboard events.

Fixes #13496.
2018-11-08 09:59:59 -08:00
Kristiyan Kostadinov cd6da938ae fix(drag-drop): prevent mouse wheel scrolling while dragging (#13524)
Prevents users from scrolling using the mouse wheel while an item is being dragged. This is a temporary measure until we have a solution to auto-scrolling while dragging, as well as to avoid having to measure the page for every pixel that the user has dragged.

Fixes #13508.
2018-11-08 09:59:14 -08:00
Kristiyan Kostadinov d0f4e7b220 fix(a11y): avoid overlapping or left over timers in live announcer (#13602)
* Avoids timers overlapping in the `LiveAnnouncer`, which can happen if a new message is announced within 100ms of the previous one. This can be an issue if the screen reader started reading out the previous message and then gets interrupted by the new one.
* Avoids leftover timers if the service is destroyed.
* Fixes the reference to the `_liveElement` not being cleared after it's removed from the DOM, potentially leaving it in memory.
2018-11-08 09:58:16 -08:00
Kristiyan Kostadinov 8b2dc82592 fix(drag-drop): avoid disrupting drag sequence if event propagation is stopped (#13841)
Since we only listen for events at the `document` level, the dragging sequence can get broken if the consumer stopped event propagation somewhere along the DOM tree. These changes switch to using event capturing in order to ensure that all the correct events fire.
2018-11-07 16:06:45 -08:00
Joey Perrott 1e4ee0c00f feat(tabs): make the updatePagination method public (#13935) 2018-11-07 16:03:20 -08:00
Paul Gschwendtner f6bfcffbb1 build: enable size plugin from angular robot (#14025)
* build: enable size plugin from angular robot

* Improve comment
2018-11-07 13:58:39 -08:00
Andrew Scott 4ee66364eb fix(drag-drop): enable drag interactions when there is a drag handle (#13780)
If there is a drag handle, do not disable native drag events on the cdkDrag
element.

Fixes #13779.
2018-11-07 11:27:19 -08:00
Kristiyan Kostadinov f895622d99 docs: expand example that removes value accessor provider (#13860)
In the form field guide, we instruct people to remove the `NG_VALUE_ACCESSOR` provider and replace it with injecting the `NgControl`, however it's not very explicit and is easy to miss. These changes expand the example a bit in an effort to make it harder to miss.

Fixes #8158.
2018-11-07 11:06:51 -08:00
Kristiyan Kostadinov ce500dc09d docs(drag-drop): add docs and live example for enter predicate (#13917)
Since we don't have much info on the `cdkDropListEnterPredicate`, these changes add a section about it in the docs, as well as a live example.
2018-11-07 11:05:57 -08:00
Anthony Drogon bcc540c291 docs(table component): Fix section ordering (#13947)
In the "Overview" tab of the `mat-table` directive, the "Selection" feature documentation is currently split over the "Footer row" one.
This fixes it.
2018-11-07 11:03:25 -08:00
Kristiyan Kostadinov 78998638d3 feat(keycodes): add utilities for checking modifier keys (#13933)
Based off of the conversation in #13790, these changes add some utilities for dealing with modifier keys on keyboard events.
2018-11-07 10:40:09 -08:00
Kristiyan Kostadinov 31bffb38fe fix(datepicker): unable to disable ripple on datepicker toggle (#13997)
Allows for the ripple on the datepicker toggle to be disabled.

Fixes #13986.
2018-11-07 10:39:20 -08:00
Kristiyan Kostadinov d94d17614c fix(bidi): preserve user dir attribute (#13859)
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.
2018-11-07 10:26:08 -08:00
Kristiyan Kostadinov 4ce5ee0a6c fix(icon): account for query params when prefixing external references (#13930)
Fixes `mat-icon` ignoring query params when prefixing external references inside the SVG.

Fixes #13924.
2018-11-07 10:25:22 -08:00
Kristiyan Kostadinov 2290063ec8 fix(progress-bar): account for query params when prefixing references (#13942)
Fixes the progress bar not accounting for URL query params when it prefixes its SVG references.

Related to #13930.
2018-11-07 10:24:31 -08:00
Kristiyan Kostadinov 27347b58b4 fix(focus-trap): warn if initial element is not focusable (#13960)
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.
2018-11-07 10:23:35 -08:00
Kristiyan Kostadinov 4be1b06edd feat(datepicker): allow custom classes to be applied to individual dates (#13971)
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.
2018-11-07 10:22:43 -08:00
Joey Perrott 69ffd3306e fix(snackbar): set aria role based on if announcement message is provided (#13993) 2018-11-07 10:21:41 -08:00
Kristiyan Kostadinov 81f8fb9582 fix(button-toggle): not forwarding focus to underlying control (#14001)
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.
2018-11-07 10:20:26 -08:00
Kristiyan Kostadinov ec4809ff1b fix(slide-toggle): redirect focus to underlying input element (#13957)
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.
2018-11-07 10:19:07 -08:00
Kristiyan Kostadinov fa944b7fe4 fix(drag-drop): ignore enter predicate when returning item to its initial container (#13972)
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.
2018-11-07 10:11:18 -08:00
Kristiyan Kostadinov 20f89245f4 fix(scrolling): leaking subscription if same element is registered multiple times (#13974)
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.
2018-11-07 10:10:35 -08:00
Kristiyan Kostadinov 6fe84f317e fix(drag-drop): error if drag item is destroyed zone has stabilized (#13978)
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.
2018-11-07 10:10:05 -08:00
Pascal Zwick 6c0fd37a29 docs(drag-drop): Fix wrong class name (#14018) 2018-11-07 10:07:44 -08:00
Kristiyan Kostadinov 4d5625bf21 build: add check when running npm install (#14021)
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.
2018-11-07 10:05:09 -08:00
Paul Gschwendtner a02e6c64f1 build: remove dashboard (#14023)
* 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.
2018-11-07 10:04:16 -08:00
Jeremy Elbourn d50b9f28c1 Revert "fix(dialog,bottom-sheet): enter animation blocking child animations (#13888)" (#14017)
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.
2018-11-06 17:10:09 -08:00
Jeremy Elbourn 4508fa116e Revert "Revert "fix(tabs): duplicate animation events on some browsers (#13674)" (#14015)" (#14016)
This reverts commit 11c96d65a1.

Turns out the original change wasn't actually the problem. It was #13888
instead.
2018-11-06 17:07:21 -08:00
Jeremy Elbourn 11c96d65a1 Revert "fix(tabs): duplicate animation events on some browsers (#13674)" (#14015)
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.
2018-11-06 16:16:59 -08:00
Sunny Liu 8c464780ea chore(radio): fix typo in test name (#14000) 2018-11-06 09:50:56 -08:00
Jeremy Elbourn 6c741c4363 fix(chips): remove circular dependency between chip-list and chip-input (#13994)
This change is necessary because some Google-internal infrastructure has
started encountering errors because of this particular circular dep.
2018-11-05 13:32:28 -08:00
Kristiyan Kostadinov 12c15ba999 fix(drag-drop): drop list not toggling dragging class inside component with OnPush change detection (#13703)
Fixes the `CdkDropList` not toggling its `cdk-drop-list-dragging` class if it's placed inside a component with `OnPush` change detection.

Fixes #13680.
2018-11-05 13:16:05 -08:00
Joey Perrott d0d97c3e37 fix: reference symbols for example components rather than providing a string of the component name (#13992) 2018-11-05 11:01:41 -08:00
Paul Gschwendtner b662bfa94e build: do not throw if example module is created through gulp (#13966)
* 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.
2018-11-05 10:23:15 -08:00
Paul Gschwendtner 057909de15 build: update bazel sass_rules (#13963)
* Updates to the new API of the Sass rules (https://github.com/bazelbuild/rules_sass/commit/8b61ad6953fde55031658e1731c335220f881369).
* This finally means that the thousand of source-map warnings from the sass_rules are gone.
2018-11-05 10:19:41 -08:00
Kristiyan Kostadinov 76044e8b5c fix(list): add ripples to action list items (#13799)
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.
2018-11-02 17:28:09 -07:00