{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "news37",
  "title": "Filterable Newsroom Index",
  "description": "A newsroom whose kind pills are derived from the announcements and carry live counts, narrowing a chronological list of hairline rows that align the kind, the date, and the headline with its summary.",
  "dependencies": [
    "clsx",
    "tailwind-merge",
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/news37/news37.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 Announcement {\n  kind: string;\n  date: string;\n  title: string;\n  summary: string;\n  href: string;\n}\n\ninterface News37Props {\n  badge?: Badge;\n  heading?: string;\n  description?: string;\n  allLabel?: string;\n  items?: Announcement[];\n  emptyLabel?: string;\n  className?: string;\n}\n\nexport const news37Demo: News37Props = {\n  badge: { label: \"Newsroom\" },\n  heading: \"Everything we have announced, in the order it happened\",\n  description:\n    \"Product releases, company news, and the incident write-ups. All of it stays up, including the parts that did not go to plan.\",\n  allLabel: \"Everything\",\n  items: [\n    {\n      kind: \"Product\",\n      date: \"14 May 2026\",\n      title: \"Multi-site capacity sharing is out of testing\",\n      summary:\n        \"Four clinics can now share one waiting list while keeping their own rooms, hours, and rules. Three practices ran it for eleven weeks first.\",\n      href: \"https://beste.co\",\n    },\n    {\n      kind: \"Company\",\n      date: \"02 May 2026\",\n      title: \"We are profitable, and staying at eighteen people\",\n      summary:\n        \"No raise, no growth targets we do not believe, and no plan to add a sales team. The full note explains what that costs us.\",\n      href: \"https://beste.co\",\n    },\n    {\n      kind: \"Incident\",\n      date: \"24 April 2026\",\n      title: \"Forty-one minutes of slow booking pages\",\n      summary:\n        \"A deploy at 06:40 degraded the booking service for one region. Root cause, timeline, and the four things we changed afterwards.\",\n      href: \"https://beste.co\",\n    },\n    {\n      kind: \"Product\",\n      date: \"11 April 2026\",\n      title: \"Insurer reconciliation on the same ledger as self-pay\",\n      summary:\n        \"Billing no longer splits at the point an insurer is involved, which was the single most requested change of the last year.\",\n      href: \"https://beste.co\",\n    },\n    {\n      kind: \"Company\",\n      date: \"28 March 2026\",\n      title: \"Our sub-processor register is now public\",\n      summary:\n        \"Every company that touches your data, why, and where. Changes are published thirty days before they take effect.\",\n      href: \"https://beste.co\",\n    },\n    {\n      kind: \"Product\",\n      date: \"09 March 2026\",\n      title: \"Roles rewritten in plain language\",\n      summary:\n        \"Forty checkboxes became six named roles. We deleted more permission settings than we added, which is the point.\",\n      href: \"https://beste.co\",\n    },\n    {\n      kind: \"Incident\",\n      date: \"17 February 2026\",\n      title: \"Reminders sent twice to 214 members\",\n      summary:\n        \"A retry loop double-sent one evening's reminders. Nobody was double-booked, everybody was mildly annoyed, and here is the fix.\",\n      href: \"https://beste.co\",\n    },\n  ],\n  emptyLabel: \"Nothing filed under that yet.\",\n};\n\nexport function News37({\n  badge,\n  heading,\n  description,\n  allLabel = \"All\",\n  items = [],\n  emptyLabel,\n  className,\n}: News37Props) {\n  const [kind, setKind] = useState<string | null>(null);\n\n  const kinds = Array.from(new Set(items.map((item) => item.kind)));\n  const visible = kind ? items.filter((item) => item.kind === kind) : items;\n\n  const filters = [\n    { label: allLabel, value: null, count: items.length },\n    ...kinds.map((name) => ({\n      label: name,\n      value: name,\n      count: items.filter((item) => item.kind === 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 = kind === filter.value;\n            return (\n              <button\n                key={index}\n                type=\"button\"\n                onClick={() => setKind(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\">\n          {visible.map((item, index) => (\n            <Link\n              key={index}\n              href={item.href}\n              className=\"grid gap-3 border-t border-border py-6 transition-colors hover:bg-muted md:grid-cols-[8rem_9rem_minmax(0,1fr)] md:gap-8 md:px-4\"\n            >\n              <span className=\"text-base text-muted-foreground\">{item.kind}</span>\n              <span className=\"text-base text-muted-foreground\">{item.date}</span>\n              <span>\n                <span className=\"block text-xl font-medium text-foreground\">{item.title}</span>\n                <span className=\"mt-2 block max-w-2xl text-base leading-relaxed text-muted-foreground\">\n                  {item.summary}\n                </span>\n              </span>\n            </Link>\n          ))}\n        </div>\n\n        {visible.length === 0 && emptyLabel && (\n          <p className=\"border-t border-border py-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/news37.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"
}