UNPKG

@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

64 lines (61 loc) 1.8 kB
import { card_custom_styles_default } from "./chunk.O655X4YP.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.3THJTCRO.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.shadow = false; this.sharp = false; } render() { return html` <div part="base" class=${classMap({ card: true, "card--shadow": this.shadow, "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, "shadow", 2); __decorateClass([ property({ type: Boolean, reflect: true }) ], SynCard.prototype, "sharp", 2); export { SynCard }; //# sourceMappingURL=chunk.ANR7UJCM.js.map