Commit Graph

2486 Commits

Author SHA1 Message Date
Andrew Seguin 01622b1c00 fix(input): apply readonly attribute when readonly (#7439)
* fix(input): apply readonly attribute when readonly

Fixes issue where the readonly attribute was no longer applied because it was made to be an `@Input`

* Update input.ts
2017-09-30 08:09:10 -07:00
Andrew Seguin 3c6f7a276e chore: fix CI issues (#7432) 2017-09-29 16:59:19 -07:00
Andrew Seguin b121e32cc7 fix(tooltip): minification issue (#7430) 2017-09-29 16:44:45 -07:00
mmalerba 8b715e00bf chore: fix demo app build (#7428) 2017-09-29 16:12:13 -07:00
Andrew Seguin f5e916d667 fix(sort): fix incorrect conditional grouping (#7427) 2017-09-29 15:57:47 -07:00
Joey Perrott 811e50451b Create screen type service to determine screen type: Web, Tablet, Handset (#6772) 2017-09-29 13:24:14 -07:00
Joey Perrott f43bf23804 Move snackbar component styling to inline. (#6990) 2017-09-29 13:24:07 -07:00
Paul Gschwendtner 606178be0a build(): retries for travis deploying (#7146)
* Now re-runs the given deploy mode a second time if failed the first time. This ensure that deployment works fine most of the time and should also avoid conflicts between different Travis CI jobs that are deplyoing at the same time.
2017-09-29 13:23:52 -07:00
Paul Gschwendtner d858ad93ec chore: better color usage for chip demo (#7254)
* Improves the example for the chips that shows how the color can be set for chips.
* Fixes a typo in the chips readme

References #7243
2017-09-29 13:23:22 -07:00
Paul Gschwendtner 85ce16d863 build(devapp): no longer copy source files to dist (#7338)
* Currently the TypeScript source files are being copied to the package output. This is only necessary for the AOT task and therefore shouldn't happen if someone tries to run the devapp.
2017-09-29 13:23:14 -07:00
Kristiyan Kostadinov d60e3cba50 chore: add selection list to prerender check; autocomplete test stability improvements (#7371)
* Adds the selection list component to the kitchen sink.
* Piggy-backing off of the smaller fix, this is something I've meant to do for a while, but it's so minor that it doesn't make sense to open a separate PR. Currently there are a few unit tests that will cause Karma to hang until it times out, if they fail. This seems to be because Karma fails to stringify the `activeOption`. These changes switch the tests to cast the expected result to a boolean first.
2017-09-29 13:23:05 -07:00
Kristiyan Kostadinov c8ddd396a7 fix(tooltip): ensure tooltip stays within viewport (#6659)
* Adds a fallback position to ensure that tooltips can't go outside the viewport.
* Refactors the `transform-origin` logic to depend on the overlay position, instead of the tooltip position.

Fixes #5428.
2017-09-29 13:19:21 -07:00
Ji Won Shin d5f96c8727 Vertically align elements in mdSubheader (#6685) 2017-09-29 13:18:08 -07:00
Kristiyan Kostadinov 7a9657040d fix(menu): nested menu error when items are rendered in a repeater (#6766)
Fixes an error that was being thrown when the menu items that trigger a sub-menu are rendered in a repeater.

Fixes #6765.
2017-09-29 13:17:44 -07:00
Paul Gschwendtner 0270cf5e47 fix(checkbox): support native tabindex attribute (#6793)
Currently the checkbox only allows changing the tabIndex using the tabIndex binding. Using the native tabindex attribute doesn't have any affect. With this change the native tabindex property will be respected.

References #6465
2017-09-29 13:17:23 -07:00
Kristiyan Kostadinov f8ed442518 fix(common): don't log doctype warning when rendering server-side (#6833)
Prevents the doctype warning from being logged when rendering server-side in development mode. Previously, while we did have a `document`, it was not the same as the client-side `document` and thus didn't have a `doctype`. We didn't notice this earlier, because we run the server-side rendering check in production mode where the sanity checks are disabled.

Relates to #6292.
2017-09-29 13:17:03 -07:00
Kristiyan Kostadinov 7a354a0958 fix(tabs): blurry content in IE (#6954)
Fixes the content of tabs being blurred on IE due to a `transform`.

Fixes #6944.
2017-09-29 13:16:27 -07:00
tinayuangao b1ceeecd88 Update button toggle group disabled (#6991) 2017-09-29 13:16:12 -07:00
Kristiyan Kostadinov 6f487100fd fix(stepper): avoid blurry content on IE (#6992)
Avoids IE potentially blurring the content inside of a horizontal stepper.

Relates to #6954.
2017-09-29 13:16:02 -07:00
Paul Gschwendtner e52beebbf3 feat(selection-model): de/select multiple values at the same time (#7001)
* feat(selection-model): de/select multiple values at the same time

Adds support for passing multiple values to the SelectionModel at the same time. This feature is described in the JSDoc already, but just wasn't implemented yet.

This functionality gives us more control about the `onChange` event, which will otherwise fire every time if for example multiple values need to be selected.

* Address comments
2017-09-29 13:15:51 -07:00
Paul Gschwendtner 5da9e64b36 fix(common-module): check if computed styles are available (#7003)
* fix(common-module): check if computed styles are available

Due to a Firefox Bug (https://bugzilla.mozilla.org/show_bug.cgi?id=548397) the `getComputedStyle` call in the `MdCommonModule` will return `null` and cause a runtime exception because normally the computed styles are never `null` for the test element.

Since this it's very uncommon that a developer places a Angular Material application inside of a hidden iframe, a simple null check should be enough to get the application running.

Fixes #7000

* Add comment about Firefox case
2017-09-29 13:15:28 -07:00
Joey Perrott dcf107472b Handle overflow in .mat-expansion-panel-body. (#7012) 2017-09-29 13:15:16 -07:00
Marcelo Luz 947d3e84d1 fix(select) aria-labelledby (#7022)
aria-labelledby must not be in the DOM if it is empty
this causes accessability bugs.
2017-09-29 13:15:02 -07:00
mmalerba 2129b7a7f9 fix(datepicker): make sure _datepickerInput exists before accessing its (#7033)
* fix(datepicker): make sure _datepickerInput exists before accessing its
disabled property.

* add test
2017-09-29 13:14:42 -07:00
Philip Pham 2dcb76c8f9 fix(menu): multiple close events for a single close (#7037)
Don't emit a closed event when another event will be emitted. Previously, if one clicked on a menu item, one would get two events: `undefined` and `click` in that order. One would see similar behavior for `keydown` or clicking the backdrop. Unit tests were updated to prevent a regression.
2017-09-29 13:14:22 -07:00
Kristiyan Kostadinov b0b91f4307 fix(drawer): drawer container not reacting to drawer removal (#7060)
Fixes the drawer container not reacting if one of the drawers is destroyed.

Fixes #6271.
2017-09-29 13:13:50 -07:00
Paul Gschwendtner c82fca8626 fix(slide-toggle): report change to model before firing a change event (#7076)
Whenever the value of the slide-toggle changes through interaction, a `change` event will be emitted. The value change then will be reported to the `ControlValueAccessor` which fires the `ngModelChange` output.

Right now the `ngModelChange` output fires after the normal `change` output. This should be the other way around because developers expect the two-way data binding to already reflect the change.

Fixes #7074
2017-09-29 13:13:35 -07:00
Kristiyan Kostadinov 504ba70abd fix(autocomplete): error if panel is added asynchronously (#7078)
Fixes an error that was thrown when an autocomplete trigger is initialized without a panel. Note that an error will still be thrown, but only if the user attempts to open the panel.

Fixes #7069.
2017-09-29 13:13:12 -07:00
Kristiyan Kostadinov 8e7726102b fix(snack-bar): subsequent snack bars not opening; animation issues (#7086)
* Fixes subsequent snack bars not showing up if they are opened while another snack bar is open. This was due to the latter snack bar getting closed immediately, because one of the animation events coming in is `void->void`.
* Simplifies the logic for determining the animation state. Using the getter ended up passing returning an invalid state in some cases (e.g. `undefined-top` or `undefined-bottom`).

Fixes #7063.
2017-09-29 13:12:47 -07:00
Kristiyan Kostadinov 6bd6b9f1eb fix(autocomplete): remove invalid aria markup (#7107)
Removes the `aria-multiline` attribute, because it is not allowed on a `role="combobox"`.

Fixes #7100.
2017-09-29 13:12:24 -07:00
Kristiyan Kostadinov daa388013b fix(dialog): directionality not injected into child components (#7111)
Since the `direction` option from the overlay only sets the `dir` attribute, it means that any components that depend on the `Directionality` service (e.g. `md-slider`) won't be able to pick it up. These changes add the proper direction to the custom dialog injector.
2017-09-29 13:12:13 -07:00
Paul Gschwendtner e05f93981a fix(selection-list): restore focus if active item is destroyed (#7125)
* Removes the `destroyed` and `onFocus` observables and instead just calls methods on the injected `MdSelectionList` instance.

* Fixes that the active item is not updating if the active item is being destroyed.
2017-09-29 13:11:22 -07:00
Kristiyan Kostadinov 26788f19c7 fix(checkbox): defaulting to invalid name and value attributes (#7130)
Fixes the checkbox defaulting to `name="null"` and `value="undefined"` for the underlying input, if the user hasn't passed them in.
2017-09-29 13:11:08 -07:00
Kristiyan Kostadinov c5e162b1b0 fix(radio): defaulting to invalid name attribute (#7131)
Fixes the radio button defaulting to `name="undefined"` for the underlying input, if the consumer hasn't passed in a name.

Relates to #7130.
2017-09-29 13:10:43 -07:00
Joey Perrott c5c96d9f6d - Remove extra <md-autocomplete> blocks in example. (#7149)
- Add isOpen attribute to `MdAutocomplete` component.
2017-09-29 13:10:30 -07:00
Kristiyan Kostadinov f8cd7906ff feat(autocomplete): add md-autocomplete classes to overlay panel (#7176)
Transfers any classes added to `md-autocomplete` to the resulting panel, allowing for easier styling similarly to `md-menu`.

Fixes #4196.
2017-09-29 13:10:18 -07:00
Kristiyan Kostadinov 2d350a0893 feat(sort): add enter and leave arrow animations (#7180)
Adds animations for when the sorting arrow is added and removed from the DOM.
2017-09-29 13:08:25 -07:00
Joey Perrott f19f19cf63 Set selected state of list option item in selection list OnInit. (#7189) 2017-09-29 13:08:09 -07:00
NothingEverHappens 217840c5b9 fix(stepper): selected is always undefined (#7213) 2017-09-29 13:07:35 -07:00
Kristiyan Kostadinov ba5653db20 fix(drawer): open event not firing on init (#7214)
Fixes a regression that caused the drawer not to fire its `open` event if it is open on init.

Fixes #7208.
2017-09-29 13:06:57 -07:00
Kristiyan Kostadinov c7ab828b0a fix(select): multiple change events emitted when changing options of a closed select (#7232)
Prevents two change events being fired the same change when selecting an option via the arrow keys on a closed select.

Fixes #7227.
2017-09-29 13:06:49 -07:00
Kristiyan Kostadinov eb012cc9b7 fix(calendar): not reacting to min/max boundary changes (#7234)
Fixes the calendar not re-rendering when the `minDate`, `maxDate` or `dateFilter` change. The issue was due to the fact that the `minDate`, `maxDate` and `dateFilter` weren't being passed down to the views via `@Input`.

Fixes #7202.
2017-09-29 13:06:18 -07:00
Kristiyan Kostadinov 6be046261a fix(autocomplete): empty not cleaning up on tab (#7270)
Fixes an issue that caused the autocomplete not to be cleaned up when the user tabs away, if there were no results when the autocomplete was open.

Fixes #7268.
2017-09-29 13:06:03 -07:00
Kristiyan Kostadinov 5f8615fdbc fix(autocomplete): don't open panel for readonly inputs (#7271)
Prevents the autocomplete panel from opening if the associated input is readonly.

Fixes #7269.
2017-09-29 13:05:49 -07:00
Kristiyan Kostadinov f076390010 fix(input): don't highlight container when readonly input is focused (#7273)
Prevents readonly inputs from being highlighted when they're focused. This is consistent with the native input behavior.

Note: This was introduced initially through #5776, but it looks like it didn't make it through the transition to `mat-form-field`.
2017-09-29 13:05:19 -07:00
Paul Gschwendtner 39543a3bf2 fix(slider): change event is not being emitted (#7278)
* In some situations, the change event of the `<mat-slider>` is not being emitted if the user drags the thumb of the slider. This is because the `slidestart` event fires a second time before the sliding ends. This causes the slider to think that there was no value change.

Fixes #7207
2017-09-29 13:05:08 -07:00
Kristiyan Kostadinov 4122ae2b10 fix(stepper): align appearance with spec (#7279)
Aligns the stepper appearance closer to the spec by:
* Removing the focused background when focused by mouse. Now it only shows up for programmatic and keyboard focus.
* Adding ripples to the step header.
* Using a slightly heavier font font the active step.
* Using `cursor: pointer` to show that the step is clickable.

Fixes #7260.
2017-09-29 13:04:33 -07:00
tinayuangao d9ba13fc59 fix(chips): do not set chips value if there's no ngControl or value (#7285) 2017-09-29 13:04:25 -07:00
Kristiyan Kostadinov 86bea9174b fix(select): losing focus when selecting values through binding (#7296)
Fixes an issue that caused focus to be lost after selecting a value on a select that doesn't use Angular forms.

Fixes #7092.
2017-09-29 13:04:13 -07:00
Joey Perrott ce6cc0bb78 Make isFocusTrapEnabled internal, removing it from docs. (#7298)
BREAKING CHANGE: `isFocusTrapEnabled` is now properly marked internal.
2017-09-29 13:03:44 -07:00