{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"stats-bento-grid-for-a-dashboard","type":"registry:block","title":"Stats Bento Grid for a Dashboard","description":"","dependencies":[],"files":[{"path":"components/we-inc/stats-bento-grid-for-a-dashboard.tsx","type":"registry:component","content":"// Dashboard stats bento: a wide revenue tile, a ring, a ranked list and two small numbers.\n// Four columns from md, two on small tablets, one on phones.\nconst revenue = [18, 22, 21, 27, 25, 31, 34, 33, 38, 41, 39, 46];\nconst plans = [\n  { name: \"Studio\", value: 412, share: 100 },\n  { name: \"Solo\", value: 288, share: 70 },\n  { name: \"Team\", value: 141, share: 34 },\n];\n\nfunction Spark() {\n  const max = Math.max(...revenue);\n  const pts = revenue.map((v, i) => `${(i / (revenue.length - 1)) * 300},${90 - (v / max) * 80}`).join(\" \");\n  return (\n    <svg viewBox=\"0 0 300 100\" preserveAspectRatio=\"none\" className=\"mt-6 h-28 w-full\" aria-hidden=\"true\">\n      <polygon points={`0,100 ${pts} 300,100`} className=\"fill-emerald-100\" />\n      <polyline points={pts} fill=\"none\" className=\"stroke-emerald-600\" strokeWidth=\"2.5\" strokeLinejoin=\"round\" vectorEffect=\"non-scaling-stroke\" />\n    </svg>\n  );\n}\n\nexport default function StatsBentoGridForADashboard() {\n  const retention = 92;\n  const c = 2 * Math.PI * 34;\n  return (\n    <section className=\"bg-white px-5 py-14 sm:py-20\">\n      <div className=\"mx-auto max-w-6xl\">\n        <div className=\"flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1\">\n          <h2 className=\"text-2xl font-semibold tracking-tight text-slate-900\">October overview</h2>\n          <p className=\"text-sm text-slate-600\">Fernway Yoga, all studios</p>\n        </div>\n        <div className=\"mt-8 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n          <article className=\"rounded-2xl border border-slate-200 p-6 sm:col-span-2 lg:row-span-2\">\n            <h3 className=\"text-sm font-medium text-slate-600\">Monthly revenue</h3>\n            <p className=\"mt-2 text-4xl font-semibold tracking-tight text-slate-900 tabular-nums\">$46,180</p>\n            <p className=\"mt-1 text-sm font-medium text-emerald-700\">Up 17.9% on September</p>\n            <Spark />\n            <div className=\"mt-2 flex justify-between text-xs text-slate-500\"><span>Nov 2025</span><span>Oct 2026</span></div>\n          </article>\n          <article className=\"flex items-center gap-5 rounded-2xl border border-slate-200 p-6\">\n            <svg viewBox=\"0 0 80 80\" className=\"h-20 w-20 shrink-0 -rotate-90\" aria-hidden=\"true\">\n              <circle cx=\"40\" cy=\"40\" r=\"34\" fill=\"none\" className=\"stroke-slate-100\" strokeWidth=\"9\" />\n              <circle cx=\"40\" cy=\"40\" r=\"34\" fill=\"none\" className=\"stroke-orange-500\" strokeWidth=\"9\" strokeLinecap=\"round\" strokeDasharray={`${(retention / 100) * c} ${c}`} />\n            </svg>\n            <div>\n              <h3 className=\"text-sm font-medium text-slate-600\">Members kept</h3>\n              <p className=\"text-3xl font-semibold text-slate-900 tabular-nums\">{retention}%</p>\n            </div>\n          </article>\n          <article className=\"rounded-2xl border border-slate-200 p-6\">\n            <h3 className=\"text-sm font-medium text-slate-600\">Classes booked</h3>\n            <p className=\"mt-2 text-3xl font-semibold text-slate-900 tabular-nums\">3,904</p>\n            <p className=\"mt-1 text-sm text-slate-600\">87% of spaces filled</p>\n          </article>\n          <article className=\"rounded-2xl border border-slate-200 p-6 sm:col-span-2\">\n            <h3 className=\"text-sm font-medium text-slate-600\">Members by plan</h3>\n            <ul className=\"mt-4 space-y-3\">\n              {plans.map((p) => (\n                <li key={p.name} className=\"grid grid-cols-[64px_1fr_44px] items-center gap-3 text-sm\">\n                  <span className=\"text-slate-700\">{p.name}</span>\n                  <span className=\"h-2.5 rounded-full bg-slate-100\"><span className=\"block h-full rounded-full bg-emerald-500\" style={{ width: `${p.share}%` }} /></span>\n                  <span className=\"text-right font-medium text-slate-900 tabular-nums\">{p.value}</span>\n                </li>\n              ))}\n            </ul>\n          </article>\n        </div>\n      </div>\n    </section>\n  );\n}\n"}]}
