Commit Graph

5268 Commits

Author SHA1 Message Date
Kristiyan Kostadinov fbae483cae chore: disable vscode autoformat settings (#15406) 2019-03-07 07:01:17 -08:00
Jeremy Elbourn 5fb022f2b3 chore: update master to angular version 8 beta (#15392)
This allows us to cherry-pick @kara's static query updates from the
`ivy-2019` branch.

This change includes:
* Adding missing dependencies for various Angular subpackages
* Add umd assets where they are now necessary
* Configure bazel to target ES5 output as a workaround for https://github.com/angular/angular/issues/29107
* Updates most npm dependencies to the @npm// workspace
* Updates general workspace setup, RBE config, ngcontainer
* Update to rxjs 6.4.0 (building from source no longer needed)
* Added rxjs_shims for ts_web_test and ts_devserver targets
* Removed index.bzl and angular_material_setup_workspace (not needed anymore since material won't be built from source)
* Use browser_repositories() from @npm_bazel_karma which have pinned browsers that work on all platforms
* Change dgeni processor functions from arrow function to `function` to
work around `@npm//di` not supporting arrow functions

Co-authored-by: Greg Magolan <gmagolan@gmail.com>
2019-03-06 15:16:47 -08:00
Kristiyan Kostadinov 4704653cad feat(drag-drop): add the ability to customize how the position is constrained (#15137) 2019-03-06 09:58:54 -08:00
Kristiyan Kostadinov 9d60a5da4c fix(sort): remove arrow when sort header is disabled (#15212)
Doesn't render the arrow for a disabled header, unless it is the active one. This prevents it from taking up space when it won't be used.

Fixes #14986.
2019-03-06 09:45:44 -08:00
mmalerba d232d7c590 chore: add vscode settings to format on save w/ correct settings (#15389) 2019-03-05 13:37:55 -08:00
Kristiyan Kostadinov 28b33aab42 build: fix missing badge dependency (#15390) 2019-03-05 13:36:20 -08:00
Kristiyan Kostadinov 76c2a3cea4 fix(radio): only show focus ripple for keyboard focus (#13565)
After the switch to the latest Material Design spec, we started showing the focus ripple for all kinds of focus, however it's only supposed to be for keyboard focus.

Fixes #13544.
2019-03-05 12:25:20 -08:00
Kristiyan Kostadinov f4a59f0349 refactor(stepper): remove dependency on @angular/forms (#15134)
While looking at #15085, I noticed that the only place in the CDK where we use `@angular/forms` is to type an optional input in the stepper. These changes replace the typing with a partial representation of the `AbstractControl` so that we can drop the dependency.
2019-03-05 11:44:36 -08:00
Kristiyan Kostadinov 9a771648f6 fix(stepper): unable to tab to step content (#14892)
Along the same line as #14808. Fixes not being able to reach the content of a step if it doesn't have focusable content already. Based on the [tabs example from the accessibility guidelines](https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-2/tabs.html).
2019-03-05 11:29:57 -08:00
Andrew Seguin 679bdb6601 fix(calendar): should markForCheck when properties are changed (#15102)
* fix(calendar): should markForCheck when properties are changed

* fix test
2019-03-05 09:23:14 -08:00
Kristiyan Kostadinov 4614fb8e52 fix(badge): disable animations when using NoopAnimationsModule (#11408) 2019-03-05 09:09:27 -08:00
Kristiyan Kostadinov ce632b04df fix(radio): unable to distinguish disabled radio button in high contrast mode (#15375)
Fixes not being to tell apart an enabled and a disabled radio button in high contrast mode.
2019-03-05 08:47:19 -08:00
Kristiyan Kostadinov 1f7ce05e2d chore(select): fix api golden failure (#15384)
Fixes a failure in the API golden files that made it into master.
2019-03-05 08:30:47 -08:00
Kristiyan Kostadinov 63cec8f8d6 fix(form-field): infinite loop with zone-patch-rxjs (#15335)
Fixes the form field being thrown into an infinite loop when `zone-patch-rxjs` is included in the page.

Fixes #15331.
2019-03-05 07:49:06 -08:00
Esteban Marin bc6b5fb3c4 fix(select): Fixes width-issue of select option panel in IE (#11801)
* fix(select): Fixes width-issue of select option panel in IE11

Fixes the select options panel width not matching the select width in IE11

Fixes #11609

* code cleanup

* fix leave-animation of select panel not working due to https://github.com/angular/angular/issues/23302
2019-03-05 07:48:51 -08:00
Kristiyan Kostadinov 1c503ff705 fix(datepicker): toggle throwing an error if datepicker is not defined on init (#15256)
Fixes the `mat-datepicker-toggle` throwing an error if the `datepicker` undefined on init. We already have guards for this in all of the other cases, but it was missing in this one.
2019-03-05 07:04:20 -08:00
Kristiyan Kostadinov 4ff1c95ae7 fix(scrolling): virtual scroll viewport error during server-side rendering (#15299)
Fixes the virtual scroll viewport throwing an error during server-side rendering, because it relies on a scheduler that uses `requestAnimationFrame`.

Fixes #15291.
2019-03-05 07:04:05 -08:00
Kristiyan Kostadinov 3607677939 fix(form-field): allow user to click through arrow on native select (#15328)
Currently the user's click could be blocked by clicking on the arrow directly. These changes allow the user to click through it.

Fixes #15318.
2019-03-05 07:03:31 -08:00
swseverance 14b4581036 refactor(selection-list): avoid deprecated method (#15371)
* use `ListKeyManager`'s `updateActiveItem` instead of deprecated
  `updateActiveItemIndex`
2019-03-05 07:03:11 -08:00
Thomas e130c5c27c Fix typo in datepicker example (#15327) 2019-03-04 14:08:12 -08:00
Kristiyan Kostadinov 3f8d02c2d6 fix(list): action list missing focus and hover styling (#14147)
Since the action list is interactive, it needs styles when it's hovered and focused.
2019-03-04 13:28:43 -08:00
Kara 2470a4249e fix(virtual-scroll): move views that are already attached instead of inserting (#15348) 2019-03-04 11:20:07 -08:00
Kristiyan Kostadinov b00790a881 build: anchors not working correctly in markdown (#15379)
Fixes anchor links being rewritten to `/guides` in the docs.

Fixes #15377.
2019-03-04 11:17:31 -08:00
swseverance 4f64b52fd7 docs: adjust element spacing within examples (#15369)
* Adjusts the amount of spacing between crowded UI elements in the following
  examples: button-toggle-appearance, datepicker-api, datepicker-color,
  datepicker-locale, datepicker-value, expansion-steps, focus-monitor-directives,
  focus-monitor-focus-via, focus-monitor-overview, form-field-label, input-form,
  paginator-configurable, sidenav-backdrop, snack-bar-overview, snack-bar-position,
  text-field-autofill-directive, text-field-autofill-monitor, text-field-autosize-textarea
2019-03-04 11:16:57 -08:00
Andrew Seguin db4490787b docs(chips): remove comment regarding disabled style (#15360)
The docs incorrectly say that disabled chips do not receive special styling, but they are in fact more transparent when disabled
2019-03-04 11:14:52 -08:00
swseverance 0747228bf9 test(list-key-manager): fix test description (#15352) 2019-03-04 11:13:54 -08:00
Kristiyan Kostadinov 4dab2f690e test(expansion): rework tests that depend on static queries (#15333)
Fixes some tests that fail under Ivy, because they depend on static queries.
2019-03-04 11:12:13 -08:00
J. G. Sebring 4cffc202a0 fix: correct example title (#15325) 2019-03-04 11:02:30 -08:00
Paul Gschwendtner da8987b6fd fix(schematics): incorrectly throws if NgModule uses namespaced decorator (#15298)
Currently if the developer defines the primary app `NgModule` using a namespaced
import (e.g. "@ngCore.NgModule`), the Material schematics will incorrectly not detect
that module as the logic that resolves the decorator name of a class declaration
is flawed.

This is because it incorrectly traverses a `PropertyAccessExpression`, while the
accessed property name is exposed at the root level `PropertyAccessExpression`.

This commit fixes this and also adds additional unit tests for the `hasNgModuleImport`
utility function. (We have integration tests for this; but we don't test that special case)
2019-03-04 10:58:47 -08:00
Jeremy Elbourn ae41a0ad69 chore: don't run CI on the ivy-2019 branch (#15302) 2019-02-26 17:08:37 -08:00
Jeremy Elbourn 740a2eeaa9 test(slide-toggle): adding missing detectChanges() and tick() (#15309)
This makes a test pass both with ivy and ViewEngine
2019-02-26 08:58:43 -08:00
Jeremy Elbourn 53b01bcab2 test(grid-list): make error expectation less brittle (#15303)
This makes the test pass in ivy (as well as ViewEngine) since attribute
bindings are set during creating mode in ivy.
2019-02-25 13:55:55 -08:00
Suresh918 6f3c2de801 docs(form-field): add aria-labels to form examples (#15130)
Fixes #15024
2019-02-25 08:54:25 -08:00
Suresh918 2a086ce475 docs(form-field): improve a11y of password visibility toggle (#15129)
Fixes #15023
2019-02-22 10:34:29 -08:00
Suresh918 484a96cb4c docs(icon): add aria-labels to examples (#15145)
Fixes #15013
2019-02-22 10:32:54 -08:00
Suresh918 edb783517f docs(menu): add aria-label to example (#15146)
Fixes #15039
2019-02-22 10:31:36 -08:00
swseverance 83135e1c62 fix(examples): fix form-field-custom-control (#15147)
* Update `MyTelInput` to implement `ControlValueAccessor` interface
* Resolves #14810
2019-02-22 10:29:06 -08:00
Suresh918 0bf7ccbde8 docs(chips): add aria-labels to examples (#15167)
Fixes #15010
2019-02-22 10:28:03 -08:00
Kristiyan Kostadinov 1bc8bc4b91 fix(a11y): don't set aria description if it's the same as the node's aria-label (#15250)
As per a recent discussion, reworks the `AriaDescriber` not to set the `aria-describedby`, if the message will be exactly the same as an existing `aria-label` on the element. This avoids the same text being read out twice.

Fixes #15048.
2019-02-22 07:11:53 -08:00
Paul Gschwendtner 66d38fc596 feat(selection-list): support specifying theme color (#15237)
Currently the selection list always uses the `accent` color for the underlying
pseudo checkbox of list options. In order to make this configurable by the
user, we add a `color` input that matches our other usages of the `color`
input in order to be consistent.

Since we want to allow that a color can be specified for the `<mat-selection-list>` and
that it's possible to overwrite the color for an individual list option, we don't use the
color mixin as it brings in a lot of overhead and also doesn't make it easy to provide
the desired precedence for individual options. Also we **can't** set the color class
on the `<mat-selection-list>` as the pseudo checkbox will then ignore the color class
set for the individual list option.

Closes #15234
2019-02-22 07:11:32 -08:00
Paul Gschwendtner 48d17afc14 fix(slide-toggle): thumb animation not working on mobile (#15236)
With https://github.com/angular/material2/commit/cc8f871e8d3978cca95bffb3c0ab0d79961a8ddd, we enabled the `grabbing` cursor if the thumb container is pressed. This accidentally broke animation for the thumb sometimes because the `:active`
pseudo class is added on tap/touch and now accidentally sets the thumb transition duration to `0ms`. Rather we should only set the thumb transition duration to `0ms` if the user started dragging the thumb (with a small threshold)

Fixes #15232
2019-02-22 07:11:18 -08:00
Kristiyan Kostadinov 06735742ff fix(typography): move header letter spacing into typography config (#15210)
Currently the letter spacing for some of the headers is hardcoded in the styles themselves. These changes move it into the config so it can be overwritten.

Fixes #15197.
2019-02-22 07:11:02 -08:00
Kristiyan Kostadinov dfa40fc7fb feat(menu): allow focus restoration to be disabled (#15205)
Allows for focus restoration to be disabled in a menu, similarly to some other components. In some cases restoring focus automatically might not make sense (e.g. if the user closes the menu by selecting something which then opens a dialog) and this allows consumers to customize the behavior as needed.

Fixes #15168.
2019-02-22 07:10:49 -08:00
Kristiyan Kostadinov 413fe33c73 fix(autocomplete): remove old classes when classlist has changed (#15185)
Currently we have some logic that syncs the classes between the autocomplete host element and the panel, however this logic doesn't account for classes being removed.

Fixes #15179.
2019-02-22 07:10:34 -08:00
Kristiyan Kostadinov a115b3a0dc fix(select): error when navigating via keyboard to reset option on a closed select (#15160)
Fixes `mat-select` throwing an error when the user reaches a reset option using the arrow keys on a closed select. Seems to be due to a missing null check in the changes from #14540.

Fixes #15159.
2019-02-22 07:10:20 -08:00
Kristiyan Kostadinov b67837fab7 build: avoid 404 warnings in Karma tests (#15136)
Adds some logic to the Karma config in order to prevent 404s from being logged from some of the tests that need to reference images.

Fixes #15113.
2019-02-22 07:10:02 -08:00
Kristiyan Kostadinov 751fe8a0b3 fix(drag-drop): clear duplicate ids from descendants (#15135)
Fixes `CdkDrag` generating elements with duplicate ids, if one of its descendants has an id.

Fixes #15120.
2019-02-22 07:09:19 -08:00
Kristiyan Kostadinov f1e1528e8d fix(drag-drop): preview not being rendered inside fullscreen element (#15066)
Fixes the drag preview not being rendered when the user goes into fullscreen mode.

Fixes #15033.
2019-02-22 07:08:14 -08:00
Kristiyan Kostadinov 1aafdbe6d2 fix(drag-drop): disabled value not being synced to drop list ref (#15065)
Fixes the input value from the `CdkDropList` directive not being synced to the `DropListRef`.
2019-02-22 07:07:25 -08:00
Kristiyan Kostadinov 629460f1f9 feat(drag-drop): add the ability to disable sorting in a list (#15064)
Adds the ability to disable sorting inside of a `CdkDropList`. This allows for use cases where one list is considered the source and one or more connected lists are the destinations, and the user isn't supposed to sort the items within the source list.

Fixes #14838.
2019-02-22 07:07:04 -08:00