componenteshospitais 3.8.6 → 3.8.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 +14 -14
- package/dist/esm/index.js +14 -14
- package/dist/types/components/SelectField.d.ts +1 -0
- package/dist/types/stories/Button.stories.d.ts +1 -0
- package/dist/types/stories/Header.stories.d.ts +1 -0
- package/dist/types/stories/Page.stories.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/InputField.tsx +2 -2
- package/src/components/SelectField.tsx +4 -1
- package/src/components/TableStandard.tsx +11 -2
- package/src/components/TableStandardButtons.tsx +5 -2
- package/src/stories/SelectField.stories.tsx +4 -0
- package/src/stories/TableStandardButtons.stories.tsx +2 -2
- package/src/styles/tableStandard.module.css +19 -15
package/dist/cjs/index.js
CHANGED
|
@@ -282,7 +282,7 @@ var InputField = function (_a) {
|
|
|
282
282
|
border: (border ? border : ''),
|
|
283
283
|
paddingLeft: (icon && (alignIcon === 'left' || !alignIcon) ? '30px' : '')
|
|
284
284
|
}, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress, onKeyDown: onKeyDown, "data-chave": chave, "data-auto-incremento": autoIncremento, "data-inativo": inativo }),
|
|
285
|
-
(icon && alignIcon === 'right') || busca &&
|
|
285
|
+
((icon && alignIcon === 'right') || busca) &&
|
|
286
286
|
(React.createElement("span", { className: "".concat(busca ? 'fa fa-search' : icon, " ").concat(styles$7.iconInputRight), style: { cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : '' }, onClick: handleActionClick })))) : (React.createElement(React.Fragment, null,
|
|
287
287
|
icon && (alignIcon === 'left' || !alignIcon) &&
|
|
288
288
|
(React.createElement("span", { className: "".concat(icon, " ").concat(styles$7.iconInput), style: { cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : '' }, onClick: handleActionClick })),
|
|
@@ -293,7 +293,7 @@ var InputField = function (_a) {
|
|
|
293
293
|
border: (border ? border : ''),
|
|
294
294
|
paddingLeft: (icon && (alignIcon === 'left' || !alignIcon) ? '30px' : '')
|
|
295
295
|
}, readOnly: readonly, disabled: disabled, required: required, checked: checked, maxLength: type === 'text' ? appliedMaxLength : undefined, onKeyPress: onKeyPress, onBlur: onBlur, onKeyDown: onKeyDown, "data-chave": chave, "data-auto-incremento": autoIncremento, "data-inativo": inativo }),
|
|
296
|
-
(icon && alignIcon === 'right') || busca &&
|
|
296
|
+
((icon && alignIcon === 'right') || busca) &&
|
|
297
297
|
(React.createElement("span", { className: "".concat(busca ? 'fa fa-search' : icon, " ").concat(styles$7.iconInputRight), style: { cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : '' }, onClick: handleActionClick })))),
|
|
298
298
|
type === 'password' && (React.createElement("div", { className: styles$7.passwordToggleIcon, onClick: togglePasswordVisibility }, isPasswordVisible ? React.createElement(FaEyeSlash, { style: { color: colorIcon ? colorIcon : '' } }) : React.createElement(FaEye, { style: { color: colorIcon ? colorIcon : '' } }))))));
|
|
299
299
|
};
|
|
@@ -346,7 +346,7 @@ var getArrowColorByEmpresa = function (empresa) {
|
|
|
346
346
|
}
|
|
347
347
|
};
|
|
348
348
|
var SelectField = function (_a) {
|
|
349
|
-
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, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault, requiredIcon = _a.requiredIcon;
|
|
349
|
+
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, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault, requiredIcon = _a.requiredIcon, inativo = _a.inativo;
|
|
350
350
|
var handleSelectChange = function (e) {
|
|
351
351
|
if (multiple) {
|
|
352
352
|
var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
|
|
@@ -372,7 +372,7 @@ var SelectField = function (_a) {
|
|
|
372
372
|
paddingRight: '2.5rem',
|
|
373
373
|
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
374
374
|
border: (border ? border : '')
|
|
375
|
-
}, disabled: disabled, multiple: multiple, required: required },
|
|
375
|
+
}, disabled: disabled, multiple: multiple, required: required, "data-inativo": inativo },
|
|
376
376
|
optionDefault && !multiple && (React.createElement("option", { value: "" }, txtOptionDefault ? txtOptionDefault : 'Selecione...')),
|
|
377
377
|
options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
378
378
|
};
|
|
@@ -16355,8 +16355,8 @@ var utils/*:any*/ = {
|
|
|
16355
16355
|
}
|
|
16356
16356
|
};
|
|
16357
16357
|
|
|
16358
|
-
var css_248z$2 = ".tableStandard-module_tableContainer__W2g84{margin-bottom:1rem;width:100%}.tableStandard-module_conteudoTableResponsive__FAv-X{overflow-x:auto}.tableStandard-module_tableResponsive__Y1o-v{min-width:
|
|
16359
|
-
var styles$2 = {"tableContainer":"tableStandard-module_tableContainer__W2g84","conteudoTableResponsive":"tableStandard-module_conteudoTableResponsive__FAv-X","tableResponsive":"tableStandard-module_tableResponsive__Y1o-v","row":"tableStandard-module_row__Y-JlA","header":"tableStandard-module_header__csH11","cell":"tableStandard-module_cell__EuhF4","cellBorder":"tableStandard-module_cellBorder__NWT-Y","semResultados":"tableStandard-module_semResultados__vwxkQ","center":"tableStandard-module_center__F69HU","tableNormal":"tableStandard-module_tableNormal__ycOqt","
|
|
16358
|
+
var css_248z$2 = ".tableStandard-module_tableContainer__W2g84{margin-bottom:1rem;width:100%}.tableStandard-module_conteudoTableResponsive__FAv-X{overflow-x:auto}.tableStandard-module_tableResponsive__Y1o-v{min-width:1100px}.tableStandard-module_row__Y-JlA{background-color:#e2e2e2;border-radius:10px;margin-bottom:.5rem;width:100%}.tableStandard-module_header__csH11{color:#fff;padding:1rem}.tableStandard-module_cell__EuhF4{flex:1;max-width:200rem;text-align:center}.tableStandard-module_cellBorder__NWT-Y td,.tableStandard-module_cellBorder__NWT-Y th{border-style:solid;border-width:0 0 1px 1px}.tableStandard-module_cellBorder__NWT-Y td:last-child{border-right-width:1px}.tableStandard-module_semResultados__vwxkQ{justify-content:center}.tableStandard-module_center__F69HU{align-items:center;display:flex;justify-content:center;text-align:center}.tableStandard-module_tableNormal__ycOqt{display:block}.tableStandard-module_cellIconEye__JG88z{display:flex;justify-content:center}.tableStandard-module_icon__OiGeS{color:#fff;cursor:pointer;font-size:25px}.tableStandard-module_iconEye__3Jo-8{cursor:pointer;font-size:15px;position:absolute;right:-13px}.tableStandard-module_boxFiltros__nzimU{display:flex;width:100%}.tableStandard-module_boxFiltros__nzimU div{background-color:#e2e2e2;border-radius:8px;color:#27235f;display:flex;margin-bottom:5px;margin-right:5px;padding:10px;width:100%}.tableStandard-module_boxFiltros__nzimU div label{align-items:center;display:flex;flex-grow:1;font-size:1em;font-weight:700;margin-left:8px;width:50%}.tableStandard-module_boxFiltros__nzimU img{height:auto;vertical-align:middle}.tableStandard-module_formFiltros__SZ6Jj{margin:1rem}.tableStandard-module_excelWrapper__eRjJM{display:flex;justify-content:flex-start;margin-bottom:1rem}.tableStandard-module_actionButton__KCnWY,.tableStandard-module_trashButton__CjJDh{border:none;border-radius:10px;color:#fff;cursor:pointer;padding:10px}.tableStandard-module_trashButton__CjJDh{background-color:var(--red)}.tableStandard-module_trashButton__CjJDh:hover{background-color:var(--blue)}.tableStandard-module_downloadButton__cpITl{background-color:green;border:none;border-radius:10px;color:#fff;cursor:pointer;padding:10px}.tableStandard-module_downloadButton__cpITl:hover{background-color:#038d03}.tableStandard-module_formGroupRadio__4x2bh{align-items:center;display:flex;gap:10px;justify-content:center}.tableStandard-module_formGroupRadio__4x2bh input[type=checkbox]{cursor:pointer}.tableStandard-module_formGroupRadio__4x2bh div{width:auto}.tableStandard-module_img__Ot8rP{max-width:20rem;width:100px}.tableStandard-module_linhasZebradas__vIFYK tr:nth-child(2n){background-color:#fff}.tableStandard-module_linhasZebradas__vIFYK tr:nth-child(odd){background-color:#e2e2e2}.tableStandard-module_tooltip__uBBJu{background-color:#f9f9f9;border:1px solid #ccc;border-radius:5px;box-shadow:0 2px 10px rgba(0,0,0,.1);display:flex;flex-direction:column;gap:8px;max-width:400px;padding:15px;position:absolute;white-space:pre-wrap;z-index:1000}.tableStandard-module_tooltip__uBBJu span{cursor:pointer;display:flex;justify-content:flex-end}.tableStandard-module_tooltip__uBBJu p{font-size:14px;margin:0}.tableStandard-module_pagination__oaWb4{display:flex;margin-top:20px;max-width:100%;overflow-x:auto;padding-bottom:20px}.tableStandard-module_pageButton__lfOmY{background-color:#e2e2e2;border-color:transparent;border-radius:5px;cursor:pointer;margin:0 5px;padding:5px 10px}.tableStandard-module_activePage__qVqau{border-color:transparent;border-radius:5px;color:#fff;font-weight:700}.tableStandard-module_empresa1__c7Oac .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa1__c7Oac .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa1__c7Oac .tableStandard-module_header__csH11{background-color:var(--blue)}.tableStandard-module_empresa1__c7Oac .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa1__c7Oac .tableStandard-module_activePage__qVqau:hover{background-color:var(--red)}.tableStandard-module_empresa3__yaVfZ .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa3__yaVfZ .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa3__yaVfZ .tableStandard-module_header__csH11{background-color:var(--green)}.tableStandard-module_empresa3__yaVfZ .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa3__yaVfZ .tableStandard-module_activePage__qVqau:hover{background-color:var(--lightblue)}.tableStandard-module_empresa4__B-BBN .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa4__B-BBN .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa4__B-BBN .tableStandard-module_header__csH11{background-color:var(--red)}.tableStandard-module_empresa4__B-BBN .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa4__B-BBN .tableStandard-module_activePage__qVqau:hover{background-color:var(--blue)}.tableStandard-module_empresa5__2eHcX .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa5__2eHcX .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa5__2eHcX .tableStandard-module_header__csH11{background-color:var(--cartaoBlue)}.tableStandard-module_empresa5__2eHcX .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa5__2eHcX .tableStandard-module_activePage__qVqau:hover{background-color:var(--cartaoGreen)}.tableStandard-module_empresa6__u-Cqi .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa6__u-Cqi .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa6__u-Cqi .tableStandard-module_header__csH11{background-color:var(--sistemaSaudeBlue)}.tableStandard-module_empresa6__u-Cqi .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa6__u-Cqi .tableStandard-module_activePage__qVqau:hover{background-color:var(--sistemaSaudeRed)}@media (max-width:1200px){.tableStandard-module_boxFiltros__nzimU,.tableStandard-module_campoFiltrar__d9juT{flex-direction:column;margin-right:1rem;width:auto}.tableStandard-module_caixaCadastroPadrao__3R2vG{width:100%}.tableStandard-module_conteudo__TK-TS{margin:4rem 0 4rem 8rem}.tableStandard-module_tableNormal__ycOqt{display:none}.tableStandard-module_tableResponsive__Y1o-v{display:block}}@media (max-width:950px){.tableStandard-module_campoFiltrar__d9juT{flex-direction:column;width:110%}.tableStandard-module_caixaCadastroPadrao__3R2vG{width:70%}.tableStandard-module_groupInputs__LF8sZ{width:auto}}@media (max-width:850px){.tableStandard-module_iconEye__3Jo-8{font-size:14px}}@media (max-width:600px){.tableStandard-module_caixaCadastroPadrao__3R2vG{width:100%}}@media (max-width:500px){.tableStandard-module_boxFiltros__nzimU div label,.tableStandard-module_labelCadastroPadrao__bfB4n{font-size:12px}.tableStandard-module_caixaCadastroPadrao__3R2vG{width:auto}}";
|
|
16359
|
+
var styles$2 = {"tableContainer":"tableStandard-module_tableContainer__W2g84","conteudoTableResponsive":"tableStandard-module_conteudoTableResponsive__FAv-X","tableResponsive":"tableStandard-module_tableResponsive__Y1o-v","row":"tableStandard-module_row__Y-JlA","header":"tableStandard-module_header__csH11","cell":"tableStandard-module_cell__EuhF4","cellBorder":"tableStandard-module_cellBorder__NWT-Y","semResultados":"tableStandard-module_semResultados__vwxkQ","center":"tableStandard-module_center__F69HU","tableNormal":"tableStandard-module_tableNormal__ycOqt","cellIconEye":"tableStandard-module_cellIconEye__JG88z","icon":"tableStandard-module_icon__OiGeS","iconEye":"tableStandard-module_iconEye__3Jo-8","boxFiltros":"tableStandard-module_boxFiltros__nzimU","formFiltros":"tableStandard-module_formFiltros__SZ6Jj","excelWrapper":"tableStandard-module_excelWrapper__eRjJM","actionButton":"tableStandard-module_actionButton__KCnWY","trashButton":"tableStandard-module_trashButton__CjJDh","downloadButton":"tableStandard-module_downloadButton__cpITl","formGroupRadio":"tableStandard-module_formGroupRadio__4x2bh","img":"tableStandard-module_img__Ot8rP","linhasZebradas":"tableStandard-module_linhasZebradas__vIFYK","tooltip":"tableStandard-module_tooltip__uBBJu","pagination":"tableStandard-module_pagination__oaWb4","pageButton":"tableStandard-module_pageButton__lfOmY","activePage":"tableStandard-module_activePage__qVqau","empresa1":"tableStandard-module_empresa1__c7Oac","empresa3":"tableStandard-module_empresa3__yaVfZ","empresa4":"tableStandard-module_empresa4__B-BBN","empresa5":"tableStandard-module_empresa5__2eHcX","empresa6":"tableStandard-module_empresa6__u-Cqi","campoFiltrar":"tableStandard-module_campoFiltrar__d9juT","caixaCadastroPadrao":"tableStandard-module_caixaCadastroPadrao__3R2vG","conteudo":"tableStandard-module_conteudo__TK-TS","groupInputs":"tableStandard-module_groupInputs__LF8sZ","labelCadastroPadrao":"tableStandard-module_labelCadastroPadrao__bfB4n"};
|
|
16360
16360
|
styleInject(css_248z$2);
|
|
16361
16361
|
|
|
16362
16362
|
var TableStandard = function (_a) {
|
|
@@ -16404,7 +16404,7 @@ var TableStandard = function (_a) {
|
|
|
16404
16404
|
return (React.createElement("div", { className: styles$2.conteudoTableResponsive },
|
|
16405
16405
|
React.createElement("div", { className: styles$2.tableResponsive },
|
|
16406
16406
|
showExcelDownloadButton && (React.createElement("div", { className: styles$2.excelWrapper },
|
|
16407
|
-
React.createElement("button", { onClick: handleDownloadClick, className: styles$2.downloadButton },
|
|
16407
|
+
React.createElement("button", { onClick: handleDownloadClick, className: styles$2.downloadButton, type: 'button' },
|
|
16408
16408
|
React.createElement(FaDownload, null),
|
|
16409
16409
|
" Excel"))),
|
|
16410
16410
|
React.createElement("table", { className: styles$2.tableContainer, cellSpacing: cellSpacing || '2' },
|
|
@@ -16438,27 +16438,27 @@ var TableStandard = function (_a) {
|
|
|
16438
16438
|
e.stopPropagation();
|
|
16439
16439
|
if (onActionClick)
|
|
16440
16440
|
onActionClick(row[idColumn]);
|
|
16441
|
-
}, className: styles$2.actionButton, title: "Editar" },
|
|
16441
|
+
}, className: styles$2.actionButton, title: "Editar", type: 'button' },
|
|
16442
16442
|
React.createElement(FaPen, null))),
|
|
16443
16443
|
showDownloadButton && shouldShowDownloadButton(row[idColumn]) && (React.createElement("button", { onClick: function (e) {
|
|
16444
16444
|
e.stopPropagation();
|
|
16445
16445
|
if (onDownloadClick)
|
|
16446
16446
|
onDownloadClick(row[idColumn]);
|
|
16447
|
-
}, className: styles$2.downloadButton, title: "Download do Arquivo" },
|
|
16447
|
+
}, className: styles$2.downloadButton, title: "Download do Arquivo", type: 'button' },
|
|
16448
16448
|
React.createElement(FaDownload, null))),
|
|
16449
16449
|
showViewButton && (React.createElement("button", { onClick: function (e) {
|
|
16450
16450
|
e.stopPropagation();
|
|
16451
16451
|
if (onViewClick)
|
|
16452
16452
|
onViewClick(row[idColumn]);
|
|
16453
|
-
}, className: styles$2.actionButton, title: "Visualizar" },
|
|
16453
|
+
}, className: styles$2.actionButton, title: "Visualizar", type: 'button' },
|
|
16454
16454
|
React.createElement(FaEye, null))),
|
|
16455
16455
|
showTrash && (React.createElement("button", { onClick: function (e) {
|
|
16456
16456
|
e.stopPropagation();
|
|
16457
16457
|
if (onTrashClick)
|
|
16458
16458
|
onTrashClick(row[idColumn]);
|
|
16459
|
-
}, className: styles$2.trashButton, title: "Excluir" },
|
|
16459
|
+
}, className: styles$2.trashButton, title: "Excluir", type: 'button' },
|
|
16460
16460
|
React.createElement(FaRegTrashAlt, null)))))))); }))),
|
|
16461
|
-
paginacao && (React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$2.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return handlePageChange(number); }, className: "".concat(styles$2.pageButton, " ").concat(localPage === number ? styles$2.activePage : '') }, number)); }))))));
|
|
16461
|
+
paginacao && (React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$2.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return handlePageChange(number); }, className: "".concat(styles$2.pageButton, " ").concat(localPage === number ? styles$2.activePage : ''), type: 'button' }, number)); }))))));
|
|
16462
16462
|
};
|
|
16463
16463
|
|
|
16464
16464
|
var TextAreaField = function (_a) {
|
|
@@ -16792,8 +16792,8 @@ var TableStandardButtons = function (_a) {
|
|
|
16792
16792
|
React.createElement("div", { onClick: function () { return handleClick(row, key); }, style: { cursor: row[key].onClick ? 'pointer' : '' } },
|
|
16793
16793
|
React.createElement("img", { src: row[key].img && row[key].img, alt: key.charAt(0).toUpperCase() + key.slice(1), className: styles$2.img })),
|
|
16794
16794
|
(row[key].typeColumn === '' || !row[key].typeColumn) &&
|
|
16795
|
-
React.createElement("div", { onClick: function () { return handleClick(row, key); }, style: { cursor: row[key].onClick ? 'pointer' : '',
|
|
16796
|
-
row[key].maxLength ? limitaTexto(row[key].value, row[key].maxLength) : row[key].value,
|
|
16795
|
+
React.createElement("div", { onClick: function () { return handleClick(row, key); }, style: { cursor: row[key].onClick ? 'pointer' : '', position: row[key].maxLength ? 'relative' : undefined }, title: row[key].value, className: styles$2.cellIconEye },
|
|
16796
|
+
React.createElement("div", null, row[key].maxLength ? limitaTexto(row[key].value, row[key].maxLength) : row[key].value),
|
|
16797
16797
|
row[key].maxLength &&
|
|
16798
16798
|
React.createElement("div", { className: styles$2.iconEye, onClick: function () { return handleShowTooltip(row[idColumn].value, row[key] && row[key].value ? row[key].value : '', key); } },
|
|
16799
16799
|
React.createElement(FaRegEye, null)),
|
package/dist/esm/index.js
CHANGED
|
@@ -280,7 +280,7 @@ var InputField = function (_a) {
|
|
|
280
280
|
border: (border ? border : ''),
|
|
281
281
|
paddingLeft: (icon && (alignIcon === 'left' || !alignIcon) ? '30px' : '')
|
|
282
282
|
}, readOnly: readonly, required: required, checked: checked, onKeyPress: onKeyPress, onKeyDown: onKeyDown, "data-chave": chave, "data-auto-incremento": autoIncremento, "data-inativo": inativo }),
|
|
283
|
-
(icon && alignIcon === 'right') || busca &&
|
|
283
|
+
((icon && alignIcon === 'right') || busca) &&
|
|
284
284
|
(React.createElement("span", { className: "".concat(busca ? 'fa fa-search' : icon, " ").concat(styles$7.iconInputRight), style: { cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : '' }, onClick: handleActionClick })))) : (React.createElement(React.Fragment, null,
|
|
285
285
|
icon && (alignIcon === 'left' || !alignIcon) &&
|
|
286
286
|
(React.createElement("span", { className: "".concat(icon, " ").concat(styles$7.iconInput), style: { cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : '' }, onClick: handleActionClick })),
|
|
@@ -291,7 +291,7 @@ var InputField = function (_a) {
|
|
|
291
291
|
border: (border ? border : ''),
|
|
292
292
|
paddingLeft: (icon && (alignIcon === 'left' || !alignIcon) ? '30px' : '')
|
|
293
293
|
}, readOnly: readonly, disabled: disabled, required: required, checked: checked, maxLength: type === 'text' ? appliedMaxLength : undefined, onKeyPress: onKeyPress, onBlur: onBlur, onKeyDown: onKeyDown, "data-chave": chave, "data-auto-incremento": autoIncremento, "data-inativo": inativo }),
|
|
294
|
-
(icon && alignIcon === 'right') || busca &&
|
|
294
|
+
((icon && alignIcon === 'right') || busca) &&
|
|
295
295
|
(React.createElement("span", { className: "".concat(busca ? 'fa fa-search' : icon, " ").concat(styles$7.iconInputRight), style: { cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : '' }, onClick: handleActionClick })))),
|
|
296
296
|
type === 'password' && (React.createElement("div", { className: styles$7.passwordToggleIcon, onClick: togglePasswordVisibility }, isPasswordVisible ? React.createElement(FaEyeSlash, { style: { color: colorIcon ? colorIcon : '' } }) : React.createElement(FaEye, { style: { color: colorIcon ? colorIcon : '' } }))))));
|
|
297
297
|
};
|
|
@@ -344,7 +344,7 @@ var getArrowColorByEmpresa = function (empresa) {
|
|
|
344
344
|
}
|
|
345
345
|
};
|
|
346
346
|
var SelectField = function (_a) {
|
|
347
|
-
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, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault, requiredIcon = _a.requiredIcon;
|
|
347
|
+
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, size = _a.size, arrow = _a.arrow, txtOptionDefault = _a.txtOptionDefault, requiredIcon = _a.requiredIcon, inativo = _a.inativo;
|
|
348
348
|
var handleSelectChange = function (e) {
|
|
349
349
|
if (multiple) {
|
|
350
350
|
var selectedOptions = Array.from(e.target.selectedOptions, function (option) { return option.value; });
|
|
@@ -370,7 +370,7 @@ var SelectField = function (_a) {
|
|
|
370
370
|
paddingRight: '2.5rem',
|
|
371
371
|
borderRadius: (borderRadius ? "".concat(borderRadius, "px") : ''),
|
|
372
372
|
border: (border ? border : '')
|
|
373
|
-
}, disabled: disabled, multiple: multiple, required: required },
|
|
373
|
+
}, disabled: disabled, multiple: multiple, required: required, "data-inativo": inativo },
|
|
374
374
|
optionDefault && !multiple && (React.createElement("option", { value: "" }, txtOptionDefault ? txtOptionDefault : 'Selecione...')),
|
|
375
375
|
options.map(function (option) { return (React.createElement("option", { key: option.value, value: option.value }, option.description)); }))));
|
|
376
376
|
};
|
|
@@ -16353,8 +16353,8 @@ var utils/*:any*/ = {
|
|
|
16353
16353
|
}
|
|
16354
16354
|
};
|
|
16355
16355
|
|
|
16356
|
-
var css_248z$2 = ".tableStandard-module_tableContainer__W2g84{margin-bottom:1rem;width:100%}.tableStandard-module_conteudoTableResponsive__FAv-X{overflow-x:auto}.tableStandard-module_tableResponsive__Y1o-v{min-width:
|
|
16357
|
-
var styles$2 = {"tableContainer":"tableStandard-module_tableContainer__W2g84","conteudoTableResponsive":"tableStandard-module_conteudoTableResponsive__FAv-X","tableResponsive":"tableStandard-module_tableResponsive__Y1o-v","row":"tableStandard-module_row__Y-JlA","header":"tableStandard-module_header__csH11","cell":"tableStandard-module_cell__EuhF4","cellBorder":"tableStandard-module_cellBorder__NWT-Y","semResultados":"tableStandard-module_semResultados__vwxkQ","center":"tableStandard-module_center__F69HU","tableNormal":"tableStandard-module_tableNormal__ycOqt","
|
|
16356
|
+
var css_248z$2 = ".tableStandard-module_tableContainer__W2g84{margin-bottom:1rem;width:100%}.tableStandard-module_conteudoTableResponsive__FAv-X{overflow-x:auto}.tableStandard-module_tableResponsive__Y1o-v{min-width:1100px}.tableStandard-module_row__Y-JlA{background-color:#e2e2e2;border-radius:10px;margin-bottom:.5rem;width:100%}.tableStandard-module_header__csH11{color:#fff;padding:1rem}.tableStandard-module_cell__EuhF4{flex:1;max-width:200rem;text-align:center}.tableStandard-module_cellBorder__NWT-Y td,.tableStandard-module_cellBorder__NWT-Y th{border-style:solid;border-width:0 0 1px 1px}.tableStandard-module_cellBorder__NWT-Y td:last-child{border-right-width:1px}.tableStandard-module_semResultados__vwxkQ{justify-content:center}.tableStandard-module_center__F69HU{align-items:center;display:flex;justify-content:center;text-align:center}.tableStandard-module_tableNormal__ycOqt{display:block}.tableStandard-module_cellIconEye__JG88z{display:flex;justify-content:center}.tableStandard-module_icon__OiGeS{color:#fff;cursor:pointer;font-size:25px}.tableStandard-module_iconEye__3Jo-8{cursor:pointer;font-size:15px;position:absolute;right:-13px}.tableStandard-module_boxFiltros__nzimU{display:flex;width:100%}.tableStandard-module_boxFiltros__nzimU div{background-color:#e2e2e2;border-radius:8px;color:#27235f;display:flex;margin-bottom:5px;margin-right:5px;padding:10px;width:100%}.tableStandard-module_boxFiltros__nzimU div label{align-items:center;display:flex;flex-grow:1;font-size:1em;font-weight:700;margin-left:8px;width:50%}.tableStandard-module_boxFiltros__nzimU img{height:auto;vertical-align:middle}.tableStandard-module_formFiltros__SZ6Jj{margin:1rem}.tableStandard-module_excelWrapper__eRjJM{display:flex;justify-content:flex-start;margin-bottom:1rem}.tableStandard-module_actionButton__KCnWY,.tableStandard-module_trashButton__CjJDh{border:none;border-radius:10px;color:#fff;cursor:pointer;padding:10px}.tableStandard-module_trashButton__CjJDh{background-color:var(--red)}.tableStandard-module_trashButton__CjJDh:hover{background-color:var(--blue)}.tableStandard-module_downloadButton__cpITl{background-color:green;border:none;border-radius:10px;color:#fff;cursor:pointer;padding:10px}.tableStandard-module_downloadButton__cpITl:hover{background-color:#038d03}.tableStandard-module_formGroupRadio__4x2bh{align-items:center;display:flex;gap:10px;justify-content:center}.tableStandard-module_formGroupRadio__4x2bh input[type=checkbox]{cursor:pointer}.tableStandard-module_formGroupRadio__4x2bh div{width:auto}.tableStandard-module_img__Ot8rP{max-width:20rem;width:100px}.tableStandard-module_linhasZebradas__vIFYK tr:nth-child(2n){background-color:#fff}.tableStandard-module_linhasZebradas__vIFYK tr:nth-child(odd){background-color:#e2e2e2}.tableStandard-module_tooltip__uBBJu{background-color:#f9f9f9;border:1px solid #ccc;border-radius:5px;box-shadow:0 2px 10px rgba(0,0,0,.1);display:flex;flex-direction:column;gap:8px;max-width:400px;padding:15px;position:absolute;white-space:pre-wrap;z-index:1000}.tableStandard-module_tooltip__uBBJu span{cursor:pointer;display:flex;justify-content:flex-end}.tableStandard-module_tooltip__uBBJu p{font-size:14px;margin:0}.tableStandard-module_pagination__oaWb4{display:flex;margin-top:20px;max-width:100%;overflow-x:auto;padding-bottom:20px}.tableStandard-module_pageButton__lfOmY{background-color:#e2e2e2;border-color:transparent;border-radius:5px;cursor:pointer;margin:0 5px;padding:5px 10px}.tableStandard-module_activePage__qVqau{border-color:transparent;border-radius:5px;color:#fff;font-weight:700}.tableStandard-module_empresa1__c7Oac .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa1__c7Oac .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa1__c7Oac .tableStandard-module_header__csH11{background-color:var(--blue)}.tableStandard-module_empresa1__c7Oac .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa1__c7Oac .tableStandard-module_activePage__qVqau:hover{background-color:var(--red)}.tableStandard-module_empresa3__yaVfZ .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa3__yaVfZ .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa3__yaVfZ .tableStandard-module_header__csH11{background-color:var(--green)}.tableStandard-module_empresa3__yaVfZ .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa3__yaVfZ .tableStandard-module_activePage__qVqau:hover{background-color:var(--lightblue)}.tableStandard-module_empresa4__B-BBN .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa4__B-BBN .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa4__B-BBN .tableStandard-module_header__csH11{background-color:var(--red)}.tableStandard-module_empresa4__B-BBN .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa4__B-BBN .tableStandard-module_activePage__qVqau:hover{background-color:var(--blue)}.tableStandard-module_empresa5__2eHcX .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa5__2eHcX .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa5__2eHcX .tableStandard-module_header__csH11{background-color:var(--cartaoBlue)}.tableStandard-module_empresa5__2eHcX .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa5__2eHcX .tableStandard-module_activePage__qVqau:hover{background-color:var(--cartaoGreen)}.tableStandard-module_empresa6__u-Cqi .tableStandard-module_actionButton__KCnWY,.tableStandard-module_empresa6__u-Cqi .tableStandard-module_activePage__qVqau,.tableStandard-module_empresa6__u-Cqi .tableStandard-module_header__csH11{background-color:var(--sistemaSaudeBlue)}.tableStandard-module_empresa6__u-Cqi .tableStandard-module_actionButton__KCnWY:hover,.tableStandard-module_empresa6__u-Cqi .tableStandard-module_activePage__qVqau:hover{background-color:var(--sistemaSaudeRed)}@media (max-width:1200px){.tableStandard-module_boxFiltros__nzimU,.tableStandard-module_campoFiltrar__d9juT{flex-direction:column;margin-right:1rem;width:auto}.tableStandard-module_caixaCadastroPadrao__3R2vG{width:100%}.tableStandard-module_conteudo__TK-TS{margin:4rem 0 4rem 8rem}.tableStandard-module_tableNormal__ycOqt{display:none}.tableStandard-module_tableResponsive__Y1o-v{display:block}}@media (max-width:950px){.tableStandard-module_campoFiltrar__d9juT{flex-direction:column;width:110%}.tableStandard-module_caixaCadastroPadrao__3R2vG{width:70%}.tableStandard-module_groupInputs__LF8sZ{width:auto}}@media (max-width:850px){.tableStandard-module_iconEye__3Jo-8{font-size:14px}}@media (max-width:600px){.tableStandard-module_caixaCadastroPadrao__3R2vG{width:100%}}@media (max-width:500px){.tableStandard-module_boxFiltros__nzimU div label,.tableStandard-module_labelCadastroPadrao__bfB4n{font-size:12px}.tableStandard-module_caixaCadastroPadrao__3R2vG{width:auto}}";
|
|
16357
|
+
var styles$2 = {"tableContainer":"tableStandard-module_tableContainer__W2g84","conteudoTableResponsive":"tableStandard-module_conteudoTableResponsive__FAv-X","tableResponsive":"tableStandard-module_tableResponsive__Y1o-v","row":"tableStandard-module_row__Y-JlA","header":"tableStandard-module_header__csH11","cell":"tableStandard-module_cell__EuhF4","cellBorder":"tableStandard-module_cellBorder__NWT-Y","semResultados":"tableStandard-module_semResultados__vwxkQ","center":"tableStandard-module_center__F69HU","tableNormal":"tableStandard-module_tableNormal__ycOqt","cellIconEye":"tableStandard-module_cellIconEye__JG88z","icon":"tableStandard-module_icon__OiGeS","iconEye":"tableStandard-module_iconEye__3Jo-8","boxFiltros":"tableStandard-module_boxFiltros__nzimU","formFiltros":"tableStandard-module_formFiltros__SZ6Jj","excelWrapper":"tableStandard-module_excelWrapper__eRjJM","actionButton":"tableStandard-module_actionButton__KCnWY","trashButton":"tableStandard-module_trashButton__CjJDh","downloadButton":"tableStandard-module_downloadButton__cpITl","formGroupRadio":"tableStandard-module_formGroupRadio__4x2bh","img":"tableStandard-module_img__Ot8rP","linhasZebradas":"tableStandard-module_linhasZebradas__vIFYK","tooltip":"tableStandard-module_tooltip__uBBJu","pagination":"tableStandard-module_pagination__oaWb4","pageButton":"tableStandard-module_pageButton__lfOmY","activePage":"tableStandard-module_activePage__qVqau","empresa1":"tableStandard-module_empresa1__c7Oac","empresa3":"tableStandard-module_empresa3__yaVfZ","empresa4":"tableStandard-module_empresa4__B-BBN","empresa5":"tableStandard-module_empresa5__2eHcX","empresa6":"tableStandard-module_empresa6__u-Cqi","campoFiltrar":"tableStandard-module_campoFiltrar__d9juT","caixaCadastroPadrao":"tableStandard-module_caixaCadastroPadrao__3R2vG","conteudo":"tableStandard-module_conteudo__TK-TS","groupInputs":"tableStandard-module_groupInputs__LF8sZ","labelCadastroPadrao":"tableStandard-module_labelCadastroPadrao__bfB4n"};
|
|
16358
16358
|
styleInject(css_248z$2);
|
|
16359
16359
|
|
|
16360
16360
|
var TableStandard = function (_a) {
|
|
@@ -16402,7 +16402,7 @@ var TableStandard = function (_a) {
|
|
|
16402
16402
|
return (React.createElement("div", { className: styles$2.conteudoTableResponsive },
|
|
16403
16403
|
React.createElement("div", { className: styles$2.tableResponsive },
|
|
16404
16404
|
showExcelDownloadButton && (React.createElement("div", { className: styles$2.excelWrapper },
|
|
16405
|
-
React.createElement("button", { onClick: handleDownloadClick, className: styles$2.downloadButton },
|
|
16405
|
+
React.createElement("button", { onClick: handleDownloadClick, className: styles$2.downloadButton, type: 'button' },
|
|
16406
16406
|
React.createElement(FaDownload, null),
|
|
16407
16407
|
" Excel"))),
|
|
16408
16408
|
React.createElement("table", { className: styles$2.tableContainer, cellSpacing: cellSpacing || '2' },
|
|
@@ -16436,27 +16436,27 @@ var TableStandard = function (_a) {
|
|
|
16436
16436
|
e.stopPropagation();
|
|
16437
16437
|
if (onActionClick)
|
|
16438
16438
|
onActionClick(row[idColumn]);
|
|
16439
|
-
}, className: styles$2.actionButton, title: "Editar" },
|
|
16439
|
+
}, className: styles$2.actionButton, title: "Editar", type: 'button' },
|
|
16440
16440
|
React.createElement(FaPen, null))),
|
|
16441
16441
|
showDownloadButton && shouldShowDownloadButton(row[idColumn]) && (React.createElement("button", { onClick: function (e) {
|
|
16442
16442
|
e.stopPropagation();
|
|
16443
16443
|
if (onDownloadClick)
|
|
16444
16444
|
onDownloadClick(row[idColumn]);
|
|
16445
|
-
}, className: styles$2.downloadButton, title: "Download do Arquivo" },
|
|
16445
|
+
}, className: styles$2.downloadButton, title: "Download do Arquivo", type: 'button' },
|
|
16446
16446
|
React.createElement(FaDownload, null))),
|
|
16447
16447
|
showViewButton && (React.createElement("button", { onClick: function (e) {
|
|
16448
16448
|
e.stopPropagation();
|
|
16449
16449
|
if (onViewClick)
|
|
16450
16450
|
onViewClick(row[idColumn]);
|
|
16451
|
-
}, className: styles$2.actionButton, title: "Visualizar" },
|
|
16451
|
+
}, className: styles$2.actionButton, title: "Visualizar", type: 'button' },
|
|
16452
16452
|
React.createElement(FaEye, null))),
|
|
16453
16453
|
showTrash && (React.createElement("button", { onClick: function (e) {
|
|
16454
16454
|
e.stopPropagation();
|
|
16455
16455
|
if (onTrashClick)
|
|
16456
16456
|
onTrashClick(row[idColumn]);
|
|
16457
|
-
}, className: styles$2.trashButton, title: "Excluir" },
|
|
16457
|
+
}, className: styles$2.trashButton, title: "Excluir", type: 'button' },
|
|
16458
16458
|
React.createElement(FaRegTrashAlt, null)))))))); }))),
|
|
16459
|
-
paginacao && (React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$2.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return handlePageChange(number); }, className: "".concat(styles$2.pageButton, " ").concat(localPage === number ? styles$2.activePage : '') }, number)); }))))));
|
|
16459
|
+
paginacao && (React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$2.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return handlePageChange(number); }, className: "".concat(styles$2.pageButton, " ").concat(localPage === number ? styles$2.activePage : ''), type: 'button' }, number)); }))))));
|
|
16460
16460
|
};
|
|
16461
16461
|
|
|
16462
16462
|
var TextAreaField = function (_a) {
|
|
@@ -16790,8 +16790,8 @@ var TableStandardButtons = function (_a) {
|
|
|
16790
16790
|
React.createElement("div", { onClick: function () { return handleClick(row, key); }, style: { cursor: row[key].onClick ? 'pointer' : '' } },
|
|
16791
16791
|
React.createElement("img", { src: row[key].img && row[key].img, alt: key.charAt(0).toUpperCase() + key.slice(1), className: styles$2.img })),
|
|
16792
16792
|
(row[key].typeColumn === '' || !row[key].typeColumn) &&
|
|
16793
|
-
React.createElement("div", { onClick: function () { return handleClick(row, key); }, style: { cursor: row[key].onClick ? 'pointer' : '',
|
|
16794
|
-
row[key].maxLength ? limitaTexto(row[key].value, row[key].maxLength) : row[key].value,
|
|
16793
|
+
React.createElement("div", { onClick: function () { return handleClick(row, key); }, style: { cursor: row[key].onClick ? 'pointer' : '', position: row[key].maxLength ? 'relative' : undefined }, title: row[key].value, className: styles$2.cellIconEye },
|
|
16794
|
+
React.createElement("div", null, row[key].maxLength ? limitaTexto(row[key].value, row[key].maxLength) : row[key].value),
|
|
16795
16795
|
row[key].maxLength &&
|
|
16796
16796
|
React.createElement("div", { className: styles$2.iconEye, onClick: function () { return handleShowTooltip(row[idColumn].value, row[key] && row[key].value ? row[key].value : '', key); } },
|
|
16797
16797
|
React.createElement(FaRegEye, null)),
|
package/package.json
CHANGED
|
@@ -155,7 +155,7 @@ const InputField: React.FC<InputFieldProps> = ({
|
|
|
155
155
|
data-auto-incremento={autoIncremento}
|
|
156
156
|
data-inativo={inativo}
|
|
157
157
|
/>
|
|
158
|
-
{(icon && alignIcon === 'right') || busca &&
|
|
158
|
+
{((icon && alignIcon === 'right') || busca) &&
|
|
159
159
|
(<span className={`${busca ? 'fa fa-search' : icon} ${styles.iconInputRight}`} style={{cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : ''}} onClick={handleActionClick}></span>)
|
|
160
160
|
}
|
|
161
161
|
</>
|
|
@@ -191,7 +191,7 @@ const InputField: React.FC<InputFieldProps> = ({
|
|
|
191
191
|
data-auto-incremento={autoIncremento}
|
|
192
192
|
data-inativo={inativo}
|
|
193
193
|
/>
|
|
194
|
-
{(icon && alignIcon === 'right') || busca &&
|
|
194
|
+
{((icon && alignIcon === 'right') || busca) &&
|
|
195
195
|
(<span className={`${busca ? 'fa fa-search' : icon} ${styles.iconInputRight}`} style={{cursor: functionIcon ? 'pointer' : '', color: colorIcon ? colorIcon : ''}} onClick={handleActionClick}></span>)
|
|
196
196
|
}
|
|
197
197
|
</>
|
|
@@ -27,6 +27,7 @@ export interface SelectComponentProps {
|
|
|
27
27
|
arrow?: boolean;
|
|
28
28
|
txtOptionDefault?: string;
|
|
29
29
|
requiredIcon?: boolean;
|
|
30
|
+
inativo?: boolean;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
// Função para mapear empresa com a cor da seta
|
|
@@ -61,7 +62,8 @@ const SelectField: React.FC<SelectComponentProps> = ({
|
|
|
61
62
|
size,
|
|
62
63
|
arrow,
|
|
63
64
|
txtOptionDefault,
|
|
64
|
-
requiredIcon
|
|
65
|
+
requiredIcon,
|
|
66
|
+
inativo
|
|
65
67
|
}) => {
|
|
66
68
|
|
|
67
69
|
const handleSelectChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
|
@@ -108,6 +110,7 @@ const SelectField: React.FC<SelectComponentProps> = ({
|
|
|
108
110
|
disabled={disabled}
|
|
109
111
|
multiple={multiple}
|
|
110
112
|
required={required}
|
|
113
|
+
data-inativo={inativo}
|
|
111
114
|
>
|
|
112
115
|
{optionDefault && !multiple && (
|
|
113
116
|
<option value="">{txtOptionDefault ? txtOptionDefault : 'Selecione...'}</option>
|
|
@@ -114,7 +114,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
114
114
|
<div className={styles.tableResponsive}>
|
|
115
115
|
{showExcelDownloadButton && (
|
|
116
116
|
<div className={styles.excelWrapper}>
|
|
117
|
-
<button onClick={handleDownloadClick} className={styles.downloadButton}>
|
|
117
|
+
<button onClick={handleDownloadClick} className={styles.downloadButton} type='button'>
|
|
118
118
|
<FaDownload /> Excel
|
|
119
119
|
</button>
|
|
120
120
|
</div>
|
|
@@ -194,6 +194,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
194
194
|
}}
|
|
195
195
|
className={styles.actionButton}
|
|
196
196
|
title="Editar"
|
|
197
|
+
type='button'
|
|
197
198
|
>
|
|
198
199
|
<FaPen />
|
|
199
200
|
</button>
|
|
@@ -207,6 +208,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
207
208
|
}}
|
|
208
209
|
className={styles.downloadButton}
|
|
209
210
|
title="Download do Arquivo"
|
|
211
|
+
type='button'
|
|
210
212
|
>
|
|
211
213
|
<FaDownload />
|
|
212
214
|
</button>
|
|
@@ -220,6 +222,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
220
222
|
}}
|
|
221
223
|
className={styles.actionButton}
|
|
222
224
|
title="Visualizar"
|
|
225
|
+
type='button'
|
|
223
226
|
>
|
|
224
227
|
<FaEye />
|
|
225
228
|
</button>
|
|
@@ -233,6 +236,7 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
233
236
|
}}
|
|
234
237
|
className={styles.trashButton}
|
|
235
238
|
title="Excluir"
|
|
239
|
+
type='button'
|
|
236
240
|
>
|
|
237
241
|
<FaRegTrashAlt />
|
|
238
242
|
</button>
|
|
@@ -247,7 +251,12 @@ const TableStandard: React.FC<TableStandardProps> = ({
|
|
|
247
251
|
{paginacao && (
|
|
248
252
|
<div className={`${empresaClass} ${styles.pagination}`}>
|
|
249
253
|
{pageNumbers.map(number => (
|
|
250
|
-
<button
|
|
254
|
+
<button
|
|
255
|
+
key={number}
|
|
256
|
+
onClick={() => handlePageChange(number)}
|
|
257
|
+
className={`${styles.pageButton} ${localPage === number ? styles.activePage : ''}`}
|
|
258
|
+
type='button'
|
|
259
|
+
>
|
|
251
260
|
{number}
|
|
252
261
|
</button>
|
|
253
262
|
))}
|
|
@@ -278,11 +278,14 @@ const TableStandardButtons: React.FC<TableStandardButtonsProps> = ({
|
|
|
278
278
|
{(row[key].typeColumn === '' || !row[key].typeColumn) &&
|
|
279
279
|
<div
|
|
280
280
|
onClick={() => handleClick(row, key)}
|
|
281
|
-
style={{cursor: row[key].onClick ? 'pointer' : '',
|
|
281
|
+
style={{cursor: row[key].onClick ? 'pointer' : '', position: row[key].maxLength ? 'relative' : undefined}}
|
|
282
282
|
title={row[key].value}
|
|
283
|
+
className={styles.cellIconEye}
|
|
283
284
|
>
|
|
284
285
|
{/* Se o maxlength vier preenchido, limita o texto de acordo com ele */}
|
|
285
|
-
|
|
286
|
+
<div>
|
|
287
|
+
{row[key].maxLength ? limitaTexto(row[key].value, row[key].maxLength) : row[key].value}
|
|
288
|
+
</div>
|
|
286
289
|
|
|
287
290
|
{/* Se o maxlength vier preenchido, mostra o ícone do olho e ao clicar nele é exbido o texto completo */}
|
|
288
291
|
{row[key].maxLength &&
|
|
@@ -84,6 +84,10 @@ const meta: Meta<SelectComponentProps> = {
|
|
|
84
84
|
requiredIcon:{
|
|
85
85
|
control: 'boolean',
|
|
86
86
|
description: 'Coloca um asterisco vermelho antes da label',
|
|
87
|
+
},
|
|
88
|
+
inativo: {
|
|
89
|
+
control: 'boolean',
|
|
90
|
+
description: 'Define se o campo está inativo',
|
|
87
91
|
}
|
|
88
92
|
},
|
|
89
93
|
};
|
|
@@ -86,11 +86,11 @@ const Template: StoryFn<TableStandardButtonsProps> = (args) => <TableStandardBut
|
|
|
86
86
|
const sampleData: Data[] = [
|
|
87
87
|
{
|
|
88
88
|
id: {value: '1', typeColumn: 'hidden', iconButton: '', colorButton: 'var(--red)', initialValue: ''},
|
|
89
|
-
nome: {value: 'Carlos Souza Silva', typeColumn: '', iconButton: '', colorButton: 'var(--red)', initialValue: '', maxLength:
|
|
89
|
+
nome: {value: 'Carlos Souza SilvaCarlos Souza Silva', typeColumn: '', iconButton: '', colorButton: 'var(--red)', initialValue: '', maxLength: 20},
|
|
90
90
|
historico: {value: '40', typeColumn: 'icon', iconButton: 'fa fa-users', colorButton: 'var(--red)', initialValue: ''},
|
|
91
91
|
idade: {value: '40', typeColumn: '', iconButton: '', colorButton: 'var(--red)', initialValue: ''},
|
|
92
92
|
visualizar: {value: 'Visualizar', typeColumn: 'button', iconButton: '', colorButton: 'var(--red)', initialValue: '', borderRadius: '5', inativo: true},
|
|
93
|
-
cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', initialValue: '',
|
|
93
|
+
cargo: {value: 'Analista', typeColumn: '', iconButton: '', colorButton: 'var(--red)', initialValue: '',},
|
|
94
94
|
padrao: {value: '1', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', initialValue: '',},
|
|
95
95
|
ativo: {value: '2', typeColumn: 'checkbox', iconButton: '', colorButton: 'var(--red)', initialValue: '1', disabled: true},
|
|
96
96
|
teste: {value: '1', typeColumn: 'hidden', iconButton: '', colorButton: 'var(--red)', initialValue: '1',},
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
.tableResponsive {
|
|
13
13
|
/* overflow-x: auto; */
|
|
14
14
|
/* margin: 1rem; */
|
|
15
|
-
min-width:
|
|
15
|
+
min-width: 1100px;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.row {
|
|
@@ -57,6 +57,24 @@
|
|
|
57
57
|
display: block;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
.cellIconEye{
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.icon{
|
|
66
|
+
font-size: 25px;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
color: white;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.iconEye{
|
|
72
|
+
position: absolute;
|
|
73
|
+
right: -13px;
|
|
74
|
+
font-size: 15px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
|
|
60
78
|
.boxFiltros {
|
|
61
79
|
width: 100%;
|
|
62
80
|
display: flex;
|
|
@@ -132,20 +150,6 @@
|
|
|
132
150
|
background-color: rgb(3, 141, 3);
|
|
133
151
|
}
|
|
134
152
|
|
|
135
|
-
.icon{
|
|
136
|
-
font-size: 25px;
|
|
137
|
-
cursor: pointer;
|
|
138
|
-
color: white;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.iconEye{
|
|
142
|
-
position: absolute;
|
|
143
|
-
right: 0;
|
|
144
|
-
/*top: 20px;*/
|
|
145
|
-
font-size: 18px;
|
|
146
|
-
cursor: pointer;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
153
|
.formGroupRadio{
|
|
150
154
|
display: flex;
|
|
151
155
|
align-items: center;
|