1 |
|
2 |
|
3 |
|
4 | import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
5 | import { b as getIonMode } from './ionic-global.js';
|
6 | import { c as createColorClasses } from './theme.js';
|
7 |
|
8 | const textCss = ":host(.ion-color){color:var(--ion-color-base)}";
|
9 |
|
10 | const Text = proxyCustomElement(class extends HTMLElement {
|
11 | constructor() {
|
12 | super();
|
13 | this.__registerHost();
|
14 | this.__attachShadow();
|
15 | }
|
16 | render() {
|
17 | const mode = getIonMode(this);
|
18 | return (h(Host, { class: createColorClasses(this.color, {
|
19 | [mode]: true,
|
20 | }) }, h("slot", null)));
|
21 | }
|
22 | static get style() { return textCss; }
|
23 | }, [1, "ion-text", {
|
24 | "color": [513]
|
25 | }]);
|
26 | function defineCustomElement$1() {
|
27 | if (typeof customElements === "undefined") {
|
28 | return;
|
29 | }
|
30 | const components = ["ion-text"];
|
31 | components.forEach(tagName => { switch (tagName) {
|
32 | case "ion-text":
|
33 | if (!customElements.get(tagName)) {
|
34 | customElements.define(tagName, Text);
|
35 | }
|
36 | break;
|
37 | } });
|
38 | }
|
39 |
|
40 | const IonText = Text;
|
41 | const defineCustomElement = defineCustomElement$1;
|
42 |
|
43 | export { IonText, defineCustomElement };
|