{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "steps-horizontal",
  "type": "registry:block",
  "title": "Steps, horizontal",
  "description": "Three to five steps in a single row, on one continuous line with a marker on each. In narrow containers the same line runs down the left as a vertical list. Short steps only; use the timeline for long ones.",
  "categories": [
    "steps"
  ],
  "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",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/steps-horizontal/spec.ts",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/steps-horizontal/spec.ts",
      "content": "import { z } from 'zod';\nimport { defineSpec, link, t } from '../_shared/schema';\n\nconst schema = z.object({\n  eyebrow: t(60),\n  title: t(120),\n  description: t(300),\n  steps: z.array(z.object({ label: t(30), title: t(80), description: t(240) })).min(3).max(5),\n  cta: link,\n});\n\nexport const spec = defineSpec({\n  type: 'steps-horizontal',\n  aliases: ['steps/horizontal'],\n  name: 'Steps, horizontal',\n  category: 'steps',\n  role: 'body',\n  description: 'Three to five steps in a single row, on one continuous line with a marker on each. In narrow containers the same line runs down the left as a vertical list. Short steps only; use the timeline for long ones.',\n  schema,\n  defaults: {\n    eyebrow: 'Name the section',\n    title: 'Say what the reader ends up with, and in how many steps',\n    description: 'Say in one line what the reader does not need.',\n    steps: [\n      { label: 'Step one', title: 'Name the first step', description: 'Say what the reader does in the first step and what to have ready.' },\n      { label: 'Step two', title: 'Name the second step', description: 'Say what the reader does in the second step and what it saves them.' },\n      { label: 'Step three', title: 'Name the third step', description: 'Say what the reader does in the third step and where it ends up.' },\n      { label: 'Step four', title: 'Name the fourth step', description: 'Say what the reader gets once the last step is done.' },\n    ],\n    cta: { label: 'Main action', href: '/signup' },\n  },\n});\n"
    },
    {
      "path": "src/blocks/steps-horizontal/index.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/blocks/steps-horizontal/index.tsx",
      "content": "import { Text, withHeadingLevel } from '../../editing';\nimport { ActionLink, Container, Opt, Section, useEditing } from '../_shared/kit';\nimport { cn } from '../../lib/utils';\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\n// One continuous rule: the list's left border (stacked) or top border (row), with a marker per step sitting on it.\n// Class strings are written out per count so Tailwind sees them; the row starts at the width where the steps fit.\nconst LAYOUT = {\n  3: {\n    ol: '@3xl:grid-cols-3 @3xl:gap-x-8 @3xl:border-l-0 @3xl:border-t @3xl:pl-0',\n    li: '@3xl:pt-8',\n    dot: '@3xl:-top-[5px] @3xl:-left-px',\n  },\n  4: {\n    ol: '@4xl:grid-cols-4 @4xl:gap-x-8 @4xl:border-l-0 @4xl:border-t @4xl:pl-0',\n    li: '@4xl:pt-8',\n    dot: '@4xl:-top-[5px] @4xl:-left-px',\n  },\n  5: {\n    ol: '@5xl:grid-cols-5 @5xl:gap-x-8 @5xl:border-l-0 @5xl:border-t @5xl:pl-0',\n    li: '@5xl:pt-8',\n    dot: '@5xl:-top-[5px] @5xl:-left-px',\n  },\n} as const;\n\nfunction StepsHorizontal({ props }: BlockProps<Props>) {\n  const id = useHeadingId(props.title);\n  const editing = useEditing();\n  const n = Math.min(5, Math.max(3, props.steps.length)) as 3 | 4 | 5;\n  const L = LAYOUT[n];\n  return (\n    <Section labelledBy={id}>\n      <Container>\n        <Heading id={id} eyebrow={props.eyebrow} title={props.title} description={props.description} />\n        <ol className={`mt-14 grid gap-10 border-l border-kh-line-strong pl-8 ${L.ol}`}>\n          {props.steps.map((s, i) => (\n            <li key={i} className={`relative ${L.li}`}>\n              <span aria-hidden className={`absolute -left-[37px] top-1.5 size-[9px] rounded-kh-pill bg-kh-accent ${L.dot}`} />\n              <Opt path={['steps', i, 'label']} value={s.label} className=\"text-kh-small font-medium text-kh-accent-ink\" placeholder=\"Label\" />\n              <Text path={['steps', i, 'title']} value={s.title} as=\"h3\" className={cn((s.label || editing) && 'mt-3', 'text-kh-heading font-semibold')} />\n              <Opt path={['steps', i, 'description']} value={s.description} multiline className=\"mt-2 text-kh-small text-kh-muted\" placeholder=\"Description\" />\n            </li>\n          ))}\n        </ol>\n        <div className=\"mt-12\">\n          <ActionLink path={['cta']} value={props.cta} />\n        </div>\n      </Container>\n    </Section>\n  );\n}\n\nexport default withHeadingLevel(StepsHorizontal);\n"
    }
  ]
}
