{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-alternating",
  "type": "registry:block",
  "title": "Testimonials, alternating",
  "description": "A centred eyebrow and heading, then rows that each pair a quote and a name with a picture, the picture switching sides row by row; on a phone each row stacks as quote, name, picture.",
  "categories": [
    "testimonials"
  ],
  "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/testimonials-alternating/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonials-alternating/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, media, t } from '../_shared/schema';\n\nconst item = z.object({\n  /** The quote, in the person's words. A short one is fine; the row keeps its height from the picture. */\n  quote: t(400),\n  /** Name, and role and company after a comma when the quote is long enough to carry them. */\n  name: t(80),\n  media,\n});\n\nconst schema = z.object({\n  eyebrow: t(40),\n  title: t(100),\n  /** Rows alternate: the first has the quote on the left, the next on the right. */\n  items: z.array(item).min(1).max(6),\n  /** Where the eyebrow and heading sit. 'center' is the centred title; 'start' is left-aligned and one size smaller, the heading size. */\n  header: z.enum(['center', 'start']).default('center'),\n  /** On a phone, 'above' puts every row's picture above its quote; 'alternate' keeps the row order, so every second picture sits under its quote. */\n  phonePicture: z.enum(['alternate', 'above']).default('alternate'),\n});\n\nexport const spec = defineSpec({\n  type: 'testimonials-alternating',\n  aliases: ['testimonials/alternating'],\n  sourceRuns: ['rmwj1xll2a66ac6', 'rmwj0sz8sc51ffe'],\n  name: 'Testimonials, alternating',\n  category: 'testimonials',\n  role: 'body',\n  description: 'A centred eyebrow and heading, then rows that each pair a quote and a name with a picture, the picture switching sides row by row; on a phone each row stacks as quote, name, picture.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the section in two or three words',\n    title: 'Say in one short line what these quotes show',\n    items: [\n      { quote: 'Quote the speaker in one or two sentences on what changed for them.', name: 'Name a person, their role and company', media: { src: '', alt: 'Show the person or what they made' } },\n      { quote: 'Quote the speaker in one short sentence.', name: 'Name a person', media: { src: '', alt: 'Show the person or what they made' } },\n      { quote: 'Quote the speaker in one or two sentences on what changed for them.', name: 'Name a person, their role and company', media: { src: '', alt: 'Show the person or what they made' } },\n    ],\n    header: 'center',\n    phonePicture: 'alternate',\n  },\n});\n"
    },
    {
      "path": "src/blocks/testimonials-alternating/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonials-alternating/index.tsx",
      "content": "import { Media, Text, withHeadingLevel } from '../../editing';\nimport { Container, Eyebrow, 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// Rows of quote and picture in two equal columns from @md up, the picture first in every second row; below that one column in\n// that same order. The picture's 4 / 3 sets the row's height and the text is centred against it.\nfunction TestimonialsAlternating({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const pic = (it: Props['items'][number], i: number) => <Media path={['items', i, 'media']} value={it.media} ratio=\"4 / 3\" className={props.phonePicture === 'above' ? 'order-first rounded-kh-lg shadow-kh-1 @md:order-none' : 'rounded-kh-lg shadow-kh-1'} />;\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <div className={props.header === 'start' ? 'max-w-kh-narrow' : 'text-center'}>\n          <Eyebrow path={['eyebrow']} value={props.eyebrow} className=\"mb-3 text-kh-caption tracking-[0.08em] uppercase\" />\n          <div id={id}>\n            <Text path={['title']} value={props.title} as=\"h2\" className={props.header === 'start' ? 'text-kh-heading font-normal' : 'text-kh-title font-normal'} />\n          </div>\n        </div>\n        <ul className=\"mt-10 grid gap-10 @md:mt-16 @md:gap-24\">\n          {props.items.map((it, i) => (\n            <li key={i} className=\"grid items-center gap-6 @md:grid-cols-2 @md:gap-12\">\n              {i % 2 === 1 && pic(it, i)}\n              <div className=\"flex flex-col gap-4\">\n                <Text path={['items', i, 'quote']} value={it.quote} as=\"p\" multiline className=\"text-kh-lead\" />\n                <Text path={['items', i, 'name']} value={it.name} as=\"p\" className=\"text-kh-small text-kh-muted\" />\n              </div>\n              {i % 2 === 0 && pic(it, i)}\n            </li>\n          ))}\n        </ul>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(TestimonialsAlternating);\n"
    }
  ]
}
