@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,214 @@
|
|
|
1
|
+
/* Button Component Styles */
|
|
2
|
+
.button {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
border: 1px solid transparent;
|
|
8
|
+
font-weight: 500;
|
|
9
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
|
|
10
|
+
transition: all 0.2s ease-in-out;
|
|
11
|
+
line-height: 1.5;
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
position: relative;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Button Sizes */
|
|
21
|
+
.button--sm {
|
|
22
|
+
padding: 0.375rem 0.75rem;
|
|
23
|
+
font-size: 0.75rem;
|
|
24
|
+
min-height: 1.75rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.button--md {
|
|
28
|
+
padding: 0.5rem 1rem;
|
|
29
|
+
font-size: 0.875rem;
|
|
30
|
+
min-height: 2.25rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.button--lg {
|
|
34
|
+
padding: 0.75rem 1.5rem;
|
|
35
|
+
font-size: 1rem;
|
|
36
|
+
min-height: 2.75rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Border Radius */
|
|
40
|
+
.button--radius-sm {
|
|
41
|
+
border-radius: 0.25rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.button--radius-md {
|
|
45
|
+
border-radius: 0.375rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.button--radius-lg {
|
|
49
|
+
border-radius: 0.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Color Variants - Primary (未开始) */
|
|
53
|
+
.button--primary {
|
|
54
|
+
background-color: #3b82f6;
|
|
55
|
+
color: white;
|
|
56
|
+
border-color: #3b82f6;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.button--primary:hover {
|
|
60
|
+
background-color: #2563eb;
|
|
61
|
+
border-color: #2563eb;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.button--primary:focus-visible {
|
|
65
|
+
outline: 2px solid #3b82f6;
|
|
66
|
+
outline-offset: 2px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Color Variants - Secondary (进行中) */
|
|
70
|
+
.button--secondary {
|
|
71
|
+
background-color: #6b7280;
|
|
72
|
+
color: white;
|
|
73
|
+
border-color: #6b7280;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.button--secondary:hover {
|
|
77
|
+
background-color: #4b5563;
|
|
78
|
+
border-color: #4b5563;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.button--secondary:focus-visible {
|
|
82
|
+
outline: 2px solid #6b7280;
|
|
83
|
+
outline-offset: 2px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Color Variants - Success (已完成) */
|
|
87
|
+
.button--success {
|
|
88
|
+
background-color: #10b981;
|
|
89
|
+
color: white;
|
|
90
|
+
border-color: #10b981;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.button--success:hover {
|
|
94
|
+
background-color: #059669;
|
|
95
|
+
border-color: #059669;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.button--success:focus-visible {
|
|
99
|
+
outline: 2px solid #10b981;
|
|
100
|
+
outline-offset: 2px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Style Variants - Solid (默认) */
|
|
104
|
+
.button--solid {
|
|
105
|
+
/* Solid styles are the default, defined in color variants */
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Style Variants - Bordered */
|
|
109
|
+
.button--bordered.button--primary {
|
|
110
|
+
background-color: transparent;
|
|
111
|
+
color: #3b82f6;
|
|
112
|
+
border-color: #3b82f6;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.button--bordered.button--primary:hover {
|
|
116
|
+
background-color: #3b82f6;
|
|
117
|
+
color: white;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.button--bordered.button--secondary {
|
|
121
|
+
background-color: transparent;
|
|
122
|
+
color: #6b7280;
|
|
123
|
+
border-color: #6b7280;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.button--bordered.button--secondary:hover {
|
|
127
|
+
background-color: #6b7280;
|
|
128
|
+
color: white;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.button--bordered.button--success {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: #10b981;
|
|
134
|
+
border-color: #10b981;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.button--bordered.button--success:hover {
|
|
138
|
+
background-color: #10b981;
|
|
139
|
+
color: white;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Style Variants - Light */
|
|
143
|
+
.button--light.button--primary {
|
|
144
|
+
background-color: #dbeafe;
|
|
145
|
+
color: #1e40af;
|
|
146
|
+
border-color: transparent;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.button--light.button--primary:hover {
|
|
150
|
+
background-color: #bfdbfe;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.button--light.button--secondary {
|
|
154
|
+
background-color: #f3f4f6;
|
|
155
|
+
color: #374151;
|
|
156
|
+
border-color: transparent;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.button--light.button--secondary:hover {
|
|
160
|
+
background-color: #e5e7eb;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.button--light.button--success {
|
|
164
|
+
background-color: #d1fae5;
|
|
165
|
+
color: #065f46;
|
|
166
|
+
border-color: transparent;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.button--light.button--success:hover {
|
|
170
|
+
background-color: #a7f3d0;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Disabled State */
|
|
174
|
+
.button:disabled {
|
|
175
|
+
opacity: 0.6;
|
|
176
|
+
cursor: not-allowed;
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Focus states for accessibility */
|
|
181
|
+
.button:focus {
|
|
182
|
+
outline: none;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.button:focus-visible {
|
|
186
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Loading state (optional) */
|
|
190
|
+
.button--loading {
|
|
191
|
+
pointer-events: none;
|
|
192
|
+
opacity: 0.8;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Responsive design */
|
|
196
|
+
@media (max-width: 768px) {
|
|
197
|
+
.button--sm {
|
|
198
|
+
padding: 0.25rem 0.5rem;
|
|
199
|
+
font-size: 0.6875rem;
|
|
200
|
+
min-height: 1.5rem;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.button--md {
|
|
204
|
+
padding: 0.375rem 0.75rem;
|
|
205
|
+
font-size: 0.8125rem;
|
|
206
|
+
min-height: 2rem;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.button--lg {
|
|
210
|
+
padding: 0.5rem 1rem;
|
|
211
|
+
font-size: 0.875rem;
|
|
212
|
+
min-height: 2.25rem;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/* ContentAccordion 组件样式 */
|
|
2
|
+
.content-accordion {
|
|
3
|
+
--accordion-spacing: 1rem;
|
|
4
|
+
--accordion-border-radius: 8px;
|
|
5
|
+
--accordion-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
|
|
6
|
+
--accordion-border: 1px solid #e5e7eb;
|
|
7
|
+
--accordion-transition: all 0.2s ease-in-out;
|
|
8
|
+
|
|
9
|
+
width: 100%;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
overflow-wrap: break-word;
|
|
15
|
+
word-wrap: break-word;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* 加载状态 */
|
|
19
|
+
.content-accordion--loading {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
min-height: 200px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.content-accordion__loading {
|
|
27
|
+
color: #6b7280;
|
|
28
|
+
font-size: 0.875rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* 空状态 */
|
|
32
|
+
.content-accordion--empty {
|
|
33
|
+
display: flex;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
align-items: center;
|
|
36
|
+
min-height: 200px;
|
|
37
|
+
color: #6b7280;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.content-accordion__empty {
|
|
41
|
+
text-align: center;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* 单元头部 */
|
|
45
|
+
.content-accordion__header {
|
|
46
|
+
padding: var(--accordion-spacing);
|
|
47
|
+
background: #f8fafc;
|
|
48
|
+
border-radius: var(--accordion-border-radius);
|
|
49
|
+
margin-bottom: var(--accordion-spacing);
|
|
50
|
+
border: var(--accordion-border);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.content-accordion__unit-title {
|
|
54
|
+
font-size: 1.5rem;
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
color: #1f2937;
|
|
57
|
+
margin: 0 0 0.5rem 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.content-accordion__unit-description {
|
|
61
|
+
color: #6b7280;
|
|
62
|
+
margin: 0 0 0.75rem 0;
|
|
63
|
+
line-height: 1.5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.content-accordion__unit-meta {
|
|
67
|
+
display: flex;
|
|
68
|
+
gap: 0.5rem;
|
|
69
|
+
align-items: center;
|
|
70
|
+
color: #9ca3af;
|
|
71
|
+
font-size: 0.875rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* 课程项 */
|
|
75
|
+
.content-accordion__lessons {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
gap: 0.5rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.content-accordion__lesson-item {
|
|
82
|
+
border: var(--accordion-border);
|
|
83
|
+
border-radius: var(--accordion-border-radius);
|
|
84
|
+
background: white;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
transition: var(--accordion-transition);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.content-accordion__lesson-item--expanded {
|
|
90
|
+
box-shadow: var(--accordion-shadow);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.content-accordion__lesson-header {
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
align-items: center;
|
|
97
|
+
padding: 1rem var(--accordion-spacing);
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
background: white;
|
|
100
|
+
transition: var(--accordion-transition);
|
|
101
|
+
user-select: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.content-accordion__lesson-header:hover {
|
|
105
|
+
background: #f9fafb;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.content-accordion__lesson-header:focus-visible {
|
|
109
|
+
outline: 2px solid #3b82f6;
|
|
110
|
+
outline-offset: -2px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.content-accordion__lesson-header-content {
|
|
114
|
+
flex: 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.content-accordion__lesson-title {
|
|
118
|
+
font-size: 1rem;
|
|
119
|
+
font-weight: 500;
|
|
120
|
+
color: #1f2937;
|
|
121
|
+
margin: 0 0 0.25rem 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.content-accordion__lesson-duration {
|
|
125
|
+
font-size: 0.875rem;
|
|
126
|
+
color: #6b7280;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.content-accordion__lesson-actions {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: 0.75rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.content-accordion__lesson-progress {
|
|
136
|
+
font-size: 0.875rem;
|
|
137
|
+
font-weight: 500;
|
|
138
|
+
color: #3b82f6;
|
|
139
|
+
min-width: 3rem;
|
|
140
|
+
text-align: right;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.content-accordion__lesson-icon {
|
|
144
|
+
width: 1.25rem;
|
|
145
|
+
height: 1.25rem;
|
|
146
|
+
color: #6b7280;
|
|
147
|
+
transition: var(--accordion-transition);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* 知识点列表 */
|
|
151
|
+
.content-accordion__knowledge-list {
|
|
152
|
+
padding: 0 var(--accordion-spacing) var(--accordion-spacing);
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
gap: 0.75rem;
|
|
156
|
+
background: #fafafa;
|
|
157
|
+
border-top: var(--accordion-border);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* 知识点卡片 */
|
|
161
|
+
.content-accordion__knowledge-card {
|
|
162
|
+
margin: 0;
|
|
163
|
+
box-shadow: none;
|
|
164
|
+
border: var(--accordion-border);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.content-accordion__knowledge-title {
|
|
168
|
+
font-size: 0.875rem;
|
|
169
|
+
font-weight: 500;
|
|
170
|
+
color: #1f2937;
|
|
171
|
+
margin: 0 0 0.5rem 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.content-accordion__knowledge-description {
|
|
175
|
+
font-size: 0.75rem;
|
|
176
|
+
color: #6b7280;
|
|
177
|
+
line-height: 1.4;
|
|
178
|
+
margin: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.content-accordion__knowledge-actions {
|
|
182
|
+
display: flex;
|
|
183
|
+
justify-content: space-between;
|
|
184
|
+
align-items: center;
|
|
185
|
+
gap: 0.75rem;
|
|
186
|
+
padding-top: 0.75rem;
|
|
187
|
+
border-top: 1px solid #f3f4f6;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.content-accordion__progress-container {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
gap: 0.5rem;
|
|
194
|
+
flex: 1;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.content-accordion__progress-bar {
|
|
198
|
+
flex: 1;
|
|
199
|
+
max-width: 120px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.content-accordion__progress-text {
|
|
203
|
+
font-size: 0.75rem;
|
|
204
|
+
color: #6b7280;
|
|
205
|
+
min-width: 2.5rem;
|
|
206
|
+
text-align: right;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* 学习按钮样式 - 与自定义 Button 组件配合使用 */
|
|
210
|
+
.content-accordion__learn-button {
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
min-width: 6rem;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* 响应式设计 */
|
|
217
|
+
@media (max-width: 768px) {
|
|
218
|
+
.content-accordion {
|
|
219
|
+
--accordion-spacing: 0.75rem;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.content-accordion__header {
|
|
223
|
+
padding: 0.75rem;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.content-accordion__unit-title {
|
|
227
|
+
font-size: 1.25rem;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.content-accordion__lesson-header {
|
|
231
|
+
padding: 0.75rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.content-accordion__knowledge-list {
|
|
235
|
+
padding: 0 0.75rem 0.75rem;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.content-accordion__knowledge-actions {
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
align-items: stretch;
|
|
241
|
+
gap: 0.5rem;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.content-accordion__progress-container {
|
|
245
|
+
justify-content: space-between;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* 无障碍性支持 */
|
|
250
|
+
@media (prefers-reduced-motion: reduce) {
|
|
251
|
+
|
|
252
|
+
.content-accordion,
|
|
253
|
+
.content-accordion__lesson-header,
|
|
254
|
+
.content-accordion__lesson-icon {
|
|
255
|
+
transition: none;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* 高对比度模式支持 */
|
|
260
|
+
@media (prefers-contrast: high) {
|
|
261
|
+
.content-accordion__lesson-header {
|
|
262
|
+
border: 2px solid currentColor;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.content-accordion__knowledge-card {
|
|
266
|
+
border: 2px solid currentColor;
|
|
267
|
+
}
|
|
268
|
+
}
|