@juspay/svelte-ui-components 2.31.0 → 2.32.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/AreaChart/AreaChart.svelte +421 -0
- package/dist/AreaChart/AreaChart.svelte.d.ts +4 -0
- package/dist/AreaChart/properties.d.ts +62 -0
- package/dist/AreaChart/properties.js +1 -0
- package/dist/BarChart/BarChart.svelte +372 -0
- package/dist/BarChart/BarChart.svelte.d.ts +4 -0
- package/dist/BarChart/properties.d.ts +44 -0
- package/dist/BarChart/properties.js +1 -0
- package/dist/LineChart/LineChart.svelte +361 -0
- package/dist/LineChart/LineChart.svelte.d.ts +4 -0
- package/dist/LineChart/properties.d.ts +59 -0
- package/dist/LineChart/properties.js +1 -0
- package/dist/PieChart/PieChart.svelte +236 -0
- package/dist/PieChart/PieChart.svelte.d.ts +4 -0
- package/dist/PieChart/properties.d.ts +36 -0
- package/dist/PieChart/properties.js +1 -0
- package/dist/SankeyChart/SankeyChart.svelte +312 -0
- package/dist/SankeyChart/SankeyChart.svelte.d.ts +4 -0
- package/dist/SankeyChart/properties.d.ts +52 -0
- package/dist/SankeyChart/properties.js +1 -0
- package/dist/_chart/Axis.svelte +143 -0
- package/dist/_chart/Axis.svelte.d.ts +4 -0
- package/dist/_chart/ChartContainer.svelte +81 -0
- package/dist/_chart/ChartContainer.svelte.d.ts +4 -0
- package/dist/_chart/ChartTooltip.svelte +81 -0
- package/dist/_chart/ChartTooltip.svelte.d.ts +4 -0
- package/dist/_chart/Legend.svelte +59 -0
- package/dist/_chart/Legend.svelte.d.ts +4 -0
- package/dist/_chart/colors.d.ts +4 -0
- package/dist/_chart/colors.js +36 -0
- package/dist/_chart/format.d.ts +3 -0
- package/dist/_chart/format.js +28 -0
- package/dist/_chart/geometry.d.ts +24 -0
- package/dist/_chart/geometry.js +204 -0
- package/dist/_chart/paths.d.ts +4 -0
- package/dist/_chart/paths.js +138 -0
- package/dist/_chart/scales.d.ts +5 -0
- package/dist/_chart/scales.js +77 -0
- package/dist/_chart/types.d.ts +128 -0
- package/dist/_chart/types.js +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { BarChartDataPoint } from '../BarChart/properties';
|
|
3
|
+
export type Margin = {
|
|
4
|
+
top: number;
|
|
5
|
+
right: number;
|
|
6
|
+
bottom: number;
|
|
7
|
+
left: number;
|
|
8
|
+
};
|
|
9
|
+
export type Point = {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
};
|
|
13
|
+
export type ChartDimensions = {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
margin: Margin;
|
|
17
|
+
innerWidth: number;
|
|
18
|
+
innerHeight: number;
|
|
19
|
+
};
|
|
20
|
+
export type LinearScale = {
|
|
21
|
+
(value: number): number;
|
|
22
|
+
domain: [number, number];
|
|
23
|
+
range: [number, number];
|
|
24
|
+
ticks: (count?: number) => number[];
|
|
25
|
+
invert: (pixel: number) => number;
|
|
26
|
+
};
|
|
27
|
+
export type BandScale = {
|
|
28
|
+
(label: string): number;
|
|
29
|
+
domain: string[];
|
|
30
|
+
range: [number, number];
|
|
31
|
+
bandwidth: number;
|
|
32
|
+
step: number;
|
|
33
|
+
};
|
|
34
|
+
export type CurveType = 'linear' | 'monotone' | 'step' | 'natural';
|
|
35
|
+
export type AxisOrientation = 'top' | 'right' | 'bottom' | 'left';
|
|
36
|
+
export type PieSliceLayout = {
|
|
37
|
+
index: number;
|
|
38
|
+
startAngle: number;
|
|
39
|
+
endAngle: number;
|
|
40
|
+
midAngle: number;
|
|
41
|
+
value: number;
|
|
42
|
+
percentage: number;
|
|
43
|
+
label: string;
|
|
44
|
+
color?: string;
|
|
45
|
+
};
|
|
46
|
+
export type ComputedSankeyNode = {
|
|
47
|
+
id: string;
|
|
48
|
+
label: string;
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
value: number;
|
|
54
|
+
color?: string;
|
|
55
|
+
column: number;
|
|
56
|
+
};
|
|
57
|
+
export type ComputedSankeyLink = {
|
|
58
|
+
source: string;
|
|
59
|
+
target: string;
|
|
60
|
+
value: number;
|
|
61
|
+
color?: string;
|
|
62
|
+
sourceX: number;
|
|
63
|
+
sourceY: number;
|
|
64
|
+
targetX: number;
|
|
65
|
+
targetY: number;
|
|
66
|
+
width: number;
|
|
67
|
+
path: string;
|
|
68
|
+
};
|
|
69
|
+
export type BarRect = {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
color: string;
|
|
75
|
+
si: number;
|
|
76
|
+
pi: number;
|
|
77
|
+
dataPoint: BarChartDataPoint;
|
|
78
|
+
seriesName: string;
|
|
79
|
+
};
|
|
80
|
+
export type StackedPoint = {
|
|
81
|
+
x: number;
|
|
82
|
+
y0: number;
|
|
83
|
+
y1: number;
|
|
84
|
+
};
|
|
85
|
+
export type TooltipData = {
|
|
86
|
+
title?: string;
|
|
87
|
+
items: Array<{
|
|
88
|
+
label: string;
|
|
89
|
+
value: string;
|
|
90
|
+
color?: string;
|
|
91
|
+
}>;
|
|
92
|
+
};
|
|
93
|
+
export type LegendItem = {
|
|
94
|
+
label: string;
|
|
95
|
+
color: string;
|
|
96
|
+
};
|
|
97
|
+
export type ChartContainerProperties = {
|
|
98
|
+
width?: number;
|
|
99
|
+
height?: number;
|
|
100
|
+
aspectRatio?: number;
|
|
101
|
+
minHeight?: number;
|
|
102
|
+
testId?: string;
|
|
103
|
+
classes?: string;
|
|
104
|
+
children: Snippet;
|
|
105
|
+
};
|
|
106
|
+
export type AxisProperties = {
|
|
107
|
+
orientation: AxisOrientation;
|
|
108
|
+
scale: LinearScale | BandScale;
|
|
109
|
+
tickCount?: number;
|
|
110
|
+
tickFormat?: (value: number | string) => string;
|
|
111
|
+
showGridlines?: boolean;
|
|
112
|
+
gridlineLength?: number;
|
|
113
|
+
label?: string;
|
|
114
|
+
classes?: string;
|
|
115
|
+
};
|
|
116
|
+
export type ChartTooltipProperties = {
|
|
117
|
+
data: TooltipData | null;
|
|
118
|
+
mouseX?: number;
|
|
119
|
+
mouseY?: number;
|
|
120
|
+
customSnippet?: Snippet<[TooltipData]>;
|
|
121
|
+
classes?: string;
|
|
122
|
+
};
|
|
123
|
+
export type LegendProperties = {
|
|
124
|
+
items: LegendItem[];
|
|
125
|
+
position?: 'top' | 'bottom';
|
|
126
|
+
customSnippet?: Snippet<[LegendItem[]]>;
|
|
127
|
+
classes?: string;
|
|
128
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -59,6 +59,11 @@ export { default as SplitInput } from './SplitInput/SplitInput.svelte';
|
|
|
59
59
|
export { default as FileInput } from './FileInput/FileInput.svelte';
|
|
60
60
|
export { default as DateRangePicker } from './DateRangePicker/DateRangePicker.svelte';
|
|
61
61
|
export { default as Breadcrumb } from './Breadcrumb/Breadcrumb.svelte';
|
|
62
|
+
export { default as LineChart } from './LineChart/LineChart.svelte';
|
|
63
|
+
export { default as AreaChart } from './AreaChart/AreaChart.svelte';
|
|
64
|
+
export { default as BarChart } from './BarChart/BarChart.svelte';
|
|
65
|
+
export { default as PieChart } from './PieChart/PieChart.svelte';
|
|
66
|
+
export { default as SankeyChart } from './SankeyChart/SankeyChart.svelte';
|
|
62
67
|
export type * from './Button/properties';
|
|
63
68
|
export type * from './Modal/properties';
|
|
64
69
|
export type * from './Input/properties';
|
|
@@ -114,4 +119,9 @@ export type * from './SplitInput/properties';
|
|
|
114
119
|
export type * from './FileInput/properties';
|
|
115
120
|
export type * from './DateRangePicker/properties';
|
|
116
121
|
export type * from './Breadcrumb/properties';
|
|
122
|
+
export type * from './LineChart/properties';
|
|
123
|
+
export type * from './AreaChart/properties';
|
|
124
|
+
export type * from './BarChart/properties';
|
|
125
|
+
export type * from './PieChart/properties';
|
|
126
|
+
export type * from './SankeyChart/properties';
|
|
117
127
|
export { validateInput } from './utils';
|
package/dist/index.js
CHANGED
|
@@ -59,4 +59,9 @@ export { default as SplitInput } from './SplitInput/SplitInput.svelte';
|
|
|
59
59
|
export { default as FileInput } from './FileInput/FileInput.svelte';
|
|
60
60
|
export { default as DateRangePicker } from './DateRangePicker/DateRangePicker.svelte';
|
|
61
61
|
export { default as Breadcrumb } from './Breadcrumb/Breadcrumb.svelte';
|
|
62
|
+
export { default as LineChart } from './LineChart/LineChart.svelte';
|
|
63
|
+
export { default as AreaChart } from './AreaChart/AreaChart.svelte';
|
|
64
|
+
export { default as BarChart } from './BarChart/BarChart.svelte';
|
|
65
|
+
export { default as PieChart } from './PieChart/PieChart.svelte';
|
|
66
|
+
export { default as SankeyChart } from './SankeyChart/SankeyChart.svelte';
|
|
62
67
|
export { validateInput } from './utils';
|