componenteshospitais 1.3.5 → 1.3.7
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 +31 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +31 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/CardImage.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/CardImage.tsx +53 -21
- package/src/components/InputField.tsx +9 -2
- package/src/styles/cardImage.module.css +6 -8
package/dist/cjs/index.js
CHANGED
|
@@ -74,22 +74,42 @@ var Card = function (_a) {
|
|
|
74
74
|
imgLateral && (React.createElement("img", { src: imgLateral, alt: "Right", className: styles$6.imgLateral })))));
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
var css_248z$5 = ".cardImage-module_botaoCert__Rs0fg{align-items:center;border-color:transparent;border-radius:1rem;box-sizing:border-box;color:#fff;display:flex;flex-direction:column;
|
|
77
|
+
var css_248z$5 = ".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)}";
|
|
78
78
|
var styles$5 = {"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"};
|
|
79
79
|
styleInject(css_248z$5);
|
|
80
80
|
|
|
81
81
|
var CardImage = function (_a) {
|
|
82
|
-
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;
|
|
82
|
+
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;
|
|
83
|
+
var _b = React.useState(null), fileName = _b[0], setFileName = _b[1];
|
|
83
84
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
84
85
|
var handleActionClick = function () {
|
|
85
86
|
if (funcao && parametro) {
|
|
86
87
|
funcao(parametro);
|
|
87
88
|
}
|
|
88
89
|
};
|
|
90
|
+
var handleFileChange = function (event) {
|
|
91
|
+
if (event.target.files && event.target.files[0]) {
|
|
92
|
+
setFileName(event.target.files[0].name);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
setFileName(null);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
89
98
|
var content = (React.createElement(React.Fragment, null,
|
|
90
|
-
React.createElement("img", { src: img, alt: img, className: styles$5.iconeOna }),
|
|
99
|
+
React.createElement("img", { src: img, alt: img, className: styles$5.iconeOna, style: { width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined } }),
|
|
91
100
|
texto && (React.createElement("span", { className: styles$5.cardText, dangerouslySetInnerHTML: { __html: texto } }))));
|
|
92
|
-
return (React.createElement("div", { className: "".concat(empresaClass)
|
|
101
|
+
return (React.createElement("div", { className: "".concat(empresaClass), style: { width: largura ? "".concat(largura) : '250px', height: altura ? "".concat(altura) : '300px', borderRadius: '1rem' } }, fileInput ? (React.createElement("label", { className: "".concat(styles$5.botaoCert), style: { position: 'relative', cursor: 'pointer', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%', height: '100%' } },
|
|
102
|
+
React.createElement("input", { type: "file", onChange: handleFileChange, style: {
|
|
103
|
+
position: 'absolute',
|
|
104
|
+
top: 0,
|
|
105
|
+
left: 0,
|
|
106
|
+
width: '100%',
|
|
107
|
+
height: '100%',
|
|
108
|
+
opacity: 0,
|
|
109
|
+
cursor: 'pointer'
|
|
110
|
+
} }),
|
|
111
|
+
content,
|
|
112
|
+
React.createElement("span", { className: styles$5.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$5.botaoCert), title: href, style: { width: '100%', height: '100%' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
|
|
93
113
|
};
|
|
94
114
|
|
|
95
115
|
var css_248z$4 = ".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)}";
|
|
@@ -105,9 +125,15 @@ var Button = function (_a) {
|
|
|
105
125
|
var InputField = function (_a) {
|
|
106
126
|
var type = _a.type, id = _a.id, placeholder = _a.placeholder, onChange = _a.onChange, value = _a.value, label = _a.label, largura = _a.largura, readonly = _a.readonly, disabled = _a.disabled, required = _a.required, maxLength = _a.maxLength;
|
|
107
127
|
var appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
|
|
128
|
+
var handleChange = function (e) {
|
|
129
|
+
if (type === 'number' && e.target.value.length > appliedMaxLength) {
|
|
130
|
+
e.target.value = e.target.value.slice(0, appliedMaxLength);
|
|
131
|
+
}
|
|
132
|
+
onChange(e);
|
|
133
|
+
};
|
|
108
134
|
return (React.createElement(React.Fragment, null,
|
|
109
135
|
label && React.createElement("label", { htmlFor: id }, label),
|
|
110
|
-
React.createElement("input", { type: type, id: id, name: id, value: value, placeholder: placeholder, onChange:
|
|
136
|
+
React.createElement("input", { type: type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$4.inputPadrao, style: { width: largura ? "".concat(largura) : '' }, readOnly: readonly, disabled: disabled, required: required, maxLength: type === 'text' ? appliedMaxLength : undefined })));
|
|
111
137
|
};
|
|
112
138
|
|
|
113
139
|
var css_248z$3 = ".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}";
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n}\r\n\r\nexport default styleInject;\r\n"],"names":[],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n}\r\n\r\nexport default styleInject;\r\n"],"names":[],"mappings":";;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
package/dist/esm/index.js
CHANGED
|
@@ -72,22 +72,42 @@ var Card = function (_a) {
|
|
|
72
72
|
imgLateral && (React.createElement("img", { src: imgLateral, alt: "Right", className: styles$6.imgLateral })))));
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
var css_248z$5 = ".cardImage-module_botaoCert__Rs0fg{align-items:center;border-color:transparent;border-radius:1rem;box-sizing:border-box;color:#fff;display:flex;flex-direction:column;
|
|
75
|
+
var css_248z$5 = ".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)}";
|
|
76
76
|
var styles$5 = {"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"};
|
|
77
77
|
styleInject(css_248z$5);
|
|
78
78
|
|
|
79
79
|
var CardImage = function (_a) {
|
|
80
|
-
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;
|
|
80
|
+
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;
|
|
81
|
+
var _b = useState(null), fileName = _b[0], setFileName = _b[1];
|
|
81
82
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
82
83
|
var handleActionClick = function () {
|
|
83
84
|
if (funcao && parametro) {
|
|
84
85
|
funcao(parametro);
|
|
85
86
|
}
|
|
86
87
|
};
|
|
88
|
+
var handleFileChange = function (event) {
|
|
89
|
+
if (event.target.files && event.target.files[0]) {
|
|
90
|
+
setFileName(event.target.files[0].name);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
setFileName(null);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
87
96
|
var content = (React.createElement(React.Fragment, null,
|
|
88
|
-
React.createElement("img", { src: img, alt: img, className: styles$5.iconeOna }),
|
|
97
|
+
React.createElement("img", { src: img, alt: img, className: styles$5.iconeOna, style: { width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined } }),
|
|
89
98
|
texto && (React.createElement("span", { className: styles$5.cardText, dangerouslySetInnerHTML: { __html: texto } }))));
|
|
90
|
-
return (React.createElement("div", { className: "".concat(empresaClass)
|
|
99
|
+
return (React.createElement("div", { className: "".concat(empresaClass), style: { width: largura ? "".concat(largura) : '250px', height: altura ? "".concat(altura) : '300px', borderRadius: '1rem' } }, fileInput ? (React.createElement("label", { className: "".concat(styles$5.botaoCert), style: { position: 'relative', cursor: 'pointer', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%', height: '100%' } },
|
|
100
|
+
React.createElement("input", { type: "file", onChange: handleFileChange, style: {
|
|
101
|
+
position: 'absolute',
|
|
102
|
+
top: 0,
|
|
103
|
+
left: 0,
|
|
104
|
+
width: '100%',
|
|
105
|
+
height: '100%',
|
|
106
|
+
opacity: 0,
|
|
107
|
+
cursor: 'pointer'
|
|
108
|
+
} }),
|
|
109
|
+
content,
|
|
110
|
+
React.createElement("span", { className: styles$5.cardText }, fileName ? fileName : 'Selecione um arquivo'))) : (href ? (React.createElement("a", { href: href, target: externo ? "_blank" : "_self", rel: externo ? "noopener noreferrer" : undefined, className: "".concat(styles$5.botaoCert), title: href, style: { width: '100%', height: '100%' } }, content)) : (React.createElement("div", { className: "".concat(styles$5.botaoCert), onClick: handleActionClick, style: { width: '100%', height: '100%' } }, content)))));
|
|
91
111
|
};
|
|
92
112
|
|
|
93
113
|
var css_248z$4 = ".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)}";
|
|
@@ -103,9 +123,15 @@ var Button = function (_a) {
|
|
|
103
123
|
var InputField = function (_a) {
|
|
104
124
|
var type = _a.type, id = _a.id, placeholder = _a.placeholder, onChange = _a.onChange, value = _a.value, label = _a.label, largura = _a.largura, readonly = _a.readonly, disabled = _a.disabled, required = _a.required, maxLength = _a.maxLength;
|
|
105
125
|
var appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
|
|
126
|
+
var handleChange = function (e) {
|
|
127
|
+
if (type === 'number' && e.target.value.length > appliedMaxLength) {
|
|
128
|
+
e.target.value = e.target.value.slice(0, appliedMaxLength);
|
|
129
|
+
}
|
|
130
|
+
onChange(e);
|
|
131
|
+
};
|
|
106
132
|
return (React.createElement(React.Fragment, null,
|
|
107
133
|
label && React.createElement("label", { htmlFor: id }, label),
|
|
108
|
-
React.createElement("input", { type: type, id: id, name: id, value: value, placeholder: placeholder, onChange:
|
|
134
|
+
React.createElement("input", { type: type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$4.inputPadrao, style: { width: largura ? "".concat(largura) : '' }, readOnly: readonly, disabled: disabled, required: required, maxLength: type === 'text' ? appliedMaxLength : undefined })));
|
|
109
135
|
};
|
|
110
136
|
|
|
111
137
|
var css_248z$3 = ".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}";
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n}\r\n\r\nexport default styleInject;\r\n"],"names":[],"mappings":";;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\r\n if ( ref === void 0 ) ref = {};\r\n var insertAt = ref.insertAt;\r\n\r\n if (!css || typeof document === 'undefined') { return; }\r\n\r\n var head = document.head || document.getElementsByTagName('head')[0];\r\n var style = document.createElement('style');\r\n style.type = 'text/css';\r\n\r\n if (insertAt === 'top') {\r\n if (head.firstChild) {\r\n head.insertBefore(style, head.firstChild);\r\n } else {\r\n head.appendChild(style);\r\n }\r\n } else {\r\n head.appendChild(style);\r\n }\r\n\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n}\r\n\r\nexport default styleInject;\r\n"],"names":[],"mappings":";;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -6,9 +6,12 @@ interface CardImageProps {
|
|
|
6
6
|
empresa: '1' | '2' | '3' | '4';
|
|
7
7
|
largura?: string;
|
|
8
8
|
altura?: string;
|
|
9
|
+
larguraImage?: string;
|
|
10
|
+
alturaImage?: string;
|
|
9
11
|
externo?: boolean;
|
|
10
12
|
funcao?: (parametro: string) => void;
|
|
11
13
|
parametro?: string;
|
|
14
|
+
fileInput?: boolean;
|
|
12
15
|
}
|
|
13
16
|
declare const CardImage: React.FC<CardImageProps>;
|
|
14
17
|
export default CardImage;
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import styles from '../styles/cardImage.module.css';
|
|
3
3
|
|
|
4
4
|
interface CardImageProps {
|
|
@@ -8,12 +8,16 @@ interface CardImageProps {
|
|
|
8
8
|
empresa: '1' | '2' | '3' | '4';
|
|
9
9
|
largura?: string;
|
|
10
10
|
altura?: string;
|
|
11
|
+
larguraImage?: string;
|
|
12
|
+
alturaImage?: string;
|
|
11
13
|
externo?: boolean;
|
|
12
14
|
funcao?: (parametro: string) => void;
|
|
13
15
|
parametro?: string;
|
|
16
|
+
fileInput?: boolean;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura, externo, funcao, parametro }) => {
|
|
19
|
+
const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largura, altura, externo, funcao, parametro, fileInput, alturaImage, larguraImage }) => {
|
|
20
|
+
const [fileName, setFileName] = useState<string | null>(null);
|
|
17
21
|
const empresaClass = styles[`empresa${empresa}`];
|
|
18
22
|
|
|
19
23
|
const handleActionClick = () => {
|
|
@@ -22,9 +26,17 @@ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largur
|
|
|
22
26
|
}
|
|
23
27
|
};
|
|
24
28
|
|
|
29
|
+
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
30
|
+
if (event.target.files && event.target.files[0]) {
|
|
31
|
+
setFileName(event.target.files[0].name);
|
|
32
|
+
} else {
|
|
33
|
+
setFileName(null);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
25
37
|
const content = (
|
|
26
38
|
<>
|
|
27
|
-
<img src={img} alt={img} className={styles.iconeOna} />
|
|
39
|
+
<img src={img} alt={img} className={styles.iconeOna} style={{ width: larguraImage ? larguraImage : undefined, height: alturaImage ? alturaImage : undefined }} />
|
|
28
40
|
{texto && (
|
|
29
41
|
<span className={styles.cardText} dangerouslySetInnerHTML={{ __html: texto }}></span>
|
|
30
42
|
)}
|
|
@@ -32,26 +44,46 @@ const CardImage: React.FC<CardImageProps> = ({ img, href, texto, empresa, largur
|
|
|
32
44
|
);
|
|
33
45
|
|
|
34
46
|
return (
|
|
35
|
-
<div className={`${empresaClass}`}>
|
|
36
|
-
{
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
<div className={`${empresaClass}`} style={{ width: largura ? `${largura}` : '250px', height: altura ? `${altura}` : '300px', borderRadius: '1rem' }}>
|
|
48
|
+
{fileInput ? (
|
|
49
|
+
<label className={`${styles.botaoCert}`} style={{ position: 'relative', cursor: 'pointer', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', width: '100%', height: '100%' }}>
|
|
50
|
+
<input
|
|
51
|
+
type="file"
|
|
52
|
+
onChange={handleFileChange}
|
|
53
|
+
style={{
|
|
54
|
+
position: 'absolute',
|
|
55
|
+
top: 0,
|
|
56
|
+
left: 0,
|
|
57
|
+
width: '100%',
|
|
58
|
+
height: '100%',
|
|
59
|
+
opacity: 0,
|
|
60
|
+
cursor: 'pointer'
|
|
61
|
+
}}
|
|
62
|
+
/>
|
|
45
63
|
{content}
|
|
46
|
-
|
|
64
|
+
<span className={styles.cardText}>{fileName ? fileName : 'Selecione um arquivo'}</span>
|
|
65
|
+
</label>
|
|
47
66
|
) : (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
href ? (
|
|
68
|
+
<a
|
|
69
|
+
href={href}
|
|
70
|
+
target={externo ? "_blank" : "_self"}
|
|
71
|
+
rel={externo ? "noopener noreferrer" : undefined}
|
|
72
|
+
className={`${styles.botaoCert}`}
|
|
73
|
+
title={href}
|
|
74
|
+
style={{ width: '100%', height: '100%' }}
|
|
75
|
+
>
|
|
76
|
+
{content}
|
|
77
|
+
</a>
|
|
78
|
+
) : (
|
|
79
|
+
<div
|
|
80
|
+
className={`${styles.botaoCert}`}
|
|
81
|
+
onClick={handleActionClick}
|
|
82
|
+
style={{ width: '100%', height: '100%' }}
|
|
83
|
+
>
|
|
84
|
+
{content}
|
|
85
|
+
</div>
|
|
86
|
+
)
|
|
55
87
|
)}
|
|
56
88
|
</div>
|
|
57
89
|
);
|
|
@@ -18,6 +18,13 @@ interface InputFieldProps {
|
|
|
18
18
|
const InputField: React.FC<InputFieldProps> = ({ type, id, placeholder, onChange, value, label, largura, readonly, disabled, required, maxLength }) => {
|
|
19
19
|
const appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
|
|
20
20
|
|
|
21
|
+
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
|
22
|
+
if (type === 'number' && e.target.value.length > appliedMaxLength) {
|
|
23
|
+
e.target.value = e.target.value.slice(0, appliedMaxLength);
|
|
24
|
+
}
|
|
25
|
+
onChange(e);
|
|
26
|
+
};
|
|
27
|
+
|
|
21
28
|
return (
|
|
22
29
|
<>
|
|
23
30
|
{label && <label htmlFor={id}>{label}</label>}
|
|
@@ -27,13 +34,13 @@ const InputField: React.FC<InputFieldProps> = ({ type, id, placeholder, onChange
|
|
|
27
34
|
name={id}
|
|
28
35
|
value={value}
|
|
29
36
|
placeholder={placeholder}
|
|
30
|
-
onChange={
|
|
37
|
+
onChange={handleChange}
|
|
31
38
|
className={styles.inputPadrao}
|
|
32
39
|
style={{ width: largura ? `${largura}` : '' }}
|
|
33
40
|
readOnly={readonly}
|
|
34
41
|
disabled={disabled}
|
|
35
42
|
required={required}
|
|
36
|
-
maxLength={appliedMaxLength}
|
|
43
|
+
maxLength={type === 'text' ? appliedMaxLength : undefined}
|
|
37
44
|
/>
|
|
38
45
|
</>
|
|
39
46
|
);
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
border-radius: 1rem;
|
|
8
8
|
justify-content: center;
|
|
9
9
|
align-items: center;
|
|
10
|
-
width: 250px;
|
|
11
|
-
height: 300px;
|
|
12
10
|
text-decoration: none;
|
|
13
11
|
box-sizing: border-box;
|
|
14
12
|
}
|
|
@@ -29,30 +27,30 @@
|
|
|
29
27
|
/* Definicao de cores */
|
|
30
28
|
|
|
31
29
|
/* Empresa 1 - MPHU */
|
|
32
|
-
.empresa1
|
|
30
|
+
.empresa1 {
|
|
33
31
|
background-color: var(--blue);
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
.empresa1
|
|
34
|
+
.empresa1:hover {
|
|
37
35
|
background-color: var(--red);
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
/* Empresa 2 - Reginal */
|
|
41
39
|
|
|
42
40
|
/* Empresa 3 - Upas */
|
|
43
|
-
.empresa3
|
|
41
|
+
.empresa3 {
|
|
44
42
|
background-color: var(--green);
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
.empresa3
|
|
45
|
+
.empresa3:hover {
|
|
48
46
|
background-color: var(--lightblue);
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
/* Empresa 4 - Farmácia */
|
|
52
|
-
.empresa4
|
|
50
|
+
.empresa4{
|
|
53
51
|
background-color: var(--red);
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
.empresa4
|
|
54
|
+
.empresa4:hover{
|
|
57
55
|
background-color: var(--blue);
|
|
58
56
|
}
|