adminforth 2.22.0-next.20 → 2.22.0-next.22
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.
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="relative
|
|
2
|
+
<div class="relative w-full max-w-[700px] bg-lightProgressBarUnfilledColor rounded-full h-2.5 dark:bg-darkProgressBarUnfilledColor">
|
|
3
3
|
<span class="absolute -top-6 left-0 text-sm text-lightProgressBarText dark:text-darkProgressBarText">{{ leftLabel }}</span>
|
|
4
4
|
<span class="absolute -top-6 right-0 text-sm text-lightProgressBarText dark:text-darkProgressBarText">{{ rightLabel }}</span>
|
|
5
5
|
<div
|
|
6
6
|
class="bg-lightProgressBarFilledColor dark:bg-darkProgressBarFilledColor h-2.5 rounded-full transition-all duration-300 ease-in-out"
|
|
7
|
+
:class="{ 'progress-bar': showAnimation }"
|
|
7
8
|
:style="{ width: `${percentage}%` }"
|
|
8
9
|
></div>
|
|
9
10
|
<span v-if="showValues" class="absolute top-4 left-0 text-sm text-lightProgressBarText dark:text-darkProgressBarText">{{ formatValue(minValue) }}</span>
|
|
@@ -26,6 +27,7 @@ interface Props {
|
|
|
26
27
|
showLabels?: boolean
|
|
27
28
|
showValues?: boolean
|
|
28
29
|
showProgress?: boolean
|
|
30
|
+
showAnimation?: boolean
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -53,3 +55,34 @@ const formatValue = (value: number): string => {
|
|
|
53
55
|
return formatter(value)
|
|
54
56
|
}
|
|
55
57
|
</script>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<style scoped>
|
|
61
|
+
.progress-bar {
|
|
62
|
+
position: relative;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.progress-bar::after {
|
|
67
|
+
content: "";
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 0;
|
|
70
|
+
width: 100%;
|
|
71
|
+
|
|
72
|
+
background: linear-gradient(
|
|
73
|
+
-45deg,
|
|
74
|
+
transparent 35%,
|
|
75
|
+
rgba(255,255,255,0.4),
|
|
76
|
+
transparent 65%
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
transform: translateX(-100%);
|
|
80
|
+
animation: progress-slide 2s linear infinite;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@keyframes progress-slide {
|
|
84
|
+
100% {
|
|
85
|
+
transform: translateX(100%);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|