{"version":3,"file":"Field.cjs","names":[],"sources":["../../../src/components/Form/Field.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { forwardRef, type PropsWithChildren } from \"react\";\nimport { Field as RadixField } from \"@radix-ui/react-form\";\n\nimport styles from \"./form.module.css\";\nimport classNames from \"classnames\";\n\ntype FieldProps = {\n  /**\n   * The CSS class name.\n   */\n  className?: string;\n} & React.ComponentProps<typeof RadixField>;\n\n/**\n * Thin wrapper around Radix UI Field component\n * https://www.radix-ui.com/docs/primitives/components/form#field\n */\nexport const Field = forwardRef<HTMLDivElement, PropsWithChildren<FieldProps>>(\n  function Field({ children, ...props }, ref) {\n    const classes = classNames(styles.field, props.className);\n    return (\n      <RadixField ref={ref} {...props} className={classes}>\n        {children}\n      </RadixField>\n    );\n  },\n);\n"],"mappings":";;;;;;;;;;;;;AAwBA,IAAa,SAAA,GAAA,MAAA,YACX,SAAS,MAAM,EAAE,UAAU,GAAG,SAAS,KAAK;CAC1C,MAAM,WAAA,GAAA,WAAA,SAAqB,oBAAA,QAAO,OAAO,MAAM,UAAU;AACzD,QACE,iBAAA,GAAA,kBAAA,KAAC,qBAAA,OAAD;EAAiB;EAAK,GAAI;EAAO,WAAW;EACzC;EACU,CAAA;EAGlB"}