create-packer 1.45.4 → 1.45.5
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 +1 -1
- package/template/lib/workspace/.storybook/main.ts +16 -23
- package/template/lib/workspace/.storybook/preview.tsx +17 -17
- package/template/lib/workspace/package.json +5 -8
- package/template/lib/workspace/packages/react/src/Introduction.mdx +1 -1
- package/template/lib/workspace/packages/react/src/button/button.stories.ts +44 -44
package/package.json
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
import svgr from '@svgr/rollup'
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
const config: StorybookConfig = {
|
|
5
|
-
stories: [`../packages/**/*.mdx`, `../packages/**/*.stories.@(js|jsx|ts|tsx)`],
|
|
6
|
-
addons: [
|
|
7
|
-
|
|
8
|
-
'@storybook/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return config
|
|
18
|
-
},
|
|
19
|
-
docs: {
|
|
20
|
-
autodocs: 'tag'
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export default config
|
|
1
|
+
import svgr from '@svgr/rollup'
|
|
2
|
+
import { type StorybookConfig } from '@storybook/react-vite'
|
|
3
|
+
|
|
4
|
+
const config: StorybookConfig = {
|
|
5
|
+
stories: [`../packages/**/*.mdx`, `../packages/**/*.stories.@(js|jsx|ts|tsx)`],
|
|
6
|
+
addons: ['@storybook/addon-docs'],
|
|
7
|
+
framework: {
|
|
8
|
+
name: '@storybook/react-vite',
|
|
9
|
+
options: {}
|
|
10
|
+
},
|
|
11
|
+
async viteFinal(config) {
|
|
12
|
+
config.plugins!.unshift(svgr({ svgo: false, titleProp: true, ref: true }) as any)
|
|
13
|
+
return config
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export default config
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default preview
|
|
1
|
+
import { type Preview } from '@storybook/react-vite'
|
|
2
|
+
|
|
3
|
+
const preview: Preview = {
|
|
4
|
+
decorators: [Story => <Story />],
|
|
5
|
+
parameters: {
|
|
6
|
+
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
7
|
+
controls: {
|
|
8
|
+
matchers: {
|
|
9
|
+
color: /(background|color)$/i,
|
|
10
|
+
date: /Date$/
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
tags: ['autodocs']
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default preview
|
|
@@ -43,12 +43,9 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@changesets/cli": "2.26.2",
|
|
45
45
|
"@eslint/js": "9.15.0",
|
|
46
|
-
"@storybook/addon-
|
|
47
|
-
"@storybook/addon-
|
|
48
|
-
"@storybook/
|
|
49
|
-
"@storybook/blocks": "8.6.12",
|
|
50
|
-
"@storybook/react": "8.6.12",
|
|
51
|
-
"@storybook/react-vite": "8.6.12",
|
|
46
|
+
"@storybook/addon-docs": "9.1.2",
|
|
47
|
+
"@storybook/addon-links": "9.1.2",
|
|
48
|
+
"@storybook/react-vite": "9.1.2",
|
|
52
49
|
"@storybook/testing-library": "0.2.2",
|
|
53
50
|
"@svgr/rollup": "8.1.0",
|
|
54
51
|
"@types/node": "20.3.2",
|
|
@@ -60,7 +57,7 @@
|
|
|
60
57
|
"eslint-plugin-import": "2.31.0",
|
|
61
58
|
"eslint-plugin-react": "7.37.2",
|
|
62
59
|
"eslint-plugin-react-hooks": "5.1.0",
|
|
63
|
-
"eslint-plugin-storybook": "
|
|
60
|
+
"eslint-plugin-storybook": "9.1.2",
|
|
64
61
|
"globals": "15.12.0",
|
|
65
62
|
"inquirer": "^8.1.2",
|
|
66
63
|
"postcss": "8.4.31",
|
|
@@ -72,7 +69,7 @@
|
|
|
72
69
|
"prop-types": "15.8.1",
|
|
73
70
|
"react": "18.2.0",
|
|
74
71
|
"react-dom": "18.2.0",
|
|
75
|
-
"storybook": "
|
|
72
|
+
"storybook": "9.1.2",
|
|
76
73
|
"stylelint": "16.10.0",
|
|
77
74
|
"stylelint-config-standard-scss": "13.0.0",
|
|
78
75
|
"ts-node": "10.9.1",
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
5
|
-
const meta: Meta<typeof Button> = {
|
|
6
|
-
title: 'react-components/Button',
|
|
7
|
-
component: Button,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
argTypes: {
|
|
10
|
-
backgroundColor: { control: 'color' }
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default meta
|
|
15
|
-
|
|
16
|
-
type Story = StoryObj<typeof Button>
|
|
17
|
-
|
|
18
|
-
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
19
|
-
export const Primary: Story = {
|
|
20
|
-
args: {
|
|
21
|
-
primary: true,
|
|
22
|
-
label: 'Button'
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const Secondary: Story = {
|
|
27
|
-
args: {
|
|
28
|
-
label: 'Button'
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const Large: Story = {
|
|
33
|
-
args: {
|
|
34
|
-
size: 'large',
|
|
35
|
-
label: 'Button'
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const Small: Story = {
|
|
40
|
-
args: {
|
|
41
|
-
size: 'small',
|
|
42
|
-
label: 'Button'
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Button from './button'
|
|
3
|
+
|
|
4
|
+
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
5
|
+
const meta: Meta<typeof Button> = {
|
|
6
|
+
title: 'react-components/Button',
|
|
7
|
+
component: Button,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
backgroundColor: { control: 'color' }
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default meta
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof Button>
|
|
17
|
+
|
|
18
|
+
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
19
|
+
export const Primary: Story = {
|
|
20
|
+
args: {
|
|
21
|
+
primary: true,
|
|
22
|
+
label: 'Button'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Secondary: Story = {
|
|
27
|
+
args: {
|
|
28
|
+
label: 'Button'
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const Large: Story = {
|
|
33
|
+
args: {
|
|
34
|
+
size: 'large',
|
|
35
|
+
label: 'Button'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Small: Story = {
|
|
40
|
+
args: {
|
|
41
|
+
size: 'small',
|
|
42
|
+
label: 'Button'
|
|
43
|
+
}
|
|
44
|
+
}
|