{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "features-bento-pictures",
  "type": "registry:block",
  "title": "Features, bento pictures",
  "description": "A heading with a lead and two actions beside it, then a bento of picture cards: a large card beside a medium card and a solid number tile, and a small card beside a wide card with its picture at the side. On a phone the cards stack in one column.",
  "categories": [
    "features"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/editing.json",
    "https://ui.klarhimmel.com/r/kit-c-proof.json"
  ],
  "files": [
    {
      "path": "src/blocks/features-bento-pictures/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/features-bento-pictures/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, t } from '../_shared/schema';\n\nconst picture = z.object({ title: t(40), description: t(120), media });\n\nconst schema = z.object({\n  eyebrow: t(30),\n  title: t(80),\n  /** The lead beside the heading on a wide screen, under it on a phone. */\n  description: t(200),\n  primary: link,\n  secondary: link.optional(),\n  /** The large card, left, as tall as the two cards beside it. */\n  feature: z.object({ badge: t(20), title: t(50), description: t(160), media }),\n  /** The medium card, top right. */\n  card: picture,\n  /** The solid tile with one number. */\n  stat: z.object({ value: t(12), label: t(60) }),\n  /** The small card, bottom left. */\n  small: picture,\n  /** The wide card with the picture beside its text; on a phone the picture sits above. */\n  wide: z.object({ tag: t(20), title: t(60), description: t(200), media, link: link.optional() }),\n});\n\nexport const spec = defineSpec({\n  type: 'features-bento-pictures',\n  aliases: ['features/bento-pictures'],\n  sourceRuns: ['rmwj00gla04cb3b'],\n  name: 'Features, bento pictures',\n  category: 'features',\n  role: 'body',\n  description: 'A heading with a lead and two actions beside it, then a bento of picture cards: a large card beside a medium card and a solid number tile, and a small card beside a wide card with its picture at the side. On a phone the cards stack in one column.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the group',\n    title: 'Say what this group of items is about',\n    description: 'Say in one or two sentences what the items below have in common and who they are for.',\n    primary: { label: 'Main action', href: '#start' },\n    secondary: { label: 'Second action', href: '#more' },\n    feature: {\n      badge: 'Label',\n      title: 'Name the most important item',\n      description: 'Put the benefit the reader takes away in one line.',\n      media: { src: '', alt: 'Show the most important item at work' },\n    },\n    card: { title: 'Name the second item', description: 'Give the one benefit worth knowing here.', media: { src: '', alt: 'Show the second item' } },\n    stat: { value: 'Number', label: 'Name the thing this figure measures' },\n    small: { title: 'Name the third item', description: 'Give the one benefit worth knowing here.', media: { src: '', alt: 'Show the third item' } },\n    wide: {\n      tag: 'Tag',\n      title: 'Name the fourth item',\n      description: 'Describe this item in two sentences, with the detail that decides the next step.',\n      media: { src: '', alt: 'Show the fourth item in use' },\n      link: { label: 'Read more', href: '#fourth' },\n    },\n  },\n});\n"
    },
    {
      "path": "src/blocks/features-bento-pictures/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/features-bento-pictures/index.tsx",
      "content": "import { Media, Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Container, Opt, Section } from '../_shared/kit';\nimport { useHeadingId } from '../_shared/c-proof-kit';\nimport { spec } from './spec';\nimport type { BlockProps } from '../types';\nimport type { z } from 'zod';\n\nexport { spec };\ntype Props = z.infer<typeof spec.schema>;\n\n// The captured bento: a 12-column grid from a container of 48rem. Large card 7 wide over two rows, medium 5, stat 5; small 4 and wide 8 below.\nfunction FeaturesBentoPictures({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const { feature, card, stat, small, wide } = props;\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <div className=\"grid gap-8 @4xl:grid-cols-[1.4fr_1fr] @4xl:items-end\">\n          <div className=\"flex flex-col gap-4\">\n            <Opt path={['eyebrow']} value={props.eyebrow} as=\"p\" className=\"font-kh-mono text-kh-caption tracking-widest text-kh-accent-ink uppercase\" placeholder=\"Eyebrow\" />\n            <div id={id}>\n              <Text path={['title']} value={props.title} as=\"h2\" className=\"font-kh-display text-kh-title\" />\n            </div>\n          </div>\n          <div className=\"flex flex-col gap-6\">\n            <Text path={['description']} value={props.description} as=\"p\" multiline className=\"text-kh-lead text-kh-muted\" />\n            <div className=\"flex flex-wrap gap-3\">\n              <ActionLink path={['primary']} value={props.primary} size=\"md\" />\n              {props.secondary && <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" size=\"md\" />}\n            </div>\n          </div>\n        </div>\n\n        <div className=\"mt-12 grid gap-4 @3xl:grid-cols-12 @3xl:gap-6\">\n          <article className=\"flex flex-col overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface shadow-kh-1 @3xl:col-span-7 @3xl:row-span-2\">\n            <Media path={['feature', 'media']} value={feature.media} ratio=\"4 / 3\" className=\"w-full flex-1\" />\n            <div className=\"flex flex-col gap-3 p-6 @3xl:p-8\">\n              <Opt path={['feature', 'badge']} value={feature.badge} as=\"span\" className=\"self-start rounded-full bg-kh-accent-soft px-3 py-1 font-kh-mono text-kh-caption text-kh-accent-ink\" placeholder=\"Badge\" />\n              <Text path={['feature', 'title']} value={feature.title} as=\"h3\" className=\"font-kh-display text-kh-heading\" />\n              <Text path={['feature', 'description']} value={feature.description} as=\"p\" multiline className=\"text-kh-muted\" />\n            </div>\n          </article>\n\n          <article className=\"flex flex-col overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface shadow-kh-1 @3xl:col-span-5\">\n            <Media path={['card', 'media']} value={card.media} ratio=\"16 / 9\" className=\"w-full\" />\n            <div className=\"flex flex-col gap-2 p-6\">\n              <Text path={['card', 'title']} value={card.title} as=\"h3\" className=\"font-kh-display text-kh-lead\" />\n              <Text path={['card', 'description']} value={card.description} as=\"p\" multiline className=\"text-kh-small text-kh-muted\" />\n            </div>\n          </article>\n\n          <article className=\"flex flex-col justify-between gap-8 rounded-kh-xl bg-kh-accent-fill p-6 text-kh-accent-fg shadow-kh-2 @3xl:col-span-5 @3xl:p-8\">\n            <svg viewBox=\"0 0 24 24\" className=\"size-8\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.75\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n              <path d=\"M3 17l6-6 4 4 8-8\" />\n              <path d=\"M15 7h6v6\" />\n            </svg>\n            <div className=\"flex flex-col gap-1\">\n              <Text path={['stat', 'value']} value={stat.value} as=\"p\" className=\"font-kh-display text-kh-display\" />\n              <Text path={['stat', 'label']} value={stat.label} as=\"p\" />\n            </div>\n          </article>\n\n          <article className=\"flex flex-col overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface-2 @3xl:col-span-4\">\n            <Media path={['small', 'media']} value={small.media} ratio=\"1 / 1\" className=\"w-full\" />\n            <div className=\"flex flex-col gap-2 p-6\">\n              <Text path={['small', 'title']} value={small.title} as=\"h3\" className=\"font-kh-display text-kh-lead\" />\n              <Text path={['small', 'description']} value={small.description} as=\"p\" multiline className=\"text-kh-small text-kh-muted\" />\n            </div>\n          </article>\n\n          <article className=\"grid overflow-hidden rounded-kh-xl border border-kh-line bg-kh-surface shadow-kh-1 @xl:grid-cols-2 @3xl:col-span-8\">\n            <Media path={['wide', 'media']} value={wide.media} ratio=\"4 / 3\" className=\"h-full w-full @xl:aspect-auto\" />\n            <div className=\"flex flex-col justify-center gap-4 p-6 @3xl:p-8\">\n              <Opt path={['wide', 'tag']} value={wide.tag} as=\"span\" className=\"self-start rounded-full border border-kh-line-strong px-3 py-1 font-kh-mono text-kh-caption text-kh-muted\" placeholder=\"Tag\" />\n              <Text path={['wide', 'title']} value={wide.title} as=\"h3\" className=\"font-kh-display text-kh-heading\" />\n              <Text path={['wide', 'description']} value={wide.description} as=\"p\" multiline className=\"text-kh-muted\" />\n              {wide.link && <ActionLink path={['wide', 'link']} value={wide.link} variant=\"ghost\" size=\"md\" className=\"self-start\" />}\n            </div>\n          </article>\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(FeaturesBentoPictures);\n"
    }
  ]
}
