componenteshospitais 1.5.9 → 1.6.0
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 +7 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/InputField.tsx +57 -41
- package/src/img/Ic_olharFechado.svg +47 -0
- package/src/img/Ic_olhoAberto.svg +20 -0
package/dist/cjs/index.js
CHANGED
|
@@ -1424,6 +1424,10 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1424
1424
|
|
|
1425
1425
|
var InputField = function (_a) {
|
|
1426
1426
|
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, maskType = _a.maskType, onKeyPress = _a.onKeyPress;
|
|
1427
|
+
var _b = React$2.useState(false), isPasswordVisible = _b[0], setIsPasswordVisible = _b[1];
|
|
1428
|
+
var togglePasswordVisibility = function () {
|
|
1429
|
+
setIsPasswordVisible(!isPasswordVisible);
|
|
1430
|
+
};
|
|
1427
1431
|
var appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
|
|
1428
1432
|
var handleChange = function (e) {
|
|
1429
1433
|
if (type === 'number' && e.target.value.length > appliedMaxLength) {
|
|
@@ -1438,7 +1442,9 @@ var InputField = function (_a) {
|
|
|
1438
1442
|
maskType === 'cep' ? '99999-999' : '';
|
|
1439
1443
|
return (React$2.createElement(React$2.Fragment, null,
|
|
1440
1444
|
label && React$2.createElement("label", { htmlFor: id }, label),
|
|
1441
|
-
|
|
1445
|
+
React$2.createElement("div", { className: styles$6.inputWrapper, style: { position: 'relative', display: 'flex', alignItems: 'center' } },
|
|
1446
|
+
maskType ? (React$2.createElement(reactInputMask, { mask: mask, value: value, onChange: handleChange, disabled: disabled }, function (inputProps) { return (React$2.createElement("input", __assign({}, inputProps, { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, placeholder: placeholder, className: styles$6.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: disabled ? '#e5e5e5' : '' }, readOnly: readonly, required: required, onKeyPress: onKeyPress }))); })) : (React$2.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$6.inputPadrao, style: { width: largura ? "".concat(largura) : '', backgroundColor: disabled ? '#e5e5e5' : '' }, readOnly: readonly, disabled: disabled, required: required, maxLength: type === 'text' ? appliedMaxLength : undefined, onKeyPress: onKeyPress })),
|
|
1447
|
+
type === 'password' && (React$2.createElement("img", { src: isPasswordVisible ? '../img/Ic_olhoAberto.svg' : '../img/Ic_olharFechado.svg', alt: isPasswordVisible ? 'Esconder senha' : 'Mostrar senha', onClick: togglePasswordVisibility, style: { cursor: 'pointer', position: 'absolute', right: '10px' } })))));
|
|
1442
1448
|
};
|
|
1443
1449
|
|
|
1444
1450
|
var css_248z$5 = ".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}";
|