UNPKG

2.03 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 cardSubtitleIosCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-600, #666666);margin-left:0;margin-right:0;margin-top:0;margin-bottom:4px;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-size:12px;font-weight:700;letter-spacing:0.4px;text-transform:uppercase}";
9
10const cardSubtitleMdCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-550, #737373);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:14px;font-weight:500}";
11
12const CardSubtitle = /*@__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": "3", class: createColorClasses(this.color, {
21 'ion-inherit-color': true,
22 [mode]: true
23 }) }, h("slot", null)));
24 }
25 static get style() { return {
26 ios: cardSubtitleIosCss,
27 md: cardSubtitleMdCss
28 }; }
29}, [33, "ion-card-subtitle", {
30 "color": [513]
31 }]);
32function defineCustomElement$1() {
33 if (typeof customElements === "undefined") {
34 return;
35 }
36 const components = ["ion-card-subtitle"];
37 components.forEach(tagName => { switch (tagName) {
38 case "ion-card-subtitle":
39 if (!customElements.get(tagName)) {
40 customElements.define(tagName, CardSubtitle);
41 }
42 break;
43 } });
44}
45
46const IonCardSubtitle = CardSubtitle;
47const defineCustomElement = defineCustomElement$1;
48
49export { IonCardSubtitle, defineCustomElement };