1 | import {
|
2 | badge_styles_default
|
3 | } from "./chunk.INE3EZCE.js";
|
4 | import {
|
5 | o
|
6 | } from "./chunk.IAELDRGJ.js";
|
7 | import {
|
8 | e,
|
9 | n
|
10 | } from "./chunk.VKNZYXSO.js";
|
11 | import {
|
12 | $,
|
13 | s
|
14 | } from "./chunk.WWAD5WF4.js";
|
15 | import {
|
16 | __decorateClass
|
17 | } from "./chunk.K2NRSETB.js";
|
18 |
|
19 |
|
20 | var SlBadge = class extends s {
|
21 | constructor() {
|
22 | super(...arguments);
|
23 | this.variant = "primary";
|
24 | this.pill = false;
|
25 | this.pulse = false;
|
26 | }
|
27 | render() {
|
28 | return $`
|
29 | <span
|
30 | part="base"
|
31 | class=${o({
|
32 | badge: true,
|
33 | "badge--primary": this.variant === "primary",
|
34 | "badge--success": this.variant === "success",
|
35 | "badge--neutral": this.variant === "neutral",
|
36 | "badge--warning": this.variant === "warning",
|
37 | "badge--danger": this.variant === "danger",
|
38 | "badge--pill": this.pill,
|
39 | "badge--pulse": this.pulse
|
40 | })}
|
41 | role="status"
|
42 | >
|
43 | <slot></slot>
|
44 | </span>
|
45 | `;
|
46 | }
|
47 | };
|
48 | SlBadge.styles = badge_styles_default;
|
49 | __decorateClass([
|
50 | e({ reflect: true })
|
51 | ], SlBadge.prototype, "variant", 2);
|
52 | __decorateClass([
|
53 | e({ type: Boolean, reflect: true })
|
54 | ], SlBadge.prototype, "pill", 2);
|
55 | __decorateClass([
|
56 | e({ type: Boolean, reflect: true })
|
57 | ], SlBadge.prototype, "pulse", 2);
|
58 | SlBadge = __decorateClass([
|
59 | n("sl-badge")
|
60 | ], SlBadge);
|
61 |
|
62 | export {
|
63 | SlBadge
|
64 | };
|