@react-magma/dropzone 3.0.0 → 4.0.0-next.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 +1 -0
- package/package.json +9 -9
- package/src/components/dropzone/Dropzone.test.js +2 -1
- package/src/components/dropzone/Dropzone.tsx +1 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-magma/dropzone",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-next.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": "^17.0.
|
|
32
|
-
"react-dom": "^17.0.
|
|
33
|
-
"react-magma-dom": "^
|
|
34
|
-
"react-magma-icons": "
|
|
31
|
+
"react": "^15.0.0 || ^16.0.0 || ^17.0.0",
|
|
32
|
+
"react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0",
|
|
33
|
+
"react-magma-dom": "^3.7.0-next.0",
|
|
34
|
+
"react-magma-icons": "2.3.6"
|
|
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": "^16.10.0",
|
|
44
|
+
"react-dom": "^16.10.0",
|
|
45
|
+
"react-magma-dom": "^3.7.0-next.0",
|
|
46
|
+
"react-magma-icons": "2.3.6"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -510,7 +510,8 @@ describe('File Uploader', () => {
|
|
|
510
510
|
/>
|
|
511
511
|
);
|
|
512
512
|
|
|
513
|
-
const { getByTestId, getByLabelText, getByText, rerender } =
|
|
513
|
+
const { getByTestId, getByLabelText, getByText, rerender } =
|
|
514
|
+
render(ui);
|
|
514
515
|
|
|
515
516
|
const dropzone = getByTestId(testId);
|
|
516
517
|
act(() => fireDrop(dropzone, data));
|
|
@@ -264,8 +264,6 @@ export const Dropzone = React.forwardRef<HTMLInputElement, DropzoneProps>(
|
|
|
264
264
|
noDrag,
|
|
265
265
|
});
|
|
266
266
|
|
|
267
|
-
const inputProps = getInputProps({ id });
|
|
268
|
-
|
|
269
267
|
const dragState: DragState = errorMessage
|
|
270
268
|
? 'error'
|
|
271
269
|
: isDragAccept
|
|
@@ -422,18 +420,7 @@ export const Dropzone = React.forwardRef<HTMLInputElement, DropzoneProps>(
|
|
|
422
420
|
testId={testId}
|
|
423
421
|
tabIndex={-1}
|
|
424
422
|
>
|
|
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
|
-
/>
|
|
423
|
+
<input ref={ref} {...getInputProps({ id })} />
|
|
437
424
|
{noDrag ? (
|
|
438
425
|
<Flex xs behavior={FlexBehavior.item}>
|
|
439
426
|
<Button
|