@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
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dialog 组件样式
|
|
3
|
+
* 基于 Radix UI Dialog 封装
|
|
4
|
+
* 使用 taskon-dialog-* 命名空间
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* ==================== 遮罩层 ==================== */
|
|
8
|
+
.taskon-dialog-overlay {
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: 0;
|
|
11
|
+
z-index: 9998;
|
|
12
|
+
/* 复刻 Vue --bg-page-mask-20: rgb(66 66 66 / 50%) */
|
|
13
|
+
background-color: var(--taskon-color-overlay, rgba(66, 66, 66, 0.5));
|
|
14
|
+
backdrop-filter: blur(24px);
|
|
15
|
+
|
|
16
|
+
/* 动画 */
|
|
17
|
+
animation: taskon-dialog-overlay-fade-in 150ms ease-out;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.taskon-dialog-overlay[data-state="closed"] {
|
|
21
|
+
animation: taskon-dialog-overlay-fade-out 150ms ease-in;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes taskon-dialog-overlay-fade-in {
|
|
25
|
+
from {
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
to {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes taskon-dialog-overlay-fade-out {
|
|
34
|
+
from {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
}
|
|
37
|
+
to {
|
|
38
|
+
opacity: 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ==================== 弹窗内容 ==================== */
|
|
43
|
+
.taskon-dialog-content {
|
|
44
|
+
position: fixed;
|
|
45
|
+
top: 50%;
|
|
46
|
+
left: 50%;
|
|
47
|
+
transform: translate(-50%, -50%);
|
|
48
|
+
z-index: 9999;
|
|
49
|
+
|
|
50
|
+
/* 尺寸 */
|
|
51
|
+
width: 90vw;
|
|
52
|
+
max-width: 500px;
|
|
53
|
+
max-height: 85vh;
|
|
54
|
+
|
|
55
|
+
/* 样式 - 复刻 Vue --bg-popup-basic-100: #0d0d0d */
|
|
56
|
+
background-color: var(--taskon-color-bg-popup, #0d0d0d);
|
|
57
|
+
color: var(--taskon-color-text, #ffffff);
|
|
58
|
+
border-radius: var(--taskon-border-radius-lg, 16px);
|
|
59
|
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
60
|
+
|
|
61
|
+
/* 布局 */
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
|
|
66
|
+
/* 移除默认的 focus outline */
|
|
67
|
+
outline: none;
|
|
68
|
+
|
|
69
|
+
/* 动画 */
|
|
70
|
+
animation: taskon-dialog-content-fade-in 200ms ease-out;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.taskon-dialog-content[data-state="closed"] {
|
|
74
|
+
animation: taskon-dialog-content-fade-out 150ms ease-in;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes taskon-dialog-content-fade-in {
|
|
78
|
+
from {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
81
|
+
}
|
|
82
|
+
to {
|
|
83
|
+
opacity: 1;
|
|
84
|
+
transform: translate(-50%, -50%) scale(1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@keyframes taskon-dialog-content-fade-out {
|
|
89
|
+
from {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
transform: translate(-50%, -50%) scale(1);
|
|
92
|
+
}
|
|
93
|
+
to {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
transform: translate(-50%, -48%) scale(0.96);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* ==================== 无障碍标题/描述(屏幕阅读器可见) ==================== */
|
|
100
|
+
.taskon-dialog-title--sr-only,
|
|
101
|
+
.taskon-dialog-description--sr-only {
|
|
102
|
+
position: absolute;
|
|
103
|
+
width: 1px;
|
|
104
|
+
height: 1px;
|
|
105
|
+
padding: 0;
|
|
106
|
+
margin: -1px;
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
clip: rect(0, 0, 0, 0);
|
|
109
|
+
white-space: nowrap;
|
|
110
|
+
border: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* ==================== 头部操作区 ==================== */
|
|
114
|
+
.taskon-dialog-header {
|
|
115
|
+
position: absolute;
|
|
116
|
+
top: 16px;
|
|
117
|
+
right: 16px;
|
|
118
|
+
z-index: 1;
|
|
119
|
+
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 8px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.taskon-dialog-header-slot {
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ==================== 关闭按钮 ==================== */
|
|
131
|
+
.taskon-dialog-close {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
|
|
136
|
+
width: 32px;
|
|
137
|
+
height: 32px;
|
|
138
|
+
padding: 0;
|
|
139
|
+
|
|
140
|
+
background: rgba(255, 255, 255, 0.1);
|
|
141
|
+
border: none;
|
|
142
|
+
border-radius: var(--taskon-border-radius, 8px);
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
|
|
145
|
+
color: var(--taskon-color-text-secondary, #888);
|
|
146
|
+
transition: all 0.2s ease;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.taskon-dialog-close:hover {
|
|
150
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
151
|
+
color: var(--taskon-color-text, #fff);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.taskon-dialog-close:focus-visible {
|
|
155
|
+
outline: 2px solid var(--taskon-color-primary, #3b82f6);
|
|
156
|
+
outline-offset: 2px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ==================== 主体内容 ==================== */
|
|
160
|
+
.taskon-dialog-body {
|
|
161
|
+
flex: 1;
|
|
162
|
+
overflow-y: auto;
|
|
163
|
+
padding: 24px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ==================== 响应式 ==================== */
|
|
167
|
+
@media (max-width: 750px) {
|
|
168
|
+
.taskon-dialog-content {
|
|
169
|
+
width: 95vw;
|
|
170
|
+
max-height: 90vh;
|
|
171
|
+
border-radius: var(--taskon-border-radius, 12px);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.taskon-dialog-body {
|
|
175
|
+
padding: 20px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.taskon-dialog-header {
|
|
179
|
+
top: 12px;
|
|
180
|
+
right: 12px;
|
|
181
|
+
}
|
|
182
|
+
}
|