@mcf/lib-ui 2.0.156 → 2.0.169
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/.babelrc.json +18 -0
- package/README.md +2 -2
- package/dist/@types/Component/Button/Button.d.ts +15 -0
- package/dist/@types/Component/Button/ButtonConstants.d.ts +19 -0
- package/dist/@types/Component/CheckBox/CheckBox.d.ts +2 -1
- package/dist/@types/Component/ConfirmationBox/ConfirmationBox.d.ts +3 -2
- package/dist/@types/Component/Icon/Icon.d.ts +6 -0
- package/dist/@types/Component/ReactFileReader/ReactFileReader.d.ts +1 -1
- package/dist/@types/Component/TextArea/TextArea.d.ts +1 -1
- package/dist/@types/Component/TypeAhead/TypeAhead.d.ts +1 -0
- package/dist/@types/Component/Typography/Typography.d.ts +8 -0
- package/dist/@types/Component/Typography/TypographyConstants.d.ts +79 -0
- package/dist/@types/Component/utils.d.ts +2 -0
- package/dist/@types/Example/ReactFileReader/ReactFileReader.story.d.ts +11 -1
- package/dist/@types/Example/ReactFileReader/index.d.ts +2 -1
- package/dist/@types/stories/Button.stories.d.ts +12 -0
- package/dist/@types/stories/Typography.stories.d.ts +38 -0
- package/dist/index.js +2 -1
- package/dist/index.js.LICENSE.txt +1 -0
- package/dist/index.js.map +1 -1
- package/dist/main.css +14 -5
- package/jest.config.js +3 -2
- package/package.json +42 -29
- package/test/helpers/index.ts +1 -0
- package/tsconfig.json +2 -1
- package/tslint.json +0 -17
package/dist/main.css
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800');:root {
|
|
2
2
|
--primary: var(--purple);
|
|
3
3
|
--primary: var(--purple);
|
|
4
|
+
--dark-primary: #552895; /* shade(10%) */
|
|
5
|
+
--light-primary: #E3D7F4;
|
|
6
|
+
--lighter-primary: #EFEAF6; /* lightness(90%)) */
|
|
7
|
+
--generic: #1263CB;
|
|
8
|
+
--generic: var(--blue-blue, #1263CB);
|
|
9
|
+
--hover-generic: #0c4fa7;
|
|
10
|
+
--active-generic: #00449E;
|
|
4
11
|
--gray: gray;
|
|
5
12
|
--white: white;
|
|
6
|
-
--lighter-primary: #EFEAF6; /* lightness(90%)) */
|
|
7
|
-
--light-primary: #E3D7F4;
|
|
8
|
-
--dark-primary: #552895; /* shade(10%) */
|
|
9
13
|
--secondary: #D6008F;
|
|
10
|
-
--dark-secondary: #
|
|
14
|
+
--dark-secondary: #C10081; /* shade(10%) */
|
|
11
15
|
--danger:#CE030D;
|
|
12
|
-
--
|
|
16
|
+
--bright-danger: #EB142A;
|
|
17
|
+
--dark-danger: #B0030B;
|
|
18
|
+
--light-danger: #FFDFDF;
|
|
19
|
+
--light-danger: var(--red-washed-red, #FFDFDF);
|
|
20
|
+
--lighter-danger: #FFEFEF;
|
|
13
21
|
--green: #118159;
|
|
14
22
|
}:root {
|
|
15
23
|
--borderstyle: 1px solid var(--black-20);
|
|
@@ -25,6 +33,7 @@
|
|
|
25
33
|
--font-size-4: 1.25rem;
|
|
26
34
|
--font-size-5: 1rem;
|
|
27
35
|
--font-size-6: .875rem;
|
|
36
|
+
--font-size-8: 0.6rem;
|
|
28
37
|
--font-size-2-5: calc(((2.25rem + 1.5rem) / 2));
|
|
29
38
|
--font-size-2-5: calc(((var(--font-size-2) + var(--font-size-3)) / 2));
|
|
30
39
|
--font-size-3-5: calc(((1.25rem + 1.5rem) / 2));
|
package/jest.config.js
CHANGED
|
@@ -87,6 +87,7 @@ module.exports = {
|
|
|
87
87
|
|
|
88
88
|
// A preset that is used as a base for Jest's configuration
|
|
89
89
|
// preset: null,
|
|
90
|
+
preset: 'ts-jest',
|
|
90
91
|
|
|
91
92
|
// Run tests from one or more projects
|
|
92
93
|
// projects: null,
|
|
@@ -121,13 +122,13 @@ module.exports = {
|
|
|
121
122
|
// setupFiles: [],
|
|
122
123
|
|
|
123
124
|
// The path to a module that runs some code to configure or set up the testing framework before each test
|
|
124
|
-
|
|
125
|
+
setupFilesAfterEnv: ['<rootDir>/test/helpers/index.ts'],
|
|
125
126
|
|
|
126
127
|
// A list of paths to snapshot serializer modules Jest should use for snapshot testing
|
|
127
128
|
snapshotSerializers: ['enzyme-to-json/serializer'],
|
|
128
129
|
|
|
129
130
|
// The test environment that will be used for testing
|
|
130
|
-
|
|
131
|
+
testEnvironment: 'jest-environment-jsdom',
|
|
131
132
|
|
|
132
133
|
// Options that will be passed to the testEnvironment
|
|
133
134
|
// testEnvironmentOptions: {},
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcf/lib-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.169",
|
|
4
4
|
"description": "User Interface (UI) components for use in the MCF project.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/@types/Component/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build-bundle": "cross-env NODE_ENV=production webpack --mode production",
|
|
9
9
|
"build-css": "cross-env NODE_ENV=production postcss src/style/main.scss --dir dist/ --ext css",
|
|
10
|
-
"build-storybook": "
|
|
10
|
+
"build-storybook": "storybook build -o ./static",
|
|
11
11
|
"build-types": "tsc --module es6 --declaration --emitDeclarationOnly --outDir dist/@types",
|
|
12
12
|
"build-watch": "yarn build-bundle --watch & yarn build-types --watch",
|
|
13
13
|
"build": "yarn clean && yarn build-bundle && yarn build-types && yarn build-css",
|
|
@@ -15,15 +15,14 @@
|
|
|
15
15
|
"clean": "rm -rf dist",
|
|
16
16
|
"deploy": "node serve-static.js",
|
|
17
17
|
"eslint": "eslint .",
|
|
18
|
-
"lint-fix": "yarn eslint --fix
|
|
19
|
-
"lint": "yarn eslint
|
|
18
|
+
"lint-fix": "yarn eslint --fix",
|
|
19
|
+
"lint": "yarn eslint",
|
|
20
20
|
"nsp": "mkdir -p ./coverage/nsp && cross-env nsp check --output json > ./coverage/nsp/report.json",
|
|
21
21
|
"start": "yarn storybook",
|
|
22
|
-
"storybook": "start-storybook -p 9001 -c .storybook",
|
|
23
22
|
"test": "jest",
|
|
24
23
|
"test:watch": "jest --watch",
|
|
25
24
|
"tsc-check": "tsc --noEmit --skipLibCheck",
|
|
26
|
-
"
|
|
25
|
+
"storybook": "storybook dev -p 6006"
|
|
27
26
|
},
|
|
28
27
|
"repository": "gitlab:mycf.sg/lib-ui",
|
|
29
28
|
"author": "MCF",
|
|
@@ -36,23 +35,38 @@
|
|
|
36
35
|
"scrolling-element": "^1.0.2"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@babel/core": "7.
|
|
38
|
+
"@babel/core": "7.21.8",
|
|
40
39
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
41
|
-
"@babel/plugin-proposal-object-rest-spread": "7.20.
|
|
42
|
-
"@babel/preset-env": "7.
|
|
43
|
-
"@babel/preset-react": "7.
|
|
44
|
-
"@babel/preset-typescript": "7.
|
|
45
|
-
"@storybook/
|
|
40
|
+
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
|
|
41
|
+
"@babel/preset-env": "^7.23.3",
|
|
42
|
+
"@babel/preset-react": "^7.23.3",
|
|
43
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
44
|
+
"@storybook/addon-a11y": "^7.6.4",
|
|
45
|
+
"@storybook/addon-essentials": "^7.6.4",
|
|
46
|
+
"@storybook/addon-interactions": "^7.6.4",
|
|
47
|
+
"@storybook/addon-links": "^7.6.4",
|
|
48
|
+
"@storybook/addon-onboarding": "^1.0.9",
|
|
49
|
+
"@storybook/blocks": "^7.6.4",
|
|
50
|
+
"@storybook/react": "^7.6.4",
|
|
51
|
+
"@storybook/react-webpack5": "^7.6.4",
|
|
52
|
+
"@storybook/testing-library": "^0.2.2",
|
|
53
|
+
"@svgr/webpack": "^8.1.0",
|
|
54
|
+
"@testing-library/jest-dom": "^6.1.6",
|
|
55
|
+
"@testing-library/react": "12.1.5",
|
|
56
|
+
"@testing-library/user-event": "^14.5.2",
|
|
46
57
|
"@types/cheerio": "0.22.31",
|
|
47
58
|
"@types/enzyme": "3.10.12",
|
|
48
59
|
"@types/enzyme-adapter-react-16": "1.0.6",
|
|
49
60
|
"@types/jest": "23.3.14",
|
|
50
61
|
"@types/lodash": "4.14.185",
|
|
62
|
+
"@types/node": "^20.10.6",
|
|
51
63
|
"@types/prop-types": "15.7.5",
|
|
52
64
|
"@types/react": "16.14.21",
|
|
53
65
|
"@types/react-autosuggest": "9.3.14",
|
|
54
66
|
"@types/react-dom": "16.9.14",
|
|
55
|
-
"@types/
|
|
67
|
+
"@types/webpack-env": "^1.18.4",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
|
69
|
+
"@typescript-eslint/parser": "^6.11.0",
|
|
56
70
|
"babel-eslint": "8.2.5",
|
|
57
71
|
"babel-loader": "8.3.0",
|
|
58
72
|
"babel-plugin-lodash": "3.3.4",
|
|
@@ -62,43 +76,42 @@
|
|
|
62
76
|
"enzyme": "3.11.0",
|
|
63
77
|
"enzyme-adapter-react-16": "1.15.7",
|
|
64
78
|
"enzyme-to-json": "3.6.2",
|
|
65
|
-
"eslint": "
|
|
79
|
+
"eslint": "^8.53.0",
|
|
66
80
|
"eslint-config-google": "0.9.1",
|
|
67
81
|
"eslint-config-govtech-mcf": "1.2.0",
|
|
68
82
|
"eslint-config-prettier": "2.9.0",
|
|
69
83
|
"eslint-import-resolver-webpack": "0.10.1",
|
|
70
84
|
"eslint-plugin-babel": "5.1.0",
|
|
71
85
|
"eslint-plugin-import": "2.13.0",
|
|
86
|
+
"eslint-plugin-jest": "^27.6.0",
|
|
72
87
|
"eslint-plugin-mocha": "5.0.0",
|
|
73
88
|
"eslint-plugin-no-unsafe-innerhtml": "1.0.16",
|
|
74
|
-
"eslint-plugin-prettier": "
|
|
75
|
-
"eslint-plugin-react": "7.
|
|
89
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
90
|
+
"eslint-plugin-react": "^7.33.2",
|
|
91
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
76
92
|
"express": "4.18.2",
|
|
77
93
|
"identity-obj-proxy": "3.0.0",
|
|
78
|
-
"jest": "
|
|
94
|
+
"jest": "^29.7.0",
|
|
95
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
79
96
|
"nsp": "3.2.1",
|
|
80
97
|
"postcss-cli": "5.0.1",
|
|
81
98
|
"postcss-import": "11.1.0",
|
|
82
99
|
"postcss-inline-svg": "3.1.1",
|
|
83
100
|
"postcss-loader": "2.1.6",
|
|
84
101
|
"postcss-preset-env": "5.3.0",
|
|
85
|
-
"prettier": "1.
|
|
102
|
+
"prettier": "^3.1.0",
|
|
86
103
|
"prop-types": "15.8.1",
|
|
87
104
|
"react": "16.14.0",
|
|
88
105
|
"react-dom": "16.14.0",
|
|
106
|
+
"storybook": "^7.6.4",
|
|
89
107
|
"style-loader": "0.23.1",
|
|
90
108
|
"tachyons": "4.12.0",
|
|
91
|
-
"ts-jest": "
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"typescript": "3.9.10",
|
|
98
|
-
"url-loader": "1.1.2",
|
|
99
|
-
"webpack": "4.15.1",
|
|
100
|
-
"webpack-cli": "2.1.5",
|
|
101
|
-
"webpack-node-externals": "1.7.2"
|
|
109
|
+
"ts-jest": "^29.1.1",
|
|
110
|
+
"typescript": "^5.2.2",
|
|
111
|
+
"url-loader": "^4.1.1",
|
|
112
|
+
"webpack": "^5.89.0",
|
|
113
|
+
"webpack-cli": "^5.1.4",
|
|
114
|
+
"webpack-node-externals": "^3.0.0"
|
|
102
115
|
},
|
|
103
116
|
"peerDependencies": {
|
|
104
117
|
"react": "16.x"
|
package/test/helpers/index.ts
CHANGED
package/tsconfig.json
CHANGED
package/tslint.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"tslint:latest",
|
|
4
|
-
"tslint-react",
|
|
5
|
-
"tslint-eslint-rules",
|
|
6
|
-
"tslint-plugin-prettier",
|
|
7
|
-
"tslint-config-prettier"
|
|
8
|
-
],
|
|
9
|
-
"rules": {
|
|
10
|
-
"no-submodule-imports": false,
|
|
11
|
-
"jsx-no-lambda": false,
|
|
12
|
-
"jsx-boolean-value": false,
|
|
13
|
-
"prettier": true,
|
|
14
|
-
"no-var-requires": false,
|
|
15
|
-
"no-implicit-dependencies": false
|
|
16
|
-
}
|
|
17
|
-
}
|