{"version":3,"sources":["../../src/components/Radio/index.tsx"],"names":["forwardRef","styles","jsx","jsxs","Radio","label","size","id","inputProps","forwardedRef","FormField","clsx_m_default","UnstyledInput"],"mappings":"wNACA,OAAS,cAAAA,MAAkB,QAK3B,OAAOC,MAAY,uBAgBX,OAGE,OAAAC,EAHF,QAAAC,MAAA,oBAJD,IAAMC,EAAQJ,EACnB,CAAC,CAAE,MAAAK,EAAO,KAAAC,EAAO,KAAM,GAAAC,EAAI,GAAGC,CAAW,EAAGC,IAExCP,EAACQ,EAAA,CAAU,MAAOL,EAAO,GAAIE,EAAI,OAAM,GACrC,SAAAJ,EAAC,OACC,UAAWQ,EAAKV,EAAO,MAAOK,IAAS,MAAQL,EAAO,KAAKK,GAAM,CAAC,EAElE,UAAAJ,EAACU,EAAA,CAAc,KAAK,QAAS,GAAGJ,EAAY,IAAKC,EAAc,EAC/DP,EAAC,QAAK,UAAWD,EAAO,KAAM,EAC9BC,EAACQ,EAAU,MAAV,EAAgB,GACnB,EACF,CAGN","sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\n\nimport { FormField, FormFieldProps } from \"../FormField\";\nimport { UnstyledInput } from \"../UnstyledInput\";\n\nimport styles from \"./styles.module.scss\";\n\ntype RadioSize = \"sm\" | \"md\" | \"lg\";\n\ntype OmittedNativeProps = \"size\";\ntype NativeProps = Omit<JSX.IntrinsicElements[\"input\"], OmittedNativeProps>;\n\nexport type RadioProps = {\n  size?: RadioSize;\n} & NativeProps &\n  Pick<FormFieldProps, \"description\" | \"error\" | \"id\" | \"label\">;\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n  ({ label, size = \"md\", id, ...inputProps }, forwardedRef) => {\n    return (\n      <FormField label={label} id={id} custom>\n        <div\n          className={clsx(styles.Block, size !== \"md\" && styles[`--${size}`])}\n        >\n          <UnstyledInput type=\"radio\" {...inputProps} ref={forwardedRef} />\n          <span className={styles.mark} />\n          <FormField.Label />\n        </div>\n      </FormField>\n    );\n  }\n);\n"]}