@foris/avocado-suite 0.19.1 → 0.21.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.
@@ -1,17 +1,20 @@
1
1
  import React, { FC } from 'react';
2
2
  import { IconTypes } from '../../../../avocado-icons';
3
3
  export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
4
+ export type ButtonSize = 'sm' | 'md';
4
5
  export interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
5
6
  /** Render content button */
6
7
  children: React.ReactNode | string;
7
8
  /** Overwrite className */
8
9
  className?: string;
9
- /** Loading state */
10
- loading?: boolean;
11
10
  /** Show icon on the left */
12
11
  leftIcon?: IconTypes;
12
+ /** Loading state */
13
+ loading?: boolean;
13
14
  /** Show icon on the right */
14
15
  rightIcon?: IconTypes;
16
+ /** Size type */
17
+ size?: ButtonSize;
15
18
  /** Use the variant prop to change the visual style of the Button */
16
19
  variant?: ButtonVariant;
17
20
  }
@@ -1,5 +1,4 @@
1
- import { ReactElement } from 'react';
2
- import { FC } from 'react';
1
+ import type { FC, ReactElement, ReactNode } from 'react';
3
2
  declare enum NotificationState {
4
3
  Warning = "warning",
5
4
  Error = "error",
@@ -7,21 +6,16 @@ declare enum NotificationState {
7
6
  Success = "success"
8
7
  }
9
8
  interface CardNotificationProps {
10
- /** State or variant of the notification */
11
- state: `${NotificationState}`;
12
- /** Outlined variant */
13
- outlined?: boolean;
9
+ /** Content card notification */
10
+ children?: ReactNode | string;
14
11
  /** Overwrite className */
15
12
  className?: string;
13
+ /** Outlined variant */
14
+ outlined?: boolean;
15
+ /** State or variant of the notification */
16
+ state: `${NotificationState}`;
16
17
  /** Title of the notification */
17
18
  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
19
  }
26
20
  declare const CardNotification: FC<CardNotificationProps>;
27
21
  export default CardNotification;
@@ -0,0 +1,11 @@
1
+ import type { FC } from 'react';
2
+ interface LoadingProps {
3
+ /** Overwrite className */
4
+ className?: string;
5
+ /** Description of the loading */
6
+ description?: string;
7
+ /** Title of the loading */
8
+ title?: string;
9
+ }
10
+ declare const Loading: FC<LoadingProps>;
11
+ export default Loading;
File without changes
@@ -0,0 +1,2 @@
1
+ declare const Spinner: () => JSX.Element;
2
+ export default Spinner;
@@ -1,17 +1,19 @@
1
1
  import { FC } from 'react';
2
- import { ButtonVariant } from '../button/Button';
2
+ import { ButtonVariant, ButtonSize } from '../button/Button';
3
3
  import { IconTypes } from '../../../../avocado-icons';
4
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
5
  /** Overwrite className */
10
6
  className?: string;
11
- /** Loading state */
12
- loading?: boolean;
13
7
  /** Disabled state */
14
8
  disabled?: boolean;
9
+ /** Icon name */
10
+ icon: IconTypes;
11
+ /** Loading state */
12
+ loading?: boolean;
13
+ /** Size type */
14
+ size?: ButtonSize;
15
+ /** Variant of the button */
16
+ variant?: ButtonVariant;
15
17
  }
16
18
  declare const RoundButton: FC<RoundButtonProps>;
17
19
  export default RoundButton;
package/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@ import DonutLegend from './components/donut/donut-legend/DonutLegend';
18
18
  import DropdownButton from './components/dropdown-button/DropdownButton';
19
19
  import Heading from './components/heading/Heading';
20
20
  import Link from './components/link/Link';
21
+ import Loading from './components/loading/Loading';
21
22
  import Menu from './components/menu/Menu';
22
23
  import Pager from './components/pager/Pager';
23
24
  import Pill from './components/Pill/Pill';
@@ -38,7 +39,7 @@ import TextField from './components/text-field/TextField';
38
39
  import Timer from './components/timer/Timer';
39
40
  import Toaster from './components/toaster/Toaster';
40
41
  import Tooltip from './components/tooltip/Tooltip';
41
- export { Box, Breadcrumbs, Button, Card, CardNotification, Checkbox, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Menu, Pager, Pill, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, ThemeProvider, ThemeStore, Timer, Toaster, Tooltip, };
42
+ export { Box, Breadcrumbs, Button, Card, CardNotification, Checkbox, DataTable, DatePicker, Divider, Donut, DonutLabels, DonutLegend, DropdownButton, Heading, Link, Loading, Menu, Pager, Pill, Processing, ProgressBar, RadioButton, RoundButton, Select, SelectPagination, SkeletonBase, SkeletonCircle, Stepper, Switch, Tabs, Tag, Text, TextField, ThemeProvider, ThemeStore, Timer, Toaster, Tooltip, };
42
43
  /**
43
44
  * Types
44
45
  */