{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-cards",
  "title": "Pricing Cards",
  "description": "Three-up pricing table of editable plan cards with a highlighted plan.",
  "registryDependencies": [
    "badge",
    "card"
  ],
  "files": [
    {
      "path": "payload-components/source/blocks/shared/pricingFields.ts",
      "content": "import type { Field } from 'payload'\n\nimport { linkGroup } from '@/fields/linkGroup'\n\n/**\n * Shared field core for the Pricing component family.\n *\n * Every pricing variant (pricing-cards, pricing-cards-muted, pricing-cards-cta,\n * pricing-split, pricing-enterprise) spreads `pricingFields` for the section\n * heading and reuses `planFields` for the editable plan array. Editing the\n * shared shape here updates every installed pricing block at once, so the\n * family never drifts field-by-field across a repo.\n *\n * Each plan carries its own price, period, blurb, a `featured` flag (which\n * drives the emerald \"Popular\" highlight), a list of included features, and a\n * single CTA link group — so editors manage the whole pricing table from the\n * admin instead of shipping hardcoded copy.\n *\n * The layout structure is adapted from tailark/blocks (MIT) pricing blocks,\n * retokenized onto this repo's monochrome + emerald design system.\n *\n * Installed once per repo at `src/blocks/shared/pricingFields.ts`; re-running\n * `payload-components add pricing-*` never overwrites a copy you have already edited.\n */\nexport const pricingFields: 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\n/**\n * Subfields for one plan, reused as the `fields` of every variant's `plans`\n * array. `period` is optional (a one-off enterprise price may omit \"/ mo\"),\n * `featured` marks the highlighted column, and `link` is a single CTA group.\n */\nexport const planFields: Field[] = [\n  {\n    name: 'name',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'price',\n    type: 'text',\n    required: true,\n  },\n  {\n    name: 'period',\n    type: 'text',\n  },\n  {\n    name: 'description',\n    type: 'text',\n  },\n  {\n    name: 'featured',\n    type: 'checkbox',\n    defaultValue: false,\n  },\n  {\n    name: 'features',\n    type: 'array',\n    required: true,\n    minRows: 1,\n    maxRows: 12,\n    admin: {\n      initCollapsed: true,\n    },\n    fields: [\n      {\n        name: 'feature',\n        type: 'text',\n        required: true,\n      },\n    ],\n  },\n  linkGroup({\n    overrides: {\n      admin: {\n        initCollapsed: true,\n      },\n      maxRows: 1,\n    },\n  }),\n]\n",
      "type": "registry:file",
      "target": "~/src/blocks/shared/pricingFields.ts"
    },
    {
      "path": "payload-components/source/blocks/PricingCards/config.ts",
      "content": "import type { Block } from 'payload'\n\nimport { planFields, pricingFields } from '@/blocks/shared/pricingFields'\n\nexport const PricingCards: Block = {\n  slug: 'pricingCards',\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_pri_car',\n  interfaceName: 'PricingCardsBlock',\n  fields: [\n    // Shared pricing heading (eyebrow, title, description). Variant-specific\n    // fields follow; edit the shared shape in @/blocks/shared/pricingFields.\n    ...pricingFields,\n    {\n      name: 'plans',\n      type: 'array',\n      required: true,\n      minRows: 2,\n      maxRows: 4,\n      admin: {\n        initCollapsed: true,\n      },\n      fields: planFields,\n    },\n  ],\n  labels: {\n    plural: 'Pricing Cards Blocks',\n    singular: 'Pricing Cards',\n  },\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/PricingCards/config.ts"
    },
    {
      "path": "payload-components/source/blocks/PricingCards/Component.tsx",
      "content": "import { Check } from 'lucide-react'\nimport React from 'react'\n\nimport type { PricingCardsBlock as PricingCardsBlockData } from '@/payload-types'\n\nimport { CMSLink } from '@/components/Link'\nimport { Badge } from '@/components/ui/badge'\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardFooter,\n  CardHeader,\n  CardTitle,\n} from '@/components/ui/card'\nimport { cn } from '@/utilities/ui'\n\n// Layout adapted from tailark/blocks (MIT) — re-implemented as a Payload block.\n\ntype Props = PricingCardsBlockData & {\n  id?: string\n  className?: string\n  disableInnerContainer?: boolean\n}\n\nexport const PricingCardsBlock: React.FC<Props> = ({\n  className,\n  description,\n  disableInnerContainer,\n  eyebrow,\n  id,\n  plans,\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-10', {\n            'mx-auto max-w-6xl': !disableInnerContainer,\n          })}\n        >\n          <div className=\"mx-auto flex max-w-2xl flex-col gap-4 text-center\">\n            {eyebrow ? (\n              <Badge variant=\"outline\" className=\"mx-auto w-fit rounded-full px-3 py-1 uppercase tracking-eyebrow\">\n                {eyebrow}\n              </Badge>\n            ) : null}\n\n            <h2 className=\"text-4xl font-medium tracking-display text-balance sm:text-5xl\">{title}</h2>\n\n            {description ? (\n              <p className=\"text-base leading-7 text-muted-foreground sm:text-lg\">{description}</p>\n            ) : null}\n          </div>\n\n          {plans && plans.length > 0 ? (\n            <div className=\"grid gap-6 md:grid-cols-3\">\n              {plans.map((plan, index) => (\n                <Card\n                  key={plan.id ?? `${plan.name}-${index}`}\n                  className={cn('relative flex flex-col border-border/70 bg-background/85 shadow-none', {\n                    'ring-1 ring-brand': plan.featured,\n                  })}\n                >\n                  {plan.featured ? (\n                    <Badge className=\"absolute inset-x-0 -top-3 mx-auto w-fit rounded-full bg-brand px-3 py-1 text-xs font-medium text-brand-foreground\">\n                      Popular\n                    </Badge>\n                  ) : null}\n\n                  <CardHeader className=\"gap-1\">\n                    <CardTitle className=\"font-medium tracking-title\">{plan.name}</CardTitle>\n                    <div className=\"my-3 flex items-baseline gap-1\">\n                      <span className=\"text-2xl font-semibold\">{plan.price}</span>\n                      {plan.period ? (\n                        <span className=\"text-sm text-muted-foreground\">{plan.period}</span>\n                      ) : null}\n                    </div>\n                    {plan.description ? (\n                      <CardDescription className=\"text-sm\">{plan.description}</CardDescription>\n                    ) : null}\n                  </CardHeader>\n\n                  <CardContent className=\"flex flex-col gap-4\">\n                    <hr className=\"border-dashed\" />\n\n                    {plan.features && plan.features.length > 0 ? (\n                      <ul className=\"flex flex-col gap-3 text-sm\">\n                        {plan.features.map((item, featureIndex) => (\n                          <li\n                            key={item.id ?? `${item.feature}-${featureIndex}`}\n                            className=\"flex items-center gap-2\"\n                          >\n                            <Check aria-hidden=\"true\" className=\"size-3\" />\n                            {item.feature}\n                          </li>\n                        ))}\n                      </ul>\n                    ) : null}\n                  </CardContent>\n\n                  {plan.links && plan.links.length > 0 ? (\n                    <CardFooter className=\"mt-auto\">\n                      {plan.links.map(({ link }, linkIndex) => (\n                        <CMSLink\n                          key={linkIndex}\n                          className=\"w-full\"\n                          {...link}\n                          appearance={plan.featured ? 'default' : 'outline'}\n                        />\n                      ))}\n                    </CardFooter>\n                  ) : null}\n                </Card>\n              ))}\n            </div>\n          ) : null}\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:file",
      "target": "~/src/blocks/PricingCards/Component.tsx"
    }
  ],
  "meta": {
    "payloadComponent": {
      "installCommand": "payload-components add pricing-cards",
      "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 pricing-cards\n```\n\nDirect shadcn install URL:\n\n```bash\npnpm dlx shadcn@latest add https://<your-domain>/r/pricing-cards.json\n```\n\nDirect shadcn installs only copy the block source files and shadcn UI dependencies. Use `payload-components add pricing-cards` when you also want Payload layout registration, `RenderBlocks` wiring, `generate:types`, and `generate:importmap` handled for you.",
  "type": "registry:block"
}