@foris/avocado-suite 0.10.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/avocado-suite/src/components/DataTable/DataTable.d.ts +8 -0
- package/dist/avocado-suite/src/components/DataTable/components/DataTableAction/DataTableAction.d.ts +28 -0
- package/dist/avocado-suite/src/components/DataTable/components/DataTableAction/DataTableActionsGroup.d.ts +10 -0
- package/dist/avocado-suite/src/components/DataTable/components/DataTableContent/DataTableContent.d.ts +71 -0
- package/dist/avocado-suite/src/components/DataTable/components/DataTableHeader/DataTableHeader.d.ts +20 -0
- package/dist/avocado-suite/src/components/DataTable/components/DataTableRow/DataTableRow.d.ts +16 -0
- package/dist/avocado-suite/src/components/DataTable/components/DataTableRow/DataTableRowAccordion.d.ts +18 -0
- package/dist/avocado-suite/src/components/DataTable/utils/dataTableUtil.d.ts +18 -0
- package/dist/avocado-suite/src/components/Pill/Pill.d.ts +23 -0
- package/dist/avocado-suite/src/components/Pill/Pill.test.d.ts +1 -0
- package/dist/avocado-suite/src/components/box/Box.d.ts +11 -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/avocado-suite/src/components/button/Button.d.ts +19 -0
- package/dist/avocado-suite/src/components/button/Button.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/card/Card.d.ts +17 -0
- package/dist/avocado-suite/src/components/card/Card.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/card-notification/CardNotification.d.ts +27 -0
- package/dist/avocado-suite/src/components/card-notification/CardNotification.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/divider/Divider.d.ts +11 -0
- package/dist/avocado-suite/src/components/divider/Divider.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/donut/Donut.d.ts +18 -0
- package/dist/avocado-suite/src/components/donut/donut-labels/DonutLabels.d.ts +10 -0
- package/dist/avocado-suite/src/components/donut/donut-legend/DonutLegend.d.ts +14 -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/link/Link.d.ts +22 -0
- package/dist/avocado-suite/src/components/link/Link.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/menu/Menu.d.ts +14 -0
- package/dist/avocado-suite/src/components/menu/Menu.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/pager/Page.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/pager/Pager.d.ts +49 -0
- package/dist/avocado-suite/src/components/pager/components/ArrowPager.d.ts +9 -0
- package/dist/avocado-suite/src/components/pager/components/ButtonPager.d.ts +11 -0
- package/dist/avocado-suite/src/components/pager/utils/generateArrayOfPages.d.ts +2 -0
- package/dist/avocado-suite/src/components/processing/Processing.d.ts +3 -0
- package/dist/avocado-suite/src/components/progress-bar/ProgressBar.d.ts +13 -0
- package/dist/avocado-suite/src/components/progress-bar/ProgressBar.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/radio-button/RadioButton.d.ts +17 -0
- package/dist/avocado-suite/src/components/radio-button/RadioButton.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/round-button/RoundButton.d.ts +17 -0
- package/dist/avocado-suite/src/components/round-button/RoundButton.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/select/Select.d.ts +24 -0
- package/dist/avocado-suite/src/components/select/Select.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/select/components/SelectIndicators.d.ts +8 -0
- package/dist/avocado-suite/src/components/select-pagination/SelectPagination.d.ts +26 -0
- package/dist/avocado-suite/src/components/select-pagination/SelectPagination.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/skeleton-base/SkeletonBase.d.ts +15 -0
- package/dist/avocado-suite/src/components/skeleton-circle/SkeletonCircle.d.ts +9 -0
- package/dist/avocado-suite/src/components/stepper/Stepper.d.ts +13 -0
- package/dist/avocado-suite/src/components/stepper/Stepper.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/tabs/Tabs.d.ts +18 -0
- package/dist/avocado-suite/src/components/tabs/Tabs.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/tag/Tag.d.ts +28 -0
- package/dist/avocado-suite/src/components/tag/Tag.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/components/text-field/TextField.d.ts +17 -0
- package/dist/avocado-suite/src/components/text-field/TextField.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/text-field/components/StatusIcon.d.ts +7 -0
- package/dist/avocado-suite/src/components/timer/Timer.d.ts +48 -0
- package/dist/avocado-suite/src/components/timer/Timer.test.d.ts +0 -0
- package/dist/avocado-suite/src/components/timer/timer.util.d.ts +8 -0
- package/dist/avocado-suite/src/components/toaster/Toaster.d.ts +3 -0
- package/dist/avocado-suite/src/components/tooltip/Tooltip.d.ts +23 -0
- package/dist/avocado-suite/src/components/tooltip/Tooltip.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/useClickOutside.d.ts +7 -0
- package/dist/avocado-suite/src/hooks/useTheme.d.ts +3 -0
- package/dist/avocado-suite/src/index.d.ts +34 -0
- package/dist/avocado-suite/src/types/menu.types.d.ts +7 -0
- package/dist/avocado-suite/src/types/theme.types.d.ts +4 -0
- package/dist/avocado-suite.es.js +8724 -0
- package/dist/avocado-suite.umd.js +493 -0
- package/dist/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/package.json +5 -3
@@ -0,0 +1,24 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Props } from 'react-select';
|
3
|
+
export interface SelectProps extends Props {
|
4
|
+
/** Overwrite className */
|
5
|
+
className?: string;
|
6
|
+
/** Disabled state */
|
7
|
+
disabled?: boolean;
|
8
|
+
/** Error option */
|
9
|
+
error?: string | boolean;
|
10
|
+
/** Text to be displayed representing the option */
|
11
|
+
label?: string;
|
12
|
+
/** [react-select] Array of options that populate the select menu */
|
13
|
+
options?: any[];
|
14
|
+
/** [react-select] Placeholder for the select value */
|
15
|
+
placeholder?: string;
|
16
|
+
/** [react-select] The value of the select; reflected by the selected option */
|
17
|
+
value?: any;
|
18
|
+
/** [react-select] Handle change events on the select */
|
19
|
+
onChange?: (e: any) => void;
|
20
|
+
/** [react-select] Handle change events on the input */
|
21
|
+
onInputChange?: (e: any) => void;
|
22
|
+
}
|
23
|
+
declare const Select: React.FC<SelectProps>;
|
24
|
+
export default Select;
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ClearIndicatorProps, DropdownIndicatorProps } from 'react-select';
|
2
|
+
export declare const ClearIndicator: (props: ClearIndicatorProps) => JSX.Element;
|
3
|
+
export declare const DropdownIndicator: (props: DropdownIndicatorProps) => JSX.Element;
|
4
|
+
interface ErrorIndicator {
|
5
|
+
message: string;
|
6
|
+
}
|
7
|
+
export declare const ErrorIndicator: (props: ErrorIndicator) => JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Props } from 'react-select';
|
3
|
+
export interface SelectPaginationProps extends Props {
|
4
|
+
/** Overwrite className */
|
5
|
+
className?: string;
|
6
|
+
/** Disabled state */
|
7
|
+
disabled?: boolean;
|
8
|
+
/** Error option */
|
9
|
+
error?: string | boolean;
|
10
|
+
/** Text to be displayed representing the option */
|
11
|
+
label?: string;
|
12
|
+
/** [react-select] Default additional for first request for every search. */
|
13
|
+
additional?: any;
|
14
|
+
/** [react-select] Debounce timeout for loadOptions calls. 0 by default. */
|
15
|
+
debounceTimeout?: any;
|
16
|
+
/** [react-select] Function. Async function that take next arguments. */
|
17
|
+
loadOptions: any;
|
18
|
+
/** [react-select] Placeholder for the select value */
|
19
|
+
placeholder?: string;
|
20
|
+
/** [react-select] The value of the select; reflected by the selected option */
|
21
|
+
value?: any;
|
22
|
+
/** [react-select] Function. */
|
23
|
+
onChange?: any;
|
24
|
+
}
|
25
|
+
declare const SelectPagination: React.FC<SelectPaginationProps>;
|
26
|
+
export default SelectPagination;
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { FC } from 'react';
|
2
|
+
interface SkeletonBaseProps {
|
3
|
+
/** Overwrite className */
|
4
|
+
className?: string;
|
5
|
+
/** Set the height of skeleton */
|
6
|
+
height?: string | number;
|
7
|
+
/** Set a max-width */
|
8
|
+
maxWidth?: string | number;
|
9
|
+
/** Set radius to skeleton */
|
10
|
+
radius?: string | number;
|
11
|
+
/** Set the width of skeleton */
|
12
|
+
width?: string | number;
|
13
|
+
}
|
14
|
+
declare const SkeletonBase: FC<SkeletonBaseProps>;
|
15
|
+
export default SkeletonBase;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { FC } from 'react';
|
2
|
+
interface StepperProps {
|
3
|
+
/** overwrite className */
|
4
|
+
className?: string;
|
5
|
+
/** Use dark colors palette*/
|
6
|
+
darkMode?: boolean;
|
7
|
+
/** the steps you will have */
|
8
|
+
items: string[];
|
9
|
+
/** index of the active item */
|
10
|
+
itemActive: number;
|
11
|
+
}
|
12
|
+
declare const Stepper: FC<StepperProps>;
|
13
|
+
export default Stepper;
|
File without changes
|
@@ -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;
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { IconTypes } from '../../../../avocado-icons/src/types/icons.type';
|
3
|
+
declare const variants: {
|
4
|
+
readonly Outlined: "outlined";
|
5
|
+
readonly Filled: "filled";
|
6
|
+
};
|
7
|
+
export type TagType = (typeof variants)[keyof typeof variants];
|
8
|
+
export type TagSize = 'sm' | 'lg';
|
9
|
+
export interface ITag {
|
10
|
+
/** Content of the component tag */
|
11
|
+
children?: React.ReactNode;
|
12
|
+
/** Overwrite className */
|
13
|
+
className?: string;
|
14
|
+
/** Disabled state */
|
15
|
+
disabled?: boolean;
|
16
|
+
/** Tag variant type */
|
17
|
+
type?: TagType;
|
18
|
+
/** Icon name */
|
19
|
+
icon?: IconTypes;
|
20
|
+
/** Controls his active state */
|
21
|
+
active?: boolean;
|
22
|
+
/** Action when clicking on the component */
|
23
|
+
onClick?: () => void;
|
24
|
+
/** Action when clicking on the icon of the component */
|
25
|
+
onIconClick?: () => void;
|
26
|
+
}
|
27
|
+
declare const Tag: React.FC<ITag>;
|
28
|
+
export default Tag;
|
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,17 @@
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes, FC } from 'react';
|
2
|
+
export interface TextFieldProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
3
|
+
/** Overwrite className */
|
4
|
+
className?: string;
|
5
|
+
/** If allow to remove input content with clear icon */
|
6
|
+
allowClear?: boolean;
|
7
|
+
/** Set top label */
|
8
|
+
label?: string;
|
9
|
+
/** Set validation status */
|
10
|
+
status?: 'error' | 'warning' | 'blocked' | 'unsaved';
|
11
|
+
/** Set display for validation status */
|
12
|
+
statusDisplay?: 'inline' | 'icon';
|
13
|
+
/** Set helper text for validation status */
|
14
|
+
statusText?: string;
|
15
|
+
}
|
16
|
+
declare const TextField: FC<TextFieldProps>;
|
17
|
+
export default TextField;
|
File without changes
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { FC } from 'react';
|
2
|
+
export interface TimeHTML {
|
3
|
+
days0: string;
|
4
|
+
days1: string;
|
5
|
+
daysBack0: string;
|
6
|
+
daysBack1: string;
|
7
|
+
hours0: string;
|
8
|
+
hours1: string;
|
9
|
+
hoursBack0: string;
|
10
|
+
hoursBack1: string;
|
11
|
+
minutes0: string;
|
12
|
+
minutes1: string;
|
13
|
+
minutesBack0: string;
|
14
|
+
minutesBack1: string;
|
15
|
+
}
|
16
|
+
export interface TimeValues {
|
17
|
+
days: number;
|
18
|
+
hours: number;
|
19
|
+
minutes: number;
|
20
|
+
}
|
21
|
+
export interface TimeObject {
|
22
|
+
/** set label */
|
23
|
+
label: string;
|
24
|
+
/** set value */
|
25
|
+
value: number;
|
26
|
+
}
|
27
|
+
export interface Time {
|
28
|
+
/** set remaining days */
|
29
|
+
days: TimeObject;
|
30
|
+
/** set remaining hours between 0 and 23*/
|
31
|
+
hours: TimeObject;
|
32
|
+
/** set remaining minutes between 0 and 59 */
|
33
|
+
minutes: TimeObject;
|
34
|
+
}
|
35
|
+
export interface TimerProps {
|
36
|
+
/** overwrite className */
|
37
|
+
className?: string;
|
38
|
+
/** set milliSeconds interval */
|
39
|
+
milliSecondsInterval?: number;
|
40
|
+
/** set startCountDown */
|
41
|
+
startCountDown?: boolean;
|
42
|
+
/** set remaining time */
|
43
|
+
time: Time;
|
44
|
+
/** event when finish */
|
45
|
+
onFinish?: () => void;
|
46
|
+
}
|
47
|
+
declare const Timer: FC<TimerProps>;
|
48
|
+
export default Timer;
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Time, TimeHTML } from './Timer';
|
2
|
+
export declare const getTimeValues: (time: Time) => {
|
3
|
+
days: number;
|
4
|
+
hours: number;
|
5
|
+
minutes: number;
|
6
|
+
};
|
7
|
+
export declare const getTotalTime: (data: Time) => number;
|
8
|
+
export declare const defaultTimerHTML: (data: Time) => TimeHTML;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
2
|
+
declare enum PlacementEnum {
|
3
|
+
bottom = "bottom",
|
4
|
+
bottomLeft = "bottomLeft",
|
5
|
+
bottomRight = "bottomRight",
|
6
|
+
top = "top",
|
7
|
+
topLeft = "topLeft",
|
8
|
+
topRight = "topRight",
|
9
|
+
left = "left",
|
10
|
+
right = "right"
|
11
|
+
}
|
12
|
+
export interface TooltipProps {
|
13
|
+
/** Children component */
|
14
|
+
children: ReactNode;
|
15
|
+
/** Overwrite className */
|
16
|
+
className?: string;
|
17
|
+
/** The label of the tooltip */
|
18
|
+
label: string;
|
19
|
+
/** The placement of the popper relative to its reference */
|
20
|
+
placement?: keyof typeof PlacementEnum;
|
21
|
+
}
|
22
|
+
declare const Tooltip: FC<TooltipProps>;
|
23
|
+
export default Tooltip;
|
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,34 @@
|
|
1
|
+
import { ThemeProvider } from './contexts/theme/ThemeProvider';
|
2
|
+
import Box from './components/box/Box';
|
3
|
+
import Breadcrumbs from './components/breadcrumbs/Breadcrumbs';
|
4
|
+
import Button from './components/button/Button';
|
5
|
+
import Card from './components/card/Card';
|
6
|
+
import CardNotification from './components/card-notification/CardNotification';
|
7
|
+
import Checkbox from './components/checkbox/Checkbox';
|
8
|
+
import DataTable from './components/DataTable/DataTable';
|
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';
|
13
|
+
import Heading from './components/heading/Heading';
|
14
|
+
import Link from './components/link/Link';
|
15
|
+
import Menu from './components/menu/Menu';
|
16
|
+
import Pager from './components/pager/Pager';
|
17
|
+
import Pill from './components/Pill/Pill';
|
18
|
+
import Processing from './components/processing/Processing';
|
19
|
+
import ProgressBar from './components/progress-bar/ProgressBar';
|
20
|
+
import RadioButton from './components/radio-button/RadioButton';
|
21
|
+
import RoundButton from './components/round-button/RoundButton';
|
22
|
+
import Select from './components/select/Select';
|
23
|
+
import SelectPagination from './components/select-pagination/SelectPagination';
|
24
|
+
import SkeletonBase from './components/skeleton-base/SkeletonBase';
|
25
|
+
import SkeletonCircle from './components/skeleton-circle/SkeletonCircle';
|
26
|
+
import Stepper from './components/stepper/Stepper';
|
27
|
+
import Tabs from './components/tabs/Tabs';
|
28
|
+
import Tag from './components/tag/Tag';
|
29
|
+
import Text from './components/text/Text';
|
30
|
+
import TextField from './components/text-field/TextField';
|
31
|
+
import Timer from './components/timer/Timer';
|
32
|
+
import Toaster from './components/toaster/Toaster';
|
33
|
+
import Tooltip from './components/tooltip/Tooltip';
|
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, };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { IconTypes } from '../../../../../../avocado-icons/src/types/icons.type.ts';
|
3
|
+
export interface MenuItem {
|
4
|
+
icon?: IconTypes;
|
5
|
+
label: ReactNode;
|
6
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
7
|
+
}
|