UNPKG

@sandlada/mdc

Version:

@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.

8 lines 672 B
import{Validator as e}from"./validator.js"; /** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ var t=class extends e{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement(`input`),this.checkboxControl.type=`checkbox`),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}};export{t as CheckboxValidator}; //# sourceMappingURL=checkbox-validator.js.map