@taskon/widget-react 0.0.1-beta.1
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 +1065 -0
- package/dist/CommunityTaskList.css +4893 -0
- package/dist/EligibilityInfo.css +2337 -0
- package/dist/LeaderboardWidget.css +815 -0
- package/dist/PageBuilder.css +54 -0
- package/dist/Quest.css +4214 -0
- package/dist/TaskOnProvider.css +163 -0
- package/dist/TipPopover.css +210 -0
- package/dist/UserCenterWidget.css +297 -0
- package/dist/UserCenterWidget2.css +3519 -0
- package/dist/WidgetShell.css +182 -0
- package/dist/chunks/CommunityTaskList-DoPGZsw1.js +6813 -0
- package/dist/chunks/EligibilityInfo-C7GZ2G5u.js +22228 -0
- package/dist/chunks/LeaderboardWidget-CmYfDeHV.js +1068 -0
- package/dist/chunks/PageBuilder-Tmhf2GTS.js +150 -0
- package/dist/chunks/Quest-DKFZ-pPU.js +8839 -0
- package/dist/chunks/TaskOnProvider-BD6Vp2x8.js +1435 -0
- package/dist/chunks/ThemeProvider-wnSXrNQb.js +1118 -0
- package/dist/chunks/TipPopover-BrW8jo71.js +2926 -0
- package/dist/chunks/UserCenterWidget-BE329iS7.js +3546 -0
- package/dist/chunks/UserCenterWidget-BVw_IEEd.js +3989 -0
- package/dist/chunks/WidgetShell-D_5OjvNZ.js +1517 -0
- package/dist/chunks/common-ja-DWhTaFHb.js +23 -0
- package/dist/chunks/common-ko-80ezXsMG.js +23 -0
- package/dist/chunks/dynamic-import-helper-DxEFwm31.js +537 -0
- package/dist/chunks/index-CwMvO_wZ.js +777 -0
- package/dist/chunks/leaderboardwidget-ja-Bj6gz6y1.js +119 -0
- package/dist/chunks/leaderboardwidget-ko-f1cLO9ic.js +119 -0
- package/dist/chunks/useToast-B-wyO5zL.js +93 -0
- package/dist/chunks/useWidgetLocale-JDelxtt8.js +74 -0
- package/dist/chunks/usercenter-ja-uu-XfVF9.js +332 -0
- package/dist/chunks/usercenter-ko-DYgUOVzd.js +332 -0
- package/dist/community-task.d.ts +451 -0
- package/dist/community-task.js +9 -0
- package/dist/core.d.ts +803 -0
- package/dist/core.js +22 -0
- package/dist/dynamic-import-helper.css +389 -0
- package/dist/index.d.ts +1660 -0
- package/dist/index.js +41 -0
- package/dist/leaderboard.d.ts +547 -0
- package/dist/leaderboard.js +18 -0
- package/dist/page-builder.d.ts +20 -0
- package/dist/page-builder.js +4 -0
- package/dist/quest.d.ts +400 -0
- package/dist/quest.js +8 -0
- package/dist/user-center.d.ts +1780 -0
- package/dist/user-center.js +713 -0
- package/package.json +105 -0
package/dist/core.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { T, u, a } from "./chunks/ThemeProvider-wnSXrNQb.js";
|
|
2
|
+
import { RewardType } from "@taskon/core";
|
|
3
|
+
import { T as T2, c, b, i, a as a2, u as u2 } from "./chunks/TaskOnProvider-BD6Vp2x8.js";
|
|
4
|
+
import { a as a3, u as u3 } from "./chunks/useToast-B-wyO5zL.js";
|
|
5
|
+
import { c as c2, i as i2, u as u4 } from "./chunks/useWidgetLocale-JDelxtt8.js";
|
|
6
|
+
export {
|
|
7
|
+
RewardType,
|
|
8
|
+
T2 as TaskOnProvider,
|
|
9
|
+
T as ThemeProvider,
|
|
10
|
+
c2 as clearLocaleCache,
|
|
11
|
+
c as createLocaleLoader,
|
|
12
|
+
b as createT,
|
|
13
|
+
i as interpolate,
|
|
14
|
+
i2 as isSupportedLocale,
|
|
15
|
+
a2 as useCommonLocale,
|
|
16
|
+
a3 as useEvmWallet,
|
|
17
|
+
u as useTaskOnAuth,
|
|
18
|
+
a as useTaskOnTheme,
|
|
19
|
+
u2 as useTranslation,
|
|
20
|
+
u3 as useWallet,
|
|
21
|
+
u4 as useWidgetLocale
|
|
22
|
+
};
|
|
@@ -0,0 +1,389 @@
|
|
|
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;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
width: 30px;
|
|
71
|
+
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
|
+
|
|
86
|
+
.taskon-pagination-btn:disabled {
|
|
87
|
+
opacity: 0.4;
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ==================== 尺寸变体 ==================== */
|
|
92
|
+
.taskon-pagination--small .taskon-pagination-range {
|
|
93
|
+
font-size: 12px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.taskon-pagination--small .taskon-pagination-info {
|
|
97
|
+
font-size: 14px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.taskon-pagination--small .taskon-pagination-icon {
|
|
101
|
+
width: 14px;
|
|
102
|
+
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
|
+
*
|
|
128
|
+
* 采用 BEM 命名规范
|
|
129
|
+
* 前缀: taskon-table
|
|
130
|
+
*
|
|
131
|
+
* 设计参考 Figma: node-id=4000-1908
|
|
132
|
+
* - 表头: 半透明背景、圆角、暗色文字
|
|
133
|
+
* - 行: 边框分隔、悬停效果、交替背景
|
|
134
|
+
* - 单元格: 可配置宽度和对齐方式
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/* ============================================================================
|
|
138
|
+
容器
|
|
139
|
+
============================================================================ */
|
|
140
|
+
|
|
141
|
+
.taskon-table-container {
|
|
142
|
+
width: 100%;
|
|
143
|
+
overflow-x: auto;
|
|
144
|
+
position: relative;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.taskon-table {
|
|
148
|
+
width: 100%;
|
|
149
|
+
border-collapse: separate;
|
|
150
|
+
border-spacing: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* ============================================================================
|
|
154
|
+
表头 - 参考 Figma 设计:45px 高度,深色半透明背景,无圆角
|
|
155
|
+
============================================================================ */
|
|
156
|
+
|
|
157
|
+
.taskon-table__head {
|
|
158
|
+
/* 不在 thead 上设置背景,由 th 元素控制 */
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.taskon-table__head tr {
|
|
162
|
+
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
|
+
/* 表头对齐方式 */
|
|
179
|
+
.taskon-table__header--left {
|
|
180
|
+
text-align: left;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.taskon-table__header--center {
|
|
184
|
+
text-align: center;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.taskon-table__header--right {
|
|
188
|
+
text-align: right;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* ============================================================================
|
|
192
|
+
表体
|
|
193
|
+
============================================================================ */
|
|
194
|
+
|
|
195
|
+
.taskon-table__body {
|
|
196
|
+
/* 默认样式 */
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* ============================================================================
|
|
200
|
+
数据行 - 参考 Figma 设计:更大行高(76px),无边框
|
|
201
|
+
============================================================================ */
|
|
202
|
+
|
|
203
|
+
.taskon-table__row {
|
|
204
|
+
transition: background-color 0.2s ease;
|
|
205
|
+
height: 76px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* 行边框 - 默认不显示,使用 borderless 类控制 */
|
|
209
|
+
.taskon-table__row td {
|
|
210
|
+
border-top: none;
|
|
211
|
+
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
|
+
/* 禁用行 */
|
|
240
|
+
.taskon-table__row--disabled {
|
|
241
|
+
opacity: 0.4;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* 可点击行 */
|
|
245
|
+
.taskon-table__row--clickable {
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* ============================================================================
|
|
250
|
+
单元格 - 参考 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
|
+
/* 单元格对齐方式 */
|
|
263
|
+
.taskon-table__cell--left {
|
|
264
|
+
text-align: left;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.taskon-table__cell--center {
|
|
268
|
+
text-align: center;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.taskon-table__cell--right {
|
|
272
|
+
text-align: right;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/* 单元格文本溢出 */
|
|
276
|
+
.taskon-table__cell--ellipsis {
|
|
277
|
+
text-overflow: ellipsis;
|
|
278
|
+
overflow: hidden;
|
|
279
|
+
white-space: nowrap;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* ============================================================================
|
|
283
|
+
空状态和加载状态
|
|
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
|
+
|
|
293
|
+
.taskon-table__empty-content {
|
|
294
|
+
display: flex;
|
|
295
|
+
flex-direction: column;
|
|
296
|
+
align-items: center;
|
|
297
|
+
gap: 8px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.taskon-table__empty-icon {
|
|
301
|
+
font-size: 48px;
|
|
302
|
+
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
|
+
|
|
329
|
+
@keyframes taskon-table-spin {
|
|
330
|
+
from {
|
|
331
|
+
transform: rotate(0deg);
|
|
332
|
+
}
|
|
333
|
+
to {
|
|
334
|
+
transform: rotate(360deg);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/* Overlay loading - 覆盖在表格数据上方 */
|
|
339
|
+
.taskon-table__loading-overlay {
|
|
340
|
+
position: absolute;
|
|
341
|
+
top: 0;
|
|
342
|
+
left: 0;
|
|
343
|
+
right: 0;
|
|
344
|
+
bottom: 0;
|
|
345
|
+
display: flex;
|
|
346
|
+
align-items: center;
|
|
347
|
+
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
|
+
|
|
354
|
+
/* ============================================================================
|
|
355
|
+
紧凑模式
|
|
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
|
+
|
|
366
|
+
/* ============================================================================
|
|
367
|
+
无边框模式
|
|
368
|
+
============================================================================ */
|
|
369
|
+
|
|
370
|
+
.taskon-table--borderless .taskon-table__row td {
|
|
371
|
+
border-top: none;
|
|
372
|
+
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
|
+
}
|