{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "progress-ring",
  "type": "registry:item",
  "title": "Progress Ring",
  "description": "A ring that fills to `value` of `max`, with what's in the middle from the default slot (the percentage if empty).",
  "dependencies": [
    "@zubra/runtime@^5.13.1"
  ],
  "categories": [
    "display"
  ],
  "registryDependencies": [
    "https://zubra-js.github.io/zubra-ui/r/theme.json"
  ],
  "files": [
    {
      "path": "components/progress-ring.js",
      "type": "registry:file",
      "target": "~/src/components/zubra/progress-ring.js",
      "content": "// Generated by zubra from progress-ring.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-ring\";\n\nexport default $define(tag, {\n  props: {\n    \"value\": { attribute: \"value\", default: 0, required: false },\n    \"max\": { attribute: \"max\", default: 100, required: false },\n    \"label\": { attribute: \"label\", default: \"Progress\", required: false },\n  },\n  abi: 3,\n  shadow: false,\n  form: false,\n  slots: [\"default\"],\n  events: [],\n  styled: true,\n  styles: \"@layer theme, base, components, utilities;\\n@layer components {\\n@scope (progress-ring) to ([data-zb-slotted=\\\"progress-ring\\\"]) {\\n  :scope { display: inline-grid; place-items: center; width: var(--size, 7rem); aspect-ratio: 1; position: relative; }\\n  svg { position: absolute; inset: 0; width: 100%; transform: rotate(-90deg); }\\n  circle { fill: none; stroke-width: 3.2; }\\n  .track { stroke: var(--border, #ddd); }\\n  .fill { stroke: var(--primary, #36c); stroke-linecap: round; transition: stroke-dasharray var(--duration-slow, 400ms); }\\n  .middle { position: relative; text-align: center; line-height: 1.15; }\\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  <svg viewBox=\\\"0 0 42 42\\\" role=\\\"img\\\">\\n    <circle class=\\\"track\\\" cx=\\\"21\\\" cy=\\\"21\\\"></circle>\\n    <!--[--><!--]-->\\n  </svg>\\n  <div class=\\\"middle\\\"><!--[--><!--]--></div>\\n\",\n  setup($p, $emit) {\n  const R = 15.915494309189533\n  const percent = __zubraComputed(() => ($p.max > 0 ? Math.min(100, Math.round(($p.value / $p.max) * 100)) : 0))\n    return [\n      { path: [0], attribute: \"aria-label\", value: () => (`${$p.label}: ${percent.get()}%`) },\n      { path: [0, 0], attribute: \"r\", value: () => $r(R) },\n      { path: [0, 1], when: () => ($r(percent) > 0), blocks: [{ template: \"<circle class=\\\"fill\\\" cx=\\\"21\\\" cy=\\\"21\\\"></circle>\", parts: () => [{ path: [0], attribute: \"r\", value: () => $r(R) }, { path: [0], attribute: \"stroke-dasharray\", value: () => (`${percent.get()} ${100 - percent.get()}`) }] }, null] },\n      { path: [1, 0], slot: \"default\", fallback: { template: \"<strong></strong>\", parts: () => [{ path: [0], text: () => $t($r(percent)) + \"%\" }] } },\n    ];\n  },\n});\n"
    }
  ]
}
