UNPKG

@neu-ui/web-components

Version:

A Neumorphic web component library built with @microsoft/fast-element and Vite using javascript

23 lines (22 loc) 740 B
import { FASTElement as s } from "@microsoft/fast-element"; import { CheckboxDefinition as h } from "./checkbox.definition.es.js"; class c extends s { constructor() { super(), this.disabled = !1, this.checked = !1, this.id = "", this.size, this.ariaChecked = !1; } attributeChangedCallback(e, i, t) { e === "disabled" && (this.disabled = t !== null), e === "id" && (this.id = t), e === "size" && (this.size = t), super.attributeChangedCallback(e, i, t); } handleChange(e) { this.checked = e.target.checked, this.ariaChecked = this.checked ? "true" : "false"; const i = new Event("change", { bubbles: !0, composed: !0 }); this.dispatchEvent(i); } } s.define(c, h); export { c as Checkbox };