componenteshospitais 1.7.3 → 1.7.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
|
@@ -117,7 +117,7 @@ var CardImage = function (_a) {
|
|
|
117
117
|
React$2.createElement("span", { className: styles$6.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React$2.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$6.botaoCert), title: href, style: { width: '100%', height: '100%' } }, content)) : (React$2.createElement("div", { className: "".concat(styles$6.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
var css_248z$5 = ".input-module_inputSubmit__21-Pj{align-self:center;border:none;border-radius:20px;color:#fff;cursor:pointer;font-size:15px;padding:10px;width:10rem}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_searchIcon__miuBI{color:#888;font-size:1.2rem;left:
|
|
120
|
+
var css_248z$5 = ".input-module_inputSubmit__21-Pj{align-self:center;border:none;border-radius:20px;color:#fff;cursor:pointer;font-size:15px;padding:10px;width:10rem}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_searchIcon__miuBI{color:#888;font-size:1.2rem;left:17px;position:absolute}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj{background-color:var(--blue)}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj:hover{background-color:var(--red)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj{background-color:var(--green)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj:hover{background-color:var(--lightblue)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj{background-color:var(--red)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj:hover{background-color:var(--blue)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj{background-color:var(--cartaoGreen)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj:hover{background-color:var(--cartaoBlue)}";
|
|
121
121
|
var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputPadrao":"input-module_inputPadrao__jypjY","searchIcon":"input-module_searchIcon__miuBI","empresa1":"input-module_empresa1__bxBov","empresa3":"input-module_empresa3__RU89A","empresa4":"input-module_empresa4__rWmWH","empresa5":"input-module_empresa5__rJ8DJ"};
|
|
122
122
|
styleInject(css_248z$5);
|
|
123
123
|
|
|
@@ -1554,7 +1554,7 @@ var styles$2 = {"selectPadrao":"select-module_selectPadrao__poGiL"};
|
|
|
1554
1554
|
styleInject(css_248z$2);
|
|
1555
1555
|
|
|
1556
1556
|
var SelectField = function (_a) {
|
|
1557
|
-
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;
|
|
1557
|
+
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;
|
|
1558
1558
|
var handleSelectChange = function (e) {
|
|
1559
1559
|
if (multiple) {
|
|
1560
1560
|
var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
|
|
@@ -1565,8 +1565,8 @@ var SelectField = function (_a) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
};
|
|
1567
1567
|
return (React$2.createElement(React$2.Fragment, null,
|
|
1568
|
-
label && React$2.createElement("label", { htmlFor: id }, label),
|
|
1569
|
-
React$2.createElement("select", { id: id, name: name, className: styles$2.selectPadrao, value: value, onChange: handleSelectChange, style: { width: largura ? "".concat(largura) : '' }, disabled: disabled, multiple: multiple, required: required },
|
|
1568
|
+
label && React$2.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
1569
|
+
React$2.createElement("select", { id: id, name: name, className: styles$2.selectPadrao, value: value, onChange: handleSelectChange, style: { width: largura ? "".concat(largura) : '', backgroundColor: corFundo ? corFundo : '' }, disabled: disabled, multiple: multiple, required: required },
|
|
1570
1570
|
optionDefault && !multiple && (React$2.createElement("option", { value: "" }, "Selecione...")),
|
|
1571
1571
|
options.map(function (option) { return (React$2.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
1572
1572
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -115,7 +115,7 @@ var CardImage = function (_a) {
|
|
|
115
115
|
React$2.createElement("span", { className: styles$6.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React$2.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$6.botaoCert), title: href, style: { width: '100%', height: '100%' } }, content)) : (React$2.createElement("div", { className: "".concat(styles$6.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
|
|
116
116
|
};
|
|
117
117
|
|
|
118
|
-
var css_248z$5 = ".input-module_inputSubmit__21-Pj{align-self:center;border:none;border-radius:20px;color:#fff;cursor:pointer;font-size:15px;padding:10px;width:10rem}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_searchIcon__miuBI{color:#888;font-size:1.2rem;left:
|
|
118
|
+
var css_248z$5 = ".input-module_inputSubmit__21-Pj{align-self:center;border:none;border-radius:20px;color:#fff;cursor:pointer;font-size:15px;padding:10px;width:10rem}.input-module_inputPadrao__jypjY{border:1px solid #ccc;border-radius:.5rem;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.input-module_inputPadrao__jypjY:focus{outline:none}.input-module_searchIcon__miuBI{color:#888;font-size:1.2rem;left:17px;position:absolute}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj{background-color:var(--blue)}.input-module_empresa1__bxBov .input-module_inputSubmit__21-Pj:hover{background-color:var(--red)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj{background-color:var(--green)}.input-module_empresa3__RU89A .input-module_inputSubmit__21-Pj:hover{background-color:var(--lightblue)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj{background-color:var(--red)}.input-module_empresa4__rWmWH .input-module_inputSubmit__21-Pj:hover{background-color:var(--blue)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj{background-color:var(--cartaoGreen)}.input-module_empresa5__rJ8DJ .input-module_inputSubmit__21-Pj:hover{background-color:var(--cartaoBlue)}";
|
|
119
119
|
var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputPadrao":"input-module_inputPadrao__jypjY","searchIcon":"input-module_searchIcon__miuBI","empresa1":"input-module_empresa1__bxBov","empresa3":"input-module_empresa3__RU89A","empresa4":"input-module_empresa4__rWmWH","empresa5":"input-module_empresa5__rJ8DJ"};
|
|
120
120
|
styleInject(css_248z$5);
|
|
121
121
|
|
|
@@ -1552,7 +1552,7 @@ var styles$2 = {"selectPadrao":"select-module_selectPadrao__poGiL"};
|
|
|
1552
1552
|
styleInject(css_248z$2);
|
|
1553
1553
|
|
|
1554
1554
|
var SelectField = function (_a) {
|
|
1555
|
-
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;
|
|
1555
|
+
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;
|
|
1556
1556
|
var handleSelectChange = function (e) {
|
|
1557
1557
|
if (multiple) {
|
|
1558
1558
|
var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
|
|
@@ -1563,8 +1563,8 @@ var SelectField = function (_a) {
|
|
|
1563
1563
|
}
|
|
1564
1564
|
};
|
|
1565
1565
|
return (React$2.createElement(React$2.Fragment, null,
|
|
1566
|
-
label && React$2.createElement("label", { htmlFor: id }, label),
|
|
1567
|
-
React$2.createElement("select", { id: id, name: name, className: styles$2.selectPadrao, value: value, onChange: handleSelectChange, style: { width: largura ? "".concat(largura) : '' }, disabled: disabled, multiple: multiple, required: required },
|
|
1566
|
+
label && React$2.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
1567
|
+
React$2.createElement("select", { id: id, name: name, className: styles$2.selectPadrao, value: value, onChange: handleSelectChange, style: { width: largura ? "".concat(largura) : '', backgroundColor: corFundo ? corFundo : '' }, disabled: disabled, multiple: multiple, required: required },
|
|
1568
1568
|
optionDefault && !multiple && (React$2.createElement("option", { value: "" }, "Selecione...")),
|
|
1569
1569
|
options.map(function (option) { return (React$2.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
1570
1570
|
};
|
package/package.json
CHANGED
|
@@ -18,9 +18,11 @@ interface SelectComponentProps {
|
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
multiple?: boolean;
|
|
20
20
|
required?: boolean;
|
|
21
|
+
corFundo?: string;
|
|
22
|
+
corLabel?: string;
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value, onChange, label, optionDefault, largura, disabled, multiple, required }) => {
|
|
25
|
+
const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value, onChange, label, optionDefault, largura, disabled, multiple, required, corFundo, corLabel }) => {
|
|
24
26
|
|
|
25
27
|
const handleSelectChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
|
26
28
|
if (multiple) {
|
|
@@ -33,14 +35,14 @@ const SelectField: React.FC<SelectComponentProps> = ({ id, name, options, value,
|
|
|
33
35
|
|
|
34
36
|
return (
|
|
35
37
|
<>
|
|
36
|
-
{label && <label htmlFor={id}>{label}</label>}
|
|
38
|
+
{label && <label htmlFor={id} style={{color: corLabel ? corLabel: ''}}>{label}</label>}
|
|
37
39
|
<select
|
|
38
40
|
id={id}
|
|
39
41
|
name={name}
|
|
40
42
|
className={styles.selectPadrao}
|
|
41
43
|
value={value}
|
|
42
44
|
onChange={handleSelectChange}
|
|
43
|
-
style={{ width: largura ? `${largura}` : '' }}
|
|
45
|
+
style={{ width: largura ? `${largura}` : '', backgroundColor: corFundo ? corFundo : ''}}
|
|
44
46
|
disabled={disabled}
|
|
45
47
|
multiple={multiple}
|
|
46
48
|
required={required}
|