Feat: Tambah animasi counter di KPI cards dan animasi naik turun di chart trending harian

- Counter animation dari angka terkecil ke target dengan easing smooth
- Chart animation naik dari bawah tanpa animasi horizontal
- Loading overlay dengan spinner animation
- Fade animation untuk card values saat update
This commit is contained in:
BTekno Dev
2026-01-02 00:12:03 +07:00
parent e7e2042e86
commit 768a1e146c
3 changed files with 121 additions and 11 deletions

View File

@@ -338,11 +338,47 @@ a {
justify-content: center;
font-size: 0.8rem;
color: #6b7280;
display: none;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
z-index: 10;
}
.card-loading-overlay.visible {
display: flex;
opacity: 1;
visibility: visible;
}
/* Spinner animation - add spinner element before text */
.card-loading-overlay {
gap: 0.5rem;
}
.card-loading-overlay::before {
content: '';
width: 20px;
height: 20px;
border: 3px solid #e5e7eb;
border-top-color: #3b82f6;
border-radius: 50%;
animation: spin 0.8s linear infinite;
flex-shrink: 0;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Fade animation for card values */
.card-value {
transition: opacity 0.3s ease, transform 0.3s ease;
}
.card-value.updating {
opacity: 0.5;
transform: scale(0.95);
}
/* Charts & tables layout */