@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.
- package/dist/components/Button/Button/Button.props.d.ts +3 -1
- package/dist/components/DragAndDrop/DragAndDrop/DragAndDrop.props.d.ts +9 -0
- package/dist/components/DragAndDrop/DragAndDrop/DragAndDrop.state.d.ts +9 -0
- package/dist/components/DragAndDrop/DragAndDrop/DragAndDrop.view.d.ts +10 -0
- package/dist/components/DragAndDrop/DragAndDrop.d.ts +4 -0
- package/dist/components/DragAndDrop/examples/Simple.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +6 -0
- package/dist/components/Text/Text/Text.props.d.ts +0 -1
- package/dist/components/Uploader/Uploader.d.ts +13 -0
- package/dist/components/Uploader/Uploader.props.d.ts +37 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/pages/dragAndDrop.page.d.ts +3 -0
- package/dist/pages/icon.page.d.ts +2 -2
- package/dist/pages/upload.page.d.ts +3 -0
- package/dist/web.cjs.development.js +795 -185
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +787 -187
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +796 -189
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 {};
|
|
@@ -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>;
|
|
@@ -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';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
export default
|
|
2
|
+
export declare const IconPage: () => React.JSX.Element;
|
|
3
|
+
export default IconPage;
|