ui: v2.0 精修 - bd-* 组件八态补齐 + 列表 stagger 进场
- bd-modal/bd-modal-overlay 接入 mask-in/modal-in 进场动画,阴影换分层 token - bd 按钮/输入框补 :active 按压、:focus-visible 焦点环、placeholder 对比度 - bd-modal-close 文字✕换 SVG 图标(结算弹窗+添加豆子弹窗) - showcase/图纸库/豆仓三个列表 stagger 进场(40ms 间隔,9 项后统一 320ms,仅新挂载播放)
This commit is contained in:
1 parent
8d8f8beb33
commit
eb6f6ff8ac
4 files changed
+85
-5
No files matched your search
@@ -184,7 +184,9 @@ export default function BeadSettlementModal({
|
||||
onClick={onClose}
|
||||
aria-label={t('modal.close')}
|
||||
>
|
||||
✕
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -333,7 +333,9 @@ function AddBeadsModal({ open, onClose, onAdd }: AddBeadsModalProps) {
|
||||
<div className="bd-modal-header">
|
||||
<span className="bd-modal-title">{t('beads.add.title')}</span>
|
||||
<button type="button" className="bd-modal-close" onClick={onClose} aria-label={t('modal.close')}>
|
||||
✕
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
||||
<path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -441,9 +441,10 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(23, 23, 19, .5);
|
||||
background: rgba(31, 29, 23, 0.45);
|
||||
backdrop-filter: blur(2px);
|
||||
padding: var(--space-4);
|
||||
animation: mask-in var(--dur-med) ease both;
|
||||
}
|
||||
|
||||
.bd-modal {
|
||||
@@ -455,8 +456,10 @@
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-lg);
|
||||
box-shadow: 0 8px 32px rgba(23, 23, 19, .16);
|
||||
box-shadow: var(--shadow-modal);
|
||||
overflow: hidden;
|
||||
transform-origin: center;
|
||||
animation: modal-in var(--dur-med) var(--ease-out) both;
|
||||
}
|
||||
|
||||
.bd-modal-header {
|
||||
@@ -905,4 +908,48 @@
|
||||
.bd-replace-grid {
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* ============================================================
|
||||
v2.0 八态补齐 (DESIGN.md §3.0/§3.1)
|
||||
============================================================ */
|
||||
.bd-empty-btn,
|
||||
.bd-modal-btn,
|
||||
.bd-add-popup-btn,
|
||||
.bd-bottle-add,
|
||||
.bd-settings-btn,
|
||||
.bd-modal-replace-btn {
|
||||
transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease,
|
||||
color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
|
||||
}
|
||||
|
||||
.bd-empty-btn:active,
|
||||
.bd-modal-btn:active,
|
||||
.bd-add-popup-btn:active,
|
||||
.bd-bottle-add:active,
|
||||
.bd-settings-btn:active,
|
||||
.bd-modal-replace-btn:active {
|
||||
transform: scale(0.97);
|
||||
}
|
||||
|
||||
.bd-empty-btn:focus-visible,
|
||||
.bd-modal-btn:focus-visible,
|
||||
.bd-add-popup-btn:focus-visible,
|
||||
.bd-bottle-add:focus-visible,
|
||||
.bd-settings-btn:focus-visible,
|
||||
.bd-modal-replace-btn:focus-visible,
|
||||
.bd-modal-close:focus-visible {
|
||||
outline: none;
|
||||
box-shadow: var(--focus-ring);
|
||||
}
|
||||
|
||||
.bd-add-input:focus,
|
||||
.bd-add-popup-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: var(--focus-ring);
|
||||
}
|
||||
|
||||
.bd-add-input::placeholder,
|
||||
.bd-add-popup-input::placeholder {
|
||||
color: var(--text-disabled);
|
||||
}
|
||||
@@ -1787,3 +1787,32 @@ a:focus-visible {
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
列表进场 stagger (DESIGN.md v2.0 §3.8)
|
||||
仅元素首次挂载播放;翻页/筛选保留挂载的不重播
|
||||
============================================================ */
|
||||
@keyframes stagger-in {
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.sw-grid > *,
|
||||
.lib-list > *,
|
||||
.bd-grid > * {
|
||||
opacity: 0;
|
||||
transform: translateY(8px);
|
||||
animation: stagger-in var(--dur-slow) var(--ease-out) forwards;
|
||||
}
|
||||
|
||||
.sw-grid > *:nth-child(1), .lib-list > *:nth-child(1), .bd-grid > *:nth-child(1) { animation-delay: 0ms; }
|
||||
.sw-grid > *:nth-child(2), .lib-list > *:nth-child(2), .bd-grid > *:nth-child(2) { animation-delay: 40ms; }
|
||||
.sw-grid > *:nth-child(3), .lib-list > *:nth-child(3), .bd-grid > *:nth-child(3) { animation-delay: 80ms; }
|
||||
.sw-grid > *:nth-child(4), .lib-list > *:nth-child(4), .bd-grid > *:nth-child(4) { animation-delay: 120ms; }
|
||||
.sw-grid > *:nth-child(5), .lib-list > *:nth-child(5), .bd-grid > *:nth-child(5) { animation-delay: 160ms; }
|
||||
.sw-grid > *:nth-child(6), .lib-list > *:nth-child(6), .bd-grid > *:nth-child(6) { animation-delay: 200ms; }
|
||||
.sw-grid > *:nth-child(7), .lib-list > *:nth-child(7), .bd-grid > *:nth-child(7) { animation-delay: 240ms; }
|
||||
.sw-grid > *:nth-child(8), .lib-list > *:nth-child(8), .bd-grid > *:nth-child(8) { animation-delay: 280ms; }
|
||||
.sw-grid > *:nth-child(n+9), .lib-list > *:nth-child(n+9), .bd-grid > *:nth-child(n+9) { animation-delay: 320ms; }
|
||||
Reference in new issue
Block a user