5
5
* Use of this source code is governed by an MIT-style license that can be
6
6
* found in the LICENSE file at https://angular.dev/license
7
7
*/
8
- import {
9
- animate ,
10
- state ,
11
- style ,
12
- transition ,
13
- trigger ,
14
- AnimationTriggerMetadata ,
15
- } from '@angular/animations' ;
16
8
17
9
/**
18
10
* Animations used by the MatFormField.
@@ -21,15 +13,42 @@ import {
21
13
* @breaking -change 21.0.0
22
14
*/
23
15
export const matFormFieldAnimations : {
24
- readonly transitionMessages : AnimationTriggerMetadata ;
16
+ readonly transitionMessages : any ;
25
17
} = {
18
+ // Represents:
19
+ // trigger('transitionMessages', [
20
+ // // TODO(mmalerba): Use angular animations for label animation as well.
21
+ // state('enter', style({opacity: 1, transform: 'translateY(0%)'})),
22
+ // transition('void => enter', [
23
+ // style({opacity: 0, transform: 'translateY(-5px)'}),
24
+ // animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),
25
+ // ]),
26
+ // ])
27
+
26
28
/** Animation that transitions the form field's error and hint messages. */
27
- transitionMessages : trigger ( 'transitionMessages' , [
28
- // TODO(mmalerba): Use angular animations for label animation as well.
29
- state ( 'enter' , style ( { opacity : 1 , transform : 'translateY(0%)' } ) ) ,
30
- transition ( 'void => enter' , [
31
- style ( { opacity : 0 , transform : 'translateY(-5px)' } ) ,
32
- animate ( '300ms cubic-bezier(0.55, 0, 0.55, 0.2)' ) ,
33
- ] ) ,
34
- ] ) ,
29
+ transitionMessages : {
30
+ type : 7 ,
31
+ name : 'transitionMessages' ,
32
+ definitions : [
33
+ {
34
+ type : 0 ,
35
+ name : 'enter' ,
36
+ styles : {
37
+ type : 6 ,
38
+ styles : { opacity : 1 , transform : 'translateY(0%)' } ,
39
+ offset : null ,
40
+ } ,
41
+ } ,
42
+ {
43
+ type : 1 ,
44
+ expr : 'void => enter' ,
45
+ animation : [
46
+ { type : 6 , styles : { opacity : 0 , transform : 'translateY(-5px)' } , offset : null } ,
47
+ { type : 4 , styles : null , timings : '300ms cubic-bezier(0.55, 0, 0.55, 0.2)' } ,
48
+ ] ,
49
+ options : null ,
50
+ } ,
51
+ ] ,
52
+ options : { } ,
53
+ } ,
35
54
} ;
0 commit comments