{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-side",
  "type": "registry:block",
  "title": "Testimonials, side",
  "description": "An eyebrow, heading, lead and two actions in a left column, with quote cards stacked in the right column, each with a star rating line, the quote and a round face with name and role. On a phone the cards follow the text in one column.",
  "categories": [
    "testimonials"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "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",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/testimonials-side/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonials-side/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, media, req, t } from '../_shared/schema';\n\nconst stars = z.enum(['1', '2', '3', '4', '5']);\n\nconst item = z.object({\n  /** Stars filled in the rating line, as a whole number. */\n  stars,\n  /** The rating said in words beside the stars, as the person gave it. */\n  rating: t(30),\n  quote: req(280),\n  /** The person's face: a small round picture. */\n  media,\n  /** Name and role on one line. */\n  author: req(80),\n});\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: req(120),\n  description: t(240),\n  primary: link,\n  secondary: link.optional(),\n  /** Off (the default): the rating line over each quote, a picture beside the author and a wider text column. On: no rating line, the author's initials in a round badge, and the quotes in the wider column; leave the intro empty and the second action out for the quietest look. */\n  plain: z.boolean().optional(),\n  /** Quote cards stacked in the right column; they follow the text on a phone. */\n  items: z.array(item).min(1).max(4),\n});\n\nexport const spec = defineSpec({\n  type: 'testimonials-side',\n  aliases: ['testimonials/side'],\n  sourceRuns: ['rmwj1xbmqcfc559', 'rmwj0sz8pac647d'],\n  name: 'Testimonials, side',\n  category: 'testimonials',\n  role: 'body',\n  description: 'An eyebrow, heading, lead and two actions in a left column, with quote cards stacked in the right column, each with a star rating line, the quote and a round face with name and role. On a phone the cards follow the text in one column.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the topic in two or three words',\n    title: 'Say what the people quoted have in common',\n    description: 'Say in one or two sentences who is speaking and what they have in common, before the quotes.',\n    primary: { label: 'Main action', href: '#start' },\n    secondary: { label: 'Second action', href: '#more' },\n    items: [\n      { stars: '5', rating: 'Rating in words', quote: 'Quote the speaker at length on what changed for them.', media: { src: '', alt: 'A face, small and round' }, author: 'Name and role of the speaker' },\n      { stars: '5', rating: 'Rating in words', quote: 'Quote the speaker in one line.', media: { src: '', alt: 'A face, small and round' }, author: 'Name and role of the speaker' },\n      { stars: '5', rating: 'Rating in words', quote: 'Quote the speaker at length on how it went.', media: { src: '', alt: 'A face, small and round' }, author: 'Name and role of the speaker' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/testimonials-side/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonials-side/index.tsx",
      "content": "import { Star } from 'lucide-react';\nimport { Media, Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Avatar, Container, Eyebrow, Opt, Section } from '../_shared/kit';\nimport { useHeadingId } from '../_shared/c-proof-kit';\nimport { cn } from '../../lib/utils';\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\nfunction TestimonialsSide({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const plain = props.plain === true;\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <div className={cn('grid gap-10 @4xl:items-start @4xl:gap-16', plain ? '@4xl:grid-cols-[1fr_1.4fr]' : '@4xl:grid-cols-[1.4fr_1fr]')}>\n          <div>\n            <Eyebrow path={['eyebrow']} value={props.eyebrow} className=\"mb-6 text-kh-caption uppercase tracking-wide\" />\n            <div id={id}>\n              <Text path={['title']} value={props.title} as=\"h2\" className=\"max-w-kh-narrow text-kh-title font-normal\" />\n            </div>\n            <Opt path={['description']} value={props.description} multiline className=\"mt-5 max-w-kh-lead text-kh-lead text-kh-muted\" placeholder=\"Description\" />\n            <div className=\"mt-8 flex flex-wrap gap-3\">\n              <ActionLink path={['primary']} value={props.primary} variant=\"primary\" className=\"rounded-kh-pill\" />\n              {props.secondary && <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" className=\"rounded-kh-pill\" />}\n            </div>\n          </div>\n          <ul className=\"flex flex-col gap-6\">\n            {props.items.map((it, i) => (\n              <li key={i} className=\"flex flex-col gap-4 rounded-kh-lg border border-kh-line bg-kh-surface p-6\">\n                {plain ? null : <div className=\"flex items-center gap-3\">\n                  <span aria-hidden className=\"inline-flex gap-0.5\">\n                    {[1, 2, 3, 4, 5].map((n) => (\n                      <Star key={n} className={n <= Number(it.stars) ? 'size-4 fill-kh-accent text-kh-accent' : 'size-4 text-kh-line-strong'} />\n                    ))}\n                  </span>\n                  <Text path={['items', i, 'rating']} value={it.rating} as=\"span\" className=\"text-kh-small text-kh-muted\" />\n                </div>}\n                <Text path={['items', i, 'quote']} value={it.quote} as=\"p\" multiline className=\"text-kh-body\" />\n                <div className=\"mt-2 flex items-center gap-4\">\n                  {plain ? <Avatar name={it.author} className=\"size-12\" /> : <Media path={['items', i, 'media']} value={it.media} ratio=\"1 / 1\" className=\"size-12 shrink-0 overflow-hidden rounded-kh-pill\" />}\n                  <Text path={['items', i, 'author']} value={it.author} as=\"p\" className=\"text-kh-small text-kh-muted\" />\n                </div>\n              </li>\n            ))}\n          </ul>\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(TestimonialsSide);\n"
    }
  ]
}
