x-next 1.7.0 → 1.8.1

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 (88) hide show
  1. package/AI_USAGE.md +129 -4
  2. package/CHANGELOG.md +47 -0
  3. package/dist/_hooks/use-chart-size.d.ts +25 -0
  4. package/dist/_utils/chart/index.d.ts +6 -0
  5. package/dist/_utils/chart/padding.d.ts +15 -0
  6. package/dist/_utils/chart/path.d.ts +34 -0
  7. package/dist/_utils/chart/scale.d.ts +55 -0
  8. package/dist/components/_components/chart/ChartAxis.d.ts +85 -0
  9. package/dist/components/_components/chart/ChartLegend.d.ts +26 -0
  10. package/dist/components/_components/chart/ChartTooltip.d.ts +76 -0
  11. package/dist/components/_components/chart/colors.d.ts +10 -0
  12. package/dist/components/_components/chart/interface.d.ts +38 -0
  13. package/dist/components/bar-chart/BarChart.d.ts +278 -0
  14. package/dist/components/bar-chart/helpers/layout.d.ts +55 -0
  15. package/dist/components/bar-chart/index.d.ts +600 -0
  16. package/dist/components/bar-chart/interface.d.ts +74 -0
  17. package/dist/components/bar-chart/props.d.ts +145 -0
  18. package/dist/components/heatmap/Heatmap.d.ts +10 -1
  19. package/dist/components/heatmap/index.d.ts +30 -3
  20. package/dist/components/index.d.ts +3 -0
  21. package/dist/components/line-chart/LineChart.d.ts +295 -0
  22. package/dist/components/line-chart/helpers/layout.d.ts +74 -0
  23. package/dist/components/line-chart/index.d.ts +614 -0
  24. package/dist/components/line-chart/interface.d.ts +76 -0
  25. package/dist/components/line-chart/props.d.ts +173 -0
  26. package/dist/components/pie-chart/PieChart.d.ts +219 -0
  27. package/dist/components/pie-chart/index.d.ts +470 -0
  28. package/dist/components/pie-chart/interface.d.ts +58 -0
  29. package/dist/components/pie-chart/props.d.ts +107 -0
  30. package/dist/components/trend-chart/components/TrendChart.d.ts +19 -96
  31. package/dist/components/trend-chart/index.d.ts +33 -187
  32. package/dist/components/trend-chart/props.d.ts +9 -78
  33. package/dist/components/trend-chart/themes.d.ts +0 -1
  34. package/dist/es/_hooks/use-chart-size.js +25 -0
  35. package/dist/es/_styles/palette-aliases.js +5 -0
  36. package/dist/es/_utils/chart/padding.js +22 -0
  37. package/dist/es/_utils/chart/path.js +69 -0
  38. package/dist/es/_utils/chart/scale.js +77 -0
  39. package/dist/es/components/_components/chart/ChartAxis.js +79 -0
  40. package/dist/es/components/_components/chart/ChartLegend.js +53 -0
  41. package/dist/es/components/_components/chart/ChartTooltip.js +64 -0
  42. package/dist/es/components/_components/chart/colors.js +12 -0
  43. package/dist/es/components/bar-chart/BarChart.js +470 -0
  44. package/dist/es/components/bar-chart/helpers/layout.js +53 -0
  45. package/dist/es/components/bar-chart/index.js +8 -0
  46. package/dist/es/components/bar-chart/props.js +148 -0
  47. package/dist/es/components/heatmap/Heatmap.js +249 -172
  48. package/dist/es/components/index.js +132 -126
  49. package/dist/es/components/line-chart/LineChart.js +532 -0
  50. package/dist/es/components/line-chart/helpers/layout.js +80 -0
  51. package/dist/es/components/line-chart/index.js +8 -0
  52. package/dist/es/components/line-chart/props.js +178 -0
  53. package/dist/es/components/pie-chart/PieChart.js +397 -0
  54. package/dist/es/components/pie-chart/index.js +8 -0
  55. package/dist/es/components/pie-chart/props.js +104 -0
  56. package/dist/es/components/trend-chart/components/TrendChart.js +143 -183
  57. package/dist/es/components/trend-chart/components/trend-chart-curve.js +85 -81
  58. package/dist/es/components/trend-chart/props.js +28 -74
  59. package/dist/es/components/trend-chart/themes.js +30 -31
  60. package/dist/es/index.js +193 -187
  61. package/dist/es/locale/en-US.js +8 -1
  62. package/dist/es/locale/zh-CN.js +8 -1
  63. package/dist/es/style.css +1 -1
  64. package/dist/index.cjs +4 -4
  65. package/dist/index.umd.js +4 -4
  66. package/dist/locale/interface.d.ts +13 -0
  67. package/dist/style/bar-chart.css +1 -0
  68. package/dist/style/bar-chart.js +2 -0
  69. package/dist/style/base.css +1 -1
  70. package/dist/style/heatmap.css +1 -1
  71. package/dist/style/line-chart.css +1 -0
  72. package/dist/style/line-chart.js +2 -0
  73. package/dist/style/pie-chart.css +1 -0
  74. package/dist/style/pie-chart.js +2 -0
  75. package/dist/style.css +1 -1
  76. package/dist/types.d.ts +3 -0
  77. package/package.json +1 -1
  78. package/volar.d.ts +3 -0
  79. package/dist/components/trend-chart/components/trend-chart-grid.d.ts +0 -55
  80. package/dist/components/trend-chart/components/trend-chart-labels.d.ts +0 -26
  81. package/dist/components/trend-chart/helpers/genPath.d.ts +0 -8
  82. package/dist/components/trend-chart/helpers/getPadding.d.ts +0 -8
  83. package/dist/components/trend-chart/helpers/validatePadding.d.ts +0 -2
  84. package/dist/es/components/trend-chart/components/trend-chart-grid.js +0 -62
  85. package/dist/es/components/trend-chart/components/trend-chart-labels.js +0 -75
  86. package/dist/es/components/trend-chart/helpers/genPath.js +0 -22
  87. package/dist/es/components/trend-chart/helpers/getPadding.js +0 -21
  88. package/dist/es/components/trend-chart/helpers/validatePadding.js +0 -7
@@ -1,13 +1,13 @@
1
- import { defineComponent as W, createVNode as l, toRefs as $, computed as n, ref as q, Fragment as j } from "vue";
2
- import { getClassNameMixin as P } from "../../_utils/config.js";
3
- import { useSize as T } from "../../_hooks/use-size.js";
4
- import { useLocale as V } from "../../locale/index.js";
5
- import { isObject as _ } from "../../_utils/is.js";
6
- import { throttleByRaf as F } from "../../_utils/throttle-by-raf.js";
7
- import { Spin as H } from "../spin/index.js";
8
- import { getWeekdayLabels as G } from "../date-picker/utils.js";
9
- import { CELL_SIZE as A, resolveRange as U, indexDataByDay as Z, getValueExtent as J, buildMatrix as K, DEFAULT_COLOR_LEVELS as Q, getMonthLabels as X, isCellInRequestedRange as ee } from "./helpers/matrix.js";
10
- const ue = /* @__PURE__ */ W({
1
+ import { defineComponent as X, createVNode as n, useId as ee, toRefs as te, computed as o, ref as W, watch as le, nextTick as ae, Fragment as ne } from "vue";
2
+ import { getClassNameMixin as oe } from "../../_utils/config.js";
3
+ import { useSize as re } from "../../_hooks/use-size.js";
4
+ import { useLocale as ie } from "../../locale/index.js";
5
+ import { isObject as se } from "../../_utils/is.js";
6
+ import { throttleByRaf as ue } from "../../_utils/throttle-by-raf.js";
7
+ import { Spin as ce } from "../spin/index.js";
8
+ import { getWeekdayLabels as de } from "../date-picker/utils.js";
9
+ import { CELL_SIZE as K, resolveRange as me, indexDataByDay as ve, getValueExtent as fe, buildMatrix as he, DEFAULT_COLOR_LEVELS as pe, getMonthLabels as ye, isCellInRequestedRange as ge } from "./helpers/matrix.js";
10
+ const U = 2, Ee = /* @__PURE__ */ X({
11
11
  name: "Heatmap",
12
12
  props: {
13
13
  /**
@@ -70,7 +70,7 @@ const ue = /* @__PURE__ */ W({
70
70
  firstDayOfWeek: {
71
71
  type: Number,
72
72
  default: 0,
73
- validator: (e) => e >= 0 && e <= 6
73
+ validator: (t) => t >= 0 && t <= 6
74
74
  },
75
75
  /**
76
76
  * @zh 是否展示星期标签
@@ -132,203 +132,280 @@ const ue = /* @__PURE__ */ W({
132
132
  * @param {HeatmapCell} cell
133
133
  * @param {MouseEvent} ev
134
134
  */
135
- cellClick: (e, b) => !0
135
+ cellClick: (t, D) => !0
136
136
  },
137
137
  slots: Object,
138
- setup(e, {
139
- emit: b,
140
- slots: I
138
+ setup(t, {
139
+ emit: D,
140
+ slots: Y
141
141
  }) {
142
142
  const {
143
- t: v,
144
- locale: O
145
- } = V(), h = P("heatmap"), {
146
- mergedSize: x
147
- } = T($(e).size, {
143
+ t: p,
144
+ locale: C
145
+ } = ie(), z = oe("heatmap"), S = `x-heatmap-cell-${ee()}`, {
146
+ mergedSize: y
147
+ } = re(te(t).size, {
148
148
  defaultValue: "medium"
149
- }), c = n(() => A[x.value] ?? A.medium), d = n(() => {
150
- var t;
151
- return (t = e.activeColors) != null && t.length ? e.activeColors : ["var(--x-heatmap-color-level-1)", "var(--x-heatmap-color-level-2)", "var(--x-heatmap-color-level-3)", "var(--x-heatmap-color-level-4)", "var(--x-heatmap-color-level-5)"];
152
- }), C = n(() => e.minimumColor ?? "var(--x-heatmap-color-empty)"), k = n(() => [C.value, ...d.value]), i = n(() => U({
153
- year: e.year,
154
- startDate: e.startDate,
155
- endDate: e.endDate,
156
- data: e.data
157
- }, e.firstDayOfWeek)), y = n(() => Z(e.data)), E = n(() => J(e.data)), p = n(() => i.value ? K(i.value, y.value, E.value, d.value.length || Q) : []), R = n(() => {
158
- const t = Array.from({
159
- length: 7
160
- }, () => []);
161
- return p.value.forEach((a) => {
162
- t[a.rowIndex].push(a);
163
- }), t;
164
- }), N = n(() => G(e.firstDayOfWeek, O.value.datePicker)), L = n(() => {
165
- if (!i.value) return [];
166
- const t = i.value.requestedStart.year() !== i.value.requestedEnd.year();
167
- return X(i.value, p.value, (a) => t ? a.format("YYYY-MM") : v("heatmap.month", {
168
- month: a.month() + 1
149
+ }), s = o(() => K[y.value] ?? K.medium), E = o(() => {
150
+ var e;
151
+ return (e = t.activeColors) != null && e.length ? t.activeColors : ["var(--x-heatmap-color-level-1)", "var(--x-heatmap-color-level-2)", "var(--x-heatmap-color-level-3)", "var(--x-heatmap-color-level-4)", "var(--x-heatmap-color-level-5)"];
152
+ }), R = o(() => t.minimumColor ?? "var(--x-heatmap-color-empty)"), b = o(() => [R.value, ...E.value]), c = o(() => me({
153
+ year: t.year,
154
+ startDate: t.startDate,
155
+ endDate: t.endDate,
156
+ data: t.data
157
+ }, t.firstDayOfWeek)), P = o(() => ve(t.data)), A = o(() => fe(t.data)), m = o(() => c.value ? he(c.value, P.value, A.value, E.value.length || pe) : []), q = o(() => de(t.firstDayOfWeek, C.value.datePicker)), F = o(() => {
158
+ if (!c.value) return [];
159
+ const e = c.value.requestedStart.year() !== c.value.requestedEnd.year();
160
+ return ye(c.value, m.value, (l) => e ? l.format("YYYY-MM") : p("heatmap.month", {
161
+ month: l.month() + 1
169
162
  }));
170
- }), r = (t) => k.value[t.level] ?? C.value, w = (t) => {
171
- const a = t.date.format("YYYY-MM-DD"), m = t.value;
172
- return m === null ? v("heatmap.noData", {
173
- date: a
174
- }) : v("heatmap.value", {
175
- date: a,
176
- value: m
163
+ }), V = (e) => b.value[e.level] ?? R.value, $ = (e) => {
164
+ const l = e.date.format("YYYY-MM-DD"), r = e.value;
165
+ return r === null ? p("heatmap.noData", {
166
+ date: l
167
+ }) : p("heatmap.value", {
168
+ date: l,
169
+ value: r
177
170
  });
178
- }, f = q(null), g = n(() => e.tooltip !== !1), S = n(() => f.value === null ? null : p.value[f.value] ?? null), Y = n(() => {
179
- const t = S.value;
180
- if (!t) return {};
181
- const a = 2, m = t.colIndex * (c.value + a) + c.value / 2, D = t.rowIndex * (c.value + a) + c.value;
182
- return {
183
- left: `${m}px`,
184
- top: `${D + 6}px`
171
+ }, d = W(null), L = o(() => t.tooltip !== !1), x = W(null), i = {
172
+ tooltip: x
173
+ }, k = W(0), M = o(() => d.value === null ? null : m.value[d.value] ?? null), w = o(() => m.value.reduce((e, l) => Math.max(e, l.colIndex + 1), 0)), _ = o(() => {
174
+ const e = U;
175
+ return w.value <= 0 ? 0 : w.value * s.value + (w.value - 1) * e;
176
+ }), O = o(() => {
177
+ const e = M.value;
178
+ if (!e) return {};
179
+ const l = U, r = e.colIndex * (s.value + l) + s.value / 2, u = e.rowIndex * (s.value + l) + s.value, h = k.value / 2, f = _.value;
180
+ let H = r;
181
+ return h > 0 && f > 0 && (H = f >= k.value ? Math.min(Math.max(r, h), f - h) : f / 2), {
182
+ left: `${H}px`,
183
+ top: `${u + 6}px`
185
184
  };
186
- }), z = (t) => {
187
- var D;
188
- if (!g.value) return;
189
- const a = t.target, m = (D = a == null ? void 0 : a.dataset) == null ? void 0 : D.index;
190
- f.value = m === void 0 ? null : Number(m);
185
+ });
186
+ le(d, (e) => {
187
+ if (e === null) {
188
+ k.value = 0;
189
+ return;
190
+ }
191
+ ae(() => {
192
+ var r;
193
+ const l = ((r = x.value) == null ? void 0 : r.offsetWidth) ?? 0;
194
+ l !== k.value && (k.value = l);
195
+ });
196
+ });
197
+ const j = (e) => {
198
+ var u;
199
+ if (!L.value) return;
200
+ const l = e.target, r = (u = l == null ? void 0 : l.dataset) == null ? void 0 : u.index;
201
+ g.value = !1, d.value = r === void 0 ? null : Number(r);
191
202
  }, B = () => {
192
- f.value = null;
193
- }, o = (t, a) => {
194
- b("cellClick", t, a);
195
- }, u = F(z), s = n(() => ({
196
- "--x-heatmap-cell-size": `${c.value}px`,
197
- gridTemplateRows: `repeat(7, ${c.value}px)`
203
+ d.value = null, g.value = !1;
204
+ }, g = W(!1), N = (e, l = !1) => {
205
+ g.value = l, d.value = e;
206
+ }, T = (e) => {
207
+ if (!L.value || m.value.length === 0) return;
208
+ const l = m.value.length - 1, r = d.value;
209
+ let u = null;
210
+ if (e.key === "ArrowRight") u = Math.min(l, (r ?? -1) + 1);
211
+ else if (e.key === "ArrowLeft") u = Math.max(0, (r ?? l + 1) - 1);
212
+ else if (e.key === "ArrowDown") u = Math.min(l, (r ?? -7) + 7);
213
+ else if (e.key === "ArrowUp") u = Math.max(0, (r ?? 7) - 7);
214
+ else if (e.key === "Home") {
215
+ const h = r ?? 0, f = m.value[h];
216
+ u = f ? Math.max(0, h - f.rowIndex) : 0;
217
+ } else if (e.key === "End") {
218
+ const h = r ?? l, f = m.value[h];
219
+ u = f ? Math.min(l, h + (6 - f.rowIndex)) : l;
220
+ } else if (e.key === "Escape") {
221
+ B();
222
+ return;
223
+ }
224
+ u !== null && (e.preventDefault(), N(u, !0));
225
+ }, a = () => {
226
+ d.value === null && N(0, !0);
227
+ }, v = o(() => g.value && d.value !== null ? `${S}-${d.value}` : void 0), I = o(() => t.ariaLabel ?? p("heatmap.gridLabel")), G = o(() => {
228
+ const e = M.value;
229
+ return !g.value || !e ? "" : $(e);
230
+ }), Z = (e, l) => {
231
+ D("cellClick", e, l);
232
+ }, J = ue(j), Q = o(() => ({
233
+ "--x-heatmap-cell-size": `${s.value}px`,
234
+ gridTemplateRows: `repeat(7, ${s.value}px)`
198
235
  }));
199
236
  return {
200
- t: v,
201
- className: h,
202
- mergedSize: x,
203
- cells: p,
204
- rows: R,
205
- range: i,
206
- gridStyle: s,
207
- weekdayLabels: N,
208
- monthLabels: L,
209
- activeCell: S,
210
- tooltipEnabled: g,
211
- tooltipStyle: Y,
212
- cellColor: r,
213
- cellLabel: w,
214
- handleCellClick: o,
215
- throttledMove: u,
237
+ t: p,
238
+ className: z,
239
+ mergedSize: y,
240
+ cells: m,
241
+ range: c,
242
+ gridStyle: Q,
243
+ weekdayLabels: q,
244
+ monthLabels: F,
245
+ activeCell: M,
246
+ tooltipEnabled: L,
247
+ tooltipStyle: O,
248
+ cellColor: V,
249
+ cellLabel: $,
250
+ handleCellClick: Z,
251
+ throttledMove: J,
216
252
  clearActive: B,
217
- isInRange: (t) => i.value ? ee(t, i.value.requestedStart, i.value.requestedEnd) : !0,
218
- colorPalette: k,
219
- slots: I
253
+ handleKeydown: T,
254
+ handleGridFocus: a,
255
+ activeDescendant: v,
256
+ gridLabel: I,
257
+ cellIdPrefix: S,
258
+ liveText: G,
259
+ isInRange: (e) => c.value ? ge(e, c.value.requestedStart, c.value.requestedEnd) : !0,
260
+ colorPalette: b,
261
+ slots: Y,
262
+ refs: i,
263
+ setTooltipElement: (e) => {
264
+ x.value = e;
265
+ }
220
266
  };
221
267
  },
222
268
  render() {
223
269
  const {
224
- className: e,
225
- mergedSize: b,
226
- cells: I,
227
- rows: v,
228
- range: O,
229
- gridStyle: h,
230
- weekdayLabels: x,
231
- monthLabels: c,
232
- activeCell: d,
233
- tooltipEnabled: C,
234
- tooltipStyle: k,
235
- cellColor: i,
236
- cellLabel: y,
237
- handleCellClick: E,
238
- throttledMove: p,
239
- clearActive: R,
240
- isInRange: N,
241
- colorPalette: L,
242
- slots: r,
270
+ className: t,
271
+ mergedSize: D,
272
+ cells: Y,
273
+ range: p,
274
+ gridStyle: C,
275
+ weekdayLabels: z,
276
+ monthLabels: S,
277
+ activeCell: y,
278
+ tooltipEnabled: s,
279
+ tooltipStyle: E,
280
+ cellColor: R,
281
+ cellLabel: b,
282
+ handleCellClick: c,
283
+ throttledMove: P,
284
+ clearActive: A,
285
+ handleKeydown: m,
286
+ handleGridFocus: q,
287
+ activeDescendant: F,
288
+ gridLabel: V,
289
+ cellIdPrefix: $,
290
+ liveText: d,
291
+ isInRange: L,
292
+ colorPalette: x,
293
+ slots: i,
294
+ refs: k,
295
+ setTooltipElement: M,
243
296
  t: w
244
297
  } = this;
245
- if (!O) return null;
246
- const f = _(this.loading) ? this.loading : {
298
+ if (!p) return null;
299
+ const _ = se(this.loading) ? this.loading : {
247
300
  loading: this.loading,
248
301
  dot: "color"
249
- }, g = C && d !== null, S = () => l("div", {
250
- class: e.element("grid"),
302
+ }, O = s && y !== null, j = () => n("div", {
303
+ class: t.element("grid"),
251
304
  style: {
252
- ...h,
305
+ ...C,
253
306
  "--x-heatmap-cell-gap": "var(--x-spacing-1)"
254
307
  },
255
- onMousemove: p,
256
- onMouseleave: R
257
- }, [v.map((o, u) => o.map((s) => l("div", {
258
- key: s.timestamp,
259
- class: [e.element("cell"), e.modifier(`level-${s.level}`), {
260
- [e.is("out-of-range")]: !N(s)
308
+ role: s ? "grid" : void 0,
309
+ tabindex: s ? 0 : void 0,
310
+ "aria-activedescendant": F,
311
+ "aria-label": s ? V : void 0,
312
+ onMousemove: P,
313
+ onMouseleave: A,
314
+ onFocus: q,
315
+ onBlur: A,
316
+ onKeydown: m
317
+ }, [Y.map((a, v) => n("div", {
318
+ key: a.timestamp,
319
+ id: `${$}-${v}`,
320
+ class: [t.element("cell"), t.modifier(`level-${a.level}`), {
321
+ [t.is("out-of-range")]: !L(a)
261
322
  }],
262
323
  style: {
263
- backgroundColor: i(s)
324
+ backgroundColor: R(a),
325
+ /*
326
+ * 显式定位:位置由 rowIndex / colIndex 决定,不再依赖
327
+ * `grid-auto-flow` 的自动填充顺序。
328
+ *
329
+ * 这正是此前数据被整体转置的原因:cells 是列优先数组,
330
+ * CSS 按列填充,而渲染顺序曾是行优先,三者不一致时布局静默错位。
331
+ * 显式定位后 DOM 顺序对布局没有任何影响,与 tooltip 使用的
332
+ * 语义坐标天然一致(等价于 SVG 里用公式算 x/y)。
333
+ */
334
+ gridRow: a.rowIndex + 1,
335
+ gridColumn: a.colIndex + 1
264
336
  },
265
- "data-index": I.indexOf(s),
266
- title: g ? void 0 : y(s),
267
- onClick: (M) => E(s, M),
337
+ "data-index": v,
338
+ title: O ? void 0 : b(a),
339
+ onClick: (I) => c(a, I),
268
340
  role: "gridcell",
269
- "aria-label": y(s)
270
- }, [])))]), Y = () => {
271
- if (!g || !d) return null;
272
- const o = {
273
- ...d,
274
- label: y(d)
341
+ "aria-label": b(a)
342
+ }, [])), B()]), B = () => {
343
+ if (!O || !y) return null;
344
+ const a = {
345
+ ...y,
346
+ label: b(y)
275
347
  };
276
- return l("div", {
277
- class: [e.element("tooltip"), e.is("visible")],
278
- style: k,
348
+ return n("div", {
349
+ ref: M,
350
+ class: [t.element("tooltip"), t.is("visible")],
351
+ style: E,
279
352
  role: "tooltip"
280
- }, [r.tooltip ? r.tooltip(o) : o.label]);
281
- }, z = () => {
282
- var o, u;
283
- return this.showColorIndicator ? l("div", {
284
- class: e.element("indicator")
285
- }, [r.indicator ? r.indicator({
286
- colors: L
287
- }) : l(j, null, [l("span", {
288
- class: e.element("indicator-leading")
289
- }, [((o = r["indicator-leading-text"]) == null ? void 0 : o.call(r)) ?? w("heatmap.less")]), L.map((s, M) => l("span", {
290
- key: M,
291
- class: e.element("indicator-swatch"),
353
+ }, [i.tooltip ? i.tooltip(a) : a.label]);
354
+ }, g = () => {
355
+ var a, v;
356
+ return this.showColorIndicator ? n("div", {
357
+ class: t.element("indicator")
358
+ }, [i.indicator ? i.indicator({
359
+ colors: x
360
+ }) : n(ne, null, [n("span", {
361
+ class: t.element("indicator-leading")
362
+ }, [((a = i["indicator-leading-text"]) == null ? void 0 : a.call(i)) ?? w("heatmap.less")]), x.map((I, G) => n("span", {
363
+ key: G,
364
+ class: t.element("indicator-swatch"),
292
365
  style: {
293
- backgroundColor: s
366
+ backgroundColor: I
294
367
  }
295
- }, null)), l("span", {
296
- class: e.element("indicator-trailing")
297
- }, [((u = r["indicator-trailing-text"]) == null ? void 0 : u.call(r)) ?? w("heatmap.more")])])]) : null;
298
- }, B = () => l("div", {
299
- class: e.element("body")
300
- }, [this.showWeekLabels && l("div", {
301
- class: e.element("week-labels"),
302
- style: h
303
- }, [x.map((o, u) => l("span", {
304
- key: u,
305
- class: e.element("week-label"),
368
+ }, null)), n("span", {
369
+ class: t.element("indicator-trailing")
370
+ }, [((v = i["indicator-trailing-text"]) == null ? void 0 : v.call(i)) ?? w("heatmap.more")])])]) : null;
371
+ }, N = () => n("div", {
372
+ class: t.element("body")
373
+ }, [this.showWeekLabels && n("div", {
374
+ class: t.element("week-labels"),
375
+ style: C
376
+ }, [z.map((a, v) => n("span", {
377
+ key: v,
378
+ class: t.element("week-label"),
306
379
  style: {
307
- visibility: u % 2 === 1 ? "visible" : "hidden"
380
+ visibility: v % 2 === 1 ? "visible" : "hidden"
308
381
  }
309
- }, [o]))]), l("div", {
310
- class: e.element("grid-wrapper")
311
- }, [this.showMonthLabels && l("div", {
312
- class: e.element("month-labels"),
313
- style: h
314
- }, [c.map((o) => l("span", {
315
- key: o.text,
316
- class: e.element("month-label"),
382
+ }, [a]))]), n("div", {
383
+ class: t.element("grid-wrapper")
384
+ }, [this.showMonthLabels && n("div", {
385
+ class: t.element("month-labels"),
386
+ style: C
387
+ }, [S.map((a) => n("span", {
388
+ key: a.text,
389
+ class: t.element("month-label"),
317
390
  style: {
318
- gridColumn: o.colIndex + 1
391
+ gridColumn: a.colIndex + 1
319
392
  }
320
- }, [o.text]))]), S()]), Y()]);
321
- return l("div", {
322
- class: [e.block, e.modifier(`size-${b}`)],
323
- role: this.ariaLabel ? "img" : void 0,
324
- "aria-label": this.ariaLabel
325
- }, [l(H, f, {
326
- default: () => [B(), z(), r.footer && l("div", {
327
- class: e.element("footer")
328
- }, [r.footer()])]
329
- })]);
393
+ }, [a.text]))]), j()])]), T = s;
394
+ return n("div", {
395
+ class: [t.block, t.modifier(`size-${D}`)]
396
+ }, [n("div", {
397
+ role: !T && this.ariaLabel ? "img" : void 0,
398
+ "aria-label": T ? void 0 : this.ariaLabel
399
+ }, [n(ce, _, {
400
+ default: () => [N(), g(), i.footer && n("div", {
401
+ class: t.element("footer")
402
+ }, [i.footer()])]
403
+ })]), n("span", {
404
+ class: t.element("live"),
405
+ "aria-live": "polite"
406
+ }, [d])]);
330
407
  }
331
408
  });
332
409
  export {
333
- ue as default
410
+ Ee as default
334
411
  };