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