@@ -16,17 +16,18 @@ import {
1616
1717/** Animations used by MatDialog. */
1818export const matDialogAnimations : {
19- readonly slideDialog : AnimationTriggerMetadata ;
19+ readonly dialogContainer : AnimationTriggerMetadata ;
2020} = {
21- /** Animation that slides the dialog in and out of view and fades the opacity. */
22- slideDialog : trigger ( 'slideDialog' , [
23- // Note: The `enter` animation doesn't transition to something like `translate3d(0, 0, 0)
24- // scale(1)`, because for some reason specifying the transform explicitly, causes IE both
25- // to blur the dialog content and decimate the animation performance. Leaving it as `none`
26- // solves both issues.
27- state ( 'enter' , style ( { transform : 'none' , opacity : 1 } ) ) ,
28- state ( 'void' , style ( { transform : 'translate3d(0, 25%, 0) scale(0.9)' , opacity : 0 } ) ) ,
29- state ( 'exit' , style ( { transform : 'translate3d(0, 25%, 0)' , opacity : 0 } ) ) ,
30- transition ( '* => *' , animate ( '400ms cubic-bezier(0.25, 0.8, 0.25, 1)' ) ) ,
21+ /** Animation that is applied on the dialog container by defalt. */
22+ dialogContainer : trigger ( 'dialogContainer' , [
23+ // Note: The `enter` animation transitions to `transform: none`, because for some reason
24+ // specifying the transform explicitly, causes IE both to blur the dialog content and
25+ // decimate the animation performance. Leaving it as `none` solves both issues.
26+ state ( 'void' , style ( { opacity : 0 , transform : 'scale(0.7)' } ) ) ,
27+ state ( 'enter' , style ( { transform : 'none' } ) ) ,
28+ transition ( '* => enter' , animate ( '150ms cubic-bezier(0, 0, 0.2, 1)' ,
29+ style ( { transform : 'none' , opacity : 1 } ) ) ) ,
30+ transition ( 'enter => void, enter => exit' ,
31+ animate ( '75ms cubic-bezier(0.4, 0.0, 0.2, 1)' , style ( { opacity : 0 } ) ) ) ,
3132 ] )
3233} ;
0 commit comments