@ynput/ayon-react-components 0.3.25 → 0.3.26

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/README.md CHANGED
@@ -4,7 +4,7 @@ This is a collection of components for the AYON project. It is a work in progres
4
4
 
5
5
  It can be used to create consistent and accessible AYON addons.
6
6
 
7
- For full documentation, see the [storybook](https://ayon.ynput.io/storybook).
7
+ For full documentation, see the [storybook](https://components.ayon.dev).
8
8
 
9
9
  ## Need a component or found a bug?
10
10
 
@@ -28,4 +28,4 @@ Run locally: `yarn storybook`
28
28
 
29
29
  build: `yarn build-storybook`
30
30
 
31
- build-package: `yarn build`
31
+ build-package: `yarn build`
@@ -11,5 +11,6 @@ export interface FileCardProps extends React.HTMLAttributes<HTMLDivElement> {
11
11
  readOnly?: boolean;
12
12
  disabled?: boolean;
13
13
  message?: string;
14
+ preview?: string | null;
14
15
  }
15
16
  export declare const FileCard: FC<FileCardProps>;
@@ -1,9 +1,11 @@
1
1
  import { IconType } from '../Icon';
2
+ import { AcceptType } from './fileTypes';
2
3
  export interface CustomFile {
3
4
  sequenceId: string | null;
4
5
  sequenceNumber: number | null;
5
6
  message?: string;
6
7
  file: File;
8
+ dataUrl?: string | null;
7
9
  }
8
10
  type FormProps = Omit<React.HTMLAttributes<HTMLFormElement>, 'onSubmit'>;
9
11
  export interface FileUploadProps extends FormProps {
@@ -11,7 +13,7 @@ export interface FileUploadProps extends FormProps {
11
13
  setFiles: React.Dispatch<React.SetStateAction<CustomFile[]>>;
12
14
  allowMultiple?: boolean;
13
15
  allowSequence?: boolean;
14
- validExtensions?: string[];
16
+ accept?: (AcceptType | string)[];
15
17
  confirmLabel?: string;
16
18
  saveButton?: React.ReactNode;
17
19
  header?: React.ReactNode;
@@ -27,6 +29,8 @@ export interface FileUploadProps extends FormProps {
27
29
  listStyle?: React.CSSProperties;
28
30
  dropIcon?: IconType;
29
31
  readOnly?: boolean;
32
+ disableImagePreviews?: boolean;
33
+ maxImagePreviewSize?: number;
30
34
  }
31
35
  export declare const FileUpload: import("react").ForwardRefExoticComponent<FileUploadProps & import("react").RefAttributes<HTMLFormElement>>;
32
36
  export {};
@@ -0,0 +1,5 @@
1
+ type CommonImageExtension = '.jpg' | '.jpeg' | '.png' | '.gif' | '.bmp' | '.webp' | '.svg' | '.tiff' | '.ico' | '.exr';
2
+ type CommonVideoExtension = '.mp4' | '.mov' | '.avi' | '.wmv' | '.flv' | '.webm' | '.mkv';
3
+ type FileMime = 'application/*' | 'application/pdf' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.ms-powerpoint' | 'application/zip' | 'application/x-rar-compressed' | 'application/x-tar' | 'application/x-7z-compressed' | 'application/x-gzip' | 'application/x-bzip2' | 'application/x-iso9660-image' | 'application/x-apple-diskimage' | 'application/javascript' | 'application/json' | 'application/xml' | 'audio/*' | 'audio/mpeg' | 'audio/wav' | 'audio/ogg' | 'video/*' | 'video/mp4' | 'video/quicktime' | 'video/x-msvideo' | 'image/*' | 'image/png' | 'image/jpeg' | 'image/gif' | 'image/bmp' | 'image/webp' | 'image/svg+xml' | 'text/*' | 'text/plain' | 'text/html' | 'text/css';
4
+ export type AcceptType = CommonImageExtension | CommonVideoExtension | FileMime | '*';
5
+ export {};