ecomlab-components-next 0.1.193 → 0.1.195

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.
@@ -143,8 +143,9 @@ var ModalBitrixFormV2 = function ModalBitrixFormV2(_ref) {
143
143
  isValid = false;
144
144
  }
145
145
  } else if (inputType === 'tel') {
146
- var regex = /^\+7 \(\d{3}\) \d{3}-\d{2}-\d{2}$/;
147
- if (!regex.test(value)) {
146
+ // const regex = /^\+7 \(\d{3}\) \d{3}-\d{2}-\d{2}$/;
147
+ // if (!regex.test(value)) {
148
+ if (value.length < 1) {
148
149
  error[id] = 'Неверный телефон';
149
150
  isValid = false;
150
151
  }
@@ -339,7 +340,8 @@ var ModalBitrixFormV2 = function ModalBitrixFormV2(_ref) {
339
340
  textErr: err === null || err === void 0 ? void 0 : err[id],
340
341
  onBlur: function onBlur(value) {
341
342
  return handleBlur(id, inputType, value);
342
- }
343
+ },
344
+ mask: inputType === 'tel' ? '+{7} (000) 000-00-00' : ''
343
345
  });
344
346
  }
345
347
  })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecomlab-components-next",
3
- "version": "0.1.193",
3
+ "version": "0.1.195",
4
4
  "description": "A set of common and reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "files": [