idea-react 3.0.0-beta.0 → 3.0.0-beta.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/AGENTS.md +19 -2
- package/ReadMe.md +95 -54
- package/dist/DatePickerPlugin-CpGuQRsi.js +1 -0
- package/dist/DatePickerPlugin-DB3nnslN.mjs +1 -0
- package/dist/index.d.mts +1232 -474
- package/dist/index.d.ts +1232 -474
- package/dist/index.js +16 -16
- package/dist/index.mjs +15 -15
- package/dist/rolldown-runtime-5iZMYShA.js +1 -0
- package/dist/style.css +66 -66
- package/package.json +1 -1
- package/source/Accordion.tsx +161 -0
- package/source/Alert.tsx +153 -0
- package/source/Avatar.tsx +57 -46
- package/source/Badge.tsx +17 -15
- package/source/Breadcrumb.tsx +50 -0
- package/source/Button.tsx +69 -40
- package/source/ButtonGroup.tsx +23 -18
- package/source/Card.tsx +86 -17
- package/source/Carousel/index.tsx +392 -0
- package/source/Carousel/model.ts +113 -0
- package/source/Carousel/scroll.ts +79 -0
- package/source/CloseButton.tsx +20 -15
- package/source/Collapse.tsx +233 -0
- package/source/Drawer.tsx +158 -38
- package/source/{ClickBoundary.tsx → Extension/ClickBoundary.tsx} +24 -5
- package/source/Extension/CodeBlock.tsx +64 -0
- package/source/{Countdown.tsx → Extension/Countdown.tsx} +21 -9
- package/source/{Dialog.tsx → Extension/Dialog.tsx} +10 -6
- package/source/Extension/Editor.tsx +78 -0
- package/source/Extension/EditorHTML.tsx +20 -0
- package/source/{HorizontalMarquee → Extension/HorizontalMarquee}/index.module.less +1 -3
- package/source/Extension/HorizontalMarquee/index.tsx +85 -0
- package/source/Extension/Icon.tsx +19 -0
- package/source/Extension/Loading.tsx +30 -0
- package/source/{MonthCalendar.tsx → Extension/MonthCalendar.tsx} +29 -13
- package/source/{Nameplate.tsx → Extension/Nameplate.tsx} +1 -1
- package/source/Extension/OverlayBox.tsx +293 -0
- package/source/{PageNav.tsx → Extension/PageNav.tsx} +43 -16
- package/source/{ScrollNav → Extension/ScrollNav}/Scroller.tsx +21 -5
- package/source/Extension/ScrollNav/index.tsx +47 -0
- package/source/Extension/Select.tsx +128 -0
- package/source/{ShareBox.tsx → Extension/ShareBox.tsx} +1 -1
- package/source/Extension/SpinnerButton.tsx +30 -0
- package/source/Extension/TableSpinner.tsx +22 -0
- package/source/Extension/TextTruncate/index.tsx +29 -0
- package/source/Extension/Time.tsx +17 -0
- package/source/Extension/TimeDistance.tsx +45 -0
- package/source/Extension/Timeline/index.tsx +63 -0
- package/source/Extension/TypeEcho/Content.tsx +123 -0
- package/source/Extension/TypeEcho/index.tsx +22 -0
- package/source/Extension/UserRank/Address.tsx +22 -0
- package/source/Extension/UserRank/index.tsx +106 -0
- package/source/Extension/VerticalMarquee/index.tsx +23 -0
- package/source/Extension/ZodiacBar.tsx +59 -0
- package/source/Extension/index.ts +27 -0
- package/source/Form/Adorn.tsx +45 -26
- package/source/Form/Checkbox.tsx +20 -11
- package/source/Form/ChipInput.tsx +129 -0
- package/source/Form/Chips.tsx +57 -37
- package/source/Form/Combobox.tsx +362 -78
- package/source/Form/Control.tsx +72 -42
- package/source/Form/DatePicker.tsx +245 -45
- package/source/Form/DatePickerPlugin.ts +37 -0
- package/source/Form/Feedback.tsx +21 -16
- package/source/Form/FloatingLabel.tsx +21 -7
- package/source/Form/InputGroup.tsx +162 -11
- package/source/Form/OTP.tsx +156 -45
- package/source/Form/PasswordStrength.tsx +43 -17
- package/source/Form/Plugin.tsx +53 -0
- package/source/Form/Primitives.tsx +70 -20
- package/source/Form/Radio.tsx +35 -40
- package/source/Form/Range.tsx +125 -56
- package/source/Form/Switch.tsx +53 -27
- package/source/Form/index.ts +1 -0
- package/source/Grid.tsx +68 -56
- package/source/Image.tsx +10 -6
- package/source/ListGroup.tsx +59 -58
- package/source/Menu.tsx +317 -46
- package/source/NativeDialog/index.tsx +148 -22
- package/source/Nav.tsx +49 -33
- package/source/NavOverflow/index.tsx +323 -0
- package/source/NavOverflow/model.ts +21 -0
- package/source/Navbar.tsx +65 -45
- package/source/Overlay.ts +163 -1
- package/source/Pagination.tsx +86 -0
- package/source/Placeholder.tsx +70 -0
- package/source/Polymorphic.ts +57 -0
- package/source/Popover.tsx +34 -26
- package/source/Progress/index.tsx +81 -0
- package/source/Progress/style.module.css +15 -0
- package/source/ScrollSpy/index.tsx +380 -0
- package/source/ScrollSpy/model.ts +17 -0
- package/source/Spinner.tsx +31 -17
- package/source/Stack.tsx +25 -0
- package/source/Stepper.tsx +91 -0
- package/source/Tab.tsx +261 -0
- package/source/Table.tsx +53 -42
- package/source/Toast.tsx +93 -46
- package/source/ToggleButton.tsx +47 -30
- package/source/Toggler.tsx +117 -0
- package/source/Tooltip.tsx +31 -24
- package/source/index.ts +17 -27
- package/source/CodeBlock.tsx +0 -40
- package/source/Editor.tsx +0 -43
- package/source/EditorHTML.tsx +0 -16
- package/source/HorizontalMarquee/index.tsx +0 -61
- package/source/Icon.tsx +0 -24
- package/source/Loading.tsx +0 -22
- package/source/OverlayBox.tsx +0 -208
- package/source/ScrollNav/index.tsx +0 -22
- package/source/Select.tsx +0 -95
- package/source/SpinnerButton.tsx +0 -35
- package/source/TableSpinner.tsx +0 -26
- package/source/TextTruncate/index.tsx +0 -25
- package/source/Time.tsx +0 -15
- package/source/TimeDistance.tsx +0 -41
- package/source/Timeline/index.tsx +0 -60
- package/source/TypeEcho/Content.tsx +0 -58
- package/source/TypeEcho/index.tsx +0 -14
- package/source/UserRank/Address.tsx +0 -20
- package/source/UserRank/index.tsx +0 -111
- package/source/VerticalMarquee/index.tsx +0 -25
- package/source/ZodiacBar.tsx +0 -51
- /package/source/{LiveTSX.tsx → Extension/LiveTSX.tsx} +0 -0
- /package/source/{ScrollNav → Extension/ScrollNav}/index.module.less +0 -0
- /package/source/{TextTruncate → Extension/TextTruncate}/Content.tsx +0 -0
- /package/source/{Timeline → Extension/Timeline}/index.module.less +0 -0
- /package/source/{UserRank → Extension/UserRank}/index.module.less +0 -0
- /package/source/{VerticalMarquee → Extension/VerticalMarquee}/index.module.less +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
package/dist/style.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
--bs-dialog-backdrop-bg: transparent;
|
|
3
3
|
--bs-dialog-backdrop-blur: 0;
|
|
4
4
|
}
|
|
5
|
-
@keyframes
|
|
5
|
+
@keyframes ONAURG_scrollItem {
|
|
6
6
|
0%, 10% {
|
|
7
7
|
transform: translateX(0);
|
|
8
8
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
@keyframes
|
|
15
|
+
@keyframes ONAURG_scrollWrap {
|
|
16
16
|
0%, 10% {
|
|
17
17
|
transform: translateX(0);
|
|
18
18
|
}
|
|
@@ -22,66 +22,66 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.
|
|
26
|
-
animation: 4s linear infinite alternate
|
|
25
|
+
.ONAURG_scrollWrap {
|
|
26
|
+
animation: 4s linear infinite alternate ONAURG_scrollWrap;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
30
|
-
animation: 4s linear infinite alternate
|
|
29
|
+
.ONAURG_scrollWrap .ONAURG_scrollItem {
|
|
30
|
+
animation: 4s linear infinite alternate ONAURG_scrollItem;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.
|
|
33
|
+
.ONAURG_scrollWrap:hover, .ONAURG_scrollWrap:hover .ONAURG_scrollItem {
|
|
34
34
|
animation-play-state: paused;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.
|
|
37
|
+
.ONAURG_scrollHeightWrap {
|
|
38
38
|
--scroll-height: 20px;
|
|
39
39
|
height: var(--scroll-height);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.ONAURG_scrollHeightWrap .ONAURG_scrollContainer {
|
|
43
43
|
transform: translateY(calc(calc(-100% + var(--scroll-height) + var(--scroll-height)) * 2));
|
|
44
44
|
max-height: calc(var(--scroll-height) * 3);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.
|
|
47
|
+
.ONAURG_scrollHeightWrap .ONAURG_scrollContainer .ONAURG_unScrollItem {
|
|
48
48
|
max-height: calc(var(--scroll-height) * 2);
|
|
49
49
|
line-height: var(--scroll-height);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.ONAURG_scrollHeightWrap .ONAURG_scrollContainer .ONAURG_scrollItem {
|
|
53
53
|
height: var(--scroll-height);
|
|
54
54
|
line-height: var(--scroll-height);
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.nZcgHq_scrollerInner {
|
|
57
57
|
-webkit-overflow-scrolling: touch;
|
|
58
58
|
scrollbar-width: none;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.
|
|
61
|
+
.nZcgHq_scrollerInner::-webkit-scrollbar {
|
|
62
62
|
display: none;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.nZcgHq_scrollButtonLeft {
|
|
66
66
|
background: linear-gradient(to right, #d3d3d3, #0000);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.
|
|
69
|
+
.nZcgHq_scrollButtonRight {
|
|
70
70
|
background: linear-gradient(to left, #d3d3d3, #0000);
|
|
71
71
|
}
|
|
72
|
-
.
|
|
72
|
+
.M_u5hG_timeline {
|
|
73
73
|
max-width: 50%;
|
|
74
74
|
margin: 0 auto;
|
|
75
75
|
position: relative;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
@media (width <= 991px) {
|
|
79
|
-
.
|
|
79
|
+
.M_u5hG_timeline {
|
|
80
80
|
max-width: 100%;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.
|
|
84
|
+
.M_u5hG_timeline:after {
|
|
85
85
|
content: "";
|
|
86
86
|
background-color: #fff;
|
|
87
87
|
width: 3px;
|
|
@@ -92,13 +92,13 @@
|
|
|
92
92
|
left: 10px;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.
|
|
95
|
+
.M_u5hG_timelineItem {
|
|
96
96
|
background-color: inherit;
|
|
97
97
|
width: 100%;
|
|
98
98
|
position: relative;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.
|
|
101
|
+
.M_u5hG_timelineItem:after {
|
|
102
102
|
z-index: 1;
|
|
103
103
|
content: "";
|
|
104
104
|
background-color: #fff;
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
right: 1px;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.M_u5hG_right {
|
|
114
114
|
padding: 0 0 20px 40px;
|
|
115
115
|
left: auto;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.
|
|
118
|
+
.M_u5hG_right:before {
|
|
119
119
|
z-index: 1;
|
|
120
120
|
content: " ";
|
|
121
121
|
border: 10px solid #0000;
|
|
@@ -126,10 +126,10 @@
|
|
|
126
126
|
left: 30px;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.
|
|
129
|
+
.M_u5hG_right:after {
|
|
130
130
|
left: 0;
|
|
131
131
|
}
|
|
132
|
-
@keyframes
|
|
132
|
+
@keyframes UcKh3G_suspension {
|
|
133
133
|
0% {
|
|
134
134
|
position: relative;
|
|
135
135
|
top: 0;
|
|
@@ -146,26 +146,26 @@
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
.
|
|
149
|
+
.UcKh3G_rankBox {
|
|
150
150
|
--logo-image: url("https://github.com/idea2app.png");
|
|
151
151
|
--title-background-image: url("https://hackathon-api.static.kaiyuanshe.cn/6342619375fa1817e0f56ce1/2022/10/09/rrrr.png");
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
.
|
|
154
|
+
.UcKh3G_rankBox a {
|
|
155
155
|
color: inherit;
|
|
156
156
|
text-decoration: none;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
.
|
|
159
|
+
.UcKh3G_rankBox .UcKh3G_image {
|
|
160
160
|
width: 2.1rem;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
.
|
|
163
|
+
.UcKh3G_rankBox .UcKh3G_image:hover img {
|
|
164
164
|
transition: all .3s;
|
|
165
165
|
transform: scale(1.1);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
.
|
|
168
|
+
.UcKh3G_rankBox .UcKh3G_title {
|
|
169
169
|
z-index: 4;
|
|
170
170
|
background-image: var(--title-background-image);
|
|
171
171
|
background-size: 21rem;
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
position: relative;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
.
|
|
179
|
+
.UcKh3G_rankBox .UcKh3G_title:before {
|
|
180
180
|
content: "";
|
|
181
181
|
background-color: #a1a098b3;
|
|
182
182
|
border-radius: .3rem;
|
|
@@ -188,13 +188,13 @@
|
|
|
188
188
|
left: 0;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
.
|
|
191
|
+
.UcKh3G_rankBox .UcKh3G_title .UcKh3G_medal {
|
|
192
192
|
position: absolute;
|
|
193
193
|
top: -1.2rem;
|
|
194
194
|
left: 5%;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
.
|
|
197
|
+
.UcKh3G_rankBox .UcKh3G_title .UcKh3G_medal i {
|
|
198
198
|
background-image: var(--logo-image), linear-gradient(#ffd83a, #fdeba0);
|
|
199
199
|
background-blend-mode: lighten;
|
|
200
200
|
background-position: center;
|
|
@@ -206,19 +206,19 @@
|
|
|
206
206
|
box-shadow: 0 0 .5rem #ffd83a;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
.
|
|
209
|
+
.UcKh3G_rankBox .UcKh3G_title .UcKh3G_medal i:first-child {
|
|
210
210
|
background-image: var(--logo-image), linear-gradient(#d8d8d8, #eee);
|
|
211
211
|
border-color: #d8d8d8;
|
|
212
212
|
box-shadow: 0 0 .5rem #d8d8d8;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
.
|
|
215
|
+
.UcKh3G_rankBox .UcKh3G_title .UcKh3G_medal i:last-child {
|
|
216
216
|
background-image: var(--logo-image), linear-gradient(#fab36e, #fbe7d3);
|
|
217
217
|
border-color: #fab36e;
|
|
218
218
|
box-shadow: 0 0 .5rem #fab36e;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
.
|
|
221
|
+
.UcKh3G_rankBox .UcKh3G_title h3 {
|
|
222
222
|
z-index: 2;
|
|
223
223
|
cursor: default;
|
|
224
224
|
color: #0000;
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
position: relative;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
.
|
|
233
|
+
.UcKh3G_rankBox .UcKh3G_title h3:after {
|
|
234
234
|
z-index: 1;
|
|
235
235
|
content: attr(data-text);
|
|
236
236
|
width: 10rem;
|
|
@@ -244,39 +244,39 @@
|
|
|
244
244
|
left: 0;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
.
|
|
247
|
+
.UcKh3G_rankBox .UcKh3G_topUsers {
|
|
248
248
|
z-index: 5;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
.
|
|
251
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li {
|
|
252
252
|
cursor: default;
|
|
253
253
|
text-align: center;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.
|
|
256
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li .UcKh3G_topUser {
|
|
257
257
|
z-index: 3;
|
|
258
258
|
letter-spacing: 1px;
|
|
259
259
|
min-height: 6rem;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
.
|
|
262
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li .UcKh3G_image {
|
|
263
263
|
z-index: 2;
|
|
264
264
|
transition: all .6s;
|
|
265
|
-
animation: 3.5s ease-in-out infinite
|
|
265
|
+
animation: 3.5s ease-in-out infinite UcKh3G_suspension;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
.
|
|
268
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:first-child {
|
|
269
269
|
order: 2;
|
|
270
270
|
padding-top: .3rem;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
.
|
|
273
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:first-child .UcKh3G_topUser {
|
|
274
274
|
color: #ffd83a;
|
|
275
275
|
text-shadow: 0 1px #969653, 0 2px 5px #f0db6466;
|
|
276
276
|
border-bottom: 1.5rem solid #ffd83a;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
.
|
|
279
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:first-child .UcKh3G_topUser i {
|
|
280
280
|
background-image: var(--logo-image), linear-gradient(#ffd83a, #fdeba0);
|
|
281
281
|
background-blend-mode: lighten;
|
|
282
282
|
background-position: center;
|
|
@@ -286,56 +286,56 @@
|
|
|
286
286
|
height: 2.6rem;
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
.
|
|
289
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:first-child .UcKh3G_image {
|
|
290
290
|
width: 6.4rem;
|
|
291
291
|
animation-delay: 3.5s;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
.
|
|
294
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(2) {
|
|
295
295
|
order: 1;
|
|
296
296
|
padding-top: 1rem;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.
|
|
299
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(2) .UcKh3G_topUser {
|
|
300
300
|
color: #d8d8d8;
|
|
301
301
|
text-shadow: 0px 1px 0px #d9cdcd 0px 2px 5px #85848266;
|
|
302
302
|
border-bottom: 1.2rem solid #d8d8d8;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
.
|
|
305
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(2) .UcKh3G_topUser i {
|
|
306
306
|
background-image: var(--logo-image), linear-gradient(#d8d8d8, #eee);
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
-
.
|
|
309
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(2) .UcKh3G_image {
|
|
310
310
|
width: 6rem;
|
|
311
311
|
animation-delay: 1.4s;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
.
|
|
314
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(3) {
|
|
315
315
|
order: 3;
|
|
316
316
|
padding-top: 1.5rem;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
.
|
|
319
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(3) .UcKh3G_topUser {
|
|
320
320
|
color: #fab36e;
|
|
321
321
|
text-shadow: 0 1px #aa8865, 0 2px 5px #a7814366;
|
|
322
322
|
border-bottom: 1rem solid #fab36e;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
|
-
.
|
|
325
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(3) .UcKh3G_topUser i {
|
|
326
326
|
background-image: var(--logo-image), linear-gradient(#fab36e, #fbe7d3);
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
.
|
|
329
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:nth-child(3) .UcKh3G_image {
|
|
330
330
|
width: 5.6rem;
|
|
331
331
|
animation-delay: 2.4s;
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
.
|
|
334
|
+
.UcKh3G_rankBox .UcKh3G_topUsers li:hover .UcKh3G_image {
|
|
335
335
|
animation-play-state: paused;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
.
|
|
338
|
+
.UcKh3G_rankBox .UcKh3G_restUsers tr:before {
|
|
339
339
|
content: "";
|
|
340
340
|
background: #9fc2ef;
|
|
341
341
|
width: 0;
|
|
@@ -347,25 +347,25 @@
|
|
|
347
347
|
right: 0;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
.
|
|
350
|
+
.UcKh3G_rankBox .UcKh3G_restUsers tr:hover:before {
|
|
351
351
|
width: 100%;
|
|
352
352
|
left: 0;
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
-
.
|
|
355
|
+
.UcKh3G_rankBox .UcKh3G_restUsers td {
|
|
356
356
|
cursor: default;
|
|
357
357
|
background-color: #0000;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
.
|
|
360
|
+
.UcKh3G_rankBox .UcKh3G_restUsers td .UcKh3G_name {
|
|
361
361
|
max-width: 50%;
|
|
362
362
|
font-size: 0;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
.
|
|
365
|
+
.UcKh3G_rankBox .UcKh3G_restUsers td .UcKh3G_name:hover .UcKh3G_image > img {
|
|
366
366
|
transform: scale(1.2);
|
|
367
367
|
}
|
|
368
|
-
@keyframes
|
|
368
|
+
@keyframes x8UL2q_scrollItem {
|
|
369
369
|
0%, 10% {
|
|
370
370
|
transform: translateY(0);
|
|
371
371
|
}
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
-
@keyframes
|
|
378
|
+
@keyframes x8UL2q_scrollWrap {
|
|
379
379
|
0%, 10% {
|
|
380
380
|
transform: translateY(0);
|
|
381
381
|
}
|
|
@@ -385,21 +385,21 @@
|
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
.
|
|
388
|
+
.x8UL2q_scrollWrap {
|
|
389
389
|
--duration: 10s;
|
|
390
|
-
animation:
|
|
390
|
+
animation: x8UL2q_scrollWrap;
|
|
391
391
|
animation-duration: var(--duration);
|
|
392
392
|
animation-timing-function: linear;
|
|
393
393
|
animation-iteration-count: infinite;
|
|
394
394
|
animation-direction: alternate;
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
-
.
|
|
397
|
+
.x8UL2q_scrollWrap:hover, .x8UL2q_scrollWrap:hover .x8UL2q_scrollItem {
|
|
398
398
|
animation-play-state: paused;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
.
|
|
402
|
-
animation:
|
|
401
|
+
.x8UL2q_scrollWrap .x8UL2q_scrollItem {
|
|
402
|
+
animation: x8UL2q_scrollItem;
|
|
403
403
|
animation-duration: var(--duration);
|
|
404
404
|
animation-timing-function: linear;
|
|
405
405
|
animation-iteration-count: infinite;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idea-react",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.2",
|
|
4
4
|
"license": "LGPL-3.0-or-later",
|
|
5
5
|
"author": "shiy2008@gmail.com",
|
|
6
6
|
"description": "A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.",
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { action, observable } from 'mobx';
|
|
5
|
+
import { observer } from 'mobx-react';
|
|
6
|
+
import {
|
|
7
|
+
Component,
|
|
8
|
+
ComponentPropsWithoutRef,
|
|
9
|
+
ComponentPropsWithRef,
|
|
10
|
+
ElementType,
|
|
11
|
+
MouseEvent
|
|
12
|
+
} from 'react';
|
|
13
|
+
|
|
14
|
+
import { Button, ButtonProps, ComponentTheme } from './Button';
|
|
15
|
+
import { Icon } from './Extension/Icon';
|
|
16
|
+
import { AsProps, polymorphic, PolymorphicClassProps } from './Polymorphic';
|
|
17
|
+
|
|
18
|
+
export interface AccordionProps extends ComponentPropsWithRef<'div'> {
|
|
19
|
+
theme?: ComponentTheme;
|
|
20
|
+
size?: 'sm';
|
|
21
|
+
flush?: boolean;
|
|
22
|
+
gap?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const Accordion = polymorphic<AccordionProps>(
|
|
26
|
+
({ as: Root = 'div', theme, size, flush, gap, className, ...props }) => (
|
|
27
|
+
<Root
|
|
28
|
+
{...props}
|
|
29
|
+
className={classNames(
|
|
30
|
+
'accordion',
|
|
31
|
+
theme && `theme-${theme}`,
|
|
32
|
+
size && `accordion-${size}`,
|
|
33
|
+
{ 'accordion-flush': flush, 'accordion-gap': gap },
|
|
34
|
+
className
|
|
35
|
+
)}
|
|
36
|
+
/>
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
Accordion.displayName = 'Accordion';
|
|
40
|
+
|
|
41
|
+
export const AccordionItem = polymorphic<ComponentPropsWithRef<'details'>>(
|
|
42
|
+
({ as: Root = 'details', className, ...props }) => (
|
|
43
|
+
<Root {...props} className={classNames('accordion-item', className)} />
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
47
|
+
|
|
48
|
+
export interface AccordionHeaderProps extends ComponentPropsWithRef<'summary'> {
|
|
49
|
+
icon?: string | false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const AccordionHeader = polymorphic<AccordionHeaderProps>(
|
|
53
|
+
({ as: Root = 'summary', icon = 'chevron-down', className, children, ...props }) => (
|
|
54
|
+
<Root {...props} className={classNames('accordion-header', className)}>
|
|
55
|
+
{children}
|
|
56
|
+
{icon && <Icon name={icon} className="accordion-icon" aria-hidden="true" />}
|
|
57
|
+
</Root>
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
AccordionHeader.displayName = 'AccordionHeader';
|
|
61
|
+
|
|
62
|
+
export const AccordionBody = polymorphic<ComponentPropsWithRef<'div'>>(
|
|
63
|
+
({ as: Root = 'div', className, ...props }) => (
|
|
64
|
+
<Root {...props} className={classNames('accordion-body', className)} />
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
AccordionBody.displayName = 'AccordionBody';
|
|
68
|
+
|
|
69
|
+
export interface AccordionToggleProps
|
|
70
|
+
extends
|
|
71
|
+
ComponentPropsWithoutRef<'button'>,
|
|
72
|
+
Pick<ButtonProps, 'variant' | 'theme' | 'size' | 'styled' | 'icon'> {
|
|
73
|
+
target: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@observer
|
|
77
|
+
export class AccordionToggle<T extends ElementType | undefined = 'button'> extends Component<
|
|
78
|
+
PolymorphicClassProps<T, AccordionToggleProps>
|
|
79
|
+
> {
|
|
80
|
+
declare readonly props: PolymorphicClassProps<T, AccordionToggleProps>;
|
|
81
|
+
|
|
82
|
+
protected get componentProps(): Readonly<AccordionToggleProps & AsProps> {
|
|
83
|
+
return this.props;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static displayName = 'AccordionToggle';
|
|
87
|
+
|
|
88
|
+
@observable accessor expanded = false;
|
|
89
|
+
|
|
90
|
+
names = new Map<HTMLDetailsElement, string>();
|
|
91
|
+
|
|
92
|
+
get items() {
|
|
93
|
+
return [
|
|
94
|
+
...(document
|
|
95
|
+
.querySelector(this.componentProps.target)
|
|
96
|
+
?.querySelectorAll<HTMLDetailsElement>(':scope > .accordion-item') ?? [])
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
componentDidMount() {
|
|
101
|
+
document.addEventListener('toggle', this.refresh, true);
|
|
102
|
+
this.refresh();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
componentDidUpdate(previous: AccordionToggleProps) {
|
|
106
|
+
if (previous.target !== this.componentProps.target) {
|
|
107
|
+
this.restoreNames();
|
|
108
|
+
this.refresh();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
componentWillUnmount() {
|
|
113
|
+
document.removeEventListener('toggle', this.refresh, true);
|
|
114
|
+
this.restoreNames();
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
restoreNames = () => {
|
|
118
|
+
for (const [item, name] of this.names) item.setAttribute('name', name);
|
|
119
|
+
this.names.clear();
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
refresh = action(() => {
|
|
123
|
+
const { items } = this;
|
|
124
|
+
|
|
125
|
+
this.expanded = !!items.length && items.every(({ open }) => open);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
handleClick = (event: MouseEvent<HTMLButtonElement>) => {
|
|
129
|
+
this.componentProps.onClick?.(event);
|
|
130
|
+
|
|
131
|
+
if (event.defaultPrevented) return;
|
|
132
|
+
|
|
133
|
+
const { items, expanded } = this;
|
|
134
|
+
|
|
135
|
+
for (const item of items) {
|
|
136
|
+
const name = item.getAttribute('name');
|
|
137
|
+
|
|
138
|
+
if (!expanded && name) {
|
|
139
|
+
this.names.set(item, name);
|
|
140
|
+
item.removeAttribute('name');
|
|
141
|
+
}
|
|
142
|
+
item.open = !expanded;
|
|
143
|
+
}
|
|
144
|
+
if (expanded) this.restoreNames();
|
|
145
|
+
|
|
146
|
+
this.refresh();
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
render() {
|
|
150
|
+
const { target: _target, ...props } = this.componentProps;
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<Button
|
|
154
|
+
as={this.componentProps.as}
|
|
155
|
+
{...props}
|
|
156
|
+
aria-expanded={this.expanded}
|
|
157
|
+
onClick={this.handleClick}
|
|
158
|
+
/>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
}
|