@egov3/system-design 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/jest.config.ts +41 -0
- package/jest.setup.ts +2 -0
- package/package.json +6 -3
- package/src/utils/ClassNamesFn.tsx +1 -1
- package/tsconfig.json +3 -20
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# egov3-design
|
package/jest.config.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import nextJest from 'next/jest';
|
|
2
|
+
|
|
3
|
+
const createJestConfig = nextJest({
|
|
4
|
+
dir: './'
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const customJestConfig = {
|
|
8
|
+
collectCoverage: true,
|
|
9
|
+
collectCoverageFrom: [
|
|
10
|
+
'src/**/*.tsx'
|
|
11
|
+
],
|
|
12
|
+
coveragePathIgnorePatterns: [
|
|
13
|
+
'<rootDir>/src/store',
|
|
14
|
+
'<rootDir>/src/stories',
|
|
15
|
+
],
|
|
16
|
+
testMatch: ['**/*.test.tsx'],
|
|
17
|
+
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
|
|
18
|
+
testEnvironment: 'jsdom',
|
|
19
|
+
moduleNameMapper: {
|
|
20
|
+
'@/(.*)': '<rootDir>/$1',
|
|
21
|
+
'~app/(.*)': '<rootDir>/src/app/$1',
|
|
22
|
+
'~constants/(.*)': '<rootDir>/src/constants/$1',
|
|
23
|
+
'~customHooks/(.*)': '<rootDir>/src/customHooks/$1',
|
|
24
|
+
'~customMock/(.*)': '<rootDir>/__tests__/customMock/$1',
|
|
25
|
+
'~components': '<rootDir>/src/components/index.tsx',
|
|
26
|
+
'~module': '<rootDir>/src/components/index.tsx',
|
|
27
|
+
'~svg': '<rootDir>/src/svg/index.tsx',
|
|
28
|
+
'~templates': '<rootDir>/src/templates/index.tsx',
|
|
29
|
+
'~utils/(.*)': '<rootDir>/src/utils/$1'
|
|
30
|
+
},
|
|
31
|
+
coverageThreshold: {
|
|
32
|
+
global: {
|
|
33
|
+
branches: 40,
|
|
34
|
+
functions: 40,
|
|
35
|
+
lines: 40,
|
|
36
|
+
statements: 40
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default createJestConfig(customJestConfig);
|
package/jest.setup.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egov3/system-design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.tsx",
|
|
6
6
|
"private": false,
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"next": "^15.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
+
"@babel/preset-env": "^7.25.9",
|
|
27
|
+
"@babel/preset-typescript": "^7.25.9",
|
|
26
28
|
"@chromatic-com/storybook": "^1.3.2",
|
|
27
29
|
"@storybook/addon-essentials": "^8.0.8",
|
|
28
30
|
"@storybook/addon-interactions": "^8.0.8",
|
|
@@ -34,9 +36,10 @@
|
|
|
34
36
|
"@types/node": "^20.11.19",
|
|
35
37
|
"@types/react": "^18.3.3",
|
|
36
38
|
"@types/react-dom": "^18.3.0",
|
|
39
|
+
"babel-jest": "^29.7.0",
|
|
37
40
|
"cross-env": "^7.0.3",
|
|
38
41
|
"husky": "^9.0.11",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
42
|
+
"sass": "^1.75.0",
|
|
43
|
+
"storybook": "^8.0.8"
|
|
41
44
|
}
|
|
42
45
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const ClassNamesFn = (...args: unknown[]) =>
|
|
2
|
-
args.filter((item) => !!item).join(
|
|
2
|
+
args.filter((item) => !!item).join(" ");
|
package/tsconfig.json
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"types": ["@types/react", "@types/react-dom"],
|
|
4
4
|
"baseUrl": "./",
|
|
5
|
-
"target": "
|
|
5
|
+
"target": "ESNext",
|
|
6
6
|
"lib": ["dom", "dom.iterable", "esnext"],
|
|
7
7
|
"allowJs": true,
|
|
8
8
|
"skipLibCheck": true,
|
|
9
9
|
"strict": true,
|
|
10
10
|
"noEmit": true,
|
|
11
11
|
"esModuleInterop": true,
|
|
12
|
-
"module": "
|
|
12
|
+
"module": "ESNext",
|
|
13
|
+
"allowSyntheticDefaultImports": true,
|
|
13
14
|
"moduleResolution": "node",
|
|
14
15
|
"resolveJsonModule": true,
|
|
15
16
|
"isolatedModules": true,
|
|
@@ -23,24 +24,6 @@
|
|
|
23
24
|
"paths": {
|
|
24
25
|
"~utils/*": ["./src/utils/*"],
|
|
25
26
|
"~baseComponents": ["./src/baseComponents/index"]
|
|
26
|
-
|
|
27
|
-
// "react": ["./node_modules/@types/react"],
|
|
28
|
-
// "~app/*": ["./src/app/*"],
|
|
29
|
-
// "~assets/*": ["./src/assets/*"],
|
|
30
|
-
// "~components": ["./src/components/index"],
|
|
31
|
-
// "~module": ["./src/module/index"],
|
|
32
|
-
// "~constants/*": ["./src/constants/*"],
|
|
33
|
-
// "~customHooks/*": ["./src/customHooks/*"],
|
|
34
|
-
// "~interfaces/*": ["./src/interfaces/*"],
|
|
35
|
-
// "~services/*": ["./src/services/*"],
|
|
36
|
-
// "~store": ["./src/store/index"],
|
|
37
|
-
// "~stories/*": ["./src/stories/*"],
|
|
38
|
-
// "~styles/*": ["./src/styles/*"],
|
|
39
|
-
// "~svg": ["./src/svg/index"],
|
|
40
|
-
// "~templates": ["./src/templates/index"],
|
|
41
|
-
// "~new/*": ["./src/new/*"],
|
|
42
|
-
// "~customMock/*": ["./__tests__/customMock/*"],
|
|
43
|
-
// "~responses/*": ["./__tests__/responses/*"]
|
|
44
27
|
}
|
|
45
28
|
},
|
|
46
29
|
"include": [
|