@app-studio/web 0.8.59 → 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
  }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { ViewProps } from 'app-studio';
3
+ export interface DragAndDropProps {
4
+ items: any[];
5
+ onChange?: (items: any[]) => void;
6
+ renderItem?: (item: any, index: number) => React.ReactNode;
7
+ containerProps?: ViewProps;
8
+ itemProps?: ViewProps;
9
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { DragAndDropProps } from './DragAndDrop.props';
3
+ export declare const useDragAndDropState: ({ items: initialItems, onChange, }: DragAndDropProps) => {
4
+ items: any[];
5
+ draggedItem: any;
6
+ draggedIndex: number | null;
7
+ itemRefs: import("react").MutableRefObject<(HTMLDivElement | null)[]>;
8
+ handleDragStart: (e: React.MouseEvent | React.TouchEvent, index: number) => void;
9
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { DragAndDropProps } from './DragAndDrop.props';
3
+ interface DragAndDropViewProps extends DragAndDropProps {
4
+ draggedIndex: number | null;
5
+ itemRefs: React.MutableRefObject<(HTMLDivElement | null)[]>;
6
+ renderItem?: (item: any, index: number) => React.ReactNode;
7
+ handleDragStart: (e: React.MouseEvent | React.TouchEvent, index: number) => void;
8
+ }
9
+ export declare const DragAndDropView: React.FC<DragAndDropViewProps>;
10
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { DragAndDropProps } from './DragAndDrop/DragAndDrop.props';
3
+ export declare const DragAndDropComponent: React.FC<DragAndDropProps>;
4
+ export declare const DragAndDrop: React.FC<DragAndDropProps>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SimpleDragAndDrop: () => React.JSX.Element;
@@ -8,6 +8,10 @@ export interface IconProps extends Omit<ViewProps, 'size'> {
8
8
  orientation?: 'left' | 'right' | 'up' | 'down';
9
9
  }
10
10
  export declare const ChevronIcon: React.FC<IconProps>;
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>;
11
15
  export declare const TwitterIcon: React.FC<IconProps>;
12
16
  export declare const XIcon: React.FC<IconProps>;
13
17
  export declare const TwitchIcon: React.FC<IconProps>;
@@ -19,6 +23,8 @@ export declare const LinkedinIcon: React.FC<IconProps>;
19
23
  export declare const ThreadsIcon: React.FC<IconProps>;
20
24
  export declare const MinusIcon: React.FC<IconProps>;
21
25
  export declare const InfoIcon: React.FC<IconProps>;
26
+ export declare const PlayIcon: React.FC<IconProps>;
27
+ export declare const PauseIcon: React.FC<IconProps>;
22
28
  export declare const HeartIcon: React.FC<IconProps>;
23
29
  export declare const StarIcon: React.FC<IconProps>;
24
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';
@@ -30,6 +31,7 @@ export * from './Icon/Icon';
30
31
  export * as Icon from './Icon/Icon';
31
32
  export * from './Toggle/Toggle';
32
33
  export * from './ToggleGroup/ToggleGroup';
34
+ export * from './DragAndDrop/DragAndDrop';
33
35
  export * from './Alert/Alert/Alert.props';
34
36
  export * from './AspectRatio/AspectRatio/AspectRatio.props';
35
37
  export * from './Avatar/Avatar/Avatar.props';
@@ -52,6 +54,7 @@ export * from './Link/Link/Link.props';
52
54
  export * from './Loader/Loader/Loader.props';
53
55
  export * from './Message/Message/Message.props';
54
56
  export * from './Modal/Modal/Modal.props';
57
+ export * from './Uploader/Uploader.props';
55
58
  export * from './Table/Table/Table.props';
56
59
  export * from './Tabs/Tabs/Tabs.props';
57
60
  export * from './Text/Text/Text.props';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const DragAndDropPage: () => React.JSX.Element;
3
+ export default DragAndDropPage;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- export declare const ButtonPage: () => React.JSX.Element;
3
- export default ButtonPage;
2
+ export declare const IconPage: () => React.JSX.Element;
3
+ export default IconPage;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const UploadPage: () => React.JSX.Element;
3
+ export default UploadPage;