vlite3 1.1.7 → 1.1.9
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/components/Chart/BarChart.vue.js +369 -0
- package/components/Chart/BarChart.vue2.js +4 -0
- package/components/Chart/CircleChart.vue.js +137 -0
- package/components/Chart/CircleChart.vue2.js +4 -0
- package/components/Chart/GaugeChart.vue.js +443 -0
- package/components/Chart/GaugeChart.vue2.js +4 -0
- package/components/Chart/LineChart.vue.js +7 -0
- package/components/Chart/LineChart.vue2.js +313 -0
- package/components/Chart/PieChart.vue.js +203 -0
- package/components/Chart/PieChart.vue2.js +4 -0
- package/components/Chart/utils.js +90 -0
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/Dropdown/Dropdown.vue.js +63 -63
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +23 -23
- package/components/Footer/Footer.vue.js +35 -0
- package/components/Footer/Footer.vue2.js +4 -0
- package/components/Footer/Variant1.vue.js +178 -0
- package/components/Footer/Variant1.vue2.js +4 -0
- package/components/Footer/Variant2.vue.js +177 -0
- package/components/Footer/Variant2.vue2.js +4 -0
- package/components/Footer/Variant3.vue.js +82 -0
- package/components/Footer/Variant3.vue2.js +4 -0
- package/components/MultiSelect/MultiSelect.vue.d.ts +23 -1
- package/components/MultiSelect/MultiSelect.vue.js +153 -122
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/RichTextEditor/RichTextEditor.vue.js +332 -0
- package/components/RichTextEditor/RichTextEditor.vue3.js +5 -0
- package/components/RichTextEditor/RichTextLinkPopover.vue.js +107 -0
- package/components/RichTextEditor/RichTextLinkPopover.vue3.js +5 -0
- package/components/RichTextEditor/RichTextReader.vue.js +7 -0
- package/components/RichTextEditor/RichTextReader.vue2.js +19 -0
- package/components/RichTextEditor/RichTextToolbar.vue.js +330 -0
- package/components/RichTextEditor/RichTextToolbar.vue3.js +5 -0
- package/components/RichTextEditor/composables/useRichTextImageUpload.js +77 -0
- package/components/RichTextEditor/composables/useRichTextLinks.js +120 -0
- package/core/config.d.ts +2 -2
- package/index.d.ts +3 -0
- package/index.js +332 -315
- package/package.json +1 -1
- package/style.css +1 -1
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { defineComponent as ae, computed as u, ref as oe, onMounted as ne, watch as se, onUnmounted as ie, openBlock as o, createElementBlock as n, createElementVNode as i, unref as m, Fragment as T, renderList as F, createCommentVNode as r, renderSlot as B, normalizeStyle as M, toDisplayString as S } from "vue";
|
|
2
|
+
import { resolveColor as ue, clamp as re, animateProgress as ce } from "./utils.js";
|
|
3
|
+
const de = { class: "vlite-gauge-chart inline-flex flex-col items-center gap-1 select-none" }, he = ["width", "height", "viewBox", "aria-label"], ve = ["id"], fe = ["stop-color"], ke = ["stop-color"], ye = ["id", "gradientTransform"], ge = ["stop-color"], me = ["stop-color"], xe = ["id"], we = ["stop-color"], be = ["id"], $e = { key: 0 }, ze = ["d", "stroke", "stroke-width"], Me = ["d", "stroke", "stroke-width"], Se = ["d", "stroke", "stroke-width", "stroke-linecap", "filter"], Ce = { key: 1 }, We = ["d", "fill"], Ve = ["cx", "cy", "r", "fill"], Ae = ["x", "y", "width", "height"], Pe = {
|
|
4
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
5
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center"
|
|
6
|
+
}, Be = { key: 1 }, je = ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "opacity"], De = ["x", "y", "width", "height"], Re = {
|
|
7
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
8
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center gap-1"
|
|
9
|
+
}, Ge = { key: 2 }, Le = ["d", "stroke", "stroke-width"], Ne = ["d", "stroke", "stroke-width"], Te = ["d", "stroke", "stroke-width", "stroke-linecap"], Fe = { key: 1 }, Ie = ["d", "fill"], Oe = ["cx", "cy", "r", "stroke"], pe = ["x", "y", "width", "height"], Ee = {
|
|
10
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
11
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center"
|
|
12
|
+
}, Ue = { key: 3 }, Ze = ["d", "stroke", "stroke-width"], qe = ["d", "stroke", "stroke-width"], He = ["d", "stroke", "stroke-width"], Je = { key: 1 }, Ke = ["cx", "cy", "r", "fill"], Qe = ["cx", "cy", "r", "fill"], Xe = ["cx", "cy", "r", "stroke", "stroke-width"], Ye = ["x", "y", "width", "height"], _e = {
|
|
13
|
+
xmlns: "http://www.w3.org/1999/xhtml",
|
|
14
|
+
class: "w-full h-full flex flex-col items-center justify-center text-center"
|
|
15
|
+
}, et = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "text-center -mt-1"
|
|
18
|
+
}, at = /* @__PURE__ */ ae({
|
|
19
|
+
__name: "GaugeChart",
|
|
20
|
+
props: {
|
|
21
|
+
value: {},
|
|
22
|
+
min: { default: 0 },
|
|
23
|
+
max: { default: 100 },
|
|
24
|
+
variant: { default: "arc" },
|
|
25
|
+
size: { default: 220 },
|
|
26
|
+
strokeWidth: { default: 18 },
|
|
27
|
+
gapAngle: { default: 60 },
|
|
28
|
+
color: { default: "primary" },
|
|
29
|
+
trackColor: {},
|
|
30
|
+
gradient: { type: Boolean, default: !0 },
|
|
31
|
+
tickCount: { default: 48 },
|
|
32
|
+
tickGap: { default: 2.5 },
|
|
33
|
+
tickWidth: { default: 3 },
|
|
34
|
+
ballRadius: {},
|
|
35
|
+
showValue: { type: Boolean, default: !0 },
|
|
36
|
+
formatValue: {},
|
|
37
|
+
label: {},
|
|
38
|
+
sublabel: {},
|
|
39
|
+
showNeedle: { type: Boolean, default: !1 },
|
|
40
|
+
needleColor: {},
|
|
41
|
+
zones: {},
|
|
42
|
+
lineCap: { default: "round" },
|
|
43
|
+
animate: { type: Boolean, default: !0 }
|
|
44
|
+
},
|
|
45
|
+
setup(e) {
|
|
46
|
+
const l = e, v = Math.random().toString(36).slice(2, 8), C = u(() => 360 - l.gapAngle), f = u(() => 90 + l.gapAngle / 2), h = u(() => l.size / 2), k = u(() => l.size / 2), x = u(() => {
|
|
47
|
+
const t = l.variant === "ticks" ? 8 : l.variant === "ball" ? l.strokeWidth * 0.65 + 2 : 4;
|
|
48
|
+
return (l.size - l.strokeWidth) / 2 - t;
|
|
49
|
+
}), I = (t) => re((t - l.min) / (l.max - l.min), 0, 1);
|
|
50
|
+
function O(t, s) {
|
|
51
|
+
const a = t * Math.PI / 180;
|
|
52
|
+
return [h.value + s * Math.cos(a), k.value + s * Math.sin(a)];
|
|
53
|
+
}
|
|
54
|
+
function p(t, s, a) {
|
|
55
|
+
const d = s - t;
|
|
56
|
+
if (Math.abs(d) < 0.01) return "";
|
|
57
|
+
const w = Math.abs(d) > 180 ? 1 : 0, W = d > 0 ? 1 : 0, [P, L] = O(t, a), [$, z] = O(s, a);
|
|
58
|
+
return `M ${P},${L} A ${a},${a} 0 ${w} ${W} ${$},${z}`;
|
|
59
|
+
}
|
|
60
|
+
const b = u(() => I(l.value)), y = oe(l.animate ? 0 : b.value);
|
|
61
|
+
let E = null;
|
|
62
|
+
function H(t) {
|
|
63
|
+
E?.();
|
|
64
|
+
const s = y.value;
|
|
65
|
+
E = ce(1e3, (a) => {
|
|
66
|
+
y.value = s + (t - s) * a;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
ne(() => {
|
|
70
|
+
l.animate && H(b.value);
|
|
71
|
+
}), se(b, (t) => {
|
|
72
|
+
l.animate ? H(t) : y.value = t;
|
|
73
|
+
}), ie(() => E?.());
|
|
74
|
+
const c = u(() => ue(l.color ?? "primary")), J = u(() => ({
|
|
75
|
+
primary: "#818cf8",
|
|
76
|
+
success: "#34d399",
|
|
77
|
+
warning: "#fbbf24",
|
|
78
|
+
danger: "#fb7185",
|
|
79
|
+
info: "#60a5fa",
|
|
80
|
+
purple: "#c084fc",
|
|
81
|
+
teal: "#2dd4bf",
|
|
82
|
+
orange: "#fb923c",
|
|
83
|
+
pink: "#f472b6",
|
|
84
|
+
cyan: "#22d3ee"
|
|
85
|
+
})[l.color ?? "primary"] ?? c.value), j = u(() => l.trackColor ?? "var(--color-muted)"), U = u(
|
|
86
|
+
() => p(f.value, f.value + C.value, x.value)
|
|
87
|
+
), V = u(() => {
|
|
88
|
+
const t = C.value * y.value;
|
|
89
|
+
return t < 0.01 ? "" : p(f.value, f.value + t, x.value);
|
|
90
|
+
}), Z = u(() => l.zones?.length ? l.zones.map((t) => {
|
|
91
|
+
const s = f.value + C.value * I(t.from), a = f.value + C.value * I(t.to);
|
|
92
|
+
return { path: p(s, a, x.value), color: t.color };
|
|
93
|
+
}) : []), Y = u(() => f.value + C.value * y.value), K = u(() => {
|
|
94
|
+
const t = x.value * 0.76, s = x.value * 0.12, a = l.strokeWidth * 0.55, w = Y.value * Math.PI / 180, W = w + Math.PI / 2, P = h.value + t * Math.cos(w), L = k.value + t * Math.sin(w), $ = h.value - s * Math.cos(w), z = k.value - s * Math.sin(w), N = $ + a * Math.cos(W), ee = z + a * Math.sin(W), te = $ - a * Math.cos(W), le = z - a * Math.sin(W);
|
|
95
|
+
return `M ${P},${L} L ${N},${ee} L ${$},${z} L ${te},${le} Z`;
|
|
96
|
+
}), Q = u(() => l.strokeWidth * 0.42), _ = u(() => {
|
|
97
|
+
const t = l.tickCount, s = x.value, a = s - l.strokeWidth, d = C.value, w = Math.round(y.value * t);
|
|
98
|
+
return Array.from({ length: t }, (W, P) => {
|
|
99
|
+
const $ = (f.value + P * (d / (t - 1))) * Math.PI / 180, z = Math.cos($), N = Math.sin($);
|
|
100
|
+
return {
|
|
101
|
+
x1: h.value + s * z,
|
|
102
|
+
y1: k.value + s * N,
|
|
103
|
+
x2: h.value + a * z,
|
|
104
|
+
y2: k.value + a * N,
|
|
105
|
+
filled: P < w
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
}), g = u(() => {
|
|
109
|
+
const t = y.value * 100, s = l.min + (l.max - l.min) * y.value;
|
|
110
|
+
return l.formatValue ? l.formatValue(s, t) : l.min === 0 && l.max === 100 ? `${Math.round(t)}%` : String(Math.round(s));
|
|
111
|
+
}), D = u(() => Math.max(14, l.size * 0.155)), X = u(() => Math.max(10, l.size * 0.065)), q = u(() => Math.max(9, l.size * 0.055)), R = u(() => l.showNeedle ? k.value + x.value * 0.45 : k.value + x.value * 0.08), A = u(() => {
|
|
112
|
+
const t = f.value + C.value * y.value, [s, a] = O(t, x.value);
|
|
113
|
+
return { x: s, y: a };
|
|
114
|
+
}), G = u(() => l.ballRadius ?? l.strokeWidth * 0.65);
|
|
115
|
+
return (t, s) => (o(), n("div", de, [
|
|
116
|
+
(o(), n("svg", {
|
|
117
|
+
width: e.size,
|
|
118
|
+
height: e.size,
|
|
119
|
+
viewBox: `0 0 ${e.size} ${e.size}`,
|
|
120
|
+
role: "img",
|
|
121
|
+
"aria-label": `Gauge chart: ${g.value}`,
|
|
122
|
+
class: "overflow-visible"
|
|
123
|
+
}, [
|
|
124
|
+
i("defs", null, [
|
|
125
|
+
i("linearGradient", {
|
|
126
|
+
id: `gg-${m(v)}`,
|
|
127
|
+
x1: "0",
|
|
128
|
+
y1: "0",
|
|
129
|
+
x2: "1",
|
|
130
|
+
y2: "0"
|
|
131
|
+
}, [
|
|
132
|
+
i("stop", {
|
|
133
|
+
offset: "0%",
|
|
134
|
+
"stop-color": J.value
|
|
135
|
+
}, null, 8, fe),
|
|
136
|
+
i("stop", {
|
|
137
|
+
offset: "100%",
|
|
138
|
+
"stop-color": c.value
|
|
139
|
+
}, null, 8, ke)
|
|
140
|
+
], 8, ve),
|
|
141
|
+
i("linearGradient", {
|
|
142
|
+
id: `tg-${m(v)}`,
|
|
143
|
+
x1: "0",
|
|
144
|
+
y1: "0",
|
|
145
|
+
x2: "1",
|
|
146
|
+
y2: "0",
|
|
147
|
+
gradientTransform: `rotate(${f.value}, ${h.value}, ${k.value})`
|
|
148
|
+
}, [
|
|
149
|
+
i("stop", {
|
|
150
|
+
offset: "0%",
|
|
151
|
+
"stop-color": J.value
|
|
152
|
+
}, null, 8, ge),
|
|
153
|
+
i("stop", {
|
|
154
|
+
offset: "100%",
|
|
155
|
+
"stop-color": c.value
|
|
156
|
+
}, null, 8, me)
|
|
157
|
+
], 8, ye),
|
|
158
|
+
i("radialGradient", {
|
|
159
|
+
id: `nh-${m(v)}`
|
|
160
|
+
}, [
|
|
161
|
+
s[0] || (s[0] = i("stop", {
|
|
162
|
+
offset: "0%",
|
|
163
|
+
"stop-color": "var(--color-background)"
|
|
164
|
+
}, null, -1)),
|
|
165
|
+
i("stop", {
|
|
166
|
+
offset: "100%",
|
|
167
|
+
"stop-color": c.value
|
|
168
|
+
}, null, 8, we)
|
|
169
|
+
], 8, xe),
|
|
170
|
+
i("filter", {
|
|
171
|
+
id: `gs-${m(v)}`,
|
|
172
|
+
x: "-20%",
|
|
173
|
+
y: "-20%",
|
|
174
|
+
width: "140%",
|
|
175
|
+
height: "140%"
|
|
176
|
+
}, [...s[1] || (s[1] = [
|
|
177
|
+
i("feDropShadow", {
|
|
178
|
+
dx: "0",
|
|
179
|
+
dy: "2",
|
|
180
|
+
stdDeviation: "4",
|
|
181
|
+
"flood-opacity": "0.18"
|
|
182
|
+
}, null, -1)
|
|
183
|
+
])], 8, be)
|
|
184
|
+
]),
|
|
185
|
+
e.variant === "arc" ? (o(), n("g", $e, [
|
|
186
|
+
i("path", {
|
|
187
|
+
d: U.value,
|
|
188
|
+
fill: "none",
|
|
189
|
+
stroke: j.value,
|
|
190
|
+
"stroke-width": e.strokeWidth,
|
|
191
|
+
"stroke-linecap": "butt"
|
|
192
|
+
}, null, 8, ze),
|
|
193
|
+
(o(!0), n(T, null, F(Z.value, (a, d) => (o(), n("path", {
|
|
194
|
+
key: `z-${d}`,
|
|
195
|
+
d: a.path,
|
|
196
|
+
fill: "none",
|
|
197
|
+
stroke: a.color,
|
|
198
|
+
"stroke-width": e.strokeWidth,
|
|
199
|
+
"stroke-linecap": "butt",
|
|
200
|
+
opacity: "0.35"
|
|
201
|
+
}, null, 8, Me))), 128)),
|
|
202
|
+
V.value ? (o(), n("path", {
|
|
203
|
+
key: 0,
|
|
204
|
+
d: V.value,
|
|
205
|
+
fill: "none",
|
|
206
|
+
stroke: e.gradient ? `url(#gg-${m(v)})` : c.value,
|
|
207
|
+
"stroke-width": e.strokeWidth,
|
|
208
|
+
"stroke-linecap": e.lineCap,
|
|
209
|
+
filter: `url(#gs-${m(v)})`
|
|
210
|
+
}, null, 8, Se)) : r("", !0),
|
|
211
|
+
e.showNeedle ? (o(), n("g", Ce, [
|
|
212
|
+
i("path", {
|
|
213
|
+
d: K.value,
|
|
214
|
+
fill: e.needleColor ?? c.value,
|
|
215
|
+
"fill-opacity": 0.88
|
|
216
|
+
}, null, 8, We),
|
|
217
|
+
i("circle", {
|
|
218
|
+
cx: h.value,
|
|
219
|
+
cy: k.value,
|
|
220
|
+
r: Q.value,
|
|
221
|
+
fill: `url(#nh-${m(v)})`,
|
|
222
|
+
stroke: "var(--color-background)",
|
|
223
|
+
"stroke-width": "2.5"
|
|
224
|
+
}, null, 8, Ve)
|
|
225
|
+
])) : r("", !0),
|
|
226
|
+
(o(), n("foreignObject", {
|
|
227
|
+
x: h.value - e.size * 0.38,
|
|
228
|
+
y: R.value - e.size * 0.1,
|
|
229
|
+
width: e.size * 0.76,
|
|
230
|
+
height: e.size * 0.22
|
|
231
|
+
}, [
|
|
232
|
+
i("div", Pe, [
|
|
233
|
+
B(t.$slots, "center", {
|
|
234
|
+
value: e.value,
|
|
235
|
+
percentage: b.value,
|
|
236
|
+
displayValue: g.value
|
|
237
|
+
}, () => [
|
|
238
|
+
e.showValue ? (o(), n("span", {
|
|
239
|
+
key: 0,
|
|
240
|
+
class: "font-black tabular-nums leading-none",
|
|
241
|
+
style: M({ fontSize: `${D.value}px`, color: "var(--color-foreground)" })
|
|
242
|
+
}, S(g.value), 5)) : r("", !0)
|
|
243
|
+
])
|
|
244
|
+
])
|
|
245
|
+
], 8, Ae))
|
|
246
|
+
])) : e.variant === "ticks" ? (o(), n("g", Be, [
|
|
247
|
+
(o(!0), n(T, null, F(_.value, (a, d) => (o(), n("line", {
|
|
248
|
+
key: `tk-${d}`,
|
|
249
|
+
x1: a.x1,
|
|
250
|
+
y1: a.y1,
|
|
251
|
+
x2: a.x2,
|
|
252
|
+
y2: a.y2,
|
|
253
|
+
stroke: a.filled ? e.gradient ? `url(#tg-${m(v)})` : c.value : j.value,
|
|
254
|
+
"stroke-width": e.tickWidth,
|
|
255
|
+
"stroke-linecap": "round",
|
|
256
|
+
opacity: a.filled ? 1 : 0.45
|
|
257
|
+
}, null, 8, je))), 128)),
|
|
258
|
+
(o(), n("foreignObject", {
|
|
259
|
+
x: h.value - e.size * 0.38,
|
|
260
|
+
y: R.value - e.size * 0.22,
|
|
261
|
+
width: e.size * 0.76,
|
|
262
|
+
height: e.size * 0.44
|
|
263
|
+
}, [
|
|
264
|
+
i("div", Re, [
|
|
265
|
+
B(t.$slots, "center", {
|
|
266
|
+
value: e.value,
|
|
267
|
+
percentage: b.value,
|
|
268
|
+
displayValue: g.value
|
|
269
|
+
}, () => [
|
|
270
|
+
e.showValue ? (o(), n("span", {
|
|
271
|
+
key: 0,
|
|
272
|
+
class: "font-black tabular-nums leading-none",
|
|
273
|
+
style: M({ fontSize: `${D.value}px`, color: "var(--color-foreground)" })
|
|
274
|
+
}, S(g.value), 5)) : r("", !0),
|
|
275
|
+
e.sublabel ? (o(), n("span", {
|
|
276
|
+
key: 1,
|
|
277
|
+
class: "font-medium leading-tight",
|
|
278
|
+
style: M({ fontSize: `${q.value}px`, color: "var(--color-muted-foreground)" })
|
|
279
|
+
}, S(e.sublabel), 5)) : r("", !0)
|
|
280
|
+
])
|
|
281
|
+
])
|
|
282
|
+
], 8, De))
|
|
283
|
+
])) : e.variant === "slim" ? (o(), n("g", Ge, [
|
|
284
|
+
i("path", {
|
|
285
|
+
d: U.value,
|
|
286
|
+
fill: "none",
|
|
287
|
+
stroke: j.value,
|
|
288
|
+
"stroke-width": e.strokeWidth,
|
|
289
|
+
"stroke-linecap": "round",
|
|
290
|
+
opacity: "0.5"
|
|
291
|
+
}, null, 8, Le),
|
|
292
|
+
(o(!0), n(T, null, F(Z.value, (a, d) => (o(), n("path", {
|
|
293
|
+
key: `sz-${d}`,
|
|
294
|
+
d: a.path,
|
|
295
|
+
fill: "none",
|
|
296
|
+
stroke: a.color,
|
|
297
|
+
"stroke-width": e.strokeWidth,
|
|
298
|
+
"stroke-linecap": "butt",
|
|
299
|
+
opacity: "0.3"
|
|
300
|
+
}, null, 8, Ne))), 128)),
|
|
301
|
+
V.value ? (o(), n("path", {
|
|
302
|
+
key: 0,
|
|
303
|
+
d: V.value,
|
|
304
|
+
fill: "none",
|
|
305
|
+
stroke: e.gradient ? `url(#gg-${m(v)})` : c.value,
|
|
306
|
+
"stroke-width": e.strokeWidth,
|
|
307
|
+
"stroke-linecap": e.lineCap
|
|
308
|
+
}, null, 8, Te)) : r("", !0),
|
|
309
|
+
e.showNeedle ? (o(), n("g", Fe, [
|
|
310
|
+
i("path", {
|
|
311
|
+
d: K.value,
|
|
312
|
+
fill: e.needleColor ?? c.value,
|
|
313
|
+
"fill-opacity": 0.88
|
|
314
|
+
}, null, 8, Ie),
|
|
315
|
+
i("circle", {
|
|
316
|
+
cx: h.value,
|
|
317
|
+
cy: k.value,
|
|
318
|
+
r: Q.value,
|
|
319
|
+
fill: "var(--color-background)",
|
|
320
|
+
stroke: c.value,
|
|
321
|
+
"stroke-width": "2.5"
|
|
322
|
+
}, null, 8, Oe)
|
|
323
|
+
])) : r("", !0),
|
|
324
|
+
(o(), n("foreignObject", {
|
|
325
|
+
x: h.value - e.size * 0.38,
|
|
326
|
+
y: R.value - e.size * 0.1,
|
|
327
|
+
width: e.size * 0.76,
|
|
328
|
+
height: e.size * 0.22
|
|
329
|
+
}, [
|
|
330
|
+
i("div", Ee, [
|
|
331
|
+
B(t.$slots, "center", {
|
|
332
|
+
value: e.value,
|
|
333
|
+
percentage: b.value,
|
|
334
|
+
displayValue: g.value
|
|
335
|
+
}, () => [
|
|
336
|
+
e.showValue ? (o(), n("span", {
|
|
337
|
+
key: 0,
|
|
338
|
+
class: "font-bold tabular-nums leading-none",
|
|
339
|
+
style: M({ fontSize: `${D.value * 0.82}px`, color: "var(--color-foreground)" })
|
|
340
|
+
}, S(g.value), 5)) : r("", !0)
|
|
341
|
+
])
|
|
342
|
+
])
|
|
343
|
+
], 8, pe))
|
|
344
|
+
])) : e.variant === "ball" ? (o(), n("g", Ue, [
|
|
345
|
+
i("path", {
|
|
346
|
+
d: U.value,
|
|
347
|
+
fill: "none",
|
|
348
|
+
stroke: j.value,
|
|
349
|
+
"stroke-width": e.strokeWidth,
|
|
350
|
+
"stroke-linecap": "round",
|
|
351
|
+
opacity: "0.35"
|
|
352
|
+
}, null, 8, Ze),
|
|
353
|
+
V.value ? (o(), n("path", {
|
|
354
|
+
key: 0,
|
|
355
|
+
d: V.value,
|
|
356
|
+
fill: "none",
|
|
357
|
+
stroke: e.gradient ? `url(#gg-${m(v)})` : c.value,
|
|
358
|
+
"stroke-width": e.strokeWidth,
|
|
359
|
+
"stroke-linecap": "round"
|
|
360
|
+
}, null, 8, qe)) : r("", !0),
|
|
361
|
+
(o(!0), n(T, null, F(Z.value, (a, d) => (o(), n("path", {
|
|
362
|
+
key: `bz-${d}`,
|
|
363
|
+
d: a.path,
|
|
364
|
+
fill: "none",
|
|
365
|
+
stroke: a.color,
|
|
366
|
+
"stroke-width": e.strokeWidth,
|
|
367
|
+
"stroke-linecap": "butt",
|
|
368
|
+
opacity: "0.25"
|
|
369
|
+
}, null, 8, He))), 128)),
|
|
370
|
+
y.value > 5e-3 ? (o(), n("g", Je, [
|
|
371
|
+
i("circle", {
|
|
372
|
+
cx: A.value.x,
|
|
373
|
+
cy: A.value.y,
|
|
374
|
+
r: G.value * 1.9,
|
|
375
|
+
fill: c.value,
|
|
376
|
+
opacity: "0.18"
|
|
377
|
+
}, null, 8, Ke),
|
|
378
|
+
i("circle", {
|
|
379
|
+
cx: A.value.x,
|
|
380
|
+
cy: A.value.y,
|
|
381
|
+
r: G.value * 1.35,
|
|
382
|
+
fill: c.value,
|
|
383
|
+
opacity: "0.22"
|
|
384
|
+
}, null, 8, Qe),
|
|
385
|
+
i("circle", {
|
|
386
|
+
cx: A.value.x,
|
|
387
|
+
cy: A.value.y,
|
|
388
|
+
r: G.value,
|
|
389
|
+
fill: "var(--color-background)",
|
|
390
|
+
stroke: c.value,
|
|
391
|
+
"stroke-width": G.value * 0.55
|
|
392
|
+
}, null, 8, Xe)
|
|
393
|
+
])) : r("", !0),
|
|
394
|
+
(o(), n("foreignObject", {
|
|
395
|
+
x: h.value - e.size * 0.38,
|
|
396
|
+
y: R.value - e.size * 0.2,
|
|
397
|
+
width: e.size * 0.76,
|
|
398
|
+
height: e.size * 0.42
|
|
399
|
+
}, [
|
|
400
|
+
i("div", _e, [
|
|
401
|
+
B(t.$slots, "center", {
|
|
402
|
+
value: e.value,
|
|
403
|
+
percentage: b.value,
|
|
404
|
+
displayValue: g.value
|
|
405
|
+
}, () => [
|
|
406
|
+
e.showValue ? (o(), n("span", {
|
|
407
|
+
key: 0,
|
|
408
|
+
class: "font-black tabular-nums leading-none",
|
|
409
|
+
style: M({ fontSize: `${D.value}px`, color: "var(--color-foreground)" })
|
|
410
|
+
}, S(g.value), 5)) : r("", !0),
|
|
411
|
+
e.sublabel ? (o(), n("span", {
|
|
412
|
+
key: 1,
|
|
413
|
+
class: "font-medium mt-1",
|
|
414
|
+
style: M({ fontSize: `${q.value}px`, color: "var(--color-muted-foreground)" })
|
|
415
|
+
}, S(e.sublabel), 5)) : r("", !0)
|
|
416
|
+
])
|
|
417
|
+
])
|
|
418
|
+
], 8, Ye))
|
|
419
|
+
])) : r("", !0)
|
|
420
|
+
], 8, he)),
|
|
421
|
+
(e.label || e.sublabel) && e.variant !== "ticks" && e.variant !== "ball" ? (o(), n("div", et, [
|
|
422
|
+
e.label ? (o(), n("p", {
|
|
423
|
+
key: 0,
|
|
424
|
+
class: "font-semibold text-foreground",
|
|
425
|
+
style: M({ fontSize: `${e.variant === "slim" ? X.value * 0.9 : X.value}px` })
|
|
426
|
+
}, S(e.label), 5)) : r("", !0),
|
|
427
|
+
e.sublabel ? (o(), n("p", {
|
|
428
|
+
key: 1,
|
|
429
|
+
class: "text-muted-foreground mt-0.5",
|
|
430
|
+
style: M({ fontSize: `${q.value}px` })
|
|
431
|
+
}, S(e.sublabel), 5)) : r("", !0)
|
|
432
|
+
])) : r("", !0),
|
|
433
|
+
B(t.$slots, "footer", {
|
|
434
|
+
value: e.value,
|
|
435
|
+
percentage: b.value,
|
|
436
|
+
displayValue: g.value
|
|
437
|
+
})
|
|
438
|
+
]));
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
export {
|
|
442
|
+
at as default
|
|
443
|
+
};
|