vlite3 1.1.9 → 1.1.10

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 (35) hide show
  1. package/components/Chart/BarChart.vue.js +202 -187
  2. package/components/Chart/LineChart.vue.js +2 -2
  3. package/components/Chart/LineChart.vue2.js +169 -156
  4. package/components/Chart/utils.js +41 -40
  5. package/components/ColorPicker/ColorIro.vue.js +41 -40
  6. package/components/Dropdown/Dropdown.vue.d.ts +1 -1
  7. package/components/Dropdown/Dropdown.vue.js +69 -69
  8. package/components/Dropdown/DropdownMenu.vue.d.ts +2 -0
  9. package/components/Dropdown/DropdownMenu.vue.js +2 -2
  10. package/components/Dropdown/DropdownMenu.vue2.js +21 -20
  11. package/components/Kanban/KanbanBoard.vue.js +1 -1
  12. package/components/Kanban/KanbanBoard.vue2.js +50 -49
  13. package/components/Navbar/Navbar.vue.d.ts +4 -90
  14. package/components/Navbar/Navbar.vue.js +37 -625
  15. package/components/Navbar/NavbarLayoutClassic.vue.d.ts +61 -0
  16. package/components/Navbar/NavbarLayoutClassic.vue.js +268 -0
  17. package/components/Navbar/NavbarLayoutClassic.vue2.js +4 -0
  18. package/components/Navbar/NavbarLayoutDashboard.vue.d.ts +37 -0
  19. package/components/Navbar/NavbarLayoutDashboard.vue.js +157 -0
  20. package/components/Navbar/NavbarLayoutDashboard.vue2.js +4 -0
  21. package/components/Navbar/NavbarLayoutDock.vue.d.ts +37 -0
  22. package/components/Navbar/NavbarLayoutDock.vue.js +156 -0
  23. package/components/Navbar/NavbarLayoutDock.vue2.js +4 -0
  24. package/components/Navbar/NavbarLayoutSidebarFirst.vue.d.ts +36 -0
  25. package/components/Navbar/NavbarLayoutSidebarFirst.vue.js +151 -0
  26. package/components/Navbar/NavbarLayoutSidebarFirst.vue2.js +4 -0
  27. package/components/Navbar/NavbarStandalone.vue.d.ts +48 -0
  28. package/components/Navbar/NavbarStandalone.vue.js +183 -0
  29. package/components/Navbar/NavbarStandalone.vue2.js +4 -0
  30. package/components/Navbar/useNavbar.d.ts +36 -0
  31. package/components/Navbar/useNavbar.js +134 -0
  32. package/components/Splitter/Splitter.vue.js +3 -3
  33. package/package.json +1 -1
  34. package/style.css +1 -1
  35. package/types/navbar.type.d.ts +1 -1
@@ -1,12 +1,12 @@
1
- import { defineComponent as ne, ref as X, computed as h, onMounted as ue, watch as se, onUnmounted as re, openBlock as o, createElementBlock as n, Fragment as d, renderList as v, createElementVNode as M, normalizeStyle as F, createTextVNode as ie, toDisplayString as k, createCommentVNode as f, unref as w, createBlock as ce, Teleport as de } from "vue";
2
- import { CHART_COLORS as ve, formatNumber as Y, getColor as j, niceYTicks as fe, animateProgress as he } from "./utils.js";
3
- const ye = {
1
+ import { defineComponent as se, ref as G, computed as f, onMounted as ie, watch as ce, onUnmounted as ve, openBlock as n, createElementBlock as u, Fragment as d, renderList as h, createElementVNode as w, normalizeStyle as _, createTextVNode as de, toDisplayString as p, createCommentVNode as m, unref as k, withDirectives as he, vShow as fe, createBlock as me, Teleport as ye } from "vue";
2
+ import { CHART_COLORS as xe, getColor as J, formatNumber as R, niceYTicks as ge, animateProgress as $e } from "./utils.js";
3
+ const be = {
4
4
  key: 0,
5
5
  class: "flex flex-wrap gap-x-4 gap-y-1 mb-3 pl-14"
6
- }, me = ["width", "height"], xe = ["id"], $e = ["stop-color"], ge = ["stop-color"], be = ["id"], pe = ["stop-color"], ke = ["stop-color"], we = ["transform"], Le = ["y1", "x2", "y2", "stroke-opacity"], Me = ["y"], Ve = ["d", "fill", "opacity"], Ce = ["x", "y"], Be = ["x", "y"], Ye = ["y1", "x2", "y2", "stroke-opacity"], Re = ["y2", "stroke-opacity"], Oe = ["transform"], ze = ["x1", "x2", "y2", "stroke-opacity"], Xe = ["x"], Ae = ["y"], Ge = ["d", "fill", "opacity"], Te = ["x", "y"], Se = ["y2", "stroke-opacity"], We = ["y1", "x2", "y2", "stroke-opacity"], Pe = { class: "font-medium text-xs mb-1.5" }, He = {
6
+ }, pe = ["width", "height"], ke = ["id"], we = ["stop-color"], Le = ["stop-color"], Me = ["id"], Ve = ["stop-color"], Ce = ["stop-color"], Be = ["transform"], Ye = ["y1", "x2", "y2", "stroke-opacity"], Re = ["y"], Xe = ["d", "fill", "opacity"], Oe = ["x", "y"], ze = ["x", "y", "text-anchor", "transform"], Se = ["y1", "x2", "y2", "stroke-opacity"], Ae = ["y2", "stroke-opacity"], Ge = ["transform"], Te = ["x1", "x2", "y2", "stroke-opacity"], We = ["x"], Pe = ["y"], He = ["d", "fill", "opacity"], Ne = ["x", "y"], Qe = ["y2", "stroke-opacity"], Ze = ["y1", "x2", "y2", "stroke-opacity"], De = { class: "font-medium text-xs mb-1.5" }, Ee = {
7
7
  key: 0,
8
8
  class: "text-muted-foreground"
9
- }, Ne = { class: "font-semibold" }, Ee = /* @__PURE__ */ ne({
9
+ }, Fe = { class: "font-semibold" }, _e = /* @__PURE__ */ se({
10
10
  __name: "BarChart",
11
11
  props: {
12
12
  data: {},
@@ -19,7 +19,7 @@ const ye = {
19
19
  showLegend: { type: Boolean, default: !0 },
20
20
  showTooltip: { type: Boolean, default: !0 },
21
21
  showValues: { type: Boolean, default: !1 },
22
- colors: { default: () => ve },
22
+ colors: { default: () => xe },
23
23
  animate: { type: Boolean, default: !0 },
24
24
  formatValue: {},
25
25
  showXAxis: { type: Boolean, default: !0 },
@@ -30,240 +30,255 @@ const ye = {
30
30
  axisOpacity: { default: 0.1 }
31
31
  },
32
32
  setup(i) {
33
- const r = i, A = X(), G = X(600), g = h(() => {
34
- const t = (a) => String(a).length;
35
- if (r.orientation === "horizontal") {
36
- const a = r.showYLabels ? Math.max(2, ...x.value.map((L) => t(L))) * 6.5 : 0, s = r.showYLabels ? Math.max(24, a + 12) : 8;
37
- let u = 16;
38
- if (r.showValues) {
39
- const L = m.value.flatMap(($) => $.values), y = Math.max(2, ...L.map(($) => t(r.formatValue ? r.formatValue($) : Y($)))) * 6.5;
40
- u = Math.max(16, y + 8);
33
+ const s = i, T = G(), z = G(600), g = f(() => s.datasets?.length ? s.datasets.map((l, e) => ({
34
+ label: l.label,
35
+ color: l.color ?? J(s.colors, e),
36
+ values: l.data
37
+ })) : [
38
+ {
39
+ label: "",
40
+ color: "",
41
+ // will use per-bar color from data
42
+ values: (s.data ?? []).map((l) => l.value)
43
+ }
44
+ ]), $ = f(() => g.value.length > 1 || !!s.datasets?.length), v = f(() => s.labels?.length ? s.labels : s.datasets?.length ? g.value[0]?.values.map((t, l) => String(l + 1)) ?? [] : (s.data ?? []).map((t) => t.label)), S = f(() => {
45
+ if (s.orientation !== "vertical" || !s.showXLabels || v.value.length === 0) return !1;
46
+ const t = Math.max(2, Math.floor(z.value / 65));
47
+ return v.value.length > t;
48
+ }), b = f(() => {
49
+ const t = (o) => String(o).length;
50
+ if (s.orientation === "horizontal") {
51
+ const o = s.showYLabels ? Math.max(2, ...v.value.map((y) => t(y))) * 6.5 : 0, r = s.showYLabels ? Math.max(24, o + 12) : 8;
52
+ let M = 16;
53
+ if (s.showValues) {
54
+ const y = g.value.flatMap((C) => C.values), V = Math.max(2, ...y.map((C) => t(s.formatValue ? s.formatValue(C) : R(C)))) * 6.5;
55
+ M = Math.max(16, V + 8);
41
56
  }
42
57
  return {
43
58
  // top holds the value-tick labels that float above; collapse when hidden
44
- top: r.showXLabels ? 16 : 4,
45
- right: u,
59
+ top: s.showXLabels ? 16 : 4,
60
+ right: M,
46
61
  bottom: 0,
47
- left: s
62
+ left: r
48
63
  };
49
64
  }
50
- const l = r.showYLabels ? Math.max(2, ...C.value.map((a) => t(r.formatValue ? r.formatValue(a) : Y(a)))) * 6.5 : 0, e = r.showYLabels ? Math.max(24, l + 12) : 8;
51
- return {
65
+ const l = s.showYLabels ? Math.max(2, ...B.value.map((o) => t(s.formatValue ? s.formatValue(o) : R(o)))) * 6.5 : 0, e = s.showYLabels ? Math.max(24, l + 12) : 8;
66
+ let a = s.showXLabels ? 24 : 6;
67
+ return s.showXLabels && S.value && (a = Math.max(2, ...v.value.map((r) => String(r).length)) * 6.5 * 0.7 + 16), {
52
68
  top: 24,
53
69
  right: 0,
54
- // Collapse bottom padding when X labels are hidden
55
- bottom: r.showXLabels ? 24 : 6,
70
+ bottom: a,
56
71
  left: e
57
72
  };
58
- }), b = h(() => Math.max(0, G.value - g.value.left - g.value.right)), c = h(() => Math.max(0, r.height - g.value.top - g.value.bottom)), m = h(() => r.datasets?.length ? r.datasets.map((l, e) => ({
59
- label: l.label,
60
- color: l.color ?? j(r.colors, e),
61
- values: l.data
62
- })) : [
63
- {
64
- label: "",
65
- color: "",
66
- // will use per-bar color from data
67
- values: (r.data ?? []).map((l) => l.value)
68
- }
69
- ]), p = h(() => m.value.length > 1 || !!r.datasets?.length), x = h(() => r.labels?.length ? r.labels : r.datasets?.length ? m.value[0]?.values.map((t, l) => String(l + 1)) ?? [] : (r.data ?? []).map((t) => t.label)), T = h(
70
- () => (r.data ?? []).map((t, l) => t.color ?? j(r.colors, l))
71
- ), q = h(() => m.value.flatMap((t) => t.values)), U = h(() => Math.max(...q.value) || 1), C = h(() => fe(0, U.value, 5)), V = h(() => C.value[C.value.length - 1] || U.value), S = X(r.animate ? 0 : 1);
72
- let N = null;
73
- function _() {
74
- N?.(), S.value = 0, N = he(800, (t) => S.value = t);
73
+ }), x = f(() => Math.max(0, z.value - b.value.left - b.value.right)), c = f(() => Math.max(0, s.height - b.value.top - b.value.bottom)), Z = f(() => {
74
+ if (s.orientation !== "vertical") return 1;
75
+ const t = S.value ? 25 : 65, l = Math.max(2, Math.floor(x.value / t));
76
+ return Math.ceil(v.value.length / l);
77
+ }), K = (t) => {
78
+ if (s.orientation !== "vertical") return !0;
79
+ const l = v.value.length;
80
+ return Z.value <= 1 || t === 0 || t === l - 1 ? !0 : l - 1 - t < Z.value * 0.7 ? !1 : t % Z.value === 0;
81
+ }, W = f(
82
+ () => (s.data ?? []).map((t, l) => t.color ?? J(s.colors, l))
83
+ ), ee = f(() => g.value.flatMap((t) => t.values)), j = f(() => Math.max(...ee.value) || 1), B = f(() => ge(0, j.value, 5)), L = f(() => B.value[B.value.length - 1] || j.value), P = G(s.animate ? 0 : 1);
84
+ let D = null;
85
+ function q() {
86
+ D?.(), P.value = 0, D = $e(800, (t) => P.value = t);
75
87
  }
76
- ue(() => {
77
- J(), r.animate && _();
78
- }), se(() => [r.data, r.datasets], () => {
79
- r.animate && _();
80
- }, { deep: !0 }), re(() => {
81
- N?.(), Q?.disconnect();
88
+ ie(() => {
89
+ te(), s.animate && q();
90
+ }), ce(() => [s.data, s.datasets], () => {
91
+ s.animate && q();
92
+ }, { deep: !0 }), ve(() => {
93
+ D?.(), E?.disconnect();
82
94
  });
83
- let Q = null;
84
- function J() {
85
- A.value && (Q = new ResizeObserver((t) => {
86
- G.value = t[0].contentRect.width || 600;
87
- }), Q.observe(A.value), G.value = A.value.clientWidth || 600);
95
+ let E = null;
96
+ function te() {
97
+ T.value && (E = new ResizeObserver((t) => {
98
+ z.value = t[0].contentRect.width || 600;
99
+ }), E.observe(T.value), z.value = T.value.clientWidth || 600);
88
100
  }
89
- const K = h(() => {
90
- const t = x.value.length;
101
+ const le = f(() => {
102
+ const t = v.value.length;
91
103
  if (t === 0) return [];
92
- const l = b.value / t, e = m.value.length, a = l * 0.2, s = l - a * 2, u = p.value ? s / e : s;
93
- return x.value.map((L, y) => {
94
- const $ = y * l + a, Z = m.value.map((W, P) => {
95
- const H = W.values[y] ?? 0, z = H / V.value * c.value * S.value, E = $ + P * u, I = c.value - z, D = p.value ? W.color : T.value[y];
96
- return { val: H, bh: z, x: E, y: I, w: u - (p.value ? 2 : 0), color: D };
104
+ const l = x.value / t, e = g.value.length, a = l * 0.2, o = l - a * 2, r = $.value ? o / e : o;
105
+ return v.value.map((M, y) => {
106
+ const V = y * l + a, C = g.value.map((H, N) => {
107
+ const Q = H.values[y] ?? 0, A = Q / L.value * c.value * P.value, F = V + N * r, I = c.value - A, U = $.value ? H.color : W.value[y];
108
+ return { val: Q, bh: A, x: F, y: I, w: r - ($.value ? 2 : 0), color: U };
97
109
  });
98
- return { label: L, bars: Z };
110
+ return { label: M, bars: C };
99
111
  });
100
- }), ee = h(() => {
101
- const t = x.value.length;
112
+ }), ae = f(() => {
113
+ const t = v.value.length;
102
114
  if (t === 0) return [];
103
- const l = c.value / t, e = m.value.length, a = l * 0.2, s = l - a * 2, u = p.value ? s / e : s, L = V.value;
104
- return x.value.map((y, $) => {
105
- const Z = $ * l + a, W = m.value.map((P, H) => {
106
- const z = P.values[$] ?? 0, E = z / L * b.value * S.value, I = Z + H * u, D = p.value ? P.color : T.value[$];
107
- return { val: z, bw: E, x: 0, y: I, h: u - (p.value ? 2 : 0), color: D };
115
+ const l = c.value / t, e = g.value.length, a = l * 0.2, o = l - a * 2, r = $.value ? o / e : o, M = L.value;
116
+ return v.value.map((y, V) => {
117
+ const C = V * l + a, H = g.value.map((N, Q) => {
118
+ const A = N.values[V] ?? 0, F = A / M * x.value * P.value, I = C + Q * r, U = $.value ? N.color : W.value[V];
119
+ return { val: A, bw: F, x: 0, y: I, h: r - ($.value ? 2 : 0), color: U };
108
120
  });
109
- return { label: y, bars: W };
121
+ return { label: y, bars: H };
110
122
  });
111
- }), B = X(null), R = X(null);
112
- function te(t) {
113
- if (!r.showTooltip) return;
114
- const l = t.currentTarget.getBoundingClientRect(), e = t.clientX - l.left - g.value.left, a = t.clientY - l.top - g.value.top, s = x.value.length;
115
- if (s === 0) return;
116
- let u;
117
- r.orientation === "vertical" ? u = Math.floor(e / b.value * s) : u = Math.floor(a / c.value * s), u = Math.max(0, Math.min(s - 1, u)), R.value = u;
118
- const L = m.value.map((y, $) => ({
119
- color: p.value ? y.color : T.value[u],
123
+ }), Y = G(null), X = G(null);
124
+ function oe(t) {
125
+ if (!s.showTooltip) return;
126
+ const l = t.currentTarget.getBoundingClientRect(), e = t.clientX - l.left - b.value.left, a = t.clientY - l.top - b.value.top, o = v.value.length;
127
+ if (o === 0) return;
128
+ let r;
129
+ s.orientation === "vertical" ? r = Math.floor(e / x.value * o) : r = Math.floor(a / c.value * o), r = Math.max(0, Math.min(o - 1, r)), X.value = r;
130
+ const M = g.value.map((y, V) => ({
131
+ color: $.value ? y.color : W.value[r],
120
132
  label: y.label,
121
- value: r.formatValue ? r.formatValue(y.values[u]) : Y(y.values[u])
133
+ value: s.formatValue ? s.formatValue(y.values[r]) : R(y.values[r])
122
134
  }));
123
- B.value = {
135
+ Y.value = {
124
136
  x: t.clientX,
125
137
  y: t.clientY,
126
- label: x.value[u],
127
- items: L
138
+ label: v.value[r],
139
+ items: M
128
140
  };
129
141
  }
130
- function le() {
131
- B.value = null, R.value = null;
142
+ function ne() {
143
+ Y.value = null, X.value = null;
132
144
  }
133
- function ae(t, l, e, a, s) {
134
- const u = Math.min(s, e / 2, a / 2);
135
- return u <= 0 || a <= 0 ? `M${t},${l + a} L${t},${l} L${t + e},${l} L${t + e},${l + a} Z` : `M${t},${l + a} L${t},${l + u} Q${t},${l} ${t + u},${l} L${t + e - u},${l} Q${t + e},${l} ${t + e},${l + u} L${t + e},${l + a} Z`;
145
+ function ue(t, l, e, a, o) {
146
+ const r = Math.min(o, e / 2, a / 2);
147
+ return r <= 0 || a <= 0 ? `M${t},${l + a} L${t},${l} L${t + e},${l} L${t + e},${l + a} Z` : `M${t},${l + a} L${t},${l + r} Q${t},${l} ${t + r},${l} L${t + e - r},${l} Q${t + e},${l} ${t + e},${l + r} L${t + e},${l + a} Z`;
136
148
  }
137
- function oe(t, l, e, a, s) {
138
- const u = Math.min(s, e / 2, a / 2);
139
- return u <= 0 || e <= 0 ? `M${t},${l} L${t + e},${l} L${t + e},${l + a} L${t},${l + a} Z` : `M${t},${l} L${t + e - u},${l} Q${t + e},${l} ${t + e},${l + u} L${t + e},${l + a - u} Q${t + e},${l + a} ${t + e - u},${l + a} L${t},${l + a} Z`;
149
+ function re(t, l, e, a, o) {
150
+ const r = Math.min(o, e / 2, a / 2);
151
+ return r <= 0 || e <= 0 ? `M${t},${l} L${t + e},${l} L${t + e},${l + a} L${t},${l + a} Z` : `M${t},${l} L${t + e - r},${l} Q${t + e},${l} ${t + e},${l + r} L${t + e},${l + a - r} Q${t + e},${l + a} ${t + e - r},${l + a} L${t},${l + a} Z`;
140
152
  }
141
153
  const O = Math.random().toString(36).slice(2, 7);
142
- return (t, l) => (o(), n("div", {
154
+ return (t, l) => (n(), u("div", {
143
155
  ref_key: "containerRef",
144
- ref: A,
156
+ ref: T,
145
157
  class: "vlite-bar-chart w-full select-none"
146
158
  }, [
147
- i.showLegend && p.value ? (o(), n("div", ye, [
148
- (o(!0), n(d, null, v(m.value, (e) => (o(), n("div", {
159
+ i.showLegend && $.value ? (n(), u("div", be, [
160
+ (n(!0), u(d, null, h(g.value, (e) => (n(), u("div", {
149
161
  key: e.label,
150
162
  class: "flex items-center gap-1.5 text-xs text-muted-foreground"
151
163
  }, [
152
- M("span", {
164
+ w("span", {
153
165
  class: "w-2.5 h-2.5 rounded-sm inline-block",
154
- style: F({ backgroundColor: e.color })
166
+ style: _({ backgroundColor: e.color })
155
167
  }, null, 4),
156
- ie(" " + k(e.label), 1)
168
+ de(" " + p(e.label), 1)
157
169
  ]))), 128))
158
- ])) : f("", !0),
159
- (o(), n("svg", {
160
- width: G.value,
170
+ ])) : m("", !0),
171
+ (n(), u("svg", {
172
+ width: z.value,
161
173
  height: i.height,
162
174
  role: "img",
163
175
  "aria-label": "Bar chart",
164
176
  class: "overflow-visible",
165
- onMousemove: te,
166
- onMouseleave: le
177
+ onMousemove: oe,
178
+ onMouseleave: ne
167
179
  }, [
168
- M("defs", null, [
169
- (o(!0), n(d, null, v(m.value, (e, a) => (o(), n("linearGradient", {
180
+ w("defs", null, [
181
+ (n(!0), u(d, null, h(g.value, (e, a) => (n(), u("linearGradient", {
170
182
  key: a,
171
- id: `bgrad-${w(O)}-${a}`,
183
+ id: `bgrad-${k(O)}-${a}`,
172
184
  x1: "0",
173
185
  y1: "0",
174
186
  x2: "0",
175
187
  y2: "1"
176
188
  }, [
177
- M("stop", {
189
+ w("stop", {
178
190
  offset: "0%",
179
191
  "stop-color": e.color,
180
192
  "stop-opacity": "1"
181
- }, null, 8, $e),
182
- M("stop", {
193
+ }, null, 8, we),
194
+ w("stop", {
183
195
  offset: "100%",
184
196
  "stop-color": e.color,
185
197
  "stop-opacity": "0.7"
186
- }, null, 8, ge)
187
- ], 8, xe))), 128)),
188
- (o(!0), n(d, null, v(T.value, (e, a) => (o(), n("linearGradient", {
198
+ }, null, 8, Le)
199
+ ], 8, ke))), 128)),
200
+ (n(!0), u(d, null, h(W.value, (e, a) => (n(), u("linearGradient", {
189
201
  key: `sc-${a}`,
190
- id: `bgrad-single-${w(O)}-${a}`,
202
+ id: `bgrad-single-${k(O)}-${a}`,
191
203
  x1: "0",
192
204
  y1: "0",
193
205
  x2: "0",
194
206
  y2: "1"
195
207
  }, [
196
- M("stop", {
208
+ w("stop", {
197
209
  offset: "0%",
198
210
  "stop-color": e,
199
211
  "stop-opacity": "1"
200
- }, null, 8, pe),
201
- M("stop", {
212
+ }, null, 8, Ve),
213
+ w("stop", {
202
214
  offset: "100%",
203
215
  "stop-color": e,
204
216
  "stop-opacity": "0.7"
205
- }, null, 8, ke)
206
- ], 8, be))), 128))
217
+ }, null, 8, Ce)
218
+ ], 8, Me))), 128))
207
219
  ]),
208
- i.orientation === "vertical" ? (o(), n("g", {
220
+ i.orientation === "vertical" ? (n(), u("g", {
209
221
  key: 0,
210
- transform: `translate(${g.value.left},${g.value.top})`
222
+ transform: `translate(${b.value.left},${b.value.top})`
211
223
  }, [
212
- i.showGrid ? (o(!0), n(d, { key: 0 }, v(C.value, (e) => (o(), n("line", {
224
+ i.showGrid ? (n(!0), u(d, { key: 0 }, h(B.value, (e) => (n(), u("line", {
213
225
  key: e,
214
226
  x1: 0,
215
- y1: c.value - e / V.value * c.value,
216
- x2: b.value,
217
- y2: c.value - e / V.value * c.value,
227
+ y1: c.value - e / L.value * c.value,
228
+ x2: x.value,
229
+ y2: c.value - e / L.value * c.value,
218
230
  stroke: "currentColor",
219
231
  "stroke-opacity": i.gridOpacity,
220
232
  "stroke-width": "1"
221
- }, null, 8, Le))), 128)) : f("", !0),
222
- i.showYLabels ? (o(!0), n(d, { key: 1 }, v(C.value, (e) => (o(), n("text", {
233
+ }, null, 8, Ye))), 128)) : m("", !0),
234
+ i.showYLabels ? (n(!0), u(d, { key: 1 }, h(B.value, (e) => (n(), u("text", {
223
235
  key: `yt-${e}`,
224
236
  x: -10,
225
- y: c.value - e / V.value * c.value,
237
+ y: c.value - e / L.value * c.value,
226
238
  "text-anchor": "end",
227
239
  "dominant-baseline": "middle",
228
240
  "font-size": "11",
229
241
  class: "fill-muted-foreground"
230
- }, k(i.formatValue ? i.formatValue(e) : w(Y)(e)), 9, Me))), 128)) : f("", !0),
231
- (o(!0), n(d, null, v(K.value, (e, a) => (o(), n("g", { key: a }, [
232
- (o(!0), n(d, null, v(e.bars, (s, u) => (o(), n("path", {
233
- key: u,
234
- d: ae(s.x, s.y, s.w, s.bh, i.barRadius),
235
- fill: p.value ? `url(#bgrad-${w(O)}-${u})` : `url(#bgrad-single-${w(O)}-${a})`,
236
- opacity: R.value !== null && R.value !== a ? 0.5 : 1,
242
+ }, p(i.formatValue ? i.formatValue(e) : k(R)(e)), 9, Re))), 128)) : m("", !0),
243
+ (n(!0), u(d, null, h(le.value, (e, a) => (n(), u("g", { key: a }, [
244
+ (n(!0), u(d, null, h(e.bars, (o, r) => (n(), u("path", {
245
+ key: r,
246
+ d: ue(o.x, o.y, o.w, o.bh, i.barRadius),
247
+ fill: $.value ? `url(#bgrad-${k(O)}-${r})` : `url(#bgrad-single-${k(O)}-${a})`,
248
+ opacity: X.value !== null && X.value !== a ? 0.5 : 1,
237
249
  class: "transition-opacity duration-150"
238
- }, null, 8, Ve))), 128)),
239
- i.showValues ? (o(!0), n(d, { key: 0 }, v(e.bars, (s, u) => (o(), n("text", {
240
- key: `vl-${u}`,
241
- x: s.x + s.w / 2,
242
- y: s.y - 6,
250
+ }, null, 8, Xe))), 128)),
251
+ i.showValues ? (n(!0), u(d, { key: 0 }, h(e.bars, (o, r) => (n(), u("text", {
252
+ key: `vl-${r}`,
253
+ x: o.x + o.w / 2,
254
+ y: o.y - 6,
243
255
  "text-anchor": "middle",
244
256
  "font-size": "10",
245
257
  "font-weight": "600",
246
258
  class: "fill-foreground"
247
- }, k(i.formatValue ? i.formatValue(s.val) : w(Y)(s.val)), 9, Ce))), 128)) : f("", !0)
259
+ }, p(i.formatValue ? i.formatValue(o.val) : k(R)(o.val)), 9, Oe))), 128)) : m("", !0)
248
260
  ]))), 128)),
249
- i.showXLabels ? (o(!0), n(d, { key: 2 }, v(x.value, (e, a) => (o(), n("text", {
261
+ i.showXLabels ? (n(!0), u(d, { key: 2 }, h(v.value, (e, a) => he((n(), u("text", {
250
262
  key: `xl-${a}`,
251
- x: (a + 0.5) * (b.value / x.value.length),
252
- y: c.value + 16,
253
- "text-anchor": "middle",
263
+ x: (a + 0.5) * (x.value / v.value.length),
264
+ y: c.value + (S.value ? 12 : 16),
265
+ "text-anchor": S.value ? "end" : "middle",
266
+ transform: S.value ? `rotate(-45, ${(a + 0.5) * (x.value / v.value.length)}, ${c.value + 12})` : void 0,
254
267
  "font-size": "11",
255
268
  class: "fill-muted-foreground"
256
- }, k(e), 9, Be))), 128)) : f("", !0),
257
- i.showXAxis ? (o(), n("line", {
269
+ }, p(e), 9, ze)), [
270
+ [fe, K(a)]
271
+ ])), 128)) : m("", !0),
272
+ i.showXAxis ? (n(), u("line", {
258
273
  key: 3,
259
274
  x1: 0,
260
275
  y1: c.value,
261
- x2: b.value,
276
+ x2: x.value,
262
277
  y2: c.value,
263
278
  stroke: "currentColor",
264
279
  "stroke-opacity": i.axisOpacity
265
- }, null, 8, Ye)) : f("", !0),
266
- i.showYAxis ? (o(), n("line", {
280
+ }, null, 8, Se)) : m("", !0),
281
+ i.showYAxis ? (n(), u("line", {
267
282
  key: 4,
268
283
  x1: 0,
269
284
  y1: 0,
@@ -271,57 +286,57 @@ const ye = {
271
286
  y2: c.value,
272
287
  stroke: "currentColor",
273
288
  "stroke-opacity": i.axisOpacity
274
- }, null, 8, Re)) : f("", !0)
275
- ], 8, we)) : (o(), n("g", {
289
+ }, null, 8, Ae)) : m("", !0)
290
+ ], 8, Be)) : (n(), u("g", {
276
291
  key: 1,
277
- transform: `translate(${g.value.left},${g.value.top})`
292
+ transform: `translate(${b.value.left},${b.value.top})`
278
293
  }, [
279
- i.showGrid ? (o(!0), n(d, { key: 0 }, v(C.value, (e) => (o(), n("line", {
294
+ i.showGrid ? (n(!0), u(d, { key: 0 }, h(B.value, (e) => (n(), u("line", {
280
295
  key: e,
281
- x1: e / V.value * b.value,
296
+ x1: e / L.value * x.value,
282
297
  y1: 0,
283
- x2: e / V.value * b.value,
298
+ x2: e / L.value * x.value,
284
299
  y2: c.value,
285
300
  stroke: "currentColor",
286
301
  "stroke-opacity": i.gridOpacity,
287
302
  "stroke-width": "1"
288
- }, null, 8, ze))), 128)) : f("", !0),
289
- i.showXLabels ? (o(!0), n(d, { key: 1 }, v(C.value, (e) => (o(), n("text", {
303
+ }, null, 8, Te))), 128)) : m("", !0),
304
+ i.showXLabels ? (n(!0), u(d, { key: 1 }, h(B.value, (e) => (n(), u("text", {
290
305
  key: `xt-${e}`,
291
- x: e / V.value * b.value,
306
+ x: e / L.value * x.value,
292
307
  y: -8,
293
308
  "text-anchor": "middle",
294
309
  "font-size": "11",
295
310
  class: "fill-muted-foreground"
296
- }, k(i.formatValue ? i.formatValue(e) : w(Y)(e)), 9, Xe))), 128)) : f("", !0),
297
- i.showYLabels ? (o(!0), n(d, { key: 2 }, v(x.value, (e, a) => (o(), n("text", {
311
+ }, p(i.formatValue ? i.formatValue(e) : k(R)(e)), 9, We))), 128)) : m("", !0),
312
+ i.showYLabels ? (n(!0), u(d, { key: 2 }, h(v.value, (e, a) => (n(), u("text", {
298
313
  key: `yl-${a}`,
299
314
  x: -12,
300
- y: (a + 0.5) * (c.value / x.value.length),
315
+ y: (a + 0.5) * (c.value / v.value.length),
301
316
  "text-anchor": "end",
302
317
  "dominant-baseline": "middle",
303
318
  "font-size": "11",
304
319
  class: "fill-muted-foreground"
305
- }, k(e), 9, Ae))), 128)) : f("", !0),
306
- (o(!0), n(d, null, v(ee.value, (e, a) => (o(), n("g", { key: a }, [
307
- (o(!0), n(d, null, v(e.bars, (s, u) => (o(), n("path", {
308
- key: u,
309
- d: oe(s.x, s.y, s.bw, s.h, i.barRadius),
310
- fill: p.value ? `url(#bgrad-${w(O)}-${u})` : `url(#bgrad-single-${w(O)}-${a})`,
311
- opacity: R.value !== null && R.value !== a ? 0.5 : 1,
320
+ }, p(e), 9, Pe))), 128)) : m("", !0),
321
+ (n(!0), u(d, null, h(ae.value, (e, a) => (n(), u("g", { key: a }, [
322
+ (n(!0), u(d, null, h(e.bars, (o, r) => (n(), u("path", {
323
+ key: r,
324
+ d: re(o.x, o.y, o.bw, o.h, i.barRadius),
325
+ fill: $.value ? `url(#bgrad-${k(O)}-${r})` : `url(#bgrad-single-${k(O)}-${a})`,
326
+ opacity: X.value !== null && X.value !== a ? 0.5 : 1,
312
327
  class: "transition-opacity duration-150"
313
- }, null, 8, Ge))), 128)),
314
- i.showValues ? (o(!0), n(d, { key: 0 }, v(e.bars, (s, u) => (o(), n("text", {
315
- key: `hvl-${u}`,
316
- x: s.bw + 6,
317
- y: s.y + s.h / 2,
328
+ }, null, 8, He))), 128)),
329
+ i.showValues ? (n(!0), u(d, { key: 0 }, h(e.bars, (o, r) => (n(), u("text", {
330
+ key: `hvl-${r}`,
331
+ x: o.bw + 6,
332
+ y: o.y + o.h / 2,
318
333
  "dominant-baseline": "middle",
319
334
  "font-size": "10",
320
335
  "font-weight": "600",
321
336
  class: "fill-foreground"
322
- }, k(i.formatValue ? i.formatValue(s.val) : w(Y)(s.val)), 9, Te))), 128)) : f("", !0)
337
+ }, p(i.formatValue ? i.formatValue(o.val) : k(R)(o.val)), 9, Ne))), 128)) : m("", !0)
323
338
  ]))), 128)),
324
- i.showYAxis ? (o(), n("line", {
339
+ i.showYAxis ? (n(), u("line", {
325
340
  key: 3,
326
341
  x1: 0,
327
342
  y1: 0,
@@ -329,41 +344,41 @@ const ye = {
329
344
  y2: c.value,
330
345
  stroke: "currentColor",
331
346
  "stroke-opacity": i.axisOpacity
332
- }, null, 8, Se)) : f("", !0),
333
- i.showXAxis ? (o(), n("line", {
347
+ }, null, 8, Qe)) : m("", !0),
348
+ i.showXAxis ? (n(), u("line", {
334
349
  key: 4,
335
350
  x1: 0,
336
351
  y1: c.value,
337
- x2: b.value,
352
+ x2: x.value,
338
353
  y2: c.value,
339
354
  stroke: "currentColor",
340
355
  "stroke-opacity": i.axisOpacity
341
- }, null, 8, We)) : f("", !0)
342
- ], 8, Oe))
343
- ], 40, me)),
344
- (o(), ce(de, { to: "body" }, [
345
- B.value ? (o(), n("div", {
356
+ }, null, 8, Ze)) : m("", !0)
357
+ ], 8, Ge))
358
+ ], 40, pe)),
359
+ (n(), me(ye, { to: "body" }, [
360
+ Y.value ? (n(), u("div", {
346
361
  key: 0,
347
362
  class: "vlite-chart-tooltip",
348
- style: F({ left: `${B.value.x + 12}px`, top: `${B.value.y - 10}px` })
363
+ style: _({ left: `${Y.value.x + 12}px`, top: `${Y.value.y - 10}px` })
349
364
  }, [
350
- M("div", Pe, k(B.value.label), 1),
351
- (o(!0), n(d, null, v(B.value.items, (e) => (o(), n("div", {
365
+ w("div", De, p(Y.value.label), 1),
366
+ (n(!0), u(d, null, h(Y.value.items, (e) => (n(), u("div", {
352
367
  key: e.label,
353
368
  class: "flex items-center gap-1.5 text-xs"
354
369
  }, [
355
- M("span", {
370
+ w("span", {
356
371
  class: "w-2 h-2 rounded-sm shrink-0",
357
- style: F({ backgroundColor: e.color })
372
+ style: _({ backgroundColor: e.color })
358
373
  }, null, 4),
359
- e.label ? (o(), n("span", He, k(e.label) + ":", 1)) : f("", !0),
360
- M("span", Ne, k(e.value), 1)
374
+ e.label ? (n(), u("span", Ee, p(e.label) + ":", 1)) : m("", !0),
375
+ w("span", Fe, p(e.value), 1)
361
376
  ]))), 128))
362
- ], 4)) : f("", !0)
377
+ ], 4)) : m("", !0)
363
378
  ]))
364
379
  ], 512));
365
380
  }
366
381
  });
367
382
  export {
368
- Ee as default
383
+ _e as default
369
384
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./LineChart.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-69f3c8c9"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-07c9fb47"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };