iter(g07): 新增 timeline 时间线组件
This commit is contained in:
@@ -1647,3 +1647,110 @@ button.ua-step-dot:hover {
|
||||
font-size: var(--ua-font-size-md);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* —— 时间线:纵向轴线 + 语义色节点,mode=right 时轴线居右 —— */
|
||||
.ua-tl {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.ua-tl::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 6px;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
background: var(--ua-color-border);
|
||||
}
|
||||
.ua-tl-right::before {
|
||||
left: auto;
|
||||
right: 5px;
|
||||
}
|
||||
.ua-tl-item {
|
||||
position: relative;
|
||||
padding: 0 0 var(--ua-space-3) 22px;
|
||||
animation: ua-tl-in 0.18s ease-out both;
|
||||
}
|
||||
.ua-tl-item:last-child {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.ua-tl-right .ua-tl-item {
|
||||
padding: 0 22px var(--ua-space-3) 0;
|
||||
text-align: right;
|
||||
}
|
||||
.ua-tl-right .ua-tl-item:last-child {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.ua-tl-dot {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 4px;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
background: var(--ua-color-text-muted);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ua-color-accent) 10%, transparent);
|
||||
transition: transform 0.15s;
|
||||
}
|
||||
.ua-tl-right .ua-tl-dot {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
.ua-tl-item:hover .ua-tl-dot {
|
||||
transform: scale(1.15);
|
||||
}
|
||||
.ua-tl-dot-default { background: var(--ua-color-accent); }
|
||||
.ua-tl-dot-success { background: var(--ua-color-success); }
|
||||
.ua-tl-dot-warning { background: var(--ua-color-warning); }
|
||||
.ua-tl-dot-danger { background: var(--ua-color-danger); }
|
||||
.ua-tl-dot-pending {
|
||||
background: var(--ua-color-bg);
|
||||
border: 1px dashed var(--ua-color-accent);
|
||||
animation: ua-tl-pulse 1.6s ease-in-out infinite;
|
||||
}
|
||||
.ua-tl-head {
|
||||
display: flex;
|
||||
gap: var(--ua-space-2);
|
||||
align-items: baseline;
|
||||
}
|
||||
.ua-tl-right .ua-tl-head {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.ua-tl-title {
|
||||
color: var(--ua-color-text);
|
||||
font-size: var(--ua-font-size-md);
|
||||
font-weight: 600;
|
||||
}
|
||||
.ua-tl-item.is-pending .ua-tl-title {
|
||||
color: var(--ua-color-text-muted);
|
||||
font-weight: 500;
|
||||
}
|
||||
.ua-tl-time {
|
||||
color: var(--ua-color-text-muted);
|
||||
font-size: var(--ua-font-size-sm);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.ua-tl-content {
|
||||
margin: 2px 0 0;
|
||||
color: var(--ua-color-text-muted);
|
||||
font-size: var(--ua-font-size-sm);
|
||||
line-height: 1.6;
|
||||
}
|
||||
@keyframes ua-tl-in {
|
||||
from { opacity: 0; transform: translateY(-4px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
@keyframes ua-tl-pulse {
|
||||
0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ua-color-accent) 18%, transparent); }
|
||||
50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ua-color-accent) 4%, transparent); }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.ua-tl-item,
|
||||
.ua-tl-dot-pending,
|
||||
.ua-tl-dot {
|
||||
animation: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user