@codegouvfr/react-dsfr
Version:
French State Design System React integration library
4 lines (3 loc) • 1.25 kB
JavaScript
/*! DSFR v1.12.1 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */
!function(){"use strict";var e=window.dsfr,n={INPUT:e.internals.ns.selector("checkbox-group")+' input[type="checkbox"]'},t={CHANGE:e.internals.ns.emission("checkbox","change"),RETRIEVE:e.internals.ns.emission("checkbox","retrieve")},c=function(e){function n(){e.call(this),this._handlingChange=this.handleChange.bind(this)}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var c={isChecked:{configurable:!0}},o={instanceClassName:{configurable:!0}};return o.instanceClassName.get=function(){return"CheckboxInput"},n.prototype.init=function(){this.node.addEventListener("change",this._handlingChange),this.addDescent(t.RETRIEVE,this._handlingChange),this.handleChange()},c.isChecked.get=function(){return this.node.checked},n.prototype.handleChange=function(){this.ascend(t.CHANGE,this.node)},Object.defineProperties(n.prototype,c),Object.defineProperties(n,o),n}(e.core.Instance);e.checkbox={CheckboxSelector:n,CheckboxEmission:t,CheckboxInput:c},e.internals.register(e.checkbox.CheckboxSelector.INPUT,e.checkbox.CheckboxInput)}();
//# sourceMappingURL=checkbox.nomodule.min.js.map