From 0680fe925145fbff927f1b0a73b3dd6f3ccee46e Mon Sep 17 00:00:00 2001 From: Manu MA Date: Fri, 2 Nov 2018 17:30:37 +0100 Subject: [PATCH] docs(all): add global config docs (#16193) * docs(all): add global config docs fixes #16109 * lint issue * add tabButtonLayout * tabs docs --- core/src/components.d.ts | 38 ++-- .../infinite-scroll-content.tsx | 2 +- .../infinite-scroll-content/readme.md | 8 +- .../components/loading/loading-interface.ts | 2 +- core/src/components/loading/loading.tsx | 4 +- core/src/components/loading/readme.md | 30 +-- .../components/loading/test/basic/index.html | 2 +- .../loading/test/preview/index.html | 2 +- .../loading/test/standalone/index.html | 2 +- core/src/components/loading/usage/angular.md | 2 +- .../components/loading/usage/javascript.md | 2 +- .../components/refresher-content/readme.md | 12 +- .../refresher-content/refresher-content.tsx | 6 +- core/src/components/split-pane/split-pane.tsx | 4 +- .../components/tab-bar/tab-bar-interface.ts | 6 +- core/src/components/tab-bar/tab-bar.ios.scss | 2 +- core/src/components/tab-bar/tab-bar.tsx | 6 +- core/src/components/tab-button/readme.md | 16 +- core/src/components/tab-button/tab-button.tsx | 16 +- core/src/components/tabs/readme.md | 1 + core/src/components/tabs/tabs.tsx | 10 +- core/src/components/tabs/usage/angular.md | 44 ++-- core/src/components/tabs/usage/javascript.md | 1 + core/src/utils/config.ts | 189 ++++++++++++++---- 24 files changed, 267 insertions(+), 140 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index eca38edccd..e77e31b0e6 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -56,9 +56,9 @@ import { Side, SpinnerTypes, StyleEvent, - TabbarChangedDetail, - TabbarClickDetail, - TabbarLayout, + TabBarChangedDetail, + TabButtonClickDetail, + TabButtonLayout, TextFieldTypes, TextInputChangeEvent, ToastOptions, @@ -1632,7 +1632,7 @@ export namespace Components { /** * An animated SVG spinner that shows while loading. */ - 'loadingSpinner'?: SpinnerTypes; + 'loadingSpinner'?: SpinnerTypes | null; /** * Optional text to display while loading. */ @@ -1642,7 +1642,7 @@ export namespace Components { /** * An animated SVG spinner that shows while loading. */ - 'loadingSpinner'?: SpinnerTypes; + 'loadingSpinner'?: SpinnerTypes | null; /** * Optional text to display while loading. */ @@ -2316,7 +2316,7 @@ export namespace Components { /** * The name of the spinner to display. */ - 'spinner'?: SpinnerTypes | 'hide'; + 'spinner'?: SpinnerTypes | null; /** * If `true`, the loading indicator will be translucent. */ @@ -2391,7 +2391,7 @@ export namespace Components { /** * The name of the spinner to display. */ - 'spinner'?: SpinnerTypes | 'hide'; + 'spinner'?: SpinnerTypes | null; /** * If `true`, the loading indicator will be translucent. */ @@ -3492,7 +3492,7 @@ export namespace Components { /** * A static icon to display when you begin to pull down */ - 'pullingIcon'?: string; + 'pullingIcon'?: string | null; /** * The text you want to display when you begin to pull down */ @@ -3500,7 +3500,7 @@ export namespace Components { /** * An animated SVG spinner that shows when refreshing begins */ - 'refreshingSpinner'?: SpinnerTypes; + 'refreshingSpinner'?: SpinnerTypes | null; /** * The text you want to display when performing a refresh */ @@ -3510,7 +3510,7 @@ export namespace Components { /** * A static icon to display when you begin to pull down */ - 'pullingIcon'?: string; + 'pullingIcon'?: string | null; /** * The text you want to display when you begin to pull down */ @@ -3518,7 +3518,7 @@ export namespace Components { /** * An animated SVG spinner that shows when refreshing begins */ - 'refreshingSpinner'?: SpinnerTypes; + 'refreshingSpinner'?: SpinnerTypes | null; /** * The text you want to display when performing a refresh */ @@ -4442,7 +4442,7 @@ export namespace Components { /** * Set the layout of the text and icon in the tab bar. */ - 'layout': TabbarLayout; + 'layout': TabButtonLayout; /** * The mode determines which platform styles to use. */ @@ -4464,12 +4464,12 @@ export namespace Components { /** * Set the layout of the text and icon in the tab bar. */ - 'layout'?: TabbarLayout; + 'layout'?: TabButtonLayout; /** * The mode determines which platform styles to use. */ 'mode'?: Mode; - 'onIonTabBarChanged'?: (event: CustomEvent) => void; + 'onIonTabBarChanged'?: (event: CustomEvent) => void; /** * The selected tab component */ @@ -4494,9 +4494,9 @@ export namespace Components { */ 'href'?: string; /** - * Set the layout of the text and icon in the tabbar. + * Set the layout of the text and icon in the tab bar. It defaults to `'icon-top'`. */ - 'layout': TabbarLayout; + 'layout'?: TabButtonLayout; /** * The mode determines which platform styles to use. */ @@ -4520,9 +4520,9 @@ export namespace Components { */ 'href'?: string; /** - * Set the layout of the text and icon in the tabbar. + * Set the layout of the text and icon in the tab bar. It defaults to `'icon-top'`. */ - 'layout'?: TabbarLayout; + 'layout'?: TabButtonLayout; /** * The mode determines which platform styles to use. */ @@ -4530,7 +4530,7 @@ export namespace Components { /** * Emitted when the tab bar is clicked */ - 'onIonTabButtonClick'?: (event: CustomEvent) => void; + 'onIonTabButtonClick'?: (event: CustomEvent) => void; /** * A tab id must be provided for each `ion-tab`. It's used internally to reference the selected tab or by the router to switch between them. */ diff --git a/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx b/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx index 2573c11248..f425e56019 100644 --- a/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx +++ b/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx @@ -19,7 +19,7 @@ export class InfiniteScrollContent implements ComponentInterface { /** * An animated SVG spinner that shows while loading. */ - @Prop({ mutable: true }) loadingSpinner?: SpinnerTypes; + @Prop({ mutable: true }) loadingSpinner?: SpinnerTypes | null; /** * Optional text to display while loading. diff --git a/core/src/components/infinite-scroll-content/readme.md b/core/src/components/infinite-scroll-content/readme.md index e6139b8e17..7515af7b56 100644 --- a/core/src/components/infinite-scroll-content/readme.md +++ b/core/src/components/infinite-scroll-content/readme.md @@ -7,10 +7,10 @@ The `ion-infinite-scroll-content` component is the default child used by the `io ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------- | ----------------- | ------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------- | -| `loadingSpinner` | `loading-spinner` | An animated SVG spinner that shows while loading. | `"bubbles" \| "circles" \| "crescent" \| "dots" \| "lines" \| "lines-small" \| undefined` | `undefined` | -| `loadingText` | `loading-text` | Optional text to display while loading. | `string \| undefined` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ---------------- | ----------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------- | +| `loadingSpinner` | `loading-spinner` | An animated SVG spinner that shows while loading. | `"bubbles" \| "circles" \| "crescent" \| "dots" \| "lines" \| "lines-small" \| null \| undefined` | `undefined` | +| `loadingText` | `loading-text` | Optional text to display while loading. | `string \| undefined` | `undefined` | ---------------------------------------------- diff --git a/core/src/components/loading/loading-interface.ts b/core/src/components/loading/loading-interface.ts index af3934a78b..c345e90c08 100644 --- a/core/src/components/loading/loading-interface.ts +++ b/core/src/components/loading/loading-interface.ts @@ -1,7 +1,7 @@ import { AnimationBuilder, Mode, SpinnerTypes } from '../../interface'; export interface LoadingOptions { - spinner?: SpinnerTypes | 'hide'; + spinner?: SpinnerTypes | null; message?: string; cssClass?: string | string[]; showBackdrop?: boolean; diff --git a/core/src/components/loading/loading.tsx b/core/src/components/loading/loading.tsx index d651700f3f..72b2c29116 100644 --- a/core/src/components/loading/loading.tsx +++ b/core/src/components/loading/loading.tsx @@ -79,7 +79,7 @@ export class Loading implements ComponentInterface, OverlayInterface { /** * The name of the spinner to display. */ - @Prop({ mutable: true }) spinner?: SpinnerTypes | 'hide'; + @Prop({ mutable: true }) spinner?: SpinnerTypes | null; /** * If `true`, the loading indicator will be translucent. @@ -203,7 +203,7 @@ export class Loading implements ComponentInterface, OverlayInterface { return [ ,