Skip to content

Commit 2930c3e

Browse files
committed
wip
1 parent c7ddeb9 commit 2930c3e

File tree

161 files changed

+3606
-2770
lines changed

Some content is hidden

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

161 files changed

+3606
-2770
lines changed

.storybook/.DS_Store

0 Bytes
Binary file not shown.

.storybook/main.js

Lines changed: 87 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,113 @@
1+
const path = require('path');
2+
13
module.exports = {
24
stories: ['./stories/**/*.@(js|jsx|ts|tsx|mdx)'],
3-
addons: ['@storybook/addon-docs', '@storybook/addon-links'],
5+
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
46
staticDirs: ['./static'],
57

68
// due to storybook composition, chakra shows up as stories
79
// https://github.com/chakra-ui/chakra-ui/issues/2263#issuecomment-767557426
810
refs: {
911
'@chakra-ui/react': { disable: true },
1012
},
13+
framework: '@storybook/react',
14+
core: {
15+
builder: '@storybook/builder-vite',
16+
},
1117

12-
webpackFinal: async (config, { configType }) => {
18+
async viteFinal(config, { configType }) {
1319
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
1420
// You can change the configuration based on that.
1521
// 'PRODUCTION' is used when building the static version of storybook.
1622

1723
// chakra + framer motion is not working with storybook
1824
// https://github.com/framer/motion/issues/1307#issuecomment-966827629
19-
config.module.rules.push({
20-
type: 'javascript/auto',
21-
test: /\.mjs$/,
22-
include: /node_modules/,
23-
});
25+
// config.module.rules.push({
26+
// type: 'javascript/auto',
27+
// test: /\.mjs$/,
28+
// include: /node_modules/,
29+
// });
2430

2531
// chakra does not show styles in storybook
2632
// https://github.com/storybookjs/storybook/issues/13114#issuecomment-846464338
2733
return {
2834
...config,
2935
resolve: {
3036
...config.resolve,
31-
alias: {
32-
...config.resolve.alias,
33-
'@emotion/core': '@emotion/react',
34-
'@emotion/styled': '@emotion/styled',
35-
'emotion-theming': '@emotion/react',
36-
},
37+
alias: [
38+
{
39+
find: '@table-library/react-table-library/types',
40+
replacement: path.resolve(__dirname, '../src/types/'),
41+
},
42+
{
43+
find: '@table-library/react-table-library/common',
44+
replacement: path.resolve(__dirname, '../src/common/'),
45+
},
46+
{
47+
find: '@table-library/react-table-library/table',
48+
replacement: path.resolve(__dirname, '../src/table/'),
49+
},
50+
{
51+
find: '@table-library/react-table-library/compact',
52+
replacement: path.resolve(__dirname, '../src/compact/'),
53+
},
54+
{
55+
find: '@table-library/react-table-library/virtualized',
56+
replacement: path.resolve(__dirname, '../src/virtualized/'),
57+
},
58+
{
59+
find: '@table-library/react-table-library/theme',
60+
replacement: path.resolve(__dirname, '../src/theme/'),
61+
},
62+
{
63+
find: '@table-library/react-table-library/resize',
64+
replacement: path.resolve(__dirname, '../src/resize/'),
65+
},
66+
{
67+
find: '@table-library/react-table-library/sort',
68+
replacement: path.resolve(__dirname, '../src/sort/'),
69+
},
70+
{
71+
find: '@table-library/react-table-library/select',
72+
replacement: path.resolve(__dirname, '../src/select/'),
73+
},
74+
{
75+
find: '@table-library/react-table-library/tree',
76+
replacement: path.resolve(__dirname, '../src/tree/'),
77+
},
78+
{
79+
find: '@table-library/react-table-library/pagination',
80+
replacement: path.resolve(__dirname, '../src/pagination/'),
81+
},
82+
{
83+
find: '@table-library/react-table-library/baseline',
84+
replacement: path.resolve(__dirname, '../src/baseline/'),
85+
},
86+
{
87+
find: '@table-library/react-table-library/mantine',
88+
replacement: path.resolve(__dirname, '../src/mantine/'),
89+
},
90+
{
91+
find: '@table-library/react-table-library/chakra-ui',
92+
replacement: path.resolve(__dirname, '../src/chakra-ui/'),
93+
},
94+
{
95+
find: '@table-library/react-table-library/material-ui',
96+
replacement: path.resolve(__dirname, '../src/material-ui/'),
97+
},
98+
{
99+
find: '@emotion/core',
100+
replacement: '@emotion/react',
101+
},
102+
{
103+
find: '@emotion/styled',
104+
replacement: '@emotion/styled',
105+
},
106+
{
107+
find: 'emotion-theming',
108+
replacement: '@emotion/react',
109+
},
110+
],
37111
},
38112
};
39113
},

.storybook/preview.js renamed to .storybook/preview.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import 'loki/configure-react';
33
import isLokiRunning from '@loki/is-loki-running';
44

5-
import { DisableAnimationsContext } from './stories/loki.js';
5+
import { DisableAnimationsContext } from './stories/loki';
66

77
const Features = [
88
'Theme',

.storybook/stories/Compact/data-grid.js renamed to .storybook/stories/Compact/data-grid.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { CompactTable } from '@table-library/react-table-library/compact';
55
import { useTheme } from '@table-library/react-table-library/theme';
66
import { getTheme } from '@table-library/react-table-library/baseline';
77

8-
import { DisableAnimationsContext } from '../../stories/loki.js';
8+
import { DisableAnimationsContext } from '../../stories/loki.jsx';
99
import { DocumentationSee } from '../documentation';
1010
import { lotsOfNodes, randomFromInterval } from '../data';
1111
import { valueToColor } from '../util';
@@ -160,7 +160,7 @@ import { CompactTable } from '@table-library/react-table-library/compact';
160160
import { useTheme } from '@table-library/react-table-library/theme';
161161
import { getTheme } from '@table-library/react-table-library/baseline';
162162
163-
import { DisableAnimationsContext } from '../../stories/loki.js';
163+
import { DisableAnimationsContext } from '../../stories/loki.jsx';
164164
import { DocumentationSee } from '../documentation';
165165
import { lotsOfNodes, randomFromInterval } from '../data';
166166
import { valueToColor } from '../util';

0 commit comments

Comments
 (0)