@@ -18,7 +18,7 @@ import {ViewController} from '../nav/view-controller';
18
18
* dismissed by the user before they can resume interaction with the app.
19
19
* Dangerous (destructive) options are made obvious. There are easy
20
20
* ways to cancel out of the action sheet, such as tapping the backdrop or
21
- * hitting the escape key on desktop.
21
+ * hitting the escape key on desktop.
22
22
*
23
23
* An action sheet is created from an array of `buttons`, with each button
24
24
* including properties for its `text`, and optionally a `handler` and `role`.
@@ -363,3 +363,36 @@ class ActionSheetMdSlideOut extends Transition {
363
363
}
364
364
}
365
365
Transition . register ( 'action-sheet-md-slide-out' , ActionSheetMdSlideOut ) ;
366
+
367
+ class ActionSheetWpSlideIn extends Transition {
368
+ constructor ( enteringView : ViewController , leavingView : ViewController , opts : TransitionOptions ) {
369
+ super ( opts ) ;
370
+
371
+ let ele = enteringView . pageRef ( ) . nativeElement ;
372
+ let backdrop = new Animation ( ele . querySelector ( '.backdrop' ) ) ;
373
+ let wrapper = new Animation ( ele . querySelector ( '.action-sheet-wrapper' ) ) ;
374
+
375
+ backdrop . fromTo ( 'opacity' , 0.01 , 0.1 ) ;
376
+ wrapper . fromTo ( 'translateY' , '100%' , '0%' ) ;
377
+
378
+ this . easing ( 'cubic-bezier(.36,.66,.04,1)' ) . duration ( 450 ) . add ( backdrop ) . add ( wrapper ) ;
379
+ }
380
+ }
381
+ Transition . register ( 'action-sheet-wp-slide-in' , ActionSheetWpSlideIn ) ;
382
+
383
+
384
+ class ActionSheetWpSlideOut extends Transition {
385
+ constructor ( enteringView : ViewController , leavingView : ViewController , opts : TransitionOptions ) {
386
+ super ( opts ) ;
387
+
388
+ let ele = leavingView . pageRef ( ) . nativeElement ;
389
+ let backdrop = new Animation ( ele . querySelector ( '.backdrop' ) ) ;
390
+ let wrapper = new Animation ( ele . querySelector ( '.action-sheet-wrapper' ) ) ;
391
+
392
+ backdrop . fromTo ( 'opacity' , 0.1 , 0 ) ;
393
+ wrapper . fromTo ( 'translateY' , '0%' , '100%' ) ;
394
+
395
+ this . easing ( 'cubic-bezier(.36,.66,.04,1)' ) . duration ( 450 ) . add ( backdrop ) . add ( wrapper ) ;
396
+ }
397
+ }
398
+ Transition . register ( 'action-sheet-wp-slide-out' , ActionSheetWpSlideOut ) ;
0 commit comments