Skip to content

Commit fd2a034

Browse files
authored
Flex table (#490)
* Start refactoring table. * Fix virtual rows. * Fix header base. * Last finished on table. * Use intersection observer for horizontal scrolling. * v3.0.0 * Fix test. * v3.0.1 * v3.0.2 * v3.0.3 * v3.0.4 * Remove ts. * v3.0.5 * v3.0.6 * v3.0.7 * v3.0.8 * v3.0.9 * v3.0.10
1 parent 693cc9b commit fd2a034

File tree

250 files changed

+5657
-7284
lines changed

Some content is hidden

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

250 files changed

+5657
-7284
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ node_modules
88
public
99
lib
1010
coverage/
11+
dist
12+
coverage

.prettierrc

-9
This file was deleted.

.prettierrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
trailingComma: "es5",
3+
semi: false,
4+
tabWidth: 2,
5+
printWidth: 100,
6+
useTabs: false,
7+
singleQuote: false,
8+
arrowParens: "avoid",
9+
}

.storybook/main.js

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ module.exports = {
44
"@storybook/addon-essentials",
55
"@storybook/addon-controls",
66
"@storybook/addon-interactions",
7-
"@storybook/addon-jest",
8-
"@storybook/addon-knobs",
97
"@storybook/addon-links",
108
"@storybook/addon-storysource",
119
],

.storybook/preview.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
import React from "react"
22
import useLocalStorage from "react-use/lib/useLocalStorage"
33
import centered from "@storybook/addon-centered/react"
4-
import { withKnobs } from "@storybook/addon-knobs"
5-
import { withTests } from "@storybook/addon-jest"
64

7-
import { DefaultTheme } from "src/theme/default"
8-
import { DarkTheme } from "src/theme/dark"
9-
import { GlobalStyles } from "src/global-styles"
5+
import { DefaultTheme } from "@/theme/default"
6+
import { DarkTheme } from "@/theme/dark"
7+
import { GlobalStyles } from "@/global-styles"
108

119
import { ThemeProvider } from "styled-components"
1210
import Flex from "../src/components/templates/flex"
1311

1412
import { Toggle } from "../src/components/toggle"
15-
import { Text } from "src/components/typography"
13+
import { Text } from "@/components/typography"
1614

1715
const results = require("../.jest-test-results.json")
1816

1917
export const decorators = [
2018
centered,
21-
withKnobs,
22-
withTests({ results }),
2319
story => {
2420
const [isDarkTheme, setIsDarkTheme] = useLocalStorage("is_dark_theme")
2521
const handleChange = e => {

.travis.yml

-15
This file was deleted.

Dockerfile

-12
This file was deleted.

LICENSE

+674
Large diffs are not rendered by default.

babel.config.js

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
1+
const isES6 = process.env.BABEL_ENV === "es6"
2+
const isTest = process.env.NODE_ENV === "test"
3+
14
module.exports = {
5+
presets: [
6+
["@babel/env", { loose: true, modules: isES6 ? false : "commonjs" }],
7+
"@babel/preset-react",
8+
],
9+
plugins: [
10+
["styled-components", { ssr: !isTest, displayName: !isTest }],
11+
"@babel/plugin-transform-spread",
12+
"@babel/plugin-proposal-object-rest-spread",
13+
[
14+
"module-resolver",
15+
{
16+
alias: {
17+
"@": "./src",
18+
},
19+
},
20+
],
21+
].filter(Boolean),
222
env: {
323
test: {
4-
presets: ["@babel/preset-env", "@babel/preset-react"],
5-
plugins: ["@babel/transform-runtime", "babel-plugin-styled-components"],
24+
presets: ["@babel/env"],
25+
plugins: ["@babel/transform-runtime"],
626
},
727
},
828
}

copy-assets.js

-67
This file was deleted.

custom.d.ts

-12
This file was deleted.

jest/config.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,19 @@
1-
const { pathsToModuleNameMapper } = require("ts-jest")
2-
3-
const paths = {
4-
"@/*": ["./*"],
5-
}
6-
71
module.exports = {
82
rootDir: "../",
93
moduleDirectories: ["<rootDir>/node_modules", "./node_modules", "<rootDir>/jest"],
104
moduleNameMapper: {
11-
"^src/(.*)$": "<rootDir>/src/$1",
5+
"^@/(.*)$": "<rootDir>/$1",
126
"^.+\\.(css|less|scss)$": "identity-obj-proxy",
13-
...pathsToModuleNameMapper(paths, { prefix: "<rootDir>/" }),
14-
"\\.svg": "<rootDir>/src/__mocks__/filemock.tsx",
7+
"\\.svg": "<rootDir>/src/__mocks__/filemock.js",
158
},
169
testEnvironment: "jsdom",
1710
testEnvironmentOptions: {
18-
url: "https://www.netdata.cloud"
11+
url: "https://www.netdata.cloud",
1912
},
20-
testRegex: ".*\\.test\\.(tsx?|js)$",
13+
testRegex: ".*\\.test\\.js$",
2114
setupFiles: ["<rootDir>/jest/setup.js"],
2215
setupFilesAfterEnv: ["<rootDir>/jest/setupForEach.js"],
2316
transform: {
24-
"^.+\\.tsx?$": "ts-jest",
2517
"^.+\\.js$": "babel-jest",
2618
},
2719
verbose: true,

jest/testUtilities/renderHookWithProviders.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { renderHook } from "@testing-library/react-hooks"
33
import { ThemeProvider } from "styled-components"
4-
import { DefaultTheme } from "src/theme/default"
4+
import { DefaultTheme } from "@/theme/default"
55

66
export default (hook, { theme = DefaultTheme, ...rest } = {}) =>
77
renderHook(hook, {

jest/testUtilities/renderWithProviders.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { render } from "@testing-library/react"
33
import { ThemeProvider } from "styled-components"
4-
import { DefaultTheme } from "src/theme/default"
4+
import { DefaultTheme } from "@/theme/default"
55

66
export default (Component, { theme = DefaultTheme, ...rest } = {}) =>
77
render(Component, {

jsconfig.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"exclude": ["node_modules", "./fixtures/*"],
3+
"compilerOptions": {
4+
"baseUrl": ".",
5+
"paths": {
6+
"@/*": ["./src/*"]
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)