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

70 lines (67 loc) 1.77 kB
import { badge_custom_styles_default } from "./chunk.J6CGTLVH.js"; import { badge_styles_default } from "./chunk.Y5TMYX2L.js"; import { LocalizeController } from "./chunk.OAQRCZOO.js"; import { enableDefaultSettings } from "./chunk.E5UUNP6E.js"; import { component_styles_default } from "./chunk.NLYVOJGK.js"; import { SynergyElement } from "./chunk.3AZFEB6D.js"; import { __decorateClass } from "./chunk.Z4XV3SMG.js"; // src/components/badge/badge.component.ts import { classMap } from "lit/directives/class-map.js"; import { html } from "lit"; import { property } from "lit/decorators.js"; var SynBadge = class extends SynergyElement { constructor() { super(...arguments); this.localize = new LocalizeController(this); this.variant = "primary"; } render() { return html` <span part="base" class=${classMap({ badge: true, "badge--primary": this.variant === "primary", "badge--success": this.variant === "success", "badge--neutral": this.variant === "neutral", "badge--warning": this.variant === "warning", "badge--danger": this.variant === "danger" })} role="status" > <slot> <span class="visually-hidden"> ${this.localize.term( this.variant === "primary" || this.variant === "neutral" ? "notification" : this.variant )} </span> </slot> </span> `; } }; SynBadge.styles = [component_styles_default, badge_styles_default, badge_custom_styles_default]; __decorateClass([ property({ reflect: true }) ], SynBadge.prototype, "variant", 2); SynBadge = __decorateClass([ enableDefaultSettings("SynBadge") ], SynBadge); export { SynBadge }; //# sourceMappingURL=chunk.G4K3PDVG.js.map