@app-studio/web 0.8.60 → 0.8.61

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,5 +1,5 @@
1
1
  import React, { CSSProperties } from 'react';
2
- import { ButtonProps as $ButtonProps, Shadow } from 'app-studio';
2
+ import { ButtonProps as $ButtonProps, Shadow, ViewProps } from 'app-studio';
3
3
  import { Elevation } from '../../../utils/elevation';
4
4
  import { IconPosition, Shape, Size, Variant, LoaderPosition, Effects } from './Button.type';
5
5
  import { LoaderProps } from '../../Loader/Loader/Loader.props';
@@ -23,4 +23,6 @@ export interface ButtonProps extends Omit<$ButtonProps, 'size'> {
23
23
  ariaLabel?: string;
24
24
  variant?: Variant;
25
25
  effect?: Effects;
26
+ containerProps?: ViewProps;
27
+ linkProps?: ViewProps;
26
28
  }
@@ -9,6 +9,9 @@ export interface IconProps extends Omit<ViewProps, 'size'> {
9
9
  }
10
10
  export declare const ChevronIcon: React.FC<IconProps>;
11
11
  export declare const DragHandleIcon: React.FC<IconProps>;
12
+ export declare const FileIcon: React.FC<IconProps>;
13
+ export declare const VideoIcon: React.FC<IconProps>;
14
+ export declare const ImageIcon: React.FC<IconProps>;
12
15
  export declare const TwitterIcon: React.FC<IconProps>;
13
16
  export declare const XIcon: React.FC<IconProps>;
14
17
  export declare const TwitchIcon: React.FC<IconProps>;
@@ -20,6 +23,8 @@ export declare const LinkedinIcon: React.FC<IconProps>;
20
23
  export declare const ThreadsIcon: React.FC<IconProps>;
21
24
  export declare const MinusIcon: React.FC<IconProps>;
22
25
  export declare const InfoIcon: React.FC<IconProps>;
26
+ export declare const PlayIcon: React.FC<IconProps>;
27
+ export declare const PauseIcon: React.FC<IconProps>;
23
28
  export declare const HeartIcon: React.FC<IconProps>;
24
29
  export declare const StarIcon: React.FC<IconProps>;
25
30
  export declare const SaveIcon: React.FC<IconProps>;
@@ -7,7 +7,6 @@ export interface TextProps extends Omit<TextAppProps, 'children' | 'style' | 'po
7
7
  isItalic?: boolean;
8
8
  isStriked?: boolean;
9
9
  isUnderlined?: boolean;
10
- isTruncated?: boolean;
11
10
  isSub?: boolean;
12
11
  isSup?: boolean;
13
12
  maxLines?: number;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { UploadProps, UseUploadProps } from './Uploader.props';
3
+ export declare const useUpload: ({ maxSize, onFileSelect, validateFile, thumbnail, onError, }: UseUploadProps) => {
4
+ previewUrl: string | null;
5
+ thumbnailUrl: string | null;
6
+ errorMessage: string | null;
7
+ fileInputRef: React.RefObject<HTMLInputElement>;
8
+ videoRef: React.RefObject<HTMLVideoElement>;
9
+ selectedFile: File | null;
10
+ handleFileChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
11
+ handleClick: () => void | undefined;
12
+ };
13
+ export declare const Uploader: React.FC<UploadProps>;
@@ -0,0 +1,37 @@
1
+ /// <reference types="react" />
2
+ import type { ImageProps, TextProps, ViewProps } from 'app-studio';
3
+ import { IconProps } from '..';
4
+ export interface UseUploadProps {
5
+ accept?: string;
6
+ maxSize?: number;
7
+ onFileSelect?: (file: File) => void;
8
+ validateFile?: (file: File) => string | null;
9
+ onError?: (error: string) => void;
10
+ thumbnail?: string;
11
+ }
12
+ export interface UploadProps {
13
+ isLoading?: boolean;
14
+ icon?: React.ReactNode;
15
+ accept?: string;
16
+ text?: string;
17
+ maxSize?: number;
18
+ progress?: number;
19
+ onFileSelect?: (file: File) => void;
20
+ validateFile?: (file: File) => string | null;
21
+ onError?: (error: string) => void;
22
+ containerProps?: ViewProps;
23
+ errorMessageProps?: TextProps;
24
+ thumbnailContainerProps?: ViewProps;
25
+ loadingProps?: ViewProps;
26
+ progressProps?: ViewProps;
27
+ videoProps?: ViewProps;
28
+ imageProps?: ImageProps;
29
+ iconProps?: IconProps;
30
+ textProps?: TextProps;
31
+ renderVideo?: (props: any) => React.ReactNode;
32
+ renderText?: (props: any) => React.ReactNode;
33
+ renderImage?: (props: any) => React.ReactNode;
34
+ renderError?: (props: any) => React.ReactNode;
35
+ renderFile?: (props: any) => React.ReactNode;
36
+ renderProgress?: (props: any) => React.ReactNode;
37
+ }
@@ -21,6 +21,7 @@ export * from './Layout/Vertical/Vertical';
21
21
  export * from './Layout/View/View';
22
22
  export * from './Link/Link';
23
23
  export * from './Loader/Loader';
24
+ export * from './Uploader/Uploader';
24
25
  export * from './Message/Message';
25
26
  export * from './Modal/Modal';
26
27
  export * from './Table/Table';
@@ -53,6 +54,7 @@ export * from './Link/Link/Link.props';
53
54
  export * from './Loader/Loader/Loader.props';
54
55
  export * from './Message/Message/Message.props';
55
56
  export * from './Modal/Modal/Modal.props';
57
+ export * from './Uploader/Uploader.props';
56
58
  export * from './Table/Table/Table.props';
57
59
  export * from './Tabs/Tabs/Tabs.props';
58
60
  export * from './Text/Text/Text.props';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const UploadPage: () => React.JSX.Element;
3
+ export default UploadPage;