Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4fe8434
chore(storybook): codemod baseline (6.5 -> 9 with vite framework inst…
pawelgrimm May 15, 2026
0eab316
chore(storybook): convert .storybook config to TS, framework=react-vite
pawelgrimm May 15, 2026
8c0aeb7
chore(deps): drop webpack 4 chain, babel proposal plugins, enzyme; bu…
pawelgrimm May 15, 2026
8847248
test: add await to userEvent calls for v14 API (sync -> async)
pawelgrimm May 15, 2026
4a29b42
chore(storybook): clean up post-codemod artifacts; finish migration
pawelgrimm May 15, 2026
1f689ba
fix(storybook): restore KeyCapturer Playground story
pawelgrimm May 15, 2026
149b288
test: await helper-function calls; mark callers async
pawelgrimm May 15, 2026
c4ed783
fix(storybook): unblock vite dev/build — JSX in .js, dead imports
pawelgrimm May 16, 2026
2865bde
fix(storybook): drop dead PartialProps import from checkbox-field.mdx
pawelgrimm May 16, 2026
1379c92
fix(storybook): unblock Modal and KeyCapturer docs pages
pawelgrimm May 16, 2026
a3adc25
test(modal): migrate to user-event v14 setup() with advanceTimers
pawelgrimm May 16, 2026
f16f855
test(menu): migrate right-click to user-event v14 pointer API
pawelgrimm May 16, 2026
ec1c994
test(toast): migrate to user-event v14 setup() with advanceTimers
pawelgrimm May 16, 2026
1b232b0
test(button): migrate to user-event v14 setup() pattern
pawelgrimm May 16, 2026
86af541
test(tooltip): migrate to user-event v14 setup() with advanceTimers
pawelgrimm May 16, 2026
ff65d38
test(time): migrate to user-event v14 setup() and pointer API
pawelgrimm May 16, 2026
cad75da
test(tabs): waitFor panel-visibility assertions after click
pawelgrimm May 16, 2026
94429d8
test(menu): use scoped userEvent.setup() in keyboard-nav test
pawelgrimm May 16, 2026
10b24d4
test(menu): replace fireEvent.keyDown arrows with user.keyboard
pawelgrimm May 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"dist/**",
"docs/**",
"lib/**",
"storybook-static/**",
"storybook-static-*/**",
"postcss.config.js",
"scripts/**",
"rollup.config.mjs",
Expand All @@ -38,15 +40,40 @@
},
"overrides": [
{
// Some types are missing in legacy version of Storybook, revisit after update.
// jest mocks are hard to type, allow incomplete types in tests.
"files": ["stories/**/*", "*.test.*"],
// Files in .react-compiler.rec.json with known CompileErrors.
// eslint-plugin-react-hooks@7+ flags the same issues via runtime checks.
// They're pre-existing accepted technical debt; suppress so the
// migration doesn't turn them into hard lint failures.
"files": [
"src/checkbox-field/use-fork-ref.ts",
"src/tabs/tabs.tsx",
"src/tooltip/tooltip.tsx"
],
"rules": {
"react-hooks/refs": "off",
"react-hooks/exhaustive-deps": "warn",
"react-hooks/use-memo": "off",
"react-hooks/set-state-in-effect": "off",
"react/use": "off"
}
},
{
// Stories and tests have looser typing requirements. Storybook's package
// exports (e.g. `storybook/actions`) aren't understood by the default ESLint
// import resolver, so `import/no-unresolved` is disabled for stories.
"files": ["stories/**/*", "**/*.stories.*", "**/*-stories-*.{ts,tsx}", "*.test.*"],
"env": {
"browser": true
},
"rules": {
"react/no-unescaped-entities": "off",
"import/no-unresolved": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off"
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-floating-promises": "off"
}
}
],
Expand Down
56 changes: 28 additions & 28 deletions .react-compiler.rec.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"recordVersion": 1,
"react-compiler-version": "1.0.0",
"files": {
"src/checkbox-field/checkbox-field.tsx": {
"CompileError": 1
},
"src/checkbox-field/use-fork-ref.ts": {
"CompileError": 1
},
"src/components/keyboard-shortcut/keyboard-shortcut.tsx": {
"CompileError": 1
},
"src/hooks/use-previous/use-previous.ts": {
"CompileError": 1
},
"src/menu/menu.tsx": {
"CompileError": 2
},
"src/tabs/tabs.tsx": {
"CompileError": 4
},
"src/tooltip/tooltip.tsx": {
"CompileError": 1
},
"src/utils/common-helpers.ts": {
"CompileError": 2
}
"recordVersion": 1,
"react-compiler-version": "1.0.0",
"files": {
"src/checkbox-field/checkbox-field.tsx": {
"CompileError": 1
},
"src/checkbox-field/use-fork-ref.ts": {
"CompileError": 1
},
"src/components/keyboard-shortcut/keyboard-shortcut.tsx": {
"CompileError": 1
},
"src/hooks/use-previous/use-previous.ts": {
"CompileError": 1
},
"src/menu/menu.tsx": {
"CompileError": 2
},
"src/tabs/tabs.tsx": {
"CompileError": 4
},
"src/tooltip/tooltip.tsx": {
"CompileError": 1
},
"src/utils/common-helpers.ts": {
"CompileError": 2
}
}
}
}
85 changes: 0 additions & 85 deletions .storybook/main.js

This file was deleted.

31 changes: 31 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { StorybookConfig } from '@storybook/react-vite'

const config: StorybookConfig = {
stories: [
'../src/**/*.@(mdx|stories.@(js|jsx|ts|tsx))',
'../stories/**/*.@(mdx|stories.@(js|jsx|ts|tsx))',
],
framework: {
name: '@storybook/react-vite',
options: {},
},
addons: ['@storybook/addon-docs', '@storybook/addon-links'],
typescript: {
reactDocgen: false,
},
async viteFinal(config) {
const { mergeConfig } = await import('vite')
return mergeConfig(config, {
css: {
modules: {
generateScopedName:
process.env.NODE_ENV === 'production'
? '[hash:base64:8]'
: '[path][name]__[local]',
},
},
})
},
}

export default config
2 changes: 1 addition & 1 deletion .storybook/manager.js → .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from '@storybook/addons'
import { addons } from 'storybook/manager-api'
import theme from './theme'

addons.setConfig({
Expand Down
67 changes: 0 additions & 67 deletions .storybook/preview.js

This file was deleted.

65 changes: 65 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import type { Preview } from '@storybook/react-vite'
import BaseDecorator from './BaseDecorator'
import '../stories/components/styles/story.css'

const badgeFontStyles = {
fontSize: '12px',
lineHeight: '14px',
}

const preview: Preview = {
decorators: [BaseDecorator],
parameters: {
viewMode: 'docs',
options: {
storySort: {
method: 'alphabetical',
order: ['Reactist', 'Design tokens', 'Design system', 'Hooks', 'Components'],
},
},
chromatic: {
disableSnapshot: true,
},
badgesConfig: {
accessible: {
title: '✔ Accessible (WCAG 2.0 AA)',
styles: {
backgroundColor: 'rgba(5, 133, 39, 0.1)',
borderColor: 'rgb(5, 133, 39)',
color: 'rgb(5, 133, 39)',
...badgeFontStyles,
},
},
partiallyAccessible: {
title: '⚠ Partially Accessible',
styles: {
backgroundColor: 'rgba(235, 141, 19, 0.1)',
borderColor: 'rgb(235, 141, 19)',
color: 'rgb(235, 141, 19)',
...badgeFontStyles,
},
},
notAccessible: {
title: '✖ Not accessible',
styles: {
backgroundColor: 'rgba(209, 69, 59, 0.1)',
borderColor: 'rgb(209, 69, 59)',
color: 'rgb(209, 69, 59)',
...badgeFontStyles,
},
},
deprecated: {
title: '✖ Deprecated',
styles: {
backgroundColor: 'rgba(209, 69, 59, 0.1)',
borderColor: 'rgb(209, 69, 59)',
color: 'rgb(209, 69, 59)',
...badgeFontStyles,
},
},
},
},
tags: ['autodocs'],
}

export default preview
2 changes: 1 addition & 1 deletion .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { create } from '@storybook/theming/create'
import { create } from 'storybook/theming/create'

export default create({
base: 'light',
Expand Down
Loading
Loading