{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "content-list-icons",
  "title": "Content List Icons",
  "description": "Payload content block: a serif heading and intro above a multi-column icon list.",
  "registryDependencies": [
    "badge"
  ],
  "files": [
    {
      "path": "payload-components/source/blocks/shared/contentIcons.ts",
      "content": "import type { Field } from 'payload'\nimport type { LucideIcon } from 'lucide-react'\n\nimport { Cpu, Gauge, Lock, Shield, Sparkles, Zap } from 'lucide-react'\n\n/**\n * Shared icon allowlist for the feature-bearing Content variants\n * (content-feature-media, content-feature-split, content-showcase).\n *\n * Payload cannot store a React component, so each feature item picks an icon\n * by name from this fixed allowlist (`iconField`, a `select`) and the frontend\n * looks the name up in `contentIcons` at render. Keeping the options and the\n * component map in one file means the editor choices can never drift from what\n * actually renders — add an icon by adding it to both `contentIconOptions`\n * and `contentIcons` together.\n *\n * Installed once per repo at `src/blocks/shared/contentIcons.ts`; re-running\n * `payload-components add content-*` never overwrites a copy you have already edited.\n */\nexport const contentIconOptions = ['zap', 'cpu', 'lock', 'sparkles', 'gauge', 'shield'] as const\n\nexport type ContentIconName = (typeof contentIconOptions)[number]\n\nexport const iconField: Field = {\n  name: 'icon',\n  type: 'select',\n  options: [\n    { label: 'Zap', value: 'zap' },\n    { label: 'Cpu', value: 'cpu' },\n    { label: 'Lock', value: 'lock' },\n    { label: 'Sparkles', value: 'sparkles' },\n    { label: 'Gauge', value: 'gauge' },\n    { label: 'Shield', value: 'shield' },\n  ],\n}\n\nexport const contentIcons: Record<ContentIconName, LucideIcon> = {\n  zap: Zap,\n  cpu: Cpu,\n  lock: Lock,\n  sparkles: Sparkles,\n  gauge: Gauge,\n  shield: Shield,\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/shared/contentIcons.ts"
    },
    {
      "path": "payload-components/source/blocks/ContentListIcons/config.ts",
      "content": "import type { Block } from 'payload'\n\nimport { iconField } from '@/blocks/shared/contentIcons'\n\nexport const ContentListIcons: Block = {\n  slug: 'contentListIcons',\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_con_lis_ico',\n  interfaceName: 'ContentListIconsBlock',\n  fields: [\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      name: 'items',\n      type: 'array',\n      required: true,\n      minRows: 2,\n      maxRows: 6,\n      admin: {\n        initCollapsed: true,\n      },\n      fields: [\n        iconField,\n        {\n          name: 'term',\n          type: 'text',\n          required: true,\n        },\n        {\n          name: 'description',\n          type: 'textarea',\n          required: true,\n        },\n      ],\n    },\n  ],\n  labels: {\n    plural: 'Content List Icons Blocks',\n    singular: 'Content List Icons',\n  },\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/ContentListIcons/config.ts"
    },
    {
      "path": "payload-components/source/blocks/ContentListIcons/Component.tsx",
      "content": "import React from 'react'\n\nimport type { ContentListIconsBlock as ContentListIconsBlockData } from '@/payload-types'\n\nimport { contentIcons } from '@/blocks/shared/contentIcons'\nimport { Badge } from '@/components/ui/badge'\nimport { cn } from '@/utilities/ui'\n\ntype Props = ContentListIconsBlockData & {\n  id?: string\n  className?: string\n  disableInnerContainer?: boolean\n}\n\nexport const ContentListIconsBlock: React.FC<Props> = ({\n  className,\n  description,\n  disableInnerContainer,\n  eyebrow,\n  id,\n  items,\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-3xl': !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=\"font-serif text-4xl font-medium text-balance\">{title}</h2>\n\n            {description ? <p className=\"text-muted-foreground\">{description}</p> : null}\n          </div>\n\n          {items && items.length > 0 ? (\n            <div className=\"grid grid-cols-2 gap-6 text-sm lg:grid-cols-3\">\n              {items.map((item, index) => {\n                const Icon = item.icon ? contentIcons[item.icon] : null\n\n                return (\n                  <div\n                    className=\"flex flex-col gap-3 border-t border-border/70 pt-6\"\n                    key={item.id ?? `${item.term}-${index}`}\n                  >\n                    {Icon ? <Icon className=\"size-4 text-muted-foreground\" /> : null}\n                    <p className=\"leading-5 text-muted-foreground\">\n                      <span className=\"font-medium text-foreground\">{item.term}</span> {item.description}\n                    </p>\n                  </div>\n                )\n              })}\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/ContentListIcons/Component.tsx"
    }
  ],
  "meta": {
    "payloadComponent": {
      "installCommand": "payload-components add content-list-icons",
      "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 content-list-icons\n```\n\nDirect shadcn install URL:\n\n```bash\npnpm dlx shadcn@latest add https://www.payload-components.xyz/r/content-list-icons.json\n```\n\nDirect shadcn installs only copy the block source files and shadcn UI dependencies. Use `payload-components add content-list-icons` when you also want Payload layout registration, `RenderBlocks` wiring, `generate:types`, and `generate:importmap` handled for you.",
  "type": "registry:block"
}