{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Grey blocks in the shape of what is coming: cards, a list or an article.",
  "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/skeleton-layout.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\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// SkeletonLayoutProps are the props of SkeletonLayout; the values are the JSON shapes of the TypeScript props.\ntype SkeletonLayoutProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLabel any `json:\"label\"`\n\tLines any `json:\"lines\"`\n\tShape any `json:\"shape\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The loading state of a page: grey blocks in the shape of the content that is coming (cards, a list of rows or an article). Axes: shape (cards, list, article), tone. The label tells assistive technology that the content is loading. The shimmer itself belongs to the Skeleton part.\ntempl SkeletonLayout(p SkeletonLayoutProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLabel := p.Label }}\n\t{{ vLines := p.Lines }}\n\t{{ vShape := uiutils.Def(p.Shape, \"cards\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\t\t@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: \"div\", Class: \"w-full\", Attrs: uiutils.Attrs(\"role\", \"status\", \"aria-label\", vLabel, \"data-shape\", vShape, \"data-slot\", \"skeleton\")}}) {\n\t\t\tif uiutils.Eq(vShape, \"cards\") {\n\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-3\", BoxProps: box.BoxProps{Class: \"gap-4\"}}) {\n\t\t\t\t\tfor range uiutils.L(vLines) {\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", BoxProps: box.BoxProps{Class: \"rounded bg-card inset-ring inset-ring-border p-4\", Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"aspect-video w-full\"}})\n\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"h-4 w-2/3\"}})\n\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"h-4 w-full\"}})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if uiutils.Eq(vShape, \"list\") {\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\tfor range uiutils.L(vLines) {\n\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"size-10 shrink-0 rounded-full\"}})\n\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{Class: \"flex-1\"}}) {\n\t\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"h-4 w-1/3\"}})\n\t\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"h-4 w-full\"}})\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} else {\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"mx-auto max-w-2xl\"}}) {\n\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"h-8 w-3/4\"}})\n\t\t\t\t\tfor range uiutils.L(vLines) {\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"h-4 w-full\"}})\n\t\t\t\t\t\t\t@compose.Skeleton(compose.SkeletonProps{BoxProps: box.BoxProps{Class: \"h-4 w-5/6\"}})\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",
      "path": "blocks/skeleton-layout.templ",
      "target": "blocks/skeleton-layout.templ"
    }
  ],
  "meta": {
    "category": "dashboard",
    "group": "states",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "skeleton-layout",
  "registryDependencies": [
    "block",
    "grid",
    "group",
    "kit-box",
    "section-frame",
    "skeleton",
    "stack",
    "utils"
  ],
  "runtime": "templ",
  "title": "Skeleton Layout",
  "type": "registry:block"
}
