{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "retro-progress",
  "title": "RetroProgress",
  "description": "A Mac OS 9 styled progress bar with inset bevel track and candy-stripe azul fill pattern.",
  "registryDependencies": [
    "https://nostalgia-ui.com/r/nostalgia-theme.json"
  ],
  "files": [
    {
      "path": "registry/new-york/ui/retro-progress.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface RetroProgressProps extends React.ComponentProps<\"div\"> {\n  /** Progress value from 0 to 100. Clamped to [0, 100]. */\n  value?: number\n  /** If true, shows an animated indeterminate state. */\n  indeterminate?: boolean\n}\n\nfunction RetroProgress(\n  { className, value = 0, indeterminate = false, ...props }: RetroProgressProps,\n  ref: React.ForwardedRef<HTMLDivElement>\n) {\n  const clampedValue = Math.min(100, Math.max(0, value))\n\n  return (\n    <div\n      ref={ref}\n      role=\"progressbar\"\n      aria-valuenow={indeterminate ? undefined : clampedValue}\n      aria-valuemin={0}\n      aria-valuemax={100}\n      className={cn(\n        \"relative h-[16px] w-full\",\n        // Inset bevel track: black border, inner shadow for depth\n        \"border border-os9-black\",\n        \"shadow-[inset_1px_1px_0_var(--os9-gray-700),inset_-1px_-1px_0_var(--os9-white)]\",\n        \"bg-os9-gray-500\",\n        \"overflow-hidden\",\n        className\n      )}\n      {...props}\n    >\n      {/* Fill bar */}\n      <div\n        className={cn(\n          \"absolute inset-y-[1px] left-[1px]\",\n          \"transition-none\",\n          indeterminate && \"retro-progress-indeterminate\"\n        )}\n        style={{\n          width: indeterminate\n            ? \"calc(100% - 2px)\"\n            : clampedValue === 0\n              ? 0\n              : `calc(${clampedValue}% - 2px)`,\n          // Candy-stripe diagonal pattern:\n          // Alternating azul (#333399) and a slightly lighter azul (#4c4cb2)\n          // with a horizontal banding overlay for the OS9 3D gradient effect\n          background: `\n            repeating-linear-gradient(\n              45deg,\n              var(--os9-azul),\n              var(--os9-azul) 2px,\n              #4c4cb2 2px,\n              #4c4cb2 4px\n            )\n          `,\n          backgroundSize: indeterminate ? \"28px 28px\" : undefined,\n          // Inner bevel on the fill for 3D depth matching the Figma gradient\n          boxShadow: clampedValue > 0 || indeterminate\n            ? \"inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -1px 0 rgba(0,0,0,0.25)\"\n            : \"none\",\n        }}\n      />\n      {/*\n        Keyframe animation for the indeterminate stripe movement (kept inline\n        so the component stays self-contained). React 19 hoists this <style>\n        into <head> and dedupes it by `href`.\n      */}\n      {indeterminate && (\n        <style href=\"retro-progress\" precedence=\"default\">{`\n          @keyframes retro-progress-stripe {\n            from { background-position: 0 0; }\n            to { background-position: 28px 0; }\n          }\n          .retro-progress-indeterminate {\n            animation: retro-progress-stripe 0.6s linear infinite;\n          }\n          @media (prefers-reduced-motion: reduce) {\n            .retro-progress-indeterminate { animation: none; }\n          }\n        `}</style>\n      )}\n    </div>\n  )\n}\n\nconst ForwardedRetroProgress = React.forwardRef(RetroProgress)\nForwardedRetroProgress.displayName = \"RetroProgress\"\n\nexport { ForwardedRetroProgress as RetroProgress }\nexport type { RetroProgressProps }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}