{"version":3,"file":"Label.cjs","names":[],"sources":["../../../src/components/Form/Label.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, { type PropsWithChildren, forwardRef } from \"react\";\nimport { Label as RadixLabel } from \"@radix-ui/react-form\";\n\nimport styles from \"./form.module.css\";\nimport classNames from \"classnames\";\n\ntype LabelProps = {\n  /**\n   * The CSS class name.\n   */\n  className?: string;\n} & React.ComponentProps<typeof RadixLabel>;\n\n/**\n * Thin wrapper around Radix UI Label component\n * https://www.radix-ui.com/docs/primitives/components/form#label\n */\nexport const Label = forwardRef<\n  HTMLLabelElement,\n  PropsWithChildren<LabelProps>\n>(function Label({ children, ...props }, ref) {\n  const classes = classNames(styles.label, props.className);\n  return (\n    <RadixLabel ref={ref} {...props} className={classes}>\n      {children}\n    </RadixLabel>\n  );\n});\n"],"mappings":";;;;;;;;;;;;;AAwBA,IAAa,SAAA,GAAA,MAAA,YAGX,SAAS,MAAM,EAAE,UAAU,GAAG,SAAS,KAAK;CAC5C,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;EAEf"}