{"version":3,"file":"CheckboxGroup.mjs","names":[],"sources":["../../../src/checkbox-group/CheckboxGroup.tsx"],"sourcesContent":["/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { type CommonProps } from '../_common/types';\nimport { FieldsetBase, type FieldsetProps } from '../fieldset/Fieldset';\n\ntype CheckboxGroupProps = FieldsetProps & {\n  /** Shared native name for checkbox form values */\n  name?: string;\n};\n\n/**\n * Groups atomic `Checkbox` components under an accessible legend.\n *\n * @remarks\n * Checked state remains on each `Checkbox`. Browsers cannot natively validate\n * an “at least one” checkbox requirement, so applications should set\n * `errorText` after validating a required group.\n */\nconst CheckboxGroup = ({\n  name,\n  isDisabled = false,\n  isRequired = false,\n  ...props\n}: CommonProps<'fieldset', CheckboxGroupProps>) => (\n  <FieldsetBase\n    {...props}\n    isDisabled={isDisabled}\n    isRequired={isRequired}\n    fieldGroup={{ controlType: 'checkbox', name }}\n  />\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n\nexport { CheckboxGroup };\n"],"mappings":";;;;;;CAsCE;CACA;CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHF,MAAM,iBAAiB,SAMrB;CANqB,IAAA,EACrB,MACA,aAAa,OACb,aAAa,UAAA,MACV,QAAA,yBAAA,MAAA,SAAA;CAEH,OAAA,oBAAC,cAAA,eAAA,eAAA,CAAA,GACK,KAAA,GAAA,CAAA,GAAA;EACQ;EACA;EACZ,YAAY;GAAE,aAAa;GAAY;EAAK;CAC7C,CAAA,CAAA;;AAGH,cAAc,cAAc"}