{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faq-centered",
  "type": "registry:block",
  "title": "FAQ, centred cards",
  "description": "A centred heading over a narrow column of questions, each in its own rounded card that opens on click, and one link at the bottom. Gentler than the ruled list and good for short sets of three to six.",
  "categories": [
    "faq"
  ],
  "dependencies": [
    "lucide-react@^1.49.0",
    "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",
    "https://ui.klarhimmel.com/r/kit-c-proof.json",
    "https://ui.klarhimmel.com/r/kit-e-faq.json",
    "https://ui.klarhimmel.com/r/text-link.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/faq-centered/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/faq-centered/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, req, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: req(120),\n  description: t(300),\n  items: z.array(z.object({ question: req(160), answer: t(600) })).min(2).max(8),\n  more: link,\n});\n\nexport const spec = defineSpec({\n  type: 'faq-centered',\n  aliases: ['faq/centered'],\n  name: 'FAQ, centred cards',\n  category: 'faq',\n  role: 'body',\n  description: 'A centred heading over a narrow column of questions, each in its own rounded card that opens on click, and one link at the bottom. Gentler than the ruled list and good for short sets of three to six.',\n  schema,\n  defaults: {\n    eyebrow: 'Section',\n    title: 'Say what the answers cover',\n    description: 'Say in one sentence what to do if the answer is not here, and who replies.',\n    items: [\n      { question: 'Ask a question customers have', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a common question', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a common question', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n      { question: 'Ask a question customers have first', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do or where to go next.' },\n    ],\n    more: { label: 'Link to all the answers', href: '#help' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/faq-centered/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/faq-centered/index.tsx",
      "content": "import { useId } from 'react';\nimport { ArrowRight } from 'lucide-react';\nimport { Text, withHeadingLevel } from '../../editing';\nimport { safeHref } from '../../ui/button';\nimport { linkClass } from '../../ui/text-link';\nimport { Container, Section, useEditing } from '../_shared/kit';\nimport { Heading, useHeadingId } from '../_shared/c-proof-kit';\nimport { Accordion } from '../_shared/e-faq-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 FaqCentered({ props }: BlockProps<Props>) {\n  const group = useId(); // one open answer at a time\n  const id = useHeadingId(props.title);\n  const editing = useEditing();\n  return (\n    <Section labelledBy={id}>\n      <Container width=\"narrow\">\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} align=\"center\" />\n        <div className=\"mt-12 space-y-3\">\n          {props.items.map((item, i) => (\n            <Accordion key={i} name={group} base={['items', i]} question={item.question} answer={item.answer} icon=\"chevron\" className=\"rounded-kh-lg border border-kh-line bg-kh-surface px-6 shadow-kh-1\" summaryClassName=\"min-h-16\" />\n          ))}\n        </div>\n        {(props.more.label || editing) && (\n          <p className=\"mt-10 text-center\">\n            <a href={safeHref(props.more.href)} className={cn(linkClass(), 'inline-flex min-h-11 items-center gap-2 text-kh-small font-medium no-underline')}>\n              <Text path={['more', 'label']} value={props.more.label} as=\"span\" placeholder=\"Label\" />\n              <ArrowRight aria-hidden className=\"size-4\" />\n            </a>\n          </p>\n        )}\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(FaqCentered);\n"
    }
  ]
}
