{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The top bar of DashboardShell: the brand (when no sidebar carries it), the links (when there is no sidebar), an optional search field, and the signed-in person.",
  "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-topbar.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\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// ShellTopbarProps are the props of ShellTopbar; the values are the JSON shapes of the TypeScript props.\ntype ShellTopbarProps struct {\n\tNav any `json:\"nav\"`\n\tBrand any `json:\"brand\"`\n\tLinks any `json:\"links\"`\n\tSearch any `json:\"search\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The top bar of DashboardShell: the brand (when no sidebar carries it), the links (when there is no sidebar), an optional search field, and the signed-in person.\ntempl ShellTopbar(p ShellTopbarProps) {\n\t{{ vNav := p.Nav }}\n\t{{ vBrand := uiutils.Def(p.Brand, \"show\") }}\n\t{{ vLinks := uiutils.Def(p.Links, \"hide\") }}\n\t{{ vSearch := uiutils.Def(p.Search, \"show\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"header\", Class: \"flex h-16 shrink-0 items-center gap-6 border-b border-border bg-background px-6\", Attrs: uiutils.Attrs(\"aria-label\", vLandmarkLabel, \"data-slot\", \"topbar\")}}) {\n\t\tif uiutils.Eq(vBrand, \"show\") {\n\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@icons.LucideIcon(icons.LucideIconProps{Name: \"layers\", Size: 24})\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"base\", Weight: \"bold\", TextProps: text.TextProps{Class: uiutils.S(uiutils.Cond(uiutils.T(true), \"\", \"sr-only\"))}}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vNav, \"brand\")) }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif uiutils.T(uiutils.And(uiutils.Eq(vLinks, \"show\"), uiutils.Gt(uiutils.Len(uiutils.Get(vNav, \"links\")), float64(0)))) {\n\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(\"hidden lg:block\")}) {\n\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none items-center gap-2 p-0\"}}) {\n\t\t\t\t\tfor _, vL := range uiutils.L(uiutils.Get(vNav, \"links\")) {\n\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@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(true), \"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@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vL, \"icon\")), Size: 16})\n\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{ uiutils.Text(uiutils.Get(vL, \"name\")) }\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\tif uiutils.Eq(vSearch, \"show\") {\n\t\t\tif uiutils.Eq(vLinks, \"show\") {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"ml-auto hidden w-64 shrink-0 xl:block\"}}) {\n\t\t\t\t\t@SearchPalette(SearchPaletteProps{Label: uiutils.Get(vNav, \"search\"), Shortcut: uiutils.Get(vNav, \"shortcut\")})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t@SearchPalette(SearchPaletteProps{Label: uiutils.Get(vNav, \"search\"), Shortcut: uiutils.Get(vNav, \"shortcut\")})\n\t\t\t}\n\t\t}\n\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.And(uiutils.Eq(vLinks, \"show\"), uiutils.Eq(vSearch, \"show\"))), \"shrink-0\", \"ml-auto shrink-0\")), Attrs: uiutils.Attrs(\"data-slot\", \"user\")}}) {\n\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"bell\", Size: 20, Class: \"text-muted-foreground\"})\n\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vNav, \"userName\"), Ratio: \"1/1\", Class: uiutils.Cnv(\"size-8 shrink-0 rounded-full\")})\n\t\t}\n\t}\n}\n",
      "path": "blocks/shell-topbar.templ",
      "target": "blocks/shell-topbar.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "shell-topbar",
  "registryDependencies": [
    "block",
    "box",
    "group",
    "inline",
    "kit-box",
    "kit-text",
    "list",
    "list-item",
    "lucide-icon",
    "media-frame",
    "menu-entry",
    "nav-block",
    "search-palette",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Shell Topbar",
  "type": "registry:component"
}
