{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bars-spinner",
  "title": "Bars Spinner",
  "description": "Twelve bars around a hub fading in turn, announced as Loading. No JavaScript.",
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/bars-spinner.tsx",
      "content": "import type { ComponentProps, CSSProperties } from \"react\";\n\nimport { cn } from \"@/registry/default/lib/utils\";\n\nconst BARS = Array.from({ length: 12 }, (_, index) => index);\n\ninterface BarsSpinnerProps extends ComponentProps<\"span\"> {\n  /** Width and height, as a CSS length or a number of px. Or size it with a `size-*` class. */\n  size?: number | string;\n}\n\n/**\n * Twelve bars around a hub, fading one after another. It takes the current\n * text colour and is announced as \"Loading\"; pass a more specific\n * `aria-label` when you can (\"Syncing charts\"). With `prefers-reduced-motion`\n * it turns at half speed rather than stopping, since it reports progress.\n * No JavaScript: it works in server components.\n */\nfunction BarsSpinner({ size, className, style, ...props }: BarsSpinnerProps) {\n  return (\n    <span\n      role=\"status\"\n      aria-label=\"Loading\"\n      data-slot=\"bars-spinner\"\n      className={cn(\n        \"relative inline-block size-4 shrink-0 [--bars-spinner-period:1s] motion-reduce:[--bars-spinner-period:2s]\",\n        className\n      )}\n      style={{ ...(size === undefined ? null : { width: size, height: size }), ...style }}\n      {...props}\n    >\n      {BARS.map((index) => (\n        <span\n          key={index}\n          aria-hidden=\"true\"\n          className=\"animate-bars-spinner absolute top-[45.5%] left-[37%] h-[9%] w-[26%] rounded-full bg-current\"\n          style={\n            {\n              transform: `rotate(${index * 30}deg) translate(140%)`,\n              animationDuration: \"var(--bars-spinner-period)\",\n              // Negative delays start every bar part-way through, so the wheel turns from the first frame.\n              animationDelay: `calc(var(--bars-spinner-period) * ${(index - 12) / 12})`,\n            } as CSSProperties\n          }\n        />\n      ))}\n    </span>\n  );\n}\n\nexport { BarsSpinner, type BarsSpinnerProps };\n",
      "type": "registry:ui"
    }
  ],
  "tailwind": {
    "config": {
      "theme": {
        "extend": {
          "keyframes": {
            "bars-spinner": {
              "0%": {
                "opacity": "1"
              },
              "100%": {
                "opacity": "0.2"
              }
            }
          },
          "animation": {
            "bars-spinner": "bars-spinner 1s linear infinite"
          }
        }
      }
    }
  },
  "cssVars": {
    "theme": {
      "animate-bars-spinner": "bars-spinner 1s linear infinite"
    }
  },
  "css": {
    "@keyframes bars-spinner": {
      "0%": {
        "opacity": "1"
      },
      "100%": {
        "opacity": "0.2"
      }
    }
  },
  "type": "registry:ui"
}