{"version":3,"file":"Checkbox.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Checkbox.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AAqBtD,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB;;;;;;;;;;;;;;GAcG;AACU,QAAA,QAAQ,GAAG,IAAA,+BAAmB,EAA6B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link Checkbox} component.\n *\n * @property name - The name of the checkbox. This is used to identify the\n * state in the form data.\n * @property checked - Whether the checkbox is checked or not.\n * @property label - An optional label for the checkbox.\n * @property variant - An optional variant for the checkbox.\n * @property disabled - Whether the checkbox is disabled.\n * @category Component Props\n */\nexport type CheckboxProps = {\n  name: string;\n  checked?: boolean | undefined;\n  label?: string | undefined;\n  variant?: 'default' | 'toggle' | undefined;\n  disabled?: boolean | undefined;\n};\n\nconst TYPE = 'Checkbox';\n\n/**\n * A checkbox component, which is used to create a checkbox.\n *\n * @param props - The props of the component.\n * @param props.name - The name of the checkbox. This is used to identify the\n * state in the form data.\n * @param props.checked - Whether the checkbox is checked or not.\n * @param props.label - An optional label for the checkbox.\n * @param props.variant - An optional variant for the checkbox.\n * @param props.disabled - Whether the checkbox is disabled.\n * @returns A checkbox element.\n * @example\n * <Checkbox name=\"accept-terms\" />\n * @category Components\n */\nexport const Checkbox = createSnapComponent<CheckboxProps, typeof TYPE>(TYPE);\n\n/**\n * A checkbox element.\n *\n * @see {@link Checkbox}\n * @category Elements\n */\nexport type CheckboxElement = ReturnType<typeof Checkbox>;\n"]}