@pareto-engineering/design-system 4.8.2 → 4.9.0

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.
@@ -36,7 +36,6 @@ $default-height: var(--notification-height, 5rem);
36
36
  > .message {
37
37
  font-size: calc(var(--s0) * 1rem);
38
38
  margin-left: calc($default-margin / 2);
39
- text-transform: capitalize;
40
39
  }
41
40
 
42
41
  > span {
@@ -135,7 +135,8 @@ const FileUpload = _ref => {
135
135
  fileIndex: indx,
136
136
  identifier: file?.id || file.name
137
137
  }),
138
- uploadStatus: uploadStatus?.[file?.name]
138
+ uploadStatus: uploadStatus?.[file?.name]?.status,
139
+ uploadProgress: uploadStatus?.[file?.name]?.progress
139
140
  })))));
140
141
  };
141
142
  FileUpload.propTypes = {
@@ -45,11 +45,10 @@ const Preview = _ref => {
45
45
  } = _ref;
46
46
  const isFileObject = file instanceof File;
47
47
  const type = isFileObject ? (0, _utils.getFileType)(file) : (0, _utils.getFileTypeFromUrl)(file?.url);
48
- const status = uploadStatus?.status;
49
- const statusColor = statusColorMap[status] ?? color;
50
- const isPending = status === 'pending';
48
+ const statusColor = statusColorMap[uploadStatus] ?? color;
49
+ const isPending = uploadStatus === 'pending';
51
50
  // isPreview means the file is uploaded and previewed while other files can still be uploaded
52
- const isSuccess = status === 'success' || file?.isPreview;
51
+ const isSuccess = uploadStatus === 'success' || file?.isPreview;
53
52
  const handlePreview = () => {
54
53
  if (!isFileObject) {
55
54
  window.open(file.url, '_blank');
@@ -124,6 +123,6 @@ Preview.propTypes = {
124
123
  };
125
124
  Preview.defaultProps = {
126
125
  color: 'green',
127
- uploadProgress: 45
126
+ uploadProgress: 0
128
127
  };
129
128
  var _default = exports.default = Preview;
@@ -36,7 +36,6 @@ $default-height: var(--notification-height, 5rem);
36
36
  > .message {
37
37
  font-size: calc(var(--s0) * 1rem);
38
38
  margin-left: calc($default-margin / 2);
39
- text-transform: capitalize;
40
39
  }
41
40
 
42
41
  > span {
@@ -124,7 +124,8 @@ const FileUpload = ({
124
124
  fileIndex: indx,
125
125
  identifier: file?.id || file.name
126
126
  }),
127
- uploadStatus: uploadStatus?.[file?.name]
127
+ uploadStatus: uploadStatus?.[file?.name]?.status,
128
+ uploadProgress: uploadStatus?.[file?.name]?.progress
128
129
  })))));
129
130
  };
130
131
  FileUpload.propTypes = {
@@ -35,11 +35,10 @@ const Preview = ({
35
35
  }) => {
36
36
  const isFileObject = file instanceof File;
37
37
  const type = isFileObject ? getFileType(file) : getFileTypeFromUrl(file?.url);
38
- const status = uploadStatus?.status;
39
- const statusColor = statusColorMap[status] ?? color;
40
- const isPending = status === 'pending';
38
+ const statusColor = statusColorMap[uploadStatus] ?? color;
39
+ const isPending = uploadStatus === 'pending';
41
40
  // isPreview means the file is uploaded and previewed while other files can still be uploaded
42
- const isSuccess = status === 'success' || file?.isPreview;
41
+ const isSuccess = uploadStatus === 'success' || file?.isPreview;
43
42
  const handlePreview = () => {
44
43
  if (!isFileObject) {
45
44
  window.open(file.url, '_blank');
@@ -114,6 +113,6 @@ Preview.propTypes = {
114
113
  };
115
114
  Preview.defaultProps = {
116
115
  color: 'green',
117
- uploadProgress: 45
116
+ uploadProgress: 0
118
117
  };
119
118
  export default Preview;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pareto-engineering/design-system",
3
- "version": "4.8.2",
3
+ "version": "4.9.0",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",
@@ -59,7 +59,7 @@
59
59
  "@lexical/selection": "0.12.2",
60
60
  "@lexical/table": "0.12.2",
61
61
  "@lexical/utils": "0.12.2",
62
- "@pareto-engineering/assets": "^4.2.3",
62
+ "@pareto-engineering/assets": "^4.9.0",
63
63
  "@pareto-engineering/bem": "^4.8.1",
64
64
  "@pareto-engineering/styles": "^4.2.0",
65
65
  "@pareto-engineering/utils": "^4.0.0",
@@ -82,5 +82,5 @@
82
82
  "relay-test-utils": "^15.0.0"
83
83
  },
84
84
  "browserslist": "> 2%",
85
- "gitHead": "1eea7b1c3085e7c568568baad8f77c76cbcba46f"
85
+ "gitHead": "198830358910af7c44d657ad846d3c7ce0967181"
86
86
  }
@@ -36,7 +36,6 @@ $default-height: var(--notification-height, 5rem);
36
36
  > .message {
37
37
  font-size: calc(var(--s0) * 1rem);
38
38
  margin-left: calc($default-margin / 2);
39
- text-transform: capitalize;
40
39
  }
41
40
 
42
41
  > span {
@@ -152,7 +152,8 @@ const FileUpload = ({
152
152
  fileIndex :indx,
153
153
  identifier:file?.id || file.name,
154
154
  })}
155
- uploadStatus={uploadStatus?.[file?.name]}
155
+ uploadStatus={uploadStatus?.[file?.name]?.status}
156
+ uploadProgress={uploadStatus?.[file?.name]?.progress}
156
157
  />
157
158
  ))}
158
159
  </div>
@@ -45,12 +45,11 @@ const Preview = ({
45
45
  const isFileObject = file instanceof File
46
46
  const type = isFileObject ? getFileType(file) : getFileTypeFromUrl(file?.url)
47
47
 
48
- const status = uploadStatus?.status
49
- const statusColor = statusColorMap[status] ?? color
48
+ const statusColor = statusColorMap[uploadStatus] ?? color
50
49
 
51
- const isPending = status === 'pending'
50
+ const isPending = uploadStatus === 'pending'
52
51
  // isPreview means the file is uploaded and previewed while other files can still be uploaded
53
- const isSuccess = status === 'success' || file?.isPreview
52
+ const isSuccess = uploadStatus === 'success' || file?.isPreview
54
53
 
55
54
  const handlePreview = () => {
56
55
  if (!isFileObject) {
@@ -179,7 +178,7 @@ Preview.propTypes = {
179
178
 
180
179
  Preview.defaultProps = {
181
180
  color :'green',
182
- uploadProgress:45,
181
+ uploadProgress:0,
183
182
  }
184
183
 
185
184
  export default Preview