iryx-ui 0.27.0 → 0.29.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/dist/components/AppShell.vue.d.ts +13 -7
- package/dist/components/AppShell.vue_vue_type_script_setup_true_lang.js +58 -48
- package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +2 -0
- package/dist/components/DonutChart.vue.d.ts +9 -0
- package/dist/components/DonutChart.vue_vue_type_script_setup_true_lang.js +73 -65
- package/dist/components/Input.vue.d.ts +1 -1
- package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +192 -177
- package/dist/components/Select.vue.d.ts +2 -0
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +6 -4
- package/dist/components/Sidebar.vue.d.ts +3 -0
- package/dist/components/Sidebar.vue_vue_type_script_setup_true_lang.js +65 -62
- package/dist/components/Stat.vue.d.ts +12 -2
- package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +16 -3
- package/dist/components/Textarea.vue.d.ts +1 -1
- package/dist/components/ToggleGroup.vue.d.ts +1 -1
- package/dist/components/ToggleGroup.vue_vue_type_script_setup_true_lang.js +35 -29
- package/dist/composables/character-count.d.ts +1 -1
- package/dist/composables/character-count.js +8 -5
- package/dist/composables/sidebar.d.ts +11 -1
- package/dist/composables/sidebar.js +24 -13
- package/dist/index.js +166 -166
- package/dist/nuxt.js +3 -2
- package/dist/theme/app-shell.d.ts +3 -0
- package/dist/theme/app-shell.js +2 -1
- package/dist/theme/stat.d.ts +3 -0
- package/dist/theme/stat.js +2 -1
- package/package.json +2 -2
- package/theme.css +2 -2
|
@@ -3,35 +3,35 @@ import { useElementSize as t } from "../composables/element-size.js";
|
|
|
3
3
|
import { cartesianLayout as n, clampTooltip as r, seriesColor as i, slotOf as a, warnOnSlotOverflow as o } from "../composables/cartesian.js";
|
|
4
4
|
import { useChartAnimation as s, useChartReveal as c } from "../composables/chart-reveal.js";
|
|
5
5
|
import l from "./ChartLegend.js";
|
|
6
|
-
import { lineChartTheme as
|
|
7
|
-
import { Fragment as
|
|
6
|
+
import { lineChartTheme as ee } from "../theme/line-chart.js";
|
|
7
|
+
import { Fragment as u, computed as d, createBlock as te, createCommentVNode as f, createElementBlock as p, createElementVNode as m, defineComponent as h, guardReactiveProps as g, normalizeClass as _, normalizeProps as v, normalizeStyle as y, openBlock as b, ref as x, renderList as S, renderSlot as C, toDisplayString as w, unref as T, useId as E } from "vue";
|
|
8
8
|
//#region src/components/LineChart.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var ne = ["role", "aria-label"],
|
|
9
|
+
var ne = ["role", "aria-label"], D = [
|
|
10
10
|
"width",
|
|
11
11
|
"height",
|
|
12
12
|
"viewBox"
|
|
13
|
-
],
|
|
13
|
+
], re = [
|
|
14
14
|
"x1",
|
|
15
15
|
"y1",
|
|
16
16
|
"x2",
|
|
17
17
|
"y2"
|
|
18
|
-
],
|
|
18
|
+
], ie = ["x", "y"], ae = [
|
|
19
19
|
"x",
|
|
20
20
|
"y",
|
|
21
21
|
"width",
|
|
22
22
|
"height"
|
|
23
|
-
],
|
|
23
|
+
], oe = [
|
|
24
24
|
"x1",
|
|
25
25
|
"y1",
|
|
26
26
|
"x2",
|
|
27
27
|
"y2"
|
|
28
|
-
],
|
|
28
|
+
], se = ["clip-path"], ce = ["d", "fill"], le = ["d"], ue = ["d"], de = ["cx", "cy"], fe = ["cx", "cy"], pe = ["x", "y"], me = [
|
|
29
29
|
"x",
|
|
30
30
|
"y",
|
|
31
31
|
"width",
|
|
32
32
|
"height",
|
|
33
33
|
"onPointerenter"
|
|
34
|
-
],
|
|
34
|
+
], he = { scope: "row" }, O = /*@__PURE__*/ h({
|
|
35
35
|
__name: "LineChart",
|
|
36
36
|
props: {
|
|
37
37
|
data: { default: () => [] },
|
|
@@ -75,47 +75,47 @@ var ne = ["role", "aria-label"], re = [
|
|
|
75
75
|
] },
|
|
76
76
|
ui: {}
|
|
77
77
|
},
|
|
78
|
-
setup(
|
|
79
|
-
let
|
|
80
|
-
function
|
|
81
|
-
return
|
|
78
|
+
setup(h) {
|
|
79
|
+
let O = h, ge = e(), k = d(() => O.unstyled ?? ge.unstyled), A = x(), { width: j } = t(A), _e = d(() => new Intl.NumberFormat(O.locale, O.format));
|
|
80
|
+
function M(e) {
|
|
81
|
+
return _e.value.format(e);
|
|
82
82
|
}
|
|
83
|
-
let
|
|
84
|
-
let e =
|
|
83
|
+
let N = d(() => {
|
|
84
|
+
let e = O.series?.length ? [...O.series] : [{ key: "value" }];
|
|
85
85
|
return o(e.length), e;
|
|
86
|
-
}),
|
|
87
|
-
function
|
|
86
|
+
}), P = d(() => N.value.length > 1), ve = d(() => P.value || O.legend && N.value[0].name != null);
|
|
87
|
+
function F(e, t) {
|
|
88
88
|
let n = e[t];
|
|
89
89
|
return typeof n == "number" && Number.isFinite(n) ? n : null;
|
|
90
90
|
}
|
|
91
|
-
let
|
|
91
|
+
let I = d(() => O.variant === "stacked" && P.value), L = d(() => O.data.map((e) => N.value.reduce((t, n) => {
|
|
92
92
|
let r = t[t.length - 1] ?? 0;
|
|
93
|
-
return t.push(r + (
|
|
94
|
-
}, []))),
|
|
95
|
-
values:
|
|
96
|
-
categories:
|
|
97
|
-
longestLabel: Math.max(...
|
|
98
|
-
width:
|
|
99
|
-
height:
|
|
100
|
-
tickCount:
|
|
101
|
-
showAxis:
|
|
102
|
-
formatTick:
|
|
103
|
-
includeZero:
|
|
93
|
+
return t.push(r + (F(e, n.key) ?? 0)), t;
|
|
94
|
+
}, []))), R = d(() => n({
|
|
95
|
+
values: I.value ? L.value.map((e) => e[e.length - 1]) : O.data.flatMap((e) => N.value.map((t) => F(e, t.key))),
|
|
96
|
+
categories: O.data.length,
|
|
97
|
+
longestLabel: Math.max(...O.data.map((e) => e.label.length), 1),
|
|
98
|
+
width: j.value,
|
|
99
|
+
height: O.height,
|
|
100
|
+
tickCount: O.ticks,
|
|
101
|
+
showAxis: O.axis,
|
|
102
|
+
formatTick: M,
|
|
103
|
+
includeZero: O.zero || I.value
|
|
104
104
|
}));
|
|
105
|
-
function
|
|
105
|
+
function z(e) {
|
|
106
106
|
return Math.round(e * 100) / 100;
|
|
107
107
|
}
|
|
108
|
-
let
|
|
108
|
+
let B = d(() => j.value ? N.value.map((e, t) => {
|
|
109
109
|
let n = [], r = [];
|
|
110
|
-
return
|
|
111
|
-
let o =
|
|
110
|
+
return O.data.forEach((i, a) => {
|
|
111
|
+
let o = I.value ? L.value[a][t] : F(i, e.key);
|
|
112
112
|
if (o == null) {
|
|
113
113
|
r.length && n.push(r), r = [];
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
r.push({
|
|
117
|
-
x: R
|
|
118
|
-
y: R
|
|
117
|
+
x: z(R.value.pointAt(a)),
|
|
118
|
+
y: z(R.value.y(o)),
|
|
119
119
|
index: a
|
|
120
120
|
});
|
|
121
121
|
}), r.length && n.push(r), {
|
|
@@ -123,57 +123,72 @@ var ne = ["role", "aria-label"], re = [
|
|
|
123
123
|
color: i(a(e, t)),
|
|
124
124
|
seriesIndex: t
|
|
125
125
|
};
|
|
126
|
-
}) : []),
|
|
127
|
-
top:
|
|
128
|
-
x: R
|
|
129
|
-
y: R
|
|
126
|
+
}) : []), V = d(() => (O.variant === "area" || O.variant === "stacked") && !P.value && B.value.length > 0), ye = d(() => !I.value || !j.value ? [] : N.value.map((e, t) => ({
|
|
127
|
+
top: O.data.map((e, n) => ({
|
|
128
|
+
x: z(R.value.pointAt(n)),
|
|
129
|
+
y: z(R.value.y(L.value[n][t])),
|
|
130
130
|
index: n
|
|
131
131
|
})),
|
|
132
|
-
base:
|
|
133
|
-
x: R
|
|
134
|
-
y: R
|
|
132
|
+
base: O.data.map((e, n) => ({
|
|
133
|
+
x: z(R.value.pointAt(n)),
|
|
134
|
+
y: z(R.value.y(t === 0 ? 0 : L.value[n][t - 1])),
|
|
135
135
|
index: n
|
|
136
136
|
})),
|
|
137
137
|
color: i(a(e, t)),
|
|
138
138
|
seriesIndex: t
|
|
139
|
-
}))),
|
|
140
|
-
let e =
|
|
139
|
+
}))), be = d(() => {
|
|
140
|
+
let e = O.data?.length ?? 0;
|
|
141
141
|
return {
|
|
142
|
-
first: e ? R
|
|
143
|
-
last: e ? R
|
|
144
|
-
left: R
|
|
145
|
-
right: R
|
|
142
|
+
first: e ? z(R.value.pointAt(0)) : 0,
|
|
143
|
+
last: e ? z(R.value.pointAt(e - 1)) : 0,
|
|
144
|
+
left: z(R.value.plot.left),
|
|
145
|
+
right: z(R.value.plot.left + R.value.plot.width)
|
|
146
146
|
};
|
|
147
147
|
});
|
|
148
148
|
function H(e) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
function W(e) {
|
|
153
|
-
let t = e[0], n = e[e.length - 1], r = D.flush && t.x === V.value.first ? `M${V.value.left} ${t.y} L${t.x} ${t.y}` : `M${t.x} ${t.y}`;
|
|
154
|
-
if (U.value === 0 || e.length < 2) return [
|
|
155
|
-
r,
|
|
156
|
-
...e.slice(1).map((e) => `L${e.x} ${e.y}`),
|
|
157
|
-
H(n)
|
|
158
|
-
].filter(Boolean).join(" ");
|
|
159
|
-
let i = (e, t, n) => Math.min(Math.max(e, Math.min(t, n)), Math.max(t, n));
|
|
149
|
+
let t = e[0], n = e[e.length - 1];
|
|
150
|
+
if (!O.flush) return e;
|
|
151
|
+
let { first: r, last: i, left: a, right: o } = be.value, s = t.x === r ? a : t.x === i ? o : void 0, c = n.x === i ? o : n.x === r ? a : void 0;
|
|
160
152
|
return [
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
153
|
+
...s != null && s !== t.x ? [{
|
|
154
|
+
...t,
|
|
155
|
+
x: s
|
|
156
|
+
}] : [],
|
|
157
|
+
...e,
|
|
158
|
+
...c != null && c !== n.x ? [{
|
|
159
|
+
...n,
|
|
160
|
+
x: c
|
|
161
|
+
}] : []
|
|
162
|
+
];
|
|
168
163
|
}
|
|
164
|
+
let U = d(() => Math.min(Math.max(O.tension, 0), 1));
|
|
169
165
|
function xe(e) {
|
|
170
|
-
let t =
|
|
171
|
-
return
|
|
166
|
+
let t = e.slice(1).map((t, n) => (t.y - e[n].y) / (t.x - e[n].x || 1));
|
|
167
|
+
return e.map((n, r) => {
|
|
168
|
+
let i = t[r - 1], a = t[r];
|
|
169
|
+
if (i == null || a == null) return i ?? a ?? 0;
|
|
170
|
+
if (i * a <= 0) return 0;
|
|
171
|
+
let o = e[r - 1], s = e[r + 1], c = (s.y - o.y) / (s.x - o.x), l = 3 * Math.min(Math.abs(i), Math.abs(a));
|
|
172
|
+
return Math.sign(c) * Math.min(Math.abs(c), l);
|
|
173
|
+
});
|
|
172
174
|
}
|
|
173
|
-
function
|
|
175
|
+
function W(e) {
|
|
176
|
+
let t = H(e), n = `M${t[0].x} ${t[0].y}`;
|
|
177
|
+
if (U.value === 0 || t.length < 2) return [n, ...t.slice(1).map((e) => `L${e.x} ${e.y}`)].join(" ");
|
|
178
|
+
let r = xe(t);
|
|
179
|
+
return [n, ...t.slice(1).map((e, n) => {
|
|
180
|
+
let i = t[n], a = (e.x - i.x) / 3 * U.value, o = i.x + a, s = i.y + r[n] * a, c = e.x - a, l = e.y - r[n + 1] * a;
|
|
181
|
+
return `C${z(o)} ${z(s)}, ${z(c)} ${z(l)}, ${e.x} ${e.y}`;
|
|
182
|
+
})].join(" ");
|
|
183
|
+
}
|
|
184
|
+
function Se(e) {
|
|
185
|
+
let t = R.value.plot.top + R.value.plot.height, n = H(e);
|
|
186
|
+
return `${W(e)} L${n[n.length - 1].x} ${t} L${n[0].x} ${t} Z`;
|
|
187
|
+
}
|
|
188
|
+
function Ce(e, t) {
|
|
174
189
|
return `${W(e)} ${W([...t].reverse()).replace("M", "L")} Z`;
|
|
175
190
|
}
|
|
176
|
-
let G = `iryx-area-${
|
|
191
|
+
let G = `iryx-area-${E()}`, K = `iryx-plot-clip-${E()}`, q = x(), J = d(() => q.value == null ? [] : B.value.flatMap((e) => {
|
|
177
192
|
for (let t of e.runs) {
|
|
178
193
|
let n = t.find((e) => e.index === q.value);
|
|
179
194
|
if (n) return [{
|
|
@@ -182,184 +197,184 @@ var ne = ["role", "aria-label"], re = [
|
|
|
182
197
|
}];
|
|
183
198
|
}
|
|
184
199
|
return [];
|
|
185
|
-
})), Y =
|
|
200
|
+
})), Y = d(() => q.value == null ? void 0 : z(R.value.pointAt(q.value))), X = d(() => {
|
|
186
201
|
if (q.value == null) return;
|
|
187
|
-
let e =
|
|
202
|
+
let e = O.data[q.value];
|
|
188
203
|
if (!e) return;
|
|
189
|
-
let t =
|
|
204
|
+
let t = N.value.map((t, n) => ({
|
|
190
205
|
name: t.name ?? t.key,
|
|
191
206
|
color: i(a(t, n)),
|
|
192
|
-
value:
|
|
207
|
+
value: F(e, t.key)
|
|
193
208
|
})).filter((e) => e.value != null).map((e) => ({
|
|
194
209
|
...e,
|
|
195
|
-
value:
|
|
210
|
+
value: M(e.value)
|
|
196
211
|
}));
|
|
197
212
|
if (!t.length) return;
|
|
198
|
-
let n =
|
|
213
|
+
let n = P.value ? Math.max(e.label.length, ...t.map((e) => e.name.length + e.value.length + 3)) : e.label.length + t[0].value.length + 2;
|
|
199
214
|
return {
|
|
200
215
|
label: e.label,
|
|
201
216
|
rows: t,
|
|
202
|
-
multi:
|
|
203
|
-
x: r(
|
|
204
|
-
y: Math.min(...J.value.map((e) => e.y),
|
|
217
|
+
multi: P.value,
|
|
218
|
+
x: r(R.value.pointAt(q.value), "x".repeat(n), j.value),
|
|
219
|
+
y: Math.min(...J.value.map((e) => e.y), R.value.plot.top + R.value.plot.height)
|
|
205
220
|
};
|
|
206
|
-
}), Z = s(
|
|
207
|
-
transform: `scaleX(${+!!
|
|
208
|
-
transformOrigin: `${
|
|
221
|
+
}), Z = s(d(() => O.animate)), { revealed: we } = c(d(() => !!(j.value && B.value.length)), Z), Te = d(() => ({
|
|
222
|
+
transform: `scaleX(${+!!we.value})`,
|
|
223
|
+
transformOrigin: `${R.value.plot.left}px 0px`,
|
|
209
224
|
transition: `transform ${Z.value.duration}ms ${Z.value.css}`
|
|
210
|
-
})), Q =
|
|
225
|
+
})), Q = d(() => ee());
|
|
211
226
|
function $(e, t) {
|
|
212
|
-
let n =
|
|
213
|
-
return
|
|
227
|
+
let n = O.ui?.[e];
|
|
228
|
+
return k.value ? [n, t] : Q.value[e]({ class: [n, t] });
|
|
214
229
|
}
|
|
215
|
-
return (e, t) => (
|
|
230
|
+
return (e, t) => (b(), p("div", {
|
|
216
231
|
ref_key: "root",
|
|
217
|
-
ref:
|
|
218
|
-
role:
|
|
219
|
-
"aria-label":
|
|
220
|
-
class:
|
|
232
|
+
ref: A,
|
|
233
|
+
role: O.label ? "figure" : void 0,
|
|
234
|
+
"aria-label": O.label,
|
|
235
|
+
class: _($("root", O.class))
|
|
221
236
|
}, [
|
|
222
|
-
|
|
237
|
+
ve.value ? (b(), te(l, {
|
|
223
238
|
key: 0,
|
|
224
|
-
series:
|
|
225
|
-
unstyled:
|
|
226
|
-
}, null, 8, ["series", "unstyled"])) :
|
|
227
|
-
|
|
228
|
-
width:
|
|
229
|
-
height:
|
|
230
|
-
viewBox: `0 0 ${
|
|
239
|
+
series: N.value,
|
|
240
|
+
unstyled: O.unstyled
|
|
241
|
+
}, null, 8, ["series", "unstyled"])) : f("", !0),
|
|
242
|
+
m("div", { class: _(k.value ? void 0 : Q.value.plot()) }, [(b(), p("svg", {
|
|
243
|
+
width: T(j),
|
|
244
|
+
height: O.height,
|
|
245
|
+
viewBox: `0 0 ${T(j)} ${O.height}`,
|
|
231
246
|
"aria-hidden": "true",
|
|
232
|
-
class:
|
|
247
|
+
class: _($("svg"))
|
|
233
248
|
}, [
|
|
234
|
-
|
|
235
|
-
x1:
|
|
236
|
-
y1:
|
|
237
|
-
x2:
|
|
238
|
-
y2:
|
|
249
|
+
O.axis ? (b(!0), p(u, { key: 0 }, S(R.value.ticks, (e) => (b(), p("g", { key: `tick-${e}` }, [m("line", {
|
|
250
|
+
x1: R.value.plot.left,
|
|
251
|
+
y1: R.value.y(e),
|
|
252
|
+
x2: R.value.plot.left + R.value.plot.width,
|
|
253
|
+
y2: R.value.y(e),
|
|
239
254
|
"stroke-width": "1",
|
|
240
|
-
class:
|
|
241
|
-
}, null, 10,
|
|
242
|
-
x:
|
|
243
|
-
y:
|
|
255
|
+
class: _($("grid"))
|
|
256
|
+
}, null, 10, re), m("text", {
|
|
257
|
+
x: R.value.plot.left - T(8),
|
|
258
|
+
y: R.value.y(e),
|
|
244
259
|
"text-anchor": "end",
|
|
245
260
|
"dominant-baseline": "middle",
|
|
246
|
-
class:
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
261
|
+
class: _($("tick"))
|
|
262
|
+
}, w(M(e)), 11, ie)]))), 128)) : f("", !0),
|
|
263
|
+
C(e.$slots, "underlay", v(g(R.value))),
|
|
264
|
+
m("defs", null, [V.value ? (b(), p("linearGradient", {
|
|
250
265
|
key: 0,
|
|
251
266
|
id: G,
|
|
252
267
|
x1: "0",
|
|
253
268
|
y1: "0",
|
|
254
269
|
x2: "0",
|
|
255
270
|
y2: "1"
|
|
256
|
-
}, [...t[1] ||= [
|
|
271
|
+
}, [...t[1] ||= [m("stop", {
|
|
257
272
|
offset: "0%",
|
|
258
273
|
"stop-color": "currentColor",
|
|
259
274
|
"stop-opacity": "0.35"
|
|
260
|
-
}, null, -1),
|
|
275
|
+
}, null, -1), m("stop", {
|
|
261
276
|
offset: "100%",
|
|
262
277
|
"stop-color": "currentColor",
|
|
263
278
|
"stop-opacity": "0"
|
|
264
|
-
}, null, -1)]])) :
|
|
265
|
-
x:
|
|
266
|
-
y:
|
|
267
|
-
width:
|
|
268
|
-
height:
|
|
269
|
-
style:
|
|
270
|
-
}, null, 12,
|
|
271
|
-
Y.value == null ?
|
|
279
|
+
}, null, -1)]])) : f("", !0), m("clipPath", { id: K }, [m("rect", {
|
|
280
|
+
x: R.value.plot.left,
|
|
281
|
+
y: R.value.plot.top,
|
|
282
|
+
width: R.value.plot.width,
|
|
283
|
+
height: R.value.plot.height,
|
|
284
|
+
style: y(Te.value)
|
|
285
|
+
}, null, 12, ae)])]),
|
|
286
|
+
Y.value == null ? f("", !0) : (b(), p("line", {
|
|
272
287
|
key: 1,
|
|
273
288
|
x1: Y.value,
|
|
274
|
-
y1:
|
|
289
|
+
y1: R.value.plot.top,
|
|
275
290
|
x2: Y.value,
|
|
276
|
-
y2:
|
|
291
|
+
y2: R.value.plot.top + R.value.plot.height,
|
|
277
292
|
"stroke-width": "1",
|
|
278
|
-
class:
|
|
279
|
-
}, null, 10,
|
|
280
|
-
|
|
281
|
-
(
|
|
293
|
+
class: _($("crosshair"))
|
|
294
|
+
}, null, 10, oe)),
|
|
295
|
+
m("g", { "clip-path": `url(#${K})` }, [
|
|
296
|
+
(b(!0), p(u, null, S(V.value ? B.value[0].runs : [], (e, t) => (b(), p("path", {
|
|
282
297
|
key: `area-${t}`,
|
|
283
|
-
d:
|
|
298
|
+
d: Se(e),
|
|
284
299
|
fill: `url(#${G})`,
|
|
285
|
-
style:
|
|
286
|
-
class:
|
|
287
|
-
}, null, 14,
|
|
288
|
-
(
|
|
300
|
+
style: y({ color: B.value[0].color }),
|
|
301
|
+
class: _($("area"))
|
|
302
|
+
}, null, 14, ce))), 128)),
|
|
303
|
+
(b(!0), p(u, null, S(ye.value, (e) => (b(), p("path", {
|
|
289
304
|
key: `band-${e.seriesIndex}`,
|
|
290
|
-
d:
|
|
291
|
-
style:
|
|
292
|
-
class:
|
|
293
|
-
}, null, 14,
|
|
294
|
-
(
|
|
305
|
+
d: Ce(e.top, e.base),
|
|
306
|
+
style: y({ fill: e.color }),
|
|
307
|
+
class: _($("band"))
|
|
308
|
+
}, null, 14, le))), 128)),
|
|
309
|
+
(b(!0), p(u, null, S(B.value, (e) => (b(), p(u, { key: `series-${e.seriesIndex}` }, [(b(!0), p(u, null, S(e.runs, (t, n) => (b(), p("path", {
|
|
295
310
|
key: `line-${e.seriesIndex}-${n}`,
|
|
296
311
|
d: W(t),
|
|
297
|
-
style:
|
|
298
|
-
class:
|
|
299
|
-
}, null, 14,
|
|
300
|
-
], 8,
|
|
301
|
-
(
|
|
312
|
+
style: y({ stroke: e.color }),
|
|
313
|
+
class: _($("line"))
|
|
314
|
+
}, null, 14, ue))), 128))], 64))), 128))
|
|
315
|
+
], 8, se),
|
|
316
|
+
(b(!0), p(u, null, S(J.value, (e, t) => (b(), p(u, { key: `marker-${t}` }, [m("circle", {
|
|
302
317
|
cx: e.x,
|
|
303
318
|
cy: e.y,
|
|
304
319
|
r: "6",
|
|
305
|
-
class:
|
|
306
|
-
}, null, 10,
|
|
320
|
+
class: _($("markerRing"))
|
|
321
|
+
}, null, 10, de), m("circle", {
|
|
307
322
|
cx: e.x,
|
|
308
323
|
cy: e.y,
|
|
309
324
|
r: "4",
|
|
310
|
-
style:
|
|
311
|
-
class:
|
|
312
|
-
}, null, 14,
|
|
313
|
-
(
|
|
325
|
+
style: y({ fill: e.color }),
|
|
326
|
+
class: _($("marker"))
|
|
327
|
+
}, null, 14, fe)], 64))), 128)),
|
|
328
|
+
(b(!0), p(u, null, S(O.data, (e, t) => (b(), p(u, { key: `label-${e.label}-${t}` }, [t % R.value.labelStep === 0 ? (b(), p("text", {
|
|
314
329
|
key: 0,
|
|
315
|
-
x:
|
|
316
|
-
y:
|
|
330
|
+
x: R.value.pointAt(t),
|
|
331
|
+
y: R.value.plot.top + R.value.plot.height + 14,
|
|
317
332
|
"text-anchor": "middle",
|
|
318
|
-
class:
|
|
319
|
-
},
|
|
320
|
-
|
|
321
|
-
(
|
|
333
|
+
class: _($("category"))
|
|
334
|
+
}, w(e.label), 11, pe)) : f("", !0)], 64))), 128)),
|
|
335
|
+
C(e.$slots, "overlay", v(g(R.value))),
|
|
336
|
+
(b(!0), p(u, null, S(O.data, (e, n) => (b(), p("rect", {
|
|
322
337
|
key: `hit-${e.label}-${n}`,
|
|
323
|
-
x:
|
|
324
|
-
y:
|
|
325
|
-
width:
|
|
326
|
-
height:
|
|
327
|
-
class:
|
|
338
|
+
x: R.value.plot.left + R.value.bandWidth * n,
|
|
339
|
+
y: R.value.plot.top,
|
|
340
|
+
width: R.value.bandWidth,
|
|
341
|
+
height: R.value.plot.height,
|
|
342
|
+
class: _(k.value ? void 0 : Q.value.hit()),
|
|
328
343
|
onPointerenter: (e) => q.value = n,
|
|
329
344
|
onPointerleave: t[0] ||= (e) => q.value = void 0
|
|
330
|
-
}, null, 42,
|
|
331
|
-
], 10,
|
|
345
|
+
}, null, 42, me))), 128))
|
|
346
|
+
], 10, D)), X.value ? (b(), p("div", {
|
|
332
347
|
key: 0,
|
|
333
|
-
class:
|
|
334
|
-
style:
|
|
348
|
+
class: _($("tooltip", X.value.multi ? "flex-col items-start gap-1" : void 0)),
|
|
349
|
+
style: y({
|
|
335
350
|
left: `${X.value.x}px`,
|
|
336
351
|
top: `${X.value.y}px`,
|
|
337
352
|
transform: "translate(-50%, -100%) translateY(-12px)"
|
|
338
353
|
})
|
|
339
|
-
}, [
|
|
354
|
+
}, [m("span", { class: _($("tooltipLabel")) }, w(X.value.label), 3), X.value.multi ? (b(!0), p(u, { key: 0 }, S(X.value.rows, (e) => (b(), p("span", {
|
|
340
355
|
key: e.name,
|
|
341
356
|
class: "flex items-center gap-1.5"
|
|
342
357
|
}, [
|
|
343
|
-
|
|
358
|
+
m("span", {
|
|
344
359
|
class: "size-2 shrink-0 rounded-full",
|
|
345
|
-
style:
|
|
360
|
+
style: y({ background: e.color })
|
|
346
361
|
}, null, 4),
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
]))), 128)) : (
|
|
362
|
+
m("span", { class: _($("tooltipLabel")) }, w(e.name), 3),
|
|
363
|
+
m("span", { class: _($("tooltipValue")) }, w(e.value), 3)
|
|
364
|
+
]))), 128)) : (b(), p("span", {
|
|
350
365
|
key: 1,
|
|
351
|
-
class:
|
|
352
|
-
},
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
366
|
+
class: _($("tooltipValue"))
|
|
367
|
+
}, w(X.value.rows[0].value), 3))], 6)) : f("", !0)], 2),
|
|
368
|
+
m("div", { class: _($("table")) }, [m("table", null, [
|
|
369
|
+
m("caption", null, w(O.label), 1),
|
|
370
|
+
m("thead", null, [m("tr", null, [t[2] ||= m("th", { scope: "col" }, " Category ", -1), (b(!0), p(u, null, S(N.value, (e) => (b(), p("th", {
|
|
356
371
|
key: e.key,
|
|
357
372
|
scope: "col"
|
|
358
|
-
},
|
|
359
|
-
|
|
373
|
+
}, w(e.name ?? "Value"), 1))), 128))])]),
|
|
374
|
+
m("tbody", null, [(b(!0), p(u, null, S(O.data, (e, t) => (b(), p("tr", { key: `row-${e.label}-${t}` }, [m("th", he, w(e.label), 1), (b(!0), p(u, null, S(N.value, (t) => (b(), p("td", { key: t.key }, w(F(e, t.key) == null ? "—" : M(F(e, t.key))), 1))), 128))]))), 128))])
|
|
360
375
|
])], 2)
|
|
361
376
|
], 10, ne));
|
|
362
377
|
}
|
|
363
378
|
});
|
|
364
379
|
//#endregion
|
|
365
|
-
export {
|
|
380
|
+
export { O as default };
|
|
@@ -18,6 +18,8 @@ export interface SelectProps extends SelectRootProps {
|
|
|
18
18
|
*/
|
|
19
19
|
items?: SelectItems;
|
|
20
20
|
placeholder?: string;
|
|
21
|
+
/** Arrow keys wrap from the last option to the first and back. */
|
|
22
|
+
loop?: boolean;
|
|
21
23
|
size?: 'sm' | 'md' | 'lg';
|
|
22
24
|
/** Lands on the trigger, so a `<label for>` names the control. */
|
|
23
25
|
id?: string;
|
|
@@ -12,6 +12,7 @@ var F = /*@__PURE__*/ d({
|
|
|
12
12
|
props: {
|
|
13
13
|
items: {},
|
|
14
14
|
placeholder: {},
|
|
15
|
+
loop: { type: Boolean },
|
|
15
16
|
size: {},
|
|
16
17
|
id: {},
|
|
17
18
|
invalid: {
|
|
@@ -45,8 +46,8 @@ var F = /*@__PURE__*/ d({
|
|
|
45
46
|
emits: ["update:modelValue", "update:open"],
|
|
46
47
|
setup(d, { emit: F }) {
|
|
47
48
|
let I = d, L = F, R = P(a(() => {
|
|
48
|
-
let { items: e, placeholder: t,
|
|
49
|
-
return
|
|
49
|
+
let { items: e, placeholder: t, loop: n, size: r, id: i, invalid: a, unstyled: o, class: s, ui: c, ...l } = I;
|
|
50
|
+
return l;
|
|
50
51
|
}), L);
|
|
51
52
|
function z(e) {
|
|
52
53
|
return typeof e == "string" ? {
|
|
@@ -94,7 +95,8 @@ var F = /*@__PURE__*/ d({
|
|
|
94
95
|
]), u(b(ee), null, {
|
|
95
96
|
default: x(() => [u(b(w), {
|
|
96
97
|
class: m(X.value),
|
|
97
|
-
position: "item-aligned"
|
|
98
|
+
position: "item-aligned",
|
|
99
|
+
loop: I.loop
|
|
98
100
|
}, {
|
|
99
101
|
default: x(() => [u(b(N), { class: m(Z.value) }, {
|
|
100
102
|
default: x(() => [v(e.$slots, "default", {}, () => [V.value ? (g(!0), c(i, { key: 0 }, _(V.value, (e, n) => (g(), o(b(T), {
|
|
@@ -149,7 +151,7 @@ var F = /*@__PURE__*/ d({
|
|
|
149
151
|
_: 3
|
|
150
152
|
}, 8, ["class"])]),
|
|
151
153
|
_: 3
|
|
152
|
-
}, 8, ["class"])]),
|
|
154
|
+
}, 8, ["class", "loop"])]),
|
|
153
155
|
_: 3
|
|
154
156
|
})]),
|
|
155
157
|
_: 3
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ClassValue } from '../class-value';
|
|
2
2
|
import type { SidebarItems, SidebarLink } from '../composables/sidebar';
|
|
3
|
+
import type { DropdownMenuProps } from './DropdownMenu.vue';
|
|
3
4
|
export interface SidebarProps {
|
|
4
5
|
/** Links, optionally grouped into labelled sections. */
|
|
5
6
|
items?: SidebarItems;
|
|
@@ -28,6 +29,8 @@ export interface SidebarProps {
|
|
|
28
29
|
groupIcon?: string;
|
|
29
30
|
groupContent?: string;
|
|
30
31
|
groupInner?: string;
|
|
32
|
+
/** Passed to the menu a collapsed group opens. */
|
|
33
|
+
menu?: DropdownMenuProps['ui'];
|
|
31
34
|
};
|
|
32
35
|
}
|
|
33
36
|
type __VLS_Props = SidebarProps;
|