iryx-ui 0.10.2 → 0.11.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 CHANGED
@@ -690,6 +690,23 @@ visually-hidden table instead, so a screen reader gets the actual numbers
690
690
  rather than a blank graphic. That table renders even before the container has
691
691
  been measured — the data is never gated behind layout.
692
692
 
693
+ **`stacked`** turns grouped series into one bar per category:
694
+
695
+ ```vue
696
+ <IBarChart :data="cashflow" :series="series" stacked label="Cashflow" />
697
+ ```
698
+
699
+ Stacking answers *"what makes up the total"*; grouping answers *"how do these
700
+ compare"*. Only the bottom segment shares a baseline, so segments above it are
701
+ hard to compare across categories — stay with grouped bars when the comparison
702
+ matters more than the total.
703
+
704
+ The axis is sized against the running totals, only the outermost segment is
705
+ rounded, and the tooltip adds a **Total** row (`totalLabel` to rename it).
706
+ Negative values stack downward from zero rather than cancelling positives out,
707
+ so a mixed stack shows both sides at full length. Stacking is ignored for a
708
+ single series, and works horizontally too.
709
+
693
710
  **`orientation="horizontal"`** runs the categories down the side:
694
711
 
695
712
  ```vue
@@ -21,6 +21,16 @@ export interface BarChartProps {
21
21
  * or numerous category names are the case to turn the chart for.
22
22
  */
23
23
  orientation?: 'vertical' | 'horizontal';
24
+ /**
25
+ * Stack the series into one bar per category instead of grouping them
26
+ * side by side.
27
+ *
28
+ * Stacking answers "what makes up the total"; grouping answers "how do these
29
+ * compare". Only the bottom segment shares a baseline, so every segment
30
+ * above it is hard to compare across categories — reach for grouped bars
31
+ * when the comparison matters more than the total.
32
+ */
33
+ stacked?: boolean;
24
34
  /** Rendered height in px. Width always fills the container. */
25
35
  height?: number;
26
36
  /** Target tick count. The axis lands on round numbers, so this is a hint. */
@@ -29,6 +39,8 @@ export interface BarChartProps {
29
39
  axis?: boolean;
30
40
  /** Drop the legend. Only honoured for a single series — see below. */
31
41
  legend?: boolean;
42
+ /** Word for the stacked tooltip's sum — override for non-English apps. */
43
+ totalLabel?: string;
32
44
  /** Locale and options for every number shown — ticks and tooltip alike. */
33
45
  locale?: string;
34
46
  format?: Intl.NumberFormatOptions;
@@ -84,6 +96,7 @@ declare const __VLS_base: import("vue").DefineComponent<BarChartProps, {}, {}, {
84
96
  height: number;
85
97
  ticks: number;
86
98
  axis: boolean;
99
+ totalLabel: string;
87
100
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
88
101
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
89
102
  declare const _default: typeof __VLS_export;
@@ -5,37 +5,41 @@ import { barChartTheme as c } from "../theme/bar-chart.js";
5
5
  import l from "./ChartLegend.js";
6
6
  import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, defineComponent as g, guardReactiveProps as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, openBlock as x, ref as S, renderList as C, renderSlot as w, toDisplayString as T, unref as E } from "vue";
7
7
  //#region src/components/BarChart.vue?vue&type=script&setup=true&lang.ts
8
- var D = ["role", "aria-label"], O = [
8
+ var ee = ["role", "aria-label"], D = [
9
9
  "width",
10
10
  "height",
11
11
  "viewBox"
12
- ], k = [
12
+ ], te = [
13
13
  "x1",
14
14
  "y1",
15
15
  "x2",
16
16
  "y2"
17
- ], A = [
17
+ ], O = [
18
18
  "x",
19
19
  "y",
20
20
  "text-anchor",
21
21
  "dominant-baseline"
22
- ], j = ["d"], ee = [
22
+ ], k = ["d"], A = [
23
23
  "x",
24
24
  "y",
25
25
  "text-anchor",
26
26
  "dominant-baseline"
27
- ], te = [
27
+ ], ne = [
28
28
  "x",
29
29
  "y",
30
30
  "width",
31
31
  "height",
32
32
  "onPointerenter"
33
- ], ne = { scope: "row" }, re = .7, M = /*@__PURE__*/ g({
33
+ ], re = {
34
+ key: 2,
35
+ class: "flex items-center gap-1.5 border-t border-border pt-1"
36
+ }, ie = { scope: "row" }, ae = .7, j = /*@__PURE__*/ g({
34
37
  __name: "BarChart",
35
38
  props: {
36
39
  data: { default: () => [] },
37
40
  series: {},
38
41
  orientation: { default: "vertical" },
42
+ stacked: { type: Boolean },
39
43
  height: { default: 240 },
40
44
  ticks: { default: 5 },
41
45
  axis: {
@@ -46,6 +50,7 @@ var D = ["role", "aria-label"], O = [
46
50
  type: Boolean,
47
51
  default: !0
48
52
  },
53
+ totalLabel: { default: "Total" },
49
54
  locale: {},
50
55
  format: {},
51
56
  label: {},
@@ -57,57 +62,84 @@ var D = ["role", "aria-label"], O = [
57
62
  ui: {}
58
63
  },
59
64
  setup(g) {
60
- let M = g, N = e(), P = d(() => M.unstyled ?? N.unstyled), F = S(), { width: I } = s(F), L = d(() => new Intl.NumberFormat(M.locale, M.format));
61
- function R(e) {
62
- return L.value.format(e);
65
+ let j = g, M = e(), N = d(() => j.unstyled ?? M.unstyled), P = S(), { width: F } = s(P), I = d(() => new Intl.NumberFormat(j.locale, j.format));
66
+ function L(e) {
67
+ return I.value.format(e);
63
68
  }
64
- let z = d(() => {
65
- let e = M.series?.length ? [...M.series] : [{ key: "value" }];
69
+ let R = d(() => {
70
+ let e = j.series?.length ? [...j.series] : [{ key: "value" }];
66
71
  return o(e.length), e;
67
- }), B = d(() => z.value.length > 1), V = d(() => B.value || M.legend && z.value[0].name != null);
68
- function H(e, t) {
72
+ }), z = d(() => R.value.length > 1), oe = d(() => z.value || j.legend && R.value[0].name != null);
73
+ function B(e, t) {
69
74
  let n = e[t];
70
75
  return typeof n == "number" && Number.isFinite(n) ? n : null;
71
76
  }
72
- let U = d(() => M.orientation === "horizontal"), W = d(() => t({
73
- orientation: M.orientation,
74
- values: M.data.flatMap((e) => z.value.map((t) => H(e, t.key))),
75
- categories: M.data.length,
76
- longestLabel: Math.max(...M.data.map((e) => e.label.length), 1),
77
- width: I.value,
78
- height: M.height,
79
- tickCount: M.ticks,
80
- showAxis: M.axis,
81
- formatTick: R,
77
+ let V = d(() => j.orientation === "horizontal"), H = d(() => j.stacked && z.value);
78
+ function U(e) {
79
+ let t = 0, n = 0;
80
+ for (let r of R.value) {
81
+ let i = B(e, r.key);
82
+ i != null && (i >= 0 ? t += i : n += i);
83
+ }
84
+ return [t, n];
85
+ }
86
+ let W = d(() => t({
87
+ orientation: j.orientation,
88
+ values: H.value ? j.data.flatMap(U) : j.data.flatMap((e) => R.value.map((t) => B(e, t.key))),
89
+ categories: j.data.length,
90
+ longestLabel: Math.max(...j.data.map((e) => e.label.length), 1),
91
+ width: F.value,
92
+ height: j.height,
93
+ tickCount: j.ticks,
94
+ showAxis: j.axis,
95
+ formatTick: L,
82
96
  includeZero: !0
83
- })), G = d(() => W.value.plot), K = d(() => W.value.y), q = d(() => W.value.bandWidth), J = d(() => q.value * re), Y = d(() => Math.max(2, Math.min(24, J.value / z.value.length))), ie = d(() => {
84
- if (!I.value || !M.data.length) return [];
85
- let e = W.value.value(0), t = z.value.length, n = +(t > 1);
86
- return M.data.flatMap((r, i) => z.value.flatMap((a, o) => {
87
- let s = H(r, a.key);
88
- if (s == null) return [];
89
- let c = W.value.value(s), l = W.value.bandCentre(i) - Y.value * t / 2 + Y.value * o + n, u = Math.max(Y.value - n * 2, 1), d = Math.abs(c - e);
90
- return [U.value ? {
91
- x: Math.min(c, e),
92
- y: l,
93
- width: d,
94
- height: u,
95
- direction: s >= 0 ? "right" : "left",
96
- seriesIndex: o,
97
- categoryIndex: i
98
- } : {
99
- x: l,
100
- y: Math.min(c, e),
101
- width: u,
102
- height: d,
103
- direction: s >= 0 ? "up" : "down",
104
- seriesIndex: o,
105
- categoryIndex: i
106
- }];
107
- }));
97
+ })), G = d(() => W.value.plot), K = d(() => W.value.y), q = d(() => W.value.bandWidth), J = d(() => q.value * ae), Y = d(() => Math.max(2, Math.min(24, J.value / (H.value ? 1 : R.value.length)))), se = d(() => {
98
+ if (!F.value || !j.data.length) return [];
99
+ let e = W.value.value(0), t = R.value.length, n = +(t > 1 && !H.value);
100
+ return j.data.flatMap((r, i) => {
101
+ let a = 0, o = 0, s = R.value.reduce((e, t, n) => {
102
+ let i = B(r, t.key);
103
+ return i != null && i >= 0 ? n : e;
104
+ }, -1), c = R.value.reduce((e, t, n) => {
105
+ let i = B(r, t.key);
106
+ return i != null && i < 0 ? n : e;
107
+ }, -1);
108
+ return R.value.flatMap((l, u) => {
109
+ let d = B(r, l.key);
110
+ if (d == null) return [];
111
+ let f = e, p;
112
+ if (H.value) {
113
+ let e = d >= 0 ? a : o, t = e + d;
114
+ f = W.value.value(e), p = W.value.value(t), d >= 0 ? a = t : o = t;
115
+ } else p = W.value.value(d);
116
+ let m = H.value ? Y.value : Y.value * t, h = W.value.bandCentre(i) - m / 2 + (H.value ? 0 : Y.value * u) + n, g = Math.max(Y.value - n * 2, 1), _ = H.value ? Math.min(2, Math.abs(p - f) / 2) : 0, v = Math.max(Math.abs(p - f) - _, 0), y = p < f ? p + _ : f, b = !H.value || u === (d >= 0 ? s : c);
117
+ return [V.value ? {
118
+ x: y,
119
+ y: h,
120
+ width: v,
121
+ height: g,
122
+ direction: d >= 0 ? "right" : "left",
123
+ capped: b,
124
+ seriesIndex: u,
125
+ categoryIndex: i
126
+ } : {
127
+ x: h,
128
+ y,
129
+ width: g,
130
+ height: v,
131
+ direction: d >= 0 ? "up" : "down",
132
+ capped: b,
133
+ seriesIndex: u,
134
+ categoryIndex: i
135
+ }];
136
+ });
137
+ });
108
138
  });
109
- function ae(e) {
110
- let { x: t, y: n, width: r, height: i } = e, a = t + r, o = n + i, s = Math.min(4, r / 2, i / 2, e.direction === "up" || e.direction === "down" ? i : r);
139
+ function ce(e) {
140
+ let { x: t, y: n, width: r, height: i } = e, a = t + r;
141
+ if (!e.capped) return `M${t} ${n} L${a} ${n} L${a} ${n + i} L${t} ${n + i} Z`;
142
+ let o = n + i, s = Math.min(4, r / 2, i / 2, e.direction === "up" || e.direction === "down" ? i : r);
111
143
  switch (e.direction) {
112
144
  case "up": return `M${t} ${o} L${t} ${n + s} Q${t} ${n} ${t + s} ${n} L${a - s} ${n} Q${a} ${n} ${a} ${n + s} L${a} ${o} Z`;
113
145
  case "down": return `M${t} ${n} L${t} ${o - s} Q${t} ${o} ${t + s} ${o} L${a - s} ${o} Q${a} ${o} ${a} ${o - s} L${a} ${n} Z`;
@@ -115,144 +147,154 @@ var D = ["role", "aria-label"], O = [
115
147
  default: return `M${a} ${n} L${t + s} ${n} Q${t} ${n} ${t} ${n + s} L${t} ${o - s} Q${t} ${o} ${t + s} ${o} L${a} ${o} Z`;
116
148
  }
117
149
  }
118
- let oe = d(() => W.value.labelStep), X = S(), Z = d(() => {
150
+ let le = d(() => W.value.labelStep), X = S(), Z = d(() => {
119
151
  if (X.value == null) return;
120
- let e = M.data[X.value];
152
+ let e = j.data[X.value];
121
153
  if (!e) return;
122
- let t = z.value.map((t, n) => ({
154
+ let t = R.value.map((t, n) => ({
123
155
  name: t.name ?? t.key,
124
156
  color: r(i(t, n)),
125
- value: H(e, t.key)
157
+ value: B(e, t.key)
126
158
  })).filter((e) => e.value != null).map((e) => ({
127
159
  ...e,
128
- value: R(e.value)
160
+ value: L(e.value)
129
161
  }));
130
162
  if (!t.length) return;
131
- let o = B.value ? Math.max(e.label.length, ...t.map((e) => e.name.length + e.value.length + 3)) : e.label.length + t[0].value.length + 2, s = W.value.bandCentre(X.value);
132
- if (U.value) {
133
- let r = Math.max(...z.value.map((t) => {
134
- let n = H(e, t.key);
163
+ let o = H.value ? L(U(e).reduce((e, t) => e + t, 0)) : void 0, s = z.value ? Math.max(e.label.length, o ? o.length + 6 : 0, ...t.map((e) => e.name.length + e.value.length + 3)) : e.label.length + t[0].value.length + 2, c = W.value.bandCentre(X.value);
164
+ if (V.value) {
165
+ let r = H.value ? W.value.value(U(e)[0]) : Math.max(...R.value.map((t) => {
166
+ let n = B(e, t.key);
135
167
  return n == null ? -Infinity : W.value.value(n);
136
- })), i = "x".repeat(o), c = a(i), l = r + c + 8, u = l + c <= I.value;
168
+ })), i = "x".repeat(s), l = a(i), u = r + l + 8, d = u + l <= F.value;
137
169
  return {
138
170
  label: e.label,
139
171
  rows: t,
140
- multi: B.value,
141
- x: n(u ? l : r - c - 8, i, I.value),
142
- y: s
172
+ total: o,
173
+ multi: z.value,
174
+ x: n(d ? u : r - l - 8, i, F.value),
175
+ y: c
143
176
  };
144
177
  }
145
- let c = Math.min(...z.value.map((t) => {
146
- let n = H(e, t.key);
178
+ let l = H.value ? W.value.value(U(e)[0]) : Math.min(...R.value.map((t) => {
179
+ let n = B(e, t.key);
147
180
  return n == null ? Infinity : Math.min(W.value.value(n), W.value.value(0));
148
181
  }));
149
182
  return {
150
183
  label: e.label,
151
184
  rows: t,
152
- multi: B.value,
153
- x: n(s, "x".repeat(o), I.value),
154
- y: c
185
+ total: o,
186
+ multi: z.value,
187
+ x: n(c, "x".repeat(s), F.value),
188
+ y: l
155
189
  };
156
190
  }), Q = d(() => c());
157
191
  function $(e, t) {
158
- let n = M.ui?.[e];
159
- return P.value ? [n, t] : Q.value[e]({ class: [n, t] });
192
+ let n = j.ui?.[e];
193
+ return N.value ? [n, t] : Q.value[e]({ class: [n, t] });
160
194
  }
161
- function se(e) {
195
+ function ue(e) {
162
196
  let t = X.value != null && X.value !== e.categoryIndex;
163
- return P.value ? [M.ui?.bar] : Q.value.bar({ class: [M.ui?.bar, t ? Q.value.faded() : void 0] });
197
+ return N.value ? [j.ui?.bar] : Q.value.bar({ class: [j.ui?.bar, t ? Q.value.faded() : void 0] });
164
198
  }
165
199
  return (e, t) => (x(), m("div", {
166
200
  ref_key: "root",
167
- ref: F,
168
- role: M.label ? "figure" : void 0,
169
- "aria-label": M.label,
170
- class: v($("root", M.class))
201
+ ref: P,
202
+ role: j.label ? "figure" : void 0,
203
+ "aria-label": j.label,
204
+ class: v($("root", j.class))
171
205
  }, [
172
- V.value ? (x(), f(l, {
206
+ oe.value ? (x(), f(l, {
173
207
  key: 0,
174
- series: z.value,
175
- unstyled: M.unstyled
208
+ series: R.value,
209
+ unstyled: j.unstyled
176
210
  }, null, 8, ["series", "unstyled"])) : p("", !0),
177
- h("div", { class: v(P.value ? void 0 : Q.value.plot()) }, [(x(), m("svg", {
178
- width: E(I),
179
- height: M.height,
180
- viewBox: `0 0 ${E(I)} ${M.height}`,
211
+ h("div", { class: v(N.value ? void 0 : Q.value.plot()) }, [(x(), m("svg", {
212
+ width: E(F),
213
+ height: j.height,
214
+ viewBox: `0 0 ${E(F)} ${j.height}`,
181
215
  "aria-hidden": "true",
182
216
  class: v($("svg"))
183
217
  }, [
184
- M.axis ? (x(!0), m(u, { key: 0 }, C(W.value.ticks, (e) => (x(), m("g", { key: `tick-${e}` }, [h("line", {
185
- x1: U.value ? W.value.value(e) : G.value.left,
186
- y1: U.value ? G.value.top : K.value(e),
187
- x2: U.value ? W.value.value(e) : G.value.left + G.value.width,
188
- y2: U.value ? G.value.top + G.value.height : K.value(e),
218
+ j.axis ? (x(!0), m(u, { key: 0 }, C(W.value.ticks, (e) => (x(), m("g", { key: `tick-${e}` }, [h("line", {
219
+ x1: V.value ? W.value.value(e) : G.value.left,
220
+ y1: V.value ? G.value.top : K.value(e),
221
+ x2: V.value ? W.value.value(e) : G.value.left + G.value.width,
222
+ y2: V.value ? G.value.top + G.value.height : K.value(e),
189
223
  "stroke-width": "1",
190
224
  class: v($("grid"))
191
- }, null, 10, k), h("text", {
192
- x: U.value ? W.value.value(e) : G.value.left - E(8),
193
- y: U.value ? G.value.top + G.value.height + 14 : K.value(e),
194
- "text-anchor": U.value ? "middle" : "end",
195
- "dominant-baseline": U.value ? void 0 : "middle",
225
+ }, null, 10, te), h("text", {
226
+ x: V.value ? W.value.value(e) : G.value.left - E(8),
227
+ y: V.value ? G.value.top + G.value.height + 14 : K.value(e),
228
+ "text-anchor": V.value ? "middle" : "end",
229
+ "dominant-baseline": V.value ? void 0 : "middle",
196
230
  class: v($("tick"))
197
- }, T(R(e)), 11, A)]))), 128)) : p("", !0),
231
+ }, T(L(e)), 11, O)]))), 128)) : p("", !0),
198
232
  w(e.$slots, "underlay", y(_(W.value))),
199
- (x(!0), m(u, null, C(ie.value, (e, t) => (x(), m("path", {
233
+ (x(!0), m(u, null, C(se.value, (e, t) => (x(), m("path", {
200
234
  key: `bar-${e.categoryIndex}-${e.seriesIndex}-${t}`,
201
- d: ae(e),
202
- style: b({ fill: E(r)(E(i)(z.value[e.seriesIndex], e.seriesIndex)) }),
203
- class: v(se(e))
204
- }, null, 14, j))), 128)),
205
- (x(!0), m(u, null, C(M.data, (e, t) => (x(), m(u, { key: `label-${e.label}-${t}` }, [t % oe.value === 0 ? (x(), m("text", {
235
+ d: ce(e),
236
+ style: b({ fill: E(r)(E(i)(R.value[e.seriesIndex], e.seriesIndex)) }),
237
+ class: v(ue(e))
238
+ }, null, 14, k))), 128)),
239
+ (x(!0), m(u, null, C(j.data, (e, t) => (x(), m(u, { key: `label-${e.label}-${t}` }, [t % le.value === 0 ? (x(), m("text", {
206
240
  key: 0,
207
- x: U.value ? G.value.left - E(8) : W.value.bandCentre(t),
208
- y: U.value ? W.value.bandCentre(t) : G.value.top + G.value.height + 14,
209
- "text-anchor": U.value ? "end" : "middle",
210
- "dominant-baseline": U.value ? "middle" : void 0,
241
+ x: V.value ? G.value.left - E(8) : W.value.bandCentre(t),
242
+ y: V.value ? W.value.bandCentre(t) : G.value.top + G.value.height + 14,
243
+ "text-anchor": V.value ? "end" : "middle",
244
+ "dominant-baseline": V.value ? "middle" : void 0,
211
245
  class: v($("category"))
212
- }, T(e.label), 11, ee)) : p("", !0)], 64))), 128)),
246
+ }, T(e.label), 11, A)) : p("", !0)], 64))), 128)),
213
247
  w(e.$slots, "overlay", y(_(W.value))),
214
- (x(!0), m(u, null, C(M.data, (e, n) => (x(), m("rect", {
248
+ (x(!0), m(u, null, C(j.data, (e, n) => (x(), m("rect", {
215
249
  key: `hit-${e.label}-${n}`,
216
- x: U.value ? G.value.left : G.value.left + q.value * n,
217
- y: U.value ? G.value.top + q.value * n : G.value.top,
218
- width: U.value ? G.value.width : q.value,
219
- height: U.value ? q.value : G.value.height,
220
- class: v(P.value ? void 0 : Q.value.hit()),
250
+ x: V.value ? G.value.left : G.value.left + q.value * n,
251
+ y: V.value ? G.value.top + q.value * n : G.value.top,
252
+ width: V.value ? G.value.width : q.value,
253
+ height: V.value ? q.value : G.value.height,
254
+ class: v(N.value ? void 0 : Q.value.hit()),
221
255
  onPointerenter: (e) => X.value = n,
222
256
  onPointerleave: t[0] ||= (e) => X.value = void 0
223
- }, null, 42, te))), 128))
224
- ], 10, O)), Z.value ? (x(), m("div", {
257
+ }, null, 42, ne))), 128))
258
+ ], 10, D)), Z.value ? (x(), m("div", {
225
259
  key: 0,
226
260
  class: v($("tooltip", Z.value.multi ? "flex-col items-start gap-1" : void 0)),
227
261
  style: b({
228
262
  left: `${Z.value.x}px`,
229
263
  top: `${Z.value.y}px`,
230
- transform: U.value ? "translate(-50%, -50%)" : "translate(-50%, -100%) translateY(-8px)"
264
+ transform: V.value ? "translate(-50%, -50%)" : "translate(-50%, -100%) translateY(-8px)"
231
265
  })
232
- }, [h("span", { class: v($("tooltipLabel")) }, T(Z.value.label), 3), Z.value.multi ? (x(!0), m(u, { key: 0 }, C(Z.value.rows, (e) => (x(), m("span", {
233
- key: e.name,
234
- class: "flex items-center gap-1.5"
235
266
  }, [
236
- h("span", {
237
- class: "size-2 shrink-0 rounded-full",
238
- style: b({ background: e.color })
239
- }, null, 4),
240
- h("span", { class: v($("tooltipLabel")) }, T(e.name), 3),
241
- h("span", { class: v($("tooltipValue")) }, T(e.value), 3)
242
- ]))), 128)) : (x(), m("span", {
243
- key: 1,
244
- class: v($("tooltipValue"))
245
- }, T(Z.value.rows[0].value), 3))], 6)) : p("", !0)], 2),
267
+ h("span", { class: v($("tooltipLabel")) }, T(Z.value.label), 3),
268
+ Z.value.multi ? (x(!0), m(u, { key: 0 }, C(Z.value.rows, (e) => (x(), m("span", {
269
+ key: e.name,
270
+ class: "flex items-center gap-1.5"
271
+ }, [
272
+ h("span", {
273
+ class: "size-2 shrink-0 rounded-full",
274
+ style: b({ background: e.color })
275
+ }, null, 4),
276
+ h("span", { class: v($("tooltipLabel")) }, T(e.name), 3),
277
+ h("span", { class: v($("tooltipValue")) }, T(e.value), 3)
278
+ ]))), 128)) : (x(), m("span", {
279
+ key: 1,
280
+ class: v($("tooltipValue"))
281
+ }, T(Z.value.rows[0].value), 3)),
282
+ Z.value.total ? (x(), m("span", re, [
283
+ t[1] ||= h("span", { class: "size-2 shrink-0" }, null, -1),
284
+ h("span", { class: v($("tooltipLabel")) }, T(j.totalLabel), 3),
285
+ h("span", { class: v($("tooltipValue")) }, T(Z.value.total), 3)
286
+ ])) : p("", !0)
287
+ ], 6)) : p("", !0)], 2),
246
288
  h("table", { class: v($("table")) }, [
247
- h("caption", null, T(M.label), 1),
248
- h("thead", null, [h("tr", null, [t[1] ||= h("th", { scope: "col" }, " Category ", -1), (x(!0), m(u, null, C(z.value, (e) => (x(), m("th", {
289
+ h("caption", null, T(j.label), 1),
290
+ h("thead", null, [h("tr", null, [t[2] ||= h("th", { scope: "col" }, " Category ", -1), (x(!0), m(u, null, C(R.value, (e) => (x(), m("th", {
249
291
  key: e.key,
250
292
  scope: "col"
251
293
  }, T(e.name ?? "Value"), 1))), 128))])]),
252
- h("tbody", null, [(x(!0), m(u, null, C(M.data, (e, t) => (x(), m("tr", { key: `row-${e.label}-${t}` }, [h("th", ne, T(e.label), 1), (x(!0), m(u, null, C(z.value, (t) => (x(), m("td", { key: t.key }, T(H(e, t.key) == null ? "—" : R(H(e, t.key))), 1))), 128))]))), 128))])
294
+ h("tbody", null, [(x(!0), m(u, null, C(j.data, (e, t) => (x(), m("tr", { key: `row-${e.label}-${t}` }, [h("th", ie, T(e.label), 1), (x(!0), m(u, null, C(R.value, (t) => (x(), m("td", { key: t.key }, T(B(e, t.key) == null ? "—" : L(B(e, t.key))), 1))), 128))]))), 128))])
253
295
  ], 2)
254
- ], 10, D));
296
+ ], 10, ee));
255
297
  }
256
298
  });
257
299
  //#endregion
258
- export { M as default };
300
+ export { j as default };
@@ -42,8 +42,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
42
42
  }>, {
43
43
  unstyled: boolean;
44
44
  label: string;
45
- nextLabel: string;
46
45
  total: number;
46
+ nextLabel: string;
47
47
  itemsPerPage: number;
48
48
  siblingCount: number;
49
49
  showEdges: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "iryx-ui",
3
3
  "type": "module",
4
- "version": "0.10.2",
4
+ "version": "0.11.0",
5
5
  "description": "A Vue 3 component library built on Reka UI and Tailwind CSS v4.",
6
6
  "author": "therok1",
7
7
  "license": "MIT",