{"version":3,"file":"components/Title/index.mjs","sources":["../../../src/components/Title/index.tsx"],"sourcesContent":["import React, { PropsWithChildren } from 'react';\nimport { Typography } from 'antd';\nimport { upperFirst as upf } from 'es-toolkit/compat';\n\ninterface TitleProps {\n  /**\n   * @default true\n   */\n  upperFirst?: boolean;\n  /**\n   * @default 16\n   */\n  fontSize?: number;\n  text: string | React.ReactNode;\n  hash?: string;\n}\n\nexport const Title: React.FC<PropsWithChildren<TitleProps>> = ({\n  upperFirst = true,\n  fontSize = 16,\n  text,\n  hash,\n}) => {\n  const t = typeof text === 'string' ? (upperFirst ? upf(text) : text) : text;\n  return (\n    <Typography.Text style={{ fontSize }} strong>\n      {hash ? (\n        <a href={hash} id={hash.replace(/^#/, '')} style={{ color: 'inherit' }}>\n          {t}\n        </a>\n      ) : (\n        t\n      )}\n    </Typography.Text>\n  );\n};\n"],"names":["Title","upperFirst","fontSize","text","hash","t","upf","Typography"],"mappings":";;;;AAiBO,MAAMA,QAAiD,CAAC,EAC7DC,aAAa,IAAI,EACjBC,WAAW,EAAE,EACbC,IAAI,EACJC,IAAI,EACL;IACC,MAAMC,IAAI,AAAgB,YAAhB,OAAOF,OAAqBF,aAAaK,kBAAIH,QAAQA,OAAQA;IACvE,OAAO,WAAP,GACE,IAACI,WAAW,IAAI;QAAC,OAAO;YAAEL;QAAS;QAAG,QAAM;kBACzCE,OAAO,WAAPA,GACC,IAAC;YAAE,MAAMA;YAAM,IAAIA,KAAK,OAAO,CAAC,MAAM;YAAK,OAAO;gBAAE,OAAO;YAAU;sBAClEC;aAGHA;;AAIR"}