@banyan_cloud/roots 2.0.65 → 2.0.67
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 +485 -231
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/v2/index.js +2990 -401
- 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/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/tooltip/types/index.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/Breadcrumbs.d.ts +4 -0
- package/dist/esm/components/v2/breadcrumbs/InteractiveBreadcrumbs.d.ts +7 -0
- package/dist/esm/components/v2/breadcrumbs/Story/BreadcrumbDoc.d.ts +2 -0
- package/dist/esm/components/v2/breadcrumbs/assets/breadcrumbsArrow.d.ts +10 -0
- package/dist/esm/components/v2/breadcrumbs/assets/breadcrumbsHome.d.ts +10 -0
- package/dist/esm/components/v2/breadcrumbs/assets/breadcrumbsSplash.d.ts +10 -0
- package/dist/esm/components/v2/breadcrumbs/index.d.ts +2 -0
- package/dist/esm/components/v2/breadcrumbs/types/index.d.ts +30 -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 +2 -2
- package/dist/esm/components/v2/buttons/button/Story/ButtonDoc.d.ts +2 -0
- package/dist/esm/components/v2/buttons/button/types/index.d.ts +4 -4
- 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/InlineLoader.d.ts +2 -0
- package/dist/esm/components/v2/inlineLoader/Story/InlineLoaderDoc.d.ts +2 -0
- package/dist/esm/components/v2/inlineLoader/index.d.ts +1 -0
- package/dist/esm/components/v2/inlineLoader/types/index.d.ts +14 -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/Link.d.ts +1 -2
- package/dist/esm/components/v2/link/Story/LinkDoc.d.ts +2 -0
- package/dist/esm/components/v2/link/types/index.d.ts +4 -1
- 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 +485 -231
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/v2/index.js +2983 -401
- 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 +0 -24
- 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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface BreadcrumbsArrowProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const BreadcrumbsArrow: React.FC<BreadcrumbsArrowProps>;
|
|
10
|
+
export default BreadcrumbsArrow;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface BreadcrumbsHomeProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const BreadcrumbsHome: React.FC<BreadcrumbsHomeProps>;
|
|
10
|
+
export default BreadcrumbsHome;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface BreadcrumbsSplashProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const BreadcrumbsSplash: React.FC<BreadcrumbsSplashProps>;
|
|
10
|
+
export default BreadcrumbsSplash;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type BreadcrumbSeparator = 'chevron' | 'slash';
|
|
2
|
+
export type BreadcrumbType = 'text' | 'text-with-line' | 'button';
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string | undefined;
|
|
6
|
+
href?: string | undefined;
|
|
7
|
+
onClick?: () => void | undefined;
|
|
8
|
+
isDisabled?: boolean | undefined;
|
|
9
|
+
dropdownOptions?: BreadcrumbDropdownOption[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface SeparatorProps {
|
|
12
|
+
separator: BreadcrumbSeparator;
|
|
13
|
+
}
|
|
14
|
+
export interface DropdownProps {
|
|
15
|
+
options: BreadcrumbDropdownOption[];
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
anchorRef: React.RefObject<HTMLSpanElement | null>;
|
|
18
|
+
}
|
|
19
|
+
export interface BreadcrumbDropdownOption {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
onClick?: () => void | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface BreadcrumbsProps {
|
|
25
|
+
crumbs: BreadcrumbItem[];
|
|
26
|
+
type?: BreadcrumbType | undefined;
|
|
27
|
+
separator?: BreadcrumbSeparator | undefined;
|
|
28
|
+
className?: string | undefined;
|
|
29
|
+
activeIndex?: number | undefined;
|
|
30
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { BaseCellProps } from 'components/cell';
|
|
2
2
|
import type { MouseEvent, ReactElement } from 'react';
|
|
3
3
|
type ButtonType = 'button' | 'submit' | 'reset';
|
|
4
|
-
type ButtonVariant = 'contained' | 'outlined' | 'text';
|
|
4
|
+
type ButtonVariant = 'contained' | 'outlined' | 'text' | 'unstyled';
|
|
5
5
|
export interface BaseButtonProps extends BaseCellProps<'button', false> {
|
|
6
6
|
title?: ReactElement | string | undefined;
|
|
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
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { ComponentType, JSXElementConstructor, MouseEvent, ReactElement } from 'react';
|
|
2
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'Soft' | 'outlined' | 'ghost';
|
|
2
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'Soft' | 'outlined' | 'ghost' | 'unstyled';
|
|
3
3
|
export type ButtonTextSize = 'sm' | 'md';
|
|
4
4
|
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 @@
|
|
|
1
|
+
export * from './InlineLoader';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface InlineLoaderProps {
|
|
2
|
+
/**
|
|
3
|
+
* The current state of the inline loader.
|
|
4
|
+
*/
|
|
5
|
+
status: 'loading' | 'success' | 'error';
|
|
6
|
+
/**
|
|
7
|
+
* The optional text label displayed next to the icon.
|
|
8
|
+
*/
|
|
9
|
+
text?: string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Additional CSS classes.
|
|
12
|
+
*/
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
}
|
|
@@ -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,4 +1,3 @@
|
|
|
1
|
-
import { type RefObject } from 'react';
|
|
2
1
|
import type { LinkProps } from './types';
|
|
3
|
-
declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<
|
|
2
|
+
declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
4
3
|
export default Link;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributeAnchorTarget } from 'react';
|
|
1
2
|
type LinkSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type LinkVariant = 'styled' | 'unstyled';
|
|
2
4
|
export interface LinkProps {
|
|
3
5
|
children: React.ReactNode;
|
|
4
6
|
href: string;
|
|
5
7
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
6
|
-
onClick?: () => void;
|
|
8
|
+
onClick?: (e: HTMLAttributeAnchorTarget) => void;
|
|
9
|
+
variant?: LinkVariant;
|
|
7
10
|
size?: LinkSize;
|
|
8
11
|
withIcon?: boolean;
|
|
9
12
|
disabled?: boolean;
|
|
@@ -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 {};
|