# Add the "Donor-Advised Funds" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/donor-advised-funds) to this Pantheon Content Publisher (P1) Next.js project. Explains donor-advised funds in three steps, with a fees table, a cited private foundation comparison and contact.

## Steps

1. Create `components/puck/donor-advised-funds-block.tsx` with the exact file contents below. If `components/puck/` doesn't exist, find the folder where this project keeps its Puck components (look at the imports in `puck.config.tsx`) and put it there.
2. In `puck.config.tsx`, import it: `import { donorAdvisedFundsBlock } from "./components/puck/donor-advised-funds-block";`
3. Register it under `components` as `DonorAdvisedFundsBlock: donorAdvisedFundsBlock`.
4. Add `"DonorAdvisedFundsBlock"` to the best-fitting entry in `categories` (this block's library category is "Foundations"). Create a category only if none fits.
5. Run the project's type check (usually `pnpm typecheck`) and resolve anything project-specific.
6. If `package.json` has a `sync:registry` script, tell the user it must run (or that CI will run it) before the new component appears in the P1 editor.

## Rules

- Do not add dependencies. The block is self-contained by design: one type-only import from `@puckeditor/core`, Tailwind v4 classes, no client JavaScript.
- Keep the files as-is unless the user asks for changes. The accent color is `indigo-*`; if the project has brand colors, offer to swap them with a find-and-replace on `indigo-`.
- Images are plain `imageUrl` + `imageAlt` text fields. If this project defines a P1 media-library field (search for `"p1-media"`), offer to switch to it.
- Don't change prop names in `defaultProps`. Content editors' saved pages depend on them.

## File: `components/puck/donor-advised-funds-block.tsx`

```tsx
import type { ComponentConfig } from "@puckeditor/core";

/**
 * Donor-Advised Funds — explains DAFs to prospective donors: three steps, a minimums and
 * fees table, a DAF vs. private foundation comparison table, and a talk-to-us card.
 * Register: `DonorAdvisedFundsBlock: donorAdvisedFundsBlock` in puck.config.tsx.
 */

type Heading = "h1" | "h2" | "h3" | "h4";

export type DonorAdvisedFundsProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  intro: string;
  stepsHeading: string;
  steps: { title: string; body: string }[];
  feesHeading: string;
  fees: { item: string; detail: string }[];
  feesNote: string;
  compareHeading: string;
  compareColA: string;
  compareColB: string;
  comparison: { feature: string; a: string; b: string }[];
  compareSource: string;
  contactHeading: string;
  contactBody: string;
  contactName: string;
  contactTitle: string;
  contactEmail: string;
  contactPhone: string;
  ctaLabel: string;
  ctaHref: string;
};

const childHeading: Record<Heading, "h2" | "h3" | "h4" | "h5"> = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" };
const grandchildHeading: Record<Heading, "h3" | "h4" | "h5" | "h6"> = { h1: "h3", h2: "h4", h3: "h5", h4: "h6" };
const focusRing = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600";

export const donorAdvisedFundsBlock: ComponentConfig<DonorAdvisedFundsProps> = {
  label: "Donor-Advised Funds",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Small line above the heading. Leave blank to hide it." } },
    heading: { type: "text", label: "Heading" },
    headingLevel: {
      type: "select",
      label: "Heading level",
      options: [
        { label: "H1", value: "h1" },
        { label: "H2", value: "h2" },
        { label: "H3", value: "h3" },
        { label: "H4", value: "h4" },
      ],
      metadata: { help: "Sets the page outline for screen readers and search. The look doesn't change." },
    },
    intro: { type: "textarea", label: "Intro" },
    stepsHeading: { type: "text", label: "Steps heading" },
    steps: {
      type: "array",
      label: "How it works",
      min: 1,
      max: 4,
      getItemSummary: (item) => item?.title || "Step",
      defaultItemProps: { title: "New step", body: "" },
      arrayFields: {
        title: { type: "text", label: "Step" },
        body: { type: "textarea", label: "Description" },
      },
    },
    feesHeading: { type: "text", label: "Fees heading" },
    fees: {
      type: "array",
      label: "Minimums and fees",
      min: 0,
      max: 8,
      getItemSummary: (item) => [item?.item, item?.detail].filter(Boolean).join(" · ") || "Fee",
      defaultItemProps: { item: "New item", detail: "" },
      arrayFields: {
        item: { type: "text", label: "Item" },
        detail: { type: "text", label: "Amount or rate" },
      },
      metadata: { help: "Leave empty to hide the fees table." },
    },
    feesNote: { type: "textarea", label: "Fees note", metadata: { help: "Small print under the fees table." } },
    compareHeading: { type: "text", label: "Comparison heading", metadata: { help: "Also the table caption for screen readers." } },
    compareColA: { type: "text", label: "First column heading" },
    compareColB: { type: "text", label: "Second column heading" },
    comparison: {
      type: "array",
      label: "Comparison rows",
      min: 0,
      max: 12,
      getItemSummary: (item) => item?.feature || "Row",
      defaultItemProps: { feature: "New feature", a: "", b: "" },
      arrayFields: {
        feature: { type: "text", label: "Feature" },
        a: { type: "textarea", label: "First column" },
        b: { type: "textarea", label: "Second column" },
      },
      metadata: { help: "Leave empty to hide the comparison. Have tax counsel review any changes to this table." },
    },
    compareSource: { type: "textarea", label: "Comparison source", metadata: { help: "Cite where each rule comes from, like IRS Publication 526, and the tax year it reflects. Recheck these figures every year." } },
    contactHeading: { type: "text", label: "Contact heading" },
    contactBody: { type: "textarea", label: "Contact text" },
    contactName: { type: "text", label: "Contact name", metadata: { help: "Leave blank to hide the name." } },
    contactTitle: { type: "text", label: "Contact title" },
    contactEmail: { type: "text", label: "Contact email" },
    contactPhone: { type: "text", label: "Contact phone" },
    ctaLabel: { type: "text", label: "Button text", metadata: { help: "Leave blank to hide the button." } },
    ctaHref: { type: "text", label: "Button link" },
  },
  defaultProps: {
    eyebrow: "Donor-advised funds",
    heading: "A simpler way to give like a foundation",
    headingLevel: "h2",
    intro: "A donor-advised fund lets you make one tax-deductible gift now, then recommend grants to the charities you care about over time. We handle the paperwork, due diligence and receipts. You keep the joy of giving.",
    stepsHeading: "How it works",
    steps: [
      { title: "Open your fund", body: "Contribute cash, appreciated stock or other assets. You may take a charitable deduction in the year you give, as allowed by law." },
      { title: "Let it grow", body: "Choose an investment pool. Growth stays in your fund for future giving, so your charitable dollars can do more." },
      { title: "Recommend grants", body: "Suggest grants online to any eligible U.S. charity, anytime. We confirm each charity and send the check in your fund's name, or anonymously." },
    ],
    feesHeading: "Minimums and fees",
    fees: [
      { item: "Minimum to open", detail: "$10,000" },
      { item: "Minimum grant", detail: "$250" },
      { item: "Annual fee, first $500,000", detail: "1.0% of fund balance" },
      { item: "Annual fee, above $500,000", detail: "0.6% of fund balance" },
      { item: "Minimum annual fee", detail: "$150" },
      { item: "Grants to local nonprofits", detail: "No transaction fee" },
    ],
    feesNote: "Sample figures. Fees are assessed quarterly and support the foundation's community grantmaking and donor services.",
    compareHeading: "Donor-advised fund or private foundation?",
    compareColA: "Donor-advised fund",
    compareColB: "Private foundation",
    comparison: [
      { feature: "Deduction limit for cash gifts", a: "Up to 60% of adjusted gross income", b: "Up to 30% of adjusted gross income" },
      { feature: "Deduction limit for appreciated stock", a: "Up to 30% of adjusted gross income", b: "Up to 20% of adjusted gross income" },
      { feature: "Tax on investment income", a: "None", b: "1.39% excise tax on net investment income" },
      { feature: "Required annual payout", a: "No federal minimum", b: "Generally 5% of net investment assets" },
      { feature: "Annual tax filing", a: "Handled by the foundation", b: "Form 990-PF, publicly available" },
      { feature: "Grant privacy", a: "Can recommend grants anonymously", b: "Grants listed on public tax filings" },
      { feature: "Startup", a: "Open in a day with one form", b: "Legal incorporation and IRS application" },
    ],
    compareSource: "General information, not tax advice. Figures current for tax year 2025. Sources: IRS Publication 526 (2025), Charitable Contributions (deduction limits); IRS, Tax on Net Investment Income (1.39% rate, IRC §4940); IRC §4942 (minimum distribution). Tax law changes, so confirm current rules with your tax advisor.",
    contactHeading: "Talk with us before you decide",
    contactBody: "Our philanthropic advisors work alongside your attorney or financial advisor, and there's no cost to talk.",
    contactName: "James Whitaker",
    contactTitle: "Director of Philanthropic Services",
    contactEmail: "giving@harlowfoundation.example.org",
    contactPhone: "(555) 555-0118",
    ctaLabel: "Open a donor-advised fund",
    ctaHref: "/give/donor-advised-fund",
  },
  render: (props) => {
    const {
      id, eyebrow, heading, headingLevel, intro, stepsHeading, steps, feesHeading, fees, feesNote,
      compareHeading, compareColA, compareColB, comparison, compareSource,
      contactHeading, contactBody, contactName, contactTitle, contactEmail, contactPhone, ctaLabel, ctaHref,
    } = props;
    const H = headingLevel || "h2";
    const Sub = childHeading[H] ?? "h3";
    const Sub2 = grandchildHeading[H] ?? "h4";
    const uid = `daf-${id || "explainer"}`;
    const stepList = (steps ?? []).filter((s) => s?.title);
    const feeRows = (fees ?? []).filter((f) => f?.item);
    const compareRows = (comparison ?? []).filter((r) => r?.feature);
    const tel = (contactPhone || "").replace(/[^\d+]/g, "");
    const hasContact = Boolean(contactHeading || contactBody || contactName || ctaLabel);
    const colA = compareColA || "Donor-advised fund";
    const colB = compareColB || "Private foundation";

    return (
      <section className="bg-white px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-7xl">
          <div className="max-w-3xl">
            {eyebrow ? <p className="text-sm font-semibold tracking-widest text-indigo-700 uppercase">{eyebrow}</p> : null}
            {heading ? <H className={`text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl ${eyebrow ? "mt-3" : ""}`}>{heading}</H> : null}
            {intro ? <p className="mt-4 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
          </div>

          {stepList.length ? (
            <div className="mt-14 lg:mt-16">
              {stepsHeading ? <Sub className="text-sm font-semibold tracking-widest text-neutral-950 uppercase">{stepsHeading}</Sub> : null}
              <ol role="list" className={`grid grid-cols-1 gap-px overflow-hidden rounded-2xl bg-neutral-200 ring-1 ring-neutral-200 md:grid-cols-3 ${stepsHeading ? "mt-5" : ""}`}>
                {stepList.map((s, i) => (
                  <li key={`${s.title}-${i}`} className="bg-white p-6 sm:p-8">
                    <p aria-hidden="true" className="text-5xl leading-none font-semibold tracking-tight text-indigo-200 tabular-nums">{i + 1}</p>
                    <Sub2 className="mt-4 text-lg leading-7 font-semibold text-neutral-950">
                      <span className="sr-only">Step {i + 1}: </span>
                      {s.title}
                    </Sub2>
                    {s.body ? <p className="mt-2 text-base leading-7 text-pretty text-neutral-600">{s.body}</p> : null}
                  </li>
                ))}
              </ol>
            </div>
          ) : null}

          {compareRows.length ? (
            <div className="mt-14 lg:mt-16">
              {compareHeading ? <Sub id={`${uid}-compare`} className="text-xl font-semibold tracking-tight text-neutral-950">{compareHeading}</Sub> : null}
              <div
                role="region"
                tabIndex={0}
                aria-labelledby={`${uid}-caption`}
                className={`relative -mx-4 overflow-x-auto sm:mx-0 sm:rounded-2xl sm:ring-1 sm:ring-neutral-950/10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 ${compareHeading ? "mt-5" : ""}`}
              >
                <table className="w-full min-w-xl border-collapse text-left text-sm">
                  <caption id={`${uid}-caption`} className="sr-only">
                    {compareHeading || "Donor-advised fund compared with a private foundation"}
                  </caption>
                  <thead>
                    <tr className="border-b border-neutral-200 bg-neutral-50">
                      <td className="w-1/3 py-3 pr-3 pl-4 sm:pl-6" />
                      <th scope="col" className="w-1/3 px-3 py-3 text-sm font-semibold text-indigo-800">{colA}</th>
                      <th scope="col" className="w-1/3 py-3 pr-4 pl-3 text-sm font-semibold text-neutral-800 sm:pr-6">{colB}</th>
                    </tr>
                  </thead>
                  <tbody className="divide-y divide-neutral-200">
                    {compareRows.map((r, i) => (
                      <tr key={`${r.feature}-${i}`} className="align-top">
                        <th scope="row" className="py-4 pr-3 pl-4 font-medium text-neutral-950 sm:pl-6">{r.feature}</th>
                        <td className="bg-indigo-50/50 px-3 py-4 leading-6 text-pretty text-neutral-800">{r.a || "—"}</td>
                        <td className="py-4 pr-4 pl-3 leading-6 text-pretty text-neutral-600 sm:pr-6">{r.b || "—"}</td>
                      </tr>
                    ))}
                  </tbody>
                </table>
              </div>
              {compareSource ? <p className="mt-4 max-w-4xl text-sm leading-6 text-pretty text-neutral-600">{compareSource}</p> : null}
            </div>
          ) : null}

          <div className="mt-14 grid grid-cols-1 gap-12 lg:mt-16 lg:grid-cols-12 lg:gap-16">
            {feeRows.length ? (
              <div className="lg:col-span-5">
                <table className="w-full text-left text-sm">
                  <caption className="text-left">
                    <Sub className="text-xl font-semibold tracking-tight text-neutral-950">{feesHeading || "Minimums and fees"}</Sub>
                  </caption>
                  <thead className="sr-only">
                    <tr>
                      <th scope="col">Item</th>
                      <th scope="col">Amount or rate</th>
                    </tr>
                  </thead>
                  <tbody className="divide-y divide-neutral-200 border-y border-neutral-200">
                    {feeRows.map((f, i) => (
                      <tr key={`${f.item}-${i}`}>
                        <th scope="row" className="py-3.5 pr-4 font-medium text-neutral-700">{f.item}</th>
                        <td className="py-3.5 text-right font-semibold text-neutral-950 tabular-nums">{f.detail}</td>
                      </tr>
                    ))}
                  </tbody>
                </table>
                {feesNote ? <p className="mt-4 text-sm leading-6 text-pretty text-neutral-600">{feesNote}</p> : null}
              </div>
            ) : null}

            {hasContact ? (
              <aside aria-labelledby={contactHeading ? `${uid}-contact` : undefined} aria-label={contactHeading ? undefined : "Contact us"} className={feeRows.length ? "lg:col-span-6 lg:col-start-7" : "lg:col-span-12"}>
                <div className="h-full rounded-2xl bg-indigo-950 p-6 text-white sm:p-8 lg:p-10">
                  {contactHeading ? <Sub id={`${uid}-contact`} className="text-2xl font-semibold tracking-tight text-balance">{contactHeading}</Sub> : null}
                  {contactBody ? <p className="mt-3 text-base leading-7 text-pretty text-indigo-100">{contactBody}</p> : null}
                  {contactName ? (
                    <div className="mt-6 border-t border-white/15 pt-6 text-sm leading-6">
                      <p className="text-base font-semibold">{contactName}</p>
                      {contactTitle ? <p className="text-indigo-200">{contactTitle}</p> : null}
                      <ul role="list" className="mt-2 flex flex-col sm:flex-row sm:flex-wrap sm:gap-x-6">
                        {contactEmail ? (
                          <li>
                            <a href={`mailto:${contactEmail}`} className="-mx-1 inline-flex min-h-11 items-center rounded px-1 font-medium break-all text-white underline decoration-white/40 underline-offset-4 hover:decoration-white focus-visible:outline-2 focus-visible:outline-white">
                              {contactEmail}
                            </a>
                          </li>
                        ) : null}
                        {contactPhone ? (
                          <li>
                            <a href={`tel:${tel}`} className="-mx-1 inline-flex min-h-11 items-center rounded px-1 font-medium text-white tabular-nums underline decoration-white/40 underline-offset-4 hover:decoration-white focus-visible:outline-2 focus-visible:outline-white">
                              {contactPhone}
                            </a>
                          </li>
                        ) : null}
                      </ul>
                    </div>
                  ) : null}
                  {ctaLabel ? (
                    <a href={ctaHref || "#"} className="mt-6 inline-flex min-h-11 items-center justify-center rounded-lg bg-white px-5 py-3 text-base font-semibold text-indigo-950 transition hover:bg-indigo-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white">
                      {ctaLabel}
                    </a>
                  ) : null}
                </div>
              </aside>
            ) : null}
          </div>

        </div>
      </section>
    );
  },
};
```
