{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stats-figures-inline",
  "type": "registry:block",
  "title": "Stats, figures inline",
  "description": "A dark band with a large heading and a small note, then item names in large italic display type flowing inline like a sentence, each followed by a small figure; on a phone the names wrap onto their own lines.",
  "categories": [
    "stats"
  ],
  "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/stats-figures-inline/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/stats-figures-inline/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, t } from '../_shared/schema';\n\nconst item = z.object({\n  name: t(40),\n  figure: t(16),\n});\n\nconst schema = z.object({\n  title: t(80),\n  description: t(200),\n  /** A list is an array field, never a slot. */\n  items: z.array(item).min(2).max(12),\n});\n\nexport const spec = defineSpec({\n  type: 'stats-figures-inline',\n  aliases: ['stats/figures-inline'],\n  name: 'Stats, figures inline',\n  category: 'stats',\n  role: 'body',\n  description: 'A dark band with a large heading and a small note, then item names in large italic display type flowing inline like a sentence, each followed by a small figure; on a phone the names wrap onto their own lines.',\n  schema,\n  defaults: {\n    title: 'Say what the figures below measure',\n    description: 'Say in one sentence what the figure beside each name means and over what period.',\n    items: [\n      { name: 'Name the first item', figure: 'Its share' },\n      { name: 'Name the second item', figure: 'Its share' },\n      { name: 'Name the third item', figure: 'Its share' },\n      { name: 'Name the fourth item', figure: 'Its share' },\n    ],\n  },\n});\n"
    },
    {
      "path": "src/blocks/stats-figures-inline/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/stats-figures-inline/index.tsx",
      "content": "import { Text, withHeadingLevel } from '../../editing';\nimport { 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\nfunction StatsFiguresInline({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  return (\n    <Section labelledBy={id} className=\"bg-kh-ink text-kh-on-ink\">\n      <div className=\"mx-auto w-full max-w-[75rem] px-kh-gutter\">\n        <div id={id}>\n          <Text path={['title']} value={props.title} as=\"h2\" className=\"font-kh-display text-kh-display font-normal leading-[1.05] tracking-tight\" />\n        </div>\n        <Text path={['description']} value={props.description} as=\"p\" multiline className=\"mt-5 max-w-[26rem] text-kh-small opacity-70\" />\n        <ul className=\"mt-16 flex flex-wrap items-baseline gap-x-14 gap-y-6\">\n          {props.items.map((it, i) => (\n            <li key={i} className=\"flex items-baseline gap-2.5\">\n              <Text path={['items', i, 'name']} value={it.name} as=\"span\" className=\"font-kh-display text-[length:var(--kh-text-heading)] italic leading-tight @4xl:text-[2.5rem]\" />\n              <Text path={['items', i, 'figure']} value={it.figure} as=\"span\" className=\"text-kh-caption opacity-70\" />\n            </li>\n          ))}\n        </ul>\n      </div>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(StatsFiguresInline);\n"
    }
  ]
}
