componenteshospitais 1.4.3 → 1.4.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 +93 -59
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +93 -60
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/CheckboxGroup.d.ts +15 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/CheckboxGroup.tsx +51 -0
- package/src/index.tsx +2 -1
- package/src/styles/checkboxGroup.module.css +25 -0
package/dist/cjs/index.js
CHANGED
|
@@ -30,29 +30,29 @@ function styleInject(css, ref) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
var css_248z$
|
|
34
|
-
styleInject(css_248z$
|
|
33
|
+
var css_248z$9 = ":root{--blue:#1e2057;--blueHover:#242881;--red:#eb313d;--redHover:#9e0f18;--gray:#5d5d5d;--greyHover:#e4e2e2;--lightGray:#ededed;--green:#00984b;--greenHover:#14a857;--lightblue:#006cb7;--lightblueHover:#187bb2}html{font-family:Amelia,sans-serif;margin:0;padding:0;width:100%}";
|
|
34
|
+
styleInject(css_248z$9);
|
|
35
35
|
|
|
36
|
-
var css_248z$
|
|
37
|
-
var styles$
|
|
38
|
-
styleInject(css_248z$
|
|
36
|
+
var css_248z$8 = ".tituloPagina-module_header__GtitI{align-items:center;border-radius:8px 8px 0 0;color:#fff;display:flex;font-size:23px;justify-content:space-between;padding:10px 20px;position:relative}.tituloPagina-module_title__pb7Iz{font-size:24px;font-weight:700;margin-left:5rem}.tituloPagina-module_backButton__QlSV1{align-items:center;background-color:#fff;border:none;border-radius:20px;cursor:pointer;display:flex;font-size:14px;font-weight:700;height:auto;margin:0 5rem 0 0;padding:10px 50px}.tituloPagina-module_backButton__QlSV1:hover{background-color:var(--greyHover)}@media (max-width:768px){.tituloPagina-module_title__pb7Iz{font-size:16px;margin-left:1rem}}@media (max-width:500px){.tituloPagina-module_backButton__QlSV1{margin-right:0;padding:10px 30px}}.tituloPagina-module_empresa1__sInrz .tituloPagina-module_header__GtitI{background-color:var(--blue)}.tituloPagina-module_empresa1__sInrz .tituloPagina-module_backButton__QlSV1{color:var(--blue)}.tituloPagina-module_empresa3__sn4GV .tituloPagina-module_header__GtitI{background-color:var(--green)}.tituloPagina-module_empresa3__sn4GV .tituloPagina-module_backButton__QlSV1{color:var(--green)}.tituloPagina-module_empresa4__grhaT .tituloPagina-module_header__GtitI{background-color:var(--red)}.tituloPagina-module_empresa4__grhaT .tituloPagina-module_backButton__QlSV1{background-color:var(--blue)}";
|
|
37
|
+
var styles$8 = {"header":"tituloPagina-module_header__GtitI","title":"tituloPagina-module_title__pb7Iz","backButton":"tituloPagina-module_backButton__QlSV1","empresa1":"tituloPagina-module_empresa1__sInrz","empresa3":"tituloPagina-module_empresa3__sn4GV","empresa4":"tituloPagina-module_empresa4__grhaT"};
|
|
38
|
+
styleInject(css_248z$8);
|
|
39
39
|
|
|
40
40
|
var TituloPagina = function (_a) {
|
|
41
41
|
var titulo = _a.titulo, onClick = _a.onClick, empresa = _a.empresa;
|
|
42
|
-
var empresaClass = styles$
|
|
42
|
+
var empresaClass = styles$8["empresa".concat(empresa)];
|
|
43
43
|
return (React$2.createElement("div", { className: "".concat(empresaClass) },
|
|
44
|
-
React$2.createElement("div", { className: styles$
|
|
45
|
-
React$2.createElement("p", { className: styles$
|
|
46
|
-
React$2.createElement("button", { onClick: onClick, className: styles$
|
|
44
|
+
React$2.createElement("div", { className: styles$8.header },
|
|
45
|
+
React$2.createElement("p", { className: styles$8.title }, titulo),
|
|
46
|
+
React$2.createElement("button", { onClick: onClick, className: styles$8.backButton }, "Voltar"))));
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
var css_248z$
|
|
50
|
-
var styles$
|
|
51
|
-
styleInject(css_248z$
|
|
49
|
+
var css_248z$7 = ".card-module_icone__8F-jV{height:55px;width:55px}.card-module_item__YYEzi{align-items:center;border-radius:10px;color:#fff;display:flex;font-size:18px;margin-bottom:1rem;padding:15px}.card-module_imgLateral__zCZz5{height:55px;margin-left:auto;margin-right:10px;width:55px}.card-module_empresa1__Jl5OB .card-module_item__YYEzi{background-color:var(--blue)}.card-module_empresa1__Jl5OB .card-module_item__YYEzi:hover{background-color:var(--red)}.card-module_empresa3__TCJpW .card-module_item__YYEzi{background-color:var(--green)}.card-module_empresa3__TCJpW .card-module_item__YYEzi:hover{background-color:var(--lightblue)}.card-module_empresa4__zoSLq .card-module_item__YYEzi{background-color:var(--red)}.card-module_empresa4__zoSLq .card-module_item__YYEzi:hover{background-color:var(--blue)}";
|
|
50
|
+
var styles$7 = {"icone":"card-module_icone__8F-jV","item":"card-module_item__YYEzi","imgLateral":"card-module_imgLateral__zCZz5","empresa1":"card-module_empresa1__Jl5OB","empresa3":"card-module_empresa3__TCJpW","empresa4":"card-module_empresa4__zoSLq"};
|
|
51
|
+
styleInject(css_248z$7);
|
|
52
52
|
|
|
53
53
|
var Card = function (_a) {
|
|
54
54
|
var img = _a.img, imgLateral = _a.imgLateral, text = _a.text, link = _a.link, empresa = _a.empresa, largura = _a.largura, funcao = _a.funcao, parametro = _a.parametro, externo = _a.externo;
|
|
55
|
-
var empresaClass = styles$
|
|
55
|
+
var empresaClass = styles$7["empresa".concat(empresa)];
|
|
56
56
|
var handleActionClick = function () {
|
|
57
57
|
if (funcao && parametro) {
|
|
58
58
|
funcao(parametro);
|
|
@@ -69,20 +69,20 @@ var Card = function (_a) {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
return (React$2.createElement("div", { className: "".concat(empresaClass), onClick: link ? handleClick : handleActionClick, style: { cursor: link || (funcao && parametro) ? 'pointer' : 'default' } },
|
|
72
|
-
React$2.createElement("div", { className: "".concat(styles$
|
|
73
|
-
img && (React$2.createElement("img", { src: img, alt: text, className: styles$
|
|
74
|
-
React$2.createElement("span", { className: styles$
|
|
75
|
-
imgLateral && (React$2.createElement("img", { src: imgLateral, alt: "Right", className: styles$
|
|
72
|
+
React$2.createElement("div", { className: "".concat(styles$7.item, " empresa").concat(empresa), style: { width: largura ? "".concat(largura) : '' } },
|
|
73
|
+
img && (React$2.createElement("img", { src: img, alt: text, className: styles$7.icone })),
|
|
74
|
+
React$2.createElement("span", { className: styles$7.texto, dangerouslySetInnerHTML: { __html: text } }),
|
|
75
|
+
imgLateral && (React$2.createElement("img", { src: imgLateral, alt: "Right", className: styles$7.imgLateral })))));
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
-
var css_248z$
|
|
79
|
-
var styles$
|
|
80
|
-
styleInject(css_248z$
|
|
78
|
+
var css_248z$6 = ".cardImage-module_botaoCert__Rs0fg{align-items:center;border-color:transparent;border-radius:1rem;box-sizing:border-box;color:#fff;display:flex;flex-direction:column;justify-content:center;padding:.8rem;text-decoration:none}.cardImage-module_iconeOna__WQil5{height:150px;margin-bottom:10px}.cardImage-module_cardText__NfgFE{bottom:.5rem;font-size:18px;overflow:hidden;position:relative;text-align:center}.cardImage-module_empresa1__SnbEU{background-color:var(--blue)}.cardImage-module_empresa1__SnbEU:hover{background-color:var(--red)}.cardImage-module_empresa3__ItFp0{background-color:var(--green)}.cardImage-module_empresa3__ItFp0:hover{background-color:var(--lightblue)}.cardImage-module_empresa4__L6K5N{background-color:var(--red)}.cardImage-module_empresa4__L6K5N:hover{background-color:var(--blue)}";
|
|
79
|
+
var styles$6 = {"botaoCert":"cardImage-module_botaoCert__Rs0fg","iconeOna":"cardImage-module_iconeOna__WQil5","cardText":"cardImage-module_cardText__NfgFE","empresa1":"cardImage-module_empresa1__SnbEU","empresa3":"cardImage-module_empresa3__ItFp0","empresa4":"cardImage-module_empresa4__L6K5N"};
|
|
80
|
+
styleInject(css_248z$6);
|
|
81
81
|
|
|
82
82
|
var CardImage = function (_a) {
|
|
83
83
|
var img = _a.img, href = _a.href, texto = _a.texto, empresa = _a.empresa, largura = _a.largura, altura = _a.altura, externo = _a.externo, funcao = _a.funcao, parametro = _a.parametro, fileInput = _a.fileInput, alturaImage = _a.alturaImage, larguraImage = _a.larguraImage, onFileSelect = _a.onFileSelect, accept = _a.accept;
|
|
84
84
|
var _b = React$2.useState(null), fileName = _b[0], setFileName = _b[1];
|
|
85
|
-
var empresaClass = styles$
|
|
85
|
+
var empresaClass = styles$6["empresa".concat(empresa)];
|
|
86
86
|
var handleActionClick = function () {
|
|
87
87
|
if (funcao && parametro) {
|
|
88
88
|
funcao(parametro);
|
|
@@ -101,9 +101,9 @@ var CardImage = function (_a) {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
var content = (React$2.createElement(React$2.Fragment, null,
|
|
104
|
-
React$2.createElement("img", { src: img, alt: img, className: styles$
|
|
105
|
-
texto && (React$2.createElement("span", { className: styles$
|
|
106
|
-
return (React$2.createElement("div", { className: "".concat(empresaClass), style: { width: largura ? "".concat(largura) : '250px', height: altura ? "".concat(altura) : '300px', borderRadius: '1rem' } }, fileInput ? (React$2.createElement("label", { className: "".concat(styles$
|
|
104
|
+
React$2.createElement("img", { src: img, alt: img, className: styles$6.iconeOna, style: { width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined } }),
|
|
105
|
+
texto && (React$2.createElement("span", { className: styles$6.cardText, dangerouslySetInnerHTML: { __html: texto } }))));
|
|
106
|
+
return (React$2.createElement("div", { className: "".concat(empresaClass), style: { width: largura ? "".concat(largura) : '250px', height: altura ? "".concat(altura) : '300px', borderRadius: '1rem' } }, fileInput ? (React$2.createElement("label", { className: "".concat(styles$6.botaoCert), style: { position: 'relative', cursor: 'pointer', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%', height: '100%' } },
|
|
107
107
|
React$2.createElement("input", { type: "file", onChange: handleFileChange, style: {
|
|
108
108
|
position: 'absolute',
|
|
109
109
|
top: 0,
|
|
@@ -114,17 +114,17 @@ var CardImage = function (_a) {
|
|
|
114
114
|
cursor: 'pointer'
|
|
115
115
|
}, accept: accept }),
|
|
116
116
|
content,
|
|
117
|
-
React$2.createElement("span", { className: styles$
|
|
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$
|
|
121
|
-
var styles$
|
|
122
|
-
styleInject(css_248z$
|
|
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_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)}";
|
|
121
|
+
var styles$5 = {"inputSubmit":"input-module_inputSubmit__21-Pj","inputPadrao":"input-module_inputPadrao__jypjY","empresa1":"input-module_empresa1__bxBov","empresa3":"input-module_empresa3__RU89A","empresa4":"input-module_empresa4__rWmWH"};
|
|
122
|
+
styleInject(css_248z$5);
|
|
123
123
|
|
|
124
124
|
var Button = function (_a) {
|
|
125
125
|
var empresa = _a.empresa, _b = _a.type, type = _b === void 0 ? 'submit' : _b, onClick = _a.onClick, texto = _a.texto, largura = _a.largura;
|
|
126
|
-
var empresaClass = styles$
|
|
127
|
-
return (React$2.createElement("div", { className: "".concat(empresaClass) }, type === 'submit' ? (React$2.createElement("input", { type: "submit", className: styles$
|
|
126
|
+
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
127
|
+
return (React$2.createElement("div", { className: "".concat(empresaClass) }, type === 'submit' ? (React$2.createElement("input", { type: "submit", className: styles$5.inputSubmit, style: { width: largura ? "".concat(largura) : '' } })) : (React$2.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '' } }, texto))));
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
/******************************************************************************
|
|
@@ -155,6 +155,16 @@ var __assign = function() {
|
|
|
155
155
|
return __assign.apply(this, arguments);
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
+
function __spreadArray(to, from, pack) {
|
|
159
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
160
|
+
if (ar || !(i in from)) {
|
|
161
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
162
|
+
ar[i] = from[i];
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
166
|
+
}
|
|
167
|
+
|
|
158
168
|
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
159
169
|
var e = new Error(message);
|
|
160
170
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
@@ -1427,44 +1437,44 @@ var InputField = function (_a) {
|
|
|
1427
1437
|
maskType === 'time' ? '99:99' : '';
|
|
1428
1438
|
return (React$2.createElement(React$2.Fragment, null,
|
|
1429
1439
|
label && React$2.createElement("label", { htmlFor: id }, label),
|
|
1430
|
-
maskType ? (React$2.createElement(reactInputMask, { mask: mask, value: value, onChange: handleChange, disabled: disabled }, function (inputProps) { return (React$2.createElement("input", __assign({}, inputProps, { type: type, id: id, name: id, placeholder: placeholder, className: styles$
|
|
1440
|
+
maskType ? (React$2.createElement(reactInputMask, { mask: mask, value: value, onChange: handleChange, disabled: disabled }, function (inputProps) { return (React$2.createElement("input", __assign({}, inputProps, { type: type, id: id, name: id, placeholder: placeholder, className: styles$5.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: disabled ? '#e5e5e5' : '' }, readOnly: readonly, required: required }))); })) : (React$2.createElement("input", { type: type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: disabled ? '#e5e5e5' : '' }, readOnly: readonly, disabled: disabled, required: required, maxLength: type === 'text' ? appliedMaxLength : undefined }))));
|
|
1431
1441
|
};
|
|
1432
1442
|
|
|
1433
|
-
var css_248z$
|
|
1434
|
-
var styles$
|
|
1435
|
-
styleInject(css_248z$
|
|
1443
|
+
var css_248z$4 = ".textPage-module_container__GBEF6{align-items:center;display:flex;flex-direction:column;justify-content:center;padding:20px}.textPage-module_content__CpD68{display:flex;text-align:justify}.textPage-module_imageCabecalho__J6YFH{border-radius:8px}.textPage-module_imageCabecalho__J6YFH img{border-radius:8px;height:100%;object-fit:cover;width:100%}.textPage-module_contentWithLateralImage__-f5pQ{flex-direction:row}.textPage-module_imageLateral__Dy9Kx{align-self:flex-start;height:230px;margin-right:20px;margin-top:15px;width:300px}.textPage-module_imageLateral__Dy9Kx img{border-radius:8px;height:100%;object-fit:cover;width:100%}.textPage-module_text__3pwuU{color:#5d5d5d;flex:2;line-height:1.8;text-align:justify}.textPage-module_text__3pwuU p{line-height:1.6;margin:10px 0}.textPage-module_text__3pwuU .textPage-module_coordenacao__UypV-,.textPage-module_text__3pwuU .textPage-module_direcao__x5psb{font-weight:700;margin-top:20px}";
|
|
1444
|
+
var styles$4 = {"container":"textPage-module_container__GBEF6","content":"textPage-module_content__CpD68","imageCabecalho":"textPage-module_imageCabecalho__J6YFH","contentWithLateralImage":"textPage-module_contentWithLateralImage__-f5pQ","imageLateral":"textPage-module_imageLateral__Dy9Kx","text":"textPage-module_text__3pwuU","coordenacao":"textPage-module_coordenacao__UypV-","direcao":"textPage-module_direcao__x5psb"};
|
|
1445
|
+
styleInject(css_248z$4);
|
|
1436
1446
|
|
|
1437
1447
|
var TextPage = function (_a) {
|
|
1438
1448
|
var imgLateral = _a.imgLateral, imgCabecalho = _a.imgCabecalho, texto = _a.texto;
|
|
1439
1449
|
return (React$2.createElement(React$2.Fragment, null,
|
|
1440
|
-
React$2.createElement("div", { className: styles$
|
|
1441
|
-
imgCabecalho && (React$2.createElement("div", { className: styles$
|
|
1450
|
+
React$2.createElement("div", { className: styles$4.container },
|
|
1451
|
+
imgCabecalho && (React$2.createElement("div", { className: styles$4.imageCabecalho },
|
|
1442
1452
|
React$2.createElement("img", { src: imgCabecalho, alt: imgCabecalho }))),
|
|
1443
|
-
React$2.createElement("div", { className: "".concat(styles$
|
|
1444
|
-
imgLateral && (React$2.createElement("div", { className: styles$
|
|
1453
|
+
React$2.createElement("div", { className: "".concat(styles$4.content, " ").concat(imgLateral ? styles$4.contentWithLateralImage : '') },
|
|
1454
|
+
imgLateral && (React$2.createElement("div", { className: styles$4.imageLateral },
|
|
1445
1455
|
React$2.createElement("img", { src: imgLateral, alt: imgLateral }))),
|
|
1446
|
-
React$2.createElement("div", { className: styles$
|
|
1456
|
+
React$2.createElement("div", { className: styles$4.text, dangerouslySetInnerHTML: { __html: texto } })))));
|
|
1447
1457
|
};
|
|
1448
1458
|
|
|
1449
|
-
var css_248z$
|
|
1450
|
-
var styles$
|
|
1451
|
-
styleInject(css_248z$
|
|
1459
|
+
var css_248z$3 = ".menuPage-module_container__grjEI{color:#000;display:flex;height:100%}.menuPage-module_sidebar__7Kg1S{background-color:#fff;border-right:1px solid var(--greyHover);height:500px;max-height:500px;overflow-y:auto;padding-bottom:15px;width:250px}.menuPage-module_sidebar__7Kg1S ul{list-style:none;margin:0;padding:0}.menuPage-module_sidebar__7Kg1S ul li{margin:10px 0}.menuPage-module_sidebar__7Kg1S ul li button{background:none;border:none;cursor:pointer;font-weight:700;padding:10px;text-align:left;text-decoration:none;width:100%}.menuPage-module_content__g2T-d{background-color:#fff;flex:1;max-height:475px;overflow-y:auto;padding:20px}@media (max-width:800px){.menuPage-module_sidebar__7Kg1S{width:160px}}.menuPage-module_empresa1__tLASf .menuPage-module_sidebar__7Kg1S ul li button{color:var(--blue)}.menuPage-module_empresa1__tLASf .menuPage-module_sidebar__7Kg1S ul li button.menuPage-module_active__Mfy4T{background-color:var(--lightGray);border-left:4px solid var(--blue)}.menuPage-module_empresa3__xkxls .menuPage-module_sidebar__7Kg1S ul li button{color:var(--green)}.menuPage-module_empresa3__xkxls .menuPage-module_sidebar__7Kg1S ul li button.menuPage-module_active__Mfy4T{background-color:var(--lightGray);border-left:4px solid var(--green)}.menuPage-module_empresa4__h8gOQ .menuPage-module_sidebar__7Kg1S ul li button{background-color:var(--red)}.menuPage-module_empresa4__h8gOQ .menuPage-module_sidebar__7Kg1S ul li button.menuPage-module_active__Mfy4T{background-color:var(--blue)}";
|
|
1460
|
+
var styles$3 = {"container":"menuPage-module_container__grjEI","sidebar":"menuPage-module_sidebar__7Kg1S","content":"menuPage-module_content__g2T-d","empresa1":"menuPage-module_empresa1__tLASf","active":"menuPage-module_active__Mfy4T","empresa3":"menuPage-module_empresa3__xkxls","empresa4":"menuPage-module_empresa4__h8gOQ"};
|
|
1461
|
+
styleInject(css_248z$3);
|
|
1452
1462
|
|
|
1453
1463
|
var MenuPage = function (_a) {
|
|
1454
1464
|
var menus = _a.menus, contents = _a.contents, empresa = _a.empresa;
|
|
1455
|
-
var empresaClass = styles$
|
|
1465
|
+
var empresaClass = styles$3["empresa".concat(empresa)];
|
|
1456
1466
|
var _b = React$2.useState(menus[0].key), selectedSection = _b[0], setSelectedSection = _b[1];
|
|
1457
1467
|
return (React$2.createElement("div", { className: "".concat(empresaClass) },
|
|
1458
|
-
React$2.createElement("div", { className: styles$
|
|
1459
|
-
React$2.createElement("nav", { className: styles$
|
|
1468
|
+
React$2.createElement("div", { className: styles$3.container },
|
|
1469
|
+
React$2.createElement("nav", { className: styles$3.sidebar },
|
|
1460
1470
|
React$2.createElement("ul", null, menus.map(function (menu) { return (React$2.createElement("li", { key: menu.key },
|
|
1461
|
-
React$2.createElement("button", { className: selectedSection === menu.key ? styles$
|
|
1462
|
-
React$2.createElement("main", { className: styles$
|
|
1471
|
+
React$2.createElement("button", { className: selectedSection === menu.key ? styles$3.active : '', onClick: function () { return setSelectedSection(menu.key); } }, menu.label))); }))),
|
|
1472
|
+
React$2.createElement("main", { className: styles$3.content }, contents[selectedSection]))));
|
|
1463
1473
|
};
|
|
1464
1474
|
|
|
1465
|
-
var css_248z$
|
|
1466
|
-
var styles$
|
|
1467
|
-
styleInject(css_248z$
|
|
1475
|
+
var css_248z$2 = ".select-module_selectPadrao__poGiL{border:1px solid #ccc;border-radius:.5rem;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.select-module_selectPadrao__poGiL:focus{outline:none}";
|
|
1476
|
+
var styles$2 = {"selectPadrao":"select-module_selectPadrao__poGiL"};
|
|
1477
|
+
styleInject(css_248z$2);
|
|
1468
1478
|
|
|
1469
1479
|
var SelectField = function (_a) {
|
|
1470
1480
|
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;
|
|
@@ -1479,14 +1489,14 @@ var SelectField = function (_a) {
|
|
|
1479
1489
|
};
|
|
1480
1490
|
return (React$2.createElement(React$2.Fragment, null,
|
|
1481
1491
|
label && React$2.createElement("label", { htmlFor: id }, label),
|
|
1482
|
-
React$2.createElement("select", { id: id, name: name, className: styles$
|
|
1492
|
+
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 },
|
|
1483
1493
|
optionDefault && !multiple && (React$2.createElement("option", { value: "" }, "Selecione...")),
|
|
1484
1494
|
options.map(function (option) { return (React$2.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
1485
1495
|
};
|
|
1486
1496
|
|
|
1487
|
-
var css_248z = ".busca-module_search__xf4qJ{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:2rem 0;width:100%}.busca-module_searchContainer__jhcnm{align-items:center;display:flex;max-width:600px;position:relative;width:100%}.busca-module_searchIcon__FPl1-{height:20px;left:10px;position:absolute;width:20px}.busca-module_searchInput__GjG8B{background-color:var(--lightGray);border:none;border-radius:50px;box-sizing:border-box;color:var(--gray);height:100%;outline:none;padding:10px 15px 10px 35px;width:100%;z-index:1001}.busca-module_suggestionsWrapper__vbmxG{background:#fff;border-bottom-left-radius:20px;border-bottom-right-radius:20px;box-shadow:0 4px 6px rgba(0,0,0,.1);color:var(--blue);width:45%;z-index:1000}.busca-module_suggestions__pYBV1{border-bottom-left-radius:20px;border-bottom-right-radius:20px;max-height:500px;overflow-y:auto}.busca-module_suggestion__V-d8T{cursor:pointer;padding:10px}.busca-module_suggestion__V-d8T:hover{background-color:var(--blue);color:#fff}.busca-module_suggestion__V-d8T:not(:first-child){border-top:1px solid var(--lightGray);padding-top:8px}@media (max-width:768px){.busca-module_searchInput__GjG8B{padding:10px 15px 10px 30px}.busca-module_suggestionsWrapper__vbmxG{top:35px}}@media (max-width:500px){.busca-module_searchContainer__jhcnm{width:90%}.busca-module_searchInput__GjG8B{padding:10px;width:100%}}";
|
|
1488
|
-
var styles = {"search":"busca-module_search__xf4qJ","searchContainer":"busca-module_searchContainer__jhcnm","searchIcon":"busca-module_searchIcon__FPl1-","searchInput":"busca-module_searchInput__GjG8B","suggestionsWrapper":"busca-module_suggestionsWrapper__vbmxG","suggestions":"busca-module_suggestions__pYBV1","suggestion":"busca-module_suggestion__V-d8T"};
|
|
1489
|
-
styleInject(css_248z);
|
|
1497
|
+
var css_248z$1 = ".busca-module_search__xf4qJ{align-items:center;display:flex;flex-direction:column;justify-content:center;margin:2rem 0;width:100%}.busca-module_searchContainer__jhcnm{align-items:center;display:flex;max-width:600px;position:relative;width:100%}.busca-module_searchIcon__FPl1-{height:20px;left:10px;position:absolute;width:20px}.busca-module_searchInput__GjG8B{background-color:var(--lightGray);border:none;border-radius:50px;box-sizing:border-box;color:var(--gray);height:100%;outline:none;padding:10px 15px 10px 35px;width:100%;z-index:1001}.busca-module_suggestionsWrapper__vbmxG{background:#fff;border-bottom-left-radius:20px;border-bottom-right-radius:20px;box-shadow:0 4px 6px rgba(0,0,0,.1);color:var(--blue);width:45%;z-index:1000}.busca-module_suggestions__pYBV1{border-bottom-left-radius:20px;border-bottom-right-radius:20px;max-height:500px;overflow-y:auto}.busca-module_suggestion__V-d8T{cursor:pointer;padding:10px}.busca-module_suggestion__V-d8T:hover{background-color:var(--blue);color:#fff}.busca-module_suggestion__V-d8T:not(:first-child){border-top:1px solid var(--lightGray);padding-top:8px}@media (max-width:768px){.busca-module_searchInput__GjG8B{padding:10px 15px 10px 30px}.busca-module_suggestionsWrapper__vbmxG{top:35px}}@media (max-width:500px){.busca-module_searchContainer__jhcnm{width:90%}.busca-module_searchInput__GjG8B{padding:10px;width:100%}}";
|
|
1498
|
+
var styles$1 = {"search":"busca-module_search__xf4qJ","searchContainer":"busca-module_searchContainer__jhcnm","searchIcon":"busca-module_searchIcon__FPl1-","searchInput":"busca-module_searchInput__GjG8B","suggestionsWrapper":"busca-module_suggestionsWrapper__vbmxG","suggestions":"busca-module_suggestions__pYBV1","suggestion":"busca-module_suggestion__V-d8T"};
|
|
1499
|
+
styleInject(css_248z$1);
|
|
1490
1500
|
|
|
1491
1501
|
var Busca = function (_a) {
|
|
1492
1502
|
var allItems = _a.allItems; _a.placeholder; var onItemClick = _a.onItemClick;
|
|
@@ -1512,17 +1522,41 @@ var Busca = function (_a) {
|
|
|
1512
1522
|
var handleInputBlur = function () {
|
|
1513
1523
|
setTimeout(function () { return setIsInputFocused(false); }, 100);
|
|
1514
1524
|
};
|
|
1515
|
-
return (React$2.createElement("div", { className: styles.search },
|
|
1516
|
-
React$2.createElement("div", { className: styles.searchContainer },
|
|
1517
|
-
React$2.createElement("input", { type: "text", className: styles.searchInput, placeholder: "Pesquisar...", value: searchValue, onChange: handleSearchChange, onFocus: handleInputFocus, onBlur: handleInputBlur })),
|
|
1518
|
-
isInputFocused && filteredItems.length > 0 && (React$2.createElement("div", { className: styles.suggestionsWrapper },
|
|
1519
|
-
React$2.createElement("div", { className: styles.suggestions }, filteredItems.map(function (item, index) { return (React$2.createElement("div", { key: index, className: styles.suggestion, onClick: function () { return onItemClick(item.path); } }, item.id)); }))))));
|
|
1525
|
+
return (React$2.createElement("div", { className: styles$1.search },
|
|
1526
|
+
React$2.createElement("div", { className: styles$1.searchContainer },
|
|
1527
|
+
React$2.createElement("input", { type: "text", className: styles$1.searchInput, placeholder: "Pesquisar...", value: searchValue, onChange: handleSearchChange, onFocus: handleInputFocus, onBlur: handleInputBlur })),
|
|
1528
|
+
isInputFocused && filteredItems.length > 0 && (React$2.createElement("div", { className: styles$1.suggestionsWrapper },
|
|
1529
|
+
React$2.createElement("div", { className: styles$1.suggestions }, filteredItems.map(function (item, index) { return (React$2.createElement("div", { key: index, className: styles$1.suggestion, onClick: function () { return onItemClick(item.path); } }, item.id)); }))))));
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
var css_248z = ".checkboxGroup-module_checkboxGroup__JFRoY{border:1px solid #ccc;border-radius:.5rem;box-sizing:border-box;font-style:italic;padding:.8rem 0 .8rem 1rem;width:100%}.checkboxGroup-module_checkboxLabel__tIciT{cursor:pointer;display:block;font-style:italic;margin-bottom:.5rem}.checkboxGroup-module_checkboxLabel__tIciT input[type=checkbox]{cursor:pointer;margin-right:.5rem}.checkboxGroup-module_checkboxLabel__tIciT input[type=checkbox]:focus{outline:none}";
|
|
1533
|
+
var styles = {"checkboxGroup":"checkboxGroup-module_checkboxGroup__JFRoY","checkboxLabel":"checkboxGroup-module_checkboxLabel__tIciT"};
|
|
1534
|
+
styleInject(css_248z);
|
|
1535
|
+
|
|
1536
|
+
var CheckboxGroup = function (_a) {
|
|
1537
|
+
_a.id; var name = _a.name, options = _a.options, selectedValues = _a.selectedValues, onChange = _a.onChange, label = _a.label;
|
|
1538
|
+
var handleCheckboxChange = function (value) {
|
|
1539
|
+
var updatedValues;
|
|
1540
|
+
if (selectedValues.includes(value)) {
|
|
1541
|
+
updatedValues = selectedValues.filter(function (item) { return item !== value; });
|
|
1542
|
+
}
|
|
1543
|
+
else {
|
|
1544
|
+
updatedValues = __spreadArray(__spreadArray([], selectedValues, true), [value], false);
|
|
1545
|
+
}
|
|
1546
|
+
onChange(updatedValues);
|
|
1547
|
+
};
|
|
1548
|
+
return (React$2.createElement("div", { className: styles.checkboxGroup },
|
|
1549
|
+
label && React$2.createElement("label", null, label),
|
|
1550
|
+
options.map(function (option) { return (React$2.createElement("label", { key: option.value, className: styles.checkboxLabel },
|
|
1551
|
+
React$2.createElement("input", { type: "checkbox", name: name, value: option.value, checked: selectedValues.includes(option.value), onChange: function () { return handleCheckboxChange(option.value); } }),
|
|
1552
|
+
option.description)); })));
|
|
1520
1553
|
};
|
|
1521
1554
|
|
|
1522
1555
|
exports.Busca = Busca;
|
|
1523
1556
|
exports.Button = Button;
|
|
1524
1557
|
exports.Card = Card;
|
|
1525
1558
|
exports.CardImage = CardImage;
|
|
1559
|
+
exports.CheckboxGroup = CheckboxGroup;
|
|
1526
1560
|
exports.InputField = InputField;
|
|
1527
1561
|
exports.MenuPage = MenuPage;
|
|
1528
1562
|
exports.SelectField = SelectField;
|