@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
59 lines (56 loc) • 1.64 kB
JavaScript
import {
card_custom_styles_default
} from "./chunk.QMLSKYXR.js";
import {
card_styles_default
} from "./chunk.C4JTZKPZ.js";
import {
HasSlotController
} from "./chunk.WVVQK5TE.js";
import {
component_styles_default
} from "./chunk.NLYVOJGK.js";
import {
SynergyElement
} from "./chunk.3AZFEB6D.js";
import {
__decorateClass
} from "./chunk.Z4XV3SMG.js";
// src/components/card/card.component.ts
import { classMap } from "lit/directives/class-map.js";
import { property } from "lit/decorators.js";
import { html } from "lit";
var SynCard = class extends SynergyElement {
constructor() {
super(...arguments);
this.hasSlotController = new HasSlotController(this, "footer", "header", "image");
this.sharp = false;
}
render() {
return html`
<div
part="base"
class=${classMap({
card: true,
"card--sharp": this.sharp,
"card--has-footer": this.hasSlotController.test("footer"),
"card--has-image": this.hasSlotController.test("image"),
"card--has-header": this.hasSlotController.test("header")
})}
>
<slot name="image" part="image" class="card__image"></slot>
<slot name="header" part="header" class="card__header"></slot>
<slot part="body" class="card__body"></slot>
<slot name="footer" part="footer" class="card__footer"></slot>
</div>
`;
}
};
SynCard.styles = [component_styles_default, card_styles_default, card_custom_styles_default];
__decorateClass([
property({ type: Boolean, reflect: true })
], SynCard.prototype, "sharp", 2);
export {
SynCard
};
//# sourceMappingURL=chunk.7ALJE6TM.js.map