ion-select-option.js 1.5 KB

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