gantri-components 2.133.0-beta.1 → 2.133.0-beta.2
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/components/file-uploader/file-uploader.styles.d.ts +1 -1
- package/dist/components/file-uploader/file-uploader.types.d.ts +2 -0
- package/dist/components/file-uploader/hooks/use-drag-and-drop-files/use-drag-and-drop-files.d.ts +6 -1
- package/dist/components/file-uploader/hooks/use-drag-and-drop-files/use-drag-and-drop-files.types.d.ts +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,5 +3,5 @@ import { OptionalValues } from '../../types/common';
|
|
|
3
3
|
export declare const StyledFileInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, OptionalValues<{
|
|
4
4
|
$fileUrl: string;
|
|
5
5
|
$isDisabled: boolean;
|
|
6
|
-
$
|
|
6
|
+
$isDropZone: boolean;
|
|
7
7
|
}, undefined>>> & string;
|
|
@@ -17,6 +17,8 @@ export type FileUploaderProps = {
|
|
|
17
17
|
inputName?: string;
|
|
18
18
|
isActive?: boolean;
|
|
19
19
|
isDisabled?: boolean;
|
|
20
|
+
/** Updates the input to be used as a file drop zone. */
|
|
21
|
+
isDropZone?: boolean;
|
|
20
22
|
/** Use with variant `'thumbnail'` to always show the uploader view. */
|
|
21
23
|
isUploaderOnly?: boolean;
|
|
22
24
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
package/dist/components/file-uploader/hooks/use-drag-and-drop-files/use-drag-and-drop-files.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { DragEvent } from 'react';
|
|
2
2
|
import { UseDragAndDropFilesProps } from './use-drag-and-drop-files.types';
|
|
3
3
|
export declare const useDragAndDropFiles: (props: UseDragAndDropFilesProps) => {
|
|
4
|
-
isDraggingOver: boolean;
|
|
5
4
|
onDragEnter: (event: DragEvent<HTMLInputElement>) => void;
|
|
6
5
|
onDragLeave: (event: DragEvent<HTMLInputElement>) => void;
|
|
7
6
|
onDrop: (event: DragEvent<HTMLInputElement>) => Promise<void>;
|
|
7
|
+
isDraggingOver: boolean;
|
|
8
|
+
} | {
|
|
9
|
+
onDragEnter?: undefined;
|
|
10
|
+
onDragLeave?: undefined;
|
|
11
|
+
onDrop?: undefined;
|
|
12
|
+
isDraggingOver: boolean;
|
|
8
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface UseDragAndDropFilesProps {
|
|
2
|
+
enable: boolean;
|
|
3
3
|
handleSelectedFiles: (files: File[]) => Promise<void>;
|
|
4
|
-
}
|
|
4
|
+
}
|