{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "spinner",
  "type": "registry:ui",
  "title": "Spinner",
  "description": "A loading indicator. It keeps turning (slower) with motion off, since it carries meaning.",
  "dependencies": [
    "tailwind-variants@^1.0.0"
  ],
  "registryDependencies": [
    "https://junco.madebytobi.com/r/junco-theme.json",
    "https://junco.madebytobi.com/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/junco/ui/spinner.tsx",
      "type": "registry:ui",
      "content": "import * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\n\nexport const spinnerVariants = tv({\n  base: \"inline-block shrink-0 animate-spinner rounded-pill border-current border-r-transparent\",\n  variants: {\n    size: {\n      sm: \"size-3 border-[1.5px]\",\n      md: \"size-4 border-2\",\n      lg: \"size-6 border-[2.5px]\",\n    },\n  },\n  defaultVariants: { size: \"md\" },\n});\n\nexport interface SpinnerProps\n  extends Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">,\n    VariantProps<typeof spinnerVariants> {\n  /** Read by screen readers. Pass `null` when something nearby already announces the loading state. */\n  label?: string | null;\n}\n\n/** A loading indicator. It keeps turning (slower) with motion off, since it carries meaning. */\nexport const Spinner = React.forwardRef<HTMLSpanElement, SpinnerProps>(\n  ({ className, size, label = \"Loading\", ...props }, ref) => (\n    <span\n      ref={ref}\n      role={label ? \"status\" : undefined}\n      aria-label={label ?? undefined}\n      aria-hidden={label ? undefined : true}\n      className={cn(spinnerVariants({ size }), className)}\n      {...props}\n    />\n  ),\n);\nSpinner.displayName = \"Spinner\";\n"
    }
  ],
  "docs": "Docs and examples: https://junco.madebytobi.com/docs/components/spinner",
  "meta": {
    "hash": "02ff33f0a547b5ee",
    "source": "packages/react/src/components/spinner.tsx",
    "exports": [
      "spinnerVariants",
      "SpinnerProps",
      "Spinner"
    ],
    "props": {
      "Spinner": {
        "extends": "Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">, VariantProps<typeof spinnerVariants>",
        "props": [
          {
            "name": "label",
            "optional": true,
            "type": "string | null",
            "description": "Read by screen readers. Pass `null` when something nearby already announces the loading state."
          }
        ]
      }
    },
    "variants": {
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ]
      },
      "defaultVariants": {
        "size": "md"
      }
    },
    "docsUrl": "https://junco.madebytobi.com/docs/components/spinner"
  }
}
