componenteshospitais 2.0.1 → 2.0.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
@@ -1519,7 +1519,7 @@ var InputField = function (_a) {
1519
1519
  React$2.createElement("div", { className: styles$5.inputWrapper },
1520
1520
  maskType && type !== 'textarea' ? ( // Evitar o uso de máscara com textarea
1521
1521
  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
1522
- 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 : '')) }, readOnly: readonly, disabled: disabled, required: required, maxLength: appliedMaxLength, 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 })),
1522
+ 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 })),
1523
1523
  type === 'password' && (React$2.createElement("div", { className: styles$5.passwordToggleIcon, onClick: togglePasswordVisibility }, isPasswordVisible ? React$2.createElement(FaEyeSlash, null) : React$2.createElement(FaEye, null))))));
1524
1524
  };
1525
1525
 
package/dist/esm/index.js CHANGED
@@ -1517,7 +1517,7 @@ var InputField = function (_a) {
1517
1517
  React$2.createElement("div", { className: styles$5.inputWrapper },
1518
1518
  maskType && type !== 'textarea' ? ( // Evitar o uso de máscara com textarea
1519
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 : '')) }, readOnly: readonly, disabled: disabled, required: required, maxLength: appliedMaxLength, 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 })),
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 })),
1521
1521
  type === 'password' && (React$2.createElement("div", { className: styles$5.passwordToggleIcon, onClick: togglePasswordVisibility }, isPasswordVisible ? React$2.createElement(FaEyeSlash, null) : React$2.createElement(FaEye, null))))));
1522
1522
  };
1523
1523
 
@@ -5,7 +5,7 @@ interface InputFieldProps {
5
5
  id: string;
6
6
  placeholder: string;
7
7
  value: string;
8
- onChange?: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
8
+ onChange?: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
9
9
  largura?: string;
10
10
  readonly?: boolean;
11
11
  disabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -9,7 +9,7 @@ interface InputFieldProps {
9
9
  id: string;
10
10
  placeholder: string;
11
11
  value: string;
12
- onChange?: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void; // Aceitando também TextAreaElement
12
+ onChange?: (e: ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void; // Aceitando também TextAreaElement
13
13
  largura?: string;
14
14
  readonly?: boolean;
15
15
  disabled?: boolean;
@@ -102,11 +102,10 @@ const InputField: React.FC<InputFieldProps> = ({
102
102
  placeholder={placeholder}
103
103
  onChange={handleChange}
104
104
  className={styles.inputPadrao}
105
- style={{ width: largura ? `${largura}` : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')) }}
105
+ style={{ width: largura ? `${largura}` : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')), resize: 'none', height: '6rem'}}
106
106
  readOnly={readonly}
107
107
  disabled={disabled}
108
108
  required={required}
109
- maxLength={appliedMaxLength}
110
109
  onKeyPress={onKeyPress}
111
110
  onBlur={onBlur} // Aplicando onBlur
112
111
  />