{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spinner",
  "title": "Spinner",
  "description": "A turning ring for pending work, in three sizes; it stays still under reduced motion.",
  "registryDependencies": [
    "https://sproutboat.com/ikada/r/theme.json",
    "https://sproutboat.com/ikada/r/cn.json",
    "https://sproutboat.com/ikada/r/icons.json"
  ],
  "files": [
    {
      "path": "registry/ikada/ui/spinner.tsx",
      "content": "\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { SpinnerIcon } from \"@/components/ikada/lib/icons\";\nimport { tv } from \"@/components/ikada/lib/cn\";\nimport type { VariantProps } from \"@/components/ikada/lib/cn\";\n\nconst spinnerStyles = tv({\n  base: \"inline-flex shrink-0 items-center justify-center text-fg-muted\",\n  variants: { size: { sm: \"[&>svg]:size-3.5\", md: \"[&>svg]:size-4\", lg: \"[&>svg]:size-6\" } },\n  defaultVariants: { size: \"md\" },\n});\n\nexport interface SpinnerProps extends Omit<ComponentProps<\"span\">, \"children\">, VariantProps<typeof spinnerStyles> {\n  /** What is loading. Announced politely; pass `decorative` when the parent already says it. */\n  label?: string;\n  /** Hide from assistive tech (the button or region it sits in is already `aria-busy`). */\n  decorative?: boolean;\n}\n\n/**\n * A turning ring. Under reduced motion it stops turning and pulses (a fade) so it still\n * reads as \"working\", and the label carries the meaning either way.\n */\nexport function Spinner({ size, label = \"Loading\", decorative = false, className, ref, ...props }: SpinnerProps) {\n  return (\n    <span\n      data-slot=\"spinner\"\n      ref={ref}\n      role={decorative ? undefined : \"status\"}\n      aria-hidden={decorative || undefined}\n      className={spinnerStyles({ size, className })}\n      {...props}\n    >\n      <SpinnerIcon className=\"motion-reduce:animate-pulse\" />\n      {decorative ? null : <span className=\"sr-only\">{label}</span>}\n    </span>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/ikada/spinner.tsx"
    }
  ],
  "categories": [
    "feedback"
  ],
  "type": "registry:ui"
}