@ssplib/react-components 0.0.57 → 0.0.59
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.
|
@@ -136,12 +136,10 @@ function FileUpload({ name, tipoArquivo, title, required = false, multiple = fal
|
|
|
136
136
|
md: 'flex',
|
|
137
137
|
},
|
|
138
138
|
} },
|
|
139
|
-
react_1.default.createElement(material_1.Box, { sx: { width: '100%', marginRight: { xs: 0, md: 1 }, marginBottom: { xs: 1, md: 0 } } },
|
|
140
|
-
react_1.default.createElement(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
react_1.default.createElement("label", { htmlFor: name + 'foto' },
|
|
144
|
-
react_1.default.createElement(material_1.Button, { variant: 'contained', disableElevation: true, startIcon: react_1.default.createElement(CameraAlt_1.default, null), component: 'span', sx: { textTransform: 'none', backgroundColor: '#0096c7' }, fullWidth: true }, "Tirar foto")))),
|
|
139
|
+
react_1.default.createElement(material_1.Box, { sx: { width: '100%', marginRight: { xs: 0, md: 1 }, marginBottom: { xs: 1, md: 0 } } }, !multiple && files.length >= 1 ? (react_1.default.createElement(material_1.Button, { disabled: true, variant: 'contained', disableElevation: true, startIcon: react_1.default.createElement(InsertDriveFile_1.default, null), component: 'span', sx: { textTransform: 'none' }, fullWidth: true }, title)) : (react_1.default.createElement("label", { htmlFor: name },
|
|
140
|
+
react_1.default.createElement(material_1.Button, { variant: 'contained', disableElevation: true, startIcon: react_1.default.createElement(InsertDriveFile_1.default, null), component: 'span', sx: { textTransform: 'none' }, fullWidth: true }, title)))),
|
|
141
|
+
react_1.default.createElement(material_1.Box, { sx: { width: '100%' } }, !multiple && files.length >= 1 ? (react_1.default.createElement(material_1.Button, { disabled: true, variant: 'contained', disableElevation: true, startIcon: react_1.default.createElement(CameraAlt_1.default, null), component: 'span', sx: { textTransform: 'none', backgroundColor: '#0096c7' }, fullWidth: true }, "Tirar foto")) : (react_1.default.createElement("label", { htmlFor: name + 'foto' },
|
|
142
|
+
react_1.default.createElement(material_1.Button, { variant: 'contained', disableElevation: true, startIcon: react_1.default.createElement(CameraAlt_1.default, null), component: 'span', sx: { textTransform: 'none', backgroundColor: '#0096c7' }, fullWidth: true }, "Tirar foto"))))),
|
|
145
143
|
react_1.default.createElement(material_1.Typography, { fontWeight: 600, paddingY: 1, color: 'black' },
|
|
146
144
|
"Voc\u00EA selecionou ",
|
|
147
145
|
files.length,
|
|
@@ -54,7 +54,7 @@ function MaskInput(props) {
|
|
|
54
54
|
const onChangeInput = (0, react_1.useCallback)((e) => {
|
|
55
55
|
setInputValue(e.target.value);
|
|
56
56
|
}, []);
|
|
57
|
-
return (react_1.default.createElement(material_1.TextField, Object.assign({}, props.formConfig, { value: inputValue, onFocus: (e) => setMaskValue(e.target.value), onChange: onChangeInput, InputProps: {
|
|
57
|
+
return (react_1.default.createElement(material_1.TextField, Object.assign({}, props.formConfig, { autoComplete: 'off', value: inputValue, onFocus: (e) => setMaskValue(e.target.value), onChange: onChangeInput, InputProps: {
|
|
58
58
|
inputComponent: TextMaskCustom,
|
|
59
59
|
inputProps: { maskProps: props.maskProps, onMask: props.onMask, maskValue, setMaskValue },
|
|
60
60
|
}, disabled: props.disabled, fullWidth: true })));
|
|
@@ -289,9 +289,12 @@ function Table({ columns, fetchFunc, emptyMsg = {
|
|
|
289
289
|
react_1.default.createElement(Grid_1.default, { item: true, xs: 12, md: 12 / columnSize },
|
|
290
290
|
react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'center', justifyContent: isSmall ? 'start' : 'flex-end', sx: { height: '100%', paddingBottom: isSmall ? 2 : 0 } }, action(x))))))))),
|
|
291
291
|
getMaxItems().length > 0 && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
292
|
-
csv && (react_1.default.createElement(material_1.Stack, { direction:
|
|
293
|
-
|
|
294
|
-
|
|
292
|
+
csv && (react_1.default.createElement(material_1.Stack, { direction: {
|
|
293
|
+
xs: 'column',
|
|
294
|
+
md: 'row',
|
|
295
|
+
}, justifyContent: 'flex-end', marginTop: 2, spacing: 1 },
|
|
296
|
+
csvShowAllButton && (react_1.default.createElement(material_1.Button, { startIcon: react_1.default.createElement(FileDownload_1.default, null), variant: 'contained', size: 'small', onClick: downloadCSVAll, sx: { backgroundColor: '#64748B', marginRight: { xs: 2, md: 0 }, width: { xs: '100%', md: 'fit-content' } } }, csvAllButtonTitle)),
|
|
297
|
+
react_1.default.createElement(material_1.Button, { startIcon: react_1.default.createElement(FileDownload_1.default, null), variant: 'contained', size: 'small', onClick: downloadCSV, sx: { backgroundColor: '#22C55E', marginRight: { xs: 2, md: 0 }, width: { xs: '100%', md: 'fit-content' } } }, csvButtonTitle))),
|
|
295
298
|
react_1.default.createElement(material_1.Stack, { direction: 'row', justifyContent: 'center', paddingY: 4 },
|
|
296
299
|
react_1.default.createElement(Pagination_1.default, { count: paginationCount, siblingCount: isSmall ? 0 : 1, size: 'large', onChange: onPaginationChange, page: listPage })))))));
|
|
297
300
|
}
|