@taskon/widget-react 0.0.1 → 0.0.2
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 +118 -64
- package/dist/CommunityTaskList.css +2694 -2951
- package/dist/EligibilityInfo.css +2221 -1332
- package/dist/LeaderboardWidget.css +403 -198
- package/dist/PageBuilder.css +57 -0
- package/dist/Quest.css +1347 -1477
- package/dist/TaskOnProvider.css +337 -29
- package/dist/ThemeProvider.css +228 -0
- package/dist/UserCenterWidget.css +168 -0
- package/dist/UserCenterWidget2.css +4917 -0
- package/dist/WidgetShell.css +417 -130
- package/dist/chunks/{CommunityTaskList-CrH6r4Av.js → CommunityTaskList-2nFy6l6m.js} +2612 -2074
- package/dist/chunks/{EligibilityInfo-DesW9-k9.js → EligibilityInfo-CKTl_cdU.js} +2714 -4077
- package/dist/chunks/{LeaderboardWidget-BSGpHKTk.js → LeaderboardWidget-DyoiiNS6.js} +288 -349
- package/dist/chunks/PageBuilder-DHM3Il6f.js +150 -0
- package/dist/chunks/{Quest-uSIVq78I.js → Quest-Dqx4OCat.js} +1380 -726
- package/dist/chunks/TaskOnProvider-CxtFIs3n.js +2072 -0
- package/dist/chunks/{WidgetShell-NlOgn1x5.js → ThemeProvider-CulHkqqY.js} +1397 -103
- package/dist/chunks/UserCenterWidget-SE5hqpnZ.js +8335 -0
- package/dist/chunks/UserCenterWidget-XL6LZRZM.js +3259 -0
- package/dist/chunks/{Table-CWGf2FKV.js → WidgetShell-8xn-Jivw.js} +237 -27
- package/dist/chunks/communitytask-es-CBNnS4o2.js +521 -0
- package/dist/chunks/communitytask-ja-GRf9cbdx.js +521 -0
- package/dist/chunks/communitytask-ko-Bf24PQKI.js +521 -0
- package/dist/chunks/communitytask-ru-CZm2CPoV.js +521 -0
- package/dist/chunks/leaderboardwidget-es-vKjrjQaz.js +146 -0
- package/dist/chunks/leaderboardwidget-ja-Q6u0HxKG.js +146 -0
- package/dist/chunks/leaderboardwidget-ko-CG6SWgxf.js +146 -0
- package/dist/chunks/leaderboardwidget-ru-DCcHcJGz.js +146 -0
- package/dist/chunks/quest-es-Dyyy0zaw.js +863 -0
- package/dist/chunks/quest-ja-Depog33y.js +863 -0
- package/dist/chunks/quest-ko-BMu3uRQJ.js +863 -0
- package/dist/chunks/quest-ru-xne814Rw.js +863 -0
- package/dist/chunks/taskwidget-es-Do9b3Mqw.js +245 -0
- package/dist/chunks/taskwidget-ja-CqSu-yWA.js +245 -0
- package/dist/chunks/taskwidget-ko-EHgXFV4B.js +245 -0
- package/dist/chunks/taskwidget-ru-CMbLQDK4.js +245 -0
- package/dist/chunks/useIsMobile-D6Ybur-6.js +30 -0
- package/dist/chunks/usercenter-es-Dz3Wp2vV.js +512 -0
- package/dist/chunks/usercenter-ja-CKE4DJC6.js +512 -0
- package/dist/chunks/usercenter-ko-Dtpkn2qb.js +512 -0
- package/dist/chunks/usercenter-ru-DnBGee45.js +512 -0
- package/dist/community-task.d.ts +29 -388
- package/dist/community-task.js +2 -7
- package/dist/core.d.ts +95 -28
- package/dist/core.js +11 -12
- package/dist/index.d.ts +260 -602
- package/dist/index.js +28 -7361
- package/dist/leaderboard.d.ts +5 -496
- package/dist/leaderboard.js +2 -15
- package/dist/page-builder.d.ts +20 -0
- package/dist/page-builder.js +4 -0
- package/dist/quest.d.ts +20 -292
- package/dist/quest.js +2 -5
- package/dist/user-center.d.ts +56 -0
- package/dist/user-center.js +4 -0
- package/package.json +22 -3
- package/dist/Table.css +0 -389
- package/dist/chunks/TaskOnProvider-QMwxGL44.js +0 -1435
- package/dist/chunks/ThemeProvider-Cs8IUVQj.js +0 -1118
- package/dist/chunks/leaderboardwidget-ja-Bj6gz6y1.js +0 -119
- package/dist/chunks/leaderboardwidget-ko-f1cLO9ic.js +0 -119
- package/dist/chunks/useWidgetLocale-BVcopbZS.js +0 -74
- package/dist/chunks/usercenter-ja-DBj_dtuz.js +0 -329
- package/dist/chunks/usercenter-ko-DYTkHAld.js +0 -329
- package/dist/index.css +0 -3662
package/dist/TaskOnProvider.css
CHANGED
|
@@ -3,16 +3,31 @@
|
|
|
3
3
|
* 遵循 TaskOn Widget 命名规范
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
/*
|
|
7
|
+
* Responsive base styles
|
|
8
|
+
*
|
|
9
|
+
* Keep mobile breakpoints and fallback patterns centralized here.
|
|
10
|
+
* Components should reuse these mixins instead of duplicating query logic.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Desktop-up mixin:
|
|
15
|
+
* 1) Enable desktop enhancement in wider containers
|
|
16
|
+
* 2) Keep viewport media query as fallback
|
|
17
|
+
*/
|
|
18
|
+
|
|
6
19
|
/* ==================== Viewport 容器 ==================== */
|
|
20
|
+
|
|
7
21
|
.taskon-toast-viewport {
|
|
8
22
|
position: fixed;
|
|
9
|
-
top:
|
|
10
|
-
right:
|
|
23
|
+
top: 10px;
|
|
24
|
+
right: 10px;
|
|
25
|
+
left: 10px;
|
|
11
26
|
display: flex;
|
|
12
27
|
flex-direction: column;
|
|
13
28
|
gap: 10px;
|
|
14
|
-
width:
|
|
15
|
-
max-width:
|
|
29
|
+
width: auto;
|
|
30
|
+
max-width: none;
|
|
16
31
|
margin: 0;
|
|
17
32
|
padding: 0;
|
|
18
33
|
list-style: none;
|
|
@@ -21,20 +36,22 @@
|
|
|
21
36
|
}
|
|
22
37
|
|
|
23
38
|
/* ==================== Toast 基础样式 ==================== */
|
|
39
|
+
|
|
24
40
|
.taskon-toast {
|
|
25
41
|
display: flex;
|
|
26
42
|
align-items: center;
|
|
27
43
|
gap: 12px;
|
|
28
44
|
padding: 14px 16px;
|
|
29
45
|
border-radius: 8px;
|
|
30
|
-
background:
|
|
31
|
-
box-shadow: 0 4px 12px
|
|
32
|
-
color:
|
|
46
|
+
background: var(--taskon-color-bg-floating);
|
|
47
|
+
box-shadow: 0 4px 12px var(--taskon-color-bg-mask);
|
|
48
|
+
color: var(--taskon-color-text);
|
|
33
49
|
font-size: 14px;
|
|
34
50
|
line-height: 1.4;
|
|
35
51
|
}
|
|
36
52
|
|
|
37
53
|
/* 动画 */
|
|
54
|
+
|
|
38
55
|
.taskon-toast[data-state="open"] {
|
|
39
56
|
animation: taskon-toast-slide-in 200ms ease-out;
|
|
40
57
|
}
|
|
@@ -86,6 +103,7 @@
|
|
|
86
103
|
}
|
|
87
104
|
|
|
88
105
|
/* ==================== Toast 图标 ==================== */
|
|
106
|
+
|
|
89
107
|
.taskon-toast-icon {
|
|
90
108
|
flex-shrink: 0;
|
|
91
109
|
width: 20px;
|
|
@@ -99,65 +117,355 @@
|
|
|
99
117
|
}
|
|
100
118
|
|
|
101
119
|
/* ==================== Toast 消息 ==================== */
|
|
120
|
+
|
|
102
121
|
.taskon-toast-message {
|
|
103
122
|
flex: 1;
|
|
104
123
|
margin: 0;
|
|
124
|
+
overflow-wrap: anywhere;
|
|
125
|
+
word-break: break-word;
|
|
105
126
|
}
|
|
106
127
|
|
|
107
128
|
/* ==================== Toast 类型变体 ==================== */
|
|
108
129
|
|
|
109
130
|
/* Success */
|
|
131
|
+
|
|
110
132
|
.taskon-toast--success {
|
|
111
|
-
border-left: 3px solid
|
|
133
|
+
border-left: 3px solid var(--taskon-color-success);
|
|
112
134
|
}
|
|
113
135
|
|
|
114
136
|
.taskon-toast--success .taskon-toast-icon {
|
|
115
|
-
background:
|
|
116
|
-
color:
|
|
137
|
+
background: var(--taskon-color-success-bg);
|
|
138
|
+
color: var(--taskon-color-success);
|
|
117
139
|
}
|
|
118
140
|
|
|
119
141
|
/* Error */
|
|
142
|
+
|
|
120
143
|
.taskon-toast--error {
|
|
121
|
-
border-left: 3px solid
|
|
144
|
+
border-left: 3px solid var(--taskon-color-error);
|
|
122
145
|
}
|
|
123
146
|
|
|
124
147
|
.taskon-toast--error .taskon-toast-icon {
|
|
125
|
-
background:
|
|
126
|
-
color:
|
|
148
|
+
background: var(--taskon-color-error-bg);
|
|
149
|
+
color: var(--taskon-color-error);
|
|
127
150
|
}
|
|
128
151
|
|
|
129
152
|
/* Warning */
|
|
153
|
+
|
|
130
154
|
.taskon-toast--warning {
|
|
131
|
-
border-left: 3px solid
|
|
155
|
+
border-left: 3px solid var(--taskon-color-warning);
|
|
132
156
|
}
|
|
133
157
|
|
|
134
158
|
.taskon-toast--warning .taskon-toast-icon {
|
|
135
|
-
background:
|
|
136
|
-
color:
|
|
159
|
+
background: var(--taskon-color-warning-bg);
|
|
160
|
+
color: var(--taskon-color-warning);
|
|
137
161
|
}
|
|
138
162
|
|
|
139
163
|
/* Info */
|
|
164
|
+
|
|
140
165
|
.taskon-toast--info {
|
|
141
|
-
border-left: 3px solid
|
|
166
|
+
border-left: 3px solid var(--taskon-color-link);
|
|
142
167
|
}
|
|
143
168
|
|
|
144
169
|
.taskon-toast--info .taskon-toast-icon {
|
|
145
|
-
background:
|
|
146
|
-
color:
|
|
170
|
+
background: var(--taskon-color-bg-surface-strong);
|
|
171
|
+
color: var(--taskon-color-link);
|
|
147
172
|
}
|
|
148
173
|
|
|
149
|
-
/* ====================
|
|
150
|
-
|
|
174
|
+
/* ==================== Desktop 增强 ==================== */
|
|
175
|
+
|
|
176
|
+
@media (min-width: 751px) {
|
|
151
177
|
.taskon-toast-viewport {
|
|
152
|
-
top:
|
|
153
|
-
right:
|
|
154
|
-
left:
|
|
155
|
-
width:
|
|
156
|
-
max-width:
|
|
178
|
+
top: 20px;
|
|
179
|
+
right: 20px;
|
|
180
|
+
left: auto;
|
|
181
|
+
width: 320px;
|
|
182
|
+
max-width: calc(100vw - 40px);
|
|
157
183
|
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* WalletPickerDialog 组件样式
|
|
187
|
+
* 使用 taskon-bind-wallet-* 命名空间
|
|
188
|
+
* 与 taskon-website 保持一致
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
/*
|
|
192
|
+
* Responsive base styles
|
|
193
|
+
*
|
|
194
|
+
* Keep mobile breakpoints and fallback patterns centralized here.
|
|
195
|
+
* Components should reuse these mixins instead of duplicating query logic.
|
|
196
|
+
*/
|
|
197
|
+
|
|
198
|
+
/*
|
|
199
|
+
* Desktop-up mixin:
|
|
200
|
+
* 1) Enable desktop enhancement in wider containers
|
|
201
|
+
* 2) Keep viewport media query as fallback
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
/* Ensure wallet picker always appears above other SDK dialogs */
|
|
205
|
+
|
|
206
|
+
.taskon-wallet-picker-overlay {
|
|
207
|
+
z-index: 10008;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.taskon-wallet-picker-content {
|
|
211
|
+
z-index: 10009;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* ==================== 容器 ==================== */
|
|
215
|
+
|
|
216
|
+
.taskon-bind-wallet-dialog {
|
|
217
|
+
position: relative;
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* ==================== 标题 ==================== */
|
|
158
223
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
224
|
+
.taskon-bind-wallet-dialog-title {
|
|
225
|
+
margin: 0;
|
|
226
|
+
font-size: 22px;
|
|
227
|
+
font-weight: 700;
|
|
228
|
+
line-height: 28px;
|
|
229
|
+
color: var(--taskon-color-text);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* ==================== 链类型标签 ==================== */
|
|
233
|
+
|
|
234
|
+
.taskon-bind-wallet-dialog-chain-label {
|
|
235
|
+
margin-top: var(--taskon-spacing-md);
|
|
236
|
+
font-size: 16px;
|
|
237
|
+
font-weight: 500;
|
|
238
|
+
line-height: 20px;
|
|
239
|
+
color: var(--taskon-color-text);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* ==================== 钱包网格 ==================== */
|
|
243
|
+
|
|
244
|
+
.taskon-bind-wallet-dialog-grid {
|
|
245
|
+
margin-top: var(--taskon-spacing-sm);
|
|
246
|
+
display: grid;
|
|
247
|
+
grid-template-columns: 1fr;
|
|
248
|
+
gap: var(--taskon-spacing-md);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* ==================== 钱包项 ==================== */
|
|
252
|
+
|
|
253
|
+
.taskon-bind-wallet-item {
|
|
254
|
+
position: relative;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
height: 50px;
|
|
259
|
+
padding: 0 12px;
|
|
260
|
+
|
|
261
|
+
background: transparent;
|
|
262
|
+
border: 1px solid var(--taskon-color-border);
|
|
263
|
+
border-radius: 8px;
|
|
264
|
+
cursor: pointer;
|
|
265
|
+
transition: all 0.2s ease;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.taskon-bind-wallet-item:hover,
|
|
269
|
+
.taskon-bind-wallet-item:focus {
|
|
270
|
+
background: var(--taskon-color-bg-surface-strong);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.taskon-bind-wallet-item:active {
|
|
274
|
+
transform: scale(0.98);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/* 钱包图标 */
|
|
278
|
+
|
|
279
|
+
.taskon-bind-wallet-item-icon {
|
|
280
|
+
display: flex;
|
|
281
|
+
align-items: center;
|
|
282
|
+
justify-content: center;
|
|
283
|
+
width: 24px;
|
|
284
|
+
height: 24px;
|
|
285
|
+
flex-shrink: 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.taskon-bind-wallet-item-icon svg {
|
|
289
|
+
width: 24px;
|
|
290
|
+
height: 24px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* 钱包名称 */
|
|
294
|
+
|
|
295
|
+
.taskon-bind-wallet-item-name {
|
|
296
|
+
margin-left: 10px;
|
|
297
|
+
font-size: 18px;
|
|
298
|
+
font-weight: 600;
|
|
299
|
+
line-height: 20px;
|
|
300
|
+
color: var(--taskon-color-text);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* 已安装标签 */
|
|
304
|
+
|
|
305
|
+
.taskon-bind-wallet-item-installed {
|
|
306
|
+
position: absolute;
|
|
307
|
+
right: 0;
|
|
308
|
+
bottom: 0;
|
|
309
|
+
padding: 4px 8px;
|
|
310
|
+
font-size: 10px;
|
|
311
|
+
line-height: 14px;
|
|
312
|
+
color: var(--taskon-color-secondary);
|
|
313
|
+
background: var(--taskon-color-secondary-bg);
|
|
314
|
+
border-radius: 8px 0;
|
|
315
|
+
transform-origin: bottom right;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* ==================== 连接中状态 ==================== */
|
|
319
|
+
|
|
320
|
+
.taskon-bind-wallet-item--connecting {
|
|
321
|
+
opacity: 0.7;
|
|
322
|
+
cursor: wait;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.taskon-bind-wallet-item--connecting:hover,
|
|
326
|
+
.taskon-bind-wallet-item--connecting:focus {
|
|
327
|
+
background: transparent;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* ==================== 禁用状态 ==================== */
|
|
331
|
+
|
|
332
|
+
.taskon-bind-wallet-item--disabled {
|
|
333
|
+
opacity: 0.5;
|
|
334
|
+
cursor: not-allowed;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.taskon-bind-wallet-item--disabled:hover,
|
|
338
|
+
.taskon-bind-wallet-item--disabled:focus {
|
|
339
|
+
background: transparent;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.taskon-bind-wallet-item--disabled:active {
|
|
343
|
+
transform: none;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* 不可用标签 */
|
|
347
|
+
|
|
348
|
+
.taskon-bind-wallet-item-unavailable {
|
|
349
|
+
position: absolute;
|
|
350
|
+
right: 0;
|
|
351
|
+
bottom: 0;
|
|
352
|
+
padding: 4px 8px;
|
|
353
|
+
font-size: 10px;
|
|
354
|
+
line-height: 14px;
|
|
355
|
+
color: var(--taskon-color-text-tertiary);
|
|
356
|
+
background: var(--taskon-color-bg-surface-subtle);
|
|
357
|
+
border-radius: 8px 0;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* 连接中 spinner */
|
|
361
|
+
|
|
362
|
+
.taskon-bind-wallet-item-connecting {
|
|
363
|
+
position: absolute;
|
|
364
|
+
right: 8px;
|
|
365
|
+
display: flex;
|
|
366
|
+
align-items: center;
|
|
367
|
+
justify-content: center;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.taskon-bind-wallet-spinner {
|
|
371
|
+
width: 16px;
|
|
372
|
+
height: 16px;
|
|
373
|
+
color: var(--taskon-color-primary);
|
|
374
|
+
animation: taskon-bind-wallet-spin 1s linear infinite;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
@keyframes taskon-bind-wallet-spin {
|
|
378
|
+
from {
|
|
379
|
+
transform: rotate(0deg);
|
|
380
|
+
}
|
|
381
|
+
to {
|
|
382
|
+
transform: rotate(360deg);
|
|
162
383
|
}
|
|
163
384
|
}
|
|
385
|
+
|
|
386
|
+
/* ==================== 提示文字 ==================== */
|
|
387
|
+
|
|
388
|
+
.taskon-bind-wallet-dialog-tip {
|
|
389
|
+
margin: var(--taskon-spacing-md) 0 0;
|
|
390
|
+
font-size: 14px;
|
|
391
|
+
line-height: 1.5;
|
|
392
|
+
color: var(--taskon-color-text-tertiary);
|
|
393
|
+
text-align: center;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/* ==================== 连接中遮层 ==================== */
|
|
397
|
+
|
|
398
|
+
.taskon-bind-wallet-loading-overlay {
|
|
399
|
+
position: absolute;
|
|
400
|
+
/* 使用负值覆盖 Dialog body 的 padding */
|
|
401
|
+
inset: -20px;
|
|
402
|
+
display: flex;
|
|
403
|
+
flex-direction: column;
|
|
404
|
+
align-items: center;
|
|
405
|
+
justify-content: center;
|
|
406
|
+
background: var(--taskon-color-bg-mask);
|
|
407
|
+
backdrop-filter: blur(4px);
|
|
408
|
+
border-radius: 12px;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.taskon-bind-wallet-loading-spinner {
|
|
412
|
+
width: 40px;
|
|
413
|
+
height: 40px;
|
|
414
|
+
color: var(--taskon-color-text-secondary);
|
|
415
|
+
animation: taskon-bind-wallet-spin 1s linear infinite;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.taskon-bind-wallet-loading-text {
|
|
419
|
+
margin: 20px 0 0;
|
|
420
|
+
max-width: 60%;
|
|
421
|
+
font-size: 16px;
|
|
422
|
+
line-height: 20px;
|
|
423
|
+
color: var(--taskon-color-text-secondary);
|
|
424
|
+
text-align: center;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
@supports (container-type: inline-size) {
|
|
428
|
+
@container (min-width: 751px) {
|
|
429
|
+
.taskon-bind-wallet-dialog-chain-label {
|
|
430
|
+
margin-top: 20px;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.taskon-bind-wallet-dialog-grid {
|
|
434
|
+
margin-top: 10px;
|
|
435
|
+
grid-template-columns: 1fr 1fr;
|
|
436
|
+
gap: 18px;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.taskon-bind-wallet-dialog-tip {
|
|
440
|
+
margin-top: 20px;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.taskon-bind-wallet-loading-overlay {
|
|
444
|
+
inset: -24px;
|
|
445
|
+
border-radius: 16px;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
@supports not (container-type: inline-size) {
|
|
451
|
+
@media (min-width: 751px) {
|
|
452
|
+
.taskon-bind-wallet-dialog-chain-label {
|
|
453
|
+
margin-top: 20px;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.taskon-bind-wallet-dialog-grid {
|
|
457
|
+
margin-top: 10px;
|
|
458
|
+
grid-template-columns: 1fr 1fr;
|
|
459
|
+
gap: 18px;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.taskon-bind-wallet-dialog-tip {
|
|
463
|
+
margin-top: 20px;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.taskon-bind-wallet-loading-overlay {
|
|
467
|
+
inset: -24px;
|
|
468
|
+
border-radius: 16px;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
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
|
+
/* 弹层使用浮层背景,避免 dark + 深色页面时与遮罩层融为一体 */
|
|
71
|
+
background-color: var(--taskon-color-bg-floating);
|
|
72
|
+
color: var(--taskon-color-text);
|
|
73
|
+
border: 1px solid var(--taskon-color-border-secondary);
|
|
74
|
+
border-radius: var(--taskon-border-radius);
|
|
75
|
+
box-shadow: 0 28px 56px -20px var(--taskon-color-bg-mask);
|
|
76
|
+
|
|
77
|
+
/* 布局 */
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
|
|
82
|
+
/* 移除默认的 focus outline */
|
|
83
|
+
outline: none;
|
|
84
|
+
|
|
85
|
+
/* 动画 */
|
|
86
|
+
animation: taskon-dialog-content-fade-in 200ms ease-out;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.taskon-dialog-content[data-state="closed"] {
|
|
90
|
+
animation: taskon-dialog-content-fade-out 150ms ease-in;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@keyframes taskon-dialog-content-fade-in {
|
|
94
|
+
from {
|
|
95
|
+
opacity: 0;
|
|
96
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
97
|
+
}
|
|
98
|
+
to {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
transform: translate(-50%, -50%) scale(1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@keyframes taskon-dialog-content-fade-out {
|
|
105
|
+
from {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
transform: translate(-50%, -50%) scale(1);
|
|
108
|
+
}
|
|
109
|
+
to {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* ==================== 无障碍标题/描述(屏幕阅读器可见) ==================== */
|
|
116
|
+
|
|
117
|
+
.taskon-dialog-title--sr-only,
|
|
118
|
+
.taskon-dialog-description--sr-only {
|
|
119
|
+
position: absolute;
|
|
120
|
+
width: 1px;
|
|
121
|
+
height: 1px;
|
|
122
|
+
padding: 0;
|
|
123
|
+
margin: -1px;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
clip: rect(0, 0, 0, 0);
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
border: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ==================== 头部操作区 ==================== */
|
|
131
|
+
|
|
132
|
+
.taskon-dialog-header {
|
|
133
|
+
position: absolute;
|
|
134
|
+
top: 12px;
|
|
135
|
+
right: 12px;
|
|
136
|
+
z-index: 1;
|
|
137
|
+
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
gap: 8px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.taskon-dialog-header-slot {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ==================== 关闭按钮 ==================== */
|
|
149
|
+
|
|
150
|
+
.taskon-dialog-close {
|
|
151
|
+
display: flex;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
|
|
155
|
+
width: 32px;
|
|
156
|
+
height: 32px;
|
|
157
|
+
padding: 0;
|
|
158
|
+
|
|
159
|
+
background: var(--taskon-color-bg-surface-subtle);
|
|
160
|
+
border: none;
|
|
161
|
+
border-radius: var(--taskon-border-radius-sm);
|
|
162
|
+
cursor: pointer;
|
|
163
|
+
|
|
164
|
+
color: var(--taskon-color-text-secondary);
|
|
165
|
+
transition: all 0.2s ease;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.taskon-dialog-close:hover {
|
|
169
|
+
background-color: var(--taskon-color-bg-surface);
|
|
170
|
+
color: var(--taskon-color-text);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.taskon-dialog-close:focus-visible {
|
|
174
|
+
outline: 2px solid var(--taskon-color-primary);
|
|
175
|
+
outline-offset: 2px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* ==================== 主体内容 ==================== */
|
|
179
|
+
|
|
180
|
+
.taskon-dialog-body {
|
|
181
|
+
flex: 1;
|
|
182
|
+
overflow-y: auto;
|
|
183
|
+
padding: 20px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.taskon-dialog-body--no-padding {
|
|
187
|
+
padding: 0;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* ==================== Desktop 增强 ==================== */
|
|
191
|
+
|
|
192
|
+
@supports (container-type: inline-size) {
|
|
193
|
+
@container (min-width: 751px) {
|
|
194
|
+
.taskon-dialog-content {
|
|
195
|
+
width: 90vw;
|
|
196
|
+
max-height: 85vh;
|
|
197
|
+
border-radius: var(--taskon-border-radius-lg);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.taskon-dialog-body {
|
|
201
|
+
padding: 24px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.taskon-dialog-header {
|
|
205
|
+
top: 16px;
|
|
206
|
+
right: 16px;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@supports not (container-type: inline-size) {
|
|
212
|
+
@media (min-width: 751px) {
|
|
213
|
+
.taskon-dialog-content {
|
|
214
|
+
width: 90vw;
|
|
215
|
+
max-height: 85vh;
|
|
216
|
+
border-radius: var(--taskon-border-radius-lg);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.taskon-dialog-body {
|
|
220
|
+
padding: 24px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.taskon-dialog-header {
|
|
224
|
+
top: 16px;
|
|
225
|
+
right: 16px;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|