@kernel4632/kima 0.12.2 → 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.
Files changed (26) hide show
  1. package/dist/components/content/chart.ce.vue_vue_type_style_index_0_scoped_629f27ff_lang.css +1 -0
  2. package/dist/components/core/divider.ce.vue_vue_type_style_index_0_scoped_38d4d501_lang.css +1 -0
  3. package/dist/components/data/ring-progress.ce.vue_vue_type_style_index_0_scoped_56ea3993_lang.css +1 -0
  4. package/dist/components/input/rating.ce.vue_vue_type_style_index_0_scoped_eafb58fe_lang.css +1 -0
  5. package/dist/components/input/tags-input.ce.vue_vue_type_style_index_0_scoped_d78c0562_lang.css +1 -0
  6. package/dist/kima-elements-core.js +3 -3
  7. package/dist/kima-elements.js +13287 -13267
  8. package/dist/style.css +6 -6
  9. package/dist/styles/_tokens.css +1 -1
  10. package/dist/styles/chart.css +1 -1
  11. package/dist/styles/core.css +1 -1
  12. package/dist/styles/divider.css +1 -1
  13. package/dist/styles/rating.css +1 -1
  14. package/dist/styles/ring-progress.css +1 -1
  15. package/dist/styles/tags-input.css +1 -1
  16. package/dist/vue/components/content/chart.ce.js +143 -131
  17. package/dist/vue/components/core/divider.ce.js +1 -1
  18. package/dist/vue/components/data/ring-progress.ce.js +21 -14
  19. package/dist/vue/components/input/rating.ce.js +2 -1
  20. package/dist/vue/components/input/tags-input.ce.js +1 -1
  21. package/package.json +1 -1
  22. package/dist/components/content/chart.ce.vue_vue_type_style_index_0_scoped_b8556b1a_lang.css +0 -1
  23. package/dist/components/core/divider.ce.vue_vue_type_style_index_0_scoped_5402a5d3_lang.css +0 -1
  24. package/dist/components/data/ring-progress.ce.vue_vue_type_style_index_0_scoped_15220fc3_lang.css +0 -1
  25. package/dist/components/input/rating.ce.vue_vue_type_style_index_0_scoped_23c50b69_lang.css +0 -1
  26. 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 c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, mergeProps as m, nextTick as ee, normalizeStyle as h, openBlock as g, ref as _, renderList as v, toDisplayString as y, unref as b, useId as x, vShow as te, withCtx as S, withDirectives as C, withKeys as w, withModifiers as T } from "vue";
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 ne = ["aria-label"], re = {
8
+ var se = ["aria-label"], ce = {
9
9
  class: "kima-chart__legend",
10
10
  "aria-label": "图例"
11
- }, ie = ["aria-label", "aria-describedby"], ae = { class: "kima-chart__axis" }, oe = ["y1", "y2"], se = ["y"], ce = ["y1", "y2"], le = {
12
- x: "365",
13
- y: "295",
14
- "text-anchor": "middle"
15
- }, ue = {
16
- x: "8",
17
- y: "15"
18
- }, de = ["x"], fe = {
19
- x: "55",
20
- y: "273"
21
- }, pe = {
22
- x: "675",
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
- ], E = [
31
+ ], be = [
35
32
  "x",
36
33
  "y",
37
34
  "width",
38
35
  "height"
39
- ], _e = [
36
+ ], xe = [
40
37
  "cx",
41
38
  "cy",
42
39
  "r"
43
- ], D = ["cx", "cy"], O = ["id"], k = {
40
+ ], Se = ["cx", "cy"], Ce = ["id"], we = {
44
41
  key: 0,
45
42
  class: "kima-chart__tooltip",
46
43
  role: "status"
47
- }, A = [
44
+ }, Te = [
48
45
  "inert",
49
46
  "aria-hidden",
50
47
  "id"
51
- ], j = { scope: "row" }, M = /*#__PURE__*/ e({
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: M }) {
87
- let N = e, P = M, F = _(null), I = _(null), L = _([]), R = _(null), z = _(!1), B = x();
88
- i(I, () => [N.series, N.mode]);
89
- let V = (e) => `var(--kima-chart-series-${e % 4 + 1})`, H = s(() => N.series.map((e, t) => ({
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: N.labels[t] ?? (typeof e == "object" && e ? e.x : t + 1)
101
+ label: T.labels[t] ?? (typeof e == "object" && e ? e.x : t + 1)
97
102
  }))
98
- }))), U = (e) => typeof e.y == "number" && Number.isFinite(e.y), W = s(() => H.value.filter((e) => !L.value.includes(e.si))), G = s(() => Math.max(1, N.labels.length, ...H.value.map((e) => e.values.length))), K = s(() => {
99
- let e = W.value.flatMap((e) => e.values.filter(U).map((e) => e.y)), t = Math.min(0, ...e), n = Math.max(0, ...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
- }), q = s(() => {
102
- let e = W.value.flatMap((e) => e.values.map((e) => Number(e.x)).filter(Number.isFinite));
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
- }), J = (e) => N.mode === "scatter" ? 55 + (Number(e.x) - q.value[0]) / (q.value[1] - q.value[0]) * 620 : 55 + (e.i + .5) / G.value * 620, Y = (e) => 250 - (e - K.value[0]) / (K.value[1] - K.value[0]) * 220, X = s(() => W.value.flatMap((e) => e.values.filter(U).map((t) => ({
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
- })))), Z = s(() => X.value.find((e) => e.key === R.value)), ve = s(() => Array.from({ length: 5 }, (e, t) => K.value[0] + (K.value[1] - K.value[0]) * t / 4));
110
- function ye(e) {
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) U(r) ? n.push(r) : n.length && (t.push(n), n = []);
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"}${J(e)},${Y(e.y)}`).join(" "), be = (e) => `${Q(e)} L${J(e.at(-1))},${Y(0)} L${J(e[0])},${Y(0)} Z`;
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
- R.value = e.key, P("select", {
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 xe(e, t) {
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 = X.value.length, r = X.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;
135
- $(X.value[i]), await ee(), F.value?.querySelector(`[data-point="${X.value[i].key}"]`)?.focus();
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 Se(e) {
138
- L.value = L.value.includes(e) ? L.value.filter((t) => t !== e) : [...L.value, e], R.value = null;
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) => (g(), u("section", {
145
+ return (i, s) => (h(), l("section", {
141
146
  ref_key: "root",
142
- ref: F,
147
+ ref: D,
143
148
  class: "kima-chart",
144
149
  "aria-label": e.label
145
150
  }, [
146
- d("div", re, [(g(!0), u(a, null, v(H.value, (e) => (g(), c(t, {
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": !L.value.includes(e.si),
150
- onClick: (t) => Se(e.si)
154
+ "aria-pressed": !k.value.includes(e.si),
155
+ onClick: (t) => je(e.si)
151
156
  }, {
152
- default: S(() => [d("span", {
157
+ default: b(() => [u("span", {
153
158
  class: "kima-chart__swatch",
154
- style: h({ background: V(e.si) })
155
- }, null, 4), f(y(e.name), 1)]),
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
- (g(), u("svg", {
163
+ (h(), l("svg", {
159
164
  ref_key: "plot",
160
- ref: I,
161
- viewBox: "0 0 720 300",
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": b(B) + "-hint"
166
- }, [d("g", ae, [
167
- (g(!0), u(a, null, v(ve.value, (e) => (g(), u("g", { key: e }, [d("line", {
168
- x1: "55",
169
- x2: "675",
170
- y1: Y(e),
171
- y2: Y(e)
172
- }, null, 8, oe), d("text", {
173
- x: "48",
174
- y: Y(e) + 4,
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
- }, y(Number(e.toPrecision(4))), 9, se)]))), 128)),
177
- d("line", {
178
- x1: "55",
179
- x2: "675",
180
- y1: Y(0),
181
- y2: Y(0)
182
- }, null, 8, ce),
183
- d("text", le, y(e.xLabel), 1),
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: 55 + (n + .5) / G.value * 620,
188
- y: "273",
191
+ x: 44 + (n + .5) / U.value * L.value,
192
+ y: I.value + 18,
189
193
  "text-anchor": "middle"
190
- }, y(e.mode === "scatter" ? "" : e.labels[n] ?? n + 1), 9, de))), 128)),
191
- e.mode === "scatter" ? (g(), u(a, { key: 0 }, [d("text", fe, y(q.value[0]), 1), d("text", pe, y(q.value[1]), 1)], 64)) : l("", !0)
192
- ]), (g(!0), u(a, null, v(W.value, (t) => (g(), u("g", {
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: h({ color: V(t.si) }),
205
+ style: m({ color: z(t.si) }),
195
206
  class: "kima-chart__series"
196
- }, [e.mode === "line" || e.mode === "area" ? (g(!0), u(a, { key: 0 }, v(ye(t), (t, n) => (g(), u("g", { key: n }, [e.mode === "area" ? (g(), u("path", {
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: be(t),
209
+ d: ke(t),
199
210
  class: "kima-chart__area"
200
- }, null, 8, me)) : l("", !0), d("path", {
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
- }, null, 8, he)]))), 128)) : l("", !0), (g(!0), u(a, null, v(X.value.filter((e) => e.si === t.si), (n) => (g(), u("g", {
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: R.value === n.key || !Z.value && X.value[0]?.key === n.key ? 0 : -1,
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": R.value === n.key,
223
+ "aria-pressed": A.value === n.key,
212
224
  class: "kima-chart__point",
213
225
  onKeydown: [
214
- (e) => xe(e, n),
215
- w(T((e) => $(n), ["prevent"]), ["enter"]),
216
- w(T((e) => $(n), ["prevent"]), ["space"])
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" ? (g(), u("rect", {
233
+ }, [e.mode === "bar" ? (h(), l("rect", {
222
234
  key: 0,
223
- x: J(n) - Math.max(2, 500 / G.value / Math.max(1, W.value.length)) / 2 + (W.value.findIndex((e) => e.si === t.si) - (W.value.length - 1) / 2) * (500 / G.value / Math.max(1, W.value.length)),
224
- y: Math.min(Y(0), Y(n.y)),
225
- width: Math.max(2, 500 / G.value / Math.max(1, W.value.length)),
226
- height: Math.max(2, Math.abs(Y(n.y) - Y(0))),
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, E)) : (g(), u("circle", {
241
+ }, null, 8, be)) : (h(), l("circle", {
230
242
  key: 1,
231
- cx: J(n),
232
- cy: Y(n.y),
233
- r: R.value === n.key ? 7 : 5,
243
+ cx: K(n),
244
+ cy: q(n.y),
245
+ r: A.value === n.key ? 7 : 5,
234
246
  fill: "currentColor"
235
- }, null, 8, _e)), d("circle", {
236
- cx: J(n),
237
- cy: Y(n.y),
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, D)], 40, ge))), 128))], 4))), 128))], 8, ie)),
241
- d("p", {
242
- id: b(B) + "-hint",
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 到首尾;空值保留断点。" + y(X.value.length ? "" : "暂无有效数据"), 9, O),
245
- p(o, m({ name: "kima-popup" }, b(r)), {
246
- default: S(() => [Z.value ? (g(), u("output", k, y(Z.value.name) + " · " + y(Z.value.label) + ":" + y(Z.value.y), 1)) : l("", !0)]),
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
- p(t, {
261
+ f(t, {
250
262
  variant: "text",
251
- "aria-expanded": z.value,
252
- "aria-controls": b(B) + "-table",
253
- onClick: s[0] ||= (e) => z.value = !z.value
263
+ "aria-expanded": j.value,
264
+ "aria-controls": y(M) + "-table",
265
+ onClick: s[0] ||= (e) => j.value = !j.value
254
266
  }, {
255
- default: S(() => [f(y(z.value ? "收起" : "查看") + "数据表", 1)]),
267
+ default: b(() => [d(v(j.value ? "收起" : "查看") + "数据表", 1)]),
256
268
  _: 1
257
269
  }, 8, ["aria-expanded", "aria-controls"]),
258
- p(o, m({ css: !1 }, b(n)), {
259
- default: S(() => [C(d("div", {
260
- inert: !z.value,
261
- "aria-hidden": !z.value || void 0,
262
- id: b(B) + "-table",
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
- }, [d("table", null, [
265
- d("caption", null, y(e.label) + "(含隐藏系列)", 1),
266
- d("thead", null, [d("tr", null, [
267
- d("th", null, y(e.xLabel), 1),
268
- s[1] ||= d("th", null, "系列", -1),
269
- d("th", null, y(e.yLabel), 1)
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
- d("tbody", null, [(g(!0), u(a, null, v(H.value, (e) => (g(), u(a, { key: e.si }, [(g(!0), u(a, null, v(e.values, (t) => (g(), u("tr", { key: t.i }, [
272
- d("th", j, y(t.label), 1),
273
- d("td", null, y(e.name), 1),
274
- d("td", null, y(U(t) ? t.y : "缺失"), 1)
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, A), [[te, z.value]])]),
288
+ ])], 8, Te), [[ae, j.value]])]),
277
289
  _: 1
278
290
  }, 16)
279
- ], 8, ne));
291
+ ], 8, se));
280
292
  }
281
- }, [["__scopeId", "data-v-b8556b1a"]]);
282
- export { M as default };
293
+ }, [["__scopeId", "data-v-629f27ff"]]);
294
+ export { w as default };
@@ -45,5 +45,5 @@ var g = ["aria-orientation"], _ = {
45
45
  D.value ? (u(), o("span", v)) : a("", !0)
46
46
  ], 16, g));
47
47
  }
48
- }), [["__scopeId", "data-v-5402a5d3"]]);
48
+ }), [["__scopeId", "data-v-38d4d501"]]);
49
49
  export { y as default };
@@ -8,11 +8,14 @@ var f = [
8
8
  "aria-valuemax",
9
9
  "aria-valuenow",
10
10
  "aria-busy"
11
- ], p = {
12
- class: "kima-ring-progress__svg",
13
- viewBox: "0 0 100 100",
14
- "aria-hidden": "true"
15
- }, m = ["r", "stroke-width"], h = [
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: 8
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) || 8)), D = t(() => (T.value - E.value) / 2), O = t(() => 2 * Math.PI * D.value), k = t(() => O.value * (1 - w.value));
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", p, [i("circle", {
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: "50",
73
- cy: "50",
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: "50",
79
- cy: "50",
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-15220fc3"]]);
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-23c50b69"]]);
115
+ }), [["__scopeId", "data-v-eafb58fe"]]);
115
116
  export { E as default };
@@ -155,5 +155,5 @@ var A = ["aria-disabled"], j = [
155
155
  }), null, 16, M), [[T, z.value]])
156
156
  ], 14, A));
157
157
  }
158
- }), [["__scopeId", "data-v-b46618b2"]]);
158
+ }), [["__scopeId", "data-v-d78c0562"]]);
159
159
  export { N as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernel4632/kima",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "KIMA (Kinetic, Interaction, Motion, Alive) - a Material 3 style Web UI design system and component library.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -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}
@@ -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}
@@ -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}