{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-bento",
  "title": "Testimonials Bento",
  "description": "Payload testimonials block: an asymmetric bento with one featured quote in a large cell and supporting quotes around it.",
  "registryDependencies": [
    "badge"
  ],
  "files": [
    {
      "path": "payload-components/source/blocks/shared/testimonialFields.ts",
      "content": "import type { Field } from 'payload'\n\n/**\n * Shared field core for the Testimonials component family.\n *\n * Every testimonials variant spreads `testimonialFields` first for the shared\n * section heading (eyebrow + title + intro), then appends its own\n * variant-specific shape — a grid of cards, a star rating, a bento, or a dense\n * wall. Editing the shared heading here updates every installed testimonials\n * block at once, so the family never drifts field-by-field across a repo.\n *\n * `testimonialItemFields` is the one-quote shape (quote, author, optional role,\n * optional avatar upload) reused everywhere a testimonial appears — as the array\n * items in the grid/rating/bento/wall variants, and as the single subject of the\n * quote/spotlight variants — so a testimonial looks the same wherever it shows.\n * Each avatar is an editable Media upload, so editors manage social proof from\n * the admin instead of shipping hardcoded image URLs.\n *\n * Installed once per repo at `src/blocks/shared/testimonialFields.ts`; re-running\n * `payload-components add testimonials-*` never overwrites a copy you have\n * already edited.\n */\nexport const testimonialFields: Field[] = [\n  {\n    name: 'eyebrow',\n    type: 'text',\n  },\n  {\n    name: 'title',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'description',\n    type: 'textarea',\n  },\n]\n\nexport const testimonialItemFields: Field[] = [\n  {\n    name: 'quote',\n    type: 'textarea',\n    required: true,\n  },\n  {\n    name: 'author',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'role',\n    type: 'text',\n  },\n  {\n    name: 'avatar',\n    type: 'upload',\n    relationTo: 'media',\n  },\n]\n",
      "type": "registry:file",
      "target": "~/src/blocks/shared/testimonialFields.ts"
    },
    {
      "path": "payload-components/source/blocks/TestimonialsBento/config.ts",
      "content": "import type { Block } from 'payload'\n\nimport { testimonialFields, testimonialItemFields } from '@/blocks/shared/testimonialFields'\n\nexport const TestimonialsBento: Block = {\n  slug: 'testimonialsBento',\n  // Existing apps must migrate stored data before adopting this identifier:\n  // https://www.payload-components.xyz/docs/registry#installed-source-and-migrations\n  dbName: 'pc_tes_ben',\n  interfaceName: 'TestimonialsBentoBlock',\n  fields: [\n    // Shared testimonials heading (eyebrow, title, description). Edit the shared\n    // shape in @/blocks/shared/testimonialFields to update every variant.\n    ...testimonialFields,\n    {\n      name: 'testimonials',\n      type: 'array',\n      required: true,\n      minRows: 1,\n      maxRows: 8,\n      admin: {\n        initCollapsed: true,\n      },\n      fields: [\n        // Shared one-quote shape — see @/blocks/shared/testimonialFields.\n        ...testimonialItemFields,\n        {\n          name: 'logo',\n          type: 'upload',\n          relationTo: 'media',\n        },\n        {\n          name: 'featured',\n          type: 'checkbox',\n          defaultValue: false,\n          admin: {\n            description: 'Give this testimonial the large bento cell.',\n          },\n        },\n      ],\n    },\n  ],\n  labels: {\n    plural: 'Testimonials Bento Blocks',\n    singular: 'Testimonials Bento',\n  },\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/TestimonialsBento/config.ts"
    },
    {
      "path": "payload-components/source/blocks/TestimonialsBento/Component.tsx",
      "content": "import React from 'react'\n\nimport type { TestimonialsBentoBlock as TestimonialsBentoBlockData } from '@/payload-types'\n\nimport { Media } from '@/components/Media'\nimport { Badge } from '@/components/ui/badge'\nimport { cn } from '@/utilities/ui'\n\n// Layout adapted from tailark/blocks (MIT) — re-implemented as a Payload block.\n\ntype Props = TestimonialsBentoBlockData & {\n  id?: string\n  className?: string\n  disableInnerContainer?: boolean\n}\n\nexport const TestimonialsBentoBlock: React.FC<Props> = ({\n  className,\n  description,\n  disableInnerContainer,\n  eyebrow,\n  id,\n  testimonials,\n  title,\n}) => {\n  return (\n    <section className={cn('container', className)} id={id ? `block-${id}` : undefined}>\n      <div className=\"overflow-hidden rounded-frame border border-border/70 bg-card/35 px-6 py-10 sm:px-8 lg:px-12 lg:py-14\">\n        <div\n          className={cn('flex flex-col gap-12', {\n            'mx-auto max-w-5xl': !disableInnerContainer,\n          })}\n        >\n          <div className=\"flex flex-col gap-4\">\n            {eyebrow ? (\n              <Badge variant=\"outline\" className=\"w-fit rounded-full px-3 py-1 uppercase tracking-eyebrow\">\n                {eyebrow}\n              </Badge>\n            ) : null}\n\n            <h2 className=\"text-3xl font-medium tracking-title text-balance sm:text-4xl\">{title}</h2>\n\n            {description ? (\n              <p className=\"max-w-2xl text-base leading-7 text-muted-foreground\">{description}</p>\n            ) : null}\n          </div>\n\n          {testimonials && testimonials.length > 0 ? (\n            <div className=\"grid gap-4 sm:grid-cols-2 lg:grid-cols-4 lg:grid-rows-2\">\n              {testimonials.map((item, index) => (\n                <figure\n                  className={cn(\n                    'flex flex-col gap-6 rounded-2xl border border-border/70 bg-background/60 p-6',\n                    { 'sm:col-span-2 lg:row-span-2': item.featured },\n                  )}\n                  key={item.id ?? index}\n                >\n                  {item.logo ? (\n                    <div className=\"flex h-6 items-center\">\n                      <Media resource={item.logo} imgClassName=\"h-6 w-auto object-contain opacity-80\" />\n                    </div>\n                  ) : null}\n                  <blockquote className=\"text-pretty text-sm leading-6 text-foreground\">\n                    {item.quote}\n                  </blockquote>\n                  <figcaption className=\"mt-auto flex items-center gap-3\">\n                    {item.avatar ? (\n                      <div className=\"flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-full border border-border/70 bg-card\">\n                        <Media resource={item.avatar} imgClassName=\"size-full object-cover\" />\n                      </div>\n                    ) : null}\n                    <div className=\"flex flex-col\">\n                      <span className=\"text-sm font-medium text-foreground\">{item.author}</span>\n                      {item.role ? (\n                        <span className=\"text-xs text-muted-foreground\">{item.role}</span>\n                      ) : null}\n                    </div>\n                  </figcaption>\n                </figure>\n              ))}\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/TestimonialsBento/Component.tsx"
    }
  ],
  "meta": {
    "payloadComponent": {
      "installCommand": "payload-components add testimonials-bento",
      "postInstall": [
        "generate:types",
        "generate:importmap"
      ],
      "requiresPayloadComponentWrapper": true,
      "supportedTargets": [
        "payload-website-starter",
        "payload-blocks-app"
      ]
    }
  },
  "docs": "Payload Components installs this as a Payload CMS block for the Payload website starter shape.\n\nRecommended install:\n\n```bash\npnpm payload-components add testimonials-bento\n```\n\nDirect shadcn install URL:\n\n```bash\npnpm dlx shadcn@latest add https://<your-domain>/r/testimonials-bento.json\n```\n\nDirect shadcn installs only copy the block source files and shadcn UI dependencies. Use `payload-components add testimonials-bento` when you also want Payload layout registration, `RenderBlocks` wiring, `generate:types`, and `generate:importmap` handled for you.",
  "type": "registry:block"
}