docs(all): possible values are extracted by stencil (#16190)

* docs(all): possible values are extracted by stencil

* add defaults

* remove all hardcoded defaults

* update stencil
This commit is contained in:
Manu MA
2018-11-02 00:06:40 +01:00
committed by GitHub
parent 335acf96ee
commit ecc2c55370
151 changed files with 1363 additions and 1430 deletions

View File

@ -1,7 +1,7 @@
import { AnimationBuilder, Mode, SpinnerTypes } from '../../interface';
export interface LoadingOptions {
spinner?: SpinnerTypes;
spinner?: SpinnerTypes | 'hide';
message?: string;
cssClass?: string | string[];
showBackdrop?: boolean;

View File

@ -1,6 +1,6 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
import { Animation, AnimationBuilder, Config, Mode, OverlayEventDetail, OverlayInterface } from '../../interface';
import { Animation, AnimationBuilder, Config, Mode, OverlayEventDetail, OverlayInterface, SpinnerTypes } from '../../interface';
import { BACKDROP, dismiss, eventMethod, present } from '../../utils/overlays';
import { createThemedClasses, getClassMap } from '../../utils/theme';
@ -32,7 +32,6 @@ export class Loading implements ComponentInterface, OverlayInterface {
/**
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
*/
@Prop() mode!: Mode;
@ -68,28 +67,27 @@ export class Loading implements ComponentInterface, OverlayInterface {
@Prop() duration = 0;
/**
* If `true`, the loading indicator will be dismissed when the backdrop is clicked. Defaults to `false`.
* If `true`, the loading indicator will be dismissed when the backdrop is clicked.
*/
@Prop() backdropDismiss = false;
/**
* If `true`, a backdrop will be displayed behind the loading indicator. Defaults to `true`.
* If `true`, a backdrop will be displayed behind the loading indicator.
*/
@Prop() showBackdrop = true;
/**
* The name of the spinner to display. Possible values are: `"lines"`, `"lines-small"`, `"dots"`,
* `"bubbles"`, `"circles"`, `"crescent"`.
* The name of the spinner to display.
*/
@Prop({ mutable: true }) spinner?: string;
@Prop({ mutable: true }) spinner?: SpinnerTypes | 'hide';
/**
* If `true`, the loading indicator will be translucent. Defaults to `false`.
* If `true`, the loading indicator will be translucent.
*/
@Prop() translucent = false;
/**
* If `true`, the loading indicator will animate. Defaults to `true`.
* If `true`, the loading indicator will animate.
*/
@Prop() animated = true;

View File

@ -18,33 +18,33 @@ The loading indicator can be dismissed automatically after a specific amount of
## Properties
| Property | Attribute | Description | Type |
| ----------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| `animated` | `animated` | If `true`, the loading indicator will animate. Defaults to `true`. | `boolean` |
| `backdropDismiss` | `backdrop-dismiss` | If `true`, the loading indicator will be dismissed when the backdrop is clicked. Defaults to `false`. | `boolean` |
| `cssClass` | `css-class` | Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. | `string \| string[] \| undefined` |
| `duration` | `duration` | Number of milliseconds to wait before dismissing the loading indicator. | `number` |
| `enterAnimation` | -- | Animation to use when the loading indicator is presented. | `AnimationBuilder \| undefined` |
| `keyboardClose` | `keyboard-close` | If `true`, the keyboard will be automatically dismissed when the overlay is presented. | `boolean` |
| `leaveAnimation` | -- | Animation to use when the loading indicator is dismissed. | `AnimationBuilder \| undefined` |
| `message` | `message` | Optional text content to display in the loading indicator. | `string \| undefined` |
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `"ios" \| "md"` |
| `overlayIndex` | `overlay-index` | | `number` |
| `showBackdrop` | `show-backdrop` | If `true`, a backdrop will be displayed behind the loading indicator. Defaults to `true`. | `boolean` |
| `spinner` | `spinner` | The name of the spinner to display. Possible values are: `"lines"`, `"lines-small"`, `"dots"`, `"bubbles"`, `"circles"`, `"crescent"`. | `string \| undefined` |
| `translucent` | `translucent` | If `true`, the loading indicator will be translucent. Defaults to `false`. | `boolean` |
| Property | Attribute | Description | Type | Default |
| ----------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------- |
| `animated` | `animated` | If `true`, the loading indicator will animate. | `boolean` | `true` |
| `backdropDismiss` | `backdrop-dismiss` | If `true`, the loading indicator will be dismissed when the backdrop is clicked. | `boolean` | `false` |
| `cssClass` | `css-class` | Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. | `string \| string[] \| undefined` | `undefined` |
| `duration` | `duration` | Number of milliseconds to wait before dismissing the loading indicator. | `number` | `0` |
| `enterAnimation` | -- | Animation to use when the loading indicator is presented. | `AnimationBuilder \| undefined` | `undefined` |
| `keyboardClose` | `keyboard-close` | If `true`, the keyboard will be automatically dismissed when the overlay is presented. | `boolean` | `true` |
| `leaveAnimation` | -- | Animation to use when the loading indicator is dismissed. | `AnimationBuilder \| undefined` | `undefined` |
| `message` | `message` | Optional text content to display in the loading indicator. | `string \| undefined` | `undefined` |
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |
| `overlayIndex` | `overlay-index` | | `number` | `undefined` |
| `showBackdrop` | `show-backdrop` | If `true`, a backdrop will be displayed behind the loading indicator. | `boolean` | `true` |
| `spinner` | `spinner` | The name of the spinner to display. | `"bubbles" \| "circles" \| "crescent" \| "dots" \| "hide" \| "lines" \| "lines-small" \| undefined` | `undefined` |
| `translucent` | `translucent` | If `true`, the loading indicator will be translucent. | `boolean` | `false` |
## Events
| Event | Detail | Description |
| ----------------------- | ------------------ | ----------------------------------------- |
| `ionLoadingDidDismiss` | OverlayEventDetail | Emitted after the loading has dismissed. |
| `ionLoadingDidLoad` | | Emitted after the loading has loaded. |
| `ionLoadingDidPresent` | | Emitted after the loading has presented. |
| `ionLoadingDidUnload` | | Emitted after the loading has unloaded. |
| `ionLoadingWillDismiss` | OverlayEventDetail | Emitted before the loading has dismissed. |
| `ionLoadingWillPresent` | | Emitted before the loading has presented. |
| Event | Description | Detail |
| ----------------------- | ----------------------------------------- | ------------------ |
| `ionLoadingDidDismiss` | Emitted after the loading has dismissed. | OverlayEventDetail |
| `ionLoadingDidLoad` | Emitted after the loading has loaded. | void |
| `ionLoadingDidPresent` | Emitted after the loading has presented. | void |
| `ionLoadingDidUnload` | Emitted after the loading has unloaded. | void |
| `ionLoadingWillDismiss` | Emitted before the loading has dismissed. | OverlayEventDetail |
| `ionLoadingWillPresent` | Emitted before the loading has presented. | void |
## Methods