@foris/avocado-suite 0.10.0-beta.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,8 @@ export interface BoxProps {
4
4
  children: ReactNode | string;
5
5
  /** Overwrite className */
6
6
  className?: string;
7
+ /** Use dark colors palette*/
8
+ darkMode?: boolean;
7
9
  }
8
10
  declare const Box: FC<BoxProps>;
9
11
  export default Box;
@@ -4,6 +4,8 @@ interface CardProps {
4
4
  children: ReactNode;
5
5
  /** Overwrite className */
6
6
  className?: string;
7
+ /** Color id */
8
+ colorId?: number;
7
9
  /** Overwrite content className */
8
10
  classNameContent?: string;
9
11
  /** Disabled state */
@@ -1,3 +1,5 @@
1
+ import { FC } from 'react';
2
+ import { ReactElement } from 'react';
1
3
  declare enum NotificationState {
2
4
  Warning = "warning",
3
5
  Error = "error",
@@ -12,14 +14,14 @@ interface CardNotificationProps {
12
14
  /** Overwrite className */
13
15
  className?: string;
14
16
  /** Title of the notification */
15
- title: string;
17
+ title: ReactElement | string;
16
18
  /** Description of the notification */
17
- description?: string;
19
+ description?: ReactElement | string;
18
20
  /** Action of the notification */
19
21
  action?: {
20
22
  text: string;
21
23
  onClick: () => void;
22
24
  };
23
25
  }
24
- declare const CardNotification: ({ state, outlined, title, description, action, className, }: CardNotificationProps) => JSX.Element;
26
+ declare const CardNotification: FC<CardNotificationProps>;
25
27
  export default CardNotification;
@@ -1,9 +1,10 @@
1
+ import { FC } from 'react';
1
2
  export interface IDonutItem {
2
3
  name: string;
3
4
  percentage: number;
4
5
  value: number;
5
6
  }
6
- export interface IDonut {
7
+ export interface DonutProps {
7
8
  /** overwrite className */
8
9
  className?: string;
9
10
  /** data */
@@ -13,5 +14,5 @@ export interface IDonut {
13
14
  /** width */
14
15
  width?: string;
15
16
  }
16
- declare const Donut: ({ className, data, height, width, }: IDonut) => JSX.Element;
17
+ declare const Donut: FC<DonutProps>;
17
18
  export default Donut;
@@ -1,9 +1,10 @@
1
+ import { FC } from 'react';
1
2
  import { IDonutItem } from '../Donut';
2
- export interface IDonutLabels {
3
+ export interface DonutLabelsProps {
3
4
  /** overwrite className */
4
5
  className?: string;
5
6
  /** data */
6
7
  data: IDonutItem[];
7
8
  }
8
- declare const DonutLabels: ({ className, data }: IDonutLabels) => JSX.Element;
9
+ declare const DonutLabels: FC<DonutLabelsProps>;
9
10
  export default DonutLabels;
@@ -1,5 +1,6 @@
1
+ import { FC } from 'react';
1
2
  import { IDonutItem } from '../Donut';
2
- export interface IDonutLegend {
3
+ export interface DonutLegendProps {
3
4
  /** overwrite className */
4
5
  className?: string;
5
6
  /** data */
@@ -9,5 +10,5 @@ export interface IDonutLegend {
9
10
  /** Show or not the total label */
10
11
  showTotal?: boolean;
11
12
  }
12
- declare const DonutLegend: ({ className, data, totalLabel, showTotal, }: IDonutLegend) => JSX.Element;
13
+ declare const DonutLegend: FC<DonutLegendProps>;
13
14
  export default DonutLegend;
@@ -1,3 +1,4 @@
1
+ import { FC } from 'react';
1
2
  import { MenuItem } from '../../types/menu.types.ts';
2
3
  interface MenuProps {
3
4
  /** Control if you want to close the list after clicking one of the options or not */
@@ -9,5 +10,5 @@ interface MenuProps {
9
10
  /** Overwrite className */
10
11
  className?: string;
11
12
  }
12
- declare const Menu: (props: MenuProps) => JSX.Element;
13
+ declare const Menu: FC<MenuProps>;
13
14
  export default Menu;
@@ -1,2 +1,3 @@
1
- declare const Processing: () => JSX.Element;
1
+ import { FC } from 'react';
2
+ declare const Processing: FC;
2
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;
@@ -1,3 +1,4 @@
1
+ import { FC } from 'react';
1
2
  import { ButtonVariant } from '../button/Button';
2
3
  import { IconTypes } from '../../../../../../../../avocado-icons/src/types/icons.type.ts';
3
4
  interface RoundButtonProps extends Partial<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>> {
@@ -12,5 +13,5 @@ interface RoundButtonProps extends Partial<React.DetailedHTMLProps<React.ButtonH
12
13
  /** Disabled state */
13
14
  disabled?: boolean;
14
15
  }
15
- declare const RoundButton: (props: RoundButtonProps) => JSX.Element;
16
+ declare const RoundButton: FC<RoundButtonProps>;
16
17
  export default RoundButton;
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface TabItemProps {
3
+ children: ReactNode;
4
+ disabled?: boolean;
5
+ label: ReactNode;
6
+ }
7
+ export interface TabsProps {
8
+ /** Current index */
9
+ activeIndex?: number;
10
+ /** Overwrite className */
11
+ className?: string;
12
+ /** Configure tabs content */
13
+ items: TabItemProps[];
14
+ /** Callback that will be triggered when one of the tabs is clicked. */
15
+ onClick?: (index: number) => void;
16
+ }
17
+ declare const Tabs: FC<TabsProps>;
18
+ export default Tabs;
@@ -4,7 +4,7 @@ declare const variants: {
4
4
  readonly Outlined: "outlined";
5
5
  readonly Filled: "filled";
6
6
  };
7
- export type TagType = typeof variants[keyof typeof variants];
7
+ export type TagType = (typeof variants)[keyof typeof variants];
8
8
  export type TagSize = 'sm' | 'lg';
9
9
  export interface ITag {
10
10
  /** Content of the component tag */
@@ -17,6 +17,8 @@ export interface ITag {
17
17
  type?: TagType;
18
18
  /** Icon name */
19
19
  icon?: IconTypes;
20
+ /** Controls his active state */
21
+ active?: boolean;
20
22
  /** Action when clicking on the component */
21
23
  onClick?: () => void;
22
24
  /** Action when clicking on the icon of the component */
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const Toaster: FC;
3
+ export default Toaster;
@@ -3,13 +3,20 @@ import Box from './components/box/Box';
3
3
  import Breadcrumbs from './components/breadcrumbs/Breadcrumbs';
4
4
  import Button from './components/button/Button';
5
5
  import Card from './components/card/Card';
6
+ import CardNotification from './components/card-notification/CardNotification';
6
7
  import Checkbox from './components/checkbox/Checkbox';
8
+ import DataTable from './components/DataTable/DataTable';
7
9
  import Divider from './components/divider/Divider';
10
+ import Donut from './components/donut/Donut';
11
+ import DonutLabels from './components/donut/donut-labels/DonutLabels';
12
+ import DonutLegend from './components/donut/donut-legend/DonutLegend';
8
13
  import Heading from './components/heading/Heading';
9
14
  import Link from './components/link/Link';
10
15
  import Menu from './components/menu/Menu';
11
16
  import Pager from './components/pager/Pager';
17
+ import Pill from './components/Pill/Pill';
12
18
  import Processing from './components/processing/Processing';
19
+ import ProgressBar from './components/progress-bar/ProgressBar';
13
20
  import RadioButton from './components/radio-button/RadioButton';
14
21
  import RoundButton from './components/round-button/RoundButton';
15
22
  import Select from './components/select/Select';
@@ -17,15 +24,11 @@ import SelectPagination from './components/select-pagination/SelectPagination';
17
24
  import SkeletonBase from './components/skeleton-base/SkeletonBase';
18
25
  import SkeletonCircle from './components/skeleton-circle/SkeletonCircle';
19
26
  import Stepper from './components/stepper/Stepper';
27
+ import Tabs from './components/tabs/Tabs';
20
28
  import Tag from './components/tag/Tag';
21
29
  import Text from './components/text/Text';
22
30
  import TextField from './components/text-field/TextField';
23
31
  import Timer from './components/timer/Timer';
32
+ import Toaster from './components/toaster/Toaster';
24
33
  import Tooltip from './components/tooltip/Tooltip';
25
- import DataTable from './components/DataTable/DataTable';
26
- import CardNotification from './components/card-notification/CardNotification';
27
- import Pill from './components/Pill/Pill';
28
- import Donut from './components/donut/Donut';
29
- import DonutLabels from './components/donut/donut-labels/DonutLabels';
30
- import DonutLegend from './components/donut/donut-legend/DonutLegend';
31
- export { Box, Breadcrumbs, Button, Card, Checkbox, Divider, Heading, Link, Menu, Pager, Processing, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Tag, Text, TextField, ThemeProvider, Timer, Tooltip, DataTable, CardNotification, Pill, Donut, DonutLabels, DonutLegend, };
34
+ export { ThemeProvider, Box, Breadcrumbs, Button, Card, CardNotification, Checkbox, DataTable, Divider, Donut, DonutLabels, DonutLegend, Heading, Link, Menu, Pager, Pill, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Tabs, Tag, Text, TextField, Timer, Toaster, Tooltip, };