refactor(theme): 使用通用 floating 变量替代 glassPill overrides

- 新增 ThemeConfig 浮动组件层变量 (floatingBg, floatingBtnBg 等)
- 移除 overrides.glassPill,改用主层级通用变量
- 优化深色模式配色增强容器与按钮区分度
- CSS 变量名统一为 --bim-floating-*

BREAKING CHANGE: glassPill overrides 已移除,使用 floating* 变量替代
This commit is contained in:
yuding
2026-01-21 16:46:14 +08:00
parent 19f7e3ffbc
commit 99aece7b89
4 changed files with 79 additions and 60 deletions

View File

@@ -284,19 +284,16 @@ export class BimButtonGroup implements IBimComponent {
style.setProperty('--bim-shadow-lg', theme.shadowLg);
style.setProperty('--bim-shadow-glow', theme.shadowGlow);
const gp = theme.overrides?.glassPill;
if (gp) {
if (gp.sectionBg) style.setProperty('--bim-glass-pill-section-bg', gp.sectionBg);
if (gp.sectionBorder) style.setProperty('--bim-glass-pill-section-border', gp.sectionBorder);
if (gp.sectionShadow) style.setProperty('--bim-glass-pill-section-shadow', gp.sectionShadow);
if (gp.btnBg) style.setProperty('--bim-glass-pill-btn-bg', gp.btnBg);
if (gp.btnBorder) style.setProperty('--bim-glass-pill-btn-border', gp.btnBorder);
if (gp.btnShadow) style.setProperty('--bim-glass-pill-btn-shadow', gp.btnShadow);
if (gp.btnBgHover) style.setProperty('--bim-glass-pill-btn-bg-hover', gp.btnBgHover);
if (gp.btnShadowHover) style.setProperty('--bim-glass-pill-btn-shadow-hover', gp.btnShadowHover);
if (gp.iconColor) style.setProperty('--bim-glass-pill-icon-color', gp.iconColor);
if (gp.iconColorHover) style.setProperty('--bim-glass-pill-icon-color-hover', gp.iconColorHover);
}
style.setProperty('--bim-floating-bg', theme.floatingBg);
style.setProperty('--bim-floating-border', theme.floatingBorder);
style.setProperty('--bim-floating-shadow', theme.floatingShadow);
style.setProperty('--bim-floating-btn-bg', theme.floatingBtnBg);
style.setProperty('--bim-floating-btn-border', theme.floatingBtnBorder);
style.setProperty('--bim-floating-btn-shadow', theme.floatingBtnShadow);
style.setProperty('--bim-floating-btn-bg-hover', theme.floatingBtnBgHover);
style.setProperty('--bim-floating-btn-shadow-hover', theme.floatingBtnShadowHover);
style.setProperty('--bim-floating-icon-color', theme.floatingIconColor);
style.setProperty('--bim-floating-icon-color-hover', theme.floatingIconColorHover);
this.syncDropdownCssVars(theme);
}