@itcase/forms 1.0.52 → 1.0.54

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.
@@ -53,8 +53,9 @@ const emailValidation = (value, context) => {
53
53
  if (!value) {
54
54
  return true;
55
55
  }
56
- // eslint-disable-next-line
57
- const regexp = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/;
56
+
57
+ // from https://www.regular-expressions.info/email.html
58
+ const regexp = /^[a-za-яёЁ0-9_-]+(?:\.[a-za-яёЁ0-9_-]+)*@(?:[a-za-яёЁ0-9](?:[a-za-яёЁ0-9-]*[a-za-яёЁ0-9])?\.)+[a-za-яёЁ0-9]+$/;
58
59
  return regexp.test(String(value).toLowerCase());
59
60
  };
60
61
  const addRequiredFieldsParamToSchema = schema => {
@@ -1927,7 +1928,7 @@ const focusOnError = (formElementsList, errors) => {
1927
1928
  }
1928
1929
  }
1929
1930
 
1930
- // the field is covered by the header because header is "sticky",
1931
+ // The field is covered by the header because header is "sticky",
1931
1932
  // that's we scroll manually so that the field falls into the center of the visible area
1932
1933
  if (errorFieldElement) {
1933
1934
  errorFieldElement.scrollIntoView({
@@ -43,8 +43,9 @@ const emailValidation = (value, context) => {
43
43
  if (!value) {
44
44
  return true;
45
45
  }
46
- // eslint-disable-next-line
47
- const regexp = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/;
46
+
47
+ // from https://www.regular-expressions.info/email.html
48
+ const regexp = /^[a-za-яёЁ0-9_-]+(?:\.[a-za-яёЁ0-9_-]+)*@(?:[a-za-яёЁ0-9](?:[a-za-яёЁ0-9-]*[a-za-яёЁ0-9])?\.)+[a-za-яёЁ0-9]+$/;
48
49
  return regexp.test(String(value).toLowerCase());
49
50
  };
50
51
  const addRequiredFieldsParamToSchema = schema => {
@@ -1917,7 +1918,7 @@ const focusOnError = (formElementsList, errors) => {
1917
1918
  }
1918
1919
  }
1919
1920
 
1920
- // the field is covered by the header because header is "sticky",
1921
+ // The field is covered by the header because header is "sticky",
1921
1922
  // that's we scroll manually so that the field falls into the center of the visible area
1922
1923
  if (errorFieldElement) {
1923
1924
  errorFieldElement.scrollIntoView({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/forms",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "description": "Forms fields, inputs, etc.",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -30,17 +30,17 @@
30
30
  "registry": "https://registry.npmjs.org/"
31
31
  },
32
32
  "dependencies": {
33
- "@itcase/common": "^1.1.11",
34
- "@itcase/ui": "^1.0.94",
35
- "axios": "^1.6.3",
36
- "clsx": "^2.0.0",
33
+ "@itcase/common": "^1.1.12",
34
+ "@itcase/ui": "^1.0.97",
35
+ "axios": "^1.6.7",
36
+ "clsx": "^2.1.0",
37
37
  "date-fns": "2.0.0-alpha.7",
38
38
  "final-form": "^4.20.10",
39
39
  "final-form-focus": "^1.1.2",
40
- "libphonenumber-js": "^1.10.52",
40
+ "libphonenumber-js": "^1.10.55",
41
41
  "lodash": "^4.17.21",
42
42
  "luxon": "^3.4.4",
43
- "postcss": "^8.4.32",
43
+ "postcss": "^8.4.35",
44
44
  "prop-types": "^15.8.1",
45
45
  "react": "^18.2.0",
46
46
  "react-date-range": "^1.4.0",
@@ -50,12 +50,12 @@
50
50
  "react-select": "^5.8.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/core": "^7.23.6",
54
- "@babel/eslint-parser": "^7.23.3",
55
- "@babel/preset-env": "^7.23.6",
53
+ "@babel/core": "^7.23.9",
54
+ "@babel/eslint-parser": "^7.23.10",
55
+ "@babel/preset-env": "^7.23.9",
56
56
  "@babel/preset-react": "^7.23.3",
57
- "@commitlint/cli": "^18.4.3",
58
- "@commitlint/config-conventional": "^18.4.3",
57
+ "@commitlint/cli": "^18.6.1",
58
+ "@commitlint/config-conventional": "^18.6.2",
59
59
  "@rollup/plugin-babel": "^6.0.4",
60
60
  "@rollup/plugin-commonjs": "^25.0.7",
61
61
  "@rollup/plugin-json": "^6.1.0",
@@ -68,25 +68,25 @@
68
68
  "eslint-config-prettier": "^9.1.0",
69
69
  "eslint-config-standard": "^17.1.0",
70
70
  "eslint-plugin-import": "^2.29.1",
71
- "eslint-plugin-n": "^16.5.0",
72
- "eslint-plugin-prettier": "^5.1.2",
71
+ "eslint-plugin-n": "^16.6.2",
72
+ "eslint-plugin-prettier": "^5.1.3",
73
73
  "eslint-plugin-promise": "^6.1.1",
74
74
  "eslint-plugin-react": "^7.33.2",
75
75
  "eslint-plugin-standard": "^5.0.0",
76
- "husky": "^8.0.3",
77
- "lint-staged": "^15.2.0",
78
- "npm": "^10.2.5",
76
+ "husky": "^9.0.11",
77
+ "lint-staged": "^15.2.2",
78
+ "npm": "^10.4.0",
79
79
  "postcss-aspect-ratio-polyfill": "^2.0.0",
80
80
  "postcss-cli": "^11.0.0",
81
81
  "postcss-combine-duplicated-selectors": "^10.0.3",
82
- "postcss-dark-theme-class": "^1.1.0",
82
+ "postcss-dark-theme-class": "^1.2.0",
83
83
  "postcss-discard-duplicates": "^6.0.1",
84
84
  "postcss-each": "^1.1.0",
85
85
  "postcss-easings": "^4.0.0",
86
86
  "postcss-extend-rule": "^4.0.0",
87
87
  "postcss-flexbugs-fixes": "^5.0.2",
88
88
  "postcss-hexrgba": "^2.1.0",
89
- "postcss-import": "^15.1.0",
89
+ "postcss-import": "^16.0.0",
90
90
  "postcss-import-ext-glob": "^2.1.1",
91
91
  "postcss-mixins": "^9.0.4",
92
92
  "postcss-nested": "^6.0.1",
@@ -94,17 +94,17 @@
94
94
  "postcss-normalize": "^10.0.1",
95
95
  "postcss-prepend-imports": "^1.0.1",
96
96
  "postcss-preset-env": "^9.3.0",
97
- "postcss-pxtorem": "^6.0.0",
97
+ "postcss-pxtorem": "^6.1.0",
98
98
  "postcss-responsive-type": "github:ITCase/postcss-responsive-type",
99
99
  "postcss-sort-media-queries": "^5.2.0",
100
- "prettier": "^3.1.1",
101
- "react-datepicker": "^4.25.0",
102
- "rollup": "^4.9.1",
100
+ "prettier": "^3.2.5",
101
+ "react-datepicker": "^6.1.0",
102
+ "rollup": "^4.10.0",
103
103
  "rollup-plugin-peer-deps-external": "^2.2.4",
104
- "semantic-release": "^22.0.12",
105
- "stylelint": "^16.1.0",
104
+ "semantic-release": "^23.0.2",
105
+ "stylelint": "^16.2.1",
106
106
  "stylelint-config-standard": "^36.0.0",
107
- "stylelint-no-unsupported-browser-features": "^7.0.0",
107
+ "stylelint-no-unsupported-browser-features": "^8.0.1",
108
108
  "stylelint-order": "^6.0.4"
109
109
  }
110
110
  }