Skip to content

Commit b252135

Browse files
authored
Merge pull request #1050 from patrickcate/feature/000/storybook-8
build(storybook): update storybook to v8
2 parents 58ba813 + 6671292 commit b252135

File tree

111 files changed

+22973
-44698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+22973
-44698
lines changed

.storybook/main.cjs

-28
This file was deleted.

.storybook/main.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import path from 'node:path'
2+
import { loadConfigFromFile, mergeConfig } from 'vite'
3+
4+
export default {
5+
stories: [
6+
'../docs/**/*.mdx',
7+
'../stories/**/*.mdx',
8+
'../src/**/*.stories.@(js|jsx|ts|tsx)',
9+
],
10+
11+
addons: [
12+
'@storybook/addon-links',
13+
'@storybook/addon-essentials',
14+
'@storybook/addon-mdx-gfm',
15+
],
16+
17+
core: {
18+
disableTelemetry: true,
19+
},
20+
21+
framework: {
22+
name: '@storybook/vue3-vite',
23+
options: {
24+
docgen: 'vue-component-meta',
25+
},
26+
},
27+
28+
async viteFinal(config, { configType }) {
29+
const { config: userConfig } = await loadConfigFromFile(
30+
path.resolve(__dirname, '..', 'vite.config.js'),
31+
)
32+
return mergeConfig(config, {
33+
...userConfig,
34+
base: '/vue-uswds/',
35+
// manually specify plugins to avoid conflict
36+
plugins: [],
37+
})
38+
},
39+
docs: {},
40+
}

.storybook/manager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addons } from '@storybook/addons'
1+
import { addons } from '@storybook/manager-api'
22
import theme from './theme.js'
33

44
addons.setConfig({

docs/guide/0-installation.stories.mdx renamed to docs/guide/0-installation.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta } from '@storybook/addon-docs'
1+
import { Meta } from '@storybook/blocks'
22

33
<Meta title='Guide/Installation' />
44

docs/guide/1-configuration.stories.mdx renamed to docs/guide/1-configuration.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Meta } from '@storybook/addon-docs'
1+
import { Meta } from '@storybook/blocks'
22

3-
<Meta title='Guide/Usage' />
3+
<Meta title="Guide/Usage" />
44

55
# Usage
66

7-
When importing the library via NPM you can import all components or use the _À La Carte_ method to import only specific components. The _À La Carte_ method makes it easier to reduce the final bundle size of your application by only including components you are using.
7+
When importing the library via NPM you can import all components or use the *À La Carte* method to import only specific components. The *À La Carte* method makes it easier to reduce the final bundle size of your application by only including components you are using.
88

99
## All Components
1010

docs/guide/2-configuration.stories.mdx renamed to docs/guide/2-configuration.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Meta } from '@storybook/addon-docs'
1+
import { Meta } from '@storybook/blocks'
22

3-
<Meta title='Guide/Configuration' />
3+
<Meta title="Guide/Configuration" />
44

55
# Configuration
66

0 commit comments

Comments
 (0)