@mathwiz/ui-components 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.css +570 -0
- package/dist/components/Button/Button.css +214 -0
- package/dist/components/ContentAccordion/ContentAccordion.css +268 -0
- package/dist/components/MathWizHeader/MathWizHeader.css +333 -0
- package/dist/components/Sidebar/Sidebar.css +207 -0
- package/dist/components/Submenu/Submenu.css +98 -0
- package/dist/components/UserProfile/UserProfile.css +141 -0
- package/dist/components/components.css +222 -0
- package/dist/components/radarAbility/AbilityAssessmentDashboard/AbilityAssessmentDashboard.module.css +60 -0
- package/dist/index.css +63 -0
- package/dist/pages/GradeUnitBrowserPage/GradeUnitBrowserPage.css +250 -0
- package/dist/stories/button.css +30 -0
- package/dist/stories/header.css +32 -0
- package/dist/stories/page.css +68 -0
- package/dist/styles/index.css +154 -0
- package/package.json +3 -2
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* UserProfile 组件样式 */
|
|
2
|
+
.user-profile-container {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* 触发区域样式 */
|
|
10
|
+
.user-profile-trigger {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: var(--spacing-sm, 8px);
|
|
14
|
+
padding: var(--spacing-xs, 4px) var(--spacing-sm, 8px);
|
|
15
|
+
border-radius: var(--border-radius-md, 6px);
|
|
16
|
+
transition: background-color var(--transition-duration-fast, 0.2s) ease;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.user-profile-trigger:hover {
|
|
20
|
+
background-color: var(--color-background-hover, #f5f5f5);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* 用户名样式 */
|
|
24
|
+
.user-name {
|
|
25
|
+
font-weight: var(--font-weight-medium, 500);
|
|
26
|
+
color: var(--color-text-primary, #333);
|
|
27
|
+
font-size: var(--font-size-md, 14px);
|
|
28
|
+
line-height: 1.4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* 状态样式 */
|
|
32
|
+
.user-profile-container.is-loading .user-profile-trigger {
|
|
33
|
+
opacity: 0.7;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.user-profile-container.has-error .user-profile-trigger {
|
|
38
|
+
border: 1px solid var(--color-error, #dc3545);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* 加载和错误状态文本 */
|
|
42
|
+
.user-profile-loading,
|
|
43
|
+
.user-profile-error {
|
|
44
|
+
padding: var(--spacing-sm, 8px) var(--spacing-md, 12px);
|
|
45
|
+
border-radius: var(--border-radius-md, 6px);
|
|
46
|
+
font-size: var(--font-size-sm, 12px);
|
|
47
|
+
line-height: 1.4;
|
|
48
|
+
text-align: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.user-profile-loading {
|
|
52
|
+
background-color: var(--color-background-muted, #f8f9fa);
|
|
53
|
+
color: var(--color-text-muted, #6c757d);
|
|
54
|
+
min-width: 80px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.user-profile-error {
|
|
58
|
+
background-color: var(--color-error-bg, #f8d7da);
|
|
59
|
+
color: var(--color-error, #721c24);
|
|
60
|
+
border: 1px solid var(--color-error-border, #f5c6cb);
|
|
61
|
+
min-width: 120px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* 响应式设计 */
|
|
65
|
+
@media (max-width: 768px) {
|
|
66
|
+
.user-profile-trigger {
|
|
67
|
+
padding: var(--spacing-xs, 4px);
|
|
68
|
+
gap: var(--spacing-xs, 4px);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.user-name {
|
|
72
|
+
font-size: var(--font-size-sm, 12px);
|
|
73
|
+
display: none;
|
|
74
|
+
/* 在小屏幕上隐藏用户名 */
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.user-profile-loading,
|
|
78
|
+
.user-profile-error {
|
|
79
|
+
font-size: var(--font-size-xs, 10px);
|
|
80
|
+
padding: var(--spacing-xs, 4px) var(--spacing-sm, 8px);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (min-width: 769px) {
|
|
85
|
+
.user-name {
|
|
86
|
+
display: inline;
|
|
87
|
+
/* 在较大屏幕上显示用户名 */
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* 暗色主题支持 */
|
|
92
|
+
[data-theme="dark"] .user-profile-trigger:hover {
|
|
93
|
+
background-color: var(--color-background-hover-dark, #2d2d2d);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-theme="dark"] .user-name {
|
|
97
|
+
color: var(--color-text-primary-dark, #ffffff);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-theme="dark"] .user-profile-loading {
|
|
101
|
+
background-color: var(--color-background-muted-dark, #2d2d2d);
|
|
102
|
+
color: var(--color-text-muted-dark, #a0a0a0);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* 高对比度模式支持 */
|
|
106
|
+
@media (prefers-contrast: high) {
|
|
107
|
+
.user-profile-trigger:hover {
|
|
108
|
+
background-color: var(--color-background-hover-high-contrast, #000000);
|
|
109
|
+
outline: 2px solid var(--color-border-high-contrast, #ffffff);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.user-name {
|
|
113
|
+
font-weight: var(--font-weight-bold, 700);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* 减少动画支持 */
|
|
118
|
+
@media (prefers-reduced-motion: reduce) {
|
|
119
|
+
.user-profile-trigger {
|
|
120
|
+
transition: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.submenu-panel {
|
|
124
|
+
transition: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* 焦点样式 - 无障碍访问支持 */
|
|
129
|
+
.user-profile-trigger:focus-visible {
|
|
130
|
+
outline: 2px solid var(--color-focus-ring, #007bff);
|
|
131
|
+
outline-offset: 2px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* 禁用状态样式 */
|
|
135
|
+
.user-profile-container:has(.submenu-item.is-disabled) {
|
|
136
|
+
cursor: not-allowed;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.user-profile-container:has(.submenu-item.is-disabled) .user-profile-trigger:hover {
|
|
140
|
+
background-color: transparent;
|
|
141
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/* Game Interactive Components */
|
|
2
|
+
/* @import './gameInteractive/gameInteractive.css'; */
|
|
3
|
+
|
|
4
|
+
/* Grade Navigation Styles */
|
|
5
|
+
.grade-navigation {
|
|
6
|
+
max-width: 800px;
|
|
7
|
+
margin: 0 auto;
|
|
8
|
+
padding: 20px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.grade-navigation__title {
|
|
12
|
+
font-size: 24px;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
color: #333;
|
|
15
|
+
margin-bottom: 20px;
|
|
16
|
+
text-align: center;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.grade-navigation__grid {
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
22
|
+
gap: 16px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.grade-card {
|
|
26
|
+
background: white;
|
|
27
|
+
border: 1px solid #e0e0e0;
|
|
28
|
+
border-left: 4px solid;
|
|
29
|
+
border-radius: 8px;
|
|
30
|
+
padding: 20px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
transition: all 0.3s ease;
|
|
33
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.grade-card:hover {
|
|
37
|
+
transform: translateY(-2px);
|
|
38
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.grade-card--selected {
|
|
42
|
+
border-left-width: 6px;
|
|
43
|
+
background: #f8f9fa;
|
|
44
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.grade-card__level {
|
|
48
|
+
font-size: 12px;
|
|
49
|
+
color: #666;
|
|
50
|
+
text-transform: uppercase;
|
|
51
|
+
letter-spacing: 0.5px;
|
|
52
|
+
margin-bottom: 4px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.grade-card__name {
|
|
56
|
+
font-size: 20px;
|
|
57
|
+
font-weight: bold;
|
|
58
|
+
color: #333;
|
|
59
|
+
margin-bottom: 8px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.grade-card__description {
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
color: #666;
|
|
65
|
+
line-height: 1.4;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Side Navigation Styles */
|
|
69
|
+
.side-navigation {
|
|
70
|
+
width: 300px;
|
|
71
|
+
background: white;
|
|
72
|
+
border-right: 1px solid #e0e0e0;
|
|
73
|
+
height: 100vh;
|
|
74
|
+
overflow-y: auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.side-navigation__header {
|
|
78
|
+
padding: 20px;
|
|
79
|
+
border-bottom: 1px solid #e0e0e0;
|
|
80
|
+
background: #f8f9fa;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.side-navigation__header h3 {
|
|
84
|
+
margin: 0;
|
|
85
|
+
font-size: 18px;
|
|
86
|
+
color: #333;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.side-navigation__content {
|
|
90
|
+
padding: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.unit-section {
|
|
94
|
+
border-bottom: 1px solid #e0e0e0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.unit-header {
|
|
98
|
+
padding: 16px 20px;
|
|
99
|
+
background: #f8f9fa;
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: space-between;
|
|
103
|
+
align-items: center;
|
|
104
|
+
transition: background-color 0.2s ease;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.unit-header:hover {
|
|
108
|
+
background: #e9ecef;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.unit-title {
|
|
112
|
+
font-weight: 600;
|
|
113
|
+
color: #333;
|
|
114
|
+
font-size: 16px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.unit-toggle {
|
|
118
|
+
transition: transform 0.3s ease;
|
|
119
|
+
color: #666;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.unit-toggle.expanded {
|
|
123
|
+
transform: rotate(180deg);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.lesson-list {
|
|
127
|
+
list-style: none;
|
|
128
|
+
margin: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.lesson-item {
|
|
133
|
+
padding: 12px 20px 12px 40px;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
display: flex;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
align-items: center;
|
|
138
|
+
border-left: 3px solid transparent;
|
|
139
|
+
transition: all 0.2s ease;
|
|
140
|
+
font-size: 14px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.lesson-item:hover {
|
|
144
|
+
background: #f8f9fa;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.lesson-item--active {
|
|
148
|
+
background: #e3f2fd;
|
|
149
|
+
border-left-color: #2196f3;
|
|
150
|
+
font-weight: 500;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.lesson-item--completed {
|
|
154
|
+
color: #4caf50;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.lesson-item--completed .lesson-title::before {
|
|
158
|
+
content: '✓ ';
|
|
159
|
+
margin-right: 8px;
|
|
160
|
+
color: #4caf50;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.lesson-item--locked {
|
|
164
|
+
color: #999;
|
|
165
|
+
cursor: not-allowed;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.lesson-item--locked .lesson-title::before {
|
|
169
|
+
content: '🔒 ';
|
|
170
|
+
margin-right: 8px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.lesson-title {
|
|
174
|
+
flex: 1;
|
|
175
|
+
color: inherit;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.lesson-duration {
|
|
179
|
+
font-size: 12px;
|
|
180
|
+
color: #666;
|
|
181
|
+
margin-left: 8px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.lesson-status {
|
|
185
|
+
color: #4caf50;
|
|
186
|
+
font-weight: bold;
|
|
187
|
+
margin-left: 8px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Grade Information Styles */
|
|
191
|
+
.grade-info {
|
|
192
|
+
padding: 12px 20px;
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
gap: 4px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.grade-level {
|
|
199
|
+
font-size: 14px;
|
|
200
|
+
color: #666;
|
|
201
|
+
font-weight: 500;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.course-title {
|
|
205
|
+
font-size: 16px;
|
|
206
|
+
color: #333;
|
|
207
|
+
font-weight: 600;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Responsive Design */
|
|
211
|
+
@media (max-width: 768px) {
|
|
212
|
+
.grade-navigation__grid {
|
|
213
|
+
grid-template-columns: 1fr;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.side-navigation {
|
|
217
|
+
width: 100%;
|
|
218
|
+
height: auto;
|
|
219
|
+
border-right: none;
|
|
220
|
+
border-bottom: 1px solid #e0e0e0;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* 复合组件 AbilityAssessmentDashboard 的内部布局 */
|
|
2
|
+
/* 上下布局 3:2 */
|
|
3
|
+
.dashboardLayout {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 24px; /* gap-6 */
|
|
7
|
+
height: 100%; /* Or a defined height for visualization */
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.upperSection {
|
|
11
|
+
flex: 3; /* Represents 3/5 height */
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: 1fr 1fr; /* 左右两份 */
|
|
14
|
+
gap: 24px; /* gap-6 */
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.lowerSection {
|
|
18
|
+
flex: 2; /* Represents 2/5 height */
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 16px; /* space-y-4 */
|
|
22
|
+
padding-top: 24px;
|
|
23
|
+
border-top: 1px solid #e2e8f0; /* border-gray-200 */
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.radarChartArea {
|
|
27
|
+
position: relative;
|
|
28
|
+
height: 320px; /* h-80 from original, but using aspect-square for SVG */
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* 响应式设计 */
|
|
35
|
+
@media (max-width: 768px) {
|
|
36
|
+
.upperSection {
|
|
37
|
+
grid-template-columns: 1fr;
|
|
38
|
+
gap: 16px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dashboardLayout {
|
|
42
|
+
gap: 16px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Animation for smooth appearance */
|
|
47
|
+
.animate-fade-in {
|
|
48
|
+
animation: fadeIn 0.6s ease-out;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes fadeIn {
|
|
52
|
+
from {
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transform: translateY(20px);
|
|
55
|
+
}
|
|
56
|
+
to {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
transform: translateY(0);
|
|
59
|
+
}
|
|
60
|
+
}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@plugin '../hero.ts';
|
|
3
|
+
@custom-variant dark (&:is(.dark *));
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
7
|
+
line-height: 1.5;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
|
|
10
|
+
color-scheme: light dark;
|
|
11
|
+
color: rgba(255, 255, 255, 0.87);
|
|
12
|
+
background-color: #242424;
|
|
13
|
+
|
|
14
|
+
font-synthesis: none;
|
|
15
|
+
text-rendering: optimizeLegibility;
|
|
16
|
+
-webkit-font-smoothing: antialiased;
|
|
17
|
+
-moz-osx-font-smoothing: grayscale;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
a {
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
color: #646cff;
|
|
23
|
+
text-decoration: inherit;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
a:hover {
|
|
27
|
+
color: #535bf2;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
body {
|
|
31
|
+
margin: 0;
|
|
32
|
+
min-width: 320px;
|
|
33
|
+
min-height: 100vh;
|
|
34
|
+
width: 100vw;
|
|
35
|
+
overflow-x: hidden;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
#root {
|
|
39
|
+
width: 100vw;
|
|
40
|
+
min-height: 100vh;
|
|
41
|
+
margin: 0;
|
|
42
|
+
padding: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
h1 {
|
|
46
|
+
font-size: 3.2em;
|
|
47
|
+
line-height: 1.1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* 全局 button 样式已移除,避免与 HeroUI Button 组件冲突 */
|
|
51
|
+
/* HeroUI Button 组件会提供自己的样式 */
|
|
52
|
+
|
|
53
|
+
@media (prefers-color-scheme: light) {
|
|
54
|
+
:root {
|
|
55
|
+
color: #213547;
|
|
56
|
+
background-color: #ffffff;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
a:hover {
|
|
60
|
+
color: #747bff;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/* GradeUnitBrowserPage 样式 */
|
|
2
|
+
|
|
3
|
+
.grade-unit-browser-page {
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-areas:
|
|
6
|
+
"header header"
|
|
7
|
+
"sidebar content";
|
|
8
|
+
grid-template-rows: auto 1fr;
|
|
9
|
+
grid-template-columns: 300px 1fr;
|
|
10
|
+
min-height: 100vh;
|
|
11
|
+
background-color: var(--page-background, #f8fafc);
|
|
12
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.grade-unit-browser-page--sidebar-collapsed {
|
|
16
|
+
grid-template-columns: 60px 1fr;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Header 区域 */
|
|
20
|
+
.header-area {
|
|
21
|
+
grid-area: header;
|
|
22
|
+
position: sticky;
|
|
23
|
+
top: 0;
|
|
24
|
+
z-index: 100;
|
|
25
|
+
background: white;
|
|
26
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Sidebar 区域 */
|
|
31
|
+
.sidebar-area {
|
|
32
|
+
grid-area: sidebar;
|
|
33
|
+
background: white;
|
|
34
|
+
border-right: 1px solid var(--border-color, #e2e8f0);
|
|
35
|
+
overflow-y: auto;
|
|
36
|
+
height: 100vh;
|
|
37
|
+
position: sticky;
|
|
38
|
+
top: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* 内容区域 */
|
|
42
|
+
.content-area {
|
|
43
|
+
grid-area: content;
|
|
44
|
+
padding: 24px;
|
|
45
|
+
overflow-y: auto;
|
|
46
|
+
overflow-x: hidden;
|
|
47
|
+
background: white;
|
|
48
|
+
min-height: calc(100vh - 80px);
|
|
49
|
+
width: 100%;
|
|
50
|
+
min-width: 0;
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* 防止内容撑开容器 - 类似 App.css 中 main-view 的处理 */
|
|
56
|
+
.content-area h1,
|
|
57
|
+
.content-area h2,
|
|
58
|
+
.content-area h3,
|
|
59
|
+
.content-area h4,
|
|
60
|
+
.content-area h5,
|
|
61
|
+
.content-area h6,
|
|
62
|
+
.content-area p,
|
|
63
|
+
.content-area div,
|
|
64
|
+
.content-area span {
|
|
65
|
+
max-width: 100%;
|
|
66
|
+
word-wrap: break-word;
|
|
67
|
+
overflow-wrap: break-word;
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
white-space: normal;
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* 加载状态 */
|
|
74
|
+
.loading-spinner {
|
|
75
|
+
display: flex;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
align-items: center;
|
|
78
|
+
height: 200px;
|
|
79
|
+
color: var(--text-secondary, #64748b);
|
|
80
|
+
font-size: 16px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.loading-spinner::before {
|
|
84
|
+
content: '';
|
|
85
|
+
width: 20px;
|
|
86
|
+
height: 20px;
|
|
87
|
+
border: 2px solid var(--border-color, #e2e8f0);
|
|
88
|
+
border-top: 2px solid var(--primary-color, #3b82f6);
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
animation: spin 1s linear infinite;
|
|
91
|
+
margin-right: 12px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@keyframes spin {
|
|
95
|
+
0% {
|
|
96
|
+
transform: rotate(0deg);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
100% {
|
|
100
|
+
transform: rotate(360deg);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* 错误状态 */
|
|
105
|
+
.error-message {
|
|
106
|
+
text-align: center;
|
|
107
|
+
padding: 40px 20px;
|
|
108
|
+
color: var(--error-color, #dc2626);
|
|
109
|
+
background: var(--error-bg, #fef2f2);
|
|
110
|
+
border: 1px solid var(--error-border, #fecaca);
|
|
111
|
+
border-radius: 8px;
|
|
112
|
+
margin: 20px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.retry-button {
|
|
116
|
+
display: block;
|
|
117
|
+
margin: 20px auto;
|
|
118
|
+
padding: 10px 20px;
|
|
119
|
+
background: var(--primary-color, #3b82f6);
|
|
120
|
+
color: white;
|
|
121
|
+
border: none;
|
|
122
|
+
border-radius: 6px;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
transition: background-color 0.2s;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.retry-button:hover {
|
|
129
|
+
background: var(--primary-hover, #2563eb);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* 空状态 */
|
|
133
|
+
.empty-state {
|
|
134
|
+
text-align: center;
|
|
135
|
+
padding: 60px 20px;
|
|
136
|
+
color: var(--text-secondary, #64748b);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.empty-state h3 {
|
|
140
|
+
margin: 0 0 8px 0;
|
|
141
|
+
font-size: 18px;
|
|
142
|
+
font-weight: 600;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.empty-state p {
|
|
146
|
+
margin: 0;
|
|
147
|
+
font-size: 14px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* 响应式设计 */
|
|
151
|
+
@media (max-width: 768px) {
|
|
152
|
+
.grade-unit-browser-page {
|
|
153
|
+
grid-template-areas:
|
|
154
|
+
"header"
|
|
155
|
+
"content";
|
|
156
|
+
grid-template-columns: 1fr;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.sidebar-area {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.content-area {
|
|
164
|
+
padding: 16px;
|
|
165
|
+
min-height: calc(100vh - 60px);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* 移动端侧边栏展开状态 */
|
|
169
|
+
.grade-unit-browser-page.sidebar-open {
|
|
170
|
+
grid-template-areas:
|
|
171
|
+
"header"
|
|
172
|
+
"sidebar"
|
|
173
|
+
"content";
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.grade-unit-browser-page.sidebar-open .sidebar-area {
|
|
177
|
+
display: block;
|
|
178
|
+
height: auto;
|
|
179
|
+
position: relative;
|
|
180
|
+
border-right: none;
|
|
181
|
+
border-bottom: 1px solid var(--border-color, #e2e8f0);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (max-width: 480px) {
|
|
186
|
+
.content-area {
|
|
187
|
+
padding: 12px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.error-message {
|
|
191
|
+
margin: 10px;
|
|
192
|
+
padding: 20px 16px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.retry-button {
|
|
196
|
+
margin: 10px auto;
|
|
197
|
+
padding: 8px 16px;
|
|
198
|
+
font-size: 13px;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* 暗色主题支持 */
|
|
203
|
+
@media (prefers-color-scheme: dark) {
|
|
204
|
+
.grade-unit-browser-page {
|
|
205
|
+
background-color: var(--page-background-dark, #0f172a);
|
|
206
|
+
color: var(--text-primary-dark, #f1f5f9);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.header-area,
|
|
210
|
+
.sidebar-area,
|
|
211
|
+
.content-area {
|
|
212
|
+
background: var(--surface-dark, #1e293b);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.sidebar-area {
|
|
216
|
+
border-right-color: var(--border-color-dark, #334155);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.error-message {
|
|
220
|
+
color: var(--error-color-dark, #f87171);
|
|
221
|
+
background: var(--error-bg-dark, #7f1d1d);
|
|
222
|
+
border-color: var(--error-border-dark, #b91c1c);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* 无障碍性支持 */
|
|
227
|
+
.grade-unit-browser-page:focus {
|
|
228
|
+
outline: 2px solid var(--focus-ring, #3b82f6);
|
|
229
|
+
outline-offset: 2px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.retry-button:focus {
|
|
233
|
+
outline: 2px solid var(--focus-ring, #3b82f6);
|
|
234
|
+
outline-offset: 2px;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* 高对比度模式支持 */
|
|
238
|
+
@media (prefers-contrast: high) {
|
|
239
|
+
.grade-unit-browser-page {
|
|
240
|
+
border: 1px solid black;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.sidebar-area {
|
|
244
|
+
border-right: 2px solid black;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.retry-button {
|
|
248
|
+
border: 2px solid black;
|
|
249
|
+
}
|
|
250
|
+
}
|