测试: - secure-storage: 26 tests (AES 加解密/明文 fallback/迁移/Base64 边界) - request.ts: 16 tests (扩展 ResponseCache/patientId 隔离/requestUnlimited) - mock-api: 修复 getCachedPatientId 缺失导致 health 测试失败 UX 无障碍 (10 组件): - SegmentTabs/DoctorTabBar: role=tablist/tab + aria-selected - PrimaryButton/SecondaryButton: role=button + aria-disabled/aria-busy - Loading/LoadingCard: role=status + aria-live=polite - EmptyState: role=status + aria-live=polite - ErrorState: role=alert + aria-live=assertive - TrendChart tooltip: role=tooltip + aria-live=polite - FormInput: aria-invalid + aria-label 焦点管理: - 新增 _focus-ring.scss mixin (focus + focus-visible) - 5 组件 SCSS 应用 focus-ring
79 lines
1.4 KiB
SCSS
79 lines
1.4 KiB
SCSS
@import '../../styles/variables.scss';
|
|
|
|
.seg-tabs {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
&--underline {
|
|
border-bottom: 1px solid $bd-l;
|
|
|
|
.seg-tab {
|
|
flex: 1;
|
|
height: var(--tk-touch-min);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
|
|
@include focus-ring;
|
|
|
|
&--active {
|
|
.seg-tab__text {
|
|
color: var(--tk-pri);
|
|
font-weight: bold;
|
|
}
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 30%;
|
|
right: 30%;
|
|
height: 4px;
|
|
background: var(--tk-pri);
|
|
border-radius: $r-xs;
|
|
}
|
|
}
|
|
}
|
|
|
|
.seg-tab__text {
|
|
font-size: var(--tk-font-body-lg);
|
|
color: $tx2;
|
|
}
|
|
}
|
|
|
|
&--pill {
|
|
gap: 8px;
|
|
margin-bottom: var(--tk-section-gap);
|
|
|
|
.seg-tab {
|
|
flex: 1;
|
|
height: 44px;
|
|
border-radius: $r-sm;
|
|
background: $surface-alt;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s;
|
|
|
|
@include focus-ring;
|
|
|
|
&--active {
|
|
background: var(--tk-pri);
|
|
box-shadow: var(--tk-shadow-tab);
|
|
|
|
.seg-tab__text {
|
|
color: $white;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
}
|
|
|
|
.seg-tab__text {
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: $tx2;
|
|
}
|
|
}
|
|
}
|