{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "primitives-base-progress",
  "title": "Base Progress",
  "description": "Displays the status of a task that takes a long time.",
  "dependencies": [
    "motion",
    "@base-ui-components/react"
  ],
  "registryDependencies": [
    "@animate-ui/lib-get-strict-context",
    "@animate-ui/primitives-texts-counting-number"
  ],
  "files": [
    {
      "path": "registry/primitives/base/progress/index.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { Progress as ProgressPrimitives } from '@base-ui-components/react/progress';\nimport { motion } from 'motion/react';\n\nimport {\n  CountingNumber,\n  type CountingNumberProps,\n} from '@/components/animate-ui/primitives/texts/counting-number';\nimport { getStrictContext } from '@/lib/get-strict-context';\n\ntype ProgressContextType = {\n  value: number;\n};\n\nconst [ProgressProvider, useProgress] =\n  getStrictContext<ProgressContextType>('ProgressContext');\n\ntype ProgressProps = React.ComponentProps<typeof ProgressPrimitives.Root>;\n\nconst Progress = (props: ProgressProps) => {\n  return (\n    <ProgressProvider value={{ value: props.value ?? 0 }}>\n      <ProgressPrimitives.Root data-slot=\"progress\" {...props} />\n    </ProgressProvider>\n  );\n};\n\ntype ProgressIndicatorProps = React.ComponentProps<\n  typeof MotionProgressIndicator\n>;\n\nconst MotionProgressIndicator = motion.create(ProgressPrimitives.Indicator);\n\nfunction ProgressIndicator({\n  transition = { type: 'spring', stiffness: 100, damping: 30 },\n  ...props\n}: ProgressIndicatorProps) {\n  const { value } = useProgress();\n\n  return (\n    <MotionProgressIndicator\n      data-slot=\"progress-indicator\"\n      animate={{ width: `${value}%` }}\n      transition={transition}\n      {...props}\n    />\n  );\n}\n\ntype ProgressTrackProps = React.ComponentProps<typeof ProgressPrimitives.Track>;\n\nfunction ProgressTrack(props: ProgressTrackProps) {\n  return <ProgressPrimitives.Track data-slot=\"progress-track\" {...props} />;\n}\n\ntype ProgressLabelProps = React.ComponentProps<typeof ProgressPrimitives.Label>;\n\nfunction ProgressLabel(props: ProgressLabelProps) {\n  return <ProgressPrimitives.Label data-slot=\"progress-label\" {...props} />;\n}\n\ntype ProgressValueProps = Omit<\n  React.ComponentProps<typeof ProgressPrimitives.Value>,\n  'render'\n> &\n  Omit<CountingNumberProps, 'number'>;\n\nfunction ProgressValue({\n  transition = { stiffness: 80, damping: 20 },\n  ...props\n}: ProgressValueProps) {\n  const { value } = useProgress();\n\n  return (\n    <ProgressPrimitives.Value\n      data-slot=\"progress-value\"\n      render={\n        <CountingNumber\n          number={value ?? 0}\n          transition={transition}\n          {...props}\n        />\n      }\n    />\n  );\n}\n\nexport {\n  Progress,\n  ProgressIndicator,\n  ProgressTrack,\n  ProgressLabel,\n  ProgressValue,\n  useProgress,\n  type ProgressProps,\n  type ProgressIndicatorProps,\n  type ProgressTrackProps,\n  type ProgressLabelProps,\n  type ProgressValueProps,\n  type ProgressContextType,\n};\n",
      "type": "registry:ui",
      "target": "components/animate-ui/primitives/base/progress.tsx"
    }
  ],
  "type": "registry:ui"
}