componenteshospitais 2.0.7 → 2.0.9
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 +21 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +21 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/InputField.d.ts +3 -0
- package/dist/types/components/SelectField.d.ts +2 -0
- package/dist/types/components/TextArea.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/Button.tsx +1 -2
- package/src/components/InputField.tsx +20 -4
- package/src/components/SelectField.tsx +22 -1
- package/src/components/TextArea.tsx +8 -2
package/dist/cjs/index.js
CHANGED
|
@@ -124,7 +124,7 @@ styleInject(css_248z$5);
|
|
|
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, borderRadius = _a.borderRadius;
|
|
126
126
|
var empresaClass = styles$5["empresa".concat(empresa)];
|
|
127
|
-
return (React$2.createElement("div", { className: "".concat(empresaClass)
|
|
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) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' }, value: texto })) : (React$2.createElement("button", { type: "button", className: styles$5.inputSubmit, onClick: onClick, style: { width: largura ? "".concat(largura) : '', borderRadius: borderRadius ? "".concat(borderRadius, "px") : '' } }, texto))));
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
/******************************************************************************
|
|
@@ -1494,7 +1494,7 @@ function FaDownload (props) {
|
|
|
1494
1494
|
|
|
1495
1495
|
var InputField = function (_a) {
|
|
1496
1496
|
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, checked = _a.checked, maxLength = _a.maxLength, maskType = _a.maskType, onKeyPress = _a.onKeyPress, onBlur = _a.onBlur, // Usando onBlur nas props
|
|
1497
|
-
corFundo = _a.corFundo, corLabel = _a.corLabel;
|
|
1497
|
+
corFundo = _a.corFundo, corLabel = _a.corLabel, borderRadius = _a.borderRadius, colorIcon = _a.colorIcon, border = _a.border;
|
|
1498
1498
|
var _b = React$2.useState(false), isPasswordVisible = _b[0], setIsPasswordVisible = _b[1];
|
|
1499
1499
|
var togglePasswordVisibility = function () {
|
|
1500
1500
|
setIsPasswordVisible(!isPasswordVisible);
|
|
@@ -1517,8 +1517,18 @@ var InputField = function (_a) {
|
|
|
1517
1517
|
return (React$2.createElement(React$2.Fragment, null,
|
|
1518
1518
|
label && React$2.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
1519
1519
|
React$2.createElement("div", { className: styles$5.inputWrapper },
|
|
1520
|
-
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$5.inputPadrao, style: {
|
|
1521
|
-
|
|
1520
|
+
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$5.inputPadrao, style: {
|
|
1521
|
+
width: largura ? "".concat(largura) : '',
|
|
1522
|
+
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
1523
|
+
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
1524
|
+
border: (border ? border : '')
|
|
1525
|
+
}, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress, onBlur: onBlur }))); })) : (React$2.createElement("input", { type: type === 'password' && isPasswordVisible ? 'text' : type, id: id, name: id, value: value, placeholder: placeholder, onChange: handleChange, className: styles$5.inputPadrao, style: {
|
|
1526
|
+
width: largura ? "".concat(largura) : '',
|
|
1527
|
+
backgroundColor: (disabled ? '#e5e5e5' : (corFundo ? corFundo : '')),
|
|
1528
|
+
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
1529
|
+
border: (border ? border : '')
|
|
1530
|
+
}, readOnly: readonly, disabled: disabled, required: required, checked: checked, maxLength: type === 'text' ? appliedMaxLength : undefined, onKeyPress: onKeyPress, onBlur: onBlur })),
|
|
1531
|
+
type === 'password' && (React$2.createElement("div", { className: styles$5.passwordToggleIcon, onClick: togglePasswordVisibility }, isPasswordVisible ? React$2.createElement(FaEyeSlash, { style: { color: colorIcon ? colorIcon : '' } }) : React$2.createElement(FaEye, { style: { color: colorIcon ? colorIcon : '' } }))))));
|
|
1522
1532
|
};
|
|
1523
1533
|
|
|
1524
1534
|
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}";
|
|
@@ -1569,7 +1579,7 @@ var getArrowColorByEmpresa = function (empresa) {
|
|
|
1569
1579
|
}
|
|
1570
1580
|
};
|
|
1571
1581
|
var SelectField = function (_a) {
|
|
1572
|
-
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;
|
|
1582
|
+
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;
|
|
1573
1583
|
var handleSelectChange = function (e) {
|
|
1574
1584
|
if (multiple) {
|
|
1575
1585
|
var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
|
|
@@ -1590,6 +1600,8 @@ var SelectField = function (_a) {
|
|
|
1590
1600
|
backgroundPosition: 'right 0.75rem center',
|
|
1591
1601
|
backgroundSize: '1rem',
|
|
1592
1602
|
paddingRight: '2.5rem',
|
|
1603
|
+
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
1604
|
+
border: (border ? border : '')
|
|
1593
1605
|
}, disabled: disabled, multiple: multiple, required: required },
|
|
1594
1606
|
optionDefault && !multiple && (React$2.createElement("option", { value: "" }, "Selecione...")),
|
|
1595
1607
|
options.map(function (option) { return (React$2.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
@@ -17624,7 +17636,7 @@ var TableStandard = function (_a) {
|
|
|
17624
17636
|
};
|
|
17625
17637
|
|
|
17626
17638
|
var TextAreaField = function (_a) {
|
|
17627
|
-
var 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, onKeyPress = _a.onKeyPress, onBlur = _a.onBlur, corFundo = _a.corFundo, corLabel = _a.corLabel;
|
|
17639
|
+
var 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, onKeyPress = _a.onKeyPress, onBlur = _a.onBlur, corFundo = _a.corFundo, corLabel = _a.corLabel, borderRadius = _a.borderRadius, border = _a.border;
|
|
17628
17640
|
var appliedMaxLength = maxLength !== undefined ? maxLength : 524288;
|
|
17629
17641
|
return (React$2.createElement(React$2.Fragment, null,
|
|
17630
17642
|
label && React$2.createElement("label", { htmlFor: id, style: { color: corLabel ? corLabel : '' } }, label),
|
|
@@ -17633,7 +17645,9 @@ var TextAreaField = function (_a) {
|
|
|
17633
17645
|
width: largura ? "".concat(largura) : '',
|
|
17634
17646
|
backgroundColor: disabled ? '#e5e5e5' : (corFundo ? corFundo : ''),
|
|
17635
17647
|
resize: 'none',
|
|
17636
|
-
height: '6rem'
|
|
17648
|
+
height: '6rem',
|
|
17649
|
+
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
17650
|
+
border: (border ? border : '')
|
|
17637
17651
|
}, readOnly: readonly, disabled: disabled, required: required, maxLength: appliedMaxLength, onKeyPress: onKeyPress, onBlur: onBlur }))));
|
|
17638
17652
|
};
|
|
17639
17653
|
|