@mathwiz/ui-components 0.1.27 → 0.1.29
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/components/Button/Button.css +100 -32
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/types.d.ts +19 -0
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/MathCardV2/modules/SolveModule/SolveModule.d.ts.map +1 -1
- package/dist/components/MathCardV2/scenes/ExplanationScene/ExplanationScene.d.ts.map +1 -1
- package/dist/components/MathCardV2/scenes/QuestionScene/QuestionScene.d.ts.map +1 -1
- package/dist/components/MathCardV2/scenes/SuccessScene/SuccessScene.d.ts.map +1 -1
- package/dist/components/StatBlock/StatBlock.css +331 -0
- package/dist/components/StatBlock/StatBlock.d.ts +7 -0
- package/dist/components/StatBlock/StatBlock.d.ts.map +1 -0
- package/dist/components/StatBlock/index.d.ts +5 -0
- package/dist/components/StatBlock/index.d.ts.map +1 -0
- package/dist/components/StatBlock/types.d.ts +116 -0
- package/dist/components/StatBlock/types.d.ts.map +1 -0
- package/dist/components/Table/Table.d.ts +14 -0
- package/dist/components/Table/Table.d.ts.map +1 -0
- package/dist/components/Table/hooks/useTableCore.d.ts +13 -0
- package/dist/components/Table/hooks/useTableCore.d.ts.map +1 -0
- package/dist/components/Table/hooks/useTableState.d.ts +10 -0
- package/dist/components/Table/hooks/useTableState.d.ts.map +1 -0
- package/dist/components/Table/index.d.ts +7 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Table/types.d.ts +179 -0
- package/dist/components/Table/types.d.ts.map +1 -0
- package/dist/components/Table/utils/flattenData.d.ts +15 -0
- package/dist/components/Table/utils/flattenData.d.ts.map +1 -0
- package/dist/components/Table/utils/mergeClass.d.ts +6 -0
- package/dist/components/Table/utils/mergeClass.d.ts.map +1 -0
- package/dist/data/GeometryProblemAdapterV4/jsondata/right-triangle-v4.json +595 -0
- package/dist/data/GeometryProblemAdapterV4/jsondata/triangle-v4-final.json +2 -2
- package/dist/data/TriangleAdapterV3/resolvers/transformRefResolver.d.ts +4 -0
- package/dist/data/TriangleAdapterV3/resolvers/transformRefResolver.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/transformers/geometryTransformTransformer.d.ts.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +311 -239
- package/dist/index.mjs.map +1 -1
- package/dist/mathwiz-ui.css +1 -1
- package/dist/pages/GradeUnitBrowserPage/GradeUnitBrowserPage.d.ts.map +1 -1
- package/dist/pages/MathSessionPage/MathSessionPage.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/index.css +34 -0
- package/package.json +5 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Button Component Styles */
|
|
2
|
-
.button {
|
|
2
|
+
.button, .mathwiz-btn {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
@@ -18,155 +18,223 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* Button Sizes */
|
|
21
|
-
.button--sm {
|
|
21
|
+
.button--sm, .mathwiz-btn--sm {
|
|
22
22
|
padding: 0.375rem 0.75rem;
|
|
23
23
|
font-size: 0.75rem;
|
|
24
24
|
min-height: 1.75rem;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.button--md {
|
|
27
|
+
.button--md, .mathwiz-btn--md {
|
|
28
28
|
padding: 0.5rem 1rem;
|
|
29
29
|
font-size: 0.875rem;
|
|
30
30
|
min-height: 2.25rem;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.button--lg {
|
|
33
|
+
.button--lg, .mathwiz-btn--lg {
|
|
34
34
|
padding: 0.75rem 1.5rem;
|
|
35
35
|
font-size: 1rem;
|
|
36
36
|
min-height: 2.75rem;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/* Border Radius */
|
|
40
|
-
.button--radius-sm {
|
|
40
|
+
.button--radius-sm, .mathwiz-btn--radius-sm {
|
|
41
41
|
border-radius: 0.25rem;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.button--radius-md {
|
|
44
|
+
.button--radius-md, .mathwiz-btn--radius-md {
|
|
45
45
|
border-radius: 0.375rem;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.button--radius-lg {
|
|
48
|
+
.button--radius-lg, .mathwiz-btn--radius-lg {
|
|
49
49
|
border-radius: 0.5rem;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/* Color Variants - Primary (未开始) */
|
|
53
|
-
.button--primary {
|
|
53
|
+
.button--primary, .mathwiz-btn--primary {
|
|
54
54
|
background-color: #3b82f6;
|
|
55
55
|
color: white;
|
|
56
56
|
border-color: #3b82f6;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.button--primary:hover {
|
|
59
|
+
.button--primary:hover, .mathwiz-btn--primary:hover {
|
|
60
60
|
background-color: #2563eb;
|
|
61
61
|
border-color: #2563eb;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.button--primary:focus-visible {
|
|
64
|
+
.button--primary:focus-visible, .mathwiz-btn--primary:focus-visible {
|
|
65
65
|
outline: 2px solid #3b82f6;
|
|
66
66
|
outline-offset: 2px;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/* Color Variants - Secondary (进行中) */
|
|
70
|
-
.button--secondary {
|
|
70
|
+
.button--secondary, .mathwiz-btn--secondary {
|
|
71
71
|
background-color: #6b7280;
|
|
72
72
|
color: white;
|
|
73
73
|
border-color: #6b7280;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.button--secondary:hover {
|
|
76
|
+
.button--secondary:hover, .mathwiz-btn--secondary:hover {
|
|
77
77
|
background-color: #4b5563;
|
|
78
78
|
border-color: #4b5563;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.button--secondary:focus-visible {
|
|
81
|
+
.button--secondary:focus-visible, .mathwiz-btn--secondary:focus-visible {
|
|
82
82
|
outline: 2px solid #6b7280;
|
|
83
83
|
outline-offset: 2px;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/* Color Variants - Success (已完成) */
|
|
87
|
-
.button--success {
|
|
87
|
+
.button--success, .mathwiz-btn--success {
|
|
88
88
|
background-color: #10b981;
|
|
89
89
|
color: white;
|
|
90
90
|
border-color: #10b981;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.button--success:hover {
|
|
93
|
+
.button--success:hover, .mathwiz-btn--success:hover {
|
|
94
94
|
background-color: #059669;
|
|
95
95
|
border-color: #059669;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.button--success:focus-visible {
|
|
98
|
+
.button--success:focus-visible, .mathwiz-btn--success:focus-visible {
|
|
99
99
|
outline: 2px solid #10b981;
|
|
100
100
|
outline-offset: 2px;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
/* Intent Variants - Semantic button styles */
|
|
104
|
+
.mathwiz-btn--submit {
|
|
105
|
+
background-color: #10b981;
|
|
106
|
+
color: white;
|
|
107
|
+
border-color: #10b981;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mathwiz-btn--submit:hover {
|
|
111
|
+
background-color: #059669;
|
|
112
|
+
border-color: #059669;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.mathwiz-btn--submit:focus-visible {
|
|
116
|
+
outline: 2px solid #10b981;
|
|
117
|
+
outline-offset: 2px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.mathwiz-btn--next {
|
|
121
|
+
background-color: #3b82f6;
|
|
122
|
+
color: white;
|
|
123
|
+
border-color: #3b82f6;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mathwiz-btn--next:hover {
|
|
127
|
+
background-color: #2563eb;
|
|
128
|
+
border-color: #2563eb;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mathwiz-btn--next:focus-visible {
|
|
132
|
+
outline: 2px solid #3b82f6;
|
|
133
|
+
outline-offset: 2px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.mathwiz-btn--retry {
|
|
137
|
+
background-color: #f59e0b;
|
|
138
|
+
color: white;
|
|
139
|
+
border-color: #f59e0b;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mathwiz-btn--retry:hover {
|
|
143
|
+
background-color: #d97706;
|
|
144
|
+
border-color: #d97706;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mathwiz-btn--retry:focus-visible {
|
|
148
|
+
outline: 2px solid #f59e0b;
|
|
149
|
+
outline-offset: 2px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.mathwiz-btn--solve {
|
|
153
|
+
background-color: #6b7280;
|
|
154
|
+
color: white;
|
|
155
|
+
border-color: #6b7280;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.mathwiz-btn--solve:hover {
|
|
159
|
+
background-color: #4b5563;
|
|
160
|
+
border-color: #4b5563;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.mathwiz-btn--solve:focus-visible {
|
|
164
|
+
outline: 2px solid #6b7280;
|
|
165
|
+
outline-offset: 2px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Note: .mathwiz-btn--primary, .mathwiz-btn--secondary, .mathwiz-btn--default */
|
|
169
|
+
/* are already defined in color variants above */
|
|
170
|
+
|
|
103
171
|
/* Style Variants - Solid (默认) */
|
|
104
172
|
.button--solid {
|
|
105
173
|
/* Solid styles are the default, defined in color variants */
|
|
106
174
|
}
|
|
107
175
|
|
|
108
176
|
/* Style Variants - Bordered */
|
|
109
|
-
.button--bordered.button--primary {
|
|
177
|
+
.button--bordered.button--primary, .mathwiz-btn--bordered.mathwiz-btn--primary {
|
|
110
178
|
background-color: transparent;
|
|
111
179
|
color: #3b82f6;
|
|
112
180
|
border-color: #3b82f6;
|
|
113
181
|
}
|
|
114
182
|
|
|
115
|
-
.button--bordered.button--primary:hover {
|
|
183
|
+
.button--bordered.button--primary:hover, .mathwiz-btn--bordered.mathwiz-btn--primary:hover {
|
|
116
184
|
background-color: #3b82f6;
|
|
117
185
|
color: white;
|
|
118
186
|
}
|
|
119
187
|
|
|
120
|
-
.button--bordered.button--secondary {
|
|
188
|
+
.button--bordered.button--secondary, .mathwiz-btn--bordered.mathwiz-btn--secondary {
|
|
121
189
|
background-color: transparent;
|
|
122
190
|
color: #6b7280;
|
|
123
191
|
border-color: #6b7280;
|
|
124
192
|
}
|
|
125
193
|
|
|
126
|
-
.button--bordered.button--secondary:hover {
|
|
194
|
+
.button--bordered.button--secondary:hover, .mathwiz-btn--bordered.mathwiz-btn--secondary:hover {
|
|
127
195
|
background-color: #6b7280;
|
|
128
196
|
color: white;
|
|
129
197
|
}
|
|
130
198
|
|
|
131
|
-
.button--bordered.button--success {
|
|
199
|
+
.button--bordered.button--success, .mathwiz-btn--bordered.mathwiz-btn--success {
|
|
132
200
|
background-color: transparent;
|
|
133
201
|
color: #10b981;
|
|
134
202
|
border-color: #10b981;
|
|
135
203
|
}
|
|
136
204
|
|
|
137
|
-
.button--bordered.button--success:hover {
|
|
205
|
+
.button--bordered.button--success:hover, .mathwiz-btn--bordered.mathwiz-btn--success:hover {
|
|
138
206
|
background-color: #10b981;
|
|
139
207
|
color: white;
|
|
140
208
|
}
|
|
141
209
|
|
|
142
210
|
/* Style Variants - Light */
|
|
143
|
-
.button--light.button--primary {
|
|
211
|
+
.button--light.button--primary, .mathwiz-btn--light.mathwiz-btn--primary {
|
|
144
212
|
background-color: #dbeafe;
|
|
145
213
|
color: #1e40af;
|
|
146
214
|
border-color: transparent;
|
|
147
215
|
}
|
|
148
216
|
|
|
149
|
-
.button--light.button--primary:hover {
|
|
217
|
+
.button--light.button--primary:hover, .mathwiz-btn--light.mathwiz-btn--primary:hover {
|
|
150
218
|
background-color: #bfdbfe;
|
|
151
219
|
}
|
|
152
220
|
|
|
153
|
-
.button--light.button--secondary {
|
|
221
|
+
.button--light.button--secondary, .mathwiz-btn--light.mathwiz-btn--secondary {
|
|
154
222
|
background-color: #f3f4f6;
|
|
155
223
|
color: #374151;
|
|
156
224
|
border-color: transparent;
|
|
157
225
|
}
|
|
158
226
|
|
|
159
|
-
.button--light.button--secondary:hover {
|
|
227
|
+
.button--light.button--secondary:hover, .mathwiz-btn--light.mathwiz-btn--secondary:hover {
|
|
160
228
|
background-color: #e5e7eb;
|
|
161
229
|
}
|
|
162
230
|
|
|
163
|
-
.button--light.button--success {
|
|
231
|
+
.button--light.button--success, .mathwiz-btn--light.mathwiz-btn--success {
|
|
164
232
|
background-color: #d1fae5;
|
|
165
233
|
color: #065f46;
|
|
166
234
|
border-color: transparent;
|
|
167
235
|
}
|
|
168
236
|
|
|
169
|
-
.button--light.button--success:hover {
|
|
237
|
+
.button--light.button--success:hover, .mathwiz-btn--light.mathwiz-btn--success:hover {
|
|
170
238
|
background-color: #a7f3d0;
|
|
171
239
|
}
|
|
172
240
|
|
|
@@ -187,26 +255,26 @@
|
|
|
187
255
|
}
|
|
188
256
|
|
|
189
257
|
/* Loading state (optional) */
|
|
190
|
-
.button--loading {
|
|
258
|
+
.button--loading, .mathwiz-btn--loading {
|
|
191
259
|
pointer-events: none;
|
|
192
260
|
opacity: 0.8;
|
|
193
261
|
}
|
|
194
262
|
|
|
195
263
|
/* Responsive design */
|
|
196
264
|
@media (max-width: 768px) {
|
|
197
|
-
.button--sm {
|
|
265
|
+
.button--sm, .mathwiz-btn--sm {
|
|
198
266
|
padding: 0.25rem 0.5rem;
|
|
199
267
|
font-size: 0.6875rem;
|
|
200
268
|
min-height: 1.5rem;
|
|
201
269
|
}
|
|
202
270
|
|
|
203
|
-
.button--md {
|
|
271
|
+
.button--md, .mathwiz-btn--md {
|
|
204
272
|
padding: 0.375rem 0.75rem;
|
|
205
273
|
font-size: 0.8125rem;
|
|
206
274
|
min-height: 2rem;
|
|
207
275
|
}
|
|
208
276
|
|
|
209
|
-
.button--lg {
|
|
277
|
+
.button--lg, .mathwiz-btn--lg {
|
|
210
278
|
padding: 0.5rem 1rem;
|
|
211
279
|
font-size: 0.875rem;
|
|
212
280
|
min-height: 2.25rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA+CxC,CAAC"}
|
|
@@ -44,6 +44,25 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
44
44
|
* @example true // 显示加载状态
|
|
45
45
|
*/
|
|
46
46
|
loading?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* 按钮语义意图,用于生成特定类名和样式
|
|
49
|
+
* @default undefined
|
|
50
|
+
* @example 'submit' // 提交按钮
|
|
51
|
+
* @example 'next' // 下一步按钮
|
|
52
|
+
* @example 'retry' // 重试按钮
|
|
53
|
+
* @example 'solve' // 解题按钮
|
|
54
|
+
* @example 'primary' // 主要按钮
|
|
55
|
+
* @example 'secondary' // 次要按钮
|
|
56
|
+
* @example 'default' // 默认按钮
|
|
57
|
+
*/
|
|
58
|
+
intent?: 'submit' | 'next' | 'retry' | 'solve' | 'primary' | 'secondary' | 'default';
|
|
59
|
+
/**
|
|
60
|
+
* 是否使用新的类名前缀 (mathwiz-btn)
|
|
61
|
+
* @default false
|
|
62
|
+
* @example true // 使用 mathwiz-btn 前缀
|
|
63
|
+
* @example false // 使用旧的 button 前缀(向后兼容)
|
|
64
|
+
*/
|
|
65
|
+
useNewClassName?: boolean;
|
|
47
66
|
}
|
|
48
67
|
export type GetButtonColorClassFn = (progress: number) => string;
|
|
49
68
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACzC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAC;IACzC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IACrF;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAGD,MAAM,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolveModule.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/modules/SolveModule/SolveModule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SolveModule.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/modules/SolveModule/SolveModule.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsKlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplanationScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/ExplanationScene/ExplanationScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ExplanationScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/ExplanationScene/ExplanationScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAoF5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuestionScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/QuestionScene/QuestionScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"QuestionScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/QuestionScene/QuestionScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8EtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuccessScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/SuccessScene/SuccessScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SuccessScene.d.ts","sourceRoot":"","sources":["../../../../../src/components/MathCardV2/scenes/SuccessScene/SuccessScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,oBAAoB,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8CpD,CAAC"}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* StatBlock 组件样式文件
|
|
3
|
+
* 注意:组件不内置样式体系,业务项目控制实际样式
|
|
4
|
+
* 以下提供CSS变量定义和类名结构,以及可选的默认主题示例
|
|
5
|
+
* 业务项目可以完全覆盖这些变量或使用默认主题
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ========================
|
|
9
|
+
* CSS 变量定义(设计令牌)- 核心主题化变量
|
|
10
|
+
* ======================== */
|
|
11
|
+
|
|
12
|
+
.mathwiz-statblock {
|
|
13
|
+
/* 主题色控制 - 通过行内样式覆盖实现主题切换 */
|
|
14
|
+
--statblock-current-theme-color: var(--mathwiz-statblock-theme-green, #90c842);
|
|
15
|
+
|
|
16
|
+
/* 背景与容器 */
|
|
17
|
+
--statblock-bg: var(--mathwiz-statblock-bg-base, #f4f4f4);
|
|
18
|
+
--statblock-header-bg: var(--statblock-current-theme-color);
|
|
19
|
+
--statblock-border: var(--mathwiz-statblock-border-light, #e6e6e6);
|
|
20
|
+
--statblock-shadow: none;
|
|
21
|
+
|
|
22
|
+
/* 文本颜色 */
|
|
23
|
+
--statblock-text-inverse: var(--mathwiz-statblock-text-inverse, #ffffff);
|
|
24
|
+
--statblock-text-main: var(--mathwiz-statblock-text-main, #737068);
|
|
25
|
+
--statblock-text-muted: var(--mathwiz-statblock-text-muted, #c1c1c1);
|
|
26
|
+
--statblock-label: var(--statblock-text-inverse);
|
|
27
|
+
--statblock-value: var(--statblock-text-main);
|
|
28
|
+
--statblock-unit: var(--statblock-text-muted);
|
|
29
|
+
|
|
30
|
+
/* 排版 */
|
|
31
|
+
--statblock-font-family-header: var(--mathwiz-statblock-font-family-header, 'Zilla Slab', serif);
|
|
32
|
+
--statblock-font-family-number: var(--mathwiz-statblock-font-family-number, 'Open Sans', sans-serif);
|
|
33
|
+
--statblock-font-size-title-main: var(--mathwiz-statblock-font-size-title-main, 18px);
|
|
34
|
+
--statblock-font-size-title-sub: var(--mathwiz-statblock-font-size-title-sub, 14px);
|
|
35
|
+
--statblock-font-size-value-large: var(--mathwiz-statblock-font-size-value-large, 48px);
|
|
36
|
+
--statblock-font-size-time-value: var(--mathwiz-statblock-font-size-time-value, 16px);
|
|
37
|
+
--statblock-font-size-time-label: var(--mathwiz-statblock-font-size-time-label, 11px);
|
|
38
|
+
|
|
39
|
+
/* 尺寸与间距 */
|
|
40
|
+
--statblock-sidebar-width: var(--mathwiz-statblock-sidebar-width, 140px);
|
|
41
|
+
--statblock-spacing-xs: var(--mathwiz-statblock-spacing-xs, 4px);
|
|
42
|
+
--statblock-spacing-sm: var(--mathwiz-statblock-spacing-sm, 8px);
|
|
43
|
+
--statblock-spacing-md: var(--mathwiz-statblock-spacing-md, 16px);
|
|
44
|
+
--statblock-spacing-lg: var(--mathwiz-statblock-spacing-lg, 24px);
|
|
45
|
+
--statblock-spacing-xl: var(--mathwiz-statblock-spacing-xl, 32px);
|
|
46
|
+
--statblock-padding: var(--statblock-spacing-sm) var(--statblock-spacing-xs);
|
|
47
|
+
--statblock-gap: var(--statblock-spacing-md);
|
|
48
|
+
--statblock-icon-gap: var(--statblock-spacing-sm);
|
|
49
|
+
|
|
50
|
+
/* 圆角 */
|
|
51
|
+
--statblock-radius: 0;
|
|
52
|
+
|
|
53
|
+
/* 交互状态 */
|
|
54
|
+
--statblock-hover-bg: rgba(255, 255, 255, 0.1);
|
|
55
|
+
--statblock-active-bg: rgba(255, 255, 255, 0.2);
|
|
56
|
+
--statblock-focus-ring: #3b82f6;
|
|
57
|
+
|
|
58
|
+
/* 时间显示专用 */
|
|
59
|
+
--statblock-time-bg: var(--mathwiz-statblock-bg-white, #ffffff);
|
|
60
|
+
--statblock-time-border: var(--statblock-border);
|
|
61
|
+
--statblock-time-value-color: var(--mathwiz-statblock-theme-blue, #4cb2d4);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ========================
|
|
65
|
+
* 预定义主题色变量 - 业务项目可覆盖
|
|
66
|
+
* ======================== */
|
|
67
|
+
|
|
68
|
+
:root {
|
|
69
|
+
/* 主题色系 - 用于StatBlock头部背景 */
|
|
70
|
+
--mathwiz-statblock-theme-green: #90c842;
|
|
71
|
+
--mathwiz-statblock-theme-blue: #4cb2d4;
|
|
72
|
+
--mathwiz-statblock-theme-orange: #d96338;
|
|
73
|
+
|
|
74
|
+
/* 基础色系 */
|
|
75
|
+
--mathwiz-statblock-bg-base: #f4f4f4;
|
|
76
|
+
--mathwiz-statblock-bg-white: #ffffff;
|
|
77
|
+
--mathwiz-statblock-text-inverse: #ffffff;
|
|
78
|
+
--mathwiz-statblock-text-main: #737068;
|
|
79
|
+
--mathwiz-statblock-text-muted: #c1c1c1;
|
|
80
|
+
--mathwiz-statblock-border-light: #e6e6e6;
|
|
81
|
+
|
|
82
|
+
/* 字体排版 */
|
|
83
|
+
--mathwiz-statblock-font-family-header: 'Zilla Slab', serif;
|
|
84
|
+
--mathwiz-statblock-font-family-number: 'Open Sans', sans-serif;
|
|
85
|
+
--mathwiz-statblock-font-size-title-main: 18px;
|
|
86
|
+
--mathwiz-statblock-font-size-title-sub: 14px;
|
|
87
|
+
--mathwiz-statblock-font-size-value-large: 48px;
|
|
88
|
+
--mathwiz-statblock-font-size-time-value: 16px;
|
|
89
|
+
--mathwiz-statblock-font-size-time-label: 11px;
|
|
90
|
+
|
|
91
|
+
/* 尺寸与间距 */
|
|
92
|
+
--mathwiz-statblock-sidebar-width: 140px;
|
|
93
|
+
--mathwiz-statblock-spacing-xs: 4px;
|
|
94
|
+
--mathwiz-statblock-spacing-sm: 8px;
|
|
95
|
+
--mathwiz-statblock-spacing-md: 16px;
|
|
96
|
+
--mathwiz-statblock-spacing-lg: 24px;
|
|
97
|
+
--mathwiz-statblock-spacing-xl: 32px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* ========================
|
|
101
|
+
* 默认样式实现 - 可选的完整样式示例
|
|
102
|
+
* 业务项目可以选择使用这些样式,或完全覆盖
|
|
103
|
+
* ======================== */
|
|
104
|
+
|
|
105
|
+
/* 根容器 - 基于demo.html的stat-block设计 */
|
|
106
|
+
.mathwiz-statblock {
|
|
107
|
+
width: var(--statblock-sidebar-width);
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
background-color: var(--statblock-bg);
|
|
111
|
+
position: relative;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* 头部容器 - 主题色背景 */
|
|
116
|
+
.mathwiz-statblock-header {
|
|
117
|
+
background-color: var(--statblock-header-bg);
|
|
118
|
+
padding: var(--statblock-padding);
|
|
119
|
+
text-align: center;
|
|
120
|
+
color: var(--statblock-label);
|
|
121
|
+
font-family: var(--statblock-font-family-header);
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
min-height: 60px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* 头部标题文本 */
|
|
129
|
+
.mathwiz-statblock-title {
|
|
130
|
+
font-size: var(--statblock-font-size-title-main);
|
|
131
|
+
font-weight: 700;
|
|
132
|
+
line-height: 1.1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mathwiz-statblock-subtitle {
|
|
136
|
+
font-size: var(--statblock-font-size-title-sub);
|
|
137
|
+
font-weight: 600;
|
|
138
|
+
margin-top: 2px;
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
gap: 4px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* 帮助图标 */
|
|
146
|
+
.mathwiz-statblock-help-icon {
|
|
147
|
+
display: inline-flex;
|
|
148
|
+
align-items: center;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
width: 14px;
|
|
151
|
+
height: 14px;
|
|
152
|
+
background-color: var(--statblock-text-inverse);
|
|
153
|
+
color: var(--statblock-current-theme-color);
|
|
154
|
+
border-radius: 50%;
|
|
155
|
+
font-family: var(--statblock-font-family-number);
|
|
156
|
+
font-size: 10px;
|
|
157
|
+
font-weight: bold;
|
|
158
|
+
cursor: help;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* 主体容器 */
|
|
162
|
+
.mathwiz-statblock-body {
|
|
163
|
+
padding: var(--statblock-spacing-xl) 0;
|
|
164
|
+
display: flex;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
align-items: center;
|
|
167
|
+
min-height: 100px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* 单一巨大数字样式 */
|
|
171
|
+
.mathwiz-statblock-value-large {
|
|
172
|
+
font-family: var(--statblock-font-family-number);
|
|
173
|
+
font-size: var(--statblock-font-size-value-large);
|
|
174
|
+
font-weight: 700;
|
|
175
|
+
color: var(--statblock-value);
|
|
176
|
+
line-height: 1;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* ========================
|
|
180
|
+
* 时间显示子组件样式
|
|
181
|
+
* 当contentType为'time'时使用
|
|
182
|
+
* ======================== */
|
|
183
|
+
|
|
184
|
+
.mathwiz-statblock-time-display {
|
|
185
|
+
display: flex;
|
|
186
|
+
gap: var(--statblock-spacing-xs);
|
|
187
|
+
padding: 0 var(--statblock-spacing-xs);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.mathwiz-statblock-time-unit {
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
align-items: center;
|
|
194
|
+
gap: 2px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mathwiz-statblock-time-unit-box {
|
|
198
|
+
background: var(--statblock-time-bg);
|
|
199
|
+
border: 1px solid var(--statblock-time-border);
|
|
200
|
+
width: 38px;
|
|
201
|
+
height: 38px;
|
|
202
|
+
display: flex;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
align-items: center;
|
|
205
|
+
font-family: var(--statblock-font-family-number);
|
|
206
|
+
font-size: var(--statblock-font-size-time-value);
|
|
207
|
+
color: var(--statblock-time-value-color);
|
|
208
|
+
font-weight: 700;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.mathwiz-statblock-time-unit-label {
|
|
212
|
+
font-family: var(--statblock-font-family-header);
|
|
213
|
+
font-size: var(--statblock-font-size-time-label);
|
|
214
|
+
color: var(--statblock-text-muted);
|
|
215
|
+
font-weight: 700;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* ========================
|
|
219
|
+
* 容器复合组件 - ProgressPanel
|
|
220
|
+
* 用于容纳多个StatBlock无缝垂直拼合
|
|
221
|
+
* ======================== */
|
|
222
|
+
|
|
223
|
+
.mathwiz-statblock-progress-panel {
|
|
224
|
+
display: flex;
|
|
225
|
+
flex-direction: column;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* 给除了最后的子元素加一条微妙的分割线 */
|
|
229
|
+
.mathwiz-statblock-progress-panel .mathwiz-statblock + .mathwiz-statblock .mathwiz-statblock-header {
|
|
230
|
+
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* ========================
|
|
234
|
+
* 交互模式样式
|
|
235
|
+
* ======================== */
|
|
236
|
+
|
|
237
|
+
.mathwiz-statblock-interactive {
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
user-select: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.mathwiz-statblock-interactive:hover .mathwiz-statblock-header {
|
|
243
|
+
background-color: color-mix(in srgb, var(--statblock-header-bg) 90%, black);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.mathwiz-statblock-interactive:active .mathwiz-statblock-header {
|
|
247
|
+
background-color: color-mix(in srgb, var(--statblock-header-bg) 80%, black);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.mathwiz-statblock-interactive:focus-visible {
|
|
251
|
+
outline: 2px solid var(--statblock-focus-ring);
|
|
252
|
+
outline-offset: 2px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* ========================
|
|
256
|
+
* 响应式设计
|
|
257
|
+
* ======================== */
|
|
258
|
+
|
|
259
|
+
@media (max-width: 768px) {
|
|
260
|
+
.mathwiz-statblock {
|
|
261
|
+
width: 100%;
|
|
262
|
+
max-width: var(--statblock-sidebar-width);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.mathwiz-statblock-title {
|
|
266
|
+
font-size: calc(var(--statblock-font-size-title-main) * 0.9);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.mathwiz-statblock-value-large {
|
|
270
|
+
font-size: calc(var(--statblock-font-size-value-large) * 0.8);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* ========================
|
|
275
|
+
* 向后兼容层 - 保留旧的类名结构供现有代码使用
|
|
276
|
+
* ======================== */
|
|
277
|
+
|
|
278
|
+
/* 旧版类名兼容 */
|
|
279
|
+
.mathwiz-statblock-content {
|
|
280
|
+
composes: mathwiz-statblock-body;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.mathwiz-statblock-text {
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
flex: 1;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.mathwiz-statblock-label {
|
|
290
|
+
composes: mathwiz-statblock-title;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.mathwiz-statblock-value-container {
|
|
294
|
+
display: flex;
|
|
295
|
+
align-items: baseline;
|
|
296
|
+
gap: 0.25em;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.mathwiz-statblock-value {
|
|
300
|
+
composes: mathwiz-statblock-value-large;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.mathwiz-statblock-unit {
|
|
304
|
+
font-size: var(--statblock-font-size-title-sub);
|
|
305
|
+
color: var(--statblock-unit);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/* 图标位置容器 - 旧版兼容 */
|
|
309
|
+
.mathwiz-statblock-icon-top {
|
|
310
|
+
display: flex;
|
|
311
|
+
justify-content: center;
|
|
312
|
+
margin-bottom: var(--statblock-icon-gap, 0.5rem);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.mathwiz-statblock-icon-left {
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
margin-right: var(--statblock-icon-gap, 0.75rem);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.mathwiz-statblock-icon-right {
|
|
322
|
+
display: flex;
|
|
323
|
+
align-items: center;
|
|
324
|
+
margin-left: var(--statblock-icon-gap, 0.75rem);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.mathwiz-statblock-icon-bottom {
|
|
328
|
+
display: flex;
|
|
329
|
+
justify-content: center;
|
|
330
|
+
margin-top: var(--statblock-icon-gap, 0.5rem);
|
|
331
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './StatBlock.css';
|
|
3
|
+
import type { StatBlockProps } from './types';
|
|
4
|
+
export declare const StatBlock: React.FC<StatBlockProps>;
|
|
5
|
+
declare const _default: React.NamedExoticComponent<StatBlockProps>;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=StatBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatBlock.d.ts","sourceRoot":"","sources":["../../../src/components/StatBlock/StatBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,cAAc,EAA0B,MAAM,SAAS,CAAC;AAGtE,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA0K9C,CAAC;;AAGF,wBAAqC"}
|