@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,210 +0,0 @@
1
- /**
2
- * Input 通用组件样式
3
- * @description 复刻 Vue 版本 BaseInputPro.vue 样式
4
- * 使用 taskon-input 命名空间
5
- */
6
-
7
- /* ==================== 输入框 ==================== */
8
- .taskon-input {
9
- width: 100%;
10
- height: 40px;
11
- padding: 0 12px;
12
- border-radius: 6px;
13
- border: 1px solid rgba(255, 255, 255, 0.1);
14
- background: rgba(255, 255, 255, 0.04);
15
- color: var(--taskon-color-text, #fff);
16
- font-size: 14px;
17
- line-height: 40px;
18
- letter-spacing: 0.04em;
19
- outline: none;
20
- transition: border-color 0.2s;
21
- }
22
-
23
- .taskon-input:focus {
24
- border-color: var(--taskon-color-primary, #cbff01);
25
- }
26
-
27
- .taskon-input:disabled {
28
- opacity: 0.6;
29
- cursor: not-allowed;
30
- }
31
-
32
- .taskon-input--error {
33
- border-color: #eb5757;
34
- }
35
-
36
- .taskon-input::placeholder {
37
- color: var(--taskon-color-text-tertiary, #666);
38
- font-weight: 400;
39
- }
40
-
41
- /* ==================== 包装器(用于 rightSlot 和 error) ==================== */
42
- .taskon-input-wrapper {
43
- width: 100%;
44
- }
45
-
46
- /* ==================== 容器(包含输入框和右侧插槽) ==================== */
47
- .taskon-input-container {
48
- display: flex;
49
- align-items: center;
50
- gap: 8px;
51
- padding-right: 12px;
52
- border-radius: 6px;
53
- border: 1px solid rgba(255, 255, 255, 0.1);
54
- background: rgba(255, 255, 255, 0.04);
55
- transition: border-color 0.2s;
56
- }
57
-
58
- .taskon-input-container:focus-within {
59
- border-color: var(--taskon-color-primary, #cbff01);
60
- }
61
-
62
- .taskon-input-container--error {
63
- border-color: #eb5757;
64
- }
65
-
66
- /* 容器内的输入框样式重置 */
67
- .taskon-input--in-container {
68
- flex: 1;
69
- border: none;
70
- background: transparent;
71
- border-radius: 0;
72
- }
73
-
74
- .taskon-input--in-container:focus {
75
- border-color: transparent;
76
- }
77
-
78
- /* ==================== 右侧插槽 ==================== */
79
- .taskon-input-slot {
80
- flex-shrink: 0;
81
- display: flex;
82
- align-items: center;
83
- }
84
-
85
- /* MAX 按钮样式(通用样式) */
86
- .taskon-input-slot button {
87
- padding: 4px 8px;
88
- font-size: 12px;
89
- font-weight: 600;
90
- color: var(--taskon-color-primary, #cbff01);
91
- background: transparent;
92
- border: 1px solid var(--taskon-color-primary, #cbff01);
93
- border-radius: 4px;
94
- cursor: pointer;
95
- transition: all 0.2s;
96
- }
97
-
98
- .taskon-input-slot button:hover:not(:disabled) {
99
- background: rgba(203, 255, 1, 0.1);
100
- }
101
-
102
- .taskon-input-slot button:disabled {
103
- opacity: 0.5;
104
- cursor: not-allowed;
105
- }
106
-
107
- /* ==================== 错误信息 ==================== */
108
- .taskon-input-error {
109
- margin: 4px 0 0 0;
110
- font-size: 12px;
111
- color: #eb5757;
112
- line-height: 1.4;
113
- }
114
-
115
- /* ==================== 响应式 ==================== */
116
- @media (max-width: 750px) {
117
- .taskon-input {
118
- height: 10.667vw;
119
- padding: 0 3.2vw;
120
- font-size: 3.733vw;
121
- line-height: 10.667vw;
122
- }
123
-
124
- .taskon-input-container {
125
- padding-right: 3.2vw;
126
- gap: 2.133vw;
127
- }
128
-
129
- .taskon-input-slot button {
130
- padding: 1.067vw 2.133vw;
131
- font-size: 3.2vw;
132
- }
133
-
134
- .taskon-input-error {
135
- margin-top: 1.067vw;
136
- font-size: 3.2vw;
137
- }
138
- }
139
- /**
140
- * TipPopover 组件样式
141
- * 设计原则:组件内部不包含 margin,需要间距由外部控制
142
- */
143
-
144
- .taskon-tip-popover-trigger {
145
- display: inline-flex;
146
- align-items: center;
147
- justify-content: center;
148
- padding: 0;
149
- border: none;
150
- background: transparent;
151
- cursor: pointer;
152
- color: var(--taskon-text-tertiary, rgba(255, 255, 255, 0.4));
153
- outline: none;
154
- }
155
-
156
- .taskon-tip-popover-trigger:hover,
157
- .taskon-tip-popover-trigger:focus {
158
- color: var(--taskon-text-tertiary, rgba(255, 255, 255, 0.4));
159
- background: transparent;
160
- outline: none;
161
- }
162
-
163
- /* Custom children trigger - reset button styles */
164
- .taskon-tip-popover-trigger--custom {
165
- cursor: pointer;
166
- }
167
-
168
- .taskon-tip-popover-content {
169
- max-width: 266px;
170
- padding: 12px 16px;
171
- border-radius: 8px;
172
- border: none;
173
- outline: none;
174
- background: var(--taskon-bg-elevated, #2a2a2a);
175
- color: var(--taskon-text-primary, #fff);
176
- font-size: 13px;
177
- line-height: 1.5;
178
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
179
- /* z-index 需要大于 Dialog (9999) 才能在弹窗中正常显示 */
180
- z-index: 10000;
181
- animation: taskon-tip-popover-fade-in 0.15s ease;
182
- }
183
-
184
- .taskon-tip-popover-content:focus {
185
- outline: none;
186
- }
187
-
188
- .taskon-tip-popover-arrow {
189
- fill: var(--taskon-bg-elevated, #2a2a2a);
190
- }
191
-
192
- @keyframes taskon-tip-popover-fade-in {
193
- from {
194
- opacity: 0;
195
- transform: scale(0.96);
196
- }
197
- to {
198
- opacity: 1;
199
- transform: scale(1);
200
- }
201
- }
202
-
203
- /* Mobile styles */
204
- @media (max-width: 750px) {
205
- .taskon-tip-popover-content {
206
- max-width: 60vw;
207
- padding: 2.5vw 3.5vw;
208
- font-size: 3vw;
209
- }
210
- }
@@ -1,182 +0,0 @@
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
- }