dap-design-system
Version:
Official design system for the DÁP (dap.gov.hu)
57 lines (56 loc) • 1.9 kB
JavaScript
import { clsx as d } from "../../node_modules/clsx/dist/clsx.js";
import "../../node_modules/@lit/reactive-element/reactive-element.js";
import "../../node_modules/lit-html/lit-html.js";
import "../../node_modules/lit-element/lit-element.js";
import { property as s } from "../../node_modules/@lit/reactive-element/decorators/property.js";
import { ifDefined as a } from "../../node_modules/lit-html/directives/if-defined.js";
import { html as u } from "../../node_modules/lit-html/static.js";
import { DdsElement as f } from "../../internal/dds-hu-element.js";
import m from "./content-switcher-item.scss.js";
import { unsafeCSS as h } from "../../node_modules/@lit/reactive-element/css-tag.js";
var y = Object.defineProperty, o = (c, l, p, b) => {
for (var t = void 0, i = c.length - 1, n; i >= 0; i--)
(n = c[i]) && (t = n(l, p, t) || t);
return t && y(l, p, t), t;
};
const r = class r extends f {
constructor() {
super(...arguments), this.checked = !1, this.disabled = !1;
}
render() {
return u`
<button
part="input"
name=${a(this.name)}
value=${a(this.value)}
.checked=${this.checked}
.disabled=${this.disabled}
aria-label=${a(this.ariaLabel) || ""}
aria-pressed=${this.checked}
.autofocus=${this.autofocus}
class=${d("content-switcher__input", {
"content-switcher__input--checked": this.checked
})}>
<slot slot="iconcontent"></slot>
</button>
`;
}
};
r.tagName = "dap-ds-content-switcher-item", r.styles = h(m);
let e = r;
o([
s({ type: String, reflect: !0 })
], e.prototype, "value");
o([
s({ type: Boolean })
], e.prototype, "checked");
o([
s({ type: Boolean, reflect: !0 })
], e.prototype, "disabled");
o([
s({ type: String, reflect: !0 })
], e.prototype, "name");
export {
e as default
};
//# sourceMappingURL=content-switcher-item.component.js.map