vlite3 1.2.4 → 1.2.7
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 +22 -8
- package/components/AvatarGroup/AvatarGroup.vue.js +10 -9
- package/components/Beacon.vue.d.ts +13 -0
- package/components/Button.vue.js +18 -18
- package/components/Chart/GanttChart.vue.d.ts +67 -0
- package/components/Chart/GanttChart.vue.js +7 -0
- package/components/Chart/GanttChart.vue2.js +911 -0
- package/components/Chart/SpeedometerChart.vue.d.ts +54 -0
- package/components/Chart/SpeedometerChart.vue.js +558 -0
- package/components/Chart/SpeedometerChart.vue2.js +4 -0
- package/components/Chart/index.d.ts +3 -1
- package/components/Chart/types.d.ts +106 -0
- package/components/ChoiceBox/ChoiceBox.vue.d.ts +46 -1
- package/components/ChoiceBox/ChoiceBox.vue.js +274 -91
- package/components/ChoiceBox/index.d.ts +1 -1
- package/components/{CopyButton.vue.d.ts → Clipboard.vue.d.ts} +4 -3
- package/components/{CopyButton.vue.js → Clipboard.vue.js} +19 -19
- package/components/Clipboard.vue2.js +4 -0
- package/components/ColorPicker/ColorPicker.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/DataTable/DataTableHeader.vue.js +33 -30
- package/components/DataTable/types.d.ts +1 -1
- package/components/ImageComparison/ImageComparison.vue.d.ts +29 -0
- package/components/ImageComparison/ImageComparison.vue.js +126 -0
- package/components/ImageComparison/ImageComparison.vue2.js +4 -0
- package/components/ImageComparison/index.d.ts +1 -0
- package/components/ImportData/ImportData.vue.js +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +92 -86
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/OTPInput/OTPInput.vue.d.ts +18 -0
- package/components/OTPInput/OTPInput.vue.js +127 -82
- package/components/Persona.vue.d.ts +25 -0
- package/components/PricingPlan/PricingPlanItem.vue.js +19 -19
- package/components/Radio.vue.d.ts +41 -0
- package/components/Radio.vue.js +97 -0
- package/components/Radio.vue2.js +4 -0
- package/components/RadioGroup.vue.d.ts +38 -0
- package/components/RadioGroup.vue.js +37 -0
- package/components/RadioGroup.vue2.js +4 -0
- package/components/SidePanel.vue.js +1 -1
- package/components/SidePanel.vue2.js +45 -57
- package/components/SidebarMenu/SidebarMenuItem.vue.js +70 -74
- package/components/Slider.vue.d.ts +7 -0
- package/components/Slider.vue.js +194 -120
- package/components/ThemeToggle.vue.js +10 -10
- package/components/Timeline/Timeline.vue.d.ts +1 -1
- package/components/index.d.ts +3 -1
- package/index.d.ts +4 -1
- package/index.js +148 -138
- package/package.json +1 -1
- package/style.css +58 -40
- package/types/form.type.d.ts +23 -0
- package/components/CopyButton.vue2.js +0 -4
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export type SpeedometerVariant = 'classic' | 'modern' | 'sport' | 'minimal';
|
|
2
|
+
export interface SpeedometerChartProps {
|
|
3
|
+
/** Current speed / value */
|
|
4
|
+
value: number;
|
|
5
|
+
/** Minimum value on the scale (default 0) */
|
|
6
|
+
min?: number;
|
|
7
|
+
/** Maximum value on the scale (default 240) */
|
|
8
|
+
max?: number;
|
|
9
|
+
/**
|
|
10
|
+
* classic — Traditional car speedometer with full tick marks and numbers
|
|
11
|
+
* modern — Sleek dark-themed speedometer with glowing accents
|
|
12
|
+
* sport — Racing-style with red-zone, aggressive ticks
|
|
13
|
+
* minimal — Clean minimal speedometer with fewer markings
|
|
14
|
+
*/
|
|
15
|
+
variant?: SpeedometerVariant;
|
|
16
|
+
/** SVG bounding diameter in px */
|
|
17
|
+
size?: number;
|
|
18
|
+
/** Opening gap at the bottom, in degrees (default 60) */
|
|
19
|
+
gapAngle?: number;
|
|
20
|
+
/** Semantic color name ('primary', 'success', etc.) or any CSS color */
|
|
21
|
+
color?: string;
|
|
22
|
+
/** Needle color — defaults to 'danger' for sport, color for others */
|
|
23
|
+
needleColor?: string;
|
|
24
|
+
/** Step between major tick labels (e.g. 20 → 0, 20, 40, 60, ...) */
|
|
25
|
+
majorStep?: number;
|
|
26
|
+
/** Number of minor ticks between major ticks */
|
|
27
|
+
minorTicks?: number;
|
|
28
|
+
/** Unit label (e.g. 'km/h', 'mph', 'RPM') */
|
|
29
|
+
unit?: string;
|
|
30
|
+
/** Show the current value in the center */
|
|
31
|
+
showValue?: boolean;
|
|
32
|
+
/** Custom value formatter */
|
|
33
|
+
formatValue?: (v: number) => string;
|
|
34
|
+
/** Primary label (e.g. vehicle model or metric name) */
|
|
35
|
+
label?: string;
|
|
36
|
+
/** Start of the danger zone (absolute value). Rendered in red/danger color. */
|
|
37
|
+
redZoneStart?: number;
|
|
38
|
+
/** Animate needle sweep on mount and value change */
|
|
39
|
+
animate?: boolean;
|
|
40
|
+
}
|
|
41
|
+
declare const _default: import('vue').DefineComponent<SpeedometerChartProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpeedometerChartProps> & Readonly<{}>, {
|
|
42
|
+
animate: boolean;
|
|
43
|
+
color: string;
|
|
44
|
+
variant: SpeedometerVariant;
|
|
45
|
+
size: number;
|
|
46
|
+
unit: string;
|
|
47
|
+
min: number;
|
|
48
|
+
max: number;
|
|
49
|
+
showValue: boolean;
|
|
50
|
+
gapAngle: number;
|
|
51
|
+
majorStep: number;
|
|
52
|
+
minorTicks: number;
|
|
53
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import { defineComponent as fe, computed as i, ref as ye, onMounted as me, watch as xe, onUnmounted as ge, openBlock as o, createElementBlock as a, createElementVNode as n, unref as f, createCommentVNode as c, Fragment as M, renderList as j, toDisplayString as y, normalizeStyle as S } from "vue";
|
|
2
|
+
import { resolveColor as ae, clamp as ke, animateProgress as we } from "./utils.js";
|
|
3
|
+
const be = { class: "vlite-speedometer-chart inline-flex flex-col items-center gap-1 select-none" }, Se = ["width", "height", "viewBox", "aria-label"], $e = ["id"], pe = ["stop-color"], ze = ["stop-color"], Me = ["id"], je = ["flood-color"], Ze = ["id"], Fe = ["stop-color"], Ve = ["id"], Ce = ["id"], Ae = { key: 0 }, Pe = ["d", "stroke-width"], Re = ["d", "stroke", "stroke-width"], Be = ["d", "stroke", "stroke-width"], De = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "opacity"], Ie = ["x", "y", "font-size", "fill", "opacity"], Le = ["filter"], Te = ["d", "fill"], Xe = ["cx", "cy", "r", "fill"], Ye = ["x", "y", "width", "height"], Ge = {
|
|
4
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
5
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center"
|
|
6
|
+
}, Ne = { key: 1 }, Oe = ["cx", "cy", "r"], _e = ["d", "stroke-width"], We = ["d", "stroke", "stroke-width"], Ee = ["filter"], Ue = ["d", "stroke", "stroke-width"], qe = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "opacity"], He = ["x", "y", "font-size", "fill", "opacity"], Je = ["filter"], Ke = ["d", "fill"], Qe = ["cx", "cy", "r", "fill"], et = ["x", "y", "width", "height"], tt = {
|
|
7
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
8
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center"
|
|
9
|
+
}, lt = { key: 2 }, ot = ["cx", "cy", "r"], at = ["cx", "cy", "r"], nt = ["d", "stroke-width"], rt = ["d", "stroke", "stroke-width"], it = ["d", "stroke", "stroke-width", "filter"], st = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "opacity"], ut = ["x", "y", "font-size", "fill", "opacity"], ct = ["filter"], dt = ["d", "fill"], vt = ["cx", "cy", "r", "stroke"], ht = ["cx", "cy", "r", "fill"], ft = ["x", "y", "width", "height"], yt = {
|
|
10
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
11
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center"
|
|
12
|
+
}, mt = { key: 3 }, xt = ["d", "stroke-width"], gt = ["d", "stroke", "stroke-width"], kt = ["x1", "y1", "x2", "y2", "stroke-width"], wt = ["x", "y", "font-size"], bt = ["filter"], St = ["d", "fill"], $t = ["cx", "cy", "r"], pt = ["x", "y", "width", "height"], zt = {
|
|
13
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
14
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center"
|
|
15
|
+
}, Zt = /* @__PURE__ */ fe({
|
|
16
|
+
__name: "SpeedometerChart",
|
|
17
|
+
props: {
|
|
18
|
+
value: {},
|
|
19
|
+
min: { default: 0 },
|
|
20
|
+
max: { default: 240 },
|
|
21
|
+
variant: { default: "classic" },
|
|
22
|
+
size: { default: 280 },
|
|
23
|
+
gapAngle: { default: 60 },
|
|
24
|
+
color: { default: "primary" },
|
|
25
|
+
needleColor: {},
|
|
26
|
+
majorStep: { default: 20 },
|
|
27
|
+
minorTicks: { default: 4 },
|
|
28
|
+
unit: { default: "km/h" },
|
|
29
|
+
showValue: { type: Boolean, default: !0 },
|
|
30
|
+
formatValue: {},
|
|
31
|
+
label: {},
|
|
32
|
+
redZoneStart: {},
|
|
33
|
+
animate: { type: Boolean, default: !0 }
|
|
34
|
+
},
|
|
35
|
+
setup(t) {
|
|
36
|
+
const l = t, v = Math.random().toString(36).slice(2, 8), A = i(() => 360 - l.gapAngle), $ = i(() => 90 + l.gapAngle / 2), h = i(() => l.size / 2), m = i(() => l.size / 2), k = i(() => (l.size - 8) / 2 - 24), G = (r) => ke((r - l.min) / (l.max - l.min), 0, 1);
|
|
37
|
+
function D(r, s) {
|
|
38
|
+
const e = r * Math.PI / 180;
|
|
39
|
+
return [h.value + s * Math.cos(e), m.value + s * Math.sin(e)];
|
|
40
|
+
}
|
|
41
|
+
function K(r, s, e) {
|
|
42
|
+
const u = s - r;
|
|
43
|
+
if (Math.abs(u) < 0.01) return "";
|
|
44
|
+
const w = Math.abs(u) > 180 ? 1 : 0, g = u > 0 ? 1 : 0, [T, X] = D(r, e), [C, b] = D(s, e);
|
|
45
|
+
return `M ${T},${X} A ${e},${e} 0 ${w} ${g} ${C},${b}`;
|
|
46
|
+
}
|
|
47
|
+
const Q = i(() => G(l.value)), Z = ye(l.animate ? 0 : Q.value);
|
|
48
|
+
let ee = null;
|
|
49
|
+
function oe(r) {
|
|
50
|
+
ee?.();
|
|
51
|
+
const s = Z.value;
|
|
52
|
+
ee = we(1200, (e) => {
|
|
53
|
+
Z.value = s + (r - s) * e;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
me(() => {
|
|
57
|
+
l.animate && oe(Q.value);
|
|
58
|
+
}), xe(Q, (r) => {
|
|
59
|
+
l.animate ? oe(r) : Z.value = r;
|
|
60
|
+
}), ge(() => ee?.());
|
|
61
|
+
const P = i(() => ae(l.color ?? "primary")), F = i(() => l.needleColor ? ae(l.needleColor) : l.variant === "sport" ? "#ef4444" : P.value), d = i(() => "#ef4444"), p = i(() => {
|
|
62
|
+
const r = [], s = l.max - l.min, e = Math.floor(s / l.majorStep), u = l.minorTicks + 1, w = e * u, g = k.value, T = g - (l.variant === "minimal" ? 10 : l.variant === "sport" ? 16 : 14), X = g - (l.variant === "minimal" ? 6 : l.variant === "sport" ? 9 : 8), C = g - (l.variant === "minimal" ? 22 : l.variant === "sport" ? 28 : 26);
|
|
63
|
+
for (let b = 0; b <= w; b++) {
|
|
64
|
+
const H = l.min + s * b / w, le = G(H), B = $.value + A.value * le, Y = b % u === 0, ie = Y ? T : X, [se, ue] = D(B, g), [ce, de] = D(B, ie), J = { angle: B, x1: se, y1: ue, x2: ce, y2: de, isMajor: Y };
|
|
65
|
+
if (Y) {
|
|
66
|
+
const [ve, he] = D(B, C);
|
|
67
|
+
J.label = String(Math.round(H)), J.labelX = ve, J.labelY = he;
|
|
68
|
+
}
|
|
69
|
+
r.push(J);
|
|
70
|
+
}
|
|
71
|
+
return r;
|
|
72
|
+
}), N = i(
|
|
73
|
+
() => K($.value, $.value + A.value, k.value)
|
|
74
|
+
), z = i(() => {
|
|
75
|
+
const r = A.value * Z.value;
|
|
76
|
+
return r < 0.01 ? "" : K($.value, $.value + r, k.value);
|
|
77
|
+
}), R = i(() => {
|
|
78
|
+
if (l.redZoneStart == null) return "";
|
|
79
|
+
const r = G(l.redZoneStart), s = $.value + A.value * r, e = $.value + A.value;
|
|
80
|
+
return K(s, e, k.value);
|
|
81
|
+
}), ne = i(() => $.value + A.value * Z.value), O = i(() => {
|
|
82
|
+
const r = k.value * 0.82, s = k.value * 0.15, e = l.variant === "sport" ? 5 : l.variant === "minimal" ? 3 : 4.5, w = ne.value * Math.PI / 180, g = w + Math.PI / 2, T = h.value + r * Math.cos(w), X = m.value + r * Math.sin(w), C = h.value - s * Math.cos(w), b = m.value - s * Math.sin(w), H = C + e * Math.cos(g), le = b + e * Math.sin(g), B = C - e * Math.cos(g), Y = b - e * Math.sin(g);
|
|
83
|
+
return `M ${T},${X} L ${H},${le} L ${C},${b} L ${B},${Y} Z`;
|
|
84
|
+
}), I = i(() => l.variant === "sport" ? 10 : l.variant === "minimal" ? 7 : 9), L = i(() => {
|
|
85
|
+
const r = l.min + (l.max - l.min) * Z.value;
|
|
86
|
+
return l.formatValue ? l.formatValue(r) : String(Math.round(r));
|
|
87
|
+
}), _ = i(() => Math.max(16, l.size * 0.14)), W = i(() => Math.max(9, l.size * 0.048)), re = i(() => Math.max(9, l.size * 0.042)), E = i(() => Math.max(8, l.size * 0.042)), x = i(() => l.variant === "minimal" ? 3 : l.variant === "sport" ? 6 : l.variant === "modern" ? 5 : 4), U = i(() => l.variant === "sport" ? 2.5 : l.variant === "minimal" ? 1.5 : 2), te = i(() => l.variant === "sport" ? 1.5 : (l.variant === "minimal", 1)), V = i(() => l.redZoneStart == null ? !1 : l.min + (l.max - l.min) * Z.value >= l.redZoneStart), q = i(() => m.value + k.value * 0.35);
|
|
88
|
+
return (r, s) => (o(), a("div", be, [
|
|
89
|
+
(o(), a("svg", {
|
|
90
|
+
width: t.size,
|
|
91
|
+
height: t.size,
|
|
92
|
+
viewBox: `0 0 ${t.size} ${t.size}`,
|
|
93
|
+
role: "img",
|
|
94
|
+
"aria-label": `Speedometer: ${L.value} ${t.unit}`,
|
|
95
|
+
class: "overflow-visible"
|
|
96
|
+
}, [
|
|
97
|
+
n("defs", null, [
|
|
98
|
+
n("linearGradient", {
|
|
99
|
+
id: `spg-${f(v)}`,
|
|
100
|
+
x1: "0",
|
|
101
|
+
y1: "0",
|
|
102
|
+
x2: "1",
|
|
103
|
+
y2: "0"
|
|
104
|
+
}, [
|
|
105
|
+
n("stop", {
|
|
106
|
+
offset: "0%",
|
|
107
|
+
"stop-color": P.value,
|
|
108
|
+
"stop-opacity": "0.3"
|
|
109
|
+
}, null, 8, pe),
|
|
110
|
+
n("stop", {
|
|
111
|
+
offset: "100%",
|
|
112
|
+
"stop-color": P.value
|
|
113
|
+
}, null, 8, ze)
|
|
114
|
+
], 8, $e),
|
|
115
|
+
n("filter", {
|
|
116
|
+
id: `ns-${f(v)}`,
|
|
117
|
+
x: "-50%",
|
|
118
|
+
y: "-50%",
|
|
119
|
+
width: "200%",
|
|
120
|
+
height: "200%"
|
|
121
|
+
}, [
|
|
122
|
+
n("feDropShadow", {
|
|
123
|
+
dx: "0",
|
|
124
|
+
dy: "1",
|
|
125
|
+
stdDeviation: "2",
|
|
126
|
+
"flood-color": F.value,
|
|
127
|
+
"flood-opacity": "0.4"
|
|
128
|
+
}, null, 8, je)
|
|
129
|
+
], 8, Me),
|
|
130
|
+
n("radialGradient", {
|
|
131
|
+
id: `sh-${f(v)}`
|
|
132
|
+
}, [
|
|
133
|
+
s[0] || (s[0] = n("stop", {
|
|
134
|
+
offset: "0%",
|
|
135
|
+
"stop-color": "var(--color-foreground)",
|
|
136
|
+
"stop-opacity": "0.9"
|
|
137
|
+
}, null, -1)),
|
|
138
|
+
n("stop", {
|
|
139
|
+
offset: "100%",
|
|
140
|
+
"stop-color": F.value
|
|
141
|
+
}, null, 8, Fe)
|
|
142
|
+
], 8, Ze),
|
|
143
|
+
n("filter", {
|
|
144
|
+
id: `glow-${f(v)}`,
|
|
145
|
+
x: "-30%",
|
|
146
|
+
y: "-30%",
|
|
147
|
+
width: "160%",
|
|
148
|
+
height: "160%"
|
|
149
|
+
}, [...s[1] || (s[1] = [
|
|
150
|
+
n("feGaussianBlur", {
|
|
151
|
+
stdDeviation: "3",
|
|
152
|
+
result: "blur"
|
|
153
|
+
}, null, -1),
|
|
154
|
+
n("feMerge", null, [
|
|
155
|
+
n("feMergeNode", { in: "blur" }),
|
|
156
|
+
n("feMergeNode", { in: "SourceGraphic" })
|
|
157
|
+
], -1)
|
|
158
|
+
])], 8, Ve),
|
|
159
|
+
n("filter", {
|
|
160
|
+
id: `as-${f(v)}`,
|
|
161
|
+
x: "-10%",
|
|
162
|
+
y: "-10%",
|
|
163
|
+
width: "120%",
|
|
164
|
+
height: "120%"
|
|
165
|
+
}, [...s[2] || (s[2] = [
|
|
166
|
+
n("feDropShadow", {
|
|
167
|
+
dx: "0",
|
|
168
|
+
dy: "1",
|
|
169
|
+
stdDeviation: "2",
|
|
170
|
+
"flood-opacity": "0.1"
|
|
171
|
+
}, null, -1)
|
|
172
|
+
])], 8, Ce)
|
|
173
|
+
]),
|
|
174
|
+
t.variant === "classic" ? (o(), a("g", Ae, [
|
|
175
|
+
n("path", {
|
|
176
|
+
d: N.value,
|
|
177
|
+
fill: "none",
|
|
178
|
+
stroke: "var(--color-muted)",
|
|
179
|
+
"stroke-width": x.value,
|
|
180
|
+
"stroke-linecap": "butt",
|
|
181
|
+
opacity: "0.5"
|
|
182
|
+
}, null, 8, Pe),
|
|
183
|
+
R.value ? (o(), a("path", {
|
|
184
|
+
key: 0,
|
|
185
|
+
d: R.value,
|
|
186
|
+
fill: "none",
|
|
187
|
+
stroke: d.value,
|
|
188
|
+
"stroke-width": x.value + 2,
|
|
189
|
+
"stroke-linecap": "butt",
|
|
190
|
+
opacity: "0.25"
|
|
191
|
+
}, null, 8, Re)) : c("", !0),
|
|
192
|
+
z.value ? (o(), a("path", {
|
|
193
|
+
key: 1,
|
|
194
|
+
d: z.value,
|
|
195
|
+
fill: "none",
|
|
196
|
+
stroke: P.value,
|
|
197
|
+
"stroke-width": x.value,
|
|
198
|
+
"stroke-linecap": "round",
|
|
199
|
+
opacity: "0.6"
|
|
200
|
+
}, null, 8, Be)) : c("", !0),
|
|
201
|
+
(o(!0), a(M, null, j(p.value, (e, u) => (o(), a("line", {
|
|
202
|
+
key: `t-${u}`,
|
|
203
|
+
x1: e.x1,
|
|
204
|
+
y1: e.y1,
|
|
205
|
+
x2: e.x2,
|
|
206
|
+
y2: e.y2,
|
|
207
|
+
stroke: t.redZoneStart != null && l.min + (l.max - l.min) * G(parseFloat(e.label ?? "0")) >= t.redZoneStart && e.isMajor ? d.value : "var(--color-foreground)",
|
|
208
|
+
"stroke-width": e.isMajor ? U.value : te.value,
|
|
209
|
+
opacity: e.isMajor ? 0.8 : 0.35,
|
|
210
|
+
"stroke-linecap": "round"
|
|
211
|
+
}, null, 8, De))), 128)),
|
|
212
|
+
(o(!0), a(M, null, j(p.value.filter((e) => e.isMajor), (e, u) => (o(), a("text", {
|
|
213
|
+
key: `tl-${u}`,
|
|
214
|
+
x: e.labelX,
|
|
215
|
+
y: e.labelY,
|
|
216
|
+
"text-anchor": "middle",
|
|
217
|
+
"dominant-baseline": "central",
|
|
218
|
+
"font-size": E.value,
|
|
219
|
+
"font-weight": "600",
|
|
220
|
+
fill: t.redZoneStart != null && parseFloat(e.label ?? "0") >= t.redZoneStart ? d.value : "var(--color-foreground)",
|
|
221
|
+
opacity: t.redZoneStart != null && parseFloat(e.label ?? "0") >= t.redZoneStart ? 0.9 : 0.7
|
|
222
|
+
}, y(e.label), 9, Ie))), 128)),
|
|
223
|
+
n("g", {
|
|
224
|
+
filter: `url(#ns-${f(v)})`
|
|
225
|
+
}, [
|
|
226
|
+
n("path", {
|
|
227
|
+
d: O.value,
|
|
228
|
+
fill: F.value,
|
|
229
|
+
"fill-opacity": 0.9
|
|
230
|
+
}, null, 8, Te)
|
|
231
|
+
], 8, Le),
|
|
232
|
+
n("circle", {
|
|
233
|
+
cx: h.value,
|
|
234
|
+
cy: m.value,
|
|
235
|
+
r: I.value,
|
|
236
|
+
fill: `url(#sh-${f(v)})`,
|
|
237
|
+
stroke: "var(--color-background)",
|
|
238
|
+
"stroke-width": "2"
|
|
239
|
+
}, null, 8, Xe),
|
|
240
|
+
(o(), a("foreignObject", {
|
|
241
|
+
x: h.value - t.size * 0.3,
|
|
242
|
+
y: q.value - t.size * 0.06,
|
|
243
|
+
width: t.size * 0.6,
|
|
244
|
+
height: t.size * 0.18
|
|
245
|
+
}, [
|
|
246
|
+
n("div", Ge, [
|
|
247
|
+
t.showValue ? (o(), a("span", {
|
|
248
|
+
key: 0,
|
|
249
|
+
class: "font-black tabular-nums leading-none",
|
|
250
|
+
style: S({ fontSize: `${_.value}px`, color: V.value ? d.value : "var(--color-foreground)" })
|
|
251
|
+
}, y(L.value), 5)) : c("", !0),
|
|
252
|
+
t.unit ? (o(), a("span", {
|
|
253
|
+
key: 1,
|
|
254
|
+
class: "font-medium leading-tight mt-0.5",
|
|
255
|
+
style: S({ fontSize: `${W.value}px`, color: "var(--color-muted-foreground)" })
|
|
256
|
+
}, y(t.unit), 5)) : c("", !0)
|
|
257
|
+
])
|
|
258
|
+
], 8, Ye))
|
|
259
|
+
])) : t.variant === "modern" ? (o(), a("g", Ne, [
|
|
260
|
+
n("circle", {
|
|
261
|
+
cx: h.value,
|
|
262
|
+
cy: m.value,
|
|
263
|
+
r: k.value + 8,
|
|
264
|
+
fill: "none",
|
|
265
|
+
stroke: "var(--color-muted)",
|
|
266
|
+
"stroke-width": "1",
|
|
267
|
+
opacity: "0.2"
|
|
268
|
+
}, null, 8, Oe),
|
|
269
|
+
n("path", {
|
|
270
|
+
d: N.value,
|
|
271
|
+
fill: "none",
|
|
272
|
+
stroke: "var(--color-muted)",
|
|
273
|
+
"stroke-width": x.value,
|
|
274
|
+
"stroke-linecap": "round",
|
|
275
|
+
opacity: "0.3"
|
|
276
|
+
}, null, 8, _e),
|
|
277
|
+
R.value ? (o(), a("path", {
|
|
278
|
+
key: 0,
|
|
279
|
+
d: R.value,
|
|
280
|
+
fill: "none",
|
|
281
|
+
stroke: d.value,
|
|
282
|
+
"stroke-width": x.value + 1,
|
|
283
|
+
"stroke-linecap": "butt",
|
|
284
|
+
opacity: "0.2"
|
|
285
|
+
}, null, 8, We)) : c("", !0),
|
|
286
|
+
z.value ? (o(), a("g", {
|
|
287
|
+
key: 1,
|
|
288
|
+
filter: `url(#glow-${f(v)})`
|
|
289
|
+
}, [
|
|
290
|
+
n("path", {
|
|
291
|
+
d: z.value,
|
|
292
|
+
fill: "none",
|
|
293
|
+
stroke: `url(#spg-${f(v)})`,
|
|
294
|
+
"stroke-width": x.value + 1,
|
|
295
|
+
"stroke-linecap": "round"
|
|
296
|
+
}, null, 8, Ue)
|
|
297
|
+
], 8, Ee)) : c("", !0),
|
|
298
|
+
(o(!0), a(M, null, j(p.value, (e, u) => (o(), a("line", {
|
|
299
|
+
key: `t-${u}`,
|
|
300
|
+
x1: e.x1,
|
|
301
|
+
y1: e.y1,
|
|
302
|
+
x2: e.x2,
|
|
303
|
+
y2: e.y2,
|
|
304
|
+
stroke: t.redZoneStart != null && e.isMajor && parseFloat(e.label ?? "0") >= t.redZoneStart ? d.value : "var(--color-foreground)",
|
|
305
|
+
"stroke-width": e.isMajor ? U.value : te.value,
|
|
306
|
+
opacity: e.isMajor ? 0.6 : 0.2,
|
|
307
|
+
"stroke-linecap": "round"
|
|
308
|
+
}, null, 8, qe))), 128)),
|
|
309
|
+
(o(!0), a(M, null, j(p.value.filter((e) => e.isMajor), (e, u) => (o(), a("text", {
|
|
310
|
+
key: `tl-${u}`,
|
|
311
|
+
x: e.labelX,
|
|
312
|
+
y: e.labelY,
|
|
313
|
+
"text-anchor": "middle",
|
|
314
|
+
"dominant-baseline": "central",
|
|
315
|
+
"font-size": E.value,
|
|
316
|
+
"font-weight": "500",
|
|
317
|
+
fill: t.redZoneStart != null && parseFloat(e.label ?? "0") >= t.redZoneStart ? d.value : "var(--color-foreground)",
|
|
318
|
+
opacity: t.redZoneStart != null && parseFloat(e.label ?? "0") >= t.redZoneStart ? 0.8 : 0.55
|
|
319
|
+
}, y(e.label), 9, He))), 128)),
|
|
320
|
+
n("g", {
|
|
321
|
+
filter: `url(#ns-${f(v)})`
|
|
322
|
+
}, [
|
|
323
|
+
n("path", {
|
|
324
|
+
d: O.value,
|
|
325
|
+
fill: F.value,
|
|
326
|
+
"fill-opacity": 0.85
|
|
327
|
+
}, null, 8, Ke)
|
|
328
|
+
], 8, Je),
|
|
329
|
+
n("circle", {
|
|
330
|
+
cx: h.value,
|
|
331
|
+
cy: m.value,
|
|
332
|
+
r: I.value,
|
|
333
|
+
fill: `url(#sh-${f(v)})`,
|
|
334
|
+
stroke: "var(--color-background)",
|
|
335
|
+
"stroke-width": "2"
|
|
336
|
+
}, null, 8, Qe),
|
|
337
|
+
(o(), a("foreignObject", {
|
|
338
|
+
x: h.value - t.size * 0.3,
|
|
339
|
+
y: q.value - t.size * 0.06,
|
|
340
|
+
width: t.size * 0.6,
|
|
341
|
+
height: t.size * 0.18
|
|
342
|
+
}, [
|
|
343
|
+
n("div", tt, [
|
|
344
|
+
t.showValue ? (o(), a("span", {
|
|
345
|
+
key: 0,
|
|
346
|
+
class: "font-black tabular-nums leading-none",
|
|
347
|
+
style: S({ fontSize: `${_.value}px`, color: V.value ? d.value : "var(--color-foreground)" })
|
|
348
|
+
}, y(L.value), 5)) : c("", !0),
|
|
349
|
+
t.unit ? (o(), a("span", {
|
|
350
|
+
key: 1,
|
|
351
|
+
class: "font-medium leading-tight mt-0.5",
|
|
352
|
+
style: S({ fontSize: `${W.value}px`, color: "var(--color-muted-foreground)" })
|
|
353
|
+
}, y(t.unit), 5)) : c("", !0)
|
|
354
|
+
])
|
|
355
|
+
], 8, et))
|
|
356
|
+
])) : t.variant === "sport" ? (o(), a("g", lt, [
|
|
357
|
+
n("circle", {
|
|
358
|
+
cx: h.value,
|
|
359
|
+
cy: m.value,
|
|
360
|
+
r: k.value + 12,
|
|
361
|
+
fill: "none",
|
|
362
|
+
stroke: "var(--color-foreground)",
|
|
363
|
+
"stroke-width": "1.5",
|
|
364
|
+
opacity: "0.1"
|
|
365
|
+
}, null, 8, ot),
|
|
366
|
+
n("circle", {
|
|
367
|
+
cx: h.value,
|
|
368
|
+
cy: m.value,
|
|
369
|
+
r: k.value + 6,
|
|
370
|
+
fill: "none",
|
|
371
|
+
stroke: "var(--color-foreground)",
|
|
372
|
+
"stroke-width": "0.5",
|
|
373
|
+
opacity: "0.08"
|
|
374
|
+
}, null, 8, at),
|
|
375
|
+
n("path", {
|
|
376
|
+
d: N.value,
|
|
377
|
+
fill: "none",
|
|
378
|
+
stroke: "var(--color-muted)",
|
|
379
|
+
"stroke-width": x.value + 2,
|
|
380
|
+
"stroke-linecap": "butt",
|
|
381
|
+
opacity: "0.25"
|
|
382
|
+
}, null, 8, nt),
|
|
383
|
+
R.value ? (o(), a("path", {
|
|
384
|
+
key: 0,
|
|
385
|
+
d: R.value,
|
|
386
|
+
fill: "none",
|
|
387
|
+
stroke: d.value,
|
|
388
|
+
"stroke-width": x.value + 4,
|
|
389
|
+
"stroke-linecap": "butt",
|
|
390
|
+
opacity: "0.3"
|
|
391
|
+
}, null, 8, rt)) : c("", !0),
|
|
392
|
+
z.value ? (o(), a("path", {
|
|
393
|
+
key: 1,
|
|
394
|
+
d: z.value,
|
|
395
|
+
fill: "none",
|
|
396
|
+
stroke: V.value ? d.value : P.value,
|
|
397
|
+
"stroke-width": x.value + 1,
|
|
398
|
+
"stroke-linecap": "butt",
|
|
399
|
+
opacity: "0.7",
|
|
400
|
+
filter: `url(#glow-${f(v)})`
|
|
401
|
+
}, null, 8, it)) : c("", !0),
|
|
402
|
+
(o(!0), a(M, null, j(p.value, (e, u) => (o(), a("line", {
|
|
403
|
+
key: `t-${u}`,
|
|
404
|
+
x1: e.x1,
|
|
405
|
+
y1: e.y1,
|
|
406
|
+
x2: e.x2,
|
|
407
|
+
y2: e.y2,
|
|
408
|
+
stroke: t.redZoneStart != null && e.isMajor && parseFloat(e.label ?? "0") >= t.redZoneStart ? d.value : "var(--color-foreground)",
|
|
409
|
+
"stroke-width": e.isMajor ? U.value : te.value,
|
|
410
|
+
opacity: e.isMajor ? 0.9 : 0.4,
|
|
411
|
+
"stroke-linecap": "butt"
|
|
412
|
+
}, null, 8, st))), 128)),
|
|
413
|
+
(o(!0), a(M, null, j(p.value.filter((e) => e.isMajor), (e, u) => (o(), a("text", {
|
|
414
|
+
key: `tl-${u}`,
|
|
415
|
+
x: e.labelX,
|
|
416
|
+
y: e.labelY,
|
|
417
|
+
"text-anchor": "middle",
|
|
418
|
+
"dominant-baseline": "central",
|
|
419
|
+
"font-size": E.value,
|
|
420
|
+
"font-weight": "700",
|
|
421
|
+
fill: t.redZoneStart != null && parseFloat(e.label ?? "0") >= t.redZoneStart ? d.value : "var(--color-foreground)",
|
|
422
|
+
opacity: t.redZoneStart != null && parseFloat(e.label ?? "0") >= t.redZoneStart ? 1 : 0.8
|
|
423
|
+
}, y(e.label), 9, ut))), 128)),
|
|
424
|
+
n("g", {
|
|
425
|
+
filter: `url(#ns-${f(v)})`
|
|
426
|
+
}, [
|
|
427
|
+
n("path", {
|
|
428
|
+
d: O.value,
|
|
429
|
+
fill: V.value ? d.value : F.value,
|
|
430
|
+
"fill-opacity": 0.95
|
|
431
|
+
}, null, 8, dt)
|
|
432
|
+
], 8, ct),
|
|
433
|
+
n("circle", {
|
|
434
|
+
cx: h.value,
|
|
435
|
+
cy: m.value,
|
|
436
|
+
r: I.value + 2,
|
|
437
|
+
fill: "none",
|
|
438
|
+
stroke: V.value ? d.value : F.value,
|
|
439
|
+
"stroke-width": "1.5",
|
|
440
|
+
opacity: "0.4"
|
|
441
|
+
}, null, 8, vt),
|
|
442
|
+
n("circle", {
|
|
443
|
+
cx: h.value,
|
|
444
|
+
cy: m.value,
|
|
445
|
+
r: I.value,
|
|
446
|
+
fill: `url(#sh-${f(v)})`,
|
|
447
|
+
stroke: "var(--color-background)",
|
|
448
|
+
"stroke-width": "2"
|
|
449
|
+
}, null, 8, ht),
|
|
450
|
+
(o(), a("foreignObject", {
|
|
451
|
+
x: h.value - t.size * 0.3,
|
|
452
|
+
y: q.value - t.size * 0.06,
|
|
453
|
+
width: t.size * 0.6,
|
|
454
|
+
height: t.size * 0.18
|
|
455
|
+
}, [
|
|
456
|
+
n("div", yt, [
|
|
457
|
+
t.showValue ? (o(), a("span", {
|
|
458
|
+
key: 0,
|
|
459
|
+
class: "font-black tabular-nums leading-none",
|
|
460
|
+
style: S({ fontSize: `${_.value * 1.1}px`, color: V.value ? d.value : "var(--color-foreground)" })
|
|
461
|
+
}, y(L.value), 5)) : c("", !0),
|
|
462
|
+
t.unit ? (o(), a("span", {
|
|
463
|
+
key: 1,
|
|
464
|
+
class: "font-bold leading-tight mt-0.5 uppercase tracking-widest",
|
|
465
|
+
style: S({ fontSize: `${W.value * 0.9}px`, color: V.value ? d.value : "var(--color-muted-foreground)", opacity: 0.7 })
|
|
466
|
+
}, y(t.unit), 5)) : c("", !0)
|
|
467
|
+
])
|
|
468
|
+
], 8, ft))
|
|
469
|
+
])) : t.variant === "minimal" ? (o(), a("g", mt, [
|
|
470
|
+
n("path", {
|
|
471
|
+
d: N.value,
|
|
472
|
+
fill: "none",
|
|
473
|
+
stroke: "var(--color-muted)",
|
|
474
|
+
"stroke-width": x.value,
|
|
475
|
+
"stroke-linecap": "round",
|
|
476
|
+
opacity: "0.4"
|
|
477
|
+
}, null, 8, xt),
|
|
478
|
+
z.value ? (o(), a("path", {
|
|
479
|
+
key: 0,
|
|
480
|
+
d: z.value,
|
|
481
|
+
fill: "none",
|
|
482
|
+
stroke: P.value,
|
|
483
|
+
"stroke-width": x.value,
|
|
484
|
+
"stroke-linecap": "round",
|
|
485
|
+
opacity: "0.8"
|
|
486
|
+
}, null, 8, gt)) : c("", !0),
|
|
487
|
+
(o(!0), a(M, null, j(p.value.filter((e) => e.isMajor), (e, u) => (o(), a("line", {
|
|
488
|
+
key: `t-${u}`,
|
|
489
|
+
x1: e.x1,
|
|
490
|
+
y1: e.y1,
|
|
491
|
+
x2: e.x2,
|
|
492
|
+
y2: e.y2,
|
|
493
|
+
stroke: "var(--color-foreground)",
|
|
494
|
+
"stroke-width": U.value,
|
|
495
|
+
opacity: "0.45",
|
|
496
|
+
"stroke-linecap": "round"
|
|
497
|
+
}, null, 8, kt))), 128)),
|
|
498
|
+
(o(!0), a(M, null, j(p.value.filter((e) => e.isMajor), (e, u) => (o(), a("text", {
|
|
499
|
+
key: `tl-${u}`,
|
|
500
|
+
x: e.labelX,
|
|
501
|
+
y: e.labelY,
|
|
502
|
+
"text-anchor": "middle",
|
|
503
|
+
"dominant-baseline": "central",
|
|
504
|
+
"font-size": E.value,
|
|
505
|
+
"font-weight": "500",
|
|
506
|
+
fill: "var(--color-foreground)",
|
|
507
|
+
opacity: "0.5"
|
|
508
|
+
}, y(e.label), 9, wt))), 128)),
|
|
509
|
+
n("g", {
|
|
510
|
+
filter: `url(#ns-${f(v)})`
|
|
511
|
+
}, [
|
|
512
|
+
n("path", {
|
|
513
|
+
d: O.value,
|
|
514
|
+
fill: F.value,
|
|
515
|
+
"fill-opacity": 0.8
|
|
516
|
+
}, null, 8, St)
|
|
517
|
+
], 8, bt),
|
|
518
|
+
n("circle", {
|
|
519
|
+
cx: h.value,
|
|
520
|
+
cy: m.value,
|
|
521
|
+
r: I.value,
|
|
522
|
+
fill: "var(--color-foreground)",
|
|
523
|
+
stroke: "var(--color-background)",
|
|
524
|
+
"stroke-width": "2",
|
|
525
|
+
opacity: "0.8"
|
|
526
|
+
}, null, 8, $t),
|
|
527
|
+
(o(), a("foreignObject", {
|
|
528
|
+
x: h.value - t.size * 0.3,
|
|
529
|
+
y: q.value - t.size * 0.06,
|
|
530
|
+
width: t.size * 0.6,
|
|
531
|
+
height: t.size * 0.18
|
|
532
|
+
}, [
|
|
533
|
+
n("div", zt, [
|
|
534
|
+
t.showValue ? (o(), a("span", {
|
|
535
|
+
key: 0,
|
|
536
|
+
class: "font-bold tabular-nums leading-none",
|
|
537
|
+
style: S({ fontSize: `${_.value * 0.9}px`, color: "var(--color-foreground)" })
|
|
538
|
+
}, y(L.value), 5)) : c("", !0),
|
|
539
|
+
t.unit ? (o(), a("span", {
|
|
540
|
+
key: 1,
|
|
541
|
+
class: "font-medium leading-tight mt-0.5",
|
|
542
|
+
style: S({ fontSize: `${W.value}px`, color: "var(--color-muted-foreground)" })
|
|
543
|
+
}, y(t.unit), 5)) : c("", !0)
|
|
544
|
+
])
|
|
545
|
+
], 8, pt))
|
|
546
|
+
])) : c("", !0)
|
|
547
|
+
], 8, Se)),
|
|
548
|
+
t.label ? (o(), a("p", {
|
|
549
|
+
key: 0,
|
|
550
|
+
class: "text-center font-semibold text-foreground -mt-1",
|
|
551
|
+
style: S({ fontSize: `${re.value}px` })
|
|
552
|
+
}, y(t.label), 5)) : c("", !0)
|
|
553
|
+
]));
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
export {
|
|
557
|
+
Zt as default
|
|
558
|
+
};
|
|
@@ -3,8 +3,10 @@ export { default as BarChart } from './BarChart.vue';
|
|
|
3
3
|
export { default as PieChart } from './PieChart.vue';
|
|
4
4
|
export { default as CircleChart } from './CircleChart.vue';
|
|
5
5
|
export { default as GaugeChart } from './GaugeChart.vue';
|
|
6
|
+
export { default as SpeedometerChart } from './SpeedometerChart.vue';
|
|
6
7
|
export { default as TimelineChart } from './TimelineChart.vue';
|
|
7
8
|
export { default as SegmentBarChart } from './SegmentBarChart.vue';
|
|
8
9
|
export { default as StatCardChart } from './StatCardChart.vue';
|
|
9
10
|
export { default as WaffleChart } from './WaffleChart.vue';
|
|
10
|
-
export
|
|
11
|
+
export { default as GanttChart } from './GanttChart.vue';
|
|
12
|
+
export type { ChartDataPoint, ChartDataset, LineChartProps, BarChartProps, PieChartProps, CircleChartProps, GaugeChartProps, GaugeVariant, GaugeZone, SpeedometerChartProps, SpeedometerVariant, TimelineChartProps, TimelineTask, SegmentBarChartProps, StatCardChartProps, StatCardItem, WaffleChartProps, GanttChartProps, GanttTask, GanttViewMode, } from './types';
|