Commit Graph

3434 Commits

Author SHA1 Message Date
mmalerba ced9c90bee feat(cdk-input): move input autofill and autosize utils into cdk (#9831)
* move autofill to cdk

* move textarea autosize into cdk

* fix bazel build

* rename input to text-field

* set resize back to none for autosize in input css

* fix tsconfig
2018-03-13 09:00:11 -07:00
Kristiyan Kostadinov 54252d5c1b refactor(overlay): remove 6.0.0 deletion targets (#10161)
Removes all of the APIs that were marked for deletion in 6.0.0 from the `cdk/overlay` entry point.

BREAKING CHANGES:
* `ConnectedOverlayDirective` which was deprecated in 5.0.0 has been removed. Use `CdkConnectedOverlay` instead.
* `OverlayOrigin` which was deprecated in 5.0.0 has been removed. Use `CdkOverlayOrigin` instead.
* `hasBackdrop` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayHasBackdrop` instead.
* `open` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayOpen` instead.
* `scrollStrategy` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayScrollStrategy` instead.
* `backdropClass` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayBackdropClass` instead.
* `minHeight` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayMinHeight` instead.
* `minWidth` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayMinWidth` instead.
* `height` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayHeight` instead.
* `width` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayWidth` instead.
* `offsetX` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayOffsetX` instead.
* `offsetY` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayOffsetY` instead.
* `positions` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayPositions` instead.
* `origin` which was deprecated in 5.0.0 has been removed. Use `cdkConnectedOverlayOrigin` instead.
2018-03-12 15:40:41 -07:00
mmalerba 9403eada8c docs(form-field): add docs for appearance and mention that color type is supported (#10274)
* docs(form-field): add docs for `appearance`

* add color to supported input types
2018-03-12 15:40:20 -07:00
Kristiyan Kostadinov 4d05cdab6a refactor(tabs): remove 6.0.0 deletion targets (#10309)
Removes the deletion targets for 6.0.0 from the `material/tabs` entry point.

BREAKING CHANGES:
* `mat-dynamic-height` which was deprecated in 5.0.0 has been removed. Use `dynamicHeight` instead.
* `selectChange` which was deprecated in 5.0.0 has been removed. Use `selectedTabChange`.
2018-03-12 15:39:34 -07:00
Kristiyan Kostadinov 9f8eec1d2b refactor(checkbox): remove 6.0.0 deletion targets (#10342)
Removes the 6.0.0 deletion targets from the `material/checkbox` entry point.

BREAKING CHANGES:
* `align` which was deprecated in 5.0.0 has been removed. Use `labelPosition` instead. Note that the values are different.
2018-03-12 15:38:15 -07:00
mmalerba aa2356d3fc refactor(form-field): remove deprecated CSS classes (#10296)
BREAKING CHANGES:
- The following deprecated CSS classes have been removed:
  - mat-input-container instead use mat-form-field
  - mat-input-invalid instead use mat-form-field-invalid
  - mat-input-wrapper instead use mat-form-field-wrapper
  - mat-input-flex instead use mat-form-field-flex
  - mat-input-prefix instead use mat-form-field-prefix
  - mat-input-infix instead use mat-form-field-infix
  - mat-input-placeholder-wrapper instead use mat-form-field-label-wrapper
  - mat-input-placeholder instead use mat-form-field-label
  - mat-input-suffix instead use mat-form-field-suffix
  - mat-input-underline instead use mat-form-field-underline
  - mat-input-ripple instead use mat-form-field-ripple
  - mat-input-subscript-wrapper instead use mat-form-field-subscript-wrapper
  - mat-input-hint-wrapper instead use mat-form-field-hint-wrapper
  - mat-input-hint-spacer instead use mat-form-field-hint-spacer
  - mat-form-field-placeholder-wrapper instead use mat-form-field-label-wrapper
  - mat-form-field-placeholder instead use mat-form-field-label
2018-03-12 15:37:42 -07:00
tinayuangao d065aea813 fix(tree): fix mat-tree paddings (#10349) 2018-03-12 15:37:06 -07:00
Jeremy Elbourn 6f63fd283e build: add schematics to @angular/material package (#10351)
This also fixes a handful of minor issues with the blueprints
2018-03-12 14:31:59 -07:00
Jeremy Elbourn fcc09089c3 build: create sass_bundle bazel rule (#10055)
This defines a bazel rule to bundle sass partials into a single file
using the "scss-bundle" npm package. The rule definition is commented so
that it can serve as an example for creating other rules in the future.

I've also added the missing build file for badge so that its theme can
be included in the bundle.
2018-03-12 11:12:38 -07:00
Austin 6273d6a4c6 feat(schematics): dashboard schematic (#10011) 2018-03-09 16:24:41 -08:00
Juliano 0a619e90f7 docs(datepicker): correct typos (#10339) 2018-03-09 09:04:16 -08:00
Kristiyan Kostadinov c205749f4d fix(tree): invalid style declaration during server-side rendering (#10326)
Switches to camel-cased properties when declaring the inline styles for the tree, in order to avoid invalid style declarations when they get passed through Domino.

Relates to #10131.
2018-03-09 07:43:21 -08:00
Kristiyan Kostadinov 11a3fe1be4 feat(icon): add utility to mirror icons in RTL (#10327)
Adds the `mat-icon-rtl-mirror` CSS class that can be used to mirror icons only in an RTL layout.

Fixes #10045.
2018-03-09 07:42:36 -08:00
tinayuangao b10fff42f1 fix(chip-list): set key manager active index to -1 when blurred (#10335) 2018-03-09 07:42:08 -08:00
Kristiyan Kostadinov 7a42c35bc2 refactor(a11y): remove 6.0.0 deletion targets (#10325)
Removes the deletion targets for 6.0.0 from the `cdk/a11y` entry point.

BREAKING CHANGES:
* The `renderer` parameter in `FocusMonitor.monitor` has been removed.
* `cdk-focus-trap` which was deprecated in 5.0.0 has been removed. Use `cdkTrapFocus` instead.
2018-03-09 07:41:22 -08:00
Kristiyan Kostadinov 0af5bcab45 refactor(autocomplete): remove 6.0.0 deletion targets (#10319)
Removes the deletion targets for 6.0.0 in the `material/autocomplete` module.

BREAKING CHANGES:
* The `defaults` parameter in the `MatAutocomplete` constructor is now required.
2018-03-09 07:40:43 -08:00
Joey Perrott be1fc08e02 feat(icon): add input for inline styling of icons (#9984) 2018-03-09 07:40:03 -08:00
Kristiyan Kostadinov 8366ec6560 fix(overlay): opaque backdrop appearing solid in high contrast mode (#10252)
Recently we switched to using an RGBA color to make the backdrop opaque, instead of setting the opacity. This is more convenient when it comes to overriding and animating it, however it causes high contrast mode on Windows to display it as a solid color. These changes add a fallback that will use the `opacity`.
2018-03-09 07:39:07 -08:00
Kristiyan Kostadinov 356ba71b90 refactor(stepper): remove unnecessary coercion (#10308)
Removes the coercion and associated getters and setters from a few of the properties on the `MatStepHeader`. Since this is an internal component, we can get away with not having coercion and avoiding all of the extra ES5 code that gets generated as a result.
2018-03-09 07:38:44 -08:00
Kristiyan Kostadinov af4fc9b61a fix(datepicker): server-side rendering error for disabled input (#10249)
Fixes disabled datepicker inputs throwing an error when rendering on the server.

Fixes #10248.
2018-03-09 07:37:44 -08:00
Kristiyan Kostadinov 889a9f25ac fix(input): setting blank placeholder by default (#10277)
Fixes the `matInput` directive setting the `placeholder` attribute to a blank string by default, causing it to be rendered in the DOM.
2018-03-09 07:37:09 -08:00
Kristiyan Kostadinov c12d7c473e fix(checkbox): setting blank aria-label by default (#10281)
Fixes the checkbox adding a blank `aria-label` to the underlying input element by default.
2018-03-09 07:36:09 -08:00
mmalerba 26ee3e77fc refactor(form-field): remove deprecated placeholder options. (#10291)
BREAKING CHANGES:

* MatFormFieldControl.shouldPlaceholderFloat which was deprecated in 5.0.0 has been removed. * MatFormFieldControl.shouldLabelFloat is no longer optional and should be used instead.
* `FloatPlaceholderType` which was deprecated in 5.0.0 has been removed. Use `FloatLabelType` instead.
* `PlaceholderOptions` which was deprecated in 5.0.0 has been removed. Use `LabelOptions` instead.
* `MAT_PLACEHOLDER_GLOBAL_OPTIONS` which was deprecated in 5.0.0 has been removed. Use `MAT_LABEL_GLOBAL_OPTIONS` instead.
2018-03-09 07:35:42 -08:00
mmalerba 4a84a6732e refactor(form-field): remove shouldPlaceholderFloat on MatFormFieldControl (#10293) 2018-03-09 07:32:38 -08:00
mmalerba 96b1366317 refactor(form-field): remove deprecated mat-input-container (#10297) 2018-03-09 07:31:40 -08:00
Kristiyan Kostadinov 88bb6f3f35 refactor(snack-bar): remove 6.0.0 deletion targets (#10253)
Removes the targets marked for deletion in 6.0.0 inside the `material/snack-bar` entry point.

BREAKING CHANGES:
* `extraClasses` which was deprecated in 5.0.0 has been removed. Use `panelClass` instead.
2018-03-09 07:30:46 -08:00
mmalerba 158b1dbc0b feat(form-field): allow setting default appearance via provider (#9815) 2018-03-09 07:29:33 -08:00
Kristiyan Kostadinov 498534bbaa fix(icon): namespace error when registering an icon on the server (#10175)
Fixes the `MatIconRegistry` throwing a namespace error on the server due to the `xmlns` attribute. These changes remove the attribute, because it's optional under HTML5.

Fixes #10170.
2018-03-09 07:29:08 -08:00
Kristiyan Kostadinov 34e96f5d9d fix(bottom-sheet): error when attempting to open multiple instances quickly (#10147)
Fixes an error that is thrown when attempting to open more than three bottom sheets in quick succession.
2018-03-09 07:28:39 -08:00
Kristiyan Kostadinov 9337ae181f fix(chips): form field label pointing to non-existing elements (#9908)
Currently when a `mat-chip-list` is inside of a form field, the label of the form field has a `for` and `aria-owns` attributes that point to a non-existing element, because the `id` from the chip list isn't being used anywhere. These changes switch it to point to the chip list input, if it has any, otherwise it'll fall back to pointing to the chip list itself.
2018-03-09 07:28:08 -08:00
Kristiyan Kostadinov c42549ee29 feat(datepicker): add animation to calendar popup (#8999)
Adds an animation when opening and closing the datepicker's calendar.

BREAKING CHANGES:
* `MatDatePicker` now requires an animations module to be loaded
2018-03-09 07:26:07 -08:00
Joey Perrott c224300dd2 chore: update to angular 6.0.0-beta.7 (#10318) 2018-03-08 14:29:34 -08:00
Johan CHOUQUET f64cef404b docs(overlay): add 1 word in the comments for API (#10321)
Just like the API GlobalPositionStrategy, I believe this word was missing.
2018-03-08 09:43:32 -08:00
Austin e7533a5dc2 feat(schematics): table schematic (#10012) 2018-03-07 17:11:25 -08:00
Austin 279c11237c feat(schematics): navigation schematic (#10009) 2018-03-07 16:42:42 -08:00
mmalerba 877eb85c41 docs(sidenav): add docs for hasBackdrop (#10287) 2018-03-06 13:25:40 -05:00
Kristiyan Kostadinov 7ff086afd1 build: add stylelint rule to avoid top-level ampersands in themes (#10280)
* Adds a stylelint rule that will log a warning for top-level ampersand selectors inside of mixins. This will help us avoid issues like #9991 in the future.
* Makes the `mat-radio-color` internal.
2018-03-06 11:17:37 -05:00
Kristiyan Kostadinov 140c94e2d1 fix(menu): closed nested menu chain when tabbing away (#7750)
Currently when tabbing inside a sub-menu, only the sub-menu is closed which restores focus to its parent. This is wrong, because it ends up sending the user back in the tab order. These changes close the whole chain of nested menus instead. For referece: https://www.w3.org/TR/wai-aria-practices-1.1/#menu
2018-03-06 10:43:49 -05:00
Kristiyan Kostadinov 8830486039 chore: bump to 6.0.0-beta.6 and remove explicit preserveWhitespaces setting (#10216)
* Bumps the Angular version to at least 6.0.0-beta.6.
* Removes all of the `preserveWhitespaces` declarations, because the option is now `false` by default.
* Removes the tslint requirement for `preserveWhitespaces`.
2018-03-06 10:42:53 -05:00
Kristiyan Kostadinov d01c58c33c feat(slider): add the ability to apply custom formatting to thumb label (#10243)
Adds the `displayWith` input on the slider that allows consumers to specify how the thumb label will be formatting. This is useful for cases like very large numbers where the number might be too long for the thumb label.

Fixes #9431.
2018-03-06 10:42:14 -05:00
Kristiyan Kostadinov 583fe151fd fix(drawer): show backdrop in "side" mode if hasBackdrop is explicitly set to true (#10251)
Currently we only use `hasBackdrop` to hide the backdrop, however setting it to `true` explicitly also expresses an intent that the consumer might want the backdrop to always be shown. These changes make it so backdrop will also be shown for `side` drawers if `hasBackdrop` is set to `true`.
2018-03-06 10:41:34 -05:00
Kristiyan Kostadinov 0c64b15f3d fix(bottom-sheet): not visible in high contrast mode (#10265)
Fixes the bottom sheet not being distinguishable against the background in high contrast mode.
2018-03-06 10:40:44 -05:00
Kristiyan Kostadinov f91334af2f refactor(observers): remove 6.0.0 deletion targets (#10267)
Removes the deletion targets for 6.0.0 in the `cdk/observers` entry point.

BREAKING CHANGES:
* `ObserveContent` which was deprecated in 5.0.0 has been removed. Use `CdkObserveContent` instead.
2018-03-06 10:40:07 -05:00
Kristiyan Kostadinov c44e253261 feat(snack-bar): add the ability to open from a TemplateRef (#10268)
Allows consumers to open a snack bar through a custom `TemplateRef`, in addition to a component type.

Fixes #6136.
2018-03-06 10:39:40 -05:00
mmalerba 749f2a0c82 fix(datepicker): toggle should inherit color from mat-form-field (#10245) 2018-03-06 10:37:19 -05:00
Kristiyan Kostadinov be0f17e28a fix(select, autocomplete): no indication of active option in high contrast mode. (#10229)
Fixes users in high contrast mode not being able to distinguish the active option from all the other options.

Fixes #10207.
2018-03-06 10:36:12 -05:00
Kristiyan Kostadinov 3f8523cdce refactor(radio): remove 6.0.0 deletion targets (#10218)
Removes the deletion targets for 6.0.0 in the `material/radio` entry point.

BREAKING CHANGES:
* `align` input in `MatRadioGroup` which was deprecated in 5.0.0 has been removed. Use `labelPosition` instead.
* `align` input in `MatRadioButton` which was deprecated in 5.0.0 has been removed. Use `labelPosition` instead.
2018-03-06 10:35:49 -05:00
Kristiyan Kostadinov 5c5f3b67ec perf(ripple): cache ClientRect between overlapping ripples (#10206)
Avoids doing extra `getBoundingClientRect` calls when there are multiple active ripples. The cache is cleared once the last ripple is removed.
2018-03-06 10:35:11 -05:00
Kristiyan Kostadinov ccf7a4d024 fix(overlay): OverlayKeyboardDispatcher not removing global event listener (#10160)
Fixes the `OverlayKeyboardDispatcher` not removing the global event listener, even though the subscription gets removed correctly. The issue seems to come from the fact that rxjs attaches the event using `useCapture = true`, however it doesn't pass the `useCapture` parameter when unsubscribing, which leaves listener in place. These changes switch to using `addEventListener` and `removeEventListener` to manage the event.

Fixes #10143.
2018-03-06 10:34:42 -05:00
Kristiyan Kostadinov 67cc2c2436 fix(autocomplete): closed event emitting when panel wasn't shown due to lack of options (#10176)
Adds an extra check to ensure that the `MatAutocomplete.closed` event won't emit when the user tried to open the panel, but it wasn't shown because there were no rendered options.

Fixes #10154.
2018-03-06 10:33:27 -05:00