@storybook/nextjs 7.1.0-alpha.32 → 7.1.0-alpha.34
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/dist/{index.d-78ba9067.d.ts → index.d-d4396bd0.d.ts} +1 -0
- package/dist/preset.d.ts +1 -1
- package/dist/preview.d.ts +1 -1
- package/package.json +8 -8
- package/template/cli/js/Button.stories.js +8 -4
- package/template/cli/ts-3-8/Button.stories.ts +8 -4
- package/template/cli/ts-3-8/Introduction.mdx +1 -1
- package/template/cli/{ts → ts-4-9}/Button.stories.ts +11 -7
- package/template/cli/{ts → ts-4-9}/Header.stories.ts +3 -3
- package/template/cli/{ts → ts-4-9}/Introduction.mdx +1 -1
- package/template/cli/{ts → ts-4-9}/Page.stories.ts +3 -3
- /package/template/cli/{ts → ts-4-9}/Button.tsx +0 -0
- /package/template/cli/{ts → ts-4-9}/Header.tsx +0 -0
- /package/template/cli/{ts → ts-4-9}/Page.tsx +0 -0
package/dist/preset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PresetProperty, O as Options } from './index.d-
|
|
1
|
+
import { P as PresetProperty, O as Options } from './index.d-d4396bd0.js';
|
|
2
2
|
import { TransformOptions } from '@babel/core';
|
|
3
3
|
import { StorybookConfig } from './index.js';
|
|
4
4
|
import 'file-system-cache';
|
package/dist/preview.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/nextjs",
|
|
3
|
-
"version": "7.1.0-alpha.
|
|
3
|
+
"version": "7.1.0-alpha.34",
|
|
4
4
|
"description": "Storybook for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"@babel/preset-react": "^7.22.0",
|
|
71
71
|
"@babel/preset-typescript": "^7.21.0",
|
|
72
72
|
"@babel/runtime": "^7.22.0",
|
|
73
|
-
"@storybook/addon-actions": "7.1.0-alpha.
|
|
74
|
-
"@storybook/builder-webpack5": "7.1.0-alpha.
|
|
75
|
-
"@storybook/core-common": "7.1.0-alpha.
|
|
76
|
-
"@storybook/node-logger": "7.1.0-alpha.
|
|
77
|
-
"@storybook/preset-react-webpack": "7.1.0-alpha.
|
|
78
|
-
"@storybook/preview-api": "7.1.0-alpha.
|
|
79
|
-
"@storybook/react": "7.1.0-alpha.
|
|
73
|
+
"@storybook/addon-actions": "7.1.0-alpha.34",
|
|
74
|
+
"@storybook/builder-webpack5": "7.1.0-alpha.34",
|
|
75
|
+
"@storybook/core-common": "7.1.0-alpha.34",
|
|
76
|
+
"@storybook/node-logger": "7.1.0-alpha.34",
|
|
77
|
+
"@storybook/preset-react-webpack": "7.1.0-alpha.34",
|
|
78
|
+
"@storybook/preview-api": "7.1.0-alpha.34",
|
|
79
|
+
"@storybook/react": "7.1.0-alpha.34",
|
|
80
80
|
"@types/node": "^16.0.0",
|
|
81
81
|
"css-loader": "^6.7.3",
|
|
82
82
|
"find-up": "^5.0.0",
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Button } from './Button';
|
|
2
2
|
|
|
3
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Example/Button',
|
|
6
6
|
component: Button,
|
|
7
|
+
parameters: {
|
|
8
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
7
12
|
tags: ['autodocs'],
|
|
13
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
8
14
|
argTypes: {
|
|
9
|
-
backgroundColor: {
|
|
10
|
-
control: 'color',
|
|
11
|
-
},
|
|
15
|
+
backgroundColor: { control: 'color' },
|
|
12
16
|
},
|
|
13
17
|
};
|
|
14
18
|
|
|
@@ -2,15 +2,19 @@ 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/react/writing-stories/introduction
|
|
5
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
6
6
|
const meta: Meta<typeof Button> = {
|
|
7
7
|
title: 'Example/Button',
|
|
8
8
|
component: Button,
|
|
9
|
+
parameters: {
|
|
10
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
9
14
|
tags: ['autodocs'],
|
|
15
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
10
16
|
argTypes: {
|
|
11
|
-
backgroundColor: {
|
|
12
|
-
control: 'color',
|
|
13
|
-
},
|
|
17
|
+
backgroundColor: { control: 'color' },
|
|
14
18
|
},
|
|
15
19
|
};
|
|
16
20
|
|
|
@@ -2,20 +2,24 @@ 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/react/writing-stories/introduction
|
|
6
|
-
const meta
|
|
5
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
6
|
+
const meta = {
|
|
7
7
|
title: 'Example/Button',
|
|
8
8
|
component: Button,
|
|
9
|
+
parameters: {
|
|
10
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/react/configure/story-layout
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
9
14
|
tags: ['autodocs'],
|
|
15
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
10
16
|
argTypes: {
|
|
11
|
-
backgroundColor: {
|
|
12
|
-
control: 'color',
|
|
13
|
-
},
|
|
17
|
+
backgroundColor: { control: 'color' },
|
|
14
18
|
},
|
|
15
|
-
}
|
|
19
|
+
} satisfies Meta<typeof Button>;
|
|
16
20
|
|
|
17
21
|
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
19
23
|
|
|
20
24
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
21
25
|
export const Primary: Story = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { Header } from './Header';
|
|
3
3
|
|
|
4
|
-
const meta
|
|
4
|
+
const meta = {
|
|
5
5
|
title: 'Example/Header',
|
|
6
6
|
component: Header,
|
|
7
7
|
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
|
|
@@ -10,10 +10,10 @@ const meta: Meta<typeof Header> = {
|
|
|
10
10
|
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
|
|
11
11
|
layout: 'fullscreen',
|
|
12
12
|
},
|
|
13
|
-
}
|
|
13
|
+
} satisfies Meta<typeof Header>;
|
|
14
14
|
|
|
15
15
|
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
17
|
|
|
18
18
|
export const LoggedIn: Story = {
|
|
19
19
|
args: {
|
|
@@ -3,17 +3,17 @@ import { within, userEvent } from '@storybook/testing-library';
|
|
|
3
3
|
|
|
4
4
|
import { Page } from './Page';
|
|
5
5
|
|
|
6
|
-
const meta
|
|
6
|
+
const meta = {
|
|
7
7
|
title: 'Example/Page',
|
|
8
8
|
component: Page,
|
|
9
9
|
parameters: {
|
|
10
10
|
// More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
|
|
11
11
|
layout: 'fullscreen',
|
|
12
12
|
},
|
|
13
|
-
}
|
|
13
|
+
} satisfies Meta<typeof Page>;
|
|
14
14
|
|
|
15
15
|
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
17
|
|
|
18
18
|
export const LoggedOut: Story = {};
|
|
19
19
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|