@hexure/ui 1.7.0 → 1.8.0

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.
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { MenuItemProps } from '../MoreMenu/MoreMenu';
3
+ export interface ButtonMenuProps {
4
+ disabled?: boolean;
5
+ label: string;
6
+ small?: boolean;
7
+ menuItems: Array<MenuItemProps>;
8
+ maxHeight?: string | number;
9
+ position?: 'left' | 'right';
10
+ }
11
+ declare const ButtonMenu: FC<ButtonMenuProps>;
12
+ export default ButtonMenu;
@@ -0,0 +1 @@
1
+ export { default } from './ButtonMenu';
@@ -1,23 +1,23 @@
1
1
  import { FC } from 'react';
2
- import { AccessibleProps } from '../../utils/Accessibility';
3
- export interface FileUploadProps extends AccessibleProps {
4
- /** It is used to get the array of files. */
5
- onChange: (e: any) => void;
6
- /** It is used to get the delete file. */
7
- onFileDelete: (e: any) => void;
8
- /** It is used to get max file size in MBs. */
9
- maxFileSize: number;
10
- /** It is used to whether the progress bar should be shown or not. */
11
- progress: boolean;
12
- /** It is used to set the upload progress value from 0 to 100. */
13
- UploadProgress?: {
14
- index: number;
15
- progress: number;
16
- };
17
- /** It is used to set the value of multile file upload in boolean. */
18
- multiple: boolean;
19
- /** It is used to set the value of acceptable files. Example ".jpg, .jpeg, .pdf"*/
20
- acceptFiles: string;
2
+ export interface FileUploadProps {
3
+ /** A method to call when files are added/removed. Return the new file or array of files. */
4
+ onChange?: (files: Array<File>) => void;
5
+ /** A method to call when files are rejected. Returns an array of files and their errors */
6
+ onError?: (errors: Array<ErrorObject>) => void;
7
+ /** The maximum number of files that be added. */
8
+ maxFiles?: number;
9
+ /** The maximum file size allowed, in MBs. */
10
+ maxSize?: number;
11
+ /** Display a message in the dropzone area */
12
+ message?: string;
13
+ /** A string of comma separated file types */
14
+ accept?: string;
15
+ /** A method that will be run against each file to determine if it's valid before being added. Must return a boolean. */
16
+ validateFile?: (file: File) => boolean;
17
+ }
18
+ interface ErrorObject {
19
+ file: File;
20
+ message: string;
21
21
  }
22
22
  declare const FileUpload: FC<FileUploadProps>;
23
23
  export default FileUpload;
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { AccessibleProps } from '../../utils/Accessibility';
3
- interface MenuItemProps extends AccessibleProps {
3
+ export interface MenuItemProps extends AccessibleProps {
4
4
  icon?: string;
5
5
  label?: string;
6
6
  onClick: (e?: any) => void;
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ import { MenuItemProps } from '../MoreMenu/MoreMenu';
3
+ export interface PageHeaderProps {
4
+ title?: string;
5
+ breadcrumbs?: Array<{
6
+ label: string;
7
+ onClick?: (e: any) => void;
8
+ }>;
9
+ actions?: Array<{
10
+ disabled?: boolean;
11
+ format?: 'primary' | 'secondary' | 'red';
12
+ icon?: string;
13
+ label: string;
14
+ onClick?: (e: any) => void;
15
+ }>;
16
+ buttonMenu?: {
17
+ disabled?: boolean;
18
+ icon?: string;
19
+ label: string;
20
+ menuItems: Array<MenuItemProps>;
21
+ };
22
+ }
23
+ declare const PageHeader: FC<PageHeaderProps>;
24
+ export default PageHeader;
@@ -0,0 +1 @@
1
+ export { default } from './PageHeader';