{
  "$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/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/stepper.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// StepperProps are the props of Stepper; the values are the JSON shapes of the TypeScript props.\ntype StepperProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tSteps any `json:\"steps\"`\n\tCurrent any `json:\"current\"`\n\tStepLabel any `json:\"stepLabel\"`\n\tBack any `json:\"back\"`\n\tNext any `json:\"next\"`\n\tLayout any `json:\"layout\"`\n\tMarker any `json:\"marker\"`\n\tSummary any `json:\"summary\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A multi-step form header: the steps with the current one marked (aria-current step), and the current step's text with back and next buttons. Axes: layout (horizontal, vertical), marker (number, icon), summary (show, hide).\ntempl Stepper(p StepperProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vSteps := p.Steps }}\n\t{{ vCurrent := uiutils.Def(p.Current, float64(2)) }}\n\t{{ vStepLabel := p.StepLabel }}\n\t{{ vBack := p.Back }}\n\t{{ vNext := p.Next }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"horizontal\") }}\n\t{{ vMarker := uiutils.Def(p.Marker, \"number\") }}\n\t{{ vSummary := uiutils.Def(p.Summary, \"show\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Measure: \"3xl\", LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Gt(uiutils.Len(vSteps), float64(0)) {\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"6\", Align: \"stretch\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"stepper\")}}) {\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Tpl(vStepLabel, vCurrent, uiutils.Len(vSteps))) }\n\t\t\t\t}\n\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ol\", Class: uiutils.S(uiutils.Cnv(\"m-0 flex list-none gap-4 p-0\", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"vertical\")), \"flex-col\", \"flex-col sm:flex-row\"))), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\tfor vI, vS := range uiutils.L(vSteps) {\n\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex flex-1 items-center gap-4\", Attrs: uiutils.Attrs(\"aria-current\", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Add(float64(vI), float64(1)), vCurrent)), \"step\", nil), \"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@compose.IconBadge(compose.IconBadgeProps{Variant: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Lt(uiutils.Add(float64(vI), float64(1)), uiutils.Add(vCurrent, float64(1)))), \"primary\", \"outline\")), Size: \"sm\", TextProps: text.TextProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Lt(uiutils.Add(float64(vI), float64(1)), uiutils.Add(vCurrent, float64(1)))), \"text-sm\", \"text-sm text-muted-foreground\"))}}) {\n\t\t\t\t\t\t\t\tif uiutils.Eq(vMarker, \"icon\") {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vS, \"icon\")), Size: 16})\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-sm font-bold\"}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Str(uiutils.Add(float64(vI), float64(1)))) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Add(float64(vI), float64(1)), vCurrent)), \"bold\", \"semibold\")), TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"title\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif uiutils.Eq(vSummary, \"show\") {\n\t\t\t\t\tfor vI, vS := range uiutils.L(vSteps) {\n\t\t\t\t\t\tif uiutils.Eq(uiutils.Add(float64(vI), float64(1)), vCurrent) {\n\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{Class: \"rounded bg-card p-6 inset-ring inset-ring-border\", Attrs: uiutils.Attrs(\"data-slot\", \"step-summary\")}}) {\n\t\t\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"xl\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"title\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"text\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", BoxProps: box.BoxProps{Class: \"pt-2\"}}) {\n\t\t\t\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"sm\", ButtonProps: button.ButtonProps{Type: \"button\"}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(vBack) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"sm\", ButtonProps: button.ButtonProps{Type: \"button\"}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(vNext) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/stepper.templ",
      "target": "blocks/stepper.templ"
    }
  ],
  "meta": {
    "category": "onboarding",
    "group": "setup",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "stepper",
  "registryDependencies": [
    "button",
    "group",
    "icon-badge",
    "inline",
    "kit-box",
    "kit-button",
    "kit-text",
    "list",
    "list-item",
    "lucide-icon",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Stepper",
  "type": "registry:block"
}
