antd-mobile 5.42.0-alpha.1 → 5.42.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.
Files changed (40) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +18 -15
  2. package/2x/bundle/antd-mobile.cjs.js +5 -5
  3. package/2x/bundle/antd-mobile.es.development.js +18 -15
  4. package/2x/bundle/antd-mobile.es.js +576 -573
  5. package/2x/bundle/antd-mobile.umd.development.js +18 -15
  6. package/2x/bundle/antd-mobile.umd.js +5 -5
  7. package/2x/bundle/style.css +1 -1
  8. package/2x/cjs/components/image-uploader/image-uploader.js +2 -2
  9. package/2x/cjs/components/image-viewer/image-viewer.d.ts +3 -0
  10. package/2x/cjs/components/image-viewer/image-viewer.js +14 -12
  11. package/2x/cjs/components/virtual-input/virtual-input.css +1 -1
  12. package/2x/cjs/components/virtual-input/virtual-input.js +2 -1
  13. package/2x/es/components/image-uploader/image-uploader.js +2 -2
  14. package/2x/es/components/image-viewer/image-viewer.d.ts +3 -0
  15. package/2x/es/components/image-viewer/image-viewer.js +14 -12
  16. package/2x/es/components/virtual-input/virtual-input.css +1 -1
  17. package/2x/es/components/virtual-input/virtual-input.js +2 -1
  18. package/2x/package.json +1 -1
  19. package/bundle/antd-mobile.cjs.development.js +18 -15
  20. package/bundle/antd-mobile.cjs.js +5 -5
  21. package/bundle/antd-mobile.compatible.umd.js +1 -1
  22. package/bundle/antd-mobile.es.development.js +18 -15
  23. package/bundle/antd-mobile.es.js +576 -573
  24. package/bundle/antd-mobile.umd.development.js +18 -15
  25. package/bundle/antd-mobile.umd.js +5 -5
  26. package/bundle/style.css +1 -1
  27. package/cjs/components/image-uploader/image-uploader.js +2 -2
  28. package/cjs/components/image-viewer/image-viewer.css +1 -1
  29. package/cjs/components/image-viewer/image-viewer.d.ts +3 -0
  30. package/cjs/components/image-viewer/image-viewer.js +14 -12
  31. package/cjs/components/virtual-input/virtual-input.css +1 -1
  32. package/cjs/components/virtual-input/virtual-input.js +2 -1
  33. package/es/components/image-uploader/image-uploader.js +2 -2
  34. package/es/components/image-viewer/image-viewer.css +1 -1
  35. package/es/components/image-viewer/image-viewer.d.ts +3 -0
  36. package/es/components/image-viewer/image-viewer.js +14 -12
  37. package/es/components/virtual-input/virtual-input.css +1 -1
  38. package/es/components/virtual-input/virtual-input.js +2 -1
  39. package/package.json +1 -1
  40. package/umd/antd-mobile.js +1 -1
@@ -5706,7 +5706,6 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
5706
5706
  z-index: 1;
5707
5707
  width: 100%;
5708
5708
  max-width: 100%;
5709
- min-height: 1.5em;
5710
5709
  overflow-y: hidden;
5711
5710
  overflow-x: scroll;
5712
5711
  letter-spacing: 2px;
@@ -5723,6 +5722,7 @@ a.adm-list-item:active:not(.adm-list-item-disabled):after {
5723
5722
  height: 20px;
5724
5723
  position: absolute;
5725
5724
  opacity: 0;
5725
+ left: 0;
5726
5726
  }
5727
5727
 
5728
5728
  .adm-virtual-input-placeholder {
@@ -94,6 +94,7 @@ const ImageUploader = (0, _react.forwardRef)((p, ref) => {
94
94
  function getFinalTasks(tasks) {
95
95
  return props.showFailed ? tasks : tasks.filter(task => task.status !== 'fail');
96
96
  }
97
+ const finalTasks = getFinalTasks(tasks);
97
98
  function onChange(e) {
98
99
  var _a;
99
100
  return (0, _tslib.__awaiter)(this, void 0, void 0, function* () {
@@ -114,7 +115,7 @@ const ImageUploader = (0, _react.forwardRef)((p, ref) => {
114
115
  return;
115
116
  }
116
117
  if (maxCount > 0) {
117
- const exceed = value.length + files.length - maxCount;
118
+ const exceed = value.length + files.length + finalTasks.length - maxCount;
118
119
  if (exceed > 0) {
119
120
  files = files.slice(0, files.length - exceed);
120
121
  (_a = props.onCountExceed) === null || _a === void 0 ? void 0 : _a.call(props, exceed);
@@ -173,7 +174,6 @@ const ImageUploader = (0, _react.forwardRef)((p, ref) => {
173
174
  var _a;
174
175
  (_a = imageViewerHandlerRef.current) === null || _a === void 0 ? void 0 : _a.close();
175
176
  });
176
- const finalTasks = getFinalTasks(tasks);
177
177
  const showUpload = props.showUpload && (maxCount === 0 || value.length + finalTasks.length < maxCount);
178
178
  const renderImages = () => {
179
179
  return value.map((fileItem, index) => {
@@ -18,6 +18,9 @@ export declare type ImageViewerProps = {
18
18
  mask?: string;
19
19
  body?: string;
20
20
  };
21
+ mask?: {
22
+ onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
23
+ };
21
24
  };
22
25
  export declare const ImageViewer: FC<ImageViewerProps>;
23
26
  export declare type MultiImageViewerRef = SlidesRef;
@@ -22,17 +22,18 @@ const defaultProps = {
22
22
  visible: false
23
23
  };
24
24
  const ImageViewer = p => {
25
- var _a, _b, _c;
25
+ var _a, _b, _c, _d;
26
26
  const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
27
27
  const node = _react.default.createElement(_mask.default, {
28
28
  visible: props.visible,
29
+ afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
30
+ className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
31
+ onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
29
32
  disableBodyScroll: false,
30
33
  opacity: 'thick',
31
- afterClose: props.afterClose,
32
- destroyOnClose: true,
33
- className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
34
+ destroyOnClose: true
34
35
  }, _react.default.createElement("div", {
35
- className: (0, _classnames.default)(`${classPrefix}-content`, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.body)
36
+ className: (0, _classnames.default)(`${classPrefix}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
36
37
  }, (props.image || typeof props.imageRender === 'function') && _react.default.createElement(_slide.Slide, {
37
38
  image: props.image,
38
39
  onTap: props.onClose,
@@ -40,7 +41,7 @@ const ImageViewer = p => {
40
41
  imageRender: props.imageRender
41
42
  })), props.image && _react.default.createElement("div", {
42
43
  className: `${classPrefix}-footer`
43
- }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.image), _react.default.createElement(_safeArea.default, {
44
+ }, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.image), _react.default.createElement(_safeArea.default, {
44
45
  position: 'bottom'
45
46
  })));
46
47
  return (0, _renderToContainer.renderToContainer)(props.getContainer, node);
@@ -50,7 +51,7 @@ const multiDefaultProps = Object.assign(Object.assign({}, defaultProps), {
50
51
  defaultIndex: 0
51
52
  });
52
53
  const MultiImageViewer = (0, _react.forwardRef)((p, ref) => {
53
- var _a, _b, _c;
54
+ var _a, _b, _c, _d;
54
55
  const props = (0, _withDefaultProps.mergeProps)(multiDefaultProps, p);
55
56
  const [index, setIndex] = (0, _react.useState)(props.defaultIndex);
56
57
  const slidesRef = (0, _react.useRef)(null);
@@ -69,13 +70,14 @@ const MultiImageViewer = (0, _react.forwardRef)((p, ref) => {
69
70
  }, [props.onIndexChange, index]);
70
71
  const node = _react.default.createElement(_mask.default, {
71
72
  visible: props.visible,
73
+ afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
74
+ className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
75
+ onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
72
76
  disableBodyScroll: false,
73
77
  opacity: 'thick',
74
- afterClose: props.afterClose,
75
- destroyOnClose: true,
76
- className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
78
+ destroyOnClose: true
77
79
  }, _react.default.createElement("div", {
78
- className: (0, _classnames.default)(`${classPrefix}-content`, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.body)
80
+ className: (0, _classnames.default)(`${classPrefix}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
79
81
  }, props.images && _react.default.createElement(_slides.Slides, {
80
82
  ref: slidesRef,
81
83
  defaultIndex: index,
@@ -86,7 +88,7 @@ const MultiImageViewer = (0, _react.forwardRef)((p, ref) => {
86
88
  imageRender: props.imageRender
87
89
  })), props.images && _react.default.createElement("div", {
88
90
  className: `${classPrefix}-footer`
89
- }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.images[index], index), _react.default.createElement(_safeArea.default, {
91
+ }, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.images[index], index), _react.default.createElement(_safeArea.default, {
90
92
  position: 'bottom'
91
93
  })));
92
94
  return (0, _renderToContainer.renderToContainer)(props.getContainer, node);
@@ -28,7 +28,6 @@
28
28
  z-index: 1;
29
29
  width: 100%;
30
30
  max-width: 100%;
31
- min-height: 1.5em;
32
31
  overflow-y: hidden;
33
32
  overflow-x: scroll;
34
33
  letter-spacing: 2px;
@@ -45,6 +44,7 @@
45
44
  height: 20px;
46
45
  position: absolute;
47
46
  opacity: 0;
47
+ left: 0;
48
48
  }
49
49
 
50
50
  .adm-virtual-input-placeholder {
@@ -142,6 +142,7 @@ const VirtualInput = (0, _react.forwardRef)((props, ref) => {
142
142
  (_b = (_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.onMove) === null || _b === void 0 ? void 0 : _b.call(_a, value.length);
143
143
  }
144
144
  (_c = mergedProps.onClick) === null || _c === void 0 ? void 0 : _c.call(mergedProps, e);
145
+ setFocus();
145
146
  };
146
147
  // 点击单个字符时,根据点击位置置于字符前或后
147
148
  const changeCaretPosition = index => e => {
@@ -217,7 +218,7 @@ const VirtualInput = (0, _react.forwardRef)((props, ref) => {
217
218
  className: `${classPrefix}-content`,
218
219
  ref: contentRef,
219
220
  "aria-disabled": mergedProps.disabled,
220
- "aria-label": value || mergedProps.placeholder,
221
+ "aria-label": value ? undefined : mergedProps.placeholder,
221
222
  role: 'textbox',
222
223
  tabIndex: mergedProps.disabled ? undefined : 0,
223
224
  // note: 这里增加 onFocus 有两个目的:
@@ -85,6 +85,7 @@ export const ImageUploader = forwardRef((p, ref) => {
85
85
  function getFinalTasks(tasks) {
86
86
  return props.showFailed ? tasks : tasks.filter(task => task.status !== 'fail');
87
87
  }
88
+ const finalTasks = getFinalTasks(tasks);
88
89
  function onChange(e) {
89
90
  var _a;
90
91
  return __awaiter(this, void 0, void 0, function* () {
@@ -105,7 +106,7 @@ export const ImageUploader = forwardRef((p, ref) => {
105
106
  return;
106
107
  }
107
108
  if (maxCount > 0) {
108
- const exceed = value.length + files.length - maxCount;
109
+ const exceed = value.length + files.length + finalTasks.length - maxCount;
109
110
  if (exceed > 0) {
110
111
  files = files.slice(0, files.length - exceed);
111
112
  (_a = props.onCountExceed) === null || _a === void 0 ? void 0 : _a.call(props, exceed);
@@ -164,7 +165,6 @@ export const ImageUploader = forwardRef((p, ref) => {
164
165
  var _a;
165
166
  (_a = imageViewerHandlerRef.current) === null || _a === void 0 ? void 0 : _a.close();
166
167
  });
167
- const finalTasks = getFinalTasks(tasks);
168
168
  const showUpload = props.showUpload && (maxCount === 0 || value.length + finalTasks.length < maxCount);
169
169
  const renderImages = () => {
170
170
  return value.map((fileItem, index) => {
@@ -18,6 +18,9 @@ export declare type ImageViewerProps = {
18
18
  mask?: string;
19
19
  body?: string;
20
20
  };
21
+ mask?: {
22
+ onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
23
+ };
21
24
  };
22
25
  export declare const ImageViewer: FC<ImageViewerProps>;
23
26
  export declare type MultiImageViewerRef = SlidesRef;
@@ -13,17 +13,18 @@ const defaultProps = {
13
13
  visible: false
14
14
  };
15
15
  export const ImageViewer = p => {
16
- var _a, _b, _c;
16
+ var _a, _b, _c, _d;
17
17
  const props = mergeProps(defaultProps, p);
18
18
  const node = React.createElement(Mask, {
19
19
  visible: props.visible,
20
+ afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
21
+ className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
22
+ onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
20
23
  disableBodyScroll: false,
21
24
  opacity: 'thick',
22
- afterClose: props.afterClose,
23
- destroyOnClose: true,
24
- className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
25
+ destroyOnClose: true
25
26
  }, React.createElement("div", {
26
- className: classNames(`${classPrefix}-content`, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.body)
27
+ className: classNames(`${classPrefix}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
27
28
  }, (props.image || typeof props.imageRender === 'function') && React.createElement(Slide, {
28
29
  image: props.image,
29
30
  onTap: props.onClose,
@@ -31,7 +32,7 @@ export const ImageViewer = p => {
31
32
  imageRender: props.imageRender
32
33
  })), props.image && React.createElement("div", {
33
34
  className: `${classPrefix}-footer`
34
- }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.image), React.createElement(SafeArea, {
35
+ }, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.image), React.createElement(SafeArea, {
35
36
  position: 'bottom'
36
37
  })));
37
38
  return renderToContainer(props.getContainer, node);
@@ -40,7 +41,7 @@ const multiDefaultProps = Object.assign(Object.assign({}, defaultProps), {
40
41
  defaultIndex: 0
41
42
  });
42
43
  export const MultiImageViewer = forwardRef((p, ref) => {
43
- var _a, _b, _c;
44
+ var _a, _b, _c, _d;
44
45
  const props = mergeProps(multiDefaultProps, p);
45
46
  const [index, setIndex] = useState(props.defaultIndex);
46
47
  const slidesRef = useRef(null);
@@ -59,13 +60,14 @@ export const MultiImageViewer = forwardRef((p, ref) => {
59
60
  }, [props.onIndexChange, index]);
60
61
  const node = React.createElement(Mask, {
61
62
  visible: props.visible,
63
+ afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
64
+ className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
65
+ onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
62
66
  disableBodyScroll: false,
63
67
  opacity: 'thick',
64
- afterClose: props.afterClose,
65
- destroyOnClose: true,
66
- className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
68
+ destroyOnClose: true
67
69
  }, React.createElement("div", {
68
- className: classNames(`${classPrefix}-content`, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.body)
70
+ className: classNames(`${classPrefix}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
69
71
  }, props.images && React.createElement(Slides, {
70
72
  ref: slidesRef,
71
73
  defaultIndex: index,
@@ -76,7 +78,7 @@ export const MultiImageViewer = forwardRef((p, ref) => {
76
78
  imageRender: props.imageRender
77
79
  })), props.images && React.createElement("div", {
78
80
  className: `${classPrefix}-footer`
79
- }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.images[index], index), React.createElement(SafeArea, {
81
+ }, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.images[index], index), React.createElement(SafeArea, {
80
82
  position: 'bottom'
81
83
  })));
82
84
  return renderToContainer(props.getContainer, node);
@@ -28,7 +28,6 @@
28
28
  z-index: 1;
29
29
  width: 100%;
30
30
  max-width: 100%;
31
- min-height: 1.5em;
32
31
  overflow-y: hidden;
33
32
  overflow-x: scroll;
34
33
  letter-spacing: 2px;
@@ -45,6 +44,7 @@
45
44
  height: 20px;
46
45
  position: absolute;
47
46
  opacity: 0;
47
+ left: 0;
48
48
  }
49
49
 
50
50
  .adm-virtual-input-placeholder {
@@ -133,6 +133,7 @@ export const VirtualInput = forwardRef((props, ref) => {
133
133
  (_b = (_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.onMove) === null || _b === void 0 ? void 0 : _b.call(_a, value.length);
134
134
  }
135
135
  (_c = mergedProps.onClick) === null || _c === void 0 ? void 0 : _c.call(mergedProps, e);
136
+ setFocus();
136
137
  };
137
138
  // 点击单个字符时,根据点击位置置于字符前或后
138
139
  const changeCaretPosition = index => e => {
@@ -208,7 +209,7 @@ export const VirtualInput = forwardRef((props, ref) => {
208
209
  className: `${classPrefix}-content`,
209
210
  ref: contentRef,
210
211
  "aria-disabled": mergedProps.disabled,
211
- "aria-label": value || mergedProps.placeholder,
212
+ "aria-label": value ? undefined : mergedProps.placeholder,
212
213
  role: 'textbox',
213
214
  tabIndex: mergedProps.disabled ? undefined : 0,
214
215
  // note: 这里增加 onFocus 有两个目的:
package/2x/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-mobile",
3
- "version": "5.42.0-alpha.1",
3
+ "version": "5.42.0",
4
4
  "homepage": "https://github.com/ant-design/ant-design-mobile#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/ant-design/ant-design-mobile/issues"
@@ -21904,17 +21904,18 @@ const defaultProps$z = {
21904
21904
  visible: false
21905
21905
  };
21906
21906
  const ImageViewer$1 = (p) => {
21907
- var _a, _b, _c;
21907
+ var _a, _b, _c, _d;
21908
21908
  const props = mergeProps(defaultProps$z, p);
21909
21909
  const node = React$3.createElement(Mask, {
21910
21910
  visible: props.visible,
21911
+ afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
21912
+ className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
21913
+ onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
21911
21914
  disableBodyScroll: false,
21912
21915
  opacity: "thick",
21913
- afterClose: props.afterClose,
21914
- destroyOnClose: true,
21915
- className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
21916
+ destroyOnClose: true
21916
21917
  }, React$3.createElement("div", {
21917
- className: classNames(`${classPrefix$I}-content`, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.body)
21918
+ className: classNames(`${classPrefix$I}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
21918
21919
  }, (props.image || typeof props.imageRender === "function") && React$3.createElement(Slide, {
21919
21920
  image: props.image,
21920
21921
  onTap: props.onClose,
@@ -21922,7 +21923,7 @@ const ImageViewer$1 = (p) => {
21922
21923
  imageRender: props.imageRender
21923
21924
  })), props.image && React$3.createElement("div", {
21924
21925
  className: `${classPrefix$I}-footer`
21925
- }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.image), React$3.createElement(SafeArea, {
21926
+ }, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.image), React$3.createElement(SafeArea, {
21926
21927
  position: "bottom"
21927
21928
  })));
21928
21929
  return renderToContainer(props.getContainer, node);
@@ -21931,7 +21932,7 @@ const multiDefaultProps = Object.assign(Object.assign({}, defaultProps$z), {
21931
21932
  defaultIndex: 0
21932
21933
  });
21933
21934
  const MultiImageViewer = React$3.forwardRef((p, ref2) => {
21934
- var _a, _b, _c;
21935
+ var _a, _b, _c, _d;
21935
21936
  const props = mergeProps(multiDefaultProps, p);
21936
21937
  const [index2, setIndex] = React$3.useState(props.defaultIndex);
21937
21938
  const slidesRef = React$3.useRef(null);
@@ -21951,13 +21952,14 @@ const MultiImageViewer = React$3.forwardRef((p, ref2) => {
21951
21952
  }, [props.onIndexChange, index2]);
21952
21953
  const node = React$3.createElement(Mask, {
21953
21954
  visible: props.visible,
21955
+ afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
21956
+ className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
21957
+ onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
21954
21958
  disableBodyScroll: false,
21955
21959
  opacity: "thick",
21956
- afterClose: props.afterClose,
21957
- destroyOnClose: true,
21958
- className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
21960
+ destroyOnClose: true
21959
21961
  }, React$3.createElement("div", {
21960
- className: classNames(`${classPrefix$I}-content`, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.body)
21962
+ className: classNames(`${classPrefix$I}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
21961
21963
  }, props.images && React$3.createElement(Slides, {
21962
21964
  ref: slidesRef,
21963
21965
  defaultIndex: index2,
@@ -21968,7 +21970,7 @@ const MultiImageViewer = React$3.forwardRef((p, ref2) => {
21968
21970
  imageRender: props.imageRender
21969
21971
  })), props.images && React$3.createElement("div", {
21970
21972
  className: `${classPrefix$I}-footer`
21971
- }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.images[index2], index2), React$3.createElement(SafeArea, {
21973
+ }, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.images[index2], index2), React$3.createElement(SafeArea, {
21972
21974
  position: "bottom"
21973
21975
  })));
21974
21976
  return renderToContainer(props.getContainer, node);
@@ -22167,6 +22169,7 @@ const ImageUploader = React$3.forwardRef((p, ref2) => {
22167
22169
  function getFinalTasks(tasks2) {
22168
22170
  return props.showFailed ? tasks2 : tasks2.filter((task) => task.status !== "fail");
22169
22171
  }
22172
+ const finalTasks = getFinalTasks(tasks);
22170
22173
  function onChange(e2) {
22171
22174
  var _a;
22172
22175
  return __awaiter(this, void 0, void 0, function* () {
@@ -22188,7 +22191,7 @@ const ImageUploader = React$3.forwardRef((p, ref2) => {
22188
22191
  return;
22189
22192
  }
22190
22193
  if (maxCount > 0) {
22191
- const exceed = value.length + files.length - maxCount;
22194
+ const exceed = value.length + files.length + finalTasks.length - maxCount;
22192
22195
  if (exceed > 0) {
22193
22196
  files = files.slice(0, files.length - exceed);
22194
22197
  (_a = props.onCountExceed) === null || _a === void 0 ? void 0 : _a.call(props, exceed);
@@ -22247,7 +22250,6 @@ const ImageUploader = React$3.forwardRef((p, ref2) => {
22247
22250
  var _a;
22248
22251
  (_a = imageViewerHandlerRef.current) === null || _a === void 0 ? void 0 : _a.close();
22249
22252
  });
22250
- const finalTasks = getFinalTasks(tasks);
22251
22253
  const showUpload = props.showUpload && (maxCount === 0 || value.length + finalTasks.length < maxCount);
22252
22254
  const renderImages = () => {
22253
22255
  return value.map((fileItem, index2) => {
@@ -27737,6 +27739,7 @@ const VirtualInput = React$3.forwardRef((props, ref2) => {
27737
27739
  (_b = (_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.onMove) === null || _b === void 0 ? void 0 : _b.call(_a, value.length);
27738
27740
  }
27739
27741
  (_c = mergedProps.onClick) === null || _c === void 0 ? void 0 : _c.call(mergedProps, e2);
27742
+ setFocus();
27740
27743
  };
27741
27744
  const changeCaretPosition = (index2) => (e2) => {
27742
27745
  var _a, _b, _c;
@@ -27810,7 +27813,7 @@ const VirtualInput = React$3.forwardRef((props, ref2) => {
27810
27813
  className: `${classPrefix$2}-content`,
27811
27814
  ref: contentRef,
27812
27815
  "aria-disabled": mergedProps.disabled,
27813
- "aria-label": value || mergedProps.placeholder,
27816
+ "aria-label": value ? void 0 : mergedProps.placeholder,
27814
27817
  role: "textbox",
27815
27818
  tabIndex: mergedProps.disabled ? void 0 : 0,
27816
27819
  // note: 这里增加 onFocus 有两个目的: