@foris/avocado-suite 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface BoxProps {
3
+ /** content card */
4
+ children: ReactNode | string;
5
+ /** Overwrite className */
6
+ className?: string;
7
+ }
8
+ declare const Box: FC<BoxProps>;
9
+ 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,13 @@
1
+ import { FC, ReactNode } from 'react';
2
+ interface CardProps {
3
+ /** Content card */
4
+ children: ReactNode;
5
+ /** Overwrite className */
6
+ className?: string;
7
+ /** disabled state */
8
+ isDisabled?: boolean;
9
+ /** Clickable effect */
10
+ isClickable?: boolean;
11
+ }
12
+ declare const Card: FC<CardProps>;
13
+ export default Card;
@@ -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,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,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,15 @@
1
+ import { FC } from 'react';
2
+ export interface TextProps {
3
+ /** Render content */
4
+ children: React.ReactNode | string;
5
+ /** Overwrite className */
6
+ className?: string;
7
+ /** Use dark colors palette*/
8
+ darkMode?: boolean;
9
+ /** Type can be */
10
+ type?: 'lg' | 'md' | 'sm' | 'xs';
11
+ /** Weight can be */
12
+ weight?: 'regular' | 'medium';
13
+ }
14
+ declare const Text: FC<TextProps>;
15
+ export default Text;
@@ -1,3 +1,10 @@
1
+ import Breadcrumbs from './components/breadcrumbs/Breadcrumbs';
1
2
  import Button from './components/button/Button';
3
+ import Box from './components/box/Box';
4
+ import Card from './components/card/Card';
5
+ import Heading from './components/heading/Heading';
6
+ import Text from './components/text/Text';
7
+ import Checkbox from './components/checkbox/Checkbox';
8
+ import Pager from './components/pager/Pager';
2
9
  import { ThemeProvider } from './contexts/theme/ThemeProvider';
3
- export { Button, ThemeProvider };
10
+ export { Breadcrumbs, Button, Box, Card, Checkbox, Heading, Text, Pager, ThemeProvider, };