From 52b8f75e90b05428d59f3a313794d21e9f4532d2 Mon Sep 17 00:00:00 2001 From: wlenig <30681316+wlenig@users.noreply.github.com> Date: Sun, 22 Mar 2026 18:25:37 -0400 Subject: [PATCH 01/13] WEB-111 Clear old components --- src/components/puck/BulletList.tsx | 66 ------- src/components/puck/Button.tsx | 88 --------- src/components/puck/Container.tsx | 37 ---- src/components/puck/Footer.tsx | 185 ------------------ src/components/puck/HeaderContent.tsx | 160 --------------- src/components/puck/MasonryGrid.tsx | 41 ---- .../puck/MinimumColumnWidthGrid.tsx | 34 ---- src/components/puck/Navigation.tsx | 179 ----------------- src/components/puck/Paragraph.tsx | 38 ---- src/components/puck/RootContainer.tsx | 40 ---- src/components/puck/SplitPane.tsx | 63 ------ src/components/puck/Title.tsx | 76 ------- src/lib/settings-fields.ts | 82 -------- src/puck.config.tsx | 48 ----- 14 files changed, 1137 deletions(-) delete mode 100644 src/components/puck/BulletList.tsx delete mode 100644 src/components/puck/Button.tsx delete mode 100644 src/components/puck/Container.tsx delete mode 100644 src/components/puck/Footer.tsx delete mode 100644 src/components/puck/HeaderContent.tsx delete mode 100644 src/components/puck/MasonryGrid.tsx delete mode 100644 src/components/puck/MinimumColumnWidthGrid.tsx delete mode 100644 src/components/puck/Navigation.tsx delete mode 100644 src/components/puck/Paragraph.tsx delete mode 100644 src/components/puck/RootContainer.tsx delete mode 100644 src/components/puck/SplitPane.tsx delete mode 100644 src/components/puck/Title.tsx delete mode 100644 src/lib/settings-fields.ts diff --git a/src/components/puck/BulletList.tsx b/src/components/puck/BulletList.tsx deleted file mode 100644 index 5ffca8ad..00000000 --- a/src/components/puck/BulletList.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { ComponentConfig } from "@puckeditor/core"; -import { JSX } from "react"; -import { textColorSettingField } from "../../lib/settings-fields"; - -export type BulletType = "disc" | "decimal" | "none" - -export interface BulletListProps { - items: { text: string }[]; - bullet: BulletType; - textColor: string; -} - -export function BulletList({ - items, - bullet = "disc", - textColor = "text-black" -}: BulletListProps) { - const ListComponent = bullet === "decimal" ? "ol" : "ul" as keyof JSX.IntrinsicElements; - - const listStyleMap = { - disc: "list-disc list-outside", - decimal: "list-decimal list-outside", - none: "list-none" - } - const listStyles = listStyleMap[bullet] - - return ( - - {items.map(({ text }, index) => ( -
  • - {text} -
  • - ))} -
    - ) -} - -export const BulletListConfig: ComponentConfig = { - fields: { - bullet: { - type: "select", - options: [ - { label: "Disc", value: "disc" }, - { label: "Decimal", value: "decimal" }, - { label: "None", value: "none" }, - ] - }, - items: { - type: "array", - arrayFields: { - text: { type: "text" }, - }, - }, - textColor: textColorSettingField - }, - defaultProps: { - bullet: "disc", - items: [ - { text: "First item" }, - { text: "Second item" }, - { text: "Third item" }, - ], - textColor: "text-black" - }, - render: (props) => , -} \ No newline at end of file diff --git a/src/components/puck/Button.tsx b/src/components/puck/Button.tsx deleted file mode 100644 index b3215173..00000000 --- a/src/components/puck/Button.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { ComponentConfig } from "@puckeditor/core"; -import { paddingSettingsField, heightSettingsField, widthSettingsField } from "../../lib/settings-fields"; - -const buttonStylesMap = { - primary: "bg-sga-red hover:bg-sga-red-alt text-white rounded-lg p-4 flex items-center justify-center text-center", - secondary: "bg-black text-white rounded-lg p-4 flex items-center justify-center text-center", - tertiary: "bg-white text-sga-red rounded-lg p-4 flex items-center justify-center text-center" -}; - -interface BaseButtonProps { - label: string; - style: "primary" | "secondary" | "tertiary"; - padding: string; - height: string; - width: string; -} - -export interface ButtonProps extends BaseButtonProps { - onClick: () => void; -} - -export interface LinkButtonProps extends BaseButtonProps { - href: string; -} - -export function Button({ - label, - style, - padding = "p-4", - height = "h-full", - width = "w-full", - onClick -}: ButtonProps) { - return ( - - ) -} - - -export function LinkButton({ - label, - style, - padding = "p-4", - height = "h-full", - width = "w-full", - href -}: LinkButtonProps) { - return ( - - {label} - - ) -} - -export const LinkButtonConfig: ComponentConfig = { - fields: { - label: { type: "text" }, - style: { - type: "select", - options: [ - { label: "Red", value: "primary" }, - { label: "Black", value: "secondary" }, - { label: "White", value: "tertiary"} - ] - }, - href: { type: "text" }, - padding: paddingSettingsField, - height: heightSettingsField, - width: widthSettingsField, - }, - defaultProps: { - label: "Button", - style: "primary", - href: "#", - padding: "p-4", - height: "h-full", - width: "w-full", - }, - render: (props) => , -} \ No newline at end of file diff --git a/src/components/puck/Container.tsx b/src/components/puck/Container.tsx deleted file mode 100644 index 4ccbfce6..00000000 --- a/src/components/puck/Container.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { ComponentConfig, SlotComponent } from "@puckeditor/core" -import { gapSettingsField, outlineSettingsField, paddingSettingsField } from "../../lib/settings-fields"; - -export interface ContainerProps { - content?: SlotComponent; - padding: string; - gap: string; - outline: string; -} - -export function Container({ - content: Content, - padding = "", - gap = "", - outline = "", -}: ContainerProps) { - return ( -
    - {Content && } -
    - ) -} - -export const ContainerConfig: ComponentConfig = { - fields: { - content: { type: "slot" }, - padding: paddingSettingsField, - gap: gapSettingsField, - outline: outlineSettingsField - }, - defaultProps: { - padding: "p-10", - gap: "gap-6", - outline: "", - }, - render: (props) => , -} \ No newline at end of file diff --git a/src/components/puck/Footer.tsx b/src/components/puck/Footer.tsx deleted file mode 100644 index 54488aa8..00000000 --- a/src/components/puck/Footer.tsx +++ /dev/null @@ -1,185 +0,0 @@ -import { ComponentConfig } from '@puckeditor/core'; - -export type FooterProps = { - showActionButtons?: boolean; - actionButton1Text?: string; - actionButton1Href?: string; - actionButton2Text?: string; - actionButton2Href?: string; - actionButton3Text?: string; - actionButton3Href?: string; - showSocialMedia?: boolean; - socialMedia1Label?: string; - socialMedia1LogoSrc?: string; - socialMedia1LogoAlt?: string; - socialMedia2Label?: string; - socialMedia2LogoSrc?: string; - socialMedia2LogoAlt?: string; - socialMedia3Label?: string; - socialMedia3LogoSrc?: string; - socialMedia3LogoAlt?: string; - organizationName?: string; - organizationAddress?: string; - webmasterEmail?: string; - webmasterLabel?: string; - mediaInquiriesEmail?: string; - mediaInquiriesLabel?: string; -}; - -export function Footer({ - showActionButtons, - actionButton1Text, - actionButton1Href, - actionButton2Text, - actionButton2Href, - actionButton3Text, - actionButton3Href, - showSocialMedia, - socialMedia1Label, - socialMedia1LogoSrc, - socialMedia1LogoAlt, - socialMedia2Label, - socialMedia2LogoSrc, - socialMedia2LogoAlt, - socialMedia3Label, - socialMedia3LogoSrc, - socialMedia3LogoAlt, - organizationName, - organizationAddress, - webmasterEmail, - webmasterLabel, - mediaInquiriesEmail, - mediaInquiriesLabel, -}: FooterProps) { - return ( -
    -
    - - {showActionButtons && ( -
    - - - -
    - )} - - {showSocialMedia && ( -
    -
    -

    {socialMedia1Label}

    - {socialMedia1LogoSrc ? ( - {socialMedia1LogoAlt} - ) : ( -
    Logo
    - )} -
    -
    -

    {socialMedia2Label}

    - {socialMedia2LogoSrc ? ( - {socialMedia2LogoAlt} - ) : ( -
    Logo
    - )} -
    -
    -

    {socialMedia3Label}

    - {socialMedia3LogoSrc ? ( - {socialMedia3LogoAlt} - ) : ( -
    Logo
    - )} -
    -
    - )} - -
    -

    {organizationName}

    -

    {organizationAddress}

    -

    {webmasterLabel}  - - {webmasterEmail} - -

    -

    {mediaInquiriesLabel}  - - {mediaInquiriesEmail} - -

    -
    -
    -
    - ) -} - - -export const FooterConfig: ComponentConfig = { - fields: { - showActionButtons: { - type: "radio", - options: [ - { label: "Show", value: true }, - { label: "Hide", value: false }, - ] - }, - actionButton1Text: { type: "text" }, - actionButton1Href: { type: "text" }, - actionButton2Text: { type: "text" }, - actionButton2Href: { type: "text" }, - actionButton3Text: { type: "text" }, - actionButton3Href: { type: "text" }, - showSocialMedia: { - type: "radio", - options: [ - { label: "Show", value: true }, - { label: "Hide", value: false }, - ] - }, - socialMedia1Label: { type: "text" }, - socialMedia1LogoSrc: { type: "text" }, - socialMedia1LogoAlt: { type: "text" }, - socialMedia2Label: { type: "text" }, - socialMedia2LogoSrc: { type: "text" }, - socialMedia2LogoAlt: { type: "text" }, - socialMedia3Label: { type: "text" }, - socialMedia3LogoSrc: { type: "text" }, - socialMedia3LogoAlt: { type: "text" }, - organizationName: { type: "text" }, - organizationAddress: { type: "text" }, - webmasterEmail: { type: "text" }, - webmasterLabel: { type: "text" }, - mediaInquiriesEmail: { type: "text" }, - mediaInquiriesLabel: { type: "text" }, - }, - defaultProps: { - showActionButtons: true, - actionButton1Text: "GIVE FEEDBACK", - actionButton1Href: "#", - actionButton2Text: "MAILING LIST", - actionButton2Href: "#", - actionButton3Text: "GET INVOLVED", - actionButton3Href: "#", - showSocialMedia: true, - socialMedia1Label: "SGA", - socialMedia1LogoSrc: "", - socialMedia1LogoAlt: "SGA Instagram", - socialMedia2Label: "Campus Affairs", - socialMedia2LogoSrc: "", - socialMedia2LogoAlt: "Campus Affairs Instagram", - socialMedia3Label: "SGA", - socialMedia3LogoSrc: "", - socialMedia3LogoAlt: "SGA TikTok", - organizationName: "Northeastern University Student Government Association", - organizationAddress: "332 Curry Student Center, 360 Huntington Avenue, Boston, MA 02115", - webmasterEmail: "sgaOperations@northeastern.edu", - webmasterLabel: "Webmaster:", - mediaInquiriesEmail: "sgaExternalAffairs@northeastern.edu", - mediaInquiriesLabel: "Media Inquiries:", - }, - render: (props) =>