UNPKG

1.48 kBJavaScriptView Raw
1/*!
2 * (C) Ionic http://ionicframework.com - MIT License
3 */
4import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5import { b as getIonMode } from './ionic-global.js';
6
7const selectOptionCss = ":host{display:none}";
8
9const SelectOption = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
10 constructor() {
11 super();
12 this.__registerHost();
13 this.__attachShadow();
14 this.inputId = `ion-selopt-${selectOptionIds++}`;
15 /**
16 * If `true`, the user cannot interact with the select option. This property does not apply when `interface="action-sheet"` as `ion-action-sheet` does not allow for disabled buttons.
17 */
18 this.disabled = false;
19 }
20 render() {
21 return (h(Host, { role: "option", id: this.inputId, class: getIonMode(this) }));
22 }
23 get el() { return this; }
24 static get style() { return selectOptionCss; }
25}, [1, "ion-select-option", {
26 "disabled": [4],
27 "value": [8]
28 }]);
29let selectOptionIds = 0;
30function defineCustomElement$1() {
31 if (typeof customElements === "undefined") {
32 return;
33 }
34 const components = ["ion-select-option"];
35 components.forEach(tagName => { switch (tagName) {
36 case "ion-select-option":
37 if (!customElements.get(tagName)) {
38 customElements.define(tagName, SelectOption);
39 }
40 break;
41 } });
42}
43
44const IonSelectOption = SelectOption;
45const defineCustomElement = defineCustomElement$1;
46
47export { IonSelectOption, defineCustomElement };