{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Features as a list of disclosures, the first one open, with an optional 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/feature-accordion.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/disclosure\"\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// FeatureAccordionProps are the props of FeatureAccordion; the values are the JSON shapes of the TypeScript props.\ntype FeatureAccordionProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tFeatures any `json:\"features\"`\n\tEmpty any `json:\"empty\"`\n\tExpand any `json:\"expand\"`\n\tMedia any `json:\"media\"`\n\tMultiple any `json:\"multiple\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tImage any `json:\"image\"`\n\tImageAlt any `json:\"imageAlt\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Features as a list of disclosures: icon and title in the summary, the text when open. Axes: expand (first: the first one is open, none: all closed), media (none, image: a picture beside the list), tone, density.\ntempl FeatureAccordion(p FeatureAccordionProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vFeatures := p.Features }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vExpand := uiutils.Def(p.Expand, \"first\") }}\n\t{{ vMedia := uiutils.Def(p.Media, \"none\") }}\n\t{{ vMultiple := uiutils.Def(p.Multiple, false) }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vImage := p.Image }}\n\t{{ vImageAlt := p.ImageAlt }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vMedia, \"image\")), \"split\", \"stack\"), Media: map[string]any{\"show\": uiutils.Eq(vMedia, \"image\")}, LandmarkLabel: vLandmarkLabel, Aside: featureAccordionFill1(p, vTitle, vImage, vImageAlt)}) {\n\t\tif uiutils.Eq(uiutils.Len(vFeatures), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"layout-grid\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", Align: \"stretch\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\tfor vI, vF := range uiutils.L(vFeatures) {\n\t\t\t\t\t@compose.Disclosure(compose.DisclosureProps{Variant: \"item\", DisclosureProps: disclosure.DisclosureProps{Name: uiutils.S(uiutils.Cond(uiutils.T(vMultiple), nil, uiutils.Tpl(\"{0}-accordion\", uiutils.Coalesce(vId, \"accordion\")))), Open: uiutils.T(uiutils.And(uiutils.Eq(vExpand, \"first\"), uiutils.Eq(float64(vI), float64(0)))), Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t@compose.Summary(compose.SummaryProps{Variant: \"item\", SummaryProps: disclosure.SummaryProps{}}) {\n\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"flex min-w-0 items-center justify-start gap-4\"}}) {\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vF, \"icon\")), Size: 20})\n\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-base font-semibold\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vF, \"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\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"pb-4 text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vF, \"text\")) }\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\ntempl featureAccordionFill1(p FeatureAccordionProps, vTitle any, vImage any, vImageAlt any) {\n\t@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Src: vImage, Ratio: \"4/3\"})\n}\n",
      "path": "blocks/feature-accordion.templ",
      "target": "blocks/feature-accordion.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "features",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "feature-accordion",
  "registryDependencies": [
    "disclosure",
    "empty-state",
    "inline",
    "kit-box",
    "kit-disclosure",
    "kit-text",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "summary",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Feature Accordion",
  "type": "registry:block"
}
