{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blog-featured",
  "type": "registry:block",
  "title": "Blog Featured",
  "description": "A featured story with a large photo beside three recent posts.",
  "files": [
    {
      "path": "src/registry/blocks/blog/blog-featured.tsx",
      "type": "registry:block",
      "content": "import { useId, type CSSProperties, type ComponentProps } from \"react\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport type BlogPost = {\n  title: string;\n  dek?: string;\n  href: string;\n  category: string;\n  author?: string;\n  /** Display date, e.g. \"2 Oct 2026\". */\n  date: string;\n  /** Machine-readable date for <time>, e.g. \"2026-10-02\". */\n  dateTime: string;\n  /** Reading time in minutes. */\n  readingTime: number;\n  image: { src: string; alt: string };\n};\n\nexport type BlogFeaturedProps = {\n  eyebrow?: string;\n  title?: string;\n  archive?: { label: string; href: string };\n  featured?: BlogPost;\n  posts?: BlogPost[];\n  /** Ink used for the category tags. Text on the tag is white, so keep it dark. */\n  accent?: string;\n} & ComponentProps<\"section\">;\n\nconst unsplash = (id: string, w: number) =>\n  `https://images.unsplash.com/${id}?w=${w}&q=80&auto=format&fit=crop`;\n\nconst DEFAULT_FEATURED: BlogPost = {\n  title: \"We moved booking reminders to the night before. No-shows fell 31%.\",\n  dek: \"A guesthouse above Lake Oeschinen asked why half its guests missed the 8 a.m. boat. Eight weeks and 412 properties later we have an answer, and a few caveats we did not expect.\",\n  href: \"#\",\n  category: \"Field notes\",\n  author: \"Ana Ferreira\",\n  date: \"2 Oct 2026\",\n  dateTime: \"2026-10-02\",\n  readingTime: 9,\n  image: {\n    src: unsplash(\"photo-1501785888041-af3ef285b470\", 1400),\n    alt: \"An alpine lake with a small boat, mountains rising behind it\",\n  },\n};\n\nconst DEFAULT_POSTS: BlogPost[] = [\n  {\n    title: \"Why the shops we love still hand-letter their opening hours\",\n    href: \"#\",\n    category: \"Owners\",\n    author: \"Hanne Vos\",\n    date: \"24 Sep 2026\",\n    dateTime: \"2026-09-24\",\n    readingTime: 6,\n    image: {\n      src: unsplash(\"photo-1472851294608-062f824d29cc\", 400),\n      alt: \"An “Open” sign hanging on a shop door\",\n    },\n  },\n  {\n    title: \"Seasonal pricing is mostly a guess. Here is how to guess better.\",\n    href: \"#\",\n    category: \"Operations\",\n    author: \"Tomás Reyes\",\n    date: \"11 Sep 2026\",\n    dateTime: \"2026-09-11\",\n    readingTime: 7,\n    image: {\n      src: unsplash(\"photo-1507525428034-b723cf961d3e\", 400),\n      alt: \"A beach at sunset\",\n    },\n  },\n  {\n    title: \"Rebuilding the calendar view without breaking anyone’s bookmarks\",\n    href: \"#\",\n    category: \"Engineering\",\n    author: \"Jun Watanabe\",\n    date: \"19 Aug 2026\",\n    dateTime: \"2026-08-19\",\n    readingTime: 12,\n    image: {\n      src: unsplash(\"photo-1551288049-bebda4e38f71\", 400),\n      alt: \"An analytics dashboard open on a laptop\",\n    },\n  },\n];\n\nconst DEFAULTS = {\n  eyebrow: \"Saltbox Journal · Notes from the front desk\",\n  title: \"What we learned running 4,000 small front desks\",\n  archive: { label: \"All 146 articles\", href: \"#\" },\n  accent: \"#0A6EFF\",\n};\n\nconst TAG_TEXT = \"#FFFFFF\";\n\nconst focusRing =\n  \"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-4 focus-visible:ring-offset-background\";\n\nfunction Tag({ children }: { children: string }) {\n  return (\n    <span\n      className=\"inline-block bg-[var(--block-accent)] px-2 py-1 font-mono text-[11px] uppercase leading-none tracking-wider\"\n      style={{ color: TAG_TEXT }}\n    >\n      {children}\n    </span>\n  );\n}\n\nfunction Meta({ post, className }: { post: BlogPost; className?: string }) {\n  return (\n    <p\n      className={cn(\n        \"flex flex-wrap gap-x-3 gap-y-1 font-mono text-xs text-muted-foreground\",\n        className\n      )}\n    >\n      {post.author && <span>{post.author}</span>}\n      <time dateTime={post.dateTime}>{post.date}</time>\n      <span>{post.readingTime} min read</span>\n    </p>\n  );\n}\n\nexport function BlogFeatured({\n  eyebrow = DEFAULTS.eyebrow,\n  title = DEFAULTS.title,\n  archive = DEFAULTS.archive,\n  featured = DEFAULT_FEATURED,\n  posts = DEFAULT_POSTS,\n  accent = DEFAULTS.accent,\n  className,\n  style,\n  ...props\n}: BlogFeaturedProps) {\n  const headingId = useId();\n\n  return (\n    <section\n      data-slot=\"blog-featured\"\n      aria-labelledby={headingId}\n      className={cn(\"w-full bg-background text-foreground\", className)}\n      style={{ \"--block-accent\": accent, ...style } as CSSProperties}\n      {...props}\n    >\n      <div className=\"mx-auto max-w-6xl px-6 py-20 md:py-28\">\n        <div className=\"grid gap-6 border-b pb-8 md:grid-cols-12 md:items-end\">\n          <div className=\"md:col-span-8\">\n            <p className=\"font-mono text-xs uppercase tracking-wider text-muted-foreground\">\n              {eyebrow}\n            </p>\n            <h2\n              id={headingId}\n              className=\"mt-5 max-w-2xl text-4xl font-semibold leading-[1.02] tracking-[-0.03em] text-balance md:text-5xl\"\n            >\n              {title}\n            </h2>\n          </div>\n          <a\n            href={archive.href}\n            className={cn(\n              \"inline-flex items-center gap-2 justify-self-start text-sm font-medium underline decoration-1 underline-offset-[6px] hover:text-muted-foreground md:col-span-4 md:justify-self-end\",\n              focusRing\n            )}\n          >\n            {archive.label}\n            <ArrowRight aria-hidden className=\"size-4\" />\n          </a>\n        </div>\n\n        <div className=\"mt-10 grid gap-12 md:grid-cols-12 md:gap-10\">\n          <article className=\"md:col-span-7\">\n            <a href={featured.href} className={cn(\"group block\", focusRing)}>\n              {/* Plain <img> keeps the block portable outside Next.js. */}\n              {/* eslint-disable-next-line @next/next/no-img-element */}\n              <img\n                src={featured.image.src}\n                alt={featured.image.alt}\n                width={1400}\n                height={1050}\n                className=\"aspect-[4/3] w-full bg-muted object-cover\"\n              />\n              <div className=\"mt-6\">\n                <Tag>{featured.category}</Tag>\n                <h3 className=\"mt-4 text-3xl font-semibold leading-[1.08] tracking-[-0.025em] text-balance decoration-1 underline-offset-[6px] group-hover:underline md:text-4xl\">\n                  {featured.title}\n                </h3>\n                {featured.dek && (\n                  <p className=\"mt-4 max-w-xl text-base leading-relaxed text-muted-foreground\">\n                    {featured.dek}\n                  </p>\n                )}\n                <Meta post={featured} className=\"mt-5\" />\n              </div>\n            </a>\n          </article>\n\n          <div className=\"md:col-span-5\">\n            <p className=\"flex items-baseline justify-between border-b pb-3 font-mono text-xs uppercase tracking-wider text-muted-foreground\">\n              <span>Also this month</span>\n              <span className=\"tabular-nums\">{String(posts.length).padStart(2, \"0\")}</span>\n            </p>\n            <ul className=\"divide-y border-b\">\n              {posts.map((post) => (\n                <li key={post.href + post.title}>\n                  <article>\n                    <a\n                      href={post.href}\n                      className={cn(\"group grid grid-cols-[1fr_6rem] gap-5 py-6 sm:grid-cols-[1fr_7.5rem]\", focusRing)}\n                    >\n                      <div>\n                        <Tag>{post.category}</Tag>\n                        <h3 className=\"mt-3 text-lg font-semibold leading-snug tracking-[-0.015em] text-pretty decoration-1 underline-offset-4 group-hover:underline\">\n                          {post.title}\n                        </h3>\n                        <Meta post={post} className=\"mt-3\" />\n                      </div>\n                      {/* eslint-disable-next-line @next/next/no-img-element */}\n                      <img\n                        src={post.image.src}\n                        alt={post.image.alt}\n                        width={400}\n                        height={300}\n                        loading=\"lazy\"\n                        className=\"aspect-[4/3] w-full bg-muted object-cover\"\n                      />\n                    </a>\n                  </article>\n                </li>\n              ))}\n            </ul>\n            <p className=\"mt-4 font-mono text-[11px] leading-relaxed text-muted-foreground\">\n              New pieces most Thursdays. Written by the people who answer your support emails.\n            </p>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ],
  "dependencies": [
    "lucide-react"
  ]
}
