fix(): update to Stencil One 🎉🎊

This commit is contained in:
Manu MA
2019-06-19 21:33:50 +02:00
committed by GitHub
parent 7f1829eb21
commit b40f7d36d5
572 changed files with 14426 additions and 9916 deletions

View File

@ -1,12 +1,16 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Listen, Method, Prop, State } from '@stencil/core';
import { Component, ComponentInterface, Element, Event, EventEmitter, Listen, Method, Prop, State, h } from '@stencil/core';
import { Animation, AnimationBuilder, Config, CssClassMap, Mode, OverlayEventDetail, OverlayInterface, PickerButton, PickerColumn } from '../../interface';
import { getIonMode } from '../../global/ionic-global';
import { Animation, AnimationBuilder, Config, CssClassMap, OverlayEventDetail, OverlayInterface, PickerButton, PickerColumn } from '../../interface';
import { dismiss, eventMethod, present } from '../../utils/overlays';
import { getClassMap } from '../../utils/theme';
import { iosEnterAnimation } from './animations/ios.enter';
import { iosLeaveAnimation } from './animations/ios.leave';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*/
@Component({
tag: 'ion-picker',
styleUrls: {
@ -18,6 +22,8 @@ import { iosLeaveAnimation } from './animations/ios.leave';
export class Picker implements ComponentInterface, OverlayInterface {
private durationTimeout: any;
mode = getIonMode(this);
animation?: Animation;
@Element() el!: HTMLElement;
@ -29,11 +35,6 @@ export class Picker implements ComponentInterface, OverlayInterface {
/** @internal */
@Prop() overlayIndex!: number;
/**
* The mode determines which platform styles to use.
*/
@Prop() mode!: Mode;
/**
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
*/
@ -209,13 +210,14 @@ export class Picker implements ComponentInterface, OverlayInterface {
}
hostData() {
const mode = getIonMode(this);
return {
'aria-modal': 'true',
class: {
[`${this.mode}`]: true,
[`${mode}`]: true,
// Used internally for styling
[`picker-${this.mode}`]: true,
[`picker-${mode}`]: true,
...getClassMap(this.cssClass)
},