{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A multi-step form header with the current step.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * A multi-step form header: the steps with the current one marked (aria-current step), and the current step's\n * text with back and next buttons. Axes: layout (horizontal, vertical), marker (number, icon), summary (show,\n * hide).\n */\nimport { Fragment, type ReactNode } from \"react\";\nimport { Button, Group, IconBadge, Inline, List, ListItem, Stack, Text, Title } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { SectionFrame } from \"../components/section-frame\";\nimport { cn, tpl } from \"../utils\";\nimport type { Step } from \"./steps-list.types\";\n\nexport type StepperProps = {\n  id: string;\n  title: string;\n  steps: Step[];\n  current?: number;\n  stepLabel: string;\n  back: string;\n  next: string;\n  layout?: \"horizontal\" | \"vertical\";\n  marker?: \"number\" | \"icon\";\n  summary?: \"show\" | \"hide\";\n  landmarkLabel?: string;\n};\n\nexport function Stepper({\n  id,\n  title,\n  steps,\n  current = 2,\n  stepLabel,\n  back,\n  next,\n  layout = \"horizontal\",\n  marker = \"number\",\n  summary = \"show\",\n  landmarkLabel,\n}: StepperProps) {\n  return (\n    <SectionFrame id={id} title={title} measure=\"3xl\" landmarkLabel={landmarkLabel}>\n      {((steps?.length ?? 0) > 0) ? (\n        <Stack gap=\"6\" align=\"stretch\" data-slot=\"stepper\">\n          <Text size=\"sm\" className=\"text-muted-foreground\">\n            {tpl(stepLabel, current, (steps?.length ?? 0))}\n          </Text>\n          <List\n            tag=\"ol\"\n            className={cn(\n              \"m-0 flex list-none gap-4 p-0\",\n              (((layout as string) === \"vertical\") ? \"flex-col\" : \"flex-col sm:flex-row\")\n            )}\n            data-slot=\"items\"\n          >\n            {(steps ?? []).map((s, i) => (\n              <ListItem key={s.id}\n                className=\"flex flex-1 items-center gap-4\"\n                aria-current={(((i + 1) === current) ? \"step\" : undefined)}\n                data-slot=\"item\"\n              >\n                <IconBadge\n                  variant={(((i + 1) < (current + 1)) ? \"primary\" : \"outline\")}\n                  size=\"sm\"\n                  className={(((i + 1) < (current + 1)) ? \"text-sm\" : \"text-sm text-muted-foreground\")}\n                >\n                  {((marker as string) === \"icon\") ? (\n                    <LucideIcon name={s.icon} size={16} />\n                  ) : (\n                    <Inline className=\"text-sm font-bold\">\n                      {((i + 1) == null ? undefined : String((i + 1)))}\n                    </Inline>\n                  )}\n                </IconBadge>\n                <Text size=\"sm\" weight={(((i + 1) === current) ? \"bold\" : \"semibold\")}>\n                  {s.title}\n                </Text>\n              </ListItem>\n            ))}\n          </List>\n          {((summary as string) === \"show\") ? (\n            <>\n              {(steps ?? []).map((s, i) => (\n                <Fragment key={s.id}>\n                  {((i + 1) === current) ? (\n                    <Stack gap=\"2\" className=\"rounded bg-card p-6 inset-ring inset-ring-border\" data-slot=\"step-summary\">\n                      <Title as={3} size=\"xl\" weight=\"bold\">\n                        {s.title}\n                      </Title>\n                      <Text size=\"sm\" className=\"text-muted-foreground\">\n                        {s.text}\n                      </Text>\n                      <Group gap=\"2\" className=\"pt-2\">\n                        <Button variant=\"outline\" size=\"sm\" type=\"button\">\n                          {back}\n                        </Button>\n                        <Button variant=\"default\" size=\"sm\" type=\"button\">\n                          {next}\n                        </Button>\n                      </Group>\n                    </Stack>\n                  ) : null}\n                </Fragment>\n              ))}\n            </>\n          ) : null}\n        </Stack>\n      ) : null}\n    </SectionFrame>\n  );\n}\n",
      "path": "blocks/stepper.tsx",
      "target": "blocks/stepper.tsx"
    }
  ],
  "meta": {
    "category": "onboarding",
    "group": "setup",
    "kind": "block",
    "tags": [
      "react",
      "block"
    ]
  },
  "name": "stepper",
  "registryDependencies": [
    "compose",
    "lucide-icon",
    "section-frame",
    "steps-list",
    "utils"
  ],
  "runtime": "react",
  "title": "Stepper",
  "type": "registry:block"
}
