{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-bento-grid",
  "title": "BentoGrid",
  "description": "Grid assimétrico com spans configuráveis para tiles de feature/mídia.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@lema-ds/skeleton"
  ],
  "files": [
    {
      "path": "components/ds/ds-bento-grid.tsx",
      "content": "import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Skeleton } from \"@/components/ui/skeleton\"\n\n// ── Types ──\n\nexport type BentoGridItemSpan = 1 | 2 | 3 | 4\n\nexport type BentoGridProps = React.HTMLAttributes<HTMLDivElement>\n\nexport interface BentoGridItemProps\n  extends\n    Omit<React.HTMLAttributes<HTMLDivElement>, \"title\">,\n    VariantProps<typeof bentoGridItemVariants> {\n  title?: React.ReactNode\n  description?: React.ReactNode\n  icon?: React.ElementType\n  /** Background layer rendered behind the content (image, gradient, chart). */\n  media?: React.ReactNode\n  /** Heading level for `title` — adjust to keep document heading order valid when the grid sits right below an `h1`/`h2`. */\n  titleAs?: \"h2\" | \"h3\" | \"h4\"\n  loading?: boolean\n}\n\n// ── Variants ──\n\nexport const bentoGridVariants = cva(\n  \"grid auto-rows-[minmax(12rem,auto)] grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-4\"\n)\n\nexport const bentoGridItemVariants = cva(\n  \"group relative flex flex-col justify-end overflow-hidden rounded-2xl border border-border bg-card p-6 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-lg\",\n  {\n    variants: {\n      colSpan: {\n        1: \"col-span-2 md:col-span-1\",\n        2: \"col-span-2\",\n        3: \"col-span-2 md:col-span-3\",\n        4: \"col-span-2 md:col-span-4\",\n      },\n      rowSpan: {\n        1: \"row-span-1\",\n        2: \"row-span-2\",\n        3: \"row-span-3\",\n        4: \"row-span-4\",\n      },\n    },\n    defaultVariants: { colSpan: 1, rowSpan: 1 },\n  }\n)\n\nexport const bentoGridItemIconVariants = cva(\n  \"mb-3 flex size-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary\"\n)\n\nexport const bentoGridItemTitleVariants = cva(\"font-semibold text-foreground\")\n\nexport const bentoGridItemDescriptionVariants = cva(\n  \"text-sm leading-relaxed text-muted-foreground\"\n)\n\n// ── BentoGrid ──\n\nexport const BentoGrid = React.forwardRef<HTMLDivElement, BentoGridProps>(\n  ({ className, ...props }, ref) => (\n    <div\n      ref={ref}\n      className={cn(bentoGridVariants(), className)}\n      data-slot=\"bento-grid\"\n      {...props}\n    />\n  )\n)\nBentoGrid.displayName = \"BentoGrid\"\n\n// ── BentoGridItem ──\n\nexport const BentoGridItem = React.forwardRef<\n  HTMLDivElement,\n  BentoGridItemProps\n>(\n  (\n    {\n      title,\n      description,\n      icon: Icon,\n      media,\n      titleAs: TitleTag = \"h3\",\n      colSpan = 1,\n      rowSpan = 1,\n      loading = false,\n      className,\n      children,\n      ...props\n    },\n    ref\n  ) => {\n    if (loading) {\n      return (\n        <div\n          ref={ref}\n          className={cn(bentoGridItemVariants({ colSpan, rowSpan }), className)}\n          data-slot=\"bento-grid-item-skeleton\"\n        >\n          <Skeleton className=\"mb-3 size-10 rounded-xl\" />\n          <Skeleton className=\"h-5 w-32 rounded-md\" />\n          <Skeleton className=\"mt-2 h-4 w-full rounded-md\" />\n        </div>\n      )\n    }\n\n    return (\n      <div\n        ref={ref}\n        className={cn(bentoGridItemVariants({ colSpan, rowSpan }), className)}\n        data-slot=\"bento-grid-item\"\n        {...props}\n      >\n        {media && (\n          <div className=\"absolute inset-0 -z-10\" aria-hidden=\"true\">\n            {media}\n          </div>\n        )}\n\n        {children ?? (\n          <>\n            {Icon && (\n              <div\n                className={cn(bentoGridItemIconVariants())}\n                aria-hidden=\"true\"\n              >\n                <Icon className=\"size-5\" />\n              </div>\n            )}\n            {title && (\n              <TitleTag className={cn(bentoGridItemTitleVariants())}>\n                {title}\n              </TitleTag>\n            )}\n            {description && (\n              <p className={cn(bentoGridItemDescriptionVariants())}>\n                {description}\n              </p>\n            )}\n          </>\n        )}\n      </div>\n    )\n  }\n)\nBentoGridItem.displayName = \"BentoGridItem\"\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
