{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blog61",
  "title": "Filterable Archive Index",
  "description": "A dense blog archive whose subject pills are derived from the posts themselves and carry live counts, filtering a two-column list of hairline rows stamped with a date and a reading time.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/blog61/blog61.tsx",
      "content": "\"use client\";\n\nimport { Badge23 } from \"@/components/beste/component/badge23\";\nimport { cn } from \"@/lib/utils\";\nimport Link from \"next/link\";\nimport { useState } from \"react\";\n\ninterface Badge {\n  label: string;\n}\n\ninterface ArchivePost {\n  date: string;\n  topic: string;\n  title: string;\n  readingTime: string;\n  href: string;\n}\n\ninterface Blog61Props {\n  badge?: Badge;\n  heading?: string;\n  description?: string;\n  allLabel?: string;\n  posts?: ArchivePost[];\n  emptyLabel?: string;\n  className?: string;\n}\n\nexport const blog61Demo: Blog61Props = {\n  badge: { label: \"Archive\" },\n  heading: \"Everything we have written, by subject\",\n  description:\n    \"No infinite scroll and no recommended reading. Pick a subject and the list narrows to it.\",\n  allLabel: \"Everything\",\n  posts: [\n    {\n      date: \"12 May 2026\",\n      topic: \"Operations\",\n      title: \"The waiting list is a scheduling problem, not a queue\",\n      readingTime: \"6 min\",\n      href: \"https://beste.co\",\n    },\n    {\n      date: \"28 Apr 2026\",\n      topic: \"Billing\",\n      title: \"Why we raise the invoice from the appointment, not the month\",\n      readingTime: \"8 min\",\n      href: \"https://beste.co\",\n    },\n    {\n      date: \"16 Apr 2026\",\n      topic: \"Migration\",\n      title: \"What eleven years of records looks like when you export it\",\n      readingTime: \"9 min\",\n      href: \"https://beste.co\",\n    },\n    {\n      date: \"09 Apr 2026\",\n      topic: \"Security\",\n      title: \"Six roles beat forty checkboxes, and we can prove it\",\n      readingTime: \"5 min\",\n      href: \"https://beste.co\",\n    },\n    {\n      date: \"21 Mar 2026\",\n      topic: \"Product\",\n      title: \"We deleted the settings page and nobody noticed\",\n      readingTime: \"4 min\",\n      href: \"https://beste.co\",\n    },\n    {\n      date: \"02 Mar 2026\",\n      topic: \"Operations\",\n      title: \"Twelve receptionists, one stopwatch, and a very long Tuesday\",\n      readingTime: \"11 min\",\n      href: \"https://beste.co\",\n    },\n    {\n      date: \"18 Feb 2026\",\n      topic: \"Billing\",\n      title: \"Reconciliation is a reading task, not a data-entry one\",\n      readingTime: \"7 min\",\n      href: \"https://beste.co\",\n    },\n    {\n      date: \"04 Feb 2026\",\n      topic: \"Migration\",\n      title: \"The four fields nobody at any practice could explain\",\n      readingTime: \"6 min\",\n      href: \"https://beste.co\",\n    },\n  ],\n  emptyLabel: \"Nothing filed under that yet.\",\n};\n\nexport function Blog61({\n  badge,\n  heading,\n  description,\n  allLabel = \"All\",\n  posts = [],\n  emptyLabel,\n  className,\n}: Blog61Props) {\n  const [topic, setTopic] = useState<string | null>(null);\n\n  const topics = Array.from(new Set(posts.map((post) => post.topic)));\n  const visible = topic ? posts.filter((post) => post.topic === topic) : posts;\n\n  const filters = [\n    { label: allLabel, value: null, count: posts.length },\n    ...topics.map((name) => ({\n      label: name,\n      value: name,\n      count: posts.filter((post) => post.topic === name).length,\n    })),\n  ];\n\n  return (\n    <section className={cn(\"bg-background py-16 md:py-24 w-full\", className)}>\n      <div className=\"mx-auto max-w-7xl px-4 md:px-6\">\n        {badge && <Badge23 label={badge.label} />}\n\n        <div className=\"mt-6 border-t border-border pt-8 md:pt-10\">\n          <div className=\"grid gap-6 md:grid-cols-2 md:gap-12\">\n            {heading && (\n              <h2 className=\"text-3xl font-light leading-[1.1] tracking-tight text-foreground md:text-5xl\">\n                {heading}\n              </h2>\n            )}\n            {description && (\n              <div className=\"flex md:justify-end\">\n                <p className=\"max-w-md text-base leading-relaxed text-muted-foreground\">\n                  {description}\n                </p>\n              </div>\n            )}\n          </div>\n        </div>\n\n        <div className=\"mt-10 flex flex-wrap gap-2\">\n          {filters.map((filter, index) => {\n            const isActive = topic === filter.value;\n            return (\n              <button\n                key={index}\n                type=\"button\"\n                onClick={() => setTopic(filter.value)}\n                aria-pressed={isActive}\n                className={cn(\n                  \"cursor-pointer rounded-full border px-4 py-1.5 text-sm transition-colors\",\n                  isActive\n                    ? \"border-foreground bg-foreground text-background\"\n                    : \"border-border bg-transparent text-muted-foreground hover:text-foreground\"\n                )}\n              >\n                {filter.label}\n                <span className=\"ml-2 tabular-nums opacity-60\">{filter.count}</span>\n              </button>\n            );\n          })}\n        </div>\n\n        <div className=\"mt-10 grid gap-x-12 md:grid-cols-2\">\n          {visible.map((post, index) => (\n            <Link\n              key={index}\n              href={post.href}\n              className=\"flex flex-col gap-1 border-t border-border py-5 transition-colors hover:bg-muted md:flex-row md:items-baseline md:gap-6\"\n            >\n              <span className=\"w-28 shrink-0 text-sm text-muted-foreground\">\n                {post.date}\n              </span>\n              <span className=\"flex-1 text-lg font-medium text-foreground\">{post.title}</span>\n              <span className=\"shrink-0 text-sm text-muted-foreground\">{post.readingTime}</span>\n            </Link>\n          ))}\n        </div>\n\n        {visible.length === 0 && emptyLabel && (\n          <p className=\"mt-10 border-t border-border pt-6 text-base text-muted-foreground\">\n            {emptyLabel}\n          </p>\n        )}\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/block/blog61.tsx"
    },
    {
      "path": "registry-components/badge23/badge23.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype Tone = \"muted\" | \"foreground\" | \"primary\";\n\ninterface Badge23Props {\n  /** Eyebrow label */\n  label: string;\n  /** Text/border tone */\n  tone?: Tone;\n  /** Additional classes merged onto the root */\n  className?: string;\n}\n\nconst toneStyles: Record<Tone, string> = {\n  muted: \"border-border text-muted-foreground\",\n  foreground: \"border-foreground/30 text-foreground\",\n  primary: \"border-primary/40 text-primary\",\n};\n\nexport const badge23Demo: Badge23Props = {\n  label: \"Product\",\n};\n\nexport function Badge23({ label, tone = \"muted\", className }: Badge23Props) {\n  return (\n    <span\n      className={cn(\n        \"inline-flex items-center rounded-md border bg-transparent px-2.5 py-1 text-sm font-medium leading-none\",\n        toneStyles[tone],\n        className\n      )}\n    >\n      {label}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/beste/component/badge23.tsx"
    }
  ],
  "type": "registry:block"
}