{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stepper",
  "type": "registry:ui",
  "title": "Stepper",
  "description": "مراحل یک فرایند؛ مرحلهٔ فعلی با aria-current=\"step\" و وضعیت هر مرحله برای صفحه‌خوان",
  "dependencies": [
    "@kashi-ui/persian@^1.8.0"
  ],
  "registryDependencies": [
    "https://kashi.sepantapouya.com/r/cx.json",
    "https://kashi.sepantapouya.com/r/kashi-provider.json"
  ],
  "files": [
    {
      "path": "registry/kashi/Stepper.tsx",
      "type": "registry:ui",
      "target": "components/kashi/Stepper.tsx",
      "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { toFaDigits } from \"@kashi-ui/persian\";\nimport { cx } from \"./cx\";\nimport { useKashi } from \"./KashiProvider\";\n\nexport interface Step { title: ReactNode; description?: ReactNode }\n\nexport interface StepperProps {\n  steps: Step[];\n  /** شمارهٔ مرحلهٔ فعلی از صفر */\n  current: number;\n  orientation?: \"horizontal\" | \"vertical\";\n  /** @default \"مراحل\" */\n  label?: string;\n  labels?: { complete?: string; current?: string };\n  className?: string;\n}\n\nconst Check = () => (\n  <svg viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.2} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\"><path d=\"m5 10.5 3.2 3L15 7\" /></svg>\n);\n\n/** مراحل یک فرایند؛ مرحلهٔ فعلی با aria-current=\"step\" و وضعیت هر مرحله برای صفحه‌خوان */\nexport function Stepper({ steps, current, orientation = \"horizontal\", label, labels = {}, className }: StepperProps) {\n  const { messages: M, n } = useKashi();\n  label ??= M.stepper.label;\n  const { complete = M.stepper.complete, current: currentLabel = M.stepper.current } = labels;\n  return (\n    <ol className={cx(\"k-steps\", orientation === \"vertical\" && \"k-steps--vertical\", className)} aria-label={label}>\n      {steps.map((s, i) => {\n        const status = i < current ? \"complete\" : i === current ? \"current\" : \"upcoming\";\n        return (\n          <li key={i} className=\"k-steps__step\" data-status={status} aria-current={status === \"current\" ? \"step\" : undefined}>\n            <span className=\"k-steps__marker\" aria-hidden=\"true\">{status === \"complete\" ? <Check /> : n(i + 1)}</span>\n            <span className=\"k-steps__title\">\n              {s.title}\n              {status !== \"upcoming\" && <span className=\"k-sr-only\">{`${M.common.list}${status === \"complete\" ? complete : currentLabel}`}</span>}\n            </span>\n            {s.description && <span className=\"k-steps__description\">{s.description}</span>}\n          </li>\n        );\n      })}\n    </ol>\n  );\n}\n"
    }
  ]
}