@synerise/ds-file-uploader 1.3.30 → 1.4.1
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 +10 -0
- package/CLAUDE.md +1 -0
- package/README.md +1 -0
- package/dist/AvatarUploader/AvatarUploader.d.ts +2 -1
- package/dist/FileUploader.d.ts +2 -1
- package/dist/FileUploader.js +2 -1
- package/dist/FileUploader.types.d.ts +1 -0
- package/dist/FileView/FileView.d.ts +1 -1
- package/dist/FileView/FileView.js +3 -2
- package/dist/FileView/FileView.types.d.ts +1 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.4.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@1.4.0...@synerise/ds-file-uploader@1.4.1) (2026-08-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-file-uploader
|
|
9
|
+
|
|
10
|
+
# [1.4.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@1.3.30...@synerise/ds-file-uploader@1.4.0) (2026-08-13)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **file-uploader:** add hideSize prop to hide file size display ([979e573](https://github.com/Synerise/synerise-design/commit/979e573dcb2a2bbd5f059bba649422d2dd118643))
|
|
15
|
+
|
|
6
16
|
## [1.3.30](https://github.com/Synerise/synerise-design/compare/@synerise/ds-file-uploader@1.3.29...@synerise/ds-file-uploader@1.3.30) (2026-08-11)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @synerise/ds-file-uploader
|
package/CLAUDE.md
CHANGED
|
@@ -58,6 +58,7 @@ Full-width drop-zone uploader. `forwardRef<FileUploaderRef, FileUploaderProps>`.
|
|
|
58
58
|
| `disabled` | `boolean` | `undefined` | Disables the drop zone and file rows |
|
|
59
59
|
| `error` | `string` | `undefined` | Displays a global error message below the drop zone |
|
|
60
60
|
| `retry` | `boolean` | `undefined` | When `true` and a file has an error, shows a Retry button that re-opens the file dialog |
|
|
61
|
+
| `hideSize` | `boolean` | `undefined` | Hides the file size row on file items (per-file errors still render). Useful for backend placeholders with `size: 0` |
|
|
61
62
|
| `label` | `string` | `undefined` | Label above the drop zone |
|
|
62
63
|
| `tooltip` | `string` | `undefined` | Tooltip (ℹ icon) shown next to the label (requires `label`) |
|
|
63
64
|
| `description` | `string` | `undefined` | Hint text below the error area |
|
package/README.md
CHANGED
|
@@ -50,6 +50,7 @@ import FileUploader from '@synerise/ds-file-uploader'
|
|
|
50
50
|
| tooltip | display a tooltip near the label (label value is required for tooltip to appear) | string | - |
|
|
51
51
|
| error | display general error | string | - |
|
|
52
52
|
| retry | when true and a file has an error, shows a retry button that re-opens the dialog | boolean | - |
|
|
53
|
+
| hideSize | hides the file size row on file items (per-file errors still render) | boolean | - |
|
|
53
54
|
| texts | texts to display | FileUploaderTexts | - |
|
|
54
55
|
| files | uploaded files | ExtendedFile[] | `[]` |
|
|
55
56
|
| accept | accepted mime types to upload | string[] | - |
|
|
@@ -21,5 +21,6 @@ declare const AvatarUploader: React.ForwardRefExoticComponent<{
|
|
|
21
21
|
onRemove?: (file: import('../FileUploader.types').FileWithContent, index: number) => void;
|
|
22
22
|
onUpload?: (files: import('../FileUploader.types').FileWithContent[]) => void;
|
|
23
23
|
retry?: boolean;
|
|
24
|
-
|
|
24
|
+
hideSize?: boolean;
|
|
25
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "label" | "className" | "mode" | "disabled" | "accept" | "description" | "tooltip" | "error" | "removable" | "onRemove" | "texts" | "filesAmount" | "removeTooltip" | "files" | "onUpload" | "retry" | "hideSize"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<FileUploaderRef>>;
|
|
25
26
|
export default AvatarUploader;
|
package/dist/FileUploader.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ declare const FileUploader: React.ForwardRefExoticComponent<{
|
|
|
21
21
|
onRemove?: (file: import('./FileUploader.types').FileWithContent, index: number) => void;
|
|
22
22
|
onUpload?: (files: import('./FileUploader.types').FileWithContent[]) => void;
|
|
23
23
|
retry?: boolean;
|
|
24
|
-
|
|
24
|
+
hideSize?: boolean;
|
|
25
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "label" | "className" | "mode" | "disabled" | "accept" | "description" | "tooltip" | "error" | "removable" | "onRemove" | "texts" | "filesAmount" | "removeTooltip" | "files" | "onUpload" | "retry" | "hideSize"> & import('@synerise/ds-utils').DataAttributes & React.RefAttributes<FileUploaderRef>>;
|
|
25
26
|
export default FileUploader;
|
package/dist/FileUploader.js
CHANGED
|
@@ -32,6 +32,7 @@ const FileUploader = forwardRef(({
|
|
|
32
32
|
files = [],
|
|
33
33
|
retry,
|
|
34
34
|
texts,
|
|
35
|
+
hideSize,
|
|
35
36
|
...rest
|
|
36
37
|
}, ref) => {
|
|
37
38
|
const [uploadSuccess, setUploadSuccess] = useState(true);
|
|
@@ -110,7 +111,7 @@ const FileUploader = forwardRef(({
|
|
|
110
111
|
] }) }),
|
|
111
112
|
files.length > 0 && files.map((file, index) => /* @__PURE__ */ jsx(FileView, { texts, removable, onRemove: () => onRemove && onRemove(file.file, index), data: file, retry, retryButtonProps: {
|
|
112
113
|
...getRootProps()
|
|
113
|
-
} }, index)),
|
|
114
|
+
}, hideSize }, index)),
|
|
114
115
|
hasError && errors && errors.map((errorText, index) => /* @__PURE__ */ jsx(ErrorMessage, { children: errorText }, index)),
|
|
115
116
|
description && /* @__PURE__ */ jsx(Description, { hasError, children: description })
|
|
116
117
|
] });
|
|
@@ -45,6 +45,7 @@ export type FileUploaderProps = WithHTMLAttributes<HTMLDivElement, {
|
|
|
45
45
|
onRemove?: (file: FileWithContent, index: number) => void;
|
|
46
46
|
onUpload?: (files: FileWithContent[]) => void;
|
|
47
47
|
retry?: boolean;
|
|
48
|
+
hideSize?: boolean;
|
|
48
49
|
}>;
|
|
49
50
|
export type ItemUploaderProps = Omit<FileUploaderProps, 'mode'> & {
|
|
50
51
|
mode: 'single' | 'multi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { FileViewProps } from './FileView.types';
|
|
3
|
-
declare const FileView: ({ data, texts, onRemove, removable, retry, retryButtonProps, }: FileViewProps) => React.JSX.Element;
|
|
3
|
+
declare const FileView: ({ data, texts, onRemove, removable, retry, retryButtonProps, hideSize, }: FileViewProps) => React.JSX.Element;
|
|
4
4
|
export default FileView;
|
|
@@ -15,7 +15,8 @@ const FileView = ({
|
|
|
15
15
|
onRemove,
|
|
16
16
|
removable,
|
|
17
17
|
retry,
|
|
18
|
-
retryButtonProps
|
|
18
|
+
retryButtonProps,
|
|
19
|
+
hideSize
|
|
19
20
|
}) => {
|
|
20
21
|
const getFriendlySize = (size) => filesize(size || 0);
|
|
21
22
|
const theme = useTheme();
|
|
@@ -56,7 +57,7 @@ const FileView = ({
|
|
|
56
57
|
] })
|
|
57
58
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
59
|
/* @__PURE__ */ jsx(Name, { children: /* @__PURE__ */ jsx(FileName, { children: file.name }) }),
|
|
59
|
-
/* @__PURE__ */ jsx(SizeOrError, { children: error || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
+
(error || !hideSize) && /* @__PURE__ */ jsx(SizeOrError, { children: error || /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
61
|
finalTexts.size,
|
|
61
62
|
" ",
|
|
62
63
|
getFriendlySize(file.size)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-file-uploader",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "FileUploader UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
],
|
|
43
43
|
"types": "dist/index.d.ts",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@synerise/ds-button": "^1.5.
|
|
45
|
+
"@synerise/ds-button": "^1.5.37",
|
|
46
46
|
"@synerise/ds-icon": "^1.18.5",
|
|
47
47
|
"@synerise/ds-loader": "^1.0.18",
|
|
48
|
-
"@synerise/ds-popconfirm": "^1.
|
|
49
|
-
"@synerise/ds-progress-bar": "^1.3.
|
|
50
|
-
"@synerise/ds-tooltip": "^1.
|
|
51
|
-
"@synerise/ds-typography": "^1.1.
|
|
48
|
+
"@synerise/ds-popconfirm": "^1.5.0",
|
|
49
|
+
"@synerise/ds-progress-bar": "^1.3.15",
|
|
50
|
+
"@synerise/ds-tooltip": "^1.6.0",
|
|
51
|
+
"@synerise/ds-typography": "^1.1.29",
|
|
52
52
|
"@synerise/ds-utils": "^1.10.2",
|
|
53
53
|
"filesize.js": "^2.0.0",
|
|
54
54
|
"react-dropzone": "^10.2.1"
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"styled-components": "^5.3.3",
|
|
61
61
|
"vitest": "4"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "e1fece64a41fd18a78583ecb6c21ee00fe8c0759"
|
|
64
64
|
}
|