@foris/avocado-suite 0.0.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/avocado-suite/src/components/box/Box.d.ts +9 -0
- package/dist/avocado-suite/src/components/box/Box.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/breadcrumbs/Breadcrumbs.d.ts +19 -0
- package/dist/avocado-suite/src/components/breadcrumbs/Breadcrumbs.test.d.ts +0 -0
- package/dist/{components → avocado-suite/src/components}/button/Button.d.ts +6 -4
- package/dist/avocado-suite/src/components/button/Button.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/card/Card.d.ts +13 -0
- package/dist/avocado-suite/src/components/card/Card.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/checkbox/Checkbox.d.ts +16 -0
- package/dist/avocado-suite/src/components/checkbox/Checkbox.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/heading/Heading.d.ts +13 -0
- package/dist/avocado-suite/src/components/heading/Heading.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/text/Text.d.ts +15 -0
- package/dist/avocado-suite/src/components/text/Text.test.d.ts +0 -0
- package/dist/avocado-suite/src/constants/theme.constants.d.ts +3 -0
- package/dist/avocado-suite/src/contexts/theme/ThemeProvider.d.ts +13 -0
- package/dist/avocado-suite/src/hooks/useTheme.d.ts +3 -0
- package/dist/avocado-suite/src/index.d.ts +9 -0
- package/dist/avocado-suite/src/types/theme.types.d.ts +4 -0
- package/dist/avocado-suite.es.js +1182 -396
- package/dist/avocado-suite.umd.js +402 -11
- package/dist/index.d.ts +1 -2
- package/dist/style.css +1 -1
- package/package.json +18 -7
File without changes
|
@@ -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;
|
File without changes
|
@@ -1,13 +1,15 @@
|
|
1
1
|
import React, { FC } from 'react';
|
2
|
-
|
3
|
-
export type ButtonVariant = '
|
2
|
+
import { IconTypes } from '../../../../avocado-icons/src/types/icons.type.ts';
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
4
4
|
export interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
5
5
|
/** Render content button */
|
6
6
|
children: React.ReactNode | string;
|
7
7
|
/** Overwrite className */
|
8
8
|
className?: string;
|
9
|
-
/**
|
10
|
-
|
9
|
+
/** Show icon on the left */
|
10
|
+
leftIcon?: IconTypes;
|
11
|
+
/** Show icon on the right */
|
12
|
+
rightIcon?: IconTypes;
|
11
13
|
/** Use the variant prop to change the visual style of the Button */
|
12
14
|
variant?: ButtonVariant;
|
13
15
|
}
|
File without changes
|
@@ -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;
|
File without changes
|
@@ -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;
|
File without changes
|
@@ -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;
|
File without changes
|
@@ -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;
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
import { AVOCADO_LIGHT_THEME, AVOCADO_DARK_THEME } from '../../constants/theme.constants';
|
3
|
+
import { Theme } from '../../types/theme.types';
|
4
|
+
type ThemeContextType = {
|
5
|
+
theme: Theme;
|
6
|
+
};
|
7
|
+
declare const ThemeContext: React.Context<ThemeContextType | undefined>;
|
8
|
+
type ThemeProviderProps = {
|
9
|
+
children: ReactNode;
|
10
|
+
theme?: Theme;
|
11
|
+
};
|
12
|
+
declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
13
|
+
export { ThemeContext, ThemeProvider, AVOCADO_LIGHT_THEME, AVOCADO_DARK_THEME };
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import Breadcrumbs from './components/breadcrumbs/Breadcrumbs';
|
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 { ThemeProvider } from './contexts/theme/ThemeProvider';
|
9
|
+
export { Breadcrumbs, Button, Box, Card, Checkbox, Heading, Text, ThemeProvider };
|