{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"progress","type":"registry:ui","title":"Progress","description":"Shows how far a task has progressed.","dependencies":["radix-ui"],"registryDependencies":["https://dashral.com/r/utils.json","https://dashral.com/r/lib-locale.json"],"files":[{"path":"registry/dashral/progress.tsx","type":"registry:file","target":"components/dashral/progress.tsx","content":"\"use client\"\n\nimport * as React from \"react\"\nimport { Progress as ProgressPrimitive } from \"radix-ui\"\n\nimport { useLocale } from \"./lib/locale\"\nimport { cn } from \"./lib/utils\"\n\ntype ControlColor = \"primary\" | \"neutral\" | \"info\" | \"success\" | \"warning\" | \"destructive\" | \"highlight\"\n\n// The track behind the bar. Every class is written out in full so Tailwind finds it.\nconst trackColors: Record<ControlColor, string> = {\n  primary: \"bg-primary/15\",\n  neutral: \"bg-foreground/15\",\n  info: \"bg-info/15\",\n  success: \"bg-success/15\",\n  warning: \"bg-warning/15\",\n  destructive: \"bg-destructive/15\",\n  highlight: \"bg-highlight/15\",\n}\n\n// The bar. Every class is written out in full so Tailwind finds it.\nconst barColors: Record<ControlColor, string> = {\n  primary: \"bg-primary\",\n  neutral: \"bg-foreground\",\n  info: \"bg-info\",\n  success: \"bg-success\",\n  warning: \"bg-warning\",\n  destructive: \"bg-destructive\",\n  highlight: \"bg-highlight\",\n}\n\nfunction Progress({\n  className,\n  classNames,\n  color = \"primary\",\n  value,\n  ...props\n}: Omit<React.ComponentProps<typeof ProgressPrimitive.Root>, \"color\"> & {\n  /** The bar's color; the track is a pale version of it. */\n  color?: ControlColor\n  classNames?: { indicator?: string }\n}) {\n  const { dir } = useLocale()\n  return (\n    <ProgressPrimitive.Root\n      data-slot=\"progress\"\n      className={cn(\"relative h-2 w-full overflow-hidden rounded-full\", trackColors[color], className)}\n      value={value}\n      {...props}\n    >\n      <ProgressPrimitive.Indicator\n        data-slot=\"progress-indicator\"\n        // Fills from the start (the left, or the right in Arabic) when it first shows, then follows its value.\n        className={cn(\n          \"h-full w-full flex-1 animate-in rounded-full transition-all duration-(--duration-considered) ease-enter slide-in-from-start-full motion-reduce:animate-none\",\n          barColors[color],\n          classNames?.indicator\n        )}\n        style={{ transform: `translateX(${dir === \"rtl\" ? \"\" : \"-\"}${100 - (value ?? 0)}%)` }}\n      />\n    </ProgressPrimitive.Root>\n  )\n}\n\nexport { Progress }\n"}],"cssVars":{"theme":{"color-info":"var(--info)","color-info-foreground":"var(--info-foreground)","color-info-text":"var(--info-text)","color-success":"var(--success)","color-success-foreground":"var(--success-foreground)","color-success-text":"var(--success-text)","color-warning":"var(--warning)","color-warning-foreground":"var(--warning-foreground)","color-warning-text":"var(--warning-text)","color-highlight":"var(--highlight)","color-highlight-foreground":"var(--highlight-foreground)","color-highlight-text":"var(--highlight-text)","ease-standard":"var(--ease-standard)","ease-enter":"var(--ease-enter)","ease-exit":"var(--ease-exit)","ease-spring":"var(--ease-spring)"},"light":{"info":"oklch(0.5 0.134 242.749)","info-foreground":"oklch(0.985 0 0)","info-text":"oklch(0.443 0.11 240.79)","success":"oklch(0.508 0.118 165.612)","success-foreground":"oklch(0.985 0 0)","success-text":"oklch(0.432 0.095 166.913)","warning":"#f59200","warning-foreground":"oklch(0.3 0.07 60)","warning-text":"#964e00","highlight":"#b8008c","highlight-foreground":"oklch(0.985 0 0)","highlight-text":"#a3007b","duration-fast":"160ms","duration-standard":"240ms","duration-considered":"480ms","ease-standard":"cubic-bezier(0.2, 0, 0, 1)","ease-enter":"cubic-bezier(0, 0, 0, 1)","ease-exit":"cubic-bezier(0.3, 0, 1, 1)","ease-spring":"linear(0, 0.071 4%, 0.234 8%, 0.433 12%, 0.626 17%, 0.791 21%, 0.917 25%, 1.004 29%, 1.055 33%, 1.079 38%, 1.083 42%, 1.075 46%, 1.06 50%, 1.043 54%, 1.027 58%, 1.015 62%, 1.005 67%, 0.998 71%, 0.995 75%, 0.993 79%, 0.993 83%, 0.994 88%, 0.995 92%, 0.997 96%, 1)"},"dark":{"info":"oklch(0.685 0.169 237.323)","info-foreground":"oklch(0.2 0 0)","info-text":"oklch(0.746 0.16 232.661)","success":"oklch(0.696 0.17 162.48)","success-foreground":"oklch(0.2 0.04 160)","success-text":"oklch(0.765 0.177 163.223)","warning":"#f59200","warning-foreground":"oklch(0.25 0.06 60)","warning-text":"#ffba42","highlight":"#ff2ecf","highlight-foreground":"oklch(0.2 0 0)","highlight-text":"#ff75df"}}}