@synerise/ds-file-uploader 1.0.21 → 1.0.22
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.22](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@1.0.21...@synerise/ds-file-uploader@1.0.22) (2025-08-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **file-uploader:** ellipsis for file name ([a18d2de](https://github.com/Synerise/synerise-design/commit/a18d2de070615f9865aeee9f5efb44bcfbb2a9f6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.0.21](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@1.0.20...@synerise/ds-file-uploader@1.0.21) (2025-08-20)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @synerise/ds-file-uploader
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileView.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAiBxC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,QAAA,MAAM,QAAQ,GAAI,gEAOf,aAAa,
|
|
1
|
+
{"version":3,"file":"FileView.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAiBxC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,QAAA,MAAM,QAAQ,GAAI,gEAOf,aAAa,sBA6Kf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -3,7 +3,7 @@ import filesize from 'filesize.js';
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl';
|
|
5
5
|
import Button from '@synerise/ds-button';
|
|
6
|
-
import {
|
|
6
|
+
import { useTheme } from '@synerise/ds-core';
|
|
7
7
|
import Icon, { Check3M, Close3M, FileM, RepeatM, WarningFillM } from '@synerise/ds-icon';
|
|
8
8
|
import ProgressBar from '@synerise/ds-progress-bar';
|
|
9
9
|
import Tooltip from '@synerise/ds-tooltip';
|
|
@@ -19,6 +19,7 @@ var FileView = function FileView(_ref) {
|
|
|
19
19
|
var getFriendlySize = function getFriendlySize(size) {
|
|
20
20
|
return filesize(size || 0);
|
|
21
21
|
};
|
|
22
|
+
var theme = useTheme();
|
|
22
23
|
var disabled = data.disabled,
|
|
23
24
|
error = data.error,
|
|
24
25
|
file = data.file,
|
|
@@ -87,7 +88,7 @@ var FileView = function FileView(_ref) {
|
|
|
87
88
|
size: 24
|
|
88
89
|
})), /*#__PURE__*/React.createElement(S.Info, {
|
|
89
90
|
progress: hasProgress
|
|
90
|
-
}, hasProgress ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Name, null, file.name,
|
|
91
|
+
}, hasProgress ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Name, null, /*#__PURE__*/React.createElement(S.FileName, null, file.name), ' ', /*#__PURE__*/React.createElement(S.FileWeight, null, filesize(progress / 100 * file.size))), /*#__PURE__*/React.createElement("div", {
|
|
91
92
|
style: {
|
|
92
93
|
display: 'flex'
|
|
93
94
|
}
|
|
@@ -102,7 +103,7 @@ var FileView = function FileView(_ref) {
|
|
|
102
103
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
103
104
|
component: /*#__PURE__*/React.createElement(Close3M, null),
|
|
104
105
|
size: 20
|
|
105
|
-
}))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Name, null, file.name), /*#__PURE__*/React.createElement(S.SizeOrError, null, error || /*#__PURE__*/React.createElement(React.Fragment, null, finalTexts.size, " ", getFriendlySize(file.size))))), error && retry && !hasProgress && /*#__PURE__*/React.createElement(Button, {
|
|
106
|
+
}))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.Name, null, /*#__PURE__*/React.createElement(S.FileName, null, file.name)), /*#__PURE__*/React.createElement(S.SizeOrError, null, error || /*#__PURE__*/React.createElement(React.Fragment, null, finalTexts.size, " ", getFriendlySize(file.size))))), error && retry && !hasProgress && /*#__PURE__*/React.createElement(Button, {
|
|
106
107
|
onClick: function onClick(event) {
|
|
107
108
|
onRemove && onRemove();
|
|
108
109
|
if (retryButtonProps != null && retryButtonProps.onClick) {
|
|
@@ -5,6 +5,7 @@ export declare const Info: import("styled-components").StyledComponent<"div", an
|
|
|
5
5
|
}, never>;
|
|
6
6
|
export declare const PopconfirmOnRemove: import("styled-components").StyledComponent<import("@synerise/ds-popconfirm/dist/Popconfirm.types").PopconfirmType, any, {}, never>;
|
|
7
7
|
export declare const FileWeight: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const FileName: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
9
|
export declare const Name: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
9
10
|
export declare const SizeOrError: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("antd/lib/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, any, {}, never>;
|
|
10
11
|
export declare const RemoveWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileView.styles.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,IAAI;cAA0B,OAAO;SAIjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,qIAQ9B,CAAC;AACF,eAAO,MAAM,UAAU,oEAKtB,CAAC;
|
|
1
|
+
{"version":3,"file":"FileView.styles.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,IAAI;cAA0B,OAAO;SAIjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,qIAQ9B,CAAC;AACF,eAAO,MAAM,UAAU,oEAKtB,CAAC;AACF,eAAO,MAAM,QAAQ,oEAKpB,CAAC;AACF,eAAO,MAAM,IAAI,sEAShB,CAAC;AAEF,eAAO,MAAM,WAAW,uMAIvB,CAAC;AACF,eAAO,MAAM,aAAa,oEAyBzB,CAAC;AACF,eAAO,MAAM,kBAAkB,oEAsB9B,CAAC;AACF,eAAO,MAAM,mBAAmB;cAA0B,OAAO;SA0BhE,CAAC;AAEF,eAAO,MAAM,iBAAiB;eACjB,OAAO;YACV,OAAO;gBACH,OAAO;cACT,OAAO;eACN,OAAO;cACR,OAAO;SAqFlB,CAAC"}
|
|
@@ -32,21 +32,25 @@ export var FileWeight = styled.div.withConfig({
|
|
|
32
32
|
})(["color:", ";padding-right:30px;font-weight:normal;font-size:13px;"], function (props) {
|
|
33
33
|
return props.theme.palette['grey-500'];
|
|
34
34
|
});
|
|
35
|
+
export var FileName = styled.div.withConfig({
|
|
36
|
+
displayName: "FileViewstyles__FileName",
|
|
37
|
+
componentId: "sc-wpdc66-5"
|
|
38
|
+
})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;"]);
|
|
35
39
|
export var Name = styled(Label).withConfig({
|
|
36
40
|
displayName: "FileViewstyles__Name",
|
|
37
|
-
componentId: "sc-wpdc66-
|
|
38
|
-
})(["&&{color:", ";
|
|
41
|
+
componentId: "sc-wpdc66-6"
|
|
42
|
+
})(["&&{color:", ";max-width:100%;cursor:initial;white-space:nowrap;display:flex;justify-content:space-between;}"], function (props) {
|
|
39
43
|
return props.theme.palette['grey-600'];
|
|
40
44
|
});
|
|
41
45
|
export var SizeOrError = styled(Typography.Text).withConfig({
|
|
42
46
|
displayName: "FileViewstyles__SizeOrError",
|
|
43
|
-
componentId: "sc-wpdc66-
|
|
47
|
+
componentId: "sc-wpdc66-7"
|
|
44
48
|
})(["&&{color:", ";}"], function (props) {
|
|
45
49
|
return props.theme.palette['grey-600'];
|
|
46
50
|
});
|
|
47
51
|
export var RemoveWrapper = styled.div.withConfig({
|
|
48
52
|
displayName: "FileViewstyles__RemoveWrapper",
|
|
49
|
-
componentId: "sc-wpdc66-
|
|
53
|
+
componentId: "sc-wpdc66-8"
|
|
50
54
|
})(["display:flex;background-color:transparent;z-index:10;border:0;padding:0;margin:0;height:16px;width:16px;position:absolute;top:14px;right:10px;cursor:pointer;", "{position:absolute;right:-2px;top:-2px;transition:color 0.3s;color:", ";&:hover{color:", ";}}"], IconContainer, function (props) {
|
|
51
55
|
return props.theme.palette['grey-300'];
|
|
52
56
|
}, function (props) {
|
|
@@ -54,7 +58,7 @@ export var RemoveWrapper = styled.div.withConfig({
|
|
|
54
58
|
});
|
|
55
59
|
export var CheckButtonWrapper = styled.div.withConfig({
|
|
56
60
|
displayName: "FileViewstyles__CheckButtonWrapper",
|
|
57
|
-
componentId: "sc-wpdc66-
|
|
61
|
+
componentId: "sc-wpdc66-9"
|
|
58
62
|
})(["display:flex;background-color:transparent;z-index:10;margin:0;height:16px;width:16px;position:absolute;top:14px;right:10px;cursor:pointer;", "{position:absolute;right:-2px;top:-2px;transition:color 0.3s;color:", ";&:hover{color:", ";}}"], IconContainer, function (props) {
|
|
59
63
|
return props.theme.palette['green-600'];
|
|
60
64
|
}, function (props) {
|
|
@@ -62,7 +66,7 @@ export var CheckButtonWrapper = styled.div.withConfig({
|
|
|
62
66
|
});
|
|
63
67
|
export var RemoveButtonWrapper = styled.div.withConfig({
|
|
64
68
|
displayName: "FileViewstyles__RemoveButtonWrapper",
|
|
65
|
-
componentId: "sc-wpdc66-
|
|
69
|
+
componentId: "sc-wpdc66-10"
|
|
66
70
|
})(["display:", ";background-color:transparent;z-index:10;border:0;padding:0;margin:0;height:16px;width:16px;position:absolute;top:14px;right:10px;cursor:pointer;overflow:", ";", "{position:absolute;right:-2px;top:-2px;transition:color 0.3s;color:", ";&:hover{color:", ";}}"], function (props) {
|
|
67
71
|
return props.pressed ? 'flex' : 'none';
|
|
68
72
|
}, function (props) {
|
|
@@ -74,7 +78,7 @@ export var RemoveButtonWrapper = styled.div.withConfig({
|
|
|
74
78
|
});
|
|
75
79
|
export var FileViewContainer = styled.button.withConfig({
|
|
76
80
|
displayName: "FileViewstyles__FileViewContainer",
|
|
77
|
-
componentId: "sc-wpdc66-
|
|
81
|
+
componentId: "sc-wpdc66-11"
|
|
78
82
|
})(["background-color:", ";border-radius:3px;border:1px solid ", ";display:flex;align-items:center;padding:12px 6px;height:48px;width:100%;text-align:left;line-height:initial;position:relative;margin:0 0 12px;&:last-of-type{margin:0;}&:hover{border-color:", ";", "}&:hover{", "}&:focus{border-color:", ";background-color:", ";", "}&:hover{background-color:", ";}&:active{border-color:", ";background-color:", ";}", ";", ";.ant-progress-line{margin:8px 0 0 !important;width:93%;}"], function (props) {
|
|
79
83
|
return props.theme.palette.white;
|
|
80
84
|
}, function (props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-file-uploader",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"description": "FileUploader UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-button": "^1.4.
|
|
38
|
-
"@synerise/ds-icon": "^1.7.
|
|
39
|
-
"@synerise/ds-loader": "^1.0.
|
|
40
|
-
"@synerise/ds-popconfirm": "^1.0.
|
|
41
|
-
"@synerise/ds-progress-bar": "^1.1.
|
|
42
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
43
|
-
"@synerise/ds-typography": "^1.0.
|
|
44
|
-
"@synerise/ds-utils": "^1.4.
|
|
37
|
+
"@synerise/ds-button": "^1.4.9",
|
|
38
|
+
"@synerise/ds-icon": "^1.7.1",
|
|
39
|
+
"@synerise/ds-loader": "^1.0.8",
|
|
40
|
+
"@synerise/ds-popconfirm": "^1.0.21",
|
|
41
|
+
"@synerise/ds-progress-bar": "^1.1.14",
|
|
42
|
+
"@synerise/ds-tooltip": "^1.1.17",
|
|
43
|
+
"@synerise/ds-typography": "^1.0.19",
|
|
44
|
+
"@synerise/ds-utils": "^1.4.1",
|
|
45
45
|
"filesize.js": "^2.0.0",
|
|
46
46
|
"react-dropzone": "^10.2.1"
|
|
47
47
|
},
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
52
52
|
"styled-components": "^5.3.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "5f5d424cf8c7fa89e231c36a45f5ab3e4cfac8e7"
|
|
55
55
|
}
|