@reapit/elements 4.0.0-beta.4 → 4.0.0-beta.6
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 +1 -0
- package/dist/cjs/components/drawer/drawer.d.ts +1 -0
- package/dist/cjs/components/file-input/file-input.d.ts +8 -1
- package/dist/cjs/components/nav/__styles__/index.d.ts +3 -0
- package/dist/cjs/components/tabs/tabs.d.ts +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/drawer/drawer.d.ts +1 -0
- package/dist/esm/components/file-input/file-input.d.ts +8 -1
- package/dist/esm/components/nav/__styles__/index.d.ts +3 -0
- package/dist/esm/components/tabs/tabs.d.ts +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.css +54 -53
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ChangeEvent, Dispatch, SetStateAction, MouseEvent } from 'react';
|
|
1
|
+
import React, { ChangeEvent, Dispatch, SetStateAction, MouseEvent, FC } from 'react';
|
|
2
2
|
export interface FileInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
3
3
|
onFileUpload?: (uploadImageModel: CreateImageUploadModel) => Promise<any | ImageUploadModel>;
|
|
4
4
|
onFileView?: (base64: string) => void;
|
|
@@ -7,6 +7,9 @@ export interface FileInputProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
7
7
|
label?: string;
|
|
8
8
|
fileName?: string;
|
|
9
9
|
}
|
|
10
|
+
export interface FilePreviewImageProps {
|
|
11
|
+
src?: string;
|
|
12
|
+
}
|
|
10
13
|
export type FileInputWrapped = React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<React.InputHTMLAttributes<HTMLInputElement>>>;
|
|
11
14
|
export interface CreateImageUploadModel {
|
|
12
15
|
name?: string;
|
|
@@ -18,4 +21,8 @@ export interface ImageUploadModel {
|
|
|
18
21
|
export declare const handleFileChange: (setFileName: Dispatch<SetStateAction<string>>, fileName: string, onFileUpload?: ((uploadImageModel: CreateImageUploadModel) => Promise<string | ImageUploadModel>) | undefined) => (event: ChangeEvent<HTMLInputElement>) => FileReader | undefined;
|
|
19
22
|
export declare const handleFileClear: (setFileName: Dispatch<SetStateAction<string>>) => (event: MouseEvent<HTMLSpanElement>) => void;
|
|
20
23
|
export declare const handleFileView: (onFileView: (fileUrl: string) => void, fileUrl: string) => (event: MouseEvent<HTMLSpanElement>) => void;
|
|
24
|
+
/** Safari has a 2mb limit on data urls and will not decode the string to determine the file size
|
|
25
|
+
* using window.atob as this will throw too - this component will display a notification if the user agent is safari
|
|
26
|
+
* and a base64 string is passed and render otherwise */
|
|
27
|
+
export declare const FilePreviewImage: FC<FilePreviewImageProps>;
|
|
21
28
|
export declare const FileInput: FileInputWrapped;
|
|
@@ -39,3 +39,6 @@ export declare const elAppSwitcherOpen: import("@linaria/core").LinariaClassName
|
|
|
39
39
|
export declare const ElNavResponsiveAppSwitcherWrap: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
40
40
|
as?: import("react").ElementType<any> | undefined;
|
|
41
41
|
}>;
|
|
42
|
+
export declare const ElNavResponsiveAppSwitcherIconWrap: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
43
|
+
as?: import("react").ElementType<any> | undefined;
|
|
44
|
+
}>;
|