demio-ui 2.2.1 → 2.2.3

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.
@@ -0,0 +1,48 @@
1
+ import React, { DragEvent, FC, HTMLInputTypeAttribute, ReactNode } from 'react';
2
+ import { RcFile, UploadProgressEvent } from 'rc-upload/es/interface';
3
+ export interface SelectOptions {
4
+ file?: string;
5
+ setFile?: (file: string) => void;
6
+ }
7
+ export interface UploadMenuItem {
8
+ className?: string;
9
+ icon?: ReactNode;
10
+ onSelect?: (e: Event, options: SelectOptions) => void;
11
+ text: ReactNode;
12
+ isDisabled?: boolean;
13
+ }
14
+ export interface UploadProps {
15
+ acceptableFileTypes?: string;
16
+ children?: ReactNode;
17
+ className?: string;
18
+ customIcon?: ReactNode;
19
+ customHeader?: string;
20
+ customText?: ReactNode;
21
+ dropText?: ReactNode;
22
+ error?: string;
23
+ errorDimension?: string;
24
+ errorSize?: string;
25
+ errorType?: string;
26
+ fileSizeMbLimit?: number;
27
+ isDirectoryAllowed?: boolean;
28
+ isDimensionValidationEnabled?: boolean;
29
+ isSizeValidationEnabled?: boolean;
30
+ isTypeValidationEnabled?: boolean;
31
+ isValidationEnabled?: boolean;
32
+ menu?: UploadMenuItem[];
33
+ minHeightLimit?: number;
34
+ minWidthLimit?: number;
35
+ name?: string;
36
+ onBeforeUpload?: (file: RcFile, fileList: RcFile[]) => void;
37
+ onCrop?: (croppedUrl: string) => void;
38
+ onDragLeave?: (event: React.DragEvent<HTMLDivElement>) => void;
39
+ onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
40
+ onDrop?: (event: DragEvent<HTMLDivElement>, file: File | null) => void;
41
+ onError?: (err: Error, ret: Record<string, unknown>, file: RcFile) => void;
42
+ onProgress?: (event: UploadProgressEvent, file: RcFile) => void;
43
+ onStart?: (file: RcFile) => void;
44
+ onSuccess?: (ret: Record<string, unknown>) => void;
45
+ type?: HTMLInputTypeAttribute;
46
+ }
47
+ declare const Upload: FC<UploadProps>;
48
+ export default Upload;
@@ -0,0 +1 @@
1
+ export { default } from './Upload';
@@ -22,6 +22,7 @@ import CopyIcon from './copy.svg';
22
22
  import CustomizeIcon from './customize.svg';
23
23
  import DeleteIcon from './delete.svg';
24
24
  import DotsIcon from './dots.svg';
25
+ import DownloadIcon from './download.svg';
25
26
  import EditIcon from './edit.svg';
26
27
  import ElectricBoltIcon from './electric_bolt.svg';
27
28
  import EventDetailsIcon from './event_details.svg';
@@ -87,4 +88,4 @@ import VolumeUpSolidIcon from './volume_up.svg';
87
88
  import VolumeUpIcon from './volume_up-1.svg';
88
89
  import WarningSolidIcon from './warning.svg';
89
90
  import WarningIcon from './warning-1.svg';
90
- export { AddIcon, ArrowDownIcon, ArrowFromLeftIcon, ArrowLeftDoubleIcon, ArrowLeftIcon, ArrowLeftSingleIcon, BarChartIcon, BlockIcon, BlurOnIcon, CachedIcon, CalendarIcon, CalendarStarIcon, CameraIcon, ChatIcon, CheckboxIcon, CheckboxUncheckIcon, CheckCircleIcon, CheckCircleSolidIcon, ClockIcon, CloseIcon, CompressIcon, CopyIcon, CustomizeIcon, DeleteIcon, DotsIcon, EditIcon, ElectricBoltIcon, EventDetailsIcon, EventRepeatIcon, ExclamationIcon, ExpandIcon, ExternalLinkIcon, FeatureActionIcon, FileIcon, FilterListIcon, GearIcon, HelpSolidIcon, InfoCircleIcon, InfoCircleSolidIcon, InfoIcon, InfoSolidIcon, ItemsIcon, ListIcon, ListThIcon, LocationIcon, LockIcon, MagicIcon, MailIcon, MaterialsIcon, MicBoldIcon, MicOffIcon, MicOffSolidIcon, MicOnfIcon, MicOnSolidIcon, MobileDeviceIcon, OutStageIcon, PasswordEyeCrossedIcon, PasswordEyeIcon, PeopleCommunityIcon, PeopleIcon, Person, PlayIcon, PollIcon, ProgressIcon, ReplayDisabledIcon, RestartIcon, RocketIcon, ScreenShareIcon, ScreenShareWindowIcon, SearchIcon, SideBarIcon, SmileIcon, SpotlightIcon, StackedEmailIcon, SyncIcon, TimesCircleIcon, TodayIcon, TrendingDownIcon, TrendingUpIcon, VideoCamOffIcon, VideoCamOffSolidIcon, VideoCamOnIcon, VideoCamOnSolidIcon, VolumeOffIcon, VolumeOffSolidIcon, VolumeUpIcon, VolumeUpSolidIcon, WarningIcon, WarningSolidIcon, };
91
+ export { AddIcon, ArrowDownIcon, ArrowFromLeftIcon, ArrowLeftDoubleIcon, ArrowLeftIcon, ArrowLeftSingleIcon, BarChartIcon, BlockIcon, BlurOnIcon, CachedIcon, CalendarIcon, CalendarStarIcon, CameraIcon, ChatIcon, CheckboxIcon, CheckboxUncheckIcon, CheckCircleIcon, CheckCircleSolidIcon, ClockIcon, CloseIcon, CompressIcon, CopyIcon, CustomizeIcon, DeleteIcon, DotsIcon, DownloadIcon, EditIcon, ElectricBoltIcon, EventDetailsIcon, EventRepeatIcon, ExclamationIcon, ExpandIcon, ExternalLinkIcon, FeatureActionIcon, FileIcon, FilterListIcon, GearIcon, HelpSolidIcon, InfoCircleIcon, InfoCircleSolidIcon, InfoIcon, InfoSolidIcon, ItemsIcon, ListIcon, ListThIcon, LocationIcon, LockIcon, MagicIcon, MailIcon, MaterialsIcon, MicBoldIcon, MicOffIcon, MicOffSolidIcon, MicOnfIcon, MicOnSolidIcon, MobileDeviceIcon, OutStageIcon, PasswordEyeCrossedIcon, PasswordEyeIcon, PeopleCommunityIcon, PeopleIcon, Person, PlayIcon, PollIcon, ProgressIcon, ReplayDisabledIcon, RestartIcon, RocketIcon, ScreenShareIcon, ScreenShareWindowIcon, SearchIcon, SideBarIcon, SmileIcon, SpotlightIcon, StackedEmailIcon, SyncIcon, TimesCircleIcon, TodayIcon, TrendingDownIcon, TrendingUpIcon, VideoCamOffIcon, VideoCamOffSolidIcon, VideoCamOnIcon, VideoCamOnSolidIcon, VolumeOffIcon, VolumeOffSolidIcon, VolumeUpIcon, VolumeUpSolidIcon, WarningIcon, WarningSolidIcon, };
@@ -0,0 +1,7 @@
1
+ export declare const mimeTypeMap: Record<string, string[]>;
2
+ export declare const getFileExtension: (file?: unknown) => string;
3
+ export declare const getFileMimeType: (file?: unknown) => string;
4
+ export declare const isExtensionMatchingMimeType: (extension?: unknown, mimeType?: unknown) => boolean;
5
+ export declare const isValidFileType: (file?: unknown, acceptableTypePattern?: unknown) => boolean;
6
+ export declare const isValidFileSize: (file?: unknown, fileSizeMbLimit?: unknown) => boolean;
7
+ export declare const isValidFileDimension: (file?: unknown, minWidth?: number, minHeight?: number) => Promise<boolean>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { Area } from 'react-easy-crop';
2
+ export declare const createImage: (url: string) => Promise<HTMLImageElement>;
3
+ export declare const getRadianAngle: (degreeValue?: number) => number;
4
+ export declare const rotateSize: (width: number, height: number, rotation: number) => {
5
+ width: number;
6
+ height: number;
7
+ };
8
+ export declare const getCroppedImageURL: (imageSrc: string, pixelCrop: Area, rotation?: number, flip?: {
9
+ horizontal: boolean;
10
+ vertical: boolean;
11
+ }) => Promise<string | null>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { getFileExtension, getFileMimeType, isExtensionMatchingMimeType, isValidFileDimension, isValidFileSize, isValidFileType, mimeTypeMap, } from './file';
2
+ export { createImage, getCroppedImageURL, getRadianAngle, rotateSize } from './image';