2 Commits

13 changed files with 1463 additions and 468 deletions

View File

@@ -1,5 +1,15 @@
# Changelog
## 2025-12-23 - 1.2.0 - feat(statuspage-ui)
improve styling and animations across status page components
- Preload Geist Sans variable font in html/index.html to improve font rendering.
- Replace many cssManager.bdTheme usages with sharedStyles color tokens, durations and easings for consistent theming.
- Introduce animations, transitions and motion utilities (fadeIn, fadeInUp, card/pill fades, shimmer, pulse) for cards, pills, bars, tooltips and skeletons to enhance perceived performance.
- Enhance interactive states: hover/active/focus for buttons, social links, action buttons, and asset/incident cards; add subtle transforms, shadows and icon animations.
- Add status-specific visuals: status gradients, status glows, pulsing/animated status indicators and left accent bars for statusbar and stat cards.
- Improve incidents and timeline UI: staggered entrance animations, active-incident pulse, update timeline with icons and delays; tooltip and tooltip content improvements; responsive tweaks across header, footer, stats and month views.
## 2025-12-23 - 1.1.0 - feat(statuspage)
refactor shared styles and modernize components for consistent theming, spacing and APIs

View File

@@ -12,6 +12,7 @@
<!--Lets load standard fonts-->
<link rel="preconnect" href="https://assetbroker.lossless.one/" crossorigin>
<link rel="preload" href="https://assetbroker.lossless.one/fonts/geist-sans/geistvf.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="https://assetbroker.lossless.one/fonts/fonts.css">
<style>

View File

@@ -1,6 +1,6 @@
{
"name": "@uptime.link/statuspage",
"version": "1.1.0",
"version": "1.2.0",
"private": false,
"description": "A catalog of web components for the UptimeLink dashboard.",
"main": "dist_ts_web/index.js",

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@uptime.link/statuspage',
version: '1.1.0',
version: '1.2.0',
description: 'A catalog of web components for the UptimeLink dashboard.'
}

View File

@@ -76,23 +76,24 @@ export class UplStatuspageAssetsselector extends DeesElement {
flex: 1;
min-width: 200px;
padding: ${unsafeCSS(sharedStyles.spacing.xs)} ${unsafeCSS(sharedStyles.spacing.sm)};
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
background: ${sharedStyles.colors.background.card};
color: ${sharedStyles.colors.text.primary};
font-size: 13px;
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
transition: all 0.2s ease;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
height: 32px;
}
.search-input:focus {
outline: none;
border-color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
border-color: ${sharedStyles.colors.text.primary};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(0, 0, 0, 0.05)', 'rgba(255, 255, 255, 0.05)')};
}
.search-input::placeholder {
color: ${cssManager.bdTheme('#9ca3af', '#71717a')};
color: ${sharedStyles.colors.text.muted};
}
.filter-button {
@@ -100,27 +101,28 @@ export class UplStatuspageAssetsselector extends DeesElement {
align-items: center;
justify-content: center;
padding: ${unsafeCSS(sharedStyles.spacing.xs)} ${unsafeCSS(sharedStyles.spacing.sm)};
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
background: transparent;
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
background: ${sharedStyles.colors.background.card};
color: ${sharedStyles.colors.text.secondary};
cursor: pointer;
font-size: 13px;
font-weight: 400;
font-weight: 500;
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
transition: all 0.2s ease;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
height: 32px;
}
.filter-button:hover {
border-color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
border-color: ${sharedStyles.colors.border.muted};
color: ${sharedStyles.colors.text.primary};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
}
.filter-button.active {
background: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
color: ${cssManager.bdTheme('#fafafa', '#0a0a0a')};
border-color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
background: ${sharedStyles.colors.text.primary};
color: ${sharedStyles.colors.background.primary};
border-color: ${sharedStyles.colors.text.primary};
}
.selected-services {
@@ -134,56 +136,99 @@ export class UplStatuspageAssetsselector extends DeesElement {
display: inline-flex;
align-items: center;
gap: ${unsafeCSS(sharedStyles.spacing.xs)};
padding: ${unsafeCSS(sharedStyles.spacing.xs)} ${unsafeCSS(sharedStyles.spacing.md)};
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
padding: 6px ${unsafeCSS(sharedStyles.spacing.md)};
background: ${sharedStyles.colors.background.card};
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.full)};
font-size: 13px;
transition: all 0.2s ease;
font-weight: 500;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
animation: pillFadeIn 0.3s ${unsafeCSS(sharedStyles.easings.default)} both;
}
.service-pill:nth-child(1) { animation-delay: 0ms; }
.service-pill:nth-child(2) { animation-delay: 30ms; }
.service-pill:nth-child(3) { animation-delay: 60ms; }
.service-pill:nth-child(4) { animation-delay: 90ms; }
.service-pill:nth-child(5) { animation-delay: 120ms; }
@keyframes pillFadeIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
transform: scale(1);
}
}
.service-pill:hover {
border-color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
border-color: ${sharedStyles.colors.border.muted};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
transform: translateY(-1px);
}
.service-pill .status-dot {
width: 6px;
height: 6px;
border-radius: 50%;
flex-shrink: 0;
}
.service-pill .status-dot.operational {
box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(34, 197, 94, 0.2)', 'rgba(34, 197, 94, 0.3)')};
}
.manage-button {
display: inline-flex;
align-items: center;
gap: ${unsafeCSS(sharedStyles.spacing.xs)};
padding: ${unsafeCSS(sharedStyles.spacing.xs)} ${unsafeCSS(sharedStyles.spacing.md)};
background: transparent;
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
padding: 6px ${unsafeCSS(sharedStyles.spacing.md)};
background: ${sharedStyles.colors.background.card};
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
color: ${sharedStyles.colors.text.secondary};
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
}
.manage-button:hover {
border-color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
border-color: ${sharedStyles.colors.border.muted};
color: ${sharedStyles.colors.text.primary};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
transform: translateY(-1px);
}
.manage-button:active {
transform: translateY(0);
}
.expandable-section {
margin-top: ${unsafeCSS(sharedStyles.spacing.lg)};
overflow: hidden;
transition: all 0.3s ease;
animation: expandIn 0.3s ${unsafeCSS(sharedStyles.easings.default)};
}
@keyframes expandIn {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.expandable-content {
padding: ${unsafeCSS(sharedStyles.spacing.lg)};
background: ${cssManager.bdTheme('#fafafa', '#0a0a0a')};
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
background: ${sharedStyles.colors.background.secondary};
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
}
.assets-grid {
@@ -196,22 +241,40 @@ export class UplStatuspageAssetsselector extends DeesElement {
.asset-card {
display: flex;
align-items: center;
padding: ${unsafeCSS(sharedStyles.spacing.sm)} ${unsafeCSS(sharedStyles.spacing.md)};
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
padding: ${unsafeCSS(sharedStyles.spacing.md)};
background: ${sharedStyles.colors.background.card};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
border: 1px solid ${sharedStyles.colors.border.default};
gap: ${unsafeCSS(sharedStyles.spacing.sm)};
animation: cardFadeIn 0.3s ${unsafeCSS(sharedStyles.easings.default)} both;
}
@keyframes cardFadeIn {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.asset-card:hover {
border-color: ${cssManager.bdTheme('#d1d5db', '#3f3f46')};
border-color: ${sharedStyles.colors.border.muted};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
transform: translateY(-2px);
}
.asset-card.selected {
border-color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
background: ${cssManager.bdTheme('#f9fafb', '#0f0f0f')};
border-color: ${sharedStyles.colors.text.primary};
background: ${sharedStyles.colors.background.secondary};
}
.asset-card.selected:hover {
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
}
.asset-checkbox {
@@ -255,13 +318,24 @@ export class UplStatuspageAssetsselector extends DeesElement {
width: 8px;
height: 8px;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.full)};
flex-shrink: 0;
}
.status-indicator.operational, .status-dot.operational { background: #22c55e; }
.status-indicator.degraded, .status-dot.degraded { background: #fbbf24; }
.status-indicator.partial_outage, .status-dot.partial_outage { background: #f87171; }
.status-indicator.major_outage, .status-dot.major_outage { background: #ef4444; }
.status-indicator.maintenance, .status-dot.maintenance { background: #60a5fa; }
.status-indicator.operational, .status-dot.operational {
background: ${sharedStyles.colors.status.operational};
}
.status-indicator.degraded, .status-dot.degraded {
background: ${sharedStyles.colors.status.degraded};
}
.status-indicator.partial_outage, .status-dot.partial_outage {
background: ${sharedStyles.colors.status.partial};
}
.status-indicator.major_outage, .status-dot.major_outage {
background: ${sharedStyles.colors.status.major};
}
.status-indicator.maintenance, .status-dot.maintenance {
background: ${sharedStyles.colors.status.maintenance};
}
.status-text {
font-size: 12px;

View File

@@ -144,17 +144,33 @@ export class UplStatuspageFooter extends DeesElement {
}
.footer-link {
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
color: ${sharedStyles.colors.text.secondary};
text-decoration: none;
transition: color 0.15s ease;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
font-size: 13px;
font-weight: 400;
position: relative;
}
.footer-link::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
width: 0;
height: 1px;
background: ${sharedStyles.colors.text.primary};
transition: width ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.footer-link:hover {
color: ${sharedStyles.colors.text.primary};
}
.footer-link:hover::after {
width: 100%;
}
.footer-actions {
display: flex;
flex-direction: column;
@@ -164,25 +180,33 @@ export class UplStatuspageFooter extends DeesElement {
.action-button {
padding: 8px 16px;
height: 36px;
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
border-radius: 6px;
border: 1px solid ${sharedStyles.colors.border.default};
background: ${sharedStyles.colors.background.card};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
cursor: pointer;
text-align: center;
transition: all 0.15s ease;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
white-space: nowrap;
font-size: 13px;
font-weight: 400;
font-weight: 500;
color: ${sharedStyles.colors.text.primary};
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.action-button:hover {
background: ${cssManager.bdTheme('#f9fafb', '#18181b')};
border-color: ${cssManager.bdTheme('#d1d5db', '#3f3f46')};
background: ${sharedStyles.colors.background.secondary};
border-color: ${sharedStyles.colors.border.muted};
transform: translateY(-1px);
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
}
.action-button:active {
transform: translateY(0);
box-shadow: none;
}
.footer-bottom {
@@ -203,7 +227,7 @@ export class UplStatuspageFooter extends DeesElement {
.social-links {
display: flex;
gap: ${unsafeCSS(sharedStyles.spacing.md)};
gap: ${unsafeCSS(sharedStyles.spacing.sm)};
align-items: center;
}
@@ -211,22 +235,35 @@ export class UplStatuspageFooter extends DeesElement {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 6px;
transition: all 0.15s ease;
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
width: 34px;
height: 34px;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
color: ${sharedStyles.colors.text.muted};
border: 1px solid transparent;
}
.social-link:hover {
color: ${sharedStyles.colors.text.primary};
background: ${cssManager.bdTheme('#f3f4f6', '#27272a')};
background: ${sharedStyles.colors.background.secondary};
border-color: ${sharedStyles.colors.border.default};
transform: translateY(-2px);
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
}
.social-link:active {
transform: translateY(0);
}
.social-link svg {
width: 16px;
height: 16px;
fill: currentColor;
transition: transform ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.social-link:hover svg {
transform: scale(1.1);
}
.copyright {
@@ -241,20 +278,37 @@ export class UplStatuspageFooter extends DeesElement {
.powered-by {
font-size: 12px;
color: ${cssManager.bdTheme('#9ca3af', '#71717a')};
color: ${sharedStyles.colors.text.muted};
text-align: right;
}
.powered-by a {
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
color: ${sharedStyles.colors.text.secondary};
text-decoration: none;
transition: color 0.15s ease;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
font-weight: 500;
position: relative;
}
.powered-by a::after {
content: '';
position: absolute;
bottom: -1px;
left: 0;
width: 0;
height: 1px;
background: ${sharedStyles.colors.text.primary};
transition: width ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.powered-by a:hover {
color: ${sharedStyles.colors.text.primary};
}
.powered-by a:hover::after {
width: 100%;
}
.status-update {
padding: 12px 16px;
background: ${cssManager.bdTheme('#f9fafb', '#18181b')};

View File

@@ -40,15 +40,21 @@ export class UplStatuspageHeader extends DeesElement {
css`
:host {
display: block;
background: ${sharedStyles.colors.background.primary};
background: ${cssManager.bdTheme(
'rgba(255, 255, 255, 0.85)',
'rgba(9, 9, 11, 0.85)'
)};
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
color: ${sharedStyles.colors.text.primary};
border-bottom: 1px solid ${sharedStyles.colors.border.default};
border-bottom: 1px solid ${cssManager.bdTheme(
'rgba(0, 0, 0, 0.06)',
'rgba(255, 255, 255, 0.06)'
)};
position: sticky;
top: 0;
z-index: 40;
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(16px) saturate(180%);
-webkit-backdrop-filter: blur(16px) saturate(180%);
}
.header-container {
@@ -67,7 +73,7 @@ export class UplStatuspageHeader extends DeesElement {
.header-left {
display: flex;
align-items: center;
gap: ${unsafeCSS(sharedStyles.spacing.lg)};
gap: ${unsafeCSS(sharedStyles.spacing.md)};
}
.header-actions {
@@ -84,26 +90,47 @@ export class UplStatuspageHeader extends DeesElement {
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
cursor: pointer;
user-select: none;
transition: all ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
height: 36px;
background: transparent;
border: 1px solid ${sharedStyles.colors.border.default};
color: ${sharedStyles.colors.text.primary};
letter-spacing: -0.01em;
position: relative;
overflow: hidden;
}
.actionButton::before {
content: '';
position: absolute;
inset: 0;
background: ${cssManager.bdTheme(
'linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%)',
'linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%)'
)};
opacity: 0;
transition: opacity ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.actionButton:hover {
background: ${sharedStyles.colors.background.secondary};
border-color: ${sharedStyles.colors.border.muted};
box-shadow: ${unsafeCSS(sharedStyles.shadows.xs)};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
transform: translateY(-1px);
}
.actionButton:hover::before {
opacity: 1;
}
.actionButton:active {
transform: scale(0.98);
transform: translateY(0) scale(0.98);
transition-duration: ${unsafeCSS(sharedStyles.durations.fast)};
box-shadow: none;
}
.actionButton:focus-visible {
@@ -111,22 +138,40 @@ export class UplStatuspageHeader extends DeesElement {
outline-offset: 2px;
}
/* Button icon styles */
.actionButton svg {
width: 14px;
height: 14px;
flex-shrink: 0;
transition: transform ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.actionButton:hover svg {
transform: scale(1.1);
}
.site-title {
font-size: 18px;
font-size: 17px;
font-weight: 600;
letter-spacing: -0.02em;
color: ${sharedStyles.colors.text.primary};
transition: color ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.site-title:hover {
color: ${sharedStyles.colors.text.secondary};
}
.logo {
height: 28px;
width: auto;
filter: ${cssManager.bdTheme('none', 'brightness(0) invert(1)')};
transition: opacity ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
transition: all ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
}
.logo:hover {
opacity: 0.8;
transform: scale(1.02);
}
.page-info {
@@ -154,11 +199,16 @@ export class UplStatuspageHeader extends DeesElement {
background: ${sharedStyles.colors.accent.primary};
color: ${sharedStyles.colors.background.primary};
border-color: transparent;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.actionButton.primary::before {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
}
.actionButton.primary:hover {
background: ${sharedStyles.colors.accent.hover};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
}
.loading-skeleton {
@@ -177,10 +227,10 @@ export class UplStatuspageHeader extends DeesElement {
'linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.04) 50%, transparent 100%)',
'linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%)'
)};
animation: loading 1.5s ${unsafeCSS(sharedStyles.easings.default)} infinite;
animation: shimmer 1.5s ${unsafeCSS(sharedStyles.easings.default)} infinite;
}
@keyframes loading {
@keyframes shimmer {
0% { transform: translateX(-100%); }
100% { transform: translateX(200%); }
}
@@ -195,11 +245,11 @@ export class UplStatuspageHeader extends DeesElement {
}
.header-left {
gap: ${unsafeCSS(sharedStyles.spacing.md)};
gap: ${unsafeCSS(sharedStyles.spacing.sm)};
}
.site-title {
font-size: 16px;
font-size: 15px;
}
.logo {
@@ -210,8 +260,18 @@ export class UplStatuspageHeader extends DeesElement {
@media (max-width: 640px) {
.actionButton {
font-size: 12px;
padding: 0 12px;
padding: 0 10px;
height: 32px;
gap: 4px;
}
.actionButton svg {
width: 12px;
height: 12px;
}
.actionButton .button-text {
display: none;
}
.page-title {
@@ -249,12 +309,21 @@ export class UplStatuspageHeader extends DeesElement {
<div class="header-actions">
${this.showReportButton ? html`
<button class="actionButton" @click=${this.dispatchReportNewIncident}>
Report Issue
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M7.86 2h8.28L22 7.86v8.28L16.14 22H7.86L2 16.14V7.86L7.86 2z"></path>
<line x1="12" y1="8" x2="12" y2="12"></line>
<line x1="12" y1="16" x2="12.01" y2="16"></line>
</svg>
<span class="button-text">Report Issue</span>
</button>
` : ''}
${this.showSubscribeButton ? html`
<button class="actionButton primary" @click=${this.dispatchStatusSubscribe}>
Subscribe
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"></path>
<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"></path>
</svg>
<span class="button-text">Subscribe</span>
</button>
` : ''}
</div>

View File

@@ -108,36 +108,79 @@ export class UplStatuspageIncidents extends DeesElement {
background: ${sharedStyles.colors.background.card};
padding: ${unsafeCSS(sharedStyles.spacing.xl)};
margin-bottom: ${unsafeCSS(sharedStyles.spacing.lg)};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.md)};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
border: 1px solid ${sharedStyles.colors.border.default};
text-align: center;
color: ${sharedStyles.colors.text.secondary};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
animation: fadeInUp 0.4s ${unsafeCSS(sharedStyles.easings.default)} both;
}
/* Staggered entrance animations */
.incident-card {
background: ${sharedStyles.colors.background.card};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.md)};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
margin-bottom: ${unsafeCSS(sharedStyles.spacing.lg)};
overflow: hidden;
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
border: 1px solid ${sharedStyles.colors.border.default};
transition: all 0.2s ease;
transition: all ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
animation: fadeInUp 0.4s ${unsafeCSS(sharedStyles.easings.default)} both;
}
.incident-card:nth-child(1) { animation-delay: 0ms; }
.incident-card:nth-child(2) { animation-delay: 50ms; }
.incident-card:nth-child(3) { animation-delay: 100ms; }
.incident-card:nth-child(4) { animation-delay: 150ms; }
.incident-card:nth-child(5) { animation-delay: 200ms; }
.incident-card:hover {
transform: translateY(-2px);
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
border-color: ${sharedStyles.colors.border.muted};
}
.incident-card.expanded {
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
box-shadow: ${unsafeCSS(sharedStyles.shadows.lg)};
}
/* Active incident pulse effect */
.incident-card.active-incident {
animation: fadeInUp 0.4s ${unsafeCSS(sharedStyles.easings.default)} both,
incident-pulse 3s ease-in-out infinite;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes incident-pulse {
0%, 100% {
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
}
50% {
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)},
0 0 0 2px ${cssManager.bdTheme('rgba(239, 68, 68, 0.15)', 'rgba(248, 113, 113, 0.2)')};
}
}
.incident-header {
padding: ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.lg)};
padding: ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.xl)};
border-left: 4px solid;
display: flex;
align-items: start;
justify-content: space-between;
gap: ${unsafeCSS(sharedStyles.spacing.md)};
cursor: pointer;
transition: background-color 0.2s ease;
transition: background-color ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
position: relative;
}
.incident-header:hover {
@@ -161,10 +204,11 @@ export class UplStatuspageIncidents extends DeesElement {
}
.incident-title {
font-size: 18px;
font-size: 17px;
font-weight: 600;
margin: 0;
line-height: 1.3;
line-height: 1.4;
letter-spacing: -0.01em;
}
.incident-meta {
@@ -176,17 +220,24 @@ export class UplStatuspageIncidents extends DeesElement {
flex-wrap: wrap;
}
.incident-meta span {
display: flex;
align-items: center;
gap: 4px;
}
.incident-status {
display: inline-flex;
align-items: center;
gap: ${unsafeCSS(sharedStyles.spacing.xs)};
padding: ${unsafeCSS(sharedStyles.spacing.xs)} ${unsafeCSS(sharedStyles.spacing.md)};
gap: 6px;
padding: 6px 12px;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.full)};
font-size: 12px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.02em;
letter-spacing: 0.04em;
flex-shrink: 0;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.incident-status.investigating {
@@ -214,68 +265,164 @@ export class UplStatuspageIncidents extends DeesElement {
color: ${cssManager.bdTheme('#4b5563', '#d1d5db')};
}
/* Pulse for investigating status */
.incident-status.investigating .status-dot {
animation: status-pulse 1.5s ease-in-out infinite;
}
@keyframes status-pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.6; transform: scale(1.2); }
}
.incident-body {
padding: 0 ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.lg)};
padding: 0 ${unsafeCSS(sharedStyles.spacing.xl)} ${unsafeCSS(sharedStyles.spacing.xl)} ${unsafeCSS(sharedStyles.spacing.xl)};
animation: slideDown 0.3s ${unsafeCSS(sharedStyles.easings.default)};
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.incident-impact {
margin: ${unsafeCSS(sharedStyles.spacing.md)} 0;
padding: ${unsafeCSS(sharedStyles.spacing.md)};
padding: ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.lg)};
background: ${sharedStyles.colors.background.secondary};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
font-size: 14px;
line-height: 1.6;
border-left: 3px solid ${sharedStyles.colors.border.muted};
}
.affected-services {
margin-top: ${unsafeCSS(sharedStyles.spacing.md)};
margin-top: ${unsafeCSS(sharedStyles.spacing.lg)};
}
.affected-services-title {
font-size: 13px;
font-size: 12px;
font-weight: 600;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.sm)};
color: ${sharedStyles.colors.text.primary};
color: ${sharedStyles.colors.text.secondary};
text-transform: uppercase;
letter-spacing: 0.04em;
}
.service-tag {
display: inline-block;
padding: ${unsafeCSS(sharedStyles.spacing.xs)} ${unsafeCSS(sharedStyles.spacing.sm)};
padding: 4px 10px;
margin: 2px;
background: ${sharedStyles.colors.background.muted};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.sm)};
font-size: 12px;
color: ${sharedStyles.colors.text.secondary};
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.service-tag:hover {
background: ${sharedStyles.colors.background.secondary};
color: ${sharedStyles.colors.text.primary};
}
/* Timeline visualization for updates */
.incident-updates {
margin-top: ${unsafeCSS(sharedStyles.spacing.lg)};
margin-top: ${unsafeCSS(sharedStyles.spacing.xl)};
border-top: 1px solid ${sharedStyles.colors.border.default};
padding-top: ${unsafeCSS(sharedStyles.spacing.lg)};
}
.updates-title {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
margin: 0 0 ${unsafeCSS(sharedStyles.spacing.lg)} 0;
color: ${sharedStyles.colors.text.secondary};
}
.timeline {
position: relative;
padding-left: 24px;
}
/* Vertical connector line */
.timeline::before {
content: '';
position: absolute;
left: 5px;
top: 8px;
bottom: 8px;
width: 2px;
background: ${cssManager.bdTheme(
'linear-gradient(to bottom, #e5e7eb 0%, #d1d5db 50%, #e5e7eb 100%)',
'linear-gradient(to bottom, #27272a 0%, #3f3f46 50%, #27272a 100%)'
)};
border-radius: 1px;
}
.update-item {
position: relative;
padding-left: ${unsafeCSS(sharedStyles.spacing.lg)};
margin-bottom: ${unsafeCSS(sharedStyles.spacing.md)};
padding-bottom: ${unsafeCSS(sharedStyles.spacing.lg)};
animation: fadeInUp 0.3s ${unsafeCSS(sharedStyles.easings.default)} both;
}
.update-item:last-child {
padding-bottom: 0;
}
/* Timeline dot */
.update-item::before {
content: '';
position: absolute;
left: 0;
top: 6px;
width: 8px;
height: 8px;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.full)};
background: ${sharedStyles.colors.border.muted};
left: -22px;
top: 4px;
width: 12px;
height: 12px;
border-radius: 50%;
background: ${sharedStyles.colors.background.card};
border: 2px solid ${sharedStyles.colors.border.muted};
z-index: 1;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.update-item:first-child::before {
border-color: ${sharedStyles.colors.status.operational};
background: ${sharedStyles.colors.status.operational};
box-shadow: 0 0 0 3px ${cssManager.bdTheme('rgba(22, 163, 74, 0.15)', 'rgba(34, 197, 94, 0.2)')};
}
.update-item:hover::before {
transform: scale(1.2);
border-color: ${sharedStyles.colors.text.secondary};
}
.update-time {
font-size: 12px;
color: ${sharedStyles.colors.text.secondary};
margin-bottom: ${unsafeCSS(sharedStyles.spacing.xs)};
font-size: 11px;
color: ${sharedStyles.colors.text.muted};
margin-bottom: 4px;
font-family: ${unsafeCSS(sharedStyles.fonts.mono)};
display: flex;
align-items: center;
gap: 8px;
}
.update-status-badge {
display: inline-flex;
padding: 2px 6px;
border-radius: 4px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.02em;
background: ${sharedStyles.colors.background.muted};
color: ${sharedStyles.colors.text.secondary};
}
.update-message {
@@ -286,9 +433,11 @@ export class UplStatuspageIncidents extends DeesElement {
.update-author {
font-size: 12px;
color: ${sharedStyles.colors.text.secondary};
margin-top: ${unsafeCSS(sharedStyles.spacing.xs)};
font-style: italic;
color: ${sharedStyles.colors.text.muted};
margin-top: 4px;
display: flex;
align-items: center;
gap: 4px;
}
.loading-skeleton {
@@ -298,33 +447,34 @@ export class UplStatuspageIncidents extends DeesElement {
'linear-gradient(90deg, #1f1f1f 25%, #262626 50%, #1f1f1f 75%)'
)};
background-size: 200% 100%;
animation: loading 1.5s infinite;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.md)};
animation: shimmer 1.5s infinite;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
margin-bottom: ${unsafeCSS(sharedStyles.spacing.lg)};
}
@keyframes loading {
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
.show-more {
text-align: center;
margin-top: ${unsafeCSS(sharedStyles.spacing.lg)};
margin-top: ${unsafeCSS(sharedStyles.spacing.xl)};
}
.show-more-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: ${unsafeCSS(sharedStyles.spacing.sm)} ${unsafeCSS(sharedStyles.spacing.lg)};
gap: 8px;
padding: 10px 20px;
background: transparent;
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s ease;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
color: ${sharedStyles.colors.text.primary};
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
}
@@ -332,7 +482,8 @@ export class UplStatuspageIncidents extends DeesElement {
.show-more-button:hover {
background: ${sharedStyles.colors.background.secondary};
border-color: ${sharedStyles.colors.border.muted};
transform: translateY(-1px);
transform: translateY(-2px);
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
}
.show-more-button:active {
@@ -351,15 +502,15 @@ export class UplStatuspageIncidents extends DeesElement {
.subscribe-button {
display: inline-flex;
align-items: center;
gap: ${unsafeCSS(sharedStyles.spacing.xs)};
padding: ${unsafeCSS(sharedStyles.spacing.xs)} ${unsafeCSS(sharedStyles.spacing.md)};
gap: 6px;
padding: 8px 14px;
background: transparent;
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
cursor: pointer;
font-size: 13px;
font-weight: 400;
transition: all 0.2s ease;
font-weight: 500;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
color: ${sharedStyles.colors.text.primary};
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
}
@@ -367,6 +518,7 @@ export class UplStatuspageIncidents extends DeesElement {
.subscribe-button:hover {
background: ${sharedStyles.colors.background.secondary};
border-color: ${sharedStyles.colors.border.muted};
transform: translateY(-1px);
}
.subscribe-button.subscribed {
@@ -387,6 +539,15 @@ export class UplStatuspageIncidents extends DeesElement {
opacity: 0.8;
}
/* Expand icon animation */
.expand-icon {
transition: transform ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
}
.expand-icon.rotated {
transform: rotate(180deg);
}
@media (max-width: 640px) {
.container {
padding: 0 ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)};
@@ -396,10 +557,28 @@ export class UplStatuspageIncidents extends DeesElement {
padding: ${unsafeCSS(sharedStyles.spacing.md)};
}
.incident-body {
padding: 0 ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)};
}
.incident-meta {
flex-direction: column;
gap: ${unsafeCSS(sharedStyles.spacing.xs)};
}
.timeline {
padding-left: 20px;
}
.timeline::before {
left: 4px;
}
.update-item::before {
left: -18px;
width: 10px;
height: 10px;
}
}
`,
];
@@ -442,8 +621,10 @@ export class UplStatuspageIncidents extends DeesElement {
this.formatDuration(incident.endTime - incident.startTime) :
this.formatDuration(Date.now() - incident.startTime);
const isActive = isCurrent && latestUpdate?.status !== 'resolved';
return html`
<div class="incident-card ${this.expandedIncidents.has(incident.id) ? 'expanded' : ''}">
<div class="incident-card ${this.expandedIncidents.has(incident.id) ? 'expanded' : ''} ${isActive ? 'active-incident' : ''}">
<div class="incident-header ${incident.severity}" @click=${() => this.toggleIncident(incident.id)}>
<div>
<h3 class="incident-title">${incident.title}</h3>
@@ -520,8 +701,10 @@ export class UplStatuspageIncidents extends DeesElement {
${incident.updates.length > 0 ? html`
<div class="incident-updates">
<h4 style="font-size: 14px; margin: 0 0 12px 0;">Updates</h4>
${incident.updates.slice(-3).reverse().map(update => this.renderUpdate(update))}
<h4 class="updates-title">Updates</h4>
<div class="timeline">
${incident.updates.slice(-3).reverse().map((update, index) => this.renderUpdate(update, index))}
</div>
</div>
` : ''}
@@ -571,25 +754,33 @@ export class UplStatuspageIncidents extends DeesElement {
`;
}
private renderUpdate(update: any): TemplateResult {
private renderUpdate(update: any, index: number = 0): TemplateResult {
return html`
<div class="update-item">
<div class="update-time">${this.formatDate(update.timestamp)}</div>
<div class="update-item" style="animation-delay: ${index * 50}ms">
<div class="update-time">
${this.formatDate(update.timestamp)}
${update.status ? html`<span class="update-status-badge">${update.status}</span>` : ''}
</div>
<div class="update-message">${update.message}</div>
${update.author ? html`
<div class="update-author">${update.author}</div>
<div class="update-author">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle>
</svg>
${update.author}
</div>
` : ''}
</div>
`;
}
private getStatusIcon(status: string): TemplateResult {
return html`<span style="
return html`<span class="status-dot" style="
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
margin-right: 4px;
background: ${status === 'resolved' ? sharedStyles.colors.status.operational :
status === 'monitoring' ? sharedStyles.colors.status.maintenance :
status === 'identified' ? sharedStyles.colors.status.degraded :

View File

@@ -76,66 +76,170 @@ export class UplStatuspageStatsgrid extends DeesElement {
}
.stat-card {
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
background: ${sharedStyles.colors.background.card};
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
padding: ${unsafeCSS(sharedStyles.spacing.lg)};
transition: all 0.2s ease;
transition: all ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
position: relative;
overflow: hidden;
animation: fadeInUp 0.4s ${unsafeCSS(sharedStyles.easings.default)} both;
}
.stat-card:nth-child(1) { animation-delay: 0ms; }
.stat-card:nth-child(2) { animation-delay: 50ms; }
.stat-card:nth-child(3) { animation-delay: 100ms; }
.stat-card:nth-child(4) { animation-delay: 150ms; }
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(12px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Status-colored top accent */
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: ${sharedStyles.colors.border.muted};
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.stat-card.status-card::before {
background: ${sharedStyles.colors.status.operational};
}
.stat-card.status-card.degraded::before {
background: ${sharedStyles.colors.status.degraded};
}
.stat-card.status-card.partial_outage::before {
background: ${sharedStyles.colors.status.partial};
}
.stat-card.status-card.major_outage::before {
background: ${sharedStyles.colors.status.major};
}
.stat-card.status-card.maintenance::before {
background: ${sharedStyles.colors.status.maintenance};
}
.stat-card.uptime-card::before {
background: ${sharedStyles.colors.status.operational};
}
.stat-card.response-card::before {
background: ${sharedStyles.colors.status.maintenance};
}
.stat-card.incident-card::before {
background: ${sharedStyles.colors.status.partial};
}
.stat-card:hover {
border-color: ${cssManager.bdTheme('#d1d5db', '#3f3f46')};
box-shadow: ${cssManager.bdTheme(
'0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
'0 0 0 1px rgba(255, 255, 255, 0.1)'
)};
border-color: ${sharedStyles.colors.border.muted};
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
transform: translateY(-3px);
}
.stat-card:hover::before {
height: 4px;
}
.stat-label {
font-size: 12px;
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
font-size: 11px;
color: ${sharedStyles.colors.text.muted};
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 500;
letter-spacing: 0.06em;
font-weight: 600;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.sm)};
display: flex;
align-items: center;
gap: ${unsafeCSS(sharedStyles.spacing.xs)};
gap: 6px;
}
.stat-label svg {
width: 14px;
height: 14px;
opacity: 0.7;
}
.stat-value {
font-size: 24px;
font-weight: 600;
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
font-size: 28px;
font-weight: 700;
color: ${sharedStyles.colors.text.primary};
font-variant-numeric: tabular-nums;
line-height: 1.2;
letter-spacing: -0.02em;
transition: transform ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
}
.stat-card:hover .stat-value {
transform: scale(1.02);
}
.stat-unit {
font-size: 14px;
font-weight: 400;
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
margin-left: 4px;
font-size: 16px;
font-weight: 500;
color: ${sharedStyles.colors.text.secondary};
margin-left: 2px;
}
.stat-change {
font-size: 12px;
margin-top: ${unsafeCSS(sharedStyles.spacing.xs)};
margin-top: ${unsafeCSS(sharedStyles.spacing.sm)};
display: flex;
align-items: center;
gap: 4px;
padding: 4px 8px;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.sm)};
width: fit-content;
}
.stat-change.positive {
color: ${cssManager.bdTheme('#10b981', '#10b981')};
color: ${sharedStyles.colors.status.operational};
background: ${cssManager.bdTheme('rgba(22, 163, 74, 0.08)', 'rgba(34, 197, 94, 0.12)')};
}
.stat-change.negative {
color: ${cssManager.bdTheme('#ef4444', '#ef4444')};
color: ${sharedStyles.colors.status.partial};
background: ${cssManager.bdTheme('rgba(239, 68, 68, 0.08)', 'rgba(248, 113, 113, 0.12)')};
}
.stat-change.neutral {
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
color: ${sharedStyles.colors.text.muted};
background: ${sharedStyles.colors.background.muted};
}
/* Status text color variations */
.stat-value.operational {
color: ${sharedStyles.colors.status.operational};
}
.stat-value.degraded {
color: ${sharedStyles.colors.status.degraded};
}
.stat-value.partial_outage {
color: ${sharedStyles.colors.status.partial};
}
.stat-value.major_outage {
color: ${sharedStyles.colors.status.major};
}
.stat-value.maintenance {
color: ${sharedStyles.colors.status.maintenance};
}
.loading-skeleton {
@@ -145,61 +249,102 @@ export class UplStatuspageStatsgrid extends DeesElement {
}
.skeleton-card {
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
background: ${sharedStyles.colors.background.card};
border: 1px solid ${sharedStyles.colors.border.default};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
padding: ${unsafeCSS(sharedStyles.spacing.lg)};
height: 100px;
height: 110px;
position: relative;
overflow: hidden;
}
.skeleton-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: ${sharedStyles.colors.background.muted};
}
.skeleton-label {
height: 14px;
height: 12px;
width: 80px;
background: ${cssManager.bdTheme('#f3f4f6', '#27272a')};
background: ${sharedStyles.colors.background.muted};
border-radius: 4px;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.sm)};
animation: pulse 2s infinite;
animation: shimmer 1.5s infinite;
}
.skeleton-value {
height: 28px;
width: 120px;
background: ${cssManager.bdTheme('#f3f4f6', '#27272a')};
border-radius: 4px;
animation: pulse 2s infinite;
height: 32px;
width: 100px;
background: ${sharedStyles.colors.background.muted};
border-radius: 6px;
animation: shimmer 1.5s infinite;
animation-delay: 0.1s;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
.skeleton-change {
height: 20px;
width: 70px;
background: ${sharedStyles.colors.background.muted};
border-radius: 4px;
margin-top: ${unsafeCSS(sharedStyles.spacing.sm)};
animation: shimmer 1.5s infinite;
animation-delay: 0.2s;
}
@keyframes shimmer {
0% { opacity: 0.5; }
50% { opacity: 1; }
100% { opacity: 0.5; }
}
.status-indicator {
display: inline-block;
width: 6px;
height: 6px;
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
.status-indicator.operational {
background: ${sharedStyles.colors.status.operational};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(22, 163, 74, 0.2)', 'rgba(34, 197, 94, 0.25)')};
animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
0%, 100% { box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(22, 163, 74, 0.2)', 'rgba(34, 197, 94, 0.25)')}; }
50% { box-shadow: 0 0 0 4px ${cssManager.bdTheme('rgba(22, 163, 74, 0.1)', 'rgba(34, 197, 94, 0.15)')}; }
}
.status-indicator.degraded {
background: ${sharedStyles.colors.status.degraded};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(217, 119, 6, 0.2)', 'rgba(251, 191, 36, 0.25)')};
}
.status-indicator.partial_outage {
background: ${sharedStyles.colors.status.partial};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(239, 68, 68, 0.2)', 'rgba(248, 113, 113, 0.25)')};
}
.status-indicator.major_outage {
background: ${sharedStyles.colors.status.major};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(185, 28, 28, 0.2)', 'rgba(239, 68, 68, 0.25)')};
animation: majorPulse 1s ease-in-out infinite;
}
@keyframes majorPulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.6; }
}
.status-indicator.maintenance {
background: ${sharedStyles.colors.status.maintenance};
box-shadow: 0 0 0 2px ${cssManager.bdTheme('rgba(37, 99, 235, 0.2)', 'rgba(96, 165, 250, 0.25)')};
}
@media (max-width: 640px) {
@@ -208,7 +353,7 @@ export class UplStatuspageStatsgrid extends DeesElement {
}
.stats-grid {
grid-template-columns: 1fr;
grid-template-columns: repeat(2, 1fr);
gap: ${unsafeCSS(sharedStyles.spacing.sm)};
}
@@ -217,7 +362,16 @@ export class UplStatuspageStatsgrid extends DeesElement {
}
.stat-value {
font-size: 20px;
font-size: 22px;
}
.stat-label {
font-size: 10px;
}
.stat-label svg {
width: 12px;
height: 12px;
}
}
`,
@@ -237,18 +391,23 @@ export class UplStatuspageStatsgrid extends DeesElement {
</div>
` : html`
<div class="stats-grid">
<div class="stat-card">
<div class="stat-card status-card ${this.currentStatus}">
<div class="stat-label">
<span class="status-indicator ${this.currentStatus}"></span>
Current Status
</div>
<div class="stat-value">
<div class="stat-value ${this.currentStatus}">
${this.formatStatus(this.currentStatus)}
</div>
</div>
<div class="stat-card">
<div class="stat-label">Uptime</div>
<div class="stat-card uptime-card">
<div class="stat-label">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
</svg>
Uptime
</div>
<div class="stat-value">
${this.uptime.toFixed(2)}<span class="stat-unit">%</span>
</div>
@@ -257,16 +416,29 @@ export class UplStatuspageStatsgrid extends DeesElement {
</div>
</div>
<div class="stat-card">
<div class="stat-label">Avg Response Time</div>
<div class="stat-card response-card">
<div class="stat-label">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
Avg Response
</div>
<div class="stat-value">
${this.avgResponseTime}<span class="stat-unit">ms</span>
</div>
${this.renderResponseChange()}
</div>
<div class="stat-card">
<div class="stat-label">Incidents</div>
<div class="stat-card incident-card">
<div class="stat-label">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path>
<line x1="12" y1="9" x2="12" y2="13"></line>
<line x1="12" y1="17" x2="12.01" y2="17"></line>
</svg>
Incidents
</div>
<div class="stat-value">
${this.totalIncidents}
</div>

View File

@@ -54,22 +54,32 @@ export class UplStatuspageStatusbar extends DeesElement {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 64px;
padding: ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.lg)};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
min-height: 72px;
padding: ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.xl)};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.xl)};
cursor: default;
transition: all ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
transition: all ${unsafeCSS(sharedStyles.durations.slow)} ${unsafeCSS(sharedStyles.easings.default)};
position: relative;
overflow: hidden;
font-weight: 500;
font-size: 15px;
letter-spacing: -0.01em;
background: ${sharedStyles.colors.background.card};
border: 1px solid ${sharedStyles.colors.border.default};
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
}
/* Gradient background overlay */
.statusbar-inner::before {
content: '';
position: absolute;
inset: 0;
opacity: 1;
transition: opacity ${unsafeCSS(sharedStyles.durations.slow)} ${unsafeCSS(sharedStyles.easings.default)};
z-index: 0;
}
/* Left accent border */
.statusbar-inner::after {
content: '';
position: absolute;
left: 0;
@@ -77,31 +87,72 @@ export class UplStatuspageStatusbar extends DeesElement {
bottom: 0;
width: 4px;
transition: background ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
z-index: 1;
}
/* Operational - green gradient */
.statusbar-inner.operational {
background: ${sharedStyles.colors.background.card};
}
.statusbar-inner.operational::before {
background: ${sharedStyles.statusGradients.operational};
}
.statusbar-inner.operational::after {
background: ${sharedStyles.colors.status.operational};
}
/* Degraded - yellow/amber gradient */
.statusbar-inner.degraded {
background: ${sharedStyles.colors.background.card};
}
.statusbar-inner.degraded::before {
background: ${sharedStyles.statusGradients.degraded};
}
.statusbar-inner.degraded::after {
background: ${sharedStyles.colors.status.degraded};
}
/* Partial outage - orange/red gradient */
.statusbar-inner.partial_outage {
background: ${sharedStyles.colors.background.card};
}
.statusbar-inner.partial_outage::before {
background: ${sharedStyles.statusGradients.partial};
}
.statusbar-inner.partial_outage::after {
background: ${sharedStyles.colors.status.partial};
}
/* Major outage - red gradient */
.statusbar-inner.major_outage {
background: ${sharedStyles.colors.background.card};
}
.statusbar-inner.major_outage::before {
background: ${sharedStyles.statusGradients.major};
}
.statusbar-inner.major_outage::after {
background: ${sharedStyles.colors.status.major};
}
/* Maintenance - blue gradient */
.statusbar-inner.maintenance {
background: ${sharedStyles.colors.background.card};
}
.statusbar-inner.maintenance::before {
background: ${sharedStyles.statusGradients.maintenance};
}
.statusbar-inner.maintenance::after {
background: ${sharedStyles.colors.status.maintenance};
}
.statusbar-inner:hover {
border-color: ${sharedStyles.colors.border.muted};
box-shadow: ${unsafeCSS(sharedStyles.shadows.base)};
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
transform: translateY(-1px);
}
.statusbar-inner:hover::before {
opacity: 1.2;
}
.status-indicator {

View File

@@ -73,6 +73,12 @@ export class UplStatuspageStatusdetails extends DeesElement {
.graph-container {
position: relative;
animation: fadeIn 0.3s ${unsafeCSS(sharedStyles.easings.default)};
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.mainbox {
@@ -98,14 +104,29 @@ export class UplStatuspageStatusdetails extends DeesElement {
flex: 1;
height: 100%;
cursor: pointer;
transition: all 0.15s ease;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
position: relative;
border-radius: 2px;
border-radius: 3px;
animation: barGrow 0.4s ${unsafeCSS(sharedStyles.easings.default)} both;
animation-delay: calc(var(--bar-index, 0) * 8ms);
transform-origin: bottom;
}
@keyframes barGrow {
from {
transform: scaleY(0);
opacity: 0;
}
to {
transform: scaleY(1);
opacity: 1;
}
}
.mainbox .barContainer .bar:hover {
transform: scaleY(1.1);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transform: scaleY(1.15);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
z-index: 1;
}
.mainbox .barContainer .bar.operational {
@@ -149,20 +170,23 @@ export class UplStatuspageStatusdetails extends DeesElement {
position: absolute;
background: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
color: ${cssManager.bdTheme('#fafafa', '#0a0a0a')};
padding: 6px 10px;
border-radius: 4px;
padding: 8px 12px;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
font-size: 11px;
pointer-events: none;
opacity: 0;
transition: opacity 0.15s;
transition: opacity ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)},
transform ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
z-index: 50;
white-space: nowrap;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
line-height: 1.4;
box-shadow: ${unsafeCSS(sharedStyles.shadows.lg)};
line-height: 1.5;
transform: translateY(4px);
}
.tooltip.visible {
opacity: 1;
transform: translateY(0);
}
.tooltip-time {
@@ -276,6 +300,7 @@ export class UplStatuspageStatusdetails extends DeesElement {
bars.push(html`
<div
class="bar ${status}"
style="--bar-index: ${i}"
@mouseenter=${(e: MouseEvent) => this.showTooltip(e, timestamp, status, responseTime)}
@click=${() => this.handleBarClick(timestamp, status, responseTime)}
></div>

View File

@@ -52,242 +52,402 @@ export class UplStatuspageStatusmonth extends DeesElement {
sharedStyles.commonStyles,
css`
:host {
position: relative;
display: block;
background: transparent;
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
color: ${sharedStyles.colors.text.primary};
}
position: relative;
display: block;
background: transparent;
font-family: ${unsafeCSS(sharedStyles.fonts.base)};
color: ${sharedStyles.colors.text.primary};
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.lg)};
}
.mainbox {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: ${unsafeCSS(sharedStyles.spacing.lg)};
}
/* Month card with entrance animation */
.statusMonth {
background: ${sharedStyles.colors.background.card};
padding: ${unsafeCSS(sharedStyles.spacing.lg)};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.lg)};
border: 1px solid ${sharedStyles.colors.border.default};
position: relative;
transition: all ${unsafeCSS(sharedStyles.durations.normal)} ${unsafeCSS(sharedStyles.easings.default)};
display: flex;
flex-direction: column;
min-height: 280px;
box-shadow: ${unsafeCSS(sharedStyles.shadows.sm)};
animation: fadeInUp 0.5s ${unsafeCSS(sharedStyles.easings.default)} both;
}
.statusMonth:nth-child(1) { animation-delay: 0ms; }
.statusMonth:nth-child(2) { animation-delay: 100ms; }
.statusMonth:nth-child(3) { animation-delay: 200ms; }
.statusMonth:nth-child(4) { animation-delay: 300ms; }
.statusMonth:nth-child(5) { animation-delay: 400ms; }
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.statusMonth:hover {
border-color: ${sharedStyles.colors.border.muted};
box-shadow: ${unsafeCSS(sharedStyles.shadows.md)};
transform: translateY(-2px);
}
.month-header {
font-size: 12px;
font-weight: 600;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.md)};
color: ${sharedStyles.colors.text.primary};
letter-spacing: 0.04em;
text-transform: uppercase;
display: flex;
align-items: center;
gap: 8px;
}
.month-header .current-badge {
font-size: 9px;
padding: 2px 6px;
background: ${sharedStyles.colors.status.operational};
color: white;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.full)};
font-weight: 500;
letter-spacing: 0.02em;
}
.days-container {
flex: 1;
display: flex;
flex-direction: column;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.lg)};
}
.days-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 4px;
width: 100%;
}
.weekday-label {
font-size: 9px;
text-align: center;
color: ${sharedStyles.colors.text.muted};
font-weight: 600;
height: 20px;
line-height: 20px;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.xs)};
text-transform: uppercase;
letter-spacing: 0.02em;
}
/* Calendar day cell */
.statusDay {
aspect-ratio: 1;
border-radius: 4px;
cursor: pointer;
transition: all ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
position: relative;
animation: dayFadeIn 0.3s ${unsafeCSS(sharedStyles.easings.default)} both;
animation-delay: calc(var(--day-index, 0) * 15ms);
}
@keyframes dayFadeIn {
from {
opacity: 0;
transform: scale(0.8);
}
to {
opacity: 1;
transform: scale(1);
}
}
.statusDay:hover:not(.empty) {
transform: scale(1.2);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
z-index: 2;
}
/* Current day highlight */
.statusDay.today {
box-shadow: 0 0 0 2px ${sharedStyles.colors.text.primary};
z-index: 1;
}
.statusDay.today:hover {
box-shadow: 0 0 0 2px ${sharedStyles.colors.text.primary}, 0 4px 8px rgba(0, 0, 0, 0.15);
}
/* Status colors with intensity variations based on uptime */
.statusDay.operational {
background: ${sharedStyles.colors.status.operational};
}
.statusDay.operational.uptime-high {
background: ${cssManager.bdTheme('#22c55e', '#22c55e')};
}
.statusDay.operational.uptime-mid {
background: ${cssManager.bdTheme('#4ade80', '#4ade80')};
}
.statusDay.degraded {
background: ${sharedStyles.colors.status.degraded};
}
.statusDay.partial_outage {
background: ${sharedStyles.colors.status.partial};
}
.statusDay.major_outage {
background: ${sharedStyles.colors.status.major};
animation: dayFadeIn 0.3s ${unsafeCSS(sharedStyles.easings.default)} both,
majorOutagePulse 2s ease-in-out infinite;
}
@keyframes majorOutagePulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.8; }
}
.statusDay.maintenance {
background: ${sharedStyles.colors.status.maintenance};
}
.statusDay.no-data {
background: ${sharedStyles.colors.background.muted};
opacity: 0.5;
}
.statusDay.empty {
background: transparent;
cursor: default;
pointer-events: none;
animation: none;
}
/* Incident count indicator */
.incident-count {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 8px;
font-weight: 700;
color: white;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
line-height: 1;
}
/* Overall uptime footer */
.overall-uptime {
font-size: 12px;
margin-top: auto;
padding-top: ${unsafeCSS(sharedStyles.spacing.md)};
color: ${sharedStyles.colors.text.secondary};
display: flex;
flex-direction: column;
gap: 8px;
border-top: 1px solid ${sharedStyles.colors.border.default};
}
.uptime-stat {
display: flex;
justify-content: space-between;
align-items: center;
}
.uptime-value {
font-weight: 600;
color: ${sharedStyles.colors.text.primary};
font-variant-numeric: tabular-nums;
font-size: 13px;
}
.uptime-value.good {
color: ${sharedStyles.colors.status.operational};
}
.uptime-value.warning {
color: ${sharedStyles.colors.status.degraded};
}
.uptime-value.bad {
color: ${sharedStyles.colors.status.partial};
}
/* Uptime bar visualization */
.uptime-bar {
height: 4px;
background: ${sharedStyles.colors.background.muted};
border-radius: 2px;
overflow: hidden;
margin-top: 4px;
}
.uptime-bar-fill {
height: 100%;
border-radius: 2px;
transition: width ${unsafeCSS(sharedStyles.durations.slow)} ${unsafeCSS(sharedStyles.easings.default)};
}
.uptime-bar-fill.good {
background: ${sharedStyles.colors.status.operational};
}
.uptime-bar-fill.warning {
background: ${sharedStyles.colors.status.degraded};
}
.uptime-bar-fill.bad {
background: ${sharedStyles.colors.status.partial};
}
/* Loading skeleton */
.loading-skeleton {
display: flex;
flex-direction: column;
gap: ${unsafeCSS(sharedStyles.spacing.sm)};
height: 100%;
}
.skeleton-header {
height: 20px;
width: 80px;
background: ${sharedStyles.colors.background.muted};
border-radius: 4px;
animation: shimmer 1.5s infinite;
}
.skeleton-grid {
flex: 1;
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 3px;
}
.skeleton-day {
background: ${sharedStyles.colors.background.muted};
border-radius: 3px;
animation: shimmer 1.5s infinite;
animation-delay: calc(var(--index) * 30ms);
}
@keyframes shimmer {
0% { opacity: 0.5; }
50% { opacity: 1; }
100% { opacity: 0.5; }
}
/* Tooltip */
.tooltip {
position: absolute;
background: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
color: ${cssManager.bdTheme('#fafafa', '#0a0a0a')};
padding: 10px 14px;
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
font-size: 12px;
pointer-events: none;
opacity: 0;
transition: opacity ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)},
transform ${unsafeCSS(sharedStyles.durations.fast)} ${unsafeCSS(sharedStyles.easings.default)};
z-index: 50;
white-space: nowrap;
box-shadow: ${unsafeCSS(sharedStyles.shadows.lg)};
line-height: 1.5;
transform: translateX(-50%) translateY(4px);
}
.tooltip.visible {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
.tooltip-date {
font-weight: 600;
margin-bottom: 6px;
font-size: 13px;
}
.tooltip-stat {
font-size: 11px;
opacity: 0.85;
display: flex;
align-items: center;
gap: 6px;
}
.tooltip-stat + .tooltip-stat {
margin-top: 2px;
}
.tooltip-uptime-bar {
height: 3px;
width: 60px;
background: rgba(128, 128, 128, 0.3);
border-radius: 2px;
overflow: hidden;
margin-top: 8px;
}
.tooltip-uptime-fill {
height: 100%;
border-radius: 2px;
}
.no-data-message {
grid-column: 1 / -1;
text-align: center;
padding: ${unsafeCSS(sharedStyles.spacing['2xl'])};
color: ${sharedStyles.colors.text.secondary};
animation: fadeInUp 0.4s ${unsafeCSS(sharedStyles.easings.default)} both;
}
@media (max-width: 640px) {
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.lg)} ${unsafeCSS(sharedStyles.spacing.lg)};
padding: 0 ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)};
}
.mainbox {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: ${unsafeCSS(sharedStyles.spacing.lg)};
grid-template-columns: 1fr;
gap: ${unsafeCSS(sharedStyles.spacing.md)};
}
.statusMonth {
background: ${cssManager.bdTheme('#ffffff', '#0a0a0a')};
padding: ${unsafeCSS(sharedStyles.spacing.lg)};
border-radius: ${unsafeCSS(sharedStyles.borderRadius.base)};
border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
position: relative;
transition: all 0.2s ease;
display: flex;
flex-direction: column;
min-height: 280px;
box-shadow: ${cssManager.bdTheme('0 1px 2px 0 rgba(0, 0, 0, 0.05)', 'none')};
}
.statusMonth:hover {
border-color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
box-shadow: ${cssManager.bdTheme('0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', '0 0 0 1px rgba(255, 255, 255, 0.1)')};
}
.month-header {
font-size: 13px;
font-weight: 600;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.md)};
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
letter-spacing: 0.02em;
text-transform: uppercase;
}
.days-container {
flex: 1;
display: flex;
flex-direction: column;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.lg)};
padding: ${unsafeCSS(sharedStyles.spacing.md)};
min-height: 260px;
}
.days-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 3px;
width: 100%;
}
.weekday-label {
font-size: 10px;
text-align: center;
color: ${cssManager.bdTheme('#9ca3af', '#71717a')};
font-weight: 500;
height: 20px;
line-height: 20px;
margin-bottom: ${unsafeCSS(sharedStyles.spacing.sm)};
text-transform: uppercase;
}
.statusDay {
aspect-ratio: 1;
border-radius: 4px;
cursor: pointer;
transition: all 0.15s ease;
position: relative;
}
.statusDay:hover:not(.empty) {
transform: scale(1.15);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
z-index: 1;
}
.statusDay.operational {
background: #22c55e;
}
.statusDay.degraded {
background: #fbbf24;
}
.statusDay.partial_outage {
background: #f87171;
}
.statusDay.major_outage {
background: #ef4444;
}
.statusDay.maintenance {
background: #60a5fa;
}
.statusDay.no-data {
background: ${cssManager.bdTheme('#e5e7eb', '#27272a')};
opacity: 0.6;
}
.statusDay.empty {
background: transparent;
cursor: default;
pointer-events: none;
}
.overall-uptime {
font-size: 12px;
margin-top: auto;
padding-top: ${unsafeCSS(sharedStyles.spacing.md)};
color: ${cssManager.bdTheme('#6b7280', '#a1a1aa')};
display: flex;
flex-direction: column;
gap: 6px;
border-top: 1px solid ${cssManager.bdTheme('#f3f4f6', '#1f1f1f')};
}
.uptime-stat {
display: flex;
justify-content: space-between;
align-items: center;
}
.uptime-value {
font-weight: 600;
color: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
font-variant-numeric: tabular-nums;
font-size: 13px;
transform: scale(1.1);
}
.loading-skeleton {
display: flex;
flex-direction: column;
gap: ${unsafeCSS(sharedStyles.spacing.sm)};
height: 100%;
}
.skeleton-header {
height: 20px;
width: 80px;
background: ${cssManager.bdTheme('#f3f4f6', '#27272a')};
border-radius: 4px;
animation: pulse 2s infinite;
}
.skeleton-grid {
flex: 1;
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 2px;
}
.skeleton-day {
background: ${cssManager.bdTheme('#f3f4f6', '#27272a')};
border-radius: 2px;
animation: pulse 2s infinite;
animation-delay: calc(var(--index) * 0.05s);
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
@keyframes loading {
0% { transform: translateX(-100%); }
100% { transform: translateX(200%); }
}
.tooltip {
position: absolute;
background: ${cssManager.bdTheme('#0a0a0a', '#fafafa')};
color: ${cssManager.bdTheme('#fafafa', '#0a0a0a')};
padding: 8px 12px;
border-radius: 4px;
font-size: 12px;
pointer-events: none;
opacity: 0;
transition: opacity 0.15s;
z-index: 50;
white-space: nowrap;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
line-height: 1.5;
}
.tooltip.visible {
opacity: 1;
}
.tooltip-date {
font-weight: 500;
margin-bottom: 4px;
}
.tooltip-stat {
font-size: 11px;
opacity: 0.9;
}
.no-data-message {
grid-column: 1 / -1;
text-align: center;
padding: ${unsafeCSS(sharedStyles.spacing['2xl'])};
color: ${sharedStyles.colors.text.secondary};
}
@media (max-width: 640px) {
.container {
padding: 0 ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)} ${unsafeCSS(sharedStyles.spacing.md)};
}
.mainbox {
grid-template-columns: 1fr;
gap: ${unsafeCSS(sharedStyles.spacing.md)};
}
.statusMonth {
padding: ${unsafeCSS(sharedStyles.spacing.md)};
min-height: 260px;
}
.loading-skeleton {
height: 180px;
padding: ${unsafeCSS(sharedStyles.spacing.md)};
}
height: 180px;
padding: ${unsafeCSS(sharedStyles.spacing.md)};
}
}
`
]
@@ -327,22 +487,31 @@ export class UplStatuspageStatusmonth extends DeesElement {
const monthDate = new Date(monthData.month + '-01');
const monthName = monthDate.toLocaleDateString('en-US', { month: 'short', year: 'numeric' });
const firstDayOfWeek = new Date(monthDate.getFullYear(), monthDate.getMonth(), 1).getDay();
const now = new Date();
const isCurrentMonth = monthDate.getMonth() === now.getMonth() && monthDate.getFullYear() === now.getFullYear();
const uptimeClass = this.getUptimeClass(monthData.overallUptime);
return html`
<div class="statusMonth" @mouseleave=${this.hideTooltip}>
<div class="month-header">${monthName}</div>
<div class="month-header">
${monthName}
${isCurrentMonth ? html`<span class="current-badge">Current</span>` : ''}
</div>
<div class="days-container">
<div class="days-grid">
${this.renderWeekdayLabels()}
${this.renderEmptyDays(firstDayOfWeek)}
${monthData.days.map(day => this.renderDay(day))}
${monthData.days.map((day, index) => this.renderDay(day, index))}
${this.renderTrailingEmptyDays(firstDayOfWeek + monthData.days.length)}
</div>
</div>
<div class="overall-uptime">
<div class="uptime-stat">
<span>Uptime</span>
<span class="uptime-value">${monthData.overallUptime.toFixed(2)}%</span>
<span class="uptime-value ${uptimeClass}">${monthData.overallUptime.toFixed(2)}%</span>
</div>
<div class="uptime-bar">
<div class="uptime-bar-fill ${uptimeClass}" style="width: ${monthData.overallUptime}%"></div>
</div>
${monthData.totalIncidents > 0 ? html`
<div class="uptime-stat">
@@ -355,6 +524,12 @@ export class UplStatuspageStatusmonth extends DeesElement {
`;
}
private getUptimeClass(uptime: number): string {
if (uptime >= 99.9) return 'good';
if (uptime >= 99) return 'warning';
return 'bad';
}
private renderWeekdayLabels(): TemplateResult[] {
const weekdays = ['S', 'M', 'T', 'W', 'T', 'F', 'S'];
return weekdays.map(day => html`<div class="weekday-label">${day}</div>`);
@@ -370,61 +545,70 @@ export class UplStatuspageStatusmonth extends DeesElement {
return Array(trailingCount).fill(0).map(() => html`<div class="statusDay empty"></div>`);
}
private renderDay(day: any): TemplateResult {
private renderDay(day: any, index: number = 0): TemplateResult {
const status = day.status || 'no-data';
const date = new Date(day.date);
const dayNumber = date.getDate();
const now = new Date();
const isToday = date.toDateString() === now.toDateString();
const uptimeIntensity = this.getUptimeIntensity(day.uptime);
return html`
<div
class="statusDay ${status}"
class="statusDay ${status} ${isToday ? 'today' : ''} ${status === 'operational' ? uptimeIntensity : ''}"
style="--day-index: ${index}"
@mouseenter=${(e: MouseEvent) => this.showTooltip && this.showDayTooltip(e, day)}
@click=${() => this.handleDayClick(day)}
>
${status === 'major_outage' || status === 'partial_outage' ? html`
<div style="
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 8px;
font-weight: bold;
color: white;
">${day.incidents}</div>
${(status === 'major_outage' || status === 'partial_outage') && day.incidents > 0 ? html`
<span class="incident-count">${day.incidents}</span>
` : ''}
</div>
`;
}
private getUptimeIntensity(uptime: number): string {
if (uptime >= 99.9) return 'uptime-high';
if (uptime >= 99) return 'uptime-mid';
return '';
}
private showDayTooltip(event: MouseEvent, day: any) {
const tooltip = this.shadowRoot?.getElementById('tooltip') as HTMLElement;
if (!tooltip) return;
const date = new Date(day.date);
const dateStr = date.toLocaleDateString('en-US', {
weekday: 'long',
year: 'numeric',
month: 'long',
weekday: 'short',
month: 'short',
day: 'numeric'
});
let statusText = day.status.replace(/_/g, ' ');
statusText = statusText.charAt(0).toUpperCase() + statusText.slice(1);
const uptimeColor = day.uptime >= 99.9 ? '#22c55e' :
day.uptime >= 99 ? '#fbbf24' : '#f87171';
tooltip.innerHTML = `
<div class="tooltip-date">${dateStr}</div>
<div class="tooltip-stat">Status: ${statusText}</div>
<div class="tooltip-stat">Uptime: ${day.uptime.toFixed(2)}%</div>
${day.incidents > 0 ? `<div class="tooltip-stat">Incidents: ${day.incidents}</div>` : ''}
${day.totalDowntime > 0 ? `<div class="tooltip-stat">Downtime: ${day.totalDowntime} min</div>` : ''}
<div class="tooltip-stat">
<span style="display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: ${uptimeColor};"></span>
${statusText}
</div>
<div class="tooltip-stat">Uptime: <strong>${day.uptime.toFixed(2)}%</strong></div>
${day.incidents > 0 ? `<div class="tooltip-stat">Incidents: <strong>${day.incidents}</strong></div>` : ''}
${day.totalDowntime > 0 ? `<div class="tooltip-stat">Downtime: <strong>${day.totalDowntime}m</strong></div>` : ''}
<div class="tooltip-uptime-bar">
<div class="tooltip-uptime-fill" style="width: ${day.uptime}%; background: ${uptimeColor};"></div>
</div>
`;
const rect = (event.target as HTMLElement).getBoundingClientRect();
const containerRect = this.getBoundingClientRect();
tooltip.style.left = `${rect.left - containerRect.left + rect.width / 2}px`;
tooltip.style.top = `${rect.top - containerRect.top - 80}px`;
tooltip.style.transform = 'translateX(-50%)';
tooltip.style.top = `${rect.top - containerRect.top - 10}px`;
tooltip.style.transform = 'translateX(-50%) translateY(-100%)';
tooltip.classList.add('visible');
}

View File

@@ -84,15 +84,61 @@ export const easings = {
default: 'cubic-bezier(0.4, 0, 0.2, 1)',
smooth: 'cubic-bezier(0.4, 0, 0.6, 1)',
bounce: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)',
snappy: 'cubic-bezier(0.2, 0, 0, 1)'
snappy: 'cubic-bezier(0.2, 0, 0, 1)',
spring: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)'
};
// Durations
export const durations = {
instant: '50ms',
fast: '100ms',
normal: '200ms',
slow: '300ms',
slower: '500ms'
slower: '500ms',
slowest: '800ms'
};
// Status gradients for backgrounds
export const statusGradients = {
operational: cssManager.bdTheme(
'linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, rgba(22, 163, 74, 0.02) 100%)',
'linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.03) 100%)'
),
degraded: cssManager.bdTheme(
'linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(217, 119, 6, 0.02) 100%)',
'linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(251, 191, 36, 0.03) 100%)'
),
partial: cssManager.bdTheme(
'linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0.02) 100%)',
'linear-gradient(135deg, rgba(248, 113, 113, 0.12) 0%, rgba(248, 113, 113, 0.03) 100%)'
),
major: cssManager.bdTheme(
'linear-gradient(135deg, rgba(185, 28, 28, 0.10) 0%, rgba(185, 28, 28, 0.03) 100%)',
'linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.04) 100%)'
),
maintenance: cssManager.bdTheme(
'linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%)',
'linear-gradient(135deg, rgba(96, 165, 250, 0.12) 0%, rgba(96, 165, 250, 0.03) 100%)'
)
};
// Glassmorphism styles
export const glass = {
light: 'background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);',
dark: 'background: rgba(9, 9, 11, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);',
subtle: cssManager.bdTheme(
'background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(8px);',
'background: rgba(9, 9, 11, 0.6); backdrop-filter: blur(8px);'
)
};
// Status glow shadows
export const statusGlows = {
operational: '0 0 20px -5px rgba(34, 197, 94, 0.4)',
degraded: '0 0 20px -5px rgba(251, 191, 36, 0.4)',
partial: '0 0 20px -5px rgba(248, 113, 113, 0.4)',
major: '0 0 20px -5px rgba(239, 68, 68, 0.5)',
maintenance: '0 0 20px -5px rgba(96, 165, 250, 0.4)'
};
export const commonStyles = css`
@@ -212,6 +258,28 @@ export const commonStyles = css`
50% { opacity: 0.5; }
}
/* Pulse ring animation for active status */
@keyframes pulse-ring {
0% {
transform: scale(1);
opacity: 0.8;
}
100% {
transform: scale(2.5);
opacity: 0;
}
}
/* Shimmer effect for loading states */
@keyframes shimmer {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
}
/* Fade in animation */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(4px); }
@@ -222,6 +290,22 @@ export const commonStyles = css`
animation: fadeIn ${unsafeCSS(durations.slow)} ${unsafeCSS(easings.default)} forwards;
}
/* Fade in up animation */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(16px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in-up {
animation: fadeInUp ${unsafeCSS(durations.slower)} ${unsafeCSS(easings.default)} forwards;
}
/* Scale in animation */
@keyframes scaleIn {
from { opacity: 0; transform: scale(0.95); }
@@ -232,6 +316,86 @@ export const commonStyles = css`
animation: scaleIn ${unsafeCSS(durations.slow)} ${unsafeCSS(easings.bounce)} forwards;
}
/* Slide down animation for expanding content */
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.slide-down {
animation: slideDown ${unsafeCSS(durations.slow)} ${unsafeCSS(easings.default)} forwards;
}
/* Stagger animation delay utilities */
.stagger-1 { animation-delay: 50ms; }
.stagger-2 { animation-delay: 100ms; }
.stagger-3 { animation-delay: 150ms; }
.stagger-4 { animation-delay: 200ms; }
.stagger-5 { animation-delay: 250ms; }
/* Status indicator with pulse ring */
.status-dot-animated {
position: relative;
width: 10px;
height: 10px;
border-radius: 50%;
}
.status-dot-animated::before {
content: '';
position: absolute;
inset: 0;
border-radius: 50%;
background: inherit;
animation: pulse-ring 2s ${unsafeCSS(easings.default)} infinite;
}
.status-dot-animated.operational::before {
background: ${colors.status.operational};
}
.status-dot-animated.degraded::before,
.status-dot-animated.partial_outage::before,
.status-dot-animated.major_outage::before {
animation: pulse-ring 1.5s ${unsafeCSS(easings.default)} infinite;
}
/* Hover lift effect */
.hover-lift {
transition: transform ${unsafeCSS(durations.normal)} ${unsafeCSS(easings.default)},
box-shadow ${unsafeCSS(durations.normal)} ${unsafeCSS(easings.default)};
}
.hover-lift:hover {
transform: translateY(-2px);
}
/* Icon animation */
.icon-spin {
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* Bounce animation for attention */
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-4px); }
}
.bounce {
animation: bounce 1s ${unsafeCSS(easings.bounce)} infinite;
}
/* Container styles */
.container {
max-width: 1200px;