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
|
@@ -184,162 +184,8 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
|
|
|
184
184
|
var e2 = new Error(message);
|
|
185
185
|
return e2.name = "SuppressedError", e2.error = error, e2.suppressed = suppressed, e2;
|
|
186
186
|
};
|
|
187
|
-
function mergeLocale(base2, patch) {
|
|
188
|
-
function merge2(a, b) {
|
|
189
|
-
if (typeof a !== "object" || typeof b !== "object" || Array.isArray(a) || Array.isArray(b)) {
|
|
190
|
-
return b !== void 0 ? b : a;
|
|
191
|
-
}
|
|
192
|
-
const result = {};
|
|
193
|
-
for (const key in a) {
|
|
194
|
-
if (a.hasOwnProperty(key)) {
|
|
195
|
-
result[key] = merge2(a[key], b[key]);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
return result;
|
|
199
|
-
}
|
|
200
|
-
return merge2(base2, patch);
|
|
201
|
-
}
|
|
202
|
-
const typeTemplate$2 = "${label} is not a valid ${type}";
|
|
203
|
-
const base = {
|
|
204
|
-
locale: "en",
|
|
205
|
-
common: {
|
|
206
|
-
confirm: "Confirm",
|
|
207
|
-
cancel: "Cancel",
|
|
208
|
-
loading: "Loading",
|
|
209
|
-
close: "Close"
|
|
210
|
-
},
|
|
211
|
-
Calendar: {
|
|
212
|
-
title: "Date selection",
|
|
213
|
-
confirm: "Confirm",
|
|
214
|
-
start: "start",
|
|
215
|
-
end: "end",
|
|
216
|
-
today: "today",
|
|
217
|
-
markItems: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
218
|
-
yearAndMonth: "${year}/${month}"
|
|
219
|
-
},
|
|
220
|
-
Cascader: {
|
|
221
|
-
placeholder: "Selecting"
|
|
222
|
-
},
|
|
223
|
-
Dialog: {
|
|
224
|
-
ok: "OK"
|
|
225
|
-
},
|
|
226
|
-
DatePicker: {
|
|
227
|
-
tillNow: "Till Now"
|
|
228
|
-
},
|
|
229
|
-
ErrorBlock: {
|
|
230
|
-
default: {
|
|
231
|
-
title: "Oops, something went wrong",
|
|
232
|
-
description: "Please wait a minute and try again"
|
|
233
|
-
},
|
|
234
|
-
busy: {
|
|
235
|
-
title: "Oops, not loading",
|
|
236
|
-
description: "Try to refresh the page"
|
|
237
|
-
},
|
|
238
|
-
disconnected: {
|
|
239
|
-
title: "Network is busy",
|
|
240
|
-
description: "Try to refresh the page"
|
|
241
|
-
},
|
|
242
|
-
empty: {
|
|
243
|
-
title: "Hmm, couldn't find that...",
|
|
244
|
-
description: "Want to try a new search?"
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
Form: {
|
|
248
|
-
required: "Required",
|
|
249
|
-
optional: "Optional",
|
|
250
|
-
defaultValidateMessages: {
|
|
251
|
-
default: "Field validation error for ${label}",
|
|
252
|
-
required: "Please enter ${label}",
|
|
253
|
-
enum: "${label} must be one of [${enum}]",
|
|
254
|
-
whitespace: "${label} cannot be a blank character",
|
|
255
|
-
date: {
|
|
256
|
-
format: "${label} date format is invalid",
|
|
257
|
-
parse: "${label} cannot be converted to a date",
|
|
258
|
-
invalid: "${label} is an invalid date"
|
|
259
|
-
},
|
|
260
|
-
types: {
|
|
261
|
-
string: typeTemplate$2,
|
|
262
|
-
method: typeTemplate$2,
|
|
263
|
-
array: typeTemplate$2,
|
|
264
|
-
object: typeTemplate$2,
|
|
265
|
-
number: typeTemplate$2,
|
|
266
|
-
date: typeTemplate$2,
|
|
267
|
-
boolean: typeTemplate$2,
|
|
268
|
-
integer: typeTemplate$2,
|
|
269
|
-
float: typeTemplate$2,
|
|
270
|
-
regexp: typeTemplate$2,
|
|
271
|
-
email: typeTemplate$2,
|
|
272
|
-
url: typeTemplate$2,
|
|
273
|
-
hex: typeTemplate$2
|
|
274
|
-
},
|
|
275
|
-
string: {
|
|
276
|
-
len: "${label} must be ${len} characters",
|
|
277
|
-
min: "${label} must be at least ${min} characters",
|
|
278
|
-
max: "${label} must be up to ${max} characters",
|
|
279
|
-
range: "${label} must be between ${min}-${max} characters"
|
|
280
|
-
},
|
|
281
|
-
number: {
|
|
282
|
-
len: "${label} must be equal to ${len}",
|
|
283
|
-
min: "${label} must be minimum ${min}",
|
|
284
|
-
max: "${label} must be maximum ${max}",
|
|
285
|
-
range: "${label} must be between ${min}-${max}"
|
|
286
|
-
},
|
|
287
|
-
array: {
|
|
288
|
-
len: "Must be ${len} ${label}",
|
|
289
|
-
min: "At least ${min} ${label}",
|
|
290
|
-
max: "At most ${max} ${label}",
|
|
291
|
-
range: "The amount of ${label} must be between ${min}-${max}"
|
|
292
|
-
},
|
|
293
|
-
pattern: {
|
|
294
|
-
mismatch: "${label} does not match the pattern ${pattern}"
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
},
|
|
298
|
-
ImageUploader: {
|
|
299
|
-
uploading: "Uploading...",
|
|
300
|
-
upload: "Upload"
|
|
301
|
-
},
|
|
302
|
-
InfiniteScroll: {
|
|
303
|
-
noMore: "No more",
|
|
304
|
-
failedToLoad: "Failed to load",
|
|
305
|
-
retry: "Retry"
|
|
306
|
-
},
|
|
307
|
-
Input: {
|
|
308
|
-
clear: "clear"
|
|
309
|
-
},
|
|
310
|
-
Mask: {
|
|
311
|
-
name: "Mask"
|
|
312
|
-
},
|
|
313
|
-
Modal: {
|
|
314
|
-
ok: "OK"
|
|
315
|
-
},
|
|
316
|
-
PasscodeInput: {
|
|
317
|
-
name: "Passcode Input"
|
|
318
|
-
},
|
|
319
|
-
PullToRefresh: {
|
|
320
|
-
pulling: "Scroll down to refresh",
|
|
321
|
-
canRelease: "Release to refresh immediately",
|
|
322
|
-
complete: "Refresh successful"
|
|
323
|
-
},
|
|
324
|
-
SearchBar: {
|
|
325
|
-
name: "Search Bar"
|
|
326
|
-
},
|
|
327
|
-
Slider: {
|
|
328
|
-
name: "Slider"
|
|
329
|
-
},
|
|
330
|
-
Stepper: {
|
|
331
|
-
decrease: "decrease",
|
|
332
|
-
increase: "increase"
|
|
333
|
-
},
|
|
334
|
-
Switch: {
|
|
335
|
-
name: "Switch"
|
|
336
|
-
},
|
|
337
|
-
Selector: {
|
|
338
|
-
name: "Selector"
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
187
|
const typeTemplate$1 = "${label}不是一个有效的${type}";
|
|
342
|
-
const zhCN =
|
|
188
|
+
const zhCN = {
|
|
343
189
|
locale: "zh-CH",
|
|
344
190
|
common: {
|
|
345
191
|
confirm: "确定",
|
|
@@ -476,7 +322,7 @@ const zhCN = mergeLocale(base, {
|
|
|
476
322
|
Selector: {
|
|
477
323
|
name: "选择组"
|
|
478
324
|
}
|
|
479
|
-
}
|
|
325
|
+
};
|
|
480
326
|
const zhCN$1 = zhCN;
|
|
481
327
|
const defaultConfigRef = {
|
|
482
328
|
current: {
|
|
@@ -9863,18 +9709,27 @@ function useResizeEffect(effect, targetRef) {
|
|
|
9863
9709
|
}
|
|
9864
9710
|
}, [targetRef]);
|
|
9865
9711
|
}
|
|
9866
|
-
function
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
fn();
|
|
9712
|
+
function observe(element, options, callback) {
|
|
9713
|
+
if (element && typeof MutationObserver !== "undefined") {
|
|
9714
|
+
let observer = new MutationObserver(() => {
|
|
9715
|
+
callback();
|
|
9871
9716
|
});
|
|
9872
|
-
|
|
9873
|
-
return;
|
|
9874
|
-
observer.observe(targetRef.current, options);
|
|
9717
|
+
observer.observe(element, options);
|
|
9875
9718
|
return () => {
|
|
9876
|
-
observer
|
|
9719
|
+
if (observer) {
|
|
9720
|
+
observer.disconnect();
|
|
9721
|
+
observer = null;
|
|
9722
|
+
}
|
|
9877
9723
|
};
|
|
9724
|
+
}
|
|
9725
|
+
return () => {
|
|
9726
|
+
};
|
|
9727
|
+
}
|
|
9728
|
+
function useMutationEffect(effect, targetRef, options) {
|
|
9729
|
+
const fn = useMemoizedFn(effect);
|
|
9730
|
+
useEffect(() => {
|
|
9731
|
+
const cleanup = observe(targetRef.current, options, fn);
|
|
9732
|
+
return cleanup;
|
|
9878
9733
|
}, [targetRef]);
|
|
9879
9734
|
}
|
|
9880
9735
|
function bound(position, min2, max2) {
|
|
@@ -12351,9 +12206,26 @@ const CollapsePanelContent = (props) => {
|
|
|
12351
12206
|
if (!inner)
|
|
12352
12207
|
return;
|
|
12353
12208
|
if (visible) {
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
}
|
|
12209
|
+
let lastMotionId = 0;
|
|
12210
|
+
let cancelObserve = () => {
|
|
12211
|
+
};
|
|
12212
|
+
const handleMotion = () => {
|
|
12213
|
+
lastMotionId += 1;
|
|
12214
|
+
const motionId = lastMotionId;
|
|
12215
|
+
api.start({
|
|
12216
|
+
height: inner.offsetHeight
|
|
12217
|
+
})[0].then(() => {
|
|
12218
|
+
if (motionId === lastMotionId) {
|
|
12219
|
+
cancelObserve();
|
|
12220
|
+
}
|
|
12221
|
+
});
|
|
12222
|
+
};
|
|
12223
|
+
cancelObserve = observe(inner, {
|
|
12224
|
+
childList: true,
|
|
12225
|
+
subtree: true
|
|
12226
|
+
}, handleMotion);
|
|
12227
|
+
handleMotion();
|
|
12228
|
+
return cancelObserve;
|
|
12357
12229
|
} else {
|
|
12358
12230
|
api.start({
|
|
12359
12231
|
height: inner.offsetHeight,
|
|
@@ -21466,6 +21338,29 @@ const InfiniteScrollContent = (props) => {
|
|
|
21466
21338
|
}
|
|
21467
21339
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement("span", null, locale.common.loading), React__default.createElement(DotLoading, null));
|
|
21468
21340
|
};
|
|
21341
|
+
function useInputHandleKeyDown({
|
|
21342
|
+
onEnterPress,
|
|
21343
|
+
onKeyDown,
|
|
21344
|
+
nativeInputRef,
|
|
21345
|
+
enterKeyHint
|
|
21346
|
+
}) {
|
|
21347
|
+
const handleKeydown = (e2) => {
|
|
21348
|
+
if (onEnterPress && (e2.code === "Enter" || e2.keyCode === 13)) {
|
|
21349
|
+
onEnterPress(e2);
|
|
21350
|
+
}
|
|
21351
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e2);
|
|
21352
|
+
};
|
|
21353
|
+
useIsomorphicLayoutEffect$2(() => {
|
|
21354
|
+
const ele = nativeInputRef.current;
|
|
21355
|
+
if (!enterKeyHint || !ele)
|
|
21356
|
+
return;
|
|
21357
|
+
ele.setAttribute("enterkeyhint", enterKeyHint);
|
|
21358
|
+
return () => {
|
|
21359
|
+
ele.removeAttribute("enterkeyhint");
|
|
21360
|
+
};
|
|
21361
|
+
}, [enterKeyHint]);
|
|
21362
|
+
return handleKeydown;
|
|
21363
|
+
}
|
|
21469
21364
|
const classPrefix$A = `adm-input`;
|
|
21470
21365
|
const defaultProps$v = {
|
|
21471
21366
|
defaultValue: "",
|
|
@@ -21480,6 +21375,12 @@ const Input = forwardRef((p, ref) => {
|
|
|
21480
21375
|
const {
|
|
21481
21376
|
locale
|
|
21482
21377
|
} = useConfig();
|
|
21378
|
+
const handleKeydown = useInputHandleKeyDown({
|
|
21379
|
+
onEnterPress: props.onEnterPress,
|
|
21380
|
+
onKeyDown: props.onKeyDown,
|
|
21381
|
+
nativeInputRef,
|
|
21382
|
+
enterKeyHint: props.enterKeyHint
|
|
21383
|
+
});
|
|
21483
21384
|
useImperativeHandle(ref, () => ({
|
|
21484
21385
|
clear: () => {
|
|
21485
21386
|
setValue2("");
|
|
@@ -21496,23 +21397,6 @@ const Input = forwardRef((p, ref) => {
|
|
|
21496
21397
|
return nativeInputRef.current;
|
|
21497
21398
|
}
|
|
21498
21399
|
}));
|
|
21499
|
-
const handleKeydown = (e2) => {
|
|
21500
|
-
var _a;
|
|
21501
|
-
if (props.onEnterPress && (e2.code === "Enter" || e2.keyCode === 13)) {
|
|
21502
|
-
props.onEnterPress(e2);
|
|
21503
|
-
}
|
|
21504
|
-
(_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, e2);
|
|
21505
|
-
};
|
|
21506
|
-
useIsomorphicLayoutEffect$2(() => {
|
|
21507
|
-
var _a;
|
|
21508
|
-
if (!props.enterKeyHint)
|
|
21509
|
-
return;
|
|
21510
|
-
(_a = nativeInputRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute("enterkeyhint", props.enterKeyHint);
|
|
21511
|
-
return () => {
|
|
21512
|
-
var _a2;
|
|
21513
|
-
(_a2 = nativeInputRef.current) === null || _a2 === void 0 ? void 0 : _a2.removeAttribute("enterkeyhint");
|
|
21514
|
-
};
|
|
21515
|
-
}, [props.enterKeyHint]);
|
|
21516
21400
|
function checkValue() {
|
|
21517
21401
|
let nextValue = value;
|
|
21518
21402
|
if (props.type === "number") {
|
|
@@ -21563,6 +21447,7 @@ const Input = forwardRef((p, ref) => {
|
|
|
21563
21447
|
max: props.max,
|
|
21564
21448
|
min: props.min,
|
|
21565
21449
|
autoComplete: props.autoComplete,
|
|
21450
|
+
enterKeyHint: props.enterKeyHint,
|
|
21566
21451
|
autoFocus: props.autoFocus,
|
|
21567
21452
|
pattern: props.pattern,
|
|
21568
21453
|
inputMode: props.inputMode,
|
|
@@ -24625,7 +24510,11 @@ const Swiper = forwardRef(staged_1((p, ref) => {
|
|
|
24625
24510
|
} = props;
|
|
24626
24511
|
const runTimeSwiper = () => {
|
|
24627
24512
|
timeoutRef.current = window.setTimeout(() => {
|
|
24628
|
-
|
|
24513
|
+
if (autoplay === "reverse") {
|
|
24514
|
+
swipePrev();
|
|
24515
|
+
} else {
|
|
24516
|
+
swipeNext();
|
|
24517
|
+
}
|
|
24629
24518
|
runTimeSwiper();
|
|
24630
24519
|
}, autoplayInterval);
|
|
24631
24520
|
};
|
|
@@ -24962,6 +24851,12 @@ const TextArea = forwardRef((p, ref) => {
|
|
|
24962
24851
|
const nativeTextAreaRef = useRef(null);
|
|
24963
24852
|
const heightRef = useRef("auto");
|
|
24964
24853
|
const hiddenTextAreaRef = useRef(null);
|
|
24854
|
+
const handleKeydown = useInputHandleKeyDown({
|
|
24855
|
+
onEnterPress: props.onEnterPress,
|
|
24856
|
+
onKeyDown: props.onKeyDown,
|
|
24857
|
+
nativeInputRef: nativeTextAreaRef,
|
|
24858
|
+
enterKeyHint: props.enterKeyHint
|
|
24859
|
+
});
|
|
24965
24860
|
useImperativeHandle(ref, () => ({
|
|
24966
24861
|
clear: () => {
|
|
24967
24862
|
setValue2("");
|
|
@@ -25058,7 +24953,8 @@ const TextArea = forwardRef((p, ref) => {
|
|
|
25058
24953
|
name: props.name,
|
|
25059
24954
|
onFocus: props.onFocus,
|
|
25060
24955
|
onBlur: props.onBlur,
|
|
25061
|
-
onClick: props.onClick
|
|
24956
|
+
onClick: props.onClick,
|
|
24957
|
+
onKeyDown: handleKeydown
|
|
25062
24958
|
}), count, autoSize && React__default.createElement("textarea", {
|
|
25063
24959
|
ref: hiddenTextAreaRef,
|
|
25064
24960
|
className: `${classPrefix$6}-element ${classPrefix$6}-element-hidden`,
|