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 cardHeaderIosCss = ":host{--background:transparent;--color:inherit;display:block;position:relative;background:var(--background);color:var(--color)}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host{padding-left:20px;padding-right:20px;padding-top:20px;padding-bottom:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){:host(.card-header-translucent){background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.9);-webkit-backdrop-filter:saturate(180%) blur(30px);backdrop-filter:saturate(180%) blur(30px)}}";
|
9 |
|
10 | const cardHeaderMdCss = ":host{--background:transparent;--color:inherit;display:block;position:relative;background:var(--background);color:var(--color)}:host(.ion-color){background:var(--ion-color-base);color:var(--ion-color-contrast)}:host{padding-left:16px;padding-right:16px;padding-top:16px;padding-bottom:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}::slotted(ion-card-title:not(:first-child)),::slotted(ion-card-subtitle:not(:first-child)){margin-top:8px}";
|
11 |
|
12 | const CardHeader = proxyCustomElement(class extends HTMLElement {
|
13 | constructor() {
|
14 | super();
|
15 | this.__registerHost();
|
16 | this.__attachShadow();
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 | this.translucent = false;
|
23 | }
|
24 | render() {
|
25 | const mode = getIonMode(this);
|
26 | return (h(Host, { class: createColorClasses(this.color, {
|
27 | 'card-header-translucent': this.translucent,
|
28 | 'ion-inherit-color': true,
|
29 | [mode]: true
|
30 | }) }, h("slot", null)));
|
31 | }
|
32 | static get style() { return {
|
33 | ios: cardHeaderIosCss,
|
34 | md: cardHeaderMdCss
|
35 | }; }
|
36 | }, [33, "ion-card-header", {
|
37 | "color": [513],
|
38 | "translucent": [4]
|
39 | }]);
|
40 | function defineCustomElement$1() {
|
41 | if (typeof customElements === "undefined") {
|
42 | return;
|
43 | }
|
44 | const components = ["ion-card-header"];
|
45 | components.forEach(tagName => { switch (tagName) {
|
46 | case "ion-card-header":
|
47 | if (!customElements.get(tagName)) {
|
48 | customElements.define(tagName, CardHeader);
|
49 | }
|
50 | break;
|
51 | } });
|
52 | }
|
53 |
|
54 | const IonCardHeader = CardHeader;
|
55 | const defineCustomElement = defineCustomElement$1;
|
56 |
|
57 | export { IonCardHeader, defineCustomElement };
|