Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
4,839 changes: 2,347 additions & 2,492 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-storybook": "^0.11.1",
"eslint-plugin-storybook": "^9.1.10",
"globals": "^15.4.0",
"husky": "^7.0.4",
"lerna": "^8.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/.storybook/components/ReferencesList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { useOf } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { useOf } from '@storybook/blocks';

export const ReferencesList = ({ of }: { of?: Parameters<typeof useOf>[0] }) => {
const resolvedOf = useOf(of || 'story', ['story']);
Expand Down
4 changes: 2 additions & 2 deletions packages/react/.storybook/components/TableFunction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import { useMemo } from 'react';

import { useDarkMode } from '@storybook-community/storybook-dark-mode';

import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
Expand All @@ -23,8 +25,6 @@ import {
import { Theme } from '../../src/testing';
import json from '../../src/typedoc.json';

import { useDarkMode } from 'storybook-dark-mode';

interface TableFunctionProps {
name: string;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/react/.storybook/components/TableInterface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import { useMemo } from 'react';

import { useDarkMode } from '@storybook-community/storybook-dark-mode';

import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
Expand All @@ -26,8 +28,6 @@ import {
import { Theme } from '../../src/testing';
import json from '../../src/typedoc.json';

import { useDarkMode } from 'storybook-dark-mode';

interface TableInterfaceProps {
name: string;
variant: 'props' | 'css';
Expand Down
16 changes: 4 additions & 12 deletions packages/react/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ module.exports = {
},
],
staticDirs: ['./assets'],

addons: [
{
name: '@storybook/addon-docs',
name: getAbsolutePath('@storybook/addon-docs'),
options: {
mdxPluginOptions: {
mdxCompileOptions: {
Expand All @@ -32,17 +31,10 @@ module.exports = {
},
},
},
{
name: '@storybook/addon-essentials',
options: {
backgrounds: false,
},
},
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('storybook-dark-mode'),
getAbsolutePath('@storybook-community/storybook-dark-mode'),
],

async viteFinal(config) {
const { mergeConfig } = await import('vite');

Expand All @@ -66,7 +58,7 @@ module.exports = {
name: getAbsolutePath('@storybook/react-vite'),
options: {},
},
docs: {
autodocs: 'tag',
features: {
backgrounds: false,
},
};
4 changes: 2 additions & 2 deletions packages/react/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { addons } from '@storybook/manager-api';

import { themeLight } from './themes';

import { addons } from 'storybook/manager-api';

addons.setConfig({
theme: themeLight,
});
17 changes: 14 additions & 3 deletions packages/react/.storybook/preview.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import React from 'react';

import { Controls, Description, DocsContainer, Primary, Stories, Subtitle, Title } from '@storybook/blocks';
import { Controls, Description, DocsContainer, Primary, Stories, Subtitle, Title } from '@storybook/addon-docs/blocks';

import { ReferencesList } from './components/ReferencesList';
import { themeDark, themeLight } from './themes';

import { Theme } from '../src/testing';

import { useDarkMode } from 'storybook-dark-mode';
import { useDarkMode, DARK_MODE_EVENT_NAME } from '@storybook-community/storybook-dark-mode';

import { addons } from 'storybook/preview-api';

const channel = addons.getChannel();

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
Expand All @@ -22,6 +26,7 @@ export const parameters = {
darkMode: {
light: themeLight,
dark: themeDark,
stylePreview: true,
},
options: {
storySort: {
Expand All @@ -39,7 +44,13 @@ export const parameters = {
},
docs: {
container: function Container(props) {
const isDarkMode = useDarkMode();
const [isDarkMode, setDark] = React.useState();

React.useEffect(() => {
channel.on(DARK_MODE_EVENT_NAME, setDark);
return () => channel.removeListener(DARK_MODE_EVENT_NAME, setDark);
}, [channel, setDark]);

const currentProps = { ...props };
currentProps.theme = isDarkMode ? themeDark : themeLight;

Expand Down
4 changes: 2 additions & 2 deletions packages/react/.storybook/themes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { themes } from '@storybook/theming';

import logoDark from './assets/logo-dark.svg';
import logoLight from './assets/logo-light.svg';

import { themes } from 'storybook/theming';

const themeCommon = {
brandTitle: 'Elonsoft',
brandUrl: 'https://elonsoft.ru/',
Expand Down
18 changes: 7 additions & 11 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,12 @@
"@mui/material": "^7.1.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.1",
"@storybook/addon-a11y": "^8.6.14",
"@storybook/addon-actions": "^8.6.14",
"@storybook/addon-docs": "^8.6.14",
"@storybook/addon-essentials": "^8.6.14",
"@storybook/addon-links": "^8.6.14",
"@storybook/builder-vite": "^8.6.14",
"@storybook/react": "^8.6.14",
"@storybook/react-vite": "^8.6.14",
"@storybook/theming": "^8.6.14",
"@storybook-community/storybook-dark-mode": "^6.0.7",
"@storybook/addon-a11y": "^9.1.10",
"@storybook/addon-docs": "^9.1.10",
"@storybook/addon-links": "^9.1.10",
"@storybook/builder-vite": "^9.1.10",
"@storybook/react-vite": "^9.1.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"babel-loader": "^8.2.3",
Expand All @@ -64,8 +61,7 @@
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-progress": "^1.1.2",
"rollup-plugin-typescript2": "^0.31.1",
"storybook": "^8.4.5",
"storybook-dark-mode": "4.0.1",
"storybook": "^9.1.10",
"typedoc": "0.27.6",
"vite": "^6.3.5",
"yargs": "^17.7.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Alert/Alert.api.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Alert/Alert.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentProps } from 'react';

import { Meta, StoryContext, StoryObj } from '@storybook/react';
import { Meta, StoryContext, StoryObj } from '@storybook/react-vite';

import { Alert, AlertActions, AlertClose, AlertTitle } from '.';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/AppBar/AppBar.api.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/AppBar/AppBar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, StoryObj } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react-vite';

import Box from '@mui/material/Box';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRef } from 'react';

import { Meta, StoryObj } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react-vite';

import Box from '@mui/material/Box';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentProps, useEffect, useRef, useState } from 'react';

import { Meta, StoryContext, StoryObj } from '@storybook/react';
import { Meta, StoryContext, StoryObj } from '@storybook/react-vite';

import Box from '@mui/material/Box';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Avatar/Avatar.api.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Avatar/Avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, StoryObj } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react-vite';

import { Box } from '@mui/material';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, StoryObj } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react-vite';

import { AvatarGroup } from '.';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentProps } from 'react';

import { Meta, StoryObj } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react-vite';

import { Badge } from './Badge';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentProps } from 'react';

import { Meta, StoryObj } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react-vite';

import { BadgePlacementControl } from './BadgePlacementControl';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Banner/Banner.api.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Banner/Banner.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentProps } from 'react';

import { Meta, StoryContext, StoryObj } from '@storybook/react';
import { Meta, StoryContext, StoryObj } from '@storybook/react-vite';

import Box from '@mui/material/Box';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';

import { Meta, StoryContext, StoryObj } from '@storybook/react';
import { Meta, StoryContext, StoryObj } from '@storybook/react-vite';

import Typography from '@mui/material/Typography';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, StoryObj } from '@storybook/react';
import { Meta, StoryObj } from '@storybook/react-vite';

import Box from '@mui/material/Box';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ComponentProps } from 'react';

import { Meta, StoryContext, StoryObj } from '@storybook/react';
import { Meta, StoryContext, StoryObj } from '@storybook/react-vite';

import { useTheme } from '@mui/material';

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Calendar/Calendar.api.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/blocks';
import { Meta } from '@storybook/addon-docs/blocks';
import LinkTo from '@storybook/addon-links/react';
import { TableInterface } from '~storybook/components/TableInterface';

Expand Down
Loading
Loading