action-sheet-transitions.js 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = Object.setPrototypeOf ||
  3. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5. return function (d, b) {
  6. extendStatics(d, b);
  7. function __() { this.constructor = d; }
  8. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  9. };
  10. })();
  11. import { Animation } from '../../animations/animation';
  12. import { Transition } from '../../transitions/transition';
  13. var ActionSheetSlideIn = (function (_super) {
  14. __extends(ActionSheetSlideIn, _super);
  15. function ActionSheetSlideIn() {
  16. return _super !== null && _super.apply(this, arguments) || this;
  17. }
  18. ActionSheetSlideIn.prototype.init = function () {
  19. var ele = this.enteringView.pageRef().nativeElement;
  20. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  21. var wrapper = new Animation(this.plt, ele.querySelector('.action-sheet-wrapper'));
  22. backdrop.fromTo('opacity', 0.01, 0.4);
  23. wrapper.fromTo('translateY', '100%', '0%');
  24. this.easing('cubic-bezier(.36,.66,.04,1)').duration(400).add(backdrop).add(wrapper);
  25. };
  26. return ActionSheetSlideIn;
  27. }(Transition));
  28. export { ActionSheetSlideIn };
  29. var ActionSheetSlideOut = (function (_super) {
  30. __extends(ActionSheetSlideOut, _super);
  31. function ActionSheetSlideOut() {
  32. return _super !== null && _super.apply(this, arguments) || this;
  33. }
  34. ActionSheetSlideOut.prototype.init = function () {
  35. var ele = this.leavingView.pageRef().nativeElement;
  36. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  37. var wrapper = new Animation(this.plt, ele.querySelector('.action-sheet-wrapper'));
  38. backdrop.fromTo('opacity', 0.4, 0);
  39. wrapper.fromTo('translateY', '0%', '100%');
  40. this.easing('cubic-bezier(.36,.66,.04,1)').duration(300).add(backdrop).add(wrapper);
  41. };
  42. return ActionSheetSlideOut;
  43. }(Transition));
  44. export { ActionSheetSlideOut };
  45. var ActionSheetMdSlideIn = (function (_super) {
  46. __extends(ActionSheetMdSlideIn, _super);
  47. function ActionSheetMdSlideIn() {
  48. return _super !== null && _super.apply(this, arguments) || this;
  49. }
  50. ActionSheetMdSlideIn.prototype.init = function () {
  51. var ele = this.enteringView.pageRef().nativeElement;
  52. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  53. var wrapper = new Animation(this.plt, ele.querySelector('.action-sheet-wrapper'));
  54. backdrop.fromTo('opacity', 0.01, 0.26);
  55. wrapper.fromTo('translateY', '100%', '0%');
  56. this.easing('cubic-bezier(.36,.66,.04,1)').duration(400).add(backdrop).add(wrapper);
  57. };
  58. return ActionSheetMdSlideIn;
  59. }(Transition));
  60. export { ActionSheetMdSlideIn };
  61. var ActionSheetMdSlideOut = (function (_super) {
  62. __extends(ActionSheetMdSlideOut, _super);
  63. function ActionSheetMdSlideOut() {
  64. return _super !== null && _super.apply(this, arguments) || this;
  65. }
  66. ActionSheetMdSlideOut.prototype.init = function () {
  67. var ele = this.leavingView.pageRef().nativeElement;
  68. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  69. var wrapper = new Animation(this.plt, ele.querySelector('.action-sheet-wrapper'));
  70. backdrop.fromTo('opacity', 0.26, 0);
  71. wrapper.fromTo('translateY', '0%', '100%');
  72. this.easing('cubic-bezier(.36,.66,.04,1)').duration(450).add(backdrop).add(wrapper);
  73. };
  74. return ActionSheetMdSlideOut;
  75. }(Transition));
  76. export { ActionSheetMdSlideOut };
  77. var ActionSheetWpSlideIn = (function (_super) {
  78. __extends(ActionSheetWpSlideIn, _super);
  79. function ActionSheetWpSlideIn() {
  80. return _super !== null && _super.apply(this, arguments) || this;
  81. }
  82. ActionSheetWpSlideIn.prototype.init = function () {
  83. var ele = this.enteringView.pageRef().nativeElement;
  84. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  85. var wrapper = new Animation(this.plt, ele.querySelector('.action-sheet-wrapper'));
  86. backdrop.fromTo('opacity', 0.01, 0.16);
  87. wrapper.fromTo('translateY', '100%', '0%');
  88. this.easing('cubic-bezier(.36,.66,.04,1)').duration(400).add(backdrop).add(wrapper);
  89. };
  90. return ActionSheetWpSlideIn;
  91. }(Transition));
  92. export { ActionSheetWpSlideIn };
  93. var ActionSheetWpSlideOut = (function (_super) {
  94. __extends(ActionSheetWpSlideOut, _super);
  95. function ActionSheetWpSlideOut() {
  96. return _super !== null && _super.apply(this, arguments) || this;
  97. }
  98. ActionSheetWpSlideOut.prototype.init = function () {
  99. var ele = this.leavingView.pageRef().nativeElement;
  100. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  101. var wrapper = new Animation(this.plt, ele.querySelector('.action-sheet-wrapper'));
  102. backdrop.fromTo('opacity', 0.1, 0);
  103. wrapper.fromTo('translateY', '0%', '100%');
  104. this.easing('cubic-bezier(.36,.66,.04,1)').duration(450).add(backdrop).add(wrapper);
  105. };
  106. return ActionSheetWpSlideOut;
  107. }(Transition));
  108. export { ActionSheetWpSlideOut };
  109. //# sourceMappingURL=action-sheet-transitions.js.map