@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.
Files changed (24) hide show
  1. package/dist/avocado-suite/src/components/box/Box.d.ts +9 -0
  2. package/dist/avocado-suite/src/components/box/Box.test.d.ts +0 -0
  3. package/dist/avocado-suite/src/components/breadcrumbs/Breadcrumbs.d.ts +19 -0
  4. package/dist/avocado-suite/src/components/breadcrumbs/Breadcrumbs.test.d.ts +0 -0
  5. package/dist/{components → avocado-suite/src/components}/button/Button.d.ts +6 -4
  6. package/dist/avocado-suite/src/components/button/Button.test.d.ts +0 -0
  7. package/dist/avocado-suite/src/components/card/Card.d.ts +13 -0
  8. package/dist/avocado-suite/src/components/card/Card.test.d.ts +0 -0
  9. package/dist/avocado-suite/src/components/checkbox/Checkbox.d.ts +16 -0
  10. package/dist/avocado-suite/src/components/checkbox/Checkbox.test.d.ts +0 -0
  11. package/dist/avocado-suite/src/components/heading/Heading.d.ts +13 -0
  12. package/dist/avocado-suite/src/components/heading/Heading.test.d.ts +0 -0
  13. package/dist/avocado-suite/src/components/text/Text.d.ts +15 -0
  14. package/dist/avocado-suite/src/components/text/Text.test.d.ts +0 -0
  15. package/dist/avocado-suite/src/constants/theme.constants.d.ts +3 -0
  16. package/dist/avocado-suite/src/contexts/theme/ThemeProvider.d.ts +13 -0
  17. package/dist/avocado-suite/src/hooks/useTheme.d.ts +3 -0
  18. package/dist/avocado-suite/src/index.d.ts +9 -0
  19. package/dist/avocado-suite/src/types/theme.types.d.ts +4 -0
  20. package/dist/avocado-suite.es.js +1182 -396
  21. package/dist/avocado-suite.umd.js +402 -11
  22. package/dist/index.d.ts +1 -2
  23. package/dist/style.css +1 -1
  24. package/package.json +18 -7
@@ -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;
@@ -1,13 +1,15 @@
1
1
  import React, { FC } from 'react';
2
- export type ButtonColor = 'primary' | 'danger';
3
- export type ButtonVariant = 'solid' | 'outline' | 'ghost';
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
- /** Use the color scheme */
10
- color?: ButtonColor;
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
  }
@@ -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,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;
@@ -0,0 +1,3 @@
1
+ import { Theme } from '../types/theme.types';
2
+ export declare const AVOCADO_LIGHT_THEME: Theme;
3
+ export declare const AVOCADO_DARK_THEME: Theme;
@@ -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,3 @@
1
+ export declare const useTheme: () => {
2
+ theme: import("../types/theme.types").Theme;
3
+ };
@@ -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 };
@@ -0,0 +1,4 @@
1
+ export type ThemeMode = 'light' | 'dark';
2
+ export type Theme = {
3
+ mode: ThemeMode;
4
+ };