mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
chore(packages): move the packages to root
This commit is contained in:
27
core/src/components/loading/animations/ios.enter.ts
Normal file
27
core/src/components/loading/animations/ios.enter.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { Animation } from '../../../index';
|
||||
|
||||
|
||||
/**
|
||||
* iOS Loading Enter Animation
|
||||
*/
|
||||
export default function iosEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const backdropAnimation = new Animation();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper'));
|
||||
|
||||
backdropAnimation.fromTo('opacity', 0.01, 0.3);
|
||||
|
||||
wrapperAnimation.fromTo('opacity', 0.01, 1)
|
||||
.fromTo('scale', 1.1, 1);
|
||||
|
||||
return Promise.resolve(baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease-in-out')
|
||||
.duration(200)
|
||||
.add(backdropAnimation)
|
||||
.add(wrapperAnimation));
|
||||
}
|
||||
28
core/src/components/loading/animations/ios.leave.ts
Normal file
28
core/src/components/loading/animations/ios.leave.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { Animation } from '../../../index';
|
||||
|
||||
|
||||
/**
|
||||
* iOS Loading Leave Animation
|
||||
*/
|
||||
export default function iosLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const backdropAnimation = new Animation();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper'));
|
||||
|
||||
backdropAnimation.fromTo('opacity', 0.3, 0);
|
||||
|
||||
wrapperAnimation.fromTo('opacity', 0.99, 0)
|
||||
.fromTo('scale', 1, 0.9);
|
||||
|
||||
|
||||
return Promise.resolve(baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease-in-out')
|
||||
.duration(200)
|
||||
.add(backdropAnimation)
|
||||
.add(wrapperAnimation));
|
||||
}
|
||||
25
core/src/components/loading/animations/md.enter.ts
Normal file
25
core/src/components/loading/animations/md.enter.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { Animation } from '../../../index';
|
||||
|
||||
/**
|
||||
* Md Loading Enter Animation
|
||||
*/
|
||||
export default function mdEnterAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const backdropAnimation = new Animation();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper'));
|
||||
|
||||
backdropAnimation.fromTo('opacity', 0.01, 0.5);
|
||||
|
||||
wrapperAnimation.fromTo('opacity', 0.01, 1).fromTo('scale', 1.1, 1);
|
||||
|
||||
return Promise.resolve(baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease-in-out')
|
||||
.duration(200)
|
||||
.add(backdropAnimation)
|
||||
.add(wrapperAnimation));
|
||||
}
|
||||
25
core/src/components/loading/animations/md.leave.ts
Normal file
25
core/src/components/loading/animations/md.leave.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { Animation } from '../../../index';
|
||||
|
||||
/**
|
||||
* Md Loading Leave Animation
|
||||
*/
|
||||
export default function mdLeaveAnimation(Animation: Animation, baseEl: HTMLElement): Promise<Animation> {
|
||||
const baseAnimation = new Animation();
|
||||
|
||||
const backdropAnimation = new Animation();
|
||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop'));
|
||||
|
||||
const wrapperAnimation = new Animation();
|
||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper'));
|
||||
|
||||
backdropAnimation.fromTo('opacity', 0.5, 0);
|
||||
|
||||
wrapperAnimation.fromTo('opacity', 0.99, 0).fromTo('scale', 1, 0.9);
|
||||
|
||||
return Promise.resolve(baseAnimation
|
||||
.addElement(baseEl)
|
||||
.easing('ease-in-out')
|
||||
.duration(200)
|
||||
.add(backdropAnimation)
|
||||
.add(wrapperAnimation));
|
||||
}
|
||||
Reference in New Issue
Block a user