Skip to documentation

Design system / Sources & standards

Current repository source

contentCarouselDialog.tsx

src/components/carousel/contentCarouselDialog.tsx

This view contains the escaped source read during the deployment build. Code and policy text are unchanged. Markdown is shown as source, not rendered as a document. A new deployment refreshes the content.

"use client";

import type { ComponentProps } from "react";
import { X } from "lucide-react";
import { Button } from "@/components/ui/button";
import { DialogClose, DialogContent, DialogTitle } from "@/components/ui/dialog";
import { ContentCarousel, type ContentCarouselItem } from "./contentCarousel";
import type { CarouselApi } from "@/components/ui/carousel";

/** Viewport presentation inside the caller's shared Dialog root. */
export function ContentCarouselDialog({ title, items, startIndex, setApi, ...props }: Omit<ComponentProps<typeof DialogContent>, "children"> & {
  title: string;
  items: readonly ContentCarouselItem[];
  startIndex: number;
  setApi: (api: CarouselApi) => void;
}) {
  return <DialogContent {...props} showCloseButton={false} aria-describedby={undefined} data-slot="expanded-showcase"
    className="dark scheme-dark inset-0 top-0 left-0 h-dvh w-full max-w-none translate-x-0 translate-y-0 overflow-hidden rounded-none border-0 bg-background p-0 pt-[env(safe-area-inset-top)] pr-[env(safe-area-inset-right)] pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)] text-foreground sm:max-w-none data-[state=closed]:zoom-out-100 data-[state=open]:zoom-in-100 motion-reduce:animate-none">
    <DialogTitle className="sr-only">{title} — expanded view</DialogTitle>
    <ContentCarousel title={title} items={items} variant="expanded" startIndex={startIndex} setApi={setApi}
      headerAction={<DialogClose asChild><Button type="button" variant="ghost" size="icon-sm" aria-label="Close expanded showcase"><X aria-hidden="true" /></Button></DialogClose>} />
  </DialogContent>;
}
All sources and standards
Current components and theme tokens. Fictional example data. Source views refresh on deployment; authors maintain contract notes.