{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress",
  "title": "progress",
  "dependencies": [
    "@radix-ui/react-progress@^1",
    "class-variance-authority@^0.7"
  ],
  "registryDependencies": [
    "@dwellir/dwellir-theme",
    "@dwellir/utils"
  ],
  "files": [
    {
      "path": "components/ui/progress.tsx",
      "content": "'use client';\n\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps, CSSProperties } from 'react';\nimport { cn } from '@/lib/utils';\n\n/* The track is the slider's. */\nconst progressVariants = cva('relative w-full overflow-hidden rounded-full bg-foreground-15', {\n  variants: {\n    size: {\n      /* A thin line under a row, such as a file in an export. */\n      sm: 'h-1',\n      md: 'h-2',\n      /* A quota bar that leads a card. */\n      lg: 'h-3',\n    },\n  },\n  defaultVariants: { size: 'md' },\n});\n\nconst progressIndicatorVariants = cva(\n  'size-full translate-x-(--progress-offset) rounded-full transition-transform duration-300 motion-reduce:transition-none',\n  {\n    variants: {\n      variant: {\n        /* The ink, not primary: primary on the track misses 3:1 in light mode. */\n        default: 'bg-accent-ink',\n        /* Close to or over a limit, such as a monthly quota. */\n        warning: 'bg-warning-ink',\n        /* Failed or blocked. */\n        destructive: 'bg-destructive',\n      },\n    },\n    defaultVariants: { variant: 'default' },\n  },\n);\n\ntype ProgressProps = ComponentProps<typeof ProgressPrimitive.Root> &\n  VariantProps<typeof progressVariants> &\n  VariantProps<typeof progressIndicatorVariants>;\n\n/*\n * value runs from 0 to max (100 by default). With no value, the bar is\n * indeterminate and stays empty. Give it an accessible name: aria-label, or\n * aria-labelledby on the label it sits under.\n */\nfunction Progress({ className, size, variant, value, max = 100, ...props }: ProgressProps) {\n  /* Radix drops a value past max: a quota over its limit shows a full bar. */\n  const clamped = value == null ? value : Math.min(Math.max(value, 0), max);\n  const done = clamped == null ? 0 : clamped / max;\n  /* The value is data, not a look: the class reads the offset from this variable. */\n  const offset = { '--progress-offset': `${(done - 1) * 100}%` } as CSSProperties;\n  return (\n    <ProgressPrimitive.Root\n      data-slot=\"progress\"\n      data-size={size ?? 'md'}\n      data-variant={variant ?? 'default'}\n      value={clamped}\n      max={max}\n      className={cn(progressVariants({ size }), className)}\n      {...props}\n    >\n      <ProgressPrimitive.Indicator\n        data-slot=\"progress-indicator\"\n        className={progressIndicatorVariants({ variant })}\n        style={offset}\n      />\n    </ProgressPrimitive.Root>\n  );\n}\n\nexport { Progress, progressVariants };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}