{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "credit-01",
  "title": "Credit Score Card",
  "author": "VenusUI",
  "description": "A credit health section: the score gauge, the factors behind it, the trend and a tip.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://venusui.com/r/score-gauge.json"
  ],
  "files": [
    {
      "path": "registry/default/blocks/credit-01/components/credit-01.tsx",
      "content": "import { TrendingUp } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { ScoreGauge } from \"@/registry/default/ui/score-gauge\"\n\nconst factors = [\n  { name: \"Payment history\", value: \"100% on time\", rating: \"Excellent\", level: 1, impact: \"High impact\" },\n  { name: \"Credit usage\", value: \"8% of $12,500\", rating: \"Excellent\", level: 0.95, impact: \"High impact\" },\n  { name: \"Account age\", value: \"6 yrs 4 mos\", rating: \"Good\", level: 0.7, impact: \"Medium impact\" },\n  { name: \"Hard enquiries\", value: \"2 in 2 years\", rating: \"Fair\", level: 0.5, impact: \"Low impact\" },\n]\n\nconst ratingColor: Record<string, string> = {\n  Excellent: \"bg-emerald-500\",\n  Good: \"bg-lime-500\",\n  Fair: \"bg-amber-500\",\n  Poor: \"bg-red-500\",\n}\n\nconst history = [698, 705, 712, 721, 730, 742]\n\n/** A credit score card: the gauge, the factors behind the score, and the trend. */\nexport function Credit01() {\n  const min = Math.min(...history) - 10\n  const max = Math.max(...history) + 10\n  const points = history.map((v, i) => `${(i / (history.length - 1)) * 100},${40 - ((v - min) / (max - min)) * 36}`).join(\" \")\n\n  return (\n    <section aria-labelledby=\"credit-01-title\" className=\"py-24 sm:py-28\">\n      <div className=\"mx-auto max-w-5xl px-4 sm:px-6\">\n        <h2 id=\"credit-01-title\" className=\"text-3xl font-semibold tracking-tight sm:text-4xl\">\n          Your credit health\n        </h2>\n        <p className=\"mt-2 text-muted-foreground\">Checking your score here never affects it.</p>\n\n        <div className=\"mt-10 grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)]\">\n          <div className=\"flex flex-col items-center rounded-3xl border bg-card p-6 sm:p-8\">\n            <ScoreGauge value={742} label=\"Credit score\" caption=\"Updated 2 Nov\" />\n            <div className=\"mt-6 w-full rounded-2xl bg-muted/50 p-4\">\n              <p className=\"flex items-center gap-1.5 text-sm font-medium text-emerald-700 dark:text-emerald-400\">\n                <TrendingUp aria-hidden=\"true\" className=\"size-4\" /> +44 points in 6 months\n              </p>\n              <svg viewBox=\"0 0 100 42\" preserveAspectRatio=\"none\" role=\"img\" aria-label={`Score over six months: ${history.join(\", \")}`} className=\"mt-3 h-12 w-full overflow-visible\">\n                <polyline points={points} fill=\"none\" stroke=\"currentColor\" strokeWidth={2} vectorEffect=\"non-scaling-stroke\" className=\"text-emerald-500\" />\n              </svg>\n              <div className=\"mt-1 flex justify-between text-[10px] text-muted-foreground\">\n                <span>Jun</span>\n                <span>Nov</span>\n              </div>\n            </div>\n          </div>\n\n          <div className=\"rounded-3xl border bg-card p-6 sm:p-8\">\n            <h3 className=\"font-semibold\">What’s shaping your score</h3>\n            <ul className=\"mt-5 space-y-5\">\n              {factors.map((f) => (\n                <li key={f.name}>\n                  <div className=\"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1\">\n                    <span className=\"text-sm font-medium\">{f.name}</span>\n                    <span className=\"text-sm text-muted-foreground\">{f.value}</span>\n                  </div>\n                  <div className=\"mt-2 h-2 overflow-hidden rounded-full bg-muted\">\n                    <div className={cn(\"h-full rounded-full\", ratingColor[f.rating])} style={{ width: `${f.level * 100}%` }} />\n                  </div>\n                  <p className=\"mt-1.5 text-xs text-muted-foreground\">\n                    <span className=\"font-medium text-foreground\">{f.rating}</span> · {f.impact}\n                  </p>\n                </li>\n              ))}\n            </ul>\n            <div className=\"mt-6 rounded-2xl border border-dashed p-4 text-sm\">\n              <p className=\"font-medium\">Tip: keep usage under 10%</p>\n              <p className=\"mt-1 text-muted-foreground\">You’re at 8%. Paying your card before the statement date keeps it there.</p>\n            </div>\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.1"
  },
  "categories": [
    "stats"
  ],
  "type": "registry:block"
}