componenteshospitais 3.0.7 → 3.0.9
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
|
@@ -289,17 +289,15 @@ var InputField = function (_a) {
|
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
var handleChange = function (e) {
|
|
292
|
-
var
|
|
293
|
-
var maskedValue = applyMask(maskType, value);
|
|
292
|
+
var maskedValue = applyMask(maskType, e.target.value);
|
|
294
293
|
if (onChange) {
|
|
295
|
-
|
|
296
|
-
onChange(event_1);
|
|
294
|
+
onChange(__assign(__assign({}, e), { target: __assign(__assign({}, e.target), { value: maskedValue }) }));
|
|
297
295
|
}
|
|
298
296
|
};
|
|
299
297
|
return (React.createElement(React.Fragment, null,
|
|
300
298
|
label && React.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
301
299
|
React.createElement("div", { className: styles$5.inputWrapper },
|
|
302
|
-
React.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: name, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: {
|
|
300
|
+
React.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: name, value: value, placeholder: placeholder, onChange: onChange !== null && onChange !== void 0 ? onChange : handleChange, className: styles$5.inputPadrao, style: {
|
|
303
301
|
width: largura ? "".concat(largura) : '',
|
|
304
302
|
backgroundColor: disabled ? '#e5e5e5' : (corFundo ? corFundo : ''),
|
|
305
303
|
borderRadius: borderRadius ? "".concat(borderRadius, "px") : '',
|