{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "navigation",
  "status": "alpha",
  "import": "@senvenli/react/navigation",
  "name": "stepper",
  "title": "Stepper",
  "exports": [
    "Stepper"
  ],
  "description": "Shows progress through a multi-step flow or checklist, with done, current, waiting and failed steps.",
  "keywords": [
    "stepper",
    "steps",
    "wizard",
    "progress",
    "onboarding"
  ],
  "usage": {
    "when": [
      "A flow of three or more steps: checkout, signup, setup."
    ],
    "instead": [
      {
        "use": "progress",
        "when": "Only the share done matters, not named steps."
      },
      {
        "use": "tabs",
        "when": "People move freely between views in any order."
      },
      {
        "use": "timeline",
        "when": "The steps are past events."
      }
    ]
  },
  "a11y": {
    "builtIn": [
      "The current step has aria-current; the list is named with the overall progress."
    ],
    "youProvide": [
      "Short step names."
    ]
  },
  "related": [
    "progress"
  ],
  "genui": {
    "expose": true,
    "description": "Steps of a flow. steps are {id, label, description?}; currentStep is the id of the step in progress.",
    "props": [
      "steps",
      "currentStep",
      "orientation"
    ],
    "children": "none",
    "schema": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "isDone": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "needs-you",
                  "with-provider",
                  "failed"
                ]
              },
              "statusText": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label"
            ]
          },
          "description": "Three to six steps, in order."
        },
        "currentStep": {
          "type": "string",
          "description": "The step the reader is on: `aria-current=\"step\"`. Ignored with `isComplete`."
        },
        "orientation": {
          "type": "string",
          "enum": [
            "horizontal",
            "vertical"
          ],
          "description": "`horizontal` for a flow on one page (checkout, signup); `vertical` for checklists (onboarding, setup)."
        }
      },
      "required": [
        "steps",
        "currentStep"
      ]
    }
  },
  "source": [
    "src/navigation/stepper.tsx"
  ],
  "props": {
    "Stepper": [
      {
        "name": "steps",
        "type": "readonly StepperStep[]",
        "required": true,
        "origin": "own",
        "description": "Three to six steps, in order.",
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "isDone": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "needs-you",
                  "with-provider",
                  "failed"
                ]
              },
              "statusText": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label"
            ]
          }
        }
      },
      {
        "name": "currentStep",
        "type": "string",
        "required": true,
        "origin": "own",
        "description": "The step the reader is on: `aria-current=\"step\"`. Ignored with `isComplete`.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "isComplete",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "The flow is finished: every step shows its done state and none is current, so no step\ncarries `aria-current`. The list is named with the overall state (\"Progress, All steps done\"),\nand the narrow one-line form reads \"All steps done\" over a full bar. A step's `status` or\n`statusText` still speaks for it, in the list and, under the done line, in the narrow form\ntoo (\"Domain · With us\"). A finished flow cannot also have a `failed` or `needs-you` step: that\npairing contradicts itself and warns in development; settle the step first. Left out, nothing changes.",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "onStepPress",
        "type": "(id: string) => void",
        "required": false,
        "origin": "own",
        "description": "Makes done steps pressable (back to an earlier step). Leave it out where the flow cannot go back."
      },
      {
        "name": "orientation",
        "type": "\"horizontal\" | \"vertical\"",
        "required": false,
        "origin": "own",
        "description": "`horizontal` for a flow on one page (checkout, signup); `vertical` for checklists (onboarding, setup).",
        "schema": {
          "type": "string",
          "enum": [
            "horizontal",
            "vertical"
          ]
        }
      },
      {
        "name": "showStatus",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "Done and current steps say so in words too (\"Done\", \"Now\"), as on a journey across pages. On by default when\nany step has a `status`.",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "aria-label",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "Names the list; \"Progress\" by default.",
        "schema": {
          "type": "string"
        }
      }
    ]
  },
  "tokens": [
    "ds-background-brand-bold",
    "ds-background-danger-bold",
    "ds-background-information-bold",
    "ds-background-neutral-pressed",
    "ds-background-warning-bold",
    "ds-border",
    "ds-border-bold",
    "ds-border-focused",
    "ds-border-selected",
    "ds-radius-full",
    "ds-radius-small",
    "ds-space-050",
    "ds-space-100",
    "ds-space-150",
    "ds-space-200",
    "ds-surface-raised",
    "ds-text",
    "ds-text-danger",
    "ds-text-information",
    "ds-text-on-bold",
    "ds-text-on-brand",
    "ds-text-on-danger",
    "ds-text-on-warning",
    "ds-text-subtle",
    "ds-text-subtlest",
    "ds-text-warning"
  ],
  "strings": [
    "progressSteps",
    "stepDone",
    "stepFailed",
    "stepN",
    "stepNOf",
    "stepNeedsYou",
    "stepNow",
    "stepWithProvider",
    "stepsAllDone"
  ],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
