ecomlab-components-next 0.1.194 → 0.1.196

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