Migrated Storybook to v7.0.4 (#264)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"sourceType": "unambiguous",
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"chrome": 100
|
||||
}
|
||||
}
|
||||
],
|
||||
"@babel/preset-typescript",
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": []
|
||||
}
|
||||
+19
-1
@@ -1,3 +1,5 @@
|
||||
import remarkGfm from "remark-gfm";
|
||||
|
||||
module.exports = {
|
||||
stories: [
|
||||
"../src/**/**/*.stories.mdx",
|
||||
@@ -8,6 +10,22 @@ module.exports = {
|
||||
"@storybook/addon-essentials",
|
||||
"@storybook/addon-interactions",
|
||||
"storybook-dark-mode",
|
||||
{
|
||||
name: "@storybook/addon-docs",
|
||||
options: {
|
||||
mdxPluginOptions: {
|
||||
mdxCompileOptions: {
|
||||
remarkPlugins: [remarkGfm],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
framework: "@storybook/react",
|
||||
framework: {
|
||||
name: "@storybook/react-webpack5",
|
||||
options: {},
|
||||
},
|
||||
docs: {
|
||||
autodocs: true,
|
||||
},
|
||||
};
|
||||
|
||||
+14
-15
@@ -8,8 +8,8 @@
|
||||
"module": "dist/esm/index.js",
|
||||
"scripts": {
|
||||
"build": "rm -rf dist && rollup -c",
|
||||
"storybook": "NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006",
|
||||
"build-storybook": "build-storybook -o docs",
|
||||
"storybook": "storybook dev -p 6006",
|
||||
"build-storybook": "storybook build -o docs",
|
||||
"test": "jest"
|
||||
},
|
||||
"types": "dist/mds.d.ts",
|
||||
@@ -21,17 +21,18 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.4",
|
||||
"@babel/preset-env": "^7.21.4",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.21.4",
|
||||
"@rollup/plugin-commonjs": "^24.0.1",
|
||||
"@rollup/plugin-node-resolve": "^15.0.2",
|
||||
"@rollup/plugin-typescript": "^11.1.0",
|
||||
"@storybook/addon-actions": "^6.5.16",
|
||||
"@storybook/addon-essentials": "^6.5.16",
|
||||
"@storybook/addon-interactions": "^6.5.16",
|
||||
"@storybook/addon-links": "^6.5.16",
|
||||
"@storybook/builder-webpack4": "^6.5.16",
|
||||
"@storybook/manager-webpack4": "^6.5.16",
|
||||
"@storybook/react": "^6.5.16",
|
||||
"@storybook/addon-actions": "^7.0.4",
|
||||
"@storybook/addon-essentials": "^7.0.4",
|
||||
"@storybook/addon-interactions": "^7.0.4",
|
||||
"@storybook/addon-links": "^7.0.4",
|
||||
"@storybook/react": "^7.0.4",
|
||||
"@storybook/react-webpack5": "^7.0.4",
|
||||
"@storybook/testing-library": "^0.1.0",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
@@ -45,23 +46,21 @@
|
||||
"prettier": "^2.8.7",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-copy": "^3.4.0",
|
||||
"rollup-plugin-dts": "^4.2.3",
|
||||
"rollup-plugin-import-file": "^1.0.1",
|
||||
"rollup-plugin-peer-deps-external": "^2.2.4",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"storybook-dark-mode": "^2.1.1",
|
||||
"storybook": "^7.0.4",
|
||||
"storybook-dark-mode": "^3.0.0",
|
||||
"ts-jest": "^29.1.0",
|
||||
"tslib": "^2.5.0",
|
||||
"typescript": "^4.9.5",
|
||||
"typescript": "^5.0.4",
|
||||
"yarn-audit-fix": "^9.3.10"
|
||||
},
|
||||
"resolutions": {
|
||||
"@storybook/**/glob-parent": "^5.1.2",
|
||||
"@storybook/**/trim": "^0.0.3",
|
||||
"@storybook/**/trim-newlines": "^3.0.1",
|
||||
"@storybook/**/terser": "^5.14.2",
|
||||
"rollup-plugin-terser/**/terser": "^5.14.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import ApplicationLogo from "./ApplicationLogo";
|
||||
import { ApplicationLogoProps } from "./ApplicationLogo.types";
|
||||
|
||||
import StoryThemeProvider from "../../utils/StoryThemeProvider";
|
||||
import GlobalStyles from "../GlobalStyles/GlobalStyles";
|
||||
|
||||
export default {
|
||||
title: "MDS/Graphics/ApplicationLogo",
|
||||
@@ -30,6 +31,7 @@ export default {
|
||||
|
||||
const Template: Story<ApplicationLogoProps> = (args) => (
|
||||
<StoryThemeProvider>
|
||||
<GlobalStyles />
|
||||
<div style={{ maxWidth: "200px" }}>
|
||||
<ApplicationLogo {...args} />
|
||||
</div>
|
||||
|
||||
@@ -22,6 +22,7 @@ import { BackLinkProps } from "./BackLink.types";
|
||||
|
||||
import TestIcon from "../../utils/TestIcon";
|
||||
import StoryThemeProvider from "../../utils/StoryThemeProvider";
|
||||
import GlobalStyles from "../GlobalStyles/GlobalStyles";
|
||||
|
||||
export default {
|
||||
title: "MDS/Layout/BackLink",
|
||||
@@ -31,6 +32,7 @@ export default {
|
||||
|
||||
const Template: Story<BackLinkProps> = (args) => (
|
||||
<StoryThemeProvider>
|
||||
<GlobalStyles />
|
||||
<BackLink {...args} onClick={() => alert("You clicked me!")} />
|
||||
</StoryThemeProvider>
|
||||
);
|
||||
|
||||
@@ -22,6 +22,7 @@ import { ButtonProps } from "./Button.types";
|
||||
|
||||
import TestIcon from "../../utils/TestIcon";
|
||||
import StoryThemeProvider from "../../utils/StoryThemeProvider";
|
||||
import GlobalStyles from "../GlobalStyles/GlobalStyles";
|
||||
|
||||
export default {
|
||||
title: "MDS/Forms/Button",
|
||||
@@ -31,6 +32,7 @@ export default {
|
||||
|
||||
const Template: Story<ButtonProps> = (args) => (
|
||||
<StoryThemeProvider>
|
||||
<GlobalStyles />
|
||||
<Button {...args} onClick={() => alert("You clicked me!")} />
|
||||
<br />
|
||||
<Button {...args}>With Children</Button>
|
||||
|
||||
@@ -22,6 +22,7 @@ import { IconButtonProps } from "./IconButton.types";
|
||||
|
||||
import TestIcon from "../../utils/TestIcon";
|
||||
import StoryThemeProvider from "../../utils/StoryThemeProvider";
|
||||
import GlobalStyles from "../GlobalStyles/GlobalStyles";
|
||||
|
||||
export default {
|
||||
title: "MDS/Forms/IconButton",
|
||||
@@ -31,6 +32,7 @@ export default {
|
||||
|
||||
const Template: Story<IconButtonProps> = (args) => (
|
||||
<StoryThemeProvider>
|
||||
<GlobalStyles />
|
||||
<IconButton {...args} onClick={() => alert("You clicked me!")}>
|
||||
<TestIcon />
|
||||
</IconButton>
|
||||
|
||||
@@ -20,6 +20,7 @@ import { Meta, Story } from "@storybook/react";
|
||||
import Loader from "./Loader";
|
||||
|
||||
import StoryThemeProvider from "../../utils/StoryThemeProvider";
|
||||
import GlobalStyles from "../GlobalStyles/GlobalStyles";
|
||||
|
||||
export default {
|
||||
title: "MDS/Graphics/Loader",
|
||||
@@ -29,6 +30,7 @@ export default {
|
||||
|
||||
const Template: Story = (args) => (
|
||||
<StoryThemeProvider>
|
||||
<GlobalStyles />
|
||||
<Loader {...args} />
|
||||
</StoryThemeProvider>
|
||||
);
|
||||
|
||||
@@ -19,6 +19,7 @@ import { Meta, Story } from "@storybook/react";
|
||||
|
||||
import ThemedLogo from "./ThemedLogo";
|
||||
import StoryThemeProvider from "../../utils/StoryThemeProvider";
|
||||
import GlobalStyles from "../GlobalStyles/GlobalStyles";
|
||||
|
||||
export default {
|
||||
title: "MDS/Graphics/ThemedLogo",
|
||||
@@ -28,6 +29,7 @@ export default {
|
||||
|
||||
const Template: Story = () => (
|
||||
<StoryThemeProvider>
|
||||
<GlobalStyles />
|
||||
<ThemedLogo />
|
||||
</StoryThemeProvider>
|
||||
);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { DARK_MODE_EVENT_NAME } from "storybook-dark-mode";
|
||||
import addons from "@storybook/addons";
|
||||
import { addons } from "@storybook/addons";
|
||||
|
||||
import ThemeHandler from "../components/ThemeHandler/ThemeHandler";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user