{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-section",
  "title": "Testimonials Section",
  "description": "Customer stories with people, roles, organizations, and a rating summary.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://uaiblocks.dev/r/uai-theme.json",
    "https://uaiblocks.dev/r/testimonial-card.json",
    "https://uaiblocks.dev/r/trust-panel.json",
    "https://uaiblocks.dev/r/uai-utils.json"
  ],
  "files": [
    {
      "path": "src/registry/uai/blocks/testimonials-section.tsx",
      "content": "\"use client\";\n\nimport { cva } from \"class-variance-authority\";\nimport { type ComponentProps, createContext, useContext, useId } from \"react\";\nimport {\n  TestimonialCard,\n  type TestimonialCardProps,\n  type TestimonialCardVariant,\n} from \"@/components/ui/uai/testimonial-card\";\nimport { cn } from \"@/lib/uai-utils\";\n\nexport const TESTIMONIALS_SECTION_VARIANTS = [\"grid\", \"featured\", \"wall\"] as const;\nexport type TestimonialsSectionVariant = (typeof TESTIMONIALS_SECTION_VARIANTS)[number];\nexport type TestimonialsSectionProps = ComponentProps<\"section\"> & {\n  variant?: TestimonialsSectionVariant;\n};\n\ntype SectionContext = { id: string; variant: TestimonialsSectionVariant };\nconst Context = createContext<SectionContext | null>(null);\nfunction useSection(part: string) {\n  const context = useContext(Context);\n  if (!context) throw new Error(`${part} must be used within TestimonialsSection`);\n  return context;\n}\n\nconst testimonialsSectionListVariants = cva(\"m-0 min-w-0 list-none p-0\", {\n  variants: {\n    variant: {\n      grid: \"grid grid-cols-[repeat(auto-fill,minmax(min(100%,240px),1fr))] gap-3\",\n      featured:\n        \"grid gap-3 @min-[720px]:grid-cols-[minmax(0,1.3fr)_minmax(0,1fr)] @min-[720px]:items-start @min-[720px]:gap-x-8 @min-[720px]:gap-y-4\",\n      wall: \"columns-[3_220px] gap-x-2.5\",\n    },\n  },\n});\n\n/** Customer stories with people, roles, and organizations. Columns collapse to one on narrow widths. */\nexport function TestimonialsSection({\n  variant = \"grid\",\n  className,\n  children,\n  ...props\n}: TestimonialsSectionProps) {\n  const id = useId();\n  return (\n    <Context.Provider value={{ id, variant }}>\n      <section\n        data-slot=\"testimonials-section\"\n        aria-labelledby={`${id}-title`}\n        className={cn(\n          \"@container box-border grid min-w-0 gap-7 text-[13px]/[18px] text-foreground\",\n          className,\n        )}\n        {...props}\n        data-variant={variant}\n      >\n        {children}\n      </section>\n    </Context.Provider>\n  );\n}\n\nexport function TestimonialsSectionHeader({ className, ...props }: ComponentProps<\"header\">) {\n  return (\n    <header\n      data-slot=\"testimonials-section-header\"\n      className={cn(\"mx-auto grid max-w-[600px] justify-items-center gap-2 text-center\", className)}\n      {...props}\n    />\n  );\n}\n\nexport function TestimonialsSectionTitle({ className, ...props }: ComponentProps<\"h2\">) {\n  const { id } = useSection(\"TestimonialsSectionTitle\");\n  return (\n    <h2\n      data-slot=\"testimonials-section-title\"\n      className={cn(\n        \"m-0 text-[length:clamp(22px,2.5cqi_+_12px,30px)] leading-[1.15] font-medium tracking-[-0.025em] text-balance\",\n        className,\n      )}\n      {...props}\n      id={`${id}-title`}\n    />\n  );\n}\n\nexport function TestimonialsSectionDescription({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"testimonials-section-description\"\n      className={cn(\"m-0 text-[15px]/[23px] text-pretty text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nexport function TestimonialsSectionList({ className, ...props }: ComponentProps<\"ul\">) {\n  const { variant } = useSection(\"TestimonialsSectionList\");\n  return (\n    <ul\n      data-slot=\"testimonials-section-list\"\n      className={cn(testimonialsSectionListVariants({ variant }), className)}\n      {...props}\n    />\n  );\n}\n\nexport type TestimonialsSectionItemProps = Omit<TestimonialCardProps, \"variant\"> & {\n  /** In the Featured layout, gives this story the editorial treatment and the larger column. */\n  featured?: boolean;\n};\n\n/** One story rendered as a Testimonial Card. Compose the quote and author parts inside. */\nexport function TestimonialsSectionItem({\n  featured = false,\n  ...props\n}: TestimonialsSectionItemProps) {\n  const { variant } = useSection(\"TestimonialsSectionItem\");\n  const cardVariant: TestimonialCardVariant =\n    variant === \"wall\" ? \"compact\" : variant === \"featured\" && featured ? \"editorial\" : \"card\";\n  return (\n    <li\n      data-slot=\"testimonials-section-item\"\n      data-featured={featured || undefined}\n      className={cn(\n        \"min-w-0 animate-in fade-in-0 slide-in-from-bottom-[6px] duration-400 ease-out-quint fill-mode-both motion-reduce:animate-none nth-2:[animation-delay:40ms] nth-3:[animation-delay:80ms] nth-4:[animation-delay:120ms] nth-5:[animation-delay:160ms] nth-[n+6]:[animation-delay:200ms] supports-[animation-timeline:view()]:[animation-timeline:view()] supports-[animation-timeline:view()]:[animation-range:entry_0%_entry_35%] supports-[animation-timeline:view()]:[animation-duration:auto]\",\n        variant === \"wall\" && \"mb-2.5 break-inside-avoid\",\n        variant === \"featured\" && featured && \"@min-[720px]:row-span-3 @min-[720px]:self-center\",\n      )}\n    >\n      <TestimonialCard {...props} variant={cardVariant} />\n    </li>\n  );\n}\n\nexport function TestimonialsSectionSummary({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"testimonials-section-summary\"\n      className={cn(\n        \"flex flex-wrap items-center justify-center gap-x-4 gap-y-2 text-[12px] text-subtle-foreground tabular-nums\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/uai/testimonials-section.tsx"
    }
  ],
  "categories": [
    "marketing",
    "social-proof"
  ],
  "type": "registry:block"
}