iter(g277): 新增日历热力图组件
This commit is contained in:
@@ -5808,3 +5808,56 @@ h5.ua-type-title { font-size: var(--ua-font-size-md); }
|
||||
.ua-spark-dot {
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
/* ---- 日历热力图:格子按列排(一周一列),深浅四档 + 零档;色阶全部由 accent 与透明度档派生 ---- */
|
||||
.ua-heat {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
gap: var(--ua-space-2);
|
||||
}
|
||||
|
||||
.ua-heat-grid {
|
||||
display: grid;
|
||||
grid-auto-flow: column; /* 先竖后横:一列就是一周 */
|
||||
grid-template-columns: repeat(auto-fill, auto);
|
||||
gap: var(--ua-space-1);
|
||||
}
|
||||
|
||||
.ua-heat-cell {
|
||||
display: block;
|
||||
width: var(--ua-space-3);
|
||||
height: var(--ua-space-3);
|
||||
border-radius: var(--ua-radius-sm);
|
||||
}
|
||||
|
||||
/* 五档色阶:0 档是凹陷底(无活动),1-4 档 accent 浓度递增 */
|
||||
.ua-heat-cell.is-0 {
|
||||
background: var(--ua-color-surface-inset);
|
||||
}
|
||||
|
||||
.ua-heat-cell.is-1 {
|
||||
background: color-mix(in srgb, var(--ua-color-accent) var(--ua-alpha-soft), transparent);
|
||||
}
|
||||
|
||||
.ua-heat-cell.is-2 {
|
||||
background: color-mix(in srgb, var(--ua-color-accent) var(--ua-alpha-tint), transparent);
|
||||
}
|
||||
|
||||
.ua-heat-cell.is-3 {
|
||||
background: color-mix(in srgb, var(--ua-color-accent) var(--ua-alpha-mid), transparent);
|
||||
}
|
||||
|
||||
.ua-heat-cell.is-4 {
|
||||
background: var(--ua-color-accent);
|
||||
}
|
||||
|
||||
.ua-heat-legend {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--ua-space-1);
|
||||
}
|
||||
|
||||
.ua-heat-hint {
|
||||
color: var(--ua-color-text-faint);
|
||||
font-size: var(--ua-font-size-xs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user