{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress",
  "type": "registry:ui",
  "title": "Progress",
  "description": "Shows how far along a task is. Give it an `aria-label`, or point `aria-labelledby` at a visible label.",
  "dependencies": [
    "tailwind-variants@^1.0.0"
  ],
  "registryDependencies": [
    "https://junco.madebytobi.com/r/junco-theme.json",
    "https://junco.madebytobi.com/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/junco/ui/progress.tsx",
      "type": "registry:ui",
      "content": "import * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"@/lib/utils\";\n\nexport const progressVariants = tv({\n  slots: {\n    root: \"relative w-full overflow-hidden rounded-pill bg-border\",\n    indicator: \"h-full w-full rounded-pill transition-transform duration-slow ease-standard\",\n  },\n  variants: {\n    size: {\n      sm: { root: \"h-1\" },\n      md: { root: \"h-2\" },\n      lg: { root: \"h-3\" },\n    },\n    color: {\n      primary: { indicator: \"bg-primary\" },\n      success: { indicator: \"bg-success\" },\n      warning: { indicator: \"bg-warning\" },\n      danger: { indicator: \"bg-destructive\" },\n    },\n    isIndeterminate: {\n      true: { indicator: \"w-2/5 animate-progress\" },\n    },\n  },\n  defaultVariants: { size: \"md\", color: \"primary\" },\n});\n\nexport interface ProgressProps\n  extends Omit<React.HTMLAttributes<HTMLDivElement>, \"color\">,\n    Omit<VariantProps<typeof progressVariants>, \"isIndeterminate\"> {\n  /** From 0 to `max`. Leave it out (or pass null) while the amount is unknown: the bar slides instead. */\n  value?: number | null;\n  max?: number;\n  /** What screen readers say for the current value, e.g. \"3 of 12 cards\". Defaults to the percentage. */\n  getValueLabel?: (value: number, max: number) => string;\n  classNames?: { root?: string; indicator?: string };\n}\n\n/** Shows how far along a task is. Give it an `aria-label`, or point `aria-labelledby` at a visible label. */\nexport const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n  ({ className, classNames, size, color, value = null, max = 100, getValueLabel, ...props }, ref) => {\n    const known = value !== null && Number.isFinite(value) && max > 0;\n    const clamped = known ? Math.min(Math.max(value, 0), max) : 0;\n    const styles = progressVariants({ size, color, isIndeterminate: !known });\n    return (\n      <div\n        ref={ref}\n        role=\"progressbar\"\n        aria-valuemin={0}\n        aria-valuemax={max}\n        aria-valuenow={known ? clamped : undefined}\n        aria-valuetext={known ? (getValueLabel?.(clamped, max) ?? `${Math.round((clamped / max) * 100)}%`) : undefined}\n        data-state={known ? (clamped >= max ? \"complete\" : \"loading\") : \"indeterminate\"}\n        className={styles.root({ className: cn(classNames?.root, className) })}\n        {...props}\n      >\n        <div\n          className={styles.indicator({ className: classNames?.indicator })}\n          style={known ? { transform: `translateX(-${100 - (clamped / max) * 100}%)` } : undefined}\n        />\n      </div>\n    );\n  },\n);\nProgress.displayName = \"Progress\";\n"
    }
  ],
  "docs": "Docs and examples: https://junco.madebytobi.com/docs/components/progress",
  "meta": {
    "hash": "b746596f0d454b53",
    "source": "packages/react/src/components/progress.tsx",
    "exports": [
      "progressVariants",
      "ProgressProps",
      "Progress"
    ],
    "props": {
      "Progress": {
        "extends": "Omit<React.HTMLAttributes<HTMLDivElement>, \"color\">, Omit<VariantProps<typeof progressVariants>, \"isIndeterminate\">",
        "props": [
          {
            "name": "value",
            "optional": true,
            "type": "number | null",
            "description": "From 0 to `max`. Leave it out (or pass null) while the amount is unknown: the bar slides instead."
          },
          {
            "name": "max",
            "optional": true,
            "type": "number"
          },
          {
            "name": "getValueLabel",
            "optional": true,
            "type": "(value: number, max: number) => string",
            "description": "What screen readers say for the current value, e.g. \"3 of 12 cards\". Defaults to the percentage."
          },
          {
            "name": "classNames",
            "optional": true,
            "type": "{ root?: string; indicator?: string }"
          }
        ]
      }
    },
    "variants": {
      "variants": {
        "size": [
          "sm",
          "md",
          "lg"
        ],
        "color": [
          "primary",
          "success",
          "warning",
          "danger"
        ],
        "isIndeterminate": [
          "true"
        ]
      },
      "defaultVariants": {
        "size": "md",
        "color": "primary"
      }
    },
    "docsUrl": "https://junco.madebytobi.com/docs/components/progress"
  }
}
