tekivex-ui 2.5.7 → 2.5.8
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/TkxForm-2tGLCPH6.js +326 -0
- package/dist/TkxForm-C2VqR2wC.cjs +12 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +264 -251
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +21 -20
- package/dist/index-BgHMZe4Z.js +66 -0
- package/dist/index-Bt5y50Qa.cjs +1 -0
- package/dist/index-DnqXtpwV.cjs +2 -0
- package/dist/{index-CAXjeKoK.js → index-iUUHRxqJ.js} +77 -75
- package/dist/index.cjs +21 -21
- package/dist/index.js +24 -25
- package/dist/quantum.cjs +2 -2
- package/dist/quantum.js +4 -4
- package/dist/realtime.cjs +8 -4
- package/dist/realtime.js +391 -377
- package/dist/{security-loRa1HyV.js → security-C-ZPGoyG.js} +1 -1
- package/dist/{security-DMqZVW5d.cjs → security-Uf0mjv8o.cjs} +1 -1
- package/dist/src/charts/TkxDonutChart.d.ts.map +1 -1
- package/dist/src/charts/TkxPieChart.d.ts.map +1 -1
- package/dist/src/components/TkxForm.d.ts +17 -16
- package/dist/src/components/TkxForm.d.ts.map +1 -1
- package/dist/src/components/TkxLiveMetrics.d.ts.map +1 -1
- package/dist/src/components/TkxPlayground.d.ts.map +1 -1
- package/dist/src/components/TkxProgress.d.ts.map +1 -1
- package/dist/src/themes/index.d.ts.map +1 -1
- package/dist/{tkx-C_AlpMt4.js → tkx-BtHzWKTl.js} +1 -1
- package/dist/{tkx-69KQ0myA.cjs → tkx-C7GvVUE9.cjs} +1 -1
- package/package.json +5 -5
- package/src/charts/TkxDonutChart.tsx +6 -2
- package/src/charts/TkxPieChart.tsx +7 -3
- package/src/charts/shared.ts +4 -4
- package/src/components/TkxForm.tsx +35 -32
- package/src/components/TkxLiveMetrics.tsx +24 -2
- package/src/components/TkxPlayground.tsx +40 -5
- package/src/components/TkxProgress.tsx +0 -2
- package/src/themes/index.ts +8 -1
- package/dist/TkxForm-BK5Sq7oj.cjs +0 -12
- package/dist/TkxForm-br3i_vo8.js +0 -388
- package/dist/index-DB_m7X7e.cjs +0 -2
package/dist/charts.js
CHANGED
|
@@ -1,61 +1,66 @@
|
|
|
1
1
|
import { jsx as t, jsxs as g, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import { ResponsiveContainer as v, AreaChart as
|
|
3
|
-
import { u as z } from "./index-
|
|
2
|
+
import { ResponsiveContainer as v, AreaChart as E, CartesianGrid as D, XAxis as F, YAxis as K, Tooltip as L, Legend as w, Area as G, BarChart as q, Bar as H, LineChart as N, ReferenceLine as U, Line as V, PieChart as P, Pie as B, Cell as I, ScatterChart as X, ZAxis as Y, Scatter as Z, RadarChart as _, PolarGrid as J, PolarAngleAxis as Q, PolarRadiusAxis as tt, Radar as et } from "recharts";
|
|
3
|
+
import { u as z } from "./index-iUUHRxqJ.js";
|
|
4
4
|
import { useState as O, useEffect as $ } from "react";
|
|
5
|
-
|
|
5
|
+
import { u as j } from "./index-BgHMZe4Z.js";
|
|
6
|
+
function M(e) {
|
|
6
7
|
return [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
8
|
+
e.primary,
|
|
9
|
+
e.secondary,
|
|
10
|
+
e.info,
|
|
11
|
+
e.success,
|
|
12
|
+
e.warning,
|
|
13
|
+
e.danger,
|
|
14
|
+
e.primary + "aa",
|
|
15
|
+
// primary at 67% opacity
|
|
16
|
+
e.secondary + "aa",
|
|
17
|
+
// secondary at 67% opacity
|
|
18
|
+
e.info + "aa",
|
|
19
|
+
// info at 67% opacity
|
|
20
|
+
e.success + "aa"
|
|
21
|
+
// success at 67% opacity
|
|
17
22
|
];
|
|
18
23
|
}
|
|
19
24
|
const T = { top: 10, right: 30, bottom: 10, left: 0 };
|
|
20
|
-
function
|
|
25
|
+
function C(e) {
|
|
21
26
|
return {
|
|
22
27
|
contentStyle: {
|
|
23
|
-
backgroundColor:
|
|
24
|
-
border: `1px solid ${
|
|
28
|
+
backgroundColor: e.surface,
|
|
29
|
+
border: `1px solid ${e.border}`,
|
|
25
30
|
borderRadius: 8,
|
|
26
31
|
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
27
|
-
color:
|
|
32
|
+
color: e.text,
|
|
28
33
|
fontSize: 13
|
|
29
34
|
},
|
|
30
|
-
labelStyle: { color:
|
|
31
|
-
itemStyle: { color:
|
|
32
|
-
cursor: { fill: `${
|
|
35
|
+
labelStyle: { color: e.textMuted, fontWeight: 600, marginBottom: 4 },
|
|
36
|
+
itemStyle: { color: e.text },
|
|
37
|
+
cursor: { fill: `${e.primary}15` }
|
|
33
38
|
};
|
|
34
39
|
}
|
|
35
|
-
function
|
|
36
|
-
data:
|
|
37
|
-
series:
|
|
38
|
-
xKey:
|
|
39
|
-
height:
|
|
40
|
+
function nt({
|
|
41
|
+
data: e,
|
|
42
|
+
series: S,
|
|
43
|
+
xKey: f,
|
|
44
|
+
height: p = 300,
|
|
40
45
|
margin: d = T,
|
|
41
46
|
showGrid: y = !0,
|
|
42
|
-
showLegend:
|
|
43
|
-
showTooltip:
|
|
44
|
-
smooth:
|
|
47
|
+
showLegend: m = !0,
|
|
48
|
+
showTooltip: x = !0,
|
|
49
|
+
smooth: a = !0,
|
|
45
50
|
xTickFormatter: u,
|
|
46
|
-
yTickFormatter:
|
|
47
|
-
yDomain:
|
|
48
|
-
ariaLabel:
|
|
51
|
+
yTickFormatter: o,
|
|
52
|
+
yDomain: l,
|
|
53
|
+
ariaLabel: h = "Area chart"
|
|
49
54
|
}) {
|
|
50
|
-
const
|
|
51
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
52
|
-
y && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke:
|
|
55
|
+
const r = z(), n = M(r), i = C(r), k = { fill: r.textMuted, fontSize: 12 };
|
|
56
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": h, style: { width: "100%", height: p }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(E, { data: e, margin: d, children: [
|
|
57
|
+
y && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke: r.border, vertical: !1 }),
|
|
53
58
|
/* @__PURE__ */ t(
|
|
54
59
|
F,
|
|
55
60
|
{
|
|
56
|
-
dataKey:
|
|
57
|
-
tick:
|
|
58
|
-
axisLine: { stroke:
|
|
61
|
+
dataKey: f,
|
|
62
|
+
tick: k,
|
|
63
|
+
axisLine: { stroke: r.border },
|
|
59
64
|
tickLine: !1,
|
|
60
65
|
tickFormatter: u
|
|
61
66
|
}
|
|
@@ -63,96 +68,96 @@ function ot({
|
|
|
63
68
|
/* @__PURE__ */ t(
|
|
64
69
|
K,
|
|
65
70
|
{
|
|
66
|
-
tick:
|
|
71
|
+
tick: k,
|
|
67
72
|
axisLine: !1,
|
|
68
73
|
tickLine: !1,
|
|
69
|
-
tickFormatter:
|
|
70
|
-
domain:
|
|
74
|
+
tickFormatter: o,
|
|
75
|
+
domain: l
|
|
71
76
|
}
|
|
72
77
|
),
|
|
73
|
-
|
|
78
|
+
x && /* @__PURE__ */ t(
|
|
74
79
|
L,
|
|
75
80
|
{
|
|
76
|
-
contentStyle:
|
|
77
|
-
labelStyle:
|
|
78
|
-
itemStyle:
|
|
79
|
-
cursor:
|
|
81
|
+
contentStyle: i.contentStyle,
|
|
82
|
+
labelStyle: i.labelStyle,
|
|
83
|
+
itemStyle: i.itemStyle,
|
|
84
|
+
cursor: i.cursor
|
|
80
85
|
}
|
|
81
86
|
),
|
|
82
|
-
|
|
87
|
+
m && /* @__PURE__ */ t(
|
|
83
88
|
w,
|
|
84
89
|
{
|
|
85
|
-
wrapperStyle: { fontSize: 13, color:
|
|
90
|
+
wrapperStyle: { fontSize: 13, color: r.textMuted, paddingTop: 8 }
|
|
86
91
|
}
|
|
87
92
|
),
|
|
88
|
-
|
|
89
|
-
const
|
|
93
|
+
S.map((s, b) => {
|
|
94
|
+
const c = s.color ?? n[b % n.length];
|
|
90
95
|
return /* @__PURE__ */ t(
|
|
91
|
-
|
|
96
|
+
G,
|
|
92
97
|
{
|
|
93
|
-
type:
|
|
94
|
-
dataKey:
|
|
95
|
-
name:
|
|
96
|
-
stroke:
|
|
98
|
+
type: a ? "monotone" : "linear",
|
|
99
|
+
dataKey: s.key,
|
|
100
|
+
name: s.label ?? s.key,
|
|
101
|
+
stroke: c,
|
|
97
102
|
strokeWidth: 2,
|
|
98
|
-
fill:
|
|
99
|
-
fillOpacity:
|
|
100
|
-
stackId:
|
|
103
|
+
fill: c,
|
|
104
|
+
fillOpacity: s.fillOpacity ?? 0.2,
|
|
105
|
+
stackId: s.stacked ? "stack" : void 0,
|
|
101
106
|
dot: !1,
|
|
102
107
|
activeDot: { r: 5, strokeWidth: 0 }
|
|
103
108
|
},
|
|
104
|
-
|
|
109
|
+
s.key
|
|
105
110
|
);
|
|
106
111
|
})
|
|
107
112
|
] }) }) });
|
|
108
113
|
}
|
|
109
|
-
function
|
|
110
|
-
data:
|
|
111
|
-
series:
|
|
112
|
-
xKey:
|
|
113
|
-
height:
|
|
114
|
+
function ct({
|
|
115
|
+
data: e,
|
|
116
|
+
series: S,
|
|
117
|
+
xKey: f,
|
|
118
|
+
height: p = 300,
|
|
114
119
|
margin: d = T,
|
|
115
120
|
showGrid: y = !0,
|
|
116
|
-
showLegend:
|
|
117
|
-
showTooltip:
|
|
118
|
-
layout:
|
|
121
|
+
showLegend: m = !0,
|
|
122
|
+
showTooltip: x = !0,
|
|
123
|
+
layout: a = "horizontal",
|
|
119
124
|
barSize: u,
|
|
120
|
-
xTickFormatter:
|
|
121
|
-
yTickFormatter:
|
|
122
|
-
ariaLabel:
|
|
125
|
+
xTickFormatter: o,
|
|
126
|
+
yTickFormatter: l,
|
|
127
|
+
ariaLabel: h = "Bar chart"
|
|
123
128
|
}) {
|
|
124
|
-
const
|
|
125
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
129
|
+
const r = z(), n = M(r), i = C(r), k = { fill: r.textMuted, fontSize: 12 }, s = a === "vertical";
|
|
130
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": h, style: { width: "100%", height: p }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(q, { data: e, margin: d, layout: a, children: [
|
|
126
131
|
y && /* @__PURE__ */ t(
|
|
127
132
|
D,
|
|
128
133
|
{
|
|
129
134
|
strokeDasharray: "3 3",
|
|
130
|
-
stroke:
|
|
131
|
-
vertical:
|
|
132
|
-
horizontal: !
|
|
135
|
+
stroke: r.border,
|
|
136
|
+
vertical: s,
|
|
137
|
+
horizontal: !s
|
|
133
138
|
}
|
|
134
139
|
),
|
|
135
|
-
|
|
136
|
-
/* @__PURE__ */ t(K, { dataKey:
|
|
137
|
-
/* @__PURE__ */ t(F, { type: "number", tick:
|
|
140
|
+
s ? /* @__PURE__ */ g(R, { children: [
|
|
141
|
+
/* @__PURE__ */ t(K, { dataKey: f, type: "category", tick: k, axisLine: !1, tickLine: !1, tickFormatter: o, width: 100 }),
|
|
142
|
+
/* @__PURE__ */ t(F, { type: "number", tick: k, axisLine: { stroke: r.border }, tickLine: !1, tickFormatter: l })
|
|
138
143
|
] }) : /* @__PURE__ */ g(R, { children: [
|
|
139
|
-
/* @__PURE__ */ t(F, { dataKey:
|
|
140
|
-
/* @__PURE__ */ t(K, { tick:
|
|
144
|
+
/* @__PURE__ */ t(F, { dataKey: f, tick: k, axisLine: { stroke: r.border }, tickLine: !1, tickFormatter: o }),
|
|
145
|
+
/* @__PURE__ */ t(K, { tick: k, axisLine: !1, tickLine: !1, tickFormatter: l })
|
|
141
146
|
] }),
|
|
142
|
-
|
|
147
|
+
x && /* @__PURE__ */ t(
|
|
143
148
|
L,
|
|
144
149
|
{
|
|
145
|
-
contentStyle:
|
|
146
|
-
labelStyle:
|
|
147
|
-
itemStyle:
|
|
148
|
-
cursor: { fill: `${
|
|
150
|
+
contentStyle: i.contentStyle,
|
|
151
|
+
labelStyle: i.labelStyle,
|
|
152
|
+
itemStyle: i.itemStyle,
|
|
153
|
+
cursor: { fill: `${r.surfaceAlt}` }
|
|
149
154
|
}
|
|
150
155
|
),
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const A = b.color ?? c
|
|
156
|
+
m && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: r.textMuted, paddingTop: 8 } }),
|
|
157
|
+
S.map((b, c) => {
|
|
158
|
+
const A = b.color ?? n[c % n.length];
|
|
154
159
|
return /* @__PURE__ */ t(
|
|
155
|
-
|
|
160
|
+
H,
|
|
156
161
|
{
|
|
157
162
|
dataKey: b.key,
|
|
158
163
|
name: b.label ?? b.key,
|
|
@@ -166,34 +171,34 @@ function at({
|
|
|
166
171
|
})
|
|
167
172
|
] }) }) });
|
|
168
173
|
}
|
|
169
|
-
function
|
|
170
|
-
data:
|
|
171
|
-
series:
|
|
172
|
-
xKey:
|
|
173
|
-
height:
|
|
174
|
+
function dt({
|
|
175
|
+
data: e,
|
|
176
|
+
series: S,
|
|
177
|
+
xKey: f,
|
|
178
|
+
height: p = 300,
|
|
174
179
|
margin: d = T,
|
|
175
180
|
showGrid: y = !0,
|
|
176
|
-
showLegend:
|
|
177
|
-
showTooltip:
|
|
178
|
-
smooth:
|
|
181
|
+
showLegend: m = !0,
|
|
182
|
+
showTooltip: x = !0,
|
|
183
|
+
smooth: a = !0,
|
|
179
184
|
referenceLines: u = [],
|
|
180
|
-
xTickFormatter:
|
|
181
|
-
yTickFormatter:
|
|
182
|
-
yDomain:
|
|
183
|
-
connectNulls:
|
|
184
|
-
ariaLabel:
|
|
185
|
+
xTickFormatter: o,
|
|
186
|
+
yTickFormatter: l,
|
|
187
|
+
yDomain: h,
|
|
188
|
+
connectNulls: r = !1,
|
|
189
|
+
ariaLabel: n = "Line chart"
|
|
185
190
|
}) {
|
|
186
|
-
const
|
|
187
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
188
|
-
y && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke:
|
|
191
|
+
const i = z(), k = M(i), s = C(i), b = { fill: i.textMuted, fontSize: 12 };
|
|
192
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": n, style: { width: "100%", height: p }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(N, { data: e, margin: d, children: [
|
|
193
|
+
y && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke: i.border, vertical: !1 }),
|
|
189
194
|
/* @__PURE__ */ t(
|
|
190
195
|
F,
|
|
191
196
|
{
|
|
192
|
-
dataKey:
|
|
197
|
+
dataKey: f,
|
|
193
198
|
tick: b,
|
|
194
|
-
axisLine: { stroke:
|
|
199
|
+
axisLine: { stroke: i.border },
|
|
195
200
|
tickLine: !1,
|
|
196
|
-
tickFormatter:
|
|
201
|
+
tickFormatter: o
|
|
197
202
|
}
|
|
198
203
|
),
|
|
199
204
|
/* @__PURE__ */ t(
|
|
@@ -202,100 +207,104 @@ function nt({
|
|
|
202
207
|
tick: b,
|
|
203
208
|
axisLine: !1,
|
|
204
209
|
tickLine: !1,
|
|
205
|
-
tickFormatter:
|
|
206
|
-
domain:
|
|
210
|
+
tickFormatter: l,
|
|
211
|
+
domain: h
|
|
207
212
|
}
|
|
208
213
|
),
|
|
209
|
-
|
|
214
|
+
x && /* @__PURE__ */ t(
|
|
210
215
|
L,
|
|
211
216
|
{
|
|
212
|
-
contentStyle:
|
|
213
|
-
labelStyle:
|
|
214
|
-
itemStyle:
|
|
215
|
-
cursor: { stroke:
|
|
217
|
+
contentStyle: s.contentStyle,
|
|
218
|
+
labelStyle: s.labelStyle,
|
|
219
|
+
itemStyle: s.itemStyle,
|
|
220
|
+
cursor: { stroke: i.border, strokeWidth: 1 }
|
|
216
221
|
}
|
|
217
222
|
),
|
|
218
|
-
|
|
219
|
-
u.map((
|
|
220
|
-
|
|
223
|
+
m && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: i.textMuted, paddingTop: 8 } }),
|
|
224
|
+
u.map((c, A) => /* @__PURE__ */ t(
|
|
225
|
+
U,
|
|
221
226
|
{
|
|
222
|
-
y:
|
|
223
|
-
x:
|
|
224
|
-
label:
|
|
225
|
-
stroke:
|
|
226
|
-
strokeDasharray:
|
|
227
|
+
y: c.y,
|
|
228
|
+
x: c.x,
|
|
229
|
+
label: c.label ? { value: c.label, fill: i.textMuted, fontSize: 11 } : void 0,
|
|
230
|
+
stroke: c.color ?? i.border,
|
|
231
|
+
strokeDasharray: c.dashed ? "4 4" : void 0
|
|
227
232
|
},
|
|
228
233
|
A
|
|
229
234
|
)),
|
|
230
|
-
|
|
231
|
-
const W =
|
|
235
|
+
S.map((c, A) => {
|
|
236
|
+
const W = c.color ?? k[A % k.length];
|
|
232
237
|
return /* @__PURE__ */ t(
|
|
233
|
-
|
|
238
|
+
V,
|
|
234
239
|
{
|
|
235
|
-
type:
|
|
236
|
-
dataKey:
|
|
237
|
-
name:
|
|
240
|
+
type: a ? "monotone" : "linear",
|
|
241
|
+
dataKey: c.key,
|
|
242
|
+
name: c.label ?? c.key,
|
|
238
243
|
stroke: W,
|
|
239
|
-
strokeWidth:
|
|
240
|
-
strokeDasharray:
|
|
241
|
-
dot:
|
|
244
|
+
strokeWidth: c.strokeWidth ?? 2,
|
|
245
|
+
strokeDasharray: c.dashed ? "6 3" : void 0,
|
|
246
|
+
dot: c.dot ?? !1,
|
|
242
247
|
activeDot: { r: 5, strokeWidth: 0, fill: W },
|
|
243
|
-
connectNulls:
|
|
248
|
+
connectNulls: r
|
|
244
249
|
},
|
|
245
|
-
|
|
250
|
+
c.key
|
|
246
251
|
);
|
|
247
252
|
})
|
|
248
253
|
] }) }) });
|
|
249
254
|
}
|
|
250
|
-
function
|
|
251
|
-
data:
|
|
252
|
-
height:
|
|
253
|
-
showLegend:
|
|
254
|
-
showTooltip:
|
|
255
|
+
function st({
|
|
256
|
+
data: e,
|
|
257
|
+
height: S = 300,
|
|
258
|
+
showLegend: f = !0,
|
|
259
|
+
showTooltip: p = !0,
|
|
255
260
|
showLabels: d = !1,
|
|
256
261
|
outerRadius: y = "70%",
|
|
257
|
-
startAngle:
|
|
258
|
-
ariaLabel:
|
|
262
|
+
startAngle: m = 90,
|
|
263
|
+
ariaLabel: x = "Pie chart"
|
|
259
264
|
}) {
|
|
260
|
-
const
|
|
265
|
+
const a = z(), u = j(), o = M(a), l = C(a), [h, r] = O(u);
|
|
261
266
|
return $(() => {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
267
|
+
if (u) {
|
|
268
|
+
r(!0);
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const n = requestAnimationFrame(() => r(!0));
|
|
272
|
+
return () => cancelAnimationFrame(n);
|
|
273
|
+
}, [u]), /* @__PURE__ */ t(
|
|
265
274
|
"div",
|
|
266
275
|
{
|
|
267
276
|
role: "img",
|
|
268
|
-
"aria-label":
|
|
269
|
-
style: { width: "100%", minWidth: 240, height:
|
|
270
|
-
children:
|
|
271
|
-
|
|
277
|
+
"aria-label": x,
|
|
278
|
+
style: { width: "100%", minWidth: 240, height: S, position: "relative" },
|
|
279
|
+
children: h && /* @__PURE__ */ t(v, { width: "100%", height: "100%", debounce: 50, children: /* @__PURE__ */ g(P, { children: [
|
|
280
|
+
p && /* @__PURE__ */ t(
|
|
272
281
|
L,
|
|
273
282
|
{
|
|
274
|
-
contentStyle:
|
|
275
|
-
labelStyle:
|
|
276
|
-
itemStyle:
|
|
283
|
+
contentStyle: l.contentStyle,
|
|
284
|
+
labelStyle: l.labelStyle,
|
|
285
|
+
itemStyle: l.itemStyle
|
|
277
286
|
}
|
|
278
287
|
),
|
|
279
|
-
|
|
288
|
+
f && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: a.textMuted } }),
|
|
280
289
|
/* @__PURE__ */ t(
|
|
281
290
|
B,
|
|
282
291
|
{
|
|
283
|
-
data:
|
|
292
|
+
data: e,
|
|
284
293
|
dataKey: "value",
|
|
285
294
|
nameKey: "name",
|
|
286
295
|
outerRadius: y,
|
|
287
|
-
startAngle:
|
|
288
|
-
endAngle:
|
|
289
|
-
label: d ? ({ name:
|
|
296
|
+
startAngle: m,
|
|
297
|
+
endAngle: m - 360,
|
|
298
|
+
label: d ? ({ name: n, percent: i }) => `${n} (${(i * 100).toFixed(0)}%)` : void 0,
|
|
290
299
|
labelLine: d,
|
|
291
300
|
strokeWidth: 2,
|
|
292
|
-
stroke:
|
|
293
|
-
children:
|
|
301
|
+
stroke: a.bg,
|
|
302
|
+
children: e.map((n, i) => /* @__PURE__ */ t(
|
|
294
303
|
I,
|
|
295
304
|
{
|
|
296
|
-
fill:
|
|
305
|
+
fill: n.color ?? o[i % o.length]
|
|
297
306
|
},
|
|
298
|
-
|
|
307
|
+
n.name
|
|
299
308
|
))
|
|
300
309
|
}
|
|
301
310
|
)
|
|
@@ -303,54 +312,58 @@ function ct({
|
|
|
303
312
|
}
|
|
304
313
|
);
|
|
305
314
|
}
|
|
306
|
-
function
|
|
307
|
-
data:
|
|
308
|
-
height:
|
|
309
|
-
showLegend:
|
|
310
|
-
showTooltip:
|
|
315
|
+
function yt({
|
|
316
|
+
data: e,
|
|
317
|
+
height: S = 300,
|
|
318
|
+
showLegend: f = !0,
|
|
319
|
+
showTooltip: p = !0,
|
|
311
320
|
centerLabel: d,
|
|
312
321
|
centerSublabel: y,
|
|
313
|
-
innerRadius:
|
|
314
|
-
outerRadius:
|
|
315
|
-
startAngle:
|
|
322
|
+
innerRadius: m = "55%",
|
|
323
|
+
outerRadius: x = "75%",
|
|
324
|
+
startAngle: a = 90,
|
|
316
325
|
ariaLabel: u = "Donut chart"
|
|
317
326
|
}) {
|
|
318
|
-
const
|
|
327
|
+
const o = z(), l = j(), h = M(o), r = C(o), [n, i] = O(l);
|
|
319
328
|
return $(() => {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
329
|
+
if (l) {
|
|
330
|
+
i(!0);
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
const k = requestAnimationFrame(() => i(!0));
|
|
334
|
+
return () => cancelAnimationFrame(k);
|
|
335
|
+
}, [l]), /* @__PURE__ */ g(
|
|
323
336
|
"div",
|
|
324
337
|
{
|
|
325
338
|
role: "img",
|
|
326
339
|
"aria-label": u,
|
|
327
|
-
style: { width: "100%", minWidth: 240, height:
|
|
340
|
+
style: { width: "100%", minWidth: 240, height: S, position: "relative" },
|
|
328
341
|
children: [
|
|
329
|
-
|
|
330
|
-
|
|
342
|
+
n && /* @__PURE__ */ t(v, { width: "100%", height: "100%", debounce: 50, children: /* @__PURE__ */ g(P, { children: [
|
|
343
|
+
p && /* @__PURE__ */ t(
|
|
331
344
|
L,
|
|
332
345
|
{
|
|
333
|
-
contentStyle:
|
|
334
|
-
labelStyle:
|
|
335
|
-
itemStyle:
|
|
346
|
+
contentStyle: r.contentStyle,
|
|
347
|
+
labelStyle: r.labelStyle,
|
|
348
|
+
itemStyle: r.itemStyle
|
|
336
349
|
}
|
|
337
350
|
),
|
|
338
|
-
|
|
351
|
+
f && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: o.textMuted } }),
|
|
339
352
|
/* @__PURE__ */ t(
|
|
340
353
|
B,
|
|
341
354
|
{
|
|
342
|
-
data:
|
|
355
|
+
data: e,
|
|
343
356
|
dataKey: "value",
|
|
344
357
|
nameKey: "name",
|
|
345
|
-
innerRadius:
|
|
346
|
-
outerRadius:
|
|
347
|
-
startAngle:
|
|
348
|
-
endAngle:
|
|
358
|
+
innerRadius: m,
|
|
359
|
+
outerRadius: x,
|
|
360
|
+
startAngle: a,
|
|
361
|
+
endAngle: a - 360,
|
|
349
362
|
strokeWidth: 3,
|
|
350
|
-
stroke:
|
|
363
|
+
stroke: o.bg,
|
|
351
364
|
label: !1,
|
|
352
365
|
labelLine: !1,
|
|
353
|
-
children:
|
|
366
|
+
children: e.map((k, s) => /* @__PURE__ */ t(I, { fill: k.color ?? h[s % h.length] }, k.name))
|
|
354
367
|
}
|
|
355
368
|
),
|
|
356
369
|
(d || y) && /* @__PURE__ */ t("text", {})
|
|
@@ -366,11 +379,11 @@ function dt({
|
|
|
366
379
|
alignItems: "center",
|
|
367
380
|
justifyContent: "center",
|
|
368
381
|
pointerEvents: "none",
|
|
369
|
-
marginTop:
|
|
382
|
+
marginTop: f ? -24 : 0
|
|
370
383
|
},
|
|
371
384
|
children: [
|
|
372
|
-
d && /* @__PURE__ */ t("span", { style: { fontSize: 22, fontWeight: 700, color:
|
|
373
|
-
y && /* @__PURE__ */ t("span", { style: { fontSize: 13, color:
|
|
385
|
+
d && /* @__PURE__ */ t("span", { style: { fontSize: 22, fontWeight: 700, color: o.text, lineHeight: 1 }, children: d }),
|
|
386
|
+
y && /* @__PURE__ */ t("span", { style: { fontSize: 13, color: o.textMuted, marginTop: 4 }, children: y })
|
|
374
387
|
]
|
|
375
388
|
}
|
|
376
389
|
)
|
|
@@ -378,30 +391,30 @@ function dt({
|
|
|
378
391
|
}
|
|
379
392
|
);
|
|
380
393
|
}
|
|
381
|
-
function
|
|
382
|
-
series:
|
|
383
|
-
height:
|
|
384
|
-
margin:
|
|
385
|
-
showGrid:
|
|
394
|
+
function ut({
|
|
395
|
+
series: e,
|
|
396
|
+
height: S = 300,
|
|
397
|
+
margin: f = T,
|
|
398
|
+
showGrid: p = !0,
|
|
386
399
|
showLegend: d = !0,
|
|
387
400
|
showTooltip: y = !0,
|
|
388
|
-
xTickFormatter:
|
|
389
|
-
yTickFormatter:
|
|
390
|
-
zRange:
|
|
401
|
+
xTickFormatter: m,
|
|
402
|
+
yTickFormatter: x,
|
|
403
|
+
zRange: a = [20, 400],
|
|
391
404
|
ariaLabel: u = "Scatter chart"
|
|
392
405
|
}) {
|
|
393
|
-
const
|
|
394
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label": u, style: { width: "100%", height:
|
|
395
|
-
|
|
406
|
+
const o = z(), l = M(o), h = C(o), r = { fill: o.textMuted, fontSize: 12 };
|
|
407
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": u, style: { width: "100%", height: S }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(X, { margin: f, children: [
|
|
408
|
+
p && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke: o.border }),
|
|
396
409
|
/* @__PURE__ */ t(
|
|
397
410
|
F,
|
|
398
411
|
{
|
|
399
412
|
type: "number",
|
|
400
413
|
dataKey: "x",
|
|
401
|
-
tick:
|
|
402
|
-
axisLine: { stroke:
|
|
414
|
+
tick: r,
|
|
415
|
+
axisLine: { stroke: o.border },
|
|
403
416
|
tickLine: !1,
|
|
404
|
-
tickFormatter:
|
|
417
|
+
tickFormatter: m
|
|
405
418
|
}
|
|
406
419
|
),
|
|
407
420
|
/* @__PURE__ */ t(
|
|
@@ -409,59 +422,59 @@ function st({
|
|
|
409
422
|
{
|
|
410
423
|
type: "number",
|
|
411
424
|
dataKey: "y",
|
|
412
|
-
tick:
|
|
425
|
+
tick: r,
|
|
413
426
|
axisLine: !1,
|
|
414
427
|
tickLine: !1,
|
|
415
|
-
tickFormatter:
|
|
428
|
+
tickFormatter: x
|
|
416
429
|
}
|
|
417
430
|
),
|
|
418
|
-
/* @__PURE__ */ t(
|
|
431
|
+
/* @__PURE__ */ t(Y, { type: "number", dataKey: "z", range: a }),
|
|
419
432
|
y && /* @__PURE__ */ t(
|
|
420
433
|
L,
|
|
421
434
|
{
|
|
422
|
-
contentStyle:
|
|
423
|
-
labelStyle:
|
|
424
|
-
itemStyle:
|
|
435
|
+
contentStyle: h.contentStyle,
|
|
436
|
+
labelStyle: h.labelStyle,
|
|
437
|
+
itemStyle: h.itemStyle,
|
|
425
438
|
cursor: { strokeDasharray: "3 3" }
|
|
426
439
|
}
|
|
427
440
|
),
|
|
428
|
-
d && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color:
|
|
429
|
-
|
|
430
|
-
|
|
441
|
+
d && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: o.textMuted, paddingTop: 8 } }),
|
|
442
|
+
e.map((n, i) => /* @__PURE__ */ t(
|
|
443
|
+
Z,
|
|
431
444
|
{
|
|
432
|
-
name:
|
|
433
|
-
data:
|
|
434
|
-
fill:
|
|
445
|
+
name: n.name,
|
|
446
|
+
data: n.data,
|
|
447
|
+
fill: n.color ?? l[i % l.length],
|
|
435
448
|
fillOpacity: 0.8
|
|
436
449
|
},
|
|
437
|
-
|
|
450
|
+
n.name ?? i
|
|
438
451
|
))
|
|
439
452
|
] }) }) });
|
|
440
453
|
}
|
|
441
|
-
function
|
|
442
|
-
data:
|
|
443
|
-
series:
|
|
444
|
-
angleKey:
|
|
445
|
-
height:
|
|
454
|
+
function ht({
|
|
455
|
+
data: e,
|
|
456
|
+
series: S,
|
|
457
|
+
angleKey: f,
|
|
458
|
+
height: p = 300,
|
|
446
459
|
showLegend: d = !0,
|
|
447
460
|
showTooltip: y = !0,
|
|
448
|
-
outerRadius:
|
|
449
|
-
ariaLabel:
|
|
461
|
+
outerRadius: m = "70%",
|
|
462
|
+
ariaLabel: x = "Radar chart"
|
|
450
463
|
}) {
|
|
451
|
-
const
|
|
452
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
453
|
-
/* @__PURE__ */ t(
|
|
464
|
+
const a = z(), u = M(a), o = C(a);
|
|
465
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": x, style: { width: "100%", height: p }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(_, { data: e, outerRadius: m, children: [
|
|
466
|
+
/* @__PURE__ */ t(J, { stroke: a.border }),
|
|
454
467
|
/* @__PURE__ */ t(
|
|
455
|
-
|
|
468
|
+
Q,
|
|
456
469
|
{
|
|
457
|
-
dataKey:
|
|
458
|
-
tick: { fill:
|
|
470
|
+
dataKey: f,
|
|
471
|
+
tick: { fill: a.textMuted, fontSize: 12 }
|
|
459
472
|
}
|
|
460
473
|
),
|
|
461
474
|
/* @__PURE__ */ t(
|
|
462
|
-
|
|
475
|
+
tt,
|
|
463
476
|
{
|
|
464
|
-
tick: { fill:
|
|
477
|
+
tick: { fill: a.textMuted, fontSize: 10 },
|
|
465
478
|
axisLine: !1,
|
|
466
479
|
tickLine: !1
|
|
467
480
|
}
|
|
@@ -469,35 +482,35 @@ function yt({
|
|
|
469
482
|
y && /* @__PURE__ */ t(
|
|
470
483
|
L,
|
|
471
484
|
{
|
|
472
|
-
contentStyle:
|
|
473
|
-
labelStyle:
|
|
474
|
-
itemStyle:
|
|
485
|
+
contentStyle: o.contentStyle,
|
|
486
|
+
labelStyle: o.labelStyle,
|
|
487
|
+
itemStyle: o.itemStyle
|
|
475
488
|
}
|
|
476
489
|
),
|
|
477
|
-
d && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color:
|
|
478
|
-
|
|
479
|
-
const
|
|
490
|
+
d && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: a.textMuted } }),
|
|
491
|
+
S.map((l, h) => {
|
|
492
|
+
const r = l.color ?? u[h % u.length];
|
|
480
493
|
return /* @__PURE__ */ t(
|
|
481
|
-
|
|
494
|
+
et,
|
|
482
495
|
{
|
|
483
|
-
name:
|
|
484
|
-
dataKey:
|
|
485
|
-
stroke:
|
|
486
|
-
fill:
|
|
487
|
-
fillOpacity:
|
|
496
|
+
name: l.label ?? l.key,
|
|
497
|
+
dataKey: l.key,
|
|
498
|
+
stroke: r,
|
|
499
|
+
fill: r,
|
|
500
|
+
fillOpacity: l.fillOpacity ?? 0.2,
|
|
488
501
|
strokeWidth: 2
|
|
489
502
|
},
|
|
490
|
-
|
|
503
|
+
l.key
|
|
491
504
|
);
|
|
492
505
|
})
|
|
493
506
|
] }) }) });
|
|
494
507
|
}
|
|
495
508
|
export {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
509
|
+
nt as TkxAreaChart,
|
|
510
|
+
ct as TkxBarChart,
|
|
511
|
+
yt as TkxDonutChart,
|
|
512
|
+
dt as TkxLineChart,
|
|
513
|
+
st as TkxPieChart,
|
|
514
|
+
ht as TkxRadarChart,
|
|
515
|
+
ut as TkxScatterChart
|
|
503
516
|
};
|