{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-quote",
  "title": "Testimonials Quote",
  "description": "Payload testimonials block: a single featured quote with a left accent bar, author, optional role, and avatar.",
  "registryDependencies": [],
  "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/TestimonialsQuote/config.ts",
      "content": "import type { Block } from 'payload'\n\nimport { testimonialItemFields } from '@/blocks/shared/testimonialFields'\n\nexport const TestimonialsQuote: Block = {\n  slug: 'testimonialsQuote',\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_quo',\n  interfaceName: 'TestimonialsQuoteBlock',\n  fields: [\n    // A single featured testimonial — the shared one-quote shape (quote, author,\n    // optional role, optional avatar). Edit the shared shape in\n    // @/blocks/shared/testimonialFields to update every testimonials variant.\n    ...testimonialItemFields,\n  ],\n  labels: {\n    plural: 'Testimonials Quote Blocks',\n    singular: 'Testimonials Quote',\n  },\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/TestimonialsQuote/config.ts"
    },
    {
      "path": "payload-components/source/blocks/TestimonialsQuote/Component.tsx",
      "content": "import React from 'react'\n\nimport type { TestimonialsQuoteBlock as TestimonialsQuoteBlockData } from '@/payload-types'\n\nimport { Media } from '@/components/Media'\nimport { cn } from '@/utilities/ui'\n\n// Layout adapted from tailark/blocks (MIT) — re-implemented as a Payload block.\n\ntype Props = TestimonialsQuoteBlockData & {\n  id?: string\n  className?: string\n  disableInnerContainer?: boolean\n}\n\nexport const TestimonialsQuoteBlock: React.FC<Props> = ({\n  author,\n  avatar,\n  className,\n  disableInnerContainer,\n  id,\n  quote,\n  role,\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-12 sm:px-8 lg:px-12 lg:py-16\">\n        <figure\n          className={cn('border-s-2 border-primary ps-6', {\n            'mx-auto max-w-2xl': !disableInnerContainer,\n          })}\n        >\n          <blockquote className=\"text-pretty text-xl leading-8 text-foreground sm:text-2xl\">\n            {quote}\n          </blockquote>\n          <figcaption className=\"mt-6 flex items-center gap-3\">\n            {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={avatar} imgClassName=\"size-full object-cover\" />\n              </div>\n            ) : null}\n            <cite className=\"text-sm font-medium not-italic text-foreground\">{author}</cite>\n            {role ? (\n              <>\n                <span aria-hidden=\"true\" className=\"size-1 rounded-full bg-foreground/25\" />\n                <span className=\"text-sm text-muted-foreground\">{role}</span>\n              </>\n            ) : null}\n          </figcaption>\n        </figure>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/TestimonialsQuote/Component.tsx"
    }
  ],
  "meta": {
    "payloadComponent": {
      "installCommand": "payload-components add testimonials-quote",
      "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-quote\n```\n\nDirect shadcn install URL:\n\n```bash\npnpm dlx shadcn@latest add https://<your-domain>/r/testimonials-quote.json\n```\n\nDirect shadcn installs only copy the block source files and shadcn UI dependencies. Use `payload-components add testimonials-quote` when you also want Payload layout registration, `RenderBlocks` wiring, `generate:types`, and `generate:importmap` handled for you.",
  "type": "registry:block"
}