@juspay/blend-design-system 0.0.14 → 0.0.15
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/Card/Card.d.ts +3 -0
- package/dist/components/Card/CardComponents.d.ts +25 -0
- package/dist/components/Card/card.tokens.d.ts +87 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/types.d.ts +46 -0
- package/dist/components/Charts/ChartContainer.d.ts +6 -0
- package/dist/components/Charts/ChartHeader.d.ts +2 -1
- package/dist/components/Charts/ChartLegend.d.ts +2 -1
- package/dist/components/Charts/ChartUtils.d.ts +5 -4
- package/dist/components/Charts/CoreChart.d.ts +4 -0
- package/dist/components/Charts/chart.tokens.d.ts +1 -6
- package/dist/components/Charts/index.d.ts +4 -0
- package/dist/components/Charts/renderChart.d.ts +1 -1
- package/dist/components/Charts/types.d.ts +26 -0
- package/dist/components/DataTable/ColumnManager.d.ts +1 -1
- package/dist/components/DataTable/TableHeader/FilterComponents.d.ts +3 -1
- package/dist/components/DataTable/TableHeader/MobileFilterDrawer.d.ts +2 -1
- package/dist/components/DataTable/TableHeader/types.d.ts +2 -0
- package/dist/components/DataTable/types.d.ts +4 -0
- package/dist/components/Inputs/SearchInput/SearchInput.d.ts +7 -2
- package/dist/components/Inputs/SearchInput/searchInput.tokens.d.ts +4 -0
- package/dist/components/Menu/types.d.ts +10 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
- package/dist/components/MultiSelect/MultiSelectMenuItem.d.ts +3 -1
- package/dist/components/MultiSelect/MultiSelectSubMenu.d.ts +2 -1
- package/dist/components/MultiSelect/types.d.ts +3 -0
- package/dist/components/Primitives/PrimitiveInput/PrimitiveInput.d.ts +1 -0
- package/dist/components/Select/SelectItem/types.d.ts +1 -0
- package/dist/components/StatCard/types.d.ts +2 -0
- package/dist/context/ThemeContext.d.ts +2 -0
- package/dist/context/useComponentToken.d.ts +2 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +16807 -15516
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CardVariant, CardProps } from './types';
|
|
3
|
+
import { CardTokenType } from './card.tokens';
|
|
4
|
+
type CardComponentProps = {
|
|
5
|
+
props: Extract<CardProps, {
|
|
6
|
+
variant?: CardVariant.DEFAULT;
|
|
7
|
+
}>;
|
|
8
|
+
cardToken: CardTokenType;
|
|
9
|
+
};
|
|
10
|
+
type AlignedCardComponentProps = {
|
|
11
|
+
props: Extract<CardProps, {
|
|
12
|
+
variant: CardVariant.ALIGNED;
|
|
13
|
+
}>;
|
|
14
|
+
cardToken: CardTokenType;
|
|
15
|
+
};
|
|
16
|
+
type CustomCardComponentProps = {
|
|
17
|
+
props: Extract<CardProps, {
|
|
18
|
+
variant: CardVariant.CUSTOM;
|
|
19
|
+
}>;
|
|
20
|
+
cardToken: CardTokenType;
|
|
21
|
+
};
|
|
22
|
+
export declare const DefaultCard: React.FC<CardComponentProps>;
|
|
23
|
+
export declare const AlignedCard: React.FC<AlignedCardComponentProps>;
|
|
24
|
+
export declare const CustomCard: React.FC<CustomCardComponentProps>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { CardAlignment } from './types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
export type CardState = 'default' | 'hover';
|
|
6
|
+
export type CardTokenType = {
|
|
7
|
+
maxWidth: CSSObject['maxWidth'];
|
|
8
|
+
borderRadius: CSSObject['borderRadius'];
|
|
9
|
+
boxShadow: CSSObject['boxShadow'];
|
|
10
|
+
padding: CSSObject['padding'];
|
|
11
|
+
border: CSSObject['border'];
|
|
12
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
13
|
+
header: {
|
|
14
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
15
|
+
padding: CSSObject['padding'];
|
|
16
|
+
borderBottom: CSSObject['borderBottom'];
|
|
17
|
+
borderRadius: CSSObject['borderRadius'];
|
|
18
|
+
title: {
|
|
19
|
+
fontSize: CSSObject['fontSize'];
|
|
20
|
+
fontWeight: CSSObject['fontWeight'];
|
|
21
|
+
color: CSSObject['color'];
|
|
22
|
+
};
|
|
23
|
+
tag: {
|
|
24
|
+
gap: CSSObject['gap'];
|
|
25
|
+
};
|
|
26
|
+
subHeader: {
|
|
27
|
+
fontSize: CSSObject['fontSize'];
|
|
28
|
+
fontWeight: CSSObject['fontWeight'];
|
|
29
|
+
color: CSSObject['color'];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
body: {
|
|
33
|
+
padding: CSSObject['padding'];
|
|
34
|
+
title: {
|
|
35
|
+
fontSize: CSSObject['fontSize'];
|
|
36
|
+
fontWeight: CSSObject['fontWeight'];
|
|
37
|
+
color: CSSObject['color'];
|
|
38
|
+
};
|
|
39
|
+
content: {
|
|
40
|
+
fontSize: CSSObject['fontSize'];
|
|
41
|
+
color: CSSObject['color'];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
spacing: {
|
|
45
|
+
header: {
|
|
46
|
+
subHeader: {
|
|
47
|
+
marginTop: CSSObject['marginTop'];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
body: {
|
|
51
|
+
slot1: {
|
|
52
|
+
marginTop: CSSObject['marginTop'];
|
|
53
|
+
};
|
|
54
|
+
title: {
|
|
55
|
+
marginTop: CSSObject['marginTop'];
|
|
56
|
+
};
|
|
57
|
+
content: {
|
|
58
|
+
marginTop: CSSObject['marginTop'];
|
|
59
|
+
};
|
|
60
|
+
slot2: {
|
|
61
|
+
marginTop: CSSObject['marginTop'];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
action: {
|
|
65
|
+
inline: {
|
|
66
|
+
marginTop: CSSObject['marginTop'];
|
|
67
|
+
};
|
|
68
|
+
regular: {
|
|
69
|
+
marginTop: CSSObject['marginTop'];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
headerSlot: {
|
|
73
|
+
gap: CSSObject['gap'];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
alignment: {
|
|
77
|
+
[key in CardAlignment]: {
|
|
78
|
+
padding: CSSObject['padding'];
|
|
79
|
+
gap: CSSObject['gap'];
|
|
80
|
+
minHeight?: CSSObject['minHeight'];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
export type ResponsiveCardTokens = {
|
|
85
|
+
[key in keyof BreakpointType]: CardTokenType;
|
|
86
|
+
};
|
|
87
|
+
export declare const getCardTokens: (foundationToken: FoundationTokenType) => ResponsiveCardTokens;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonV2Props } from '../Button/types';
|
|
3
|
+
export declare enum CardVariant {
|
|
4
|
+
DEFAULT = "default",
|
|
5
|
+
ALIGNED = "aligned",
|
|
6
|
+
CUSTOM = "custom"
|
|
7
|
+
}
|
|
8
|
+
export declare enum CardAlignment {
|
|
9
|
+
VERTICAL = "vertical",
|
|
10
|
+
HORIZONTAL = "horizontal"
|
|
11
|
+
}
|
|
12
|
+
export type DefaultCardProps = {
|
|
13
|
+
variant?: CardVariant.DEFAULT;
|
|
14
|
+
headerSlot1?: ReactNode;
|
|
15
|
+
headerTitle?: string;
|
|
16
|
+
headerTag?: ReactNode;
|
|
17
|
+
headerSlot2?: ReactNode;
|
|
18
|
+
subHeader?: string;
|
|
19
|
+
bodySlot1?: ReactNode;
|
|
20
|
+
bodyTitle?: string;
|
|
21
|
+
content?: ReactNode;
|
|
22
|
+
bodySlot2?: ReactNode;
|
|
23
|
+
actionButton?: ButtonV2Props;
|
|
24
|
+
};
|
|
25
|
+
export type AlignedCardProps = {
|
|
26
|
+
variant: CardVariant.ALIGNED;
|
|
27
|
+
alignment: CardAlignment;
|
|
28
|
+
centerAlign?: boolean;
|
|
29
|
+
cardSlot?: ReactNode;
|
|
30
|
+
headerTitle?: string;
|
|
31
|
+
headerTag?: ReactNode;
|
|
32
|
+
headerSlot2?: ReactNode;
|
|
33
|
+
subHeader?: string;
|
|
34
|
+
bodySlot1?: ReactNode;
|
|
35
|
+
bodyTitle?: string;
|
|
36
|
+
content?: ReactNode;
|
|
37
|
+
actionButton?: ButtonV2Props;
|
|
38
|
+
};
|
|
39
|
+
export type CustomCardProps = {
|
|
40
|
+
variant: CardVariant.CUSTOM;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
};
|
|
43
|
+
export type CardProps = {
|
|
44
|
+
className?: string;
|
|
45
|
+
maxWidth?: string;
|
|
46
|
+
} & (DefaultCardProps | AlignedCardProps | CustomCardProps);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ChartLegendsProps } from './types';
|
|
3
|
-
|
|
3
|
+
declare const _default: React.NamedExoticComponent<ChartLegendsProps>;
|
|
4
|
+
export default _default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { NewNestedDataPoint, FlattenedDataPoint, AxisType } from './types';
|
|
1
|
+
import { NewNestedDataPoint, FlattenedDataPoint, AxisType, XAxisConfig } from './types';
|
|
2
2
|
export declare function transformNestedData(data: NewNestedDataPoint[], selectedKeys?: string[]): FlattenedDataPoint[];
|
|
3
3
|
export declare function lightenHexColor(hex: string, amount?: number): string;
|
|
4
4
|
export declare const formatNumber: (value: number | string) => string;
|
|
5
5
|
export declare const capitaliseCamelCase: (text: string) => string;
|
|
6
|
-
export declare const createSmartDateTimeFormatter: () => ((value: string | number) => string);
|
|
7
|
-
export declare const getAxisFormatterWithConfig: (axisType: AxisType, dateOnly?: boolean, smart?: boolean) => ((value: string | number) => string);
|
|
8
|
-
export declare const
|
|
6
|
+
export declare const createSmartDateTimeFormatter: (timeZone?: string, hour12?: boolean) => ((value: string | number) => string);
|
|
7
|
+
export declare const getAxisFormatterWithConfig: (axisType: AxisType, dateOnly?: boolean, smart?: boolean, timeZone?: string, hour12?: boolean) => ((value: string | number) => string);
|
|
8
|
+
export declare const createStableSmartFormatter: (xAxisConfig: XAxisConfig, flattenedData: FlattenedDataPoint[]) => ((value: string | number) => string) | undefined;
|
|
9
|
+
export declare const getAxisFormatter: (axisType: AxisType, timeZone?: string, hour12?: boolean) => ((value: string | number) => string);
|
|
@@ -39,12 +39,7 @@ export type ChartTokensType = {
|
|
|
39
39
|
minHeight: CSSObject['minHeight'];
|
|
40
40
|
};
|
|
41
41
|
content: {
|
|
42
|
-
padding:
|
|
43
|
-
[key in ChartSize]: CSSObject['padding'];
|
|
44
|
-
};
|
|
45
|
-
paddingX: {
|
|
46
|
-
[key in ChartSize]: CSSObject['padding'];
|
|
47
|
-
};
|
|
42
|
+
padding: CSSObject['padding'];
|
|
48
43
|
gap: {
|
|
49
44
|
[key in ChartSize]: CSSObject['gap'];
|
|
50
45
|
};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { default as Charts } from './Charts';
|
|
2
|
+
export { default as CoreChart } from './CoreChart';
|
|
3
|
+
export { default as ChartContainer } from './ChartContainer';
|
|
4
|
+
export { default as ChartHeader } from './ChartHeader';
|
|
5
|
+
export { default as ChartLegends } from './ChartLegend';
|
|
2
6
|
export * from './types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RenderChartProps } from './types';
|
|
2
|
-
export declare const renderChart: ({ flattenedData, chartType, hoveredKey, lineKeys, colors, setHoveredKey, data: originalData, selectedKeys, isSmallScreen, barsize, xAxis, yAxis, }: RenderChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const renderChart: ({ flattenedData, chartType, hoveredKey, lineKeys, colors, setHoveredKey, data: originalData, selectedKeys, isSmallScreen, barsize, xAxis, yAxis, noData, }: RenderChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { TooltipProps } from 'recharts';
|
|
3
3
|
import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
4
|
+
import { ButtonV2Props } from '../Button';
|
|
4
5
|
export type DataPoint = {
|
|
5
6
|
primary: {
|
|
6
7
|
label: string;
|
|
@@ -45,6 +46,12 @@ export type TickProps = {
|
|
|
45
46
|
};
|
|
46
47
|
[key: string]: unknown;
|
|
47
48
|
};
|
|
49
|
+
export type NoDataProps = {
|
|
50
|
+
title?: string;
|
|
51
|
+
subtitle?: string;
|
|
52
|
+
slot?: ReactNode;
|
|
53
|
+
button?: ButtonV2Props;
|
|
54
|
+
};
|
|
48
55
|
export type AxisConfig = {
|
|
49
56
|
label?: string;
|
|
50
57
|
showLabel?: boolean;
|
|
@@ -55,6 +62,8 @@ export type AxisConfig = {
|
|
|
55
62
|
customTick?: React.ComponentType<TickProps>;
|
|
56
63
|
dateOnly?: boolean;
|
|
57
64
|
smart?: boolean;
|
|
65
|
+
timeZone?: string;
|
|
66
|
+
hour12?: boolean;
|
|
58
67
|
};
|
|
59
68
|
export type XAxisConfig = AxisConfig;
|
|
60
69
|
export type YAxisConfig = AxisConfig;
|
|
@@ -82,6 +91,22 @@ export type RenderChartProps = {
|
|
|
82
91
|
barsize?: number;
|
|
83
92
|
xAxis?: XAxisConfig;
|
|
84
93
|
yAxis?: YAxisConfig;
|
|
94
|
+
noData?: NoDataProps;
|
|
95
|
+
};
|
|
96
|
+
export type CoreChartProps = {
|
|
97
|
+
chartType?: ChartType;
|
|
98
|
+
data: NewNestedDataPoint[];
|
|
99
|
+
colors?: string[];
|
|
100
|
+
barsize?: number;
|
|
101
|
+
xAxis?: XAxisConfig;
|
|
102
|
+
yAxis?: YAxisConfig;
|
|
103
|
+
height?: number | string;
|
|
104
|
+
width?: number | string;
|
|
105
|
+
isSmallScreen?: boolean;
|
|
106
|
+
hoveredKey?: string | null;
|
|
107
|
+
onHoveredKeyChange?: (key: string | null) => void;
|
|
108
|
+
selectedKeys?: string[];
|
|
109
|
+
enableHover?: boolean;
|
|
85
110
|
};
|
|
86
111
|
export type ChartsProps = {
|
|
87
112
|
chartType?: ChartType;
|
|
@@ -97,6 +122,7 @@ export type ChartsProps = {
|
|
|
97
122
|
barsize?: number;
|
|
98
123
|
xAxis?: XAxisConfig;
|
|
99
124
|
yAxis?: YAxisConfig;
|
|
125
|
+
noData?: NoDataProps;
|
|
100
126
|
};
|
|
101
127
|
export type FlattenedDataPoint = {
|
|
102
128
|
name: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColumnManagerProps } from './types';
|
|
2
2
|
export declare const ColumnManager: {
|
|
3
|
-
<T extends Record<string, unknown>>({ columns, visibleColumns, onColumnChange, }: ColumnManagerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
<T extends Record<string, unknown>>({ columns, visibleColumns, onColumnChange, maxSelections, alwaysSelectedColumns, }: ColumnManagerProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ColumnDefinition } from '../types';
|
|
3
3
|
import { TableTokenType } from '../dataTable.tokens';
|
|
4
|
-
import { SortHandlers, FilterHandlers, FilterState, ColumnFilterHandler } from './handlers';
|
|
4
|
+
import { SortHandlers, FilterHandlers, FilterState, ColumnFilterHandler, SortState } from './handlers';
|
|
5
5
|
type FilterComponentsProps = {
|
|
6
6
|
column: ColumnDefinition<Record<string, unknown>>;
|
|
7
7
|
data?: Record<string, unknown>[];
|
|
@@ -9,6 +9,7 @@ type FilterComponentsProps = {
|
|
|
9
9
|
sortHandlers: SortHandlers;
|
|
10
10
|
filterHandlers: FilterHandlers;
|
|
11
11
|
filterState: FilterState;
|
|
12
|
+
sortState: SortState;
|
|
12
13
|
onColumnFilter?: ColumnFilterHandler;
|
|
13
14
|
onPopoverClose?: () => void;
|
|
14
15
|
};
|
|
@@ -16,6 +17,7 @@ export declare const SortOptions: React.FC<{
|
|
|
16
17
|
fieldKey: string;
|
|
17
18
|
tableToken: TableTokenType;
|
|
18
19
|
sortHandlers: SortHandlers;
|
|
20
|
+
sortState: SortState;
|
|
19
21
|
}>;
|
|
20
22
|
export declare const DropdownSearchSection: React.FC<{
|
|
21
23
|
column: ColumnDefinition<Record<string, unknown>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ColumnDefinition } from '../types';
|
|
3
3
|
import { TableTokenType } from '../dataTable.tokens';
|
|
4
|
-
import { SortHandlers, FilterHandlers, FilterState, ColumnFilterHandler } from './handlers';
|
|
4
|
+
import { SortHandlers, FilterHandlers, FilterState, ColumnFilterHandler, SortState } from './handlers';
|
|
5
5
|
type MobileFilterDrawerProps = {
|
|
6
6
|
column: ColumnDefinition<Record<string, unknown>>;
|
|
7
7
|
data?: Record<string, unknown>[];
|
|
@@ -9,6 +9,7 @@ type MobileFilterDrawerProps = {
|
|
|
9
9
|
sortHandlers: SortHandlers;
|
|
10
10
|
filterHandlers: FilterHandlers;
|
|
11
11
|
filterState: FilterState;
|
|
12
|
+
sortState: SortState;
|
|
12
13
|
onColumnFilter?: ColumnFilterHandler;
|
|
13
14
|
onPopoverClose?: () => void;
|
|
14
15
|
};
|
|
@@ -7,6 +7,8 @@ export type TableHeaderProps<T extends Record<string, unknown>> = {
|
|
|
7
7
|
selectAll: boolean | 'indeterminate';
|
|
8
8
|
enableInlineEdit?: boolean;
|
|
9
9
|
enableColumnManager?: boolean;
|
|
10
|
+
columnManagerMaxSelections?: number;
|
|
11
|
+
columnManagerAlwaysSelected?: string[];
|
|
10
12
|
enableRowExpansion?: boolean;
|
|
11
13
|
enableRowSelection?: boolean;
|
|
12
14
|
rowActions?: RowActionsConfig<T>;
|
|
@@ -85,6 +85,8 @@ export type ColumnManagerProps<T extends Record<string, unknown>> = {
|
|
|
85
85
|
columns: ColumnDefinition<T>[];
|
|
86
86
|
visibleColumns: ColumnDefinition<T>[];
|
|
87
87
|
onColumnChange: (columns: ColumnDefinition<T>[]) => void;
|
|
88
|
+
maxSelections?: number;
|
|
89
|
+
alwaysSelectedColumns?: string[];
|
|
88
90
|
};
|
|
89
91
|
export type AdvancedFilterProps = {
|
|
90
92
|
filters: unknown[];
|
|
@@ -219,6 +221,8 @@ export type DataTableProps<T extends Record<string, unknown>> = {
|
|
|
219
221
|
onAdvancedFiltersChange?: (filters: unknown[]) => void;
|
|
220
222
|
columnFreeze?: number;
|
|
221
223
|
enableColumnManager?: boolean;
|
|
224
|
+
columnManagerMaxSelections?: number;
|
|
225
|
+
columnManagerAlwaysSelected?: (keyof T)[];
|
|
222
226
|
pagination?: PaginationConfig;
|
|
223
227
|
serverSidePagination?: boolean;
|
|
224
228
|
onPageChange?: (page: number) => void;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare const SearchInput: import('react').ForwardRefExoticComponent<{
|
|
2
|
+
leftSlot?: React.ReactNode;
|
|
3
|
+
rightSlot?: React.ReactNode;
|
|
4
|
+
error?: boolean;
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
} & Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "size" | "style" | "className"> & import('react').RefAttributes<HTMLInputElement>>;
|
|
3
8
|
export default SearchInput;
|
|
@@ -35,6 +35,10 @@ export type SearchInputTokensType = {
|
|
|
35
35
|
};
|
|
36
36
|
outline: CSSObject['outline'];
|
|
37
37
|
boxShadow: CSSObject['boxShadow'];
|
|
38
|
+
color: CSSObject['color'];
|
|
39
|
+
fontSize: CSSObject['fontSize'];
|
|
40
|
+
fontWeight: CSSObject['fontWeight'];
|
|
41
|
+
placeholderColor: CSSObject['color'];
|
|
38
42
|
};
|
|
39
43
|
declare const searchInputTokens: Readonly<SearchInputTokensType>;
|
|
40
44
|
export declare const getSearchInputTokens: (foundationTokens: FoundationTokenType) => SearchInputTokensType;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TooltipSide, TooltipAlign, TooltipSize } from '../Tooltip/types';
|
|
1
2
|
export declare enum MenuAlignment {
|
|
2
3
|
START = "start",
|
|
3
4
|
CENTER = "center",
|
|
@@ -47,6 +48,15 @@ export type MenuItemV2Type = {
|
|
|
47
48
|
disabled?: boolean;
|
|
48
49
|
onClick?: () => void;
|
|
49
50
|
subMenu?: MenuItemV2Type[];
|
|
51
|
+
tooltip?: string | React.ReactNode;
|
|
52
|
+
tooltipProps?: {
|
|
53
|
+
side?: TooltipSide;
|
|
54
|
+
align?: TooltipAlign;
|
|
55
|
+
size?: TooltipSize;
|
|
56
|
+
showArrow?: boolean;
|
|
57
|
+
delayDuration?: number;
|
|
58
|
+
offset?: number;
|
|
59
|
+
};
|
|
50
60
|
};
|
|
51
61
|
export type MenuV2GroupType = {
|
|
52
62
|
label?: string;
|
|
@@ -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, 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;
|
|
2
|
+
declare const MultiSelect: ({ selectedValues, onChange, items, label, sublabel, disabled, helpIconHintText, name, required, variant, selectionTagType, slot, hintText, placeholder, size, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, 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, showActionButtons, primaryAction, secondaryAction, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const MultiSelectMenu: ({ items, selected, onSelect, trigger, minWidth, maxWidth, maxHeight, disabled, enableSearch, searchPlaceholder, enableSelectAll, selectAllText, maxSelections, onSelectAll, alignment, side, sideOffset, alignOffset, open, onOpenChange, showActionButtons, primaryAction, secondaryAction, }: MultiSelectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MultiSelectMenu;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MultiSelectMenuItemType } from './types';
|
|
2
2
|
declare const MultiSelectMenuItem: {
|
|
3
|
-
({ item, onSelect, selected, }: {
|
|
3
|
+
({ item, onSelect, selected, maxSelections, allItems, }: {
|
|
4
4
|
item: MultiSelectMenuItemType;
|
|
5
5
|
onSelect: (value: string) => void;
|
|
6
6
|
selected: string[];
|
|
7
|
+
maxSelections?: number;
|
|
8
|
+
allItems?: MultiSelectMenuItemType[];
|
|
7
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
displayName: string;
|
|
9
11
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { MultiSelectMenuItemType } from './types';
|
|
2
2
|
declare const MultiSelectSubMenu: {
|
|
3
|
-
({ item, onSelect, selected, }: {
|
|
3
|
+
({ item, onSelect, selected, maxSelections, }: {
|
|
4
4
|
item: MultiSelectMenuItemType;
|
|
5
5
|
onSelect: (value: string) => void;
|
|
6
6
|
selected: string[];
|
|
7
|
+
maxSelections?: number;
|
|
7
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
displayName: string;
|
|
9
10
|
};
|
|
@@ -33,6 +33,7 @@ export type MultiSelectMenuItemType = {
|
|
|
33
33
|
slot3?: React.ReactNode;
|
|
34
34
|
slot4?: React.ReactNode;
|
|
35
35
|
disabled?: boolean;
|
|
36
|
+
alwaysSelected?: boolean;
|
|
36
37
|
onClick?: () => void;
|
|
37
38
|
subMenu?: MultiSelectMenuItemType[];
|
|
38
39
|
tooltip?: string | React.ReactNode;
|
|
@@ -72,6 +73,7 @@ export type MultiSelectProps = {
|
|
|
72
73
|
searchPlaceholder?: string;
|
|
73
74
|
enableSelectAll?: boolean;
|
|
74
75
|
selectAllText?: string;
|
|
76
|
+
maxSelections?: number;
|
|
75
77
|
customTrigger?: React.ReactNode;
|
|
76
78
|
useDrawerOnMobile?: boolean;
|
|
77
79
|
minWidth?: number;
|
|
@@ -116,6 +118,7 @@ export type MultiSelectMenuProps = {
|
|
|
116
118
|
enableSelectAll?: boolean;
|
|
117
119
|
selectAllText?: string;
|
|
118
120
|
onSelectAll?: (selectAll: boolean) => void;
|
|
121
|
+
maxSelections?: number;
|
|
119
122
|
alignment?: MultiSelectMenuAlignment;
|
|
120
123
|
side?: MultiSelectMenuSide;
|
|
121
124
|
sideOffset?: number;
|
|
@@ -15,6 +15,7 @@ type PrimitiveInputProps = StateStyles & {
|
|
|
15
15
|
fontSize?: CSSObject['fontSize'];
|
|
16
16
|
fontWeight?: CSSObject['fontWeight'];
|
|
17
17
|
lineHeight?: CSSObject['lineHeight'];
|
|
18
|
+
placeholderColor?: CSSObject['color'];
|
|
18
19
|
position?: CSSObject['position'];
|
|
19
20
|
inset?: CSSObject['inset'];
|
|
20
21
|
top?: CSSObject['top'];
|
|
@@ -30,6 +30,7 @@ import { BreakpointType } from '../breakpoints/breakPoints';
|
|
|
30
30
|
import { ResponsiveSingleSelectTokens } from '../components/SingleSelect/singleSelect.tokens';
|
|
31
31
|
import { ResponsiveChartTokens } from '../components/Charts/chart.tokens';
|
|
32
32
|
import { ResponsiveSnackbarTokens } from '../components/Snackbar/snackbar.tokens';
|
|
33
|
+
import { ResponsiveCardTokens } from '../components/Card/card.tokens';
|
|
33
34
|
export type ComponentTokenType = {
|
|
34
35
|
TAGS?: ResponsiveTagTokens;
|
|
35
36
|
SEARCH_INPUT?: SearchInputTokensType;
|
|
@@ -61,6 +62,7 @@ export type ComponentTokenType = {
|
|
|
61
62
|
DRAWER?: DrawerTokensType;
|
|
62
63
|
CHARTS?: ResponsiveChartTokens;
|
|
63
64
|
SNACKBAR?: ResponsiveSnackbarTokens;
|
|
65
|
+
CARD?: ResponsiveCardTokens;
|
|
64
66
|
};
|
|
65
67
|
type ThemeContextType = {
|
|
66
68
|
foundationTokens: ThemeType;
|
|
@@ -29,4 +29,5 @@ import { DrawerTokensType } from '../components/Drawer/drawer.tokens';
|
|
|
29
29
|
import { ResponsiveSingleSelectTokens } from '../components/SingleSelect/singleSelect.tokens';
|
|
30
30
|
import { ResponsiveChartTokens } from '../components/Charts/chart.tokens';
|
|
31
31
|
import { ResponsiveSnackbarTokens } from '../components/Snackbar/snackbar.tokens';
|
|
32
|
-
|
|
32
|
+
import { ResponsiveCardTokens } from '../components/Card/card.tokens';
|
|
33
|
+
export declare const useComponentToken: (component: keyof ComponentTokenType) => SearchInputTokensType | ResponsiveTagTokens | ResponsiveTextAreaTokens | ResponsiveTextInputTokens | ResponsiveNumberInputTokens | ResponsiveAlertTokens | ResponsiveRadioTokens | ResponsiveOTPInputTokens | ResponsiveUnitInputTokens | MultiValueInputTokensType | ResponsiveSwitchTokens | ResponsiveCheckboxTokens | ResponsiveTabsTokens | ResponsiveTooltipTokens | ResponsiveDropdownInputTokens | ResponsiveButtonTokens | ModalTokensType | ResponsiveBreadcrumbTokens | PopoverTokenType | ResponsiveMenuTokensType | ResponsiveMultiSelectTokens | ResponsiveSingleSelectTokens | ResponsiveTableTokens | ResponsiveCalendarTokens | ResponsiveAccordionTokens | ResponsiveStatCardTokens | ProgressBarTokenType | DrawerTokensType | ResponsiveChartTokens | ResponsiveSnackbarTokens | ResponsiveCardTokens;
|
package/dist/main.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './components/Snackbar';
|
|
|
19
19
|
export * from './components/Charts';
|
|
20
20
|
export * from './components/DateRangePicker';
|
|
21
21
|
export * from './components/StatCard';
|
|
22
|
+
export * from './components/Card';
|
|
22
23
|
export * from './components/Inputs';
|
|
23
24
|
export * from './components/Menu';
|
|
24
25
|
export * from './components/DataTable';
|