componenteshospitais 2.0.4 → 2.0.6

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/esm/index.js CHANGED
@@ -1502,7 +1502,7 @@ var InputField = function (_a) {
1502
1502
  if (type === 'number' && e.target.value.length > appliedMaxLength) {
1503
1503
  e.target.value = e.target.value.slice(0, appliedMaxLength);
1504
1504
  }
1505
- if (onChange) {
1505
+ if (onChange) { // Verificando se onChange foi passado antes de chamá-lo
1506
1506
  onChange(e);
1507
1507
  }
1508
1508
  };
@@ -1515,9 +1515,7 @@ var InputField = function (_a) {
1515
1515
  return (React$2.createElement(React$2.Fragment, null,
1516
1516
  label && React$2.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
1517
1517
  React$2.createElement("div", { className: styles$5.inputWrapper },
1518
- maskType && type !== 'textarea' ? ( // Evitar o uso de máscara com textarea
1519
- React$2.createElement(reactInputMask, { mask: mask, value: value, onChange: handleChange, disabled: disabled }, function (inputProps) { return (React$2.createElement("input", __assign({}, inputProps, { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, placeholder: placeholder, className: styles$5.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')) }, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress, onBlur: onBlur }))); })) : type === 'textarea' ? ( // Condição para renderizar textarea
1520
- React$2.createElement("textarea", { id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')), resize: 'none', height: '6rem' }, readOnly: readonly, disabled: disabled, required: required, onKeyPress: onKeyPress, onBlur: onBlur })) : (React$2.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')) }, readOnly: readonly, disabled: disabled, required: required, checked: checked, maxLength: type === 'text' ? appliedMaxLength : undefined, onKeyPress: onKeyPress, onBlur: onBlur })),
1518
+ maskType ? (React$2.createElement(reactInputMask, { mask: mask, value: value, onChange: handleChange, disabled: disabled }, function (inputProps) { return (React$2.createElement("input", __assign({}, inputProps, { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, placeholder: placeholder, className: styles$5.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')) }, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress, onBlur: onBlur }))); })) : (React$2.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')) }, readOnly: readonly, disabled: disabled, required: required, checked: checked, maxLength: type === 'text' ? appliedMaxLength : undefined, onKeyPress: onKeyPress, onBlur: onBlur })),
1521
1519
  type === 'password' && (React$2.createElement("div", { className: styles$5.passwordToggleIcon, onClick: togglePasswordVisibility }, isPasswordVisible ? React$2.createElement(FaEyeSlash, null) : React$2.createElement(FaEye, null))))));
1522
1520
  };
1523
1521
 
@@ -17623,5 +17621,19 @@ var TableStandard = function (_a) {
17623
17621
  React$2.createElement("div", { className: "".concat(empresaClass, " ").concat(styles.pagination) }, pageNumbers.map(function (number) { return (React$2.createElement("button", { key: number, onClick: function () { return setCurrentPage(number); }, className: "".concat(styles.pageButton, " ").concat(currentPage === number ? styles.activePage : '') }, number)); }))));
17624
17622
  };
17625
17623
 
17626
- export { Busca, Button, Card, CardImage, CheckboxGroup, InputField, MenuPage, SelectField, TableStandard, TextPage, TituloPagina };
17624
+ var TextAreaField = function (_a) {
17625
+ var id = _a.id, placeholder = _a.placeholder, onChange = _a.onChange, value = _a.value, label = _a.label, largura = _a.largura, readonly = _a.readonly, disabled = _a.disabled, required = _a.required, maxLength = _a.maxLength, onKeyPress = _a.onKeyPress, onBlur = _a.onBlur, corFundo = _a.corFundo, corLabel = _a.corLabel;
17626
+ var appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
17627
+ return (React$2.createElement(React$2.Fragment, null,
17628
+ label && React$2.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
17629
+ React$2.createElement("div", { className: styles$5.inputWrapper },
17630
+ React$2.createElement("textarea", { id: id, name: id, value: value, placeholder: placeholder, onChange: onChange, className: styles$5.inputPadrao, style: {
17631
+ width: largura ? "".concat(largura) : '',
17632
+ backgroundColor: disabled ? '#e5e5e5' : (corFundo ? corFundo : ''),
17633
+ resize: 'none',
17634
+ height: '6rem'
17635
+ }, readOnly: readonly, disabled: disabled, required: required, maxLength: appliedMaxLength, onKeyPress: onKeyPress, onBlur: onBlur }))));
17636
+ };
17637
+
17638
+ export { Busca, Button, Card, CardImage, CheckboxGroup, InputField, MenuPage, SelectField, TableStandard, TextAreaField as TextArea, TextPage, TituloPagina };
17627
17639
  //# sourceMappingURL=index.js.map