{"version":3,"file":"Label.mjs","sources":["../../../../../../../../../web/src/adminPortal/shared/components/Label.tsx"],"sourcesContent":["import { styled } from '@mui/material';\nimport React, { FC, ReactNode } from 'react';\n\nimport { InjectedComponents } from './componentInjection';\n\nconst StyledLabelContainer = styled('span')(() => ({\n  display: 'flex',\n  alignItems: 'center',\n}));\n\nexport type LabelCoreProps = {\n  children: ReactNode;\n  disabled?: boolean;\n  htmlFor?: string;\n  required?: boolean;\n  variant?: 'body1' | 'body2' | 'caption';\n  labelColor?: 'secondary';\n};\n\nexport const LabelCore: FC<LabelCoreProps & InjectedComponents<'Typography'>> = ({\n  children,\n  disabled,\n  htmlFor,\n  required,\n  variant = 'body2',\n  TypographyComponent: Typography,\n  labelColor,\n}) => {\n  return (\n    <StyledLabelContainer>\n      <label aria-required={required} htmlFor={htmlFor}>\n        <Typography color={labelColor} disabled={disabled} variant={variant}>\n          {children}\n        </Typography>\n      </label>\n      {required && (\n        <Typography color=\"error\" disabled={disabled} variant=\"body2\">\n          *\n        </Typography>\n      )}\n    </StyledLabelContainer>\n  );\n};\n"],"names":["StyledLabelContainer","styled","display","alignItems","LabelCore","children","disabled","htmlFor","required","variant","TypographyComponent","Typography","labelColor","React","label","aria-required","color"],"mappings":";;;AAKA,MAAMA,oBAAAA,GAAuBC,MAAAA,CAAO,MAAA,CAAA,CAAQ,KAAO;QACjDC,OAAAA,EAAS,MAAA;QACTC,UAAAA,EAAY;KACd,CAAA,CAAA;MAWaC,SAAAA,GAAmE,CAAC,EAC/EC,QAAQ,EACRC,QAAQ,EACRC,OAAO,EACPC,QAAQ,EACRC,UAAU,OAAO,EACjBC,qBAAqBC,UAAU,EAC/BC,UAAU,EACX,GAAA;IACC,qBACEC,EAAA,CAAA,aAAA,CAACb,0CACCa,EAAA,CAAA,aAAA,CAACC,OAAAA,EAAAA;QAAMC,eAAAA,EAAeP,QAAAA;QAAUD,OAAAA,EAASA;qBACvCM,EAAA,CAAA,aAAA,CAACF,UAAAA,EAAAA;QAAWK,KAAAA,EAAOJ,UAAAA;QAAYN,QAAAA,EAAUA,QAAAA;QAAUG,OAAAA,EAASA;AACzDJ,KAAAA,EAAAA,QAAAA,CAAAA,CAAAA,EAGJG,0BACCK,EAAA,CAAA,aAAA,CAACF,UAAAA,EAAAA;QAAWK,KAAAA,EAAM,OAAA;QAAQV,QAAAA,EAAUA,QAAAA;QAAUG,OAAAA,EAAQ;AAAQ,KAAA,EAAA,GAAA,CAAA,CAAA;AAMtE;;;;"}