@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 CHANGED
@@ -7,3 +7,4 @@ A UI toolkit for building web applications in the Reapit Marketplace. Exports a
7
7
  ## Documentation
8
8
 
9
9
  For the React Component Storybook and documentation visit [here](https://elements.reapit.cloud).
10
+
@@ -6,6 +6,7 @@ export interface DrawerProps extends HTMLAttributes<HTMLDivElement> {
6
6
  subtitle?: string;
7
7
  className?: string;
8
8
  footerItems?: ReactNode;
9
+ canDismiss?: boolean;
9
10
  }
10
11
  export interface DrawerBaseProps extends HTMLAttributes<HTMLElement> {
11
12
  }
@@ -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
+ }>;
@@ -8,6 +8,7 @@ export interface TabsOption {
8
8
  export interface TabsProps extends HTMLAttributes<HTMLInputElement> {
9
9
  options: TabsOption[];
10
10
  name: string;
11
+ isControlled?: boolean;
11
12
  isFullWidth?: boolean;
12
13
  hasNoBorder?: boolean;
13
14
  }