{
  "name": "text",
  "dependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "text.tsx",
      "content": "\"use client\";\r\n\r\nimport { createVariants, themeVars as theme } from \"@yugnex/core\";\r\nimport { forwardRef, type ElementType, type HTMLAttributes, type ReactNode } from \"react\";\r\n\r\nconst textVariants = createVariants({\r\n  base: {\r\n    fontFamily: theme.fontFamily.sans,\r\n    margin: 0,\r\n  },\r\n  variants: {\r\n    size: {\r\n      xs: { fontSize: theme.fontSize.xs, lineHeight: theme.lineHeight.xs },\r\n      sm: { fontSize: theme.fontSize.sm, lineHeight: theme.lineHeight.sm },\r\n      base: { fontSize: theme.fontSize.base, lineHeight: theme.lineHeight.base },\r\n      lg: { fontSize: theme.fontSize.lg, lineHeight: theme.lineHeight.lg },\r\n      xl: { fontSize: theme.fontSize.xl, lineHeight: theme.lineHeight.xl },\r\n    },\r\n    weight: {\r\n      regular: { fontWeight: theme.fontWeight.regular },\r\n      medium: { fontWeight: theme.fontWeight.medium },\r\n      semibold: { fontWeight: theme.fontWeight.semibold },\r\n      bold: { fontWeight: theme.fontWeight.bold },\r\n    },\r\n    tone: {\r\n      default: { color: theme.color.foreground },\r\n      muted: { color: theme.color.mutedForeground },\r\n      primary: { color: theme.color.primary },\r\n      destructive: { color: theme.color.destructive },\r\n    },\r\n  },\r\n  defaultVariants: { size: \"base\", weight: \"regular\", tone: \"default\" },\r\n});\r\n\r\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\r\n  as?: ElementType;\r\n  size?: \"xs\" | \"sm\" | \"base\" | \"lg\" | \"xl\";\r\n  weight?: \"regular\" | \"medium\" | \"semibold\" | \"bold\";\r\n  tone?: \"default\" | \"muted\" | \"primary\" | \"destructive\";\r\n  children?: ReactNode;\r\n}\r\n\r\n/** Sane default typography without hand-writing styles. `as` swaps the rendered tag (p, span, label, ...). */\r\nexport const Text = forwardRef<HTMLElement, TextProps>(function Text(\r\n  { as, size, weight, tone, className, ...props },\r\n  ref,\r\n) {\r\n  const Component = as ?? \"p\";\r\n  return <Component ref={ref} className={textVariants({ size, weight, tone, className })} {...props} />;\r\n});\r\n",
      "type": "registry:component"
    }
  ]
}