77 */
88import {
99 animate ,
10+ AnimationTriggerMetadata ,
11+ keyframes ,
1012 state ,
1113 style ,
1214 transition ,
1315 trigger ,
14- AnimationTriggerMetadata ,
1516} from '@angular/animations' ;
1617
1718/** Animations used by MatTooltip. */
@@ -20,9 +21,13 @@ export const matTooltipAnimations: {
2021} = {
2122 /** Animation that transitions a tooltip in and out. */
2223 tooltipState : trigger ( 'state' , [
23- state ( 'initial, void, hidden' , style ( { transform : 'scale(0)' } ) ) ,
24+ state ( 'initial, void, hidden' , style ( { opacity : 0 , transform : 'scale(0)' } ) ) ,
2425 state ( 'visible' , style ( { transform : 'scale(1)' } ) ) ,
25- transition ( '* => visible' , animate ( '150ms cubic-bezier(0.0, 0.0, 0.2, 1)' ) ) ,
26- transition ( '* => hidden' , animate ( '150ms cubic-bezier(0.4, 0.0, 1, 1)' ) ) ,
26+ transition ( '* => visible' , animate ( '200ms cubic-bezier(0, 0, 0.2, 1)' , keyframes ( [
27+ style ( { opacity : 0 , transform : 'scale(0)' , offset : 0 } ) ,
28+ style ( { opacity : 0.5 , transform : 'scale(0.99)' , offset : 0.5 } ) ,
29+ style ( { opacity : 1 , transform : 'scale(1)' , offset : 1 } )
30+ ] ) ) ) ,
31+ transition ( '* => hidden' , animate ( '100ms cubic-bezier(0, 0, 0.2, 1)' , style ( { opacity : 0 } ) ) ) ,
2732 ] )
2833} ;
0 commit comments