{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A vertical navigation with the brand on top and the user at the bottom: full, or icons only.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->\n<!--\n  A vertical navigation: the brand at the top, the links stacked, the user at the bottom. Axes: width (full:\n  icon and name, compact: icons only with the name hidden), user (show, hide), density.\n-->\n<script lang=\"ts\">\nimport type { NavLink } from \"./nav-bar.types\";\n\nexport type SidebarNavProps = {\n  label: string;\n  brand: string;\n  links: NavLink[];\n  current?: string;\n  userName: string;\n  userEmail: string;\n  width?: \"full\" | \"compact\";\n  user?: \"show\" | \"hide\";\n  density?: \"default\" | \"compact\";\n  landmarkLabel?: string;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport Block from \"../compose/Block.vue\";\nimport Group from \"../compose/Group.vue\";\nimport Inline from \"../compose/Inline.vue\";\nimport List from \"../compose/List.vue\";\nimport ListItem from \"../compose/ListItem.vue\";\nimport LucideIcon from \"../icons/LucideIcon.vue\";\nimport Stack from \"../compose/Stack.vue\";\nimport Text from \"../compose/Text.vue\";\nimport MediaFrame from \"../components/media-frame.vue\";\nimport MenuEntry from \"../components/menu-entry.vue\";\nimport NavBlock from \"../components/nav-block.vue\";\nimport { cn, tpl, uniqLabel } from \"../utils\";\n\nconst {\n  label,\n  brand,\n  links,\n  current = \"\",\n  userName,\n  userEmail,\n  width = \"full\",\n  user = \"show\",\n  density = \"default\",\n  landmarkLabel,\n} = defineProps<SidebarNavProps>();\n</script>\n\n<template>\n  <Block\n    tag=\"aside\"\n    :class=\"cn(\n      'flex min-h-96 flex-col gap-6 rounded bg-card p-4 inset-ring inset-ring-border',\n      (((width as string) === 'compact') ? 'w-20 items-center' : 'w-64')\n    )\"\n    :aria-label=\"(landmarkLabel ?? brand)\"\n    :data-width=\"width\"\n    data-slot=\"sidebar\"\n  >\n    <Group gap=\"2\" align=\"center\">\n      <LucideIcon name=\"layers\" :size=\"24\" />\n      <Text size=\"base\" weight=\"bold\" :class=\"(((width as string) === 'compact') ? 'sr-only' : '')\">\n        {{ brand }}\n      </Text>\n    </Group>\n    <NavBlock\n      v-if=\"((links?.length ?? 0) > 0)\"\n      :label=\"(landmarkLabel ? uniqLabel(tpl('{0}, {1}', label, landmarkLabel)) : label)\"\n      class=\"flex-1\"\n    >\n      <List\n        :class=\"cn(\n          'm-0 flex list-none flex-col p-0',\n          (((density as string) === 'compact') ? 'gap-0' : 'gap-2')\n        )\"\n        data-slot=\"items\"\n      >\n        <ListItem v-for=\"l in links\" :key=\"l.id\" data-slot=\"links-row\">\n          <MenuEntry\n            :href=\"l.href\"\n            :class=\"cn(\n              'flex items-center gap-4 rounded px-4 text-sm',\n              'py-2',\n              ((l.id === current) ? 'bg-muted font-semibold' : '')\n            )\"\n            :current=\"(l.id === current)\"\n            testid=\"item\"\n          >\n            <LucideIcon :name=\"l.icon\" :size=\"16\" />\n            <Inline :class=\"(((width as string) === 'compact') ? 'sr-only' : '')\">\n              {{ l.name }}\n            </Inline>\n          </MenuEntry>\n        </ListItem>\n      </List>\n    </NavBlock>\n    <Group\n      v-if=\"((user as string) === 'show')\"\n      gap=\"4\"\n      align=\"center\"\n      class=\"border-t border-border pt-4\"\n      data-slot=\"user\"\n    >\n      <MediaFrame :alt=\"userName\" ratio=\"1/1\" class=\"size-10 shrink-0 rounded-full\" />\n      <Stack gap=\"0\" :class=\"(((width as string) === 'compact') ? 'sr-only' : 'min-w-0')\">\n        <Text size=\"sm\" weight=\"semibold\">\n          {{ userName }}\n        </Text>\n        <Text size=\"xs\" class=\"text-muted-foreground\">\n          {{ userEmail }}\n        </Text>\n      </Stack>\n    </Group>\n  </Block>\n</template>\n",
      "path": "blocks/sidebar-nav.vue",
      "target": "blocks/sidebar-nav.vue"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "vue",
      "block"
    ]
  },
  "name": "sidebar-nav",
  "registryDependencies": [
    "block",
    "group",
    "inline",
    "list",
    "list-item",
    "lucide-icon",
    "media-frame",
    "menu-entry",
    "nav-bar",
    "nav-block",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "vue",
  "title": "Sidebar Nav",
  "type": "registry:block"
}
