@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.
Files changed (44) hide show
  1. package/README.md +56 -17
  2. package/dist/CommunityTaskList.css +1593 -1741
  3. package/dist/EligibilityInfo.css +1275 -582
  4. package/dist/LeaderboardWidget.css +355 -152
  5. package/dist/PageBuilder.css +0 -2
  6. package/dist/Quest.css +1140 -903
  7. package/dist/TaskOnProvider.css +50 -31
  8. package/dist/UserCenterWidget.css +108 -237
  9. package/dist/UserCenterWidget2.css +2016 -711
  10. package/dist/chunks/{CommunityTaskList-BlH1Wdd5.js → CommunityTaskList-C9Gv8KOF.js} +962 -827
  11. package/dist/chunks/{EligibilityInfo-C7GZ2G5u.js → EligibilityInfo-D-Fuy9GE.js} +1137 -449
  12. package/dist/chunks/{LeaderboardWidget-CmYfDeHV.js → LeaderboardWidget-BV2D2q1N.js} +15 -10
  13. package/dist/chunks/{PageBuilder-Bw0zSkFh.js → PageBuilder-DQoU4Mwf.js} +5 -5
  14. package/dist/chunks/{Quest-DKFZ-pPU.js → Quest-B5NyVr3o.js} +516 -325
  15. package/dist/chunks/{TaskOnProvider-BD6Vp2x8.js → TaskOnProvider-93UxARFo.js} +2 -207
  16. package/dist/chunks/{ThemeProvider-wnSXrNQb.js → ThemeProvider-CPI_roeh.js} +249 -57
  17. package/dist/chunks/{UserCenterWidget-Cw6h_5hT.js → UserCenterWidget-BRtigY_S.js} +206 -1002
  18. package/dist/chunks/UserCenterWidget-cADBSVg7.js +8358 -0
  19. package/dist/chunks/{WidgetShell-D_5OjvNZ.js → dynamic-import-helper-DwXlQC0S.js} +607 -40
  20. package/dist/chunks/useToast-CaRkylKe.js +304 -0
  21. package/dist/chunks/{usercenter-ja-uu-XfVF9.js → usercenter-ja-B2465c1O.js} +4 -10
  22. package/dist/chunks/{usercenter-ko-DYgUOVzd.js → usercenter-ko-xAEYxqLg.js} +4 -10
  23. package/dist/community-task.d.ts +34 -3
  24. package/dist/community-task.js +1 -1
  25. package/dist/core.d.ts +40 -3
  26. package/dist/core.js +9 -10
  27. package/dist/dynamic-import-helper.css +596 -289
  28. package/dist/index.d.ts +207 -10
  29. package/dist/index.js +21 -19
  30. package/dist/leaderboard.d.ts +8 -1
  31. package/dist/leaderboard.js +2 -2
  32. package/dist/page-builder.js +1 -1
  33. package/dist/quest.d.ts +8 -2
  34. package/dist/quest.js +1 -1
  35. package/dist/user-center.d.ts +20 -136
  36. package/dist/user-center.js +19 -236
  37. package/package.json +10 -2
  38. package/dist/TipPopover.css +0 -210
  39. package/dist/WidgetShell.css +0 -182
  40. package/dist/chunks/TipPopover-BrW8jo71.js +0 -2926
  41. package/dist/chunks/UserCenterWidget-BE329iS7.js +0 -3546
  42. package/dist/chunks/dynamic-import-helper-DxEFwm31.js +0 -537
  43. package/dist/chunks/useToast-B-wyO5zL.js +0 -93
  44. package/dist/chunks/useWidgetLocale-JDelxtt8.js +0 -74
@@ -1,331 +1,609 @@
1
- /**
2
- * Pagination 通用分页组件样式
3
- * @description 使用 taskon-pagination 命名空间
4
- *
5
- * 设计参考 Figma: node-id=4000-1995
6
- * - 按钮: 30x30px 圆形
7
- * - 页码: 16px Regular
8
- * - 当前页: 白色
9
- * - 分隔符+总页数: rgba(255,255,255,0.4)
10
- */
11
-
12
- /* ==================== 容器 ==================== */
13
- .taskon-pagination {
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- width: 100%;
18
- gap: 16px;
19
- padding: 12px 0;
20
- }
21
-
22
- /* ==================== 范围信息 ==================== */
23
- .taskon-pagination-range {
24
- font-size: 14px;
25
- color: var(--taskon-color-text-secondary, rgba(255, 255, 255, 0.4));
26
- }
27
-
28
- /* ==================== 控制区 ==================== */
29
- .taskon-pagination-controls {
30
- display: flex;
31
- align-items: center;
32
- gap: 16px;
33
- }
34
-
35
- /* ==================== 页码信息 - 基于 Figma 设计 ==================== */
36
- .taskon-pagination-info {
37
- display: flex;
38
- align-items: center;
39
- font-size: 16px;
40
- font-weight: 400;
41
- white-space: nowrap;
42
- }
43
-
44
- /* 当前页码 - 白色 */
45
- .taskon-pagination-info-current {
46
- color: var(--taskon-color-text-lightest, #ffffff);
47
- }
48
-
49
- /* 分隔符 - 灰色 */
50
- .taskon-pagination-info-separator {
51
- color: var(--taskon-color-text-dark, rgba(255, 255, 255, 0.4));
52
- }
53
-
54
- /* 总页数 - 灰色 */
55
- .taskon-pagination-info-total {
56
- color: var(--taskon-color-text-dark, rgba(255, 255, 255, 0.4));
57
- }
58
-
59
- /* ==================== 图标 ==================== */
60
- .taskon-pagination-icon {
61
- width: 16px;
62
- height: 16px;
63
- }
64
-
65
- /* ==================== 按钮样式 - 圆形按钮 ==================== */
66
- .taskon-pagination-btn {
67
- display: inline-flex;
68
- align-items: center;
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, rgba(255, 255, 255, 0.1)) !important;
77
- color: var(--taskon-color-text-lightest, #ffffff) !important;
78
- transition: all 0.2s ease;
79
- }
80
-
81
- .taskon-pagination-btn:hover:not(:disabled) {
82
- background-color: var(--taskon-color-bg-hover, rgba(255, 255, 255, 0.04)) !important;
83
- border-color: var(--taskon-color-border-hover, rgba(255, 255, 255, 0.2)) !important;
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
- @media (max-width: 750px) {
113
- .taskon-pagination {
114
- gap: 12px;
115
- }
116
-
117
- .taskon-pagination-range {
118
- font-size: 3.2vw;
119
- }
120
-
121
- .taskon-pagination-info {
122
- font-size: 14px;
123
- }
124
- }
125
- /**
126
- * Table 通用表格组件样式
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
- .taskon-table__header {
167
- padding: 10px 20px;
168
- font-size: 16px;
169
- font-weight: 400;
170
- text-align: left;
171
- line-height: 24px;
172
- color: var(--taskon-color-text-dark, rgba(255, 255, 255, 0.4));
173
- white-space: nowrap;
174
- vertical-align: middle;
175
- background-color: var(--taskon-color-table-header-bg, rgba(255, 255, 255, 0.04));
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
- .taskon-table--bordered .taskon-table__row td {
216
- border-top: 1px solid var(--taskon-color-table-border, rgba(255, 255, 255, 0.04));
217
- border-bottom: 1px solid var(--taskon-color-table-border, rgba(255, 255, 255, 0.04));
218
- }
219
-
220
- /* 悬停效果 */
221
- .taskon-table__row:hover {
222
- background-color: var(--taskon-color-table-row-hover, rgba(255, 255, 255, 0.04));
223
- }
224
-
225
- /* 交替行背景 (striped) */
226
- .taskon-table--striped .taskon-table__row:nth-child(even) {
227
- background-color: var(--taskon-color-table-row-alt, rgba(255, 255, 255, 0.04));
228
- }
229
-
230
- /* 高亮行 */
231
- .taskon-table__row--highlighted {
232
- background-color: var(--taskon-color-primary-bg, rgba(99, 102, 241, 0.1));
233
- }
234
-
235
- .taskon-table__row--highlighted:hover {
236
- background-color: var(--taskon-color-primary-bg-hover, rgba(99, 102, 241, 0.15));
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: 16px 20px;
255
- font-size: 16px;
256
- font-weight: 600;
257
- line-height: 24px;
258
- color: var(--taskon-color-text-lightest, #ffffff);
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-dark, rgba(255, 255, 255, 0.4));
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-lightest, #ffffff);
309
- margin: 0;
310
- }
311
-
312
- .taskon-table__empty-desc {
313
- font-size: 14px;
314
- color: var(--taskon-color-text-dark, rgba(255, 255, 255, 0.4));
315
- margin: 0;
316
- }
317
-
318
- /* 加载指示器 */
319
- .taskon-table__loading-spinner {
320
- display: inline-block;
321
- width: 24px;
322
- height: 24px;
323
- border: 2px solid var(--taskon-color-text-dark, rgba(255, 255, 255, 0.4));
324
- border-top-color: var(--taskon-color-primary, #6366f1);
325
- border-radius: 50%;
326
- animation: taskon-table-spin 0.8s linear infinite;
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
- .taskon-table__loading-overlay {
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-overlay-bg, rgba(0, 0, 0, 0.5));
349
- backdrop-filter: blur(2px);
350
- z-index: 10;
351
- border-radius: 4px;
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: 4px 12px;
360
- }
361
-
362
- .taskon-table--compact .taskon-table__cell {
363
- padding: 12px;
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
- @media (max-width: 640px) {
380
- .taskon-table__header,
381
- .taskon-table__cell {
382
- padding: 8px 12px;
383
- }
384
-
385
- .taskon-table--compact .taskon-table__header,
386
- .taskon-table--compact .taskon-table__cell {
387
- padding: 4px 8px;
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
+ }