{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Skip link, brand, navigation, theme button and an optional call to action.",
  "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/site-header.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/ui/link\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// SiteHeaderProps are the props of SiteHeader; the values are the JSON shapes of the TypeScript props.\ntype SiteHeaderProps struct {\n\tLabels any `json:\"labels\"`\n\tRoutes any `json:\"routes\"`\n\tCurrent any `json:\"current\"`\n\tLayout any `json:\"layout\"`\n\tPosition any `json:\"position\"`\n\tActions any `json:\"actions\"`\n\tCta any `json:\"cta\"`\n\tCtaHref any `json:\"ctaHref\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The page header: a skip link to the main content, the brand, the two navigation links (the current one carries aria-current) and the theme button. `current` is the route area. Axes: layout (inline, stacked), position (static, sticky), actions (none, cta).\ntempl SiteHeader(p SiteHeaderProps) {\n\t{{ vLabels := p.Labels }}\n\t{{ vRoutes := p.Routes }}\n\t{{ vCurrent := p.Current }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"inline\") }}\n\t{{ vPosition := uiutils.Def(p.Position, \"static\") }}\n\t{{ vActions := uiutils.Def(p.Actions, \"none\") }}\n\t{{ vCta := p.Cta }}\n\t{{ vCtaHref := p.CtaHref }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"header\", Class: uiutils.S(uiutils.Cnv(\"border-b border-border bg-background\", uiutils.Cond(uiutils.T(uiutils.Eq(vPosition, \"sticky\")), \"sticky top-0 z-40\", \"\"))), Attrs: uiutils.Attrs(\"data-layout\", vLayout, \"aria-label\", vLandmarkLabel, \"data-slot\", \"site-header\")}}) {\n\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{ uiutils.Text(uiutils.Get(vLabels, \"skip\")) }\n\t\t}\n\t\t@compose.Container(compose.ContainerProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"mx-auto w-full max-w-6xl px-4\", \"flex flex-wrap gap-4 py-4\", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"stacked\")), \"flex-col items-center\", \"items-center justify-between\"))), Attrs: uiutils.Attrs(\"data-slot\", \"container\")}}) {\n\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vRoutes, \"home\"), Class: uiutils.Cnv(\"text-lg font-medium\"), Testid: \"brand\"}) {\n\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"brand\")) }\n\t\t\t}\n\t\t\t@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl(\"{0}, {1}\", uiutils.Get(vLabels, \"nav\"), vLandmarkLabel)), uiutils.Get(vLabels, \"nav\")), Testid: \"site-nav\"}) {\n\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vRoutes, \"home\"), Class: uiutils.Cnv(\"font-semibold\"), Current: uiutils.Eq(vCurrent, \"home\"), Testid: \"nav-link\"}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"home\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vRoutes, \"pricing\"), Class: uiutils.Cnv(\"font-semibold\"), Current: uiutils.Eq(vCurrent, \"pricing\"), Testid: \"nav-link\"}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"pricing\")) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"sm\", ButtonProps: button.ButtonProps{}}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"theme\")) }\n\t\t\t\t}\n\t\t\t\tif uiutils.T(uiutils.And(uiutils.Eq(vActions, \"cta\"), vCta)) {\n\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"sm\", ButtonProps: button.ButtonProps{Href: uiutils.URL(vCtaHref, false)}}) {\n\t\t\t\t\t\t{ uiutils.Text(vCta) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/site-header.templ",
      "target": "blocks/site-header.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "navigation",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "site-header",
  "registryDependencies": [
    "block",
    "button",
    "container",
    "group",
    "kit-box",
    "kit-button",
    "kit-link",
    "link-plain",
    "menu-entry",
    "nav-block",
    "utils"
  ],
  "runtime": "templ",
  "title": "Site Header",
  "type": "registry:block"
}
