@banyan_cloud/roots 2.0.66 → 2.0.68
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/cjs/index.js +299 -236
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/index.js +2775 -403
- package/dist/cjs/v2/index.js.map +1 -1
- package/dist/esm/components/buttons/baseButton/types/index.d.ts +1 -1
- package/dist/esm/components/buttons/button/types/index.d.ts +2 -4
- package/dist/esm/components/charts/heatMapChart/HeatMapChartData.d.ts +531 -0
- package/dist/esm/components/datePicker/Story/DatePickerDoc.d.ts +2 -0
- package/dist/esm/components/datePicker/utils/index.d.ts +2 -1
- package/dist/esm/components/docs/icons/index.d.ts +6 -0
- package/dist/esm/components/docs/index.d.ts +2 -0
- package/dist/esm/components/docs/linkHeader/LinkHeader.d.ts +5 -0
- package/dist/esm/components/docs/propsTable/PropsTable.d.ts +5 -0
- package/dist/esm/components/input/checkbox/types/index.d.ts +1 -1
- package/dist/esm/components/input/dropdown/Dropdown.d.ts +1 -1
- package/dist/esm/components/input/radio/Radio.d.ts +1 -0
- package/dist/esm/components/input/textField/TextField.d.ts +2 -6
- package/dist/esm/components/table/table/tableFilters/TableFilters.d.ts +1 -1
- package/dist/esm/components/v2/accordion/Story/AccordionDoc.d.ts +2 -0
- package/dist/esm/components/v2/alert/Story/AlertDoc.d.ts +2 -0
- package/dist/esm/components/v2/badges/Badge.d.ts +3 -0
- package/dist/esm/components/v2/badges/Story/BadgeDoc.d.ts +2 -0
- package/dist/esm/components/v2/badges/assets/ArrowLeftIcon.d.ts +8 -0
- package/dist/esm/components/v2/badges/assets/ArrowRightIcon.d.ts +8 -0
- package/dist/esm/components/v2/badges/assets/ArrowUpIcon.d.ts +8 -0
- package/dist/esm/components/v2/badges/assets/CrossIcon/CrossCricleIcon.d.ts +9 -0
- package/dist/esm/components/v2/badges/assets/CrossIcon/CrossFilledIcon.d.ts +10 -0
- package/dist/esm/components/v2/badges/assets/CrossIcon/CrossIcon.d.ts +8 -0
- package/dist/esm/components/v2/badges/assets/DotIcon.d.ts +8 -0
- package/dist/esm/components/v2/badges/assets/PlusIcon.d.ts +8 -0
- package/dist/esm/components/v2/badges/constants/index.d.ts +3 -0
- package/dist/esm/components/v2/badges/types/index.d.ts +19 -0
- package/dist/esm/components/v2/breadcrumbs/Story/BreadcrumbDoc.d.ts +2 -0
- package/dist/esm/components/v2/buttons/baseButton/Story/BaseButtonDoc.d.ts +2 -0
- package/dist/esm/components/v2/buttons/baseButton/types/index.d.ts +1 -1
- package/dist/esm/components/v2/buttons/button/Story/ButtonDoc.d.ts +2 -0
- package/dist/esm/components/v2/buttons/button/types/index.d.ts +3 -3
- package/dist/esm/components/v2/cell/Story/BaseCellDoc.d.ts +2 -0
- package/dist/esm/components/v2/checkbox/Story/CheckboxDoc.d.ts +2 -0
- package/dist/esm/components/v2/icons/chevron-down/ChevronDownIcon.d.ts +4 -0
- package/dist/esm/components/v2/icons/chevron-down/index.d.ts +1 -0
- package/dist/esm/components/v2/icons/error/Error.d.ts +1 -0
- package/dist/esm/components/v2/icons/help/Help.d.ts +8 -0
- package/dist/esm/components/v2/icons/help/index.d.ts +1 -0
- package/dist/esm/components/v2/icons/index.d.ts +5 -2
- package/dist/esm/components/v2/icons/search/Search.d.ts +5 -0
- package/dist/esm/components/v2/icons/search/index.d.ts +1 -0
- package/dist/esm/components/v2/icons/warning/Warning.d.ts +1 -0
- package/dist/esm/components/v2/index.d.ts +2 -0
- package/dist/esm/components/v2/inlineLoader/Story/InlineLoaderDoc.d.ts +2 -0
- package/dist/esm/components/v2/input/dropdown/Dropdown.d.ts +4 -0
- package/dist/esm/components/v2/input/dropdown/Story/DropdownDoc.d.ts +2 -0
- package/dist/esm/components/v2/input/dropdown/index.d.ts +2 -0
- package/dist/esm/components/v2/input/dropdown/types/index.d.ts +66 -0
- package/dist/esm/components/v2/input/index.d.ts +2 -0
- package/dist/esm/components/v2/input/radio/Story/RadioDoc.d.ts +2 -0
- package/dist/esm/components/v2/input/textfield/Story/TextFieldDoc.d.ts +2 -0
- package/dist/esm/components/v2/input/textfield/TextField.d.ts +4 -0
- package/dist/esm/components/v2/input/textfield/index.d.ts +2 -0
- package/dist/esm/components/v2/input/textfield/types/index.d.ts +55 -0
- package/dist/esm/components/v2/input/toggle/Story/ToggleDoc.d.ts +2 -0
- package/dist/esm/components/v2/input/toggle/Toggle.d.ts +1 -11
- package/dist/esm/components/v2/input/toggle/types/index.d.ts +12 -0
- package/dist/esm/components/v2/link/Story/LinkDoc.d.ts +2 -0
- package/dist/esm/components/v2/modal/Story/BaseModalDoc.d.ts +2 -0
- package/dist/esm/components/v2/modal/dialogBox/Story/DialogDoc.d.ts +2 -0
- package/dist/esm/components/v2/pagination/Pagination.d.ts +7 -39
- package/dist/esm/components/v2/pagination/Story/PaginationDoc.d.ts +2 -0
- package/dist/esm/components/v2/pagination/types/index.d.ts +39 -0
- package/dist/esm/components/v2/skeleton/Skeleton.d.ts +1 -10
- package/dist/esm/components/v2/skeleton/Story/SkeletonDoc.d.ts +2 -0
- package/dist/esm/components/v2/skeleton/index.d.ts +1 -1
- package/dist/esm/components/v2/skeleton/types/index.d.ts +12 -0
- package/dist/esm/components/v2/stepper/Story/StepperDocs.d.ts +2 -0
- package/dist/esm/components/v2/table/baseTable/Story/BaseTableDoc.d.ts +2 -0
- package/dist/esm/components/v2/table/body/Story/TableBodyDoc.d.ts +2 -0
- package/dist/esm/components/v2/table/body/TableBody.d.ts +1 -11
- package/dist/esm/components/v2/table/body/types/index.d.ts +28 -0
- package/dist/esm/components/v2/table/cell/Story/CellDoc.d.ts +2 -0
- package/dist/esm/components/v2/table/header/Story/TableHeaderDoc.d.ts +2 -0
- package/dist/esm/components/v2/table/row/Story/RowDoc.d.ts +2 -0
- package/dist/esm/components/v2/table/table/Story/TableDoc.d.ts +2 -0
- package/dist/esm/components/v2/tabs/Story/TabsDoc.d.ts +2 -0
- package/dist/esm/components/v2/tags/Story/TagsDoc.d.ts +2 -0
- package/dist/esm/components/v2/tags/Tags.d.ts +4 -0
- package/dist/esm/components/v2/tags/assets/Indicator/Indicator.d.ts +4 -0
- package/dist/esm/components/v2/tags/assets/Indicator/types/index.d.ts +10 -0
- package/dist/esm/components/v2/tags/assets/TagCloser/TagCloserLg.d.ts +7 -0
- package/dist/esm/components/v2/tags/assets/TagCloser/TagCloserMd.d.ts +7 -0
- package/dist/esm/components/v2/tags/assets/TagCloser/TagCloserSm.d.ts +7 -0
- package/dist/esm/components/v2/tags/assets/TagCount/TagCountLg.d.ts +8 -0
- package/dist/esm/components/v2/tags/assets/TagCount/TagCountMd.d.ts +8 -0
- package/dist/esm/components/v2/tags/assets/TagCount/TagCountSm.d.ts +8 -0
- package/dist/esm/components/v2/tags/types/index.d.ts +31 -0
- package/dist/esm/components/v2/text/Story/TextDoc.d.ts +2 -0
- package/dist/esm/components/v2/tooltip/Story/TooltipDoc.d.ts +2 -0
- package/dist/esm/components/v2/tooltip/Tooltip.d.ts +3 -0
- package/dist/esm/components/v2/tooltip/index.d.ts +1 -0
- package/dist/esm/components/v2/tooltip/types/index.d.ts +42 -0
- package/dist/esm/components/widget/BaseWidgetStoriesData.d.ts +54 -0
- package/dist/esm/index.js +299 -236
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/v2/index.js +2768 -403
- package/dist/esm/v2/index.js.map +1 -1
- package/package.json +28 -28
- package/src/styles/_responsive.scss +1 -1
- package/src/styles/main.css +78 -102
- package/dist/esm/components/v2/checkbox/types/Types.d.ts +0 -20
- package/src/styles/style-system/ComponentsFormat.stories.mdx +0 -30
- package/src/styles/style-system/Design.stories.mdx +0 -19
- package/src/styles/style-system/Style.stories.mdx +0 -110
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CrossCircleIconProps {
|
|
3
|
+
size?: number | undefined;
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
bg?: string | undefined;
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
declare const CrossCircleIcon: React.FC<CrossCircleIconProps>;
|
|
9
|
+
export default CrossCircleIcon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CrossFilledIconProps {
|
|
3
|
+
size?: number | undefined;
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
bg?: string | undefined;
|
|
6
|
+
hoverColor?: string | undefined;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
declare const CrossFilledIcon: React.FC<CrossFilledIconProps>;
|
|
10
|
+
export default CrossFilledIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CrossIconProps extends React.SVGProps<SVGSVGElement> {
|
|
3
|
+
size?: number | undefined;
|
|
4
|
+
color?: string | undefined;
|
|
5
|
+
className?: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
declare const CrossIcon: React.FC<CrossIconProps>;
|
|
8
|
+
export default CrossIcon;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type BadgeVariant = 'pill' | 'badge' | 'modern';
|
|
2
|
+
export type BadgeSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface BadgeProps {
|
|
4
|
+
label: string;
|
|
5
|
+
variant?: BadgeVariant | undefined;
|
|
6
|
+
size?: BadgeSize | undefined;
|
|
7
|
+
onClose?: ((e: React.MouseEvent) => void) | undefined;
|
|
8
|
+
dot?: boolean | undefined;
|
|
9
|
+
dotColor?: string | undefined;
|
|
10
|
+
arrow?: boolean | undefined;
|
|
11
|
+
arrowColor?: string | undefined;
|
|
12
|
+
arrowLead?: boolean | undefined;
|
|
13
|
+
arrowLeadColor?: string | undefined;
|
|
14
|
+
upArrow?: boolean | undefined;
|
|
15
|
+
upArrowColor?: string | undefined;
|
|
16
|
+
plus?: boolean | undefined;
|
|
17
|
+
plusColor?: string | undefined;
|
|
18
|
+
className?: string | undefined;
|
|
19
|
+
}
|
|
@@ -7,7 +7,7 @@ export interface BaseButtonProps extends BaseCellProps<'button', false> {
|
|
|
7
7
|
disabled?: boolean | undefined;
|
|
8
8
|
id?: string | undefined;
|
|
9
9
|
type?: ButtonType;
|
|
10
|
-
onClick?: ((event: MouseEvent<
|
|
10
|
+
onClick?: ((event: MouseEvent<HTMLButtonElement>) => void | Promise<void>) | undefined;
|
|
11
11
|
blurOnClick?: boolean;
|
|
12
12
|
variant?: ButtonVariant;
|
|
13
13
|
}
|
|
@@ -5,14 +5,14 @@ export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'auto';
|
|
|
5
5
|
export interface ButtonProps {
|
|
6
6
|
className?: string | undefined;
|
|
7
7
|
title?: string | ReactElement<unknown, string | JSXElementConstructor<unknown>>;
|
|
8
|
-
leftComponent?: ComponentType<Record<string, unknown
|
|
9
|
-
rightComponent?: ComponentType<Record<string, unknown
|
|
8
|
+
leftComponent?: ComponentType<Record<string, unknown>> | undefined;
|
|
9
|
+
rightComponent?: ComponentType<Record<string, unknown>> | undefined;
|
|
10
10
|
variant?: ButtonVariant;
|
|
11
11
|
size?: ButtonSize;
|
|
12
12
|
textSize?: ButtonTextSize;
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
14
|
id?: string | undefined;
|
|
15
15
|
type?: 'button' | 'submit' | 'reset';
|
|
16
|
-
onClick?: (event: MouseEvent<
|
|
16
|
+
onClick?: ((event: MouseEvent<HTMLButtonElement>) => void | Promise<void>) | undefined;
|
|
17
17
|
blurOnClick?: boolean | undefined;
|
|
18
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ChevronDownIcon } from './ChevronDownIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as HelpIcon } from './Help';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SearchIcon } from './Search';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DropdownRef {
|
|
3
|
+
focus: () => void;
|
|
4
|
+
}
|
|
5
|
+
export interface DropdownOption {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: React.ComponentType<any> | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchTag {
|
|
11
|
+
id: string;
|
|
12
|
+
key: string;
|
|
13
|
+
value: string;
|
|
14
|
+
isEditingValue?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface AdvancedSearchResult {
|
|
17
|
+
tags: Omit<SearchTag, 'id' | 'isEditingValue'>[];
|
|
18
|
+
defaultSearch: string;
|
|
19
|
+
}
|
|
20
|
+
export interface DataLabel {
|
|
21
|
+
singular: string;
|
|
22
|
+
plural: string;
|
|
23
|
+
}
|
|
24
|
+
export interface DropdownProps {
|
|
25
|
+
label?: string | undefined;
|
|
26
|
+
placeholder?: string | undefined;
|
|
27
|
+
helperText?: string | undefined;
|
|
28
|
+
value?: string | undefined;
|
|
29
|
+
defaultValue?: string | undefined;
|
|
30
|
+
selectedValues?: string[] | undefined;
|
|
31
|
+
defaultSelectedValues?: string[] | undefined;
|
|
32
|
+
options?: DropdownOption[] | undefined;
|
|
33
|
+
dataLabel?: string | DataLabel | undefined;
|
|
34
|
+
customAllLabel?: string | undefined;
|
|
35
|
+
state?: 'default' | 'selected' | 'focus' | 'disabled' | 'error' | 'warning' | 'read-only' | undefined;
|
|
36
|
+
size?: 'sm' | 'md' | undefined;
|
|
37
|
+
variant?: 'simple' | 'multi-select' | 'with-icon' | 'borderless' | 'search' | undefined;
|
|
38
|
+
required?: boolean | undefined;
|
|
39
|
+
disabled?: boolean | undefined;
|
|
40
|
+
readOnly?: boolean | undefined;
|
|
41
|
+
helpIcon?: boolean | undefined;
|
|
42
|
+
helpText?: string | undefined;
|
|
43
|
+
errorIcon?: boolean | undefined;
|
|
44
|
+
warningIcon?: boolean | undefined;
|
|
45
|
+
icon?: React.ComponentType<any> | undefined;
|
|
46
|
+
searchIcon?: React.ComponentType<any> | undefined;
|
|
47
|
+
shortcut?: string | undefined;
|
|
48
|
+
onShortcut?: (() => void) | undefined;
|
|
49
|
+
enableAdvancedSearch?: boolean | undefined;
|
|
50
|
+
searchTags?: SearchTag[] | undefined;
|
|
51
|
+
defaultSearchTags?: SearchTag[] | undefined;
|
|
52
|
+
availableKeys?: DropdownOption[] | undefined;
|
|
53
|
+
onAdvancedSearchChange?: ((result: AdvancedSearchResult) => void) | undefined;
|
|
54
|
+
tagOptionsEnabled?: boolean | undefined;
|
|
55
|
+
tagOptions?: DropdownOption[] | undefined;
|
|
56
|
+
onChange?: ((value: string) => void) | undefined;
|
|
57
|
+
onMultiSelectChange?: ((values: string[]) => void) | undefined;
|
|
58
|
+
onSearchChange?: ((searchValue: string) => void) | undefined;
|
|
59
|
+
onFocus?: ((e: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
60
|
+
onBlur?: ((e: React.FocusEvent<HTMLElement>) => void) | undefined;
|
|
61
|
+
popoverOffset?: number | undefined;
|
|
62
|
+
popoverClassName?: string | undefined;
|
|
63
|
+
className?: string | undefined;
|
|
64
|
+
id?: string | undefined;
|
|
65
|
+
name?: string | undefined;
|
|
66
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DropdownOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ComponentType<any> | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface TextFieldProps {
|
|
8
|
+
label?: string;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
helperText?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
state?: 'default' | 'filled' | 'active-typing' | 'filled-focus' | 'error-focus' | 'error-filled' | 'warning' | 'disable';
|
|
14
|
+
size?: 'sm' | 'md';
|
|
15
|
+
type?: 'default' | 'leading-text' | 'trailing-button' | 'leading-dropdown' | 'trailing-dropdown';
|
|
16
|
+
required?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
leadingIcon?: boolean;
|
|
19
|
+
leadingIconComponent?: React.ComponentType<{
|
|
20
|
+
className?: string;
|
|
21
|
+
}>;
|
|
22
|
+
leadingText?: string;
|
|
23
|
+
trailingButton?: boolean;
|
|
24
|
+
trailingButtonText?: string;
|
|
25
|
+
trailingButtonIcon?: boolean;
|
|
26
|
+
trailingButtonIconComponent?: React.ComponentType<Record<string, unknown>>;
|
|
27
|
+
helpIcon?: boolean;
|
|
28
|
+
helpText?: string;
|
|
29
|
+
rightIcon?: React.ComponentType<{
|
|
30
|
+
className?: string;
|
|
31
|
+
}>;
|
|
32
|
+
leadingDropdown?: boolean;
|
|
33
|
+
leadingDropdownOptions?: DropdownOption[];
|
|
34
|
+
leadingDropdownValue?: string;
|
|
35
|
+
leadingDropdownDefaultValue?: string;
|
|
36
|
+
leadingDropdownPlaceholder?: string;
|
|
37
|
+
trailingDropdown?: boolean;
|
|
38
|
+
trailingDropdownOptions?: DropdownOption[];
|
|
39
|
+
trailingDropdownValue?: string;
|
|
40
|
+
trailingDropdownDefaultValue?: string;
|
|
41
|
+
trailingDropdownPlaceholder?: string;
|
|
42
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
43
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
44
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
45
|
+
trailingButtonOnClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
46
|
+
onLeadingDropdownChange?: (value: string) => void;
|
|
47
|
+
onTrailingDropdownChange?: (value: string) => void;
|
|
48
|
+
className?: string;
|
|
49
|
+
id?: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
autoComplete?: string;
|
|
52
|
+
autoFocus?: boolean;
|
|
53
|
+
readOnly?: boolean;
|
|
54
|
+
unstyled?: boolean;
|
|
55
|
+
}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type
|
|
3
|
-
export interface ToggleProps {
|
|
4
|
-
label?: React.ReactNode;
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
defaultChecked?: boolean;
|
|
7
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: boolean) => void;
|
|
8
|
-
className?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
size?: Size;
|
|
11
|
-
readonly?: boolean;
|
|
12
|
-
}
|
|
2
|
+
import type { ToggleProps } from '../toggle/types';
|
|
13
3
|
declare const Toggle: React.FC<ToggleProps>;
|
|
14
4
|
export default Toggle;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type Size = 'l' | 's';
|
|
2
|
+
export interface ToggleProps {
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: boolean) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
size?: Size;
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -1,42 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Nullable<T> = T | null;
|
|
3
|
-
export interface PaginationState {
|
|
4
|
-
totalPages: Nullable<number>;
|
|
5
|
-
currentPage: Nullable<number>;
|
|
6
|
-
step: number;
|
|
7
|
-
totalData: Nullable<number>;
|
|
8
|
-
}
|
|
9
|
-
type PaginationAction = {
|
|
10
|
-
type: 'NEXT_PAGE';
|
|
11
|
-
} | {
|
|
12
|
-
type: 'PREV_PAGE';
|
|
13
|
-
} | {
|
|
14
|
-
type: 'SET_PAGE';
|
|
15
|
-
payload: number | undefined;
|
|
16
|
-
} | {
|
|
17
|
-
type: 'SET_STEP';
|
|
18
|
-
payload: number;
|
|
19
|
-
} | {
|
|
20
|
-
type: 'SET_TOTAL_PAGES';
|
|
21
|
-
payload: Nullable<number>;
|
|
22
|
-
} | {
|
|
23
|
-
type: 'SET_TOTAL_DATA';
|
|
24
|
-
payload: Nullable<number>;
|
|
25
|
-
};
|
|
1
|
+
import type { PaginationAction, PaginationProps, PaginationState } from '../pagination/types/index';
|
|
26
2
|
type UsePaginationArgs = Partial<Pick<PaginationState, 'totalPages' | 'currentPage' | 'step' | 'totalData'>>;
|
|
27
|
-
export declare const usePagination: (props: UsePaginationArgs) => readonly [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
loading?: boolean;
|
|
34
|
-
dataLabel?: string | undefined;
|
|
35
|
-
onChange?: (args: {
|
|
36
|
-
currentPage: number;
|
|
37
|
-
step: number;
|
|
38
|
-
totalPages: number | null;
|
|
39
|
-
}) => void;
|
|
40
|
-
}
|
|
3
|
+
export declare const usePagination: (props: UsePaginationArgs) => readonly [{
|
|
4
|
+
totalPages: number | null;
|
|
5
|
+
currentPage: number | null;
|
|
6
|
+
step: number;
|
|
7
|
+
totalData: number | null;
|
|
8
|
+
}, import("react").ActionDispatch<[action: PaginationAction]>];
|
|
41
9
|
export declare const Pagination: import("react").ForwardRefExoticComponent<PaginationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
10
|
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Dispatch } from 'react';
|
|
2
|
+
type Nullable<T> = T | null;
|
|
3
|
+
export interface PaginationState {
|
|
4
|
+
totalPages: Nullable<number>;
|
|
5
|
+
currentPage: Nullable<number>;
|
|
6
|
+
step: number;
|
|
7
|
+
totalData: Nullable<number>;
|
|
8
|
+
}
|
|
9
|
+
export type PaginationAction = {
|
|
10
|
+
type: 'NEXT_PAGE';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'PREV_PAGE';
|
|
13
|
+
} | {
|
|
14
|
+
type: 'SET_PAGE';
|
|
15
|
+
payload: number | undefined;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'SET_STEP';
|
|
18
|
+
payload: number;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'SET_TOTAL_PAGES';
|
|
21
|
+
payload: Nullable<number>;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'SET_TOTAL_DATA';
|
|
24
|
+
payload: Nullable<number>;
|
|
25
|
+
};
|
|
26
|
+
export interface PaginationProps {
|
|
27
|
+
className?: string;
|
|
28
|
+
floating?: boolean;
|
|
29
|
+
paginationState?: Pick<PaginationState, 'totalPages' | 'currentPage' | 'step' | 'totalData'>;
|
|
30
|
+
paginationDispatch?: Dispatch<PaginationAction>;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
dataLabel?: string | undefined;
|
|
33
|
+
onChange?: (args: {
|
|
34
|
+
currentPage: number;
|
|
35
|
+
step: number;
|
|
36
|
+
totalPages: number | null;
|
|
37
|
+
}) => void;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
interface SkeletonProps {
|
|
3
|
-
height?: number | string | undefined;
|
|
4
|
-
width?: number | string | undefined;
|
|
5
|
-
variant?: 'text' | 'circle' | 'rounded' | 'ellipse';
|
|
6
|
-
theme?: 'light' | 'dark';
|
|
7
|
-
className?: string | undefined;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
noAnimation?: boolean;
|
|
10
|
-
}
|
|
1
|
+
import type { SkeletonProps } from '../skeleton/types/index';
|
|
11
2
|
declare const Skeleton: (props: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
3
|
export default Skeleton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Skeleton } from
|
|
1
|
+
export { default as Skeleton } from './Skeleton';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export type SkeletonVariant = 'text' | 'circle' | 'rounded' | 'ellipse';
|
|
3
|
+
export type SkeletonTheme = 'light' | 'dark';
|
|
4
|
+
export interface SkeletonProps {
|
|
5
|
+
height?: number | string;
|
|
6
|
+
width?: number | string;
|
|
7
|
+
variant?: SkeletonVariant;
|
|
8
|
+
theme?: SkeletonTheme;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
noAnimation?: boolean;
|
|
12
|
+
}
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { TableProps } from '../types';
|
|
3
|
-
interface TableBodyProps extends Pick<TableProps, 'headerData' | 'customCells' | 'tableData' | 'className' | 'loading' | 'onRowClick' | 'onSort' | 'sortValue' | 'rowHeight' | 'defaultActiveIndex' | 'emptyPlaceholder' | 'onCheck' | 'uniqueKey' | 'checkAsRadio' | 'disableCheck' | 'hideColumnLines'> {
|
|
4
|
-
expandable?: ((params: {
|
|
5
|
-
datum: Record<number, unknown>;
|
|
6
|
-
index: number | undefined;
|
|
7
|
-
}) => ReactElement) | undefined;
|
|
8
|
-
checkedRows: Record<string, unknown>[];
|
|
9
|
-
setCheckedRows: (rows: Record<string, unknown>[]) => void;
|
|
10
|
-
toggleDrawer?: (props: object) => void;
|
|
11
|
-
}
|
|
1
|
+
import type { TableBodyProps } from './types';
|
|
12
2
|
declare const TableBody: (props: TableBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
3
|
export default TableBody;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
export interface TableProps {
|
|
3
|
+
headerData?: any[];
|
|
4
|
+
customCells?: Record<string, any>;
|
|
5
|
+
tableData?: any[];
|
|
6
|
+
className?: string;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
onRowClick?: (row: any) => void;
|
|
9
|
+
onSort?: (key: string, direction: 'asc' | 'desc') => void;
|
|
10
|
+
sortValue?: string;
|
|
11
|
+
rowHeight?: number;
|
|
12
|
+
defaultActiveIndex?: number;
|
|
13
|
+
emptyPlaceholder?: ReactElement;
|
|
14
|
+
onCheck?: (row: any) => void;
|
|
15
|
+
uniqueKey?: string;
|
|
16
|
+
checkAsRadio?: boolean;
|
|
17
|
+
disableCheck?: boolean;
|
|
18
|
+
hideColumnLines?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface TableBodyProps extends Pick<TableProps, 'headerData' | 'customCells' | 'tableData' | 'className' | 'loading' | 'onRowClick' | 'onSort' | 'sortValue' | 'rowHeight' | 'defaultActiveIndex' | 'emptyPlaceholder' | 'onCheck' | 'uniqueKey' | 'checkAsRadio' | 'disableCheck' | 'hideColumnLines'> {
|
|
21
|
+
expandable?: (params: {
|
|
22
|
+
datum: Record<string | number, any>;
|
|
23
|
+
index: number;
|
|
24
|
+
}) => ReactElement;
|
|
25
|
+
checkedRows: Record<string, unknown>[];
|
|
26
|
+
setCheckedRows: (rows: Record<string, unknown>[]) => void;
|
|
27
|
+
toggleDrawer?: (props: object) => void;
|
|
28
|
+
}
|