@ssplib/react-components 0.0.285 → 0.0.286
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.
|
@@ -28,12 +28,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const material_1 = require("@mui/material");
|
|
30
30
|
const system_1 = require("@mui/system");
|
|
31
|
+
const axios_1 = __importDefault(require("axios"));
|
|
31
32
|
const lodash_get_1 = __importDefault(require("lodash.get"));
|
|
32
33
|
const react_1 = __importStar(require("react"));
|
|
34
|
+
const react_dropzone_1 = require("react-dropzone");
|
|
33
35
|
const auth_1 = require("../../../context/auth");
|
|
34
36
|
const form_1 = require("../../../context/form");
|
|
35
|
-
const react_dropzone_1 = require("react-dropzone");
|
|
36
|
-
const axios_1 = __importDefault(require("axios"));
|
|
37
37
|
const icons_1 = require("../../icons/icons");
|
|
38
38
|
function bytesToMegabytes(bytes) {
|
|
39
39
|
const megabytes = bytes / (1024 * 1024);
|
|
@@ -51,13 +51,6 @@ function bytesToKBorMB(bytes) {
|
|
|
51
51
|
return `${MBValue.toFixed(1)}MB`;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function LinearProgressWithLabel(props) {
|
|
55
|
-
return (react_1.default.createElement(material_1.Box, { sx: { display: 'flex', alignItems: 'center' } },
|
|
56
|
-
react_1.default.createElement(material_1.Box, { sx: { width: '100%', mr: 1 } },
|
|
57
|
-
react_1.default.createElement(material_1.LinearProgress, Object.assign({ variant: 'determinate' }, props))),
|
|
58
|
-
react_1.default.createElement(material_1.Box, { sx: { minWidth: 3 } },
|
|
59
|
-
react_1.default.createElement(material_1.Typography, { variant: 'body2', color: 'text.secondary' }, `${Math.round(props.value)}%`))));
|
|
60
|
-
}
|
|
61
54
|
function DropFileUpload({ name, tipoArquivo, title, required = false, multiple = false, apiURL, sizeLimit = 4, xs = 12, sm, md, route = '', tstToken = '', dropZoneOptions, }) {
|
|
62
55
|
const { getRootProps, getInputProps } = (0, react_dropzone_1.useDropzone)(Object.assign({ multiple, useFsAccessApi: true, onDrop: (dropFiles) => {
|
|
63
56
|
const fileList = [];
|
|
@@ -219,7 +212,7 @@ function DropFileUpload({ name, tipoArquivo, title, required = false, multiple =
|
|
|
219
212
|
backgroundColor: '#DE3F50',
|
|
220
213
|
borderRadius: '8px',
|
|
221
214
|
} }, "Remover")))),
|
|
222
|
-
progress > 0 && progress < 100 && (react_1.default.createElement(
|
|
215
|
+
progress > 0 && progress < 100 && (react_1.default.createElement(material_1.LinearProgress, { value: progress, sx: {
|
|
223
216
|
backgroundColor: '#103D6A',
|
|
224
217
|
'.MuiLinearProgress-bar': {
|
|
225
218
|
backgroundColor: '#BDDDFA',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssplib/react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.286",
|
|
4
4
|
"description": "SSP React Components",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Pedro Henrique <sr.hudrick@gmail.com>",
|
|
@@ -37,15 +37,9 @@
|
|
|
37
37
|
"type": "git",
|
|
38
38
|
"url": "git+https://github.com/SSPDF/ssp-components.git"
|
|
39
39
|
},
|
|
40
|
-
"keywords": [
|
|
41
|
-
"front",
|
|
42
|
-
"react",
|
|
43
|
-
"components",
|
|
44
|
-
"ssp",
|
|
45
|
-
"df"
|
|
46
|
-
],
|
|
40
|
+
"keywords": ["front", "react", "components", "ssp", "df"],
|
|
47
41
|
"bugs": {
|
|
48
42
|
"url": "https://github.com/SSPDF/ssp-components/issues"
|
|
49
43
|
},
|
|
50
44
|
"homepage": "https://github.com/SSPDF/ssp-components#readme"
|
|
51
|
-
}
|
|
45
|
+
}
|