@react-magma/dropzone 2.0.1 → 3.0.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.
- package/dist/fileuploader.js +1 -1
- package/dist/fileuploader.js.map +1 -1
- package/dist/fileuploader.modern.js +3 -3
- package/dist/fileuploader.modern.js.map +1 -1
- package/dist/fileuploader.modern.module.js +1 -1
- package/dist/fileuploader.modern.module.js.map +1 -1
- package/dist/fileuploader.umd.js +1 -1
- package/dist/fileuploader.umd.js.map +1 -1
- package/dist/src/components/dropzone/FileIcon.d.ts +0 -1
- package/package.json +9 -9
- package/src/components/dropzone/Dropzone.test.js +1 -2
- package/src/components/dropzone/Dropzone.tsx +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/dropzone",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@emotion/core": "^10.1.1",
|
|
30
30
|
"@emotion/styled": "^10.0.27",
|
|
31
|
-
"react": "^
|
|
32
|
-
"react-dom": "^
|
|
33
|
-
"react-magma-dom": "^
|
|
34
|
-
"react-magma-icons": "
|
|
31
|
+
"react": "^17.0.2",
|
|
32
|
+
"react-dom": "^17.0.2",
|
|
33
|
+
"react-magma-dom": "^4.0.0-next.0",
|
|
34
|
+
"react-magma-icons": "^3.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"polished": "^3.2.0",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@emotion/core": "^10.1.1",
|
|
42
42
|
"@emotion/styled": "^10.0.27",
|
|
43
|
-
"react": "^
|
|
44
|
-
"react-dom": "^
|
|
45
|
-
"react-magma-dom": "^
|
|
46
|
-
"react-magma-icons": "
|
|
43
|
+
"react": "^17.0.2",
|
|
44
|
+
"react-dom": "^17.0.2",
|
|
45
|
+
"react-magma-dom": "^4.0.0",
|
|
46
|
+
"react-magma-icons": "^3.0.0"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -510,8 +510,7 @@ describe('File Uploader', () => {
|
|
|
510
510
|
/>
|
|
511
511
|
);
|
|
512
512
|
|
|
513
|
-
const { getByTestId, getByLabelText, getByText, rerender } =
|
|
514
|
-
render(ui);
|
|
513
|
+
const { getByTestId, getByLabelText, getByText, rerender } = render(ui);
|
|
515
514
|
|
|
516
515
|
const dropzone = getByTestId(testId);
|
|
517
516
|
act(() => fireDrop(dropzone, data));
|
|
@@ -264,6 +264,8 @@ export const Dropzone = React.forwardRef<HTMLInputElement, DropzoneProps>(
|
|
|
264
264
|
noDrag,
|
|
265
265
|
});
|
|
266
266
|
|
|
267
|
+
const inputProps = getInputProps({ id });
|
|
268
|
+
|
|
267
269
|
const dragState: DragState = errorMessage
|
|
268
270
|
? 'error'
|
|
269
271
|
: isDragAccept
|
|
@@ -420,7 +422,18 @@ export const Dropzone = React.forwardRef<HTMLInputElement, DropzoneProps>(
|
|
|
420
422
|
testId={testId}
|
|
421
423
|
tabIndex={-1}
|
|
422
424
|
>
|
|
423
|
-
<input
|
|
425
|
+
<input
|
|
426
|
+
ref={ref}
|
|
427
|
+
type={inputProps.type}
|
|
428
|
+
accept={inputProps.accept}
|
|
429
|
+
autoComplete={inputProps.autoComplete}
|
|
430
|
+
id={inputProps.id}
|
|
431
|
+
multiple={inputProps.multiple}
|
|
432
|
+
onChange={inputProps.onChange}
|
|
433
|
+
onClick={inputProps.onClick}
|
|
434
|
+
style={inputProps.style}
|
|
435
|
+
tabIndex={inputProps.tabIndex}
|
|
436
|
+
/>
|
|
424
437
|
{noDrag ? (
|
|
425
438
|
<Flex xs behavior={FlexBehavior.item}>
|
|
426
439
|
<Button
|