{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A top bar in four shapes: inline, split around the brand, with a search field, and transparent over a picture.",
  "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/nav-bar.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/ui/link\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// NavBarProps are the props of NavBar; the values are the JSON shapes of the TypeScript props.\ntype NavBarProps struct {\n\tLabel any `json:\"label\"`\n\tBrand any `json:\"brand\"`\n\tBrandHref any `json:\"brandHref\"`\n\tLinks any `json:\"links\"`\n\tCurrent any `json:\"current\"`\n\tActions any `json:\"actions\"`\n\tSearch any `json:\"search\"`\n\tTone any `json:\"tone\"`\n\tLayout any `json:\"layout\"`\n\tOver any `json:\"over\"`\n\tSkip any `json:\"skip\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.\ntempl NavBar(p NavBarProps) {\n\t{{ vLabel := p.Label }}\n\t{{ vBrand := p.Brand }}\n\t{{ vBrandHref := p.BrandHref }}\n\t{{ vLinks := p.Links }}\n\t{{ vCurrent := uiutils.Def(p.Current, \"\") }}\n\t{{ vActions := p.Actions }}\n\t{{ vSearch := p.Search }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"inline\") }}\n\t{{ vOver := uiutils.Def(p.Over, \"none\") }}\n\t{{ vSkip := p.Skip }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"header\", Class: uiutils.S(uiutils.Cnv(\"relative\", uiutils.Cond(uiutils.T(uiutils.Eq(vTone, \"inverse\")), \"border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background\", \"border-b border-border bg-background\"), uiutils.Cond(uiutils.T(uiutils.Eq(vOver, \"media\")), \"isolate overflow-hidden border-0 bg-transparent\", \"\"))), Attrs: uiutils.Attrs(\"data-layout\", vLayout, \"data-tone\", vTone, \"aria-label\", vLandmarkLabel, \"data-slot\", \"nav-bar\")}}) {\n\t\t@OverMedia(OverMediaProps{On: uiutils.Eq(vOver, \"media\"), Alt: vBrand})\n\t\tif uiutils.T(vSkip) {\n\t\t\t@compose.LinkPlain(compose.LinkPlainProps{LinkProps: link.LinkProps{Href: \"#main-content\", Class: \"sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border\", Attrs: uiutils.Attrs(\"data-slot\", \"skip-link\")}}) {\n\t\t\t\t{ uiutils.Text(vSkip) }\n\t\t\t}\n\t\t}\n\t\t@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: \"mx-auto w-full max-w-6xl px-4\", Attrs: uiutils.Attrs(\"data-slot\", \"container\")}}) {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex flex-wrap items-center justify-between gap-4\", \"py-4\"))}}) {\n\t\t\t\tif uiutils.Eq(vLayout, \"split\") {\n\t\t\t\t\t@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl(\"{0}, {1}\", vLabel, vLandmarkLabel)), vLabel), Class: uiutils.Cnv(\"w-full\"), Testid: \"site-nav\"}) {\n\t\t\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-3\", BoxProps: box.BoxProps{Class: \"w-full items-center gap-4\"}}) {\n\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"md:justify-self-start\"}}) {\n\t\t\t\t\t\t\t\t@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent, Side: \"left\"})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"text-center\"}}) {\n\t\t\t\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: vBrandHref, Class: uiutils.Cnv(\"text-lg font-medium\"), Testid: \"brand\"}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(vBrand) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", Justify: \"end\", BoxProps: box.BoxProps{Class: \"flex-wrap md:justify-self-end\"}}) {\n\t\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t\t@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent, Side: \"right\"})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@NavActions(NavActionsProps{Login: uiutils.Get(vActions, \"login\"), LoginHref: uiutils.Get(vActions, \"loginHref\"), Cta: uiutils.Get(vActions, \"cta\"), CtaHref: uiutils.Get(vActions, \"href\"), Actions: uiutils.Get(vActions, \"mode\"), Tone: vTone, ThemeLabel: uiutils.Get(vActions, \"themeLabel\")})\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} else {\n\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: vBrandHref, Class: uiutils.Cnv(\"text-lg font-medium\"), Testid: \"brand\"}) {\n\t\t\t\t\t\t{ uiutils.Text(vBrand) }\n\t\t\t\t\t}\n\t\t\t\t\tif uiutils.Eq(vLayout, \"search\") {\n\t\t\t\t\t\t@SearchPalette(SearchPaletteProps{Label: uiutils.Get(vSearch, \"label\"), Shortcut: uiutils.Get(vSearch, \"shortcut\")})\n\t\t\t\t\t}\n\t\t\t\t\t@NavBarMenu(NavBarMenuProps{Label: vLabel, Links: vLinks, Current: vCurrent, LandmarkLabel: vLandmarkLabel})\n\t\t\t\t\t@NavActions(NavActionsProps{Login: uiutils.Get(vActions, \"login\"), LoginHref: uiutils.Get(vActions, \"loginHref\"), Cta: uiutils.Get(vActions, \"cta\"), CtaHref: uiutils.Get(vActions, \"href\"), Actions: uiutils.Get(vActions, \"mode\"), Tone: vTone, ThemeLabel: uiutils.Get(vActions, \"themeLabel\")})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/nav-bar.templ",
      "target": "blocks/nav-bar.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "nav-bar",
  "registryDependencies": [
    "block",
    "box",
    "container",
    "grid",
    "group",
    "kit-box",
    "kit-link",
    "link-plain",
    "menu-entry",
    "nav-actions",
    "nav-bar-menu",
    "nav-block",
    "nav-links",
    "over-media",
    "search-palette",
    "utils"
  ],
  "runtime": "templ",
  "title": "Nav Bar",
  "type": "registry:block"
}
