{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress-bar",
  "title": "ProgressBar",
  "description": "Progress toward a known total.",
  "registryDependencies": [
    "https://creance.pages.dev/r/creance-base.json"
  ],
  "files": [
    {
      "path": "progress-bar/ProgressBar.css",
      "content": ".cr-progress {\n  --cr-progress-fill: var(--cr-color-ink-bg);\n  display: block;\n  width: 100%;\n  height: 6px;\n  overflow: hidden;\n  border: 0;\n  border-radius: var(--cr-radius-full);\n  background: var(--cr-color-bg-subtle);\n  appearance: none;\n}\n\n.cr-progress[data-tone='warning'] { --cr-progress-fill: var(--cr-color-status-blocked-fg); }\n.cr-progress[data-tone='danger']  { --cr-progress-fill: var(--cr-color-status-failed-fg); }\n\n.cr-progress::-webkit-progress-bar { background: var(--cr-color-bg-subtle); }\n.cr-progress::-webkit-progress-value {\n  background: var(--cr-progress-fill);\n  border-radius: var(--cr-radius-full);\n  transition: width var(--cr-motion-duration-slow) var(--cr-motion-easing-spring);\n}\n.cr-progress::-moz-progress-bar {\n  background: var(--cr-progress-fill);\n  border-radius: var(--cr-radius-full);\n}\n",
      "type": "registry:file",
      "target": "@components/creance/progress-bar/ProgressBar.css"
    },
    {
      "path": "progress-bar/ProgressBar.tsx",
      "content": "import { cx } from '@/lib/creance/cx';\nimport './ProgressBar.css';\n\nexport interface ProgressBarProps {\n  /** Accessible name, e.g. \"Token budget\". */\n  label: string;\n  /** Omit for an indeterminate bar. */\n  value?: number;\n  max?: number;\n  tone?: 'default' | 'warning' | 'danger';\n  className?: string;\n}\n\n/** Native `<progress>`: role, value and range come for free. */\nexport function ProgressBar({ label, value, max = 100, tone = 'default', className }: ProgressBarProps) {\n  return (\n    <progress\n      className={cx('cr-progress', className)}\n      aria-label={label}\n      data-tone={tone}\n      max={max}\n      value={value === undefined ? undefined : Math.min(value, max)}\n    />\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/creance/progress-bar/ProgressBar.tsx"
    }
  ],
  "categories": [
    "atom",
    "data-display"
  ],
  "type": "registry:ui"
}