antd-mobile 5.35.0 → 5.36.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/2x/bundle/antd-mobile.cjs.development.js +83 -187
- package/2x/bundle/antd-mobile.cjs.js +7 -7
- package/2x/bundle/antd-mobile.es.development.js +83 -187
- package/2x/bundle/antd-mobile.es.js +5115 -5225
- package/2x/bundle/antd-mobile.umd.development.js +83 -187
- package/2x/bundle/antd-mobile.umd.js +7 -7
- package/2x/cjs/components/button/button.d.ts +2 -2
- package/2x/cjs/components/collapse/collapse.d.ts +1 -1
- package/2x/cjs/components/collapse/collapse.js +28 -11
- package/2x/cjs/components/input/input.d.ts +2 -4
- package/2x/cjs/components/input/input.js +8 -17
- package/2x/cjs/components/input/useInputHandleKeyDown.d.ts +8 -0
- package/2x/cjs/components/input/useInputHandleKeyDown.js +29 -0
- package/2x/cjs/components/result-page/result-page.d.ts +1 -1
- package/2x/cjs/components/swiper/index.d.ts +1 -1
- package/2x/cjs/components/swiper/swiper.d.ts +2 -2
- package/2x/cjs/components/swiper/swiper.js +5 -1
- package/2x/cjs/components/text-area/text-area.d.ts +6 -2
- package/2x/cjs/components/text-area/text-area.js +9 -1
- package/2x/cjs/locales/ar-SA.d.ts +139 -0
- package/2x/cjs/locales/ar-SA.js +149 -0
- package/2x/cjs/locales/de-DE.d.ts +139 -0
- package/2x/cjs/locales/de-DE.js +149 -0
- package/2x/cjs/locales/es-ES.js +2 -2
- package/2x/cjs/locales/fr-FR.js +1 -1
- package/2x/cjs/locales/in-ID.d.ts +139 -0
- package/2x/cjs/locales/in-ID.js +149 -0
- package/2x/cjs/locales/ja-JP.js +2 -2
- package/2x/cjs/locales/ms-MY.d.ts +139 -0
- package/2x/cjs/locales/ms-MY.js +149 -0
- package/2x/cjs/locales/pt-BR.d.ts +139 -0
- package/2x/cjs/locales/pt-BR.js +144 -0
- package/2x/cjs/locales/th-TH.js +2 -2
- package/2x/cjs/locales/vi-VN.d.ts +139 -0
- package/2x/cjs/locales/vi-VN.js +149 -0
- package/2x/cjs/locales/zh-CN.d.ts +2 -138
- package/2x/cjs/locales/zh-CN.js +2 -4
- package/2x/cjs/locales/zh-CN.test.d.ts +1 -0
- package/2x/cjs/locales/zh-CN.test.js +19 -0
- package/2x/cjs/utils/use-mutation-effect.d.ts +1 -0
- package/2x/cjs/utils/use-mutation-effect.js +20 -9
- package/2x/es/components/button/button.d.ts +2 -2
- package/2x/es/components/collapse/collapse.d.ts +1 -1
- package/2x/es/components/collapse/collapse.js +27 -10
- package/2x/es/components/input/input.d.ts +2 -4
- package/2x/es/components/input/input.js +8 -17
- package/2x/es/components/input/useInputHandleKeyDown.d.ts +8 -0
- package/2x/es/components/input/useInputHandleKeyDown.js +23 -0
- package/2x/es/components/result-page/result-page.d.ts +1 -1
- package/2x/es/components/swiper/index.d.ts +1 -1
- package/2x/es/components/swiper/swiper.d.ts +2 -2
- package/2x/es/components/swiper/swiper.js +5 -1
- package/2x/es/components/text-area/text-area.d.ts +6 -2
- package/2x/es/components/text-area/text-area.js +9 -1
- package/2x/es/locales/ar-SA.d.ts +139 -0
- package/2x/es/locales/ar-SA.js +142 -0
- package/2x/es/locales/de-DE.d.ts +139 -0
- package/2x/es/locales/de-DE.js +142 -0
- package/2x/es/locales/es-ES.js +2 -2
- package/2x/es/locales/fr-FR.js +1 -1
- package/2x/es/locales/in-ID.d.ts +139 -0
- package/2x/es/locales/in-ID.js +142 -0
- package/2x/es/locales/ja-JP.js +2 -2
- package/2x/es/locales/ms-MY.d.ts +139 -0
- package/2x/es/locales/ms-MY.js +142 -0
- package/2x/es/locales/pt-BR.d.ts +139 -0
- package/2x/es/locales/pt-BR.js +137 -0
- package/2x/es/locales/th-TH.js +2 -2
- package/2x/es/locales/vi-VN.d.ts +139 -0
- package/2x/es/locales/vi-VN.js +142 -0
- package/2x/es/locales/zh-CN.d.ts +2 -138
- package/2x/es/locales/zh-CN.js +2 -4
- package/2x/es/locales/zh-CN.test.d.ts +1 -0
- package/2x/es/locales/zh-CN.test.js +16 -0
- package/2x/es/utils/use-mutation-effect.d.ts +1 -0
- package/2x/es/utils/use-mutation-effect.js +19 -9
- package/2x/package.json +31 -21
- package/bundle/antd-mobile.cjs.development.js +83 -187
- package/bundle/antd-mobile.cjs.js +7 -7
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +83 -187
- package/bundle/antd-mobile.es.js +5115 -5225
- package/bundle/antd-mobile.umd.development.js +83 -187
- package/bundle/antd-mobile.umd.js +7 -7
- package/cjs/components/button/button.d.ts +2 -2
- package/cjs/components/collapse/collapse.d.ts +1 -1
- package/cjs/components/collapse/collapse.js +28 -11
- package/cjs/components/input/input.d.ts +2 -4
- package/cjs/components/input/input.js +8 -17
- package/cjs/components/input/useInputHandleKeyDown.d.ts +8 -0
- package/cjs/components/input/useInputHandleKeyDown.js +29 -0
- package/cjs/components/result-page/result-page.d.ts +1 -1
- package/cjs/components/swiper/index.d.ts +1 -1
- package/cjs/components/swiper/swiper.d.ts +2 -2
- package/cjs/components/swiper/swiper.js +5 -1
- package/cjs/components/text-area/text-area.d.ts +6 -2
- package/cjs/components/text-area/text-area.js +9 -1
- package/cjs/locales/ar-SA.d.ts +139 -0
- package/cjs/locales/ar-SA.js +149 -0
- package/cjs/locales/de-DE.d.ts +139 -0
- package/cjs/locales/de-DE.js +149 -0
- package/cjs/locales/es-ES.js +2 -2
- package/cjs/locales/fr-FR.js +1 -1
- package/cjs/locales/in-ID.d.ts +139 -0
- package/cjs/locales/in-ID.js +149 -0
- package/cjs/locales/ja-JP.js +2 -2
- package/cjs/locales/ms-MY.d.ts +139 -0
- package/cjs/locales/ms-MY.js +149 -0
- package/cjs/locales/pt-BR.d.ts +139 -0
- package/cjs/locales/pt-BR.js +144 -0
- package/cjs/locales/th-TH.js +2 -2
- package/cjs/locales/vi-VN.d.ts +139 -0
- package/cjs/locales/vi-VN.js +149 -0
- package/cjs/locales/zh-CN.d.ts +2 -138
- package/cjs/locales/zh-CN.js +2 -4
- package/cjs/locales/zh-CN.test.d.ts +1 -0
- package/cjs/locales/zh-CN.test.js +19 -0
- package/cjs/utils/use-mutation-effect.d.ts +1 -0
- package/cjs/utils/use-mutation-effect.js +20 -9
- package/es/components/button/button.d.ts +2 -2
- package/es/components/collapse/collapse.d.ts +1 -1
- package/es/components/collapse/collapse.js +27 -10
- package/es/components/input/input.d.ts +2 -4
- package/es/components/input/input.js +8 -17
- package/es/components/input/useInputHandleKeyDown.d.ts +8 -0
- package/es/components/input/useInputHandleKeyDown.js +23 -0
- package/es/components/result-page/result-page.d.ts +1 -1
- package/es/components/swiper/index.d.ts +1 -1
- package/es/components/swiper/swiper.d.ts +2 -2
- package/es/components/swiper/swiper.js +5 -1
- package/es/components/text-area/text-area.d.ts +6 -2
- package/es/components/text-area/text-area.js +9 -1
- package/es/locales/ar-SA.d.ts +139 -0
- package/es/locales/ar-SA.js +142 -0
- package/es/locales/de-DE.d.ts +139 -0
- package/es/locales/de-DE.js +142 -0
- package/es/locales/es-ES.js +2 -2
- package/es/locales/fr-FR.js +1 -1
- package/es/locales/in-ID.d.ts +139 -0
- package/es/locales/in-ID.js +142 -0
- package/es/locales/ja-JP.js +2 -2
- package/es/locales/ms-MY.d.ts +139 -0
- package/es/locales/ms-MY.js +142 -0
- package/es/locales/pt-BR.d.ts +139 -0
- package/es/locales/pt-BR.js +137 -0
- package/es/locales/th-TH.js +2 -2
- package/es/locales/vi-VN.d.ts +139 -0
- package/es/locales/vi-VN.js +142 -0
- package/es/locales/zh-CN.d.ts +2 -138
- package/es/locales/zh-CN.js +2 -4
- package/es/locales/zh-CN.test.d.ts +1 -0
- package/es/locales/zh-CN.test.js +16 -0
- package/es/utils/use-mutation-effect.d.ts +1 -0
- package/es/utils/use-mutation-effect.js +19 -9
- package/package.json +31 -21
- package/umd/antd-mobile.js +1 -1
|
@@ -202,162 +202,8 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
|
|
|
202
202
|
var e2 = new Error(message);
|
|
203
203
|
return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
|
|
204
204
|
};
|
|
205
|
-
function mergeLocale(base2, patch) {
|
|
206
|
-
function merge2(a, b) {
|
|
207
|
-
if (typeof a !== "object" || typeof b !== "object" || Array.isArray(a) || Array.isArray(b)) {
|
|
208
|
-
return b !== void 0 ? b : a;
|
|
209
|
-
}
|
|
210
|
-
const result = {};
|
|
211
|
-
for (const key in a) {
|
|
212
|
-
if (a.hasOwnProperty(key)) {
|
|
213
|
-
result[key] = merge2(a[key], b[key]);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
return result;
|
|
217
|
-
}
|
|
218
|
-
return merge2(base2, patch);
|
|
219
|
-
}
|
|
220
|
-
const typeTemplate$2 = "${label} is not a valid ${type}";
|
|
221
|
-
const base = {
|
|
222
|
-
locale: "en",
|
|
223
|
-
common: {
|
|
224
|
-
confirm: "Confirm",
|
|
225
|
-
cancel: "Cancel",
|
|
226
|
-
loading: "Loading",
|
|
227
|
-
close: "Close"
|
|
228
|
-
},
|
|
229
|
-
Calendar: {
|
|
230
|
-
title: "Date selection",
|
|
231
|
-
confirm: "Confirm",
|
|
232
|
-
start: "start",
|
|
233
|
-
end: "end",
|
|
234
|
-
today: "today",
|
|
235
|
-
markItems: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
236
|
-
yearAndMonth: "${year}/${month}"
|
|
237
|
-
},
|
|
238
|
-
Cascader: {
|
|
239
|
-
placeholder: "Selecting"
|
|
240
|
-
},
|
|
241
|
-
Dialog: {
|
|
242
|
-
ok: "OK"
|
|
243
|
-
},
|
|
244
|
-
DatePicker: {
|
|
245
|
-
tillNow: "Till Now"
|
|
246
|
-
},
|
|
247
|
-
ErrorBlock: {
|
|
248
|
-
default: {
|
|
249
|
-
title: "Oops, something went wrong",
|
|
250
|
-
description: "Please wait a minute and try again"
|
|
251
|
-
},
|
|
252
|
-
busy: {
|
|
253
|
-
title: "Oops, not loading",
|
|
254
|
-
description: "Try to refresh the page"
|
|
255
|
-
},
|
|
256
|
-
disconnected: {
|
|
257
|
-
title: "Network is busy",
|
|
258
|
-
description: "Try to refresh the page"
|
|
259
|
-
},
|
|
260
|
-
empty: {
|
|
261
|
-
title: "Hmm, couldn't find that...",
|
|
262
|
-
description: "Want to try a new search?"
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
Form: {
|
|
266
|
-
required: "Required",
|
|
267
|
-
optional: "Optional",
|
|
268
|
-
defaultValidateMessages: {
|
|
269
|
-
default: "Field validation error for ${label}",
|
|
270
|
-
required: "Please enter ${label}",
|
|
271
|
-
enum: "${label} must be one of [${enum}]",
|
|
272
|
-
whitespace: "${label} cannot be a blank character",
|
|
273
|
-
date: {
|
|
274
|
-
format: "${label} date format is invalid",
|
|
275
|
-
parse: "${label} cannot be converted to a date",
|
|
276
|
-
invalid: "${label} is an invalid date"
|
|
277
|
-
},
|
|
278
|
-
types: {
|
|
279
|
-
string: typeTemplate$2,
|
|
280
|
-
method: typeTemplate$2,
|
|
281
|
-
array: typeTemplate$2,
|
|
282
|
-
object: typeTemplate$2,
|
|
283
|
-
number: typeTemplate$2,
|
|
284
|
-
date: typeTemplate$2,
|
|
285
|
-
boolean: typeTemplate$2,
|
|
286
|
-
integer: typeTemplate$2,
|
|
287
|
-
float: typeTemplate$2,
|
|
288
|
-
regexp: typeTemplate$2,
|
|
289
|
-
email: typeTemplate$2,
|
|
290
|
-
url: typeTemplate$2,
|
|
291
|
-
hex: typeTemplate$2
|
|
292
|
-
},
|
|
293
|
-
string: {
|
|
294
|
-
len: "${label} must be ${len} characters",
|
|
295
|
-
min: "${label} must be at least ${min} characters",
|
|
296
|
-
max: "${label} must be up to ${max} characters",
|
|
297
|
-
range: "${label} must be between ${min}-${max} characters"
|
|
298
|
-
},
|
|
299
|
-
number: {
|
|
300
|
-
len: "${label} must be equal to ${len}",
|
|
301
|
-
min: "${label} must be minimum ${min}",
|
|
302
|
-
max: "${label} must be maximum ${max}",
|
|
303
|
-
range: "${label} must be between ${min}-${max}"
|
|
304
|
-
},
|
|
305
|
-
array: {
|
|
306
|
-
len: "Must be ${len} ${label}",
|
|
307
|
-
min: "At least ${min} ${label}",
|
|
308
|
-
max: "At most ${max} ${label}",
|
|
309
|
-
range: "The amount of ${label} must be between ${min}-${max}"
|
|
310
|
-
},
|
|
311
|
-
pattern: {
|
|
312
|
-
mismatch: "${label} does not match the pattern ${pattern}"
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
ImageUploader: {
|
|
317
|
-
uploading: "Uploading...",
|
|
318
|
-
upload: "Upload"
|
|
319
|
-
},
|
|
320
|
-
InfiniteScroll: {
|
|
321
|
-
noMore: "No more",
|
|
322
|
-
failedToLoad: "Failed to load",
|
|
323
|
-
retry: "Retry"
|
|
324
|
-
},
|
|
325
|
-
Input: {
|
|
326
|
-
clear: "clear"
|
|
327
|
-
},
|
|
328
|
-
Mask: {
|
|
329
|
-
name: "Mask"
|
|
330
|
-
},
|
|
331
|
-
Modal: {
|
|
332
|
-
ok: "OK"
|
|
333
|
-
},
|
|
334
|
-
PasscodeInput: {
|
|
335
|
-
name: "Passcode Input"
|
|
336
|
-
},
|
|
337
|
-
PullToRefresh: {
|
|
338
|
-
pulling: "Scroll down to refresh",
|
|
339
|
-
canRelease: "Release to refresh immediately",
|
|
340
|
-
complete: "Refresh successful"
|
|
341
|
-
},
|
|
342
|
-
SearchBar: {
|
|
343
|
-
name: "Search Bar"
|
|
344
|
-
},
|
|
345
|
-
Slider: {
|
|
346
|
-
name: "Slider"
|
|
347
|
-
},
|
|
348
|
-
Stepper: {
|
|
349
|
-
decrease: "decrease",
|
|
350
|
-
increase: "increase"
|
|
351
|
-
},
|
|
352
|
-
Switch: {
|
|
353
|
-
name: "Switch"
|
|
354
|
-
},
|
|
355
|
-
Selector: {
|
|
356
|
-
name: "Selector"
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
205
|
const typeTemplate$1 = "${label}不是一个有效的${type}";
|
|
360
|
-
const zhCN =
|
|
206
|
+
const zhCN = {
|
|
361
207
|
locale: "zh-CH",
|
|
362
208
|
common: {
|
|
363
209
|
confirm: "确定",
|
|
@@ -494,7 +340,7 @@ const zhCN = mergeLocale(base, {
|
|
|
494
340
|
Selector: {
|
|
495
341
|
name: "选择组"
|
|
496
342
|
}
|
|
497
|
-
}
|
|
343
|
+
};
|
|
498
344
|
const zhCN$1 = zhCN;
|
|
499
345
|
const defaultConfigRef = {
|
|
500
346
|
current: {
|
|
@@ -9881,18 +9727,27 @@ function useResizeEffect(effect, targetRef) {
|
|
|
9881
9727
|
}
|
|
9882
9728
|
}, [targetRef]);
|
|
9883
9729
|
}
|
|
9884
|
-
function
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
fn();
|
|
9730
|
+
function observe(element, options, callback) {
|
|
9731
|
+
if (element && typeof MutationObserver !== "undefined") {
|
|
9732
|
+
let observer = new MutationObserver(() => {
|
|
9733
|
+
callback();
|
|
9889
9734
|
});
|
|
9890
|
-
|
|
9891
|
-
return;
|
|
9892
|
-
observer.observe(targetRef.current, options);
|
|
9735
|
+
observer.observe(element, options);
|
|
9893
9736
|
return () => {
|
|
9894
|
-
observer
|
|
9737
|
+
if (observer) {
|
|
9738
|
+
observer.disconnect();
|
|
9739
|
+
observer = null;
|
|
9740
|
+
}
|
|
9895
9741
|
};
|
|
9742
|
+
}
|
|
9743
|
+
return () => {
|
|
9744
|
+
};
|
|
9745
|
+
}
|
|
9746
|
+
function useMutationEffect(effect, targetRef, options) {
|
|
9747
|
+
const fn = useMemoizedFn(effect);
|
|
9748
|
+
React$1.useEffect(() => {
|
|
9749
|
+
const cleanup = observe(targetRef.current, options, fn);
|
|
9750
|
+
return cleanup;
|
|
9896
9751
|
}, [targetRef]);
|
|
9897
9752
|
}
|
|
9898
9753
|
function bound(position, min2, max2) {
|
|
@@ -12369,9 +12224,26 @@ const CollapsePanelContent = (props) => {
|
|
|
12369
12224
|
if (!inner)
|
|
12370
12225
|
return;
|
|
12371
12226
|
if (visible) {
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
}
|
|
12227
|
+
let lastMotionId = 0;
|
|
12228
|
+
let cancelObserve = () => {
|
|
12229
|
+
};
|
|
12230
|
+
const handleMotion = () => {
|
|
12231
|
+
lastMotionId += 1;
|
|
12232
|
+
const motionId = lastMotionId;
|
|
12233
|
+
api.start({
|
|
12234
|
+
height: inner.offsetHeight
|
|
12235
|
+
})[0].then(() => {
|
|
12236
|
+
if (motionId === lastMotionId) {
|
|
12237
|
+
cancelObserve();
|
|
12238
|
+
}
|
|
12239
|
+
});
|
|
12240
|
+
};
|
|
12241
|
+
cancelObserve = observe(inner, {
|
|
12242
|
+
childList: true,
|
|
12243
|
+
subtree: true
|
|
12244
|
+
}, handleMotion);
|
|
12245
|
+
handleMotion();
|
|
12246
|
+
return cancelObserve;
|
|
12375
12247
|
} else {
|
|
12376
12248
|
api.start({
|
|
12377
12249
|
height: inner.offsetHeight,
|
|
@@ -21484,6 +21356,29 @@ const InfiniteScrollContent = (props) => {
|
|
|
21484
21356
|
}
|
|
21485
21357
|
return React$1.createElement(React$1.Fragment, null, React$1.createElement("span", null, locale.common.loading), React$1.createElement(DotLoading, null));
|
|
21486
21358
|
};
|
|
21359
|
+
function useInputHandleKeyDown({
|
|
21360
|
+
onEnterPress,
|
|
21361
|
+
onKeyDown,
|
|
21362
|
+
nativeInputRef,
|
|
21363
|
+
enterKeyHint
|
|
21364
|
+
}) {
|
|
21365
|
+
const handleKeydown = (e2) => {
|
|
21366
|
+
if (onEnterPress && (e2.code === "Enter" || e2.keyCode === 13)) {
|
|
21367
|
+
onEnterPress(e2);
|
|
21368
|
+
}
|
|
21369
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e2);
|
|
21370
|
+
};
|
|
21371
|
+
useIsomorphicLayoutEffect$2(() => {
|
|
21372
|
+
const ele = nativeInputRef.current;
|
|
21373
|
+
if (!enterKeyHint || !ele)
|
|
21374
|
+
return;
|
|
21375
|
+
ele.setAttribute("enterkeyhint", enterKeyHint);
|
|
21376
|
+
return () => {
|
|
21377
|
+
ele.removeAttribute("enterkeyhint");
|
|
21378
|
+
};
|
|
21379
|
+
}, [enterKeyHint]);
|
|
21380
|
+
return handleKeydown;
|
|
21381
|
+
}
|
|
21487
21382
|
const classPrefix$A = `adm-input`;
|
|
21488
21383
|
const defaultProps$v = {
|
|
21489
21384
|
defaultValue: "",
|
|
@@ -21498,6 +21393,12 @@ const Input = React$1.forwardRef((p, ref) => {
|
|
|
21498
21393
|
const {
|
|
21499
21394
|
locale
|
|
21500
21395
|
} = useConfig();
|
|
21396
|
+
const handleKeydown = useInputHandleKeyDown({
|
|
21397
|
+
onEnterPress: props.onEnterPress,
|
|
21398
|
+
onKeyDown: props.onKeyDown,
|
|
21399
|
+
nativeInputRef,
|
|
21400
|
+
enterKeyHint: props.enterKeyHint
|
|
21401
|
+
});
|
|
21501
21402
|
React$1.useImperativeHandle(ref, () => ({
|
|
21502
21403
|
clear: () => {
|
|
21503
21404
|
setValue2("");
|
|
@@ -21514,23 +21415,6 @@ const Input = React$1.forwardRef((p, ref) => {
|
|
|
21514
21415
|
return nativeInputRef.current;
|
|
21515
21416
|
}
|
|
21516
21417
|
}));
|
|
21517
|
-
const handleKeydown = (e2) => {
|
|
21518
|
-
var _a;
|
|
21519
|
-
if (props.onEnterPress && (e2.code === "Enter" || e2.keyCode === 13)) {
|
|
21520
|
-
props.onEnterPress(e2);
|
|
21521
|
-
}
|
|
21522
|
-
(_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, e2);
|
|
21523
|
-
};
|
|
21524
|
-
useIsomorphicLayoutEffect$2(() => {
|
|
21525
|
-
var _a;
|
|
21526
|
-
if (!props.enterKeyHint)
|
|
21527
|
-
return;
|
|
21528
|
-
(_a = nativeInputRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute("enterkeyhint", props.enterKeyHint);
|
|
21529
|
-
return () => {
|
|
21530
|
-
var _a2;
|
|
21531
|
-
(_a2 = nativeInputRef.current) === null || _a2 === void 0 ? void 0 : _a2.removeAttribute("enterkeyhint");
|
|
21532
|
-
};
|
|
21533
|
-
}, [props.enterKeyHint]);
|
|
21534
21418
|
function checkValue() {
|
|
21535
21419
|
let nextValue = value;
|
|
21536
21420
|
if (props.type === "number") {
|
|
@@ -21581,6 +21465,7 @@ const Input = React$1.forwardRef((p, ref) => {
|
|
|
21581
21465
|
max: props.max,
|
|
21582
21466
|
min: props.min,
|
|
21583
21467
|
autoComplete: props.autoComplete,
|
|
21468
|
+
enterKeyHint: props.enterKeyHint,
|
|
21584
21469
|
autoFocus: props.autoFocus,
|
|
21585
21470
|
pattern: props.pattern,
|
|
21586
21471
|
inputMode: props.inputMode,
|
|
@@ -24643,7 +24528,11 @@ const Swiper = React$1.forwardRef(staged_1((p, ref) => {
|
|
|
24643
24528
|
} = props;
|
|
24644
24529
|
const runTimeSwiper = () => {
|
|
24645
24530
|
timeoutRef.current = window.setTimeout(() => {
|
|
24646
|
-
|
|
24531
|
+
if (autoplay === "reverse") {
|
|
24532
|
+
swipePrev();
|
|
24533
|
+
} else {
|
|
24534
|
+
swipeNext();
|
|
24535
|
+
}
|
|
24647
24536
|
runTimeSwiper();
|
|
24648
24537
|
}, autoplayInterval);
|
|
24649
24538
|
};
|
|
@@ -24980,6 +24869,12 @@ const TextArea = React$1.forwardRef((p, ref) => {
|
|
|
24980
24869
|
const nativeTextAreaRef = React$1.useRef(null);
|
|
24981
24870
|
const heightRef = React$1.useRef("auto");
|
|
24982
24871
|
const hiddenTextAreaRef = React$1.useRef(null);
|
|
24872
|
+
const handleKeydown = useInputHandleKeyDown({
|
|
24873
|
+
onEnterPress: props.onEnterPress,
|
|
24874
|
+
onKeyDown: props.onKeyDown,
|
|
24875
|
+
nativeInputRef: nativeTextAreaRef,
|
|
24876
|
+
enterKeyHint: props.enterKeyHint
|
|
24877
|
+
});
|
|
24983
24878
|
React$1.useImperativeHandle(ref, () => ({
|
|
24984
24879
|
clear: () => {
|
|
24985
24880
|
setValue2("");
|
|
@@ -25076,7 +24971,8 @@ const TextArea = React$1.forwardRef((p, ref) => {
|
|
|
25076
24971
|
name: props.name,
|
|
25077
24972
|
onFocus: props.onFocus,
|
|
25078
24973
|
onBlur: props.onBlur,
|
|
25079
|
-
onClick: props.onClick
|
|
24974
|
+
onClick: props.onClick,
|
|
24975
|
+
onKeyDown: handleKeydown
|
|
25080
24976
|
}), count, autoSize && React$1.createElement("textarea", {
|
|
25081
24977
|
ref: hiddenTextAreaRef,
|
|
25082
24978
|
className: `${classPrefix$6}-element ${classPrefix$6}-element-hidden`,
|