@react-magma/dropzone 2.0.1 → 3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-magma/dropzone",
3
- "version": "2.0.1",
3
+ "version": "3.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": "^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.2.1-next.0",
34
- "react-magma-icons": "2.3.6"
31
+ "react": "^17.0.2",
32
+ "react-dom": "^17.0.2",
33
+ "react-magma-dom": "^4.0.0-next.0",
34
+ "react-magma-icons": "^2.4.1"
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": "^16.10.0",
44
- "react-dom": "^16.10.0",
45
- "react-magma-dom": "^3.2.1",
46
- "react-magma-icons": "2.3.6"
43
+ "react": "^17.0.2",
44
+ "react-dom": "^17.0.2",
45
+ "react-magma-dom": "^4.0.0-next.0",
46
+ "react-magma-icons": "^2.4.1"
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 ref={ref} {...getInputProps({ id })} />
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