{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "team-grid",
  "title": "Team Grid",
  "description": "Payload team block: a heading and intro above a responsive grid of member photo cards that reveal role on hover.",
  "registryDependencies": [
    "badge"
  ],
  "files": [
    {
      "path": "payload-components/source/blocks/shared/teamFields.ts",
      "content": "import type { Field } from 'payload'\n\n/**\n * Shared field core for the Team component family.\n *\n * Every team variant (team-roster, team-grid, …) spreads `teamFields` first for\n * the shared heading, then appends its own variant-specific shape — the grouped\n * department roster or the flat member grid that differs per layout. Editing the\n * shared eyebrow/title shape here updates every installed team block at once, so\n * the family never drifts field-by-field across a repo.\n *\n * `teamMemberFields` is the one-person shape (avatar upload, name, role, optional\n * link) reused by both variants — team-roster nests it inside each group, while\n * team-grid uses it for a single flat `members` array — so a member looks the\n * same everywhere it appears. Each avatar is an editable Media upload, so editors\n * manage the team from the admin instead of shipping hardcoded image URLs.\n *\n * Installed once per repo at `src/blocks/shared/teamFields.ts`; re-running\n * `payload-components add team-*` never overwrites a copy you have already edited.\n */\nexport const teamFields: Field[] = [\n  {\n    name: 'eyebrow',\n    type: 'text',\n  },\n  {\n    name: 'title',\n    type: 'text',\n    required: true,\n  },\n]\n\nexport const teamMemberFields: Field[] = [\n  {\n    name: 'avatar',\n    type: 'upload',\n    relationTo: 'media',\n    required: true,\n  },\n  {\n    name: 'name',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'role',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'href',\n    type: 'text',\n  },\n]\n",
      "type": "registry:file",
      "target": "~/src/blocks/shared/teamFields.ts"
    },
    {
      "path": "payload-components/source/blocks/TeamGrid/config.ts",
      "content": "import type { Block } from 'payload'\n\nimport { teamFields, teamMemberFields } from '@/blocks/shared/teamFields'\n\nexport const TeamGrid: Block = {\n  slug: 'teamGrid',\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_tea_gri',\n  interfaceName: 'TeamGridBlock',\n  fields: [\n    // Shared team core (eyebrow, title). Variant-specific fields follow; edit the\n    // shared shape in @/blocks/shared/teamFields.\n    ...teamFields,\n    {\n      name: 'description',\n      type: 'textarea',\n    },\n    {\n      name: 'members',\n      type: 'array',\n      required: true,\n      minRows: 1,\n      maxRows: 12,\n      admin: {\n        initCollapsed: true,\n      },\n      // Shared member shape — see @/blocks/shared/teamFields.\n      fields: teamMemberFields,\n    },\n  ],\n  labels: {\n    plural: 'Team Grid Blocks',\n    singular: 'Team Grid',\n  },\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/TeamGrid/config.ts"
    },
    {
      "path": "payload-components/source/blocks/TeamGrid/Component.tsx",
      "content": "import React from 'react'\n\nimport type { TeamGridBlock as TeamGridBlockData } from '@/payload-types'\n\nimport { Media } from '@/components/Media'\nimport { Badge } from '@/components/ui/badge'\nimport { cn } from '@/utilities/ui'\n\ntype Props = TeamGridBlockData & {\n  id?: string\n  className?: string\n  disableInnerContainer?: boolean\n}\n\nexport const TeamGridBlock: React.FC<Props> = ({\n  className,\n  description,\n  disableInnerContainer,\n  eyebrow,\n  id,\n  members,\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 sm:flex-row sm:items-end sm:justify-between\">\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            </div>\n\n            {description ? (\n              <p className=\"max-w-md text-base leading-7 text-muted-foreground\">{description}</p>\n            ) : null}\n          </div>\n\n          {members && members.length > 0 ? (\n            <div className=\"grid gap-x-6 gap-y-12 sm:grid-cols-2 lg:grid-cols-3\">\n              {members.map((member, index) => (\n                <div className=\"group overflow-hidden\" key={member.id ?? index}>\n                  <div className=\"h-96 w-full overflow-hidden rounded-md transition-all duration-500 group-hover:rounded-xl\">\n                    <Media\n                      resource={member.avatar}\n                      imgClassName=\"h-full w-full object-cover object-top grayscale transition-all duration-500 group-hover:grayscale-0\"\n                    />\n                  </div>\n\n                  <div className=\"px-2 pt-4\">\n                    <div className=\"flex items-center justify-between\">\n                      <h3 className=\"text-base font-medium transition-all duration-500 group-hover:tracking-wider\">\n                        {member.name}\n                      </h3>\n                      <span className=\"text-xs text-muted-foreground\">_0{index + 1}</span>\n                    </div>\n\n                    <div className=\"mt-1 flex items-center justify-between\">\n                      <span className=\"translate-y-6 text-sm text-muted-foreground opacity-0 transition duration-300 group-hover:translate-y-0 group-hover:opacity-100\">\n                        {member.role}\n                      </span>\n\n                      {member.href ? (\n                        <a\n                          className=\"inline-block translate-y-8 text-sm tracking-wide opacity-0 transition-all duration-500 hover:underline group-hover:translate-y-0 group-hover:opacity-100\"\n                          href={member.href}\n                        >\n                          Profile\n                        </a>\n                      ) : null}\n                    </div>\n                  </div>\n                </div>\n              ))}\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/TeamGrid/Component.tsx"
    }
  ],
  "meta": {
    "payloadComponent": {
      "installCommand": "payload-components add team-grid",
      "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 team-grid\n```\n\nDirect shadcn install URL:\n\n```bash\npnpm dlx shadcn@latest add https://www.payload-components.xyz/r/team-grid.json\n```\n\nDirect shadcn installs only copy the block source files and shadcn UI dependencies. Use `payload-components add team-grid` when you also want Payload layout registration, `RenderBlocks` wiring, `generate:types`, and `generate:importmap` handled for you.",
  "type": "registry:block"
}