@taskon/widget-react 0.0.1-beta.2 → 0.0.1-beta.4
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 +56 -17
- package/dist/CommunityTaskList.css +1593 -1741
- package/dist/EligibilityInfo.css +1275 -582
- package/dist/LeaderboardWidget.css +355 -152
- package/dist/PageBuilder.css +0 -2
- package/dist/Quest.css +1140 -903
- package/dist/TaskOnProvider.css +50 -31
- package/dist/UserCenterWidget.css +108 -237
- package/dist/UserCenterWidget2.css +2016 -711
- package/dist/chunks/{CommunityTaskList-BlH1Wdd5.js → CommunityTaskList-C9Gv8KOF.js} +962 -827
- package/dist/chunks/{EligibilityInfo-C7GZ2G5u.js → EligibilityInfo-D-Fuy9GE.js} +1137 -449
- package/dist/chunks/{LeaderboardWidget-CmYfDeHV.js → LeaderboardWidget-BV2D2q1N.js} +15 -10
- package/dist/chunks/{PageBuilder-Bw0zSkFh.js → PageBuilder-DQoU4Mwf.js} +5 -5
- package/dist/chunks/{Quest-DKFZ-pPU.js → Quest-B5NyVr3o.js} +516 -325
- package/dist/chunks/{TaskOnProvider-BD6Vp2x8.js → TaskOnProvider-93UxARFo.js} +2 -207
- package/dist/chunks/{ThemeProvider-wnSXrNQb.js → ThemeProvider-CPI_roeh.js} +249 -57
- package/dist/chunks/{UserCenterWidget-Cw6h_5hT.js → UserCenterWidget-BRtigY_S.js} +206 -1002
- package/dist/chunks/UserCenterWidget-cADBSVg7.js +8358 -0
- package/dist/chunks/{WidgetShell-D_5OjvNZ.js → dynamic-import-helper-DwXlQC0S.js} +607 -40
- package/dist/chunks/useToast-CaRkylKe.js +304 -0
- package/dist/chunks/{usercenter-ja-uu-XfVF9.js → usercenter-ja-B2465c1O.js} +4 -10
- package/dist/chunks/{usercenter-ko-DYgUOVzd.js → usercenter-ko-xAEYxqLg.js} +4 -10
- package/dist/community-task.d.ts +34 -3
- package/dist/community-task.js +1 -1
- package/dist/core.d.ts +40 -3
- package/dist/core.js +9 -10
- package/dist/dynamic-import-helper.css +596 -289
- package/dist/index.d.ts +207 -10
- package/dist/index.js +21 -19
- package/dist/leaderboard.d.ts +8 -1
- package/dist/leaderboard.js +2 -2
- package/dist/page-builder.js +1 -1
- package/dist/quest.d.ts +8 -2
- package/dist/quest.js +1 -1
- package/dist/user-center.d.ts +20 -136
- package/dist/user-center.js +19 -236
- package/package.json +10 -2
- package/dist/TipPopover.css +0 -210
- package/dist/WidgetShell.css +0 -182
- package/dist/chunks/TipPopover-BrW8jo71.js +0 -2926
- package/dist/chunks/UserCenterWidget-BE329iS7.js +0 -3546
- package/dist/chunks/dynamic-import-helper-DxEFwm31.js +0 -537
- package/dist/chunks/useToast-B-wyO5zL.js +0 -93
- package/dist/chunks/useWidgetLocale-JDelxtt8.js +0 -74
|
@@ -1,331 +1,609 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/*
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Dialog 组件样式
|
|
3
|
+
* 基于 Radix UI Dialog 封装
|
|
4
|
+
* 使用 taskon-dialog-* 命名空间
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Responsive base styles
|
|
9
|
+
*
|
|
10
|
+
* Keep mobile breakpoints and fallback patterns centralized here.
|
|
11
|
+
* Components should reuse these mixins instead of duplicating query logic.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Desktop-up mixin:
|
|
16
|
+
* 1) Enable desktop enhancement in wider containers
|
|
17
|
+
* 2) Keep viewport media query as fallback
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/* ==================== 遮罩层 ==================== */
|
|
21
|
+
|
|
22
|
+
.taskon-dialog-overlay {
|
|
23
|
+
position: fixed;
|
|
24
|
+
inset: 0;
|
|
25
|
+
z-index: 9998;
|
|
26
|
+
/* 遮罩层统一使用通用 mask token */
|
|
27
|
+
background-color: var(--taskon-color-bg-mask);
|
|
28
|
+
backdrop-filter: blur(24px);
|
|
29
|
+
|
|
30
|
+
/* 动画 */
|
|
31
|
+
animation: taskon-dialog-overlay-fade-in 150ms ease-out;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.taskon-dialog-overlay[data-state="closed"] {
|
|
35
|
+
animation: taskon-dialog-overlay-fade-out 150ms ease-in;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@keyframes taskon-dialog-overlay-fade-in {
|
|
39
|
+
from {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
}
|
|
42
|
+
to {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@keyframes taskon-dialog-overlay-fade-out {
|
|
48
|
+
from {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
}
|
|
51
|
+
to {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ==================== 弹窗内容 ==================== */
|
|
57
|
+
|
|
58
|
+
.taskon-dialog-content {
|
|
59
|
+
position: fixed;
|
|
60
|
+
top: 50%;
|
|
61
|
+
left: 50%;
|
|
62
|
+
transform: translate(-50%, -50%);
|
|
63
|
+
z-index: 9999;
|
|
64
|
+
|
|
65
|
+
/* 尺寸 */
|
|
66
|
+
width: 95vw;
|
|
67
|
+
max-width: 500px;
|
|
68
|
+
max-height: 90vh;
|
|
69
|
+
|
|
70
|
+
/* 弹层统一使用 floating 背景 token */
|
|
71
|
+
background-color: var(--taskon-color-bg-floating);
|
|
72
|
+
color: var(--taskon-color-text);
|
|
73
|
+
border-radius: var(--taskon-border-radius);
|
|
74
|
+
box-shadow: 0 25px 50px -12px var(--taskon-color-bg-mask);
|
|
75
|
+
|
|
76
|
+
/* 布局 */
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
|
|
81
|
+
/* 移除默认的 focus outline */
|
|
82
|
+
outline: none;
|
|
83
|
+
|
|
84
|
+
/* 动画 */
|
|
85
|
+
animation: taskon-dialog-content-fade-in 200ms ease-out;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.taskon-dialog-content[data-state="closed"] {
|
|
89
|
+
animation: taskon-dialog-content-fade-out 150ms ease-in;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes taskon-dialog-content-fade-in {
|
|
93
|
+
from {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
96
|
+
}
|
|
97
|
+
to {
|
|
98
|
+
opacity: 1;
|
|
99
|
+
transform: translate(-50%, -50%) scale(1);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@keyframes taskon-dialog-content-fade-out {
|
|
104
|
+
from {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
transform: translate(-50%, -50%) scale(1);
|
|
107
|
+
}
|
|
108
|
+
to {
|
|
109
|
+
opacity: 0;
|
|
110
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* ==================== 无障碍标题/描述(屏幕阅读器可见) ==================== */
|
|
115
|
+
|
|
116
|
+
.taskon-dialog-title--sr-only,
|
|
117
|
+
.taskon-dialog-description--sr-only {
|
|
118
|
+
position: absolute;
|
|
119
|
+
width: 1px;
|
|
120
|
+
height: 1px;
|
|
121
|
+
padding: 0;
|
|
122
|
+
margin: -1px;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
clip: rect(0, 0, 0, 0);
|
|
125
|
+
white-space: nowrap;
|
|
126
|
+
border: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ==================== 头部操作区 ==================== */
|
|
130
|
+
|
|
131
|
+
.taskon-dialog-header {
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 12px;
|
|
134
|
+
right: 12px;
|
|
135
|
+
z-index: 1;
|
|
136
|
+
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 8px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.taskon-dialog-header-slot {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* ==================== 关闭按钮 ==================== */
|
|
148
|
+
|
|
149
|
+
.taskon-dialog-close {
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
|
|
154
|
+
width: 32px;
|
|
155
|
+
height: 32px;
|
|
156
|
+
padding: 0;
|
|
157
|
+
|
|
158
|
+
background: var(--taskon-color-bg-surface-subtle);
|
|
159
|
+
border: none;
|
|
160
|
+
border-radius: var(--taskon-border-radius-sm);
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
|
|
163
|
+
color: var(--taskon-color-text-secondary);
|
|
164
|
+
transition: all 0.2s ease;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.taskon-dialog-close:hover {
|
|
168
|
+
background-color: var(--taskon-color-bg-surface);
|
|
169
|
+
color: var(--taskon-color-text);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.taskon-dialog-close:focus-visible {
|
|
173
|
+
outline: 2px solid var(--taskon-color-primary);
|
|
174
|
+
outline-offset: 2px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* ==================== 主体内容 ==================== */
|
|
178
|
+
|
|
179
|
+
.taskon-dialog-body {
|
|
180
|
+
flex: 1;
|
|
181
|
+
overflow-y: auto;
|
|
182
|
+
padding: 20px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.taskon-dialog-body--no-padding {
|
|
186
|
+
padding: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* ==================== Desktop 增强 ==================== */
|
|
190
|
+
|
|
191
|
+
@supports (container-type: inline-size) {
|
|
192
|
+
@container (min-width: 751px) {
|
|
193
|
+
.taskon-dialog-content {
|
|
194
|
+
width: 90vw;
|
|
195
|
+
max-height: 85vh;
|
|
196
|
+
border-radius: var(--taskon-border-radius-lg);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.taskon-dialog-body {
|
|
200
|
+
padding: 24px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.taskon-dialog-header {
|
|
204
|
+
top: 16px;
|
|
205
|
+
right: 16px;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@supports not (container-type: inline-size) {
|
|
211
|
+
@media (min-width: 751px) {
|
|
212
|
+
.taskon-dialog-content {
|
|
213
|
+
width: 90vw;
|
|
214
|
+
max-height: 85vh;
|
|
215
|
+
border-radius: var(--taskon-border-radius-lg);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.taskon-dialog-body {
|
|
219
|
+
padding: 24px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.taskon-dialog-header {
|
|
223
|
+
top: 16px;
|
|
224
|
+
right: 16px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Pagination 通用分页组件样式
|
|
230
|
+
* @description 使用 taskon-pagination 命名空间
|
|
231
|
+
*
|
|
232
|
+
* 设计参考 Figma: node-id=4000-1995
|
|
233
|
+
* - 按钮: 30x30px 圆形
|
|
234
|
+
* - 页码: 16px Regular
|
|
235
|
+
* - 当前页: 高强调文字
|
|
236
|
+
* - 分隔符+总页数: 次级文字
|
|
237
|
+
*/
|
|
238
|
+
|
|
239
|
+
/*
|
|
240
|
+
* Responsive base styles
|
|
241
|
+
*
|
|
242
|
+
* Keep mobile breakpoints and fallback patterns centralized here.
|
|
243
|
+
* Components should reuse these mixins instead of duplicating query logic.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
/*
|
|
247
|
+
* Desktop-up mixin:
|
|
248
|
+
* 1) Enable desktop enhancement in wider containers
|
|
249
|
+
* 2) Keep viewport media query as fallback
|
|
250
|
+
*/
|
|
251
|
+
|
|
252
|
+
/* ==================== 容器 ==================== */
|
|
253
|
+
|
|
254
|
+
.taskon-pagination {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
width: 100%;
|
|
259
|
+
gap: var(--taskon-spacing-sm);
|
|
260
|
+
padding: 12px 0;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* ==================== 范围信息 ==================== */
|
|
264
|
+
|
|
265
|
+
.taskon-pagination-range {
|
|
266
|
+
font-size: 14px;
|
|
267
|
+
color: var(--taskon-color-text-secondary);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* ==================== 控制区 ==================== */
|
|
271
|
+
|
|
272
|
+
.taskon-pagination-controls {
|
|
273
|
+
display: flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
gap: 16px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* ==================== 页码信息 - 基于 Figma 设计 ==================== */
|
|
279
|
+
|
|
280
|
+
.taskon-pagination-info {
|
|
281
|
+
display: flex;
|
|
282
|
+
align-items: center;
|
|
283
|
+
font-size: 16px;
|
|
284
|
+
font-weight: 400;
|
|
285
|
+
white-space: nowrap;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* 当前页码 */
|
|
289
|
+
|
|
290
|
+
.taskon-pagination-info-current {
|
|
291
|
+
color: var(--taskon-color-text);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/* 分隔符 */
|
|
295
|
+
|
|
296
|
+
.taskon-pagination-info-separator {
|
|
297
|
+
color: var(--taskon-color-text-disabled);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* 总页数 */
|
|
301
|
+
|
|
302
|
+
.taskon-pagination-info-total {
|
|
303
|
+
color: var(--taskon-color-text-disabled);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* ==================== 图标 ==================== */
|
|
307
|
+
|
|
308
|
+
.taskon-pagination-icon {
|
|
309
|
+
width: 16px;
|
|
310
|
+
height: 16px;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/* ==================== 按钮样式 - 圆形按钮 ==================== */
|
|
314
|
+
|
|
315
|
+
.taskon-pagination-btn {
|
|
316
|
+
display: inline-flex;
|
|
317
|
+
align-items: center;
|
|
69
318
|
justify-content: center;
|
|
70
319
|
width: 30px;
|
|
71
320
|
height: 30px;
|
|
72
|
-
min-width: 30px !important;
|
|
73
|
-
padding: 0 !important;
|
|
74
|
-
border-radius: 50% !important;
|
|
75
|
-
background-color: transparent !important;
|
|
76
|
-
border: 1px solid var(--taskon-color-border
|
|
77
|
-
color: var(--taskon-color-text
|
|
78
|
-
transition: all 0.2s ease;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.taskon-pagination-btn:hover:not(:disabled) {
|
|
82
|
-
background-color: var(--taskon-color-bg-
|
|
83
|
-
border-color: var(--taskon-color-border
|
|
84
|
-
}
|
|
85
|
-
|
|
321
|
+
min-width: 30px !important;
|
|
322
|
+
padding: 0 !important;
|
|
323
|
+
border-radius: 50% !important;
|
|
324
|
+
background-color: transparent !important;
|
|
325
|
+
border: 1px solid var(--taskon-color-border-secondary) !important;
|
|
326
|
+
color: var(--taskon-color-text) !important;
|
|
327
|
+
transition: all 0.2s ease;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.taskon-pagination-btn:hover:not(:disabled) {
|
|
331
|
+
background-color: var(--taskon-color-bg-surface-subtle) !important;
|
|
332
|
+
border-color: var(--taskon-color-border) !important;
|
|
333
|
+
}
|
|
334
|
+
|
|
86
335
|
.taskon-pagination-btn:disabled {
|
|
87
336
|
opacity: 0.4;
|
|
88
337
|
cursor: not-allowed;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* ==================== 尺寸变体 ==================== */
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* ==================== 尺寸变体 ==================== */
|
|
341
|
+
|
|
92
342
|
.taskon-pagination--small .taskon-pagination-range {
|
|
93
343
|
font-size: 12px;
|
|
94
|
-
}
|
|
95
|
-
|
|
344
|
+
}
|
|
345
|
+
|
|
96
346
|
.taskon-pagination--small .taskon-pagination-info {
|
|
97
347
|
font-size: 14px;
|
|
98
|
-
}
|
|
99
|
-
|
|
348
|
+
}
|
|
349
|
+
|
|
100
350
|
.taskon-pagination--small .taskon-pagination-icon {
|
|
101
351
|
width: 14px;
|
|
102
352
|
height: 14px;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.taskon-pagination--small .taskon-pagination-btn {
|
|
106
|
-
width: 24px;
|
|
107
|
-
height: 24px;
|
|
108
|
-
min-width: 24px !important;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/* ====================
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.taskon-pagination--small .taskon-pagination-btn {
|
|
356
|
+
width: 24px;
|
|
357
|
+
height: 24px;
|
|
358
|
+
min-width: 24px !important;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* ==================== Desktop 增强 ==================== */
|
|
362
|
+
|
|
363
|
+
@supports (container-type: inline-size) {
|
|
364
|
+
@container (min-width: 751px) {
|
|
365
|
+
.taskon-pagination {
|
|
366
|
+
gap: var(--taskon-spacing-md);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
@supports not (container-type: inline-size) {
|
|
372
|
+
@media (min-width: 751px) {
|
|
373
|
+
.taskon-pagination {
|
|
374
|
+
gap: var(--taskon-spacing-md);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Table 通用表格组件样式
|
|
380
|
+
*
|
|
128
381
|
* 采用 BEM 命名规范
|
|
129
382
|
* 前缀: taskon-table
|
|
130
383
|
*
|
|
131
384
|
* 设计参考 Figma: node-id=4000-1908
|
|
132
385
|
* - 表头: 半透明背景、圆角、暗色文字
|
|
133
|
-
* - 行: 边框分隔、悬停效果、交替背景
|
|
134
|
-
* - 单元格: 可配置宽度和对齐方式
|
|
135
|
-
*/
|
|
136
|
-
|
|
386
|
+
* - 行: 边框分隔、悬停效果、交替背景
|
|
387
|
+
* - 单元格: 可配置宽度和对齐方式
|
|
388
|
+
*/
|
|
389
|
+
|
|
390
|
+
/*
|
|
391
|
+
* Responsive base styles
|
|
392
|
+
*
|
|
393
|
+
* Keep mobile breakpoints and fallback patterns centralized here.
|
|
394
|
+
* Components should reuse these mixins instead of duplicating query logic.
|
|
395
|
+
*/
|
|
396
|
+
|
|
397
|
+
/*
|
|
398
|
+
* Desktop-up mixin:
|
|
399
|
+
* 1) Enable desktop enhancement in wider containers
|
|
400
|
+
* 2) Keep viewport media query as fallback
|
|
401
|
+
*/
|
|
402
|
+
|
|
137
403
|
/* ============================================================================
|
|
138
404
|
容器
|
|
139
|
-
============================================================================ */
|
|
140
|
-
|
|
405
|
+
============================================================================ */
|
|
406
|
+
|
|
141
407
|
.taskon-table-container {
|
|
142
408
|
width: 100%;
|
|
143
409
|
overflow-x: auto;
|
|
144
410
|
position: relative;
|
|
145
|
-
}
|
|
146
|
-
|
|
411
|
+
}
|
|
412
|
+
|
|
147
413
|
.taskon-table {
|
|
148
414
|
width: 100%;
|
|
149
415
|
border-collapse: separate;
|
|
150
416
|
border-spacing: 0;
|
|
151
|
-
}
|
|
152
|
-
|
|
417
|
+
}
|
|
418
|
+
|
|
153
419
|
/* ============================================================================
|
|
154
420
|
表头 - 参考 Figma 设计:45px 高度,深色半透明背景,无圆角
|
|
155
|
-
============================================================================ */
|
|
156
|
-
|
|
421
|
+
============================================================================ */
|
|
422
|
+
|
|
157
423
|
.taskon-table__head {
|
|
158
424
|
/* 不在 thead 上设置背景,由 th 元素控制 */
|
|
159
|
-
}
|
|
160
|
-
|
|
425
|
+
}
|
|
426
|
+
|
|
161
427
|
.taskon-table__head tr {
|
|
162
428
|
height: 45px;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/* 表头单元格 - 16px Regular,深色半透明背景 */
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
font-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/* 表头单元格 - 16px Regular,深色半透明背景 */
|
|
432
|
+
|
|
433
|
+
.taskon-table__header {
|
|
434
|
+
padding: var(--taskon-spacing-sm) 12px;
|
|
435
|
+
font-size: 16px;
|
|
436
|
+
font-weight: 400;
|
|
437
|
+
text-align: left;
|
|
438
|
+
line-height: 24px;
|
|
439
|
+
color: var(--taskon-color-text-disabled);
|
|
440
|
+
white-space: nowrap;
|
|
441
|
+
vertical-align: middle;
|
|
442
|
+
background-color: var(--taskon-color-bg-surface-subtle);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/* 表头对齐方式 */
|
|
446
|
+
|
|
179
447
|
.taskon-table__header--left {
|
|
180
448
|
text-align: left;
|
|
181
|
-
}
|
|
182
|
-
|
|
449
|
+
}
|
|
450
|
+
|
|
183
451
|
.taskon-table__header--center {
|
|
184
452
|
text-align: center;
|
|
185
|
-
}
|
|
186
|
-
|
|
453
|
+
}
|
|
454
|
+
|
|
187
455
|
.taskon-table__header--right {
|
|
188
456
|
text-align: right;
|
|
189
|
-
}
|
|
190
|
-
|
|
457
|
+
}
|
|
458
|
+
|
|
191
459
|
/* ============================================================================
|
|
192
460
|
表体
|
|
193
|
-
============================================================================ */
|
|
194
|
-
|
|
461
|
+
============================================================================ */
|
|
462
|
+
|
|
195
463
|
.taskon-table__body {
|
|
196
464
|
/* 默认样式 */
|
|
197
|
-
}
|
|
198
|
-
|
|
465
|
+
}
|
|
466
|
+
|
|
199
467
|
/* ============================================================================
|
|
200
468
|
数据行 - 参考 Figma 设计:更大行高(76px),无边框
|
|
201
|
-
============================================================================ */
|
|
202
|
-
|
|
469
|
+
============================================================================ */
|
|
470
|
+
|
|
203
471
|
.taskon-table__row {
|
|
204
472
|
transition: background-color 0.2s ease;
|
|
205
473
|
height: 76px;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/* 行边框 - 默认不显示,使用 borderless 类控制 */
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* 行边框 - 默认不显示,使用 borderless 类控制 */
|
|
477
|
+
|
|
209
478
|
.taskon-table__row td {
|
|
210
479
|
border-top: none;
|
|
211
480
|
border-bottom: none;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/* 需要边框时的样式 */
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
border-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
.taskon-table__row--highlighted
|
|
236
|
-
background-color: var(--taskon-color-primary-bg
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/* 需要边框时的样式 */
|
|
484
|
+
|
|
485
|
+
.taskon-table--bordered .taskon-table__row td {
|
|
486
|
+
border-top: 1px solid var(--taskon-color-border-secondary);
|
|
487
|
+
border-bottom: 1px solid var(--taskon-color-border-secondary);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* 悬停效果 */
|
|
491
|
+
|
|
492
|
+
.taskon-table__row:hover {
|
|
493
|
+
background-color: var(--taskon-color-bg-surface-strong);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/* 交替行背景 (striped) */
|
|
497
|
+
|
|
498
|
+
.taskon-table--striped .taskon-table__row:nth-child(even) {
|
|
499
|
+
background-color: var(--taskon-color-bg-surface-subtle);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/* 高亮行 */
|
|
503
|
+
|
|
504
|
+
.taskon-table__row--highlighted {
|
|
505
|
+
background-color: var(--taskon-color-primary-bg);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.taskon-table__row--highlighted:hover {
|
|
509
|
+
background-color: var(--taskon-color-primary-bg);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/* 禁用行 */
|
|
513
|
+
|
|
240
514
|
.taskon-table__row--disabled {
|
|
241
515
|
opacity: 0.4;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/* 可点击行 */
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/* 可点击行 */
|
|
519
|
+
|
|
245
520
|
.taskon-table__row--clickable {
|
|
246
521
|
cursor: pointer;
|
|
247
|
-
}
|
|
248
|
-
|
|
522
|
+
}
|
|
523
|
+
|
|
249
524
|
/* ============================================================================
|
|
250
525
|
单元格 - 参考 Figma 设计:16px SemiBold,白色文字
|
|
251
|
-
============================================================================ */
|
|
252
|
-
|
|
253
|
-
.taskon-table__cell {
|
|
254
|
-
padding:
|
|
255
|
-
font-size: 16px;
|
|
256
|
-
font-weight: 600;
|
|
257
|
-
line-height: 24px;
|
|
258
|
-
color: var(--taskon-color-text
|
|
259
|
-
vertical-align: middle;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/* 单元格对齐方式 */
|
|
526
|
+
============================================================================ */
|
|
527
|
+
|
|
528
|
+
.taskon-table__cell {
|
|
529
|
+
padding: var(--taskon-spacing-sm) 12px;
|
|
530
|
+
font-size: 16px;
|
|
531
|
+
font-weight: 600;
|
|
532
|
+
line-height: 24px;
|
|
533
|
+
color: var(--taskon-color-text);
|
|
534
|
+
vertical-align: middle;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/* 单元格对齐方式 */
|
|
538
|
+
|
|
263
539
|
.taskon-table__cell--left {
|
|
264
540
|
text-align: left;
|
|
265
|
-
}
|
|
266
|
-
|
|
541
|
+
}
|
|
542
|
+
|
|
267
543
|
.taskon-table__cell--center {
|
|
268
544
|
text-align: center;
|
|
269
|
-
}
|
|
270
|
-
|
|
545
|
+
}
|
|
546
|
+
|
|
271
547
|
.taskon-table__cell--right {
|
|
272
548
|
text-align: right;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/* 单元格文本溢出 */
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/* 单元格文本溢出 */
|
|
552
|
+
|
|
276
553
|
.taskon-table__cell--ellipsis {
|
|
277
554
|
text-overflow: ellipsis;
|
|
278
555
|
overflow: hidden;
|
|
279
556
|
white-space: nowrap;
|
|
280
|
-
}
|
|
281
|
-
|
|
557
|
+
}
|
|
558
|
+
|
|
282
559
|
/* ============================================================================
|
|
283
560
|
空状态和加载状态
|
|
284
|
-
============================================================================ */
|
|
285
|
-
|
|
286
|
-
.taskon-table__loading,
|
|
287
|
-
.taskon-table__empty {
|
|
288
|
-
padding: 40px 16px;
|
|
289
|
-
text-align: center;
|
|
290
|
-
color: var(--taskon-color-text-
|
|
291
|
-
}
|
|
292
|
-
|
|
561
|
+
============================================================================ */
|
|
562
|
+
|
|
563
|
+
.taskon-table__loading,
|
|
564
|
+
.taskon-table__empty {
|
|
565
|
+
padding: 40px 16px;
|
|
566
|
+
text-align: center;
|
|
567
|
+
color: var(--taskon-color-text-disabled);
|
|
568
|
+
}
|
|
569
|
+
|
|
293
570
|
.taskon-table__empty-content {
|
|
294
571
|
display: flex;
|
|
295
572
|
flex-direction: column;
|
|
296
573
|
align-items: center;
|
|
297
574
|
gap: 8px;
|
|
298
|
-
}
|
|
299
|
-
|
|
575
|
+
}
|
|
576
|
+
|
|
300
577
|
.taskon-table__empty-icon {
|
|
301
578
|
font-size: 48px;
|
|
302
579
|
opacity: 0.5;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
.taskon-table__empty-title {
|
|
306
|
-
font-size: 16px;
|
|
307
|
-
font-weight: 600;
|
|
308
|
-
color: var(--taskon-color-text
|
|
309
|
-
margin: 0;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.taskon-table__empty-desc {
|
|
313
|
-
font-size: 14px;
|
|
314
|
-
color: var(--taskon-color-text-
|
|
315
|
-
margin: 0;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/* 加载指示器 */
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
border
|
|
325
|
-
border-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.taskon-table__empty-title {
|
|
583
|
+
font-size: 16px;
|
|
584
|
+
font-weight: 600;
|
|
585
|
+
color: var(--taskon-color-text);
|
|
586
|
+
margin: 0;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.taskon-table__empty-desc {
|
|
590
|
+
font-size: 14px;
|
|
591
|
+
color: var(--taskon-color-text-disabled);
|
|
592
|
+
margin: 0;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/* 加载指示器 */
|
|
596
|
+
|
|
597
|
+
.taskon-table__loading-spinner {
|
|
598
|
+
display: inline-block;
|
|
599
|
+
width: 24px;
|
|
600
|
+
height: 24px;
|
|
601
|
+
border: 2px solid var(--taskon-color-text-disabled);
|
|
602
|
+
border-top-color: var(--taskon-color-primary);
|
|
603
|
+
border-radius: 50%;
|
|
604
|
+
animation: taskon-table-spin 0.8s linear infinite;
|
|
605
|
+
}
|
|
606
|
+
|
|
329
607
|
@keyframes taskon-table-spin {
|
|
330
608
|
from {
|
|
331
609
|
transform: rotate(0deg);
|
|
@@ -333,10 +611,11 @@
|
|
|
333
611
|
to {
|
|
334
612
|
transform: rotate(360deg);
|
|
335
613
|
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/* Overlay loading - 覆盖在表格数据上方 */
|
|
339
|
-
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/* Overlay loading - 覆盖在表格数据上方 */
|
|
617
|
+
|
|
618
|
+
.taskon-table__loading-overlay {
|
|
340
619
|
position: absolute;
|
|
341
620
|
top: 0;
|
|
342
621
|
left: 0;
|
|
@@ -345,45 +624,73 @@
|
|
|
345
624
|
display: flex;
|
|
346
625
|
align-items: center;
|
|
347
626
|
justify-content: center;
|
|
348
|
-
background-color: var(--taskon-color-
|
|
349
|
-
backdrop-filter: blur(2px);
|
|
350
|
-
z-index: 10;
|
|
351
|
-
border-radius:
|
|
352
|
-
}
|
|
353
|
-
|
|
627
|
+
background-color: var(--taskon-color-bg-mask);
|
|
628
|
+
backdrop-filter: blur(2px);
|
|
629
|
+
z-index: 10;
|
|
630
|
+
border-radius: var(--taskon-border-radius-sm);
|
|
631
|
+
}
|
|
632
|
+
|
|
354
633
|
/* ============================================================================
|
|
355
634
|
紧凑模式
|
|
356
|
-
============================================================================ */
|
|
357
|
-
|
|
358
|
-
.taskon-table--compact .taskon-table__header {
|
|
359
|
-
padding:
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.taskon-table--compact .taskon-table__cell {
|
|
363
|
-
padding:
|
|
364
|
-
}
|
|
365
|
-
|
|
635
|
+
============================================================================ */
|
|
636
|
+
|
|
637
|
+
.taskon-table--compact .taskon-table__header {
|
|
638
|
+
padding: var(--taskon-spacing-xs) var(--taskon-spacing-sm);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.taskon-table--compact .taskon-table__cell {
|
|
642
|
+
padding: var(--taskon-spacing-xs) var(--taskon-spacing-sm);
|
|
643
|
+
}
|
|
644
|
+
|
|
366
645
|
/* ============================================================================
|
|
367
646
|
无边框模式
|
|
368
|
-
============================================================================ */
|
|
369
|
-
|
|
647
|
+
============================================================================ */
|
|
648
|
+
|
|
370
649
|
.taskon-table--borderless .taskon-table__row td {
|
|
371
650
|
border-top: none;
|
|
372
651
|
border-bottom: none;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
/* ============================================================================
|
|
376
|
-
|
|
377
|
-
============================================================================ */
|
|
378
|
-
|
|
379
|
-
@
|
|
380
|
-
|
|
381
|
-
.taskon-
|
|
382
|
-
padding:
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.taskon-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/* ============================================================================
|
|
655
|
+
Desktop 增强
|
|
656
|
+
============================================================================ */
|
|
657
|
+
|
|
658
|
+
@supports (container-type: inline-size) {
|
|
659
|
+
@container (min-width: 751px) {
|
|
660
|
+
.taskon-table__header {
|
|
661
|
+
padding: 10px 20px;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.taskon-table__cell {
|
|
665
|
+
padding: var(--taskon-spacing-md) 20px;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.taskon-table--compact .taskon-table__header {
|
|
669
|
+
padding: var(--taskon-spacing-xs) 12px;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.taskon-table--compact .taskon-table__cell {
|
|
673
|
+
padding: 12px;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
@supports not (container-type: inline-size) {
|
|
679
|
+
@media (min-width: 751px) {
|
|
680
|
+
.taskon-table__header {
|
|
681
|
+
padding: 10px 20px;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.taskon-table__cell {
|
|
685
|
+
padding: var(--taskon-spacing-md) 20px;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.taskon-table--compact .taskon-table__header {
|
|
689
|
+
padding: var(--taskon-spacing-xs) 12px;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
.taskon-table--compact .taskon-table__cell {
|
|
693
|
+
padding: 12px;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|