{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The projects of ProjectGrid as tiles: cards (picture, featured badge, category and year, title, summary, tags, two links), compact cards in four columns, captions over the pictures, or a bento where the first project takes a big tile.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * The projects of ProjectGrid as tiles: cards (picture, featured badge, category and year, title, summary, tags,\n * two links), compact cards in four columns, captions over the pictures, or a bento where the first project\n * takes a big tile.\n */\nimport { For, type JSX } from \"solid-js\";\nimport { Badge, Box, Group, Stack, Text, Title } from \"../compose\";\nimport { LucideIcon } from \"../icons/LucideIcon\";\nimport { ArticleBlock } from \"../components/article-block\";\nimport { MediaFrame } from \"../components/media-frame\";\nimport { MenuEntry } from \"../components/menu-entry\";\nimport { cn, tpl } from \"../utils\";\nimport type { Project, ProjectLabels } from \"../blocks/project-grid.types\";\n\nexport type ProjectTilesProps = {\n  projects: Project[];\n  labels: ProjectLabels;\n  layout?: \"cards\" | \"compact\" | \"overlay\" | \"bento\" | \"list\";\n};\n\nexport function ProjectTiles({ projects, labels, layout = \"cards\" }: ProjectTilesProps) {\n  const over = ((layout as string) === \"overlay\") ? true : ((layout as string) === \"bento\");\n  return (\n    <Box\n      class={\n        (layout as string) === \"compact\" ? \"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\"\n        : \"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\"\n      }\n      data-slot=\"items\"\n    >\n      <For each={projects ?? []}>{(p, iOf) => { const i = iOf(); return (\n        <ArticleBlock\n          class={cn(\n            \"flex flex-col gap-4\",\n            (over ? \"relative\" : \"rounded bg-card inset-ring inset-ring-border p-4\"),\n            ((((layout as string) === \"bento\") && (i === 0)) ? \"sm:col-span-2 lg:row-span-2\" : \"\")\n          )}\n          testid=\"item\"\n        >\n          <Box class={(over ? \"h-full\" : \"relative\")}>\n            <MediaFrame\n              alt={p.title}\n              src={p.image}\n              ratio={(((layout as string) === \"compact\") ? \"1/1\" : (over ? \"3/4\" : \"4/3\"))}\n              class={(over ? \"h-full\" : \"\")}\n            />\n            {(p.featured && ((layout as string) !== \"compact\")) ? (\n              <Badge variant=\"default\" size=\"default\" class=\"absolute left-4 top-4\">\n                {labels.featured}\n              </Badge>\n            ) : null}\n          </Box>\n          <Stack\n            gap=\"2\"\n            align=\"stretch\"\n            class={(over ? \"absolute right-4 bottom-4 left-4 rounded bg-background p-4\" : \"\")}\n          >\n            <Text size=\"xs\" class=\"text-muted-foreground\">\n              {tpl(\"{0}, {1}\", p.category, p.year)}\n            </Text>\n            <Title as={3} size={(((layout as string) === \"compact\") ? \"sm\" : \"lg\")} weight=\"semibold\">\n              {p.title}\n            </Title>\n            {((layout as string) !== \"compact\") ? (\n              <Text size=\"sm\" class=\"text-muted-foreground\">\n                {p.summary}\n              </Text>\n            ) : null}\n            {((layout as string) === \"cards\") ? (\n              <>\n                <Group gap=\"2\" class=\"flex-wrap\">\n                  <For each={p.tags ?? []}>{(k) => (\n                    <Badge variant=\"secondary\" size=\"sm\">\n                      {k}\n                    </Badge>\n                  )}</For>\n                </Group>\n                <Group gap=\"4\" class=\"pt-2\">\n                  <MenuEntry href={p.href} class=\"inline-flex items-center gap-2 text-sm font-medium\">\n                    {labels.case}\n                    <LucideIcon name=\"arrow-right\" size={16} />\n                  </MenuEntry>\n                  <MenuEntry href={p.href} class=\"inline-flex items-center gap-2 text-sm font-medium\">\n                    {labels.view}\n                    <LucideIcon name=\"external-link\" size={16} />\n                  </MenuEntry>\n                </Group>\n              </>\n            ) : null}\n          </Stack>\n        </ArticleBlock>\n      ); }}</For>\n    </Box>\n  );\n}\n",
      "path": "components/project-tiles.tsx",
      "target": "components/project-tiles.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "solid",
      "component"
    ]
  },
  "name": "project-tiles",
  "registryDependencies": [
    "article-block",
    "compose",
    "lucide-icon",
    "media-frame",
    "menu-entry",
    "project-grid",
    "utils"
  ],
  "runtime": "solid",
  "title": "Project Tiles",
  "type": "registry:component"
}
