{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "text",
  "title": "Text",
  "description": "Body copy with size, tone and prose measure.",
  "dependencies": [],
  "registryDependencies": [
    "@hjconsult/lib"
  ],
  "files": [
    {
      "path": "src/components/text/index.tsx",
      "content": "import type { ComponentPropsWithoutRef, Ref } from 'react'\nimport { cn } from '../../lib'\n\nexport type TextTag = 'p' | 'span' | 'div' | 'label' | 'li' | 'figcaption' | 'blockquote'\nexport type TextSize = 'lead' | 'body' | 'small' | 'caption'\nexport type TextTone = 'default' | 'muted' | 'subtle'\n\nconst textSizes: Record<TextSize, string> = {\n  lead: 'text-lead',\n  body: 'text-body',\n  small: 'text-small',\n  caption: 'text-caption',\n}\n\nconst textTones: Record<TextTone, string> = {\n  default: 'text-fg',\n  muted: 'text-fg-muted',\n  subtle: 'text-fg-subtle',\n}\n\nexport interface TextProps extends ComponentPropsWithoutRef<'p'> {\n  as?: TextTag\n  size?: TextSize\n  tone?: TextTone\n  /** Cap the line length at the prose measure. */\n  measure?: boolean\n  /** Avoid orphans (`text-wrap: pretty`). On by default for paragraphs. */\n  pretty?: boolean\n  ref?: Ref<HTMLParagraphElement>\n}\n\nexport function Text({\n  as = 'p',\n  size = 'body',\n  tone = 'default',\n  measure = false,\n  pretty = as === 'p',\n  className,\n  ...props\n}: TextProps) {\n  const Tag = as as 'p'\n  return (\n    <Tag\n      className={cn(\n        'font-body',\n        textSizes[size],\n        textTones[tone],\n        measure && 'max-w-prose',\n        pretty && 'text-pretty',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n",
      "type": "registry:ui",
      "target": "hj/components/text/index.tsx"
    }
  ],
  "cssVars": {},
  "type": "registry:ui"
}