UNPKG

@utrecht/web-component-library-stencil

Version:

Stencil component library bundle for the Municipality of Utrecht based on the NL Design System architecture

123 lines (122 loc) 3.99 kB
/** * @license EUPL-1.2 * Copyright (c) 2020-2024 Frameless B.V. * Copyright (c) 2021-2024 Gemeente Utrecht */ import { h } from "@stencil/core"; import clsx from "clsx"; export class CustomCheckbox { constructor() { this.disabled = undefined; this.checked = undefined; this.indeterminate = undefined; this.invalid = undefined; this.required = undefined; } render() { const { checked, required, disabled, indeterminate, invalid } = this; return (h("input", { key: '6c3ec0d96df57817493a66f6a93b19727af86206', "aria-invalid": invalid ? 'true' : null, class: clsx('utrecht-custom-checkbox', 'utrecht-custom-checkbox--html-input', invalid && 'utrecht-custom-checkbox__box--invalid'), type: "checkbox", checked: checked, required: required, indeterminate: indeterminate, disabled: disabled })); } static get is() { return "utrecht-custom-checkbox"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["custom-checkbox.scss"] }; } static get styleUrls() { return { "$": ["custom-checkbox.css"] }; } static get properties() { return { "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "" }, "attribute": "disabled", "reflect": false }, "checked": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "" }, "attribute": "checked", "reflect": false }, "indeterminate": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "" }, "attribute": "indeterminate", "reflect": false }, "invalid": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "" }, "attribute": "invalid", "reflect": false }, "required": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "" }, "attribute": "required", "reflect": false } }; } } //# sourceMappingURL=custom-checkbox.js.map