{
  "name": "grid",
  "type": "ui:component",
  "title": "Grid, BentoGrid & BentoCard",
  "description": "Responsive 1/2/3/4-column Grid and multi-span BentoGrid / BentoCard feature showcase layout.",
  "dependencies": [],
  "registryDependencies": [
    "theme"
  ],
  "files": [
    {
      "path": "src/ui/grid.tsx",
      "target": "src/ui/grid.tsx",
      "sha256": "482625d4ec09ffca5202aab7a5a57284b9e0a8f096cf498f98b9518f99a4d769",
      "content": "import './theme.css';\nimport { scope, type View } from '@fierst/aster';\n\nconst gridScope = scope`\n  :scope { display: grid; grid-template-columns: 1fr; gap: 1rem; min-width: 0; }\n  @media (min-width: 640px) {\n    :scope.cols-2, :scope.cols-3, :scope.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n  }\n  @media (min-width: 960px) {\n    :scope.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n    :scope.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n  }\n`;\n\nconst bentoCardScope = scope`\n  :scope {\n    display: flex;\n    flex-direction: column;\n    justify-content: space-between;\n    gap: 0.85rem;\n    padding: 1.25rem;\n    border-radius: var(--aster-radius-lg);\n    border: 1px solid var(--aster-border);\n    background: var(--aster-surface);\n    box-shadow: var(--aster-shadow-xs);\n    min-width: 0;\n    transition: border-color var(--aster-dur-fast), box-shadow var(--aster-dur-fast);\n  }\n  :scope:hover { border-color: var(--aster-border-strong); box-shadow: var(--aster-shadow-sm); }\n  @media (min-width: 960px) {\n    :scope.span-2 { grid-column: span 2; }\n    :scope.row-2 { grid-row: span 2; }\n  }\n  .bc-title { margin: 0; font-size: 0.96rem; font-weight: 600; color: var(--aster-on-surface); }\n  .bc-desc { margin: 0.25rem 0 0; font-size: 0.84rem; color: var(--aster-on-surface-muted); }\n`;\n\nexport function Grid({\n  cols = 3,\n  gap,\n  class: extraClass,\n  children,\n}: {\n  cols?: 1 | 2 | 3 | 4;\n  gap?: string;\n  class?: string;\n  children?: View;\n}) {\n  return (\n    <div\n      class={[gridScope, `cols-${cols}`, extraClass].filter(Boolean).join(' ')}\n      style={gap ? { gap } : undefined}\n    >\n      {children}\n    </div>\n  );\n}\n\nexport function BentoGrid(props: { gap?: string; class?: string; children?: View }) {\n  return (\n    <Grid cols={3} gap={props.gap ?? '1rem'} class={props.class}>\n      {props.children}\n    </Grid>\n  );\n}\n\nexport function BentoCard({\n  title,\n  description,\n  colSpan = 1,\n  rowSpan = 1,\n  class: extraClass,\n  children,\n}: {\n  title: string;\n  description?: string;\n  colSpan?: 1 | 2;\n  rowSpan?: 1 | 2;\n  class?: string;\n  children?: View;\n}) {\n  return (\n    <article\n      class={[\n        bentoCardScope,\n        colSpan === 2 ? 'span-2' : '',\n        rowSpan === 2 ? 'row-2' : '',\n        extraClass,\n      ]\n        .filter(Boolean)\n        .join(' ')}\n    >\n      <div>\n        <h3 class=\"bc-title\">{title}</h3>\n        {description ? <p class=\"bc-desc\">{description}</p> : null}\n      </div>\n      {children}\n    </article>\n  );\n}\n"
    }
  ]
}
