@foris/avocado-suite 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/dist/avocado-suite/src/components/DataTable/DataTable.d.ts +8 -0
  2. package/dist/avocado-suite/src/components/DataTable/components/DataTableAction/DataTableAction.d.ts +28 -0
  3. package/dist/avocado-suite/src/components/DataTable/components/DataTableAction/DataTableActionsGroup.d.ts +10 -0
  4. package/dist/avocado-suite/src/components/DataTable/components/DataTableContent/DataTableContent.d.ts +71 -0
  5. package/dist/avocado-suite/src/components/DataTable/components/DataTableHeader/DataTableHeader.d.ts +20 -0
  6. package/dist/avocado-suite/src/components/DataTable/components/DataTableRow/DataTableRow.d.ts +16 -0
  7. package/dist/avocado-suite/src/components/DataTable/components/DataTableRow/DataTableRowAccordion.d.ts +18 -0
  8. package/dist/avocado-suite/src/components/DataTable/utils/dataTableUtil.d.ts +18 -0
  9. package/dist/avocado-suite/src/components/Pill/Pill.d.ts +23 -0
  10. package/dist/avocado-suite/src/components/Pill/Pill.test.d.ts +1 -0
  11. package/dist/avocado-suite/src/components/box/Box.d.ts +11 -0
  12. package/dist/avocado-suite/src/components/box/Box.test.d.ts +0 -0
  13. package/dist/avocado-suite/src/components/breadcrumbs/Breadcrumbs.d.ts +19 -0
  14. package/dist/avocado-suite/src/components/breadcrumbs/Breadcrumbs.test.d.ts +0 -0
  15. package/dist/avocado-suite/src/components/button/Button.d.ts +19 -0
  16. package/dist/avocado-suite/src/components/button/Button.test.d.ts +0 -0
  17. package/dist/avocado-suite/src/components/card/Card.d.ts +17 -0
  18. package/dist/avocado-suite/src/components/card/Card.test.d.ts +0 -0
  19. package/dist/avocado-suite/src/components/card-notification/CardNotification.d.ts +27 -0
  20. package/dist/avocado-suite/src/components/card-notification/CardNotification.test.d.ts +0 -0
  21. package/dist/avocado-suite/src/components/checkbox/Checkbox.d.ts +16 -0
  22. package/dist/avocado-suite/src/components/checkbox/Checkbox.test.d.ts +0 -0
  23. package/dist/avocado-suite/src/components/divider/Divider.d.ts +11 -0
  24. package/dist/avocado-suite/src/components/divider/Divider.test.d.ts +0 -0
  25. package/dist/avocado-suite/src/components/donut/Donut.d.ts +18 -0
  26. package/dist/avocado-suite/src/components/donut/donut-labels/DonutLabels.d.ts +10 -0
  27. package/dist/avocado-suite/src/components/donut/donut-legend/DonutLegend.d.ts +14 -0
  28. package/dist/avocado-suite/src/components/heading/Heading.d.ts +13 -0
  29. package/dist/avocado-suite/src/components/heading/Heading.test.d.ts +0 -0
  30. package/dist/avocado-suite/src/components/link/Link.d.ts +22 -0
  31. package/dist/avocado-suite/src/components/link/Link.test.d.ts +0 -0
  32. package/dist/avocado-suite/src/components/menu/Menu.d.ts +14 -0
  33. package/dist/avocado-suite/src/components/menu/Menu.test.d.ts +0 -0
  34. package/dist/avocado-suite/src/components/pager/Page.test.d.ts +0 -0
  35. package/dist/avocado-suite/src/components/pager/Pager.d.ts +49 -0
  36. package/dist/avocado-suite/src/components/pager/components/ArrowPager.d.ts +9 -0
  37. package/dist/avocado-suite/src/components/pager/components/ButtonPager.d.ts +11 -0
  38. package/dist/avocado-suite/src/components/pager/utils/generateArrayOfPages.d.ts +2 -0
  39. package/dist/avocado-suite/src/components/processing/Processing.d.ts +3 -0
  40. package/dist/avocado-suite/src/components/progress-bar/ProgressBar.d.ts +13 -0
  41. package/dist/avocado-suite/src/components/progress-bar/ProgressBar.test.d.ts +0 -0
  42. package/dist/avocado-suite/src/components/radio-button/RadioButton.d.ts +17 -0
  43. package/dist/avocado-suite/src/components/radio-button/RadioButton.test.d.ts +0 -0
  44. package/dist/avocado-suite/src/components/round-button/RoundButton.d.ts +17 -0
  45. package/dist/avocado-suite/src/components/round-button/RoundButton.test.d.ts +0 -0
  46. package/dist/avocado-suite/src/components/select/Select.d.ts +24 -0
  47. package/dist/avocado-suite/src/components/select/Select.test.d.ts +0 -0
  48. package/dist/avocado-suite/src/components/select/components/SelectIndicators.d.ts +8 -0
  49. package/dist/avocado-suite/src/components/select-pagination/SelectPagination.d.ts +26 -0
  50. package/dist/avocado-suite/src/components/select-pagination/SelectPagination.test.d.ts +0 -0
  51. package/dist/avocado-suite/src/components/skeleton-base/SkeletonBase.d.ts +15 -0
  52. package/dist/avocado-suite/src/components/skeleton-circle/SkeletonCircle.d.ts +9 -0
  53. package/dist/avocado-suite/src/components/stepper/Stepper.d.ts +13 -0
  54. package/dist/avocado-suite/src/components/stepper/Stepper.test.d.ts +0 -0
  55. package/dist/avocado-suite/src/components/tabs/Tabs.d.ts +18 -0
  56. package/dist/avocado-suite/src/components/tabs/Tabs.test.d.ts +0 -0
  57. package/dist/avocado-suite/src/components/tag/Tag.d.ts +28 -0
  58. package/dist/avocado-suite/src/components/tag/Tag.test.d.ts +0 -0
  59. package/dist/avocado-suite/src/components/text/Text.d.ts +15 -0
  60. package/dist/avocado-suite/src/components/text/Text.test.d.ts +0 -0
  61. package/dist/avocado-suite/src/components/text-field/TextField.d.ts +17 -0
  62. package/dist/avocado-suite/src/components/text-field/TextField.test.d.ts +0 -0
  63. package/dist/avocado-suite/src/components/text-field/components/StatusIcon.d.ts +7 -0
  64. package/dist/avocado-suite/src/components/timer/Timer.d.ts +48 -0
  65. package/dist/avocado-suite/src/components/timer/Timer.test.d.ts +0 -0
  66. package/dist/avocado-suite/src/components/timer/timer.util.d.ts +8 -0
  67. package/dist/avocado-suite/src/components/toaster/Toaster.d.ts +3 -0
  68. package/dist/avocado-suite/src/components/tooltip/Tooltip.d.ts +23 -0
  69. package/dist/avocado-suite/src/components/tooltip/Tooltip.test.d.ts +0 -0
  70. package/dist/avocado-suite/src/constants/theme.constants.d.ts +3 -0
  71. package/dist/avocado-suite/src/contexts/theme/ThemeProvider.d.ts +13 -0
  72. package/dist/avocado-suite/src/hooks/useClickOutside.d.ts +7 -0
  73. package/dist/avocado-suite/src/hooks/useTheme.d.ts +3 -0
  74. package/dist/avocado-suite/src/index.d.ts +34 -0
  75. package/dist/avocado-suite/src/types/menu.types.d.ts +7 -0
  76. package/dist/avocado-suite/src/types/theme.types.d.ts +4 -0
  77. package/dist/avocado-suite.es.js +8724 -0
  78. package/dist/avocado-suite.umd.js +493 -0
  79. package/dist/index.d.ts +1 -0
  80. package/dist/style.css +1 -0
  81. package/package.json +5 -3
@@ -0,0 +1,8 @@
1
+ declare const DataTable: {
2
+ Action: import("react").FC<import("./components/DataTableAction/DataTableAction").IDataTableAction>;
3
+ ActionsGroup: import("react").FC<import("./components/DataTableAction/DataTableActionsGroup").IDataTableActionsGroup>;
4
+ Content: import("react").FC<import("./components/DataTableContent/DataTableContent").IDataTableContent>;
5
+ Header: import("react").FC<import("./components/DataTableHeader/DataTableHeader").IDataTableHeader>;
6
+ Row: import("react").FC<import("./components/DataTableRow/DataTableRow").IDataTableRow>;
7
+ };
8
+ export default DataTable;
@@ -0,0 +1,28 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { IconTypes } from '../../../../../../avocado-icons/src/types/icons.type.ts';
3
+ import IconSize from '../../../../../../avocado-icons/src/types/size.enum';
4
+ export type DataTableActionPosition = 'left' | 'right';
5
+ export type DataTableActionType = 'primary' | 'success' | 'warning' | 'danger';
6
+ export interface IDataTableAction {
7
+ /** replace icon with another element */
8
+ children?: ReactNode | string;
9
+ /** overwrite children classnames */
10
+ classname?: {
11
+ aside?: string;
12
+ icon?: string;
13
+ };
14
+ /** disabled state */
15
+ disabled?: boolean;
16
+ /** icon value */
17
+ icon?: IconTypes;
18
+ /** icon size */
19
+ iconSize?: keyof typeof IconSize;
20
+ /** position value */
21
+ position: DataTableActionPosition;
22
+ /** type value */
23
+ type?: DataTableActionType;
24
+ /** option to action in anchor*/
25
+ onClick?: () => void;
26
+ }
27
+ declare const DataTableAction: FC<IDataTableAction>;
28
+ export default DataTableAction;
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import DataTableAction from './DataTableAction';
3
+ export interface IDataTableActionsGroup {
4
+ /** actions */
5
+ children: React.ReactElement<typeof DataTableAction> | React.ReactElement<typeof DataTableAction>[];
6
+ /** overwrite className */
7
+ className?: string;
8
+ }
9
+ declare const DataTableActionsGroup: React.FC<IDataTableActionsGroup>;
10
+ export default DataTableActionsGroup;
@@ -0,0 +1,71 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import DataTableAction from '../DataTableAction/DataTableAction';
3
+ import DataTableActionsGroup from '../DataTableAction/DataTableActionsGroup';
4
+ export type DataTableContentType = 'accordion' | 'regular';
5
+ export type DataTableSubContentStyle = 'inheritance' | 'custom';
6
+ export interface IColumn {
7
+ accessor: string;
8
+ header: string;
9
+ position: number;
10
+ styles?: CSSProperties;
11
+ renderCell?: (value: any) => void;
12
+ tooltip?: boolean | string;
13
+ }
14
+ export interface IResponsiveStylesOptions {
15
+ maxWidth?: string;
16
+ minWidth?: string;
17
+ padding?: string;
18
+ width?: string;
19
+ textAlign?: 'left' | 'right' | 'center';
20
+ }
21
+ export interface IResponsiveOptions {
22
+ position?: number;
23
+ styles?: IResponsiveStylesOptions;
24
+ }
25
+ export interface IColumnResponsive {
26
+ allDevices?: IResponsiveOptions;
27
+ desktop?: IResponsiveOptions;
28
+ mobile?: IResponsiveOptions;
29
+ }
30
+ export interface IDataTableContentColumn {
31
+ /** This string is used to build the data model for your column. */
32
+ accessor: string;
33
+ /** Column's name */
34
+ header: string;
35
+ /** The responsive configuration for the column. */
36
+ responsive?: IColumnResponsive;
37
+ /** This function (or component) is primarily used for formatting the column value */
38
+ renderCell?: (value: any) => void;
39
+ /** Tooltip to display the cell content or an extra value. */
40
+ tooltip?: boolean | string;
41
+ }
42
+ export interface IDataTableContentActions {
43
+ /** Column's name */
44
+ header?: React.ReactNode | string;
45
+ /** Column's visibility */
46
+ visibility: boolean;
47
+ /** This function (or component) is primarily used for formatting the column value */
48
+ renderComponent: (value: any) => React.ReactElement<typeof DataTableAction> | React.ReactElement<typeof DataTableActionsGroup> | null;
49
+ }
50
+ export interface IDataTableContent {
51
+ /** overwrite className */
52
+ className?: string;
53
+ /** The columns configuration for the table. */
54
+ columns: IDataTableContentColumn[];
55
+ /** The data that you want to display on the table. */
56
+ data: any[];
57
+ /** Left action or actions on the table */
58
+ leftActions?: IDataTableContentActions;
59
+ /** Right action or actions on the table */
60
+ rightActions?: IDataTableContentActions;
61
+ /** content type: regular | accordion */
62
+ contentType?: DataTableContentType;
63
+ /** key to render sub data */
64
+ keyBody?: string;
65
+ /** style of sub content: inheritance | custom */
66
+ styleBody?: DataTableSubContentStyle;
67
+ /** event to render each sub row */
68
+ renderBody?: (body: any) => any;
69
+ }
70
+ declare const DataTableContent: React.FC<IDataTableContent>;
71
+ export default DataTableContent;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { DataTableContentType, DataTableSubContentStyle, IDataTableContentActions, IDataTableContentColumn } from '../DataTableContent/DataTableContent';
3
+ export interface IDataTableHeader {
4
+ /** overwrite className */
5
+ className?: string;
6
+ /** The columns configuration for the table. */
7
+ columns: IDataTableContentColumn[];
8
+ /** content type: regular | accordion */
9
+ contentType?: DataTableContentType;
10
+ /** Check if is mobile device */
11
+ isMobile?: boolean;
12
+ /** Left action or actions on the table */
13
+ leftActions?: IDataTableContentActions;
14
+ /** Right action or actions on the table */
15
+ rightActions?: IDataTableContentActions;
16
+ /** style of sub content: inheritance | custom */
17
+ styleBody?: DataTableSubContentStyle;
18
+ }
19
+ declare const DataTableHeader: React.FC<IDataTableHeader>;
20
+ export default DataTableHeader;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { IColumn, IDataTableContentActions } from '../DataTableContent/DataTableContent';
3
+ export interface IDataTableRow {
4
+ /** The columns parsed for the table. */
5
+ columns: IColumn[][];
6
+ /** The data that you want to display on the table. */
7
+ data: any;
8
+ /** Check if is mobile device */
9
+ isMobile?: boolean;
10
+ /** Left action or actions on the table */
11
+ leftActions?: IDataTableContentActions;
12
+ /** Right action or actions on the table */
13
+ rightActions?: IDataTableContentActions;
14
+ }
15
+ declare const DataTableRow: FC<IDataTableRow>;
16
+ export default DataTableRow;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { DataTableSubContentStyle } from '../DataTableContent/DataTableContent';
3
+ export interface IDataTableRowAccordion {
4
+ /** The columns parsed for the table. */
5
+ columns: any[];
6
+ /** The data that you want to display on the table. */
7
+ data: any;
8
+ /** Check if is mobile device */
9
+ isMobile?: boolean;
10
+ /** key to render sub data */
11
+ keyBody?: string;
12
+ /** style of sub content: inheritance | custom */
13
+ styleBody?: DataTableSubContentStyle;
14
+ /** event to render each sub row */
15
+ renderBody?: (body: any) => any;
16
+ }
17
+ declare const DataTableRowAccordion: React.FC<IDataTableRowAccordion>;
18
+ export default DataTableRowAccordion;
@@ -0,0 +1,18 @@
1
+ import { IDataTableContentColumn, IResponsiveOptions, IResponsiveStylesOptions } from '../components/DataTableContent/DataTableContent';
2
+ export declare const getStyles: (options?: IResponsiveOptions) => {
3
+ maxWidth: string;
4
+ minWidth: string;
5
+ padding: string;
6
+ textAlign: "center" | "left" | "right";
7
+ width: string;
8
+ };
9
+ export declare const parseColumn: (column: IDataTableContentColumn, index: number) => {
10
+ accessor: string;
11
+ header: string;
12
+ renderCell?: ((value: any) => void) | undefined;
13
+ tooltip?: string | boolean | undefined;
14
+ position: number;
15
+ styles: IResponsiveStylesOptions;
16
+ };
17
+ export declare const verifyActionComponent: (element: any) => any;
18
+ export declare const verifyActionsGroupComponent: (element: any) => any;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { IconTypes } from '../../../../../../../../avocado-icons/src/types/icons.type';
3
+ import { Color } from '../../../../../../../../avocado-icons/src/types/color.enum';
4
+ export interface PillProps {
5
+ /** Optional Icon name */
6
+ icon?: IconTypes;
7
+ /** Overwrite icon original color */
8
+ iconColor?: `${Color}`;
9
+ /** Icon filled state */
10
+ iconFilled?: boolean;
11
+ /** Overwrite pill original color */
12
+ color?: `${Color}`;
13
+ /** Overwrite pill original text color */
14
+ textColor?: `${Color}`;
15
+ /** Controls pill outlined state */
16
+ outlined?: boolean;
17
+ /** content pill */
18
+ children: React.ReactNode | string;
19
+ /** overwrite className */
20
+ className?: string;
21
+ }
22
+ declare const Pill: React.FC<PillProps>;
23
+ export default Pill;
@@ -0,0 +1,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface BoxProps {
3
+ /** content card */
4
+ children: ReactNode | string;
5
+ /** Overwrite className */
6
+ className?: string;
7
+ /** Use dark colors palette*/
8
+ darkMode?: boolean;
9
+ }
10
+ declare const Box: FC<BoxProps>;
11
+ export default Box;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ export interface BreadcrumbItem {
3
+ /** To integrate with react-router component */
4
+ component?: React.ReactElement;
5
+ /** Path working with `href` attribute */
6
+ path?: string;
7
+ /** Navigation item name */
8
+ title: string;
9
+ }
10
+ interface BreadcrumbsProps {
11
+ /** Overwrite className */
12
+ className?: string;
13
+ /** Use dark colors palette*/
14
+ darkMode?: boolean;
15
+ /** The navigation stack */
16
+ items: BreadcrumbItem[];
17
+ }
18
+ declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
19
+ export default Breadcrumbs;
@@ -0,0 +1,19 @@
1
+ import React, { FC } from 'react';
2
+ import { IconTypes } from '../../../../avocado-icons/src/types/icons.type.ts';
3
+ export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
4
+ export interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
5
+ /** Render content button */
6
+ children: React.ReactNode | string;
7
+ /** Overwrite className */
8
+ className?: string;
9
+ /** Loading state */
10
+ loading?: boolean;
11
+ /** Show icon on the left */
12
+ leftIcon?: IconTypes;
13
+ /** Show icon on the right */
14
+ rightIcon?: IconTypes;
15
+ /** Use the variant prop to change the visual style of the Button */
16
+ variant?: ButtonVariant;
17
+ }
18
+ declare const Button: FC<ButtonProps>;
19
+ export default Button;
@@ -0,0 +1,17 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface CardProps {
3
+ /** Content card */
4
+ children: ReactNode;
5
+ /** Overwrite className */
6
+ className?: string;
7
+ /** Color id */
8
+ colorId?: number;
9
+ /** Overwrite content className */
10
+ classNameContent?: string;
11
+ /** Disabled state */
12
+ disabled?: boolean;
13
+ /** OnClick event */
14
+ onClick?: () => void;
15
+ }
16
+ declare const Card: FC<CardProps>;
17
+ export default Card;
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ import { ReactElement } from 'react';
3
+ declare enum NotificationState {
4
+ Warning = "warning",
5
+ Error = "error",
6
+ Info = "info",
7
+ Success = "success"
8
+ }
9
+ interface CardNotificationProps {
10
+ /** State or variant of the notification */
11
+ state: `${NotificationState}`;
12
+ /** Outlined variant */
13
+ outlined?: boolean;
14
+ /** Overwrite className */
15
+ className?: string;
16
+ /** Title of the notification */
17
+ title: ReactElement | string;
18
+ /** Description of the notification */
19
+ description?: ReactElement | string;
20
+ /** Action of the notification */
21
+ action?: {
22
+ text: string;
23
+ onClick: () => void;
24
+ };
25
+ }
26
+ declare const CardNotification: FC<CardNotificationProps>;
27
+ export default CardNotification;
@@ -0,0 +1,16 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface CheckboxProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
3
+ /** Overwrite className */
4
+ className?: string;
5
+ /** Overwrite className in checkbox */
6
+ classNameCheckbox?: string;
7
+ /** label Left side checkbox */
8
+ labelLeft?: ReactNode | string;
9
+ /** label Right side checkbox */
10
+ labelRight?: ReactNode | string;
11
+ /** disabled state */
12
+ disabled?: boolean;
13
+ ref?: any;
14
+ }
15
+ declare const Checkbox: FC<CheckboxProps>;
16
+ export default Checkbox;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ interface DividerProps {
3
+ /** Overwrite className */
4
+ className?: string;
5
+ /** Disabled state */
6
+ disabled?: boolean;
7
+ /** Set the position vertical */
8
+ vertical?: boolean;
9
+ }
10
+ declare const Divider: FC<DividerProps>;
11
+ export default Divider;
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ export interface IDonutItem {
3
+ name: string;
4
+ percentage: number;
5
+ value: number;
6
+ }
7
+ export interface DonutProps {
8
+ /** overwrite className */
9
+ className?: string;
10
+ /** data */
11
+ data: IDonutItem[];
12
+ /** height */
13
+ height?: string;
14
+ /** width */
15
+ width?: string;
16
+ }
17
+ declare const Donut: FC<DonutProps>;
18
+ export default Donut;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { IDonutItem } from '../Donut';
3
+ export interface DonutLabelsProps {
4
+ /** overwrite className */
5
+ className?: string;
6
+ /** data */
7
+ data: IDonutItem[];
8
+ }
9
+ declare const DonutLabels: FC<DonutLabelsProps>;
10
+ export default DonutLabels;
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { IDonutItem } from '../Donut';
3
+ export interface DonutLegendProps {
4
+ /** overwrite className */
5
+ className?: string;
6
+ /** data */
7
+ data: IDonutItem[];
8
+ /** Overwrite total label */
9
+ totalLabel?: string;
10
+ /** Show or not the total label */
11
+ showTotal?: boolean;
12
+ }
13
+ declare const DonutLegend: FC<DonutLegendProps>;
14
+ export default DonutLegend;
@@ -0,0 +1,13 @@
1
+ import { ReactNode, FC } from 'react';
2
+ export interface HeadingProps {
3
+ /** Render content */
4
+ children: ReactNode | string;
5
+ /** Overwrite className */
6
+ className?: string;
7
+ /** Use dark colors palette*/
8
+ darkMode?: boolean;
9
+ /** Set importance. Match with h1, h2, h3 and h4 */
10
+ type: 'h1' | 'h2' | 'h3' | 'h4';
11
+ }
12
+ declare const Heading: FC<HeadingProps>;
13
+ export default Heading;
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ import { IconTypes } from '../../../../avocado-icons/src/types/icons.type';
3
+ export interface LinkProps extends React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> {
4
+ /** Render content link */
5
+ children: React.ReactNode | string;
6
+ /** Overwrite className */
7
+ className?: string;
8
+ /** Set disabled value */
9
+ disabled?: boolean;
10
+ /** Set icon left */
11
+ iconLeft?: IconTypes;
12
+ /** Set icon right */
13
+ iconRight?: IconTypes;
14
+ /** Use when the background is dark */
15
+ inverse?: boolean;
16
+ /** Use size 'sm' or 'md'. Default 'md' */
17
+ size?: 'sm' | 'md';
18
+ /** Handle onClock event */
19
+ onClick?: () => void;
20
+ }
21
+ declare const Link: FC<LinkProps>;
22
+ export default Link;
@@ -0,0 +1,14 @@
1
+ import { FC } from 'react';
2
+ import { MenuItem } from '../../types/menu.types.ts';
3
+ interface MenuProps {
4
+ /** Control if you want to close the list after clicking one of the options or not */
5
+ closeOnClick?: boolean;
6
+ /** From where to start to render the list */
7
+ listOrigin?: 'left' | 'right';
8
+ /** List of the items to render when the menu is open */
9
+ items: MenuItem[];
10
+ /** Overwrite className */
11
+ className?: string;
12
+ }
13
+ declare const Menu: FC<MenuProps>;
14
+ export default Menu;
@@ -0,0 +1,49 @@
1
+ import { FC } from 'react';
2
+ export type PagerProps = {
3
+ /** Overwrite children classNames */
4
+ classname?: {
5
+ global?: string;
6
+ nav?: string;
7
+ arrow?: string;
8
+ button?: string;
9
+ };
10
+ /**
11
+ * Current page
12
+ */
13
+ page: number;
14
+ /**
15
+ * Size per page
16
+ */
17
+ size: number;
18
+ /**
19
+ * Total number of items
20
+ */
21
+ total: number;
22
+ /**
23
+ * Total number of pages
24
+ */
25
+ totalPages?: number;
26
+ /**
27
+ * Callback: Action `onClick` on page
28
+ * @param page number of page
29
+ * @returns
30
+ */
31
+ onChange?: (page: number) => void;
32
+ /**
33
+ * Deprecated use "onChange" prop.
34
+ * @deprecated use "onChange" prop.
35
+ */
36
+ onPageChange?: (page: number) => void;
37
+ /**
38
+ * Deprecated is not used in the component
39
+ * @deprecated is not used in the component
40
+ */
41
+ hasPreviousPage?: boolean;
42
+ /**
43
+ * Deprecated is not used in the component
44
+ * @deprecated is not used in the component
45
+ */
46
+ hasNextPage?: boolean;
47
+ };
48
+ declare const Pager: FC<PagerProps>;
49
+ export default Pager;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ interface ArrowProps {
3
+ className?: string;
4
+ onClick: () => void;
5
+ icon: 'chevron-left' | 'chevron-right' | 'chevrons-left' | 'chevrons-right';
6
+ disabled: boolean;
7
+ }
8
+ declare const Arrow: FC<ArrowProps>;
9
+ export default Arrow;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ interface ButtonPagerProps {
3
+ className?: string;
4
+ onClick: () => void;
5
+ page: number;
6
+ currentPage: number;
7
+ ellipsisAsNumber: number;
8
+ disabled?: boolean;
9
+ }
10
+ declare const ButtonPager: FC<ButtonPagerProps>;
11
+ export default ButtonPager;
@@ -0,0 +1,2 @@
1
+ declare const generateArrayOfPages: (currentPage: number, numberOfPages: number, ellipsisAsNumber: number) => number[];
2
+ export default generateArrayOfPages;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const Processing: FC;
3
+ export default Processing;
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ export interface ProgressBarProps {
3
+ /** overwrite className */
4
+ className?: string;
5
+ /** done */
6
+ done?: number;
7
+ /** inProgress */
8
+ inProgress?: number;
9
+ /** total */
10
+ total: number;
11
+ }
12
+ declare const ProgressBar: FC<ProgressBarProps>;
13
+ export default ProgressBar;
@@ -0,0 +1,17 @@
1
+ import { FC, ReactNode, DetailedHTMLProps, InputHTMLAttributes } from 'react';
2
+ export interface RadioButtonProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
3
+ /** overwrite className */
4
+ className?: string;
5
+ /** overwrite className in RadioButton */
6
+ classNameRadioButton?: string;
7
+ /** Text or ReactNode to be displayed at the left of the radio input */
8
+ labelLeft?: ReactNode | string;
9
+ /** Label Right side RadioButton*/
10
+ labelRight?: ReactNode | string;
11
+ /** disabled state */
12
+ disabled?: boolean;
13
+ /** Reference used on the input component */
14
+ ref?: any;
15
+ }
16
+ declare const RadioButton: FC<RadioButtonProps>;
17
+ export default RadioButton;
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ import { ButtonVariant } from '../button/Button';
3
+ import { IconTypes } from '../../../../../../../../avocado-icons/src/types/icons.type.ts';
4
+ interface RoundButtonProps extends Partial<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>> {
5
+ /** Icon name */
6
+ icon: IconTypes;
7
+ /** Variant of the button */
8
+ variant?: ButtonVariant;
9
+ /** Overwrite className */
10
+ className?: string;
11
+ /** Loading state */
12
+ loading?: boolean;
13
+ /** Disabled state */
14
+ disabled?: boolean;
15
+ }
16
+ declare const RoundButton: FC<RoundButtonProps>;
17
+ export default RoundButton;