@nimbus-ds/components 5.33.0 → 5.35.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.
@@ -1,7 +1,7 @@
1
1
  // Generated by dts-bundle-generator v7.2.0
2
2
 
3
3
  import React from 'react';
4
- import { HTMLAttributes, InputHTMLAttributes } from 'react';
4
+ import { DragEvent, HTMLAttributes, InputHTMLAttributes } from 'react';
5
5
 
6
6
  export type AspectRatio = "1/1" | "16/9" | "9/16" | "4/3" | "3/4" | "2/1" | "1/2";
7
7
  export type Cursor = "auto" | "pointer" | "not-allowed" | "grab" | "inherit";
@@ -28,6 +28,7 @@ declare const fileUploader: {
28
28
  container: string;
29
29
  container__input: string;
30
30
  disabled: string;
31
+ dragging: string;
31
32
  skeleton: string;
32
33
  };
33
34
  };
@@ -85,12 +86,28 @@ export interface FileUploaderProperties {
85
86
  * Permitted aspect ratios for the size of the file uploader.
86
87
  * @default 1/1
87
88
  */
88
- aspectRatio?: typeof fileUploader.properties.aspectRatio[number];
89
+ aspectRatio?: (typeof fileUploader.properties.aspectRatio)[number];
89
90
  /**
90
91
  * Defines the position of the placeholder in relation to the icon.
91
92
  * @default column
92
93
  */
93
- flexDirection?: typeof fileUploader.properties.flexDirection[number];
94
+ flexDirection?: (typeof fileUploader.properties.flexDirection)[number];
95
+ /**
96
+ * Callback fired when files are dropped (before validation)
97
+ */
98
+ onDrop?: (event: DragEvent<HTMLLabelElement>) => void;
99
+ /**
100
+ * Callback fired when all dropped files are rejected due to file type validation
101
+ */
102
+ onDropReject?: (event: DragEvent<HTMLLabelElement>) => void;
103
+ /**
104
+ * Callback fired when files are successfully accepted and processed
105
+ */
106
+ onDropSuccess?: (event: DragEvent<HTMLLabelElement>) => void;
107
+ /**
108
+ * Callback fired when an error occurs during file drop processing
109
+ */
110
+ onError?: (error: Error) => void;
94
111
  }
95
112
  export type FileUploaderProps = FileUploaderProperties & InputHTMLAttributes<HTMLInputElement>;
96
113
  export declare const FileUploader: React.FC<FileUploaderProps> & FileUploaderComponents;