feat(web): add connection recovery indicator
This commit is contained in:
1 parent
ccfbbb443a
commit
19b4d7f26c
11 files changed
+299
-49
No files matched your search
@@ -0,0 +1,106 @@
|
||||
.indicator {
|
||||
flex: none;
|
||||
display: inline-grid;
|
||||
grid-template-columns: 14px max-content;
|
||||
align-items: center;
|
||||
column-gap: 4px;
|
||||
height: 32px;
|
||||
padding: 0 10px;
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-family: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
transition: background-color 160ms ease-out, color 160ms ease-out;
|
||||
}
|
||||
|
||||
.warning {
|
||||
background: var(--dsw-alias-state-warn-tertiary);
|
||||
color: var(--dsw-alias-state-warn-label);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.warning:active {
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--dsw-alias-state-warn-tertiary),
|
||||
var(--dsw-alias-state-warn-primary) 10%
|
||||
);
|
||||
}
|
||||
|
||||
.warning:focus-visible {
|
||||
outline: 2px solid var(--dsw-alias-state-warn-label);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.success {
|
||||
background: var(--dsw-alias-state-success-tertiary);
|
||||
color: var(--dsw-alias-state-success-primary);
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.stateLabel,
|
||||
.hoverLabel,
|
||||
.sizeLabel {
|
||||
grid-area: 1 / 1;
|
||||
}
|
||||
|
||||
.sizeLabel {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.warning:is(:hover, :focus-visible) .stateLabel {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.hoverLabel {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.warning:is(:hover, :focus-visible) .hoverLabel {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.dots {
|
||||
display: inline-block;
|
||||
width: 1.5em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.secondDot {
|
||||
animation: reveal-second-dot 1.5s step-end infinite;
|
||||
}
|
||||
|
||||
.thirdDot {
|
||||
animation: reveal-third-dot 1.5s step-end infinite;
|
||||
}
|
||||
|
||||
@keyframes reveal-second-dot {
|
||||
0%, 33.32% { visibility: hidden; }
|
||||
33.33%, 100% { visibility: visible; }
|
||||
}
|
||||
|
||||
@keyframes reveal-third-dot {
|
||||
0%, 66.65% { visibility: hidden; }
|
||||
66.66%, 100% { visibility: visible; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.secondDot,
|
||||
.thirdDot {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user