mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
fix(): update to Stencil One 🎉🎊
This commit is contained in:
@ -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)
|
||||
},
|
||||
|
Reference in New Issue
Block a user