Commit Graph

3267 Commits

Author SHA1 Message Date
Paul Gschwendtner cf54802e44 chore: less warnings for docs generation (#9864)
* Hides the warnings about unresolved TypeScript symbols for the mixin base classes. Those warnings are not fixable and are polluting the Dgeni output.
* Adds missing `@deprecated` tags to entries that already have the  `@deletion-target` set.
* Updates to the latest version of dgeni-packages because https://github.com/angular/dgeni-packages/commit/3a4e5685589b99b85dfb88e8fd8dbf46aab24088 landed.
2018-02-09 14:19:05 -08:00
Paul Gschwendtner ca37a7ff28 refactor(native-date-adapter): remove hard-coded platform IE check (#9190)
* Removes the hard-coded platform check for IE in the NativeDateAdapter.
2018-02-09 14:18:34 -08:00
Louw Swart 3aceb7361c feat(expansion): add accordion expand/collapse all (#6929) (#7461)
Adds openAll()/closeAll() to perform expand/collapse all on multiple expandable accordions.

Closes #6929
2018-02-09 14:18:18 -08:00
Kristiyan Kostadinov 39936c6204 fix(selection-list): external changes to selection model not being reflected (#9846)
Fixes the selection list not reflecting external changes made to its `selectedOptions` model.

Fixes #9838.
2018-02-09 14:17:56 -08:00
Kristiyan Kostadinov 1b90318c18 chore: fix lint warnings (#9869)
Fixes a few lint warnings that got into master.
2018-02-09 12:59:36 -08:00
Paul Gschwendtner 591d1f28bb docs(ripple): mention terminateOnPointerUp option (#9825)
* Explains what the `terminateOnPointerUp` ripple option is doing, and how it can be specified.
2018-02-08 13:46:25 -08:00
Jeremy Elbourn 64ce0c4b96 docs(chips): remove outdated note about chips being in-progress. (#9818) 2018-02-08 13:45:33 -08:00
Austin 6feaf62585 feat(tabs): add ability to lazy load tab content (#8921)
* feat(tabs): add ability to lazy load tab content

* fix: lint

* chore: nit

* chore: pr feedback

* fix: presubmit error
2018-02-08 13:44:06 -08:00
Kristiyan Kostadinov 6a8ce02775 fix(overlay): validate that ConnectedPositionStrategy positions are passed in correctly at runtime (#9466)
Since we have some cases where we pass in positions verbatim to the connected position strategy (the connected position directive), we could end up in a situation where the consumer passed in a set of invalid positions that don't break necessarily, but don't work correctly either. These changes add some sanity checks at runtime to make debugging easier.
2018-02-08 13:43:44 -08:00
Kristiyan Kostadinov b68d38c51f refactor(select,autocomplete): consolidate logic for scrolling options into view (#9630)
Combines some duplicated logic for determining how to scroll an option into view into a single place so it's easier to maintain.
2018-02-08 13:43:16 -08:00
Kristiyan Kostadinov 3b48c0d1c3 refactor(tooltip): reuse OverlayRef and portal (#9637)
* Reworks the tooltip to reuse the `OverlayRef` after the first time it is opened, rather than destroying it and creating a new one for every subsequent open. This reduces the overhead from having the create the new overlays all the time.
* Changes the signature of the `ConnectedPositionStrategy.withScrollableContainers` method to return the position strategy. This is primarily for consistency with the other methods.
2018-02-08 13:42:35 -08:00
Paul Gschwendtner 46c809728d fix(datepicker): changed after checked error if focused datepicker inputs turn disabled (#9717)
In some situations, the `disable()` method of a form control is called while the datepicker input is focused. This causes a changed after checked error.

Normally, native input elements automatically blur if they turn disabled. This behavior is problematic, because it would mean that it triggers another change detection cycle, which then causes a changed after checked error if the input element was focused before.

Fixes #9559
2018-02-08 13:42:14 -08:00
Kyle Erf df0bfdcc7b feat(radio): add aria-describedby passthrough to radio button input (#9741)
Adds a simple "aria-describedby" input in the manner of "aria-labelledby."
The ability to set "aria-describedby" is essential for accessible radio buttons,
as the attribute allows further description of a radio button to be read
after mentioning the button's label and whether or not it is checked.
2018-02-08 13:41:59 -08:00
Kristiyan Kostadinov 171486ea54 fix(slider): unable to reset value by setting it back to undefined (#9768)
Fixes the slider value not being reset to zero if the consumer sets it to undefined.

Fixes #9740.
2018-02-08 13:41:42 -08:00
Kristiyan Kostadinov 0968c3a8e0 refactor(live-announcer): expose promise when announcing a message (#9812)
Since there's a timeout when announcing something through the `LiveAnnouncer.announce` method, it may be hard/prone to race conditions for the consumer to coordinate it with some other action. These changes expose a promise that will be resolved once the message has been added to the DOM.
2018-02-08 13:41:27 -08:00
Ed Morales 7fbdc0ddaa fix(overlay): dimension not updated after init (#8765) 2018-02-08 13:41:01 -08:00
Kristiyan Kostadinov 0d29360f09 fix(autocomplete): escape key inconsistency on IE (#9777)
Brings the autocomplete escape key behavior on IE in line with other browsers. Currently pressing escape on IE will cause it to revert the display value to the one it had on focus, however it won't dispatch any events and the model value will be out of sync. None of the other browsers (event Edge) have this behavior.
2018-02-08 13:40:29 -08:00
Kristiyan Kostadinov 04854fe605 fix(global-position-strategy): ignoring width and height from OverlayConfig (#9774)
* Switches to using the `width` and `height` from the `OverlayConfig`, rather than the properties on the `GlobalPositionStrategy`.
* Deprecates the `GlobalPositionStrategy.width` and `GlobalPositionStrategy.height` methods in favor of passing the dimensions through the config.
* Reworks the `GlobalPositionStrategy` testing setup to make it less prone to breaking if any of the `OverlayRef` internals change.

Fixes #9715.
2018-02-08 13:40:12 -08:00
Paul Gschwendtner a9e002a218 refactor: reposition ripple container dynamically (#9773)
Right now, the ripple container for the checkbox, radio and slide-toggle are positioned using SCSS calculations. This works fine, but limits people, who want to resize the inner container (e.g. smaller checkbox).

Since resizing the checkbox to be smaller is reasonable, because MDC and the specs seem to have smaller boxes (18x18), the ripple container position can be determined using a simple CSS `calc`.

References #9244. References #9210.
2018-02-08 13:39:43 -08:00
Kristiyan Kostadinov 6f680d5d9e fix(select): options inside option group not being rendered when wrapped with ng-container (#9769)
Fixes the `mat-option` instances inside of a `mat-optgroup` not being rendered if they are wrapped inside of a `ng-container`.

Fixes #9736.
2018-02-08 13:39:22 -08:00
Paul Gschwendtner e4dd5d77a3 update(radio, slide-toggle, checkbox): faster ripple enter animations (#9754)
* Updates the slide-toggle, radio and checkbox ripples to have a quicker enter animation. This aligns more with the behavior MDC provides, and also feels more appropriate (for focus indicators) and is also more aligned with the specs.
2018-02-08 13:38:55 -08:00
mmalerba e4bca633c5 chore: fix input demo import (#9807) 2018-02-06 11:14:02 -08:00
Austin 673d56e2fb feat(schematics): add initial schematics utils (#9451)
* feat(schematics): add initial schematics utils

* chore: nit

* chore: pr feedback

* chore: pr feedback

* chore: add code owner
2018-02-06 09:41:15 -08:00
Johan CHOUQUET 0b0f401ab2 Typo fix in portal.md (#9778)
A minor typo fix in portal.md
2018-02-06 09:38:47 -08:00
Kristiyan Kostadinov 053f0ba018 refactor(stepper): clean up testing setup (#9772)
Currently the stepper tests are structured into completely different suites for vertical and horizontal steppers where the common tests are pulled out into functions which are called in each suite. This makes it harder to navigate and debug, in addition to flooding the logs with unnecessary data if one of the tests fails. These changes combine the tests into one suite with a couple of sub-suites that cover only the functionality that is exclusive to particular stepper variant.
2018-02-06 09:38:26 -08:00
Kristiyan Kostadinov 5ea614d2f7 fix(slider): invisible in high contrast mode (#9792)
Fixes the slider not being visible if the user has high contrast mode turned on.
2018-02-06 09:37:09 -08:00
Paul Gschwendtner e65f007dbb fix(button): better accessibility for flat buttons in high-contrast (#9783)
* Improves the accessibility for `mat-flat-button` elements in high-contrast mode. Currently it's nearly impossible to figure out, whether it's a button or not.
2018-02-06 09:36:52 -08:00
Juliano d062ccb6ae fix(datepicker): add max/min filter to multi year and year views (#9727)
* add max/min filter to multi year and year views

* address @mmalerba's comments

* fix and tighten up logic

* possibility to have a null filter in month view
2018-02-06 09:35:30 -08:00
Juliano c2e108e0bf feat(datepicker): @Output for year and month selected in multiyear/year (#9678)
* feat(datepicker): @Output of year and month selected in multiyear/year
views

* address @mmalerba's comments

* address comments

* add types to some outputs

* fix wrong parameter type

* restore accidentally removed object

* example and docs text

* change emitted values to objects instead of just numbers

* change datepicker.md and switch back tslint configs

* fix nit

* Remove changes in demo app
2018-02-06 09:32:23 -08:00
Jeremy Elbourn eebfce4247 chore: add span around tab label content (#9765)
* chore: add span around tab label content

This is needed for some customization cases.

* Fix flex alignment issues
2018-02-06 09:31:37 -08:00
Kristiyan Kostadinov bbf62cdd6c feat: add bottom sheet component (#9764)
* Adds an initial implementation of the new `MatBottomSheet` service that allows users to display component-based or template-based bottom sheets.
* Sets up the various boilerplate and infrastructure necessary for a new component.

Note: this is an initial implementation that has the necessary functionality, styles and accessibility. More docs, examples and touch gestures will be added in a follow-up.
2018-02-06 09:31:11 -08:00
mmalerba 4a5287cd1c feat(form-field, chip): merge new form-field and chip features to master (#9762)
* feat(form-field): support for different spec variants (#9366)

* feat(form-field): implement hover state

[Based on the spec](https://material.io/guidelines/components/text-fields.html#text-fields-states) form fields should have a hover state where the underline gets darkened while the user is hovering and gets replaced by the theme color after the focus the input.

* branch css logic

* extract underline css into standard variant

* box variant underline

* box variant spacing

* add legacy variant

* fix select ellipsis

* move hover state changes out of legacy variant

* add variants section to input demo

* use filter/backface-visibility to address label jumpiness

* address comments

* fix box variant text fuzziness

* remove bluriness fixes that aren't needed anymore

* address comments

* remove the floatLabel=never option in the new variants

* variant --> appearance

* add tests for new label & placeholder behavior

* update demo to use mat-label

* fix bazel build

* feat(chips): Add chip avatar and chip trailing icon (#9557)

* feat(chips): Add chip avatar and chip trailing icon

* Removed MatBasicChip and MatStandardChip

* Add mat-chip-trailing-icon style to MatChipRemove and add examples in
demo

* fix(form-field): rename box to fill and tweak the styles a bit (#9636)

* make some tweaks to the box appearance

* rename 'box' appearance to 'fill'

* feat(form-field): add outline style (#9705)

* remove datepicker reliance on form-field's underlineRef

* add spacing and alignment rules for outline variant

* outline color & thickness

* style tweaks

* correctly position and size the gap

* address comments

* fix(form-field): correct prefix & suffix icons as well as select arrow for various form field appearances (#9743)

* feat(input): add utilities for custom styling and monitoring state of input autofill (#9719)

* add utility for monitoring input autofill

* add scss mixin for styling input autofill colors

* tests

* move everything from cdk to MatInputModule

* address comments

* add doc comments

* fix(form-field): fixes for outline appearance (#9759)

* use the `AutofillMonitor` in `MatInput`

* Make `updateOutlineGap` public so users can call it if needed

* feat(chips): add ripple to chips (#9761)

* fix(form-field, chips): fix tests & lint (#9767)

* undo change that caused darkened color for legacy form field

* fix change detection

* fix(chips): remove margin for chip list (#9793)

* add terminateOnPointerUp to ripple config
2018-02-06 09:30:43 -08:00
tinayuangao b2ad30b3f5 chore: bump version to 5.2.0 w/ changelog (#9791) 2018-02-05 11:42:52 -08:00
Tyler Berry c7201984d4 docs(portal): correct typo in "@docs-privatew" (#9744) 2018-02-02 16:09:26 -08:00
Kristiyan Kostadinov 28dbbd500c docs(autocomplete): add docs and example for autoActiveFirstOption (#9735)
Adds some documentation and a live example for the `MatAutocomplete.autoActiveFirstOption` property.
2018-02-02 16:07:41 -08:00
Paul Gschwendtner 4523ecd336 chore: add missing @deletion-target tags (#9734)
* chore: add missing @deletion-target tags

* Adds the missing @deletion-target tags

* Update deletion target versions
2018-02-02 16:07:31 -08:00
Andrew Seguin aa1cf5b9c8 docs(table): fix typo in addRowDef/removeRowDef (#9720) 2018-02-02 16:06:39 -08:00
Paul Gschwendtner 01f35ab1da build: prevent alpha/beta/rc publishing to latest tag (#9711)
* No longer allows publishing versions that include "beta" / "alpha" / "rc" to the "latest" tag on NPM. This safeguard can be still removed temporarily, if there is a real need to publish a beta in the latest tag.

Closes #9699.
2018-02-02 16:06:28 -08:00
Kristiyan Kostadinov 95ffe371b1 fix(autocomplete): panel not closing on IE when selecting an option with an empty string display value (#9506)
Fixes the autocomplete panel reopening on IE11 when the user selects an option whose display value is an empty string.

Fixes #9479.
2018-02-02 16:02:07 -08:00
Kristiyan Kostadinov e30852aa4c fix(overlay): OverlayKeyboardDispatcher not dispatching events when propagation is stopped (#9546)
Uses event capturing to ensure that we can dispatch events to the overlays even if bubbling was interrupted.
2018-02-01 14:18:49 -08:00
Andrew Seguin 085d8056ae feat(table): allow data input to be array, stream (#9489)
* feat(table): allow data input to be array, stream

* comments

* fix connect function

* fix connect function v2

* fix demo imports
2018-02-01 11:28:16 -08:00
Kristiyan Kostadinov 3acbf26131 fix(block-scroll-strategy): server-side rendering error (#9665)
Fixes a server-side rendering error in the `BlockScrollStrategy`, because it was referring to the global `document`.

Relates to #9066.
2018-02-01 11:27:24 -08:00
Kristiyan Kostadinov f75fa15fc1 fix(autocomplete): handle attaching autocomplete to a number input (#9672)
Fixes the value being typed inside an `input[type="number"]` getting assigned to the model as a string. Normally this is handled by the `NumberValueAccessor` from the forms module, however the autocomplete is its own value accessor and as such has to handle it on its own.

Fixes #9628.
2018-02-01 11:26:56 -08:00
Kristiyan Kostadinov 26b0635d1f fix(collections): clean up UniqueSelectionDispatcher listeners on destroy (#9673)
* Clears out all of the registered listeners in the `UniqueSelectionDispatcher` when the module is unloaded to avoid potential memory leaks due to references inside the listeners.
* Cleans up the unit test setup for the dispatcher to align it with the rest of the project.
2018-02-01 11:26:44 -08:00
Paul Gschwendtner efb03c9ec8 feat(ripple): support ripple fade-out on pointer up (#9694)
* feat(ripple): support ripple fade-out on pointer up

By default, ripples in Angular Material will only fade out if the pointer is released and the enter animation completed. This behavior is similar in the MDC implementation of the Material Design guidelines.

In some scenarios, developers prefer fading out the ripples immediately on pointer release. Similarly the Material Design guidelines also have some videos that show ripples that seem to follow that behavior as well. To be able to provide the necessary flexibility (as we already did with the animation durations), the `terminateOnPointerUp` global option has been added.

Closes #9577

* Comment improvements

* Remove unnecessary whitespace
2018-02-01 11:26:26 -08:00
Kristiyan Kostadinov acbf3c8ec0 fix(dialog): server-side rendering error when attempting to trap focus (#9698)
Fixes an error that is being thrown when trying to open a dialog on the server. Also adds a dialog sanity check to the kitchen sink.

Relates to #9066.
2018-02-01 11:26:14 -08:00
Kristiyan Kostadinov 959a8a100c feat(overlay): expose reference to the backdrop element (#9702)
Exposes a reference to the backdrop element via the `OverlayRef` for convenience/customization.

Fixes #9689.
2018-02-01 11:26:02 -08:00
Kristiyan Kostadinov 8997db0513 fix(autocomplete): expose MatAutocompleteTrigger in template (#9703)
Adds an `exportAs` to the `MatAutocompleteTrigger` so it can be accessed through templates and because the methods for toggling the panel are on it.

Fixes #9687.
2018-02-01 11:25:39 -08:00
Kristiyan Kostadinov 561194746b fix(overlay): expose event object in backdropClick stream (#9716)
Exposes the click event object when subscribing to the `OverlayRef.backdropClick` stream.

Fixes #9713.
2018-02-01 11:25:27 -08:00
Joey Perrott b65268365f feat(button): create stroked and flat button variants (#9365) 2018-02-01 11:25:15 -08:00