Skip to content

Commit 9bdf6e0

Browse files
Guillaume CATELGuillaume CATEL
authored andcommitted
chore: update storybook
1 parent 07e3445 commit 9bdf6e0

File tree

8 files changed

+545
-325
lines changed

8 files changed

+545
-325
lines changed

pnpm-lock.yaml

Lines changed: 520 additions & 279 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo/generators/templates/packages/typescript-react-ui/package.json.hbs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
12
{
23
"name": "@monorepo/{{kebabCase name}}",
34
"version": "0.0.0",
45
"private": true,
6+
"type": "module",
57
"main": "./src/index.ts",
68
"module": "./src/index.ts",
79
"types": "./src/index.ts",
@@ -39,16 +41,14 @@
3941
"devDependencies": {
4042
"@monorepo/tailwind-config": "workspace:*",
4143
"@monorepo/typescript-config": "workspace:*",
42-
"@storybook/addon-a11y": "^8.5.2",
4344
"@storybook/addon-essentials": "^8.5.2",
4445
"@storybook/addon-interactions": "^8.5.2",
45-
"@storybook/addon-links": "^8.5.2",
46+
"@storybook/addon-onboarding": "^8.5.2",
4647
"@storybook/blocks": "^8.5.2",
47-
"@storybook/manager-api": "^8.5.2",
4848
"@storybook/react": "^8.5.2",
4949
"@storybook/react-vite": "^8.5.2",
5050
"@storybook/test": "^8.5.2",
51-
"@storybook/theming": "^8.5.2",
51+
"@tailwindcss/vite": "^4.0.0",
5252
"@testing-library/jest-dom": "^6.6.3",
5353
"@testing-library/react": "^16.2.0",
5454
"@testing-library/user-event": "^14.6.1",
@@ -57,10 +57,9 @@
5757
"@types/node": "^22.12.0",
5858
"@types/react": "^19.0.8",
5959
"@types/react-dom": "^19.0.3",
60-
"autoprefixer": "^10.4.20",
60+
"@vitejs/plugin-react": "^4.3.4",
6161
"eslint-plugin-storybook": "^0.11.2",
6262
"jsdom": "^26.0.0",
63-
"postcss": "^8.5.1",
6463
"storybook": "^8.5.2",
6564
"tailwindcss": "^4.0.0",
6665
"typescript": "^5.7.3",

turbo/generators/templates/packages/typescript-react-ui/postcss.config.mjs.hbs

Lines changed: 0 additions & 6 deletions
This file was deleted.

turbo/generators/templates/packages/typescript-react-ui/tailwind.config.ts.hbs

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'vite'
2+
3+
import react from '@vitejs/plugin-react'
4+
import tailwindcss from '@tailwindcss/vite'
5+
6+
export default defineConfig({
7+
plugins: [
8+
react(),
9+
tailwindcss(),
10+
],
11+
})
Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,19 @@
11
import type { StorybookConfig } from '@storybook/react-vite'
22

3-
import { dirname, join } from 'node:path'
4-
5-
/**
6-
* This function is used to resolve the absolute path of a package.
7-
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
8-
*/
9-
10-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
11-
function getAbsolutePath(value: string): any {
12-
return dirname(require.resolve(join(value, 'package.json')))
13-
}
14-
153
const config: StorybookConfig = {
164
stories: [
175
'../src/**/*.mdx',
18-
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
6+
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'
197
],
20-
docs: {
21-
autodocs: true,
22-
},
238
addons: [
24-
getAbsolutePath('@storybook/addon-links'),
25-
getAbsolutePath('@storybook/addon-essentials'),
26-
getAbsolutePath('@storybook/addon-interactions'),
27-
getAbsolutePath('@storybook/addon-a11y'),
9+
'@storybook/addon-onboarding',
10+
'@storybook/addon-essentials',
11+
'@storybook/addon-interactions',
2812
],
2913
framework: {
30-
name: getAbsolutePath('@storybook/react-vite'),
14+
name: '@storybook/react-vite',
3115
options: {},
3216
},
3317
}
18+
3419
export default config

turbo/generators/templates/packages/typescript-react-ui/{{include}}.storybook/preview-head.html.hbs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@
1919
margin: 0!important;
2020
}
2121
</style>
22-

turbo/generators/templates/packages/typescript-react-ui/{{include}}.storybook/preview.ts.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Preview } from '@storybook/react'
22

3-
import 'tailwindcss/tailwind.css'
3+
import 'tailwindcss/index.css'
44

55
const preview: Preview = {
66
parameters: {
@@ -38,8 +38,8 @@ const preview: Preview = {
3838
},
3939
controls: {
4040
matchers: {
41-
color: /(?<temp1>background|color)$/iu,
42-
date: /Date$/iu,
41+
color: /(background|color)$/i,
42+
date: /Date$/i,
4343
},
4444
},
4545
},

0 commit comments

Comments
 (0)