Commit Graph

2457 Commits

Author SHA1 Message Date
Jeremy Elbourn 99cc2e433a chore(menu): fix a11y module being imported twice from merge conflict (#9538) 2018-01-23 08:44:09 -08:00
Kristiyan Kostadinov e3b5e3f8e4 fix(datepicker): highlight datepicker toggle when calendar is open (#9426)
Highlights the `mat-datepicker-toggle` while the associated calendar is open, in order to provide some extra visual feedback.
2018-01-23 08:18:48 -08:00
André Roggeri Campos 6d4c7ae714 fix(progress-spinner): element size not updated when diamater is changed (#8697) 2018-01-23 08:18:03 -08:00
Andrew Seguin f213f6cb97 fix(table): data source should sort empty values correctly (#8698) 2018-01-23 08:17:41 -08:00
Paul Gschwendtner 12af8f4412 chore: hide internal properties from selection-list api doc (#8841)
* Recently with the NgModel support for the selection list, the `onTouched` property has been added. This one needs to be prefixed with an underscore to be hidden in the docs.
* Since the initial implementation of the selection-list the `selectionList` variable has been initialized publically in the constructor of the `MatListOption` and therefore shows up in the docs. This property has been made private now.
2018-01-23 08:17:19 -08:00
Kristiyan Kostadinov 54d60df351 fix(button-toggle): inaccurate name passed down to input if no name is assigned (#9017)
Fixes the button toggle setting the underlying input's name to `"undefined"` if the consumer hasn't passed in a name.
2018-01-23 08:16:46 -08:00
Kristiyan Kostadinov b153947300 fix(overlay): default options not being applied correctly (#9088)
* Fixes the overlay defaults not being applied correctly when the passed in object isn't an instance of the `OverlayConfig`. This caused some issues like the `dir` being set to `"undefined"` if the consumer didn't specify it.
* Tweaks the logic that applies the overlay config defaults to skip keys with `undefined` values.
2018-01-23 08:16:13 -08:00
Kristiyan Kostadinov 3d180066ad feat(overlay): make it easier to override backdrop color (#9114)
Previously the dark backdrop color was `rgba(0, 0, 0, 0.6)` to which we also added an opacity of `0.48`. This is hard to reason about, because we've got two stacking opacities that the consumer would have to multiply in order to figure out what the actual color is, in addition to being hard to override. These changes switch to animating the backdrop between 0 and 1, as well as setting the backdrop color to `rgba(0, 0, 0, 0.288)` (0.288 being 0.48 * 0.6).

Fixes #7855.
2018-01-23 08:15:33 -08:00
Kristiyan Kostadinov c3f662ef27 refactor(option): move styles out of mat-core and into styleUrls (#9115)
Moves the styling for `MatOption` and `MatOptgroup` out of the `mat-core` mixin and into their components' respective `styleUrls`. This avoids the styles potentially being included multiple times if `mat-core` is used in different places and is consistent with all other components.
2018-01-23 08:14:56 -08:00
Kristiyan Kostadinov ab0236724c feat(list-key-manager): add support for horizontal directions (#9122)
Updates the `ListKeyManager` to add support for using ltr and rtl directions. This will allow us to switch over even more components to the key manager (e.g. chips, tabs, stepper) as well as support more use cases (e.g. moving selection with the left/right arrows on a closed select).
2018-01-23 08:14:24 -08:00
Kristiyan Kostadinov cc24c7c2f8 fix(menu): inconsistent side padding for nested menu items in RTL (#9124)
Fixes the menu items inside of a sub-menu having half as much padding as they're supposed to in RTL.
2018-01-23 08:13:44 -08:00
Kristiyan Kostadinov c8127ed290 fix(grid-list): tile being pulled outside the grid if no gap can be found (#9128)
Fixes and issue in the grid list where a tile, for which we couldn't find a gap in which to put it, is being pulled outside the grid due to the index defaulting to -1.

Fixes #4515.
2018-01-23 08:12:57 -08:00
Kristiyan Kostadinov 829506ddc7 fix(snack-bar): indicate in afterDismissed whether dismissal was a result of an action (#9154)
Adds a boolean to the `MatSnackBarRef.afterDismissed` result that indicates whether the dismissal came as a result of the user pressing the action button.

Fixes #9147.
2018-01-23 08:12:27 -08:00
Paul Gschwendtner 68bb44c331 fix(slide-toggle): truncate label content with ellipsis (#9166)
* Instead of showing the text overflow of slide-toggle content, an ellipsis for too long labels will be shown.

Fixes #5212
2018-01-23 08:09:41 -08:00
Kristiyan Kostadinov e62afdf06e fix(expansion-panel): improved accessibility labelling and keyboard default action not being prevented (#9174)
Adds the following improvements to the expansion accessibility, based on the [accessible accordion guidelines](https://www.w3.org/TR/wai-aria-practices-1.1/examples/accordion/accordion.html):
* Adds the `region` role to the content element.
* Adds `aria-labelledby` pointing to the header.
* Fixes the page being scrolled down when a panel is opened using space. The issue was that we were preventing the default action during `keydown` which is too late in the lifecycle.

Also adds a couple of extra tests for the keyboard controls.
2018-01-23 08:08:40 -08:00
Paul Gschwendtner e09c0a694d feat(checkbox): expose ripple instance (#9176) 2018-01-23 08:08:08 -08:00
Kristiyan Kostadinov 2d03af0c72 feat(drawer): expose CdkScrollable instance (#9183)
Exposes the `CdkScrollable` instance that wraps around the drawer's content. This makes it easier for consumers to react to scrolling inside the container.

Fixes #9136.
2018-01-23 08:06:07 -08:00
Kristiyan Kostadinov 9dba30b6e3 fix(stepper): unable to skip optional steps in linear stepper (#9245)
Fixes users not being allowed to skip optional invalid steps inside of a linear stepper.

Fixes #9239.
2018-01-23 08:05:29 -08:00
Kristiyan Kostadinov 7c78c93625 fix(select): close panel on alt + arrow key presses (#9250)
* Closes the select panel when pressing alt + down/up arrow, based on the native select.
* Does some minor cleanup around the select tests.
2018-01-23 08:04:48 -08:00
Kristiyan Kostadinov eac15120c6 fix(checkbox): underlying native checkbox being rendered when parent uses css column layout (#9258)
Fixes an issue where the hidden native checkbox inside the `mat-checkbox` gets rendered if one of the ancestors is using a CSS column layout.

Fixes #9049.
2018-01-23 08:03:20 -08:00
Kristiyan Kostadinov ec6678df21 fix(input): floating label not reacting when patching the value without emitting an event (#9260)
Fixes the input's floating label state not being updated when the consumer patches the form control's value without emitting an event.

Fixes #8982.
2018-01-23 08:02:49 -08:00
Emilio 48bf0edcd5 chore(overlay): export OverlayPositionBuilder (#9264) 2018-01-23 08:02:11 -08:00
Kristiyan Kostadinov 47a8f764d1 refactor(portal): make TemplatePortal generic param optional (#9272)
Makes the `C` generic param on the `TemplatePortal` optional, because it's only being used to type the `context` property which is optional itself. Also does some minor cleanup in the `TemplatePortal`.
2018-01-23 08:00:48 -08:00
Joey Perrott 76729133fb fix(card,tabs,toolbar): Make media query breakpoints follow Material spec (#9284) 2018-01-23 08:00:08 -08:00
Kristiyan Kostadinov 075464fec9 fix(selection-model): incorrect initial value when empty array is passed in single-selection mode (#9287)
* Fixes the selection model being initialized to `[undefined]` when an empty array is passed in as the initial value in single-selection mode.
* Minor cleanup.

Fixes #9273.
2018-01-23 07:58:58 -08:00
Kristiyan Kostadinov bb9da60282 refactor(selection-model): expose source model in change event (#9288)
Exposes the selection model that dispatched an event inside the event itself. This is mostly for convenience, because it allows the consumer to access the selected value and other properties without having to reach outside the callback.

Relates to the discussion in #8599.
2018-01-23 07:58:15 -08:00
Kristiyan Kostadinov 278e25ac04 fix(menu): set appropriate origin when restoring focus (#9303)
Sets the correct focus origin depending on the way a menu has been opened.

Fixes #9292.
2018-01-23 07:57:44 -08:00
Kristiyan Kostadinov 8972bf4e79 fix(focus-monitor): implement OnDestroy logic (#9305)
Similarly to most of the other DOM-related services, these changes implement `ngOnDestroy` for the `FocusMonitor` which removes the monitoring from all of the currently-monitored elements.
2018-01-23 07:57:22 -08:00
Joey Perrott c60483485e fix(expansion): define default expansion header heights via css. (#9313) 2018-01-23 07:56:46 -08:00
Kristiyan Kostadinov b626b133d8 feat(portal): expose attached result in CdkPortalOutlet (#9326)
Exposes the attach `ComponentRef` or `EmbeddedViewRef` in the `CdkPortalOutlet` directive.

Fixes #9304.
2018-01-23 07:56:04 -08:00
Kristiyan Kostadinov a72085b5a9 feat(expansion-panel): support two-way binding for the expanded property (#9327)
* Supports two-way binding to the `expanded` property on the expansion panel.
* Fixes som wrong indentation in the tests.

Fixes #9311.
2018-01-23 07:55:14 -08:00
Paul Gschwendtner 6f7332b748 fix(interactivity-checker): carefully handle frame elements (#9340)
* Browsers like MS Edge throw errors if the frameElement property is being accessed from a different host address. This means that the `frameElement` property should be accessed carefully.

Fixes #3372
2018-01-23 07:54:32 -08:00
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