Commit Graph

1251 Commits

Author SHA1 Message Date
Paul Gschwendtner 970847e4a4 build: fix universal prerendering task (#4931)
Fixes the Universal Prerendering task by using the same workaround as for the AOT job (building sources in the output directory already)

Building the sources in the output directory (similar as for the AOT task) is theonly known workaround for https://github.com/angular/angular/issues/12249
2017-06-02 09:39:49 -07:00
Kristiyan Kostadinov 615fa2a3fc fix(button,tabs): potential clash with typography styles (#4915)
Since the buttons and tabs depend on their `line-height` for sizing, we shouldn't override it via the typography styles. This fix removes the `line-height` that is set from the typography, in order to prevent potential issues.
2017-06-01 13:26:52 -07:00
Jeremy Elbourn f169152638 build: add missing bits for material-examples package (#4887)
Adds:
* Missing `flatModuleId` from the ngc options
* Makes templateUrl and styleUrls for example components match material
components.
2017-05-31 16:17:50 -07:00
Kristiyan Kostadinov e650b049af feat: integrate typography api into all components (#4375)
* feat: integrate typography api into all components

* Includes the base typography styles for headers, body text etc.
* Adds mixins for typography next to the theme and moves out all of the component typography styles into them.
* Switches all the hardcoded typography values to use the ones from the spec.
* Adjusts the letter spacing on some of the headers to align them to the spec.

**Note:** While going through the components, I haven't checked whether the styles are accurate in regards to the spec. I've left notes in the places where the font sizes weren't a part of the pre-defined ones.

* fix: address feedback

* fix: explicit toolbar header typography

* chore: add comments about letter spacing

* fix: theme error

* chore: re-add $mat-font-family

* fix: missing typography for mat-icon-button
2017-05-31 13:53:20 -07:00
Kristiyan Kostadinov 0c03946ac6 fix(input): set aria-invalid on mdInput element (#4757)
* Sets the `aria-invalid` attribute on the `mdInput` node, depending on whether it is invalid.
* Moves the `_isErrorState` logic to the input child to avoid a circular dependency.
2017-05-30 17:00:20 -07:00
Jeremy Elbourn be8d3b23d2 fix(datepicker): generate api docs (#4756)
This also adds handling for directives with generics, which we have not had before. Dgeni treats this as "members" and they need to be disambiguated from properties.
2017-05-30 17:00:05 -07:00
Kara b3b6fdad1a fix(autocomplete): show hover style on selected options (#4724) 2017-05-30 16:59:53 -07:00
Josip Bojčić 28c936f122 feat(dialog): custom class option #4718 #4012 (#4722)
* feat(dialog): custom class option

Extend dialog config options to allow custom dialog class. Custom class enables media queries.

#4718 #4012

* refactor(dialog): custom class option.

Changed custom class config option name. Remove unnecessary class removal on detach.

#4718 #4012

* test(dialog): custom class option.

Added missing unit test to check if overlay pane has custom panel class.

#4718 #4012

* refactor(dialog): custom class option.

Change wrong comment. Remove unnecessary beforeEach from test.

#4718 #4012
2017-05-30 16:59:35 -07:00
Kristiyan Kostadinov 99293d903e feat(select): add input for adding classes to the panel (#4629)
Adds the `panelClass` input, which allows consumers to set extra classes on a select's panel.

Fixes #4485.
2017-05-30 16:59:12 -07:00
Paul Gschwendtner 3f08e37d13 build: serve e2e-app in aot mode (#4833)
* build: serve e2e-app in aot mode

* Starts building the e2e-app in AOT mode

* Address comments
2017-05-30 10:38:32 -07:00
Paul Gschwendtner 3a14d3a900 build: duplicate theme styles in demo-app (#4850)
* Recently the `theme.scss` file was added in favor of the dark theme button for our demo-app. The import for the prebuilt theme was still there and caused the theme styles to exist twice (overlapping)
2017-05-30 09:26:39 -07:00
Paul Gschwendtner dba0ece0bb chore(slide-toggle): demo for slide-toggle with forms (#4848)
Closes #3161
2017-05-30 09:25:03 -07:00
Paul Gschwendtner 0103d2a13a chore: remove unused environment file (#4845)
* Removes the unused envrionment file from the old build process with the Angular CLI
2017-05-30 09:24:38 -07:00
Kristiyan Kostadinov 55bc146a10 docs: add note about button capitalization (#4829)
Adds a note about why we don't do button capitalization.

Fixes #4821.
2017-05-30 09:23:48 -07:00
Paul Gschwendtner fb5520cebf build: move server rendering to dist (#4822)
* build: move server rendering to dist

* Verifying that Material works with `platform-server` now happens in the `dist/` folder (instead of the src/ folder)
* Adds a gulp task to build the universal application. In the future serving the app will be also part of this

* Address comments
2017-05-30 09:22:18 -07:00
Will Howell 2103907a5a fix(input): correct invalid colors (#4771)
* fix(input): correct invalid colors

- Make ripple & placeholder use warn color even with .mat-accent class
- Make req'd asterisk warn color whenever input is invalid

* Address comments
2017-05-26 12:34:57 -06:00
Kristiyan Kostadinov 9e2a66cbc2 fix(autocomplete): handle escape key (#4703)
* Closes the autocomplete panel when pressing escape.
* Switches the autocomplete unit tests to using the common utility for creating fake keyboard events.
2017-05-26 12:34:39 -06:00
Kristiyan Kostadinov eadccc2f76 feat(datepicker): popup positioning improvements (#4696)
* feat(datepicker): popup positioning improvements

* Adds fallback positions to the datepicker popup, allowing it to reposition in the cases where it would've gone outside the viewport.
* Fixes an issue that prevented the datepicker from the being positioned properly on the first open due to the calendar not being rendered yet.
* Adds a scroll strategy to reposition the datepicker when the user scrolls away.
* Switches to using `ngSwitch` instead of `ngIf` when determining which view to render.

Fixes #4406.

* chore: unused imports
2017-05-26 12:34:29 -06:00
Philip Sultanescu b2c3ed030d fix(datepicker): minValidator & maxValidation false errors (#4649)
* Min and max dates give false validation errors when selected date is one of the two
* Include unit-tests to catch min/max validation errors
2017-05-26 12:34:20 -06:00
Jeremy Elbourn 97d69fb3f8 build: add ci task for server-side prerender (#4808)
This adds a new task for Travis CI to prerender an app using
@angular/material. This change starts off by only adding buttons to the
application; more components will be added in a subsequent PR so that
this one stays focused on the set-up.
2017-05-25 17:51:11 -06:00
Andrew Seguin 7db2762d78 feat(data-table): minimal beginning implementation (#4468)
* feat(cdk-table): initial version

* add files

* remove unnecessary deps

* add test

* add tests

* edit comments

* minor style changes

* changes due to comments

* add test for column classes

* add OnPush to rest of components

* remove double quotes from colors.ts

* lint fies

* add comments to demo css

* comments

* split directives into separate files

* lint

* add content check in tests

* renaming directives

* remove fdescribe

* rename private placeholders; adjust comments; change CollectionViewer

* lint

* change jasmine array param

* remove unnecessary import from spec

* move out of core; add console warning about instability

* move jasmine-matchers

* fix demo
2017-05-25 17:50:32 -06:00
tinayuangao 5c489497c3 fix(checkbox, radio): Fix checkbox label not read in JAWS (#4610)
* Fix checkbox label not read in JAWS

* use another way
2017-05-25 17:49:53 -06:00
tinayuangao 97a9bdc383 fix(radio): Make MdRadioButton change detection strategy OnPush (#2526)
* Make MdRadioButton OnPush

* .

* Fixed tests

* fixed group ripple disabled test

* fix lint

* fix test

* sync and fix test

* address comments

* address comments
2017-05-25 17:44:07 -06:00
Paul Gschwendtner 1789f40722 chore(checkbox): duplicate event binding in tests (#4758)
* Removes the duplicate event binding for the `(change)` event in the checkbox tests.
2017-05-25 14:36:25 -06:00
Jeremy Elbourn e3b2587294 build: import tslib instead of letting tsc generate helpers (#4787) 2017-05-25 14:36:02 -06:00
Kristiyan Kostadinov 0e2434568d feat(snack-bar): allow setting the layout direction (#4726)
* feat(snack-bar): allow setting the layout direction

* Allows the consumer to set the layout direction of a snack bar.
* Fixes some bad indentation in the snack bar tests.

Fixes #4721.

* fix: turn off view encapsulation

* chore: revert capitalization
2017-05-23 15:00:35 -06:00
Andrew Baumann ae46810110 refactor(tabs-demo): replace active link index with active router link isActive property (#4729)
Motivation is to remove the current comment "can be removed if routerLink exposes if it is active". Current router link implementation does allow the itActive flag.
2017-05-23 14:59:57 -06:00
Kristiyan Kostadinov 3212411a8d fix(icon): handle icons as <symbol> nodes (#4699)
* fix(icon): handle icons as <symbol> nodes

Fixes icons not being rendered if they're defined as a `<symbol>` inside the source file.

Fixes #4680.

* chore: fix IE issues
2017-05-23 14:58:09 -06:00
Will Howell fa0e91468e docs(input): cleanup property comments for generated docs (#4751)
* Convert comments to jsdoc for MdHint

* Add jsdoc comment for mdInput.empty

* Add underlineRef jsdoc comment and change grammar of hideRequiredMarker
2017-05-23 14:56:58 -06:00
Paul Gschwendtner 62d62e23c7 chore(examples): fix color binding for progress-spinner (#4687)
* Replaces the invalid `attr.color` with a property binding. This fixes the progress-spinner demo on the docs.

Fixes #4617
2017-05-23 14:55:42 -06:00
Will Howell db72b06b97 fix(select): deselect old options when programmatically setting value (#4658)
* fix(select): deselect old options when programmatically setting value

* Review changes

* Fix lint issues: line length
2017-05-23 14:55:25 -06:00
Kristiyan Kostadinov 13524c14d1 fix(select): allow option with undefined or null value to clear selection (#3141)
* fix(select): allow option with undefined or null value to clear selection

Allows for options, with a value of `null` or `undefined`, to clear the select. This is similar to the way the native select works.

Fixes #3110.
Fixes #2634.

* fix: address feedback
2017-05-23 14:54:37 -06:00
Paul Gschwendtner a41ef278cb build: upgrade dev dependencies (#4707)
* build: upgrade dev dependencies

* Upgrades outdated development dependencies to the latest versions.
* Skipped upgrading Autoprefixer due to a breaking change with the Browserlist.
* Skipped upgrading UglifyJS due to unresolved issues in UglifyJS3
* Skipped upgrading google-closure-compiler due to https://github.com/alexeagle/closure-compiler-angular-bundling/issues/30
* Skipped upgrading jasmine types because they now enforce types in `expect` calls (which is nice) but for Protractor the `expect` automatically unwraps promises (See https://github.com/angular/protractor/issues/4176)

* Lock jasmine types
2017-05-22 15:59:11 -06:00
Kristiyan Kostadinov eecf8976d6 fix(autocomplete): restore focus to input when click on option (#4702)
Restores focus to the autocomplete input when an option is clicked, instead of dumping it into the body.

Fixes #4645.
2017-05-22 15:57:59 -06:00
mmalerba b5b762abcf fix(datepicker): make datepicker work in compatibility mode (#4686)
* fix(datepicker): make datepicker work in compatibility mode

* add test

* address comments
2017-05-22 15:56:57 -06:00
Jeremy Elbourn 210e57c3ef fix(menu): close menu panel on escape (#4666)
Fixes to #3601
2017-05-22 15:56:25 -06:00
Paul Gschwendtner fa5b4278ff chore: no longer use MaterialModule (#4571)
* Replaces the `MaterialModule` with custom NgModules that contain all required Material modules.

Closes #4532
2017-05-22 15:52:53 -06:00
Kristiyan Kostadinov 2d16345c07 fix(list-key-manager): remove handling for home and end keys (#4544)
* Removes the handling for the home and end keys from the ListKeyManager since their usage isn't as generic as the arrow keys.
* Adds the home and end key handling to the select specifically.
* Reworks the Autocomplete, ListKeyManager and ChipList tests to use the `createKeyboardEvent`, instead of making their own fake keyboard events.
* Adds a `target` parameter to the `createKeyboardEvent` function, allowing us to define the event target.

Fixes #3496.
2017-05-22 15:48:16 -06:00
mmalerba c53bbbaa11 cleanup(datepicker): move pane styles from calendar to datepicker-content (#4504) 2017-05-22 15:46:03 -06:00
Will Howell fce28681de fix(button): complete ripple when button becomes disabled (#4372)
* Do not destroy the ripple when it is disabled

* Update tests
2017-05-22 15:42:36 -06:00
Jinkyou Son(mayTree) c45dee2021 feat(dialog): add result to MdDialogClose directive (#4332)
MdDialog has MdDialogClose to make it easier to structure a dialog.
But as MdDialogClose doesn't return any value, it's imposibble to use MdDialogClose if you want to get any return value when MdDialog is close.
So `@Input('md-dialog-close')result` is added to MdDialogClose to solve it.

no breaking changes
2017-05-22 15:38:30 -06:00
Kristiyan Kostadinov 2cf19a3a85 build: add toggle for OnPush change detection in demo app (#3675)
* build: add toggle for OnPush change detection in demo app

Adds a toggle for enabling `OnPush` change detection in the demo app. This should make it easier to test out components with the different change detection strategies.

* chore: refer to global variables via the window
2017-05-22 12:28:14 -06:00
Kristiyan Kostadinov 3a379b394a test: infinite loop in tests (#4662)
Fixes some unit tests going into an infinite loop by using the `jasmine.any` matcher. Not exactly sure what is going on, but it was most likely introduced in Jasmine 2.6.2. For now I've replaced those matches with `instanceof` checks which accomplish the same.

Fixes #4654.
2017-05-22 09:37:12 -07:00
mmalerba c946631899 feat(focus-trap): allow setting initially focused element (#4577) 2017-05-18 17:06:46 -07:00
mmalerba 0b5b6247f6 fix(slider): add aria-orientation (#4602) 2017-05-18 17:06:20 -07:00
Kristiyan Kostadinov 07a82eda06 fix(chips): unable to tab out of chip list (#4605)
* Fixes not being able to escape focus from an `md-chip-list` backwards via shift+tab on all browsers.
* Fixes not being able to tab out of an `md-chip-list` at all on Firefox.

Fixes #4593.
2017-05-18 17:05:38 -07:00
Paul Gschwendtner 45e087936b chore(sidenav): remove unused method parameter (#4632)
* Removes the unused`sidenav` variable in the `_setContainerClass` method.
2017-05-18 17:05:10 -07:00
Jeremy Elbourn e4c76015f6 fix(universal): gate platform checks on being on browser (#4635)
Related to #308
2017-05-18 17:04:51 -07:00
Kristiyan Kostadinov f11d46e75e fix(block-scroll-strategy): collapsing root node when enabled (#4638)
* Prevents the `html` tag from collapsing when the `BlockScrollStrategy` is enabled.
* Fixes the scroll strategy not being disabled properly in tests.
2017-05-18 17:04:37 -07:00
Kristiyan Kostadinov 96549e808b fix(overlay): overlays potentially being rendered behind browser UI (#4664)
Reverts back from using viewport units to size up the overlay container. Using viewport units can cause some overlays (e.g. the snack bar) to be rendered behind the native browser UI.

Fixes #4650.
2017-05-18 17:04:23 -07:00