{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spinner",
  "type": "registry:ui",
  "title": "Spinner",
  "description": "Eight-segment radial spinner for indeterminate loading that inherits the current text color.",
  "dependencies": [],
  "registryDependencies": [
    "https://kuro.abstergo.fyi/r/kura-theme.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/kura/spinner/index.ts",
      "type": "registry:ui",
      "target": "components/kura/spinner/index.ts",
      "content": "export { Spinner, type SpinnerProps } from \"./spinner\";\n"
    },
    {
      "path": "registry/kura/spinner/spinner.tsx",
      "type": "registry:ui",
      "target": "components/kura/spinner/spinner.tsx",
      "content": "import type * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface SpinnerProps extends Omit<React.ComponentProps<\"span\">, \"children\"> {\n  /** Visual size. `sm` 12px, `md` 16px, `lg` 20px. */\n  size?: \"sm\" | \"md\" | \"lg\";\n  /** Accessible label announced to screen readers. Pass `null` when a parent already announces loading. */\n  label?: string | null;\n}\n\nconst sizes = { sm: \"size-3\", md: \"size-4\", lg: \"size-5\" } as const;\n\nconst SEGMENTS = 8;\n\n/**\n * Eight-segment radial spinner. Inherits `currentColor`. Under reduced motion it pulses instead\n * of rotating.\n */\nexport function Spinner({ size = \"md\", label = \"Loading\", className, ...props }: SpinnerProps) {\n  return (\n    <span\n      data-slot=\"spinner\"\n      role={label ? \"status\" : undefined}\n      aria-hidden={label ? undefined : true}\n      className={cn(\"relative inline-flex shrink-0 text-current\", sizes[size], className)}\n      {...props}\n    >\n      {label && <span className=\"sr-only\">{label}</span>}\n      <span\n        aria-hidden\n        className=\"absolute inset-0 animate-kura-spin [animation-timing-function:steps(8)] motion-reduce:animate-kura-pulse\"\n      >\n        {Array.from({ length: SEGMENTS }, (_, i) => (\n          <span\n            key={i}\n            className=\"absolute top-0 left-[calc(50%-0.75px)] h-full w-[1.5px]\"\n            style={{ transform: `rotate(${(i * 360) / SEGMENTS}deg)` }}\n          >\n            <span\n              className=\"block h-[30%] w-full rounded-full bg-current\"\n              style={{ opacity: 0.15 + (0.85 * (i + 1)) / SEGMENTS }}\n            />\n          </span>\n        ))}\n      </span>\n    </span>\n  );\n}\n"
    }
  ],
  "categories": [
    "primitives",
    "loading",
    "spinner",
    "busy",
    "progress"
  ],
  "docs": "Docs: https://kuro.abstergo.fyi/components/spinner · Markdown for agents: https://kuro.abstergo.fyi/components/spinner.md",
  "meta": {
    "kura": {
      "status": "stable",
      "whenToUse": [
        "Indeterminate waits on a control: a loading button, a pending row, a fetching list.",
        "Small inline busy indicators next to text."
      ],
      "whenNotToUse": [
        "AI ‘thinking’ states — use shimmer-text or thinking-indicator; they read as the model working, not the network.",
        "Known progress — use a progress bar or context-meter.",
        "Inside a Button — pass `loading` to button instead."
      ]
    }
  }
}
