{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"marketing-gallery-carousel-gallery","type":"registry:block","title":"Carousel Gallery","files":[{"path":"components/blocks/marketing/gallery/carousel-gallery.tsx","content":"import * as React from 'react';\nimport { cn } from '@/lib/utils';\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { Button } from '@/components/ui/button';\n\ninterface GalleryImage {\n  src: string;\n  alt: string;\n  width: number;\n  height: number;\n}\n\nexport default function CarouselGallery() {\n  const [currentIndex, setCurrentIndex] = React.useState(0);\n\n  // Configuration options\n  const autoPlay = true;\n  const autoPlayInterval = 5000;\n  const showThumbnails = true;\n\n  // Static images array\n  const images: GalleryImage[] = [\n    {\n      src: 'https://images.unsplash.com/photo-1492684223066-81342ee5ff30?q=80&w=1470&auto=format&fit=crop',\n      alt: 'Modern architecture with glass and steel structures',\n      width: 1470,\n      height: 980,\n    },\n    {\n      src: 'https://images.unsplash.com/photo-1518998053901-5348d3961a04?q=80&w=1474&auto=format&fit=crop',\n      alt: 'Historic building with ornate details and columns',\n      width: 1474,\n      height: 982,\n    },\n    {\n      src: 'https://images.unsplash.com/photo-1486718448742-163732cd1544?q=80&w=1470&auto=format&fit=crop',\n      alt: 'Minimalist concrete structure with clean lines',\n      width: 1470,\n      height: 980,\n    },\n    {\n      src: 'https://images.unsplash.com/photo-1487958449943-2429e8be8625?q=80&w=1470&auto=format&fit=crop',\n      alt: 'Futuristic museum design with curved surfaces',\n      width: 1470,\n      height: 980,\n    },\n    {\n      src: 'https://images.unsplash.com/photo-1448630360428-65456885c650?q=80&w=1467&auto=format&fit=crop',\n      alt: 'Brutalist architectural style with raw concrete elements',\n      width: 1467,\n      height: 978,\n    },\n  ];\n\n  const prevSlide = () => {\n    setCurrentIndex((prev) => (prev === 0 ? images.length - 1 : prev - 1));\n  };\n\n  const nextSlide = () => {\n    setCurrentIndex((prev) => (prev === images.length - 1 ? 0 : prev + 1));\n  };\n\n  // Auto play functionality\n  React.useEffect(() => {\n    if (!autoPlay) return;\n\n    const interval = setInterval(() => {\n      nextSlide();\n    }, autoPlayInterval);\n\n    return () => clearInterval(interval);\n  }, [currentIndex, autoPlay, autoPlayInterval]);\n\n  // Keyboard navigation for main carousel\n  React.useEffect(() => {\n    const handleKeyDown = (e: KeyboardEvent) => {\n      if (e.key === 'ArrowRight') {\n        nextSlide();\n      } else if (e.key === 'ArrowLeft') {\n        prevSlide();\n      }\n    };\n\n    window.addEventListener('keydown', handleKeyDown);\n    return () => window.removeEventListener('keydown', handleKeyDown);\n  }, []);\n\n  return (\n    <div className=\"w-full p-4 md:p-6\">\n      {/* Main carousel */}\n      <div className=\"relative overflow-hidden rounded-lg\">\n        <div className=\"relative aspect-video w-full overflow-hidden\">\n          {images.map((image, index) => (\n            <div\n              key={`slide-${index}`}\n              className={cn(\n                'absolute inset-0 transform transition-all duration-500 ease-in-out',\n                index === currentIndex\n                  ? 'translate-x-0 opacity-100'\n                  : index < currentIndex\n                    ? '-translate-x-full opacity-0'\n                    : 'translate-x-full opacity-0'\n              )}\n            >\n              <img\n                src={image.src}\n                alt={image.alt}\n                width={image.width}\n                height={image.height}\n                className=\"h-full w-full object-cover\"\n              />\n            </div>\n          ))}\n        </div>\n\n        {/* Navigation buttons */}\n        <Button\n          size=\"icon\"\n          className=\"absolute top-1/2 left-2 -translate-y-1/2\"\n          onClick={prevSlide}\n        >\n          <ChevronLeftIcon className=\"h-6 w-6\" />\n        </Button>\n\n        <Button\n          size=\"icon\"\n          className=\"absolute top-1/2 right-2 -translate-y-1/2\"\n          onClick={nextSlide}\n        >\n          <ChevronRightIcon className=\"h-6 w-6\" />\n        </Button>\n\n        {/* Caption */}\n        <div className=\"absolute right-0 bottom-0 left-0 bg-gradient-to-t from-black/60 to-transparent p-4 text-sm text-white\">\n          {images[currentIndex]!.alt}\n        </div>\n      </div>\n\n      {/* Thumbnails */}\n      {showThumbnails && (\n        <div className=\"mt-4 flex gap-2 overflow-x-auto px-2 py-2\">\n          {images.map((image, index) => (\n            <button\n              key={`thumb-${index}`}\n              className={cn(\n                'relative h-20 w-20 flex-shrink-0 transition-all duration-200',\n                index === currentIndex\n                  ? 'ring-primary ring-2 ring-offset-2'\n                  : 'opacity-70 hover:opacity-100'\n              )}\n              onClick={() => setCurrentIndex(index)}\n            >\n              <img\n                src={image.src}\n                alt={`Thumbnail ${index + 1}`}\n                width={80}\n                height={80}\n                className=\"h-full w-full rounded-sm object-cover\"\n              />\n            </button>\n          ))}\n        </div>\n      )}\n    </div>\n  );\n}\n","type":"registry:component","target":"components/blocks/marketing/gallery/carousel-gallery.tsx"},{"path":"components/ui/button.tsx","content":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n  \"group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n        outline:\n          \"border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n        secondary:\n          \"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n        destructive:\n          \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n      size: {\n        default:\n          \"h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        xs: \"h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n        sm: \"h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5\",\n        lg: \"h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n        icon: \"size-9\",\n        \"icon-xs\":\n          \"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3\",\n        \"icon-sm\":\n          \"size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md\",\n        \"icon-lg\": \"size-10\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nfunction Button({\n  className,\n  variant = \"default\",\n  size = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot.Root : \"button\"\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      data-variant={variant}\n      data-size={size}\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n","type":"registry:ui","target":"components/ui/button.tsx"}],"description":"A swipeable carousel that steps through images one at a time. Use it to feature product shots or photos in a compact space on any landing page.","dependencies":["class-variance-authority","lucide-react","radix-ui"]}