@tipp/ui 1.0.30 → 1.0.31

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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  FieldErrorWrapper
3
- } from "../chunk-CHHLIPDN.js";
4
- import "../chunk-25HMMI7R.js";
3
+ } from "../chunk-CNQ7RNNY.js";
5
4
  import "../chunk-O3XTRD7R.js";
5
+ import "../chunk-25HMMI7R.js";
6
6
  import "../chunk-N552FDTV.js";
7
7
  export {
8
8
  FieldErrorWrapper
@@ -1,4 +1,22 @@
1
1
  import "../chunk-2ANGYYEV.js";
2
+ import {
3
+ TextArea
4
+ } from "../chunk-ILRUXI2E.js";
5
+ import {
6
+ TextField
7
+ } from "../chunk-JPIZP2PZ.js";
8
+ import {
9
+ Select
10
+ } from "../chunk-355MU6BH.js";
11
+ import {
12
+ Separator
13
+ } from "../chunk-HYITAA4J.js";
14
+ import {
15
+ Skeleton
16
+ } from "../chunk-5H3YPCZK.js";
17
+ import {
18
+ Spinner
19
+ } from "../chunk-FR2GDOU2.js";
2
20
  import {
3
21
  Strong
4
22
  } from "../chunk-74DX4CU7.js";
@@ -12,11 +30,17 @@ import {
12
30
  Tabs
13
31
  } from "../chunk-5ZITU5L7.js";
14
32
  import {
15
- TextArea
16
- } from "../chunk-ILRUXI2E.js";
33
+ Progress
34
+ } from "../chunk-365QMK4D.js";
17
35
  import {
18
- TextField
19
- } from "../chunk-JPIZP2PZ.js";
36
+ Quote
37
+ } from "../chunk-YO3BQW6S.js";
38
+ import {
39
+ RadioCards
40
+ } from "../chunk-6IVCARWS.js";
41
+ import {
42
+ RadioGroup
43
+ } from "../chunk-6DJOIRMF.js";
20
44
  import {
21
45
  Radio
22
46
  } from "../chunk-FPD73OHW.js";
@@ -30,17 +54,11 @@ import {
30
54
  SegmentedControl
31
55
  } from "../chunk-TVDKGMBI.js";
32
56
  import {
33
- Select
34
- } from "../chunk-355MU6BH.js";
35
- import {
36
- Separator
37
- } from "../chunk-HYITAA4J.js";
38
- import {
39
- Skeleton
40
- } from "../chunk-5H3YPCZK.js";
57
+ HoverCard
58
+ } from "../chunk-O3T3TM3V.js";
41
59
  import {
42
- Spinner
43
- } from "../chunk-FR2GDOU2.js";
60
+ Inset
61
+ } from "../chunk-XQOL7UBI.js";
44
62
  import {
45
63
  Kbd
46
64
  } from "../chunk-TULWX7D6.js";
@@ -49,22 +67,31 @@ import {
49
67
  } from "../chunk-XQOZWYUA.js";
50
68
  import {
51
69
  Pagination
52
- } from "../chunk-3R2IB6WJ.js";
70
+ } from "../chunk-QGBUYEQN.js";
53
71
  import {
54
72
  Popover
55
73
  } from "../chunk-5AVBYDPB.js";
56
74
  import {
57
- Progress
58
- } from "../chunk-365QMK4D.js";
75
+ DropdownMenu
76
+ } from "../chunk-YTZSKMX3.js";
59
77
  import {
60
- Quote
61
- } from "../chunk-YO3BQW6S.js";
78
+ EllipsisTooltip
79
+ } from "../chunk-4IKPNQV5.js";
62
80
  import {
63
- RadioCards
64
- } from "../chunk-6IVCARWS.js";
81
+ Tooltip
82
+ } from "../chunk-ACVANQJ4.js";
65
83
  import {
66
- RadioGroup
67
- } from "../chunk-6DJOIRMF.js";
84
+ Em
85
+ } from "../chunk-2DZ2Y3JI.js";
86
+ import {
87
+ FieldErrorWrapper
88
+ } from "../chunk-CNQ7RNNY.js";
89
+ import {
90
+ Typo
91
+ } from "../chunk-O3XTRD7R.js";
92
+ import {
93
+ Flex
94
+ } from "../chunk-25HMMI7R.js";
68
95
  import {
69
96
  Form
70
97
  } from "../chunk-2CVXGGI5.js";
@@ -75,11 +102,17 @@ import {
75
102
  Heading
76
103
  } from "../chunk-HLOY6BIP.js";
77
104
  import {
78
- HoverCard
79
- } from "../chunk-O3T3TM3V.js";
105
+ CheckboxGroup
106
+ } from "../chunk-IQEEPHOY.js";
80
107
  import {
81
- Inset
82
- } from "../chunk-XQOL7UBI.js";
108
+ Checkbox
109
+ } from "../chunk-JEHDCZQU.js";
110
+ import {
111
+ Code
112
+ } from "../chunk-OHMOP5PV.js";
113
+ import {
114
+ Collapse
115
+ } from "../chunk-KGLIAFTI.js";
83
116
  import {
84
117
  Container
85
118
  } from "../chunk-Q37G2GS6.js";
@@ -104,26 +137,17 @@ import {
104
137
  IconButton
105
138
  } from "../chunk-O3DNDMV3.js";
106
139
  import {
107
- DropdownMenu
108
- } from "../chunk-YTZSKMX3.js";
109
- import {
110
- EllipsisTooltip
111
- } from "../chunk-4IKPNQV5.js";
112
- import {
113
- Tooltip
114
- } from "../chunk-ACVANQJ4.js";
115
- import {
116
- Em
117
- } from "../chunk-2DZ2Y3JI.js";
140
+ Avatar
141
+ } from "../chunk-CZEGRZBK.js";
118
142
  import {
119
- FieldErrorWrapper
120
- } from "../chunk-CHHLIPDN.js";
143
+ Badge
144
+ } from "../chunk-ALOPZ54P.js";
121
145
  import {
122
- Flex
123
- } from "../chunk-25HMMI7R.js";
146
+ Blockquote
147
+ } from "../chunk-YGL6SWKN.js";
124
148
  import {
125
- Typo
126
- } from "../chunk-O3XTRD7R.js";
149
+ Box
150
+ } from "../chunk-4Y5BEXVN.js";
127
151
  import {
128
152
  Button
129
153
  } from "../chunk-AQX7DQLI.js";
@@ -136,37 +160,13 @@ import {
136
160
  import {
137
161
  CheckboxCards
138
162
  } from "../chunk-MIMJ7LON.js";
139
- import {
140
- CheckboxGroup
141
- } from "../chunk-IQEEPHOY.js";
142
- import {
143
- Checkbox
144
- } from "../chunk-JEHDCZQU.js";
145
- import {
146
- Code
147
- } from "../chunk-OHMOP5PV.js";
148
- import {
149
- Collapse
150
- } from "../chunk-KGLIAFTI.js";
163
+ import "../chunk-4UZQXJQO.js";
151
164
  import {
152
165
  AlertDialog
153
166
  } from "../chunk-J242TTFH.js";
154
167
  import {
155
168
  AspectRatio
156
169
  } from "../chunk-EAXUQEO5.js";
157
- import {
158
- Avatar
159
- } from "../chunk-CZEGRZBK.js";
160
- import {
161
- Badge
162
- } from "../chunk-ALOPZ54P.js";
163
- import {
164
- Blockquote
165
- } from "../chunk-YGL6SWKN.js";
166
- import {
167
- Box
168
- } from "../chunk-4Y5BEXVN.js";
169
- import "../chunk-4UZQXJQO.js";
170
170
  import "../chunk-N552FDTV.js";
171
171
  export {
172
172
  AlertDialog,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Pagination
3
- } from "../chunk-3R2IB6WJ.js";
4
- import "../chunk-O3DNDMV3.js";
5
- import "../chunk-25HMMI7R.js";
3
+ } from "../chunk-QGBUYEQN.js";
6
4
  import "../chunk-O3XTRD7R.js";
5
+ import "../chunk-25HMMI7R.js";
6
+ import "../chunk-O3DNDMV3.js";
7
7
  import "../chunk-4UZQXJQO.js";
8
8
  import "../chunk-N552FDTV.js";
9
9
  export {
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __export = (target, all) => {
26
+ for (var name in all)
27
+ __defProp(target, name, { get: all[name], enumerable: true });
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") {
31
+ for (let key of __getOwnPropNames(from))
32
+ if (!__hasOwnProp.call(to, key) && key !== except)
33
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
+ }
35
+ return to;
36
+ };
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
+ // If the importer is in node compatibility mode or this is not an ESM
39
+ // file that has been converted to a CommonJS file using a Babel-
40
+ // compatible transform (i.e. "__esModule" has not been set), then set
41
+ // "default" to the CommonJS "module.exports" for node compatibility.
42
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
+ mod
44
+ ));
45
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
+
47
+ // src/charts/chart-test.tsx
48
+ var chart_test_exports = {};
49
+ __export(chart_test_exports, {
50
+ Chart: () => Chart,
51
+ chartTheme: () => chart_theme_default
52
+ });
53
+ module.exports = __toCommonJS(chart_test_exports);
54
+ var import_react = require("react");
55
+ var import_react_resize_detector = require("react-resize-detector");
56
+ var import_lodash_es = require("lodash-es");
57
+ var echarts = __toESM(require("echarts/core"), 1);
58
+ var import_core = __toESM(require("echarts-for-react/lib/core"), 1);
59
+ var import_charts = require("echarts/charts");
60
+ var import_renderers = require("echarts/renderers");
61
+ var import_components = require("echarts/components");
62
+
63
+ // src/charts/chart-theme.json
64
+ var chart_theme_default = {
65
+ version: 1,
66
+ themeName: "customed",
67
+ theme: {
68
+ seriesCnt: "5",
69
+ backgroundColor: "rgba(0,0,0,0)",
70
+ titleColor: "#1c2024",
71
+ subtitleColor: "#8d8d8d",
72
+ textColorShow: false,
73
+ textColor: "#333",
74
+ markTextColor: "#ffffff",
75
+ color: [
76
+ "#ffe629",
77
+ "#3e63dd",
78
+ "#ec9455",
79
+ "#5bb98b",
80
+ "#cb1d63",
81
+ "#3ba272",
82
+ "#fc8452",
83
+ "#9a60b4",
84
+ "#ea7ccc"
85
+ ],
86
+ borderColor: "#8d8d8d",
87
+ borderWidth: 0,
88
+ visualMapColor: ["#bf444c", "#d88273", "#f6efa6"],
89
+ legendTextColor: "#1c2024",
90
+ kColor: "#eb5454",
91
+ kColor0: "#47b262",
92
+ kBorderColor: "#eb5454",
93
+ kBorderColor0: "#47b262",
94
+ kBorderWidth: 1,
95
+ lineWidth: 2,
96
+ symbolSize: 4,
97
+ symbol: "emptyCircle",
98
+ symbolBorderWidth: 1,
99
+ lineSmooth: false,
100
+ graphLineWidth: 1,
101
+ graphLineColor: "#aaa",
102
+ mapLabelColor: "#000",
103
+ mapLabelColorE: "rgb(100,0,0)",
104
+ mapBorderColor: "#444",
105
+ mapBorderColorE: "#444",
106
+ mapBorderWidth: 0.5,
107
+ mapBorderWidthE: 1,
108
+ mapAreaColor: "#eee",
109
+ mapAreaColorE: "rgba(255,215,0,0.8)",
110
+ axes: [
111
+ {
112
+ type: "all",
113
+ name: "\u901A\u7528\u5750\u6807\u8F74",
114
+ axisLineShow: true,
115
+ axisLineColor: "#6E7079",
116
+ axisTickShow: true,
117
+ axisTickColor: "#6E7079",
118
+ axisLabelShow: true,
119
+ axisLabelColor: "#6E7079",
120
+ splitLineShow: true,
121
+ splitLineColor: ["#E0E6F1"],
122
+ splitAreaShow: false,
123
+ splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
124
+ },
125
+ {
126
+ type: "category",
127
+ name: "\u7C7B\u76EE\u5750\u6807\u8F74",
128
+ axisLineShow: true,
129
+ axisLineColor: "#6E7079",
130
+ axisTickShow: true,
131
+ axisTickColor: "#6E7079",
132
+ axisLabelShow: true,
133
+ axisLabelColor: "#6E7079",
134
+ splitLineShow: false,
135
+ splitLineColor: ["#E0E6F1"],
136
+ splitAreaShow: false,
137
+ splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
138
+ },
139
+ {
140
+ type: "value",
141
+ name: "\u6570\u503C\u5750\u6807\u8F74",
142
+ axisLineShow: false,
143
+ axisLineColor: "#6E7079",
144
+ axisTickShow: false,
145
+ axisTickColor: "#6E7079",
146
+ axisLabelShow: true,
147
+ axisLabelColor: "#6E7079",
148
+ splitLineShow: true,
149
+ splitLineColor: ["#E0E6F1"],
150
+ splitAreaShow: false,
151
+ splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
152
+ },
153
+ {
154
+ type: "log",
155
+ name: "\u5BF9\u6570\u5750\u6807\u8F74",
156
+ axisLineShow: false,
157
+ axisLineColor: "#6E7079",
158
+ axisTickShow: false,
159
+ axisTickColor: "#6E7079",
160
+ axisLabelShow: true,
161
+ axisLabelColor: "#6E7079",
162
+ splitLineShow: true,
163
+ splitLineColor: ["#E0E6F1"],
164
+ splitAreaShow: false,
165
+ splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
166
+ },
167
+ {
168
+ type: "time",
169
+ name: "\u65F6\u95F4\u5750\u6807\u8F74",
170
+ axisLineShow: true,
171
+ axisLineColor: "#6E7079",
172
+ axisTickShow: true,
173
+ axisTickColor: "#6E7079",
174
+ axisLabelShow: true,
175
+ axisLabelColor: "#6E7079",
176
+ splitLineShow: false,
177
+ splitLineColor: ["#E0E6F1"],
178
+ splitAreaShow: false,
179
+ splitAreaColor: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
180
+ }
181
+ ],
182
+ axisSeperateSetting: true,
183
+ toolboxColor: "#8d8d8d",
184
+ toolboxEmphasisColor: "#1c2024",
185
+ tooltipAxisColor: "#cccccc",
186
+ tooltipAxisWidth: 1,
187
+ timelineLineColor: "#dae1f5",
188
+ timelineLineWidth: 2,
189
+ timelineItemColor: "#a4b1d7",
190
+ timelineItemColorE: "#ffffff",
191
+ timelineCheckColor: "#316bf3",
192
+ timelineCheckBorderColor: "#ffffff",
193
+ timelineItemBorderWidth: 1,
194
+ timelineControlColor: "#a4b1d7",
195
+ timelineControlBorderColor: "#a4b1d7",
196
+ timelineControlBorderWidth: 1,
197
+ timelineLabelColor: "#a4b1d7"
198
+ }
199
+ };
200
+
201
+ // src/charts/chart-test.tsx
202
+ var import_jsx_runtime = require("react/jsx-runtime");
203
+ echarts.use([
204
+ import_renderers.SVGRenderer,
205
+ import_charts.PieChart,
206
+ import_charts.LineChart,
207
+ import_components.TooltipComponent,
208
+ import_components.GridComponent,
209
+ import_components.LegendComponent,
210
+ import_components.ToolboxComponent,
211
+ import_components.AriaComponent,
212
+ import_components.AxisPointerComponent,
213
+ import_components.GridSimpleComponent
214
+ ]);
215
+ function Chart(props) {
216
+ const { width, height, ref } = (0, import_react_resize_detector.useResizeDetector)({
217
+ handleHeight: false,
218
+ refreshMode: "debounce",
219
+ refreshRate: 100
220
+ });
221
+ const option = (0, import_react.useMemo)(() => {
222
+ const baseOption = {
223
+ textStyle: { fontFamily: "Noto Sans KR" },
224
+ tooltip: { textStyle: { fontSize: 16 } }
225
+ };
226
+ return (0, import_lodash_es.merge)(baseOption, props.option);
227
+ }, [props.option]);
228
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
229
+ import_core.default,
230
+ __spreadProps(__spreadValues({
231
+ echarts,
232
+ opts: { renderer: "svg" },
233
+ style: { height, width },
234
+ theme: chart_theme_default
235
+ }, props), {
236
+ option
237
+ })
238
+ ) });
239
+ }
240
+ // Annotate the CommonJS export names for ESM import in node:
241
+ 0 && (module.exports = {
242
+ Chart,
243
+ chartTheme
244
+ });
245
+ //# sourceMappingURL=chart-test.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/charts/chart-test.tsx","../../src/charts/chart-theme.json"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\nimport { merge } from 'lodash-es';\nimport type { EChartsOption } from 'echarts';\nimport * as echarts from 'echarts/core';\nimport ReactEChartsCore from 'echarts-for-react/lib/core';\nimport { PieChart, LineChart } from 'echarts/charts';\nimport { SVGRenderer } from 'echarts/renderers';\nimport {\n GridSimpleComponent,\n // PolarComponent,\n // RadarComponent,\n // GeoComponent,\n // SingleAxisComponent,\n // ParallelComponent,\n // CalendarComponent,\n // GraphicComponent,\n AxisPointerComponent,\n // BrushComponent,\n // TimelineComponent,\n // MarkPointComponent,\n // MarkLineComponent,\n // MarkAreaComponent,\n // LegendScrollComponent,\n // LegendPlainComponent,\n // DataZoomComponent,\n // DataZoomInsideComponent,\n // DataZoomSliderComponent,\n // VisualMapComponent,\n // VisualMapContinuousComponent,\n // VisualMapPiecewiseComponent,\n AriaComponent,\n // TransformComponent,\n TooltipComponent,\n GridComponent,\n LegendComponent,\n ToolboxComponent,\n} from 'echarts/components';\nimport chartTheme from './chart-theme.json';\n\necharts.use([\n SVGRenderer,\n PieChart,\n LineChart,\n TooltipComponent,\n GridComponent,\n LegendComponent,\n ToolboxComponent,\n AriaComponent,\n AxisPointerComponent,\n GridSimpleComponent,\n]);\n\nexport type ChartProps = Omit<\n React.ComponentProps<typeof ReactEChartsCore>,\n 'option'\n> & {\n option: EChartsOption;\n};\n\nexport function Chart(props: ChartProps): JSX.Element {\n const { width, height, ref } = useResizeDetector({\n handleHeight: false,\n refreshMode: 'debounce',\n refreshRate: 100,\n });\n\n const option = useMemo(() => {\n const baseOption: EChartsOption = {\n textStyle: { fontFamily: 'Noto Sans KR' },\n tooltip: { textStyle: { fontSize: 16 } },\n };\n return merge(baseOption, props.option);\n }, [props.option]);\n\n return (\n <div ref={ref} style={{ width: '100%', height: '100%' }}>\n <ReactEChartsCore\n echarts={echarts}\n opts={{ renderer: 'svg' }}\n style={{ height, width }}\n theme={chartTheme}\n {...props}\n option={option}\n />\n </div>\n );\n}\n\nexport { chartTheme };\n","{\n \"version\": 1,\n \"themeName\": \"customed\",\n \"theme\": {\n \"seriesCnt\": \"5\",\n \"backgroundColor\": \"rgba(0,0,0,0)\",\n \"titleColor\": \"#1c2024\",\n \"subtitleColor\": \"#8d8d8d\",\n \"textColorShow\": false,\n \"textColor\": \"#333\",\n \"markTextColor\": \"#ffffff\",\n \"color\": [\n \"#ffe629\",\n \"#3e63dd\",\n \"#ec9455\",\n \"#5bb98b\",\n \"#cb1d63\",\n \"#3ba272\",\n \"#fc8452\",\n \"#9a60b4\",\n \"#ea7ccc\"\n ],\n \"borderColor\": \"#8d8d8d\",\n \"borderWidth\": 0,\n \"visualMapColor\": [\"#bf444c\", \"#d88273\", \"#f6efa6\"],\n \"legendTextColor\": \"#1c2024\",\n \"kColor\": \"#eb5454\",\n \"kColor0\": \"#47b262\",\n \"kBorderColor\": \"#eb5454\",\n \"kBorderColor0\": \"#47b262\",\n \"kBorderWidth\": 1,\n \"lineWidth\": 2,\n \"symbolSize\": 4,\n \"symbol\": \"emptyCircle\",\n \"symbolBorderWidth\": 1,\n \"lineSmooth\": false,\n \"graphLineWidth\": 1,\n \"graphLineColor\": \"#aaa\",\n \"mapLabelColor\": \"#000\",\n \"mapLabelColorE\": \"rgb(100,0,0)\",\n \"mapBorderColor\": \"#444\",\n \"mapBorderColorE\": \"#444\",\n \"mapBorderWidth\": 0.5,\n \"mapBorderWidthE\": 1,\n \"mapAreaColor\": \"#eee\",\n \"mapAreaColorE\": \"rgba(255,215,0,0.8)\",\n \"axes\": [\n {\n \"type\": \"all\",\n \"name\": \"通用坐标轴\",\n \"axisLineShow\": true,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": true,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": true,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"category\",\n \"name\": \"类目坐标轴\",\n \"axisLineShow\": true,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": true,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": false,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"value\",\n \"name\": \"数值坐标轴\",\n \"axisLineShow\": false,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": false,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": true,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"log\",\n \"name\": \"对数坐标轴\",\n \"axisLineShow\": false,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": false,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": true,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n },\n {\n \"type\": \"time\",\n \"name\": \"时间坐标轴\",\n \"axisLineShow\": true,\n \"axisLineColor\": \"#6E7079\",\n \"axisTickShow\": true,\n \"axisTickColor\": \"#6E7079\",\n \"axisLabelShow\": true,\n \"axisLabelColor\": \"#6E7079\",\n \"splitLineShow\": false,\n \"splitLineColor\": [\"#E0E6F1\"],\n \"splitAreaShow\": false,\n \"splitAreaColor\": [\"rgba(250,250,250,0.2)\", \"rgba(210,219,238,0.2)\"]\n }\n ],\n \"axisSeperateSetting\": true,\n \"toolboxColor\": \"#8d8d8d\",\n \"toolboxEmphasisColor\": \"#1c2024\",\n \"tooltipAxisColor\": \"#cccccc\",\n \"tooltipAxisWidth\": 1,\n \"timelineLineColor\": \"#dae1f5\",\n \"timelineLineWidth\": 2,\n \"timelineItemColor\": \"#a4b1d7\",\n \"timelineItemColorE\": \"#ffffff\",\n \"timelineCheckColor\": \"#316bf3\",\n \"timelineCheckBorderColor\": \"#ffffff\",\n \"timelineItemBorderWidth\": 1,\n \"timelineControlColor\": \"#a4b1d7\",\n \"timelineControlBorderColor\": \"#a4b1d7\",\n \"timelineControlBorderWidth\": 1,\n \"timelineLabelColor\": \"#a4b1d7\"\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+B;AAC/B,mCAAkC;AAClC,uBAAsB;AAEtB,cAAyB;AACzB,kBAA6B;AAC7B,oBAAoC;AACpC,uBAA4B;AAC5B,wBA6BO;;;ACrCP;AAAA,EACE,SAAW;AAAA,EACX,WAAa;AAAA,EACb,OAAS;AAAA,IACP,WAAa;AAAA,IACb,iBAAmB;AAAA,IACnB,YAAc;AAAA,IACd,eAAiB;AAAA,IACjB,eAAiB;AAAA,IACjB,WAAa;AAAA,IACb,eAAiB;AAAA,IACjB,OAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,aAAe;AAAA,IACf,aAAe;AAAA,IACf,gBAAkB,CAAC,WAAW,WAAW,SAAS;AAAA,IAClD,iBAAmB;AAAA,IACnB,QAAU;AAAA,IACV,SAAW;AAAA,IACX,cAAgB;AAAA,IAChB,eAAiB;AAAA,IACjB,cAAgB;AAAA,IAChB,WAAa;AAAA,IACb,YAAc;AAAA,IACd,QAAU;AAAA,IACV,mBAAqB;AAAA,IACrB,YAAc;AAAA,IACd,gBAAkB;AAAA,IAClB,gBA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AM;AAAA,EACvC,GAAG,CAAC,MAAM,MAAM,CAAC;AAEjB,SACE,4CAAC,SAAI,KAAU,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,GACpD;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,MAAM,EAAE,UAAU,MAAM;AAAA,MACxB,OAAO,EAAE,QAAQ,MAAM;AAAA,MACvB,OAAO;AAAA,OACH,QALL;AAAA,MAMC;AAAA;AAAA,EACF,GACF;AAEJ;","names":["ReactEChartsCore"]}
@@ -0,0 +1,68 @@
1
+ import {
2
+ chart_theme_default
3
+ } from "../chunk-67K6SKIG.js";
4
+ import {
5
+ __spreadProps,
6
+ __spreadValues
7
+ } from "../chunk-N552FDTV.js";
8
+
9
+ // src/charts/chart-test.tsx
10
+ import { useMemo } from "react";
11
+ import { useResizeDetector } from "react-resize-detector";
12
+ import { merge } from "lodash-es";
13
+ import * as echarts from "echarts/core";
14
+ import ReactEChartsCore from "echarts-for-react/lib/core";
15
+ import { PieChart, LineChart } from "echarts/charts";
16
+ import { SVGRenderer } from "echarts/renderers";
17
+ import {
18
+ GridSimpleComponent,
19
+ AxisPointerComponent,
20
+ AriaComponent,
21
+ TooltipComponent,
22
+ GridComponent,
23
+ LegendComponent,
24
+ ToolboxComponent
25
+ } from "echarts/components";
26
+ import { jsx } from "react/jsx-runtime";
27
+ echarts.use([
28
+ SVGRenderer,
29
+ PieChart,
30
+ LineChart,
31
+ TooltipComponent,
32
+ GridComponent,
33
+ LegendComponent,
34
+ ToolboxComponent,
35
+ AriaComponent,
36
+ AxisPointerComponent,
37
+ GridSimpleComponent
38
+ ]);
39
+ function Chart(props) {
40
+ const { width, height, ref } = useResizeDetector({
41
+ handleHeight: false,
42
+ refreshMode: "debounce",
43
+ refreshRate: 100
44
+ });
45
+ const option = useMemo(() => {
46
+ const baseOption = {
47
+ textStyle: { fontFamily: "Noto Sans KR" },
48
+ tooltip: { textStyle: { fontSize: 16 } }
49
+ };
50
+ return merge(baseOption, props.option);
51
+ }, [props.option]);
52
+ return /* @__PURE__ */ jsx("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(
53
+ ReactEChartsCore,
54
+ __spreadProps(__spreadValues({
55
+ echarts,
56
+ opts: { renderer: "svg" },
57
+ style: { height, width },
58
+ theme: chart_theme_default
59
+ }, props), {
60
+ option
61
+ })
62
+ ) });
63
+ }
64
+ export {
65
+ Chart,
66
+ chart_theme_default as chartTheme
67
+ };
68
+ //# sourceMappingURL=chart-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/charts/chart-test.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\nimport { merge } from 'lodash-es';\nimport type { EChartsOption } from 'echarts';\nimport * as echarts from 'echarts/core';\nimport ReactEChartsCore from 'echarts-for-react/lib/core';\nimport { PieChart, LineChart } from 'echarts/charts';\nimport { SVGRenderer } from 'echarts/renderers';\nimport {\n GridSimpleComponent,\n // PolarComponent,\n // RadarComponent,\n // GeoComponent,\n // SingleAxisComponent,\n // ParallelComponent,\n // CalendarComponent,\n // GraphicComponent,\n AxisPointerComponent,\n // BrushComponent,\n // TimelineComponent,\n // MarkPointComponent,\n // MarkLineComponent,\n // MarkAreaComponent,\n // LegendScrollComponent,\n // LegendPlainComponent,\n // DataZoomComponent,\n // DataZoomInsideComponent,\n // DataZoomSliderComponent,\n // VisualMapComponent,\n // VisualMapContinuousComponent,\n // VisualMapPiecewiseComponent,\n AriaComponent,\n // TransformComponent,\n TooltipComponent,\n GridComponent,\n LegendComponent,\n ToolboxComponent,\n} from 'echarts/components';\nimport chartTheme from './chart-theme.json';\n\necharts.use([\n SVGRenderer,\n PieChart,\n LineChart,\n TooltipComponent,\n GridComponent,\n LegendComponent,\n ToolboxComponent,\n AriaComponent,\n AxisPointerComponent,\n GridSimpleComponent,\n]);\n\nexport type ChartProps = Omit<\n React.ComponentProps<typeof ReactEChartsCore>,\n 'option'\n> & {\n option: EChartsOption;\n};\n\nexport function Chart(props: ChartProps): JSX.Element {\n const { width, height, ref } = useResizeDetector({\n handleHeight: false,\n refreshMode: 'debounce',\n refreshRate: 100,\n });\n\n const option = useMemo(() => {\n const baseOption: EChartsOption = {\n textStyle: { fontFamily: 'Noto Sans KR' },\n tooltip: { textStyle: { fontSize: 16 } },\n };\n return merge(baseOption, props.option);\n }, [props.option]);\n\n return (\n <div ref={ref} style={{ width: '100%', height: '100%' }}>\n <ReactEChartsCore\n echarts={echarts}\n opts={{ renderer: 'svg' }}\n style={{ height, width }}\n theme={chartTheme}\n {...props}\n option={option}\n />\n </div>\n );\n}\n\nexport { chartTheme };\n"],"mappings":";;;;;;;;;AAAA,SAAgB,eAAe;AAC/B,SAAS,yBAAyB;AAClC,SAAS,aAAa;AAEtB,YAAY,aAAa;AACzB,OAAO,sBAAsB;AAC7B,SAAS,UAAU,iBAAiB;AACpC,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EAQA;AAAA,EAcA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAwCD;AArCE,YAAI;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AASM,SAAS,MAAM,OAAgC;AACpD,QAAM,EAAE,OAAO,QAAQ,IAAI,IAAI,kBAAkB;AAAA,IAC/C,cAAc;AAAA,IACd,aAAa;AAAA,IACb,aAAa;AAAA,EACf,CAAC;AAED,QAAM,SAAS,QAAQ,MAAM;AAC3B,UAAM,aAA4B;AAAA,MAChC,WAAW,EAAE,YAAY,eAAe;AAAA,MACxC,SAAS,EAAE,WAAW,EAAE,UAAU,GAAG,EAAE;AAAA,IACzC;AACA,WAAO,MAAM,YAAY,MAAM,MAAM;AAAA,EACvC,GAAG,CAAC,MAAM,MAAM,CAAC;AAEjB,SACE,oBAAC,SAAI,KAAU,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,GACpD;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAM,EAAE,UAAU,MAAM;AAAA,MACxB,OAAO,EAAE,QAAQ,MAAM;AAAA,MACvB,OAAO;AAAA,OACH,QALL;AAAA,MAMC;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
@@ -53,12 +53,8 @@ __export(chart_exports, {
53
53
  module.exports = __toCommonJS(chart_exports);
54
54
  var import_react = require("react");
55
55
  var import_react_resize_detector = require("react-resize-detector");
56
+ var import_echarts_for_react = __toESM(require("echarts-for-react"), 1);
56
57
  var import_lodash_es = require("lodash-es");
57
- var echarts = __toESM(require("echarts/core"), 1);
58
- var import_core = __toESM(require("echarts-for-react/lib/core"), 1);
59
- var import_charts = require("echarts/charts");
60
- var import_renderers = require("echarts/renderers");
61
- var import_components = require("echarts/components");
62
58
 
63
59
  // src/charts/chart-theme.json
64
60
  var chart_theme_default = {
@@ -200,18 +196,6 @@ var chart_theme_default = {
200
196
 
201
197
  // src/charts/chart.tsx
202
198
  var import_jsx_runtime = require("react/jsx-runtime");
203
- echarts.use([
204
- import_renderers.SVGRenderer,
205
- import_charts.PieChart,
206
- import_charts.LineChart,
207
- import_components.TooltipComponent,
208
- import_components.GridComponent,
209
- import_components.LegendComponent,
210
- import_components.ToolboxComponent,
211
- import_components.AriaComponent,
212
- import_components.AxisPointerComponent,
213
- import_components.GridSimpleComponent
214
- ]);
215
199
  function Chart(props) {
216
200
  const { width, height, ref } = (0, import_react_resize_detector.useResizeDetector)({
217
201
  handleHeight: false,
@@ -226,11 +210,10 @@ function Chart(props) {
226
210
  return (0, import_lodash_es.merge)(baseOption, props.option);
227
211
  }, [props.option]);
228
212
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
229
- import_core.default,
213
+ import_echarts_for_react.default,
230
214
  __spreadProps(__spreadValues({
231
- echarts,
232
215
  opts: { renderer: "svg" },
233
- style: { height, width },
216
+ style: { width, height },
234
217
  theme: chart_theme_default
235
218
  }, props), {
236
219
  option