From 143bfc1937f8089f83bbd854afd790ce0d695f9d Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Fri, 19 Apr 2024 14:00:44 -0700 Subject: [PATCH] SUP-197 SUP-182 Stubbed out search and file list components --- package.json | 4 +- src/components/elements/link.tsx | 8 +- src/components/elements/select-list.tsx | 4 +- src/components/paragraphs/paragraph.tsx | 6 + .../sup-file-list/file-list-paragraph.tsx | 32 ++ .../sup-pre-built/pre-built-paragraph.tsx | 15 + .../sup-pre-built/pre-built-search-form.tsx | 13 + src/lib/gql/__generated__/drupal.d.ts | 239 ++++++++++--- src/lib/gql/__generated__/queries.ts | 37 +- src/lib/gql/fragments-fields.drupal.gql | 77 +++++ src/lib/gql/fragments-media.drupal.gql | 59 ++++ ...s.drupal.gql => fragments-node.drupal.gql} | 319 ------------------ src/lib/gql/fragments-paragraph.drupal.gql | 209 ++++++++++++ yarn.lock | 33 +- 14 files changed, 652 insertions(+), 403 deletions(-) create mode 100644 src/components/paragraphs/sup-file-list/file-list-paragraph.tsx create mode 100644 src/components/paragraphs/sup-pre-built/pre-built-paragraph.tsx create mode 100644 src/components/paragraphs/sup-pre-built/pre-built-search-form.tsx create mode 100644 src/lib/gql/fragments-fields.drupal.gql create mode 100644 src/lib/gql/fragments-media.drupal.gql rename src/lib/gql/{fragments.drupal.gql => fragments-node.drupal.gql} (60%) create mode 100644 src/lib/gql/fragments-paragraph.drupal.gql diff --git a/package.json b/package.json index b1664988..f54e3731 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "autoprefixer": "^10.4.19", "axios": "^1.6.8", "clsx": "^2.1.0", - "decanter": "^7.2.0", + "decanter": "^7.3.0", "drupal-jsonapi-params": "^2.3.1", "eslint": "^8.57.0", "eslint-config-next": "^14.2.2", @@ -47,7 +47,7 @@ "react-slick": "^0.30.2", "react-tiny-oembed": "^1.1.0", "sharp": "^0.33.3", - "tailwind-merge": "^2.2.2", + "tailwind-merge": "^2.3.0", "tailwindcss": "^3.4.3", "typescript": "^5.4.5", "usehooks-ts": "^3.1.0" diff --git a/src/components/elements/link.tsx b/src/components/elements/link.tsx index e754e9af..2bba10ee 100644 --- a/src/components/elements/link.tsx +++ b/src/components/elements/link.tsx @@ -12,7 +12,7 @@ type Props = HtmlHTMLAttributes & LinkPro href: string } -const DrupalLink = ({href, className, children, ...props}: Props) => { +const DrupalLink = ({href, className, button, children, ...props}: Props) => { // Make sure all links have a href. href = href || "#" const drupalBase: string = (process.env.NEXT_PUBLIC_DRUPAL_BASE_URL || "").replace(/\/$/, ""); @@ -29,12 +29,12 @@ const DrupalLink = ({href, className, children, ...props}: Props) => { ) } - if (className?.includes("button")) { + if (button || className?.includes("button")) { return (