{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress-bar",
  "type": "registry:item",
  "title": "Progress Bar",
  "description": "How far along something is: an upload, a setup checklist, a quota. A labelled progressbar with its value as a percentage, or (without `value`, or with `indeterminate`) a moving bar that says something is happening (still, for visitors who asked for less motion).",
  "dependencies": [
    "@zubra/runtime@^5.13.1"
  ],
  "categories": [
    "data"
  ],
  "registryDependencies": [
    "https://zubra-js.github.io/zubra-ui/r/theme.json"
  ],
  "files": [
    {
      "path": "components/progress-bar.js",
      "type": "registry:file",
      "target": "~/src/components/zubra/progress-bar.js",
      "content": "// Generated by zubra from progress-bar.zb. Do not edit.\nimport { $define, $r, $t } from \"@zubra/runtime\";\nimport { state as __zubraState, computed as __zubraComputed } from \"@zubra/runtime\";\n\nexport const tag = \"progress-bar\";\n\nexport default $define(tag, {\n  props: {\n    \"value\": { attribute: \"value\", default: null, required: false },\n    \"max\": { attribute: \"max\", default: 100, required: false },\n    \"label\": { attribute: \"label\", default: \"Progress\", required: false },\n    \"indeterminate\": { attribute: \"indeterminate\", default: false, required: false },\n    \"showValue\": { attribute: \"show-value\", default: true, required: false },\n  },\n  abi: 3,\n  shadow: false,\n  form: false,\n  slots: [],\n  events: [],\n  styled: true,\n  styles: \"@layer theme, base, components, utilities;\\n@layer components {\\n@scope (progress-bar) to ([data-zb-slotted=\\\"progress-bar\\\"]) {\\n  :scope { display: block; }\\n  .progress-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; font-size: 0.875rem; }\\n  .progress-label { font-weight: 600; }\\n  .progress-value { font-variant-numeric: tabular-nums; color: color-mix(in oklab, var(--muted-foreground, #71717a) 75%, var(--foreground, #18181b)); }\\n  .progress-track { position: relative; height: 0.55rem; overflow: hidden; border-radius: 999px; background: var(--muted, #f4f4f5); }\\n  .progress-fill { height: 100%; border-radius: inherit; background: var(--primary, #18181b); transition: width var(--duration-slow, 400ms) var(--ease-out, ease-out); }\\n  .progress-unknown .progress-fill { width: 35%; animation: progress-slide 1.4s ease-in-out infinite; }\\n  @keyframes progress-slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }\\n  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; } }\\n}\\n}\\n\",\n  template: \"\\n  <div class=\\\"progress-head\\\"><span class=\\\"progress-label\\\"></span><!--[--><!--]--></div>\\n  <div class=\\\"progress-track\\\" role=\\\"progressbar\\\" aria-valuemin=\\\"0\\\" aria-valuemax=\\\"100\\\">\\n    <div class=\\\"progress-fill\\\"></div>\\n  </div>\\n\",\n  setup($p, $emit) {\n  const percent = __zubraComputed(() => ($p.value == null ? 0 : Math.round((Math.min(Math.max($p.value, 0), $p.max) / $p.max) * 100)))\n  const unknown = __zubraComputed(() => ($p.indeterminate || $p.value == null))\n    return [\n      { path: [0, 0], text: () => $t($p.label) },\n      { path: [0, 1], when: () => ($p.showValue && !($r(unknown))), blocks: [{ template: \"<span class=\\\"progress-value\\\"></span>\", parts: () => [{ path: [0], text: () => $t($r(percent)) + \"%\" }] }, null] },\n      { path: [1], toggle: \"progress-unknown\", value: () => $r(unknown) },\n      { path: [1], attribute: \"aria-label\", value: () => $p.label },\n      { path: [1], attribute: \"aria-valuenow\", value: () => ($r(unknown) ? null : $r(percent)) },\n      { path: [1], attribute: \"aria-valuetext\", value: () => (unknown.get() ? \"Loading\" : `${percent.get()}%`) },\n      { path: [1, 0], style: \"width\", value: () => (unknown.get() ? null : `${percent.get()}%`) },\n    ];\n  },\n});\n"
    }
  ]
}
