chore(packages): move the packages to root

This commit is contained in:
Brandy Carney
2018-03-12 16:02:25 -04:00
parent 097f1a2cd3
commit d37623a2ca
1255 changed files with 38 additions and 38 deletions

View File

@ -0,0 +1,70 @@
import { Component, Element, Event, EventEmitter, Prop } from '@stencil/core';
@Component({
tag: 'ion-select-option',
host: {
theme: 'select-option'
}
})
export class SelectOption {
id: string;
@Element() el: HTMLElement;
/**
* If true, the user cannot interact with the select option. Defaults to `false`.
*/
@Prop() disabled = false;
/**
* If true, the element is selected.
*/
@Prop({ mutable: true }) selected = false;
/**
* The text value of the option.
*/
@Prop({ mutable: true }) value: string|null = null;
/**
* Emitted when the select option loads.
*/
@Event() ionSelectOptionDidLoad: EventEmitter;
/**
* Emitted when the select option unloads.
*/
@Event() ionSelectOptionDidUnload: EventEmitter;
constructor() {
this.id = 'ion-selopt-' + (selectOptionIds++);
}
componentWillLoad() {
this.value = this.value || this.el.textContent;
}
componentDidLoad() {
this.ionSelectOptionDidLoad.emit();
}
componentDidUnload() {
this.ionSelectOptionDidUnload.emit();
}
hostData() {
return {
'role': 'option',
'id': this.id
};
}
}
export interface HTMLIonSelectOptionElementEvent extends CustomEvent {
target: HTMLIonSelectOptionElement;
}
let selectOptionIds = 0;