{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "analytics-01",
  "type": "registry:block",
  "description": "A revenue performance overview with KPI tiles and a line chart.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/analytics/analytics-01.tsx",
      "content": "import {\n  ArrowDownRight,\n  ArrowUpRight,\n} from \"@designali/icons\"\n\nimport { CounterNumber } from \"@/registry/designali/ui/counter-number\"\n\nconst stats = [\n  { label: \"Template revenue\", value: 184320, prefix: \"$\", suffix: \"\", decimals: 0, change: \"+12.4%\", up: true },\n  { label: \"Designali Pro members\", value: 8942, prefix: \"\", suffix: \"\", decimals: 0, change: \"+6.1%\", up: true },\n  { label: \"Refund rate\", value: 2.3, prefix: \"\", suffix: \"%\", decimals: 1, change: \"-0.4%\", up: false },\n  { label: \"Avg. order (blocks & icons)\", value: 64.8, prefix: \"$\", suffix: \"\", decimals: 2, change: \"+3.2%\", up: true },\n]\n\nconst revenue = [42, 48, 45, 53, 58, 55, 62, 68, 64, 72, 79, 86]\nconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n\nexport default function Analytics01() {\n  const max = Math.max(...revenue)\n  const min = Math.min(...revenue) - 10\n  const points = revenue\n    .map((v, i) => {\n      const x = (i / (revenue.length - 1)) * 100\n      const y = 100 - ((v - min) / (max - min)) * 100\n      return `${x},${y}`\n    })\n    .join(\" \")\n\n  return (\n    <section className=\"w-full bg-background py-16 text-foreground md:py-24\">\n      <div className=\"mx-auto max-w-6xl px-6\">\n        <div className=\"mb-10 flex flex-col justify-between gap-4 md:flex-row md:items-end\">\n          <div>\n            <p className=\"text-xs tracking-widest text-muted-foreground uppercase\">\n              Overview\n            </p>\n            <h2 className=\"mt-2 text-3xl font-medium tracking-tight md:text-4xl\">\n              designali.com revenue, 2026\n            </h2>\n          </div>\n          <p className=\"max-w-sm text-sm text-muted-foreground\">\n            Sales of Designali templates, blocks, icons and UI kits. Figures\n            update every 15 minutes and are shown in USD before tax.\n          </p>\n        </div>\n\n        <div className=\"grid grid-cols-2 border-t border-l border-border lg:grid-cols-4\">\n          {stats.map((stat) => (\n            <div key={stat.label} className=\"border-r border-b border-border p-6\">\n              <p className=\"text-xs text-muted-foreground\">{stat.label}</p>\n              <CounterNumber\n                value={stat.value}\n                prefix={stat.prefix}\n                suffix={stat.suffix}\n                decimalPlaces={stat.decimals}\n                className=\"mt-3 block text-2xl font-semibold tracking-tight md:text-3xl\"\n              />\n              <p\n                className={`mt-2 inline-flex items-center gap-1 text-xs ${\n                  stat.up ? \"text-primary dark:text-primary\" : \"text-primary dark:text-primary\"\n                }`}\n              >\n                {stat.up ? (\n                  <ArrowUpRight className=\"size-3\" />\n                ) : (\n                  <ArrowDownRight className=\"size-3\" />\n                )}\n                {stat.change} vs last month\n              </p>\n            </div>\n          ))}\n        </div>\n\n        <div className=\"border-x border-b border-border p-6\">\n          <div className=\"mb-6 flex items-center justify-between\">\n            <p className=\"text-sm font-medium\">Designali Pro recurring revenue ($k)</p>\n            <span className=\"text-xs text-muted-foreground\">Jan – Dec</span>\n          </div>\n          <div className=\"relative h-56 w-full\">\n            <div className=\"absolute inset-0 flex flex-col justify-between\">\n              {[0, 1, 2, 3].map((line) => (\n                <div key={line} className=\"border-t border-dashed border-border\" />\n              ))}\n            </div>\n            <svg\n              viewBox=\"0 0 100 100\"\n              preserveAspectRatio=\"none\"\n              className=\"absolute inset-0 h-full w-full overflow-visible\"\n            >\n              <polygon\n                points={`0,100 ${points} 100,100`}\n                fill=\"var(--chart-1)\"\n                opacity=\"0.12\"\n              />\n              <polyline\n                points={points}\n                fill=\"none\"\n                stroke=\"var(--chart-1)\"\n                strokeWidth=\"2\"\n                vectorEffect=\"non-scaling-stroke\"\n              />\n            </svg>\n          </div>\n          <div className=\"mt-3 grid grid-cols-12 text-center text-[10px] text-muted-foreground\">\n            {months.map((month) => (\n              <span key={month}>{month}</span>\n            ))}\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "800px"
  },
  "categories": [
    "analytics"
  ]
}