UNPKG

1.97 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';
6import { c as createColorClasses } from './theme.js';
7
8const cardTitleIosCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-text-color, #000);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-size:28px;font-weight:700;line-height:1.2}";
9
10const cardTitleMdCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-850, #262626);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-size:20px;font-weight:500;line-height:1.2}";
11
12const CardTitle = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
13 constructor() {
14 super();
15 this.__registerHost();
16 this.__attachShadow();
17 }
18 render() {
19 const mode = getIonMode(this);
20 return (h(Host, { role: "heading", "aria-level": "2", class: createColorClasses(this.color, {
21 'ion-inherit-color': true,
22 [mode]: true
23 }) }, h("slot", null)));
24 }
25 static get style() { return {
26 ios: cardTitleIosCss,
27 md: cardTitleMdCss
28 }; }
29}, [33, "ion-card-title", {
30 "color": [513]
31 }]);
32function defineCustomElement$1() {
33 if (typeof customElements === "undefined") {
34 return;
35 }
36 const components = ["ion-card-title"];
37 components.forEach(tagName => { switch (tagName) {
38 case "ion-card-title":
39 if (!customElements.get(tagName)) {
40 customElements.define(tagName, CardTitle);
41 }
42 break;
43 } });
44}
45
46const IonCardTitle = CardTitle;
47const defineCustomElement = defineCustomElement$1;
48
49export { IonCardTitle, defineCustomElement };