antd-mobile 5.38.1 → 5.39.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 (110) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +158 -124
  2. package/2x/bundle/antd-mobile.cjs.js +7 -7
  3. package/2x/bundle/antd-mobile.es.development.js +158 -124
  4. package/2x/bundle/antd-mobile.es.js +3726 -3707
  5. package/2x/bundle/antd-mobile.umd.development.js +158 -124
  6. package/2x/bundle/antd-mobile.umd.js +7 -7
  7. package/2x/bundle/style.css +16 -2
  8. package/2x/cjs/components/calendar-picker/calendar-picker.d.ts +9 -9
  9. package/2x/cjs/components/calendar-picker-view/calendar-picker-view.d.ts +5 -4
  10. package/2x/cjs/components/calendar-picker-view/calendar-picker-view.js +18 -11
  11. package/2x/cjs/components/date-picker/date-picker-week-utils.js +2 -2
  12. package/2x/cjs/components/ellipsis/useMeasure.js +7 -3
  13. package/2x/cjs/components/floating-panel/floating-panel.css +16 -2
  14. package/2x/cjs/components/floating-panel/floating-panel.d.ts +3 -1
  15. package/2x/cjs/components/floating-panel/floating-panel.js +43 -30
  16. package/2x/cjs/components/image-uploader/image-uploader.d.ts +3 -3
  17. package/2x/cjs/components/image-uploader/image-uploader.js +11 -11
  18. package/2x/cjs/components/image-viewer/image-viewer.d.ts +13 -4
  19. package/2x/cjs/components/image-viewer/image-viewer.js +8 -6
  20. package/2x/cjs/components/image-viewer/index.d.ts +4 -1
  21. package/2x/cjs/components/image-viewer/slide.d.ts +5 -1
  22. package/2x/cjs/components/image-viewer/slide.js +10 -5
  23. package/2x/cjs/components/image-viewer/slides.d.ts +4 -1
  24. package/2x/cjs/components/image-viewer/slides.js +14 -12
  25. package/2x/cjs/components/passcode-input/passcode-input.d.ts +7 -5
  26. package/2x/cjs/components/passcode-input/passcode-input.js +7 -6
  27. package/2x/cjs/components/popover/popover.d.ts +2 -2
  28. package/2x/cjs/components/popover/popover.js +11 -11
  29. package/2x/cjs/components/swipe-action/swipe-action.d.ts +3 -1
  30. package/2x/cjs/components/swipe-action/swipe-action.js +25 -23
  31. package/2x/es/components/calendar-picker/calendar-picker.d.ts +9 -9
  32. package/2x/es/components/calendar-picker-view/calendar-picker-view.d.ts +5 -4
  33. package/2x/es/components/calendar-picker-view/calendar-picker-view.js +18 -11
  34. package/2x/es/components/date-picker/date-picker-week-utils.js +2 -2
  35. package/2x/es/components/ellipsis/useMeasure.js +7 -3
  36. package/2x/es/components/floating-panel/floating-panel.css +16 -2
  37. package/2x/es/components/floating-panel/floating-panel.d.ts +3 -1
  38. package/2x/es/components/floating-panel/floating-panel.js +31 -19
  39. package/2x/es/components/image-uploader/image-uploader.d.ts +3 -3
  40. package/2x/es/components/image-uploader/image-uploader.js +11 -11
  41. package/2x/es/components/image-viewer/image-viewer.d.ts +13 -4
  42. package/2x/es/components/image-viewer/image-viewer.js +8 -6
  43. package/2x/es/components/image-viewer/index.d.ts +4 -1
  44. package/2x/es/components/image-viewer/slide.d.ts +5 -1
  45. package/2x/es/components/image-viewer/slide.js +11 -6
  46. package/2x/es/components/image-viewer/slides.d.ts +4 -1
  47. package/2x/es/components/image-viewer/slides.js +6 -4
  48. package/2x/es/components/passcode-input/passcode-input.d.ts +7 -5
  49. package/2x/es/components/passcode-input/passcode-input.js +6 -5
  50. package/2x/es/components/popover/popover.d.ts +2 -2
  51. package/2x/es/components/popover/popover.js +10 -10
  52. package/2x/es/components/swipe-action/swipe-action.d.ts +3 -1
  53. package/2x/es/components/swipe-action/swipe-action.js +9 -7
  54. package/2x/package.json +1 -1
  55. package/bundle/antd-mobile.cjs.development.js +158 -124
  56. package/bundle/antd-mobile.cjs.js +7 -7
  57. package/bundle/antd-mobile.compatible.umd.js +1 -1
  58. package/bundle/antd-mobile.es.development.js +158 -124
  59. package/bundle/antd-mobile.es.js +3726 -3707
  60. package/bundle/antd-mobile.umd.development.js +158 -124
  61. package/bundle/antd-mobile.umd.js +7 -7
  62. package/bundle/style.css +1 -1
  63. package/cjs/components/calendar-picker/calendar-picker.d.ts +9 -9
  64. package/cjs/components/calendar-picker-view/calendar-picker-view.d.ts +5 -4
  65. package/cjs/components/calendar-picker-view/calendar-picker-view.js +18 -11
  66. package/cjs/components/date-picker/date-picker-week-utils.js +2 -2
  67. package/cjs/components/ellipsis/useMeasure.js +7 -3
  68. package/cjs/components/floating-panel/floating-panel.css +12 -2
  69. package/cjs/components/floating-panel/floating-panel.d.ts +3 -1
  70. package/cjs/components/floating-panel/floating-panel.js +43 -30
  71. package/cjs/components/image-uploader/image-uploader.d.ts +3 -3
  72. package/cjs/components/image-uploader/image-uploader.js +11 -11
  73. package/cjs/components/image-viewer/image-viewer.d.ts +13 -4
  74. package/cjs/components/image-viewer/image-viewer.js +8 -6
  75. package/cjs/components/image-viewer/index.d.ts +4 -1
  76. package/cjs/components/image-viewer/slide.d.ts +5 -1
  77. package/cjs/components/image-viewer/slide.js +10 -5
  78. package/cjs/components/image-viewer/slides.d.ts +4 -1
  79. package/cjs/components/image-viewer/slides.js +14 -12
  80. package/cjs/components/passcode-input/passcode-input.d.ts +7 -5
  81. package/cjs/components/passcode-input/passcode-input.js +7 -6
  82. package/cjs/components/popover/popover.d.ts +2 -2
  83. package/cjs/components/popover/popover.js +11 -11
  84. package/cjs/components/swipe-action/swipe-action.d.ts +3 -1
  85. package/cjs/components/swipe-action/swipe-action.js +25 -23
  86. package/es/components/calendar-picker/calendar-picker.d.ts +9 -9
  87. package/es/components/calendar-picker-view/calendar-picker-view.d.ts +5 -4
  88. package/es/components/calendar-picker-view/calendar-picker-view.js +18 -11
  89. package/es/components/date-picker/date-picker-week-utils.js +2 -2
  90. package/es/components/ellipsis/useMeasure.js +7 -3
  91. package/es/components/floating-panel/floating-panel.css +12 -2
  92. package/es/components/floating-panel/floating-panel.d.ts +3 -1
  93. package/es/components/floating-panel/floating-panel.js +31 -19
  94. package/es/components/image-uploader/image-uploader.d.ts +3 -3
  95. package/es/components/image-uploader/image-uploader.js +11 -11
  96. package/es/components/image-viewer/image-viewer.d.ts +13 -4
  97. package/es/components/image-viewer/image-viewer.js +8 -6
  98. package/es/components/image-viewer/index.d.ts +4 -1
  99. package/es/components/image-viewer/slide.d.ts +5 -1
  100. package/es/components/image-viewer/slide.js +11 -6
  101. package/es/components/image-viewer/slides.d.ts +4 -1
  102. package/es/components/image-viewer/slides.js +6 -4
  103. package/es/components/passcode-input/passcode-input.d.ts +7 -5
  104. package/es/components/passcode-input/passcode-input.js +6 -5
  105. package/es/components/popover/popover.d.ts +2 -2
  106. package/es/components/popover/popover.js +10 -10
  107. package/es/components/swipe-action/swipe-action.d.ts +3 -1
  108. package/es/components/swipe-action/swipe-action.js +9 -7
  109. package/package.json +1 -1
  110. package/umd/antd-mobile.js +1 -1
@@ -10130,7 +10130,6 @@ const CalendarPickerView = forwardRef((p, ref) => {
10130
10130
  })), React__default.createElement("div", {
10131
10131
  className: `${classPrefix$1f}-cells`
10132
10132
  }, presetEmptyCells, Array(monthIterator.daysInMonth()).fill(null).map((_, index2) => {
10133
- var _a3;
10134
10133
  const d = monthIterator.date(index2 + 1);
10135
10134
  let isSelect = false;
10136
10135
  let isBegin = false;
@@ -10149,22 +10148,36 @@ const CalendarPickerView = forwardRef((p, ref) => {
10149
10148
  }
10150
10149
  const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
10151
10150
  const renderTop = () => {
10152
- var _a4;
10153
- const top = (_a4 = props.renderTop) === null || _a4 === void 0 ? void 0 : _a4.call(props, d.toDate());
10151
+ var _a3;
10152
+ if (props.renderTop === false)
10153
+ return null;
10154
+ const contentWrapper = (content) => React__default.createElement("div", {
10155
+ className: `${classPrefix$1f}-cell-top`
10156
+ }, content);
10157
+ const top = (_a3 = props.renderTop) === null || _a3 === void 0 ? void 0 : _a3.call(props, d.toDate());
10154
10158
  if (top) {
10155
- return top;
10159
+ return contentWrapper(top);
10156
10160
  }
10157
10161
  if (props.selectionMode === "range") {
10158
10162
  if (isBegin) {
10159
- return locale.Calendar.start;
10163
+ return contentWrapper(locale.Calendar.start);
10160
10164
  }
10161
10165
  if (isEnd) {
10162
- return locale.Calendar.end;
10166
+ return contentWrapper(locale.Calendar.end);
10163
10167
  }
10164
10168
  }
10165
10169
  if (d.isSame(today, "day") && !isSelect) {
10166
- return locale.Calendar.today;
10170
+ return contentWrapper(locale.Calendar.today);
10167
10171
  }
10172
+ return contentWrapper(null);
10173
+ };
10174
+ const renderBottom = () => {
10175
+ var _a3;
10176
+ if (props.renderBottom === false)
10177
+ return null;
10178
+ return React__default.createElement("div", {
10179
+ className: `${classPrefix$1f}-cell-bottom`
10180
+ }, (_a3 = props.renderBottom) === null || _a3 === void 0 ? void 0 : _a3.call(props, d.toDate()));
10168
10181
  };
10169
10182
  return React__default.createElement("div", {
10170
10183
  key: d.valueOf(),
@@ -10218,13 +10231,9 @@ const CalendarPickerView = forwardRef((p, ref) => {
10218
10231
  }
10219
10232
  }
10220
10233
  }
10221
- }, React__default.createElement("div", {
10222
- className: `${classPrefix$1f}-cell-top`
10223
- }, renderTop()), React__default.createElement("div", {
10234
+ }, renderTop(), React__default.createElement("div", {
10224
10235
  className: `${classPrefix$1f}-cell-date`
10225
- }, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React__default.createElement("div", {
10226
- className: `${classPrefix$1f}-cell-bottom`
10227
- }, (_a3 = props.renderBottom) === null || _a3 === void 0 ? void 0 : _a3.call(props, d.toDate())));
10236
+ }, props.renderDate ? props.renderDate(d.toDate()) : d.date()), renderBottom());
10228
10237
  }))));
10229
10238
  monthIterator = monthIterator.add(1, "month");
10230
10239
  }
@@ -13165,7 +13174,7 @@ function convertStringArrayToDate$1(value) {
13165
13174
  const yearString = (_a = value[0]) !== null && _a !== void 0 ? _a : "1900";
13166
13175
  const weekString = (_b = value[1]) !== null && _b !== void 0 ? _b : "1";
13167
13176
  const weekdayString = (_c = value[2]) !== null && _c !== void 0 ? _c : "1";
13168
- const day = dayjs().year(parseInt(yearString)).isoWeek(parseInt(weekString)).isoWeekday(parseInt(weekdayString)).hour(0).minute(0).second(0);
13177
+ const day = dayjs(`${parseInt(yearString)}-01-01`).isoWeek(parseInt(weekString)).isoWeekday(parseInt(weekdayString)).hour(0).minute(0).second(0);
13169
13178
  return day.toDate();
13170
13179
  }
13171
13180
  const precisionLengthRecord = {
@@ -13776,11 +13785,13 @@ function useMeasure(containerRef, content, rows, direction, expanded, expandNode
13776
13785
  const fullMeasureRef = React__default.useRef(null);
13777
13786
  const midMeasureRef = React__default.useRef(null);
13778
13787
  const startMeasure = useEvent(() => {
13779
- setStatus(
13780
- 1
13781
- /* PREPARE */
13782
- );
13783
- setWalkingIndexes([0, direction === "middle" ? Math.ceil(contentChars.length / 2) : contentChars.length]);
13788
+ unstable_batchedUpdates(() => {
13789
+ setStatus(
13790
+ 1
13791
+ /* PREPARE */
13792
+ );
13793
+ setWalkingIndexes([0, direction === "middle" ? Math.ceil(contentChars.length / 2) : contentChars.length]);
13794
+ });
13784
13795
  });
13785
13796
  React__default.useLayoutEffect(() => {
13786
13797
  startMeasure();
@@ -13790,7 +13801,7 @@ function useMeasure(containerRef, content, rows, direction, expanded, expandNode
13790
13801
  if (status === 1) {
13791
13802
  const fullMeasureHeight = ((_a = fullMeasureRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0;
13792
13803
  const singleRowMeasureHeight = ((_b = singleRowMeasureRef.current) === null || _b === void 0 ? void 0 : _b.offsetHeight) || 0;
13793
- const rowMeasureHeight = singleRowMeasureHeight * rows;
13804
+ const rowMeasureHeight = singleRowMeasureHeight * (rows + 0.5);
13794
13805
  if (fullMeasureHeight <= rowMeasureHeight) {
13795
13806
  setStatus(
13796
13807
  100
@@ -14616,25 +14627,27 @@ const FloatingPanel = forwardRef((p, ref) => {
14616
14627
  var _a, _b;
14617
14628
  const props = mergeProps(defaultProps$C, p);
14618
14629
  const {
14619
- anchors
14630
+ anchors,
14631
+ placement = "bottom"
14620
14632
  } = props;
14621
14633
  const maxHeight = (_a = anchors[anchors.length - 1]) !== null && _a !== void 0 ? _a : window.innerHeight;
14622
- const possibles = anchors.map((x) => -x);
14634
+ const isBottomPlacement = placement !== "top";
14635
+ const possibles = isBottomPlacement ? anchors.map((x) => -x) : anchors;
14623
14636
  const elementRef = useRef(null);
14624
14637
  const headerRef = useRef(null);
14625
14638
  const contentRef = useRef(null);
14626
14639
  const [pulling, setPulling] = useState(false);
14627
14640
  const pullingRef = useRef(false);
14628
14641
  const bounds = {
14629
- top: possibles[possibles.length - 1],
14630
- bottom: possibles[0]
14642
+ top: Math.min(...possibles),
14643
+ bottom: Math.max(...possibles)
14631
14644
  };
14632
14645
  const onHeightChange = useMemoizedFn((_b = props.onHeightChange) !== null && _b !== void 0 ? _b : () => {
14633
14646
  });
14634
14647
  const [{
14635
14648
  y
14636
14649
  }, api] = useSpring(() => ({
14637
- y: bounds.bottom,
14650
+ y: isBottomPlacement ? bounds.bottom : bounds.top,
14638
14651
  config: {
14639
14652
  tension: 300
14640
14653
  },
@@ -14706,27 +14719,36 @@ const FloatingPanel = forwardRef((p, ref) => {
14706
14719
  }
14707
14720
  }), [api]);
14708
14721
  useLockScroll(elementRef, true);
14722
+ const HeaderNode = React__default.createElement("div", {
14723
+ className: `${classPrefix$Q}-header`,
14724
+ ref: headerRef
14725
+ }, React__default.createElement("div", {
14726
+ className: `${classPrefix$Q}-bar`
14727
+ }));
14709
14728
  return withNativeProps(props, React__default.createElement(animated.div, {
14710
14729
  ref: elementRef,
14711
- className: classPrefix$Q,
14730
+ className: classNames(classPrefix$Q, `${classPrefix$Q}-${placement}`),
14712
14731
  style: {
14713
14732
  height: Math.round(maxHeight),
14714
- translateY: y.to((y2) => `calc(100% + (${Math.round(y2)}px))`)
14733
+ translateY: y.to((y2) => {
14734
+ if (isBottomPlacement) {
14735
+ return `calc(100% + (${Math.round(y2)}px))`;
14736
+ }
14737
+ if (placement === "top") {
14738
+ return `calc(-100% + (${Math.round(y2)}px))`;
14739
+ }
14740
+ return y2;
14741
+ })
14715
14742
  }
14716
14743
  }, React__default.createElement("div", {
14717
14744
  className: `${classPrefix$Q}-mask`,
14718
14745
  style: {
14719
14746
  display: pulling ? "block" : "none"
14720
14747
  }
14721
- }), React__default.createElement("div", {
14722
- className: `${classPrefix$Q}-header`,
14723
- ref: headerRef
14724
- }, React__default.createElement("div", {
14725
- className: `${classPrefix$Q}-bar`
14726
- })), React__default.createElement("div", {
14748
+ }), isBottomPlacement && HeaderNode, React__default.createElement("div", {
14727
14749
  className: `${classPrefix$Q}-content`,
14728
14750
  ref: contentRef
14729
- }, props.children)));
14751
+ }, props.children), placement === "top" && HeaderNode));
14730
14752
  });
14731
14753
  function _extends$1() {
14732
14754
  _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
@@ -18725,15 +18747,6 @@ function undefinedFallback(...items) {
18725
18747
  }
18726
18748
  return items[i2];
18727
18749
  }
18728
- const Arrow = memo((props) => {
18729
- return withNativeProps(props, React__default.createElement("svg", {
18730
- viewBox: "0 0 30 16"
18731
- }, React__default.createElement("g", {
18732
- fill: "currentColor"
18733
- }, React__default.createElement("path", {
18734
- d: "M0,0 L30,0 L18.07289,14.312538 C16.65863,16.009645 14.13637,16.238942 12.43926,14.824685 C12.25341,14.669808 12.08199,14.49839 11.92711,14.312538 L0,0 L0,0 Z"
18735
- }))));
18736
- });
18737
18750
  const sides = ["top", "right", "bottom", "left"];
18738
18751
  const min = Math.min;
18739
18752
  const max = Math.max;
@@ -20102,40 +20115,6 @@ const computePosition = (reference, floating, options) => {
20102
20115
  platform: platformWithCache
20103
20116
  });
20104
20117
  };
20105
- class Wrapper extends React__default.Component {
20106
- constructor() {
20107
- super(...arguments);
20108
- this.element = null;
20109
- }
20110
- componentDidMount() {
20111
- this.componentDidUpdate();
20112
- }
20113
- componentDidUpdate() {
20114
- const node = findDOMNode$1(this);
20115
- if (node instanceof Element) {
20116
- this.element = node;
20117
- } else {
20118
- this.element = null;
20119
- }
20120
- }
20121
- render() {
20122
- return React__default.Children.only(this.props.children);
20123
- }
20124
- }
20125
- const record = {
20126
- "topLeft": "top-start",
20127
- "topRight": "top-end",
20128
- "bottomLeft": "bottom-start",
20129
- "bottomRight": "bottom-end",
20130
- "leftTop": "left-start",
20131
- "leftBottom": "left-end",
20132
- "rightTop": "right-start",
20133
- "rightBottom": "right-end"
20134
- };
20135
- function normalizePlacement(placement) {
20136
- var _a;
20137
- return (_a = record[placement]) !== null && _a !== void 0 ? _a : placement;
20138
- }
20139
20118
  let tenPxTester = null;
20140
20119
  let tester = null;
20141
20120
  if (canUseDom$1) {
@@ -20161,6 +20140,49 @@ function convertPx(px) {
20161
20140
  tester.style.setProperty("--size", px.toString());
20162
20141
  return tester.getBoundingClientRect().height;
20163
20142
  }
20143
+ const Arrow = memo((props) => {
20144
+ return withNativeProps(props, React__default.createElement("svg", {
20145
+ viewBox: "0 0 30 16"
20146
+ }, React__default.createElement("g", {
20147
+ fill: "currentColor"
20148
+ }, React__default.createElement("path", {
20149
+ d: "M0,0 L30,0 L18.07289,14.312538 C16.65863,16.009645 14.13637,16.238942 12.43926,14.824685 C12.25341,14.669808 12.08199,14.49839 11.92711,14.312538 L0,0 L0,0 Z"
20150
+ }))));
20151
+ });
20152
+ const record = {
20153
+ "topLeft": "top-start",
20154
+ "topRight": "top-end",
20155
+ "bottomLeft": "bottom-start",
20156
+ "bottomRight": "bottom-end",
20157
+ "leftTop": "left-start",
20158
+ "leftBottom": "left-end",
20159
+ "rightTop": "right-start",
20160
+ "rightBottom": "right-end"
20161
+ };
20162
+ function normalizePlacement(placement) {
20163
+ var _a;
20164
+ return (_a = record[placement]) !== null && _a !== void 0 ? _a : placement;
20165
+ }
20166
+ class Wrapper extends React__default.Component {
20167
+ constructor() {
20168
+ super(...arguments);
20169
+ this.element = null;
20170
+ }
20171
+ componentDidMount() {
20172
+ this.componentDidUpdate();
20173
+ }
20174
+ componentDidUpdate() {
20175
+ const node = findDOMNode$1(this);
20176
+ if (node instanceof Element) {
20177
+ this.element = node;
20178
+ } else {
20179
+ this.element = null;
20180
+ }
20181
+ }
20182
+ render() {
20183
+ return React__default.Children.only(this.props.children);
20184
+ }
20185
+ }
20164
20186
  const classPrefix$O = `adm-popover`;
20165
20187
  const defaultProps$A = {
20166
20188
  placement: "top",
@@ -20275,12 +20297,12 @@ const Popover$1 = forwardRef((p, ref) => {
20275
20297
  }, [targetElement, props.trigger]);
20276
20298
  useEffect(() => {
20277
20299
  const floatingElement = floatingRef.current;
20278
- if (!targetElement || !floatingElement)
20300
+ if (!targetElement || !floatingElement || !visible)
20279
20301
  return;
20280
20302
  return autoUpdate(targetElement, floatingElement, update2, {
20281
20303
  elementResize: typeof ResizeObserver !== "undefined"
20282
20304
  });
20283
- }, [targetElement]);
20305
+ }, [targetElement, visible]);
20284
20306
  useClickAway(() => {
20285
20307
  if (!props.trigger)
20286
20308
  return;
@@ -20717,7 +20739,6 @@ const GridItem = (p) => {
20717
20739
  const Grid = attachPropertiesToComponent(Grid$1, {
20718
20740
  Item: GridItem
20719
20741
  });
20720
- const useDragAndPinch = createUseGesture([dragAction, pinchAction]);
20721
20742
  const create = () => {
20722
20743
  return [1, 0, 0, 1, 0, 0];
20723
20744
  };
@@ -20742,11 +20763,14 @@ const apply = (m, [ox, oy]) => {
20742
20763
  const multiply = (m1, m2) => {
20743
20764
  return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]];
20744
20765
  };
20766
+ const useDragAndPinch = createUseGesture([dragAction, pinchAction]);
20745
20767
  const classPrefix$K = `adm-image-viewer`;
20746
20768
  const Slide = (props) => {
20747
20769
  const {
20748
20770
  dragLockRef,
20749
- maxZoom
20771
+ maxZoom,
20772
+ imageRender,
20773
+ index: index2
20750
20774
  } = props;
20751
20775
  const initialMartix = useRef([]);
20752
20776
  const controlRef = useRef(null);
@@ -20951,6 +20975,9 @@ const Slide = (props) => {
20951
20975
  }
20952
20976
  }
20953
20977
  });
20978
+ const customRendering = typeof imageRender === "function" && imageRender(props.image, {
20979
+ index: index2
20980
+ });
20954
20981
  return React__default.createElement("div", {
20955
20982
  className: `${classPrefix$K}-slide`
20956
20983
  }, React__default.createElement("div", {
@@ -20961,7 +20988,7 @@ const Slide = (props) => {
20961
20988
  style: {
20962
20989
  matrix
20963
20990
  }
20964
- }, React__default.createElement("img", {
20991
+ }, customRendering ? customRendering : React__default.createElement("img", {
20965
20992
  ref: imgRef,
20966
20993
  src: props.image,
20967
20994
  draggable: false,
@@ -21039,6 +21066,8 @@ const Slides = forwardRef((props, ref) => {
21039
21066
  image,
21040
21067
  onTap: props.onTap,
21041
21068
  maxZoom: props.maxZoom,
21069
+ imageRender: props.imageRender,
21070
+ index: index2,
21042
21071
  onZoomChange: (zoom) => {
21043
21072
  if (zoom !== 1) {
21044
21073
  const index3 = Math.round(x.get() / slideWidth);
@@ -21068,10 +21097,11 @@ const ImageViewer$1 = (p) => {
21068
21097
  className: (_a = props === null || props === void 0 ? void 0 : props.classNames) === null || _a === void 0 ? void 0 : _a.mask
21069
21098
  }, React__default.createElement("div", {
21070
21099
  className: classNames(`${classPrefix$I}-content`, (_b = props === null || props === void 0 ? void 0 : props.classNames) === null || _b === void 0 ? void 0 : _b.body)
21071
- }, props.image && React__default.createElement(Slide, {
21100
+ }, (props.image || typeof props.imageRender === "function") && React__default.createElement(Slide, {
21072
21101
  image: props.image,
21073
21102
  onTap: props.onClose,
21074
- maxZoom: props.maxZoom
21103
+ maxZoom: props.maxZoom,
21104
+ imageRender: props.imageRender
21075
21105
  })), props.image && React__default.createElement("div", {
21076
21106
  className: `${classPrefix$I}-footer`
21077
21107
  }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.image), React__default.createElement(SafeArea, {
@@ -21116,7 +21146,8 @@ const MultiImageViewer = forwardRef((p, ref) => {
21116
21146
  onIndexChange: onSlideChange,
21117
21147
  images: props.images,
21118
21148
  onTap: props.onClose,
21119
- maxZoom: props.maxZoom
21149
+ maxZoom: props.maxZoom,
21150
+ imageRender: props.imageRender
21120
21151
  })), props.images && React__default.createElement("div", {
21121
21152
  className: `${classPrefix$I}-footer`
21122
21153
  }, (_c = props.renderFooter) === null || _c === void 0 ? void 0 : _c.call(props, props.images[index2], index2), React__default.createElement(SafeArea, {
@@ -21163,7 +21194,32 @@ const ImageViewer = attachPropertiesToComponent(ImageViewer$1, {
21163
21194
  show: showImageViewer,
21164
21195
  clear: clearImageViewer
21165
21196
  });
21166
- const classPrefix$H = `adm-image-uploader`;
21197
+ const classPrefix$H = `adm-space`;
21198
+ const defaultProps$y = {
21199
+ direction: "horizontal"
21200
+ };
21201
+ const Space = (p) => {
21202
+ const props = mergeProps(defaultProps$y, p);
21203
+ const {
21204
+ direction,
21205
+ onClick
21206
+ } = props;
21207
+ return withNativeProps(props, React__default.createElement("div", {
21208
+ className: classNames(classPrefix$H, {
21209
+ [`${classPrefix$H}-wrap`]: props.wrap,
21210
+ [`${classPrefix$H}-block`]: props.block,
21211
+ [`${classPrefix$H}-${direction}`]: true,
21212
+ [`${classPrefix$H}-align-${props.align}`]: !!props.align,
21213
+ [`${classPrefix$H}-justify-${props.justify}`]: !!props.justify
21214
+ }),
21215
+ onClick
21216
+ }, React__default.Children.map(props.children, (child) => {
21217
+ return child !== null && child !== void 0 && React__default.createElement("div", {
21218
+ className: `${classPrefix$H}-item`
21219
+ }, child);
21220
+ })));
21221
+ };
21222
+ const classPrefix$G = `adm-image-uploader`;
21167
21223
  const PreviewItem = (props) => {
21168
21224
  const {
21169
21225
  locale
@@ -21193,56 +21249,31 @@ const PreviewItem = (props) => {
21193
21249
  }, [src, file]);
21194
21250
  function renderLoading() {
21195
21251
  return props.status === "pending" && React__default.createElement("div", {
21196
- className: `${classPrefix$H}-cell-mask`
21252
+ className: `${classPrefix$G}-cell-mask`
21197
21253
  }, React__default.createElement("span", {
21198
- className: `${classPrefix$H}-cell-loading`
21254
+ className: `${classPrefix$G}-cell-loading`
21199
21255
  }, React__default.createElement(SpinLoading, {
21200
21256
  color: "white"
21201
21257
  }), React__default.createElement("span", {
21202
- className: `${classPrefix$H}-cell-mask-message`
21258
+ className: `${classPrefix$G}-cell-mask-message`
21203
21259
  }, locale.ImageUploader.uploading)));
21204
21260
  }
21205
21261
  function renderDelete() {
21206
21262
  return deletable && React__default.createElement("span", {
21207
- className: `${classPrefix$H}-cell-delete`,
21263
+ className: `${classPrefix$G}-cell-delete`,
21208
21264
  onClick: onDelete
21209
21265
  }, deleteIcon);
21210
21266
  }
21211
21267
  return React__default.createElement("div", {
21212
- className: classNames(`${classPrefix$H}-cell`, props.status === "fail" && `${classPrefix$H}-cell-fail`)
21268
+ className: classNames(`${classPrefix$G}-cell`, props.status === "fail" && `${classPrefix$G}-cell-fail`)
21213
21269
  }, React__default.createElement(Image$1, {
21214
- className: `${classPrefix$H}-cell-image`,
21270
+ className: `${classPrefix$G}-cell-image`,
21215
21271
  src,
21216
21272
  fit: imageFit,
21217
21273
  onClick: props.onClick
21218
21274
  }), renderLoading(), renderDelete());
21219
21275
  };
21220
21276
  const PreviewItem$1 = PreviewItem;
21221
- const classPrefix$G = `adm-space`;
21222
- const defaultProps$y = {
21223
- direction: "horizontal"
21224
- };
21225
- const Space = (p) => {
21226
- const props = mergeProps(defaultProps$y, p);
21227
- const {
21228
- direction,
21229
- onClick
21230
- } = props;
21231
- return withNativeProps(props, React__default.createElement("div", {
21232
- className: classNames(classPrefix$G, {
21233
- [`${classPrefix$G}-wrap`]: props.wrap,
21234
- [`${classPrefix$G}-block`]: props.block,
21235
- [`${classPrefix$G}-${direction}`]: true,
21236
- [`${classPrefix$G}-align-${props.align}`]: !!props.align,
21237
- [`${classPrefix$G}-justify-${props.justify}`]: !!props.justify
21238
- }),
21239
- onClick
21240
- }, React__default.Children.map(props.children, (child) => {
21241
- return child !== null && child !== void 0 && React__default.createElement("div", {
21242
- className: `${classPrefix$G}-item`
21243
- }, child);
21244
- })));
21245
- };
21246
21277
  const classPrefix$F = `adm-image-uploader`;
21247
21278
  const defaultProps$x = {
21248
21279
  disableUpload: false,
@@ -21378,10 +21409,10 @@ const ImageUploader = forwardRef((p, ref) => {
21378
21409
  return task;
21379
21410
  });
21380
21411
  });
21381
- throw e3;
21412
+ console.error(e3);
21382
21413
  }
21383
- }))).catch((error) => console.error(error));
21384
- setValue((prev) => prev.concat(newVal));
21414
+ })));
21415
+ setValue((prev) => prev.concat(newVal).filter(Boolean));
21385
21416
  });
21386
21417
  }
21387
21418
  const imageViewerHandlerRef = useRef(null);
@@ -22516,7 +22547,8 @@ const defaultProps$o = {
22516
22547
  plain: false,
22517
22548
  error: false,
22518
22549
  seperated: false,
22519
- caret: true
22550
+ caret: true,
22551
+ inputMode: "numeric"
22520
22552
  };
22521
22553
  const PasscodeInput = forwardRef((p, ref) => {
22522
22554
  const props = mergeProps(defaultProps$o, p);
@@ -22611,7 +22643,7 @@ const PasscodeInput = forwardRef((p, ref) => {
22611
22643
  value,
22612
22644
  type: "text",
22613
22645
  pattern: "[0-9]*",
22614
- inputMode: "numeric",
22646
+ inputMode: props.inputMode,
22615
22647
  onChange: (e2) => {
22616
22648
  setValue(e2.target.value.slice(0, props.length));
22617
22649
  },
@@ -25433,12 +25465,14 @@ const SwipeAction = forwardRef((p, ref) => {
25433
25465
  },
25434
25466
  triggerAllEvents: true
25435
25467
  });
25436
- function close() {
25468
+ const close = () => {
25469
+ var _a;
25437
25470
  api.start({
25438
25471
  x: 0
25439
25472
  });
25440
25473
  forceCancelDrag();
25441
- }
25474
+ (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
25475
+ };
25442
25476
  useImperativeHandle(ref, () => ({
25443
25477
  show: (side = "right") => {
25444
25478
  var _a;