demio-ui 2.5.19 → 2.5.21

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.
@@ -23,7 +23,7 @@ export interface UploadProps {
23
23
  menu?: UploadMenuItem[];
24
24
  minHeightLimit?: number;
25
25
  minWidthLimit?: number;
26
- onBeforeUpload?: (file: File, fileList?: File[]) => void;
26
+ onUpload?: (file: File, fileList?: File[]) => void;
27
27
  onCropCancel?: () => void;
28
28
  onCropOk?: (croppedUrl: string) => void;
29
29
  onCropChange?: (data: SetStateAction<Point>) => void;
@@ -31,10 +31,10 @@ export interface UploadProps {
31
31
  onDragLeave?: (event: DragEvent<HTMLDivElement>) => void;
32
32
  onDragOver?: (event: DragEvent<HTMLDivElement>) => void;
33
33
  onDrop?: (event: DragEvent<HTMLDivElement>, file: File | null) => void;
34
- onUploadError?: (error: Error | DOMException | null | unknown, file: File) => void;
35
- onUploadProgress?: (progress: number, file: File) => void;
36
- onUploadStart?: (file: File) => void;
37
- onUploadSuccess?: (response: string | ArrayBuffer | null, file: File) => void;
34
+ onReadFileError?: (error: Error | DOMException | null | unknown, file: File) => void;
35
+ onReadFileProgress?: (progress: number, file: File) => void;
36
+ onReadFileStart?: (file: File) => void;
37
+ onReadFileSuccess?: (response: string | ArrayBuffer | null, file: File) => void;
38
38
  onZoomChange?: (value: number) => void;
39
39
  previewDuration?: string;
40
40
  previewFileName?: string;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export interface UploadErrorProps {
3
+ className?: string;
4
+ classNameIcon?: string;
5
+ error?: string;
6
+ }
7
+ declare const UploadError: FC<UploadErrorProps>;
8
+ export default UploadError;
@@ -0,0 +1 @@
1
+ export { default } from './UploadError';
@@ -29,4 +29,5 @@ export { Tag } from './Tag';
29
29
  export { PopoverTooltip, Tooltip } from './Tooltip';
30
30
  export { Typography } from './Typography';
31
31
  export { default as Upload } from './Upload';
32
+ export { default as UploadError } from './UploadError';
32
33
  export { default as UploadMenu } from './UploadMenu';
package/dist/types.d.ts CHANGED
@@ -523,7 +523,7 @@ interface UploadProps {
523
523
  menu?: UploadMenuItem[];
524
524
  minHeightLimit?: number;
525
525
  minWidthLimit?: number;
526
- onBeforeUpload?: (file: File, fileList?: File[]) => void;
526
+ onUpload?: (file: File, fileList?: File[]) => void;
527
527
  onCropCancel?: () => void;
528
528
  onCropOk?: (croppedUrl: string) => void;
529
529
  onCropChange?: (data: SetStateAction<Point>) => void;
@@ -531,10 +531,10 @@ interface UploadProps {
531
531
  onDragLeave?: (event: DragEvent<HTMLDivElement>) => void;
532
532
  onDragOver?: (event: DragEvent<HTMLDivElement>) => void;
533
533
  onDrop?: (event: DragEvent<HTMLDivElement>, file: File | null) => void;
534
- onUploadError?: (error: Error | DOMException | null | unknown, file: File) => void;
535
- onUploadProgress?: (progress: number, file: File) => void;
536
- onUploadStart?: (file: File) => void;
537
- onUploadSuccess?: (response: string | ArrayBuffer | null, file: File) => void;
534
+ onReadFileError?: (error: Error | DOMException | null | unknown, file: File) => void;
535
+ onReadFileProgress?: (progress: number, file: File) => void;
536
+ onReadFileStart?: (file: File) => void;
537
+ onReadFileSuccess?: (response: string | ArrayBuffer | null, file: File) => void;
538
538
  onZoomChange?: (value: number) => void;
539
539
  previewDuration?: string;
540
540
  previewFileName?: string;
@@ -544,6 +544,13 @@ interface UploadProps {
544
544
  }
545
545
  declare const Upload: FC<UploadProps>;
546
546
 
547
+ interface UploadErrorProps {
548
+ className?: string;
549
+ classNameIcon?: string;
550
+ error?: string;
551
+ }
552
+ declare const UploadError: FC<UploadErrorProps>;
553
+
547
554
  declare const useCroppedImage: (image?: string, croppedArea?: Area | null) => {
548
555
  croppedImageURL: string;
549
556
  };
@@ -2332,4 +2339,4 @@ declare const getCroppedImageURL: (imageSrc: string, pixelCrop: Area, rotation?:
2332
2339
  vertical: boolean;
2333
2340
  }) => Promise<string | null>;
2334
2341
 
2335
- export { Alert, Avatar, Badge, Button$1 as Button, Button as ButtonNew, Card, Checkbox, Crop, DnDArea, Drawer, DropdownItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuTrigger, FormGroup, InfoBanner, Input, InputHint, Label, Loader, Modal, MultiSelect, Pagination, Popover, PopoverTooltip, Progress, RadioGroup, Select, SelectItem, SelectItemText, SliderDemo as Slider, Switch, Tab, TabsContent, TabsList, TabsRoot, Tag, Tooltip, Typography, Upload, UploadMenu, createImage, getCroppedImageURL, getFileExtension, getFileMimeType, getRadianAngle, index as icons, isExtensionMatchingMimeType, isImage, isValidFileDimension, isValidFileSize, isValidFileType, isVideo, mimeTypeMap, rotateSize, useCroppedImage, useFileValidation };
2342
+ export { Alert, Avatar, Badge, Button$1 as Button, Button as ButtonNew, Card, Checkbox, Crop, DnDArea, Drawer, DropdownItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuTrigger, FormGroup, InfoBanner, Input, InputHint, Label, Loader, Modal, MultiSelect, Pagination, Popover, PopoverTooltip, Progress, RadioGroup, Select, SelectItem, SelectItemText, SliderDemo as Slider, Switch, Tab, TabsContent, TabsList, TabsRoot, Tag, Tooltip, Typography, Upload, UploadError, UploadMenu, createImage, getCroppedImageURL, getFileExtension, getFileMimeType, getRadianAngle, index as icons, isExtensionMatchingMimeType, isImage, isValidFileDimension, isValidFileSize, isValidFileType, isVideo, mimeTypeMap, rotateSize, useCroppedImage, useFileValidation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "demio-ui",
3
- "version": "2.5.19",
3
+ "version": "2.5.21",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",