mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 23:01:57 +08:00
refactor(animations): normalize naming (#13543)
* chore(): normalize animations * chore(): normalize export as
This commit is contained in:

committed by
Brandy Carney

parent
c56e80d5d2
commit
3a62bf5921
2
packages/core/src/components.d.ts
vendored
2
packages/core/src/components.d.ts
vendored
@ -174,8 +174,8 @@ declare global {
|
|||||||
inputs?: AlertInput[],
|
inputs?: AlertInput[],
|
||||||
enableBackdropDismiss?: boolean,
|
enableBackdropDismiss?: boolean,
|
||||||
translucent?: boolean,
|
translucent?: boolean,
|
||||||
alertId?: string,
|
|
||||||
animate?: boolean,
|
animate?: boolean,
|
||||||
|
alertId?: string,
|
||||||
enterAnimation?: AnimationBuilder,
|
enterAnimation?: AnimationBuilder,
|
||||||
leaveAnimation?: AnimationBuilder
|
leaveAnimation?: AnimationBuilder
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,11 @@ import { Animation, AnimationBuilder, AnimationController, Config, OverlayDismis
|
|||||||
import { domControllerAsync, playAnimationAsync } from '../../utils/helpers';
|
import { domControllerAsync, playAnimationAsync } from '../../utils/helpers';
|
||||||
import { createThemedClasses } from '../../utils/theme';
|
import { createThemedClasses } from '../../utils/theme';
|
||||||
|
|
||||||
import iOSEnterAnimation from './animations/ios.enter';
|
import iosEnterAnimation from './animations/ios.enter';
|
||||||
import iOSLeaveAnimation from './animations/ios.leave';
|
import iosLeaveAnimation from './animations/ios.leave';
|
||||||
|
|
||||||
import MdEnterAnimation from './animations/md.enter';
|
import mdEnterAnimation from './animations/md.enter';
|
||||||
import MdLeaveAnimation from './animations/md.leave';
|
import mdLeaveAnimation from './animations/md.leave';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-action-sheet',
|
tag: 'ion-action-sheet',
|
||||||
@ -83,7 +83,7 @@ export class ActionSheet {
|
|||||||
this.ionActionSheetWillPresent.emit();
|
this.ionActionSheetWillPresent.emit();
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('actionSheetEnter', this.mode === 'ios' ? iOSEnterAnimation : MdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('actionSheetEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -107,7 +107,7 @@ export class ActionSheet {
|
|||||||
this.animation = null;
|
this.animation = null;
|
||||||
}
|
}
|
||||||
this.ionActionSheetWillDismiss.emit();
|
this.ionActionSheetWillDismiss.emit();
|
||||||
const animationBuilder = this.leaveAnimation || this.config.get('actionSheetLeave', this.mode === 'ios' ? iOSEnterAnimation : MdEnterAnimation);
|
const animationBuilder = this.leaveAnimation || this.config.get('actionSheetLeave', this.mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||||
|
|
||||||
|
|
||||||
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -285,8 +285,8 @@ export interface ActionSheetDismissEvent extends OverlayDismissEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
iOSEnterAnimation as ActionSheetiOSEnterAnimation,
|
iosEnterAnimation as iosActionSheetEnterAnimation,
|
||||||
iOSLeaveAnimation as ActionSheetiOSLeaveAnimation,
|
iosLeaveAnimation as iosActionSheetLeaveAnimation,
|
||||||
MdEnterAnimation as ActionSheetMDEnterAnimation,
|
mdEnterAnimation as mdActionSheetEnterAnimation,
|
||||||
MdLeaveAnimation as ActionSheetMDLeaveAnimation,
|
mdLeaveAnimation as mdActionSheetetLeaveAnimation,
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Action Sheet Enter Animation
|
* iOS Action Sheet Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Action Sheet Leave Animation
|
* iOS Action Sheet Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* MD Action Sheet Enter Animation
|
* MD Action Sheet Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function MdEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function mdEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* MD Action Sheet Leave Animation
|
* MD Action Sheet Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function MdLeaveAnimation(
|
export default function mdLeaveAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement
|
baseElm: HTMLElement
|
||||||
): Animation {
|
): Animation {
|
||||||
|
@ -6,11 +6,11 @@ import { domControllerAsync, playAnimationAsync } from '../../utils/helpers';
|
|||||||
import { BACKDROP } from '../../utils/overlay-constants';
|
import { BACKDROP } from '../../utils/overlay-constants';
|
||||||
import { createThemedClasses } from '../../utils/theme';
|
import { createThemedClasses } from '../../utils/theme';
|
||||||
|
|
||||||
import iOSEnterAnimation from './animations/ios.enter';
|
import iosEnterAnimation from './animations/ios.enter';
|
||||||
import iOSLeaveAnimation from './animations/ios.leave';
|
import iosLeaveAnimation from './animations/ios.leave';
|
||||||
|
|
||||||
import MdEnterAnimation from './animations/md.enter';
|
import mdEnterAnimation from './animations/md.enter';
|
||||||
import MdLeaveAnimation from './animations/md.leave';
|
import mdLeaveAnimation from './animations/md.leave';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-alert',
|
tag: 'ion-alert',
|
||||||
@ -89,7 +89,7 @@ export class Alert {
|
|||||||
this.ionAlertWillPresent.emit();
|
this.ionAlertWillPresent.emit();
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('alertEnter', this.mode === 'ios' ? iOSEnterAnimation : MdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('alertEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -122,7 +122,7 @@ export class Alert {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.leaveAnimation || this.config.get('alertLeave', this.mode === 'ios' ? iOSLeaveAnimation : MdLeaveAnimation);
|
const animationBuilder = this.leaveAnimation || this.config.get('alertLeave', this.mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||||
|
|
||||||
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
return this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
this.animation = animation;
|
this.animation = animation;
|
||||||
@ -481,8 +481,8 @@ export interface AlertDismissEvent extends OverlayDismissEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
iOSEnterAnimation as AlertiOSEnterAnimation,
|
iosEnterAnimation as iosAlertEnterAnimation,
|
||||||
iOSLeaveAnimation as AlertiOSLeaveAnimation,
|
iosLeaveAnimation as iosAlertLeaveAnimation,
|
||||||
MdEnterAnimation as AlertMDEnterAnimation,
|
mdEnterAnimation as mdAlertEnterAnimation,
|
||||||
MdLeaveAnimation as AlertMDLeaveAnimation,
|
mdLeaveAnimation as mdAlertLeaveAnimation,
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Alert Enter Animation
|
* iOS Alert Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Alert Leave Animation
|
* iOS Alert Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Alert Enter Animation
|
* Md Alert Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function MdEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function mdEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Alert Leave Animation
|
* Md Alert Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function MdLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function mdLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Loading Enter Animation
|
* iOS Loading Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Loading Leave Animation
|
* iOS Loading Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Loading Enter Animation
|
* Md Loading Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function MdEnterAnimation(
|
export default function mdEnterAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement
|
baseElm: HTMLElement
|
||||||
): Animation {
|
): Animation {
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Loading Leave Animation
|
* Md Loading Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function MdLeaveAnimation(
|
export default function mdLeaveAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement
|
baseElm: HTMLElement
|
||||||
): Animation {
|
): Animation {
|
||||||
|
@ -3,11 +3,11 @@ import { Component, Element, Event, EventEmitter, Listen, Prop, State } from '@s
|
|||||||
|
|
||||||
import { createThemedClasses } from '../../utils/theme';
|
import { createThemedClasses } from '../../utils/theme';
|
||||||
|
|
||||||
import iOSEnterAnimation from './animations/ios.enter';
|
import iosEnterAnimation from './animations/ios.enter';
|
||||||
import iOSLeaveAnimation from './animations/ios.leave';
|
import iosLeaveAnimation from './animations/ios.leave';
|
||||||
|
|
||||||
import MdEnterAnimation from './animations/md.enter';
|
import mdEnterAnimation from './animations/md.enter';
|
||||||
import MdLeaveAnimation from './animations/md.leave';
|
import mdLeaveAnimation from './animations/md.leave';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-loading',
|
tag: 'ion-loading',
|
||||||
@ -89,7 +89,7 @@ export class Loading {
|
|||||||
this.ionLoadingWillPresent.emit({ loading: this });
|
this.ionLoadingWillPresent.emit({ loading: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('loadingEnter', this.mode === 'ios' ? iOSEnterAnimation : MdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('loadingEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -116,7 +116,7 @@ export class Loading {
|
|||||||
this.ionLoadingWillDismiss.emit({ loading: this });
|
this.ionLoadingWillDismiss.emit({ loading: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.leaveAnimation || this.config.get('loadingLeave', this.mode === 'ios' ? iOSLeaveAnimation : MdLeaveAnimation);
|
const animationBuilder = this.leaveAnimation || this.config.get('loadingLeave', this.mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -246,4 +246,9 @@ export interface LoadingEvent extends Event {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export { iOSEnterAnimation, iOSLeaveAnimation, MdEnterAnimation, MdLeaveAnimation };
|
export {
|
||||||
|
iosEnterAnimation as iosLoadingEnterAnimation,
|
||||||
|
iosLeaveAnimation as iosLoadingLeaveAnimation,
|
||||||
|
mdEnterAnimation as mdLoadingEnterAnimation,
|
||||||
|
mdLeaveAnimation as mdLoadingLeaveAnimation
|
||||||
|
};
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Modal Enter Animation
|
* iOS Modal Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Modal Leave Animation
|
* iOS Modal Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Modal Enter Animation
|
* Md Modal Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function MdEnterAnimation(
|
export default function mdEnterAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement
|
baseElm: HTMLElement
|
||||||
): Animation {
|
): Animation {
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Modal Leave Animation
|
* Md Modal Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function MdLeaveAnimation(
|
export default function mdLeaveAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement
|
baseElm: HTMLElement
|
||||||
): Animation {
|
): Animation {
|
||||||
|
@ -2,11 +2,11 @@ import { Component, Element, Event, EventEmitter, Listen, Prop } from '@stencil/
|
|||||||
import { Animation, AnimationBuilder, AnimationController, Config } from '../../index';
|
import { Animation, AnimationBuilder, AnimationController, Config } from '../../index';
|
||||||
import { createThemedClasses } from '../../utils/theme';
|
import { createThemedClasses } from '../../utils/theme';
|
||||||
|
|
||||||
import iOSEnterAnimation from './animations/ios.enter';
|
import iosEnterAnimation from './animations/ios.enter';
|
||||||
import iOSLeaveAnimation from './animations/ios.leave';
|
import iosLeaveAnimation from './animations/ios.leave';
|
||||||
|
|
||||||
import MdEnterAnimation from './animations/md.enter';
|
import mdEnterAnimation from './animations/md.enter';
|
||||||
import MdLeaveAnimation from './animations/md.leave';
|
import mdLeaveAnimation from './animations/md.leave';
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-modal',
|
tag: 'ion-modal',
|
||||||
styleUrls: {
|
styleUrls: {
|
||||||
@ -83,7 +83,7 @@ export class Modal {
|
|||||||
this.ionModalWillPresent.emit({ modal: this });
|
this.ionModalWillPresent.emit({ modal: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('modalEnter', this.mode === 'ios' ? iOSEnterAnimation : MdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('modalEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -107,7 +107,7 @@ export class Modal {
|
|||||||
this.ionModalWillDismiss.emit({ modal: this });
|
this.ionModalWillDismiss.emit({ modal: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.leaveAnimation || this.config.get('modalExit', this.mode === 'ios' ? iOSLeaveAnimation : MdLeaveAnimation);
|
const animationBuilder = this.leaveAnimation || this.config.get('modalLeave', this.mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -201,4 +201,9 @@ export interface ModalEvent extends Event {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export { iOSEnterAnimation, iOSLeaveAnimation, MdEnterAnimation, MdLeaveAnimation };
|
export {
|
||||||
|
iosEnterAnimation as iosModalEnterAnimation,
|
||||||
|
iosLeaveAnimation as iosModalLeaveAnimation,
|
||||||
|
mdEnterAnimation as mdModalEnterAnimation,
|
||||||
|
mdLeaveAnimation as mdModalLeaveAnimation
|
||||||
|
};
|
||||||
|
@ -2,9 +2,9 @@ import { Animation } from '../../../index';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS Loading Enter Animation
|
* iOS Picker Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -2,9 +2,9 @@ import { Animation } from '../../../index';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS Loading Leave Animation
|
* iOS Picker Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { Animation, AnimationBuilder, AnimationController, Config } from '../../index';
|
import { Animation, AnimationBuilder, AnimationController, Config } from '../../index';
|
||||||
import { Component, CssClassMap, Element, Event, EventEmitter, Listen, Method, Prop, State } from '@stencil/core';
|
import { Component, CssClassMap, Element, Event, EventEmitter, Listen, Method, Prop, State } from '@stencil/core';
|
||||||
|
|
||||||
import iOSEnterAnimation from './animations/ios.enter';
|
import iosEnterAnimation from './animations/ios.enter';
|
||||||
import iOSLeaveAnimation from './animations/ios.leave';
|
import iosLeaveAnimation from './animations/ios.leave';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-picker',
|
tag: 'ion-picker',
|
||||||
@ -84,7 +84,7 @@ export class Picker {
|
|||||||
this.ionPickerWillPresent.emit({ picker: this });
|
this.ionPickerWillPresent.emit({ picker: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('pickerEnter', iOSEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('pickerEnter', iosEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -111,7 +111,7 @@ export class Picker {
|
|||||||
this.ionPickerWillDismiss.emit({ picker: this });
|
this.ionPickerWillDismiss.emit({ picker: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.leaveAnimation || this.config.get('pickerLeave', iOSLeaveAnimation);
|
const animationBuilder = this.leaveAnimation || this.config.get('pickerLeave', iosLeaveAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -407,4 +407,7 @@ export interface PickerEvent extends Event {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export { iOSEnterAnimation, iOSLeaveAnimation };
|
export {
|
||||||
|
iosEnterAnimation as iosPickerEnterAnimation,
|
||||||
|
iosLeaveAnimation as iosPickerLeaveAnimation
|
||||||
|
};
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Popover Enter Animation
|
* iOS Popover Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Popover Leave Animation
|
* iOS Popover Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function iosLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -4,7 +4,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Popover Enter Animation
|
* Md Popover Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function MdEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function mdEnterAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* Md Popover Leave Animation
|
* Md Popover Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function MdLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
export default function mdLeaveAnimation(Animation: Animation, baseElm: HTMLElement): Animation {
|
||||||
const baseAnimation = new Animation();
|
const baseAnimation = new Animation();
|
||||||
|
|
||||||
const backdropAnimation = new Animation();
|
const backdropAnimation = new Animation();
|
||||||
|
@ -3,10 +3,10 @@ import { Animation, AnimationBuilder, AnimationController, Config } from '../../
|
|||||||
|
|
||||||
import { createThemedClasses } from '../../utils/theme';
|
import { createThemedClasses } from '../../utils/theme';
|
||||||
|
|
||||||
import iOSEnterAnimation from './animations/ios.enter';
|
import iosEnterAnimation from './animations/ios.enter';
|
||||||
import iOSLeaveAnimation from './animations/ios.leave';
|
import iosLeaveAnimation from './animations/ios.leave';
|
||||||
import MdEnterAnimation from './animations/md.enter';
|
import mdEnterAnimation from './animations/md.enter';
|
||||||
import MdLeaveAnimation from './animations/md.leave';
|
import mdLeaveAnimation from './animations/md.leave';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-popover',
|
tag: 'ion-popover',
|
||||||
@ -207,7 +207,7 @@ export class Popover {
|
|||||||
this.ionPopoverWillPresent.emit({ popover: this });
|
this.ionPopoverWillPresent.emit({ popover: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('popoverEnter', this.mode === 'ios' ? iOSEnterAnimation : MdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('popoverEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
@ -232,7 +232,7 @@ export class Popover {
|
|||||||
this.ionPopoverWillDismiss.emit({ popover: this });
|
this.ionPopoverWillDismiss.emit({ popover: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.leaveAnimation || this.config.get('popoverLeave', this.mode === 'ios' ? iOSLeaveAnimation : MdLeaveAnimation);
|
const animationBuilder = this.leaveAnimation || this.config.get('popoverLeave', this.mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el).then(animation => {
|
||||||
@ -353,4 +353,9 @@ export const POPOVER_POSITION_PROPERTIES: any = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export { iOSEnterAnimation, iOSLeaveAnimation, MdEnterAnimation, MdLeaveAnimation };
|
export {
|
||||||
|
iosEnterAnimation as iosPopoverEnterAnimation,
|
||||||
|
iosLeaveAnimation as iosPopoverLeaveAnimation,
|
||||||
|
mdEnterAnimation as mdPopoverEnterAnimation,
|
||||||
|
mdLeaveAnimation as mdPopoverLeaveAnimation
|
||||||
|
};
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Toast Enter Animation
|
* iOS Toast Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSEnterAnimation(
|
export default function iosEnterAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement,
|
baseElm: HTMLElement,
|
||||||
position: string
|
position: string
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* iOS Toast Leave Animation
|
* iOS Toast Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(
|
export default function iosLeaveAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement,
|
baseElm: HTMLElement,
|
||||||
position: string
|
position: string
|
||||||
|
@ -3,7 +3,7 @@ import { Animation } from '../../../index';
|
|||||||
/**
|
/**
|
||||||
* MD Toast Enter Animation
|
* MD Toast Enter Animation
|
||||||
*/
|
*/
|
||||||
export default function MdEnterAnimation(
|
export default function mdEnterAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement,
|
baseElm: HTMLElement,
|
||||||
position: string
|
position: string
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Animation } from '../../../index';
|
import { Animation } from '../../../index';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS Toast Leave Animation
|
* md Toast Leave Animation
|
||||||
*/
|
*/
|
||||||
export default function iOSLeaveAnimation(
|
export default function mdLeaveAnimation(
|
||||||
Animation: Animation,
|
Animation: Animation,
|
||||||
baseElm: HTMLElement,
|
baseElm: HTMLElement,
|
||||||
position: string
|
position: string
|
||||||
|
@ -3,11 +3,11 @@ import { Animation, AnimationBuilder, AnimationController, Config, CssClassMap }
|
|||||||
|
|
||||||
import { createThemedClasses } from '../../utils/theme';
|
import { createThemedClasses } from '../../utils/theme';
|
||||||
|
|
||||||
import iOSEnterAnimation from './animations/ios.enter';
|
import iosEnterAnimation from './animations/ios.enter';
|
||||||
import iOSLeaveAnimation from './animations/ios.leave';
|
import iosLeaveAnimation from './animations/ios.leave';
|
||||||
|
|
||||||
import MdEnterAnimation from './animations/md.enter';
|
import mdEnterAnimation from './animations/md.enter';
|
||||||
import MdLeaveAnimation from './animations/md.leave';
|
import mdLeaveAnimation from './animations/md.leave';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-toast',
|
tag: 'ion-toast',
|
||||||
@ -87,7 +87,7 @@ export class Toast {
|
|||||||
this.ionToastWillPresent.emit({ toast: this });
|
this.ionToastWillPresent.emit({ toast: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.enterAnimation || this.config.get('toastEnter', this.mode === 'ios' ? iOSEnterAnimation : MdEnterAnimation);
|
const animationBuilder = this.enterAnimation || this.config.get('toastEnter', this.mode === 'ios' ? iosEnterAnimation : mdEnterAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el, this.position).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el, this.position).then(animation => {
|
||||||
@ -110,7 +110,7 @@ export class Toast {
|
|||||||
this.ionToastWillDismiss.emit({ toast: this });
|
this.ionToastWillDismiss.emit({ toast: this });
|
||||||
|
|
||||||
// get the user's animation fn if one was provided
|
// get the user's animation fn if one was provided
|
||||||
const animationBuilder = this.leaveAnimation || this.config.get('toastLeave', this.mode === 'ios' ? iOSLeaveAnimation : MdLeaveAnimation);
|
const animationBuilder = this.leaveAnimation || this.config.get('toastLeave', this.mode === 'ios' ? iosLeaveAnimation : mdLeaveAnimation);
|
||||||
|
|
||||||
// build the animation and kick it off
|
// build the animation and kick it off
|
||||||
this.animationCtrl.create(animationBuilder, this.el, this.position).then(animation => {
|
this.animationCtrl.create(animationBuilder, this.el, this.position).then(animation => {
|
||||||
@ -220,4 +220,9 @@ export interface ToastEvent {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export { iOSEnterAnimation, iOSLeaveAnimation, MdEnterAnimation, MdLeaveAnimation };
|
export {
|
||||||
|
iosEnterAnimation as iosToastEnterAnimation,
|
||||||
|
iosLeaveAnimation as iosToastLeaveAnimation,
|
||||||
|
mdEnterAnimation as mdToastEnterAnimation,
|
||||||
|
mdLeaveAnimation as mdToastLeaveAnimation
|
||||||
|
};
|
||||||
|
51
packages/core/src/index.d.ts
vendored
51
packages/core/src/index.d.ts
vendored
@ -53,15 +53,7 @@ export * from './components/keyboard-controller/keys';
|
|||||||
export { Label } from './components/label/label';
|
export { Label } from './components/label/label';
|
||||||
export { List } from './components/list/list';
|
export { List } from './components/list/list';
|
||||||
export { ListHeader } from './components/list-header/list-header';
|
export { ListHeader } from './components/list-header/list-header';
|
||||||
export {
|
export * from './components/loading/loading';
|
||||||
Loading,
|
|
||||||
LoadingEvent,
|
|
||||||
LoadingOptions,
|
|
||||||
iOSEnterAnimation as LoadingIOSEnterAnimation,
|
|
||||||
iOSLeaveAnimation as LoadingIOSLeaveAnimation,
|
|
||||||
MdEnterAnimation as LoadingMDEnterAnimation,
|
|
||||||
MdLeaveAnimation as LoadingMDLeaveAnimation
|
|
||||||
} from './components/loading/loading';
|
|
||||||
export { LoadingController } from './components/loading-controller/loading-controller';
|
export { LoadingController } from './components/loading-controller/loading-controller';
|
||||||
export { Menu } from './components/menu/menu';
|
export { Menu } from './components/menu/menu';
|
||||||
export {
|
export {
|
||||||
@ -70,15 +62,7 @@ export {
|
|||||||
MenuPushAnimation,
|
MenuPushAnimation,
|
||||||
MenuRevealAnimation
|
MenuRevealAnimation
|
||||||
} from './components/menu-controller/menu-controller';
|
} from './components/menu-controller/menu-controller';
|
||||||
export {
|
export * from './components/modal/modal';
|
||||||
Modal,
|
|
||||||
ModalOptions,
|
|
||||||
ModalEvent,
|
|
||||||
iOSEnterAnimation as ModalIOSEnterAnimation,
|
|
||||||
iOSLeaveAnimation as ModalIOSLeaveAnimation,
|
|
||||||
MdEnterAnimation as ModalMDEnterAnimation,
|
|
||||||
MdLeaveAnimation as ModalMDLeaveAnimation
|
|
||||||
} from './components/modal/modal';
|
|
||||||
export { ModalController } from './components/modal-controller/modal-controller';
|
export { ModalController } from './components/modal-controller/modal-controller';
|
||||||
export { Nav } from './components/nav/nav';
|
export { Nav } from './components/nav/nav';
|
||||||
export { PublicNav } from './components/nav/nav-interface';
|
export { PublicNav } from './components/nav/nav-interface';
|
||||||
@ -87,26 +71,9 @@ export { NavController } from './components/nav-controller/nav-controller';
|
|||||||
export { Note } from './components/note/note';
|
export { Note } from './components/note/note';
|
||||||
export { Page } from './components/page/page';
|
export { Page } from './components/page/page';
|
||||||
export { PickerColumnCmp } from './components/picker-column/picker-column';
|
export { PickerColumnCmp } from './components/picker-column/picker-column';
|
||||||
export {
|
export * from './components/picker/picker';
|
||||||
Picker,
|
|
||||||
PickerButton,
|
|
||||||
PickerColumn,
|
|
||||||
PickerColumnOption,
|
|
||||||
PickerEvent,
|
|
||||||
PickerOptions,
|
|
||||||
iOSEnterAnimation as PickerIOSEnterAnimation,
|
|
||||||
iOSLeaveAnimation as PickerIOSLeaveAnimation
|
|
||||||
} from './components/picker/picker';
|
|
||||||
export { PickerController } from './components/picker-controller/picker-controller';
|
export { PickerController } from './components/picker-controller/picker-controller';
|
||||||
export {
|
export * from './components/popover/popover';
|
||||||
Popover,
|
|
||||||
PopoverEvent,
|
|
||||||
PopoverOptions,
|
|
||||||
iOSEnterAnimation as PopoverIOSEnterAnimation,
|
|
||||||
iOSLeaveAnimation as PopoverIOSLeaveAnimation,
|
|
||||||
MdEnterAnimation as PopoverMDEnterAnimation,
|
|
||||||
MdLeaveAnimation as PopoverMDLeaveAnimation
|
|
||||||
} from './components/popover/popover';
|
|
||||||
export { PopoverController } from './components/popover-controller/popover-controller';
|
export { PopoverController } from './components/popover-controller/popover-controller';
|
||||||
export { RadioGroup } from './components/radio-group/radio-group';
|
export { RadioGroup } from './components/radio-group/radio-group';
|
||||||
export { Radio, HTMLIonRadioElementEvent } from './components/radio/radio';
|
export { Radio, HTMLIonRadioElementEvent } from './components/radio/radio';
|
||||||
@ -137,15 +104,7 @@ export { Tab } from './components/tab/tab';
|
|||||||
export { Tabs } from './components/tabs/tabs';
|
export { Tabs } from './components/tabs/tabs';
|
||||||
export { Thumbnail } from './components/thumbnail/thumbnail';
|
export { Thumbnail } from './components/thumbnail/thumbnail';
|
||||||
export { ToolbarTitle } from './components/title/title';
|
export { ToolbarTitle } from './components/title/title';
|
||||||
export {
|
export * from './components/toast/toast';
|
||||||
Toast,
|
|
||||||
ToastEvent,
|
|
||||||
ToastOptions,
|
|
||||||
iOSEnterAnimation as ToastIOSEnterAnimation,
|
|
||||||
iOSLeaveAnimation as ToastIOSLeaveAnimation,
|
|
||||||
MdEnterAnimation as ToastMDEnterAnimation,
|
|
||||||
MdLeaveAnimation as ToastMDLeaveAnimation
|
|
||||||
} from './components/toast/toast';
|
|
||||||
export { ToastController } from './components/toast-controller/toast-controller';
|
export { ToastController } from './components/toast-controller/toast-controller';
|
||||||
export { Toggle } from './components/toggle/toggle';
|
export { Toggle } from './components/toggle/toggle';
|
||||||
export { Toolbar } from './components/toolbar/toolbar';
|
export { Toolbar } from './components/toolbar/toolbar';
|
||||||
|
Reference in New Issue
Block a user