@mbao01/common 0.0.43 → 0.0.45
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/types/components/Chart/Chart.d.ts +2 -0
- package/dist/types/components/Chart/ChartContext.d.ts +2 -0
- package/dist/types/components/Chart/components/ChartLegend.d.ts +4 -0
- package/dist/types/components/Chart/components/ChartStyle.d.ts +2 -0
- package/dist/types/components/Chart/components/ChartTooltip.d.ts +4 -0
- package/dist/types/components/Chart/components/index.d.ts +3 -0
- package/dist/types/components/Chart/constants.d.ts +22 -0
- package/dist/types/components/Chart/helpers.d.ts +11 -0
- package/dist/types/components/Chart/hooks/index.d.ts +1 -0
- package/dist/types/components/Chart/hooks/useChart/index.d.ts +1 -0
- package/dist/types/components/Chart/hooks/useChart/useChart.d.ts +1 -0
- package/dist/types/components/Chart/index.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/activeShapeArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/animationArgs.d.ts +12 -0
- package/dist/types/components/Chart/stories/args/areaArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/areaChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/barArgs.d.ts +5 -0
- package/dist/types/components/Chart/stories/args/barChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/cartesianChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/cartesianSharedArgs.d.ts +11 -0
- package/dist/types/components/Chart/stories/args/chartArgs.d.ts +6 -0
- package/dist/types/components/Chart/stories/args/dotArgs.d.ts +10 -0
- package/dist/types/components/Chart/stories/args/events.d.ts +804 -0
- package/dist/types/components/Chart/stories/args/labelListArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/legendArgs.d.ts +3 -0
- package/dist/types/components/Chart/stories/args/lineArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/lineChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/pieArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/pieChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/polarChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/polarSharedArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/radarArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/radarChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/radialBarArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/radialBarChartArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/rectangleArgs.d.ts +9 -0
- package/dist/types/components/Chart/stories/args/referenceSharedArgs.d.ts +4 -0
- package/dist/types/components/Chart/stories/args/sectorArgs.d.ts +7 -0
- package/dist/types/components/Chart/stories/args/sharedAxisArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/stylesArgs.d.ts +6 -0
- package/dist/types/components/Chart/stories/args/textArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/tooltipArgs.d.ts +4 -0
- package/dist/types/components/Chart/stories/args/types.d.ts +13 -0
- package/dist/types/components/Chart/stories/args/xAxisArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/args/yAxisArgs.d.ts +2 -0
- package/dist/types/components/Chart/stories/examples/AreaChart.d.ts +16 -0
- package/dist/types/components/Chart/stories/examples/BarChart.d.ts +20 -0
- package/dist/types/components/Chart/stories/examples/LineChart.d.ts +16 -0
- package/dist/types/components/Chart/stories/examples/PieChart.d.ts +19 -0
- package/dist/types/components/Chart/stories/examples/RadarChart.d.ts +24 -0
- package/dist/types/components/Chart/stories/examples/RadialChart.d.ts +17 -0
- package/dist/types/components/Chart/stories/examples/Tooltip.d.ts +15 -0
- package/dist/types/components/Chart/stories/helpers/index.d.ts +9 -0
- package/dist/types/components/Chart/types.d.ts +37 -0
- package/dist/types/components/DatetimePicker/DatetimeGrid.d.ts +26 -0
- package/dist/types/components/DatetimePicker/DatetimePicker.d.ts +13 -0
- package/dist/types/components/DatetimePicker/constants.d.ts +15 -0
- package/dist/types/components/DatetimePicker/index.d.ts +1 -0
- package/dist/types/components/DatetimePicker/types.d.ts +25 -0
- package/dist/types/components/Form/DatetimeInput/DatetimeCalendar.d.ts +5 -0
- package/dist/types/components/Form/DatetimeInput/DatetimeInput.d.ts +83 -0
- package/dist/types/components/Form/DatetimeInput/DatetimeInputContext.d.ts +2 -0
- package/dist/types/components/Form/DatetimeInput/NaturalLanguageInput.d.ts +5 -0
- package/dist/types/components/Form/DatetimeInput/TimePicker.d.ts +1 -0
- package/dist/types/components/Form/DatetimeInput/constants.d.ts +24 -0
- package/dist/types/components/Form/DatetimeInput/helpers.d.ts +27 -0
- package/dist/types/components/Form/DatetimeInput/hooks/index.d.ts +1 -0
- package/dist/types/components/Form/DatetimeInput/hooks/useDateInput/index.d.ts +1 -0
- package/dist/types/components/Form/DatetimeInput/hooks/useDateInput/useDateInput.d.ts +1 -0
- package/dist/types/components/Form/DatetimeInput/index.d.ts +1 -0
- package/dist/types/components/Form/DatetimeInput/types.d.ts +31 -0
- package/dist/types/components/Form/MultiSelect/MultiSelect.d.ts +46 -0
- package/dist/types/components/Form/MultiSelect/MultiSelectContext.d.ts +2 -0
- package/dist/types/components/Form/MultiSelect/constants.d.ts +19 -0
- package/dist/types/components/Form/MultiSelect/hooks/index.d.ts +1 -0
- package/dist/types/components/Form/MultiSelect/hooks/useMultiSelect/index.d.ts +1 -0
- package/dist/types/components/Form/MultiSelect/hooks/useMultiSelect/useMultiSelect.d.ts +1 -0
- package/dist/types/components/Form/MultiSelect/index.d.ts +1 -0
- package/dist/types/components/Form/MultiSelect/types.d.ts +31 -0
- package/dist/types/components/Form/TagsInput/TagsInput.d.ts +13 -0
- package/dist/types/components/Form/TagsInput/constants.d.ts +16 -0
- package/dist/types/components/Form/TagsInput/index.d.ts +1 -0
- package/dist/types/components/Form/TagsInput/types.d.ts +9 -0
- package/dist/types/components/Form/index.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +7 -3
- package/src/components/Chart/Chart.tsx +26 -0
- package/src/components/Chart/ChartContext.tsx +4 -0
- package/src/components/Chart/components/ChartLegend.tsx +52 -0
- package/src/components/Chart/components/ChartStyle.tsx +32 -0
- package/src/components/Chart/components/ChartTooltip.tsx +126 -0
- package/src/components/Chart/components/index.ts +3 -0
- package/src/components/Chart/constants.ts +78 -0
- package/src/components/Chart/helpers.ts +27 -0
- package/src/components/Chart/hooks/index.ts +1 -0
- package/src/components/Chart/hooks/useChart/index.ts +1 -0
- package/src/components/Chart/hooks/useChart/useChart.ts +12 -0
- package/src/components/Chart/index.ts +2 -0
- package/src/components/Chart/stories/args/activeShapeArgs.ts +34 -0
- package/src/components/Chart/stories/args/animationArgs.ts +67 -0
- package/src/components/Chart/stories/args/areaArgs.ts +16 -0
- package/src/components/Chart/stories/args/areaChartArgs.ts +19 -0
- package/src/components/Chart/stories/args/barArgs.ts +123 -0
- package/src/components/Chart/stories/args/barChartArgs.ts +65 -0
- package/src/components/Chart/stories/args/cartesianChartArgs.ts +42 -0
- package/src/components/Chart/stories/args/cartesianSharedArgs.ts +136 -0
- package/src/components/Chart/stories/args/chartArgs.ts +244 -0
- package/src/components/Chart/stories/args/dotArgs.ts +46 -0
- package/src/components/Chart/stories/args/events.ts +343 -0
- package/src/components/Chart/stories/args/index.ts +178 -0
- package/src/components/Chart/stories/args/labelListArgs.ts +124 -0
- package/src/components/Chart/stories/args/legendArgs.ts +205 -0
- package/src/components/Chart/stories/args/lineArgs.ts +87 -0
- package/src/components/Chart/stories/args/lineChartArgs.ts +17 -0
- package/src/components/Chart/stories/args/pieArgs.ts +18 -0
- package/src/components/Chart/stories/args/pieChartArgs.ts +7 -0
- package/src/components/Chart/stories/args/polarChartArgs.ts +86 -0
- package/src/components/Chart/stories/args/polarSharedArgs.ts +42 -0
- package/src/components/Chart/stories/args/radarArgs.ts +26 -0
- package/src/components/Chart/stories/args/radarChartArgs.ts +26 -0
- package/src/components/Chart/stories/args/radialBarArgs.ts +36 -0
- package/src/components/Chart/stories/args/radialBarChartArgs.ts +16 -0
- package/src/components/Chart/stories/args/rectangleArgs.ts +35 -0
- package/src/components/Chart/stories/args/referenceSharedArgs.ts +75 -0
- package/src/components/Chart/stories/args/sectorArgs.ts +106 -0
- package/src/components/Chart/stories/args/sharedAxisArgs.ts +332 -0
- package/src/components/Chart/stories/args/stylesArgs.ts +258 -0
- package/src/components/Chart/stories/args/textArgs.ts +97 -0
- package/src/components/Chart/stories/args/tooltipArgs.ts +41 -0
- package/src/components/Chart/stories/args/types.ts +23 -0
- package/src/components/Chart/stories/args/xAxisArgs.ts +109 -0
- package/src/components/Chart/stories/args/yAxisArgs.ts +73 -0
- package/src/components/Chart/stories/examples/AreaChart.tsx +156 -0
- package/src/components/Chart/stories/examples/BarChart.tsx +425 -0
- package/src/components/Chart/stories/examples/LineChart.tsx +144 -0
- package/src/components/Chart/stories/examples/PieChart.tsx +238 -0
- package/src/components/Chart/stories/examples/RadarChart.tsx +261 -0
- package/src/components/Chart/stories/examples/RadialChart.tsx +239 -0
- package/src/components/Chart/stories/examples/Tooltip.tsx +68 -0
- package/src/components/Chart/stories/helpers/index.tsx +75 -0
- package/src/components/Chart/types.ts +39 -0
- package/src/components/DatetimePicker/DatetimeGrid.tsx +59 -0
- package/src/components/DatetimePicker/DatetimePicker.tsx +59 -0
- package/src/components/DatetimePicker/constants.ts +102 -0
- package/src/components/DatetimePicker/index.ts +1 -0
- package/src/components/DatetimePicker/types.ts +36 -0
- package/src/components/Form/DatetimeInput/DatetimeCalendar.tsx +68 -0
- package/src/components/Form/DatetimeInput/DatetimeInput.tsx +90 -0
- package/src/components/Form/DatetimeInput/DatetimeInputContext.tsx +4 -0
- package/src/components/Form/DatetimeInput/NaturalLanguageInput.tsx +73 -0
- package/src/components/Form/DatetimeInput/TimePicker.tsx +202 -0
- package/src/components/Form/DatetimeInput/constants.ts +135 -0
- package/src/components/Form/DatetimeInput/helpers.ts +93 -0
- package/src/components/Form/DatetimeInput/hooks/index.ts +1 -0
- package/src/components/Form/DatetimeInput/hooks/useDateInput/index.ts +1 -0
- package/src/components/Form/DatetimeInput/hooks/useDateInput/useDateInput.ts +10 -0
- package/src/components/Form/DatetimeInput/index.ts +1 -0
- package/src/components/Form/DatetimeInput/types.ts +36 -0
- package/src/components/Form/MultiSelect/MultiSelect.tsx +348 -0
- package/src/components/Form/MultiSelect/MultiSelectContext.tsx +4 -0
- package/src/components/Form/MultiSelect/constants.ts +103 -0
- package/src/components/Form/MultiSelect/hooks/index.ts +1 -0
- package/src/components/Form/MultiSelect/hooks/useMultiSelect/index.ts +1 -0
- package/src/components/Form/MultiSelect/hooks/useMultiSelect/useMultiSelect.ts +10 -0
- package/src/components/Form/MultiSelect/index.ts +1 -0
- package/src/components/Form/MultiSelect/types.ts +46 -0
- package/src/components/Form/TagsInput/TagsInput.tsx +278 -0
- package/src/components/Form/TagsInput/constants.ts +87 -0
- package/src/components/Form/TagsInput/index.ts +1 -0
- package/src/components/Form/TagsInput/types.ts +10 -0
- package/src/components/Form/index.ts +2 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
import { categoricalChartArgs } from "./chartArgs";
|
|
3
|
+
|
|
4
|
+
export const polarChartArgs: ArgTypes = {
|
|
5
|
+
...categoricalChartArgs,
|
|
6
|
+
cx: {
|
|
7
|
+
description: "The x-coordinate of the center of the circle.",
|
|
8
|
+
table: {
|
|
9
|
+
type: {
|
|
10
|
+
summary: "number | string",
|
|
11
|
+
},
|
|
12
|
+
defaultValue: {
|
|
13
|
+
summary: "50%",
|
|
14
|
+
},
|
|
15
|
+
category: "Polar",
|
|
16
|
+
},
|
|
17
|
+
control: "text",
|
|
18
|
+
},
|
|
19
|
+
cy: {
|
|
20
|
+
description: "The y-coordinate of the center of the circle.",
|
|
21
|
+
table: {
|
|
22
|
+
type: {
|
|
23
|
+
summary: "number | string",
|
|
24
|
+
},
|
|
25
|
+
defaultValue: {
|
|
26
|
+
summary: "50%",
|
|
27
|
+
},
|
|
28
|
+
category: "Polar",
|
|
29
|
+
},
|
|
30
|
+
control: "text",
|
|
31
|
+
},
|
|
32
|
+
innerRadius: {
|
|
33
|
+
description: "The inner radius of polar chart.",
|
|
34
|
+
|
|
35
|
+
table: {
|
|
36
|
+
type: {
|
|
37
|
+
summary: "number",
|
|
38
|
+
},
|
|
39
|
+
defaultValue: {
|
|
40
|
+
summary: "0",
|
|
41
|
+
},
|
|
42
|
+
category: "Polar",
|
|
43
|
+
},
|
|
44
|
+
control: "number",
|
|
45
|
+
},
|
|
46
|
+
outerRadius: {
|
|
47
|
+
description: "The outer radius of polar chart.",
|
|
48
|
+
table: {
|
|
49
|
+
type: {
|
|
50
|
+
summary: "number",
|
|
51
|
+
},
|
|
52
|
+
defaultValue: {
|
|
53
|
+
summary: "80%",
|
|
54
|
+
},
|
|
55
|
+
category: "Polar",
|
|
56
|
+
},
|
|
57
|
+
control: "number",
|
|
58
|
+
},
|
|
59
|
+
startAngle: {
|
|
60
|
+
description: "The start angle of polar chart.",
|
|
61
|
+
table: {
|
|
62
|
+
type: {
|
|
63
|
+
summary: "number",
|
|
64
|
+
},
|
|
65
|
+
defaultValue: {
|
|
66
|
+
summary: "90",
|
|
67
|
+
},
|
|
68
|
+
category: "Polar",
|
|
69
|
+
},
|
|
70
|
+
control: "number",
|
|
71
|
+
},
|
|
72
|
+
endAngle: {
|
|
73
|
+
description: "The end angle of polar chart.",
|
|
74
|
+
defaultValue: -270,
|
|
75
|
+
table: {
|
|
76
|
+
type: {
|
|
77
|
+
summary: "number",
|
|
78
|
+
},
|
|
79
|
+
defaultValue: {
|
|
80
|
+
summary: "-270",
|
|
81
|
+
},
|
|
82
|
+
category: "Polar",
|
|
83
|
+
},
|
|
84
|
+
control: "number",
|
|
85
|
+
},
|
|
86
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
import { dataKey } from "./cartesianSharedArgs";
|
|
3
|
+
|
|
4
|
+
export const polarSharedArgs: ArgTypes = {
|
|
5
|
+
data: {
|
|
6
|
+
table: {
|
|
7
|
+
category: "Internal",
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
angleAxisId: {
|
|
11
|
+
description: "The id of angle axis which is corresponding to the data.",
|
|
12
|
+
table: {
|
|
13
|
+
type: {
|
|
14
|
+
summary: "string | number",
|
|
15
|
+
},
|
|
16
|
+
category: "General",
|
|
17
|
+
},
|
|
18
|
+
control: "text",
|
|
19
|
+
},
|
|
20
|
+
stackId: {
|
|
21
|
+
description:
|
|
22
|
+
"The stack id of bar, when two bars have the same stackId, then two bars are stacked in order.",
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: "string | number",
|
|
26
|
+
},
|
|
27
|
+
category: "General",
|
|
28
|
+
},
|
|
29
|
+
control: "text",
|
|
30
|
+
},
|
|
31
|
+
radiusAxisId: {
|
|
32
|
+
description: "The id of radius axis which is corresponding to the data.",
|
|
33
|
+
table: {
|
|
34
|
+
type: {
|
|
35
|
+
summary: "string | number",
|
|
36
|
+
},
|
|
37
|
+
category: "General",
|
|
38
|
+
},
|
|
39
|
+
control: "text",
|
|
40
|
+
},
|
|
41
|
+
dataKey,
|
|
42
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
import { sharedAxisArgs } from "./sharedAxisArgs";
|
|
3
|
+
|
|
4
|
+
export const radarArgs: ArgTypes = {
|
|
5
|
+
...sharedAxisArgs,
|
|
6
|
+
cx: {
|
|
7
|
+
description: "The x-coordinate of the center of the circle.",
|
|
8
|
+
defaultValue: "50%",
|
|
9
|
+
table: {
|
|
10
|
+
type: {
|
|
11
|
+
summary: "number | string",
|
|
12
|
+
},
|
|
13
|
+
category: "Polar",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
cy: {
|
|
17
|
+
description: "The y-coordinate of the center of the circle.",
|
|
18
|
+
defaultValue: "50%",
|
|
19
|
+
table: {
|
|
20
|
+
type: {
|
|
21
|
+
summary: "number | string",
|
|
22
|
+
},
|
|
23
|
+
category: "Polar",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
import { categoricalChartArgs } from "./chartArgs";
|
|
3
|
+
|
|
4
|
+
export const radarChartArgs: ArgTypes = {
|
|
5
|
+
...categoricalChartArgs,
|
|
6
|
+
cx: {
|
|
7
|
+
description: "The x-coordinate of the center of the circle.",
|
|
8
|
+
defaultValue: "50%",
|
|
9
|
+
table: {
|
|
10
|
+
type: {
|
|
11
|
+
summary: "number | string",
|
|
12
|
+
},
|
|
13
|
+
category: "Polar",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
cy: {
|
|
17
|
+
description: "The y-coordinate of the center of the circle.",
|
|
18
|
+
defaultValue: "50%",
|
|
19
|
+
table: {
|
|
20
|
+
type: {
|
|
21
|
+
summary: "number | string",
|
|
22
|
+
},
|
|
23
|
+
category: "Polar",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
import { animationArgs } from "./animationArgs";
|
|
3
|
+
import { dataKey } from "./chartArgs";
|
|
4
|
+
import { eventArgs } from "./events";
|
|
5
|
+
import { legendType } from "./legendArgs";
|
|
6
|
+
import { polarSharedArgs } from "./polarSharedArgs";
|
|
7
|
+
import { radialBarStyleArgs } from "./stylesArgs";
|
|
8
|
+
import { tooltipType } from "./tooltipArgs";
|
|
9
|
+
|
|
10
|
+
export const radialBarArgs: ArgTypes = {
|
|
11
|
+
dataKey,
|
|
12
|
+
tooltipType,
|
|
13
|
+
...eventArgs,
|
|
14
|
+
...animationArgs,
|
|
15
|
+
legendType,
|
|
16
|
+
...polarSharedArgs,
|
|
17
|
+
...radialBarStyleArgs,
|
|
18
|
+
// Deprecated
|
|
19
|
+
dangerouslySetInnerHTML: {
|
|
20
|
+
table: {
|
|
21
|
+
category: "Deprecated",
|
|
22
|
+
},
|
|
23
|
+
hide: true,
|
|
24
|
+
disable: true,
|
|
25
|
+
},
|
|
26
|
+
startAngle: {
|
|
27
|
+
table: { category: "Deprecated" },
|
|
28
|
+
hide: true,
|
|
29
|
+
disable: true,
|
|
30
|
+
},
|
|
31
|
+
endAngle: {
|
|
32
|
+
table: { category: "Deprecated" },
|
|
33
|
+
hide: true,
|
|
34
|
+
disable: true,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
import { barChartArgs } from "./barChartArgs";
|
|
3
|
+
import { polarChartArgs } from "./polarChartArgs";
|
|
4
|
+
|
|
5
|
+
export const radialBarChartArgs: ArgTypes = {
|
|
6
|
+
...barChartArgs,
|
|
7
|
+
...polarChartArgs,
|
|
8
|
+
startAngle: {
|
|
9
|
+
...polarChartArgs.startAngle,
|
|
10
|
+
defaultValue: 0,
|
|
11
|
+
},
|
|
12
|
+
endAngle: {
|
|
13
|
+
...polarChartArgs.endAngle,
|
|
14
|
+
defaultValue: 360,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
export const radius: ArgTypes[0] = {
|
|
4
|
+
description:
|
|
5
|
+
"If set a value, the option is the radius of all the rounderd corners. If set a array, the option" +
|
|
6
|
+
" are in turn the radiuses of top-left corner, top-right corner, bottom-right corner, bottom-left" +
|
|
7
|
+
" corner.",
|
|
8
|
+
table: {
|
|
9
|
+
type: {
|
|
10
|
+
summary: "number | number[]",
|
|
11
|
+
},
|
|
12
|
+
defaultValue: {
|
|
13
|
+
summary: "0",
|
|
14
|
+
},
|
|
15
|
+
category: "Style",
|
|
16
|
+
},
|
|
17
|
+
control: "object",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const isUpdateAnimationActive: ArgTypes[0] = {
|
|
21
|
+
description: "If set false, animation of component updates will be disabled.",
|
|
22
|
+
table: {
|
|
23
|
+
category: "Animation",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Caveat: If any prop is added here, it would falsely be add to the documentation of the component
|
|
29
|
+
* where this group is used. If the group is to be extended, then only single props should be imported
|
|
30
|
+
* by each component that does not use all of them.
|
|
31
|
+
* */
|
|
32
|
+
export const rectangleArgs: ArgTypes = {
|
|
33
|
+
radius,
|
|
34
|
+
isUpdateAnimationActive,
|
|
35
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
export const referenceStyleArgs: ArgTypes = {
|
|
4
|
+
ifOverflow: {
|
|
5
|
+
description: `Defines how to draw the reference component if it falls partly outside the canvas.
|
|
6
|
+
If set to 'discard', the reference component will not be drawn at all. If set to 'hidden', the
|
|
7
|
+
reference component will be clipped to the canvas. If set to 'visible', the reference component
|
|
8
|
+
will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be
|
|
9
|
+
extended such that the reference component fits into the canvas.`,
|
|
10
|
+
table: {
|
|
11
|
+
type: {
|
|
12
|
+
summary: "'discard' | 'hidden' | 'visible' | 'extendDomain'",
|
|
13
|
+
},
|
|
14
|
+
category: "Style",
|
|
15
|
+
},
|
|
16
|
+
defaultValue: "discard",
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const referenceGeneralArgs: ArgTypes = {
|
|
21
|
+
xAxisId: {
|
|
22
|
+
description: "The id of x-axis which is corresponding to the data.",
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: "string | number",
|
|
26
|
+
},
|
|
27
|
+
category: "General",
|
|
28
|
+
},
|
|
29
|
+
control: "text",
|
|
30
|
+
},
|
|
31
|
+
yAxisId: {
|
|
32
|
+
description: "The id of y-axis which is corresponding to the data.",
|
|
33
|
+
table: {
|
|
34
|
+
type: {
|
|
35
|
+
summary: "string | number",
|
|
36
|
+
},
|
|
37
|
+
category: "General",
|
|
38
|
+
},
|
|
39
|
+
control: "text",
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const referenceInternalArgs: ArgTypes = {
|
|
44
|
+
xAxis: {
|
|
45
|
+
description: "The configuration of the corresponding x-axis, usually calculated internally.",
|
|
46
|
+
table: {
|
|
47
|
+
type: {
|
|
48
|
+
summary: "Object",
|
|
49
|
+
},
|
|
50
|
+
category: "Internal",
|
|
51
|
+
},
|
|
52
|
+
control: "object",
|
|
53
|
+
},
|
|
54
|
+
yAxis: {
|
|
55
|
+
description: "The configuration of the corresponding y-axis, usually calculated internally.",
|
|
56
|
+
table: {
|
|
57
|
+
type: {
|
|
58
|
+
summary: "Object",
|
|
59
|
+
},
|
|
60
|
+
category: "Internal",
|
|
61
|
+
},
|
|
62
|
+
control: "object",
|
|
63
|
+
},
|
|
64
|
+
clipPathId: {
|
|
65
|
+
description: `Used as the id for the clip path which is used to clip the reference component if
|
|
66
|
+
'ifOverflow' is set to 'hidden'"`,
|
|
67
|
+
table: {
|
|
68
|
+
type: {
|
|
69
|
+
summary: "number | string",
|
|
70
|
+
},
|
|
71
|
+
category: "Internal",
|
|
72
|
+
},
|
|
73
|
+
control: "text",
|
|
74
|
+
},
|
|
75
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { type ArgTypes } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Caveat: If any prop is added here, it would falsely be add to the documentation of the component
|
|
5
|
+
* where this group is used. If the group is to be extended, then only single props should be imported
|
|
6
|
+
* by each component that does not use all of them.
|
|
7
|
+
* */
|
|
8
|
+
export const sectorArgs: ArgTypes = {
|
|
9
|
+
cx: {
|
|
10
|
+
description: "The x-coordinate of center.",
|
|
11
|
+
table: {
|
|
12
|
+
type: {
|
|
13
|
+
summary: "number",
|
|
14
|
+
},
|
|
15
|
+
defaultValue: {
|
|
16
|
+
summary: "0",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
control: "number",
|
|
20
|
+
},
|
|
21
|
+
cy: {
|
|
22
|
+
description: "The y-coordinate of center.",
|
|
23
|
+
table: {
|
|
24
|
+
type: {
|
|
25
|
+
summary: "number",
|
|
26
|
+
},
|
|
27
|
+
defaultValue: {
|
|
28
|
+
summary: "0",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
control: "number",
|
|
32
|
+
},
|
|
33
|
+
innerRadius: {
|
|
34
|
+
description: "The inner radius of the sector.",
|
|
35
|
+
table: {
|
|
36
|
+
type: {
|
|
37
|
+
summary: "number",
|
|
38
|
+
},
|
|
39
|
+
defaultValue: {
|
|
40
|
+
summary: "0",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
control: "number",
|
|
44
|
+
},
|
|
45
|
+
outerRadius: {
|
|
46
|
+
description: "The outer radius of the sector.",
|
|
47
|
+
table: {
|
|
48
|
+
type: {
|
|
49
|
+
summary: "number",
|
|
50
|
+
},
|
|
51
|
+
defaultValue: {
|
|
52
|
+
summary: "0",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
control: "number",
|
|
56
|
+
},
|
|
57
|
+
startAngle: {
|
|
58
|
+
description: "The start angle of the sector.",
|
|
59
|
+
table: {
|
|
60
|
+
type: {
|
|
61
|
+
summary: "number",
|
|
62
|
+
},
|
|
63
|
+
defaultValue: {
|
|
64
|
+
summary: "0",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
control: "number",
|
|
68
|
+
},
|
|
69
|
+
endAngle: {
|
|
70
|
+
description: "The end angle of the sector.",
|
|
71
|
+
table: {
|
|
72
|
+
type: {
|
|
73
|
+
summary: "number",
|
|
74
|
+
},
|
|
75
|
+
defaultValue: {
|
|
76
|
+
summary: "0",
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
control: "number",
|
|
80
|
+
},
|
|
81
|
+
cornerRadius: {
|
|
82
|
+
description: "The radius of corners.",
|
|
83
|
+
table: {
|
|
84
|
+
type: {
|
|
85
|
+
summary: "number",
|
|
86
|
+
},
|
|
87
|
+
defaultValue: {
|
|
88
|
+
summary: "0",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
control: "number",
|
|
92
|
+
},
|
|
93
|
+
forceCornerRadius: {
|
|
94
|
+
description:
|
|
95
|
+
"Whether or not force to render round corner when the angle of sector is very small",
|
|
96
|
+
table: {
|
|
97
|
+
type: {
|
|
98
|
+
summary: "boolean",
|
|
99
|
+
},
|
|
100
|
+
defaultValue: {
|
|
101
|
+
summary: "false",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
control: "boolean",
|
|
105
|
+
},
|
|
106
|
+
};
|