Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"@react-email/components": "1.0.10",
"@react-email/render": "2.0.4",
"@smithy/node-http-handler": "4.4.14",
"@storybook/addon-outline": "7.6.24",
"@types/mdast": "4.0.4",
"airtable": "0.12.2",
"aws-amplify": "6.15.8",
Expand Down Expand Up @@ -141,21 +140,22 @@
"@react-email/preview-server": "5.2.10",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@storybook/addon-a11y": "7.6.24",
"@storybook/addon-actions": "7.6.24",
"@storybook/addon-designs": "7.0.9",
"@storybook/addon-docs": "7.6.24",
"@storybook/addon-essentials": "7.6.24",
"@storybook/addon-interactions": "7.6.24",
"@storybook/addon-links": "7.6.24",
"@storybook/addon-a11y": "10.3.6",
"@storybook/addon-actions": "^9.0.8",
"@storybook/addon-designs": "^11.1.3",
"@storybook/addon-docs": "10.3.6",
"@storybook/addon-essentials": "^8.6.14",
"@storybook/addon-interactions": "^8.6.14",
"@storybook/addon-links": "10.3.6",
"@storybook/addons": "7.6.17",
"@storybook/api": "7.6.17",
"@storybook/components": "7.6.24",
"@storybook/core-events": "7.6.24",
"@storybook/nextjs": "7.6.24",
"@storybook/react": "7.6.24",
"@storybook/components": "^8.6.14",
"@storybook/core-events": "^8.6.14",
"@storybook/nextjs": "10.3.6",
"@storybook/nextjs-vite": "10.3.6",
"@storybook/react": "10.3.6",
"@storybook/storybook-deployer": "2.8.16",
"@storybook/theming": "7.6.24",
"@storybook/theming": "^8.6.14",
"@swc/core": "1.15.30",
"@swc/jest": "0.2.39",
"@testing-library/dom": "10.4.1",
Expand Down Expand Up @@ -219,7 +219,7 @@
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-storybook": "0.12.0",
"eslint-plugin-storybook": "10.3.6",
"eslint-plugin-testing-library": "6.5.0",
"eslint-plugin-unicorn": "51.0.1",
"http-status-codes": "2.3.0",
Expand All @@ -243,7 +243,7 @@
"sass-loader": "16.0.7",
"seedrandom": "3.0.5",
"semantic-release": "19.0.5",
"storybook": "7.6.24",
"storybook": "10.3.6",
"style-loader": "4.0.0",
"supertest": "7.2.2",
"ts-jest": "29.4.9",
Expand All @@ -253,6 +253,7 @@
"tsconfig-paths": "4.2.0",
"tsx": "4.21.0",
"typescript": "5.9.3",
"vite": "^7.0.0",
"vitest": "2.1.9",
"webpack": "5.105.4",
"wiremock": "3.13.2",
Expand Down
44 changes: 24 additions & 20 deletions web/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
import { dirname, join } from "path";
// This file has been automatically migrated to valid ESM format by Storybook.
import { dirname, join, resolve } from "path";
import { fileURLToPath } from "url";
import { createRequire } from "module";

const path = require("path");
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const require = createRequire(import.meta.url);

module.exports = {
function getAbsolutePath(value) {
return dirname(require.resolve(join(value, "package.json")));
}

export default {
stories: ["../stories/**/*.stories.mdx", "../stories/**/*.stories.@(js|jsx|ts|tsx|mdx)"],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
getAbsolutePath("@storybook/addon-designs"),
getAbsolutePath("@storybook/addon-a11y"),
getAbsolutePath("@storybook/addon-interactions"),
getAbsolutePath("@storybook/addon-docs"),
],
framework: {
name: getAbsolutePath("@storybook/nextjs"),
name: getAbsolutePath("@storybook/nextjs-vite"),
options: {},
},
core: {
builder: {
name: "@storybook/builder-webpack5",
name: getAbsolutePath("@storybook/builder-webpack5"),
options: {
fsCache: true,
lazyCompilation: true,
Expand All @@ -27,17 +35,17 @@ module.exports = {
webpackFinal: async (config) => {
config.resolve.alias = {
...config.resolve.alias,
"/img": path.resolve(__dirname, "../public/img"),
"/img": resolve(__dirname, "../public/img"),
"/vendor/img": "@newjersey/njwds/dist/img",
"/vendor/js": "@newjersey/njwds/dist/js",
"@/components": path.resolve(__dirname, "../src/components"),
"@/lib": path.resolve(__dirname, "../src/lib"),
"@/contexts": path.resolve(__dirname, "../src/contexts"),
"@/styles": path.resolve(__dirname, "../src/styles"),
"@/pages": path.resolve(__dirname, "../src/pages"),
"@businessnjgovnavigator/content": path.resolve(__dirname, "../../content/src"),
"@businessnjgovnavigator/shared": path.resolve(__dirname, "../../shared/lib/shared/src"),
"@/test": path.resolve(__dirname, "../test"),
"@/components": resolve(__dirname, "../src/components"),
"@/lib": resolve(__dirname, "../src/lib"),
"@/contexts": resolve(__dirname, "../src/contexts"),
"@/styles": resolve(__dirname, "../src/styles"),
"@/pages": resolve(__dirname, "../src/pages"),
"@businessnjgovnavigator/content": resolve(__dirname, "../../content/src"),
"@businessnjgovnavigator/shared": resolve(__dirname, "../../shared/lib/shared/src"),
"@/test": resolve(__dirname, "../test"),
};
return config;
},
Expand All @@ -47,7 +55,3 @@ module.exports = {
},
staticDirs: ["../public"],
};

function getAbsolutePath(value) {
return dirname(require.resolve(join(value, "package.json")));
}
24 changes: 11 additions & 13 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,17 @@
"@mui/system": "5.18.0",
"@next/bundle-analyzer": "16.1.6",
"@next/eslint-plugin-next": "15.5.12",
"@storybook/addon-actions": "7.6.24",
"@storybook/addon-designs": "7.0.9",
"@storybook/addon-docs": "7.6.24",
"@storybook/addon-essentials": "7.6.24",
"@storybook/addon-interactions": "7.6.24",
"@storybook/addon-links": "7.6.24",
"@storybook/addon-designs": "^11.1.3",
"@storybook/addon-docs": "10.3.6",
"@storybook/addon-links": "10.3.6",
"@storybook/addons": "7.6.17",
"@storybook/api": "7.6.17",
"@storybook/components": "7.6.24",
"@storybook/core-events": "7.6.24",
"@storybook/nextjs": "7.6.24",
"@storybook/react": "7.6.24",
"@storybook/components": "^8.6.14",
"@storybook/core-events": "^8.6.14",
"@storybook/nextjs-vite": "10.3.6",
"@storybook/react": "10.3.6",
"@storybook/storybook-deployer": "2.8.16",
"@storybook/theming": "7.6.24",
"@storybook/theming": "^8.6.14",
"@swc/core": "1.15.30",
"@swc/jest": "0.2.39",
"@testing-library/dom": "10.4.1",
Expand Down Expand Up @@ -162,7 +159,7 @@
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-storybook": "0.12.0",
"eslint-plugin-storybook": "10.3.6",
"eslint-plugin-testing-library": "6.5.0",
"eslint-plugin-unicorn": "51.0.1",
"identity-obj-proxy": "3.0.0",
Expand All @@ -177,13 +174,14 @@
"rimraf": "6.1.3",
"sass": "1.98.0",
"sass-loader": "16.0.7",
"storybook": "7.6.24",
"storybook": "10.3.6",
"style-loader": "4.0.0",
"ts-jest": "29.4.9",
"ts-loader": "9.5.4",
"ts-node": "10.9.2",
"tsx": "4.21.0",
"typescript": "5.9.3",
"vite": "^7.0.0",
"webpack": "5.105.4"
}
}
2 changes: 1 addition & 1 deletion web/stories/Atoms/Colors.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Heading } from "@/components/njwds-extended/Heading";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const Template = () => {
const renderColor = (variable: string, hexcode: string) => (
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Atoms/DropShadows.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Heading } from "@/components/njwds-extended/Heading";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const Template = () => {
const shadows = ["xs", "xs-darker", "sm", "md", "lg", "xl"];
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Atoms/Gradients.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Heading } from "@/components/njwds-extended/Heading";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const Template = () => {
const renderGradient = (gradientName: string) => (
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Atoms/Tag/ChecklistTag.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChecklistTag } from "@/components/ChecklistTag";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof ChecklistTag> = {
title: "Atoms/Tag/ChecklistTag",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Atoms/Tag/TagLabel.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Tag } from "@/components/njwds-extended/Tag";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof Tag> = {
title: "Atoms/Tag/Label",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Atoms/Tag/TagStatus.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Tag } from "@/components/njwds-extended/Tag";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof Tag> = {
title: "Atoms/Tag/Status",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Atoms/Typography.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Content } from "@/components/Content";
import { Heading } from "@/components/njwds-extended/Heading";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";
import { ReactElement } from "react";

const Template = () => {
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Alerts/DefaultAlert.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Alert } from "@/components/njwds-extended/Alert";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof Alert> = {
title: "Molecules/Alerts",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/AnytimeActions.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
generateAnytimeActionLicenseReinstatement,
generateAnytimeActionTask,
} from "@/test/factories";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof AnytimeActionSearch> = {
title: "Molecules/AnytimeAction",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/Calendar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CalendarEventItem } from "@/components/filings-calendar/CalendarEventItem";
import { defaultDateFormat, parseDateWithFormat } from "@businessnjgovnavigator/shared";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof CalendarEventItem> = {
title: "Molecules/Button/Calendar",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/Feedback.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ButtonIcon } from "@/components/ButtonIcon";
import { PrimaryButton } from "@/components/njwds-extended/PrimaryButton";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof PrimaryButton> = {
title: "Molecules/Button/Feedback",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/PrimaryLarge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PrimaryButton } from "@/components/njwds-extended/PrimaryButton";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof PrimaryButton> = {
title: "Molecules/Button/PrimaryLarge",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/PrimaryRegular.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PrimaryButton } from "@/components/njwds-extended/PrimaryButton";
import { Icon } from "@/components/njwds/Icon";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof PrimaryButton> = {
title: "Molecules/Button/PrimaryRegular",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/Quaternary.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SecondaryButton } from "@/components/njwds-extended/SecondaryButton";
import { Icon } from "@/components/njwds/Icon";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof SecondaryButton> = {
title: "Molecules/Button/Quaternary",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/SecondaryButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SecondaryButton } from "@/components/njwds-extended/SecondaryButton";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof SecondaryButton> = {
title: "Molecules/Button/Secondary",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/Tertiary.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PrimaryButton } from "@/components/njwds-extended/PrimaryButton";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof PrimaryButton> = {
title: "Molecules/Button/Tertiary",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Button/Unstyled.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UnStyledButton } from "@/components/njwds-extended/UnStyledButton";
import { Icon } from "@/components/njwds/Icon";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof UnStyledButton> = {
title: "Molecules/Button/Unstyled",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ContextualInfoButton } from "@/components/ContextualInfoButton";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const Template = () => <ContextualInfoButton text="Contextual Link" id="id" />;

Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Cards/OpportunityCards.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OpportunityCard } from "@/components/dashboard/OpportunityCard";
import { generateOpportunity } from "@/test/factories";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof OpportunityCard> = {
title: "Molecules/Cards/OpportunityCards",
Expand Down
2 changes: 1 addition & 1 deletion web/stories/Molecules/Cards/SideBarCards.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SidebarCardGeneric } from "@/components/dashboard/SidebarCardGeneric";
import { generateSidebarCardContent } from "@/test/factories";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const meta: Meta<typeof SidebarCardGeneric> = {
title: "Molecules/Cards/SideBarCards",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Content } from "@/components/Content";
import { Icon } from "@/components/njwds/Icon";
import { Accordion, AccordionDetails, AccordionSummary } from "@mui/material";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const Template = () => {
return (
Expand Down
14 changes: 10 additions & 4 deletions web/stories/Molecules/accordions/MultipleAccordions.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { Content } from "@/components/Content";
import { Icon } from "@/components/njwds/Icon";
import { Accordion, AccordionDetails, AccordionSummary } from "@mui/material";
import { Meta, StoryObj } from "@storybook/react";
import { Meta, StoryObj } from "@storybook/nextjs";

const Template = () => {
return (
<>
<Accordion onChange={() => {}} square={false} className="">
<AccordionSummary
aria-controls=""
expandIcon={<Icon className={"usa-icon--size-3 text-base-darkest"} iconName="expand_more" />}
expandIcon={
<Icon className={"usa-icon--size-3 text-base-darkest"} iconName="expand_more" />
}
>
<div>Accordion Summary Text</div>
</AccordionSummary>
Expand All @@ -25,7 +27,9 @@ const Template = () => {
<Accordion onChange={() => {}} square={false} className="">
<AccordionSummary
aria-controls=""
expandIcon={<Icon className={"usa-icon--size-3 text-base-darkest"} iconName="expand_more" />}
expandIcon={
<Icon className={"usa-icon--size-3 text-base-darkest"} iconName="expand_more" />
}
>
<div>Accordion Summary Text</div>
</AccordionSummary>
Expand All @@ -41,7 +45,9 @@ const Template = () => {
<Accordion onChange={() => {}} square={false} className="">
<AccordionSummary
aria-controls=""
expandIcon={<Icon className={"usa-icon--size-3 text-base-darkest"} iconName="expand_more" />}
expandIcon={
<Icon className={"usa-icon--size-3 text-base-darkest"} iconName="expand_more" />
}
>
<div>Accordion Summary Text</div>
</AccordionSummary>
Expand Down
Loading
Loading