componenteshospitais 3.2.2 → 3.2.4
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
|
@@ -125,7 +125,7 @@ var Button = function (_a) {
|
|
|
125
125
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
126
126
|
return (React.createElement("div", { className: "".concat(empresaClass) },
|
|
127
127
|
React.createElement("div", { className: "".concat(styles$5.inputWrapper) },
|
|
128
|
-
icon && (React.createElement("
|
|
128
|
+
icon && (React.createElement("span", { className: "".concat(icon, " ").concat(styles$5.iconButton, " ").concat(styles$5.iconInput) })),
|
|
129
129
|
type === 'submit' ? (React.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, value: texto, disabled: disabled })) : (React.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, dangerouslySetInnerHTML: { __html: texto }, disabled: disabled })))));
|
|
130
130
|
};
|
|
131
131
|
|
|
@@ -249,7 +249,7 @@ var InputField = function (_a) {
|
|
|
249
249
|
label && React.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
250
250
|
React.createElement("div", { className: "".concat(styles$5.inputWrapper, " ").concat(empresa ? empresaClass : '') },
|
|
251
251
|
maskType ? (React.createElement(React.Fragment, null,
|
|
252
|
-
icon && (React.createElement("
|
|
252
|
+
icon && (React.createElement("span", { className: "".concat(icon, " ").concat(styles$5.iconInput) })),
|
|
253
253
|
React.createElement(MaskedInput, { mask: mask, value: value, onChange: handleChange, disabled: disabled, id: id, name: id, placeholder: placeholder, className: styles$5.inputPadrao, style: {
|
|
254
254
|
width: largura ? "".concat(largura) : '',
|
|
255
255
|
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
@@ -257,7 +257,7 @@ var InputField = function (_a) {
|
|
|
257
257
|
border: (border ? border : ''),
|
|
258
258
|
paddingLeft: (icon ? '30px' : '')
|
|
259
259
|
}, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress }))) : (React.createElement(React.Fragment, null,
|
|
260
|
-
icon && (React.createElement("
|
|
260
|
+
icon && (React.createElement("span", { className: "".concat(icon, " ").concat(styles$5.iconInput) })),
|
|
261
261
|
React.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: {
|
|
262
262
|
width: largura ? "".concat(largura) : '',
|
|
263
263
|
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
@@ -316,7 +316,7 @@ var getArrowColorByEmpresa = function (empresa) {
|
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
318
|
var SelectField = function (_a) {
|
|
319
|
-
var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura, disabled = _a.disabled, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow;
|
|
319
|
+
var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura, disabled = _a.disabled, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault;
|
|
320
320
|
var handleSelectChange = function (e) {
|
|
321
321
|
if (multiple) {
|
|
322
322
|
var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
|
|
@@ -340,7 +340,7 @@ var SelectField = function (_a) {
|
|
|
340
340
|
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
341
341
|
border: (border ? border : '')
|
|
342
342
|
}, disabled: disabled, multiple: multiple, required: required },
|
|
343
|
-
optionDefault && !multiple && (React.createElement("option", { value: "" },
|
|
343
|
+
optionDefault && !multiple && (React.createElement("option", { value: "" }, txtOptionDefault ? txtOptionDefault : 'Selecione...')),
|
|
344
344
|
options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
345
345
|
};
|
|
346
346
|
|
package/dist/esm/index.js
CHANGED
|
@@ -123,7 +123,7 @@ var Button = function (_a) {
|
|
|
123
123
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
124
124
|
return (React.createElement("div", { className: "".concat(empresaClass) },
|
|
125
125
|
React.createElement("div", { className: "".concat(styles$5.inputWrapper) },
|
|
126
|
-
icon && (React.createElement("
|
|
126
|
+
icon && (React.createElement("span", { className: "".concat(icon, " ").concat(styles$5.iconButton, " ").concat(styles$5.iconInput) })),
|
|
127
127
|
type === 'submit' ? (React.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, value: texto, disabled: disabled })) : (React.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, dangerouslySetInnerHTML: { __html: texto }, disabled: disabled })))));
|
|
128
128
|
};
|
|
129
129
|
|
|
@@ -247,7 +247,7 @@ var InputField = function (_a) {
|
|
|
247
247
|
label && React.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
248
248
|
React.createElement("div", { className: "".concat(styles$5.inputWrapper, " ").concat(empresa ? empresaClass : '') },
|
|
249
249
|
maskType ? (React.createElement(React.Fragment, null,
|
|
250
|
-
icon && (React.createElement("
|
|
250
|
+
icon && (React.createElement("span", { className: "".concat(icon, " ").concat(styles$5.iconInput) })),
|
|
251
251
|
React.createElement(MaskedInput, { mask: mask, value: value, onChange: handleChange, disabled: disabled, id: id, name: id, placeholder: placeholder, className: styles$5.inputPadrao, style: {
|
|
252
252
|
width: largura ? "".concat(largura) : '',
|
|
253
253
|
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
@@ -255,7 +255,7 @@ var InputField = function (_a) {
|
|
|
255
255
|
border: (border ? border : ''),
|
|
256
256
|
paddingLeft: (icon ? '30px' : '')
|
|
257
257
|
}, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress }))) : (React.createElement(React.Fragment, null,
|
|
258
|
-
icon && (React.createElement("
|
|
258
|
+
icon && (React.createElement("span", { className: "".concat(icon, " ").concat(styles$5.iconInput) })),
|
|
259
259
|
React.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: {
|
|
260
260
|
width: largura ? "".concat(largura) : '',
|
|
261
261
|
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
@@ -314,7 +314,7 @@ var getArrowColorByEmpresa = function (empresa) {
|
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
316
|
var SelectField = function (_a) {
|
|
317
|
-
var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura, disabled = _a.disabled, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow;
|
|
317
|
+
var id = _a.id, name = _a.name, options = _a.options, value = _a.value, onChange = _a.onChange, label = _a.label, optionDefault = _a.optionDefault, largura = _a.largura, disabled = _a.disabled, multiple = _a.multiple, required = _a.required, corFundo = _a.corFundo, corLabel = _a.corLabel, empresa = _a.empresa, borderRadius = _a.borderRadius, border = _a.border, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault;
|
|
318
318
|
var handleSelectChange = function (e) {
|
|
319
319
|
if (multiple) {
|
|
320
320
|
var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
|
|
@@ -338,7 +338,7 @@ var SelectField = function (_a) {
|
|
|
338
338
|
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
339
339
|
border: (border ? border : '')
|
|
340
340
|
}, disabled: disabled, multiple: multiple, required: required },
|
|
341
|
-
optionDefault && !multiple && (React.createElement("option", { value: "" },
|
|
341
|
+
optionDefault && !multiple && (React.createElement("option", { value: "" }, txtOptionDefault ? txtOptionDefault : 'Selecione...')),
|
|
342
342
|
options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
343
343
|
};
|
|
344
344
|
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ const Button: React.FC<ButtonProps> = ({ empresa, type = 'submit', onClick, text
|
|
|
18
18
|
return (
|
|
19
19
|
<div className={`${empresaClass}`}>
|
|
20
20
|
<div className={`${styles.inputWrapper}`}>
|
|
21
|
-
{icon && (<
|
|
21
|
+
{icon && (<span className={`${icon} ${styles.iconButton} ${styles.iconInput}`}></span>)}
|
|
22
22
|
{type === 'submit' ? (
|
|
23
23
|
<input type="submit" className={styles.inputSubmit} style={{width: largura ? `${largura}` : '', borderRadius: borderRadius ? `${borderRadius}px` : '' }} value={texto} disabled={disabled}/>
|
|
24
24
|
) : (
|
|
@@ -90,7 +90,7 @@ const InputField: React.FC<InputFieldProps> = ({
|
|
|
90
90
|
<div className={`${styles.inputWrapper} ${empresa ? empresaClass : ''}`}>
|
|
91
91
|
{maskType ? (
|
|
92
92
|
<>
|
|
93
|
-
{icon && (<
|
|
93
|
+
{icon && (<span className={`${icon} ${styles.iconInput}`}></span>)}
|
|
94
94
|
<MaskedInput
|
|
95
95
|
mask={mask}
|
|
96
96
|
value={value}
|
|
@@ -115,7 +115,7 @@ const InputField: React.FC<InputFieldProps> = ({
|
|
|
115
115
|
</>
|
|
116
116
|
) : (
|
|
117
117
|
<>
|
|
118
|
-
{icon && (<
|
|
118
|
+
{icon && (<span className={`${icon} ${styles.iconInput}`}></span>)}
|
|
119
119
|
<input
|
|
120
120
|
type={type === 'password' && isPasswordVisible ? 'text' : type}
|
|
121
121
|
id={id}
|
|
@@ -25,6 +25,7 @@ export interface SelectComponentProps {
|
|
|
25
25
|
border?: string;
|
|
26
26
|
size?: number;
|
|
27
27
|
arrow?: boolean;
|
|
28
|
+
txtOptionDefault?: string;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
// Função para mapear empresa com a cor da seta
|
|
@@ -58,6 +59,7 @@ const SelectField: React.FC<SelectComponentProps> = ({
|
|
|
58
59
|
border,
|
|
59
60
|
size,
|
|
60
61
|
arrow,
|
|
62
|
+
txtOptionDefault
|
|
61
63
|
}) => {
|
|
62
64
|
|
|
63
65
|
const handleSelectChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
|
@@ -102,7 +104,7 @@ const SelectField: React.FC<SelectComponentProps> = ({
|
|
|
102
104
|
required={required}
|
|
103
105
|
>
|
|
104
106
|
{optionDefault && !multiple && (
|
|
105
|
-
<option value="">Selecione
|
|
107
|
+
<option value="">{txtOptionDefault ? txtOptionDefault : 'Selecione...'}</option>
|
|
106
108
|
)}
|
|
107
109
|
{options.map(option => (
|
|
108
110
|
<option key={option.value} value={option.value}>
|