{"version":3,"file":"InlineField.cjs","names":[],"sources":["../../../src/components/Form/InlineField.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 ReactElement } from \"react\";\nimport { Field } from \"@radix-ui/react-form\";\n\nimport styles from \"./form.module.css\";\nimport classNames from \"classnames\";\n\ntype Props = {\n  /**\n   * The CSS class name.\n   */\n  className?: string;\n\n  /**\n   * The checkbox/radio control to render alongside the rest of the field.\n   */\n  control: ReactElement;\n} & React.ComponentProps<typeof Field>;\n\nexport const InlineField = forwardRef<HTMLDivElement, Props>(\n  function InlineField({ className, control, children, ...props }, ref) {\n    const classes = classNames(styles[\"inline-field\"], className);\n    return (\n      <Field ref={ref} {...props} className={classes}>\n        <div className={styles[\"inline-field-control\"]}>{control}</div>\n        <div className={styles[\"inline-field-body\"]}>{children}</div>\n      </Field>\n    );\n  },\n);\n"],"mappings":";;;;;;;;;AAyBA,IAAa,eAAA,GAAA,MAAA,YACX,SAAS,YAAY,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,KAAK;CACpE,MAAM,WAAA,GAAA,WAAA,SAAqB,oBAAA,QAAO,iBAAiB,UAAU;AAC7D,QACE,iBAAA,GAAA,kBAAA,MAAC,qBAAA,OAAD;EAAY;EAAK,GAAI;EAAO,WAAW;YAAvC,CACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAW,oBAAA,QAAO;aAA0B;GAAc,CAAA,EAC/D,iBAAA,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAW,oBAAA,QAAO;GAAuB;GAAe,CAAA,CACvD;;EAGb"}