@@ -87,6 +87,16 @@ const expand = animation(
87
87
)
88
88
) ;
89
89
90
+ const expandRight = animation (
91
+ animate (
92
+ '{{duration}}ms {{delay}}ms' ,
93
+ keyframes ( [
94
+ style ( { width : '0' , visibility : 'hidden' , overflow : 'hidden' , easing : 'ease-out' , offset : 0 } ) ,
95
+ style ( { width : AUTO_STYLE , visibility : AUTO_STYLE , overflow : 'hidden' , easing : 'ease-out' , offset : 1 } )
96
+ ] )
97
+ )
98
+ ) ;
99
+
90
100
const fadeInExpand = animation (
91
101
animate (
92
102
'{{duration}}ms {{delay}}ms' ,
@@ -166,6 +176,31 @@ export function collapseOnLeaveAnimation(options?: IAnimationOptions): Animation
166
176
] ) ;
167
177
}
168
178
179
+ export function expandRightOnEnterAnimation ( options ?: IAnimationOptions ) : AnimationTriggerMetadata {
180
+ return trigger ( ( options && options . anchor ) || 'expandRightOnEnter' , [
181
+ transition (
182
+ ':enter' ,
183
+ animation ( [
184
+ style ( { visibility : 'hidden' } ) ,
185
+ ...( options && options . animateChildren === 'before' ? [ query ( '@*' , animateChild ( ) , { optional : true } ) ] : [ ] ) ,
186
+ group ( [
187
+ useAnimation ( expandRight ) ,
188
+ ...( ! options || ! options . animateChildren || options . animateChildren === 'together'
189
+ ? [ query ( '@*' , animateChild ( ) , { optional : true } ) ]
190
+ : [ ] )
191
+ ] ) ,
192
+ ...( options && options . animateChildren === 'after' ? [ query ( '@*' , animateChild ( ) , { optional : true } ) ] : [ ] )
193
+ ] ) ,
194
+ {
195
+ params : {
196
+ delay : ( options && options . delay ) || 0 ,
197
+ duration : ( options && options . duration ) || DEFAULT_DURATION
198
+ }
199
+ }
200
+ )
201
+ ] ) ;
202
+ }
203
+
169
204
export function fadeInExpandOnEnterAnimation ( options ?: IAnimationOptions ) : AnimationTriggerMetadata {
170
205
return trigger ( ( options && options . anchor ) || 'fadeInExpandOnEnter' , [
171
206
transition (
0 commit comments