{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "nav-bar",
  "type": "registry:item",
  "title": "Nav Bar",
  "description": "The bar across the top of a site: the brand, the main links, and actions such as Sign in. The current page's link is marked `aria-current=\"page\"`. When the bar is too narrow for the links (its own width, not the screen's), they fold behind a Menu button. `links` is `[{ label, href, current? }]`.",
  "dependencies": [
    "@zubra/runtime@^5.13.1"
  ],
  "categories": [
    "navigation"
  ],
  "registryDependencies": [
    "https://zubra-js.github.io/zubra-ui/r/theme.json"
  ],
  "files": [
    {
      "path": "components/nav-bar.js",
      "type": "registry:file",
      "target": "~/src/components/zubra/nav-bar.js",
      "content": "// Generated by zubra from nav-bar.zb. Do not edit.\nimport { $define, $r, $t } from \"@zubra/runtime\";\nimport { hasSlot, id } from '@zubra/runtime';\nimport { state as __zubraState, computed as __zubraComputed } from \"@zubra/runtime\";\n\nexport const tag = \"nav-bar\";\n\nexport default $define(tag, {\n  props: {\n    \"brand\": { attribute: \"brand\", default: \"\", required: false },\n    \"href\": { attribute: \"href\", default: \"/\", required: false },\n    \"links\": { attribute: \"links\", default: [], required: false },\n    \"label\": { attribute: \"label\", default: \"Main\", required: false },\n  },\n  abi: 3,\n  shadow: false,\n  form: false,\n  slots: [\"actions\", \"brand\"],\n  events: [],\n  styled: true,\n  styles: \"@layer theme, base, components, utilities;\\n@layer components {\\n@scope (nav-bar) to ([data-zb-slotted=\\\"nav-bar\\\"]) {\\n  :scope { display: block; container-type: inline-size; }\\n  .navbar { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border, #e4e4e7); background: var(--background, #fff); }\\n  .navbar-brand { font-weight: 800; font-size: 1.05rem; color: var(--foreground, #18181b); text-decoration: none; }\\n  .navbar-links { display: flex; align-items: center; gap: 0.25rem; margin: 0 0 0 0.5rem; padding: 0; list-style: none; flex: 1; }\\n  .navbar-links a { display: block; padding: 0.45rem 0.7rem; border-radius: calc(var(--radius, 0.625rem) * 0.7); color: color-mix(in oklab, var(--muted-foreground, #71717a) 70%, var(--foreground, #18181b)); text-decoration: none; font-weight: 500; }\\n  .navbar-links a:hover { background: var(--accent, #f4f4f5); color: var(--foreground, #18181b); }\\n  .navbar-links a[aria-current=page] { color: var(--foreground, #18181b); font-weight: 700; }\\n  a:focus-visible, button:focus-visible { outline: 2px solid var(--ring, #a1a1aa); outline-offset: 2px; }\\n  .navbar-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }\\n  .navbar-menu { display: none; margin-left: auto; height: 2.25rem; padding: 0 0.8rem; border: 1px solid var(--border, #e4e4e7); border-radius: calc(var(--radius, 0.625rem) * 0.8); background: var(--background, #fff); color: var(--foreground, #18181b); font: inherit; font-weight: 600; cursor: pointer; }\\n  @container (max-width: 40rem) {\\n    .navbar { flex-wrap: wrap; }\\n    .navbar-menu { display: inline-flex; align-items: center; }\\n    .navbar-links, .navbar-actions { display: none; }\\n    .navbar-open .navbar-links { display: grid; flex-basis: 100%; margin: 0.25rem 0 0; }\\n    .navbar-open .navbar-actions { display: flex; flex-basis: 100%; margin: 0; padding-top: 0.5rem; }\\n  }\\n}\\n}\\n\",\n  template: \"\\n  <div class=\\\"navbar\\\">\\n    <!--[--><!--]-->\\n    <button type=\\\"button\\\" class=\\\"navbar-menu\\\">Menu</button>\\n    <nav style=\\\"display: contents\\\">\\n      <ul class=\\\"navbar-links\\\">\\n        <!--[--><!--]-->\\n      </ul>\\n    </nav>\\n    <!--[--><!--]-->\\n  </div>\\n\",\n  setup($p, $emit) {\nfunction __zubraAssign(signal, value) { signal.set(value); return value }\nfunction __zubraUpdate(signal, delta, prefix) { const old = signal.get(); signal.set(old + delta); return prefix ? old + delta : old }\n                                              \n\n  const menuId = id()\n  const actions = hasSlot('actions')\n  const menu = __zubraState(false)\n    return [\n      { path: [0], toggle: \"navbar-open\", value: () => $r(menu) },\n      { path: [0, 0], slot: \"brand\", fallback: { template: \"<a class=\\\"navbar-brand\\\"></a>\", parts: () => [{ path: [0], attribute: \"href\", url: true, value: () => $p.href }, { path: [0], text: () => $t($p.brand) }] } },\n      { path: [0, 1], attribute: \"aria-expanded\", value: () => ($r(menu) ? \"true\" : \"false\") },\n      { path: [0, 1], attribute: \"aria-controls\", value: () => $r(menuId) },\n      { path: [0, 1], on: \"click\", handler: () => (() => (__zubraAssign(menu, !menu.get()))) },\n      { path: [0, 2], attribute: \"aria-label\", value: () => $p.label },\n      { path: [0, 2, 0], attribute: \"id\", value: () => $r(menuId) },\n      { path: [0, 2, 0, 0], each: () => $p.links, key: (link, $index) => $r(link).href, block: { template: \"\\n          <li><a></a></li>\\n        \", parts: (link, $index) => [{ path: [0, 0], attribute: \"href\", url: true, value: () => $r(link).href }, { path: [0, 0], attribute: \"aria-current\", value: () => ($r(link).current ? \"page\" : null) }, { path: [0, 0], text: () => $t($r(link).label) }] } },\n      { path: [0, 3], when: () => $r(actions), blocks: [{ template: \"<div class=\\\"navbar-actions\\\"><!--[--><!--]--></div>\", parts: () => [{ path: [0, 0], slot: \"actions\", fallback: null }] }, null] },\n    ];\n  },\n});\n"
    }
  ]
}
