@cloudwick/astral-ui 1.0.0 → 2.1.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/README.md +4 -4
- package/dist/components/adpIcon/svgObjects.d.ts +22 -13
- package/dist/components/avatar/index.d.ts +27 -0
- package/dist/components/avatarGroup/index.d.ts +32 -0
- package/dist/components/badge/index.d.ts +20 -16
- package/dist/components/button/index.d.ts +42 -16
- package/dist/components/card/cardBody.d.ts +13 -0
- package/dist/components/card/cardFooter.d.ts +13 -0
- package/dist/components/card/cardHeader.d.ts +22 -0
- package/dist/components/card/index.d.ts +14 -4
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkboxGroup/index.d.ts +12 -9
- package/dist/components/ctaGroup/index.d.ts +46 -0
- package/dist/components/dataTable/advancedFilters.d.ts +10 -0
- package/dist/components/dataTable/dataTableStoryHelpers.d.ts +1098 -0
- package/dist/components/dataTable/index.d.ts +147 -0
- package/dist/components/dataTable/pageSizeModal.d.ts +9 -0
- package/dist/components/dataTable/selectedFilterList.d.ts +20 -0
- package/dist/components/dataTable/settings.d.ts +10 -0
- package/dist/components/dataTable/table.d.ts +41 -0
- package/dist/components/dropdown/dropdownItem.d.ts +1 -3
- package/dist/components/dropdown/index.d.ts +1 -1
- package/dist/components/emptyState/index.d.ts +2 -1
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/modalBody.d.ts +1 -5
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/panel/index.d.ts +30 -0
- package/dist/components/panel/panelBody.d.ts +13 -0
- package/dist/components/panel/panelFooter.d.ts +13 -0
- package/dist/components/panel/panelHeader.d.ts +39 -0
- package/dist/components/panel/panelStoryHelpers.d.ts +7 -0
- package/dist/components/panelGroup/index.d.ts +23 -0
- package/dist/components/passwordField/index.d.ts +4 -0
- package/dist/components/radioGroup/index.d.ts +48 -0
- package/dist/components/scrollbar/index.d.ts +34 -0
- package/dist/components/scrollbar/storyUtils.d.ts +8 -0
- package/dist/components/select/index.d.ts +35 -8
- package/dist/components/select/utils.d.ts +3 -0
- package/dist/components/tabs/tab.d.ts +17 -10
- package/dist/components/textCopy/index.d.ts +29 -0
- package/dist/components/textField/index.d.ts +17 -13
- package/dist/components/toast/index.d.ts +4 -2
- package/dist/components/toggle/index.d.ts +1 -1
- package/dist/components/truncate/index.d.ts +21 -0
- package/dist/css/index.min.css +1 -1
- package/dist/index.cjs.js +13 -2
- package/dist/index.d.ts +11 -0
- package/dist/index.esm.js +23 -2
- package/package.json +5 -10
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { CellContext, OnChangeFn, type SortingState, type ColumnHelper, type SortingFnOption } from "@tanstack/react-table";
|
|
3
|
+
import { type Props as ISelectProps } from "../select";
|
|
4
|
+
import { type IconType } from "../adpIcon";
|
|
5
|
+
export type IColumn = {
|
|
6
|
+
id?: string;
|
|
7
|
+
key: string;
|
|
8
|
+
header: any;
|
|
9
|
+
cell?: (row: CellContext<any, any>) => ReactNode;
|
|
10
|
+
fixed?: boolean;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
enableSorting?: boolean;
|
|
13
|
+
enableResizing?: boolean;
|
|
14
|
+
sortingFn?: SortingFnOption<any>;
|
|
15
|
+
size?: number;
|
|
16
|
+
};
|
|
17
|
+
export interface FilterItem extends ISelectProps {
|
|
18
|
+
selectedValue?: any;
|
|
19
|
+
icon?: IconType;
|
|
20
|
+
title: string;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
onChange?: () => void;
|
|
23
|
+
}
|
|
24
|
+
interface AdvancedFilterItem extends FilterItem {
|
|
25
|
+
setSelectedValue?: (val: any) => void;
|
|
26
|
+
subTitle?: string;
|
|
27
|
+
}
|
|
28
|
+
interface IPaginationProps {
|
|
29
|
+
onPageSizeChange?: (args: number) => number;
|
|
30
|
+
onPageChange?: (args: number) => void;
|
|
31
|
+
totalRecords?: number;
|
|
32
|
+
offset?: number;
|
|
33
|
+
pageSize?: number;
|
|
34
|
+
}
|
|
35
|
+
type FilterOption = {
|
|
36
|
+
label: string;
|
|
37
|
+
value: string;
|
|
38
|
+
};
|
|
39
|
+
type Filters = {
|
|
40
|
+
[key: string]: FilterOption | FilterOption[];
|
|
41
|
+
};
|
|
42
|
+
interface ITableProps<T> {
|
|
43
|
+
/**
|
|
44
|
+
* Defines the column structure for the Data Table, including column headers,
|
|
45
|
+
* accessors, and any additional configurations.
|
|
46
|
+
*/
|
|
47
|
+
columns: IColumn[];
|
|
48
|
+
/**
|
|
49
|
+
* The array of data objects that will populate the rows of the Data Table.
|
|
50
|
+
*/
|
|
51
|
+
data: T[];
|
|
52
|
+
/**
|
|
53
|
+
* Optional: Provide custom class names as a space-separated
|
|
54
|
+
* string to override the default Data Table styling.
|
|
55
|
+
*/
|
|
56
|
+
className?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Configuration for applying advanced filters to the Data Table.
|
|
59
|
+
* Allows complex filtering logic and customization.
|
|
60
|
+
*/
|
|
61
|
+
advancedFilters?: AdvancedFilterItem[];
|
|
62
|
+
/**
|
|
63
|
+
* Configuration for applying basic filters to the Data Table.
|
|
64
|
+
* Enables simple filtering by key-value pairs.
|
|
65
|
+
* Showing maximum 3 basic filters in the table.
|
|
66
|
+
*/
|
|
67
|
+
basicFilters?: FilterItem[];
|
|
68
|
+
/**
|
|
69
|
+
* Allows to set filters by key-value pairs.
|
|
70
|
+
*/
|
|
71
|
+
filters?: Filters;
|
|
72
|
+
/**
|
|
73
|
+
* A callback function used to update the list of applied filters.
|
|
74
|
+
*/
|
|
75
|
+
setFilters?: (filters: Filters) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Boolean value to display a loading state in the Data Table,
|
|
78
|
+
* typically while loading or processing data.
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
loading?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* A callback function triggered to refresh the Data Table,
|
|
84
|
+
* typically re-fetching or updating the data.
|
|
85
|
+
*/
|
|
86
|
+
onRefresh?: () => void;
|
|
87
|
+
/**
|
|
88
|
+
* To adjust the width of the columns
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
resizable?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* To adding virtualization for column in the data table
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
columnVirtualization?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* To adding virtualization for row in the data table
|
|
99
|
+
* @default true
|
|
100
|
+
*/
|
|
101
|
+
rowVirtualization?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* To pin the first columns of the data table
|
|
104
|
+
* @default true
|
|
105
|
+
*/
|
|
106
|
+
pinnedFirstColumn?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* To make the row selectable by showing checkboxes
|
|
109
|
+
* @default false
|
|
110
|
+
*/
|
|
111
|
+
selectable?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Callback function triggered on row selection.
|
|
114
|
+
* @param selectedRows - Index List of the selected rows
|
|
115
|
+
*/
|
|
116
|
+
onRowSelection?: (selectedRows: object) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Allows to set sort by using key-value pair.
|
|
119
|
+
*/
|
|
120
|
+
sorting?: SortingState;
|
|
121
|
+
/**
|
|
122
|
+
* Callback function triggered on row sorting.
|
|
123
|
+
* @param sortState - Index List of the selected rows
|
|
124
|
+
*/
|
|
125
|
+
setSorting?: OnChangeFn<SortingState> | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* Allows to set pagination props.
|
|
128
|
+
*/
|
|
129
|
+
paginationProps?: IPaginationProps;
|
|
130
|
+
/**
|
|
131
|
+
* To Adjust the height of the table.
|
|
132
|
+
* @default 100%
|
|
133
|
+
*/
|
|
134
|
+
height?: string;
|
|
135
|
+
/**
|
|
136
|
+
* To set the page size option
|
|
137
|
+
* @default PAGE_SIZE_OPTIONS
|
|
138
|
+
*/
|
|
139
|
+
pageSizeOptions?: number[];
|
|
140
|
+
/**
|
|
141
|
+
* To add the custom CTAs
|
|
142
|
+
*/
|
|
143
|
+
customCTAs?: ReactNode;
|
|
144
|
+
}
|
|
145
|
+
export declare const deriveConfiguredColumns: (rawColumns: IColumn[], selectable: boolean, columnHelper: ColumnHelper<any>) => import("@tanstack/react-table").AccessorKeyColumnDef<any, any>[];
|
|
146
|
+
export declare const DataTable: <T extends object>({ advancedFilters, basicFilters, className, columns, data, filters, loading, paginationProps, resizable, selectable, setFilters, sorting, columnVirtualization, rowVirtualization, setSorting, onRefresh, onRowSelection, height, pageSizeOptions, customCTAs }: ITableProps<T>) => ReactNode;
|
|
147
|
+
export default DataTable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type IRecordsChangeModal = {
|
|
2
|
+
show: boolean;
|
|
3
|
+
toggleVisibility: () => void;
|
|
4
|
+
setPageSize: (args: number) => void;
|
|
5
|
+
pageSize: number;
|
|
6
|
+
pageSizeOptions?: number[];
|
|
7
|
+
};
|
|
8
|
+
declare const PageSizeModal: ({ show, pageSize, pageSizeOptions, toggleVisibility, setPageSize }: IRecordsChangeModal) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default PageSizeModal;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type FilterItem } from ".";
|
|
2
|
+
interface FilterOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
interface SelectedFilters {
|
|
7
|
+
[key: string]: FilterOption[] | {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
interface SelectedFilterListProps {
|
|
13
|
+
advancedFilters?: FilterItem[];
|
|
14
|
+
selectedFilters: SelectedFilters;
|
|
15
|
+
basicFilters?: FilterItem[];
|
|
16
|
+
handleRemoveFilter: (filterId: string, index: number) => void;
|
|
17
|
+
handleClearAllSelectedFilters: () => void;
|
|
18
|
+
}
|
|
19
|
+
declare const SelectedFilterList: ({ advancedFilters, selectedFilters, basicFilters, handleRemoveFilter, handleClearAllSelectedFilters }: SelectedFilterListProps) => false | import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default SelectedFilterList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ColumnHelper } from "@tanstack/react-table";
|
|
2
|
+
import { type IColumn } from ".";
|
|
3
|
+
declare const Settings: ({ fields, setFields, selectable, columns, columnHelper }: {
|
|
4
|
+
fields: any[];
|
|
5
|
+
setFields: (args: any) => void;
|
|
6
|
+
selectable: boolean;
|
|
7
|
+
columns: IColumn[];
|
|
8
|
+
columnHelper: ColumnHelper<any>;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Settings;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type Table } from "@tanstack/react-table";
|
|
2
|
+
export type ITable<T> = {
|
|
3
|
+
table: Table<T>;
|
|
4
|
+
/**
|
|
5
|
+
* Enable column virtualization
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
columnVirtualization?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Enable row virtualization
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
rowVirtualization?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Make the columns selectable
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
selectable?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Loading state of the table
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Enable column resizing
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
resizable?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Height of the table
|
|
31
|
+
* @default "auto"
|
|
32
|
+
*/
|
|
33
|
+
height?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Enable RTL mode
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
isRtl?: boolean;
|
|
39
|
+
};
|
|
40
|
+
declare const Table: <T extends object>({ table, columnVirtualization, rowVirtualization, selectable, resizable, loading, height, isRtl }: ITable<T>) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export default Table;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { IconType } from "../adpIcon";
|
|
3
2
|
export type DropDownItemProps = {
|
|
4
3
|
children?: React.ReactNode;
|
|
5
|
-
icon?: IconType;
|
|
6
4
|
dropdownShow?: boolean;
|
|
7
5
|
index?: number;
|
|
8
6
|
disabled?: boolean;
|
|
@@ -10,4 +8,4 @@ export type DropDownItemProps = {
|
|
|
10
8
|
onClickHandler?: (e?: React.SyntheticEvent) => void;
|
|
11
9
|
className?: string;
|
|
12
10
|
};
|
|
13
|
-
export declare const DropdownItem: ({ children,
|
|
11
|
+
export declare const DropdownItem: ({ children, dropdownShow, index, className, disabled, setShowDropdown, onClickHandler }: DropDownItemProps) => JSX.Element | null;
|
|
@@ -31,5 +31,5 @@ export type Props = {
|
|
|
31
31
|
};
|
|
32
32
|
export declare const Dropdown: {
|
|
33
33
|
({ size, children, header, ctaContent, portalTarget, disabled, ctaClassName }: Props): ReactElement | null;
|
|
34
|
-
Item: ({ children,
|
|
34
|
+
Item: ({ children, dropdownShow, index, className, disabled, setShowDropdown, onClickHandler }: DropDownItemProps) => JSX.Element | null;
|
|
35
35
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
2
|
import { EmptyStateContentProps } from "./emptyStateContent";
|
|
3
3
|
import { EmptyStateCTAProps } from "./emptyStateCta";
|
|
4
|
-
|
|
4
|
+
export declare const imageVariants: readonly ["notifications", "no-access", "forgot-password", "otp", "login", "analytics", "file-upload", "searching", "dashboard", "workspaces", "favorite", "empty-data", "data-upload", "no-connection"];
|
|
5
|
+
type ImageVariantType = typeof imageVariants[number];
|
|
5
6
|
export interface EmptyStateProps {
|
|
6
7
|
/**
|
|
7
8
|
* Set a supported Empty State Image variant
|
|
@@ -36,5 +36,5 @@ export interface Props {
|
|
|
36
36
|
export declare function Modal({ className, rtl, children, showModal, escKeyClose, closeButton, onHide }: Props): ReactElement | null;
|
|
37
37
|
export declare namespace Modal {
|
|
38
38
|
var Header: ({ children, className }: ModalHeaderProps) => ReactElement | null;
|
|
39
|
-
var Body: ({ className,
|
|
39
|
+
var Body: ({ className, children }: ModalBodyProps) => ReactElement | null;
|
|
40
40
|
}
|
|
@@ -8,10 +8,6 @@ export interface ModalBodyProps {
|
|
|
8
8
|
* Dynamically updates the classes applied to the component
|
|
9
9
|
*/
|
|
10
10
|
className?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Modal Body Scrolable
|
|
13
|
-
*/
|
|
14
|
-
scrollable?: boolean;
|
|
15
11
|
}
|
|
16
|
-
export declare const ModalBody: ({ className,
|
|
12
|
+
export declare const ModalBody: ({ className, children }: ModalBodyProps) => ReactElement | null;
|
|
17
13
|
export default ModalBody;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { PanelBodyProps } from "./panelBody";
|
|
3
|
+
import { PanelFooterProps } from "./panelFooter";
|
|
4
|
+
import { PanelHeaderProps } from "./panelHeader";
|
|
5
|
+
export interface Props {
|
|
6
|
+
/**
|
|
7
|
+
* Variant of the Panel
|
|
8
|
+
* @default compact
|
|
9
|
+
*/
|
|
10
|
+
variant?: "extended" | "compact";
|
|
11
|
+
/**
|
|
12
|
+
* Control Panel's visibility
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
showPanel?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Overwrite the Panel styles by passing space separated class names
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Panel content
|
|
22
|
+
*/
|
|
23
|
+
children?: (ReactElement<PanelBodyProps> | [ReactElement<PanelHeaderProps>, ReactElement<PanelBodyProps>] | [ReactElement<PanelBodyProps>, ReactElement<PanelFooterProps>] | [ReactElement<PanelHeaderProps>, ReactElement<PanelBodyProps>, ReactElement<PanelFooterProps>]);
|
|
24
|
+
}
|
|
25
|
+
export declare function Panel({ variant, showPanel, children, className }: Props): ReactElement | null;
|
|
26
|
+
export declare namespace Panel {
|
|
27
|
+
var Header: ({ className, showBackButton, onBackHandler, showCloseButton, onCloseHandler, customCTA, header, subHeader }: PanelHeaderProps) => ReactElement | null;
|
|
28
|
+
var Body: ({ className, children }: PanelBodyProps) => ReactElement | null;
|
|
29
|
+
var Footer: ({ className, children }: PanelFooterProps) => ReactElement | null;
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
export interface PanelBodyProps {
|
|
3
|
+
/**
|
|
4
|
+
* Panel Body
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Overwrite the Panel body styles by passing space separated class names
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const PanelBody: ({ className, children }: PanelBodyProps) => ReactElement | null;
|
|
13
|
+
export default PanelBody;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
export interface PanelFooterProps {
|
|
3
|
+
/**
|
|
4
|
+
* Panel Footer
|
|
5
|
+
*/
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Overwrite the Panel footer styles by passing space separated class names
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const PanelFooter: ({ className, children }: PanelFooterProps) => ReactElement | null;
|
|
13
|
+
export default PanelFooter;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
export interface PanelHeaderProps {
|
|
3
|
+
/**
|
|
4
|
+
* Overwrite the Panel Header styles by passing space separated class names
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Control panel's back button visibility
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
showBackButton?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Callback function for back button
|
|
14
|
+
*/
|
|
15
|
+
onBackHandler?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Control panel's close button visibility
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
showCloseButton?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Callback function for close button
|
|
23
|
+
*/
|
|
24
|
+
onCloseHandler?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Header of Panel
|
|
27
|
+
*/
|
|
28
|
+
header?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Sub header of Panel
|
|
31
|
+
*/
|
|
32
|
+
subHeader?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Pass custom CTA that will appear close to header
|
|
35
|
+
*/
|
|
36
|
+
customCTA?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export declare const PanelHeader: ({ className, showBackButton, onBackHandler, showCloseButton, onCloseHandler, customCTA, header, subHeader }: PanelHeaderProps) => ReactElement | null;
|
|
39
|
+
export default PanelHeader;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface PanelFooterProps {
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare const CustomCTA: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const PanelFooter: ({ onClick }: PanelFooterProps) => React.ReactElement;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { Panel } from "../panel";
|
|
3
|
+
export interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* Overwrite the styles for PanelGroup by passing space separated class names
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* PanelGroup children. The component accepts one or more Panels as its children.
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactElement<typeof Panel> | ReactElement<typeof Panel>[];
|
|
12
|
+
/**
|
|
13
|
+
* Use the prop to set the active panel index. The value for the active index needs to start from 0.
|
|
14
|
+
* @default 0
|
|
15
|
+
*/
|
|
16
|
+
activeIndex?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Control PanelGroup's visibility
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
showPanels?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function PanelGroup({ children, className, activeIndex, showPanels }: Props): ReactElement | null;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type Props as TextFieldProps } from "../textField";
|
|
3
|
+
export type PasswordFieldProps = Omit<TextFieldProps, "type">;
|
|
4
|
+
export declare const PasswordField: React.ForwardRefExoticComponent<Omit<PasswordFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import { type RadioProps } from "../radio";
|
|
3
|
+
export declare enum RadioGroupSizes {
|
|
4
|
+
SM = "sm",
|
|
5
|
+
MD = "md",
|
|
6
|
+
LG = "lg"
|
|
7
|
+
}
|
|
8
|
+
export type RadioGroupSize = `${RadioGroupSizes}`;
|
|
9
|
+
export interface Props extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
|
|
10
|
+
/**
|
|
11
|
+
* Size of the Radio group.
|
|
12
|
+
* @default md
|
|
13
|
+
*/
|
|
14
|
+
size?: RadioGroupSize;
|
|
15
|
+
/**
|
|
16
|
+
* Pass space separated class names to override the RadioGroup styling
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Pass boolean value to disable the component.
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Selected value
|
|
26
|
+
*/
|
|
27
|
+
selectedValue?: string;
|
|
28
|
+
/**
|
|
29
|
+
* An array of objects of radio props type
|
|
30
|
+
*/
|
|
31
|
+
options: RadioProps[];
|
|
32
|
+
/**
|
|
33
|
+
* Callback function that is called when the radio group selection changes.
|
|
34
|
+
* A selected value is passed as an argument to the function.
|
|
35
|
+
*/
|
|
36
|
+
onChange?: (arg: string) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Placement of the radio
|
|
39
|
+
* @default "start"
|
|
40
|
+
*/
|
|
41
|
+
radioPlacement?: "start" | "end";
|
|
42
|
+
/**
|
|
43
|
+
* Variant of the RadioGroup
|
|
44
|
+
* @default outline
|
|
45
|
+
*/
|
|
46
|
+
variant?: "outline" | "text";
|
|
47
|
+
}
|
|
48
|
+
export declare const RadioGroup: ({ size, options, onChange, className, selectedValue, disabled, radioPlacement, variant }: Props) => ReactElement;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import type { TVoidElements } from "../../types/custom";
|
|
3
|
+
import "./scrollbar.styles.css";
|
|
4
|
+
export interface IScrollbarProps {
|
|
5
|
+
/**
|
|
6
|
+
* children to render inside the scroll container
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The type of tag to render for the scroll container, the default value is "div".
|
|
11
|
+
* @default div
|
|
12
|
+
*/
|
|
13
|
+
as?: keyof Omit<JSX.IntrinsicElements, TVoidElements>;
|
|
14
|
+
/**
|
|
15
|
+
* Overwrite the scrollbar container styles by passing space separated class names.
|
|
16
|
+
* @optional
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Pass a boolean value to set the visibility of the scroller, by default the scrollbar will be visible on content hover.
|
|
21
|
+
* @optional
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
alwaysVisible?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Set it to true if you want to directly scroll to the click position,
|
|
27
|
+
* by default the scroller will move in the direction of the click
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
scrollToClickPosition?: boolean;
|
|
31
|
+
id?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare const Scrollbar: React.ForwardRefExoticComponent<IScrollbarProps & React.RefAttributes<HTMLElement>>;
|
|
34
|
+
export default Scrollbar;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { FunctionComponent } from "react";
|
|
2
|
+
export declare const Table: FunctionComponent<{
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const NewspaperArticle: FunctionComponent;
|
|
7
|
+
export declare const WideContent: FunctionComponent;
|
|
8
|
+
export declare const NestedScrollbars: () => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { Props as SelectProps } from "react-select";
|
|
2
|
+
import { Props as SelectProps, type GroupBase } from "react-select";
|
|
3
|
+
import { IconType } from "../adpIcon";
|
|
3
4
|
export declare enum SelectSizes {
|
|
4
5
|
MD = "md",
|
|
5
6
|
LG = "lg"
|
|
@@ -10,7 +11,7 @@ export type Option = {
|
|
|
10
11
|
value: any;
|
|
11
12
|
isFixed?: boolean;
|
|
12
13
|
};
|
|
13
|
-
export interface Props
|
|
14
|
+
export interface Props {
|
|
14
15
|
/**
|
|
15
16
|
* Accepts id for the select
|
|
16
17
|
*/
|
|
@@ -24,12 +25,12 @@ export interface Props extends Omit<SelectProps, "options" | "value" | "isDisabl
|
|
|
24
25
|
*/
|
|
25
26
|
label?: ReactNode;
|
|
26
27
|
/**
|
|
27
|
-
* Size of the
|
|
28
|
+
* Size of the Select field.
|
|
28
29
|
* @default md
|
|
29
30
|
*/
|
|
30
31
|
size?: SelectSize;
|
|
31
32
|
/**
|
|
32
|
-
*
|
|
33
|
+
* Selection option for the select field
|
|
33
34
|
*/
|
|
34
35
|
options?: readonly (Option | {
|
|
35
36
|
label: ReactNode;
|
|
@@ -63,10 +64,36 @@ export interface Props extends Omit<SelectProps, "options" | "value" | "isDisabl
|
|
|
63
64
|
* Enables users to create new options along with choosing existing options.
|
|
64
65
|
*/
|
|
65
66
|
creatable?: boolean;
|
|
67
|
+
touched?: boolean;
|
|
66
68
|
/**
|
|
67
|
-
*
|
|
69
|
+
* @description When multi-select is enabled, this prop sets the maximum number of selected values that will be shown in the value container.
|
|
70
|
+
* @default 3
|
|
68
71
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
maxVisibleValues?: number;
|
|
73
|
+
/**
|
|
74
|
+
* A custom message that can be shown instead of the message '+[count] more' when the number of selected values is more than 'maxVisibleValues'.
|
|
75
|
+
* The message will be appended after '+[count]'
|
|
76
|
+
*/
|
|
77
|
+
maxVisibleValuesMsg?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Custom content to be displayed at the bottom of the dropdown menu.
|
|
80
|
+
*/
|
|
81
|
+
menuFooter?: ReactNode;
|
|
82
|
+
/**
|
|
83
|
+
* Icon to be displayed before the value container.
|
|
84
|
+
* @description
|
|
85
|
+
* This prop accepts either an IconType (string) or a ReactNode.
|
|
86
|
+
* - If an IconType is provided, it will render an ADPIcon component.
|
|
87
|
+
* - If a ReactNode is provided, it will be rendered as-is.
|
|
88
|
+
*/
|
|
89
|
+
prefixIcon?: IconType | ReactNode;
|
|
90
|
+
/**
|
|
91
|
+
* Icon to be displayed after the value container.
|
|
92
|
+
* @description
|
|
93
|
+
* This prop accepts either an IconType (string) or a ReactNode.
|
|
94
|
+
* - If an IconType is provided, it will render an ADPIcon component.
|
|
95
|
+
* - If a ReactNode is provided, it will be rendered as-is.
|
|
96
|
+
*/
|
|
97
|
+
suffixIcon?: IconType | ReactNode;
|
|
71
98
|
}
|
|
72
|
-
export declare function Select
|
|
99
|
+
export declare function Select<IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(selectProps: SelectProps<Option, IsMulti, Group> & Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { StylesConfig, GroupBase } from "react-select";
|
|
2
|
+
import { SelectSize, type Option } from "./index";
|
|
3
|
+
export declare const reactSelectCustomStyles: <IsMulti extends boolean, Group extends GroupBase<Option>>(error: boolean, size: SelectSize, multiSelect: boolean) => StylesConfig<Option, IsMulti, Group>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { IconType } from "../adpIcon";
|
|
3
3
|
/**
|
|
4
4
|
* Props for the Tab component.
|
|
@@ -28,19 +28,26 @@ export interface TabProps {
|
|
|
28
28
|
* Content to be displayed within the tab.
|
|
29
29
|
*/
|
|
30
30
|
children: React.ReactNode;
|
|
31
|
-
/**
|
|
32
|
-
* Optional icon to be displayed in the tab.
|
|
33
|
-
*/
|
|
34
|
-
icon?: IconType;
|
|
35
|
-
/**
|
|
36
|
-
* Placement of the icon within the tab.
|
|
37
|
-
* Can be either "start" or "end".
|
|
38
|
-
*/
|
|
39
|
-
iconPlacement?: "start" | "end";
|
|
40
31
|
/**
|
|
41
32
|
* Indicates whether the tab is disabled.
|
|
42
33
|
*/
|
|
43
34
|
disabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Icon to be displayed before the title of the Tab.
|
|
37
|
+
* @description
|
|
38
|
+
* This prop accepts either an IconType (string) or a ReactNode.
|
|
39
|
+
* - If an IconType is provided, it will render an ADPIcon component.
|
|
40
|
+
* - If a ReactNode is provided, it will be rendered as-is.
|
|
41
|
+
*/
|
|
42
|
+
prefixIcon?: IconType | ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Icon to be displayed after the title of the Tab.
|
|
45
|
+
* @description
|
|
46
|
+
* This prop accepts either an IconType (string) or a ReactNode.
|
|
47
|
+
* - If an IconType is provided, it will render an ADPIcon component.
|
|
48
|
+
* - If a ReactNode is provided, it will be rendered as-is.
|
|
49
|
+
*/
|
|
50
|
+
suffixIcon?: IconType | ReactNode;
|
|
44
51
|
}
|
|
45
52
|
export declare const Tab: ({ children, className }: TabProps) => React.ReactElement;
|
|
46
53
|
export default Tab;
|