Commit Graph

3089 Commits

Author SHA1 Message Date
Kristiyan Kostadinov 2c192d0a57 fix(autocomplete): close panel using alt + up arrow (#9341)
[Based on the accessibility guidelines](https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction), the autocomplete panel can be closed using the alt + up arrow keyboard combo.
2018-01-23 07:53:53 -08:00
Kristiyan Kostadinov 4e8aa52d32 refactor(typography): add mixin for shorthand declaration and use shorthand for h5 and h6 (#9346)
* Moves our `font` declaration shorthand logic into the `mat-typography-font-shorthand` mixin to make it easier to use without passing in a typography config.
* Switches the `h5` and `h6` to use the shorthands.
2018-01-23 07:53:07 -08:00
Joey Perrott 8de5e83dcf fix(tab-link): preventDefault action when disabled tab link is clicked. (#9357) 2018-01-23 07:52:29 -08:00
Kristiyan Kostadinov df447674a9 fix(overlay): unable to change CdkConnectedOverlay origin dynamically (#9358)
Fixes the `CdkConnectedOverlay` not handling changes of its `origin` after it's opened for the first time.

Fixes #9353.
2018-01-23 07:51:50 -08:00
Kristiyan Kostadinov 69270efb7e fix(select): handle keyboard events from inside panel (#9361)
After the switch to using `aria-describedby` for managing the highlights in `mat-select`, all of the keyboard handling was moved to the select trigger, however this doesn't account for the cases where focus makes it inside the panel (e.g. when toggling options in `multiple` mode).
2018-01-23 07:50:55 -08:00
Juliano 2d592a5879 feat(slider): add focus and blur methods do MatSlider (#9373) 2018-01-23 07:49:59 -08:00
Paul Gschwendtner b3f8a42321 fix(button): accent color not set on fab buttons with build optimizer (#9376)
When running an Angular application in production mode with the build optimizer and the Angular CLI, the code part, that sets the default color for round buttons, is removed accidentally.

This seems to be an issue, that's caused by the build optimizer: https://github.com/angular/devkit/issues/388.

Fixes #9360
2018-01-23 07:47:31 -08:00
Kristiyan Kostadinov 843061777d fix(menu): always focus first menu item (#9383)
* Switches to always focusing the first menu item, even when opening by mouse. The focus styling will only apply when focused by keyboard.
* Adds the ability to set the focus origin through the `FocusKeyManager`.

Fixes #9252.
2018-01-23 07:46:50 -08:00
Kristiyan Kostadinov 9177fbf766 refactor(focus-monitor): make checkChildren parameter optional (#9384)
After we made the `renderer` param optional, `checkChildren` became required when using the two-param signature. These changes make it optional which is slightly more convenient on consumption.
2018-01-23 07:45:30 -08:00
Kristiyan Kostadinov b491f7afab chore: remove FakeViewportRuler (#9386)
Now that all tests have been moved away from the `FakeViewportRuler`, we can safely get rid of it. In general we should avoid stubbing out the window dimensions, because it can be unreliable and it doesn't work well when something is positioned using `bottom` and `right`.
2018-01-23 07:44:48 -08:00
Paul Gschwendtner c44f4aa2ce refactor(tab-nav-bar): remove duplicate disableRipple property (#9388)
* Removes the duplicate initialization of the `disableRipple` property on the `MatTabNav`.
2018-01-23 07:44:11 -08:00
Rafael Santana 5b38a73b99 docs(slide-toggle): add missing docs for 'MatSlideToggleChange' class (#9391) 2018-01-23 07:42:20 -08:00
Kristiyan Kostadinov 4c7a4f33e0 fix(aria-describer): exception when attempting to describe a non-element node (#9392)
* Fixes an error that was being thrown when trying to describe a non-element node. This could happen if the consumer is attempting to describe an `ng-container` which corresponds to a comment node.
* Switches a few cases, that had hard-coded the `Node.ELEMENT_NODE` constant for to Universal compatibility, to take the constant from the `Document`.

Relates to #8724.
2018-01-23 07:41:33 -08:00
Paul Gschwendtner 51363618c6 fix(input): respect text-align value from form-field (#9397)
User agent stylesheets set the text-align of inputs explicitly to "start". Those can be easily overwritten by targeting the input element using a simple CSS selector, but since the text-align will be applied most of the time on the `mat-form-field` to also align the placeholder/label, the alignment should be inherited on the input.

Related to #5332
2018-01-23 07:40:56 -08:00
Paul Gschwendtner b3d2e78ecf feat(stepper): add proper type to stepper buttons (#9401)
* Automatically adds the proper button type for the StepperPrevious and StepperNext buttons.
2018-01-23 07:40:08 -08:00
Kristiyan Kostadinov 4ad7cc8612 chore(snack-bar): allow stronger typing for config data (#9408)
* Along the same lines as the dialog data, adds a generic param to the `MatSnackBarConfig` that allows consumers to type the `data` property.
* Adds a couple of missing docstrings to the `MAT_DIALOG_DATA` and `MAT_SNACK_BAR_DATA`.
2018-01-23 07:38:10 -08:00
Kristiyan Kostadinov d0ad3b763a fix(overlay): transparent overlay not blocking scroll on Firefox 57 (#9446)
As of Firefox 57, it looks like elements with a transparent background won't capture scroll events. These changes work around the issue by not setting the background color, but using `opacity` to hide the element while keeping it scrollable.

Fixes #8924.
2018-01-23 07:35:10 -08:00
Kristiyan Kostadinov 66dc73a5fd fix(form-field): unable to override font-size through typography config (#9463)
Fixes the form field ignoring the typography config's font size which prevents consumers from being able to override it.
2018-01-23 07:33:02 -08:00
Rafael Santana 379a305182 docs: ensure docs are being shown for '@Input's (#9471) 2018-01-23 07:30:03 -08:00
Kristiyan Kostadinov 0b8955b792 fix(datepicker): calendar keyboard controls not working if the user clicks on blank area (#9494)
Fixes the user not being able to use the keyboard controls on a calendar, if they click on one of the blank areas next to a cell. The issue comes from the calendar body not being focusable which ends up returning focus back to the body.
2018-01-23 07:27:44 -08:00
Kristiyan Kostadinov 6824375494 fix(button): incorrect text color when no color is passed in on dark theme (#9234)
Fixes buttons without a set `color` having a dark text color on a dark background, if they aren't inside a component that provides the color for them (e.g. a sidenav container).

Fixes #9231.
2018-01-23 07:26:11 -08:00
Kristiyan Kostadinov 4e1a6a8e18 fix(autocomplete): handle optionSelections being accessed early (#8802)
Currently the `MatAutocompleteTrigger` will throw if `optionSelections` is accessed before `ngAfterViewInit`. These changes add a fallback stream that will be replaced once everything is initialized.

Fixes #4616.
2018-01-23 07:24:56 -08:00
Kristiyan Kostadinov 9dc43de540 fix(select): don't restore focus unless an option was selected (#8964)
Currently `mat-select` always restores focus to its trigger whenever the panel is closed. This can be problematic, because the user might've scrolled away and restoring focus would scroll the page back up. These changes switch to only restoring focus if the user made a selection.

Fixes #8915.
2018-01-23 07:24:08 -08:00
Kristiyan Kostadinov a6f9fc25d2 feat(stepper): add the ability to reset a stepper (#8623)
Allows for the user to reset a stepper to its initial state by calling the `reset` method.

Relates to #7700.
2018-01-23 07:21:52 -08:00
Kristiyan Kostadinov c8743e70de feat(paginator): allow page size selection to be disabled (#8373)
Adds an input that allows the consumer to disable the page size selection entirely.

Fixes #8359.
2018-01-23 07:21:09 -08:00
Paul Gschwendtner 7024dc49f8 chore: update dashboard functions (#9504)
* Updates the package dependencies of the Dashboard dependencies. There seem to be errors with the old `node-github` API, but updating to the latest version (`@octokit/rest`) seems to work locally.
2018-01-22 12:50:50 -08:00
Schneider Werner-Walter 5d77d908d4 chore(coding-standards): say "pipeable" instead of "lettable" for rxjs (#9511) 2018-01-22 11:38:15 -08:00
Austin b071d64eec chore(docs): add types to public and jsdoc cleanup (#7711) 2018-01-22 09:51:34 -08:00
Paul Gschwendtner 33afd93198 build: remove chrome sandbox workaround (#9498)
In order to align with the `angular/angular` setup, we also remove the temporary Chrome Headless Sandbox workaround in favor of faster Travis CI containers. To be able to still use headless chrome, we specify the `no-sandbox` flag.

Reference https://github.com/angular/angular/pull/21641
2018-01-22 09:46:11 -08:00
Joey Perrott 4523556658 chore: add rootDirs to cdk tsconfig-build.json (#9481) 2018-01-19 07:41:50 -08:00
Joey Perrott 7af132d51c chore: add rootDirs to cdk tsconfig-build.json (#9470) 2018-01-18 16:03:59 -08:00
Jeremy Elbourn 5c87a84396 docs(list): expand accessibility section (#9443) 2018-01-18 10:44:02 -08:00
Joey Perrott ef78a97edd doc(select): clarify examples for symbols exported by FormsModule and ReactiveFormsModule. (#9461) 2018-01-18 10:42:52 -08:00
Roy f5d4f16c77 docs(demo-app): align a11y content, fix typo (#9444) 2018-01-18 10:42:30 -08:00
Paul Gschwendtner ffc4cecaa6 docs: fix radio button description (#9440) 2018-01-18 10:42:17 -08:00
Dougie 23e22be7b3 Yarn option for Gesture hammerjs (#9417) 2018-01-18 10:41:58 -08:00
Rafael Santana 151e58142c docs: ensure jsdocs are properly set (#9390) 2018-01-18 10:41:39 -08:00
Roy 75eccb53f7 docs: use correct naming Sass (#9375) 2018-01-18 10:39:30 -08:00
Roy ae4e465bb6 docs(form-field): set correct method name (#9374) 2018-01-18 10:38:52 -08:00
Jeremy Elbourn 2a609b4536 chore: update readme for Q1 2018 (#9315) 2018-01-18 10:37:57 -08:00
Kristiyan Kostadinov 56e2566f1d chore: remove reverted change from changelog (#9455) 2018-01-18 09:22:12 -08:00
Andrew Seguin 92896a018f chore: 5.1.0 release (#9450) 2018-01-17 16:35:46 -08:00
Andrew Seguin 4ffcdee095 Revert "fix(list): incorrect padding for list-items with avatars, icons (#9163)" (#9449)
This reverts commit dfbd8d211a.
2018-01-17 14:55:23 -08:00
Andrew Seguin 2140d24790 Revert "fix(dialog): dialogs that hit max-width not centered on IE (#8055)" (#9430)
This reverts commit 65b63bb545.
2018-01-17 13:16:16 -08:00
Paul Gschwendtner ac244d940f build: fix chrome headless not starting (#9418)
* build: fix chrome headless not starting

* Applies a workaround for https://github.com/travis-ci/travis-ci/issues/8836 that fixes the Chrome launch issues. (similar workaround applied on angular/angular)

* Add comment for node version
2018-01-17 11:47:44 -08:00
Kristiyan Kostadinov 60b0625667 docs: clean up example config and data generation (#9223)
* Removes all of the optional properties being passed in as null in the example config. Also adds stronger typing to the list.
* Cleans up the example data generation to be closer to the rest of the project.
2018-01-12 09:41:01 -08:00
Paul Gschwendtner 2957d584b8 chore: move cdk dialog to cdk-experimental (#9285)
* Moves the cdk dialog package from `material-experimental` to the `cdk-experimental` package.
2018-01-12 09:40:48 -08:00
Kristiyan Kostadinov 74d906a598 build: add lint rule to prevent binding to class attribute directly (#9289)
Adds a lint rule that prevents us from binding to `[class]` directly.

Fixes #8340.
2018-01-12 09:40:32 -08:00
Paul Gschwendtner e5a0f7d5a7 docs: show inherited properties (#9299)
* Fixes that properties from mixins (e.g color, disabled) are not showing up in the docs.
* No longer runs Dgeni twice when executing the docs task.

Fixes #5284
2018-01-12 09:40:09 -08:00
CDDelta acd90669d3 docs(dialog): document how to set default options using MAT_DEFAULT_DIALOG_OPTIONS (#9319)
* docs(dialog): document how to set default options

* docs(form-field): fix typo

* Address comments
2018-01-12 09:39:58 -08:00