{"version":3,"file":"Form.cjs","sources":["../../../../src/components/layout/form/Form.tsx"],"sourcesContent":["import { FORM_STYLES } from '@components/layout/form/styles/Form.css.ts'\r\nimport type { FormProps } from '@components/layout/form/types/Form.props.ts'\r\nimport { cn } from '@utils/cn.ts'\r\nimport { forwardRef, memo } from 'react'\r\n\r\n/**\r\n * A thin, unstyled wrapper around the native `<form>` element.\r\n *\r\n * Use it as the root of any form so assistive technology can identify the\r\n * form boundary, and so you have a consistent place to handle submission\r\n * and validation behavior.\r\n *\r\n * @example\r\n * ```tsx\r\n * <Form onSubmit={handleSubmit}>\r\n *   <TextField label=\"Email\" />\r\n *   <Button type=\"submit\" label=\"Send\" />\r\n * </Form>\r\n * ```\r\n */\r\nconst Form = memo(forwardRef<HTMLFormElement, FormProps>(\r\n    ({ className, children, ...props }, ref) => (\r\n        <form\r\n            ref={ref}\r\n            className={cn(FORM_STYLES.root, className)}\r\n            {...props}\r\n        >\r\n            {children}\r\n        </form>\r\n    ),\r\n))\r\n\r\nForm.displayName = 'Form'\r\n\r\nexport default Form\r\n"],"names":["Form","memo","forwardRef","className","children","props","ref","jsx","cn","FORM_STYLES"],"mappings":"2IAoBMA,EAAOC,EAAAA,KAAKC,EAAAA,WACd,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAA,EAASC,IAChCC,EAAAA,IAAC,OAAA,CACG,IAAAD,EACA,UAAWE,EAAAA,GAAGC,cAAY,KAAMN,CAAS,EACxC,GAAGE,EAEH,SAAAD,CAAA,CAAA,CAGb,CAAC,EAEDJ,EAAK,YAAc"}