@storybook/react 7.6.0-beta.1 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +8 -8
- package/template/cli/js/Button.stories.js +5 -5
- package/template/cli/js/Header.stories.js +2 -2
- package/template/cli/js/Page.stories.js +2 -2
- package/template/cli/ts-3-8/Button.stories.ts +5 -5
- package/template/cli/ts-3-8/Header.stories.ts +2 -2
- package/template/cli/ts-3-8/Page.stories.ts +2 -2
- package/template/cli/ts-4-9/Button.stories.ts +5 -5
- package/template/cli/ts-4-9/Header.stories.ts +2 -2
- package/template/cli/ts-4-9/Page.stories.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react",
|
|
3
|
-
"version": "7.6.0
|
|
3
|
+
"version": "7.6.0",
|
|
4
4
|
"description": "Storybook React renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"prep": "node --loader ../../../scripts/node_modules/esbuild-register/loader.js -r ../../../scripts/node_modules/esbuild-register/register.js ../../../scripts/prepare/bundle.ts"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@storybook/client-logger": "7.6.0
|
|
51
|
-
"@storybook/core-client": "7.6.0
|
|
52
|
-
"@storybook/docs-tools": "7.6.0
|
|
50
|
+
"@storybook/client-logger": "7.6.0",
|
|
51
|
+
"@storybook/core-client": "7.6.0",
|
|
52
|
+
"@storybook/docs-tools": "7.6.0",
|
|
53
53
|
"@storybook/global": "^5.0.0",
|
|
54
|
-
"@storybook/preview-api": "7.6.0
|
|
55
|
-
"@storybook/react-dom-shim": "7.6.0
|
|
56
|
-
"@storybook/types": "7.6.0
|
|
54
|
+
"@storybook/preview-api": "7.6.0",
|
|
55
|
+
"@storybook/react-dom-shim": "7.6.0",
|
|
56
|
+
"@storybook/types": "7.6.0",
|
|
57
57
|
"@types/escodegen": "^0.0.6",
|
|
58
58
|
"@types/estree": "^0.0.51",
|
|
59
59
|
"@types/node": "^18.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@babel/core": "^7.23.2",
|
|
74
|
-
"@storybook/test": "7.6.0
|
|
74
|
+
"@storybook/test": "7.6.0",
|
|
75
75
|
"@types/util-deprecate": "^1.0.0",
|
|
76
76
|
"expect-type": "^0.15.0",
|
|
77
77
|
"jest-specific-snapshot": "^8.0.0",
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Button } from './Button';
|
|
2
2
|
|
|
3
|
-
// More on how to set up stories at: https://storybook.js.org/docs/
|
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Example/Button',
|
|
6
6
|
component: Button,
|
|
7
7
|
parameters: {
|
|
8
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/
|
|
8
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
9
9
|
layout: 'centered',
|
|
10
10
|
},
|
|
11
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/
|
|
11
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
12
12
|
tags: ['autodocs'],
|
|
13
|
-
// More on argTypes: https://storybook.js.org/docs/
|
|
13
|
+
// More on argTypes: https://storybook.js.org/docs/api/argtypes
|
|
14
14
|
argTypes: {
|
|
15
15
|
backgroundColor: { control: 'color' },
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
// More on writing stories with args: https://storybook.js.org/docs/
|
|
19
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
20
20
|
export const Primary = {
|
|
21
21
|
args: {
|
|
22
22
|
primary: true,
|
|
@@ -3,10 +3,10 @@ import { Header } from './Header';
|
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Example/Header',
|
|
5
5
|
component: Header,
|
|
6
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/
|
|
6
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
7
7
|
tags: ['autodocs'],
|
|
8
8
|
parameters: {
|
|
9
|
-
// More on how to position stories at: https://storybook.js.org/docs/
|
|
9
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
10
10
|
layout: 'fullscreen',
|
|
11
11
|
},
|
|
12
12
|
};
|
|
@@ -6,14 +6,14 @@ export default {
|
|
|
6
6
|
title: 'Example/Page',
|
|
7
7
|
component: Page,
|
|
8
8
|
parameters: {
|
|
9
|
-
// More on how to position stories at: https://storybook.js.org/docs/
|
|
9
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
10
10
|
layout: 'fullscreen',
|
|
11
11
|
},
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const LoggedOut = {};
|
|
15
15
|
|
|
16
|
-
// More on interaction testing: https://storybook.js.org/docs/
|
|
16
|
+
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
17
17
|
export const LoggedIn = {
|
|
18
18
|
play: async ({ canvasElement }) => {
|
|
19
19
|
const canvas = within(canvasElement);
|
|
@@ -2,17 +2,17 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
import { Button } from './Button';
|
|
4
4
|
|
|
5
|
-
// More on how to set up stories at: https://storybook.js.org/docs/
|
|
5
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
6
6
|
const meta: Meta<typeof Button> = {
|
|
7
7
|
title: 'Example/Button',
|
|
8
8
|
component: Button,
|
|
9
9
|
parameters: {
|
|
10
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/
|
|
10
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
11
11
|
layout: 'centered',
|
|
12
12
|
},
|
|
13
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/
|
|
13
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
14
14
|
tags: ['autodocs'],
|
|
15
|
-
// More on argTypes: https://storybook.js.org/docs/
|
|
15
|
+
// More on argTypes: https://storybook.js.org/docs/api/argtypes
|
|
16
16
|
argTypes: {
|
|
17
17
|
backgroundColor: { control: 'color' },
|
|
18
18
|
},
|
|
@@ -21,7 +21,7 @@ const meta: Meta<typeof Button> = {
|
|
|
21
21
|
export default meta;
|
|
22
22
|
type Story = StoryObj<typeof Button>;
|
|
23
23
|
|
|
24
|
-
// More on writing stories with args: https://storybook.js.org/docs/
|
|
24
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
25
25
|
export const Primary: Story = {
|
|
26
26
|
args: {
|
|
27
27
|
primary: true,
|
|
@@ -5,10 +5,10 @@ import { Header } from './Header';
|
|
|
5
5
|
const meta: Meta<typeof Header> = {
|
|
6
6
|
title: 'Example/Header',
|
|
7
7
|
component: Header,
|
|
8
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/
|
|
8
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
parameters: {
|
|
11
|
-
// More on Story layout: https://storybook.js.org/docs/
|
|
11
|
+
// More on Story layout: https://storybook.js.org/docs/configure/story-layout
|
|
12
12
|
layout: 'fullscreen',
|
|
13
13
|
},
|
|
14
14
|
};
|
|
@@ -7,7 +7,7 @@ const meta: Meta<typeof Page> = {
|
|
|
7
7
|
title: 'Example/Page',
|
|
8
8
|
component: Page,
|
|
9
9
|
parameters: {
|
|
10
|
-
// More on Story layout: https://storybook.js.org/docs/
|
|
10
|
+
// More on Story layout: https://storybook.js.org/docs/configure/story-layout
|
|
11
11
|
layout: 'fullscreen',
|
|
12
12
|
},
|
|
13
13
|
};
|
|
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof Page>;
|
|
|
17
17
|
|
|
18
18
|
export const LoggedOut: Story = {};
|
|
19
19
|
|
|
20
|
-
// More on interaction testing: https://storybook.js.org/docs/
|
|
20
|
+
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
21
21
|
export const LoggedIn: Story = {
|
|
22
22
|
play: async ({ canvasElement }) => {
|
|
23
23
|
const canvas = within(canvasElement);
|
|
@@ -2,17 +2,17 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
import { Button } from './Button';
|
|
4
4
|
|
|
5
|
-
// More on how to set up stories at: https://storybook.js.org/docs/
|
|
5
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
6
6
|
const meta = {
|
|
7
7
|
title: 'Example/Button',
|
|
8
8
|
component: Button,
|
|
9
9
|
parameters: {
|
|
10
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/
|
|
10
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
11
11
|
layout: 'centered',
|
|
12
12
|
},
|
|
13
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/
|
|
13
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
14
14
|
tags: ['autodocs'],
|
|
15
|
-
// More on argTypes: https://storybook.js.org/docs/
|
|
15
|
+
// More on argTypes: https://storybook.js.org/docs/api/argtypes
|
|
16
16
|
argTypes: {
|
|
17
17
|
backgroundColor: { control: 'color' },
|
|
18
18
|
},
|
|
@@ -21,7 +21,7 @@ const meta = {
|
|
|
21
21
|
export default meta;
|
|
22
22
|
type Story = StoryObj<typeof meta>;
|
|
23
23
|
|
|
24
|
-
// More on writing stories with args: https://storybook.js.org/docs/
|
|
24
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
25
25
|
export const Primary: Story = {
|
|
26
26
|
args: {
|
|
27
27
|
primary: true,
|
|
@@ -5,10 +5,10 @@ import { Header } from './Header';
|
|
|
5
5
|
const meta = {
|
|
6
6
|
title: 'Example/Header',
|
|
7
7
|
component: Header,
|
|
8
|
-
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/
|
|
8
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
9
9
|
tags: ['autodocs'],
|
|
10
10
|
parameters: {
|
|
11
|
-
// More on how to position stories at: https://storybook.js.org/docs/
|
|
11
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
12
12
|
layout: 'fullscreen',
|
|
13
13
|
},
|
|
14
14
|
} satisfies Meta<typeof Header>;
|
|
@@ -7,7 +7,7 @@ const meta = {
|
|
|
7
7
|
title: 'Example/Page',
|
|
8
8
|
component: Page,
|
|
9
9
|
parameters: {
|
|
10
|
-
// More on how to position stories at: https://storybook.js.org/docs/
|
|
10
|
+
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
11
11
|
layout: 'fullscreen',
|
|
12
12
|
},
|
|
13
13
|
} satisfies Meta<typeof Page>;
|
|
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>;
|
|
|
17
17
|
|
|
18
18
|
export const LoggedOut: Story = {};
|
|
19
19
|
|
|
20
|
-
// More on interaction testing: https://storybook.js.org/docs/
|
|
20
|
+
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
21
21
|
export const LoggedIn: Story = {
|
|
22
22
|
play: async ({ canvasElement }) => {
|
|
23
23
|
const canvas = within(canvasElement);
|