{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "text",
  "title": "Text",
  "description": "Text primitives.",
  "registryDependencies": [
    "@circle-ui/utils"
  ],
  "files": [
    {
      "path": "registry/berlin/circle-ui/text.tsx",
      "content": "// Generated from packages/ui/src/components/text.tsx\nimport * as React from \"react\";\n\nimport { cn } from \"@/registry/berlin/lib/utils\";\n\ntype SharedTextProps = React.HTMLAttributes<HTMLElement> & {\n  h1?: boolean;\n  h2?: boolean;\n  h3?: boolean;\n  h4?: boolean;\n  h5?: boolean;\n  h6?: boolean;\n  p?: boolean;\n  span?: boolean;\n  loading?: boolean;\n  align?: React.CSSProperties[\"textAlign\"];\n  weight?: React.CSSProperties[\"fontWeight\"];\n};\n\nfunction LoadingLine() {\n  return (\n    <span className=\"block h-[1em] w-full animate-pulse rounded-full bg-loading-surface\" />\n  );\n}\n\nexport function Text({\n  h1 = false,\n  h2 = false,\n  h3 = false,\n  h4 = false,\n  h5 = false,\n  h6 = false,\n  p = false,\n  span = false,\n  className,\n  style,\n  loading = false,\n  weight,\n  align,\n  children,\n  ...props\n}: SharedTextProps) {\n  const shared = cn(\n    \"m-0 text-base font-normal leading-6 tracking-[-0.16px]\",\n    h1 && \"text-[2rem] font-semibold leading-10 tracking-[-0.04em]\",\n    h2 && \"text-2xl font-semibold leading-8 tracking-[-0.03em]\",\n    h3 && \"text-xl font-medium leading-7 tracking-[-0.02em]\",\n    h4 && \"text-base font-semibold leading-6\",\n    h5 && \"text-sm font-semibold leading-5\",\n    h6 &&\n      \"text-xs font-semibold leading-4 uppercase tracking-[0.12em] text-muted-foreground\",\n    span && \"inline\",\n    className,\n  );\n\n  const content = loading ? <LoadingLine /> : children;\n  const combinedStyle = { fontWeight: weight, textAlign: align, ...style };\n\n  if (h1)\n    return (\n      <h1\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLHeadingElement>)}\n      >\n        {content}\n      </h1>\n    );\n  if (h2)\n    return (\n      <h2\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLHeadingElement>)}\n      >\n        {content}\n      </h2>\n    );\n  if (h3)\n    return (\n      <h3\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLHeadingElement>)}\n      >\n        {content}\n      </h3>\n    );\n  if (h4)\n    return (\n      <h4\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLHeadingElement>)}\n      >\n        {content}\n      </h4>\n    );\n  if (h5)\n    return (\n      <h5\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLHeadingElement>)}\n      >\n        {content}\n      </h5>\n    );\n  if (h6)\n    return (\n      <h6\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLHeadingElement>)}\n      >\n        {content}\n      </h6>\n    );\n  if (p)\n    return (\n      <p\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLParagraphElement>)}\n      >\n        {content}\n      </p>\n    );\n  if (span)\n    return (\n      <span\n        className={shared}\n        style={combinedStyle}\n        {...(props as React.HTMLAttributes<HTMLSpanElement>)}\n      >\n        {content}\n      </span>\n    );\n\n  return (\n    <div className={shared} style={combinedStyle} {...props}>\n      {content}\n    </div>\n  );\n}\n",
      "type": "registry:ui",
      "target": "src/components/circle/ui/text.tsx"
    }
  ],
  "type": "registry:ui"
}