{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faq-numbered-cards",
  "type": "registry:block",
  "title": "FAQ, numbered cards",
  "description": "A left-aligned header over a hairline, then every question and answer open in its own numbered, bordered card, three to a row on wide containers and one on a phone, and an action row under a second hairline.",
  "categories": [
    "faq"
  ],
  "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/faq-numbered-cards/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/faq-numbered-cards/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst action = link.extend({ label: t(40).default(''), href: t(300).default('') });\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  /** Each card is numbered 01, 02 and so on in order. */\n  items: z.array(z.object({ question: t(120), answer: t(300) })).min(2).max(9),\n  /** The action row under the cards. An empty label is not drawn; with all three empty the row and its rule go. */\n  primary: action.optional(),\n  secondary: action.optional(),\n  more: action.optional(),\n  /** A lighter look: the heading at regular weight and tighter cards. */\n  compact: z.boolean().optional(),\n});\n\nexport const spec = defineSpec({\n  type: 'faq-numbered-cards',\n  aliases: ['faq/numbered-cards'],\n  sourceRuns: ['rmwj04zuzc66391', 'rmwj0ua7k238ec6'],\n  name: 'FAQ, numbered cards',\n  category: 'faq',\n  role: 'body',\n  description: 'A left-aligned header over a hairline, then every question and answer open in its own numbered, bordered card, three to a row on wide containers and one on a phone, and an action row under a second hairline.',\n  schema,\n  defaults: {\n    eyebrow: 'Section name',\n    title: 'Say what the answers cover',\n    description: 'Say what to do if the answer is not here, and how soon someone 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 next.' },\n      { question: 'Ask a question a customer would ask', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do next.' },\n      { question: 'Ask a question a customer would ask', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do next.' },\n      { question: 'Ask a question a customer would ask', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do next.' },\n      { question: 'Ask a question customers have', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do next.' },\n      { question: 'Ask a question customers have', answer: 'Answer in one or two plain sentences, with the key fact first, then what to do next.' },\n    ],\n    primary: { label: 'Main action', href: '/signup' },\n    secondary: { label: 'Second action', href: '/contact' },\n    more: { label: 'Read more', href: '/help' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/faq-numbered-cards/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/faq-numbered-cards/index.tsx",
      "content": "import { Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Container, Section, useEditing } from '../_shared/kit';\nimport { Heading, 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\nfunction FaqNumberedCards({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const editing = useEditing();\n  const actions = [props.primary, props.secondary, props.more].some((a) => a?.label) || editing;\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} light={props.compact} />\n        <ul className=\"mt-10 grid gap-6 border-t border-kh-line pt-10 @3xl:grid-cols-3\">\n          {props.items.map((item, i) => (\n            <li key={i} className={`flex flex-col rounded-kh-lg border border-kh-line bg-kh-surface ${props.compact ? 'p-5' : 'p-6'} shadow-kh-1`}>\n              <span aria-hidden className=\"inline-flex size-10 items-center justify-center rounded-kh-pill bg-kh-accent-soft font-kh-mono text-kh-caption text-kh-accent-ink\">\n                {String(i + 1).padStart(2, '0')}\n              </span>\n              <Text path={['items', i, 'question']} value={item.question} as=\"h3\" className={props.compact ? 'mt-4 text-kh-heading' : 'mt-5 text-kh-heading'} />\n              <Text path={['items', i, 'answer']} value={item.answer} as=\"p\" multiline className={props.compact ? 'mt-2 text-kh-body text-kh-muted' : 'mt-3 text-kh-body text-kh-muted'} />\n            </li>\n          ))}\n        </ul>\n        {actions && (\n          <div className=\"mt-10 flex flex-col items-start gap-3 border-t border-kh-line pt-10 @md:flex-row @md:items-center\">\n            {props.primary && <ActionLink path={['primary']} value={props.primary} />}\n            {props.secondary && <ActionLink path={['secondary']} value={props.secondary} variant=\"secondary\" />}\n            {props.more && <ActionLink path={['more']} value={props.more} variant=\"ghost\" />}\n          </div>\n        )}\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(FaqNumberedCards);\n"
    }
  ]
}
