{"version":3,"file":"Typography.mjs","sources":["../../../../../../../../../web/src/ui/components/atoms/Typography.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport React, { forwardRef, HTMLAttributes } from 'react';\n\nimport styles from './Typography.module.css';\n\nexport type TypographyProps = HTMLAttributes<HTMLDivElement> & {\n  variant?: 'header' | 'body' | 'helper';\n  color?: 'foreground' | 'muted' | 'destructive' | 'warning' | 'success';\n  align?: 'start' | 'center' | 'end';\n  font?: 'default' | 'mono';\n  weight?: 'regular' | 'medium' | 'semibold' | 'bold';\n  as?: string;\n};\n\nconst Typography = forwardRef<HTMLDivElement, TypographyProps>(\n  ({ variant = 'body', as = 'div', weight, font, color, align, className, ...props }, ref) => {\n    // Without this cast, TS thinks Element might not even be an HTML element and so does not have className\n    const Element = as as 'div';\n    return (\n      <Element\n        {...props}\n        ref={ref}\n        className={classNames(\n          className,\n          styles.typography,\n          styles[variant],\n          font && styles[font + 'Font'],\n          weight && styles[weight],\n          color && styles[color],\n          align && styles[align],\n        )}\n      />\n    );\n  },\n);\n\nexport default Typography;\n"],"names":["Typography","forwardRef","variant","as","weight","font","color","align","className","props","ref","Element","React","classNames","styles","typography"],"mappings":";;;;AAcA,MAAMA,UAAAA,iBAAaC,EACjB,CAAC,EAAEC,UAAU,MAAM,EAAEC,EAAAA,GAAK,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,KAAK,EAAEC,SAAS,EAAE,GAAGC,KAAAA,EAAO,EAAEC,GAAAA,GAAAA;;AAElF,IAAA,MAAMC,OAAAA,GAAUR,EAAAA;AAChB,IAAA,qBACES,EAAA,CAAA,aAAA,CAACD,OAAAA,EAAAA;AACE,QAAA,GAAGF,KAAK;QACTC,GAAAA,EAAKA,GAAAA;AACLF,QAAAA,SAAAA,EAAWK,UAAAA,CACTL,SAAAA,EACAM,gBAAAA,CAAOC,UAAU,EACjBD,gBAAM,CAACZ,OAAAA,CAAQ,EACfG,IAAAA,IAAQS,gBAAM,CAACT,IAAAA,GAAO,MAAA,CAAO,EAC7BD,MAAAA,IAAUU,gBAAM,CAACV,MAAAA,CAAO,EACxBE,KAAAA,IAASQ,gBAAM,CAACR,KAAAA,CAAM,EACtBC,KAAAA,IAASO,gBAAM,CAACP,KAAAA,CAAM;;AAI9B,CAAA;;;;"}