# Add the "Application Checklist" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/application-checklist) to this Pantheon Content Publisher (P1) Next.js project. Requirements for each applicant type in panels where only one opens at a time, with an apply button.

## Steps

1. Create `components/puck/application-checklist-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 { applicationChecklistBlock } from "./components/puck/application-checklist-block";`
3. Register it under `components` as `ApplicationChecklistBlock: applicationChecklistBlock`.
4. Add `"ApplicationChecklistBlock"` to the best-fitting entry in `categories` (this block's library category is "Higher ed"). 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/application-checklist-block.tsx`

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

/**
 * Application Checklist — what each kind of applicant needs to apply, one panel per type.
 * Built on native <details name>, so opening one panel closes the others with no JavaScript.
 * Register: `ApplicationChecklistBlock: applicationChecklistBlock` in puck.config.tsx.
 */

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

type ApplicantType = { label: string; summary: string; requirements: string; note: string };

export type ApplicationChecklistProps = {
  heading: string;
  headingLevel: Heading;
  intro: string;
  types: ApplicantType[];
  ctaLabel: string;
  ctaHref: string;
  secondaryLabel: string;
  secondaryHref: string;
  deadline: string;
};

export const applicationChecklistBlock: ComponentConfig<ApplicationChecklistProps> = {
  label: "Application Checklist",
  fields: {
    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" },
    types: {
      type: "array",
      label: "Applicant types",
      min: 1,
      max: 8,
      getItemSummary: (item) => item?.label || "Applicant type",
      defaultItemProps: { label: "New applicant type", summary: "", requirements: "First requirement\nSecond requirement", note: "" },
      arrayFields: {
        label: { type: "text", label: "Applicant type", metadata: { help: "Such as First-year, Transfer or International." } },
        summary: { type: "text", label: "Who this is for", metadata: { help: "One short line shown under the type. Leave blank to hide it." } },
        requirements: { type: "textarea", label: "Requirements", metadata: { help: "One item per line." } },
        note: { type: "textarea", label: "Note", metadata: { help: "A tip or exception shown under the list. Leave blank to hide it." } },
      },
    },
    ctaLabel: { type: "text", label: "Button text", metadata: { help: "Leave blank to hide the button." } },
    ctaHref: { type: "text", label: "Button link", metadata: { help: "A path (/apply), full URL, #anchor, mailto: or tel:." } },
    secondaryLabel: { type: "text", label: "Secondary link text", metadata: { help: "Leave blank to hide it." } },
    secondaryHref: { type: "text", label: "Secondary link" },
    deadline: { type: "text", label: "Deadline line", metadata: { help: "Shown beside the button, such as the priority deadline. Leave blank to hide it." } },
  },
  defaultProps: {
    heading: "What you'll need to apply",
    headingLevel: "h2",
    intro: "Requirements depend on where you're starting from. Choose the description that fits you and gather these before you begin; you can save your application and come back anytime.",
    types: [
      {
        label: "First-year",
        summary: "Finishing high school or have never enrolled in college",
        requirements:
          "Online application through the Northfield portal or the Common App\n$40 application fee, or a fee waiver\nOfficial high school transcript\nSAT or ACT scores (optional through fall 2028)\nOne letter of recommendation from a teacher or counselor\nPersonal essay, 250–650 words",
        note: "Applying to the Honors College? Add a second short essay in the portal after you submit.",
      },
      {
        label: "Transfer",
        summary: "Have earned college credit after high school",
        requirements:
          "Online transfer application\n$40 application fee, or a fee waiver\nOfficial transcripts from every college you've attended\nFinal high school transcript if you've completed fewer than 24 credit hours\nCollege report from your current or most recent institution",
        note: "Use the transfer credit lookup to see how your courses count before you apply.",
      },
      {
        label: "International",
        summary: "Will need an F-1 or J-1 visa to study in the U.S.",
        requirements:
          "Online international application\n$60 application fee\nAcademic records with certified English translations\nProof of English proficiency, such as TOEFL or IELTS scores\nFinancial statement showing support for your first year\nCopy of your passport photo page",
        note: "Records from outside the United States must come through an approved credential evaluation service.",
      },
      {
        label: "Returning student",
        summary: "Previously enrolled at Northfield and away for a term or more",
        requirements: "Readmission form\nTranscripts from any college attended since you left\nClearance of any holds on your student account",
        note: "",
      },
    ],
    ctaLabel: "Apply now",
    ctaHref: "/apply",
    secondaryLabel: "Request information",
    secondaryHref: "/request-info",
    deadline: "Priority deadline for fall 2027: December 1, 2026",
  },
  render: ({ id, heading, headingLevel, intro, types, ctaLabel, ctaHref, secondaryLabel, secondaryHref, deadline }) => {
    const H = headingLevel || "h2";
    // A shared name makes the panels an exclusive accordion; scoping it to Puck's id keeps two copies independent.
    const group = `p1-apply-${id}`;
    const list = (types ?? []).filter((t) => t?.label);
    const hasActions = Boolean(ctaLabel || secondaryLabel || deadline);

    return (
      <section className="bg-neutral-50 px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-4xl">
          {heading || intro ? (
            <div className="max-w-2xl">
              {heading ? <H className="text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl">{heading}</H> : null}
              {intro ? <p className="mt-4 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}
            </div>
          ) : null}

          {list.length ? (
            <div className={`space-y-3 ${heading || intro ? "mt-10 sm:mt-12" : ""}`}>
              {list.map((type, i) => {
                const items = (type.requirements || "")
                  .split("\n")
                  .map((r) => r.trim())
                  .filter(Boolean);
                return (
                  <details
                    key={`${type.label}-${i}`}
                    name={group}
                    open={i === 0 ? true : undefined}
                    className="group rounded-2xl bg-white ring-1 ring-neutral-200 transition open:shadow-sm open:ring-indigo-600/30"
                  >
                    <summary className="flex min-h-11 cursor-pointer list-none items-center gap-4 rounded-2xl px-5 py-5 text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 sm:px-7 sm:py-6 [&::-webkit-details-marker]:hidden">
                      <span className="min-w-0 flex-1">
                        <span className="block text-lg leading-7 font-semibold text-neutral-950 sm:text-xl">{type.label}</span>
                        {type.summary ? <span className="mt-0.5 block text-sm leading-6 text-pretty text-neutral-600">{type.summary}</span> : null}
                      </span>
                      {items.length ? (
                        <span className="hidden shrink-0 rounded-full bg-neutral-100 px-2.5 py-1 text-xs font-semibold text-neutral-700 tabular-nums group-open:bg-indigo-50 group-open:text-indigo-700 sm:inline-flex">
                          {items.length} {items.length === 1 ? "item" : "items"}
                        </span>
                      ) : null}
                      <span aria-hidden="true" className="grid size-8 shrink-0 place-items-center rounded-full bg-neutral-100 text-neutral-700 transition group-open:rotate-180 group-open:bg-indigo-600 group-open:text-white">
                        <svg viewBox="0 0 20 20" fill="currentColor" className="size-5">
                          <path fillRule="evenodd" d="M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z" clipRule="evenodd" />
                        </svg>
                      </span>
                    </summary>
                    <div className="border-t border-neutral-200 px-5 pt-5 pb-6 sm:px-7 sm:pb-7">
                      {items.length ? (
                        <ul role="list" className="grid gap-x-8 gap-y-3 md:grid-cols-2">
                          {items.map((item, j) => (
                            <li key={j} className="flex gap-3 text-base leading-7 text-neutral-800">
                              <svg aria-hidden="true" viewBox="0 0 20 20" className="mt-1 size-5 shrink-0">
                                <rect x="1.75" y="1.75" width="16.5" height="16.5" rx="4.25" className="fill-indigo-50 stroke-indigo-600" strokeWidth="1.5" />
                                <path d="M6 10.25 8.75 13 14 7.25" fill="none" className="stroke-indigo-600" strokeWidth="1.75" strokeLinecap="round" strokeLinejoin="round" />
                              </svg>
                              <span className="min-w-0 text-pretty">{item}</span>
                            </li>
                          ))}
                        </ul>
                      ) : null}
                      {type.note ? (
                        <p className={`flex gap-2.5 rounded-xl bg-neutral-50 p-4 text-sm leading-6 text-pretty text-neutral-700 ring-1 ring-neutral-200 ${items.length ? "mt-6" : ""}`}>
                          <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="mt-1 size-4 shrink-0 text-indigo-600">
                            <path fillRule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clipRule="evenodd" />
                          </svg>
                          {type.note}
                        </p>
                      ) : null}
                    </div>
                  </details>
                );
              })}
            </div>
          ) : null}

          {hasActions ? (
            <div className="mt-10 flex flex-col gap-4 sm:mt-12 sm:flex-row sm:flex-wrap sm:items-center sm:gap-x-6">
              {ctaLabel ? (
                <a
                  href={ctaHref || "#"}
                  className="inline-flex min-h-11 items-center justify-center rounded-lg bg-indigo-600 px-6 py-3 text-base font-semibold text-white shadow-sm transition hover:bg-indigo-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                >
                  {ctaLabel}
                </a>
              ) : null}
              {secondaryLabel ? (
                <a
                  href={secondaryHref || "#"}
                  className="inline-flex min-h-11 items-center justify-center rounded-lg bg-white px-6 py-3 text-base font-semibold text-neutral-950 ring-1 ring-neutral-300 transition ring-inset hover:bg-neutral-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                >
                  {secondaryLabel}
                </a>
              ) : null}
              {deadline ? (
                <p className="flex items-center gap-2 text-sm leading-6 font-medium text-neutral-700 sm:ml-auto">
                  <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-5 shrink-0 text-indigo-600">
                    <path fillRule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-13a.75.75 0 0 0-1.5 0v5c0 .414.336.75.75.75h4a.75.75 0 0 0 0-1.5h-3.25V5Z" clipRule="evenodd" />
                  </svg>
                  {deadline}
                </p>
              ) : null}
            </div>
          ) : null}
        </div>
      </section>
    );
  },
};
```
