antd-mobile 5.14.1 → 5.15.0
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/2x/README.md +1 -2
- package/2x/bundle/antd-mobile.cjs.js +216 -197
- package/2x/bundle/antd-mobile.es.js +211 -192
- package/2x/bundle/css-vars-patch.css +53 -53
- package/2x/bundle/style.css +9 -6
- package/2x/cjs/components/badge/badge.css +1 -1
- package/2x/cjs/components/badge/badge.d.ts +2 -0
- package/2x/cjs/components/badge/badge.js +2 -1
- package/2x/cjs/components/checkbox/checkbox.d.ts +18 -2
- package/2x/cjs/components/checkbox/checkbox.js +14 -4
- package/2x/cjs/components/checkbox/index.d.ts +13 -2
- package/2x/cjs/components/form/form-item.js +2 -4
- package/2x/cjs/components/form/form-subscribe.d.ts +7 -2
- package/2x/cjs/components/form/form-subscribe.js +28 -16
- package/2x/cjs/components/form/form.d.ts +1 -1
- package/2x/cjs/components/form/index.d.ts +2 -2
- package/2x/cjs/components/infinite-scroll/infinite-scroll.js +13 -4
- package/2x/cjs/components/list/list.css +3 -0
- package/2x/cjs/components/list/list.d.ts +1 -1
- package/2x/cjs/components/rate/rate.css +2 -2
- package/2x/cjs/components/rate/rate.js +3 -3
- package/2x/cjs/components/rate/star.d.ts +2 -0
- package/2x/cjs/components/rate/star.js +37 -0
- package/2x/cjs/components/safe-area/safe-area.css +3 -2
- package/2x/cjs/components/text-area/text-area.d.ts +1 -0
- package/2x/cjs/components/text-area/text-area.js +5 -0
- package/2x/cjs/components/toast/methods.js +32 -73
- package/2x/cjs/components/toast/toast.js +6 -2
- package/2x/cjs/components/water-mark/water-mark.js +3 -2
- package/2x/cjs/global/css-vars-patch.css +53 -53
- package/2x/cjs/global/global.css +0 -1
- package/2x/cjs/global/theme-default.css +0 -1
- package/2x/cjs/utils/render-imperatively.d.ts +4 -1
- package/2x/cjs/utils/render-imperatively.js +23 -11
- package/2x/cjs/utils/use-props-value.js +2 -6
- package/2x/es/components/badge/badge.css +1 -1
- package/2x/es/components/badge/badge.d.ts +2 -0
- package/2x/es/components/badge/badge.js +2 -1
- package/2x/es/components/checkbox/checkbox.d.ts +18 -2
- package/2x/es/components/checkbox/checkbox.js +15 -3
- package/2x/es/components/checkbox/index.d.ts +13 -2
- package/2x/es/components/form/form-item.js +2 -2
- package/2x/es/components/form/form-subscribe.d.ts +7 -2
- package/2x/es/components/form/form-subscribe.js +21 -14
- package/2x/es/components/form/form.d.ts +1 -1
- package/2x/es/components/form/index.d.ts +2 -2
- package/2x/es/components/infinite-scroll/infinite-scroll.js +14 -5
- package/2x/es/components/list/list.css +3 -0
- package/2x/es/components/list/list.d.ts +1 -1
- package/2x/es/components/rate/rate.css +2 -2
- package/2x/es/components/rate/rate.js +2 -2
- package/2x/es/components/rate/star.d.ts +2 -0
- package/2x/es/components/rate/star.js +25 -0
- package/2x/es/components/safe-area/safe-area.css +3 -2
- package/2x/es/components/text-area/text-area.d.ts +1 -0
- package/2x/es/components/text-area/text-area.js +5 -0
- package/2x/es/components/toast/methods.js +29 -67
- package/2x/es/components/toast/toast.js +6 -2
- package/2x/es/components/water-mark/water-mark.js +3 -2
- package/2x/es/global/css-vars-patch.css +53 -53
- package/2x/es/global/global.css +0 -1
- package/2x/es/global/theme-default.css +0 -1
- package/2x/es/utils/render-imperatively.d.ts +4 -1
- package/2x/es/utils/render-imperatively.js +23 -11
- package/2x/es/utils/use-props-value.js +2 -6
- package/2x/package.json +5 -5
- package/2x/umd/antd-mobile.js +1 -1
- package/README.md +1 -2
- package/bundle/antd-mobile.cjs.js +216 -197
- package/bundle/antd-mobile.es.js +211 -192
- package/bundle/style.css +9 -6
- package/cjs/components/badge/badge.css +1 -1
- package/cjs/components/badge/badge.d.ts +2 -0
- package/cjs/components/badge/badge.js +2 -1
- package/cjs/components/checkbox/checkbox.d.ts +18 -2
- package/cjs/components/checkbox/checkbox.js +14 -4
- package/cjs/components/checkbox/index.d.ts +13 -2
- package/cjs/components/form/form-item.js +2 -4
- package/cjs/components/form/form-subscribe.d.ts +7 -2
- package/cjs/components/form/form-subscribe.js +28 -16
- package/cjs/components/form/form.d.ts +1 -1
- package/cjs/components/form/index.d.ts +2 -2
- package/cjs/components/infinite-scroll/infinite-scroll.js +13 -4
- package/cjs/components/list/list.css +3 -0
- package/cjs/components/list/list.d.ts +1 -1
- package/cjs/components/rate/rate.css +2 -2
- package/cjs/components/rate/rate.js +3 -3
- package/cjs/components/rate/star.d.ts +2 -0
- package/cjs/components/rate/star.js +37 -0
- package/cjs/components/safe-area/safe-area.css +3 -2
- package/cjs/components/text-area/text-area.d.ts +1 -0
- package/cjs/components/text-area/text-area.js +5 -0
- package/cjs/components/toast/methods.js +32 -73
- package/cjs/components/toast/toast.js +6 -2
- package/cjs/components/water-mark/water-mark.js +3 -2
- package/cjs/global/global.css +0 -1
- package/cjs/global/theme-default.css +0 -1
- package/cjs/utils/render-imperatively.d.ts +4 -1
- package/cjs/utils/render-imperatively.js +23 -11
- package/cjs/utils/use-props-value.js +2 -6
- package/es/components/badge/badge.css +1 -1
- package/es/components/badge/badge.d.ts +2 -0
- package/es/components/badge/badge.js +2 -1
- package/es/components/checkbox/checkbox.d.ts +18 -2
- package/es/components/checkbox/checkbox.js +15 -3
- package/es/components/checkbox/index.d.ts +13 -2
- package/es/components/form/form-item.js +2 -2
- package/es/components/form/form-subscribe.d.ts +7 -2
- package/es/components/form/form-subscribe.js +21 -14
- package/es/components/form/form.d.ts +1 -1
- package/es/components/form/index.d.ts +2 -2
- package/es/components/infinite-scroll/infinite-scroll.js +14 -5
- package/es/components/list/list.css +3 -0
- package/es/components/list/list.d.ts +1 -1
- package/es/components/rate/rate.css +2 -2
- package/es/components/rate/rate.js +2 -2
- package/es/components/rate/star.d.ts +2 -0
- package/es/components/rate/star.js +25 -0
- package/es/components/safe-area/safe-area.css +3 -2
- package/es/components/text-area/text-area.d.ts +1 -0
- package/es/components/text-area/text-area.js +5 -0
- package/es/components/toast/methods.js +29 -67
- package/es/components/toast/toast.js +6 -2
- package/es/components/water-mark/water-mark.js +3 -2
- package/es/global/global.css +0 -1
- package/es/global/theme-default.css +0 -1
- package/es/utils/render-imperatively.d.ts +4 -1
- package/es/utils/render-imperatively.js +23 -11
- package/es/utils/use-props-value.js +2 -6
- package/package.json +5 -5
- package/umd/antd-mobile.js +1 -1
- package/2x/cjs/components/form/form-imperative-item.d.ts +0 -5
- package/2x/cjs/components/form/form-imperative-item.js +0 -57
- package/2x/es/components/form/form-imperative-item.d.ts +0 -5
- package/2x/es/components/form/form-imperative-item.js +0 -38
- package/cjs/components/form/form-imperative-item.d.ts +0 -5
- package/cjs/components/form/form-imperative-item.js +0 -57
- package/es/components/form/form-imperative-item.d.ts +0 -5
- package/es/components/form/form-imperative-item.js +0 -38
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
.adm-button {
|
|
3
3
|
color: #333333;
|
|
4
4
|
background-color: #ffffff;
|
|
5
|
-
font-size:
|
|
6
|
-
border-width:
|
|
5
|
+
font-size: 34px;
|
|
6
|
+
border-width: 2px;
|
|
7
7
|
border-style: solid;
|
|
8
8
|
border-color: #eeeeee;
|
|
9
|
-
border-radius:
|
|
9
|
+
border-radius: 8px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.adm-button::before {
|
|
13
|
-
transform: translate(-
|
|
14
|
-
border:
|
|
15
|
-
border-radius:
|
|
13
|
+
transform: translate(-2px, -2px);
|
|
14
|
+
border: 2px solid #000;
|
|
15
|
+
border-radius: 8px;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.adm-button-default.adm-button-fill-outline {
|
|
@@ -79,27 +79,27 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.adm-button.adm-button-mini {
|
|
82
|
-
font-size:
|
|
82
|
+
font-size: 26px;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.adm-button.adm-button-small {
|
|
86
|
-
padding-top:
|
|
87
|
-
padding-bottom:
|
|
88
|
-
font-size:
|
|
86
|
+
padding-top: 6px;
|
|
87
|
+
padding-bottom: 6px;
|
|
88
|
+
font-size: 30px;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.adm-button.adm-button-large {
|
|
92
|
-
padding-top:
|
|
93
|
-
padding-bottom:
|
|
94
|
-
font-size:
|
|
92
|
+
padding-top: 22px;
|
|
93
|
+
padding-bottom: 22px;
|
|
94
|
+
font-size: 36px;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.adm-button.adm-button-shape-rounded {
|
|
98
|
-
border-radius:
|
|
98
|
+
border-radius: 2000px;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
.adm-button.adm-button-shape-rounded::before {
|
|
102
|
-
border-radius:
|
|
102
|
+
border-radius: 2000px;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
.adm-button.adm-button-shape-rectangular {
|
|
@@ -111,17 +111,17 @@
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.adm-center-popup-wrap {
|
|
114
|
-
min-width:
|
|
114
|
+
min-width: 560px;
|
|
115
115
|
max-width: 75vw;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.adm-center-popup-body {
|
|
119
119
|
background-color: #ffffff;
|
|
120
|
-
border-radius:
|
|
120
|
+
border-radius: 16px;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
.adm-error-block-image {
|
|
124
|
-
height:
|
|
124
|
+
height: 200px;
|
|
125
125
|
width: auto;
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -134,11 +134,11 @@
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
.adm-error-block-full-page {
|
|
137
|
-
padding-top: calc(50vh -
|
|
137
|
+
padding-top: calc(50vh - 400px);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.adm-error-block-full-page .adm-error-block-image {
|
|
141
|
-
height:
|
|
141
|
+
height: 400px;
|
|
142
142
|
width: auto;
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -168,25 +168,25 @@
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
.adm-modal-body {
|
|
171
|
-
font-size:
|
|
171
|
+
font-size: 28px;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.adm-modal-title {
|
|
175
|
-
font-size:
|
|
175
|
+
font-size: 36px;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
.adm-modal-content {
|
|
179
|
-
font-size:
|
|
179
|
+
font-size: 30px;
|
|
180
180
|
color: #333333;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
.adm-modal-close {
|
|
184
184
|
color: #999999;
|
|
185
|
-
font-size:
|
|
185
|
+
font-size: 36px;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
.adm-modal-footer.adm-space.adm-space-vertical > .adm-space-item.adm-space-item {
|
|
189
|
-
margin-bottom:
|
|
189
|
+
margin-bottom: 40px;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.adm-modal-footer.adm-space.adm-space-vertical > .adm-space-item.adm-space-item:last-child {
|
|
@@ -194,18 +194,18 @@
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.adm-modal-footer .adm-modal-button {
|
|
197
|
-
font-size:
|
|
197
|
+
font-size: 36px;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
.adm-page-indicator-dot {
|
|
201
|
-
width:
|
|
202
|
-
height:
|
|
203
|
-
border-radius:
|
|
201
|
+
width: 6px;
|
|
202
|
+
height: 6px;
|
|
203
|
+
border-radius: 2px;
|
|
204
204
|
background: rgba(0, 0, 0, 0.2);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.adm-page-indicator-dot-active {
|
|
208
|
-
border-radius:
|
|
208
|
+
border-radius: 2px;
|
|
209
209
|
background: #1677ff;
|
|
210
210
|
}
|
|
211
211
|
|
|
@@ -214,19 +214,19 @@
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
.adm-page-indicator-horizontal .adm-page-indicator-dot {
|
|
217
|
-
margin-right:
|
|
217
|
+
margin-right: 6px;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
.adm-page-indicator-horizontal .adm-page-indicator-dot-active {
|
|
221
|
-
width:
|
|
221
|
+
width: 26px;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
.adm-page-indicator-vertical .adm-page-indicator-dot {
|
|
225
|
-
margin-bottom:
|
|
225
|
+
margin-bottom: 6px;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
.adm-page-indicator-vertical .adm-page-indicator-dot-active {
|
|
229
|
-
height:
|
|
229
|
+
height: 26px;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.adm-popover-menu.adm-popover .adm-popover-inner-content {
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.adm-popover-menu-item-text {
|
|
237
|
-
border-top: solid
|
|
237
|
+
border-top: solid 2px #eeeeee;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
.adm-popover-menu-item:active:not(.adm-popover-menu-item-disabled) {
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
.adm-popover-menu-item:active:not(.adm-popover-menu-item-disabled)::after {
|
|
245
|
-
border-bottom: solid
|
|
245
|
+
border-bottom: solid 2px #eeeeee;
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
.adm-popover.adm-popover-dark.adm-popover-menu.adm-popover-menu .adm-popover-menu-item-text {
|
|
@@ -275,11 +275,11 @@
|
|
|
275
275
|
|
|
276
276
|
.adm-popover-inner {
|
|
277
277
|
background-color: #ffffff;
|
|
278
|
-
font-size:
|
|
278
|
+
font-size: 30px;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
.adm-popover-inner-content {
|
|
282
|
-
padding:
|
|
282
|
+
padding: 16px 24px;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
.adm-popover-arrow {
|
|
@@ -295,25 +295,25 @@
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
.adm-space-vertical > .adm-space-item {
|
|
298
|
-
margin-bottom:
|
|
298
|
+
margin-bottom: 16px;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
.adm-space-horizontal > .adm-space-item {
|
|
302
|
-
margin-right:
|
|
302
|
+
margin-right: 16px;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
.adm-space-horizontal.adm-space-wrap {
|
|
306
306
|
flex-wrap: wrap;
|
|
307
|
-
margin-bottom: -
|
|
307
|
+
margin-bottom: -16px;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
.adm-space-horizontal.adm-space-wrap > .adm-space-item {
|
|
311
|
-
padding-bottom:
|
|
311
|
+
padding-bottom: 16px;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
.adm-spin-loading {
|
|
315
|
-
width:
|
|
316
|
-
height:
|
|
315
|
+
width: 64px;
|
|
316
|
+
height: 64px;
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
.adm-spin-loading-svg {
|
|
@@ -354,11 +354,11 @@
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
.adm-tabs-header {
|
|
357
|
-
border-bottom: solid
|
|
357
|
+
border-bottom: solid 2px #eeeeee;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
.adm-tabs-tab {
|
|
361
|
-
font-size:
|
|
361
|
+
font-size: 34px;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
.adm-tabs-tab-active {
|
|
@@ -366,13 +366,13 @@
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
.adm-tabs-tab-line {
|
|
369
|
-
height:
|
|
369
|
+
height: 4px;
|
|
370
370
|
background: #1677ff;
|
|
371
|
-
border-radius:
|
|
371
|
+
border-radius: 4px;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
.adm-tabs-content {
|
|
375
|
-
padding:
|
|
375
|
+
padding: 24px;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
.adm-tabs-header-mask-left {
|
|
@@ -384,13 +384,13 @@
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
.adm-toast-mask .adm-toast-main {
|
|
387
|
-
font-size:
|
|
387
|
+
font-size: 30px;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
.adm-toast-loading.adm-toast-loading {
|
|
391
|
-
width:
|
|
392
|
-
height:
|
|
393
|
-
margin: 0 auto
|
|
391
|
+
width: 96px;
|
|
392
|
+
height: 96px;
|
|
393
|
+
margin: 0 auto 16px;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
.adm-toast-loading.adm-toast-loading .adm-spin-loading-fill {
|
package/2x/bundle/style.css
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
--adm-font-size-8: 32px;
|
|
13
13
|
--adm-font-size-9: 34px;
|
|
14
14
|
--adm-font-size-10: 36px;
|
|
15
|
-
--adm-hd: 2;
|
|
16
15
|
--adm-color-primary: #1677ff;
|
|
17
16
|
--adm-color-success: #00b578;
|
|
18
17
|
--adm-color-warning: #ff8f1f;
|
|
@@ -221,16 +220,17 @@ div.adm-px-tester {
|
|
|
221
220
|
}
|
|
222
221
|
|
|
223
222
|
.adm-safe-area {
|
|
223
|
+
--multiple: var(--adm-safe-area-multiple, 1);
|
|
224
224
|
display: block;
|
|
225
225
|
width: 100%;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
.adm-safe-area-position-top {
|
|
229
|
-
padding-top: calc(env(safe-area-inset-top) * var(--
|
|
229
|
+
padding-top: calc(env(safe-area-inset-top) * var(--multiple));
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
.adm-safe-area-position-bottom {
|
|
233
|
-
padding-bottom: calc(env(safe-area-inset-bottom) * var(--
|
|
233
|
+
padding-bottom: calc(env(safe-area-inset-bottom) * var(--multiple));
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
.adm-auto-center {
|
|
@@ -259,7 +259,7 @@ div.adm-px-tester {
|
|
|
259
259
|
display: block;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
.adm-badge-
|
|
262
|
+
.adm-badge-wrapper {
|
|
263
263
|
display: inline-block;
|
|
264
264
|
position: relative;
|
|
265
265
|
}
|
|
@@ -1036,6 +1036,7 @@ div.adm-px-tester {
|
|
|
1036
1036
|
--padding-left: 24px;
|
|
1037
1037
|
--padding-right: 24px;
|
|
1038
1038
|
--font-size: var(--adm-font-size-9);
|
|
1039
|
+
--extra-max-width: 70%;
|
|
1039
1040
|
}
|
|
1040
1041
|
|
|
1041
1042
|
.adm-list-header {
|
|
@@ -1105,9 +1106,11 @@ div.adm-px-tester {
|
|
|
1105
1106
|
}
|
|
1106
1107
|
|
|
1107
1108
|
.adm-list-item-content-extra {
|
|
1109
|
+
flex: none;
|
|
1108
1110
|
padding-left: 24px;
|
|
1109
1111
|
font-size: var(--adm-font-size-7);
|
|
1110
1112
|
color: var(--adm-color-weak);
|
|
1113
|
+
max-width: var(--extra-max-width);
|
|
1111
1114
|
}
|
|
1112
1115
|
|
|
1113
1116
|
.adm-list-item-content-arrow {
|
|
@@ -3405,7 +3408,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
|
|
|
3405
3408
|
.adm-rate {
|
|
3406
3409
|
--star-size: 48px;
|
|
3407
3410
|
--active-color: #ffd21e;
|
|
3408
|
-
--inactive-color: var(--adm-color-
|
|
3411
|
+
--inactive-color: var(--adm-color-border);
|
|
3409
3412
|
display: inline-flex;
|
|
3410
3413
|
}
|
|
3411
3414
|
|
|
@@ -3414,7 +3417,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled)::after {
|
|
|
3414
3417
|
}
|
|
3415
3418
|
|
|
3416
3419
|
.adm-rate-star {
|
|
3417
|
-
padding:
|
|
3420
|
+
padding: 0.125em;
|
|
3418
3421
|
line-height: var(--star-size);
|
|
3419
3422
|
font-size: var(--star-size);
|
|
3420
3423
|
color: var(--inactive-color);
|
|
@@ -6,5 +6,7 @@ export declare type BadgeProps = {
|
|
|
6
6
|
color?: string;
|
|
7
7
|
bordered?: boolean;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
|
+
wrapperClassName?: string;
|
|
10
|
+
wrapperStyle?: React.CSSProperties;
|
|
9
11
|
} & NativeProps<'--right' | '--top' | '--color'>;
|
|
10
12
|
export declare const Badge: FC<BadgeProps>;
|
|
@@ -36,7 +36,8 @@ const Badge = props => {
|
|
|
36
36
|
className: `${classPrefix}-content`
|
|
37
37
|
}, content))) : null;
|
|
38
38
|
return children ? _react.default.createElement("div", {
|
|
39
|
-
className: `${classPrefix}-
|
|
39
|
+
className: (0, _classnames.default)(`${classPrefix}-wrapper`, props.wrapperClassName),
|
|
40
|
+
style: props.wrapperStyle
|
|
40
41
|
}, children, element) : element;
|
|
41
42
|
};
|
|
42
43
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type CheckboxValue = string | number;
|
|
4
4
|
export declare type CheckboxProps = {
|
|
@@ -13,4 +13,20 @@ export declare type CheckboxProps = {
|
|
|
13
13
|
icon?: (checked: boolean, indeterminate: boolean) => React.ReactNode;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
} & NativeProps<'--icon-size' | '--font-size' | '--gap'>;
|
|
16
|
-
export declare
|
|
16
|
+
export declare type CheckboxRef = {
|
|
17
|
+
check: () => void;
|
|
18
|
+
uncheck: () => void;
|
|
19
|
+
toggle: () => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<{
|
|
22
|
+
checked?: boolean | undefined;
|
|
23
|
+
defaultChecked?: boolean | undefined;
|
|
24
|
+
disabled?: boolean | undefined;
|
|
25
|
+
onChange?: ((checked: boolean) => void) | undefined;
|
|
26
|
+
value?: CheckboxValue | undefined;
|
|
27
|
+
indeterminate?: boolean | undefined;
|
|
28
|
+
block?: boolean | undefined;
|
|
29
|
+
id?: string | undefined;
|
|
30
|
+
icon?: ((checked: boolean, indeterminate: boolean) => React.ReactNode) | undefined;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
} & NativeProps<"--font-size" | "--icon-size" | "--gap"> & React.RefAttributes<CheckboxRef>>;
|
|
@@ -38,8 +38,7 @@ const defaultProps = {
|
|
|
38
38
|
defaultChecked: false,
|
|
39
39
|
indeterminate: false
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
const Checkbox = p => {
|
|
41
|
+
const Checkbox = (0, _react.forwardRef)((p, ref) => {
|
|
43
42
|
const groupContext = (0, _react.useContext)(_groupContext.CheckboxGroupContext);
|
|
44
43
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
45
44
|
let [checked, setChecked] = (0, _usePropsValue.usePropsValue)({
|
|
@@ -80,6 +79,18 @@ const Checkbox = p => {
|
|
|
80
79
|
disabled = disabled || groupContext.disabled;
|
|
81
80
|
}
|
|
82
81
|
|
|
82
|
+
(0, _react.useImperativeHandle)(ref, () => ({
|
|
83
|
+
check: () => {
|
|
84
|
+
setChecked(true);
|
|
85
|
+
},
|
|
86
|
+
uncheck: () => {
|
|
87
|
+
setChecked(false);
|
|
88
|
+
},
|
|
89
|
+
toggle: () => {
|
|
90
|
+
setChecked(!checked);
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
93
|
+
|
|
83
94
|
const renderIcon = () => {
|
|
84
95
|
if (props.icon) {
|
|
85
96
|
return _react.default.createElement("div", {
|
|
@@ -108,6 +119,5 @@ const Checkbox = p => {
|
|
|
108
119
|
}), renderIcon(), props.children && _react.default.createElement("div", {
|
|
109
120
|
className: `${classPrefix}-content`
|
|
110
121
|
}, props.children)));
|
|
111
|
-
};
|
|
112
|
-
|
|
122
|
+
});
|
|
113
123
|
exports.Checkbox = Checkbox;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './checkbox.less';
|
|
3
|
-
export type { CheckboxValue, CheckboxProps } from './checkbox';
|
|
3
|
+
export type { CheckboxValue, CheckboxProps, CheckboxRef } from './checkbox';
|
|
4
4
|
export type { CheckboxGroupProps } from './group';
|
|
5
|
-
declare const _default: import("react").
|
|
5
|
+
declare const _default: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
checked?: boolean | undefined;
|
|
7
|
+
defaultChecked?: boolean | undefined;
|
|
8
|
+
disabled?: boolean | undefined;
|
|
9
|
+
onChange?: ((checked: boolean) => void) | undefined;
|
|
10
|
+
value?: import("./checkbox").CheckboxValue | undefined;
|
|
11
|
+
indeterminate?: boolean | undefined;
|
|
12
|
+
block?: boolean | undefined;
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
icon?: ((checked: boolean, indeterminate: boolean) => import("react").ReactNode) | undefined;
|
|
15
|
+
children?: import("react").ReactNode;
|
|
16
|
+
} & import("../../utils/native-props").NativeProps<"--font-size" | "--icon-size" | "--gap"> & import("react").RefAttributes<import("./checkbox").CheckboxRef>> & {
|
|
6
17
|
Group: import("react").FC<import("./group").CheckboxGroupProps>;
|
|
7
18
|
};
|
|
8
19
|
export default _default;
|
|
@@ -107,15 +107,13 @@ const FormItemLayout = props => {
|
|
|
107
107
|
e.preventDefault();
|
|
108
108
|
}
|
|
109
109
|
}, _react.default.createElement(_antdMobileIcons.QuestionCircleOutline, null)))) : null;
|
|
110
|
-
|
|
111
|
-
const description = _react.default.createElement(_react.default.Fragment, null, props.description, hasFeedback && _react.default.createElement(_react.default.Fragment, null, props.errors.map((error, index) => _react.default.createElement("div", {
|
|
110
|
+
const description = props.description || hasFeedback ? _react.default.createElement(_react.default.Fragment, null, props.description, hasFeedback && _react.default.createElement(_react.default.Fragment, null, props.errors.map((error, index) => _react.default.createElement("div", {
|
|
112
111
|
key: `error-${index}`,
|
|
113
112
|
className: `${classPrefix}-feedback-error`
|
|
114
113
|
}, error)), props.warnings.map((warning, index) => _react.default.createElement("div", {
|
|
115
114
|
key: `warning-${index}`,
|
|
116
115
|
className: `${classPrefix}-feedback-warning`
|
|
117
|
-
}, warning))));
|
|
118
|
-
|
|
116
|
+
}, warning)))) : null;
|
|
119
117
|
return _react.default.createElement(_list.default.Item, {
|
|
120
118
|
style: style,
|
|
121
119
|
title: layout === 'vertical' && labelElement,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import type { FormInstance } from 'rc-field-form';
|
|
3
3
|
import type { NamePath } from 'rc-field-form/es/interface';
|
|
4
4
|
declare type RenderChildren<Values = any> = (changedValues: Record<string, any>, form: FormInstance<Values>) => React.ReactNode;
|
|
@@ -7,5 +7,10 @@ export interface FormSubscribeProps {
|
|
|
7
7
|
to: NamePath[];
|
|
8
8
|
children: ChildrenType;
|
|
9
9
|
}
|
|
10
|
-
export declare const FormSubscribe:
|
|
10
|
+
export declare const FormSubscribe: FC<FormSubscribeProps>;
|
|
11
|
+
export declare const Watcher: React.NamedExoticComponent<{
|
|
12
|
+
form: FormInstance;
|
|
13
|
+
namePath: NamePath;
|
|
14
|
+
onChange: () => void;
|
|
15
|
+
}>;
|
|
11
16
|
export {};
|
|
@@ -3,25 +3,37 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.FormSubscribe = void 0;
|
|
6
|
+
exports.Watcher = exports.FormSubscribe = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _rcFieldForm = require("rc-field-form");
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
var _ahooks = require("ahooks");
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
var _useIsomorphicUpdateLayoutEffect = require("../../utils/use-isomorphic-update-layout-effect");
|
|
15
|
+
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
+
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
+
|
|
20
|
+
const FormSubscribe = props => {
|
|
21
|
+
const update = (0, _ahooks.useUpdate)();
|
|
22
|
+
const form = (0, _react.useContext)(_rcFieldForm.FieldContext);
|
|
23
|
+
return _react.default.createElement(_react.default.Fragment, null, props.children(form.getFieldsValue(props.to), form), props.to.map(namePath => _react.default.createElement(Watcher, {
|
|
24
|
+
key: namePath.toString(),
|
|
25
|
+
form: form,
|
|
26
|
+
namePath: namePath,
|
|
27
|
+
onChange: update
|
|
28
|
+
})));
|
|
25
29
|
};
|
|
26
30
|
|
|
27
|
-
exports.FormSubscribe = FormSubscribe;
|
|
31
|
+
exports.FormSubscribe = FormSubscribe;
|
|
32
|
+
const Watcher = (0, _react.memo)(props => {
|
|
33
|
+
const value = (0, _rcFieldForm.useWatch)(props.namePath, props.form);
|
|
34
|
+
(0, _useIsomorphicUpdateLayoutEffect.useIsomorphicUpdateLayoutEffect)(() => {
|
|
35
|
+
props.onChange();
|
|
36
|
+
}, [value]);
|
|
37
|
+
return null;
|
|
38
|
+
});
|
|
39
|
+
exports.Watcher = Watcher;
|
|
@@ -8,7 +8,7 @@ export declare type FormProps = Pick<RcFormProps, 'form' | 'initialValues' | 'na
|
|
|
8
8
|
footer?: ReactNode;
|
|
9
9
|
mode?: ListProps['mode'];
|
|
10
10
|
};
|
|
11
|
-
export declare const Form: React.ForwardRefExoticComponent<Pick<RcFormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & NativeProps<"--border-
|
|
11
|
+
export declare const Form: React.ForwardRefExoticComponent<Pick<RcFormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & NativeProps<"--border-bottom" | "--border-inner" | "--border-top"> & Partial<FormContextType> & {
|
|
12
12
|
footer?: ReactNode;
|
|
13
13
|
mode?: ListProps['mode'];
|
|
14
14
|
} & React.RefAttributes<FormInstance>>;
|
|
@@ -7,12 +7,12 @@ export type { FormItemProps } from './form-item';
|
|
|
7
7
|
export type { FormSubscribeProps } from './form-subscribe';
|
|
8
8
|
export type { ValidateMessages, FieldData, NamePath, } from 'rc-field-form/es/interface';
|
|
9
9
|
export type { FormArrayField, FormArrayOperation, FormArrayProps, } from './form-array';
|
|
10
|
-
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & import("../../utils/native-props").NativeProps<"--border-
|
|
10
|
+
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & import("../../utils/native-props").NativeProps<"--border-bottom" | "--border-inner" | "--border-top"> & Partial<import("./context").FormContextType> & {
|
|
11
11
|
footer?: import("react").ReactNode;
|
|
12
12
|
mode?: "default" | "card" | undefined;
|
|
13
13
|
} & import("react").RefAttributes<import("./form").FormInstance>> & {
|
|
14
14
|
Item: import("react").FC<import("./form-item").FormItemProps>;
|
|
15
|
-
Subscribe: import("react").
|
|
15
|
+
Subscribe: import("react").FC<import("./form-subscribe").FormSubscribeProps>;
|
|
16
16
|
Header: import("react").FC<{
|
|
17
17
|
children?: import("react").ReactNode;
|
|
18
18
|
}>;
|
|
@@ -57,7 +57,9 @@ const InfiniteScroll = p => {
|
|
|
57
57
|
const [flag, setFlag] = (0, _react.useState)({});
|
|
58
58
|
const nextFlagRef = (0, _react.useRef)(flag);
|
|
59
59
|
const [scrollParent, setScrollParent] = (0, _react.useState)();
|
|
60
|
-
const
|
|
60
|
+
const {
|
|
61
|
+
run: check
|
|
62
|
+
} = (0, _ahooks.useThrottleFn)(() => (0, _tslib.__awaiter)(void 0, void 0, void 0, function* () {
|
|
61
63
|
if (nextFlagRef.current !== flag) return;
|
|
62
64
|
if (!props.hasMore) return;
|
|
63
65
|
const element = elementRef.current;
|
|
@@ -76,7 +78,11 @@ const InfiniteScroll = p => {
|
|
|
76
78
|
yield doLoadMore(false);
|
|
77
79
|
setFlag(nextFlag);
|
|
78
80
|
}
|
|
79
|
-
})
|
|
81
|
+
}), {
|
|
82
|
+
wait: 100,
|
|
83
|
+
leading: true,
|
|
84
|
+
trailing: true
|
|
85
|
+
}); // Make sure to trigger `loadMore` when content changes
|
|
80
86
|
|
|
81
87
|
(0, _react.useEffect)(() => {
|
|
82
88
|
check();
|
|
@@ -97,8 +103,11 @@ const InfiniteScroll = p => {
|
|
|
97
103
|
}, [scrollParent]);
|
|
98
104
|
|
|
99
105
|
function retry() {
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
return (0, _tslib.__awaiter)(this, void 0, void 0, function* () {
|
|
107
|
+
setFailed(false);
|
|
108
|
+
yield doLoadMore(true);
|
|
109
|
+
setFlag(nextFlagRef.current);
|
|
110
|
+
});
|
|
102
111
|
}
|
|
103
112
|
|
|
104
113
|
return (0, _nativeProps.withNativeProps)(props, _react.default.createElement("div", {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
--padding-left: 24px;
|
|
11
11
|
--padding-right: 24px;
|
|
12
12
|
--font-size: var(--adm-font-size-9);
|
|
13
|
+
--extra-max-width: 70%;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
.adm-list-header {
|
|
@@ -79,9 +80,11 @@
|
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
.adm-list-item-content-extra {
|
|
83
|
+
flex: none;
|
|
82
84
|
padding-left: 24px;
|
|
83
85
|
font-size: var(--adm-font-size-7);
|
|
84
86
|
color: var(--adm-color-weak);
|
|
87
|
+
max-width: var(--extra-max-width);
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
.adm-list-item-content-arrow {
|
|
@@ -4,5 +4,5 @@ export declare type ListProps = {
|
|
|
4
4
|
header?: ReactNode;
|
|
5
5
|
mode?: 'default' | 'card';
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
} & NativeProps<'--
|
|
7
|
+
} & NativeProps<'--active-background-color' | '--align-items' | '--border-bottom' | '--border-inner' | '--border-top' | '--extra-max-width' | '--font-size' | '--header-font-size' | '--padding-left' | '--padding-right' | '--prefix-padding-right' | '--prefix-width'>;
|
|
8
8
|
export declare const List: FC<ListProps>;
|