{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress",
  "title": "Progress",
  "description": "Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.",
  "dependencies": [
    "radix-ui"
  ],
  "registryDependencies": [
    "https://blok.sitecore.com/r/theme.json"
  ],
  "files": [
    {
      "path": "src/components/ui/progress.tsx",
      "content": "\"use client\";\n\nimport { Progress as ProgressPrimitive } from \"radix-ui\";\nimport { useEffect } from \"react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst PROGRESS_STYLE_ID = \"progress-indeterminate-styles\";\n\n//  bar is 50% width, slides from left -40% to 100%\nconst indeterminateKeyframes = `@keyframes progressIndeterminate{0%{left:-40%}100%{left:100%}}`;\n\nfunction useProgressStyles(needed: boolean | undefined) {\n  useEffect(() => {\n    if (!needed || document.getElementById(PROGRESS_STYLE_ID)) return;\n    const style = document.createElement(\"style\");\n    style.id = PROGRESS_STYLE_ID;\n    style.textContent = indeterminateKeyframes;\n    document.head.appendChild(style);\n  }, [needed]);\n}\n\ninterface ProgressProps\n  extends React.ComponentProps<typeof ProgressPrimitive.Root> {\n  variant?: \"default\" | \"indeterminate\";\n  isIndeterminate?: boolean;\n}\n\nfunction Progress({\n  className,\n  value,\n  variant,\n  isIndeterminate,\n  ...props\n}: ProgressProps) {\n  const indeterminate = variant === \"indeterminate\" || isIndeterminate;\n  useProgressStyles(indeterminate);\n\n  return (\n    <ProgressPrimitive.Root\n      data-slot=\"progress\"\n      data-indeterminate={indeterminate ? \"\" : undefined}\n      aria-label={indeterminate ? \"Progress\" : `Progress: ${value ?? 0}%`}\n      className={cn(\n        \"relative h-2 w-full overflow-hidden rounded-full bg-neutral-bg\",\n        className,\n      )}\n      {...props}\n    >\n      <ProgressPrimitive.Indicator\n        data-slot=\"progress-indicator\"\n        className={cn(\n          \"h-full rounded-full transition-all\",\n          indeterminate\n            ? \"absolute min-w-[50%] w-[50%] bg-primary\"\n            : \"flex-1 w-full bg-primary\",\n        )}\n        style={\n          indeterminate\n            ? { animation: \"progressIndeterminate 1.5s ease infinite\" }\n            : { transform: `translateX(-${100 - (value ?? 0)}%)` }\n        }\n      />\n    </ProgressPrimitive.Root>\n  );\n}\n\nexport { Progress, type ProgressProps };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}