componenteshospitais 1.8.1 → 1.8.3

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/cjs/index.js CHANGED
@@ -1500,10 +1500,14 @@ var InputField = function (_a) {
1500
1500
  };
1501
1501
  var appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
1502
1502
  var handleChange = function (e) {
1503
+ var inputValue = e.target.value;
1504
+ if (maskType === 'phone' || maskType === 'telefone') {
1505
+ inputValue = inputValue.replace(/^\(0/, '(');
1506
+ }
1503
1507
  if (type === 'number' && e.target.value.length > appliedMaxLength) {
1504
1508
  e.target.value = e.target.value.slice(0, appliedMaxLength);
1505
1509
  }
1506
- onChange(e);
1510
+ onChange(__assign(__assign({}, e), { target: __assign(__assign({}, e.target), { value: inputValue }) }));
1507
1511
  };
1508
1512
  var mask = maskType === 'cpf' ? '999.999.999-99' :
1509
1513
  maskType === 'phone' ? '(99) 99999-9999' :