{"version":3,"file":"index.cjs","names":["LabelPrimitive"],"sources":["../../../src/components/Label/Label.tsx"],"sourcesContent":["import * as LabelPrimitive from \"@radix-ui/react-label\";\nimport clsx from \"clsx\";\nimport React, { forwardRef } from \"react\";\n\nexport interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> {\n  children: React.ReactNode;\n  className?: string;\n  style?: React.CSSProperties;\n  disabled?: boolean;\n  required?: boolean;\n}\n\nconst Label = forwardRef<HTMLLabelElement, LabelProps>(\n  ({ children, className, style, disabled, required, ...props }, ref) => {\n    return (\n      <LabelPrimitive.Root\n        ref={ref}\n        className={clsx(\n          \"openui-label\",\n          {\n            \"openui-label-disabled\": disabled,\n          },\n          className,\n        )}\n        style={style}\n        {...props}\n      >\n        {children}\n        {required && <span className=\"openui-label-required-asterisk\">*</span>}\n      </LabelPrimitive.Root>\n    );\n  },\n);\n\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"mappings":";;;;;;;;;;AAYA,MAAM,SAAA,GAAA,MAAA,aACH,EAAE,UAAU,WAAW,OAAO,UAAU,UAAU,GAAG,SAAS,QAAQ;AACrE,QACE,iBAAA,GAAA,kBAAA,MAACA,sBAAe,MAAhB;EACO;EACL,YAAA,GAAA,KAAA,SACE,gBACA,EACE,yBAAyB,UAC1B,EACD,UACD;EACM;EACP,GAAI;YAVN,CAYG,UACA,YAAY,iBAAA,GAAA,kBAAA,KAAC,QAAD;GAAM,WAAU;aAAiC;GAAQ,CAAA,CAClD;;EAG3B;AAED,MAAM,cAAcA,sBAAe,KAAK"}