{"version":3,"file":"Root.cjs","names":[],"sources":["../../../src/components/Form/Root.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 { Root as RadixRoot } from \"@radix-ui/react-form\";\n\nimport styles from \"./form.module.css\";\nimport classNames from \"classnames\";\n\ntype RootProps = {\n  /**\n   * The CSS class name.\n   */\n  className?: string;\n} & React.ComponentProps<typeof RadixRoot>;\n\n/**\n * Thin wrapper around Radix UI Root component\n * https://www.radix-ui.com/docs/primitives/components/form#root\n */\nexport const Root = forwardRef<HTMLFormElement, PropsWithChildren<RootProps>>(\n  function Root({ children, ...props }, ref) {\n    const classes = classNames(styles.root, props.className);\n    return (\n      <RadixRoot ref={ref} {...props} className={classes}>\n        {children}\n      </RadixRoot>\n    );\n  },\n);\n"],"mappings":";;;;;;;;;;;;;AAwBA,IAAa,QAAA,GAAA,MAAA,YACX,SAAS,KAAK,EAAE,UAAU,GAAG,SAAS,KAAK;CACzC,MAAM,WAAA,GAAA,WAAA,SAAqB,oBAAA,QAAO,MAAM,MAAM,UAAU;AACxD,QACE,iBAAA,GAAA,kBAAA,KAAC,qBAAA,MAAD;EAAgB;EAAK,GAAI;EAAO,WAAW;EACxC;EACS,CAAA;EAGjB"}