@juspay/blend-design-system 0.0.12 → 0.0.13-beta
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/components/Charts/types.d.ts +1 -2
- package/dist/components/DataTable/MobileColumnDrawer/index.d.ts +14 -0
- package/dist/components/DataTable/MobileColumnManagerDrawer/index.d.ts +11 -0
- package/dist/components/DataTable/TableBody/types.d.ts +6 -1
- package/dist/components/DataTable/TableHeader/MobileFilterDrawer.d.ts +16 -0
- package/dist/components/DataTable/TableHeader/types.d.ts +7 -1
- package/dist/components/DataTable/dataTable.tokens.d.ts +117 -41
- package/dist/components/DataTable/hooks/index.d.ts +2 -0
- package/dist/components/DataTable/hooks/useMobileDataTable.d.ts +11 -0
- package/dist/components/DataTable/types.d.ts +21 -2
- package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +0 -2
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
- package/dist/components/MultiSelect/multiSelect.tokens.d.ts +21 -1
- package/dist/components/MultiSelect/types.d.ts +29 -0
- package/dist/components/Sidebar/types.d.ts +1 -0
- package/dist/components/SingleSelect/MobileSingleSelect.d.ts +5 -0
- package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
- package/dist/components/SingleSelect/singleSelect.tokens.d.ts +10 -1
- package/dist/components/SingleSelect/types.d.ts +2 -0
- package/dist/components/StatCard/StatCard.d.ts +1 -1
- package/dist/components/StatCard/types.d.ts +4 -2
- package/dist/components/Tooltip/tooltip.tokens.d.ts +5 -3
- package/dist/context/ThemeContext.d.ts +4 -4
- package/dist/context/useComponentToken.d.ts +3 -3
- package/dist/main.js +21377 -19509
- package/package.json +1 -1
|
@@ -51,10 +51,9 @@ export type RenderChartProps = {
|
|
|
51
51
|
export type ChartsProps = {
|
|
52
52
|
chartType?: ChartType;
|
|
53
53
|
data: NewNestedDataPoint[];
|
|
54
|
+
colors?: string[];
|
|
54
55
|
xAxisLabel?: string;
|
|
55
56
|
yAxisLabel?: string;
|
|
56
|
-
colors?: string[];
|
|
57
|
-
metrics?: string[];
|
|
58
57
|
slot1?: ReactNode;
|
|
59
58
|
slot2?: ReactNode;
|
|
60
59
|
slot3?: ReactNode;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColumnDefinition, RowActionsConfig } from '../types';
|
|
3
|
+
export interface MobileColumnDrawerProps<T extends Record<string, unknown>> {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
row: T;
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
overflowColumns: ColumnDefinition<T>[];
|
|
9
|
+
getDisplayValue?: (value: unknown, column: ColumnDefinition<T>) => unknown;
|
|
10
|
+
onFieldChange?: (field: keyof T, value: unknown) => void;
|
|
11
|
+
rowActions?: RowActionsConfig<T>;
|
|
12
|
+
}
|
|
13
|
+
declare const MobileColumnDrawer: React.FC<MobileColumnDrawerProps<Record<string, unknown>>>;
|
|
14
|
+
export default MobileColumnDrawer;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColumnDefinition } from '../types';
|
|
3
|
+
export interface MobileColumnManagerDrawerProps<T extends Record<string, unknown>> {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
columns: ColumnDefinition<T>[];
|
|
7
|
+
visibleColumns: ColumnDefinition<T>[];
|
|
8
|
+
onColumnChange: (columns: ColumnDefinition<T>[]) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const MobileColumnManagerDrawer: React.FC<MobileColumnManagerDrawerProps<Record<string, unknown>>>;
|
|
11
|
+
export default MobileColumnManagerDrawer;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ColumnDefinition } from '../types';
|
|
1
|
+
import { ColumnDefinition, RowActionsConfig } from '../types';
|
|
2
|
+
import { MobileDataTableConfig } from '../hooks/useMobileDataTable';
|
|
2
3
|
export type TableBodyProps<T extends Record<string, unknown>> = {
|
|
3
4
|
currentData: T[];
|
|
4
5
|
visibleColumns: ColumnDefinition<T>[];
|
|
@@ -11,7 +12,11 @@ export type TableBodyProps<T extends Record<string, unknown>> = {
|
|
|
11
12
|
enableColumnManager?: boolean;
|
|
12
13
|
enableRowExpansion?: boolean;
|
|
13
14
|
enableRowSelection?: boolean;
|
|
15
|
+
rowActions?: RowActionsConfig<T>;
|
|
14
16
|
columnFreeze?: number;
|
|
17
|
+
mobileConfig?: MobileDataTableConfig;
|
|
18
|
+
mobileOverflowColumns?: ColumnDefinition<T>[];
|
|
19
|
+
onMobileOverflowClick?: (row: T) => void;
|
|
15
20
|
renderExpandedRow?: (expandedData: {
|
|
16
21
|
row: T;
|
|
17
22
|
index: number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColumnDefinition } from '../types';
|
|
3
|
+
import { TableTokenType } from '../dataTable.tokens';
|
|
4
|
+
import { SortHandlers, FilterHandlers, FilterState, ColumnFilterHandler } from './handlers';
|
|
5
|
+
type MobileFilterDrawerProps = {
|
|
6
|
+
column: ColumnDefinition<Record<string, unknown>>;
|
|
7
|
+
data?: Record<string, unknown>[];
|
|
8
|
+
tableToken: TableTokenType;
|
|
9
|
+
sortHandlers: SortHandlers;
|
|
10
|
+
filterHandlers: FilterHandlers;
|
|
11
|
+
filterState: FilterState;
|
|
12
|
+
onColumnFilter?: ColumnFilterHandler;
|
|
13
|
+
onPopoverClose?: () => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const MobileFilterDrawer: React.FC<MobileFilterDrawerProps>;
|
|
16
|
+
export default MobileFilterDrawer;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { ColumnDefinition, FilterType } from '../types';
|
|
1
|
+
import { ColumnDefinition, FilterType, RowActionsConfig } from '../types';
|
|
2
|
+
import { MobileDataTableConfig } from '../hooks/useMobileDataTable';
|
|
2
3
|
export type TableHeaderProps<T extends Record<string, unknown>> = {
|
|
3
4
|
visibleColumns: ColumnDefinition<T>[];
|
|
5
|
+
allVisibleColumns?: ColumnDefinition<T>[];
|
|
4
6
|
initialColumns: ColumnDefinition<T>[];
|
|
5
7
|
selectAll: boolean | 'indeterminate';
|
|
6
8
|
enableInlineEdit?: boolean;
|
|
7
9
|
enableColumnManager?: boolean;
|
|
8
10
|
enableRowExpansion?: boolean;
|
|
9
11
|
enableRowSelection?: boolean;
|
|
12
|
+
rowActions?: RowActionsConfig<T>;
|
|
10
13
|
data?: T[];
|
|
11
14
|
columnFreeze?: number;
|
|
15
|
+
mobileConfig?: MobileDataTableConfig;
|
|
16
|
+
mobileOverflowColumns?: ColumnDefinition<T>[];
|
|
17
|
+
onMobileOverflowClick?: (row: T) => void;
|
|
12
18
|
onSort: (field: keyof T) => void;
|
|
13
19
|
onSelectAll: (checked: boolean | 'indeterminate') => void;
|
|
14
20
|
onColumnChange: (columns: ColumnDefinition<T>[]) => void;
|
|
@@ -1,49 +1,103 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
|
-
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
type BasicCSSProps = {
|
|
5
|
+
padding?: CSSObject['padding'];
|
|
6
|
+
width?: CSSObject['width'];
|
|
7
|
+
height?: CSSObject['height'];
|
|
8
|
+
display?: CSSObject['display'];
|
|
9
|
+
flexDirection?: CSSObject['flexDirection'];
|
|
10
|
+
position?: CSSObject['position'];
|
|
11
|
+
};
|
|
12
|
+
type BulkActionsType = {
|
|
13
|
+
top: CSSObject['top'];
|
|
14
|
+
left: CSSObject['left'];
|
|
15
|
+
transform: CSSObject['transform'];
|
|
16
|
+
zIndex: CSSObject['zIndex'];
|
|
17
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
18
|
+
color: CSSObject['color'];
|
|
19
|
+
borderRadius: CSSObject['borderRadius'];
|
|
4
20
|
padding: CSSObject['padding'];
|
|
5
|
-
|
|
21
|
+
boxShadow: CSSObject['boxShadow'];
|
|
22
|
+
display: CSSObject['display'];
|
|
23
|
+
alignItems: CSSObject['alignItems'];
|
|
24
|
+
gap: CSSObject['gap'];
|
|
25
|
+
minWidth?: CSSObject['minWidth'];
|
|
26
|
+
width?: CSSObject['width'];
|
|
27
|
+
maxWidth?: CSSObject['maxWidth'];
|
|
28
|
+
border: CSSObject['border'];
|
|
29
|
+
selectText: {
|
|
30
|
+
fontSize: CSSObject['fontSize'];
|
|
31
|
+
fontWeight: CSSObject['fontWeight'];
|
|
32
|
+
flex?: CSSObject['flex'];
|
|
33
|
+
color: CSSObject['color'];
|
|
34
|
+
};
|
|
6
35
|
height: CSSObject['height'];
|
|
36
|
+
};
|
|
37
|
+
type HeaderType = {
|
|
7
38
|
display: CSSObject['display'];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
39
|
+
justifyContent: CSSObject['justifyContent'];
|
|
40
|
+
alignItems: CSSObject['alignItems'];
|
|
41
|
+
marginBottom: CSSObject['marginBottom'];
|
|
42
|
+
gap: CSSObject['gap'];
|
|
43
|
+
maxWidth: CSSObject['maxWidth'];
|
|
44
|
+
overflowX: CSSObject['overflowX'];
|
|
45
|
+
title: {
|
|
46
|
+
fontSize: CSSObject['fontSize'];
|
|
47
|
+
fontWeight: CSSObject['fontWeight'];
|
|
48
|
+
color: CSSObject['color'];
|
|
49
|
+
};
|
|
50
|
+
description: {
|
|
51
|
+
fontSize: CSSObject['fontSize'];
|
|
52
|
+
color: CSSObject['color'];
|
|
53
|
+
lineHeight: CSSObject['lineHeight'];
|
|
54
|
+
maxWidth: CSSObject['maxWidth'];
|
|
55
|
+
};
|
|
56
|
+
headerSlot1: {
|
|
57
|
+
maxHeight: CSSObject['maxHeight'];
|
|
58
|
+
flexShrink: CSSObject['flexShrink'];
|
|
59
|
+
};
|
|
60
|
+
headerSlot2: {
|
|
61
|
+
maxHeight: CSSObject['maxHeight'];
|
|
62
|
+
flexShrink: CSSObject['flexShrink'];
|
|
63
|
+
};
|
|
64
|
+
headerSlot3: {
|
|
65
|
+
maxHeight: CSSObject['maxHeight'];
|
|
66
|
+
flexShrink: CSSObject['flexShrink'];
|
|
67
|
+
};
|
|
68
|
+
titleRow: {
|
|
69
|
+
gap: CSSObject['gap'];
|
|
70
|
+
marginBottom: CSSObject['marginBottom'];
|
|
12
71
|
justifyContent: CSSObject['justifyContent'];
|
|
13
72
|
alignItems: CSSObject['alignItems'];
|
|
14
|
-
|
|
73
|
+
};
|
|
74
|
+
descriptionRow: {
|
|
75
|
+
marginTop: CSSObject['marginTop'];
|
|
76
|
+
};
|
|
77
|
+
actionIcons: {
|
|
15
78
|
gap: CSSObject['gap'];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
79
|
+
searchIcon: {
|
|
80
|
+
width: CSSObject['width'];
|
|
81
|
+
height: CSSObject['height'];
|
|
82
|
+
};
|
|
83
|
+
filterIcon: {
|
|
84
|
+
width: CSSObject['width'];
|
|
85
|
+
height: CSSObject['height'];
|
|
86
|
+
};
|
|
87
|
+
columnManagerIcon: {
|
|
88
|
+
width: CSSObject['width'];
|
|
89
|
+
height: CSSObject['height'];
|
|
90
|
+
};
|
|
23
91
|
};
|
|
92
|
+
};
|
|
93
|
+
export type TableTokenType = BasicCSSProps & {
|
|
94
|
+
header: HeaderType;
|
|
24
95
|
dataTable: {
|
|
25
96
|
borderRadius: CSSObject['borderRadius'];
|
|
26
97
|
border: CSSObject['border'];
|
|
27
98
|
maxHeight: CSSObject['maxHeight'];
|
|
28
99
|
minHeight?: CSSObject['minHeight'];
|
|
29
|
-
bulkActions:
|
|
30
|
-
top: CSSObject['top'];
|
|
31
|
-
left: CSSObject['left'];
|
|
32
|
-
transform: CSSObject['transform'];
|
|
33
|
-
zIndex: CSSObject['zIndex'];
|
|
34
|
-
backgroundColor: CSSObject['backgroundColor'];
|
|
35
|
-
color: CSSObject['color'];
|
|
36
|
-
borderRadius: CSSObject['borderRadius'];
|
|
37
|
-
padding: CSSObject['padding'];
|
|
38
|
-
boxShadow: CSSObject['boxShadow'];
|
|
39
|
-
display: CSSObject['display'];
|
|
40
|
-
alignItems: CSSObject['alignItems'];
|
|
41
|
-
gap: CSSObject['gap'];
|
|
42
|
-
minWidth: CSSObject['minWidth'];
|
|
43
|
-
border: CSSObject['border'];
|
|
44
|
-
selectText: CSSObject;
|
|
45
|
-
height: CSSObject['height'];
|
|
46
|
-
};
|
|
100
|
+
bulkActions: BulkActionsType;
|
|
47
101
|
table: {
|
|
48
102
|
width: CSSObject['width'];
|
|
49
103
|
tableLayout: CSSObject['tableLayout'];
|
|
@@ -55,11 +109,19 @@ export type TableTokenType = {
|
|
|
55
109
|
backgroundColor: CSSObject['backgroundColor'];
|
|
56
110
|
borderBottom: CSSObject['borderBottom'];
|
|
57
111
|
height: CSSObject['height'];
|
|
58
|
-
row:
|
|
59
|
-
|
|
112
|
+
row: {
|
|
113
|
+
height: CSSObject['height'];
|
|
114
|
+
'&:hover': {
|
|
115
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
cell: {
|
|
119
|
+
padding: CSSObject['padding'];
|
|
120
|
+
textAlign: CSSObject['textAlign'];
|
|
121
|
+
fontWeight: CSSObject['fontWeight'];
|
|
122
|
+
color: CSSObject['color'];
|
|
123
|
+
fontSize: CSSObject['fontSize'];
|
|
60
124
|
width?: CSSObject['width'];
|
|
61
|
-
fontSize?: CSSObject['fontSize'];
|
|
62
|
-
fontWeight?: CSSObject['fontWeight'];
|
|
63
125
|
};
|
|
64
126
|
sortable: {
|
|
65
127
|
cursor: CSSObject['cursor'];
|
|
@@ -99,13 +161,20 @@ export type TableTokenType = {
|
|
|
99
161
|
groupLabelPadding: CSSObject['padding'];
|
|
100
162
|
groupLabelTextTransform: CSSObject['textTransform'];
|
|
101
163
|
separatorHeight: CSSObject['height'];
|
|
102
|
-
separatorColor: CSSObject['
|
|
164
|
+
separatorColor: CSSObject['color'];
|
|
103
165
|
};
|
|
104
166
|
};
|
|
105
167
|
body: {
|
|
106
168
|
backgroundColor: CSSObject['backgroundColor'];
|
|
107
169
|
borderTop: CSSObject['borderTop'];
|
|
108
|
-
row:
|
|
170
|
+
row: {
|
|
171
|
+
height: CSSObject['height'];
|
|
172
|
+
'&:hover': {
|
|
173
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
174
|
+
cursor: CSSObject['cursor'];
|
|
175
|
+
};
|
|
176
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
177
|
+
};
|
|
109
178
|
cell: {
|
|
110
179
|
padding: CSSObject['padding'];
|
|
111
180
|
fontWeight: CSSObject['fontWeight'];
|
|
@@ -127,7 +196,10 @@ export type TableTokenType = {
|
|
|
127
196
|
transition: CSSObject['transition'];
|
|
128
197
|
color: CSSObject['color'];
|
|
129
198
|
border: CSSObject['border'];
|
|
130
|
-
'&:hover':
|
|
199
|
+
'&:hover': {
|
|
200
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
201
|
+
color: CSSObject['color'];
|
|
202
|
+
};
|
|
131
203
|
};
|
|
132
204
|
};
|
|
133
205
|
};
|
|
@@ -161,7 +233,7 @@ export type TableTokenType = {
|
|
|
161
233
|
cursor: CSSObject['cursor'];
|
|
162
234
|
color: CSSObject['color'];
|
|
163
235
|
fontSize: CSSObject['fontSize'];
|
|
164
|
-
hoverColor: CSSObject['
|
|
236
|
+
hoverColor: CSSObject['color'];
|
|
165
237
|
};
|
|
166
238
|
pageNavigation: {
|
|
167
239
|
gap: CSSObject['gap'];
|
|
@@ -171,4 +243,8 @@ export type TableTokenType = {
|
|
|
171
243
|
};
|
|
172
244
|
};
|
|
173
245
|
};
|
|
174
|
-
export
|
|
246
|
+
export type ResponsiveTableTokens = {
|
|
247
|
+
[key in keyof BreakpointType]: TableTokenType;
|
|
248
|
+
};
|
|
249
|
+
export declare const getTableToken: (foundationToken: FoundationTokenType) => ResponsiveTableTokens;
|
|
250
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface MobileDataTableConfig {
|
|
2
|
+
isMobile: boolean;
|
|
3
|
+
disableColumnFreeze: boolean;
|
|
4
|
+
enableHorizontalScroll: boolean;
|
|
5
|
+
compactLayout: boolean;
|
|
6
|
+
hideColumnManager: boolean;
|
|
7
|
+
simplifiedFilters: boolean;
|
|
8
|
+
maxVisibleColumns: number;
|
|
9
|
+
enableColumnOverflow: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const useMobileDataTable: (mobileColumnsToShow?: number) => MobileDataTableConfig;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonType, ButtonSize, ButtonSubType } from '../Button/types';
|
|
2
3
|
export declare enum SortDirection {
|
|
3
4
|
NONE = "none",
|
|
4
5
|
ASCENDING = "asc",
|
|
@@ -175,10 +176,26 @@ export type PaginationConfig = {
|
|
|
175
176
|
export type BulkAction = {
|
|
176
177
|
id: string;
|
|
177
178
|
label: string;
|
|
178
|
-
|
|
179
|
-
variant?: 'primary' | 'secondary' | 'danger';
|
|
179
|
+
variant: 'primary' | 'secondary' | 'danger';
|
|
180
180
|
onClick: (selectedRowIds: string[]) => void;
|
|
181
181
|
};
|
|
182
|
+
export type RowActionConfig<T extends Record<string, unknown>> = {
|
|
183
|
+
id: string;
|
|
184
|
+
text?: string;
|
|
185
|
+
buttonType?: ButtonType;
|
|
186
|
+
size?: ButtonSize;
|
|
187
|
+
subType?: ButtonSubType;
|
|
188
|
+
leadingIcon?: React.ReactNode;
|
|
189
|
+
trailingIcon?: React.ReactNode;
|
|
190
|
+
disabled?: boolean | ((row: T, index: number) => boolean);
|
|
191
|
+
hidden?: boolean | ((row: T, index: number) => boolean);
|
|
192
|
+
onClick: (row: T, index: number) => void;
|
|
193
|
+
};
|
|
194
|
+
export type RowActionsConfig<T extends Record<string, unknown>> = {
|
|
195
|
+
showEditAction?: boolean;
|
|
196
|
+
slot1?: RowActionConfig<T>;
|
|
197
|
+
slot2?: RowActionConfig<T>;
|
|
198
|
+
};
|
|
182
199
|
export type DataTableProps<T extends Record<string, unknown>> = {
|
|
183
200
|
data: T[];
|
|
184
201
|
columns: ColumnDefinition<T>[];
|
|
@@ -226,5 +243,7 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
226
243
|
onRowExpansionChange?: (rowId: unknown, isExpanded: boolean, rowData: T) => void;
|
|
227
244
|
enableRowSelection?: boolean;
|
|
228
245
|
bulkActions?: BulkAction[];
|
|
246
|
+
rowActions?: RowActionsConfig<T>;
|
|
229
247
|
getRowStyle?: (row: T, index: number) => React.CSSProperties;
|
|
248
|
+
mobileColumnsToShow?: number;
|
|
230
249
|
};
|
|
@@ -29,9 +29,7 @@ export type TextInputTokensType = {
|
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
-
declare const textInputTokens: Readonly<TextInputTokensType>;
|
|
33
32
|
export type ResponsiveTextInputTokens = {
|
|
34
33
|
[key in keyof BreakpointType]: TextInputTokensType;
|
|
35
34
|
};
|
|
36
35
|
export declare const getTextInputTokens: (foundationTheme: FoundationTokenType) => ResponsiveTextInputTokens;
|
|
37
|
-
export default textInputTokens;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectProps } from './types';
|
|
2
|
-
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, useDrawerOnMobile, minWidth, maxWidth, maxHeight, alignment, side, sideOffset, alignOffset, inline, onBlur, onFocus, error, errorMessage, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, customTrigger, useDrawerOnMobile, minWidth, maxWidth, maxHeight, alignment, side, sideOffset, alignOffset, inline, onBlur, onFocus, error, errorMessage, showActionButtons, primaryAction, secondaryAction, showItemDividers, showHeaderBorder, }: MultiSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MultiSelectMenuProps } from './types';
|
|
2
|
-
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minWidth, maxWidth, maxHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, onSelectAll, alignment, side, sideOffset, alignOffset, open, onOpenChange, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minWidth, maxWidth, maxHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, onSelectAll, alignment, side, sideOffset, alignOffset, open, onOpenChange, showActionButtons, primaryAction, secondaryAction, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelectMenu;
|
|
@@ -6,7 +6,9 @@ type TriggerStates = 'open' | 'closed' | 'hover' | 'focus' | 'error';
|
|
|
6
6
|
export type SingleSelectItemStates = 'default' | 'hover' | 'active' | 'focus' | 'focusVisible' | 'disabled' | 'selected';
|
|
7
7
|
export type MultiSelectTokensType = {
|
|
8
8
|
trigger: {
|
|
9
|
-
height:
|
|
9
|
+
height: {
|
|
10
|
+
[key in MultiSelectMenuSize]: CSSObject['height'];
|
|
11
|
+
};
|
|
10
12
|
paddingX: {
|
|
11
13
|
[key in MultiSelectMenuSize]: CSSObject['padding'];
|
|
12
14
|
};
|
|
@@ -23,6 +25,9 @@ export type MultiSelectTokensType = {
|
|
|
23
25
|
container: {
|
|
24
26
|
[key in TriggerStates]: CSSObject['backgroundColor'];
|
|
25
27
|
};
|
|
28
|
+
'no-container': {
|
|
29
|
+
[key in TriggerStates]: CSSObject['backgroundColor'];
|
|
30
|
+
};
|
|
26
31
|
};
|
|
27
32
|
outline: {
|
|
28
33
|
[key in MultiSelectVariant]: {
|
|
@@ -76,6 +81,21 @@ export type MultiSelectTokensType = {
|
|
|
76
81
|
margin: CSSObject['margin'];
|
|
77
82
|
};
|
|
78
83
|
};
|
|
84
|
+
drawer: {
|
|
85
|
+
header: {
|
|
86
|
+
paddingX: CSSObject['padding'];
|
|
87
|
+
paddingBottom: CSSObject['padding'];
|
|
88
|
+
borderBottom: CSSObject['borderBottom'];
|
|
89
|
+
};
|
|
90
|
+
search: {
|
|
91
|
+
paddingX: CSSObject['padding'];
|
|
92
|
+
marginTop: CSSObject['margin'];
|
|
93
|
+
marginBottom: CSSObject['margin'];
|
|
94
|
+
};
|
|
95
|
+
content: {
|
|
96
|
+
gap: CSSObject['gap'];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
79
99
|
};
|
|
80
100
|
export type ResponsiveMultiSelectTokens = {
|
|
81
101
|
[key in keyof BreakpointType]: MultiSelectTokensType;
|
|
@@ -61,6 +61,7 @@ export type MultiSelectProps = {
|
|
|
61
61
|
searchPlaceholder?: string;
|
|
62
62
|
enableSelectAll?: boolean;
|
|
63
63
|
selectAllText?: string;
|
|
64
|
+
customTrigger?: React.ReactNode;
|
|
64
65
|
useDrawerOnMobile?: boolean;
|
|
65
66
|
minWidth?: number;
|
|
66
67
|
maxWidth?: number;
|
|
@@ -74,6 +75,21 @@ export type MultiSelectProps = {
|
|
|
74
75
|
onFocus?: () => void;
|
|
75
76
|
error?: boolean;
|
|
76
77
|
errorMessage?: string;
|
|
78
|
+
showActionButtons?: boolean;
|
|
79
|
+
primaryAction?: {
|
|
80
|
+
text: string;
|
|
81
|
+
onClick: () => void;
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
loading?: boolean;
|
|
84
|
+
};
|
|
85
|
+
secondaryAction?: {
|
|
86
|
+
text: string;
|
|
87
|
+
onClick: () => void;
|
|
88
|
+
disabled?: boolean;
|
|
89
|
+
loading?: boolean;
|
|
90
|
+
};
|
|
91
|
+
showItemDividers?: boolean;
|
|
92
|
+
showHeaderBorder?: boolean;
|
|
77
93
|
};
|
|
78
94
|
export type MultiSelectMenuProps = {
|
|
79
95
|
items: MultiSelectMenuGroupType[];
|
|
@@ -95,4 +111,17 @@ export type MultiSelectMenuProps = {
|
|
|
95
111
|
alignOffset?: number;
|
|
96
112
|
open: boolean;
|
|
97
113
|
onOpenChange: (open: boolean) => void;
|
|
114
|
+
showActionButtons?: boolean;
|
|
115
|
+
primaryAction?: {
|
|
116
|
+
text: string;
|
|
117
|
+
onClick: () => void;
|
|
118
|
+
disabled?: boolean;
|
|
119
|
+
loading?: boolean;
|
|
120
|
+
};
|
|
121
|
+
secondaryAction?: {
|
|
122
|
+
text: string;
|
|
123
|
+
onClick: () => void;
|
|
124
|
+
disabled?: boolean;
|
|
125
|
+
loading?: boolean;
|
|
126
|
+
};
|
|
98
127
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SingleSelectProps } from './types';
|
|
2
|
-
declare const SingleSelect: ({ label, subLabel, hintText, required, helpIconText, placeholder, error, errorMessage, size, items, name, variant, disabled, selected, onSelect, enableSearch, slot, useDrawerOnMobile, alignment, side, sideOffset, alignOffset, minWidth, maxWidth, maxHeight, onBlur, onFocus, inline, }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const SingleSelect: ({ label, subLabel, hintText, required, helpIconText, placeholder, error, errorMessage, size, items, name, variant, disabled, selected, onSelect, enableSearch, searchPlaceholder, slot, customTrigger, useDrawerOnMobile, alignment, side, sideOffset, alignOffset, minWidth, maxWidth, maxHeight, onBlur, onFocus, inline, }: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default SingleSelect;
|
|
@@ -6,7 +6,9 @@ type TriggerStates = 'open' | 'closed' | 'hover' | 'focus' | 'error';
|
|
|
6
6
|
export type SingleSelectItemStates = 'default' | 'hover' | 'active' | 'focus' | 'focusVisible' | 'disabled' | 'selected';
|
|
7
7
|
export type SingleSelectTokensType = {
|
|
8
8
|
trigger: {
|
|
9
|
-
height:
|
|
9
|
+
height: {
|
|
10
|
+
[key in SelectMenuSize]: CSSObject['height'];
|
|
11
|
+
};
|
|
10
12
|
paddingX: {
|
|
11
13
|
[key in SelectMenuSize]: CSSObject['padding'];
|
|
12
14
|
};
|
|
@@ -70,6 +72,13 @@ export type SingleSelectTokensType = {
|
|
|
70
72
|
margin: CSSObject['margin'];
|
|
71
73
|
};
|
|
72
74
|
};
|
|
75
|
+
drawer: {
|
|
76
|
+
header: {
|
|
77
|
+
paddingX: CSSObject['padding'];
|
|
78
|
+
paddingBottom: CSSObject['padding'];
|
|
79
|
+
borderBottom: CSSObject['borderBottom'];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
73
82
|
};
|
|
74
83
|
export type ResponsiveSingleSelectTokens = {
|
|
75
84
|
[key in keyof BreakpointType]: SingleSelectTokensType;
|
|
@@ -65,9 +65,11 @@ export type SingleSelectProps = {
|
|
|
65
65
|
selected: string;
|
|
66
66
|
onSelect: (value: string) => void;
|
|
67
67
|
enableSearch?: boolean;
|
|
68
|
+
searchPlaceholder?: string;
|
|
68
69
|
slot?: React.ReactNode;
|
|
69
70
|
disabled?: boolean;
|
|
70
71
|
name?: string;
|
|
72
|
+
customTrigger?: React.ReactNode;
|
|
71
73
|
useDrawerOnMobile?: boolean;
|
|
72
74
|
alignment?: SelectMenuAlignment;
|
|
73
75
|
side?: SelectMenuSide;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StatCardProps } from './types';
|
|
2
2
|
declare const StatCard: {
|
|
3
|
-
({ title, value, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ title, value, valueTooltip, change, subtitle, variant, chartData, progressValue, titleIcon, actionIcon, helpIconText, dropdownProps, maxWidth, }: StatCardProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
6
6
|
export default StatCard;
|
|
@@ -12,16 +12,17 @@ export declare enum ChangeType {
|
|
|
12
12
|
}
|
|
13
13
|
export type ChartDataPoint = {
|
|
14
14
|
value: number;
|
|
15
|
-
|
|
16
|
-
date?: string;
|
|
15
|
+
name: string;
|
|
17
16
|
};
|
|
18
17
|
export type StatCardChange = {
|
|
19
18
|
value: number;
|
|
20
19
|
valueType: ChangeType;
|
|
20
|
+
tooltip?: ReactNode;
|
|
21
21
|
};
|
|
22
22
|
export type StatCardProps = {
|
|
23
23
|
title: string;
|
|
24
24
|
value: string | number;
|
|
25
|
+
valueTooltip?: ReactNode;
|
|
25
26
|
change?: StatCardChange;
|
|
26
27
|
subtitle?: string;
|
|
27
28
|
variant: StatCardVariant;
|
|
@@ -31,4 +32,5 @@ export type StatCardProps = {
|
|
|
31
32
|
actionIcon?: ReactNode;
|
|
32
33
|
helpIconText?: string;
|
|
33
34
|
dropdownProps?: SingleSelectProps;
|
|
35
|
+
maxWidth?: string;
|
|
34
36
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { TooltipSize } from './types';
|
|
3
3
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
5
|
export type TooltipTokensType = {
|
|
5
6
|
background: CSSObject['backgroundColor'];
|
|
6
7
|
color: CSSObject['color'];
|
|
@@ -26,6 +27,7 @@ export type TooltipTokensType = {
|
|
|
26
27
|
[key in TooltipSize]: CSSObject['gap'];
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
export type ResponsiveTooltipTokens = {
|
|
31
|
+
[key in keyof BreakpointType]: TooltipTokensType;
|
|
32
|
+
};
|
|
33
|
+
export declare const getTooltipTokens: (foundationToken: FoundationTokenType) => ResponsiveTooltipTokens;
|
|
@@ -8,7 +8,7 @@ import { ResponsiveTextInputTokens } from '../components/Inputs/TextInput/textIn
|
|
|
8
8
|
import { ResponsiveNumberInputTokens } from '../components/Inputs/NumberInput/numberInput.tokens';
|
|
9
9
|
import { ResponsiveAlertTokens } from '../components/Alert/alert.tokens';
|
|
10
10
|
import { OTPInputTokensType } from '../components/Inputs/OTPInput/otpInput.tokens';
|
|
11
|
-
import {
|
|
11
|
+
import { ResponsiveTooltipTokens } from '../components/Tooltip/tooltip.tokens';
|
|
12
12
|
import { ResponsiveUnitInputTokens } from '../components/Inputs/UnitInput/unitInput.tokens';
|
|
13
13
|
import { MultiValueInputTokensType } from '../components/Inputs/MultiValueInput/multiValueInput.tokens';
|
|
14
14
|
import { ResponsiveDropdownInputTokens } from '../components/Inputs/DropdownInput/dropdownInput.tokens';
|
|
@@ -20,7 +20,7 @@ import { ResponsiveBreadcrumbTokens } from '../components/Breadcrumb/breadcrumb.
|
|
|
20
20
|
import { PopoverTokenType } from '../components/Popover/popover.tokens';
|
|
21
21
|
import { ResponsiveMenuTokensType } from '../components/Menu/menu.tokens';
|
|
22
22
|
import { ResponsiveMultiSelectTokens } from '../components/MultiSelect/multiSelect.tokens';
|
|
23
|
-
import {
|
|
23
|
+
import { ResponsiveTableTokens } from '../components/DataTable/dataTable.tokens';
|
|
24
24
|
import { ResponsiveCalendarTokens } from '../components/DateRangePicker/dateRangePicker.tokens';
|
|
25
25
|
import { ResponsiveAccordionTokens } from '../components/Accordion/accordion.tokens';
|
|
26
26
|
import { ResponsiveStatCardTokens } from '../components/StatCard/statcard.tokens';
|
|
@@ -40,7 +40,7 @@ export type ComponentTokenType = {
|
|
|
40
40
|
NUMBER_INPUT?: ResponsiveNumberInputTokens;
|
|
41
41
|
ALERT?: ResponsiveAlertTokens;
|
|
42
42
|
OTP_INPUT?: OTPInputTokensType;
|
|
43
|
-
TOOLTIP?:
|
|
43
|
+
TOOLTIP?: ResponsiveTooltipTokens;
|
|
44
44
|
UNIT_INPUT?: ResponsiveUnitInputTokens;
|
|
45
45
|
MULTI_VALUE_INPUT?: MultiValueInputTokensType;
|
|
46
46
|
DROPDOWN_INPUT?: ResponsiveDropdownInputTokens;
|
|
@@ -53,7 +53,7 @@ export type ComponentTokenType = {
|
|
|
53
53
|
MENU?: ResponsiveMenuTokensType;
|
|
54
54
|
MULTI_SELECT?: ResponsiveMultiSelectTokens;
|
|
55
55
|
SINGLE_SELECT?: ResponsiveSingleSelectTokens;
|
|
56
|
-
TABLE?:
|
|
56
|
+
TABLE?: ResponsiveTableTokens;
|
|
57
57
|
CALENDAR?: ResponsiveCalendarTokens;
|
|
58
58
|
ACCORDION?: ResponsiveAccordionTokens;
|
|
59
59
|
STAT_CARD?: ResponsiveStatCardTokens;
|