{
  "name": "progress",
  "type": "registry:ui",
  "title": "Progress",
  "description": "Determinate progress with labels, formatted values, sizes and a token-driven indicator transition.",
  "registryDependencies": [
    "@siteplane/base"
  ],
  "dependencies": [
    "@base-ui/react@1.5.0",
    "class-variance-authority@0.7.1"
  ],
  "files": [
    {
      "path": "src/components/ui/progress.tsx",
      "type": "registry:ui",
      "content": "\"use client\";\n\nimport { Progress as ProgressPrimitive } from \"@base-ui/react/progress\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport {\n  type SiteplaneControlSize,\n  useResolvedControlSize,\n} from \"@/components/ui/siteplane-provider\";\nimport { cn } from \"@/lib/utils\";\n\nconst PROGRESS_DEFAULT_LOCALE = \"en-US\";\n\nconst progressRootVariants = cva(\"flex w-full flex-col\", {\n  defaultVariants: {\n    size: \"default\",\n  },\n  variants: {\n    size: {\n      default: \"gap-2\",\n      lg: \"gap-2\",\n      sm: \"gap-1.5\",\n      xl: \"gap-2.5\",\n    },\n  },\n});\n\nconst progressLabelVariants = cva(\"font-medium\", {\n  defaultVariants: {\n    size: \"default\",\n  },\n  variants: {\n    size: {\n      default: \"text-sm\",\n      lg: \"text-sm\",\n      sm: \"text-sm\",\n      xl: \"text-base sm:text-sm\",\n    },\n  },\n});\n\nconst progressTrackVariants = cva(\n  \"block w-full overflow-hidden rounded-full bg-input\",\n  {\n    defaultVariants: {\n      size: \"default\",\n    },\n    variants: {\n      size: {\n        default: \"h-1\",\n        lg: \"h-1.5\",\n        sm: \"h-1\",\n        xl: \"h-2\",\n      },\n    },\n  },\n);\n\nconst progressValueVariants = cva(\"tabular-nums\", {\n  defaultVariants: {\n    size: \"default\",\n  },\n  variants: {\n    size: {\n      default: \"text-sm\",\n      lg: \"text-sm\",\n      sm: \"text-xs\",\n      xl: \"text-base sm:text-sm\",\n    },\n  },\n});\n\nconst ProgressSizeContext = React.createContext<SiteplaneControlSize | null>(null);\n\nexport interface ProgressProps\n  extends Omit<ProgressPrimitive.Root.Props, \"size\">,\n    VariantProps<typeof progressRootVariants> {}\n\nexport function Progress({\n  className,\n  children,\n  locale = PROGRESS_DEFAULT_LOCALE,\n  size,\n  ...props\n}: ProgressProps): React.ReactElement {\n  const resolvedSize = useResolvedControlSize(size);\n\n  return (\n    <ProgressSizeContext.Provider value={resolvedSize}>\n      <ProgressPrimitive.Root\n        className={cn(progressRootVariants({ size: resolvedSize }), className)}\n        data-size={resolvedSize}\n        data-slot=\"progress\"\n        locale={locale}\n        {...props}\n      >\n        {children ? (\n          children\n        ) : (\n          <ProgressTrack>\n            <ProgressIndicator />\n          </ProgressTrack>\n        )}\n      </ProgressPrimitive.Root>\n    </ProgressSizeContext.Provider>\n  );\n}\n\nexport interface ProgressLabelProps\n  extends Omit<ProgressPrimitive.Label.Props, \"size\">,\n    VariantProps<typeof progressLabelVariants> {}\n\nexport function ProgressLabel({\n  className,\n  size,\n  ...props\n}: ProgressLabelProps): React.ReactElement {\n  const groupSize = React.useContext(ProgressSizeContext);\n  const resolvedSize = useResolvedControlSize(size ?? groupSize);\n\n  return (\n    <ProgressPrimitive.Label\n      className={cn(progressLabelVariants({ size: resolvedSize }), className)}\n      data-size={resolvedSize}\n      data-slot=\"progress-label\"\n      {...props}\n    />\n  );\n}\n\nexport interface ProgressTrackProps\n  extends Omit<ProgressPrimitive.Track.Props, \"size\">,\n    VariantProps<typeof progressTrackVariants> {}\n\nexport function ProgressTrack({\n  className,\n  size,\n  ...props\n}: ProgressTrackProps): React.ReactElement {\n  const groupSize = React.useContext(ProgressSizeContext);\n  const resolvedSize = useResolvedControlSize(size ?? groupSize);\n\n  return (\n    <ProgressPrimitive.Track\n      className={cn(progressTrackVariants({ size: resolvedSize }), className)}\n      data-size={resolvedSize}\n      data-slot=\"progress-track\"\n      {...props}\n    />\n  );\n}\n\nexport function ProgressIndicator({\n  className,\n  ...props\n}: ProgressPrimitive.Indicator.Props): React.ReactElement {\n  return (\n    <ProgressPrimitive.Indicator\n      className={cn(\n        \"rounded-full bg-primary transition-all [transition-duration:var(--motion-duration-linger)] [transition-timing-function:var(--motion-ease-apple-out)] motion-reduce:transition-none\",\n        className,\n      )}\n      data-slot=\"progress-indicator\"\n      {...props}\n    />\n  );\n}\n\nexport interface ProgressValueProps\n  extends Omit<ProgressPrimitive.Value.Props, \"size\">,\n    VariantProps<typeof progressValueVariants> {}\n\nexport function ProgressValue({\n  className,\n  size,\n  ...props\n}: ProgressValueProps): React.ReactElement {\n  const groupSize = React.useContext(ProgressSizeContext);\n  const resolvedSize = useResolvedControlSize(size ?? groupSize);\n\n  return (\n    <ProgressPrimitive.Value\n      className={cn(progressValueVariants({ size: resolvedSize }), className)}\n      data-size={resolvedSize}\n      data-slot=\"progress-value\"\n      {...props}\n    />\n  );\n}\n\nexport { ProgressPrimitive };\n"
    }
  ],
  "categories": [
    "feedback"
  ],
  "docs": "# Progress\n\n> Siteplane UI release `0.1.1`.\n\n## Public Purpose\n\nUse Progress for measurable work with a known current value and maximum, such as uploads, imports or multi-step processing.\n\n## Import\n\n`import { Progress } from \"@/components/ui/progress\";`\n\n`import { ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue } from \"@/components/ui/progress\";`\n\n## Public API\n\n- `Progress` accepts a numeric `value` or `value={null}` for indeterminate status, plus `max`, `format`, `locale` and `size=\"sm\" | \"default\" | \"lg\" | \"xl\"`; the wrapper defaults `locale` to `en-US`.\n- Compose `ProgressLabel`, `ProgressValue`, `ProgressTrack` and `ProgressIndicator` when custom children are needed.\n- `ProgressLabel`, `ProgressValue` and `ProgressTrack` each accept their own `size` override; otherwise they inherit the root or provider size.\n- Use `getAriaValueText` or `aria-valuetext` when the numeric value needs a human-readable explanation.\n\n## Public Motion\n\n- Value changes animate through the shared Progress transition tokens; the surrounding layout remains stable.\n- The operating-system reduced-motion preference removes the indicator transition. The forced `reducedMotionPreset` shortens the shared linger duration from 380ms to 120ms, and the provider contract stops the continuous indeterminate fill.\n- Do not add local durations or transforms; state changes and progress semantics remain visible in every mode.\n\n## Public Accessibility\n\n- Provide a visible label or explicit accessible name and keep `value` and `max` accurate.\n- Use human-readable value text for units or stages that a plain number cannot explain.\n- Use a numeric value for known progress. `value={null}` supports a short transitional indeterminate state when paired with useful `aria-valuetext`; Spinner or Skeleton can be clearer for unknown or long-running loading.\n\n## Public Agent Guidance\n\n- Keep track and indicator together when supplying custom children.\n- Set locale deliberately for non-English products instead of relying on the `en-US` wrapper default.\n- Use part-level size overrides only when a real composition requires them; root size is the normal path.\n\n## Public Links\n\n- [Documentation and preview](https://ui.siteplane.io/docs/components/feedback/progress)\n\n- [Registry source](https://ui.siteplane.io/r/progress.json)\n",
  "meta": {
    "siteplane:agentContractVersion": 1,
    "siteplane:docs": "https://ui.siteplane.io/docs/components/feedback/progress",
    "siteplane:releaseVersion": "0.1.1",
    "siteplane:sourceOwned": true
  },
  "devDependencies": []
}
