{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The sidebar of DashboardShell. Shapes: wide (icon and name), rail (icons only, the names still read), collapsed (the static collapsed state of a wide sidebar, with its expand button), twolevel (a rail beside a panel of the current section's links). side puts it at the start or th",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/shell-sidebar.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ShellSidebarProps are the props of ShellSidebar; the values are the JSON shapes of the TypeScript props.\ntype ShellSidebarProps struct {\n\tNav any `json:\"nav\"`\n\tMode any `json:\"mode\"`\n\tSide any `json:\"side\"`\n\tBrand any `json:\"brand\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The sidebar of DashboardShell. Shapes: wide (icon and name), rail (icons only, the names still read), collapsed (the static collapsed state of a wide sidebar, with its expand button), twolevel (a rail beside a panel of the current section's links). side puts it at the start or the end.\ntempl ShellSidebar(p ShellSidebarProps) {\n\t{{ vNav := p.Nav }}\n\t{{ vMode := uiutils.Def(p.Mode, \"wide\") }}\n\t{{ vSide := uiutils.Def(p.Side, \"start\") }}\n\t{{ vBrand := uiutils.Def(p.Brand, \"show\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t{{ vNamed := any(uiutils.Eq(vMode, \"wide\")) }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"aside\", Class: uiutils.S(uiutils.Cnv(\"flex shrink-0 bg-card\", uiutils.Cond(uiutils.T(uiutils.Eq(vSide, \"end\")), \"flex-row-reverse border-l border-border\", \"border-r border-border\"))), Attrs: uiutils.Attrs(\"aria-label\", uiutils.Coalesce(vLandmarkLabel, uiutils.Get(vNav, \"label\")), \"data-mode\", vMode, \"data-slot\", \"sidebar\")}}) {\n\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex flex-col gap-6 py-4\", uiutils.Cond(uiutils.T(vNamed), \"w-64 px-4\", \"w-16 items-center px-2\")))}}) {\n\t\t\tif uiutils.Eq(vBrand, \"show\") {\n\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"center\", BoxProps: box.BoxProps{Class: \"shrink-0\", Attrs: uiutils.Attrs(\"data-slot\", \"brand\")}}) {\n\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"layers\", Size: 24})\n\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"base\", Weight: \"bold\", TextProps: text.TextProps{Class: uiutils.S(uiutils.Cond(uiutils.T(vNamed), \"\", \"sr-only\"))}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vNav, \"brand\")) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif uiutils.Gt(uiutils.Len(uiutils.Get(vNav, \"links\")), float64(0)) {\n\t\t\t\t@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl(\"{0}, {1}\", uiutils.Get(vNav, \"label\"), vLandmarkLabel)), uiutils.Get(vNav, \"label\")), Class: uiutils.Cnv(\"flex-1\")}) {\n\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col gap-2 p-0\", Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\t\tfor _, vL := range uiutils.L(uiutils.Get(vNav, \"links\")) {\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"links-row\")}}) {\n\t\t\t\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vL, \"href\"), Class: uiutils.Cnv(uiutils.Cnv(\"flex items-center gap-4 rounded py-2 text-sm\", uiutils.Cond(uiutils.T(vNamed), \"px-4\", \"justify-center px-2\"), uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vL, \"id\"), uiutils.Get(vNav, \"current\"))), \"bg-muted font-medium\", \"\"))), Current: uiutils.Eq(uiutils.Get(vL, \"id\"), uiutils.Get(vNav, \"current\")), Size: \"sm\", Testid: \"item\"}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vL, \"icon\")), Size: 16})\n\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cond(uiutils.T(vNamed), \"\", \"sr-only\"))}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vL, \"name\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif uiutils.Eq(vMode, \"collapsed\") {\n\t\t\t\t@compose.ButtonPlain(compose.ButtonPlainProps{ButtonProps: button.ButtonProps{Type: \"button\", Class: \"inline-flex size-10 items-center justify-center rounded text-muted-foreground\", Attrs: uiutils.Attrs(\"aria-label\", uiutils.Get(vNav, \"expand\"), \"aria-expanded\", uiutils.Cond(uiutils.T(uiutils.Eq(vMode, \"wide\")), \"true\", \"false\"), \"data-slot\", \"toggle\")}}) {\n\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"panel-left\", Size: 20})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif uiutils.T(uiutils.And(uiutils.Eq(vMode, \"twolevel\"), uiutils.Gt(uiutils.Len(uiutils.Get(vNav, \"sub\")), float64(0)))) {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex w-56 flex-col gap-4 px-4 py-6\", uiutils.Cond(uiutils.T(uiutils.Eq(vSide, \"end\")), \"border-r border-border\", \"border-l border-border\"))), Attrs: uiutils.Attrs(\"data-slot\", \"subnav\")}}) {\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{Class: \"px-4\"}}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vNav, \"subTitle\")) }\n\t\t\t\t}\n\t\t\t\t@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl(\"{0}, {1}\", uiutils.Get(vNav, \"subTitle\"), vLandmarkLabel)), uiutils.Get(vNav, \"subTitle\"))}) {\n\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col gap-2 p-0\"}}) {\n\t\t\t\t\t\tfor _, vS := range uiutils.L(uiutils.Get(vNav, \"sub\")) {\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"sub-row\")}}) {\n\t\t\t\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vS, \"href\"), Class: uiutils.Cnv(uiutils.Cnv(\"flex items-center gap-4 rounded py-2 text-sm\", uiutils.Cond(uiutils.T(true), \"px-4\", \"justify-center px-2\"), uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vS, \"id\"), uiutils.Get(vNav, \"subCurrent\"))), \"bg-muted font-medium\", \"\"))), Current: uiutils.Eq(uiutils.Get(vS, \"id\"), uiutils.Get(vNav, \"subCurrent\")), Size: \"sm\", Testid: \"item\"}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vS, \"icon\")), Size: 16})\n\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: uiutils.S(uiutils.Cond(uiutils.T(true), \"\", \"sr-only\"))}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"name\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/shell-sidebar.templ",
      "target": "blocks/shell-sidebar.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "shell-sidebar",
  "registryDependencies": [
    "block",
    "box",
    "button-plain",
    "group",
    "inline",
    "kit-box",
    "kit-button",
    "kit-text",
    "list",
    "list-item",
    "lucide-icon",
    "menu-entry",
    "nav-block",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Shell Sidebar",
  "type": "registry:component"
}
