Skip to content

Commit f92b299

Browse files
authored
Adding silent mode (#13)
1 parent 9c2b569 commit f92b299

18 files changed

+2153
-817
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
coverage/
2+
__tests__

.eslintrc.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
},
6+
extends: [
7+
"plugin:react/recommended",
8+
"standard",
9+
"plugin:react/jsx-runtime",
10+
"prettier",
11+
],
12+
parser: "@typescript-eslint/parser",
13+
parserOptions: {
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
17+
ecmaVersion: "latest",
18+
sourceType: "module",
19+
},
20+
plugins: ["react", "@typescript-eslint"],
21+
rules: {},
22+
};

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ The example shows a simple wizard with two pages.
9494
| Name | Description | Default |
9595
| :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
9696
| `bodyHeight` | Sets the height of the form body. | 500 |
97-
| `strict` | Validation rules are applied to all inputs that have been marked for validation or that are required.<br>The component prevents the user from moving on until the current step's errors have been fixed. | false |
98-
| `theme` | [Theme](#🎨-theme) object for customized styling | |
9997
| `highlightFieldsOnValidation` | Highlights the fields when the validation fails or succeeds | false |
100-
| `pages` | Collection of [Page](#Page) object | |
10198
| `onFinish` | Callback executed on final step | |
99+
| `pages` | Collection of [Page](#Page) object | |
100+
| `strict` | Validation rules are applied to all inputs that have been marked for validation or that are required.<br>The component prevents the user from moving on until the current step's errors have been fixed. | false |
101+
| `theme` | [Theme](#🎨-theme) object for customized styling | |
102+
| `silent` | Validation errors are flagged subtly. Validation messages are displayed only when the mouse is hovered over the field. | |
102103
| `RTL` | Enables right to left mode | false |
103104

104105
## Page

package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"format": "npx prettier --write ./src/components/*.{ts,tsx}",
2020
"test": "npx vitest --config ./vitest.config.ts --coverage",
2121
"lint": "npx eslint ./src/components/**/*.{ts,tsx}",
22+
"fix-lint": "npx eslint ./src/components/**/*.{ts,tsx} --fix",
2223
"build:dev": "webpack --mode=development",
2324
"build:prod": "webpack --mode=production --node-env=production",
2425
"watch": "webpack --watch",
@@ -90,57 +91,57 @@
9091
},
9192
"main": "dist/react-wizardry.js",
9293
"devDependencies": {
93-
"@babel/core": "^7.18.2",
94-
"@babel/plugin-transform-runtime": "^7.18.2",
94+
"@babel/core": "^7.18.5",
95+
"@babel/plugin-transform-runtime": "^7.18.5",
9596
"@babel/preset-env": "^7.18.2",
9697
"@babel/preset-react": "^7.17.12",
9798
"@babel/runtime": "^7.18.3",
9899
"@testing-library/jest-dom": "^5.16.4",
99100
"@testing-library/react": "^13.3.0",
100-
"@types/react": "^18.0.12",
101+
"@types/react": "^18.0.14",
101102
"@types/react-dom": "^18.0.5",
102-
"@typescript-eslint/eslint-plugin": "^5.27.1",
103-
"@typescript-eslint/parser": "^5.27.1",
103+
"@typescript-eslint/eslint-plugin": "^5.29.0",
104+
"@typescript-eslint/parser": "^5.29.0",
104105
"@vitejs/plugin-react": "^1.3.2",
105-
"@webpack-cli/generators": "^2.4.2",
106+
"@webpack-cli/generators": "^2.5.0",
106107
"autoprefixer": "^10.4.7",
107108
"babel-loader": "^8.2.5",
108109
"c8": "^7.11.3",
109110
"copy-webpack-plugin": "^11.0.0",
110111
"css-loader": "^6.7.1",
111112
"esbuild-loader": "^2.19.0",
112-
"eslint": "^8.17.0",
113+
"eslint": "^8.0.1",
113114
"eslint-config-prettier": "^8.5.0",
114115
"eslint-config-standard": "^17.0.0",
115-
"eslint-plugin-import": "^2.22.1",
116-
"eslint-plugin-n": "^15.2.2",
116+
"eslint-plugin-import": "^2.25.2",
117+
"eslint-plugin-n": "^15.0.0",
117118
"eslint-plugin-node": "^11.1.0",
118119
"eslint-plugin-promise": "^6.0.0",
119120
"eslint-plugin-react": "^7.30.0",
120121
"eslint-plugin-security": "^1.5.0",
121122
"husky": "^8.0.1",
122-
"jsdom": "^19.0.0",
123-
"mini-css-extract-plugin": "^2.6.0",
123+
"jsdom": "^20.0.0",
124+
"mini-css-extract-plugin": "^2.6.1",
124125
"postcss": "^8.4.14",
125126
"postcss-loader": "^7.0.0",
126127
"postcss-preset-env": "^7.7.1",
127-
"prettier": "^2.6.2",
128+
"prettier": "^2.7.1",
128129
"pretty-quick": "^3.1.3",
129-
"react": "^18.1.0",
130-
"react-dom": "^18.1.0",
130+
"react": "^18.2.0",
131+
"react-dom": "^18.2.0",
131132
"sass": "^1.52.3",
132133
"sass-loader": "^13.0.0",
133134
"style-loader": "^3.3.1",
134135
"stylelint": "^14.9.1",
135136
"stylelint-config-standard": "^26.0.0",
136137
"terser-webpack-plugin": "^5.3.3",
137138
"ts-loader": "^9.3.0",
138-
"typescript": "^4.7.3",
139+
"typescript": "^4.7.4",
139140
"vite": "^2.9.12",
140-
"vitest": "^0.14.2",
141+
"vitest": "^0.15.2",
141142
"webpack": "^5.73.0",
142143
"webpack-bundle-analyzer": "^4.5.0",
143-
"webpack-cli": "^4.9.2",
144+
"webpack-cli": "^4.10.0",
144145
"webpack-node-externals": "^3.0.0"
145146
}
146147
}

0 commit comments

Comments
 (0)