antd-mobile 5.12.2 → 5.12.5

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 (122) hide show
  1. package/2x/cjs/components/action-sheet/action-sheet.css +22 -7
  2. package/2x/cjs/components/action-sheet/action-sheet.js +8 -16
  3. package/2x/cjs/components/badge/badge.d.ts +1 -1
  4. package/2x/cjs/components/badge/badge.js +3 -1
  5. package/2x/cjs/components/badge/index.d.ts +1 -1
  6. package/2x/cjs/components/button/button.d.ts +6 -4
  7. package/2x/cjs/components/button/button.js +5 -1
  8. package/2x/cjs/components/calendar/calendar.css +4 -0
  9. package/2x/cjs/components/calendar/calendar.d.ts +1 -0
  10. package/2x/cjs/components/calendar/calendar.js +2 -2
  11. package/2x/cjs/components/form/form-item.js +1 -4
  12. package/2x/cjs/components/image/broken-image-icon.d.ts +1 -0
  13. package/2x/cjs/components/image/broken-image-icon.js +21 -0
  14. package/2x/cjs/components/image/image-icon.d.ts +1 -0
  15. package/2x/cjs/components/image/image-icon.js +21 -0
  16. package/2x/cjs/components/image/image.css +4 -2
  17. package/2x/cjs/components/image/image.d.ts +1 -0
  18. package/2x/cjs/components/image/image.js +10 -6
  19. package/2x/cjs/components/image-uploader/image-uploader.js +1 -4
  20. package/2x/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
  21. package/2x/cjs/components/popover/popover.css +1 -0
  22. package/2x/cjs/components/search-bar/search-bar.d.ts +1 -1
  23. package/2x/cjs/components/search-bar/search-bar.js +3 -0
  24. package/2x/cjs/components/side-bar/side-bar.d.ts +2 -1
  25. package/2x/cjs/components/swiper/index.d.ts +1 -1
  26. package/2x/cjs/components/swiper/swiper.d.ts +1 -1
  27. package/2x/cjs/components/text-area/text-area.js +2 -1
  28. package/2x/cjs/components/toast/toast.css +1 -1
  29. package/2x/cjs/utils/get-scroll-parent.js +1 -1
  30. package/2x/es/components/action-sheet/action-sheet.css +22 -7
  31. package/2x/es/components/action-sheet/action-sheet.js +8 -15
  32. package/2x/es/components/badge/badge.d.ts +1 -1
  33. package/2x/es/components/badge/badge.js +1 -1
  34. package/2x/es/components/badge/index.d.ts +1 -1
  35. package/2x/es/components/button/button.d.ts +6 -4
  36. package/2x/es/components/button/button.js +5 -1
  37. package/2x/es/components/calendar/calendar.css +4 -0
  38. package/2x/es/components/calendar/calendar.d.ts +1 -0
  39. package/2x/es/components/calendar/calendar.js +2 -2
  40. package/2x/es/components/form/form-item.js +1 -4
  41. package/2x/es/components/image/broken-image-icon.d.ts +1 -0
  42. package/2x/es/components/image/broken-image-icon.js +9 -0
  43. package/2x/es/components/image/image-icon.d.ts +1 -0
  44. package/2x/es/components/image/image-icon.js +9 -0
  45. package/2x/es/components/image/image.css +4 -2
  46. package/2x/es/components/image/image.d.ts +1 -0
  47. package/2x/es/components/image/image.js +8 -5
  48. package/2x/es/components/image-uploader/image-uploader.js +2 -5
  49. package/2x/es/components/infinite-scroll/infinite-scroll.js +8 -6
  50. package/2x/es/components/popover/popover.css +1 -0
  51. package/2x/es/components/search-bar/search-bar.d.ts +1 -1
  52. package/2x/es/components/search-bar/search-bar.js +3 -0
  53. package/2x/es/components/side-bar/side-bar.d.ts +2 -1
  54. package/2x/es/components/swiper/index.d.ts +1 -1
  55. package/2x/es/components/swiper/swiper.d.ts +1 -1
  56. package/2x/es/components/text-area/text-area.js +2 -1
  57. package/2x/es/components/toast/toast.css +1 -1
  58. package/2x/es/utils/get-scroll-parent.js +1 -1
  59. package/2x/package.json +5 -5
  60. package/bundle/antd-mobile.cjs.js +193 -177
  61. package/bundle/antd-mobile.es.js +195 -179
  62. package/bundle/style.css +99 -81
  63. package/cjs/components/action-sheet/action-sheet.css +19 -7
  64. package/cjs/components/action-sheet/action-sheet.js +8 -16
  65. package/cjs/components/badge/badge.d.ts +1 -1
  66. package/cjs/components/badge/badge.js +3 -1
  67. package/cjs/components/badge/index.d.ts +1 -1
  68. package/cjs/components/button/button.d.ts +6 -4
  69. package/cjs/components/button/button.js +5 -1
  70. package/cjs/components/calendar/calendar.css +3 -0
  71. package/cjs/components/calendar/calendar.d.ts +1 -0
  72. package/cjs/components/calendar/calendar.js +2 -2
  73. package/cjs/components/form/form-item.js +1 -4
  74. package/cjs/components/image/broken-image-icon.d.ts +1 -0
  75. package/cjs/components/image/broken-image-icon.js +21 -0
  76. package/cjs/components/image/image-icon.d.ts +1 -0
  77. package/cjs/components/image/image-icon.js +21 -0
  78. package/cjs/components/image/image.css +4 -2
  79. package/cjs/components/image/image.d.ts +1 -0
  80. package/cjs/components/image/image.js +10 -6
  81. package/cjs/components/image-uploader/image-uploader.js +1 -4
  82. package/cjs/components/infinite-scroll/infinite-scroll.js +8 -6
  83. package/cjs/components/popover/popover.css +1 -0
  84. package/cjs/components/search-bar/search-bar.d.ts +1 -1
  85. package/cjs/components/search-bar/search-bar.js +3 -0
  86. package/cjs/components/side-bar/side-bar.d.ts +2 -1
  87. package/cjs/components/swiper/index.d.ts +1 -1
  88. package/cjs/components/swiper/swiper.d.ts +1 -1
  89. package/cjs/components/text-area/text-area.js +2 -1
  90. package/cjs/components/toast/toast.css +1 -1
  91. package/cjs/utils/get-scroll-parent.js +1 -1
  92. package/es/components/action-sheet/action-sheet.css +19 -7
  93. package/es/components/action-sheet/action-sheet.js +8 -15
  94. package/es/components/badge/badge.d.ts +1 -1
  95. package/es/components/badge/badge.js +1 -1
  96. package/es/components/badge/index.d.ts +1 -1
  97. package/es/components/button/button.d.ts +6 -4
  98. package/es/components/button/button.js +5 -1
  99. package/es/components/calendar/calendar.css +3 -0
  100. package/es/components/calendar/calendar.d.ts +1 -0
  101. package/es/components/calendar/calendar.js +2 -2
  102. package/es/components/form/form-item.js +1 -4
  103. package/es/components/image/broken-image-icon.d.ts +1 -0
  104. package/es/components/image/broken-image-icon.js +9 -0
  105. package/es/components/image/image-icon.d.ts +1 -0
  106. package/es/components/image/image-icon.js +9 -0
  107. package/es/components/image/image.css +4 -2
  108. package/es/components/image/image.d.ts +1 -0
  109. package/es/components/image/image.js +8 -5
  110. package/es/components/image-uploader/image-uploader.js +2 -5
  111. package/es/components/infinite-scroll/infinite-scroll.js +8 -6
  112. package/es/components/popover/popover.css +1 -0
  113. package/es/components/search-bar/search-bar.d.ts +1 -1
  114. package/es/components/search-bar/search-bar.js +3 -0
  115. package/es/components/side-bar/side-bar.d.ts +2 -1
  116. package/es/components/swiper/index.d.ts +1 -1
  117. package/es/components/swiper/swiper.d.ts +1 -1
  118. package/es/components/text-area/text-area.js +2 -1
  119. package/es/components/toast/toast.css +1 -1
  120. package/es/utils/get-scroll-parent.js +1 -1
  121. package/package.json +5 -5
  122. package/umd/antd-mobile.js +1 -1
@@ -1626,7 +1626,7 @@ function getScrollParent(el2, root2 = defaultRoot) {
1626
1626
  const {
1627
1627
  overflowY
1628
1628
  } = window.getComputedStyle(node);
1629
- if (overflowStylePatterns.includes(overflowY)) {
1629
+ if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
1630
1630
  return node;
1631
1631
  }
1632
1632
  node = node.parentNode;
@@ -9033,127 +9033,11 @@ const Popup = (p2) => {
9033
9033
  }, shouldRender && props.children))));
9034
9034
  return renderToContainer(props.getContainer, node);
9035
9035
  };
9036
- var button = "";
9037
- var dotLoading = "";
9038
- const classPrefix$1e = `adm-dot-loading`;
9039
- const colorRecord$3 = {
9040
- default: "var(--adm-color-weak)",
9041
- primary: "var(--adm-color-primary)",
9042
- white: "var(--adm-color-white)"
9043
- };
9044
- const defaultProps$X = {
9045
- color: "default"
9046
- };
9047
- const DotLoading = React$1.memo((p2) => {
9048
- var _a;
9049
- const props = mergeProps(defaultProps$X, p2);
9050
- return withNativeProps(props, React__default["default"].createElement("div", {
9051
- style: {
9052
- color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
9053
- },
9054
- className: classNames__default["default"]("adm-loading", classPrefix$1e)
9055
- }, React__default["default"].createElement("svg", {
9056
- height: "1em",
9057
- viewBox: "0 0 100 40",
9058
- style: {
9059
- verticalAlign: "-0.125em"
9060
- }
9061
- }, React__default["default"].createElement("g", {
9062
- stroke: "none",
9063
- strokeWidth: "1",
9064
- fill: "none",
9065
- fillRule: "evenodd"
9066
- }, React__default["default"].createElement("g", {
9067
- transform: "translate(-100.000000, -71.000000)"
9068
- }, React__default["default"].createElement("g", {
9069
- transform: "translate(95.000000, 71.000000)"
9070
- }, React__default["default"].createElement("g", {
9071
- transform: "translate(5.000000, 0.000000)"
9072
- }, [0, 1, 2].map((i) => React__default["default"].createElement("rect", {
9073
- key: i,
9074
- fill: "currentColor",
9075
- x: 20 + i * 26,
9076
- y: "16",
9077
- width: "8",
9078
- height: "8",
9079
- rx: "2"
9080
- }, React__default["default"].createElement("animate", {
9081
- attributeName: "y",
9082
- from: "16",
9083
- to: "16",
9084
- dur: "2s",
9085
- begin: `${i * 0.2}s`,
9086
- repeatCount: "indefinite",
9087
- values: "16; 6; 26; 16; 16",
9088
- keyTimes: "0; 0.1; 0.3; 0.4; 1"
9089
- }))))))))));
9090
- });
9091
- function isPromise(obj) {
9092
- return !!obj && typeof obj === "object" && typeof obj.then === "function";
9093
- }
9094
- const classPrefix$1d = `adm-button`;
9095
- const defaultProps$W = {
9096
- color: "default",
9097
- fill: "solid",
9098
- block: false,
9099
- loading: false,
9100
- loadingIcon: React__default["default"].createElement(DotLoading, {
9101
- color: "currentColor"
9102
- }),
9103
- type: "button",
9104
- shape: "default",
9105
- size: "middle"
9106
- };
9107
- const Button = React$1.forwardRef((p2, ref) => {
9108
- const props = mergeProps(defaultProps$W, p2);
9109
- const [innerLoading, setInnerLoading] = React$1.useState(false);
9110
- const nativeButtonRef = React$1.useRef(null);
9111
- const loading = props.loading === "auto" ? innerLoading : props.loading;
9112
- const disabled = props.disabled || loading;
9113
- React$1.useImperativeHandle(ref, () => ({
9114
- get nativeElement() {
9115
- return nativeButtonRef.current;
9116
- }
9117
- }));
9118
- const handleClick = (e) => tslib.__awaiter(void 0, void 0, void 0, function* () {
9119
- if (!props.onClick)
9120
- return;
9121
- const promise = props.onClick(e);
9122
- if (isPromise(promise)) {
9123
- try {
9124
- setInnerLoading(true);
9125
- yield promise;
9126
- setInnerLoading(false);
9127
- } catch (e2) {
9128
- setInnerLoading(false);
9129
- throw e2;
9130
- }
9131
- }
9132
- });
9133
- return withNativeProps(props, React__default["default"].createElement("button", {
9134
- ref: nativeButtonRef,
9135
- type: props.type,
9136
- onClick: handleClick,
9137
- className: classNames__default["default"](classPrefix$1d, props.color ? `${classPrefix$1d}-${props.color}` : null, {
9138
- [`${classPrefix$1d}-block`]: props.block,
9139
- [`${classPrefix$1d}-disabled`]: disabled,
9140
- [`${classPrefix$1d}-fill-outline`]: props.fill === "outline",
9141
- [`${classPrefix$1d}-fill-none`]: props.fill === "none",
9142
- [`${classPrefix$1d}-mini`]: props.size === "mini",
9143
- [`${classPrefix$1d}-small`]: props.size === "small",
9144
- [`${classPrefix$1d}-large`]: props.size === "large",
9145
- [`${classPrefix$1d}-loading`]: loading
9146
- }, `${classPrefix$1d}-shape-${props.shape}`),
9147
- disabled
9148
- }, loading ? React__default["default"].createElement("div", {
9149
- className: `${classPrefix$1d}-loading-wrapper`
9150
- }, props.loadingIcon, props.loadingText) : props.children));
9151
- });
9152
9036
  var safeArea = "";
9153
- const classPrefix$1c = "adm-safe-area";
9037
+ const classPrefix$1e = "adm-safe-area";
9154
9038
  const SafeArea = (props) => {
9155
9039
  return withNativeProps(props, React__default["default"].createElement("div", {
9156
- className: classNames__default["default"](classPrefix$1c, `${classPrefix$1c}-position-${props.position}`)
9040
+ className: classNames__default["default"](classPrefix$1e, `${classPrefix$1e}-position-${props.position}`)
9157
9041
  }));
9158
9042
  };
9159
9043
  const fullClone = Object.assign({}, ReactDOM);
@@ -9269,8 +9153,8 @@ function renderImperatively(element) {
9269
9153
  close
9270
9154
  };
9271
9155
  }
9272
- const classPrefix$1b = `adm-action-sheet`;
9273
- const defaultProps$V = {
9156
+ const classPrefix$1d = `adm-action-sheet`;
9157
+ const defaultProps$X = {
9274
9158
  visible: false,
9275
9159
  actions: [],
9276
9160
  cancelText: "",
@@ -9279,7 +9163,7 @@ const defaultProps$V = {
9279
9163
  safeArea: true
9280
9164
  };
9281
9165
  const ActionSheet = (p2) => {
9282
- const props = mergeProps(defaultProps$V, p2);
9166
+ const props = mergeProps(defaultProps$X, p2);
9283
9167
  return React__default["default"].createElement(Popup, {
9284
9168
  visible: props.visible,
9285
9169
  onMaskClick: () => {
@@ -9290,23 +9174,23 @@ const ActionSheet = (p2) => {
9290
9174
  }
9291
9175
  },
9292
9176
  afterClose: props.afterClose,
9293
- className: classNames__default["default"](`${classPrefix$1b}-popup`, props.popupClassName),
9177
+ className: classNames__default["default"](`${classPrefix$1d}-popup`, props.popupClassName),
9294
9178
  style: props.popupStyle,
9295
9179
  getContainer: props.getContainer
9296
9180
  }, withNativeProps(props, React__default["default"].createElement("div", {
9297
- className: classPrefix$1b
9181
+ className: classPrefix$1d
9298
9182
  }, props.extra && React__default["default"].createElement("div", {
9299
- className: `${classPrefix$1b}-extra`
9183
+ className: `${classPrefix$1d}-extra`
9300
9184
  }, props.extra), React__default["default"].createElement("div", {
9301
- className: `${classPrefix$1b}-button-list`
9185
+ className: `${classPrefix$1d}-button-list`
9302
9186
  }, props.actions.map((action, index2) => React__default["default"].createElement("div", {
9303
9187
  key: action.key,
9304
- className: `${classPrefix$1b}-button-item-wrapper`
9305
- }, React__default["default"].createElement(Button, {
9306
- block: true,
9307
- fill: "none",
9308
- shape: "rectangular",
9309
- disabled: action.disabled,
9188
+ className: `${classPrefix$1d}-button-item-wrapper`
9189
+ }, React__default["default"].createElement("a", {
9190
+ className: classNames__default["default"]("adm-plain-anchor", `${classPrefix$1d}-button-item`, {
9191
+ [`${classPrefix$1d}-button-item-danger`]: action.danger,
9192
+ [`${classPrefix$1d}-button-item-disabled`]: action.disabled
9193
+ }),
9310
9194
  onClick: () => {
9311
9195
  var _a, _b, _c;
9312
9196
  (_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action);
@@ -9314,29 +9198,23 @@ const ActionSheet = (p2) => {
9314
9198
  if (props.closeOnAction) {
9315
9199
  (_c = props.onClose) === null || _c === void 0 ? void 0 : _c.call(props);
9316
9200
  }
9317
- },
9318
- className: classNames__default["default"](`${classPrefix$1b}-button-item`, {
9319
- [`${classPrefix$1b}-button-item-danger`]: action.danger
9320
- })
9201
+ }
9321
9202
  }, React__default["default"].createElement("div", {
9322
- className: `${classPrefix$1b}-button-item-name`
9203
+ className: `${classPrefix$1d}-button-item-name`
9323
9204
  }, action.text), action.description && React__default["default"].createElement("div", {
9324
- className: `${classPrefix$1b}-button-item-description`
9205
+ className: `${classPrefix$1d}-button-item-description`
9325
9206
  }, action.description))))), props.cancelText && React__default["default"].createElement("div", {
9326
- className: `${classPrefix$1b}-cancel`
9207
+ className: `${classPrefix$1d}-cancel`
9327
9208
  }, React__default["default"].createElement("div", {
9328
- className: `${classPrefix$1b}-button-item-wrapper`
9329
- }, React__default["default"].createElement(Button, {
9330
- block: true,
9331
- fill: "none",
9332
- shape: "rectangular",
9333
- className: `${classPrefix$1b}-button-item`,
9209
+ className: `${classPrefix$1d}-button-item-wrapper`
9210
+ }, React__default["default"].createElement("a", {
9211
+ className: classNames__default["default"]("adm-plain-anchor", `${classPrefix$1d}-button-item`),
9334
9212
  onClick: () => {
9335
9213
  var _a;
9336
9214
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
9337
9215
  }
9338
9216
  }, React__default["default"].createElement("div", {
9339
- className: `${classPrefix$1b}-button-item-name`
9217
+ className: `${classPrefix$1d}-button-item-name`
9340
9218
  }, props.cancelText)))), props.safeArea && React__default["default"].createElement(SafeArea, {
9341
9219
  position: "bottom"
9342
9220
  }))));
@@ -9348,12 +9226,12 @@ var index$h = attachPropertiesToComponent(ActionSheet, {
9348
9226
  show: showActionSheet
9349
9227
  });
9350
9228
  var autoCenter = "";
9351
- const classPrefix$1a = "adm-auto-center";
9229
+ const classPrefix$1c = "adm-auto-center";
9352
9230
  const AutoCenter = (props) => {
9353
9231
  return withNativeProps(props, React__default["default"].createElement("div", {
9354
- className: classPrefix$1a
9232
+ className: classPrefix$1c
9355
9233
  }, React__default["default"].createElement("div", {
9356
- className: `${classPrefix$1a}-content`
9234
+ className: `${classPrefix$1c}-content`
9357
9235
  }, props.children)));
9358
9236
  };
9359
9237
  var avatar = "";
@@ -9395,15 +9273,15 @@ const Fallback = React$1.memo(() => React__default["default"].createElement("svg
9395
9273
  fillRule: "nonzero",
9396
9274
  mask: "url(#mask-2)"
9397
9275
  }))))));
9398
- const classPrefix$19 = "adm-avatar";
9399
- const defaultProps$U = {
9276
+ const classPrefix$1b = "adm-avatar";
9277
+ const defaultProps$W = {
9400
9278
  fallback: React__default["default"].createElement(Fallback, null),
9401
9279
  fit: "cover"
9402
9280
  };
9403
9281
  const Avatar = (p2) => {
9404
- const props = mergeProps(defaultProps$U, p2);
9282
+ const props = mergeProps(defaultProps$W, p2);
9405
9283
  return withNativeProps(props, React__default["default"].createElement(Image$1, {
9406
- className: classPrefix$19,
9284
+ className: classPrefix$1b,
9407
9285
  src: props.src,
9408
9286
  fallback: props.fallback,
9409
9287
  placeholder: props.fallback,
@@ -9415,8 +9293,8 @@ const Avatar = (p2) => {
9415
9293
  }));
9416
9294
  };
9417
9295
  var badge = "";
9418
- const classPrefix$18 = `adm-badge`;
9419
- const dot = Symbol();
9296
+ const classPrefix$1a = `adm-badge`;
9297
+ const dot = React__default["default"].createElement(React__default["default"].Fragment, null);
9420
9298
  const Badge$1 = (props) => {
9421
9299
  const {
9422
9300
  content,
@@ -9424,22 +9302,142 @@ const Badge$1 = (props) => {
9424
9302
  children
9425
9303
  } = props;
9426
9304
  const isDot = content === dot;
9427
- const badgeCls = classNames__default["default"](classPrefix$18, !!children && `${classPrefix$18}-fixed`, isDot && `${classPrefix$18}-dot`, props.bordered && `${classPrefix$18}-bordered`);
9305
+ const badgeCls = classNames__default["default"](classPrefix$1a, !!children && `${classPrefix$1a}-fixed`, isDot && `${classPrefix$1a}-dot`, props.bordered && `${classPrefix$1a}-bordered`);
9428
9306
  const element = content || content === 0 ? withNativeProps(props, React__default["default"].createElement("div", {
9429
9307
  className: badgeCls,
9430
9308
  style: {
9431
9309
  "--color": color
9432
9310
  }
9433
9311
  }, !isDot && React__default["default"].createElement("div", {
9434
- className: `${classPrefix$18}-content`
9312
+ className: `${classPrefix$1a}-content`
9435
9313
  }, content))) : null;
9436
9314
  return children ? React__default["default"].createElement("div", {
9437
- className: `${classPrefix$18}-wrap`
9315
+ className: `${classPrefix$1a}-wrap`
9438
9316
  }, children, element) : element;
9439
9317
  };
9440
9318
  var Badge = attachPropertiesToComponent(Badge$1, {
9441
9319
  dot
9442
9320
  });
9321
+ var button = "";
9322
+ var dotLoading = "";
9323
+ const classPrefix$19 = `adm-dot-loading`;
9324
+ const colorRecord$3 = {
9325
+ default: "var(--adm-color-weak)",
9326
+ primary: "var(--adm-color-primary)",
9327
+ white: "var(--adm-color-white)"
9328
+ };
9329
+ const defaultProps$V = {
9330
+ color: "default"
9331
+ };
9332
+ const DotLoading = React$1.memo((p2) => {
9333
+ var _a;
9334
+ const props = mergeProps(defaultProps$V, p2);
9335
+ return withNativeProps(props, React__default["default"].createElement("div", {
9336
+ style: {
9337
+ color: (_a = colorRecord$3[props.color]) !== null && _a !== void 0 ? _a : props.color
9338
+ },
9339
+ className: classNames__default["default"]("adm-loading", classPrefix$19)
9340
+ }, React__default["default"].createElement("svg", {
9341
+ height: "1em",
9342
+ viewBox: "0 0 100 40",
9343
+ style: {
9344
+ verticalAlign: "-0.125em"
9345
+ }
9346
+ }, React__default["default"].createElement("g", {
9347
+ stroke: "none",
9348
+ strokeWidth: "1",
9349
+ fill: "none",
9350
+ fillRule: "evenodd"
9351
+ }, React__default["default"].createElement("g", {
9352
+ transform: "translate(-100.000000, -71.000000)"
9353
+ }, React__default["default"].createElement("g", {
9354
+ transform: "translate(95.000000, 71.000000)"
9355
+ }, React__default["default"].createElement("g", {
9356
+ transform: "translate(5.000000, 0.000000)"
9357
+ }, [0, 1, 2].map((i) => React__default["default"].createElement("rect", {
9358
+ key: i,
9359
+ fill: "currentColor",
9360
+ x: 20 + i * 26,
9361
+ y: "16",
9362
+ width: "8",
9363
+ height: "8",
9364
+ rx: "2"
9365
+ }, React__default["default"].createElement("animate", {
9366
+ attributeName: "y",
9367
+ from: "16",
9368
+ to: "16",
9369
+ dur: "2s",
9370
+ begin: `${i * 0.2}s`,
9371
+ repeatCount: "indefinite",
9372
+ values: "16; 6; 26; 16; 16",
9373
+ keyTimes: "0; 0.1; 0.3; 0.4; 1"
9374
+ }))))))))));
9375
+ });
9376
+ function isPromise(obj) {
9377
+ return !!obj && typeof obj === "object" && typeof obj.then === "function";
9378
+ }
9379
+ const classPrefix$18 = `adm-button`;
9380
+ const defaultProps$U = {
9381
+ color: "default",
9382
+ fill: "solid",
9383
+ block: false,
9384
+ loading: false,
9385
+ loadingIcon: React__default["default"].createElement(DotLoading, {
9386
+ color: "currentColor"
9387
+ }),
9388
+ type: "button",
9389
+ shape: "default",
9390
+ size: "middle"
9391
+ };
9392
+ const Button = React$1.forwardRef((p2, ref) => {
9393
+ const props = mergeProps(defaultProps$U, p2);
9394
+ const [innerLoading, setInnerLoading] = React$1.useState(false);
9395
+ const nativeButtonRef = React$1.useRef(null);
9396
+ const loading = props.loading === "auto" ? innerLoading : props.loading;
9397
+ const disabled = props.disabled || loading;
9398
+ React$1.useImperativeHandle(ref, () => ({
9399
+ get nativeElement() {
9400
+ return nativeButtonRef.current;
9401
+ }
9402
+ }));
9403
+ const handleClick = (e) => tslib.__awaiter(void 0, void 0, void 0, function* () {
9404
+ if (!props.onClick)
9405
+ return;
9406
+ const promise = props.onClick(e);
9407
+ if (isPromise(promise)) {
9408
+ try {
9409
+ setInnerLoading(true);
9410
+ yield promise;
9411
+ setInnerLoading(false);
9412
+ } catch (e2) {
9413
+ setInnerLoading(false);
9414
+ throw e2;
9415
+ }
9416
+ }
9417
+ });
9418
+ return withNativeProps(props, React__default["default"].createElement("button", {
9419
+ ref: nativeButtonRef,
9420
+ type: props.type,
9421
+ onClick: handleClick,
9422
+ className: classNames__default["default"](classPrefix$18, props.color ? `${classPrefix$18}-${props.color}` : null, {
9423
+ [`${classPrefix$18}-block`]: props.block,
9424
+ [`${classPrefix$18}-disabled`]: disabled,
9425
+ [`${classPrefix$18}-fill-outline`]: props.fill === "outline",
9426
+ [`${classPrefix$18}-fill-none`]: props.fill === "none",
9427
+ [`${classPrefix$18}-mini`]: props.size === "mini",
9428
+ [`${classPrefix$18}-small`]: props.size === "small",
9429
+ [`${classPrefix$18}-large`]: props.size === "large",
9430
+ [`${classPrefix$18}-loading`]: loading
9431
+ }, `${classPrefix$18}-shape-${props.shape}`),
9432
+ disabled,
9433
+ onMouseDown: props.onMouseDown,
9434
+ onMouseUp: props.onMouseUp,
9435
+ onTouchStart: props.onTouchStart,
9436
+ onTouchEnd: props.onTouchEnd
9437
+ }, loading ? React__default["default"].createElement("div", {
9438
+ className: `${classPrefix$18}-loading-wrapper`
9439
+ }, props.loadingIcon, props.loadingText) : props.children));
9440
+ });
9443
9441
  var calendar = "";
9444
9442
  const ArrowLeft = () => {
9445
9443
  return React__default["default"].createElement("svg", {
@@ -9661,10 +9659,10 @@ const Calendar = React$1.forwardRef((p2, ref) => {
9661
9659
  isSelect = isBegin || isEnd || d.isAfter(begin, "day") && d.isBefore(end, "day");
9662
9660
  }
9663
9661
  const inThisMonth = d.month() === current.month();
9664
- const disabled = !inThisMonth || maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
9662
+ const disabled = props.shouldDisableDate ? props.shouldDisableDate(d.toDate()) : maxDay && d.isAfter(maxDay, "day") || minDay && d.isBefore(minDay, "day");
9665
9663
  cells.push(React__default["default"].createElement("div", {
9666
9664
  key: d.valueOf(),
9667
- className: classNames__default["default"](`${classPrefix$17}-cell`, disabled && `${classPrefix$17}-cell-disabled`, inThisMonth && {
9665
+ className: classNames__default["default"](`${classPrefix$17}-cell`, (disabled || !inThisMonth) && `${classPrefix$17}-cell-disabled`, inThisMonth && {
9668
9666
  [`${classPrefix$17}-cell-today`]: d.isSame(today, "day"),
9669
9667
  [`${classPrefix$17}-cell-selected`]: isSelect,
9670
9668
  [`${classPrefix$17}-cell-selected-begin`]: isBegin,
@@ -12263,16 +12261,33 @@ const LazyDetector = (props) => {
12263
12261
  ref
12264
12262
  });
12265
12263
  };
12264
+ const ImageIcon = () => React__default["default"].createElement("svg", {
12265
+ viewBox: "0 0 48 48",
12266
+ xmlns: "http://www.w3.org/2000/svg"
12267
+ }, React__default["default"].createElement("path", {
12268
+ d: "M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z",
12269
+ fill: "#DBDBDB",
12270
+ fillRule: "nonzero"
12271
+ }));
12272
+ const BrokenImageIcon = () => React__default["default"].createElement("svg", {
12273
+ viewBox: "0 0 48 48",
12274
+ xmlns: "http://www.w3.org/2000/svg"
12275
+ }, React__default["default"].createElement("path", {
12276
+ d: "M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z",
12277
+ fill: "#DBDBDB",
12278
+ fillRule: "nonzero"
12279
+ }));
12266
12280
  const classPrefix$S = `adm-image`;
12267
12281
  const defaultProps$H = {
12268
12282
  fit: "fill",
12269
12283
  placeholder: React__default["default"].createElement("div", {
12270
12284
  className: `${classPrefix$S}-tip`
12271
- }, React__default["default"].createElement(antdMobileIcons.PictureOutline, null)),
12285
+ }, React__default["default"].createElement(ImageIcon, null)),
12272
12286
  fallback: React__default["default"].createElement("div", {
12273
12287
  className: `${classPrefix$S}-tip`
12274
- }, React__default["default"].createElement(antdMobileIcons.PictureWrongOutline, null)),
12275
- lazy: false
12288
+ }, React__default["default"].createElement(BrokenImageIcon, null)),
12289
+ lazy: false,
12290
+ draggable: false
12276
12291
  };
12277
12292
  const Image$1 = stagedComponents.staged((p2) => {
12278
12293
  const props = mergeProps(defaultProps$H, p2);
@@ -12317,7 +12332,8 @@ const Image$1 = stagedComponents.staged((p2) => {
12317
12332
  referrerPolicy: props.referrerPolicy,
12318
12333
  sizes: props.sizes,
12319
12334
  srcSet,
12320
- useMap: props.useMap
12335
+ useMap: props.useMap,
12336
+ draggable: props.draggable
12321
12337
  });
12322
12338
  return React__default["default"].createElement(React__default["default"].Fragment, null, !loaded && props.placeholder, img);
12323
12339
  }
@@ -14326,9 +14342,7 @@ const FormItem = (props) => {
14326
14342
  return renderLayout(children);
14327
14343
  }
14328
14344
  let Variables = {};
14329
- if (typeof label === "string") {
14330
- Variables.label = label;
14331
- }
14345
+ Variables.label = typeof label === "string" ? label : "";
14332
14346
  if (messageVariables) {
14333
14347
  Variables = Object.assign(Object.assign({}, Variables), messageVariables);
14334
14348
  }
@@ -14923,9 +14937,6 @@ const ImageUploader = (p2) => {
14923
14937
  } = useConfig();
14924
14938
  const props = mergeProps(defaultProps$t, p2);
14925
14939
  const [value, setValue] = usePropsValue(props);
14926
- const updateValue = ahooks.useMemoizedFn((updater) => {
14927
- setValue(updater(value));
14928
- });
14929
14940
  const [tasks, setTasks] = React$1.useState([]);
14930
14941
  ahooks.useIsomorphicLayoutEffect(() => {
14931
14942
  setTasks((prev) => prev.filter((task) => {
@@ -14997,7 +15008,7 @@ const ImageUploader = (p2) => {
14997
15008
  return task;
14998
15009
  });
14999
15010
  });
15000
- updateValue((prev) => {
15011
+ setValue((prev) => {
15001
15012
  const newVal = Object.assign({}, result2);
15002
15013
  return [...prev, newVal];
15003
15014
  });
@@ -15276,6 +15287,7 @@ const InfiniteScroll = (p2) => {
15276
15287
  const elementRef = React$1.useRef(null);
15277
15288
  const [flag, setFlag] = React$1.useState({});
15278
15289
  const nextFlagRef = React$1.useRef(flag);
15290
+ const [scrollParent, setScrollParent] = React$1.useState();
15279
15291
  const check = ahooks.useMemoizedFn(() => tslib.__awaiter(void 0, void 0, void 0, function* () {
15280
15292
  if (nextFlagRef.current !== flag)
15281
15293
  return;
@@ -15287,6 +15299,7 @@ const InfiniteScroll = (p2) => {
15287
15299
  if (!element.offsetParent)
15288
15300
  return;
15289
15301
  const parent = getScrollParent(element);
15302
+ setScrollParent(parent);
15290
15303
  if (!parent)
15291
15304
  return;
15292
15305
  const rect = element.getBoundingClientRect();
@@ -15306,17 +15319,16 @@ const InfiniteScroll = (p2) => {
15306
15319
  const element = elementRef.current;
15307
15320
  if (!element)
15308
15321
  return;
15309
- const parent = getScrollParent(element);
15310
- if (!parent)
15322
+ if (!scrollParent)
15311
15323
  return;
15312
15324
  function onScroll() {
15313
15325
  check();
15314
15326
  }
15315
- parent.addEventListener("scroll", onScroll);
15327
+ scrollParent.addEventListener("scroll", onScroll);
15316
15328
  return () => {
15317
- parent.removeEventListener("scroll", onScroll);
15329
+ scrollParent.removeEventListener("scroll", onScroll);
15318
15330
  };
15319
- }, []);
15331
+ }, [scrollParent]);
15320
15332
  return withNativeProps(props, React__default["default"].createElement("div", {
15321
15333
  className: classPrefix$w,
15322
15334
  ref: elementRef
@@ -16580,6 +16592,9 @@ const SearchBar = React$1.forwardRef((p2, ref) => {
16580
16592
  }
16581
16593
  (_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
16582
16594
  (_c = props.onCancel) === null || _c === void 0 ? void 0 : _c.call(props);
16595
+ },
16596
+ onMouseDown: (e) => {
16597
+ e.preventDefault();
16583
16598
  }
16584
16599
  }, props.cancelText));
16585
16600
  };
@@ -17996,7 +18011,8 @@ const TextArea = React$1.forwardRef((p2, ref) => {
17996
18011
  var _a;
17997
18012
  compositingRef.current = false;
17998
18013
  if (maxLength) {
17999
- setValue([...value].slice(0, maxLength).join(""));
18014
+ const v = e.target.value;
18015
+ setValue([...v].slice(0, maxLength).join(""));
18000
18016
  }
18001
18017
  (_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
18002
18018
  },