File tree Expand file tree Collapse file tree 7 files changed +519
-507
lines changed
src/material-experimental Expand file tree Collapse file tree 7 files changed +519
-507
lines changed Original file line number Diff line number Diff line change 4242 },
4343 "version" : " 9.0.0-rc.0" ,
4444 "requiredAngularVersion" : " ^9.0.0-0 || ^10.0.0-0" ,
45- "requiredMDCVersion" : " ^4.0.0-canary.062ade5c0.0 " ,
45+ "requiredMDCVersion" : " ^4.0.0" ,
4646 "dependencies" : {
4747 "@angular/animations" : " ^9.0.0-rc.0" ,
4848 "@angular/common" : " ^9.0.0-rc.0" ,
5555 "@types/youtube" : " ^0.0.38" ,
5656 "@webcomponents/custom-elements" : " ^1.1.0" ,
5757 "core-js" : " ^2.6.9" ,
58- "material-components-web" : " ^4.0.0-canary.062ade5c0.0 " ,
58+ "material-components-web" : " ^4.0.0" ,
5959 "rxjs" : " ^6.5.3" ,
6060 "systemjs" : " 0.19.43" ,
6161 "tsickle" : " ^0.37.0" ,
Original file line number Diff line number Diff line change 22# all in-sync. This map is passed to each ng_package rule to stamp out the appropriate
33# version for the placeholders.
44ANGULAR_PACKAGE_VERSION = "^9.0.0-0 || ^10.0.0-0"
5- MDC_PACKAGE_VERSION = "^4.0.0-canary.062ade5c0.0 "
5+ MDC_PACKAGE_VERSION = "^4.0.0"
66VERSION_PLACEHOLDER_REPLACEMENTS = {
77 "0.0.0-MDC" : MDC_PACKAGE_VERSION ,
88 "0.0.0-NG" : ANGULAR_PACKAGE_VERSION ,
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ sass_binary(
4747 "external/npm/node_modules" ,
4848 ],
4949 deps = [
50+ "//src/material-experimental/mdc-helpers:mdc_helpers_scss_lib" ,
5051 "//src/material-experimental/mdc-helpers:mdc_scss_deps_lib" ,
5152 "//src/material/core:core_scss_lib" ,
5253 ],
Original file line number Diff line number Diff line change 44@import ' ../../material/core/style/menu-common' ;
55@import ' ../../material/core/style/button-common' ;
66@import ' ../../cdk/a11y/a11y' ;
7+ @import ' ../mdc-helpers/mdc-helpers' ;
78
89@include mdc-menu-surface-core-styles ($query : structure);
910
2829}
2930
3031.mat-mdc-menu-item {
32+ $height : mdc-density-prop-value (
33+ $density-config : $mdc-list-single-line-density-config ,
34+ $density-scale : $mdc-list-single-line-density-scale ,
35+ $property-name : height ,
36+ );
37+
3138 // Note that we include this private mixin, because the public
3239 // one adds a bunch of styles that we aren't using for the menu.
3340 @include mdc-list-item-base_ ;
3441
3542 // MDC's menu items are `<li>` nodes which don't need resets, however ours
3643 // can be anything, including buttons, so we need to do the reset ourselves.
3744 @include mat-button-reset ;
45+ @include mdc-list-single-line-height ($height , $query : $mat-base-styles-query );
3846 cursor : pointer ;
3947 width : 100% ;
4048 text-align : left ;
Original file line number Diff line number Diff line change @@ -73,16 +73,16 @@ describe('MatProgressBar', () => {
7373 progressElement . nativeElement . querySelector ( '.mdc-linear-progress__buffer' ) . style ;
7474
7575 expect ( primaryStyles . transform ) . toBe ( 'scaleX(0)' ) ;
76- expect ( bufferStyles . transform ) . toBeFalsy ( ) ;
76+ expect ( bufferStyles . transform ) . toBe ( 'scaleX(1)' ) ;
7777
7878 progressComponent . value = 40 ;
7979 expect ( primaryStyles . transform ) . toBe ( 'scaleX(0.4)' ) ;
80- expect ( bufferStyles . transform ) . toBeFalsy ( ) ;
80+ expect ( bufferStyles . transform ) . toBe ( 'scaleX(1)' ) ;
8181
8282 progressComponent . value = 35 ;
8383 progressComponent . bufferValue = 55 ;
8484 expect ( primaryStyles . transform ) . toBe ( 'scaleX(0.35)' ) ;
85- expect ( bufferStyles . transform ) . toBeFalsy ( ) ;
85+ expect ( bufferStyles . transform ) . toBe ( 'scaleX(1)' ) ;
8686
8787 progressComponent . mode = 'buffer' ;
8888 expect ( primaryStyles . transform ) . toBe ( 'scaleX(0.35)' ) ;
Original file line number Diff line number Diff line change @@ -81,18 +81,13 @@ export class MatProgressBar extends _MatProgressBarMixinBase implements AfterVie
8181 addClass : ( className : string ) => this . _rootElement . classList . add ( className ) ,
8282 getBuffer : ( ) => this . _bufferBar ,
8383 getPrimaryBar : ( ) => this . _primaryBar ,
84- // TODO(crisbeto): remove the ` as MDCLinearProgressAdapter` below once this is released:
85- // tslint:disable-next-line:max-line-length
86- // https://github.com/material-components/material-components-web/commit/062ade5c052cf00cefeee6e8e0acf7d16c4ce338
87- // We add `forceLayout` before the code requiring it is in the canary
88- // release so that our cronjob that runs against master doesn't fail.
8984 forceLayout : ( ) => this . _platform . isBrowser && this . _rootElement . offsetWidth ,
9085 hasClass : ( className : string ) => this . _rootElement . classList . contains ( className ) ,
9186 removeClass : ( className : string ) => this . _rootElement . classList . remove ( className ) ,
9287 setStyle : ( el : HTMLElement , styleProperty : string , value : string ) => {
9388 ( el . style as any ) [ styleProperty ] = value ;
9489 }
95- } as MDCLinearProgressAdapter ;
90+ } ;
9691
9792 /** Flag that indicates whether NoopAnimations mode is set to true. */
9893 _isNoopAnimation = false ;
You can’t perform that action at this time.
0 commit comments