componenteshospitais 2.0.7 → 2.0.8

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.
@@ -17,6 +17,8 @@ interface InputFieldProps {
17
17
  onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
18
18
  corFundo?: string;
19
19
  corLabel?: string;
20
+ borderRadius?: number;
21
+ colorIcon?: string;
20
22
  }
21
23
  declare const InputField: React.FC<InputFieldProps>;
22
24
  export default InputField;
@@ -18,6 +18,7 @@ interface SelectComponentProps {
18
18
  corFundo?: string;
19
19
  corLabel?: string;
20
20
  empresa?: '1' | '2' | '3' | '4' | '5';
21
+ borderRadius?: number;
21
22
  }
22
23
  declare const SelectField: React.FC<SelectComponentProps>;
23
24
  export default SelectField;
@@ -14,6 +14,7 @@ interface TextAreaFieldProps {
14
14
  onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
15
15
  corFundo?: string;
16
16
  corLabel?: string;
17
+ borderRadius?: number;
17
18
  }
18
19
  declare const TextAreaField: React.FC<TextAreaFieldProps>;
19
20
  export default TextAreaField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteshospitais",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -14,8 +14,7 @@ const Button: React.FC<ButtonProps> = ({ empresa, type = 'submit', onClick, text
14
14
  const empresaClass = styles[`empresa${empresa}`];
15
15
 
16
16
  return (
17
- <div className={`${empresaClass}`}
18
- style={{ borderRadius: borderRadius ? `${borderRadius}px` : '' }}>
17
+ <div className={`${empresaClass}`}>
19
18
  {type === 'submit' ? (
20
19
  <input type="submit" className={styles.inputSubmit} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }} value={texto}/>
21
20
  ) : (
@@ -21,6 +21,8 @@ interface InputFieldProps {
21
21
  onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void; // Adicionando onBlur como opcional
22
22
  corFundo?: string;
23
23
  corLabel?: string;
24
+ borderRadius?: number;
25
+ colorIcon?: string;
24
26
  }
25
27
 
26
28
  const InputField: React.FC<InputFieldProps> = ({
@@ -40,7 +42,9 @@ const InputField: React.FC<InputFieldProps> = ({
40
42
  onKeyPress,
41
43
  onBlur, // Usando onBlur nas props
42
44
  corFundo,
43
- corLabel
45
+ corLabel,
46
+ borderRadius,
47
+ colorIcon
44
48
  }) => {
45
49
  const [isPasswordVisible, setIsPasswordVisible] = useState(false);
46
50
 
@@ -85,7 +89,7 @@ const InputField: React.FC<InputFieldProps> = ({
85
89
  name={id}
86
90
  placeholder={placeholder}
87
91
  className={styles.inputPadrao}
88
- style={{ width: largura ? `${largura}` : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')) }}
92
+ style={{ width: largura ? `${largura}` : '', backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')), borderRadius: (borderRadius ? `${borderRadius}px` : '') }}
89
93
  readOnly={readonly}
90
94
  required={required}
91
95
  checked={checked}
@@ -115,7 +119,7 @@ const InputField: React.FC<InputFieldProps> = ({
115
119
  )}
116
120
  {type === 'password' && (
117
121
  <div className={styles.passwordToggleIcon} onClick={togglePasswordVisibility}>
118
- {isPasswordVisible ? <FaEyeSlash /> : <FaEye />}
122
+ {isPasswordVisible ? <FaEyeSlash style={{color: colorIcon ? colorIcon : ''}} /> : <FaEye style={{color: colorIcon ? colorIcon : ''}}/>}
119
123
  </div>
120
124
  )}
121
125
  </div>
@@ -21,6 +21,7 @@ interface SelectComponentProps {
21
21
  corFundo?: string;
22
22
  corLabel?: string;
23
23
  empresa?: '1' | '2' | '3' | '4' | '5';
24
+ borderRadius?: number;
24
25
  }
25
26
 
26
27
  // Função para mapear empresa com a cor da seta
@@ -35,7 +36,7 @@ const getArrowColorByEmpresa = (empresa?: string) => {
35
36
  }
36
37
  };
37
38
 
38
- const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value, onChange, label, optionDefault, largura, disabled, multiple, required, corFundo, corLabel, empresa }) => {
39
+ const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value, onChange, label, optionDefault, largura, disabled, multiple, required, corFundo, corLabel, empresa, borderRadius }) => {
39
40
 
40
41
  const handleSelectChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
41
42
  if (multiple) {
@@ -70,6 +71,7 @@ const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value,
70
71
  backgroundPosition: 'right 0.75rem center',
71
72
  backgroundSize: '1rem',
72
73
  paddingRight: '2.5rem',
74
+ borderRadius: (borderRadius ? `${borderRadius}px` : '')
73
75
  }}
74
76
  disabled={disabled}
75
77
  multiple={multiple}
@@ -16,6 +16,7 @@ interface TextAreaFieldProps {
16
16
  onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
17
17
  corFundo?: string;
18
18
  corLabel?: string;
19
+ borderRadius?: number;
19
20
  }
20
21
 
21
22
  const TextAreaField: React.FC<TextAreaFieldProps> = ({
@@ -32,7 +33,8 @@ const TextAreaField: React.FC<TextAreaFieldProps> = ({
32
33
  onKeyPress,
33
34
  onBlur,
34
35
  corFundo,
35
- corLabel
36
+ corLabel,
37
+ borderRadius
36
38
  }) => {
37
39
  const appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
38
40
 
@@ -51,7 +53,8 @@ const TextAreaField: React.FC<TextAreaFieldProps> = ({
51
53
  width: largura ? `${largura}` : '',
52
54
  backgroundColor: disabled ? '#e5e5e5' : (corFundo ? corFundo : ''),
53
55
  resize: 'none',
54
- height: '6rem'
56
+ height: '6rem',
57
+ borderRadius: (borderRadius ? `${borderRadius}px` : '')
55
58
  }}
56
59
  readOnly={readonly}
57
60
  disabled={disabled}