kanto-ds 1.3.0 → 1.4.0
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/README.md +3 -3
- package/dist/chunks/{defaults-DKzFsNbv.js → defaults-BwgjMcww.js} +27 -26
- package/dist/chunks/{defaults-DKzFsNbv.js.map → defaults-BwgjMcww.js.map} +1 -1
- package/dist/chunks/{index-fzPIgxe2.js → index-DSSLJirw.js} +17 -12
- package/dist/chunks/index-DSSLJirw.js.map +1 -0
- package/dist/chunks/{kt-element-mdd5cXZX.js → kt-element-E-tfJpGQ.js} +2 -2
- package/dist/chunks/{kt-element-mdd5cXZX.js.map → kt-element-E-tfJpGQ.js.map} +1 -1
- package/dist/components/core/kt-avatar/kt-avatar.js +2 -2
- package/dist/components/core/kt-badge/kt-badge.js +2 -2
- package/dist/components/core/kt-button/kt-button.js +1 -1
- package/dist/components/core/kt-card/kt-card.js +1 -1
- package/dist/components/core/kt-code/kt-code.js +2 -2
- package/dist/components/core/kt-icon/kt-icon.js +2 -2
- package/dist/components/core/kt-kbd/kt-kbd.js +1 -1
- package/dist/components/core/kt-split-button/kt-split-button.js +2 -2
- package/dist/components/data/kt-chart/kt-chart.js +51 -51
- package/dist/components/data/kt-chart/kt-chart.js.map +1 -1
- package/dist/components/data/kt-meter/kt-meter.js +1 -1
- package/dist/components/data/kt-pagination/kt-pagination.js +2 -2
- package/dist/components/data/kt-stat/kt-stat.js +1 -1
- package/dist/components/data/kt-table/kt-table.js +2 -2
- package/dist/components/data/kt-timeline/kt-timeline.js +1 -1
- package/dist/components/feedback/kt-alert/kt-alert.js +2 -2
- package/dist/components/feedback/kt-empty-state/kt-empty-state.js +1 -1
- package/dist/components/feedback/kt-progress-bar/kt-progress-bar.js +1 -1
- package/dist/components/feedback/kt-skeleton/kt-skeleton.js +1 -1
- package/dist/components/feedback/kt-toast/kt-toast.js +2 -2
- package/dist/components/feedback/kt-toast-container/kt-toast-container.js +1 -1
- package/dist/components/feedback/kt-tooltip/kt-tooltip.js +1 -1
- package/dist/components/forms/kt-checkbox/kt-checkbox.d.ts +66 -0
- package/dist/components/forms/kt-checkbox/kt-checkbox.js +198 -0
- package/dist/components/forms/kt-checkbox/kt-checkbox.js.map +1 -0
- package/dist/components/forms/kt-drag-drop/kt-drag-drop.js +2 -2
- package/dist/components/forms/kt-form/kt-form.js +11 -10
- package/dist/components/forms/kt-form/kt-form.js.map +1 -1
- package/dist/components/forms/kt-input/kt-input.js +2 -2
- package/dist/components/forms/kt-input-menu/kt-input-menu.js +2 -2
- package/dist/components/forms/kt-label-input/kt-label-input.js +1 -1
- package/dist/components/forms/kt-radio-group/kt-radio-group.d.ts +103 -0
- package/dist/components/forms/kt-radio-group/kt-radio-group.js +265 -0
- package/dist/components/forms/kt-radio-group/kt-radio-group.js.map +1 -0
- package/dist/components/forms/kt-select/kt-select.js +2 -2
- package/dist/components/forms/kt-textarea/kt-textarea.js +2 -2
- package/dist/components/forms/kt-toggle/kt-toggle.js +1 -1
- package/dist/components/navigation/kt-breadcrumb/kt-breadcrumb.js +2 -2
- package/dist/components/navigation/kt-header/kt-header.js +2 -2
- package/dist/components/navigation/kt-page-header/kt-page-header.js +1 -1
- package/dist/components/navigation/kt-segmented-control/kt-segmented-control.js +2 -2
- package/dist/components/navigation/kt-sub-menu-navigation/kt-sub-menu-navigation.js +2 -2
- package/dist/components/navigation/kt-tabs/kt-tabs.js +1 -1
- package/dist/components/navigation/kt-toggle-button/kt-toggle-button.js +1 -1
- package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js +12 -6
- package/dist/components/navigation/kt-toggle-button-group/kt-toggle-button-group.js.map +1 -1
- package/dist/components/overlays/kt-collapsible/kt-collapsible.js +1 -1
- package/dist/components/overlays/kt-confirm-dialog/kt-confirm-dialog.js +2 -2
- package/dist/components/overlays/kt-dropdown/kt-dropdown.js +2 -2
- package/dist/components/overlays/kt-modal/kt-modal.js +2 -2
- package/dist/components/overlays/kt-side-panel/kt-side-panel.js +2 -2
- package/dist/custom-elements.json +1740 -941
- package/dist/icons/defaults.d.ts +1 -0
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +95 -90
- package/dist/index.js.map +1 -1
- package/dist/internal/strings.d.ts +10 -0
- package/dist/react/index.d.ts +13 -0
- package/dist/react/index.js +176 -157
- package/dist/react/index.js.map +1 -1
- package/dist/react/jsx.d.ts +12 -1
- package/dist/strings/index.js +1 -1
- package/dist/tokens/base.css +3 -0
- package/dist/vscode.css-custom-data.json +12 -0
- package/dist/vscode.html-custom-data.json +85 -0
- package/dist/vue/index.d.ts +6 -0
- package/dist/vue/index.js +9 -7
- package/dist/vue/index.js.map +1 -1
- package/dist/web-types.json +225 -1
- package/package.json +9 -1
- package/dist/chunks/index-fzPIgxe2.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { svg as b, nothing as A, css as vt, html as G } from "lit";
|
|
2
2
|
import { query as kt, state as et, property as B } from "lit/decorators.js";
|
|
3
3
|
import { classMap as wt } from "lit/directives/class-map.js";
|
|
4
|
-
import { K as nt, d as Mt } from "../../../chunks/kt-element-
|
|
4
|
+
import { K as nt, d as Mt } from "../../../chunks/kt-element-E-tfJpGQ.js";
|
|
5
5
|
import { u as At, e as lt } from "../../../chunks/events-Bjl5Zmmq.js";
|
|
6
|
-
import { s as
|
|
6
|
+
import { s as E } from "../../../chunks/index-DSSLJirw.js";
|
|
7
7
|
function St(s) {
|
|
8
8
|
const t = Math.floor(Math.log10(s)), e = s / 10 ** t;
|
|
9
9
|
return (e < 1.5 ? 1 : e < 3 ? 2 : e < 7 ? 5 : 10) * 10 ** t;
|
|
@@ -51,7 +51,7 @@ function X(s, t, e, a) {
|
|
|
51
51
|
function W(s, t) {
|
|
52
52
|
return Math.min(6, Math.max(3, Math.round(s / t)));
|
|
53
53
|
}
|
|
54
|
-
const H = Math.PI * 2,
|
|
54
|
+
const H = Math.PI * 2, V = (s) => Math.round(s * 100) / 100 || 0, P = ([s, t]) => `${V(s)},${V(t)}`;
|
|
55
55
|
function j(s, t = !0) {
|
|
56
56
|
return s.map((e, a) => `${a === 0 && t ? "M" : "L"}${P(e)}`).join(" ");
|
|
57
57
|
}
|
|
@@ -93,7 +93,7 @@ function Ct(s, t = !0) {
|
|
|
93
93
|
...Pt(s).map(({ c1: a, c2: o, to: i }) => `C${P(a)} ${P(o)} ${P(i)}`)
|
|
94
94
|
].join(" ");
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function D(s, t, e, a) {
|
|
97
97
|
return [s + e * Math.sin(a), t - e * Math.cos(a)];
|
|
98
98
|
}
|
|
99
99
|
function Ot(s, t, e, a, o, i) {
|
|
@@ -101,22 +101,22 @@ function Ot(s, t, e, a, o, i) {
|
|
|
101
101
|
if (n <= 0 || a <= 0) return "";
|
|
102
102
|
if (n >= H - 1e-6) {
|
|
103
103
|
const l = (d, u) => {
|
|
104
|
-
const m =
|
|
104
|
+
const m = D(s, t, d, 0), y = D(s, t, d, Math.PI), k = `A${V(d)},${V(d)} 0 1 ${u}`;
|
|
105
105
|
return `M${P(m)} ${k} ${P(y)} ${k} ${P(m)} Z`;
|
|
106
106
|
};
|
|
107
107
|
return e > 0 ? `${l(a, 1)} ${l(e, 0)}` : l(a, 1);
|
|
108
108
|
}
|
|
109
|
-
const r = n > Math.PI ? 1 : 0, h = `A${
|
|
109
|
+
const r = n > Math.PI ? 1 : 0, h = `A${V(a)},${V(a)} 0 ${r} 1 ${P(D(s, t, a, i))}`;
|
|
110
110
|
if (e <= 0)
|
|
111
|
-
return `M${P([s, t])} L${P(
|
|
112
|
-
const c = `A${
|
|
113
|
-
return `M${P(
|
|
111
|
+
return `M${P([s, t])} L${P(D(s, t, a, o))} ${h} Z`;
|
|
112
|
+
const c = `A${V(e)},${V(e)} 0 ${r} 0 ${P(D(s, t, e, o))}`;
|
|
113
|
+
return `M${P(D(s, t, a, o))} ${h} L${P(D(s, t, e, i))} ${c} Z`;
|
|
114
114
|
}
|
|
115
115
|
function ct(s, t, e, a, o, i) {
|
|
116
116
|
const r = Math.max(
|
|
117
117
|
0,
|
|
118
118
|
i === "top" || i === "bottom" ? Math.min(o, e / 2, a) : Math.min(o, a / 2, e)
|
|
119
|
-
), [h, c, l, d] = [s, t, s + e, t + a], u = (y) => `A${
|
|
119
|
+
), [h, c, l, d] = [s, t, s + e, t + a], u = (y) => `A${V(r)},${V(r)} 0 0 1 ${P(y)}`, m = (y) => `L${P(y)}`;
|
|
120
120
|
if (i === "none" || r === 0)
|
|
121
121
|
return `M${P([h, c])} ${m([l, c])} ${m([l, d])} ${m([h, d])} Z`;
|
|
122
122
|
switch (i) {
|
|
@@ -130,16 +130,16 @@ function ct(s, t, e, a, o, i) {
|
|
|
130
130
|
return `M${P([l, c])} ${m([l, d])} ${m([h + r, d])} ${u([h, d - r])} ${m([h, c + r])} ${u([h + r, c])} Z`;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const R = { top: 12, right: 8, bottom: 24 }, J = 12, ht = { vertical: 48, horizontal: 96 }, Z = (s) => s?.values ?? [];
|
|
134
134
|
function _t(s) {
|
|
135
135
|
const { series: t, hidden: e, labels: a, measure: o, format: i, noAxis: n, width: r, height: h } = s, c = t.map((v) => v.type ?? s.type), l = t.map((v, O) => O).filter((v) => !e.has(v)), d = l.map((v) => c[v]), u = Math.max(a.length, 0, ...t.map((v) => Z(v).length)), m = d.length > 0 ? d.includes("bar") : s.type === "bar", y = s.horizontal && m && (d.length === 0 || d.every((v) => v === "bar")), k = (v) => l.filter((O) => c[O] === v).map((O) => Z(t[O])), f = s.stacked ? [k("bar"), k("area")].filter((v) => v.length) : [], g = s.stacked ? k("line") : l.map((v) => Z(t[v])), x = d.length > 0 ? d.some((v) => v !== "line") : s.type !== "line", { lo: _, hi: w } = Lt(f, g, { includeZero: x }), p = { min: s.min, max: s.max };
|
|
136
136
|
if (!y) {
|
|
137
|
-
const v = Math.max(0, h -
|
|
137
|
+
const v = Math.max(0, h - R.top - R.bottom), O = F(_, w, W(v, ht.vertical), p), q = n ? 0 : Math.max(0, ...O.values.map((gt) => o(i(gt)))), rt = n ? 4 : Math.ceil(q) + J;
|
|
138
138
|
return {
|
|
139
139
|
box: {
|
|
140
140
|
x: rt,
|
|
141
|
-
y:
|
|
142
|
-
width: Math.max(0, r - rt -
|
|
141
|
+
y: R.top,
|
|
142
|
+
width: Math.max(0, r - rt - R.right),
|
|
143
143
|
height: v
|
|
144
144
|
},
|
|
145
145
|
ticks: O,
|
|
@@ -150,13 +150,13 @@ function _t(s) {
|
|
|
150
150
|
visible: l
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
const $ = Math.max(0, ...a.map(o)), M = Math.ceil(Math.min($, r * 0.4)) + J, L = Math.max(0, r - M -
|
|
153
|
+
const $ = Math.max(0, ...a.map(o)), M = Math.ceil(Math.min($, r * 0.4)) + J, L = Math.max(0, r - M - R.right), z = F(_, w, W(L, ht.horizontal), p), T = n ? R.right : Math.max(R.right, o(i(z.max)) / 2);
|
|
154
154
|
return {
|
|
155
155
|
box: {
|
|
156
156
|
x: M,
|
|
157
|
-
y:
|
|
157
|
+
y: R.top,
|
|
158
158
|
width: Math.max(0, r - M - T),
|
|
159
|
-
height: Math.max(0, h -
|
|
159
|
+
height: Math.max(0, h - R.top - (n ? 4 : R.bottom))
|
|
160
160
|
},
|
|
161
161
|
ticks: z,
|
|
162
162
|
count: u,
|
|
@@ -170,7 +170,7 @@ function N(s, t) {
|
|
|
170
170
|
const { box: e, count: a, horizontal: o, banded: i } = s, n = o ? e.y : e.x, r = o ? e.height : e.width;
|
|
171
171
|
return i ? n + (t + 0.5) * r / Math.max(1, a) : a <= 1 ? n + r / 2 : n + t / (a - 1) * r;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function I(s, t) {
|
|
174
174
|
const { box: e, ticks: a, horizontal: o } = s;
|
|
175
175
|
return o ? X(t, a, e.x, e.x + e.width) : X(t, a, e.y + e.height, e.y);
|
|
176
176
|
}
|
|
@@ -188,26 +188,26 @@ function mt(s, t) {
|
|
|
188
188
|
if (t(s[e])) return e;
|
|
189
189
|
return -1;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Dt(s, t, e) {
|
|
192
192
|
if (e(s) <= t) return s;
|
|
193
193
|
let a = s;
|
|
194
194
|
for (; a.length > 1 && e(`${a}…`) > t; ) a = a.slice(0, -1);
|
|
195
195
|
return `${a}…`;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Et(s) {
|
|
198
198
|
const { layout: t, noGrid: e, noAxis: a, format: o } = s, { box: i, ticks: n, horizontal: r } = t, h = e ? A : n.values.map((d) => {
|
|
199
|
-
const u =
|
|
199
|
+
const u = I(t, d);
|
|
200
200
|
return r ? b`<line class="grid" x1=${u} y1=${i.y} x2=${u} y2=${i.y + i.height} />` : b`<line class="grid" x1=${i.x} y1=${u} x2=${i.x + i.width} y2=${u} />`;
|
|
201
201
|
}), c = n.min < 0 && n.max > 0 ? (() => {
|
|
202
|
-
const d =
|
|
202
|
+
const d = I(t, 0);
|
|
203
203
|
return r ? b`<line class="baseline" x1=${d} y1=${i.y} x2=${d} y2=${i.y + i.height} />` : b`<line class="baseline" x1=${i.x} y1=${d} x2=${i.x + i.width} y2=${d} />`;
|
|
204
204
|
})() : A, l = a ? A : n.values.map((d) => {
|
|
205
|
-
const u =
|
|
205
|
+
const u = I(t, d);
|
|
206
206
|
return r ? b`<text class="tick-label" x=${u} y=${i.y + i.height + 16} text-anchor="middle">${o(d)}</text>` : b`<text class="tick-label" x=${i.x - 8} y=${u} text-anchor="end" dominant-baseline="middle">${o(d)}</text>`;
|
|
207
207
|
});
|
|
208
208
|
return b`${h}${c}${l}`;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Tt(s) {
|
|
211
211
|
const { layout: t, labels: e, measure: a } = s, { box: o, count: i, horizontal: n, banded: r } = t;
|
|
212
212
|
if (n) {
|
|
213
213
|
const l = Math.max(1, Math.ceil(i / Math.max(1, Math.floor(o.height / 18))));
|
|
@@ -218,7 +218,7 @@ function Dt(s) {
|
|
|
218
218
|
y=${N(t, u)}
|
|
219
219
|
text-anchor="end"
|
|
220
220
|
dominant-baseline="middle"
|
|
221
|
-
>${
|
|
221
|
+
>${Dt(d, o.x - J, a)}</text>` : A
|
|
222
222
|
)}`;
|
|
223
223
|
}
|
|
224
224
|
const h = Math.max(0, ...e.map(a)) + J, c = Math.max(1, Math.ceil(i / Math.max(1, Math.floor(o.width / h))));
|
|
@@ -236,14 +236,14 @@ function Dt(s) {
|
|
|
236
236
|
function Rt(s, t, e) {
|
|
237
237
|
return t.map((a, o) => [
|
|
238
238
|
N(s.layout, o),
|
|
239
|
-
|
|
239
|
+
I(s.layout, a + (e?.[o] ?? 0))
|
|
240
240
|
]);
|
|
241
241
|
}
|
|
242
242
|
function at(s, t, e = !0) {
|
|
243
243
|
return s.smooth ? Ct(t, e) : j(t, e);
|
|
244
244
|
}
|
|
245
245
|
function Vt(s) {
|
|
246
|
-
const { layout: t, series: e, colorOf: a, active: o, idPrefix: i, stacked: n, smooth: r } = s, { box: h, count: c, visible: l, marks: d } = t, u =
|
|
246
|
+
const { layout: t, series: e, colorOf: a, active: o, idPrefix: i, stacked: n, smooth: r } = s, { box: h, count: c, visible: l, marks: d } = t, u = I(t, Math.min(Math.max(0, t.ticks.min), t.ticks.max)), m = new Array(c).fill(0), y = [], k = [];
|
|
247
247
|
for (const g of l) {
|
|
248
248
|
const x = d[g];
|
|
249
249
|
if (x === "bar") continue;
|
|
@@ -251,7 +251,7 @@ function Vt(s) {
|
|
|
251
251
|
if (_.length === 0) continue;
|
|
252
252
|
const w = a(g), $ = x === "area" && n ? [...m] : void 0, M = Rt(s, _, $);
|
|
253
253
|
if (x === "area") {
|
|
254
|
-
const L = `${i}-fill-${g}`, z = $ ? _.map((v, O) => [N(t, O),
|
|
254
|
+
const L = `${i}-fill-${g}`, z = $ ? _.map((v, O) => [N(t, O), I(t, $[O])]) : [
|
|
255
255
|
[M.at(-1)[0], u],
|
|
256
256
|
[M[0][0], u]
|
|
257
257
|
], T = $ ? at(s, [...z].reverse(), !1) : j(z, !1);
|
|
@@ -280,7 +280,7 @@ function Vt(s) {
|
|
|
280
280
|
}
|
|
281
281
|
function ft(s, t) {
|
|
282
282
|
const { layout: e, active: a, colorOf: o } = s, { from: i, to: n, offset: r, thickness: h, outer: c, series: l, index: d } = t, u = n < i;
|
|
283
|
-
let m =
|
|
283
|
+
let m = I(e, i), y = I(e, n);
|
|
284
284
|
const k = 0.5, f = Math.sign(y - m) || 1;
|
|
285
285
|
i !== 0 && (m += k * f), c || (y -= k * f), Math.abs(y - m) < 1 && (y = m + f);
|
|
286
286
|
const g = Math.min(m, y), x = Math.abs(y - m), _ = c ? e.horizontal ? u ? "left" : "right" : u ? "bottom" : "top" : "none", w = e.horizontal ? ct(g, r, x, h, dt, _) : ct(r, g, h, x, dt, _);
|
|
@@ -342,10 +342,10 @@ function It(s) {
|
|
|
342
342
|
}
|
|
343
343
|
function Xt(s) {
|
|
344
344
|
return b`
|
|
345
|
-
${
|
|
345
|
+
${Et(s)}
|
|
346
346
|
${It(s)}
|
|
347
347
|
${Vt(s)}
|
|
348
|
-
${
|
|
348
|
+
${Tt(s)}`;
|
|
349
349
|
}
|
|
350
350
|
function Nt(s) {
|
|
351
351
|
const { layout: t, series: e, active: a, stacked: o } = s, i = (c) => Z(e[c])[a] ?? 0;
|
|
@@ -356,7 +356,7 @@ function Nt(s) {
|
|
|
356
356
|
const d = o && c !== "line" ? l.filter((u) => u > 0).reduce((u, m) => u + m, 0) : Math.max(...l);
|
|
357
357
|
n = Math.max(n, d);
|
|
358
358
|
}
|
|
359
|
-
const r = N(t, a), h =
|
|
359
|
+
const r = N(t, a), h = I(t, Math.min(n, t.ticks.max));
|
|
360
360
|
return t.horizontal ? { x: h, y: r } : { x: r, y: h };
|
|
361
361
|
}
|
|
362
362
|
const U = { top: 16, right: 16, bottom: 24 }, Zt = 12, Ut = 24, pt = 3, Ht = 4, jt = 24, K = (s) => s?.points ?? [];
|
|
@@ -504,7 +504,7 @@ function se(s, t) {
|
|
|
504
504
|
const e = s.slices[t];
|
|
505
505
|
if (!e) return [s.cx, s.cy];
|
|
506
506
|
const a = (e.start + e.end) / 2, o = s.inner > 0 ? (s.inner + e.outer) / 2 : e.outer * 0.6;
|
|
507
|
-
return
|
|
507
|
+
return D(s.cx, s.cy, o, a);
|
|
508
508
|
}
|
|
509
509
|
function Y(s, t) {
|
|
510
510
|
const { ticks: e, outer: a } = s;
|
|
@@ -534,26 +534,26 @@ function oe(s) {
|
|
|
534
534
|
const { layout: t, series: e, hidden: a, labels: o, colorOf: i, active: n, noGrid: r, noAxis: h, format: c } = s, { cx: l, cy: d, outer: u, ticks: m, slices: y } = t, k = y.map((p) => p.start), f = r ? A : b`
|
|
535
535
|
${m.values.filter((p) => p > m.min).map((p) => {
|
|
536
536
|
const $ = Y(t, p);
|
|
537
|
-
return b`<path class="grid" fill="none" d=${`${j(k.map((M) =>
|
|
537
|
+
return b`<path class="grid" fill="none" d=${`${j(k.map((M) => D(l, d, $, M)))} Z`} />`;
|
|
538
538
|
})}
|
|
539
539
|
${k.map((p) => {
|
|
540
|
-
const [$, M] =
|
|
540
|
+
const [$, M] = D(l, d, u, p);
|
|
541
541
|
return b`<line class="grid" x1=${l} y1=${d} x2=${$} y2=${M} />`;
|
|
542
542
|
})}`, g = h ? A : m.values.filter((p) => p > m.min).map(
|
|
543
543
|
(p) => b`<text class="tick-label ring-label" x=${l + 4} y=${d - Y(t, p) + 3} dominant-baseline="hanging">${c(p)}</text>`
|
|
544
544
|
), x = k.map((p, $) => {
|
|
545
|
-
const M = Math.sin(p), L = Math.cos(p), z = M > 0.1 ? "start" : M < -0.1 ? "end" : "middle", [T, v] =
|
|
545
|
+
const M = Math.sin(p), L = Math.cos(p), z = M > 0.1 ? "start" : M < -0.1 ? "end" : "middle", [T, v] = D(l, d, u + (Math.abs(L) > 0.5 ? 8 : tt), p), O = L > 0.5 ? "auto" : L < -0.5 ? "hanging" : "middle";
|
|
546
546
|
return b`<text class="axis-label" x=${T} y=${v} text-anchor=${z} dominant-baseline=${O}>${o[$] ?? ""}</text>`;
|
|
547
547
|
}), _ = e.map((p, $) => {
|
|
548
548
|
if (a.has($)) return A;
|
|
549
549
|
const M = i($), L = k.map(
|
|
550
|
-
(T, v) =>
|
|
550
|
+
(T, v) => D(l, d, Y(t, p.values?.[v] ?? m.min), T)
|
|
551
551
|
), z = n >= 0 && L[n] ? b`<circle class="marker" cx=${L[n][0]} cy=${L[n][1]} r="5" fill=${M} />` : A;
|
|
552
552
|
return b`
|
|
553
553
|
<path class="radar" d=${`${j(L)} Z`} stroke=${M} fill=${M} />
|
|
554
554
|
${z}`;
|
|
555
555
|
}), w = n >= 0 && k[n] !== void 0 ? (() => {
|
|
556
|
-
const [p, $] =
|
|
556
|
+
const [p, $] = D(l, d, u, k[n]);
|
|
557
557
|
return b`<line class="crosshair" x1=${l} y1=${d} x2=${p} y2=${$} />`;
|
|
558
558
|
})() : A;
|
|
559
559
|
return b`${f}${w}${_}${g}${x}`;
|
|
@@ -972,7 +972,7 @@ class S extends nt {
|
|
|
972
972
|
active: this.active,
|
|
973
973
|
noGrid: this.noGrid,
|
|
974
974
|
noAxis: this.noAxis,
|
|
975
|
-
centerLabel: this.centerLabel ??
|
|
975
|
+
centerLabel: this.centerLabel ?? E().total,
|
|
976
976
|
format: this.format,
|
|
977
977
|
colorOf: this.colorOf,
|
|
978
978
|
sliceColor: this.sliceColor
|
|
@@ -1128,7 +1128,7 @@ class S extends nt {
|
|
|
1128
1128
|
const t = this.radialView.layout, e = this.series.map((r, h) => h).filter((r) => !this.hiddenSeries.has(r)), a = Math.max(
|
|
1129
1129
|
t.ticks.min,
|
|
1130
1130
|
...e.map((r) => this.series[r].values?.[this.active] ?? t.ticks.min)
|
|
1131
|
-
), o = t.slices[this.active]?.start ?? 0, [i, n] =
|
|
1131
|
+
), o = t.slices[this.active]?.start ?? 0, [i, n] = D(t.cx, t.cy, Y(t, a), o);
|
|
1132
1132
|
return {
|
|
1133
1133
|
title: this.labels[this.active] ?? `#${this.active + 1}`,
|
|
1134
1134
|
rows: e.map((r) => ({
|
|
@@ -1178,7 +1178,7 @@ class S extends nt {
|
|
|
1178
1178
|
</span>`
|
|
1179
1179
|
)}
|
|
1180
1180
|
${t.total ? G`<span class="tooltip-total"
|
|
1181
|
-
><span>${this.totalLabel ??
|
|
1181
|
+
><span>${this.totalLabel ?? E().total}</span><span>${t.total}</span></span
|
|
1182
1182
|
>` : A}
|
|
1183
1183
|
</div>`;
|
|
1184
1184
|
}
|
|
@@ -1210,12 +1210,12 @@ class S extends nt {
|
|
|
1210
1210
|
return G`<div part="table" class="table" id=${this.tableId}>
|
|
1211
1211
|
<table>
|
|
1212
1212
|
<caption>
|
|
1213
|
-
${this.label ||
|
|
1213
|
+
${this.label || E().chartData}
|
|
1214
1214
|
</caption>
|
|
1215
1215
|
<thead>
|
|
1216
1216
|
<tr>
|
|
1217
|
-
<th scope="col">${
|
|
1218
|
-
<th scope="col">${
|
|
1217
|
+
<th scope="col">${E().chartSeries}</th>
|
|
1218
|
+
<th scope="col">${E().chartPoint}</th>
|
|
1219
1219
|
<th scope="col">x</th>
|
|
1220
1220
|
<th scope="col">y</th>
|
|
1221
1221
|
${t ? G`<th scope="col">r</th>` : A}
|
|
@@ -1242,13 +1242,13 @@ class S extends nt {
|
|
|
1242
1242
|
return G`<div part="table" class="table" id=${this.tableId}>
|
|
1243
1243
|
<table>
|
|
1244
1244
|
<caption>
|
|
1245
|
-
${this.label ||
|
|
1245
|
+
${this.label || E().chartData}
|
|
1246
1246
|
</caption>
|
|
1247
1247
|
<thead>
|
|
1248
1248
|
<tr>
|
|
1249
|
-
<th scope="col">${
|
|
1250
|
-
<th scope="col">${this.series[0]?.name ??
|
|
1251
|
-
<th scope="col">${
|
|
1249
|
+
<th scope="col">${E().chartSlice}</th>
|
|
1250
|
+
<th scope="col">${this.series[0]?.name ?? E().chartValue}</th>
|
|
1251
|
+
<th scope="col">${E().chartShare}</th>
|
|
1252
1252
|
</tr>
|
|
1253
1253
|
</thead>
|
|
1254
1254
|
<tbody>
|
|
@@ -1274,13 +1274,13 @@ class S extends nt {
|
|
|
1274
1274
|
return G`<div part="table" class="table" id=${this.tableId}>
|
|
1275
1275
|
<table>
|
|
1276
1276
|
<caption>
|
|
1277
|
-
${this.label ||
|
|
1277
|
+
${this.label || E().chartData}
|
|
1278
1278
|
</caption>
|
|
1279
1279
|
<thead>
|
|
1280
1280
|
<tr>
|
|
1281
|
-
<th scope="col">${
|
|
1281
|
+
<th scope="col">${E().chartPoint}</th>
|
|
1282
1282
|
${this.series.map((a) => G`<th scope="col">${a.name}</th>`)}
|
|
1283
|
-
${t ? G`<th scope="col">${this.totalLabel ??
|
|
1283
|
+
${t ? G`<th scope="col">${this.totalLabel ?? E().total}</th>` : A}
|
|
1284
1284
|
</tr>
|
|
1285
1285
|
</thead>
|
|
1286
1286
|
<tbody>
|