@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/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: #c10081; /* shade(10%) */
14
+ --dark-secondary: #C10081; /* shade(10%) */
11
15
  --danger:#CE030D;
12
- --dark-danger: #eb142a;
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
- setupTestFrameworkScriptFile: '<rootDir>/test/helpers/index.ts',
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
- // testEnvironment: "jest-environment-jsdom",
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.156",
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": "build-storybook -c .storybook -o ./static",
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 && yarn tslint --fix",
19
- "lint": "yarn eslint && yarn tslint",
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
- "tslint": "tslint -c tslint.json -p . -t stylish"
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.20.5",
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.2",
42
- "@babel/preset-env": "7.20.2",
43
- "@babel/preset-react": "7.18.6",
44
- "@babel/preset-typescript": "7.18.6",
45
- "@storybook/react": "5.3.21",
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/storybook__react": "4.0.2",
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": "4.19.1",
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": "2.6.1",
75
- "eslint-plugin-react": "7.10.0",
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": "23.6.0",
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.13.7",
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": "23.10.5",
92
- "tslint": "5.10.0",
93
- "tslint-config-prettier": "1.13.0",
94
- "tslint-eslint-rules": "5.3.1",
95
- "tslint-plugin-prettier": "1.3.0",
96
- "tslint-react": "3.6.0",
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"
@@ -1 +1,2 @@
1
1
  import './enzyme';
2
+ import '@testing-library/jest-dom';
package/tsconfig.json CHANGED
@@ -16,7 +16,8 @@
16
16
  "strict": true,
17
17
  "target": "es5",
18
18
  "pretty": true,
19
- "typeRoots": ["./node_modules/@types"]
19
+ "typeRoots": ["./node_modules/@types"],
20
+ "resolveJsonModule": true
20
21
  },
21
22
  "include": ["./src/**/*"],
22
23
  "exclude": ["**/*.test.tsx", "**/*.test.ts"]
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
- }