{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "size-guide-01",
  "title": "Size Guide",
  "author": "VenusUI",
  "description": "A strap size guide: pull the tape to your measurement and the right size lights up.",
  "registryDependencies": [
    "https://venusui.com/r/tape-measure.json"
  ],
  "files": [
    {
      "path": "registry/default/blocks/size-guide-01/components/size-guide-01.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { TapeMeasure } from \"@/registry/default/ui/tape-measure\"\n\nconst SIZES = [\n  { size: \"XS\", from: 13, to: 14.9, holes: \"Holes 1–3\" },\n  { size: \"S\", from: 15, to: 16.4, holes: \"Holes 2–5\" },\n  { size: \"M\", from: 16.5, to: 17.9, holes: \"Holes 3–6\" },\n  { size: \"L\", from: 18, to: 19.4, holes: \"Holes 4–7\" },\n  { size: \"XL\", from: 19.5, to: 21, holes: \"Holes 5–8\" },\n]\n\n/** A strap size guide: pull the tape to your wrist measurement and the right size lights up. */\nexport function SizeGuide01() {\n  const [length, setLength] = React.useState(0)\n  const [locked, setLocked] = React.useState(0)\n  const reading = length || locked\n  const match = SIZES.find((row) => reading >= row.from && reading <= row.to)\n\n  return (\n    <section aria-labelledby=\"size-guide-01-title\" className=\"py-24 sm:py-28\">\n      <div className=\"mx-auto max-w-5xl px-4 sm:px-6\">\n        <div className=\"max-w-2xl\">\n          <h2 id=\"size-guide-01-title\" className=\"text-3xl font-semibold tracking-tight sm:text-4xl\">\n            Find your strap size\n          </h2>\n          <p className=\"mt-3 leading-7 text-muted-foreground\">\n            Wrap a soft tape or a strip of paper round your wrist, just below the bone. Then pull ours out to the same\n            length (lock it with the button on the case) and we’ll match the size.\n          </p>\n        </div>\n\n        <div className=\"mt-10 grid grid-cols-[minmax(0,1fr)] items-center gap-10 lg:grid-cols-[minmax(0,1.2fr)_minmax(0,1fr)]\">\n          <TapeMeasure\n            max={24}\n            scale={20}\n            onMeasure={(value) => {\n              setLength(value)\n              if (value) setLocked(value)\n            }}\n          />\n          <div className=\"overflow-hidden rounded-xl border\">\n            <table className=\"w-full text-sm\">\n              <caption className=\"sr-only\">Strap sizes by wrist measurement</caption>\n              <thead className=\"bg-muted/50 text-left text-xs text-muted-foreground\">\n                <tr>\n                  <th scope=\"col\" className=\"px-4 py-2 font-medium\">Size</th>\n                  <th scope=\"col\" className=\"px-4 py-2 font-medium\">Wrist</th>\n                  <th scope=\"col\" className=\"px-4 py-2 font-medium\">Fits on</th>\n                </tr>\n              </thead>\n              <tbody>\n                {SIZES.map((row) => (\n                  <tr key={row.size} aria-current={match?.size === row.size ? \"true\" : undefined} className={cn(\"border-t transition-colors\", match?.size === row.size && \"bg-primary text-primary-foreground\")}>\n                    <th scope=\"row\" className=\"px-4 py-2.5 text-left font-semibold\">{row.size}</th>\n                    <td className=\"px-4 py-2.5 font-mono tabular-nums\">\n                      {row.from}–{row.to} cm\n                    </td>\n                    <td className={cn(\"px-4 py-2.5\", match?.size === row.size ? \"text-primary-foreground/85\" : \"text-muted-foreground\")}>{row.holes}</td>\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n            <p role=\"status\" className=\"border-t px-4 py-3 text-sm\">\n              {match ? (\n                <>\n                  Your size is <strong>{match.size}</strong> ({reading.toFixed(1)} cm).\n                </>\n              ) : reading ? (\n                `${reading.toFixed(1)} cm is outside our straps. Write to us for a custom length.`\n              ) : (\n                \"Pull the tape to measure.\"\n              )}\n            </p>\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "content"
  ],
  "type": "registry:block"
}