diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 2b1d85ea..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module", - "project": "./tsconfig.json" - }, - "extends": [ - "next/core-web-vitals", - "prettier", - "plugin:deprecation/recommended" - ], - "rules": { - "prettier/prettier": ["error"], - "@typescript-eslint/no-unused-vars": "off", - "unused-imports/no-unused-imports": "error", - "unused-imports/no-unused-vars": [ - "error", - { "vars": "all", "varsIgnorePattern": "^_", "args": "after-used", "argsIgnorePattern": "^_" } - ], - "no-console": ["error", { "allow": ["warn", "error"] }], - "no-restricted-syntax": [ - "error", - "Literal[value=/text-m[\\d]/i]" - ] - }, - "plugins": ["prettier", "unused-imports"], - "ignorePatterns": ["**/__generated__/**/*"] -} \ No newline at end of file diff --git a/.storybook/stories/config-pages/GlobalMessage.stories.tsx b/.storybook/stories/config-pages/GlobalMessage.stories.tsx index 0cd280d1..c88a96c4 100644 --- a/.storybook/stories/config-pages/GlobalMessage.stories.tsx +++ b/.storybook/stories/config-pages/GlobalMessage.stories.tsx @@ -1,7 +1,7 @@ import type {Meta, StoryObj} from "@storybook/react" import GlobalMessage from "@components/config-pages/global-message" import {ComponentProps} from "react" -import {Link, StanfordGlobalMessage, Text} from "@lib/gql/__generated__/drupal" +import {Link, StanfordGlobalMessage, Text} from "@lib/gql/__generated__/drupal.d" import {createMock} from "storybook-addon-module-mock" import * as gql from "@lib/gql/gql-queries" diff --git a/.storybook/stories/config-pages/LocalFooter.stories.tsx b/.storybook/stories/config-pages/LocalFooter.stories.tsx index 6e5415cd..0bf3096d 100644 --- a/.storybook/stories/config-pages/LocalFooter.stories.tsx +++ b/.storybook/stories/config-pages/LocalFooter.stories.tsx @@ -3,7 +3,7 @@ import LocalFooter from "@components/config-pages/local-footer" import {ComponentProps} from "react" import {createMock} from "storybook-addon-module-mock" import * as gql from "@lib/gql/gql-queries" -import {StanfordLocalFooter} from "@lib/gql/__generated__/drupal" +import {StanfordLocalFooter} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & {} diff --git a/.storybook/stories/config-pages/SuperFooter.stories.tsx b/.storybook/stories/config-pages/SuperFooter.stories.tsx index 21bab04a..7770e0ff 100644 --- a/.storybook/stories/config-pages/SuperFooter.stories.tsx +++ b/.storybook/stories/config-pages/SuperFooter.stories.tsx @@ -1,7 +1,7 @@ import type {Meta, StoryObj} from "@storybook/react" import SuperFooter from "@components/config-pages/super-footer" import {ComponentProps} from "react" -import {StanfordSuperFooter, Text} from "@lib/gql/__generated__/drupal" +import {StanfordSuperFooter, Text} from "@lib/gql/__generated__/drupal.d" import {createMock} from "storybook-addon-module-mock" import * as gql from "@lib/gql/gql-queries" diff --git a/.storybook/stories/nodes/StanfordCourse.data.tsx b/.storybook/stories/nodes/StanfordCourse.data.tsx index a292c3a5..1449156b 100644 --- a/.storybook/stories/nodes/StanfordCourse.data.tsx +++ b/.storybook/stories/nodes/StanfordCourse.data.tsx @@ -1,58 +1,59 @@ -import {NodeStanfordCourse} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordCourse} from "@lib/gql/__generated__/drupal.d" export const StanfordCourseData = () => { return { - __typename: 'NodeStanfordCourse', - id: 'f121f36b-a993-4386-80a2-12c67fa3fb53', - title: 'Tennis: Advanced Beginning', + __typename: "NodeStanfordCourse", + id: "f121f36b-a993-4386-80a2-12c67fa3fb53", + title: "Tennis: Advanced Beginning", status: true, - path: '/courses/physwell27', + path: "/courses/physwell27", changed: { - timezone: 'America/Los_Angeles', - time: '2023-08-18T13:32:57-07:00' + timezone: "America/Los_Angeles", + time: "2023-08-18T13:32:57-07:00", }, created: { - timezone: 'America/Los_Angeles', - time: '2023-07-21T10:47:31-07:00' + timezone: "America/Los_Angeles", + time: "2023-07-21T10:47:31-07:00", }, body: { - processed: 'Students will review and strengthen stroke techniques with emphasis on control, depth, and direction. This course will also incorporate rules, etiquette, and basic strategy and tactics. This course will utilize class discussions, class assignments and student participation to enable students to: (1) Understand basic components of health-related physical fitness, cardiovascular fitness, muscular strength and endurance and flexibility (2) Develop physical fitness and motor skills, and (3) Develop a positive attitude toward wellness and physical activity which will facilitate a healthy lifestyle. Prerequisites: 26, or knowledge of rules and scoring and average ability in fundamental strokes but limited playing experience.' + processed: + "Students will review and strengthen stroke techniques with emphasis on control, depth, and direction. This course will also incorporate rules, etiquette, and basic strategy and tactics. This course will utilize class discussions, class assignments and student participation to enable students to: (1) Understand basic components of health-related physical fitness, cardiovascular fitness, muscular strength and endurance and flexibility (2) Develop physical fitness and motor skills, and (3) Develop a positive attitude toward wellness and physical activity which will facilitate a healthy lifestyle. Prerequisites: 26, or knowledge of rules and scoring and average ability in fundamental strokes but limited playing experience.", }, - suCourseAcademicYear: '2023-2024', - suCourseCode: '27', + suCourseAcademicYear: "2023-2024", + suCourseCode: "27", suCourseId: 102675, - suCourseInstructors: ['Thornton, M.', 'Lee, S.', 'Fendrick, L.'], + suCourseInstructors: ["Thornton, M.", "Lee, S.", "Fendrick, L."], suCourseLink: { - url: 'http://explorecourses.stanford.edu/search?q=PHYSWELL27', - title: '' + url: "http://explorecourses.stanford.edu/search?q=PHYSWELL27", + title: "", }, suCourseQuarters: [ { - __typename: 'TermSuCourseQuarter', - id: '68944821-ab8c-4f0c-98f7-f5242ab89ddf', - name: 'Winter', - path: '/courses/winter', + __typename: "TermSuCourseQuarter", + id: "68944821-ab8c-4f0c-98f7-f5242ab89ddf", + name: "Winter", + path: "/courses/winter", weight: 0, - parent: null + parent: null, }, { - __typename: 'TermSuCourseQuarter', - id: '1e2402c2-f27e-4fc8-be1b-63768929de94', - name: 'Spring', - path: '/courses/spring', + __typename: "TermSuCourseQuarter", + id: "1e2402c2-f27e-4fc8-be1b-63768929de94", + name: "Spring", + path: "/courses/spring", weight: 0, - parent: null - } + parent: null, + }, ], - suCourseSectionUnits: '1', + suCourseSectionUnits: "1", suCourseSubject: { - __typename: 'TermSuCourseSubject', - id: '2a30758d-f296-4d32-b07e-2dc02582cddf', - name: 'PHYSWELL', - path: '/courses/physwell', + __typename: "TermSuCourseSubject", + id: "2a30758d-f296-4d32-b07e-2dc02582cddf", + name: "PHYSWELL", + path: "/courses/physwell", weight: 0, - parent: null + parent: null, }, - suCourseTags: null - } as unknown as NodeStanfordCourse; -} \ No newline at end of file + suCourseTags: null, + } as unknown as NodeStanfordCourse +} diff --git a/.storybook/stories/nodes/StanfordEvent.data.tsx b/.storybook/stories/nodes/StanfordEvent.data.tsx index f6d7094e..a6e9b68c 100644 --- a/.storybook/stories/nodes/StanfordEvent.data.tsx +++ b/.storybook/stories/nodes/StanfordEvent.data.tsx @@ -1,19 +1,19 @@ -import {NodeStanfordEvent} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordEvent} from "@lib/gql/__generated__/drupal.d" export const StanfordEventData = () => { return { - __typename: 'NodeStanfordEvent', - id: '210be681-f305-4b99-a2a6-da7d7a1ac2e8', - title: 'Introduction to Stanford Sites', + __typename: "NodeStanfordEvent", + id: "210be681-f305-4b99-a2a6-da7d7a1ac2e8", + title: "Introduction to Stanford Sites", status: true, - path: '/events/stanford-sites-onboarding-sessions/5x/introduction-stanford-sites-1', + path: "/events/stanford-sites-onboarding-sessions/5x/introduction-stanford-sites-1", changed: { - timezone: 'America/Los_Angeles', - time: '2024-02-01T14:45:54-08:00' + timezone: "America/Los_Angeles", + time: "2024-02-01T14:45:54-08:00", }, created: { - timezone: 'America/Los_Angeles', - time: '2024-01-05T16:50:58-08:00' + timezone: "America/Los_Angeles", + time: "2024-01-05T16:50:58-08:00", }, body: null, suEventAltLoc: null, @@ -21,54 +21,54 @@ export const StanfordEventData = () => { suEventComponents: null, suEventContactInfo: null, suEventCta: { - url: 'https://docs.google.com/forms/d/e/1FAIpQLSdzOKMwQ_Mo6XL9F7ytGI8LoUmeI2zHF6FccOYlnUfzVjSJjQ/viewform', - title: 'Register' + url: "https://docs.google.com/forms/d/e/1FAIpQLSdzOKMwQ_Mo6XL9F7ytGI8LoUmeI2zHF6FccOYlnUfzVjSJjQ/viewform", + title: "Register", }, suEventDateTime: { - value: '1708110000', - end_value: '1708113600', - timezone: 'America/Los_Angeles', + value: "1708110000", + end_value: "1708113600", + timezone: "America/Los_Angeles", rrule_index: null, - rrule: null + rrule: null, }, - suEventDek: 'dek field Join our monthly onboarding session', + suEventDek: "dek field Join our monthly onboarding session", suEventEmail: null, suEventGroups: null, suEventKeywords: null, suEventLocation: { langcode: null, - country: {name: 'United States', code: 'US'}, + country: {name: "United States", code: "US"}, givenName: null, additionalName: null, familyName: null, - organization: 'Green Ridge', - addressLine1: '766 Green Ridge Park', + organization: "Green Ridge", + addressLine1: "766 Green Ridge Park", addressLine2: null, - postalCode: '99999', + postalCode: "99999", sortingCode: null, dependentLocality: null, - locality: 'Washington', - administrativeArea: 'DC' + locality: "Washington", + administrativeArea: "DC", }, suEventMapLink: null, suEventSchedule: null, suEventSource: { - url: 'http://localhost', - title: '' + url: "http://localhost", + title: "", }, suEventSponsor: null, - suEventSubheadline: 'subheadline field', + suEventSubheadline: "subheadline field", suEventSubject: null, suEventTelephone: null, suEventType: [ { - __typename: 'TermStanfordEventType', - id: '2402818d-7056-4eec-a522-49e77def4cdc', - name: '5.x', - path: '/events/stanford-sites-onboarding-sessions/5x', + __typename: "TermStanfordEventType", + id: "2402818d-7056-4eec-a522-49e77def4cdc", + name: "5.x", + path: "/events/stanford-sites-onboarding-sessions/5x", weight: 0, - parent: {id: '249d3aa0-686f-4533-b73e-493cd596aeee'} - } - ] - } as unknown as NodeStanfordEvent; -} \ No newline at end of file + parent: {id: "249d3aa0-686f-4533-b73e-493cd596aeee"}, + }, + ], + } as unknown as NodeStanfordEvent +} diff --git a/.storybook/stories/nodes/StanfordEventSeries.data.tsx b/.storybook/stories/nodes/StanfordEventSeries.data.tsx index 8cf2e074..626e2432 100644 --- a/.storybook/stories/nodes/StanfordEventSeries.data.tsx +++ b/.storybook/stories/nodes/StanfordEventSeries.data.tsx @@ -1,4 +1,4 @@ -import {NodeStanfordEventSeries} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordEventSeries} from "@lib/gql/__generated__/drupal.d" export const StanfordEventSeriesData = () => { return { @@ -10,67 +10,74 @@ export const StanfordEventSeriesData = () => { changed: {timezone: "America/Los_Angeles", time: "2024-02-05T13:12:15-08:00"}, created: {timezone: "America/Los_Angeles", time: "2024-02-05T13:12:11-08:00"}, suEventSeriesDek: "Dek field", - suEventSeriesEvent: [{ - __typename: "NodeStanfordEvent", - id: "9f753f06-fd90-4e66-9a5f-e974a4a3a3d3", - title: "Event with an image", - status: false, - path: "/events/event-image", - changed: {timezone: "America/Los_Angeles", time: "2023-09-19T07:28:42-07:00"}, - created: {timezone: "America/Los_Angeles", time: "2023-02-03T15:22:15-08:00"}, - suEventAltLoc: null, - suEventSubheadline: null, - suEventDek: null, - suEventLocation: null, - suEventDateTime: { - value: "1893484800", - end_value: "1893571140", - timezone: "America/Los_Angeles", - rrule_index: null, - rrule: null + suEventSeriesEvent: [ + { + __typename: "NodeStanfordEvent", + id: "9f753f06-fd90-4e66-9a5f-e974a4a3a3d3", + title: "Event with an image", + status: false, + path: "/events/event-image", + changed: {timezone: "America/Los_Angeles", time: "2023-09-19T07:28:42-07:00"}, + created: {timezone: "America/Los_Angeles", time: "2023-02-03T15:22:15-08:00"}, + suEventAltLoc: null, + suEventSubheadline: null, + suEventDek: null, + suEventLocation: null, + suEventDateTime: { + value: "1893484800", + end_value: "1893571140", + timezone: "America/Los_Angeles", + rrule_index: null, + rrule: null, + }, + suEventType: null, + suEventSource: null, }, - suEventType: null, - suEventSource: null - }, { - __typename: "NodeStanfordEvent", - id: "0c36f4e9-804f-4f80-afaa-a9d6209f90ec", - title: "Introduction to Stanford Sites", - status: true, - path: "/events/stanford-sites-onboarding-sessions/introduction-stanford-sites-1", - changed: {timezone: "America/Los_Angeles", time: "2023-09-15T10:26:58-07:00"}, - created: {timezone: "America/Los_Angeles", time: "2023-09-09T15:21:39-07:00"}, - suEventAltLoc: null, - suEventSubheadline: null, - suEventDek: "Join our monthly onboarding session", - suEventLocation: null, - suEventDateTime: { - value: "1694800800", - end_value: "1694804400", - timezone: "America/Los_Angeles", - rrule_index: null, - rrule: null + { + __typename: "NodeStanfordEvent", + id: "0c36f4e9-804f-4f80-afaa-a9d6209f90ec", + title: "Introduction to Stanford Sites", + status: true, + path: "/events/stanford-sites-onboarding-sessions/introduction-stanford-sites-1", + changed: {timezone: "America/Los_Angeles", time: "2023-09-15T10:26:58-07:00"}, + created: {timezone: "America/Los_Angeles", time: "2023-09-09T15:21:39-07:00"}, + suEventAltLoc: null, + suEventSubheadline: null, + suEventDek: "Join our monthly onboarding session", + suEventLocation: null, + suEventDateTime: { + value: "1694800800", + end_value: "1694804400", + timezone: "America/Los_Angeles", + rrule_index: null, + rrule: null, + }, + suEventType: [ + { + __typename: "TermStanfordEventType", + id: "249d3aa0-686f-4533-b73e-493cd596aeee", + name: "Stanford Sites Onboarding Sessions", + path: "/events/stanford-sites-onboarding-sessions", + weight: 1, + parent: null, + }, + ], + suEventSource: { + url: "https://docs.google.com/forms/d/e/1FAIpQLSdzOKMwQ_Mo6XL9F7ytGI8LoUmeI2zHF6FccOYlnUfzVjSJjQ/viewform", + title: "", + }, }, - suEventType: [{ - __typename: "TermStanfordEventType", - id: "249d3aa0-686f-4533-b73e-493cd596aeee", - name: "Stanford Sites Onboarding Sessions", - path: "/events/stanford-sites-onboarding-sessions", - weight: 1, - parent: null - }], - suEventSource: { - url: "https://docs.google.com/forms/d/e/1FAIpQLSdzOKMwQ_Mo6XL9F7ytGI8LoUmeI2zHF6FccOYlnUfzVjSJjQ/viewform", - title: "" - } - }], + ], suEventSeriesSubheadline: "Subheadline", - suEventSeriesType: [{ - __typename: "TermStanfordEventType", - id: "7bf41b36-bd21-494b-aa1e-fbe7edb1bf00", - name: "Exhibition", - path: "/events/exhibition", - weight: 0, - parent: null - }] - } as unknown as NodeStanfordEventSeries; -} \ No newline at end of file + suEventSeriesType: [ + { + __typename: "TermStanfordEventType", + id: "7bf41b36-bd21-494b-aa1e-fbe7edb1bf00", + name: "Exhibition", + path: "/events/exhibition", + weight: 0, + parent: null, + }, + ], + } as unknown as NodeStanfordEventSeries +} diff --git a/.storybook/stories/nodes/StanfordNews.data.tsx b/.storybook/stories/nodes/StanfordNews.data.tsx index 2d920fc1..d0ce5c75 100644 --- a/.storybook/stories/nodes/StanfordNews.data.tsx +++ b/.storybook/stories/nodes/StanfordNews.data.tsx @@ -1,4 +1,4 @@ -import {NodeStanfordNews} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordNews} from "@lib/gql/__generated__/drupal.d" export const StanfordNewsData = () => { return { @@ -11,6 +11,6 @@ export const StanfordNewsData = () => { created: {timezone: "America/Los_Angeles", time: "2023-12-05T14:55:01-08:00"}, suNewsBanner: null, suNewsBannerMediaCaption: null, - suNewsByline: null - } as unknown as NodeStanfordNews; -} \ No newline at end of file + suNewsByline: null, + } as unknown as NodeStanfordNews +} diff --git a/.storybook/stories/nodes/StanfordPage.data.tsx b/.storybook/stories/nodes/StanfordPage.data.tsx index 39137ed5..10eb0bb0 100644 --- a/.storybook/stories/nodes/StanfordPage.data.tsx +++ b/.storybook/stories/nodes/StanfordPage.data.tsx @@ -1,4 +1,4 @@ -import {NodeStanfordPage} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordPage} from "@lib/gql/__generated__/drupal.d" export const StanfordPageData = () => { return { @@ -11,6 +11,6 @@ export const StanfordPageData = () => { created: {timezone: "America/Los_Angeles", time: "2019-08-27T14:16:24-07:00"}, layoutSelection: null, suBasicPageType: null, - suPageDescription: "Helpful information to build out your website using the \"Stanford Sites\" Drupal platform.", + suPageDescription: 'Helpful information to build out your website using the "Stanford Sites" Drupal platform.', } as unknown as NodeStanfordPage } diff --git a/.storybook/stories/nodes/StanfordPerson.data.tsx b/.storybook/stories/nodes/StanfordPerson.data.tsx index 44c2688f..be0a76e0 100644 --- a/.storybook/stories/nodes/StanfordPerson.data.tsx +++ b/.storybook/stories/nodes/StanfordPerson.data.tsx @@ -1,4 +1,4 @@ -import {NodeStanfordPerson} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordPerson} from "@lib/gql/__generated__/drupal.d" export const StanfordPersonData = () => { return { @@ -9,7 +9,10 @@ export const StanfordPersonData = () => { path: "/people/shea-mckinney", changed: {timezone: "America/Los_Angeles", time: "2023-09-14T12:08:41-07:00"}, created: {timezone: "America/Los_Angeles", time: "2023-07-21T09:38:23-07:00"}, - body: {processed: "Facilisis arcu sit vel tempus tincidunt congue sem lacus interdum fusce portaest mi proin suspendisse ex consectetur felis sollicitudin pellentesque suspendisse hendrerit ex sem arcu.\nVarius enim morbi metus felis euismod eros vivamus erat interdum ipsum ex cursus nisi erat aliquam eget aliquam eget orci quisque pellentesque maecenas elementum nisi."}, + body: { + processed: + "Facilisis arcu sit vel tempus tincidunt congue sem lacus interdum fusce portaest mi proin suspendisse ex consectetur felis sollicitudin pellentesque suspendisse hendrerit ex sem arcu.\nVarius enim morbi metus felis euismod eros vivamus erat interdum ipsum ex cursus nisi erat aliquam eget aliquam eget orci quisque pellentesque maecenas elementum nisi.", + }, suPersonAcademicAppt: null, suPersonAdminAppts: null, suPersonAffiliations: null, @@ -20,10 +23,14 @@ export const StanfordPersonData = () => { suPersonFirstName: "Marthena", suPersonFullTitle: "Senior Sales Associate\n", suPersonLastName: "Rapp", - suPersonLinks: [{url: "http://www.google.com/", title: "Google"}, { - url: "https://drupal.org/", - title: "Drupal Page" - }, {url: "http://linkedin.com", title: "LinkedIn"}], + suPersonLinks: [ + {url: "http://www.google.com/", title: "Google"}, + { + url: "https://drupal.org/", + title: "Drupal Page", + }, + {url: "http://linkedin.com", title: "LinkedIn"}, + ], suPersonLocationAddress: null, suPersonLocationName: null, suPersonMailCode: null, @@ -37,8 +44,8 @@ export const StanfordPersonData = () => { url: "https://placehold.co/2000x1000", alt: "Placeholder Image", height: 522, - width: 350 - } + width: 350, + }, }, suPersonProfileLink: {url: "http://localhost", title: "View Full Profile"}, suPersonPronouns: null, @@ -47,13 +54,15 @@ export const StanfordPersonData = () => { suPersonScholarlyInterests: null, suPersonShortTitle: "Senior Sales Associate", suPersonTelephone: null, - suPersonTypeGroup: [{ - __typename: "TermStanfordPersonType", - id: "87a608ef-8bf5-46c9-b567-f74f36e1e7df", - name: "Sales", - path: "/people/sales", - weight: 2, - parent: {id: "50f0f22c-306e-4304-ba72-25cebba57b2b"} - }] + suPersonTypeGroup: [ + { + __typename: "TermStanfordPersonType", + id: "87a608ef-8bf5-46c9-b567-f74f36e1e7df", + name: "Sales", + path: "/people/sales", + weight: 2, + parent: {id: "50f0f22c-306e-4304-ba72-25cebba57b2b"}, + }, + ], } as unknown as NodeStanfordPerson } diff --git a/.storybook/stories/nodes/StanfordPolicy.data.tsx b/.storybook/stories/nodes/StanfordPolicy.data.tsx index 88acd9e1..dd1488dc 100644 --- a/.storybook/stories/nodes/StanfordPolicy.data.tsx +++ b/.storybook/stories/nodes/StanfordPolicy.data.tsx @@ -1,4 +1,4 @@ -import {NodeStanfordPolicy} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordPolicy} from "@lib/gql/__generated__/drupal.d" export const StanfordPolicyData = () => { return { @@ -9,7 +9,10 @@ export const StanfordPolicyData = () => { path: "/about-stanford-sites/stanford-sites-policies/terms-service-stanford-sites-and-stanford-sites", changed: {timezone: "America/Los_Angeles", time: "2024-01-04T17:46:30-08:00"}, created: {timezone: "America/Los_Angeles", time: "2023-10-12T22:48:03-07:00"}, - body: {processed: "

The following outlines the Terms of Service for Stanford Sites, Stanford Sites Intranet, and the Stanford Sites User Guide. 

See also Terms of Use for all stanford.edu sites, which includes Stanford Sites and Stanford Sites Intranet.

Stanford Sites Terms and Conditions of Use

For the purposes of these terms, \"Stanford Sites\" will refer to Stanford Sites, Stanford Sites Intranet, and the Stanford Sites User Guide.

1. Terms

By using Stanford Sites, you are agreeing to be bound by these Terms and Conditions of Use and agree that you are responsible for the agreement with any applicable local laws. If you disagree with any of these terms, you are prohibited from accessing this service. 

2. Use License

Permission is granted to access all code used in the creation of Stanford Sites. This is the grant of a license, not a transfer of title.

3. Disclaimer

All the materials in the code or in the documentation are provided “as is”. Stanford does not make any representations concerning the accuracy or reliability of the use of the materials in the documentation.

4. Limitations

Stanford University or its suppliers will not be held accountable for any damages that will arise with the use or inability to use the materials on Stanford Sites, Stanford Sites Intranet or the User Guide, even if Stanford University or an authorized representative of the University has been notified, orally or written, of the possibility of such damage. 

5. Revisions and Errata

The materials appearing in Stanford Sites or Stanford Sites documentation may include technical, typographical, or photographic errors. Stanford University will not promise that any of the materials in this service or its documentation are accurate, complete, or current. Stanford University may change the materials contained in Stanford Sites at any time without notice. Stanford University does not make any commitment to update the materials.

6. Links

Stanford University has not reviewed all of the sites linked to its Stanford Sites and is not responsible for the contents of any such linked site. The presence of any link does not imply endorsement by Stanford University of the site. The use of any linked website is at the user's own risk.

7. Site Terms of Use Modifications

Stanford University may revise these Terms of Use for Stanford Sites at any time without prior notice. By using Stanford Sites, you are agreeing to be bound by the current version of these Terms and Conditions of Use.

8. Governing Law

Any claim related to Stanford Sites shall be governed by the laws of Country without regards to its conflict of law provisions.

"}, + body: { + processed: + '

The following outlines the Terms of Service for Stanford Sites, Stanford Sites Intranet, and the Stanford Sites User Guide. 

See also Terms of Use for all stanford.edu sites, which includes Stanford Sites and Stanford Sites Intranet.

Stanford Sites Terms and Conditions of Use

For the purposes of these terms, "Stanford Sites" will refer to Stanford Sites, Stanford Sites Intranet, and the Stanford Sites User Guide.

1. Terms

By using Stanford Sites, you are agreeing to be bound by these Terms and Conditions of Use and agree that you are responsible for the agreement with any applicable local laws. If you disagree with any of these terms, you are prohibited from accessing this service. 

2. Use License

Permission is granted to access all code used in the creation of Stanford Sites. This is the grant of a license, not a transfer of title.

3. Disclaimer

All the materials in the code or in the documentation are provided “as is”. Stanford does not make any representations concerning the accuracy or reliability of the use of the materials in the documentation.

4. Limitations

Stanford University or its suppliers will not be held accountable for any damages that will arise with the use or inability to use the materials on Stanford Sites, Stanford Sites Intranet or the User Guide, even if Stanford University or an authorized representative of the University has been notified, orally or written, of the possibility of such damage. 

5. Revisions and Errata

The materials appearing in Stanford Sites or Stanford Sites documentation may include technical, typographical, or photographic errors. Stanford University will not promise that any of the materials in this service or its documentation are accurate, complete, or current. Stanford University may change the materials contained in Stanford Sites at any time without notice. Stanford University does not make any commitment to update the materials.

6. Links

Stanford University has not reviewed all of the sites linked to its Stanford Sites and is not responsible for the contents of any such linked site. The presence of any link does not imply endorsement by Stanford University of the site. The use of any linked website is at the user\'s own risk.

7. Site Terms of Use Modifications

Stanford University may revise these Terms of Use for Stanford Sites at any time without prior notice. By using Stanford Sites, you are agreeing to be bound by the current version of these Terms and Conditions of Use.

8. Governing Law

Any claim related to Stanford Sites shall be governed by the laws of Country without regards to its conflict of law provisions.

', + }, suPolicyAuthority: "Stanford Web Services", suPolicyAutoPrefix: true, suPolicyChangelog: null, @@ -19,6 +22,6 @@ export const StanfordPolicyData = () => { suPolicyRelated: null, suPolicySubchapter: null, suPolicyTitle: "Terms of Service for Stanford Sites and Stanford Sites Intranet", - suPolicyUpdated: {timezone: "UTC", time: "2023-10-12T00:00:00+00:00"} - } as unknown as NodeStanfordPolicy; -} \ No newline at end of file + suPolicyUpdated: {timezone: "UTC", time: "2023-10-12T00:00:00+00:00"}, + } as unknown as NodeStanfordPolicy +} diff --git a/.storybook/stories/nodes/StanfordPublication.data.tsx b/.storybook/stories/nodes/StanfordPublication.data.tsx index ec02eecb..03c15939 100644 --- a/.storybook/stories/nodes/StanfordPublication.data.tsx +++ b/.storybook/stories/nodes/StanfordPublication.data.tsx @@ -1,4 +1,4 @@ -import {NodeStanfordPublication} from "@lib/gql/__generated__/drupal"; +import {NodeStanfordPublication} from "@lib/gql/__generated__/drupal.d" export const StanfordPublicationData = () => { return { @@ -9,30 +9,32 @@ export const StanfordPublicationData = () => { path: "/publications/journal-article-example-publication", changed: {timezone: "America/Los_Angeles", time: "2023-07-21T10:33:31-07:00"}, created: {timezone: "America/Los_Angeles", time: "2023-07-21T10:31:38-07:00"}, - suPublicationAuthorRef: [{ - __typename: "NodeStanfordPerson", - id: "62957556-fb66-4fab-9e8d-eaab24c6cdf3", - title: "Foo N Bar", - status: true, - path: "/people/foobar", - changed: {timezone: "America/Los_Angeles", time: "2023-10-03T10:42:12-07:00"}, - created: {timezone: "America/Los_Angeles", time: "2023-07-21T09:38:01-07:00"}, - suPersonPhoto: { - __typename: "MediaImage", - id: "57291474-4abf-4387-ba0d-cdbca677a507", - name: "Foo bar", - mediaImage: { - url: "https://placehold.co/2000x1000", - alt: "Placeholder Image", - height: 522, - width: 350 - } + suPublicationAuthorRef: [ + { + __typename: "NodeStanfordPerson", + id: "62957556-fb66-4fab-9e8d-eaab24c6cdf3", + title: "Foo N Bar", + status: true, + path: "/people/foobar", + changed: {timezone: "America/Los_Angeles", time: "2023-10-03T10:42:12-07:00"}, + created: {timezone: "America/Los_Angeles", time: "2023-07-21T09:38:01-07:00"}, + suPersonPhoto: { + __typename: "MediaImage", + id: "57291474-4abf-4387-ba0d-cdbca677a507", + name: "Foo bar", + mediaImage: { + url: "https://placehold.co/2000x1000", + alt: "Placeholder Image", + height: 522, + width: 350, + }, + }, + suPersonFullTitle: "Systems Administrator III", + suPersonShortTitle: "SysAdmin", }, - suPersonFullTitle: "Systems Administrator III", - suPersonShortTitle: "SysAdmin" - }], + ], suPublicationCta: null, suPublicationImage: null, - suPublicationTopics: null - } as unknown as NodeStanfordPublication; -} \ No newline at end of file + suPublicationTopics: null, + } as unknown as NodeStanfordPublication +} diff --git a/.storybook/stories/nodes/cards/BasicPageCard.stories.tsx b/.storybook/stories/nodes/cards/BasicPageCard.stories.tsx index ead38a82..984bcd72 100644 --- a/.storybook/stories/nodes/cards/BasicPageCard.stories.tsx +++ b/.storybook/stories/nodes/cards/BasicPageCard.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordPageCard from "@components/nodes/cards/stanford-page/stanford-page-card"; -import {StanfordPageData} from "../StanfordPage.data"; -import {ComponentProps} from "react"; -import {Text, Image, NodeStanfordPage} from "@lib/gql/__generated__/drupal"; -import {getStoryBookImage} from "../../storybook-entities"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordPageCard from "@components/nodes/cards/stanford-page/stanford-page-card" +import {StanfordPageData} from "../StanfordPage.data" +import {ComponentProps} from "react" +import {Text, Image, NodeStanfordPage} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookImage} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPage["title"] @@ -12,38 +12,38 @@ type ComponentStoryProps = ComponentProps & { } // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/Stanford Page Card', + title: "Design/Nodes/Cards/Stanford Page Card", component: StanfordPageCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PageCard: Story = { render: ({title, suPageImage, suPageDescription, node, ...args}) => { node.suPageImage = suPageImage ? getStoryBookImage(suPageImage) : undefined - node.title = title; - node.suPageDescription = suPageDescription; - return + node.title = title + node.suPageDescription = suPageDescription + return }, args: { suPageImage: "https://placehold.co/2000x1000", suPageDescription: StanfordPageData().suPageDescription, title: StanfordPageData().title, headingLevel: "h2", - node: StanfordPageData() + node: StanfordPageData(), }, -}; +} diff --git a/.storybook/stories/nodes/cards/CourseCard.stories.tsx b/.storybook/stories/nodes/cards/CourseCard.stories.tsx index 3aed25c8..c954c7fa 100644 --- a/.storybook/stories/nodes/cards/CourseCard.stories.tsx +++ b/.storybook/stories/nodes/cards/CourseCard.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordCourseCard from "@components/nodes/cards/stanford-course/stanford-course-card"; -import {StanfordCourseData} from "../StanfordCourse.data"; -import {ComponentProps} from "react"; -import {NodeStanfordCourse, TermSuCourseSubject} from "@lib/gql/__generated__/drupal"; -import {getStoryBookTaxonomyTerm} from "../../storybook-entities"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordCourseCard from "@components/nodes/cards/stanford-course/stanford-course-card" +import {StanfordCourseData} from "../StanfordCourse.data" +import {ComponentProps} from "react" +import {NodeStanfordCourse, TermSuCourseSubject} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookTaxonomyTerm} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { title: NodeStanfordCourse["title"] @@ -14,33 +14,33 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/Course Card', + title: "Design/Nodes/Cards/Course Card", component: StanfordCourseCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const CourseCard: Story = { render: ({title, suCourseSubject, suCourseCode, suCourseAcademicYear, node, ...args}) => { - node.title = title; - node.suCourseSubject = suCourseSubject ? getStoryBookTaxonomyTerm(suCourseSubject) : undefined; - node.suCourseCode = suCourseCode; - node.suCourseAcademicYear = suCourseAcademicYear; - return + node.title = title + node.suCourseSubject = suCourseSubject ? getStoryBookTaxonomyTerm(suCourseSubject) : undefined + node.suCourseCode = suCourseCode + node.suCourseAcademicYear = suCourseAcademicYear + return }, args: { title: StanfordCourseData().title, @@ -48,6 +48,6 @@ export const CourseCard: Story = { suCourseCode: StanfordCourseData().suCourseCode, suCourseAcademicYear: StanfordCourseData().suCourseAcademicYear, headingLevel: "h2", - node: StanfordCourseData() + node: StanfordCourseData(), }, -}; +} diff --git a/.storybook/stories/nodes/cards/EventCard.stories.tsx b/.storybook/stories/nodes/cards/EventCard.stories.tsx index aa062aec..92d97548 100644 --- a/.storybook/stories/nodes/cards/EventCard.stories.tsx +++ b/.storybook/stories/nodes/cards/EventCard.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordEventCard from "@components/nodes/cards/stanford-event/stanford-event-card"; -import {StanfordEventData} from "../StanfordEvent.data"; -import {ComponentProps} from "react"; -import {NodeStanfordEvent, SmartDateType, TermStanfordEventType} from "@lib/gql/__generated__/drupal"; -import {getStoryBookTaxonomyTerm} from "../../storybook-entities"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordEventCard from "@components/nodes/cards/stanford-event/stanford-event-card" +import {StanfordEventData} from "../StanfordEvent.data" +import {ComponentProps} from "react" +import {NodeStanfordEvent, SmartDateType, TermStanfordEventType} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookTaxonomyTerm} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { suEventDateTime_start: SmartDateType["value"] @@ -16,30 +16,30 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/Event Card', + title: "Design/Nodes/Cards/Event Card", component: StanfordEventCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, suEventDateTime_start: { - control: "date" + control: "date", }, suEventDateTime_end: { - control: "date" + control: "date", }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const EventCard: Story = { @@ -53,13 +53,13 @@ export const EventCard: Story = { node, ...args }) => { - node.title = title; - node.suEventDateTime.value = Math.round(suEventDateTime_start / 1000); - node.suEventDateTime.end_value = Math.round(suEventDateTime_end / 1000); - node.suEventType = suEventType ? [getStoryBookTaxonomyTerm(suEventType)] : undefined; - node.suEventSubheadline = suEventSubheadline; - node.suEventAltLoc = suEventAltLoc; - return + node.title = title + node.suEventDateTime.value = Math.round(suEventDateTime_start / 1000) + node.suEventDateTime.end_value = Math.round(suEventDateTime_end / 1000) + node.suEventType = suEventType ? [getStoryBookTaxonomyTerm(suEventType)] : undefined + node.suEventSubheadline = suEventSubheadline + node.suEventAltLoc = suEventAltLoc + return }, args: { title: StanfordEventData().title, @@ -69,6 +69,6 @@ export const EventCard: Story = { suEventSubheadline: StanfordEventData().suEventSubheadline, suEventAltLoc: StanfordEventData().suEventAltLoc, headingLevel: "h2", - node: StanfordEventData() + node: StanfordEventData(), }, -}; +} diff --git a/.storybook/stories/nodes/cards/EventSeriesCard.stories.tsx b/.storybook/stories/nodes/cards/EventSeriesCard.stories.tsx index 30a124a5..5b283d3a 100644 --- a/.storybook/stories/nodes/cards/EventSeriesCard.stories.tsx +++ b/.storybook/stories/nodes/cards/EventSeriesCard.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; +import type {Meta, StoryObj} from "@storybook/react" -import StanfordEventSeriesCard from "@components/nodes/cards/stanford-event-series/stanford-event-series-card"; -import {StanfordEventSeriesData} from "../StanfordEventSeries.data"; -import {ComponentProps} from "react"; -import {NodeStanfordEventSeries} from "@lib/gql/__generated__/drupal"; +import StanfordEventSeriesCard from "@components/nodes/cards/stanford-event-series/stanford-event-series-card" +import {StanfordEventSeriesData} from "../StanfordEventSeries.data" +import {ComponentProps} from "react" +import {NodeStanfordEventSeries} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordEventSeries["title"] @@ -12,36 +12,36 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/Event Series Card', + title: "Design/Nodes/Cards/Event Series Card", component: StanfordEventSeriesCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const EventSeriesCard: Story = { render: ({title, suEventSeriesDek, node, ...args}) => { - node.title = title; - node.suEventSeriesDek = suEventSeriesDek; - return + node.title = title + node.suEventSeriesDek = suEventSeriesDek + return }, args: { title: StanfordEventSeriesData().title, suEventSeriesDek: StanfordEventSeriesData().suEventSeriesDek, headingLevel: "h2", - node: StanfordEventSeriesData() + node: StanfordEventSeriesData(), }, -}; +} diff --git a/.storybook/stories/nodes/cards/NewsCard.stories.tsx b/.storybook/stories/nodes/cards/NewsCard.stories.tsx index 4033f140..683bcb31 100644 --- a/.storybook/stories/nodes/cards/NewsCard.stories.tsx +++ b/.storybook/stories/nodes/cards/NewsCard.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordNewsCard from "@components/nodes/cards/stanford-news/stanford-news-card"; -import {StanfordNewsData} from "../StanfordNews.data"; -import {ComponentProps} from "react"; -import {getStoryBookImage, getStoryBookTaxonomyTerm} from "../../storybook-entities"; -import {DateTime, Image, NodeStanfordNews, TermStanfordNewsTopic} from "@lib/gql/__generated__/drupal"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordNewsCard from "@components/nodes/cards/stanford-news/stanford-news-card" +import {StanfordNewsData} from "../StanfordNews.data" +import {ComponentProps} from "react" +import {getStoryBookImage, getStoryBookTaxonomyTerm} from "../../storybook-entities" +import {DateTime, Image, NodeStanfordNews, TermStanfordNewsTopic} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordNews["title"] @@ -14,47 +14,48 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/News Card', + title: "Design/Nodes/Cards/News Card", component: StanfordNewsCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, suNewsPublishingDate: { - control: "date" + control: "date", }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const NewsCard: Story = { render: ({title, suNewsPublishingDate, suNewsFeaturedMedia, suNewsTopics, node, ...args}) => { - node.title = title; - if (suNewsPublishingDate) node.suNewsPublishingDate = { - offset: "", - timestamp: Math.round(new Date(suNewsPublishingDate).getTime() / 1000), - time: new Date(suNewsPublishingDate).toISOString(), - timezone: "America/Los_Angeles", - } + node.title = title + if (suNewsPublishingDate) + node.suNewsPublishingDate = { + offset: "", + timestamp: Math.round(new Date(suNewsPublishingDate).getTime() / 1000), + time: new Date(suNewsPublishingDate).toISOString(), + timezone: "America/Los_Angeles", + } node.suNewsFeaturedMedia = suNewsFeaturedMedia ? getStoryBookImage() : undefined - node.suNewsTopics = []; + node.suNewsTopics = [] if (suNewsTopics) { suNewsTopics.map(name => { node.suNewsTopics?.push(getStoryBookTaxonomyTerm(name)) }) } - return + return }, args: { title: StanfordNewsData().title, @@ -62,6 +63,6 @@ export const NewsCard: Story = { suNewsTopics: ["foo", "bar"], suNewsFeaturedMedia: "image", headingLevel: "h2", - node: StanfordNewsData() + node: StanfordNewsData(), }, -}; +} diff --git a/.storybook/stories/nodes/cards/PersonCard.stories.tsx b/.storybook/stories/nodes/cards/PersonCard.stories.tsx index 0e3c5ed6..4025e5db 100644 --- a/.storybook/stories/nodes/cards/PersonCard.stories.tsx +++ b/.storybook/stories/nodes/cards/PersonCard.stories.tsx @@ -1,10 +1,10 @@ -import type {Meta, StoryObj} from '@storybook/react'; +import type {Meta, StoryObj} from "@storybook/react" -import StanfordPersonCard from "@components/nodes/cards/stanford-person/stanford-person-card"; -import {StanfordPersonData} from "../StanfordPerson.data"; -import {ComponentProps} from "react"; -import {Image, NodeStanfordPerson} from "@lib/gql/__generated__/drupal"; -import {getStoryBookImage} from "../../storybook-entities"; +import StanfordPersonCard from "@components/nodes/cards/stanford-person/stanford-person-card" +import {StanfordPersonData} from "../StanfordPerson.data" +import {ComponentProps} from "react" +import {Image, NodeStanfordPerson} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookImage} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPerson["title"] @@ -14,38 +14,38 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/Person Card', + title: "Design/Nodes/Cards/Person Card", component: StanfordPersonCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PersonCard: Story = { render: ({title, suPersonPhoto, suPersonShortTitle, node, ...args}) => { - node.title = title; - node.suPersonShortTitle = suPersonShortTitle; - node.suPersonPhoto = suPersonPhoto ? getStoryBookImage() : undefined; - return + node.title = title + node.suPersonShortTitle = suPersonShortTitle + node.suPersonPhoto = suPersonPhoto ? getStoryBookImage() : undefined + return }, args: { title: StanfordPersonData().title, suPersonPhoto: "image", suPersonShortTitle: StanfordPersonData().suPersonShortTitle, headingLevel: "h2", - node: StanfordPersonData() + node: StanfordPersonData(), }, -}; +} diff --git a/.storybook/stories/nodes/cards/PolicyCard.stories.tsx b/.storybook/stories/nodes/cards/PolicyCard.stories.tsx index 98bd0502..d2e7a4a8 100644 --- a/.storybook/stories/nodes/cards/PolicyCard.stories.tsx +++ b/.storybook/stories/nodes/cards/PolicyCard.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; +import type {Meta, StoryObj} from "@storybook/react" -import StanfordPolicyCard from "@components/nodes/cards/stanford-policy/stanford-policy-card"; -import {StanfordPolicyData} from "../StanfordPolicy.data"; -import {ComponentProps} from "react"; -import {NodeStanfordPolicy, Text} from "@lib/gql/__generated__/drupal"; +import StanfordPolicyCard from "@components/nodes/cards/stanford-policy/stanford-policy-card" +import {StanfordPolicyData} from "../StanfordPolicy.data" +import {ComponentProps} from "react" +import {NodeStanfordPolicy, Text} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPolicy["title"] @@ -12,36 +12,36 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/Policy Card', + title: "Design/Nodes/Cards/Policy Card", component: StanfordPolicyCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PolicyCard: Story = { render: ({title, body, node, ...args}) => { - node.title = title; - node.body = {processed: body}; - return + node.title = title + node.body = {processed: body} + return }, args: { title: StanfordPolicyData().title, body: StanfordPolicyData().body?.processed, headingLevel: "h2", - node: StanfordPolicyData() + node: StanfordPolicyData(), }, -}; +} diff --git a/.storybook/stories/nodes/cards/PublicationCard.stories.tsx b/.storybook/stories/nodes/cards/PublicationCard.stories.tsx index a80a7f13..d493a86a 100644 --- a/.storybook/stories/nodes/cards/PublicationCard.stories.tsx +++ b/.storybook/stories/nodes/cards/PublicationCard.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordPublicationCard from "@components/nodes/cards/stanford-publication/stanford-publication-card"; -import {StanfordPublicationData} from "../StanfordPublication.data"; -import {ComponentProps} from "react"; -import {getStoryBookTaxonomyTerm} from "../../storybook-entities"; -import {NodeStanfordPublication, TermStanfordPublicationTopic} from "@lib/gql/__generated__/drupal"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordPublicationCard from "@components/nodes/cards/stanford-publication/stanford-publication-card" +import {StanfordPublicationData} from "../StanfordPublication.data" +import {ComponentProps} from "react" +import {getStoryBookTaxonomyTerm} from "../../storybook-entities" +import {NodeStanfordPublication, TermStanfordPublicationTopic} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPublication["title"] @@ -12,24 +12,24 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/Cards/Publication Card', + title: "Design/Nodes/Cards/Publication Card", component: StanfordPublicationCard, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PublicationCard: Story = { @@ -39,12 +39,12 @@ export const PublicationCard: Story = { if (suPublicationTopics) { suPublicationTopics.map(name => node.suPublicationTopics?.push(getStoryBookTaxonomyTerm(name))) } - return + return }, args: { title: StanfordPublicationData().title, suPublicationTopics: ["foo", "bar"], headingLevel: "h2", - node: StanfordPublicationData() + node: StanfordPublicationData(), }, -}; +} diff --git a/.storybook/stories/nodes/list-item/BasicPageListItem.stories.tsx b/.storybook/stories/nodes/list-item/BasicPageListItem.stories.tsx index 14961ba3..f1b7d170 100644 --- a/.storybook/stories/nodes/list-item/BasicPageListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/BasicPageListItem.stories.tsx @@ -1,10 +1,10 @@ -import type {Meta, StoryObj} from '@storybook/react'; +import type {Meta, StoryObj} from "@storybook/react" -import StanfordPageListItem from "@components/nodes/list-item/stanford-page/stanford-page-list-item"; -import {PageCard} from "../cards/BasicPageCard.stories"; -import {ComponentProps} from "react"; -import {Image, NodeStanfordPage, Text} from "@lib/gql/__generated__/drupal"; -import {getStoryBookImage} from "../../storybook-entities"; +import StanfordPageListItem from "@components/nodes/list-item/stanford-page/stanford-page-list-item" +import {PageCard} from "../cards/BasicPageCard.stories" +import {ComponentProps} from "react" +import {Image, NodeStanfordPage, Text} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookImage} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPage["title"] @@ -14,32 +14,32 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/Stanford Page List Item', + title: "Design/Nodes/List Item/Stanford Page List Item", component: StanfordPageListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PageListItem: Story = { render: ({title, suPageImage, suPageDescription, node, ...args}) => { node.suPageImage = suPageImage ? getStoryBookImage(suPageImage) : undefined - node.title = title; - node.suPageDescription = suPageDescription; - return + node.title = title + node.suPageDescription = suPageDescription + return }, args: {...PageCard.args}, -}; +} diff --git a/.storybook/stories/nodes/list-item/CourseListItem.stories.tsx b/.storybook/stories/nodes/list-item/CourseListItem.stories.tsx index 7954c028..bbd07123 100644 --- a/.storybook/stories/nodes/list-item/CourseListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/CourseListItem.stories.tsx @@ -1,10 +1,10 @@ -import type {Meta, StoryObj} from '@storybook/react'; +import type {Meta, StoryObj} from "@storybook/react" -import StanfordCourseListItem from "@components/nodes/list-item/stanford-course/stanford-course-list-item"; -import {CourseCard} from "../cards/CourseCard.stories"; -import {ComponentProps} from "react"; -import {NodeStanfordCourse, TermSuCourseSubject} from "@lib/gql/__generated__/drupal"; -import {getStoryBookTaxonomyTerm} from "../../storybook-entities"; +import StanfordCourseListItem from "@components/nodes/list-item/stanford-course/stanford-course-list-item" +import {CourseCard} from "../cards/CourseCard.stories" +import {ComponentProps} from "react" +import {NodeStanfordCourse, TermSuCourseSubject} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookTaxonomyTerm} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { title: NodeStanfordCourse["title"] @@ -15,33 +15,33 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/Course List Item', + title: "Design/Nodes/List Item/Course List Item", component: StanfordCourseListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const CourseListItem: Story = { render: ({title, suCourseSubject, suCourseCode, suCourseAcademicYear, node, ...args}) => { - node.title = title; - node.suCourseSubject = suCourseSubject ? getStoryBookTaxonomyTerm(suCourseSubject) : undefined; - node.suCourseCode = suCourseCode; - node.suCourseAcademicYear = suCourseAcademicYear; - return + node.title = title + node.suCourseSubject = suCourseSubject ? getStoryBookTaxonomyTerm(suCourseSubject) : undefined + node.suCourseCode = suCourseCode + node.suCourseAcademicYear = suCourseAcademicYear + return }, args: {...CourseCard.args}, -}; +} diff --git a/.storybook/stories/nodes/list-item/EventListItem.stories.tsx b/.storybook/stories/nodes/list-item/EventListItem.stories.tsx index fbb26c86..cf95b9b4 100644 --- a/.storybook/stories/nodes/list-item/EventListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/EventListItem.stories.tsx @@ -1,10 +1,10 @@ -import type {Meta, StoryObj} from '@storybook/react'; +import type {Meta, StoryObj} from "@storybook/react" -import StanfordEventListItem from "@components/nodes/list-item/stanford-event/stanford-event-list-item"; -import {EventCard} from "../cards/EventCard.stories"; -import {ComponentProps} from "react"; -import {NodeStanfordEvent, SmartDateType, TermStanfordEventType} from "@lib/gql/__generated__/drupal"; -import {getStoryBookTaxonomyTerm} from "../../storybook-entities"; +import StanfordEventListItem from "@components/nodes/list-item/stanford-event/stanford-event-list-item" +import {EventCard} from "../cards/EventCard.stories" +import {ComponentProps} from "react" +import {NodeStanfordEvent, SmartDateType, TermStanfordEventType} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookTaxonomyTerm} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { suEventDateTime_start: SmartDateType["value"] @@ -17,24 +17,24 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/Event List Item', + title: "Design/Nodes/List Item/Event List Item", component: StanfordEventListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const EventListItem: Story = { @@ -48,13 +48,13 @@ export const EventListItem: Story = { node, ...args }) => { - node.title = title; - node.suEventDateTime.value = Math.round(suEventDateTime_start / 1000); - node.suEventDateTime.end_value = Math.round(suEventDateTime_end / 1000); - node.suEventType = suEventType ? [getStoryBookTaxonomyTerm(suEventType)] : undefined; - node.suEventSubheadline = suEventSubheadline; - node.suEventAltLoc = suEventAltLoc; - return + node.title = title + node.suEventDateTime.value = Math.round(suEventDateTime_start / 1000) + node.suEventDateTime.end_value = Math.round(suEventDateTime_end / 1000) + node.suEventType = suEventType ? [getStoryBookTaxonomyTerm(suEventType)] : undefined + node.suEventSubheadline = suEventSubheadline + node.suEventAltLoc = suEventAltLoc + return }, args: {...EventCard.args}, -}; +} diff --git a/.storybook/stories/nodes/list-item/EventSeriesListItem.stories.tsx b/.storybook/stories/nodes/list-item/EventSeriesListItem.stories.tsx index 3e8793db..9636fbd3 100644 --- a/.storybook/stories/nodes/list-item/EventSeriesListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/EventSeriesListItem.stories.tsx @@ -1,8 +1,8 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordEventSeriesListItem from "@components/nodes/list-item/stanford-event-series/stanford-event-series-list-item"; -import {EventSeriesCard} from "../cards/EventSeriesCard.stories"; -import {ComponentProps} from "react"; -import {NodeStanfordEventSeries} from "@lib/gql/__generated__/drupal"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordEventSeriesListItem from "@components/nodes/list-item/stanford-event-series/stanford-event-series-list-item" +import {EventSeriesCard} from "../cards/EventSeriesCard.stories" +import {ComponentProps} from "react" +import {NodeStanfordEventSeries} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordEventSeries["title"] @@ -11,31 +11,31 @@ type ComponentStoryProps = ComponentProps & // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/Event Series List Item', + title: "Design/Nodes/List Item/Event Series List Item", component: StanfordEventSeriesListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const EventSeriesListItem: Story = { render: ({title, suEventSeriesDek, node, ...args}) => { - node.title = title; - node.suEventSeriesDek = suEventSeriesDek; - return + node.title = title + node.suEventSeriesDek = suEventSeriesDek + return }, args: {...EventSeriesCard.args}, -}; +} diff --git a/.storybook/stories/nodes/list-item/NewsListItem.stories.tsx b/.storybook/stories/nodes/list-item/NewsListItem.stories.tsx index 57c01f3a..9fc7fdcf 100644 --- a/.storybook/stories/nodes/list-item/NewsListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/NewsListItem.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordNewsListItem from "@components/nodes/list-item/stanford-news/stanford-news-list-item"; -import {NewsCard} from "../cards/NewsCard.stories"; -import {ComponentProps} from "react"; -import {getStoryBookImage, getStoryBookTaxonomyTerm} from "../../storybook-entities"; -import {DateTime, Image, NodeStanfordNews, TermStanfordNewsTopic} from "@lib/gql/__generated__/drupal"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordNewsListItem from "@components/nodes/list-item/stanford-news/stanford-news-list-item" +import {NewsCard} from "../cards/NewsCard.stories" +import {ComponentProps} from "react" +import {getStoryBookImage, getStoryBookTaxonomyTerm} from "../../storybook-entities" +import {DateTime, Image, NodeStanfordNews, TermStanfordNewsTopic} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordNews["title"] @@ -14,47 +14,48 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/News List Item', + title: "Design/Nodes/List Item/News List Item", component: StanfordNewsListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, suNewsPublishingDate: { - control: "date" + control: "date", }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const NewsListItem: Story = { render: ({title, suNewsPublishingDate, suNewsFeaturedMedia, suNewsTopics, node, ...args}) => { - node.title = title; - if (suNewsPublishingDate) node.suNewsPublishingDate = { - offset: "", - timestamp: Math.round(new Date(suNewsPublishingDate).getTime() / 1000), - time: new Date(suNewsPublishingDate).toISOString(), - timezone: "America/Los_Angeles", - } + node.title = title + if (suNewsPublishingDate) + node.suNewsPublishingDate = { + offset: "", + timestamp: Math.round(new Date(suNewsPublishingDate).getTime() / 1000), + time: new Date(suNewsPublishingDate).toISOString(), + timezone: "America/Los_Angeles", + } node.suNewsFeaturedMedia = suNewsFeaturedMedia ? getStoryBookImage() : undefined - node.suNewsTopics = []; + node.suNewsTopics = [] if (suNewsTopics) { suNewsTopics.map(name => { node.suNewsTopics?.push(getStoryBookTaxonomyTerm(name)) }) } - return + return }, - args: {...NewsCard.args} -}; + args: {...NewsCard.args}, +} diff --git a/.storybook/stories/nodes/list-item/PersonListItem.stories.tsx b/.storybook/stories/nodes/list-item/PersonListItem.stories.tsx index a227802f..9b4f4b0d 100644 --- a/.storybook/stories/nodes/list-item/PersonListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/PersonListItem.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordPersonListItem from "@components/nodes/list-item/stanford-person/stanford-person-list-item"; -import {PersonCard} from "../cards/PersonCard.stories"; -import {ComponentProps} from "react"; -import {Image, NodeStanfordPerson} from "@lib/gql/__generated__/drupal"; -import {getStoryBookImage} from "../../storybook-entities"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordPersonListItem from "@components/nodes/list-item/stanford-person/stanford-person-list-item" +import {PersonCard} from "../cards/PersonCard.stories" +import {ComponentProps} from "react" +import {Image, NodeStanfordPerson} from "@lib/gql/__generated__/drupal.d" +import {getStoryBookImage} from "../../storybook-entities" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPerson["title"] @@ -13,32 +13,32 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/Person List Item', + title: "Design/Nodes/List Item/Person List Item", component: StanfordPersonListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PersonListItem: Story = { render: ({title, suPersonPhoto, suPersonShortTitle, node, ...args}) => { - node.title = title; - node.suPersonShortTitle = suPersonShortTitle; - node.suPersonPhoto = suPersonPhoto ? getStoryBookImage() : undefined; - return + node.title = title + node.suPersonShortTitle = suPersonShortTitle + node.suPersonPhoto = suPersonPhoto ? getStoryBookImage() : undefined + return }, - args: {...PersonCard.args} -}; + args: {...PersonCard.args}, +} diff --git a/.storybook/stories/nodes/list-item/PolicyListItem.stories.tsx b/.storybook/stories/nodes/list-item/PolicyListItem.stories.tsx index 9339ed58..12c81f5b 100644 --- a/.storybook/stories/nodes/list-item/PolicyListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/PolicyListItem.stories.tsx @@ -1,8 +1,8 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordPolicyListItem from "@components/nodes/list-item/stanford-policy/stanford-policy-list-item"; -import {PolicyCard} from "../cards/PolicyCard.stories"; -import {ComponentProps} from "react"; -import {NodeStanfordPolicy, Text} from "@lib/gql/__generated__/drupal"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordPolicyListItem from "@components/nodes/list-item/stanford-policy/stanford-policy-list-item" +import {PolicyCard} from "../cards/PolicyCard.stories" +import {ComponentProps} from "react" +import {NodeStanfordPolicy, Text} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPolicy["title"] @@ -11,31 +11,31 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/Policy List Item', + title: "Design/Nodes/List Item/Policy List Item", component: StanfordPolicyListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PolicyListItem: Story = { render: ({title, body, node, ...args}) => { - node.title = title; - node.body = {processed: body}; - return + node.title = title + node.body = {processed: body} + return }, - args: {...PolicyCard.args} -}; + args: {...PolicyCard.args}, +} diff --git a/.storybook/stories/nodes/list-item/PublicationListItem.stories.tsx b/.storybook/stories/nodes/list-item/PublicationListItem.stories.tsx index aabac399..79476810 100644 --- a/.storybook/stories/nodes/list-item/PublicationListItem.stories.tsx +++ b/.storybook/stories/nodes/list-item/PublicationListItem.stories.tsx @@ -1,9 +1,9 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import StanfordPublicationListItem from "@components/nodes/list-item/stanford-publication/stanford-publication-list-item"; -import {PublicationCard} from "../cards/PublicationCard.stories"; -import {ComponentProps} from "react"; -import {getStoryBookTaxonomyTerm} from "../../storybook-entities"; -import {NodeStanfordPublication, TermStanfordPublicationTopic} from "@lib/gql/__generated__/drupal"; +import type {Meta, StoryObj} from "@storybook/react" +import StanfordPublicationListItem from "@components/nodes/list-item/stanford-publication/stanford-publication-list-item" +import {PublicationCard} from "../cards/PublicationCard.stories" +import {ComponentProps} from "react" +import {getStoryBookTaxonomyTerm} from "../../storybook-entities" +import {NodeStanfordPublication, TermStanfordPublicationTopic} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { title: NodeStanfordPublication["title"] @@ -12,24 +12,24 @@ type ComponentStoryProps = ComponentProps & // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Nodes/List Item/Publication List Item', + title: "Design/Nodes/List Item/Publication List Item", component: StanfordPublicationListItem, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { headingLevel: { options: ["h2", "h3"], - control: {type: "select"} + control: {type: "select"}, }, node: { table: { disable: true, - } + }, }, - } -}; + }, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const PublicationListItem: Story = { @@ -39,7 +39,7 @@ export const PublicationListItem: Story = { if (suPublicationTopics) { suPublicationTopics.map(name => node.suPublicationTopics?.push(getStoryBookTaxonomyTerm(name))) } - return + return }, - args: {...PublicationCard.args} -}; + args: {...PublicationCard.args}, +} diff --git a/.storybook/stories/paragraphs/Banner.stories.tsx b/.storybook/stories/paragraphs/Banner.stories.tsx index 42471aa5..6e43e348 100644 --- a/.storybook/stories/paragraphs/Banner.stories.tsx +++ b/.storybook/stories/paragraphs/Banner.stories.tsx @@ -1,6 +1,6 @@ import type {Meta, StoryObj} from "@storybook/react" import {ComponentProps} from "react" -import {ParagraphStanfordBanner, Text} from "@lib/gql/__generated__/drupal" +import {ParagraphStanfordBanner, Text} from "@lib/gql/__generated__/drupal.d" import BannerParagraph from "@components/paragraphs/stanford-banner/banner-paragraph" import {getStoryBookImage} from "../storybook-entities" @@ -37,9 +37,11 @@ export const Banner: Story = { timezone: "America/Los_Angeles", }, id: "9954cc81-919b-4498-9151-bf930831fca7", - suBannerHeader: "Nam scelerisque, urna vitae auctor efficitur, tortor nunc cursus tortor, ut blandit purus arcu quis sapien", + suBannerHeader: + "Nam scelerisque, urna vitae auctor efficitur, tortor nunc cursus tortor, ut blandit purus arcu quis sapien", suBannerBody: { - processed: "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.

", + processed: + "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.

", }, suBannerImage: getStoryBookImage(), suBannerSupHeader: "Vestibulum", diff --git a/.storybook/stories/paragraphs/Card.stories.tsx b/.storybook/stories/paragraphs/Card.stories.tsx index 00cb2980..9aa86f82 100644 --- a/.storybook/stories/paragraphs/Card.stories.tsx +++ b/.storybook/stories/paragraphs/Card.stories.tsx @@ -1,6 +1,6 @@ import type {Meta, StoryObj} from "@storybook/react" import {ComponentProps} from "react" -import {ParagraphStanfordCard, Text} from "@lib/gql/__generated__/drupal" +import {ParagraphStanfordCard, Text} from "@lib/gql/__generated__/drupal.d" import CardParagraph from "@components/paragraphs/stanford-card/card-paragraph" import {getStoryBookImage} from "../storybook-entities" @@ -37,9 +37,11 @@ export const Card: Story = { timezone: "America/Los_Angeles", }, id: "9954cc81-919b-4498-9151-bf930831fca7", - suCardHeader: "Nam scelerisque, urna vitae auctor efficitur, tortor nunc cursus tortor, ut blandit purus arcu quis sapien", + suCardHeader: + "Nam scelerisque, urna vitae auctor efficitur, tortor nunc cursus tortor, ut blandit purus arcu quis sapien", suCardBody: { - processed: "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.

", + processed: + "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vitae dignissim felis. Nullam nulla leo, venenatis at feugiat sit amet, ultricies non lorem.

", }, suCardLink: { title: "Button", diff --git a/.storybook/stories/paragraphs/Wysiwyg.stories.tsx b/.storybook/stories/paragraphs/Wysiwyg.stories.tsx index 783522fa..3c665f25 100644 --- a/.storybook/stories/paragraphs/Wysiwyg.stories.tsx +++ b/.storybook/stories/paragraphs/Wysiwyg.stories.tsx @@ -1,7 +1,7 @@ -import type {Meta, StoryObj} from '@storybook/react'; -import WysiwygParagraph from "@components/paragraphs/stanford-wysiwyg/wysiwyg-paragraph"; -import {ComponentProps} from "react"; -import {ParagraphStanfordWysiwyg, Text} from "@lib/gql/__generated__/drupal"; +import type {Meta, StoryObj} from "@storybook/react" +import WysiwygParagraph from "@components/paragraphs/stanford-wysiwyg/wysiwyg-paragraph" +import {ComponentProps} from "react" +import {ParagraphStanfordWysiwyg, Text} from "@lib/gql/__generated__/drupal.d" type ComponentStoryProps = ComponentProps & { text: Text["processed"] @@ -9,29 +9,30 @@ type ComponentStoryProps = ComponentProps & { // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction const meta: Meta = { - title: 'Design/Paragraphs/Wysiwyg', + title: "Design/Paragraphs/Wysiwyg", component: WysiwygParagraph, - tags: ['autodocs'], - argTypes: {} -}; + tags: ["autodocs"], + argTypes: {}, +} -export default meta; -type Story = StoryObj; +export default meta +type Story = StoryObj // More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args export const Wysiwyg: Story = { render: ({text, ...args}) => { - return + return }, args: { - text: "

Didn't melt fairer keepsakes since Fellowship elsewhere.

\n" + - "

Didn't melt fairer keepsakes since Fellowship elsewhere.

\n" + + text: + "

Didn't melt fairer keepsakes since Fellowship elsewhere.

\n" + + '

Didn\'t melt fairer keepsakes since Fellowship elsewhere.

\n' + "

Woodlands payment Osgiliath tightening. Barad-dur follow belly comforts tender tough bell? Many that live deserve death. Some that die deserve life. Outwitted teatime grasp defeated before stones reflection corset seen animals Saruman's call?

\n" + "

Tad survive ensnare joy mistake courtesy Bagshot Row.

\n" + - "

Tad survive ensnare joy mistake courtesy Bagshot Row.

\n" + + '

Tad survive ensnare joy mistake courtesy Bagshot Row.

\n' + "

Ligulas step drops both? You shall not pass! Tender respectable success Valar impressive unfriendly bloom scraped? Branch hey-diddle-diddle pony trouble'll sleeping during jump Narsil.

\n" + "

North valor overflowing sort Iáve mister kingly money?

\n" + - "

North valor overflowing sort Iáve mister kingly money?

\n" + + '

North valor overflowing sort Iáve mister kingly money?

\n' + "

Curse you and all the halflings! Deserted anytime Lake-town burned caves balls. Smoked lthilien forbids Thrain?

\n" + "