{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A photo gallery with a dialog for the selected picture. Additive to Photo gallery.",
  "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/lightbox-gallery.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// LightboxGalleryProps are the props of LightboxGallery; the values are the JSON shapes of the TypeScript props.\ntype LightboxGalleryProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tPhotos any `json:\"photos\"`\n\tEmpty any `json:\"empty\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n\tCaptions any `json:\"captions\"`\n\tLightbox any `json:\"lightbox\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Photos in a grid, a masonry of mixed heights, or a featured picture over thumbnails, with a dialog that shows the selected photo. Static markup: the dialog open state is a prop. Axes: layout (grid, masonry, featured), captions (show, hide), lightbox (open, closed).\ntempl LightboxGallery(p LightboxGalleryProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vPhotos := p.Photos }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"grid\") }}\n\t{{ vCaptions := uiutils.Def(p.Captions, \"show\") }}\n\t{{ vLightbox := uiutils.Def(p.Lightbox, \"closed\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vPhotos), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"image\", Title: vEmpty})\n\t\t} else {\n\t\t\tif uiutils.Eq(vLayout, \"featured\") {\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"featured\")}}) {\n\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.FirstOf(vPhotos, \"title\"), Src: uiutils.FirstOf(vPhotos, \"image\")})\n\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", Justify: \"between\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"base\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.FirstOf(vPhotos, \"title\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, \"counter\"), float64(1), uiutils.Len(vPhotos))) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"sm\", Layout: \"icon\", ButtonProps: button.ButtonProps{Type: \"button\", AriaLabel: uiutils.S(uiutils.Get(vLabels, \"previous\"))}}) {\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"chevron-left\", Size: 16})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"outline\", Size: \"sm\", Layout: \"icon\", ButtonProps: button.ButtonProps{Type: \"button\", AriaLabel: uiutils.S(uiutils.Get(vLabels, \"next\"))}}) {\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"chevron-right\", Size: 16})\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\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"grid grid-cols-3 gap-2 sm:grid-cols-9\", Attrs: uiutils.Attrs(\"data-slot\", \"thumbs\")}}) {\n\t\t\t\t\t\tfor vI, vP := range uiutils.L(vPhotos) {\n\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, \"title\"), Src: uiutils.Get(vP, \"image\"), Ratio: \"1/1\", Class: uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(float64(vI), float64(0))), \"ring-2 ring-foreground\", \"\"))})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"masonry\")), \"columns-1 gap-4 sm:columns-2 lg:columns-3\", \"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\")), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\tfor _, vP := range uiutils.L(vPhotos) {\n\t\t\t\t\t\t@FigureBlock(FigureBlockProps{Class: uiutils.Cnv(uiutils.Cnv(\"relative flex flex-col gap-2\", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"masonry\")), \"mb-4 break-inside-avoid\", \"\"))), Testid: \"item\"}) {\n\t\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, \"title\"), Src: uiutils.Get(vP, \"image\"), Ratio: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"masonry\")), uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vP, \"size\"), \"tall\")), \"3/4\", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vP, \"size\"), \"wide\")), \"16/9\", uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vP, \"size\"), \"large\")), \"4/3\", \"1/1\"))), \"4/3\")})\n\t\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"ghost\", Size: \"sm\", Layout: \"icon\", ButtonProps: button.ButtonProps{Type: \"button\", Class: \"absolute right-2 top-2 bg-background\", AriaLabel: uiutils.S(uiutils.Get(vLabels, \"open\"))}}) {\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"arrow-up-right\", Size: 16})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif uiutils.T(uiutils.And(uiutils.Eq(vCaptions, \"show\"), uiutils.Or(uiutils.Eq(vLayout, \"grid\"), uiutils.Eq(vLayout, \"masonry\")))) {\n\t\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"text-sm text-muted-foreground\", Attrs: uiutils.Attrs(\"data-slot\", \"caption\")}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vP, \"title\")) }\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\t@LightboxStage(LightboxStageProps{Photos: vPhotos, Labels: vLabels, Captions: vCaptions, Lightbox: vLightbox})\n\t\t}\n\t}\n}\n",
      "path": "blocks/lightbox-gallery.templ",
      "target": "blocks/lightbox-gallery.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "restaurant",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "lightbox-gallery",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "figure-block",
    "group",
    "kit-box",
    "kit-button",
    "kit-text",
    "lightbox-stage",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Lightbox Gallery",
  "type": "registry:block"
}
