Files
deepseek-harness/packages/client/ui-primitives/src/StateDot.module.css
T

101 lines
2.4 KiB
CSS

/* Solid states keep the 10px layout slot but paint one 6px currentColor core. */
.dot {
position: relative;
display: inline-block;
flex: none;
}
.dot::after {
content: '';
position: absolute;
inset: 20%;
border-radius: 50%;
corner-shape: round;
background: currentColor;
}
.dot[data-state='done'] {
color: var(--dsw-alias-state-success-primary);
}
.dot[data-state='warning'] {
color: var(--dsw-alias-state-warn-primary);
}
.dot[data-state='error'] {
color: var(--dsw-alias-state-error-primary);
}
/* Idle is the absence of activity and uses the theme's neutral state step. */
.dot[data-state='idle'] {
color: var(--dsw-alias-state-idle-primary);
}
/* Ongoing is the sole non-dot state: a quiet full ring sits behind a centered
* breathing arc while the complete glyph rotates continuously. Both animations
* share one 1.5s period so pinning their start times aligns them together. */
.spinner {
flex: none;
color: var(--dsw-alias-label-tertiary);
}
.spinnerMotion {
transform-origin: center;
animation: dsh-state-dot-spin 1.5s linear infinite;
}
.spinnerTrack,
.spinnerArc {
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
}
.spinnerTrack {
opacity: 0.25;
}
.spinnerArc {
stroke-dasharray: 12 150;
animation: dsh-state-dot-dash 1.5s ease-in-out infinite;
}
@keyframes dsh-state-dot-spin {
to { transform: rotate(360deg); }
}
@keyframes dsh-state-dot-dash {
0% {
stroke-dasharray: 12 150;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 24 150;
stroke-dashoffset: -6;
}
100% {
stroke-dasharray: 12 150;
stroke-dashoffset: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.spinnerMotion,
.spinnerArc {
animation: none;
}
.spinnerArc {
stroke-dasharray: 18 150;
stroke-dashoffset: -3;
}
}
.step { display: inline-flex; flex: none; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 50%; corner-shape: round; border: 1.5px solid var(--dsw-alias-label-tertiary); color: var(--dsw-alias-label-primary-foreground); }
.step[data-state='done'] { border-color: var(--dsw-alias-state-success-primary); background: var(--dsw-alias-state-success-primary); }
.step[data-state='error'] { border-color: var(--dsw-alias-state-error-primary); background: var(--dsw-alias-state-error-primary); }
.step[data-state='warning'] { border-color: var(--dsw-alias-state-warn-primary); }