@juspay/blend-design-system 0.0.35 → 0.0.36-beta.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/dist/components/Charts/chart.tokens.d.ts +1 -1
- package/dist/components/Charts/renderChart.d.ts +1 -1
- package/dist/components/Charts/types.d.ts +5 -0
- package/dist/components/ChartsV2/ChartContainerV2.d.ts +6 -0
- package/dist/components/ChartsV2/ChartHeaderV2.d.ts +6 -0
- package/dist/components/ChartsV2/ChartV2.d.ts +3 -0
- package/dist/components/ChartsV2/ChartV2Fullscreen.d.ts +14 -0
- package/dist/components/ChartsV2/ChartV2Legend.d.ts +6 -0
- package/dist/components/ChartsV2/ChartV2NoData.d.ts +6 -0
- package/dist/components/ChartsV2/ChartV2Skeleton.d.ts +10 -0
- package/dist/components/ChartsV2/chartV2.dark.tokens.d.ts +3 -0
- package/dist/components/ChartsV2/chartV2.light.tokens.d.ts +3 -0
- package/dist/components/ChartsV2/chartV2.sankey.d.ts +1 -0
- package/dist/components/ChartsV2/chartV2.tokens.d.ts +102 -0
- package/dist/components/ChartsV2/chartV2.types.d.ts +72 -0
- package/dist/components/ChartsV2/index.d.ts +9 -0
- package/dist/components/ChartsV2/useChartLegend.d.ts +9 -0
- package/dist/components/ChartsV2/useChartLegendHover.d.ts +7 -0
- package/dist/components/ChartsV2/useChartRefs.d.ts +6 -0
- package/dist/components/ChartsV2/utils.d.ts +3 -0
- package/dist/components/Timeline/Timeline.d.ts +41 -0
- package/dist/components/Timeline/TimelineHeader.d.ts +10 -0
- package/dist/components/Timeline/TimelineLabel.d.ts +3 -0
- package/dist/components/Timeline/TimelineNode.d.ts +17 -0
- package/dist/components/Timeline/TimelineShowMore.d.ts +3 -0
- package/dist/components/Timeline/TimelineSubstep.d.ts +11 -0
- package/dist/components/Timeline/index.d.ts +8 -0
- package/dist/components/Timeline/timeline.dark.token.d.ts +8 -0
- package/dist/components/Timeline/timeline.light.token.d.ts +8 -0
- package/dist/components/Timeline/timeline.token.d.ts +132 -0
- package/dist/components/Timeline/types.d.ts +104 -0
- package/dist/components/Timeline/utils.d.ts +6 -0
- package/dist/components/common/Seperator.d.ts +4 -3
- package/dist/context/ThemeContext.d.ts +4 -0
- package/dist/context/useComponentToken.d.ts +3 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.js +30505 -27639
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSObject } from 'styled-components';
|
|
2
2
|
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
3
|
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
-
export type ChartState = 'default' | 'hover' | 'active';
|
|
4
|
+
export type ChartState = 'default' | 'hover' | 'active' | 'total';
|
|
5
5
|
export type ChartHeight = 'default' | 'fullscreen' | 'small';
|
|
6
6
|
export type ChartTokensType = {
|
|
7
7
|
border: CSSObject['border'];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RenderChartProps } from './types';
|
|
2
|
-
export declare const renderChart: ({ chartName, flattenedData, chartType, hoveredKey, lineKeys, colors, setHoveredKey, data: originalData, selectedKeys, isSmallScreen, barsize, xAxis, yAxis, tooltip, noData, height, CustomizedDot, }: RenderChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const renderChart: ({ chartName, flattenedData, chartType, hoveredKey, lineKeys, colors, setHoveredKey, data: originalData, selectedKeys, isSmallScreen, barsize, xAxis, yAxis, tooltip, noData, height, CustomizedDot, lineSeriesKeys, onKeyClick, }: RenderChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -32,6 +32,7 @@ export declare enum ChartLegendPosition {
|
|
|
32
32
|
export declare enum ChartType {
|
|
33
33
|
LINE = "line",
|
|
34
34
|
BAR = "bar",
|
|
35
|
+
LINE_BAR = "lineBar",
|
|
35
36
|
PIE = "pie",
|
|
36
37
|
SCATTER = "scatter",
|
|
37
38
|
AREA = "area",
|
|
@@ -138,6 +139,8 @@ export type RenderChartProps = {
|
|
|
138
139
|
noData?: NoDataProps;
|
|
139
140
|
height?: number | string;
|
|
140
141
|
CustomizedDot?: (props: DotItemDotProps) => React.ReactElement<SVGElement>;
|
|
142
|
+
lineSeriesKeys?: string[];
|
|
143
|
+
onKeyClick?: (key: string) => void;
|
|
141
144
|
};
|
|
142
145
|
export type CoreChartProps = {
|
|
143
146
|
chartType?: ChartType;
|
|
@@ -156,6 +159,7 @@ export type CoreChartProps = {
|
|
|
156
159
|
hoveredKey?: string | null;
|
|
157
160
|
onHoveredKeyChange?: (key: string | null) => void;
|
|
158
161
|
selectedKeys?: string[];
|
|
162
|
+
lineSeriesKeys?: string[];
|
|
159
163
|
enableHover?: boolean;
|
|
160
164
|
};
|
|
161
165
|
export type ChartsSkeletonProps = {
|
|
@@ -193,6 +197,7 @@ export type ChartsProps = {
|
|
|
193
197
|
total?: string;
|
|
194
198
|
}[];
|
|
195
199
|
CustomizedDot?: (props: DotItemDotProps) => React.ReactElement<SVGElement>;
|
|
200
|
+
lineSeriesKeys?: string[];
|
|
196
201
|
};
|
|
197
202
|
export type FlattenedDataPoint = {
|
|
198
203
|
name: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type ChartV2FullscreenControls = {
|
|
3
|
+
isFullscreen: boolean;
|
|
4
|
+
enterFullscreen: () => void;
|
|
5
|
+
exitFullscreen: () => void;
|
|
6
|
+
};
|
|
7
|
+
export interface ChartV2FullscreenProps {
|
|
8
|
+
children: (controls: ChartV2FullscreenControls) => ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const ChartV2Fullscreen: {
|
|
11
|
+
({ children }: ChartV2FullscreenProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export default ChartV2Fullscreen;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChartV2LegendProps } from './chartV2.types';
|
|
2
|
+
declare const ChartV2Legend: {
|
|
3
|
+
({ chartRef, chartRefs, customLegendItems, renderItem, layout, }: ChartV2LegendProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export default ChartV2Legend;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
2
|
+
declare const ChartV2Skeleton: {
|
|
3
|
+
({ skeletonVariant, height, isExpanded, }: {
|
|
4
|
+
skeletonVariant?: SkeletonVariant;
|
|
5
|
+
height?: number;
|
|
6
|
+
isExpanded?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default ChartV2Skeleton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
import { Theme } from '../../context/theme.enum';
|
|
5
|
+
export type ChartV2TokensType = {
|
|
6
|
+
border: CSSObject['border'];
|
|
7
|
+
borderRadius: CSSObject['borderRadius'];
|
|
8
|
+
boxShadow: CSSObject['boxShadow'];
|
|
9
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
10
|
+
header: {
|
|
11
|
+
padding: {
|
|
12
|
+
top: CSSObject['padding'];
|
|
13
|
+
right: CSSObject['padding'];
|
|
14
|
+
bottom: CSSObject['padding'];
|
|
15
|
+
left: CSSObject['padding'];
|
|
16
|
+
};
|
|
17
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
18
|
+
borderBottom: CSSObject['borderBottom'];
|
|
19
|
+
};
|
|
20
|
+
legends: {
|
|
21
|
+
gap: CSSObject['gap'];
|
|
22
|
+
legendItem: {
|
|
23
|
+
gap: CSSObject['gap'];
|
|
24
|
+
shape: {
|
|
25
|
+
width: CSSObject['width'];
|
|
26
|
+
height: CSSObject['height'];
|
|
27
|
+
borderRadius: CSSObject['borderRadius'];
|
|
28
|
+
};
|
|
29
|
+
text: {
|
|
30
|
+
gap: CSSObject['gap'];
|
|
31
|
+
name: {
|
|
32
|
+
fontSize: CSSObject['fontSize'];
|
|
33
|
+
fontWeight: CSSObject['fontWeight'];
|
|
34
|
+
lineHeight: CSSObject['lineHeight'];
|
|
35
|
+
color: CSSObject['color'];
|
|
36
|
+
};
|
|
37
|
+
value: {
|
|
38
|
+
fontSize: CSSObject['fontSize'];
|
|
39
|
+
fontWeight: CSSObject['fontWeight'];
|
|
40
|
+
lineHeight: CSSObject['lineHeight'];
|
|
41
|
+
color: CSSObject['color'];
|
|
42
|
+
};
|
|
43
|
+
separator: {
|
|
44
|
+
color: CSSObject['color'];
|
|
45
|
+
width: CSSObject['width'];
|
|
46
|
+
height: CSSObject['height'];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
chart: {
|
|
52
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
53
|
+
xAxis: {
|
|
54
|
+
title: {
|
|
55
|
+
fontSize: CSSObject['fontSize'];
|
|
56
|
+
color: CSSObject['color'];
|
|
57
|
+
fontWeight: CSSObject['fontWeight'];
|
|
58
|
+
lineHeight: CSSObject['lineHeight'];
|
|
59
|
+
};
|
|
60
|
+
labels: {
|
|
61
|
+
fontSize: CSSObject['fontSize'];
|
|
62
|
+
color: CSSObject['color'];
|
|
63
|
+
fontWeight: CSSObject['fontWeight'];
|
|
64
|
+
lineHeight: CSSObject['lineHeight'];
|
|
65
|
+
};
|
|
66
|
+
line: {
|
|
67
|
+
width: CSSObject['width'];
|
|
68
|
+
color: CSSObject['color'];
|
|
69
|
+
};
|
|
70
|
+
gridLine: {
|
|
71
|
+
width: CSSObject['width'];
|
|
72
|
+
color: CSSObject['color'];
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
yAxis: {
|
|
76
|
+
title: {
|
|
77
|
+
fontSize: CSSObject['fontSize'];
|
|
78
|
+
color: CSSObject['color'];
|
|
79
|
+
fontWeight: CSSObject['fontWeight'];
|
|
80
|
+
lineHeight: CSSObject['lineHeight'];
|
|
81
|
+
};
|
|
82
|
+
labels: {
|
|
83
|
+
fontSize: CSSObject['fontSize'];
|
|
84
|
+
color: CSSObject['color'];
|
|
85
|
+
fontWeight: CSSObject['fontWeight'];
|
|
86
|
+
lineHeight: CSSObject['lineHeight'];
|
|
87
|
+
};
|
|
88
|
+
line: {
|
|
89
|
+
width: CSSObject['width'];
|
|
90
|
+
color: CSSObject['color'];
|
|
91
|
+
};
|
|
92
|
+
gridLine: {
|
|
93
|
+
width: CSSObject['width'];
|
|
94
|
+
color: CSSObject['color'];
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
export type ResponsiveChartV2Tokens = {
|
|
100
|
+
[key in keyof BreakpointType]: ChartV2TokensType;
|
|
101
|
+
};
|
|
102
|
+
export declare const getChartV2Tokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveChartV2Tokens;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { RefObject, ReactNode } from 'react';
|
|
2
|
+
import { HighchartsReactProps, HighchartsReactRefObject } from 'highcharts-react-official';
|
|
3
|
+
import { default as Highcharts } from 'highcharts';
|
|
4
|
+
import { ButtonProps } from '../Button';
|
|
5
|
+
import { SkeletonVariant } from '../Skeleton';
|
|
6
|
+
export declare const ChartV2BaseInstance: typeof Highcharts;
|
|
7
|
+
export type ChartV2Type = typeof Highcharts;
|
|
8
|
+
export type ChartV2ReactProps = HighchartsReactProps;
|
|
9
|
+
export type ChartV2SkeletonProps = {
|
|
10
|
+
show: boolean;
|
|
11
|
+
variant?: SkeletonVariant;
|
|
12
|
+
height?: number;
|
|
13
|
+
};
|
|
14
|
+
export type ChartV2NoDataProps = {
|
|
15
|
+
title?: string;
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
slot?: ReactNode;
|
|
18
|
+
button?: ButtonProps;
|
|
19
|
+
};
|
|
20
|
+
export type ChartV2Props = Omit<ChartV2ReactProps, 'className' | 'style'> & {
|
|
21
|
+
highcharts?: ChartV2Type;
|
|
22
|
+
skeleton?: ChartV2SkeletonProps;
|
|
23
|
+
noData?: ChartV2NoDataProps;
|
|
24
|
+
};
|
|
25
|
+
export type ChartV2Options = Highcharts.Options;
|
|
26
|
+
export type ChartV2SeriesOptionsType = Highcharts.SeriesOptionsType;
|
|
27
|
+
export type ChartV2SeriesLineOptions = Highcharts.SeriesLineOptions;
|
|
28
|
+
export type ChartV2SeriesColumnOptions = Highcharts.SeriesColumnOptions;
|
|
29
|
+
export type ChartV2SeriesBarOptions = Highcharts.SeriesBarOptions;
|
|
30
|
+
export type ChartV2SeriesPieOptions = Highcharts.SeriesPieOptions;
|
|
31
|
+
export type ChartV2SeriesScatterOptions = Highcharts.SeriesScatterOptions;
|
|
32
|
+
export type ChartV2SeriesSankeyOptions = Highcharts.SeriesSankeyOptions;
|
|
33
|
+
export type ChartV2SeriesAreaOptions = Highcharts.SeriesAreaOptions;
|
|
34
|
+
export type ChartV2SeriesXrangeOptions = Highcharts.SeriesXrangeOptions;
|
|
35
|
+
export type ChartV2Point = Highcharts.Point;
|
|
36
|
+
export type ChartV2PointMarkerOptionsObject = Highcharts.PointMarkerOptionsObject;
|
|
37
|
+
export type ChartV2XAxisOptions = Highcharts.XAxisOptions;
|
|
38
|
+
export type ChartV2YAxisOptions = Highcharts.YAxisOptions;
|
|
39
|
+
export type ChartV2 = Highcharts.Chart;
|
|
40
|
+
export type ChartV2Axis = Highcharts.Axis;
|
|
41
|
+
export type ChartV2Series = Highcharts.Series;
|
|
42
|
+
export type ChartV2SeriesZonesOptionsObject = Highcharts.SeriesZonesOptionsObject;
|
|
43
|
+
export type ChartV2ReactRefObject = HighchartsReactRefObject;
|
|
44
|
+
export interface ChartV2ContainerProps {
|
|
45
|
+
children: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
export interface ChartV2HeaderProps {
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export type ChartV2LegendItem = Highcharts.Series | Highcharts.Point;
|
|
51
|
+
export interface ChartV2CustomLegendItem {
|
|
52
|
+
key: string;
|
|
53
|
+
name: string;
|
|
54
|
+
color?: string;
|
|
55
|
+
value?: string | number;
|
|
56
|
+
}
|
|
57
|
+
export interface ChartV2LegendProps {
|
|
58
|
+
/** Single chart ref (use when legend controls one chart). */
|
|
59
|
+
chartRef?: RefObject<ChartV2ReactRefObject | null>;
|
|
60
|
+
/** Multiple chart refs (use for shared legend; visibility and hover sync across all). */
|
|
61
|
+
chartRefs?: ReadonlyArray<RefObject<ChartV2ReactRefObject | null>>;
|
|
62
|
+
customLegendItems?: ChartV2CustomLegendItem[];
|
|
63
|
+
renderItem?: (params: {
|
|
64
|
+
item: ChartV2LegendItem;
|
|
65
|
+
name: string;
|
|
66
|
+
visible: boolean;
|
|
67
|
+
color: string;
|
|
68
|
+
value?: string | number;
|
|
69
|
+
onClick: () => void;
|
|
70
|
+
}) => ReactNode;
|
|
71
|
+
layout?: 'horizontal' | 'vertical';
|
|
72
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as ChartV2 } from './ChartV2';
|
|
2
|
+
export { default as ChartV2Legend } from './ChartV2Legend';
|
|
3
|
+
export { default as ChartContainerV2 } from './ChartContainerV2';
|
|
4
|
+
export { default as ChartHeaderV2 } from './ChartHeaderV2';
|
|
5
|
+
export { default as ChartV2Fullscreen } from './ChartV2Fullscreen';
|
|
6
|
+
export { default as ChartV2Skeleton } from './ChartV2Skeleton';
|
|
7
|
+
export { default as ChartV2NoData } from './ChartV2NoData';
|
|
8
|
+
export * from './chartV2.tokens';
|
|
9
|
+
export * from './chartV2.types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChartV2LegendProps } from './chartV2.types';
|
|
2
|
+
export declare function useChartLegend(chartRef: ChartV2LegendProps['chartRef'], chartRefs: ChartV2LegendProps['chartRefs']): {
|
|
3
|
+
hoveredItem: import('./chartV2.types').ChartV2LegendItem | null;
|
|
4
|
+
setHoveredItem: import('react').Dispatch<import('react').SetStateAction<import('./chartV2.types').ChartV2LegendItem | null>>;
|
|
5
|
+
allItems: import('./chartV2.types').ChartV2LegendItem[];
|
|
6
|
+
handleClick: (item: import('./chartV2.types').ChartV2LegendItem, itemIndex: number) => void;
|
|
7
|
+
chart: import('highcharts').Chart;
|
|
8
|
+
charts: import('highcharts').Chart[];
|
|
9
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChartV2, ChartV2LegendItem } from './chartV2.types';
|
|
2
|
+
export declare const useChartLegendHover: (chart: ChartV2 | null, charts: ChartV2[]) => {
|
|
3
|
+
hoveredItem: ChartV2LegendItem | null;
|
|
4
|
+
setHoveredItem: import('react').Dispatch<import('react').SetStateAction<ChartV2LegendItem | null>>;
|
|
5
|
+
allItems: ChartV2LegendItem[];
|
|
6
|
+
handleClick: (item: ChartV2LegendItem, itemIndex: number) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
declare const Timeline: import('react').ForwardRefExoticComponent<{
|
|
2
|
+
children: import('react').ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
} & Omit<import('react').HTMLAttributes<HTMLDivElement>, "style" | "className" | "children"> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
5
|
+
Label: import('react').ForwardRefExoticComponent<import('./types').TimelineLabelProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Header: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
title: string;
|
|
8
|
+
status?: import('./types').TimelineNodeStatus;
|
|
9
|
+
timestamp?: string;
|
|
10
|
+
children?: import('react').ReactNode;
|
|
11
|
+
leftSlot?: import('react').ReactNode;
|
|
12
|
+
rightSlot?: import('react').ReactNode;
|
|
13
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Substep: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
15
|
+
title: string;
|
|
16
|
+
isNestedUnderHeader?: boolean;
|
|
17
|
+
showIndicator?: boolean;
|
|
18
|
+
description?: string;
|
|
19
|
+
timestamp?: string;
|
|
20
|
+
rightSlot?: import('react').ReactNode;
|
|
21
|
+
datetimeLeftSlot?: import('react').ReactNode;
|
|
22
|
+
datetimeRightSlot?: import('react').ReactNode;
|
|
23
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
24
|
+
Node: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
25
|
+
title?: string;
|
|
26
|
+
leftSlot?: import('react').ReactNode;
|
|
27
|
+
headerRightSlot?: import('react').ReactNode;
|
|
28
|
+
datetime?: string;
|
|
29
|
+
datetimeLeftSlot?: import('react').ReactNode;
|
|
30
|
+
datetimeRightSlot?: import('react').ReactNode;
|
|
31
|
+
text?: string;
|
|
32
|
+
maxLines?: number;
|
|
33
|
+
user?: import('./types').TimelineUser;
|
|
34
|
+
avatarProps?: Partial<Omit<import('../AvatarV2').AvatarV2Props, "src" | "fallbackText">>;
|
|
35
|
+
time?: string;
|
|
36
|
+
status?: import('./types').TimelineNodeStatus;
|
|
37
|
+
children?: import('react').ReactNode;
|
|
38
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
|
+
ShowMore: import('react').ForwardRefExoticComponent<import('./types').TimelineShowMoreProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
40
|
+
};
|
|
41
|
+
export default Timeline;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TimelineNodeStatus } from './types';
|
|
2
|
+
declare const TimelineHeader: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
title: string;
|
|
4
|
+
status?: TimelineNodeStatus;
|
|
5
|
+
timestamp?: string;
|
|
6
|
+
children?: import('react').ReactNode;
|
|
7
|
+
leftSlot?: import('react').ReactNode;
|
|
8
|
+
rightSlot?: import('react').ReactNode;
|
|
9
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default TimelineHeader;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TimelineNodeStatus } from './types';
|
|
2
|
+
declare const TimelineNode: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
title?: string;
|
|
4
|
+
leftSlot?: import('react').ReactNode;
|
|
5
|
+
headerRightSlot?: import('react').ReactNode;
|
|
6
|
+
datetime?: string;
|
|
7
|
+
datetimeLeftSlot?: import('react').ReactNode;
|
|
8
|
+
datetimeRightSlot?: import('react').ReactNode;
|
|
9
|
+
text?: string;
|
|
10
|
+
maxLines?: number;
|
|
11
|
+
user?: import('./types').TimelineUser;
|
|
12
|
+
avatarProps?: Partial<Omit<import('../AvatarV2').AvatarV2Props, "src" | "fallbackText">>;
|
|
13
|
+
time?: string;
|
|
14
|
+
status?: TimelineNodeStatus;
|
|
15
|
+
children?: import('react').ReactNode;
|
|
16
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export default TimelineNode;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const TimelineSubstep: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
2
|
+
title: string;
|
|
3
|
+
isNestedUnderHeader?: boolean;
|
|
4
|
+
showIndicator?: boolean;
|
|
5
|
+
description?: string;
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
rightSlot?: import('react').ReactNode;
|
|
8
|
+
datetimeLeftSlot?: import('react').ReactNode;
|
|
9
|
+
datetimeRightSlot?: import('react').ReactNode;
|
|
10
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default TimelineSubstep;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Timeline } from './Timeline';
|
|
2
|
+
export { default as TimelineLabel } from './TimelineLabel';
|
|
3
|
+
export { default as TimelineHeader } from './TimelineHeader';
|
|
4
|
+
export { default as TimelineSubstep } from './TimelineSubstep';
|
|
5
|
+
export { default as TimelineNode } from './TimelineNode';
|
|
6
|
+
export { default as TimelineShowMore } from './TimelineShowMore';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './timeline.token';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
2
|
+
import { TimelineTokensType } from './timeline.token';
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
type ResponsiveTimelineTokens = {
|
|
5
|
+
[key in keyof BreakpointType]: TimelineTokensType;
|
|
6
|
+
};
|
|
7
|
+
export declare const getTimelineDarkTokens: (foundationToken: FoundationTokenType) => ResponsiveTimelineTokens;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
2
|
+
import { TimelineTokensType } from './timeline.token';
|
|
3
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
4
|
+
type ResponsiveTimelineTokens = {
|
|
5
|
+
[key in keyof BreakpointType]: TimelineTokensType;
|
|
6
|
+
};
|
|
7
|
+
export declare const getTimelineLightTokens: (foundationToken: FoundationTokenType) => ResponsiveTimelineTokens;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { CSSObject } from 'styled-components';
|
|
2
|
+
import { TimelineNodeStatus } from './types';
|
|
3
|
+
import { FoundationTokenType } from '../../tokens/theme.token';
|
|
4
|
+
import { BreakpointType } from '../../breakpoints/breakPoints';
|
|
5
|
+
import { Theme } from '../../context/theme.enum';
|
|
6
|
+
export type TimelineStatusColors = {
|
|
7
|
+
[key in TimelineNodeStatus]: CSSObject['backgroundColor'];
|
|
8
|
+
};
|
|
9
|
+
export type TimelineTokensType = {
|
|
10
|
+
track: {
|
|
11
|
+
width: CSSObject['width'];
|
|
12
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
13
|
+
left: CSSObject['left'];
|
|
14
|
+
};
|
|
15
|
+
indicator: {
|
|
16
|
+
left: CSSObject['left'];
|
|
17
|
+
width: CSSObject['width'];
|
|
18
|
+
height: CSSObject['height'];
|
|
19
|
+
};
|
|
20
|
+
statusColors: TimelineStatusColors;
|
|
21
|
+
label: {
|
|
22
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
23
|
+
marginBottom: CSSObject['marginBottom'];
|
|
24
|
+
circle: {
|
|
25
|
+
left: CSSObject['left'];
|
|
26
|
+
width: CSSObject['width'];
|
|
27
|
+
height: CSSObject['height'];
|
|
28
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
29
|
+
border: CSSObject['border'];
|
|
30
|
+
};
|
|
31
|
+
mask: {
|
|
32
|
+
backgroundColor: CSSObject['backgroundColor'];
|
|
33
|
+
height: CSSObject['height'];
|
|
34
|
+
};
|
|
35
|
+
text: {
|
|
36
|
+
fontSize: CSSObject['fontSize'];
|
|
37
|
+
fontWeight: CSSObject['fontWeight'];
|
|
38
|
+
color: CSSObject['color'];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
header: {
|
|
42
|
+
row: {
|
|
43
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
44
|
+
marginBottom: CSSObject['marginBottom'];
|
|
45
|
+
gap: CSSObject['gap'];
|
|
46
|
+
};
|
|
47
|
+
section: {
|
|
48
|
+
marginBottom: CSSObject['marginBottom'];
|
|
49
|
+
};
|
|
50
|
+
title: {
|
|
51
|
+
fontSize: CSSObject['fontSize'];
|
|
52
|
+
fontWeight: CSSObject['fontWeight'];
|
|
53
|
+
color: CSSObject['color'];
|
|
54
|
+
};
|
|
55
|
+
timestamp: {
|
|
56
|
+
fontSize: CSSObject['fontSize'];
|
|
57
|
+
color: CSSObject['color'];
|
|
58
|
+
gap: CSSObject['gap'];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
subsection: {
|
|
62
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
63
|
+
marginTop: CSSObject['marginTop'];
|
|
64
|
+
marginBottom: CSSObject['marginBottom'];
|
|
65
|
+
marginLeft: CSSObject['marginLeft'];
|
|
66
|
+
rootIndicator: {
|
|
67
|
+
top: CSSObject['top'];
|
|
68
|
+
};
|
|
69
|
+
headerRow: {
|
|
70
|
+
gap: CSSObject['gap'];
|
|
71
|
+
};
|
|
72
|
+
titleRow: {
|
|
73
|
+
gap: CSSObject['gap'];
|
|
74
|
+
};
|
|
75
|
+
datetimeGroup: {
|
|
76
|
+
gap: CSSObject['gap'];
|
|
77
|
+
};
|
|
78
|
+
title: {
|
|
79
|
+
fontSize: CSSObject['fontSize'];
|
|
80
|
+
fontWeight: CSSObject['fontWeight'];
|
|
81
|
+
color: CSSObject['color'];
|
|
82
|
+
gap: CSSObject['gap'];
|
|
83
|
+
};
|
|
84
|
+
description: {
|
|
85
|
+
fontSize: CSSObject['fontSize'];
|
|
86
|
+
color: CSSObject['color'];
|
|
87
|
+
marginTop: CSSObject['marginTop'];
|
|
88
|
+
marginBottom: CSSObject['marginBottom'];
|
|
89
|
+
lineHeight: CSSObject['lineHeight'];
|
|
90
|
+
};
|
|
91
|
+
datetime: {
|
|
92
|
+
fontSize: CSSObject['fontSize'];
|
|
93
|
+
color: CSSObject['color'];
|
|
94
|
+
gap: CSSObject['gap'];
|
|
95
|
+
};
|
|
96
|
+
connector: {
|
|
97
|
+
left: CSSObject['left'];
|
|
98
|
+
width: CSSObject['width'];
|
|
99
|
+
height: CSSObject['height'];
|
|
100
|
+
color: CSSObject['color'];
|
|
101
|
+
};
|
|
102
|
+
avatar: {
|
|
103
|
+
width: CSSObject['width'];
|
|
104
|
+
height: CSSObject['height'];
|
|
105
|
+
marginTop: CSSObject['marginTop'];
|
|
106
|
+
};
|
|
107
|
+
user: {
|
|
108
|
+
fontSize: CSSObject['fontSize'];
|
|
109
|
+
color: CSSObject['color'];
|
|
110
|
+
marginLeft: CSSObject['marginLeft'];
|
|
111
|
+
};
|
|
112
|
+
time: {
|
|
113
|
+
fontSize: CSSObject['fontSize'];
|
|
114
|
+
color: CSSObject['color'];
|
|
115
|
+
};
|
|
116
|
+
separator: {
|
|
117
|
+
width: CSSObject['width'];
|
|
118
|
+
height: CSSObject['height'];
|
|
119
|
+
color: CSSObject['color'];
|
|
120
|
+
marginLeft: CSSObject['marginLeft'];
|
|
121
|
+
marginRight: CSSObject['marginRight'];
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
showMore: {
|
|
125
|
+
paddingLeft: CSSObject['paddingLeft'];
|
|
126
|
+
marginTop: CSSObject['marginTop'];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
export type ResponsiveTimelineTokens = {
|
|
130
|
+
[key in keyof BreakpointType]: TimelineTokensType;
|
|
131
|
+
};
|
|
132
|
+
export declare const getTimelineTokens: (foundationToken: FoundationTokenType, theme?: Theme | string) => ResponsiveTimelineTokens;
|