{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-grid",
  "type": "registry:block",
  "title": "Testimonials, grid",
  "description": "A heading and a grid of quotes, each with a name and role.",
  "categories": [
    "testimonials"
  ],
  "dependencies": [
    "zod@^4.6.5"
  ],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/block-kit.json",
    "https://ui.klarhimmel.com/r/button.json",
    "https://ui.klarhimmel.com/r/editing.json"
  ],
  "files": [
    {
      "path": "src/blocks/testimonials-grid/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonials-grid/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  /** An intro under the title (may hold the sentence that links to the review site). */\n  description: t(300).optional(),\n  /** quote t(600) (longest real: 433 characters, DLE Redovisning); role is optional; source and href name where the review stands (a review site, with its link); up to nine items (Tetris Flytt has seven). */\n  items: z.array(z.object({ quote: t(600), name: t(60), role: t(80).optional(), source: t(60).optional(), href: t(300).optional() })).min(1).max(9),\n});\n\nexport const spec = defineSpec({\n  type: 'testimonials-grid',\n  aliases: ['testimonials/grid'],\n  name: 'Testimonials, grid',\n  category: 'testimonials',\n  role: 'body',\n  description: 'A heading and a grid of quotes, each with a name and role.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the section',\n    title: 'Say what the quotes show, in one short line',\n    items: [\n      { quote: 'Quote a customer, in their words, on the result they got and what it changed for them afterwards.', name: 'Name a person', role: 'Their role and their company' },\n      { quote: 'Quote a customer, in their words, on the result they got and what it changed for them afterwards.', name: 'Name a person', role: 'Their role and their company' },\n      { quote: 'Quote a customer, in their words, on the result they got and what it changed for them afterwards.', name: 'Name a person', role: 'Their role and company' },\n      { quote: 'Quote a customer, in their words, on the result they got and what it changed for them afterwards.', name: 'Name a person', role: 'Their role and their company' },\n      { quote: 'Quote a customer, in their words, on the result they got and what it changed for them afterwards.', name: 'Name a person', role: 'Their role and their company' },\n      { quote: 'Quote a customer, in their words, on the result they got and what it changed for them afterwards.', name: 'Name a person', role: 'Their role and company' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/testimonials-grid/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/testimonials-grid/index.tsx",
      "content": "import { useId } from 'react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { Avatar, Container, Opt, Section, SectionHeader, useEditing } from '../_shared/kit';\nimport { safeHref } from '../../ui/button';\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 TestimonialsGrid({ props }: BlockProps<Props>) {\n  const id = useId();\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <SectionHeader id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n        <ul className=\"mt-14 grid gap-5 @2xl:grid-cols-2 @5xl:grid-cols-3\">\n          {props.items.map((item, i) => (\n            <li key={i}>\n              <figure className=\"flex h-full flex-col justify-between gap-8 rounded-kh-xl border border-kh-line bg-kh-surface p-7\">\n                <blockquote>\n                  <Text path={['items', i, 'quote']} value={item.quote} as=\"p\" multiline className=\"text-kh-body leading-relaxed text-kh-ink [overflow-wrap:anywhere]\" />\n                </blockquote>\n                <figcaption className=\"flex items-center gap-3\">\n                  <Avatar name={item.name} />\n                  <span className=\"min-w-0\">\n                    <Text path={['items', i, 'name']} value={item.name} as=\"span\" className=\"block text-kh-small font-medium\" />\n                    <Opt path={['items', i, 'role']} value={item.role} as=\"span\" className=\"block text-kh-small text-kh-muted\" placeholder=\"Role\" />\n                    {(item.source || editing) && (item.href ? (\n                      <a href={safeHref(item.href)} className=\"block text-kh-caption text-kh-muted underline underline-offset-2 hover:text-kh-ink\">\n                        <Text path={['items', i, 'source']} value={item.source ?? ''} as=\"span\" placeholder=\"Source\" />\n                      </a>\n                    ) : (\n                      <Opt path={['items', i, 'source']} value={item.source} as=\"span\" className=\"block text-kh-caption text-kh-muted\" placeholder=\"Source\" />\n                    ))}\n                  </span>\n                </figcaption>\n              </figure>\n            </li>\n          ))}\n        </ul>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(TestimonialsGrid);\n"
    }
  ]
}
