@mathwiz/ui-components 0.1.29 → 0.1.30
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/README.md +1 -1
- package/dist/components/HundredChart/HundredChart.css +8 -0
- package/dist/components/HundredChart/HundredChart.d.ts.map +1 -1
- package/dist/components/HundredChart/HundredChart.types.d.ts +29 -0
- package/dist/components/HundredChart/HundredChart.types.d.ts.map +1 -1
- package/dist/components/HundredChart/HundredChart.utils.d.ts +13 -1
- package/dist/components/HundredChart/HundredChart.utils.d.ts.map +1 -1
- package/dist/components/HundredChart/index.d.ts +2 -2
- package/dist/components/HundredChart/index.d.ts.map +1 -1
- package/dist/components/MathCardV2/DecimalNumberRecognitionSessionStore.d.ts +2 -2
- package/dist/components/MathCardV2/DecimalNumberRecognitionSessionStore.d.ts.map +1 -1
- package/dist/components/MathCardV2/ExplanationStep.d.ts +9 -0
- package/dist/components/MathCardV2/ExplanationStep.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathCardV2.css +11 -4
- package/dist/components/MathCardV2/MathCardV2.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathCardV2.types.d.ts +51 -1
- package/dist/components/MathCardV2/MathCardV2.types.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeSessionStore.d.ts +3 -3
- package/dist/components/MathCardV2/MathPracticeSessionStore.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeSessionTypes.d.ts +38 -18
- package/dist/components/MathCardV2/MathPracticeSessionTypes.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeStoreContext.d.ts +3 -9
- package/dist/components/MathCardV2/MathPracticeStoreContext.d.ts.map +1 -1
- package/dist/components/MathCardV2/MathPracticeStoreHooks.d.ts +3 -2
- package/dist/components/MathCardV2/MathPracticeStoreHooks.d.ts.map +1 -1
- package/dist/components/MathCardV2/components/content/OptionGroupContent.d.ts +10 -0
- package/dist/components/MathCardV2/components/content/OptionGroupContent.d.ts.map +1 -0
- package/dist/components/MathCardV2/components/renderers/ContentRenderer.d.ts.map +1 -1
- package/dist/components/MathCardV2/hooks/useDataAdapter.d.ts.map +1 -1
- package/dist/components/MathCardV2/hooks/useMeetingProblemAdapter.d.ts.map +1 -1
- package/dist/components/MathCardV2/modules/ReviewModule/ReviewModule.d.ts.map +1 -1
- package/dist/components/MathCardV2/scenes/ExplanationScene/ExplanationScene.d.ts.map +1 -1
- package/dist/components/MathCardV2/scenes/QuestionScene/QuestionScene.css +18 -18
- package/dist/components/MathCardV2/scenes/QuestionScene/QuestionScene.d.ts.map +1 -1
- package/dist/components/OptionGroup/OptionCard.d.ts +11 -0
- package/dist/components/OptionGroup/OptionCard.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionCard.styles.d.ts +87 -0
- package/dist/components/OptionGroup/OptionCard.styles.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionGroup.d.ts +11 -0
- package/dist/components/OptionGroup/OptionGroup.d.ts.map +1 -0
- package/dist/components/OptionGroup/OptionGroup.types.d.ts +71 -0
- package/dist/components/OptionGroup/OptionGroup.types.d.ts.map +1 -0
- package/dist/components/OptionGroup/index.d.ts +5 -0
- package/dist/components/OptionGroup/index.d.ts.map +1 -0
- package/dist/components/StatBlock/StatBlock.css +330 -330
- package/dist/data/GeometryProblemAdapterV4/geometry-types.d.ts +119 -4
- package/dist/data/GeometryProblemAdapterV4/geometry-types.d.ts.map +1 -1
- package/dist/data/GeometryProblemAdapterV4/jsondata/parallelogram-revised.json +721 -721
- package/dist/data/GeometryProblemAdapterV4/jsondata/right-triangle-v4.json +594 -594
- package/dist/data/GeometryProblemAdapterV4/jsondata/trapezoid-v4-final.json +469 -469
- package/dist/data/GeometryProblemAdapterV4/jsondata/triangle-v4-final.json +1 -1
- package/dist/data/GeometryProblemAdapterV4/types.d.ts +2 -0
- package/dist/data/GeometryProblemAdapterV4/types.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/config/embeddedConfigs.d.ts +96 -18
- package/dist/data/TriangleAdapterV3/config/embeddedConfigs.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/config/index.d.ts +64 -12
- package/dist/data/TriangleAdapterV3/config/index.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/core/syncAdapter.d.ts +5 -0
- package/dist/data/TriangleAdapterV3/core/syncAdapter.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/transformers/hundredChartTransformer.d.ts +58 -0
- package/dist/data/TriangleAdapterV3/transformers/hundredChartTransformer.d.ts.map +1 -0
- package/dist/data/TriangleAdapterV3/transformers/index.d.ts +2 -0
- package/dist/data/TriangleAdapterV3/transformers/index.d.ts.map +1 -1
- package/dist/data/TriangleAdapterV3/transformers/optionGroupTransformer.d.ts +29 -0
- package/dist/data/TriangleAdapterV3/transformers/optionGroupTransformer.d.ts.map +1 -0
- package/dist/data/TriangleAdapterV3/types.d.ts +3 -0
- package/dist/data/TriangleAdapterV3/types.d.ts.map +1 -1
- package/dist/data/config/style-presets.json +27 -3
- package/dist/data/dataSchema/OpenAPI/openapi.json +5777 -5777
- package/dist/data/problems/factorProblemV4-backup.json +427 -0
- package/dist/data/problems/factorProblemV4.json +462 -0
- package/dist/data/problems/factorProblemV4_backup_20260311.json +436 -0
- package/dist/index.cjs +103 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +12091 -6033
- package/dist/index.mjs.map +1 -1
- package/dist/mathwiz-ui.css +1 -1
- package/dist/pages/AreaGeometrySessionPage/AreaGeometrySessionPageIXL.css +385 -0
- package/dist/pages/AreaGeometrySessionPage/AreaGeometrySessionPageIXL.d.ts +29 -0
- package/dist/pages/AreaGeometrySessionPage/AreaGeometrySessionPageIXL.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/components/LearningDashboardPlaceholder.css +219 -0
- package/dist/pages/AreaGeometrySessionPage/components/LearningDashboardPlaceholder.d.ts +15 -0
- package/dist/pages/AreaGeometrySessionPage/components/LearningDashboardPlaceholder.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/components/ReviewSectionPlaceholder.css +64 -0
- package/dist/pages/AreaGeometrySessionPage/components/ReviewSectionPlaceholder.d.ts +11 -0
- package/dist/pages/AreaGeometrySessionPage/components/ReviewSectionPlaceholder.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/components/ScaffoldingPlaceholder.css +59 -0
- package/dist/pages/AreaGeometrySessionPage/components/ScaffoldingPlaceholder.d.ts +14 -0
- package/dist/pages/AreaGeometrySessionPage/components/ScaffoldingPlaceholder.d.ts.map +1 -0
- package/dist/pages/AreaGeometrySessionPage/index.d.ts +3 -1
- package/dist/pages/AreaGeometrySessionPage/index.d.ts.map +1 -1
- package/dist/pages/AreaGeometrySessionPage/types.d.ts +25 -0
- package/dist/pages/AreaGeometrySessionPage/types.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/styles/mathcard-tokens.css +47 -5
- package/package.json +1 -1
|
@@ -1,331 +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);
|
|
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
331
|
}
|