{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress",
  "title": "Progress",
  "description": "Astro progress tracks for a known value or an unknown completion time.",
  "dependencies": [
    "cn@0.4.0"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "packages/ui/src/components/ui/progress/progress.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cn } from \"cn\"\nimport Track from \"./progress-track.astro\"\nimport Indicator from \"./progress-indicator.astro\"\ntype Props = HTMLAttributes<\"div\"> & {\n  value?: number | null\n  min?: number\n  max?: number\n}\nconst {\n  class: className,\n  value = null,\n  min = 0,\n  max = 100,\n  style,\n  ...props\n} = Astro.props\nif (\n  !Number.isFinite(min) ||\n  !Number.isFinite(max) ||\n  max <= min ||\n  (value !== null && !Number.isFinite(value))\n)\n  throw new RangeError(\n    \"Progress needs finite bounds with max greater than min, and a finite value.\",\n  )\nconst current = value === null ? null : Math.min(max, Math.max(min, value))\nconst percent = current === null ? 0 : ((current - min) / (max - min)) * 100\nconst mergedStyle =\n  typeof style === \"string\"\n    ? `${style};--progress-percentage:${percent}%`\n    : { ...style, \"--progress-percentage\": percent + \"%\" }\n---\n\n<div\n  data-slot=\"progress\"\n  data-indeterminate={current === null ? \"\" : undefined}\n  role=\"progressbar\"\n  aria-valuemin={min}\n  aria-valuemax={max}\n  aria-valuenow={current ?? undefined}\n  style={mergedStyle}\n  class={cn(\"flex w-full flex-col gap-2\", className)}\n  {...props}\n>\n  <slot>\n    <Track>\n      <Indicator />\n    </Track>\n  </slot>\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/progress/progress.astro"
    },
    {
      "path": "packages/ui/src/components/ui/progress/progress-value.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cn } from \"cn\"\ntype Props = HTMLAttributes<\"span\">\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n  data-slot=\"progress-value\"\n  class={cn(\"text-sm tabular-nums\", className)}\n  {...props}\n>\n  <slot />\n</span>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/progress/progress-value.astro"
    },
    {
      "path": "packages/ui/src/components/ui/progress/progress-indicator.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cn } from \"cn\"\ntype Props = HTMLAttributes<\"div\">\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"progress-indicator\"\n  class={cn(\n    \"h-full w-(--progress-percentage) bg-primary transition-[width] duration-500 motion-reduce:transition-none in-data-indeterminate:w-1/3 in-data-indeterminate:animate-pulse motion-reduce:in-data-indeterminate:animate-none\",\n    className,\n  )}\n  {...props}\n></div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/progress/progress-indicator.astro"
    },
    {
      "path": "packages/ui/src/components/ui/progress/progress-track.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cn } from \"cn\"\ntype Props = HTMLAttributes<\"div\">\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"progress-track\"\n  class={cn(\n    \"block h-1.5 w-full overflow-hidden rounded-full bg-input\",\n    className,\n  )}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/progress/progress-track.astro"
    },
    {
      "path": "packages/ui/src/components/ui/progress/progress-label.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport { cn } from \"cn\"\ntype Props = HTMLAttributes<\"span\">\nconst { class: className, ...props } = Astro.props\n---\n\n<span\n  data-slot=\"progress-label\"\n  class={cn(\"font-medium text-sm\", className)}\n  {...props}\n>\n  <slot />\n</span>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/progress/progress-label.astro"
    },
    {
      "path": "packages/ui/src/components/ui/progress/index.ts",
      "content": "export { default as Progress } from './progress.astro'\nexport { default as ProgressLabel } from './progress-label.astro'\nexport { default as ProgressTrack } from './progress-track.astro'\nexport { default as ProgressIndicator } from './progress-indicator.astro'\nexport { default as ProgressValue } from './progress-value.astro'\n",
      "type": "registry:file",
      "target": "~/src/components/ui/progress/index.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnosticai/ui"
  },
  "docs": "https://ui.gnosticai.com/components/progress",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
