diff --git a/packages/core/src/components.d.ts b/packages/core/src/components.d.ts index 37c7f03247..0b316c9aee 100644 --- a/packages/core/src/components.d.ts +++ b/packages/core/src/components.d.ts @@ -95,16 +95,15 @@ declare global { } namespace JSXElements { export interface IonActionSheetAttributes extends HTMLAttributes { - - cssClass?: string, - title?: string, - subTitle?: string, - buttons?: ActionSheetButton[], - enableBackdropDismiss?: boolean, - translucent?: boolean, - animate?: boolean, - enterAnimation?: AnimationBuilder, - leaveAnimation?: AnimationBuilder + cssClass?: string; + title?: string; + subTitle?: string; + buttons?: ActionSheetButton[]; + enableBackdropDismiss?: boolean; + translucent?: boolean; + animate?: boolean; + enterAnimation?: AnimationBuilder; + leaveAnimation?: AnimationBuilder; } } } @@ -164,18 +163,17 @@ declare global { } namespace JSXElements { export interface IonAlertAttributes extends HTMLAttributes { - - cssClass?: string, - title?: string, - subTitle?: string, - message?: string, - buttons?: AlertButton[], - inputs?: AlertInput[], - enableBackdropDismiss?: boolean, - translucent?: boolean, - animate?: boolean, - enterAnimation?: AnimationBuilder, - leaveAnimation?: AnimationBuilder + cssClass?: string; + title?: string; + subTitle?: string; + message?: string; + buttons?: AlertButton[]; + inputs?: AlertInput[]; + enableBackdropDismiss?: boolean; + translucent?: boolean; + animate?: boolean; + enterAnimation?: AnimationBuilder; + leaveAnimation?: AnimationBuilder; } } } @@ -241,126 +239,6 @@ declare global { } -import { - AppCordovaPageOne as AppCordovaPageOne -} from './components/app/test/cordova/page-one'; - -declare global { - interface HTMLAppCordovaPageOneElement extends AppCordovaPageOne, HTMLElement { - } - var HTMLAppCordovaPageOneElement: { - prototype: HTMLAppCordovaPageOneElement; - new (): HTMLAppCordovaPageOneElement; - }; - interface HTMLElementTagNameMap { - "app-cordova-page-one": HTMLAppCordovaPageOneElement; - } - interface ElementTagNameMap { - "app-cordova-page-one": HTMLAppCordovaPageOneElement; - } - namespace JSX { - interface IntrinsicElements { - "app-cordova-page-one": JSXElements.AppCordovaPageOneAttributes; - } - } - namespace JSXElements { - export interface AppCordovaPageOneAttributes extends HTMLAttributes { - - } - } -} - - -import { - AppCordovaPageTabs as AppCordovaPageTabs -} from './components/app/test/cordova/page-tabs'; - -declare global { - interface HTMLAppCordovaPageTabsElement extends AppCordovaPageTabs, HTMLElement { - } - var HTMLAppCordovaPageTabsElement: { - prototype: HTMLAppCordovaPageTabsElement; - new (): HTMLAppCordovaPageTabsElement; - }; - interface HTMLElementTagNameMap { - "app-cordova-page-tabs": HTMLAppCordovaPageTabsElement; - } - interface ElementTagNameMap { - "app-cordova-page-tabs": HTMLAppCordovaPageTabsElement; - } - namespace JSX { - interface IntrinsicElements { - "app-cordova-page-tabs": JSXElements.AppCordovaPageTabsAttributes; - } - } - namespace JSXElements { - export interface AppCordovaPageTabsAttributes extends HTMLAttributes { - - } - } -} - - -import { - AppCordovaPageThree as AppCordovaPageThree -} from './components/app/test/cordova/page-three'; - -declare global { - interface HTMLAppCordovaPageThreeElement extends AppCordovaPageThree, HTMLElement { - } - var HTMLAppCordovaPageThreeElement: { - prototype: HTMLAppCordovaPageThreeElement; - new (): HTMLAppCordovaPageThreeElement; - }; - interface HTMLElementTagNameMap { - "app-cordova-page-three": HTMLAppCordovaPageThreeElement; - } - interface ElementTagNameMap { - "app-cordova-page-three": HTMLAppCordovaPageThreeElement; - } - namespace JSX { - interface IntrinsicElements { - "app-cordova-page-three": JSXElements.AppCordovaPageThreeAttributes; - } - } - namespace JSXElements { - export interface AppCordovaPageThreeAttributes extends HTMLAttributes { - - } - } -} - - -import { - AppCordovaPageTwo as AppCordovaPageTwo -} from './components/app/test/cordova/page-two'; - -declare global { - interface HTMLAppCordovaPageTwoElement extends AppCordovaPageTwo, HTMLElement { - } - var HTMLAppCordovaPageTwoElement: { - prototype: HTMLAppCordovaPageTwoElement; - new (): HTMLAppCordovaPageTwoElement; - }; - interface HTMLElementTagNameMap { - "app-cordova-page-two": HTMLAppCordovaPageTwoElement; - } - interface ElementTagNameMap { - "app-cordova-page-two": HTMLAppCordovaPageTwoElement; - } - namespace JSX { - interface IntrinsicElements { - "app-cordova-page-two": JSXElements.AppCordovaPageTwoAttributes; - } - } - namespace JSXElements { - export interface AppCordovaPageTwoAttributes extends HTMLAttributes { - - } - } -} - - import { Avatar as IonAvatar } from './components/avatar/avatar'; @@ -445,9 +323,8 @@ declare global { } namespace JSXElements { export interface IonBadgeAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -477,18 +354,17 @@ declare global { } namespace JSXElements { export interface IonButtonAttributes extends HTMLAttributes { - - itemButton?: boolean, - href?: string, - buttonType?: string, - size?: 'small' | 'large', - disabled?: boolean, - fill?: 'clear' | 'outline' | 'solid' | 'default', - round?: boolean, - expand?: 'full' | 'block', - strong?: boolean, - color?: string, - mode?: 'ios' | 'md' + itemButton?: boolean; + href?: string; + buttonType?: string; + size?: 'small' | 'large'; + disabled?: boolean; + fill?: 'clear' | 'outline' | 'solid' | 'default'; + round?: boolean; + expand?: 'full' | 'block'; + strong?: boolean; + color?: string; + mode?: 'ios' | 'md'; } } } @@ -548,9 +424,8 @@ declare global { } namespace JSXElements { export interface IonCardContentAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -580,10 +455,9 @@ declare global { } namespace JSXElements { export interface IonCardHeaderAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - translucent?: boolean + color?: string; + mode?: 'ios' | 'md'; + translucent?: boolean; } } } @@ -613,9 +487,8 @@ declare global { } namespace JSXElements { export interface IonCardSubtitleAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -645,9 +518,8 @@ declare global { } namespace JSXElements { export interface IonCardTitleAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -677,9 +549,8 @@ declare global { } namespace JSXElements { export interface IonCardAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -709,13 +580,12 @@ declare global { } namespace JSXElements { export interface IonCheckboxAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - name?: string, - checked?: boolean, - disabled?: boolean, - value?: string + color?: string; + mode?: 'ios' | 'md'; + name?: string; + checked?: boolean; + disabled?: boolean; + value?: string; } } } @@ -745,12 +615,11 @@ declare global { } namespace JSXElements { export interface IonChipButtonAttributes extends HTMLAttributes { - - href?: string, - color?: string, - mode?: 'ios' | 'md', - clear?: boolean, - disabled?: boolean + href?: string; + color?: string; + mode?: 'ios' | 'md'; + clear?: boolean; + disabled?: boolean; } } } @@ -780,9 +649,8 @@ declare global { } namespace JSXElements { export interface IonChipAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -842,11 +710,10 @@ declare global { } namespace JSXElements { export interface IonContentAttributes extends HTMLAttributes { - - ionScrollStart?: Function, - ionScroll?: Function, - ionScrollEnd?: Function, - fullscreen?: boolean + ionScrollStart?: Function; + ionScroll?: Function; + ionScrollEnd?: Function; + fullscreen?: boolean; } } } @@ -876,26 +743,25 @@ declare global { } namespace JSXElements { export interface IonDatetimeAttributes extends HTMLAttributes { - - disabled?: boolean, - min?: string, - max?: string, - displayFormat?: string, - pickerFormat?: string, - cancelText?: string, - doneText?: string, - yearValues?: any, - monthValues?: any, - dayValues?: any, - hourValues?: any, - minuteValues?: any, - monthNames?: any, - monthShortNames?: any, - dayNames?: any, - dayShortNames?: any, - pickerOptions?: PickerOptions, - placeholder?: string, - value?: string + disabled?: boolean; + min?: string; + max?: string; + displayFormat?: string; + pickerFormat?: string; + cancelText?: string; + doneText?: string; + yearValues?: any; + monthValues?: any; + dayValues?: any; + hourValues?: any; + minuteValues?: any; + monthNames?: any; + monthShortNames?: any; + dayNames?: any; + dayShortNames?: any; + pickerOptions?: PickerOptions; + placeholder?: string; + value?: string; } } } @@ -955,8 +821,7 @@ declare global { } namespace JSXElements { export interface IonFabListAttributes extends HTMLAttributes { - - activated?: boolean + activated?: boolean; } } } @@ -986,15 +851,14 @@ declare global { } namespace JSXElements { export interface IonFabButtonAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - href?: string, - translucent?: boolean, - activated?: boolean, - toggleActive?: Function, - show?: boolean, - disabled?: boolean + color?: string; + mode?: 'ios' | 'md'; + href?: string; + translucent?: boolean; + activated?: boolean; + toggleActive?: Function; + show?: boolean; + disabled?: boolean; } } } @@ -1024,8 +888,7 @@ declare global { } namespace JSXElements { export interface IonFooterAttributes extends HTMLAttributes { - - translucent?: boolean + translucent?: boolean; } } } @@ -1085,25 +948,24 @@ declare global { } namespace JSXElements { export interface IonGestureAttributes extends HTMLAttributes { - - enabled?: boolean, - attachTo?: ElementRef, - autoBlockAll?: boolean, - block?: string, - disableScroll?: boolean, - direction?: string, - gestureName?: string, - gesturePriority?: number, - maxAngle?: number, - threshold?: number, - type?: string, - canStart?: GestureCallback, - onWillStart?: (_: GestureDetail) => Promise, - onStart?: GestureCallback, - onMove?: GestureCallback, - onEnd?: GestureCallback, - onPress?: GestureCallback, - notCaptured?: GestureCallback + enabled?: boolean; + attachTo?: ElementRef; + autoBlockAll?: boolean; + block?: string; + disableScroll?: boolean; + direction?: string; + gestureName?: string; + gesturePriority?: number; + maxAngle?: number; + threshold?: number; + type?: string; + canStart?: GestureCallback; + onWillStart?: (_: GestureDetail) => Promise; + onStart?: GestureCallback; + onMove?: GestureCallback; + onEnd?: GestureCallback; + onPress?: GestureCallback; + notCaptured?: GestureCallback; } } } @@ -1163,8 +1025,7 @@ declare global { } namespace JSXElements { export interface IonHeaderAttributes extends HTMLAttributes { - - translucent?: boolean + translucent?: boolean; } } } @@ -1194,9 +1055,8 @@ declare global { } namespace JSXElements { export interface IonInfiniteScrollContentAttributes extends HTMLAttributes { - - loadingSpinner?: string, - loadingText?: string + loadingSpinner?: string; + loadingText?: string; } } } @@ -1226,10 +1086,9 @@ declare global { } namespace JSXElements { export interface IonInfiniteScrollAttributes extends HTMLAttributes { - - threshold?: string, - enabled?: boolean, - position?: string + threshold?: string; + enabled?: boolean; + position?: string; } } } @@ -1259,33 +1118,32 @@ declare global { } namespace JSXElements { export interface IonInputAttributes extends HTMLAttributes { - - accept?: string, - autocapitalize?: string, - autocomplete?: string, - autocorrect?: string, - autofocus?: boolean, - checked?: boolean, - clearInput?: boolean, - clearOnEdit?: boolean, - disabled?: boolean, - inputmode?: string, - max?: string, - maxlength?: number, - min?: string, - minlength?: number, - multiple?: boolean, - name?: string, - pattern?: string, - placeholder?: string, - readonly?: boolean, - required?: boolean, - results?: number, - spellcheck?: boolean, - step?: string, - size?: number, - type?: string, - value?: string + accept?: string; + autocapitalize?: string; + autocomplete?: string; + autocorrect?: string; + autofocus?: boolean; + checked?: boolean; + clearInput?: boolean; + clearOnEdit?: boolean; + disabled?: boolean; + inputmode?: string; + max?: string; + maxlength?: number; + min?: string; + minlength?: number; + multiple?: boolean; + name?: string; + pattern?: string; + placeholder?: string; + readonly?: boolean; + required?: boolean; + results?: number; + spellcheck?: boolean; + step?: string; + size?: number; + type?: string; + value?: string; } } } @@ -1315,9 +1173,8 @@ declare global { } namespace JSXElements { export interface IonItemDividerAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -1347,11 +1204,10 @@ declare global { } namespace JSXElements { export interface IonItemOptionAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - href?: string, - disabled?: boolean + color?: string; + mode?: 'ios' | 'md'; + href?: string; + disabled?: boolean; } } } @@ -1381,8 +1237,7 @@ declare global { } namespace JSXElements { export interface IonItemOptionsAttributes extends HTMLAttributes { - - side?: Side + side?: Side; } } } @@ -1442,10 +1297,9 @@ declare global { } namespace JSXElements { export interface IonItemAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - href?: string + color?: string; + mode?: 'ios' | 'md'; + href?: string; } } } @@ -1505,12 +1359,11 @@ declare global { } namespace JSXElements { export interface IonLabelAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - fixed?: boolean, - floating?: boolean, - stacked?: boolean + color?: string; + mode?: 'ios' | 'md'; + fixed?: boolean; + floating?: boolean; + stacked?: boolean; } } } @@ -1540,9 +1393,8 @@ declare global { } namespace JSXElements { export interface IonListHeaderAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -1632,16 +1484,16 @@ declare global { } namespace JSXElements { export interface IonLoadingAttributes extends HTMLAttributes { - - cssClass?: string, - content?: string, - dismissOnPageChange?: boolean, - duration?: number, - translucent?: boolean, - showBackdrop?: boolean, - enterAnimation?: AnimationBuilder, - leaveAnimation?: AnimationBuilder, - animate?: boolean + spinner?: string; + cssClass?: string; + content?: string; + dismissOnPageChange?: boolean; + duration?: number; + translucent?: boolean; + showBackdrop?: boolean; + enterAnimation?: AnimationBuilder; + leaveAnimation?: AnimationBuilder; + animate?: boolean; } } } @@ -1701,15 +1553,14 @@ declare global { } namespace JSXElements { export interface IonMenuAttributes extends HTMLAttributes { - - content?: string, - menuId?: string, - type?: string, - enabled?: boolean, - side?: Side, - swipeEnabled?: boolean, - persistent?: boolean, - maxEdgeStart?: number + content?: string; + menuId?: string; + type?: string; + enabled?: boolean; + side?: Side; + swipeEnabled?: boolean; + persistent?: boolean; + maxEdgeStart?: number; } } } @@ -1769,18 +1620,17 @@ declare global { } namespace JSXElements { export interface IonModalAttributes extends HTMLAttributes { - - mode?: string, - color?: string, - component?: string, - componentProps?: any, - cssClass?: string, - enableBackdropDismiss?: boolean, - modalId?: string, - showBackdrop?: boolean, - enterAnimation?: AnimationBuilder, - leaveAnimation?: AnimationBuilder, - animate?: boolean + mode?: string; + color?: string; + component?: string; + componentProps?: any; + cssClass?: string; + enableBackdropDismiss?: boolean; + modalId?: string; + showBackdrop?: boolean; + enterAnimation?: AnimationBuilder; + leaveAnimation?: AnimationBuilder; + animate?: boolean; } } } @@ -1810,8 +1660,7 @@ declare global { } namespace JSXElements { export interface IonNavControllerAttributes extends HTMLAttributes { - - delegate?: FrameworkDelegate + delegate?: FrameworkDelegate; } } } @@ -1841,10 +1690,9 @@ declare global { } namespace JSXElements { export interface IonNavAttributes extends HTMLAttributes { - - mode?: string, - root?: any, - delegate?: FrameworkDelegate + mode?: string; + root?: any; + delegate?: FrameworkDelegate; } } } @@ -1874,11 +1722,10 @@ declare global { } namespace JSXElements { export interface IonNavbarAttributes extends HTMLAttributes { - - hideBackButton?: boolean, - backButtonText?: string, - backButtonIcon?: string, - hidden?: boolean + hideBackButton?: boolean; + backButtonText?: string; + backButtonIcon?: string; + hidden?: boolean; } } } @@ -1908,9 +1755,8 @@ declare global { } namespace JSXElements { export interface IonNoteAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md' + color?: string; + mode?: 'ios' | 'md'; } } } @@ -1970,8 +1816,7 @@ declare global { } namespace JSXElements { export interface IonPickerColumnAttributes extends HTMLAttributes { - - col?: PickerColumn + col?: PickerColumn; } } } @@ -2031,19 +1876,18 @@ declare global { } namespace JSXElements { export interface IonPickerAttributes extends HTMLAttributes { - - cssClass?: string, - content?: string, - dismissOnPageChange?: boolean, - duration?: number, - enterAnimation?: AnimationBuilder, - leaveAnimation?: AnimationBuilder, - pickerId?: string, - showBackdrop?: boolean, - enableBackdropDismiss?: boolean, - animate?: boolean, - buttons?: PickerButton[], - columns?: PickerColumn[] + cssClass?: string; + content?: string; + dismissOnPageChange?: boolean; + duration?: number; + enterAnimation?: AnimationBuilder; + leaveAnimation?: AnimationBuilder; + pickerId?: string; + showBackdrop?: boolean; + enableBackdropDismiss?: boolean; + animate?: boolean; + buttons?: PickerButton[]; + columns?: PickerColumn[]; } } } @@ -2103,20 +1947,19 @@ declare global { } namespace JSXElements { export interface IonPopoverAttributes extends HTMLAttributes { - - mode?: string, - color?: string, - component?: string, - componentProps?: any, - cssClass?: string, - enableBackdropDismiss?: boolean, - enterAnimation?: AnimationBuilder, - leaveAnimation?: AnimationBuilder, - ev?: Event, - popoverId?: string, - showBackdrop?: boolean, - translucent?: boolean, - animate?: boolean + mode?: string; + color?: string; + component?: string; + componentProps?: any; + cssClass?: string; + enableBackdropDismiss?: boolean; + enterAnimation?: AnimationBuilder; + leaveAnimation?: AnimationBuilder; + ev?: Event; + popoverId?: string; + showBackdrop?: boolean; + translucent?: boolean; + animate?: boolean; } } } @@ -2146,11 +1989,10 @@ declare global { } namespace JSXElements { export interface IonRadioGroupAttributes extends HTMLAttributes { - - allowEmptySelection?: boolean, - disabled?: boolean, - name?: string, - value?: string + allowEmptySelection?: boolean; + disabled?: boolean; + name?: string; + value?: string; } } } @@ -2180,13 +2022,12 @@ declare global { } namespace JSXElements { export interface IonRadioAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - name?: string, - disabled?: boolean, - checked?: boolean, - value?: string + color?: string; + mode?: 'ios' | 'md'; + name?: string; + disabled?: boolean; + checked?: boolean; + value?: string; } } } @@ -2216,16 +2057,15 @@ declare global { } namespace JSXElements { export interface IonRangeKnobAttributes extends HTMLAttributes { - - pressed?: boolean, - pin?: boolean, - min?: number, - max?: number, - val?: number, - disabled?: boolean, - labelId?: string, - knob?: string, - ratio?: number + pressed?: boolean; + pin?: boolean; + min?: number; + max?: number; + val?: number; + disabled?: boolean; + labelId?: string; + knob?: string; + ratio?: number; } } } @@ -2255,18 +2095,17 @@ declare global { } namespace JSXElements { export interface IonRangeAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - debounce?: number, - disabled?: boolean, - dualKnobs?: boolean, - max?: number, - min?: number, - pin?: boolean, - snaps?: boolean, - step?: number, - value?: any + color?: string; + mode?: 'ios' | 'md'; + debounce?: number; + disabled?: boolean; + dualKnobs?: boolean; + max?: number; + min?: number; + pin?: boolean; + snaps?: boolean; + step?: number; + value?: any; } } } @@ -2296,8 +2135,7 @@ declare global { } namespace JSXElements { export interface IonReorderGroupAttributes extends HTMLAttributes { - - enabled?: boolean + enabled?: boolean; } } } @@ -2357,9 +2195,8 @@ declare global { } namespace JSXElements { export interface IonRouteLinkAttributes extends HTMLAttributes { - - url?: string, - router?: any + url?: string; + router?: any; } } } @@ -2389,10 +2226,9 @@ declare global { } namespace JSXElements { export interface IonRouteAttributes extends HTMLAttributes { - - path?: string, - component?: string, - props?: any + path?: string; + component?: string; + props?: any; } } } @@ -2482,12 +2318,11 @@ declare global { } namespace JSXElements { export interface IonScrollAttributes extends HTMLAttributes { - - enabled?: boolean, - jsScroll?: boolean, - onionScrollStart?: ScrollCallback, - onionScroll?: ScrollCallback, - onionScrollEnd?: ScrollCallback + enabled?: boolean; + jsScroll?: boolean; + onionScrollStart?: ScrollCallback; + onionScroll?: ScrollCallback; + onionScrollEnd?: ScrollCallback; } } } @@ -2517,19 +2352,18 @@ declare global { } namespace JSXElements { export interface IonSearchbarAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - animated?: boolean, - autocomplete?: string, - autocorrect?: string, - cancelButtonText?: string, - debounce?: number, - placeholder?: string, - showCancelButton?: boolean, - spellcheck?: boolean, - type?: string, - value?: string + color?: string; + mode?: 'ios' | 'md'; + animated?: boolean; + autocomplete?: string; + autocorrect?: string; + cancelButtonText?: string; + debounce?: number; + placeholder?: string; + showCancelButton?: boolean; + spellcheck?: boolean; + type?: string; + value?: string; } } } @@ -2559,12 +2393,11 @@ declare global { } namespace JSXElements { export interface IonSegmentButtonAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - checked?: boolean, - disabled?: boolean, - value?: string + color?: string; + mode?: 'ios' | 'md'; + checked?: boolean; + disabled?: boolean; + value?: string; } } } @@ -2594,11 +2427,10 @@ declare global { } namespace JSXElements { export interface IonSegmentAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - disabled?: boolean, - value?: string + color?: string; + mode?: 'ios' | 'md'; + disabled?: boolean; + value?: string; } } } @@ -2628,10 +2460,9 @@ declare global { } namespace JSXElements { export interface IonSelectOptionAttributes extends HTMLAttributes { - - disabled?: boolean, - selected?: boolean, - value?: string + disabled?: boolean; + selected?: boolean; + value?: string; } } } @@ -2661,9 +2492,8 @@ declare global { } namespace JSXElements { export interface IonSelectPopoverAttributes extends HTMLAttributes { - - options?: SelectPopoverOption[], - value?: string + options?: SelectPopoverOption[]; + value?: string; } } } @@ -2693,16 +2523,15 @@ declare global { } namespace JSXElements { export interface IonSelectAttributes extends HTMLAttributes { - - disabled?: boolean, - cancelText?: string, - okText?: string, - placeholder?: string, - selectOptions?: any, - interface?: string, - selectedText?: string, - multiple?: boolean, - value?: string | string[] + disabled?: boolean; + cancelText?: string; + okText?: string; + placeholder?: string; + selectOptions?: any; + interface?: string; + selectedText?: string; + multiple?: boolean; + value?: string | string[]; } } } @@ -2732,8 +2561,7 @@ declare global { } namespace JSXElements { export interface IonSkeletonTextAttributes extends HTMLAttributes { - - width?: string + width?: string; } } } @@ -2793,21 +2621,20 @@ declare global { } namespace JSXElements { export interface IonSlidesAttributes extends HTMLAttributes { - - effect?: string, - autoplay?: number, - control?: any, - direction?: 'horizontal' | 'vertical', - initialSlide?: number, - loop?: boolean, - pager?: boolean, - paginationType?: string, - parallax?: boolean, - slidesPerView?: number | 'auto', - spaceBetween?: number, - speed?: number, - zoom?: boolean, - keyboardControl?: boolean + effect?: string; + autoplay?: number; + control?: any; + direction?: 'horizontal' | 'vertical'; + initialSlide?: number; + loop?: boolean; + pager?: boolean; + paginationType?: string; + parallax?: boolean; + slidesPerView?: number | 'auto'; + spaceBetween?: number; + speed?: number; + zoom?: boolean; + keyboardControl?: boolean; } } } @@ -2837,12 +2664,11 @@ declare global { } namespace JSXElements { export interface IonSpinnerAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - duration?: number, - name?: string, - paused?: boolean + color?: string; + mode?: 'ios' | 'md'; + duration?: number; + name?: string; + paused?: boolean; } } } @@ -2872,9 +2698,8 @@ declare global { } namespace JSXElements { export interface IonSplitPaneAttributes extends HTMLAttributes { - - enabled?: boolean, - when?: string | boolean + enabled?: boolean; + when?: string | boolean; } } } @@ -2904,9 +2729,8 @@ declare global { } namespace JSXElements { export interface IonTabButtonAttributes extends HTMLAttributes { - - selected?: boolean, - tab?: HTMLIonTabElement + selected?: boolean; + tab?: HTMLIonTabElement; } } } @@ -2936,8 +2760,7 @@ declare global { } namespace JSXElements { export interface IonTabHighlightAttributes extends HTMLAttributes { - - selectedTab?: HTMLIonTabElement + selectedTab?: HTMLIonTabElement; } } } @@ -2967,17 +2790,16 @@ declare global { } namespace JSXElements { export interface IonTabAttributes extends HTMLAttributes { - - btnId?: string, - path?: string, - title?: string, - icon?: string, - badge?: string, - badgeStyle?: string, - enabled?: boolean, - show?: boolean, - tabsHideOnSubPages?: boolean, - selected?: boolean + btnId?: string; + path?: string; + title?: string; + icon?: string; + badge?: string; + badgeStyle?: string; + enabled?: boolean; + show?: boolean; + tabsHideOnSubPages?: boolean; + selected?: boolean; } } } @@ -3007,13 +2829,12 @@ declare global { } namespace JSXElements { export interface IonTabbarAttributes extends HTMLAttributes { - - placement?: string, - tabs?: HTMLIonTabElement[], - selectedTab?: HTMLIonTabElement, - layout?: string, - highlight?: boolean, - translucent?: boolean + placement?: string; + tabs?: HTMLIonTabElement[]; + selectedTab?: HTMLIonTabElement; + layout?: string; + highlight?: boolean; + translucent?: boolean; } } } @@ -3043,73 +2864,12 @@ declare global { } namespace JSXElements { export interface IonTabsAttributes extends HTMLAttributes { - - name?: string, - tabbarHidden?: boolean, - tabbarLayout?: string, - tabbarPlacement?: string, - tabbarHighlight?: boolean, - translucent?: boolean - } - } -} - - -import { - PageTab as PageTab -} from './components/tabs/test/basic/page-tab'; - -declare global { - interface HTMLPageTabElement extends PageTab, HTMLElement { - } - var HTMLPageTabElement: { - prototype: HTMLPageTabElement; - new (): HTMLPageTabElement; - }; - interface HTMLElementTagNameMap { - "page-tab": HTMLPageTabElement; - } - interface ElementTagNameMap { - "page-tab": HTMLPageTabElement; - } - namespace JSX { - interface IntrinsicElements { - "page-tab": JSXElements.PageTabAttributes; - } - } - namespace JSXElements { - export interface PageTabAttributes extends HTMLAttributes { - - } - } -} - - -import { - TranslucentPageTab as TranslucentPageTab -} from './components/tabs/test/translucent/translucent-page-tab'; - -declare global { - interface HTMLTranslucentPageTabElement extends TranslucentPageTab, HTMLElement { - } - var HTMLTranslucentPageTabElement: { - prototype: HTMLTranslucentPageTabElement; - new (): HTMLTranslucentPageTabElement; - }; - interface HTMLElementTagNameMap { - "translucent-page-tab": HTMLTranslucentPageTabElement; - } - interface ElementTagNameMap { - "translucent-page-tab": HTMLTranslucentPageTabElement; - } - namespace JSX { - interface IntrinsicElements { - "translucent-page-tab": JSXElements.TranslucentPageTabAttributes; - } - } - namespace JSXElements { - export interface TranslucentPageTabAttributes extends HTMLAttributes { - + name?: string; + tabbarHidden?: boolean; + tabbarLayout?: string; + tabbarPlacement?: string; + tabbarHighlight?: boolean; + translucent?: boolean; } } } @@ -3139,23 +2899,22 @@ declare global { } namespace JSXElements { export interface IonTextareaAttributes extends HTMLAttributes { - - autocapitalize?: string, - autocomplete?: string, - autofocus?: boolean, - clearOnEdit?: boolean, - disabled?: boolean, - maxlength?: number, - minlength?: number, - name?: string, - placeholder?: string, - readonly?: boolean, - required?: boolean, - spellcheck?: boolean, - cols?: number, - rows?: number, - wrap?: string, - value?: string + autocapitalize?: string; + autocomplete?: string; + autofocus?: boolean; + clearOnEdit?: boolean; + disabled?: boolean; + maxlength?: number; + minlength?: number; + name?: string; + placeholder?: string; + readonly?: boolean; + required?: boolean; + spellcheck?: boolean; + cols?: number; + rows?: number; + wrap?: string; + value?: string; } } } @@ -3275,19 +3034,18 @@ declare global { } namespace JSXElements { export interface IonToastAttributes extends HTMLAttributes { - - message?: string, - cssClass?: string, - duration?: number, - showCloseButton?: boolean, - closeButtonText?: string, - dismissOnPageChange?: boolean, - position?: string, - translucent?: boolean, - toastId?: string, - animate?: boolean, - enterAnimation?: AnimationBuilder, - leaveAnimation?: AnimationBuilder + message?: string; + cssClass?: string; + duration?: number; + showCloseButton?: boolean; + closeButtonText?: string; + dismissOnPageChange?: boolean; + position?: string; + translucent?: boolean; + toastId?: string; + animate?: boolean; + enterAnimation?: AnimationBuilder; + leaveAnimation?: AnimationBuilder; } } } @@ -3317,13 +3075,12 @@ declare global { } namespace JSXElements { export interface IonToggleAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - name?: string, - checked?: boolean, - disabled?: boolean, - value?: string + color?: string; + mode?: 'ios' | 'md'; + name?: string; + checked?: boolean; + disabled?: boolean; + value?: string; } } } @@ -3353,10 +3110,9 @@ declare global { } namespace JSXElements { export interface IonToolbarAttributes extends HTMLAttributes { - - color?: string, - mode?: 'ios' | 'md', - translucent?: boolean + color?: string; + mode?: 'ios' | 'md'; + translucent?: boolean; } } } diff --git a/packages/core/src/components/loading/loading.tsx b/packages/core/src/components/loading/loading.tsx index 3b1532b46a..b4ace54815 100644 --- a/packages/core/src/components/loading/loading.tsx +++ b/packages/core/src/components/loading/loading.tsx @@ -67,8 +67,7 @@ export class Loading { */ @Event() ionLoadingDidUnload: EventEmitter; - @State() private showSpinner: boolean = null; - @State() private spinner: string; + @Prop() spinner: string; @Prop({ connect: 'ion-animation-controller' }) animationCtrl: AnimationController; @Prop({ context: 'config' }) config: Config; @@ -116,7 +115,7 @@ export class Loading { /** * Toggles whether animation should occur or not */ - @Prop() animate: boolean; + @Prop() animate: boolean = true; /** * Present a loading overlay after it has been created @@ -185,17 +184,7 @@ export class Loading { componentDidLoad() { if (!this.spinner) { - let defaultSpinner = 'lines'; - - if (this.mode === 'md') { - defaultSpinner = 'crescent'; - } - - this.spinner = this.config.get('loadingSpinner') || defaultSpinner; - } - - if (this.showSpinner === null || this.showSpinner === undefined) { - this.showSpinner = !!(this.spinner && this.spinner !== 'hide'); + this.spinner = this.config.get('loadingSPinner', this.mode === 'ios' ? 'lines' : 'crescent'); } this.ionLoadingDidLoad.emit(); } @@ -238,11 +227,15 @@ export class Loading { } render() { - // TODO: cssClass + if (this.cssClass) { + this.cssClass.split(' ').forEach(cssClass => { + if (cssClass.trim() !== '') this.el.classList.add(cssClass); + }); + } const loadingInner: any[] = []; - if (this.showSpinner) { + if (this.spinner !== 'hide') { loadingInner.push(
diff --git a/packages/core/src/components/loading/readme.md b/packages/core/src/components/loading/readme.md index 86b5614070..445376c7ef 100644 --- a/packages/core/src/components/loading/readme.md +++ b/packages/core/src/components/loading/readme.md @@ -47,6 +47,11 @@ any boolean +#### spinner + +string + + #### translucent boolean @@ -94,6 +99,11 @@ any boolean +#### spinner + +string + + #### translucent boolean diff --git a/packages/core/src/components/loading/test/basic/index.html b/packages/core/src/components/loading/test/basic/index.html index 4bc123ceba..deb49828c7 100644 --- a/packages/core/src/components/loading/test/basic/index.html +++ b/packages/core/src/components/loading/test/basic/index.html @@ -20,8 +20,9 @@ Show Loading Show Loading with long content - Show Loading with no spinner - Show Loading with translucent + Show Loading with no spinner + Show Loading with translucent + Show Loading with cssClass @@ -75,6 +76,9 @@