From 3a62bf592120b1bc53078e046b73f7667b70d9fb Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Wed, 29 Nov 2017 13:36:35 -0800 Subject: [PATCH] refactor(animations): normalize naming (#13543) * chore(): normalize animations * chore(): normalize export as --- packages/core/src/components.d.ts | 202 +++++++++--------- .../components/action-sheet/action-sheet.tsx | 20 +- .../action-sheet/animations/ios.enter.ts | 2 +- .../action-sheet/animations/ios.leave.ts | 2 +- .../action-sheet/animations/md.enter.ts | 2 +- .../action-sheet/animations/md.leave.ts | 2 +- packages/core/src/components/alert/alert.tsx | 20 +- .../components/alert/animations/ios.enter.ts | 2 +- .../components/alert/animations/ios.leave.ts | 2 +- .../components/alert/animations/md.enter.ts | 2 +- .../components/alert/animations/md.leave.ts | 2 +- .../loading/animations/ios.enter.ts | 2 +- .../loading/animations/ios.leave.ts | 2 +- .../components/loading/animations/md.enter.ts | 2 +- .../components/loading/animations/md.leave.ts | 2 +- .../core/src/components/loading/loading.tsx | 19 +- .../components/modal/animations/ios.enter.ts | 2 +- .../components/modal/animations/ios.leave.ts | 2 +- .../components/modal/animations/md.enter.ts | 2 +- .../components/modal/animations/md.leave.ts | 2 +- packages/core/src/components/modal/modal.tsx | 19 +- .../components/picker/animations/ios.enter.ts | 4 +- .../components/picker/animations/ios.leave.ts | 4 +- .../core/src/components/picker/picker.tsx | 13 +- .../popover/animations/ios.enter.ts | 2 +- .../popover/animations/ios.leave.ts | 2 +- .../components/popover/animations/md.enter.ts | 2 +- .../components/popover/animations/md.leave.ts | 2 +- .../core/src/components/popover/popover.tsx | 19 +- .../components/toast/animations/ios.enter.ts | 2 +- .../components/toast/animations/ios.leave.ts | 2 +- .../components/toast/animations/md.enter.ts | 2 +- .../components/toast/animations/md.leave.ts | 4 +- packages/core/src/components/toast/toast.tsx | 19 +- packages/core/src/index.d.ts | 51 +---- 35 files changed, 211 insertions(+), 229 deletions(-) diff --git a/packages/core/src/components.d.ts b/packages/core/src/components.d.ts index 93fa677c06..33517610ba 100644 --- a/packages/core/src/components.d.ts +++ b/packages/core/src/components.d.ts @@ -65,7 +65,7 @@ declare global { } namespace JSXElements { export interface IonActionSheetControllerAttributes extends HTMLAttributes { - + } } } @@ -95,7 +95,7 @@ declare global { } namespace JSXElements { export interface IonActionSheetAttributes extends HTMLAttributes { - + cssClass?: string, title?: string, subTitle?: string, @@ -135,7 +135,7 @@ declare global { } namespace JSXElements { export interface IonAlertControllerAttributes extends HTMLAttributes { - + } } } @@ -165,7 +165,7 @@ declare global { } namespace JSXElements { export interface IonAlertAttributes extends HTMLAttributes { - + cssClass?: string, title?: string, subTitle?: string, @@ -174,8 +174,8 @@ declare global { inputs?: AlertInput[], enableBackdropDismiss?: boolean, translucent?: boolean, - alertId?: string, animate?: boolean, + alertId?: string, enterAnimation?: AnimationBuilder, leaveAnimation?: AnimationBuilder } @@ -207,7 +207,7 @@ declare global { } namespace JSXElements { export interface IonAnimationControllerAttributes extends HTMLAttributes { - + } } } @@ -237,7 +237,7 @@ declare global { } namespace JSXElements { export interface IonAppAttributes extends HTMLAttributes { - + } } } @@ -267,7 +267,7 @@ declare global { } namespace JSXElements { export interface AppCordovaPageOneAttributes extends HTMLAttributes { - + } } } @@ -297,7 +297,7 @@ declare global { } namespace JSXElements { export interface AppCordovaPageTabsAttributes extends HTMLAttributes { - + } } } @@ -327,7 +327,7 @@ declare global { } namespace JSXElements { export interface AppCordovaPageThreeAttributes extends HTMLAttributes { - + } } } @@ -357,7 +357,7 @@ declare global { } namespace JSXElements { export interface AppCordovaPageTwoAttributes extends HTMLAttributes { - + } } } @@ -387,7 +387,7 @@ declare global { } namespace JSXElements { export interface IonAvatarAttributes extends HTMLAttributes { - + } } } @@ -417,7 +417,7 @@ declare global { } namespace JSXElements { export interface IonBackdropAttributes extends HTMLAttributes { - + } } } @@ -447,7 +447,7 @@ declare global { } namespace JSXElements { export interface IonBadgeAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -479,7 +479,7 @@ declare global { } namespace JSXElements { export interface IonButtonAttributes extends HTMLAttributes { - + itemButton?: boolean, href?: string, buttonType?: string, @@ -520,7 +520,7 @@ declare global { } namespace JSXElements { export interface IonButtonsAttributes extends HTMLAttributes { - + } } } @@ -550,7 +550,7 @@ declare global { } namespace JSXElements { export interface IonCardContentAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -582,7 +582,7 @@ declare global { } namespace JSXElements { export interface IonCardHeaderAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', translucent?: boolean @@ -615,7 +615,7 @@ declare global { } namespace JSXElements { export interface IonCardSubtitleAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -647,7 +647,7 @@ declare global { } namespace JSXElements { export interface IonCardTitleAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -679,7 +679,7 @@ declare global { } namespace JSXElements { export interface IonCardAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -711,7 +711,7 @@ declare global { } namespace JSXElements { export interface IonCheckboxAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', name?: string, @@ -747,7 +747,7 @@ declare global { } namespace JSXElements { export interface IonChipButtonAttributes extends HTMLAttributes { - + href?: string, color?: string, mode?: 'ios' | 'md', @@ -782,7 +782,7 @@ declare global { } namespace JSXElements { export interface IonChipAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -814,7 +814,7 @@ declare global { } namespace JSXElements { export interface IonColAttributes extends HTMLAttributes { - + } } } @@ -844,7 +844,7 @@ declare global { } namespace JSXElements { export interface IonContentAttributes extends HTMLAttributes { - + ionScrollStart?: Function, ionScroll?: Function, ionScrollEnd?: Function, @@ -878,7 +878,7 @@ declare global { } namespace JSXElements { export interface IonDatetimeAttributes extends HTMLAttributes { - + disabled?: boolean, min?: string, max?: string, @@ -927,7 +927,7 @@ declare global { } namespace JSXElements { export interface IonFabAttributes extends HTMLAttributes { - + } } } @@ -957,7 +957,7 @@ declare global { } namespace JSXElements { export interface IonFabListAttributes extends HTMLAttributes { - + activated?: boolean } } @@ -988,7 +988,7 @@ declare global { } namespace JSXElements { export interface IonFabButtonAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', href?: string, @@ -1026,7 +1026,7 @@ declare global { } namespace JSXElements { export interface IonFooterAttributes extends HTMLAttributes { - + translucent?: boolean } } @@ -1057,7 +1057,7 @@ declare global { } namespace JSXElements { export interface IonGestureControllerAttributes extends HTMLAttributes { - + } } } @@ -1087,7 +1087,7 @@ declare global { } namespace JSXElements { export interface IonGestureAttributes extends HTMLAttributes { - + enabled?: boolean, attachTo?: ElementRef, autoBlockAll?: boolean, @@ -1135,7 +1135,7 @@ declare global { } namespace JSXElements { export interface IonGridAttributes extends HTMLAttributes { - + } } } @@ -1165,7 +1165,7 @@ declare global { } namespace JSXElements { export interface IonHeaderAttributes extends HTMLAttributes { - + translucent?: boolean } } @@ -1196,7 +1196,7 @@ declare global { } namespace JSXElements { export interface IonInfiniteScrollContentAttributes extends HTMLAttributes { - + loadingSpinner?: string, loadingText?: string } @@ -1228,7 +1228,7 @@ declare global { } namespace JSXElements { export interface IonInfiniteScrollAttributes extends HTMLAttributes { - + threshold?: string, enabled?: boolean, position?: string @@ -1261,7 +1261,7 @@ declare global { } namespace JSXElements { export interface IonInputAttributes extends HTMLAttributes { - + accept?: string, autocapitalize?: string, autocomplete?: string, @@ -1317,7 +1317,7 @@ declare global { } namespace JSXElements { export interface IonItemDividerAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -1349,7 +1349,7 @@ declare global { } namespace JSXElements { export interface IonItemOptionAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', href?: string, @@ -1383,7 +1383,7 @@ declare global { } namespace JSXElements { export interface IonItemOptionsAttributes extends HTMLAttributes { - + side?: Side } } @@ -1414,7 +1414,7 @@ declare global { } namespace JSXElements { export interface IonItemSlidingAttributes extends HTMLAttributes { - + } } } @@ -1444,7 +1444,7 @@ declare global { } namespace JSXElements { export interface IonItemAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', href?: string @@ -1477,7 +1477,7 @@ declare global { } namespace JSXElements { export interface IonKeyboardControllerAttributes extends HTMLAttributes { - + } } } @@ -1507,7 +1507,7 @@ declare global { } namespace JSXElements { export interface IonLabelAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', fixed?: boolean, @@ -1542,7 +1542,7 @@ declare global { } namespace JSXElements { export interface IonListHeaderAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -1574,7 +1574,7 @@ declare global { } namespace JSXElements { export interface IonListAttributes extends HTMLAttributes { - + } } } @@ -1604,7 +1604,7 @@ declare global { } namespace JSXElements { export interface IonLoadingControllerAttributes extends HTMLAttributes { - + } } } @@ -1634,7 +1634,7 @@ declare global { } namespace JSXElements { export interface IonLoadingAttributes extends HTMLAttributes { - + cssClass?: string, content?: string, dismissOnPageChange?: boolean, @@ -1673,7 +1673,7 @@ declare global { } namespace JSXElements { export interface IonMenuControllerAttributes extends HTMLAttributes { - + } } } @@ -1703,7 +1703,7 @@ declare global { } namespace JSXElements { export interface IonMenuAttributes extends HTMLAttributes { - + content?: string, menuId?: string, type?: string, @@ -1741,7 +1741,7 @@ declare global { } namespace JSXElements { export interface IonModalControllerAttributes extends HTMLAttributes { - + } } } @@ -1771,7 +1771,7 @@ declare global { } namespace JSXElements { export interface IonModalAttributes extends HTMLAttributes { - + mode?: string, color?: string, component?: string, @@ -1811,7 +1811,7 @@ declare global { } namespace JSXElements { export interface IonNavControllerAttributes extends HTMLAttributes { - + delegate?: FrameworkDelegate } } @@ -1842,7 +1842,7 @@ declare global { } namespace JSXElements { export interface StencilIonNavDelegateAttributes extends HTMLAttributes { - + } } } @@ -1872,7 +1872,7 @@ declare global { } namespace JSXElements { export interface IonNavAttributes extends HTMLAttributes { - + mode?: string, root?: any, delegate?: FrameworkDelegate @@ -1905,7 +1905,7 @@ declare global { } namespace JSXElements { export interface IonNavbarAttributes extends HTMLAttributes { - + hideBackButton?: boolean, backButtonText?: string, backButtonIcon?: string, @@ -1939,7 +1939,7 @@ declare global { } namespace JSXElements { export interface IonNoteAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md' } @@ -1971,7 +1971,7 @@ declare global { } namespace JSXElements { export interface IonPageAttributes extends HTMLAttributes { - + } } } @@ -2001,7 +2001,7 @@ declare global { } namespace JSXElements { export interface IonPickerColumnAttributes extends HTMLAttributes { - + col?: PickerColumn } } @@ -2032,7 +2032,7 @@ declare global { } namespace JSXElements { export interface IonPickerControllerAttributes extends HTMLAttributes { - + } } } @@ -2062,7 +2062,7 @@ declare global { } namespace JSXElements { export interface IonPickerAttributes extends HTMLAttributes { - + cssClass?: string, content?: string, dismissOnPageChange?: boolean, @@ -2103,7 +2103,7 @@ declare global { } namespace JSXElements { export interface IonPopoverControllerAttributes extends HTMLAttributes { - + } } } @@ -2133,7 +2133,7 @@ declare global { } namespace JSXElements { export interface IonPopoverAttributes extends HTMLAttributes { - + mode?: string, color?: string, component?: string, @@ -2175,7 +2175,7 @@ declare global { } namespace JSXElements { export interface IonRadioGroupAttributes extends HTMLAttributes { - + allowEmptySelection?: boolean, disabled?: boolean, name?: string, @@ -2209,7 +2209,7 @@ declare global { } namespace JSXElements { export interface IonRadioAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', name?: string, @@ -2245,7 +2245,7 @@ declare global { } namespace JSXElements { export interface IonRangeKnobAttributes extends HTMLAttributes { - + pressed?: boolean, pin?: boolean, min?: number, @@ -2284,7 +2284,7 @@ declare global { } namespace JSXElements { export interface IonRangeAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', debounce?: number, @@ -2325,7 +2325,7 @@ declare global { } namespace JSXElements { export interface IonReorderGroupAttributes extends HTMLAttributes { - + enabled?: boolean } } @@ -2356,7 +2356,7 @@ declare global { } namespace JSXElements { export interface IonReorderAttributes extends HTMLAttributes { - + } } } @@ -2386,7 +2386,7 @@ declare global { } namespace JSXElements { export interface IonRouteLinkAttributes extends HTMLAttributes { - + url?: string, router?: any } @@ -2418,7 +2418,7 @@ declare global { } namespace JSXElements { export interface IonRouteAttributes extends HTMLAttributes { - + path?: string, component?: string, props?: any @@ -2451,7 +2451,7 @@ declare global { } namespace JSXElements { export interface IonRouterControllerAttributes extends HTMLAttributes { - + } } } @@ -2481,7 +2481,7 @@ declare global { } namespace JSXElements { export interface IonRowAttributes extends HTMLAttributes { - + } } } @@ -2511,7 +2511,7 @@ declare global { } namespace JSXElements { export interface IonScrollAttributes extends HTMLAttributes { - + enabled?: boolean, jsScroll?: boolean, onionScrollStart?: ScrollCallback, @@ -2546,7 +2546,7 @@ declare global { } namespace JSXElements { export interface IonSearchbarAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', animated?: boolean, @@ -2588,7 +2588,7 @@ declare global { } namespace JSXElements { export interface IonSegmentButtonAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', checked?: boolean, @@ -2623,7 +2623,7 @@ declare global { } namespace JSXElements { export interface IonSegmentAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', disabled?: boolean, @@ -2657,7 +2657,7 @@ declare global { } namespace JSXElements { export interface IonSelectOptionAttributes extends HTMLAttributes { - + disabled?: boolean, selected?: boolean, value?: string @@ -2690,7 +2690,7 @@ declare global { } namespace JSXElements { export interface IonSelectPopoverAttributes extends HTMLAttributes { - + options?: SelectPopoverOption[], value?: string } @@ -2722,7 +2722,7 @@ declare global { } namespace JSXElements { export interface IonSelectAttributes extends HTMLAttributes { - + disabled?: boolean, cancelText?: string, okText?: string, @@ -2761,7 +2761,7 @@ declare global { } namespace JSXElements { export interface IonSkeletonTextAttributes extends HTMLAttributes { - + width?: string } } @@ -2792,7 +2792,7 @@ declare global { } namespace JSXElements { export interface IonSlideAttributes extends HTMLAttributes { - + } } } @@ -2822,7 +2822,7 @@ declare global { } namespace JSXElements { export interface IonSlidesAttributes extends HTMLAttributes { - + effect?: string, autoplay?: number, control?: any, @@ -2866,7 +2866,7 @@ declare global { } namespace JSXElements { export interface IonSpinnerAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', duration?: number, @@ -2901,7 +2901,7 @@ declare global { } namespace JSXElements { export interface IonSplitPaneAttributes extends HTMLAttributes { - + enabled?: boolean, when?: string | boolean } @@ -2933,7 +2933,7 @@ declare global { } namespace JSXElements { export interface IonTabButtonAttributes extends HTMLAttributes { - + selected?: boolean, tab?: HTMLIonTabElement } @@ -2965,7 +2965,7 @@ declare global { } namespace JSXElements { export interface IonTabHighlightAttributes extends HTMLAttributes { - + selectedTab?: HTMLIonTabElement } } @@ -2996,7 +2996,7 @@ declare global { } namespace JSXElements { export interface IonTabAttributes extends HTMLAttributes { - + btnId?: string, path?: string, title?: string, @@ -3036,7 +3036,7 @@ declare global { } namespace JSXElements { export interface IonTabbarAttributes extends HTMLAttributes { - + placement?: string, tabs?: HTMLIonTabElement[], selectedTab?: HTMLIonTabElement, @@ -3072,7 +3072,7 @@ declare global { } namespace JSXElements { export interface IonTabsAttributes extends HTMLAttributes { - + name?: string, tabbarHidden?: boolean, tabbarLayout?: string, @@ -3108,7 +3108,7 @@ declare global { } namespace JSXElements { export interface PageTabAttributes extends HTMLAttributes { - + } } } @@ -3138,7 +3138,7 @@ declare global { } namespace JSXElements { export interface TranslucentPageTabAttributes extends HTMLAttributes { - + } } } @@ -3168,7 +3168,7 @@ declare global { } namespace JSXElements { export interface IonTextareaAttributes extends HTMLAttributes { - + autocapitalize?: string, autocomplete?: string, autofocus?: boolean, @@ -3214,7 +3214,7 @@ declare global { } namespace JSXElements { export interface IonThumbnailAttributes extends HTMLAttributes { - + } } } @@ -3244,7 +3244,7 @@ declare global { } namespace JSXElements { export interface IonTitleAttributes extends HTMLAttributes { - + } } } @@ -3274,7 +3274,7 @@ declare global { } namespace JSXElements { export interface IonToastControllerAttributes extends HTMLAttributes { - + } } } @@ -3304,7 +3304,7 @@ declare global { } namespace JSXElements { export interface IonToastAttributes extends HTMLAttributes { - + message?: string, cssClass?: string, duration?: number, @@ -3345,7 +3345,7 @@ declare global { } namespace JSXElements { export interface IonToggleAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', name?: string, @@ -3381,7 +3381,7 @@ declare global { } namespace JSXElements { export interface IonToolbarAttributes extends HTMLAttributes { - + color?: string, mode?: 'ios' | 'md', translucent?: boolean @@ -3414,7 +3414,7 @@ declare global { } namespace JSXElements { export interface IonUtilsAttributes extends HTMLAttributes { - + } } } diff --git a/packages/core/src/components/action-sheet/action-sheet.tsx b/packages/core/src/components/action-sheet/action-sheet.tsx index c5a5da0e1e..0098293f37 100644 --- a/packages/core/src/components/action-sheet/action-sheet.tsx +++ b/packages/core/src/components/action-sheet/action-sheet.tsx @@ -4,11 +4,11 @@ import { Animation, AnimationBuilder, AnimationController, Config, OverlayDismis import { domControllerAsync, playAnimationAsync } from '../../utils/helpers'; import { createThemedClasses } from '../../utils/theme'; -import iOSEnterAnimation from './animations/ios.enter'; -import iOSLeaveAnimation from './animations/ios.leave'; +import iosEnterAnimation from './animations/ios.enter'; +import iosLeaveAnimation from './animations/ios.leave'; -import MdEnterAnimation from './animations/md.enter'; -import MdLeaveAnimation from './animations/md.leave'; +import mdEnterAnimation from './animations/md.enter'; +import mdLeaveAnimation from './animations/md.leave'; @Component({ tag: 'ion-action-sheet', @@ -83,7 +83,7 @@ export class ActionSheet { this.ionActionSheetWillPresent.emit(); // 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 this.animationCtrl.create(animationBuilder, this.el).then(animation => { @@ -107,7 +107,7 @@ export class ActionSheet { this.animation = null; } 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 => { @@ -285,8 +285,8 @@ export interface ActionSheetDismissEvent extends OverlayDismissEvent { } export { - iOSEnterAnimation as ActionSheetiOSEnterAnimation, - iOSLeaveAnimation as ActionSheetiOSLeaveAnimation, - MdEnterAnimation as ActionSheetMDEnterAnimation, - MdLeaveAnimation as ActionSheetMDLeaveAnimation, + iosEnterAnimation as iosActionSheetEnterAnimation, + iosLeaveAnimation as iosActionSheetLeaveAnimation, + mdEnterAnimation as mdActionSheetEnterAnimation, + mdLeaveAnimation as mdActionSheetetLeaveAnimation, }; diff --git a/packages/core/src/components/action-sheet/animations/ios.enter.ts b/packages/core/src/components/action-sheet/animations/ios.enter.ts index e0ea75fcb9..7e46ed0279 100644 --- a/packages/core/src/components/action-sheet/animations/ios.enter.ts +++ b/packages/core/src/components/action-sheet/animations/ios.enter.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/action-sheet/animations/ios.leave.ts b/packages/core/src/components/action-sheet/animations/ios.leave.ts index a4170c00c7..d72e2cefde 100644 --- a/packages/core/src/components/action-sheet/animations/ios.leave.ts +++ b/packages/core/src/components/action-sheet/animations/ios.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/action-sheet/animations/md.enter.ts b/packages/core/src/components/action-sheet/animations/md.enter.ts index c28a97974c..e6418e12f9 100644 --- a/packages/core/src/components/action-sheet/animations/md.enter.ts +++ b/packages/core/src/components/action-sheet/animations/md.enter.ts @@ -4,7 +4,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/action-sheet/animations/md.leave.ts b/packages/core/src/components/action-sheet/animations/md.leave.ts index 02c85aab05..05e859974a 100644 --- a/packages/core/src/components/action-sheet/animations/md.leave.ts +++ b/packages/core/src/components/action-sheet/animations/md.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * MD Action Sheet Leave Animation */ -export default function MdLeaveAnimation( +export default function mdLeaveAnimation( Animation: Animation, baseElm: HTMLElement ): Animation { diff --git a/packages/core/src/components/alert/alert.tsx b/packages/core/src/components/alert/alert.tsx index 672fa1cc1f..7361f45576 100644 --- a/packages/core/src/components/alert/alert.tsx +++ b/packages/core/src/components/alert/alert.tsx @@ -6,11 +6,11 @@ import { domControllerAsync, playAnimationAsync } from '../../utils/helpers'; import { BACKDROP } from '../../utils/overlay-constants'; import { createThemedClasses } from '../../utils/theme'; -import iOSEnterAnimation from './animations/ios.enter'; -import iOSLeaveAnimation from './animations/ios.leave'; +import iosEnterAnimation from './animations/ios.enter'; +import iosLeaveAnimation from './animations/ios.leave'; -import MdEnterAnimation from './animations/md.enter'; -import MdLeaveAnimation from './animations/md.leave'; +import mdEnterAnimation from './animations/md.enter'; +import mdLeaveAnimation from './animations/md.leave'; @Component({ tag: 'ion-alert', @@ -89,7 +89,7 @@ export class Alert { this.ionAlertWillPresent.emit(); // 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 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 - 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 => { this.animation = animation; @@ -481,8 +481,8 @@ export interface AlertDismissEvent extends OverlayDismissEvent { } export { - iOSEnterAnimation as AlertiOSEnterAnimation, - iOSLeaveAnimation as AlertiOSLeaveAnimation, - MdEnterAnimation as AlertMDEnterAnimation, - MdLeaveAnimation as AlertMDLeaveAnimation, + iosEnterAnimation as iosAlertEnterAnimation, + iosLeaveAnimation as iosAlertLeaveAnimation, + mdEnterAnimation as mdAlertEnterAnimation, + mdLeaveAnimation as mdAlertLeaveAnimation, }; diff --git a/packages/core/src/components/alert/animations/ios.enter.ts b/packages/core/src/components/alert/animations/ios.enter.ts index d3d549155f..565b14c62a 100644 --- a/packages/core/src/components/alert/animations/ios.enter.ts +++ b/packages/core/src/components/alert/animations/ios.enter.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/alert/animations/ios.leave.ts b/packages/core/src/components/alert/animations/ios.leave.ts index e9a4421d5e..3c6ba0cf4c 100644 --- a/packages/core/src/components/alert/animations/ios.leave.ts +++ b/packages/core/src/components/alert/animations/ios.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/alert/animations/md.enter.ts b/packages/core/src/components/alert/animations/md.enter.ts index f4b450ab3d..4381278f6a 100644 --- a/packages/core/src/components/alert/animations/md.enter.ts +++ b/packages/core/src/components/alert/animations/md.enter.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/alert/animations/md.leave.ts b/packages/core/src/components/alert/animations/md.leave.ts index 5c19317d3e..9ab2732dc3 100644 --- a/packages/core/src/components/alert/animations/md.leave.ts +++ b/packages/core/src/components/alert/animations/md.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/loading/animations/ios.enter.ts b/packages/core/src/components/loading/animations/ios.enter.ts index 6985f7820b..601f7dd0bb 100644 --- a/packages/core/src/components/loading/animations/ios.enter.ts +++ b/packages/core/src/components/loading/animations/ios.enter.ts @@ -4,7 +4,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/loading/animations/ios.leave.ts b/packages/core/src/components/loading/animations/ios.leave.ts index b5106968bd..b3130a89dd 100644 --- a/packages/core/src/components/loading/animations/ios.leave.ts +++ b/packages/core/src/components/loading/animations/ios.leave.ts @@ -4,7 +4,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/loading/animations/md.enter.ts b/packages/core/src/components/loading/animations/md.enter.ts index 61a876183b..8de570b7e7 100644 --- a/packages/core/src/components/loading/animations/md.enter.ts +++ b/packages/core/src/components/loading/animations/md.enter.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * Md Loading Enter Animation */ -export default function MdEnterAnimation( +export default function mdEnterAnimation( Animation: Animation, baseElm: HTMLElement ): Animation { diff --git a/packages/core/src/components/loading/animations/md.leave.ts b/packages/core/src/components/loading/animations/md.leave.ts index 2ed4f46089..dbc36a0b5a 100644 --- a/packages/core/src/components/loading/animations/md.leave.ts +++ b/packages/core/src/components/loading/animations/md.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * Md Loading Leave Animation */ -export default function MdLeaveAnimation( +export default function mdLeaveAnimation( Animation: Animation, baseElm: HTMLElement ): Animation { diff --git a/packages/core/src/components/loading/loading.tsx b/packages/core/src/components/loading/loading.tsx index 5fabfaae74..c51531180c 100644 --- a/packages/core/src/components/loading/loading.tsx +++ b/packages/core/src/components/loading/loading.tsx @@ -3,11 +3,11 @@ import { Component, Element, Event, EventEmitter, Listen, Prop, State } from '@s import { createThemedClasses } from '../../utils/theme'; -import iOSEnterAnimation from './animations/ios.enter'; -import iOSLeaveAnimation from './animations/ios.leave'; +import iosEnterAnimation from './animations/ios.enter'; +import iosLeaveAnimation from './animations/ios.leave'; -import MdEnterAnimation from './animations/md.enter'; -import MdLeaveAnimation from './animations/md.leave'; +import mdEnterAnimation from './animations/md.enter'; +import mdLeaveAnimation from './animations/md.leave'; @Component({ tag: 'ion-loading', @@ -89,7 +89,7 @@ export class Loading { this.ionLoadingWillPresent.emit({ loading: this }); // 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 this.animationCtrl.create(animationBuilder, this.el).then(animation => { @@ -116,7 +116,7 @@ export class Loading { this.ionLoadingWillDismiss.emit({ loading: this }); // 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 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 +}; diff --git a/packages/core/src/components/modal/animations/ios.enter.ts b/packages/core/src/components/modal/animations/ios.enter.ts index 065068a18c..86a46d2712 100644 --- a/packages/core/src/components/modal/animations/ios.enter.ts +++ b/packages/core/src/components/modal/animations/ios.enter.ts @@ -4,7 +4,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/modal/animations/ios.leave.ts b/packages/core/src/components/modal/animations/ios.leave.ts index 65627de396..72219ad9c9 100644 --- a/packages/core/src/components/modal/animations/ios.leave.ts +++ b/packages/core/src/components/modal/animations/ios.leave.ts @@ -4,7 +4,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/modal/animations/md.enter.ts b/packages/core/src/components/modal/animations/md.enter.ts index 0ca4c8edb0..cc21fd16e4 100644 --- a/packages/core/src/components/modal/animations/md.enter.ts +++ b/packages/core/src/components/modal/animations/md.enter.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * Md Modal Enter Animation */ -export default function MdEnterAnimation( +export default function mdEnterAnimation( Animation: Animation, baseElm: HTMLElement ): Animation { diff --git a/packages/core/src/components/modal/animations/md.leave.ts b/packages/core/src/components/modal/animations/md.leave.ts index 4fcaa0489e..3a66872eb1 100644 --- a/packages/core/src/components/modal/animations/md.leave.ts +++ b/packages/core/src/components/modal/animations/md.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * Md Modal Leave Animation */ -export default function MdLeaveAnimation( +export default function mdLeaveAnimation( Animation: Animation, baseElm: HTMLElement ): Animation { diff --git a/packages/core/src/components/modal/modal.tsx b/packages/core/src/components/modal/modal.tsx index 45142310b2..fa359a5bfb 100644 --- a/packages/core/src/components/modal/modal.tsx +++ b/packages/core/src/components/modal/modal.tsx @@ -2,11 +2,11 @@ import { Component, Element, Event, EventEmitter, Listen, Prop } from '@stencil/ import { Animation, AnimationBuilder, AnimationController, Config } from '../../index'; import { createThemedClasses } from '../../utils/theme'; -import iOSEnterAnimation from './animations/ios.enter'; -import iOSLeaveAnimation from './animations/ios.leave'; +import iosEnterAnimation from './animations/ios.enter'; +import iosLeaveAnimation from './animations/ios.leave'; -import MdEnterAnimation from './animations/md.enter'; -import MdLeaveAnimation from './animations/md.leave'; +import mdEnterAnimation from './animations/md.enter'; +import mdLeaveAnimation from './animations/md.leave'; @Component({ tag: 'ion-modal', styleUrls: { @@ -83,7 +83,7 @@ export class Modal { this.ionModalWillPresent.emit({ modal: this }); // 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 this.animationCtrl.create(animationBuilder, this.el).then(animation => { @@ -107,7 +107,7 @@ export class Modal { this.ionModalWillDismiss.emit({ modal: this }); // 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 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 +}; diff --git a/packages/core/src/components/picker/animations/ios.enter.ts b/packages/core/src/components/picker/animations/ios.enter.ts index 9be1348fbf..2f1453fdaa 100644 --- a/packages/core/src/components/picker/animations/ios.enter.ts +++ b/packages/core/src/components/picker/animations/ios.enter.ts @@ -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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/picker/animations/ios.leave.ts b/packages/core/src/components/picker/animations/ios.leave.ts index dc618fbbf8..9478e00992 100644 --- a/packages/core/src/components/picker/animations/ios.leave.ts +++ b/packages/core/src/components/picker/animations/ios.leave.ts @@ -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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/picker/picker.tsx b/packages/core/src/components/picker/picker.tsx index 57ed930b41..5ce390e768 100644 --- a/packages/core/src/components/picker/picker.tsx +++ b/packages/core/src/components/picker/picker.tsx @@ -1,8 +1,8 @@ import { Animation, AnimationBuilder, AnimationController, Config } from '../../index'; import { Component, CssClassMap, Element, Event, EventEmitter, Listen, Method, Prop, State } from '@stencil/core'; -import iOSEnterAnimation from './animations/ios.enter'; -import iOSLeaveAnimation from './animations/ios.leave'; +import iosEnterAnimation from './animations/ios.enter'; +import iosLeaveAnimation from './animations/ios.leave'; @Component({ tag: 'ion-picker', @@ -84,7 +84,7 @@ export class Picker { this.ionPickerWillPresent.emit({ picker: this }); // 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 this.animationCtrl.create(animationBuilder, this.el).then(animation => { @@ -111,7 +111,7 @@ export class Picker { this.ionPickerWillDismiss.emit({ picker: this }); // 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 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 +}; diff --git a/packages/core/src/components/popover/animations/ios.enter.ts b/packages/core/src/components/popover/animations/ios.enter.ts index bce0738517..5991a3b55c 100644 --- a/packages/core/src/components/popover/animations/ios.enter.ts +++ b/packages/core/src/components/popover/animations/ios.enter.ts @@ -4,7 +4,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/popover/animations/ios.leave.ts b/packages/core/src/components/popover/animations/ios.leave.ts index f20ca4c7da..e6a220a5bb 100644 --- a/packages/core/src/components/popover/animations/ios.leave.ts +++ b/packages/core/src/components/popover/animations/ios.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/popover/animations/md.enter.ts b/packages/core/src/components/popover/animations/md.enter.ts index 4ded8a3817..fed85cd121 100644 --- a/packages/core/src/components/popover/animations/md.enter.ts +++ b/packages/core/src/components/popover/animations/md.enter.ts @@ -4,7 +4,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/popover/animations/md.leave.ts b/packages/core/src/components/popover/animations/md.leave.ts index 0df25ba237..9c5231b8dc 100644 --- a/packages/core/src/components/popover/animations/md.leave.ts +++ b/packages/core/src/components/popover/animations/md.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * 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 backdropAnimation = new Animation(); diff --git a/packages/core/src/components/popover/popover.tsx b/packages/core/src/components/popover/popover.tsx index 3a3d66fe04..0da0b39e07 100644 --- a/packages/core/src/components/popover/popover.tsx +++ b/packages/core/src/components/popover/popover.tsx @@ -3,10 +3,10 @@ import { Animation, AnimationBuilder, AnimationController, Config } from '../../ import { createThemedClasses } from '../../utils/theme'; -import iOSEnterAnimation from './animations/ios.enter'; -import iOSLeaveAnimation from './animations/ios.leave'; -import MdEnterAnimation from './animations/md.enter'; -import MdLeaveAnimation from './animations/md.leave'; +import iosEnterAnimation from './animations/ios.enter'; +import iosLeaveAnimation from './animations/ios.leave'; +import mdEnterAnimation from './animations/md.enter'; +import mdLeaveAnimation from './animations/md.leave'; @Component({ tag: 'ion-popover', @@ -207,7 +207,7 @@ export class Popover { this.ionPopoverWillPresent.emit({ popover: this }); // 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 @@ -232,7 +232,7 @@ export class Popover { this.ionPopoverWillDismiss.emit({ popover: this }); // 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 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 +}; diff --git a/packages/core/src/components/toast/animations/ios.enter.ts b/packages/core/src/components/toast/animations/ios.enter.ts index db49444093..e298d6320e 100644 --- a/packages/core/src/components/toast/animations/ios.enter.ts +++ b/packages/core/src/components/toast/animations/ios.enter.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * iOS Toast Enter Animation */ -export default function iOSEnterAnimation( +export default function iosEnterAnimation( Animation: Animation, baseElm: HTMLElement, position: string diff --git a/packages/core/src/components/toast/animations/ios.leave.ts b/packages/core/src/components/toast/animations/ios.leave.ts index 0470174dfe..d4f7770159 100644 --- a/packages/core/src/components/toast/animations/ios.leave.ts +++ b/packages/core/src/components/toast/animations/ios.leave.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * iOS Toast Leave Animation */ -export default function iOSLeaveAnimation( +export default function iosLeaveAnimation( Animation: Animation, baseElm: HTMLElement, position: string diff --git a/packages/core/src/components/toast/animations/md.enter.ts b/packages/core/src/components/toast/animations/md.enter.ts index 979d37bb5c..8cd30ebf51 100644 --- a/packages/core/src/components/toast/animations/md.enter.ts +++ b/packages/core/src/components/toast/animations/md.enter.ts @@ -3,7 +3,7 @@ import { Animation } from '../../../index'; /** * MD Toast Enter Animation */ -export default function MdEnterAnimation( +export default function mdEnterAnimation( Animation: Animation, baseElm: HTMLElement, position: string diff --git a/packages/core/src/components/toast/animations/md.leave.ts b/packages/core/src/components/toast/animations/md.leave.ts index 80f7e82f34..928ee620ed 100644 --- a/packages/core/src/components/toast/animations/md.leave.ts +++ b/packages/core/src/components/toast/animations/md.leave.ts @@ -1,9 +1,9 @@ import { Animation } from '../../../index'; /** - * iOS Toast Leave Animation + * md Toast Leave Animation */ -export default function iOSLeaveAnimation( +export default function mdLeaveAnimation( Animation: Animation, baseElm: HTMLElement, position: string diff --git a/packages/core/src/components/toast/toast.tsx b/packages/core/src/components/toast/toast.tsx index 7755d4839d..86eca58643 100644 --- a/packages/core/src/components/toast/toast.tsx +++ b/packages/core/src/components/toast/toast.tsx @@ -3,11 +3,11 @@ import { Animation, AnimationBuilder, AnimationController, Config, CssClassMap } import { createThemedClasses } from '../../utils/theme'; -import iOSEnterAnimation from './animations/ios.enter'; -import iOSLeaveAnimation from './animations/ios.leave'; +import iosEnterAnimation from './animations/ios.enter'; +import iosLeaveAnimation from './animations/ios.leave'; -import MdEnterAnimation from './animations/md.enter'; -import MdLeaveAnimation from './animations/md.leave'; +import mdEnterAnimation from './animations/md.enter'; +import mdLeaveAnimation from './animations/md.leave'; @Component({ tag: 'ion-toast', @@ -87,7 +87,7 @@ export class Toast { this.ionToastWillPresent.emit({ toast: this }); // 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 this.animationCtrl.create(animationBuilder, this.el, this.position).then(animation => { @@ -110,7 +110,7 @@ export class Toast { this.ionToastWillDismiss.emit({ toast: this }); // 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 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 +}; diff --git a/packages/core/src/index.d.ts b/packages/core/src/index.d.ts index d2a08e6853..455d7a8448 100644 --- a/packages/core/src/index.d.ts +++ b/packages/core/src/index.d.ts @@ -53,15 +53,7 @@ export * from './components/keyboard-controller/keys'; export { Label } from './components/label/label'; export { List } from './components/list/list'; export { ListHeader } from './components/list-header/list-header'; -export { - Loading, - LoadingEvent, - LoadingOptions, - iOSEnterAnimation as LoadingIOSEnterAnimation, - iOSLeaveAnimation as LoadingIOSLeaveAnimation, - MdEnterAnimation as LoadingMDEnterAnimation, - MdLeaveAnimation as LoadingMDLeaveAnimation -} from './components/loading/loading'; +export * from './components/loading/loading'; export { LoadingController } from './components/loading-controller/loading-controller'; export { Menu } from './components/menu/menu'; export { @@ -70,15 +62,7 @@ export { MenuPushAnimation, MenuRevealAnimation } from './components/menu-controller/menu-controller'; -export { - Modal, - ModalOptions, - ModalEvent, - iOSEnterAnimation as ModalIOSEnterAnimation, - iOSLeaveAnimation as ModalIOSLeaveAnimation, - MdEnterAnimation as ModalMDEnterAnimation, - MdLeaveAnimation as ModalMDLeaveAnimation -} from './components/modal/modal'; +export * from './components/modal/modal'; export { ModalController } from './components/modal-controller/modal-controller'; export { Nav } from './components/nav/nav'; 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 { Page } from './components/page/page'; export { PickerColumnCmp } from './components/picker-column/picker-column'; -export { - Picker, - PickerButton, - PickerColumn, - PickerColumnOption, - PickerEvent, - PickerOptions, - iOSEnterAnimation as PickerIOSEnterAnimation, - iOSLeaveAnimation as PickerIOSLeaveAnimation -} from './components/picker/picker'; +export * from './components/picker/picker'; export { PickerController } from './components/picker-controller/picker-controller'; -export { - Popover, - PopoverEvent, - PopoverOptions, - iOSEnterAnimation as PopoverIOSEnterAnimation, - iOSLeaveAnimation as PopoverIOSLeaveAnimation, - MdEnterAnimation as PopoverMDEnterAnimation, - MdLeaveAnimation as PopoverMDLeaveAnimation -} from './components/popover/popover'; +export * from './components/popover/popover'; export { PopoverController } from './components/popover-controller/popover-controller'; export { RadioGroup } from './components/radio-group/radio-group'; export { Radio, HTMLIonRadioElementEvent } from './components/radio/radio'; @@ -137,15 +104,7 @@ export { Tab } from './components/tab/tab'; export { Tabs } from './components/tabs/tabs'; export { Thumbnail } from './components/thumbnail/thumbnail'; export { ToolbarTitle } from './components/title/title'; -export { - Toast, - ToastEvent, - ToastOptions, - iOSEnterAnimation as ToastIOSEnterAnimation, - iOSLeaveAnimation as ToastIOSLeaveAnimation, - MdEnterAnimation as ToastMDEnterAnimation, - MdLeaveAnimation as ToastMDLeaveAnimation -} from './components/toast/toast'; +export * from './components/toast/toast'; export { ToastController } from './components/toast-controller/toast-controller'; export { Toggle } from './components/toggle/toggle'; export { Toolbar } from './components/toolbar/toolbar';