@foris/avocado-suite 0.4.0 → 0.5.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.
- 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/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/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/index.d.ts +5 -1
- package/dist/avocado-suite.es.js +5921 -790
- package/dist/avocado-suite.umd.js +42 -12
- package/dist/style.css +1 -1
- package/package.json +9 -3
File without changes
|
@@ -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,17 @@
|
|
1
|
+
import { FC, ReactNode, DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
2
|
+
export interface RadioButtonProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
3
|
+
/** overwrite className */
|
4
|
+
className?: string;
|
5
|
+
/** overwrite className in RadioButton */
|
6
|
+
classNameRadioButton?: string;
|
7
|
+
/** Text or ReactNode to be displayed at the left of the radio input */
|
8
|
+
labelLeft?: ReactNode | string;
|
9
|
+
/** Label Right side RadioButton*/
|
10
|
+
labelRight?: ReactNode | string;
|
11
|
+
/** disabled state */
|
12
|
+
disabled?: boolean;
|
13
|
+
/** Reference used on the input component */
|
14
|
+
ref?: any;
|
15
|
+
}
|
16
|
+
declare const RadioButton: FC<RadioButtonProps>;
|
17
|
+
export default RadioButton;
|
File without changes
|
@@ -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
|
@@ -5,5 +5,9 @@ import Card from './components/card/Card';
|
|
5
5
|
import Heading from './components/heading/Heading';
|
6
6
|
import Text from './components/text/Text';
|
7
7
|
import Checkbox from './components/checkbox/Checkbox';
|
8
|
+
import Pager from './components/pager/Pager';
|
9
|
+
import RadioButton from './components/radio-button/RadioButton';
|
10
|
+
import Select from './components/select/Select';
|
11
|
+
import SelectPagination from './components/select-pagination/SelectPagination';
|
8
12
|
import { ThemeProvider } from './contexts/theme/ThemeProvider';
|
9
|
-
export { Breadcrumbs, Button,
|
13
|
+
export { Box, Breadcrumbs, Button, Card, Checkbox, Heading, Text, Pager, RadioButton, Select, SelectPagination, ThemeProvider, };
|