iter(e03): 新增 rate 评分组件

This commit is contained in:
HIsheR
2026-10-23 18:07:42 +08:00
parent dc4bac4d17
commit ee20322e3f
12 changed files with 206 additions and 7 deletions
+33 -1
View File
@@ -783,6 +783,37 @@ button.ua-step-dot:hover {
color: var(--ua-color-text-muted);
}
/* —— 评分 —— */
.ua-rate {
display: inline-flex;
gap: 2px;
}
.ua-rate-star {
padding: 0;
border: none;
background: none;
color: var(--ua-color-border); /* 未选中:弱化为边框色 */
font-size: 22px;
line-height: 1;
cursor: pointer;
transition: color 0.15s, transform 0.12s;
}
.ua-rate-star:hover {
transform: scale(1.15); /* 悬停微放大 */
}
.ua-rate-star.is-on {
color: var(--ua-color-warning); /* 选中:警示黄即星标金 */
}
.ua-rate-star:disabled {
cursor: not-allowed;
opacity: 0.45;
}
.ua-rate-star:focus-visible {
outline: none;
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ua-color-warning) 25%, transparent);
border-radius: 4px;
}
/* —— 徽标 —— */
.ua-badge {
display: inline-block;
@@ -1459,7 +1490,8 @@ button.ua-step-dot:hover {
.ua-modal-overlay,
.ua-drawer,
.ua-drawer-overlay,
.ua-step-dot {
.ua-step-dot,
.ua-rate-star {
animation: none !important;
transition: none !important;
}