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 Material snack bar.
@@ -21,33 +13,68 @@ import {
21
13
* @breaking -change 21.0.0
22
14
*/
23
15
export const matSnackBarAnimations : {
24
- readonly snackBarState : AnimationTriggerMetadata ;
16
+ readonly snackBarState : any ;
25
17
} = {
18
+ // Represents
19
+ // trigger('state', [
20
+ // state(
21
+ // 'void, hidden',
22
+ // style({
23
+ // transform: 'scale(0.8)',
24
+ // opacity: 0,
25
+ // }),
26
+ // ),
27
+ // state(
28
+ // 'visible',
29
+ // style({
30
+ // transform: 'scale(1)',
31
+ // opacity: 1,
32
+ // }),
33
+ // ),
34
+ // transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
35
+ // transition(
36
+ // '* => void, * => hidden',
37
+ // animate(
38
+ // '75ms cubic-bezier(0.4, 0.0, 1, 1)',
39
+ // style({
40
+ // opacity: 0,
41
+ // }),
42
+ // ),
43
+ // ),
44
+ // ])
45
+
26
46
/** Animation that shows and hides a snack bar. */
27
- snackBarState : trigger ( 'state' , [
28
- state (
29
- 'void, hidden' ,
30
- style ( {
31
- transform : 'scale(0.8)' ,
32
- opacity : 0 ,
33
- } ) ,
34
- ) ,
35
- state (
36
- 'visible' ,
37
- style ( {
38
- transform : 'scale(1)' ,
39
- opacity : 1 ,
40
- } ) ,
41
- ) ,
42
- transition ( '* => visible' , animate ( '150ms cubic-bezier(0, 0, 0.2, 1)' ) ) ,
43
- transition (
44
- '* => void, * => hidden' ,
45
- animate (
46
- '75ms cubic-bezier(0.4, 0.0, 1, 1)' ,
47
- style ( {
48
- opacity : 0 ,
49
- } ) ,
50
- ) ,
51
- ) ,
52
- ] ) ,
47
+ snackBarState : {
48
+ type : 7 ,
49
+ name : 'state' ,
50
+ 'definitions' : [
51
+ {
52
+ type : 0 ,
53
+ name : 'void, hidden' ,
54
+ styles : { type : 6 , styles : { transform : 'scale(0.8)' , opacity : 0 } , offset : null } ,
55
+ } ,
56
+ {
57
+ type : 0 ,
58
+ name : 'visible' ,
59
+ styles : { type : 6 , styles : { transform : 'scale(1)' , opacity : 1 } , offset : null } ,
60
+ } ,
61
+ {
62
+ type : 1 ,
63
+ expr : '* => visible' ,
64
+ animation : { type : 4 , styles : null , timings : '150ms cubic-bezier(0, 0, 0.2, 1)' } ,
65
+ options : null ,
66
+ } ,
67
+ {
68
+ type : 1 ,
69
+ expr : '* => void, * => hidden' ,
70
+ animation : {
71
+ type : 4 ,
72
+ styles : { type : 6 , styles : { opacity : 0 } , offset : null } ,
73
+ timings : '75ms cubic-bezier(0.4, 0.0, 1, 1)' ,
74
+ } ,
75
+ options : null ,
76
+ } ,
77
+ ] ,
78
+ options : { } ,
79
+ } ,
53
80
} ;
0 commit comments