{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gallery-19",
  "type": "registry:block",
  "description": "Asset library grid with aspect-ratio, density and detail toggles in a toolbar.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/gallery/gallery-19.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  Grid2x2,\n  Grid3x3,\n  LayoutGrid,\n} from \"@designali/icons\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst assets = [\n  { name: \"designali-og.jpg\", size: \"4.2 MB\", dims: \"3840x2160\", gradient: 'url(\"/og.jpg\") center / cover' },\n  { name: \"ali-imam-portrait.jpg\", size: \"2.8 MB\", dims: \"4000x3000\", gradient: 'url(\"/ali.jpg\") center / cover' },\n  { name: \"hero-1.jpg\", size: \"1.1 MB\", dims: \"2048x2048\", gradient: 'url(\"/img/hero-1.jpg\") center / cover' },\n  { name: \"hero-2.jpg\", size: \"3.4 MB\", dims: \"5472x3648\", gradient: 'url(\"/img/hero-2.jpg\") center / cover' },\n  { name: \"dashboard-light.jpg\", size: \"6.0 MB\", dims: \"3000x3000\", gradient: 'url(\"/img/dashboard-1-light.jpg\") center / cover' },\n  { name: \"dashboard-dark.jpg\", size: \"2.2 MB\", dims: \"3200x4000\", gradient: 'url(\"/img/dashboard-1-dark.jpg\") center / cover' },\n  { name: \"chat-light.jpg\", size: \"5.1 MB\", dims: \"6000x3376\", gradient: 'url(\"/img/chat-1-light.jpg\") center / cover' },\n  { name: \"login-screen.jpg\", size: \"0.8 MB\", dims: \"1600x1200\", gradient: 'url(\"/img/login-1.jpg\") center / cover' },\n  { name: \"stock-design.jpg\", size: \"7.3 MB\", dims: \"7200x2400\", gradient: 'url(\"/stock/design.jpg\") center / cover' },\n  { name: \"stock-development.jpg\", size: \"0.6 MB\", dims: \"1200x600\", gradient: 'url(\"/stock/development.jpg\") center / cover' },\n  { name: \"stock-strategy.jpg\", size: \"3.9 MB\", dims: \"4896x3264\", gradient: 'url(\"/stock/strategy.jpg\") center / cover' },\n  { name: \"wallpaper-2.jpg\", size: \"2.5 MB\", dims: \"2880x1800\", gradient: 'url(\"/stock/wallpaper-2.jpg\") center / cover' },\n]\n\nconst densities = [\n  { id: \"comfortable\", label: \"Large\", icon: Grid2x2, cols: \"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3\" },\n  { id: \"default\", label: \"Medium\", icon: LayoutGrid, cols: \"grid-cols-2 lg:grid-cols-4\" },\n  { id: \"compact\", label: \"Small\", icon: Grid3x3, cols: \"grid-cols-3 sm:grid-cols-4 lg:grid-cols-6\" },\n] as const\n\nconst ratios = { Square: \"aspect-square\", Landscape: \"aspect-[4/3]\", Portrait: \"aspect-[3/4]\" } as const\ntype Ratio = keyof typeof ratios\n\nexport default function Gallery19() {\n  const [density, setDensity] = useState<(typeof densities)[number][\"id\"]>(\"default\")\n  const [ratio, setRatio] = useState<Ratio>(\"Square\")\n  const [details, setDetails] = useState(true)\n  const cols = densities.find((d) => d.id === density)!.cols\n\n  return (\n    <section className=\"w-full bg-background py-16\">\n      <div className=\"mx-auto max-w-7xl px-6\">\n        <div className=\"flex flex-col gap-4 border-b border-border pb-4 md:flex-row md:items-center md:justify-between\">\n          <div>\n            <h2 className=\"text-2xl font-semibold tracking-tight\">Designali brand assets</h2>\n            <p className=\"text-sm text-muted-foreground\">{assets.length} files in Designali / 2025</p>\n          </div>\n          <div className=\"flex flex-wrap items-center gap-3\">\n            <div className=\"flex border border-border\" role=\"group\" aria-label=\"Aspect ratio\">\n              {(Object.keys(ratios) as Ratio[]).map((r) => (\n                <button\n                  key={r}\n                  type=\"button\"\n                  onClick={() => setRatio(r)}\n                  aria-pressed={ratio === r}\n                  className={cn(\"px-3 py-1.5 text-xs\", ratio === r ? \"bg-foreground text-background\" : \"hover:bg-muted\")}\n                >\n                  {r}\n                </button>\n              ))}\n            </div>\n            <div className=\"flex border border-border\" role=\"group\" aria-label=\"Grid density\">\n              {densities.map((d) => (\n                <button\n                  key={d.id}\n                  type=\"button\"\n                  aria-label={d.label}\n                  aria-pressed={density === d.id}\n                  onClick={() => setDensity(d.id)}\n                  className={cn(\"flex size-8 items-center justify-center\", density === d.id ? \"bg-foreground text-background\" : \"hover:bg-muted\")}\n                >\n                  <d.icon className=\"size-4\" />\n                </button>\n              ))}\n            </div>\n            <label className=\"flex cursor-pointer items-center gap-2 text-xs\">\n              <input type=\"checkbox\" checked={details} onChange={(e) => setDetails(e.target.checked)} className=\"accent-foreground\" />\n              Show details\n            </label>\n          </div>\n        </div>\n        <div className={cn(\"mt-6 grid gap-3\", cols)}>\n          {assets.map((asset) => (\n            <figure key={asset.name} className=\"group min-w-0\">\n              <div\n                className={cn(\"w-full border border-border transition-[aspect-ratio] group-hover:opacity-90\", ratios[ratio])}\n                style={{ background: asset.gradient }}\n              />\n              {details && density !== \"compact\" && (\n                <figcaption className=\"mt-2 min-w-0\">\n                  <p className=\"truncate text-sm font-medium\">{asset.name}</p>\n                  <p className=\"text-xs text-muted-foreground tabular-nums\">\n                    {asset.dims} - {asset.size}\n                  </p>\n                </figcaption>\n              )}\n            </figure>\n          ))}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "900px"
  },
  "categories": [
    "gallery"
  ]
}