{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress",
  "title": "Progress",
  "description": "Linear progress bar with theme colors, sizes, striped + animated stripes.",
  "dependencies": ["class-variance-authority"],
  "registryDependencies": ["https://indiacn.in/r/theme.json"],
  "files": [
    {
      "path": "components/ui/progress.tsx",
      "content": "import { cva, type VariantProps } from 'class-variance-authority';\nimport { ComponentProps } from 'react';\n\nimport { cn } from '@/lib/utils';\n\n/*\n * UX4G progress: height 0.5rem, border-radius full (pill), bar bg primary,\n * transition width 0.6s ease. Sizes: xs (2px), sm (4px), md (8px), lg (16px), xl (24px).\n * Striped uses 1rem diagonal gradient with animated variant (progress-bar-stripes 1s linear).\n */\nconst PROGRESS_BAR_VARIANTS = cva('h-full rounded-full transition-all duration-600 ease-in-out', {\n  variants: {\n    theme: {\n      primary: 'bg-primary',\n      secondary: 'bg-secondary',\n      success: 'bg-success',\n      danger: 'bg-danger',\n      warning: 'bg-warning',\n      info: 'bg-info',\n      neutral: 'bg-neutral',\n    },\n    striped: {\n      true: 'bg-[length:1rem_1rem] bg-[linear-gradient(45deg,rgba(255,255,255,.15)_25%,transparent_25%,transparent_50%,rgba(255,255,255,.15)_50%,rgba(255,255,255,.15)_75%,transparent_75%,transparent)]',\n      false: '',\n    },\n    animated: {\n      true: 'animate-[progress-bar-stripes_1s_linear_infinite]',\n      false: '',\n    },\n  },\n  defaultVariants: {\n    theme: 'primary',\n    striped: false,\n    animated: false,\n  },\n});\n\ntype TProgressSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nconst PROGRESS_SIZES: Record<TProgressSize, string> = {\n  xs: 'h-0.5',\n  sm: 'h-1',\n  md: 'h-2',\n  lg: 'h-4',\n  xl: 'h-6',\n};\n\ninterface IProgressProps extends ComponentProps<'div'> {\n  value?: number;\n  max?: number;\n  size?: TProgressSize;\n  height?: string;\n  showLabel?: boolean;\n}\n\ninterface IProgressBarProps\n  extends ComponentProps<'div'>,\n    VariantProps<typeof PROGRESS_BAR_VARIANTS> {\n  value?: number;\n}\n\n/** Progress bar track container. */\nfunction Progress({\n  className,\n  value = 0,\n  max = 100,\n  size = 'md',\n  height,\n  showLabel = false,\n  children,\n  ...props\n}: IProgressProps) {\n  const percentage = Math.min(Math.max((value / max) * 100, 0), 100);\n\n  return (\n    <div\n      role='progressbar'\n      aria-valuenow={value}\n      aria-valuemin={0}\n      aria-valuemax={max}\n      className={cn(\n        'w-full overflow-hidden rounded-full bg-neutral-100',\n        !height && PROGRESS_SIZES[size],\n        className,\n      )}\n      style={height ? { height } : undefined}\n      {...props}\n    >\n      {children ?? (\n        <div\n          className={cn(\n            'bg-primary h-full rounded-full transition-all duration-600 ease-in-out',\n            showLabel &&\n              'text-neutral-0 flex items-center justify-center text-[0.625rem] font-medium',\n          )}\n          style={{ width: `${percentage}%` }}\n        >\n          {showLabel && `${Math.round(percentage)}%`}\n        </div>\n      )}\n    </div>\n  );\n}\n\n/** Individual progress bar segment with theme and animation support. */\nfunction ProgressBar({\n  className,\n  theme,\n  striped,\n  animated,\n  value = 0,\n  children,\n  ...props\n}: IProgressBarProps) {\n  return (\n    <div\n      className={cn(\n        PROGRESS_BAR_VARIANTS({ theme, striped, animated, className }),\n        children && 'text-neutral-0 flex items-center justify-center text-[0.625rem] font-medium',\n      )}\n      style={{ width: `${value}%` }}\n      {...props}\n    >\n      {children}\n    </div>\n  );\n}\n\nexport { Progress, ProgressBar, PROGRESS_BAR_VARIANTS };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
