@tipp/ui 1.0.28 → 1.0.30
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/atoms/index.js +1 -1
- package/dist/charts/chart.cjs +20 -3
- package/dist/charts/chart.cjs.map +1 -1
- package/dist/charts/chart.d.cts +4 -4
- package/dist/charts/chart.d.ts +4 -4
- package/dist/charts/chart.js +1 -1
- package/dist/charts/index.cjs +20 -3
- package/dist/charts/index.cjs.map +1 -1
- package/dist/charts/index.d.cts +1 -1
- package/dist/charts/index.d.ts +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/chunk-2ZVIXDUQ.js +196 -0
- package/dist/chunk-2ZVIXDUQ.js.map +1 -0
- package/dist/chunk-3HULX2N3.js +206 -0
- package/dist/chunk-3HULX2N3.js.map +1 -0
- package/dist/chunk-6O2MNTGU.js +198 -0
- package/dist/chunk-6O2MNTGU.js.map +1 -0
- package/dist/chunk-7HRYZ7NQ.js +197 -0
- package/dist/chunk-7HRYZ7NQ.js.map +1 -0
- package/dist/chunk-A5BAGKVO.js +205 -0
- package/dist/chunk-A5BAGKVO.js.map +1 -0
- package/dist/chunk-BFHWI7WD.js +119 -0
- package/dist/chunk-BFHWI7WD.js.map +1 -0
- package/dist/chunk-CAQ3H2HW.js +197 -0
- package/dist/chunk-CAQ3H2HW.js.map +1 -0
- package/dist/chunk-DCPLIZMO.js +204 -0
- package/dist/chunk-DCPLIZMO.js.map +1 -0
- package/dist/chunk-DXSXADVU.js +206 -0
- package/dist/chunk-DXSXADVU.js.map +1 -0
- package/dist/chunk-EIDBURAB.js +190 -0
- package/dist/chunk-EIDBURAB.js.map +1 -0
- package/dist/chunk-GMHV56NQ.js +205 -0
- package/dist/chunk-GMHV56NQ.js.map +1 -0
- package/dist/chunk-HBB3XS6O.js +192 -0
- package/dist/chunk-HBB3XS6O.js.map +1 -0
- package/dist/chunk-IYBDO5LG.js +201 -0
- package/dist/chunk-IYBDO5LG.js.map +1 -0
- package/dist/chunk-LAEQOKW7.js +206 -0
- package/dist/chunk-LAEQOKW7.js.map +1 -0
- package/dist/chunk-PEQK7Z73.js +206 -0
- package/dist/chunk-PEQK7Z73.js.map +1 -0
- package/dist/chunk-QSSRR273.js +206 -0
- package/dist/chunk-QSSRR273.js.map +1 -0
- package/dist/chunk-R7J3TUC5.js +119 -0
- package/dist/chunk-R7J3TUC5.js.map +1 -0
- package/dist/chunk-RRKJ5G7Y.js +199 -0
- package/dist/chunk-RRKJ5G7Y.js.map +1 -0
- package/dist/chunk-XEQWFWBV.js +203 -0
- package/dist/chunk-XEQWFWBV.js.map +1 -0
- package/dist/index.cjs +20 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +35 -35
- package/dist/molecules/expand-table/index.js +4 -4
- package/dist/molecules/expand-table/row.js +1 -1
- package/dist/molecules/index.js +7 -7
- package/dist/molecules/navigation.js +1 -1
- package/package.json +2 -1
- package/src/charts/chart.tsx +55 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tipp/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"@radix-ui/react-icons": "^1.3.0",
|
|
31
31
|
"@radix-ui/themes": "^3.1.1",
|
|
32
32
|
"@tanstack/react-table": "^8.19.3",
|
|
33
|
+
"echarts": "^5.5.1",
|
|
33
34
|
"echarts-for-react": "^3.0.2",
|
|
34
35
|
"i": "^0.3.7",
|
|
35
36
|
"lodash-es": "^4.17.21",
|
package/src/charts/chart.tsx
CHANGED
|
@@ -1,17 +1,61 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { useResizeDetector } from 'react-resize-detector';
|
|
3
|
-
import ReactECharts from 'echarts-for-react';
|
|
4
|
-
import type { EChartOption } from 'echarts';
|
|
5
3
|
import { merge } from 'lodash-es';
|
|
4
|
+
import type { EChartsOption } from 'echarts';
|
|
5
|
+
import * as echarts from 'echarts/core';
|
|
6
|
+
import ReactEChartsCore from 'echarts-for-react/lib/core';
|
|
7
|
+
import { PieChart, LineChart } from 'echarts/charts';
|
|
8
|
+
import { SVGRenderer } from 'echarts/renderers';
|
|
9
|
+
import {
|
|
10
|
+
GridSimpleComponent,
|
|
11
|
+
// PolarComponent,
|
|
12
|
+
// RadarComponent,
|
|
13
|
+
// GeoComponent,
|
|
14
|
+
// SingleAxisComponent,
|
|
15
|
+
// ParallelComponent,
|
|
16
|
+
// CalendarComponent,
|
|
17
|
+
// GraphicComponent,
|
|
18
|
+
AxisPointerComponent,
|
|
19
|
+
// BrushComponent,
|
|
20
|
+
// TimelineComponent,
|
|
21
|
+
// MarkPointComponent,
|
|
22
|
+
// MarkLineComponent,
|
|
23
|
+
// MarkAreaComponent,
|
|
24
|
+
// LegendScrollComponent,
|
|
25
|
+
// LegendPlainComponent,
|
|
26
|
+
// DataZoomComponent,
|
|
27
|
+
// DataZoomInsideComponent,
|
|
28
|
+
// DataZoomSliderComponent,
|
|
29
|
+
// VisualMapComponent,
|
|
30
|
+
// VisualMapContinuousComponent,
|
|
31
|
+
// VisualMapPiecewiseComponent,
|
|
32
|
+
AriaComponent,
|
|
33
|
+
// TransformComponent,
|
|
34
|
+
TooltipComponent,
|
|
35
|
+
GridComponent,
|
|
36
|
+
LegendComponent,
|
|
37
|
+
ToolboxComponent,
|
|
38
|
+
} from 'echarts/components';
|
|
6
39
|
import chartTheme from './chart-theme.json';
|
|
7
40
|
|
|
8
|
-
|
|
41
|
+
echarts.use([
|
|
42
|
+
SVGRenderer,
|
|
43
|
+
PieChart,
|
|
44
|
+
LineChart,
|
|
45
|
+
TooltipComponent,
|
|
46
|
+
GridComponent,
|
|
47
|
+
LegendComponent,
|
|
48
|
+
ToolboxComponent,
|
|
49
|
+
AriaComponent,
|
|
50
|
+
AxisPointerComponent,
|
|
51
|
+
GridSimpleComponent,
|
|
52
|
+
]);
|
|
9
53
|
|
|
10
54
|
export type ChartProps = Omit<
|
|
11
|
-
React.ComponentProps<typeof
|
|
55
|
+
React.ComponentProps<typeof ReactEChartsCore>,
|
|
12
56
|
'option'
|
|
13
57
|
> & {
|
|
14
|
-
option:
|
|
58
|
+
option: EChartsOption;
|
|
15
59
|
};
|
|
16
60
|
|
|
17
61
|
export function Chart(props: ChartProps): JSX.Element {
|
|
@@ -22,7 +66,7 @@ export function Chart(props: ChartProps): JSX.Element {
|
|
|
22
66
|
});
|
|
23
67
|
|
|
24
68
|
const option = useMemo(() => {
|
|
25
|
-
const baseOption:
|
|
69
|
+
const baseOption: EChartsOption = {
|
|
26
70
|
textStyle: { fontFamily: 'Noto Sans KR' },
|
|
27
71
|
tooltip: { textStyle: { fontSize: 16 } },
|
|
28
72
|
};
|
|
@@ -31,9 +75,10 @@ export function Chart(props: ChartProps): JSX.Element {
|
|
|
31
75
|
|
|
32
76
|
return (
|
|
33
77
|
<div ref={ref} style={{ width: '100%', height: '100%' }}>
|
|
34
|
-
<
|
|
78
|
+
<ReactEChartsCore
|
|
79
|
+
echarts={echarts}
|
|
35
80
|
opts={{ renderer: 'svg' }}
|
|
36
|
-
style={{
|
|
81
|
+
style={{ height, width }}
|
|
37
82
|
theme={chartTheme}
|
|
38
83
|
{...props}
|
|
39
84
|
option={option}
|
|
@@ -41,3 +86,5 @@ export function Chart(props: ChartProps): JSX.Element {
|
|
|
41
86
|
</div>
|
|
42
87
|
);
|
|
43
88
|
}
|
|
89
|
+
|
|
90
|
+
export { chartTheme };
|