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
322e6a8
feat: upgrade to React 19.2.4 with TypeScript 5 and Jest 29
Mukesh-FN Mar 24, 2026
c72f1b1
fix(storybook): fix dark mode in Storybook 8 with storybook-dark-mode v4
Mukesh-FN Mar 24, 2026
99646eb
feat: apply React 19 / TypeScript 5 / Storybook 8 migration changes
Mukesh-FN Mar 24, 2026
d659475
feat: upgrade ESLint to v10 with flat config, fix all lint errors and…
Mukesh-FN Mar 24, 2026
0797dc3
feat: upgrade styled-components v5 → v6
Mukesh-FN Mar 24, 2026
eecafa8
feat: upgrade TypeScript 5 → 6.0.2
Mukesh-FN Mar 24, 2026
855815f
fix: achieve full TypeScript 6 compliance without ignoreDeprecations
Mukesh-FN Mar 24, 2026
a8adc52
fix(tsconfig): add module: esnext required by moduleResolution: bundler
Mukesh-FN Mar 24, 2026
0a881cb
feat: upgrade Vite 6 → 8.0.2
Mukesh-FN Mar 24, 2026
8644079
fix(lint): suppress unicorn/explicit-length-check for size prop check…
Mukesh-FN Mar 24, 2026
7d489ca
fix(jest): resolve codemod test failures caused by moduleResolution a…
Mukesh-FN Mar 24, 2026
78e224a
style: apply prettier formatting to codemods/global.d.ts
Mukesh-FN Mar 24, 2026
7e7b776
feat: upgrade Storybook 8 to 9.1.20
Mukesh-FN Mar 24, 2026
6d99c6e
feat: upgrade @types/node 22 and @types/react-select 4 to latest (Pha…
Mukesh-FN Mar 24, 2026
cdb1c36
chore: upgrade eslint-plugin-jest and globals
Mukesh-FN Mar 24, 2026
4fb3353
feat: upgrade Storybook 9 to 10 and replace storybook-dark-mode with …
Mukesh-FN Mar 25, 2026
8acf67e
chore: remove unused deps, move @types/react-select to devDeps, delet…
Mukesh-FN Mar 25, 2026
df73301
feat: replace native Storybook 10 dark mode with storybook-dark-mode v5
Mukesh-FN Mar 25, 2026
4516c68
fix: resolve all ESLint warnings, fix test env, update CI pipelines t…
Mukesh-FN Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 0 additions & 16 deletions .babelrc.json

This file was deleted.

16 changes: 0 additions & 16 deletions .eslintignore

This file was deleted.

75 changes: 0 additions & 75 deletions .eslintrc.js

This file was deleted.

13 changes: 10 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 24
cache: 'npm'
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
install-command: npm i --legacy-peer-deps
install-command: npm ci --legacy-peer-deps
- name: Build docs
run: npm run build:documentation
- uses: actions/upload-artifact@v4
Expand All @@ -31,13 +35,16 @@ jobs:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: storybook-dist
path: public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,21 @@ jobs:
build:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
install-command: npm ci --legacy-peer-deps
- name: Run linter
run: npm run lint
- name: Run build
Expand All @@ -31,6 +37,7 @@ jobs:
release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
Expand All @@ -43,8 +50,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- name: Install dependencies
uses: bahmutov/npm-install@v1
with:
install-command: npm ci --legacy-peer-deps
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Run build
Expand All @@ -57,6 +67,9 @@ jobs:
merge-main:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,25 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: write # to post the preview comment
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'

- name: Install deps
run: npm install
run: npm ci --legacy-peer-deps

- name: Build package
run: npm run build

- name: Publish preview
# TODO: use the commented line below when package is react19 compatible
# run: npx pkg-pr-new publish --compact --comment=update --template './.github/PREVIEW_TEMPLATE/*'
run: npx pkg-pr-new publish --compact --comment=update
run: npx pkg-pr-new publish --compact --comment=update --template './.github/PREVIEW_TEMPLATE/*'
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
npx --no-install commitlint --edit "$1"
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
npm run husky:precommit
17 changes: 3 additions & 14 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
import { StorybookConfig } from '@storybook/react-webpack5';
import { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../**/*.storybook.mdx', '../src/**/*.stories.@(ts|tsx)'],

addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-viewport',
'storybook-dark-mode'
],
addons: ['storybook-dark-mode', '@storybook/addon-docs'],

framework: {
name: '@storybook/react-webpack5',
name: '@storybook/react-vite',
options: {}
},

docs: {
autodocs: true
},

staticDirs: ['../public'],

typescript: {
Expand Down
61 changes: 44 additions & 17 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
import React, { useLayoutEffect } from 'react';
import React, { useEffect, useLayoutEffect, useState } from 'react';
import { I18nProvider } from 'react-aria-components';
import { Preview } from '@storybook/react';
import { themes } from '@storybook/theming';
import { DocsContainer } from '@storybook/addon-docs';
import { useDarkMode } from 'storybook-dark-mode';
import { Preview } from '@storybook/react-vite';
import { themes } from 'storybook/theming';
import { DocsContainer } from '@storybook/addon-docs/blocks';
import { addons } from 'storybook/preview-api';
import { useDarkMode, DARK_MODE_EVENT_NAME } from 'storybook-dark-mode';

const STORAGE_KEY = 'sb-addon-themes-3';

const getInitialDarkMode = (): boolean => {
try {
const stored = localStorage.getItem(STORAGE_KEY);
if (stored) return JSON.parse(stored).current === 'dark';
} catch {}
return window.matchMedia?.('(prefers-color-scheme: dark)').matches ?? false;
};

import { GlobalStyle as ClassicColors } from '../src/essentials/Colors/Colors';
import { GlobalStyle as ModernColors } from '../src/essentials/Colors/ModernColors';
import { createGlobalStyle, ColorPalette as ExperimentalColors } from '../src/essentials/experimental/Colors';
import { DarkScheme, LightScheme } from '../src/components/ColorScheme';

import { LightTheme, DarkTheme } from '../src/docs/storybook-theme/FreenowTheme';

const THEMES = {
Expand Down Expand Up @@ -46,7 +55,7 @@ export const withTheme = (Story, context) => {

useLayoutEffect(() => {
document.body.style.fontFamily = font;
}, []);
}, [font]);

return (
<>
Expand All @@ -57,12 +66,17 @@ export const withTheme = (Story, context) => {
};

export const withColorScheme = (Story, context) => {
const SchemeWrapper = useDarkMode() ? DarkScheme : LightScheme;
// useDarkMode from storybook-dark-mode works inside decorators (preview hook context)
const isDark = useDarkMode();
const schemeClass = isDark ? 'dark-scheme' : 'light-scheme';

return (
<SchemeWrapper>
<div
className={`${schemeClass} wave`}
style={{ background: 'var(--wave-background-page-default)', minHeight: '100%' }}
>
<Story {...context} />
</SchemeWrapper>
</div>
);
};

Expand Down Expand Up @@ -106,9 +120,20 @@ export const preview: Preview = {
},
docs: {
container: props => {
const scheme = useDarkMode() ? DarkTheme : LightTheme;
const globals = props.context.store.globals.get();
const { Colors } = THEMES[globals.theme];
// Use React hooks + channel to track dark mode in docs context.
// storybook-dark-mode's useDarkMode() uses preview-api hooks which
// only work in decorator/story context, not here.
const [isDark, setIsDark] = useState(getInitialDarkMode);
useEffect(() => {
const channel = addons.getChannel();
channel.on(DARK_MODE_EVENT_NAME, setIsDark);
return () => channel.off(DARK_MODE_EVENT_NAME, setIsDark);
}, []);

const scheme = isDark ? DarkTheme : LightTheme;
const globals = props.context.globals ?? {};
const theme = (globals.theme as keyof typeof THEMES) ?? 'modern';
const { Colors } = THEMES[theme] ?? THEMES.modern;

return (
<>
Expand All @@ -122,10 +147,10 @@ export const preview: Preview = {
}
},
backgrounds: {
disable: true
disabled: true
},
viewport: {
viewports: {
options: {
mobile: {
name: 'Mobile',
styles: {
Expand Down Expand Up @@ -191,7 +216,9 @@ export const preview: Preview = {
dynamicTitle: true
}
}
}
},

tags: ['autodocs']
};

export default preview;
20 changes: 0 additions & 20 deletions .stylelintrc

This file was deleted.

Loading
Loading