@kernel4632/kima 0.12.1 → 0.12.3
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/components/content/chart.ce.vue_vue_type_style_index_0_scoped_629f27ff_lang.css +1 -0
- package/dist/components/core/divider.ce.vue_vue_type_style_index_0_scoped_38d4d501_lang.css +1 -0
- package/dist/components/data/ring-progress.ce.vue_vue_type_style_index_0_scoped_56ea3993_lang.css +1 -0
- package/dist/components/input/rating.ce.vue_vue_type_style_index_0_scoped_eafb58fe_lang.css +1 -0
- package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_d78c0562_lang.css +1 -0
- package/dist/kima-elements-core.js +3 -3
- package/dist/kima-elements.js +13287 -13267
- package/dist/style.css +6 -6
- package/dist/styles/_tokens.css +1 -1
- package/dist/styles/chart.css +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/ring-progress.css +1 -1
- package/dist/styles/tags-input.css +1 -1
- package/dist/vue/components/content/chart.ce.js +143 -131
- package/dist/vue/components/core/divider.ce.js +1 -1
- package/dist/vue/components/data/ring-progress.ce.js +21 -14
- package/dist/vue/components/input/rating.ce.js +2 -1
- package/dist/vue/components/input/tags-input.ce.js +1 -1
- package/package.json +1 -1
- package/dist/components/content/chart.ce.vue_vue_type_style_index_0_scoped_b8556b1a_lang.css +0 -1
- package/dist/components/core/divider.ce.vue_vue_type_style_index_0_scoped_5402a5d3_lang.css +0 -1
- package/dist/components/data/ring-progress.ce.vue_vue_type_style_index_0_scoped_15220fc3_lang.css +0 -1
- package/dist/components/input/rating.ce.vue_vue_type_style_index_0_scoped_23c50b69_lang.css +0 -1
- package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_b46618b2_lang.css +0 -1
|
@@ -3,26 +3,23 @@ import t from "../core/button.ce.js";
|
|
|
3
3
|
import { collapseTransition as n, presenceTransition as r } from "../../utils/motion.js";
|
|
4
4
|
import { useContentMotion as i } from "../../utils/content-motion.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { Fragment as a, Transition as o, computed as s, createBlock as
|
|
6
|
+
import { Fragment as a, Transition as o, computed as s, createBlock as ee, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, mergeProps as p, nextTick as te, normalizeStyle as m, onBeforeUnmount as ne, onMounted as re, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, useId as ie, vShow as ae, withCtx as b, withDirectives as oe, withKeys as x, withModifiers as S } from "vue";
|
|
7
7
|
// src/components/content/chart.ce.vue
|
|
8
|
-
var
|
|
8
|
+
var se = ["aria-label"], ce = {
|
|
9
9
|
class: "kima-chart__legend",
|
|
10
10
|
"aria-label": "图例"
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
y: "273",
|
|
24
|
-
"text-anchor": "end"
|
|
25
|
-
}, me = ["d"], he = ["d"], ge = [
|
|
11
|
+
}, le = [
|
|
12
|
+
"viewBox",
|
|
13
|
+
"aria-label",
|
|
14
|
+
"aria-describedby"
|
|
15
|
+
], ue = { class: "kima-chart__axis" }, de = [
|
|
16
|
+
"x2",
|
|
17
|
+
"y1",
|
|
18
|
+
"y2"
|
|
19
|
+
], fe = ["x", "y"], pe = ["x", "y"], me = {
|
|
20
|
+
x: "4",
|
|
21
|
+
y: "14"
|
|
22
|
+
}, he = ["x", "y"], ge = ["y"], _e = ["x", "y"], C = ["d"], ve = ["d"], ye = [
|
|
26
23
|
"tabindex",
|
|
27
24
|
"data-point",
|
|
28
25
|
"aria-label",
|
|
@@ -31,24 +28,24 @@ var ne = ["aria-label"], re = {
|
|
|
31
28
|
"onFocus",
|
|
32
29
|
"onPointerenter",
|
|
33
30
|
"onClick"
|
|
34
|
-
],
|
|
31
|
+
], be = [
|
|
35
32
|
"x",
|
|
36
33
|
"y",
|
|
37
34
|
"width",
|
|
38
35
|
"height"
|
|
39
|
-
],
|
|
36
|
+
], xe = [
|
|
40
37
|
"cx",
|
|
41
38
|
"cy",
|
|
42
39
|
"r"
|
|
43
|
-
],
|
|
40
|
+
], Se = ["cx", "cy"], Ce = ["id"], we = {
|
|
44
41
|
key: 0,
|
|
45
42
|
class: "kima-chart__tooltip",
|
|
46
43
|
role: "status"
|
|
47
|
-
},
|
|
44
|
+
}, Te = [
|
|
48
45
|
"inert",
|
|
49
46
|
"aria-hidden",
|
|
50
47
|
"id"
|
|
51
|
-
],
|
|
48
|
+
], Ee = { scope: "row" }, w = /*#__PURE__*/ e({
|
|
52
49
|
__name: "chart.ce",
|
|
53
50
|
props: {
|
|
54
51
|
series: {
|
|
@@ -83,45 +80,53 @@ var ne = ["aria-label"], re = {
|
|
|
83
80
|
}
|
|
84
81
|
},
|
|
85
82
|
emits: ["select"],
|
|
86
|
-
setup(e, { emit:
|
|
87
|
-
let
|
|
88
|
-
i(
|
|
89
|
-
let
|
|
83
|
+
setup(e, { emit: w }) {
|
|
84
|
+
let T = e, E = w, D = g(null), O = g(null), k = g([]), A = g(null), j = g(!1), M = ie();
|
|
85
|
+
i(O, () => [T.series, T.mode]);
|
|
86
|
+
let N = g(720), P = g(240), F = s(() => N.value - 16), I = s(() => P.value - 36), L = s(() => F.value - 44), De = s(() => I.value - 24), R;
|
|
87
|
+
re(() => {
|
|
88
|
+
let e = () => {
|
|
89
|
+
let e = O.value?.getBoundingClientRect();
|
|
90
|
+
e && (N.value = Math.max(240, e.width), P.value = Math.max(120, e.height));
|
|
91
|
+
};
|
|
92
|
+
e(), typeof ResizeObserver < "u" && (R = new ResizeObserver(e), R.observe(O.value));
|
|
93
|
+
}), ne(() => R?.disconnect());
|
|
94
|
+
let z = (e) => `var(--kima-chart-series-${e % 4 + 1})`, B = s(() => T.series.map((e, t) => ({
|
|
90
95
|
name: e.name || `系列 ${t + 1}`,
|
|
91
96
|
si: t,
|
|
92
97
|
values: (e.data || []).map((e, t) => ({
|
|
93
98
|
i: t,
|
|
94
99
|
x: typeof e == "object" && e ? e.x : t,
|
|
95
100
|
y: typeof e == "object" && e ? e.y : e,
|
|
96
|
-
label:
|
|
101
|
+
label: T.labels[t] ?? (typeof e == "object" && e ? e.x : t + 1)
|
|
97
102
|
}))
|
|
98
|
-
}))),
|
|
99
|
-
let e =
|
|
103
|
+
}))), V = (e) => typeof e.y == "number" && Number.isFinite(e.y), H = s(() => B.value.filter((e) => !k.value.includes(e.si))), U = s(() => Math.max(1, T.labels.length, ...B.value.map((e) => e.values.length))), W = s(() => {
|
|
104
|
+
let e = H.value.flatMap((e) => e.values.filter(V).map((e) => e.y)), t = Math.min(0, ...e), n = Math.max(0, ...e);
|
|
100
105
|
return [t, n === t ? t + 1 : n];
|
|
101
|
-
}),
|
|
102
|
-
let e =
|
|
106
|
+
}), G = s(() => {
|
|
107
|
+
let e = H.value.flatMap((e) => e.values.map((e) => Number(e.x)).filter(Number.isFinite));
|
|
103
108
|
return [Math.min(0, ...e), Math.max(1, ...e)];
|
|
104
|
-
}),
|
|
109
|
+
}), K = (e) => T.mode === "scatter" ? 44 + (Number(e.x) - G.value[0]) / (G.value[1] - G.value[0]) * L.value : 44 + (e.i + .5) / U.value * L.value, q = (e) => I.value - (e - W.value[0]) / (W.value[1] - W.value[0]) * De.value, J = s(() => Math.max(2, L.value / U.value * .7 / Math.max(1, H.value.length))), Y = s(() => H.value.flatMap((e) => e.values.filter(V).map((t) => ({
|
|
105
110
|
...t,
|
|
106
111
|
si: e.si,
|
|
107
112
|
name: e.name,
|
|
108
113
|
key: `${e.si}-${t.i}`
|
|
109
|
-
})))),
|
|
110
|
-
function
|
|
114
|
+
})))), X = s(() => Y.value.find((e) => e.key === A.value)), Z = s(() => Array.from({ length: 5 }, (e, t) => W.value[0] + (W.value[1] - W.value[0]) * t / 4));
|
|
115
|
+
function Oe(e) {
|
|
111
116
|
let t = [], n = [];
|
|
112
|
-
for (let r of e.values)
|
|
117
|
+
for (let r of e.values) V(r) ? n.push(r) : n.length && (t.push(n), n = []);
|
|
113
118
|
return n.length && t.push(n), t;
|
|
114
119
|
}
|
|
115
|
-
let Q = (e) => e.map((e, t) => `${t ? "L" : "M"}${
|
|
120
|
+
let Q = (e) => e.map((e, t) => `${t ? "L" : "M"}${K(e)},${q(e.y)}`).join(" "), ke = (e) => `${Q(e)} L${K(e.at(-1))},${q(0)} L${K(e[0])},${q(0)} Z`;
|
|
116
121
|
function $(e) {
|
|
117
|
-
|
|
122
|
+
A.value = e.key, E("select", {
|
|
118
123
|
series: e.si,
|
|
119
124
|
index: e.i,
|
|
120
125
|
x: e.x,
|
|
121
126
|
value: e.y
|
|
122
127
|
});
|
|
123
128
|
}
|
|
124
|
-
async function
|
|
129
|
+
async function Ae(e, t) {
|
|
125
130
|
if (![
|
|
126
131
|
"ArrowRight",
|
|
127
132
|
"ArrowDown",
|
|
@@ -131,152 +136,159 @@ var ne = ["aria-label"], re = {
|
|
|
131
136
|
"End"
|
|
132
137
|
].includes(e.key)) return;
|
|
133
138
|
e.preventDefault();
|
|
134
|
-
let n =
|
|
135
|
-
$(
|
|
139
|
+
let n = Y.value.length, r = Y.value.findIndex((e) => e.key === t.key), i = e.key === "Home" ? 0 : e.key === "End" ? n - 1 : (r + (["ArrowLeft", "ArrowUp"].includes(e.key) ? -1 : 1) + n) % n;
|
|
140
|
+
$(Y.value[i]), await te(), D.value?.querySelector(`[data-point="${Y.value[i].key}"]`)?.focus();
|
|
136
141
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
142
|
+
function je(e) {
|
|
143
|
+
k.value = k.value.includes(e) ? k.value.filter((t) => t !== e) : [...k.value, e], A.value = null;
|
|
139
144
|
}
|
|
140
|
-
return (i, s) => (
|
|
145
|
+
return (i, s) => (h(), l("section", {
|
|
141
146
|
ref_key: "root",
|
|
142
|
-
ref:
|
|
147
|
+
ref: D,
|
|
143
148
|
class: "kima-chart",
|
|
144
149
|
"aria-label": e.label
|
|
145
150
|
}, [
|
|
146
|
-
|
|
151
|
+
u("div", ce, [(h(!0), l(a, null, _(B.value, (e) => (h(), ee(t, {
|
|
147
152
|
key: e.si,
|
|
148
153
|
variant: "text",
|
|
149
|
-
"aria-pressed": !
|
|
150
|
-
onClick: (t) =>
|
|
154
|
+
"aria-pressed": !k.value.includes(e.si),
|
|
155
|
+
onClick: (t) => je(e.si)
|
|
151
156
|
}, {
|
|
152
|
-
default:
|
|
157
|
+
default: b(() => [u("span", {
|
|
153
158
|
class: "kima-chart__swatch",
|
|
154
|
-
style:
|
|
155
|
-
}, null, 4),
|
|
159
|
+
style: m({ background: z(e.si) })
|
|
160
|
+
}, null, 4), d(v(e.name), 1)]),
|
|
156
161
|
_: 2
|
|
157
162
|
}, 1032, ["aria-pressed", "onClick"]))), 128))]),
|
|
158
|
-
(
|
|
163
|
+
(h(), l("svg", {
|
|
159
164
|
ref_key: "plot",
|
|
160
|
-
ref:
|
|
161
|
-
viewBox:
|
|
165
|
+
ref: O,
|
|
166
|
+
viewBox: `0 0 ${N.value} ${P.value}`,
|
|
162
167
|
class: "kima-chart__plot",
|
|
163
168
|
role: "group",
|
|
164
169
|
"aria-label": `${e.label},方向键选择数据点`,
|
|
165
|
-
"aria-describedby":
|
|
166
|
-
}, [
|
|
167
|
-
(
|
|
168
|
-
x1:
|
|
169
|
-
x2:
|
|
170
|
-
y1:
|
|
171
|
-
y2:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
"aria-describedby": y(M) + "-hint"
|
|
171
|
+
}, [u("g", ue, [
|
|
172
|
+
(h(!0), l(a, null, _(Z.value, (e) => (h(), l("g", { key: e }, [u("line", {
|
|
173
|
+
x1: 44,
|
|
174
|
+
x2: F.value,
|
|
175
|
+
y1: q(e),
|
|
176
|
+
y2: q(e),
|
|
177
|
+
"vector-effect": "non-scaling-stroke"
|
|
178
|
+
}, null, 8, de), u("text", {
|
|
179
|
+
x: 36,
|
|
180
|
+
y: q(e) + 4,
|
|
175
181
|
"text-anchor": "end"
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
d("text", ue, y(e.yLabel), 1),
|
|
185
|
-
(g(!0), u(a, null, v(Array.from({ length: G.value }), (t, n) => (g(), u("text", {
|
|
182
|
+
}, v(Number(e.toPrecision(4))), 9, fe)]))), 128)),
|
|
183
|
+
u("text", {
|
|
184
|
+
x: N.value / 2,
|
|
185
|
+
y: P.value - 2,
|
|
186
|
+
"text-anchor": "middle"
|
|
187
|
+
}, v(e.xLabel), 9, pe),
|
|
188
|
+
u("text", me, v(e.yLabel), 1),
|
|
189
|
+
(h(!0), l(a, null, _(Array.from({ length: U.value }), (t, n) => (h(), l("text", {
|
|
186
190
|
key: n,
|
|
187
|
-
x:
|
|
188
|
-
y:
|
|
191
|
+
x: 44 + (n + .5) / U.value * L.value,
|
|
192
|
+
y: I.value + 18,
|
|
189
193
|
"text-anchor": "middle"
|
|
190
|
-
},
|
|
191
|
-
e.mode === "scatter" ? (
|
|
192
|
-
|
|
194
|
+
}, v(e.mode === "scatter" ? "" : e.labels[n] ?? n + 1), 9, he))), 128)),
|
|
195
|
+
e.mode === "scatter" ? (h(), l(a, { key: 0 }, [u("text", {
|
|
196
|
+
x: 44,
|
|
197
|
+
y: I.value + 18
|
|
198
|
+
}, v(G.value[0]), 9, ge), u("text", {
|
|
199
|
+
x: F.value,
|
|
200
|
+
y: I.value + 18,
|
|
201
|
+
"text-anchor": "end"
|
|
202
|
+
}, v(G.value[1]), 9, _e)], 64)) : c("", !0)
|
|
203
|
+
]), (h(!0), l(a, null, _(H.value, (t) => (h(), l("g", {
|
|
193
204
|
key: t.si,
|
|
194
|
-
style:
|
|
205
|
+
style: m({ color: z(t.si) }),
|
|
195
206
|
class: "kima-chart__series"
|
|
196
|
-
}, [e.mode === "line" || e.mode === "area" ? (
|
|
207
|
+
}, [e.mode === "line" || e.mode === "area" ? (h(!0), l(a, { key: 0 }, _(Oe(t), (t, n) => (h(), l("g", { key: n }, [e.mode === "area" ? (h(), l("path", {
|
|
197
208
|
key: 0,
|
|
198
|
-
d:
|
|
209
|
+
d: ke(t),
|
|
199
210
|
class: "kima-chart__area"
|
|
200
|
-
}, null, 8,
|
|
211
|
+
}, null, 8, C)) : c("", !0), u("path", {
|
|
201
212
|
d: Q(t),
|
|
202
213
|
fill: "none",
|
|
203
214
|
stroke: "currentColor",
|
|
204
|
-
"stroke-width": "3"
|
|
205
|
-
|
|
215
|
+
"stroke-width": "3",
|
|
216
|
+
"vector-effect": "non-scaling-stroke"
|
|
217
|
+
}, null, 8, ve)]))), 128)) : c("", !0), (h(!0), l(a, null, _(Y.value.filter((e) => e.si === t.si), (n) => (h(), l("g", {
|
|
206
218
|
key: n.key,
|
|
207
219
|
role: "button",
|
|
208
|
-
tabindex:
|
|
220
|
+
tabindex: A.value === n.key || !X.value && Y.value[0]?.key === n.key ? 0 : -1,
|
|
209
221
|
"data-point": n.key,
|
|
210
222
|
"aria-label": `${t.name},${n.label},${n.y}`,
|
|
211
|
-
"aria-pressed":
|
|
223
|
+
"aria-pressed": A.value === n.key,
|
|
212
224
|
class: "kima-chart__point",
|
|
213
225
|
onKeydown: [
|
|
214
|
-
(e) =>
|
|
215
|
-
|
|
216
|
-
|
|
226
|
+
(e) => Ae(e, n),
|
|
227
|
+
x(S((e) => $(n), ["prevent"]), ["enter"]),
|
|
228
|
+
x(S((e) => $(n), ["prevent"]), ["space"])
|
|
217
229
|
],
|
|
218
230
|
onFocus: (e) => $(n),
|
|
219
231
|
onPointerenter: (e) => $(n),
|
|
220
232
|
onClick: (e) => $(n)
|
|
221
|
-
}, [e.mode === "bar" ? (
|
|
233
|
+
}, [e.mode === "bar" ? (h(), l("rect", {
|
|
222
234
|
key: 0,
|
|
223
|
-
x:
|
|
224
|
-
y: Math.min(
|
|
225
|
-
width:
|
|
226
|
-
height: Math.max(2, Math.abs(
|
|
235
|
+
x: K(n) - J.value / 2 + (H.value.findIndex((e) => e.si === t.si) - (H.value.length - 1) / 2) * J.value,
|
|
236
|
+
y: Math.min(q(0), q(n.y)),
|
|
237
|
+
width: J.value,
|
|
238
|
+
height: Math.max(2, Math.abs(q(n.y) - q(0))),
|
|
227
239
|
rx: "3",
|
|
228
240
|
fill: "currentColor"
|
|
229
|
-
}, null, 8,
|
|
241
|
+
}, null, 8, be)) : (h(), l("circle", {
|
|
230
242
|
key: 1,
|
|
231
|
-
cx:
|
|
232
|
-
cy:
|
|
233
|
-
r:
|
|
243
|
+
cx: K(n),
|
|
244
|
+
cy: q(n.y),
|
|
245
|
+
r: A.value === n.key ? 7 : 5,
|
|
234
246
|
fill: "currentColor"
|
|
235
|
-
}, null, 8,
|
|
236
|
-
cx:
|
|
237
|
-
cy:
|
|
247
|
+
}, null, 8, xe)), u("circle", {
|
|
248
|
+
cx: K(n),
|
|
249
|
+
cy: q(n.y),
|
|
238
250
|
r: "14",
|
|
239
251
|
fill: "transparent"
|
|
240
|
-
}, null, 8,
|
|
241
|
-
|
|
242
|
-
id:
|
|
252
|
+
}, null, 8, Se)], 40, ye))), 128))], 4))), 128))], 8, le)),
|
|
253
|
+
u("p", {
|
|
254
|
+
id: y(M) + "-hint",
|
|
243
255
|
class: "kima-chart__hint"
|
|
244
|
-
}, "方向键选择,Home / End 到首尾;空值保留断点。" +
|
|
245
|
-
|
|
246
|
-
default:
|
|
256
|
+
}, "方向键选择,Home / End 到首尾;空值保留断点。" + v(Y.value.length ? "" : "暂无有效数据"), 9, Ce),
|
|
257
|
+
f(o, p({ name: "kima-popup" }, y(r)), {
|
|
258
|
+
default: b(() => [X.value ? (h(), l("output", we, v(X.value.name) + " · " + v(X.value.label) + ":" + v(X.value.y), 1)) : c("", !0)]),
|
|
247
259
|
_: 1
|
|
248
260
|
}, 16),
|
|
249
|
-
|
|
261
|
+
f(t, {
|
|
250
262
|
variant: "text",
|
|
251
|
-
"aria-expanded":
|
|
252
|
-
"aria-controls":
|
|
253
|
-
onClick: s[0] ||= (e) =>
|
|
263
|
+
"aria-expanded": j.value,
|
|
264
|
+
"aria-controls": y(M) + "-table",
|
|
265
|
+
onClick: s[0] ||= (e) => j.value = !j.value
|
|
254
266
|
}, {
|
|
255
|
-
default:
|
|
267
|
+
default: b(() => [d(v(j.value ? "收起" : "查看") + "数据表", 1)]),
|
|
256
268
|
_: 1
|
|
257
269
|
}, 8, ["aria-expanded", "aria-controls"]),
|
|
258
|
-
|
|
259
|
-
default:
|
|
260
|
-
inert: !
|
|
261
|
-
"aria-hidden": !
|
|
262
|
-
id:
|
|
270
|
+
f(o, p({ css: !1 }, y(n)), {
|
|
271
|
+
default: b(() => [oe(u("div", {
|
|
272
|
+
inert: !j.value,
|
|
273
|
+
"aria-hidden": !j.value || void 0,
|
|
274
|
+
id: y(M) + "-table",
|
|
263
275
|
class: "kima-chart__table"
|
|
264
|
-
}, [
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
s[1] ||=
|
|
269
|
-
|
|
276
|
+
}, [u("table", null, [
|
|
277
|
+
u("caption", null, v(e.label) + "(含隐藏系列)", 1),
|
|
278
|
+
u("thead", null, [u("tr", null, [
|
|
279
|
+
u("th", null, v(e.xLabel), 1),
|
|
280
|
+
s[1] ||= u("th", null, "系列", -1),
|
|
281
|
+
u("th", null, v(e.yLabel), 1)
|
|
270
282
|
])]),
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
283
|
+
u("tbody", null, [(h(!0), l(a, null, _(B.value, (e) => (h(), l(a, { key: e.si }, [(h(!0), l(a, null, _(e.values, (t) => (h(), l("tr", { key: t.i }, [
|
|
284
|
+
u("th", Ee, v(t.label), 1),
|
|
285
|
+
u("td", null, v(e.name), 1),
|
|
286
|
+
u("td", null, v(V(t) ? t.y : "缺失"), 1)
|
|
275
287
|
]))), 128))], 64))), 128))])
|
|
276
|
-
])], 8,
|
|
288
|
+
])], 8, Te), [[ae, j.value]])]),
|
|
277
289
|
_: 1
|
|
278
290
|
}, 16)
|
|
279
|
-
], 8,
|
|
291
|
+
], 8, se));
|
|
280
292
|
}
|
|
281
|
-
}, [["__scopeId", "data-v-
|
|
282
|
-
export {
|
|
293
|
+
}, [["__scopeId", "data-v-629f27ff"]]);
|
|
294
|
+
export { w as default };
|
|
@@ -8,11 +8,14 @@ var f = [
|
|
|
8
8
|
"aria-valuemax",
|
|
9
9
|
"aria-valuenow",
|
|
10
10
|
"aria-busy"
|
|
11
|
-
], p =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
11
|
+
], p = ["viewBox"], m = [
|
|
12
|
+
"cx",
|
|
13
|
+
"cy",
|
|
14
|
+
"r",
|
|
15
|
+
"stroke-width"
|
|
16
|
+
], h = [
|
|
17
|
+
"cx",
|
|
18
|
+
"cy",
|
|
16
19
|
"r",
|
|
17
20
|
"stroke-width",
|
|
18
21
|
"stroke-dasharray",
|
|
@@ -41,7 +44,7 @@ var f = [
|
|
|
41
44
|
},
|
|
42
45
|
strokeWidth: {
|
|
43
46
|
type: [Number, String],
|
|
44
|
-
default:
|
|
47
|
+
default: 6
|
|
45
48
|
},
|
|
46
49
|
indeterminate: Boolean,
|
|
47
50
|
label: {
|
|
@@ -54,7 +57,7 @@ var f = [
|
|
|
54
57
|
let v = e, y = d(), b = !!a()?.ce, x = t(() => b ? {
|
|
55
58
|
...y,
|
|
56
59
|
id: void 0
|
|
57
|
-
} : y), S = t(() => Number.isFinite(v.max) && v.max > 0 ? v.max : 100), C = t(() => Number.isFinite(v.value) ? Math.max(0, Math.min(S.value, v.value)) : 0), w = t(() => C.value / S.value), T = t(() => Math.max(32, Number(v.size) || 96)), E = t(() => Math.max(2, Number(v.strokeWidth) ||
|
|
60
|
+
} : y), S = t(() => Number.isFinite(v.max) && v.max > 0 ? v.max : 100), C = t(() => Number.isFinite(v.value) ? Math.max(0, Math.min(S.value, v.value)) : 0), w = t(() => C.value / S.value), T = t(() => Math.max(32, Number(v.size) || 96)), E = t(() => Math.min(T.value - 2, Math.max(2, Number(v.strokeWidth) || 6))), D = t(() => (T.value - E.value) / 2), O = t(() => 2 * Math.PI * D.value), k = t(() => O.value * (1 - w.value));
|
|
58
61
|
return (t, a) => (c(), r("div", o(x.value, {
|
|
59
62
|
class: "kima-ring-progress",
|
|
60
63
|
style: {
|
|
@@ -67,21 +70,25 @@ var f = [
|
|
|
67
70
|
"aria-valuemax": e.indeterminate ? void 0 : S.value,
|
|
68
71
|
"aria-valuenow": e.indeterminate ? void 0 : C.value,
|
|
69
72
|
"aria-busy": e.indeterminate || void 0
|
|
70
|
-
}), [(c(), r("svg",
|
|
73
|
+
}), [(c(), r("svg", {
|
|
74
|
+
class: "kima-ring-progress__svg",
|
|
75
|
+
viewBox: `0 0 ${T.value} ${T.value}`,
|
|
76
|
+
"aria-hidden": "true"
|
|
77
|
+
}, [i("circle", {
|
|
71
78
|
class: "kima-ring-progress__track",
|
|
72
|
-
cx:
|
|
73
|
-
cy:
|
|
79
|
+
cx: T.value / 2,
|
|
80
|
+
cy: T.value / 2,
|
|
74
81
|
r: D.value,
|
|
75
82
|
"stroke-width": E.value
|
|
76
83
|
}, null, 8, m), i("circle", {
|
|
77
84
|
class: s(["kima-ring-progress__value", { "kima-ring-progress__value--indeterminate": e.indeterminate }]),
|
|
78
|
-
cx:
|
|
79
|
-
cy:
|
|
85
|
+
cx: T.value / 2,
|
|
86
|
+
cy: T.value / 2,
|
|
80
87
|
r: D.value,
|
|
81
88
|
"stroke-width": E.value,
|
|
82
89
|
"stroke-dasharray": O.value,
|
|
83
90
|
"stroke-dashoffset": e.indeterminate ? O.value * .7 : k.value
|
|
84
|
-
}, null, 10, h)])), e.showValue && !e.indeterminate ? (c(), r("span", g, l(Math.round(w.value * 100)) + "%", 1)) : e.indeterminate ? (c(), r("span", _, "加载中")) : n("", !0)], 16, f));
|
|
91
|
+
}, null, 10, h)], 8, p)), e.showValue && !e.indeterminate ? (c(), r("span", g, l(Math.round(w.value * 100)) + "%", 1)) : e.indeterminate ? (c(), r("span", _, "加载中")) : n("", !0)], 16, f));
|
|
85
92
|
}
|
|
86
|
-
}), [["__scopeId", "data-v-
|
|
93
|
+
}), [["__scopeId", "data-v-56ea3993"]]);
|
|
87
94
|
export { v as default };
|
|
@@ -99,6 +99,7 @@ var w = [
|
|
|
99
99
|
}, null, 40, T), p(r, {
|
|
100
100
|
icon: b(C),
|
|
101
101
|
size: 28,
|
|
102
|
+
class: "kima-rating__icon",
|
|
102
103
|
"aria-hidden": "true"
|
|
103
104
|
}, null, 8, ["icon"])], 2))), 128))], 16, w), t.clearable && !t.readonly ? (_(), c(n, {
|
|
104
105
|
key: 0,
|
|
@@ -111,5 +112,5 @@ var w = [
|
|
|
111
112
|
_: 1
|
|
112
113
|
}, 8, ["disabled"])) : l("", !0)], 6));
|
|
113
114
|
}
|
|
114
|
-
}), [["__scopeId", "data-v-
|
|
115
|
+
}), [["__scopeId", "data-v-eafb58fe"]]);
|
|
115
116
|
export { E as default };
|
package/package.json
CHANGED
package/dist/components/content/chart.ce.vue_vue_type_style_index_0_scoped_b8556b1a_lang.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@keyframes kima-ripple-glow-b8556b1a{0%{opacity:.14}55%{opacity:.1}to{opacity:0}}.kima-chart[data-v-b8556b1a]{--kima-chart-series-1:var(--kima-color-primary);--kima-chart-series-2:color-mix(in srgb, var(--kima-color-primary) 65%, var(--kima-color-tertiary-container));--kima-chart-series-3:color-mix(in srgb, var(--kima-color-primary) 65%, var(--kima-color-secondary-container));--kima-chart-series-4:color-mix(in srgb, var(--kima-color-primary) 55%, var(--kima-color-on-surface));--kima-heatmap-low:var(--kima-color-layer-2);--kima-heatmap-high:var(--kima-color-primary-container);min-width:0;color:var(--kima-color-on-surface);font-family:var(--kima-font-family);font-weight:var(--kima-font-weight-semi-bold)}@media (prefers-reduced-motion:reduce){.kima-chart[data-v-b8556b1a],.kima-chart[data-v-b8556b1a] *{transition-duration:0s!important;animation-duration:0s!important}}.kima-chart[data-v-b8556b1a]{gap:var(--kima-space-2);display:grid}.kima-chart__legend[data-v-b8556b1a]{gap:var(--kima-space-2);flex-wrap:wrap;display:flex}.kima-chart__swatch[data-v-b8556b1a]{border-radius:50%;width:.8em;height:.8em;margin-inline-end:.5em;display:inline-block}.kima-chart__plot[data-v-b8556b1a]{width:100%;height:auto;overflow:visible}.kima-chart__axis[data-v-b8556b1a]{fill:var(--kima-color-on-surface-variant);font-size:11px}.kima-chart__axis line[data-v-b8556b1a]{stroke:var(--kima-color-layer-3);stroke-width:1px}.kima-chart__series[data-v-b8556b1a]{animation:kima-chart-appear-b8556b1a var(--kima-duration-slow) var(--kima-curve-standard)}.kima-chart__point[data-v-b8556b1a]{cursor:pointer;opacity:.8;transition:opacity var(--kima-duration-effects) var(--kima-curve-standard);outline:none}.kima-chart__point[data-v-b8556b1a]:hover,.kima-chart__point[data-v-b8556b1a]:focus,.kima-chart__point[aria-pressed=true][data-v-b8556b1a]{opacity:1;filter:drop-shadow(0 0 3px)}.kima-chart__point[data-v-b8556b1a]:focus-visible{outline:2px solid var(--kima-color-primary);outline-offset:3px}.kima-chart__area[data-v-b8556b1a]{fill:currentColor;opacity:.15}.kima-chart__tooltip[data-v-b8556b1a]{background:var(--kima-color-popup);color:var(--kima-color-on-surface);padding:var(--kima-space-3);border-radius:var(--kima-radius-m);box-shadow:var(--kima-elevation-3)}.kima-chart__hint[data-v-b8556b1a]{font-size:var(--kima-font-size-label-medium);color:var(--kima-color-on-surface-variant);margin:0}.kima-chart__table[data-v-b8556b1a]{overflow:auto}.kima-chart__table table[data-v-b8556b1a]{border-collapse:collapse;width:100%;font:inherit}.kima-chart__table table th[data-v-b8556b1a],.kima-chart__table table td[data-v-b8556b1a]{padding:var(--kima-space-2);text-align:start}.kima-chart__table table tr[data-v-b8556b1a]:nth-child(2n){background:var(--kima-color-layer-1)}@keyframes kima-chart-appear-b8556b1a{0%{opacity:0}to{opacity:1}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.kima-divider[data-v-5402a5d3]{align-items:center;gap:var(--kima-space-3);width:100%;min-height:1px;color:var(--kima-color-on-surface-variant);font-family:var(--kima-font-family);display:flex}.kima-divider--inset[data-v-5402a5d3]:not(.kima-divider--vertical){width:auto;margin-inline:var(--kima-space-6)}.kima-divider__line[data-v-5402a5d3]{background:var(--kima-color-outline);flex:auto;min-width:0;height:1px;display:block}.kima-divider__label[data-v-5402a5d3]{font-size:var(--kima-font-size-sm);text-align:center;flex:none;line-height:1.4}.kima-divider--vertical[data-v-5402a5d3]{gap:var(--kima-space-2);flex-direction:column;width:1px;height:100%;min-height:48px}.kima-divider--vertical.kima-divider--inset[data-v-5402a5d3]{height:auto;margin-block:var(--kima-space-6)}.kima-divider--vertical .kima-divider__line[data-v-5402a5d3]{flex:auto;width:1px;height:auto;min-height:0}.kima-divider--vertical .kima-divider__label[data-v-5402a5d3]{writing-mode:vertical-rl}
|
package/dist/components/data/ring-progress.ce.vue_vue_type_style_index_0_scoped_15220fc3_lang.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.kima-ring-progress[data-v-15220fc3]{color:var(--kima-color-primary);font-family:var(--kima-font-family);place-items:center;display:inline-grid;position:relative}.kima-ring-progress__svg[data-v-15220fc3]{width:100%;height:100%;overflow:visible;transform:rotate(-90deg)}.kima-ring-progress__track[data-v-15220fc3],.kima-ring-progress__value[data-v-15220fc3]{fill:none;stroke-linecap:round}.kima-ring-progress__track[data-v-15220fc3]{stroke:var(--kima-color-layer-3)}.kima-ring-progress__value[data-v-15220fc3]{stroke:currentColor;transition:stroke-dashoffset var(--kima-duration-medium) var(--kima-curve-standard)}.kima-ring-progress__value--indeterminate[data-v-15220fc3]{animation:1.3s linear infinite kima-ring-progress-spin-15220fc3}.kima-ring-progress__label[data-v-15220fc3]{color:var(--kima-color-on-surface);font-size:var(--kima-font-size-label-medium);position:absolute}@keyframes kima-ring-progress-spin-15220fc3{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.kima-ring-progress__value[data-v-15220fc3]{transition:none}.kima-ring-progress__value--indeterminate[data-v-15220fc3]{stroke-dashoffset:0;animation:none}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@keyframes kima-ripple-glow-23c50b69{0%{opacity:.14}55%{opacity:.1}to{opacity:0}}.kima-rating-wrap[data-v-23c50b69]{box-sizing:border-box;color:var(--kima-color-on-surface);font-family:var(--kima-font-family);font-size:var(--kima-font-size-body-large);font-weight:var(--kima-font-weight-semi-bold)}.kima-rating-wrap[aria-disabled=true][data-v-23c50b69]{opacity:var(--kima-opacity-disabled)}.kima-rating-wrap[data-v-23c50b69]{align-items:center;gap:var(--kima-space-2);flex-wrap:wrap;display:inline-flex}.kima-rating[data-v-23c50b69]{position:relative;overflow:hidden}.kima-rating[data-v-23c50b69] .kima-ripple{z-index:2;pointer-events:none;animation:kima-ripple-glow-23c50b69 var(--kima-duration-slower) linear forwards;background:currentColor;position:absolute;inset:0}.kima-rating[data-v-23c50b69]{border-radius:var(--kima-radius-m);display:inline-flex}.kima-rating[aria-disabled=true][data-v-23c50b69]{opacity:var(--kima-opacity-disabled)}.kima-rating__star[data-v-23c50b69]{position:relative}.kima-rating__star[data-v-23c50b69]:after{content:"";z-index:1;border-radius:inherit;opacity:0;pointer-events:none;transition:opacity var(--kima-duration-effects) var(--kima-curve-standard);background:currentColor;position:absolute;inset:0}.kima-rating__star[data-v-23c50b69]>*{z-index:2;position:relative}.kima-rating__star[data-v-23c50b69]:hover:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-hover)}.kima-rating__star[data-v-23c50b69]:focus-visible:after{opacity:var(--kima-state-focus)}.kima-rating__star[data-v-23c50b69]:active:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-pressed)}.kima-rating__star[data-v-23c50b69]{transition:color var(--kima-duration-effects) var(--kima-curve-standard), background-color var(--kima-duration-effects) var(--kima-curve-standard), border-color var(--kima-duration-effects) var(--kima-curve-standard), box-shadow var(--kima-duration-effects) var(--kima-curve-standard), opacity var(--kima-duration-effects) var(--kima-curve-standard);min-width:44px;min-height:var(--kima-field-height);border-radius:var(--kima-radius-m);color:var(--kima-color-on-surface-variant);cursor:pointer;place-items:center;display:grid}.kima-rating__star--filled[data-v-23c50b69]{color:var(--kima-color-on-primary-container);background:var(--kima-color-primary-container)}.kima-rating__star[data-v-23c50b69]:has(input:focus-visible){outline:var(--kima-focus-ring-width) solid var(--kima-color-primary);outline-offset:calc(-1 * var(--kima-focus-ring-width))}.kima-rating__star input[data-v-23c50b69]{opacity:0;z-index:3;width:100%;height:100%;cursor:inherit;margin:0;position:absolute;inset:0}
|
package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_b46618b2_lang.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@keyframes kima-ripple-glow-b46618b2{0%{opacity:.14}55%{opacity:.1}to{opacity:0}}.kima-tags-input[data-v-b46618b2]{box-sizing:border-box;color:var(--kima-color-on-surface);font-family:var(--kima-font-family);font-size:var(--kima-font-size-body-large);font-weight:var(--kima-font-weight-semi-bold)}.kima-tags-input[aria-disabled=true][data-v-b46618b2]{opacity:var(--kima-opacity-disabled)}.kima-tags-input[data-v-b46618b2]{background:var(--kima-color-layer-2);border:0;position:relative}.kima-tags-input[data-v-b46618b2]:after{content:"";z-index:1;border-radius:inherit;opacity:0;pointer-events:none;transition:opacity var(--kima-duration-effects) var(--kima-curve-standard);background:currentColor;position:absolute;inset:0}.kima-tags-input[data-v-b46618b2]>*{z-index:2;position:relative}.kima-tags-input[data-v-b46618b2]:hover:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-hover)}.kima-tags-input[data-v-b46618b2]:focus-visible:after{opacity:var(--kima-state-focus)}.kima-tags-input[data-v-b46618b2]:active:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-pressed)}.kima-tags-input[data-v-b46618b2]{position:relative;overflow:hidden}.kima-tags-input[data-v-b46618b2] .kima-ripple{z-index:2;pointer-events:none;animation:kima-ripple-glow-b46618b2 var(--kima-duration-slower) linear forwards;background:currentColor;position:absolute;inset:0}.kima-tags-input[data-v-b46618b2]{border-radius:var(--kima-radius-m);transition:background-color var(--kima-duration-effects) var(--kima-curve-standard), box-shadow var(--kima-duration-effects) var(--kima-curve-standard)}.kima-tags-input[data-v-b46618b2]:focus-within{background:var(--kima-color-layer-3);box-shadow:inset 0 0 0 var(--kima-outline-width-focused) var(--kima-color-primary)}.kima-tags-input[data-v-b46618b2]{align-items:center;gap:var(--kima-space-2);padding:var(--kima-space-2);flex-wrap:wrap;display:flex}.kima-tags-input>input[data-v-b46618b2]:not([type=hidden]){box-sizing:border-box;min-width:0;min-height:var(--kima-field-height);padding:var(--kima-space-3) var(--kima-field-padding);border-radius:inherit;color:inherit;background:var(--kima-color-transparent);font:inherit;border:0;outline:0}.kima-tags-input>input[data-v-b46618b2]:not([type=hidden])::placeholder{color:var(--kima-color-on-surface-variant)}.kima-tags-input>input[data-v-b46618b2]:not([type=hidden]):disabled{cursor:not-allowed}.kima-tags-input>input[data-v-b46618b2]:not([type=hidden]){flex:1;width:8em}.kima-tags-input__tag[data-v-b46618b2]{align-items:center;gap:var(--kima-space-1);border-radius:var(--kima-radius-full);background:var(--kima-color-primary-container);color:var(--kima-color-on-primary-container);padding-inline-start:var(--kima-space-3);display:inline-flex}.kima-tags-input__tag.kima-list-leave-active[data-v-b46618b2]{position:absolute}
|