antd-mobile 5.42.0-alpha.1 → 5.42.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2x/bundle/antd-mobile.cjs.development.js +16 -13
- package/2x/bundle/antd-mobile.cjs.js +1 -1
- package/2x/bundle/antd-mobile.es.development.js +16 -13
- package/2x/bundle/antd-mobile.es.js +44 -42
- package/2x/bundle/antd-mobile.umd.development.js +16 -13
- package/2x/bundle/antd-mobile.umd.js +1 -1
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +3 -0
- package/2x/cjs/components/image-viewer/image-viewer.js +14 -12
- package/2x/cjs/components/virtual-input/virtual-input.js +2 -1
- package/2x/es/components/image-viewer/image-viewer.d.ts +3 -0
- package/2x/es/components/image-viewer/image-viewer.js +14 -12
- package/2x/es/components/virtual-input/virtual-input.js +2 -1
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +16 -13
- package/bundle/antd-mobile.cjs.js +1 -1
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +16 -13
- package/bundle/antd-mobile.es.js +44 -42
- package/bundle/antd-mobile.umd.development.js +16 -13
- package/bundle/antd-mobile.umd.js +1 -1
- package/cjs/components/image-viewer/image-viewer.css +1 -1
- package/cjs/components/image-viewer/image-viewer.d.ts +3 -0
- package/cjs/components/image-viewer/image-viewer.js +14 -12
- package/cjs/components/virtual-input/virtual-input.js +2 -1
- package/es/components/image-viewer/image-viewer.css +1 -1
- package/es/components/image-viewer/image-viewer.d.ts +3 -0
- package/es/components/image-viewer/image-viewer.js +14 -12
- package/es/components/virtual-input/virtual-input.js +2 -1
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -21886,17 +21886,18 @@ const defaultProps$z = {
|
|
|
21886
21886
|
visible: false
|
|
21887
21887
|
};
|
|
21888
21888
|
const ImageViewer$1 = (p) => {
|
|
21889
|
-
var _a, _b, _c;
|
|
21889
|
+
var _a, _b, _c, _d;
|
|
21890
21890
|
const props = mergeProps(defaultProps$z, p);
|
|
21891
21891
|
const node = React__default.createElement(Mask, {
|
|
21892
21892
|
visible: props.visible,
|
|
21893
|
+
afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
|
|
21894
|
+
className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
|
|
21895
|
+
onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
|
|
21893
21896
|
disableBodyScroll: false,
|
|
21894
21897
|
opacity: "thick",
|
|
21895
|
-
|
|
21896
|
-
destroyOnClose: true,
|
|
21897
|
-
className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
|
|
21898
|
+
destroyOnClose: true
|
|
21898
21899
|
}, React__default.createElement("div", {
|
|
21899
|
-
className: classNames(`${classPrefix$I}-content`, (
|
|
21900
|
+
className: classNames(`${classPrefix$I}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
|
|
21900
21901
|
}, (props.image || typeof props.imageRender === "function") && React__default.createElement(Slide, {
|
|
21901
21902
|
image: props.image,
|
|
21902
21903
|
onTap: props.onClose,
|
|
@@ -21904,7 +21905,7 @@ const ImageViewer$1 = (p) => {
|
|
|
21904
21905
|
imageRender: props.imageRender
|
|
21905
21906
|
})), props.image && React__default.createElement("div", {
|
|
21906
21907
|
className: `${classPrefix$I}-footer`
|
|
21907
|
-
}, (
|
|
21908
|
+
}, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.image), React__default.createElement(SafeArea, {
|
|
21908
21909
|
position: "bottom"
|
|
21909
21910
|
})));
|
|
21910
21911
|
return renderToContainer(props.getContainer, node);
|
|
@@ -21913,7 +21914,7 @@ const multiDefaultProps = Object.assign(Object.assign({}, defaultProps$z), {
|
|
|
21913
21914
|
defaultIndex: 0
|
|
21914
21915
|
});
|
|
21915
21916
|
const MultiImageViewer = forwardRef((p, ref2) => {
|
|
21916
|
-
var _a, _b, _c;
|
|
21917
|
+
var _a, _b, _c, _d;
|
|
21917
21918
|
const props = mergeProps(multiDefaultProps, p);
|
|
21918
21919
|
const [index2, setIndex] = useState(props.defaultIndex);
|
|
21919
21920
|
const slidesRef = useRef(null);
|
|
@@ -21933,13 +21934,14 @@ const MultiImageViewer = forwardRef((p, ref2) => {
|
|
|
21933
21934
|
}, [props.onIndexChange, index2]);
|
|
21934
21935
|
const node = React__default.createElement(Mask, {
|
|
21935
21936
|
visible: props.visible,
|
|
21937
|
+
afterClose: props === null || props === void 0 ? void 0 : props.afterClose,
|
|
21938
|
+
className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask,
|
|
21939
|
+
onMaskClick: (_b = props.mask) === null || _b === void 0 ? void 0 : _b.onClick,
|
|
21936
21940
|
disableBodyScroll: false,
|
|
21937
21941
|
opacity: "thick",
|
|
21938
|
-
|
|
21939
|
-
destroyOnClose: true,
|
|
21940
|
-
className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
|
|
21942
|
+
destroyOnClose: true
|
|
21941
21943
|
}, React__default.createElement("div", {
|
|
21942
|
-
className: classNames(`${classPrefix$I}-content`, (
|
|
21944
|
+
className: classNames(`${classPrefix$I}-content`, (_c = props === null || props === void 0 ? void 0 : props.classNames) === null || _c === void 0 ? void 0 : _c.body)
|
|
21943
21945
|
}, props.images && React__default.createElement(Slides, {
|
|
21944
21946
|
ref: slidesRef,
|
|
21945
21947
|
defaultIndex: index2,
|
|
@@ -21950,7 +21952,7 @@ const MultiImageViewer = forwardRef((p, ref2) => {
|
|
|
21950
21952
|
imageRender: props.imageRender
|
|
21951
21953
|
})), props.images && React__default.createElement("div", {
|
|
21952
21954
|
className: `${classPrefix$I}-footer`
|
|
21953
|
-
}, (
|
|
21955
|
+
}, (_d = props.renderFooter) === null || _d === void 0 ? void 0 : _d.call(props, props.images[index2], index2), React__default.createElement(SafeArea, {
|
|
21954
21956
|
position: "bottom"
|
|
21955
21957
|
})));
|
|
21956
21958
|
return renderToContainer(props.getContainer, node);
|
|
@@ -27719,6 +27721,7 @@ const VirtualInput = forwardRef((props, ref2) => {
|
|
|
27719
27721
|
(_b = (_a = mergedProps.cursor) === null || _a === void 0 ? void 0 : _a.onMove) === null || _b === void 0 ? void 0 : _b.call(_a, value.length);
|
|
27720
27722
|
}
|
|
27721
27723
|
(_c = mergedProps.onClick) === null || _c === void 0 ? void 0 : _c.call(mergedProps, e2);
|
|
27724
|
+
setHasFocus(true);
|
|
27722
27725
|
};
|
|
27723
27726
|
const changeCaretPosition = (index2) => (e2) => {
|
|
27724
27727
|
var _a, _b, _c;
|
|
@@ -27792,7 +27795,7 @@ const VirtualInput = forwardRef((props, ref2) => {
|
|
|
27792
27795
|
className: `${classPrefix$2}-content`,
|
|
27793
27796
|
ref: contentRef,
|
|
27794
27797
|
"aria-disabled": mergedProps.disabled,
|
|
27795
|
-
"aria-label": value
|
|
27798
|
+
"aria-label": value ? void 0 : mergedProps.placeholder,
|
|
27796
27799
|
role: "textbox",
|
|
27797
27800
|
tabIndex: mergedProps.disabled ? void 0 : 0,
|
|
27798
27801
|
// note: 这里增加 onFocus 有两个目的:
|
|
@@ -15541,64 +15541,66 @@ const dy = "__SPLIT__", Ye = "adm-form-item", my = s.memo(({
|
|
|
15541
15541
|
getContainer: null,
|
|
15542
15542
|
visible: !1
|
|
15543
15543
|
}, A0 = (t) => {
|
|
15544
|
-
var e, n, r;
|
|
15545
|
-
const
|
|
15546
|
-
visible:
|
|
15544
|
+
var e, n, r, i;
|
|
15545
|
+
const a = G(M0, t), o = s.createElement(Vi, {
|
|
15546
|
+
visible: a.visible,
|
|
15547
|
+
afterClose: a == null ? void 0 : a.afterClose,
|
|
15548
|
+
className: (e = a == null ? void 0 : a.classNames) === null || e === void 0 ? void 0 : e.mask,
|
|
15549
|
+
onMaskClick: (n = a.mask) === null || n === void 0 ? void 0 : n.onClick,
|
|
15547
15550
|
disableBodyScroll: !1,
|
|
15548
15551
|
opacity: "thick",
|
|
15549
|
-
|
|
15550
|
-
destroyOnClose: !0,
|
|
15551
|
-
className: (e = i == null ? void 0 : i.classNames) === null || e === void 0 ? void 0 : e.mask
|
|
15552
|
+
destroyOnClose: !0
|
|
15552
15553
|
}, s.createElement("div", {
|
|
15553
|
-
className: Z(`${Qa}-content`, (
|
|
15554
|
-
}, (
|
|
15555
|
-
image:
|
|
15556
|
-
onTap:
|
|
15557
|
-
maxZoom:
|
|
15558
|
-
imageRender:
|
|
15559
|
-
})),
|
|
15554
|
+
className: Z(`${Qa}-content`, (r = a == null ? void 0 : a.classNames) === null || r === void 0 ? void 0 : r.body)
|
|
15555
|
+
}, (a.image || typeof a.imageRender == "function") && s.createElement(P0, {
|
|
15556
|
+
image: a.image,
|
|
15557
|
+
onTap: a.onClose,
|
|
15558
|
+
maxZoom: a.maxZoom,
|
|
15559
|
+
imageRender: a.imageRender
|
|
15560
|
+
})), a.image && s.createElement("div", {
|
|
15560
15561
|
className: `${Qa}-footer`
|
|
15561
|
-
}, (
|
|
15562
|
+
}, (i = a.renderFooter) === null || i === void 0 ? void 0 : i.call(a, a.image), s.createElement(Wr, {
|
|
15562
15563
|
position: "bottom"
|
|
15563
15564
|
})));
|
|
15564
|
-
return Dr(
|
|
15565
|
+
return Dr(a.getContainer, o);
|
|
15565
15566
|
}, ky = Object.assign(Object.assign({}, M0), {
|
|
15566
15567
|
defaultIndex: 0
|
|
15567
15568
|
}), T0 = Ee((t, e) => {
|
|
15568
|
-
var n, r, i;
|
|
15569
|
-
const
|
|
15569
|
+
var n, r, i, a;
|
|
15570
|
+
const o = G(ky, t), [l, c] = X(o.defaultIndex), u = W(null);
|
|
15570
15571
|
_e(e, () => ({
|
|
15571
|
-
swipeTo: (
|
|
15572
|
-
var
|
|
15573
|
-
|
|
15572
|
+
swipeTo: (m, v) => {
|
|
15573
|
+
var b;
|
|
15574
|
+
c(m), (b = u.current) === null || b === void 0 || b.swipeTo(m, v);
|
|
15574
15575
|
}
|
|
15575
15576
|
}));
|
|
15576
|
-
const
|
|
15577
|
-
var
|
|
15578
|
-
|
|
15579
|
-
}, [
|
|
15580
|
-
visible:
|
|
15577
|
+
const f = Qe((m) => {
|
|
15578
|
+
var v;
|
|
15579
|
+
m !== l && (c(m), (v = o.onIndexChange) === null || v === void 0 || v.call(o, m));
|
|
15580
|
+
}, [o.onIndexChange, l]), d = s.createElement(Vi, {
|
|
15581
|
+
visible: o.visible,
|
|
15582
|
+
afterClose: o == null ? void 0 : o.afterClose,
|
|
15583
|
+
className: (n = o == null ? void 0 : o.classNames) === null || n === void 0 ? void 0 : n.mask,
|
|
15584
|
+
onMaskClick: (r = o.mask) === null || r === void 0 ? void 0 : r.onClick,
|
|
15581
15585
|
disableBodyScroll: !1,
|
|
15582
15586
|
opacity: "thick",
|
|
15583
|
-
|
|
15584
|
-
destroyOnClose: !0,
|
|
15585
|
-
className: (n = a == null ? void 0 : a.classNames) === null || n === void 0 ? void 0 : n.mask
|
|
15587
|
+
destroyOnClose: !0
|
|
15586
15588
|
}, s.createElement("div", {
|
|
15587
|
-
className: Z(`${Qa}-content`, (
|
|
15588
|
-
},
|
|
15589
|
-
ref:
|
|
15590
|
-
defaultIndex:
|
|
15591
|
-
onIndexChange:
|
|
15592
|
-
images:
|
|
15593
|
-
onTap:
|
|
15594
|
-
maxZoom:
|
|
15595
|
-
imageRender:
|
|
15596
|
-
})),
|
|
15589
|
+
className: Z(`${Qa}-content`, (i = o == null ? void 0 : o.classNames) === null || i === void 0 ? void 0 : i.body)
|
|
15590
|
+
}, o.images && s.createElement(xy, {
|
|
15591
|
+
ref: u,
|
|
15592
|
+
defaultIndex: l,
|
|
15593
|
+
onIndexChange: f,
|
|
15594
|
+
images: o.images,
|
|
15595
|
+
onTap: o.onClose,
|
|
15596
|
+
maxZoom: o.maxZoom,
|
|
15597
|
+
imageRender: o.imageRender
|
|
15598
|
+
})), o.images && s.createElement("div", {
|
|
15597
15599
|
className: `${Qa}-footer`
|
|
15598
|
-
}, (
|
|
15600
|
+
}, (a = o.renderFooter) === null || a === void 0 ? void 0 : a.call(o, o.images[l], l), s.createElement(Wr, {
|
|
15599
15601
|
position: "bottom"
|
|
15600
15602
|
})));
|
|
15601
|
-
return Dr(
|
|
15603
|
+
return Dr(o.getContainer, d);
|
|
15602
15604
|
}), Mr = /* @__PURE__ */ new Set();
|
|
15603
15605
|
function _y(t) {
|
|
15604
15606
|
Ec();
|
|
@@ -19799,7 +19801,7 @@ const At = "adm-virtual-input", D9 = {
|
|
|
19799
19801
|
getContainer: null
|
|
19800
19802
|
}), V = (S) => {
|
|
19801
19803
|
var I, _, F;
|
|
19802
|
-
d !== a.length && (m(a.length), (_ = (I = i.cursor) === null || I === void 0 ? void 0 : I.onMove) === null || _ === void 0 || _.call(I, a.length)), (F = i.onClick) === null || F === void 0 || F.call(i, S);
|
|
19804
|
+
d !== a.length && (m(a.length), (_ = (I = i.cursor) === null || I === void 0 ? void 0 : I.onMove) === null || _ === void 0 || _.call(I, a.length)), (F = i.onClick) === null || F === void 0 || F.call(i, S), f(!0);
|
|
19803
19805
|
}, A = (S) => (I) => {
|
|
19804
19806
|
var _, F, L;
|
|
19805
19807
|
if (i.disabled || !(!((_ = i.cursor) === null || _ === void 0) && _.movable))
|
|
@@ -19840,7 +19842,7 @@ const At = "adm-virtual-input", D9 = {
|
|
|
19840
19842
|
className: `${At}-content`,
|
|
19841
19843
|
ref: c,
|
|
19842
19844
|
"aria-disabled": i.disabled,
|
|
19843
|
-
"aria-label": a
|
|
19845
|
+
"aria-label": a ? void 0 : i.placeholder,
|
|
19844
19846
|
role: "textbox",
|
|
19845
19847
|
tabIndex: i.disabled ? void 0 : 0,
|
|
19846
19848
|
// note: 这里增加 onFocus 有两个目的:
|
|
@@ -21904,17 +21904,18 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
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
|
-
|
|
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`, (
|
|
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 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21922
21923
|
imageRender: props.imageRender
|
|
21923
21924
|
})), props.image && React$3.createElement("div", {
|
|
21924
21925
|
className: `${classPrefix$I}-footer`
|
|
21925
|
-
}, (
|
|
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 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
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 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
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
|
-
|
|
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`, (
|
|
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 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21968
21970
|
imageRender: props.imageRender
|
|
21969
21971
|
})), props.images && React$3.createElement("div", {
|
|
21970
21972
|
className: `${classPrefix$I}-footer`
|
|
21971
|
-
}, (
|
|
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);
|
|
@@ -27737,6 +27739,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
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
|
+
setHasFocus(true);
|
|
27740
27743
|
};
|
|
27741
27744
|
const changeCaretPosition = (index2) => (e2) => {
|
|
27742
27745
|
var _a, _b, _c;
|
|
@@ -27810,7 +27813,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
27810
27813
|
className: `${classPrefix$2}-content`,
|
|
27811
27814
|
ref: contentRef,
|
|
27812
27815
|
"aria-disabled": mergedProps.disabled,
|
|
27813
|
-
"aria-label": value
|
|
27816
|
+
"aria-label": value ? void 0 : mergedProps.placeholder,
|
|
27814
27817
|
role: "textbox",
|
|
27815
27818
|
tabIndex: mergedProps.disabled ? void 0 : 0,
|
|
27816
27819
|
// note: 这里增加 onFocus 有两个目的:
|