antd-mobile 5.30.0 → 5.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/2x/README.md +1 -1
  2. package/2x/bundle/antd-mobile.cjs.development.js +283 -234
  3. package/2x/bundle/antd-mobile.cjs.js +9 -9
  4. package/2x/bundle/antd-mobile.es.development.js +283 -234
  5. package/2x/bundle/antd-mobile.es.js +4172 -4128
  6. package/2x/bundle/antd-mobile.umd.development.js +283 -234
  7. package/2x/bundle/antd-mobile.umd.js +9 -9
  8. package/2x/bundle/style.css +2 -0
  9. package/2x/cjs/components/avatar/avatar.js +1 -1
  10. package/2x/cjs/components/button/button.d.ts +2 -2
  11. package/2x/cjs/components/cascader/cascader.js +1 -6
  12. package/2x/cjs/components/cascader-view/cascader-view.d.ts +1 -0
  13. package/2x/cjs/components/cascader-view/cascader-view.js +2 -1
  14. package/2x/cjs/components/date-picker/date-picker.d.ts +1 -1
  15. package/2x/cjs/components/date-picker/index.d.ts +1 -1
  16. package/2x/cjs/components/ellipsis/ellipsis.d.ts +2 -2
  17. package/2x/cjs/components/ellipsis/ellipsis.js +17 -17
  18. package/2x/cjs/components/form/form-subscribe.js +1 -1
  19. package/2x/cjs/components/image/image.d.ts +1 -1
  20. package/2x/cjs/components/image/image.js +1 -0
  21. package/2x/cjs/components/input/input.d.ts +2 -4
  22. package/2x/cjs/components/list/list-item.d.ts +1 -1
  23. package/2x/cjs/components/notice-bar/notice-bar.css +2 -0
  24. package/2x/cjs/components/notice-bar/notice-bar.d.ts +2 -0
  25. package/2x/cjs/components/notice-bar/notice-bar.js +2 -1
  26. package/2x/cjs/components/popup/popup.d.ts +1 -0
  27. package/2x/cjs/components/popup/popup.js +2 -0
  28. package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +4 -2
  29. package/2x/cjs/components/slider/slider.js +6 -4
  30. package/2x/cjs/components/swiper/swiper.js +16 -12
  31. package/2x/cjs/components/text-area/text-area.d.ts +1 -1
  32. package/2x/cjs/utils/reduce-and-restore-motion.js +1 -1
  33. package/2x/es/components/avatar/avatar.js +1 -1
  34. package/2x/es/components/button/button.d.ts +2 -2
  35. package/2x/es/components/cascader/cascader.js +1 -6
  36. package/2x/es/components/cascader-view/cascader-view.d.ts +1 -0
  37. package/2x/es/components/cascader-view/cascader-view.js +2 -1
  38. package/2x/es/components/date-picker/date-picker.d.ts +1 -1
  39. package/2x/es/components/date-picker/index.d.ts +1 -1
  40. package/2x/es/components/ellipsis/ellipsis.d.ts +2 -2
  41. package/2x/es/components/ellipsis/ellipsis.js +17 -17
  42. package/2x/es/components/form/form-subscribe.js +1 -1
  43. package/2x/es/components/image/image.d.ts +1 -1
  44. package/2x/es/components/image/image.js +1 -0
  45. package/2x/es/components/input/input.d.ts +2 -4
  46. package/2x/es/components/list/list-item.d.ts +1 -1
  47. package/2x/es/components/notice-bar/notice-bar.css +2 -0
  48. package/2x/es/components/notice-bar/notice-bar.d.ts +2 -0
  49. package/2x/es/components/notice-bar/notice-bar.js +2 -1
  50. package/2x/es/components/popup/popup.d.ts +1 -0
  51. package/2x/es/components/popup/popup.js +2 -0
  52. package/2x/es/components/pull-to-refresh/pull-to-refresh.js +4 -2
  53. package/2x/es/components/slider/slider.js +6 -4
  54. package/2x/es/components/swiper/swiper.js +17 -13
  55. package/2x/es/components/text-area/text-area.d.ts +1 -1
  56. package/2x/es/utils/reduce-and-restore-motion.js +1 -1
  57. package/2x/package.json +2 -2
  58. package/README.md +1 -1
  59. package/bundle/antd-mobile.cjs.development.js +283 -234
  60. package/bundle/antd-mobile.cjs.js +9 -9
  61. package/bundle/antd-mobile.compatible.umd.js +1 -1
  62. package/bundle/antd-mobile.es.development.js +283 -234
  63. package/bundle/antd-mobile.es.js +4172 -4128
  64. package/bundle/antd-mobile.umd.development.js +283 -234
  65. package/bundle/antd-mobile.umd.js +9 -9
  66. package/bundle/style.css +1 -1
  67. package/cjs/components/avatar/avatar.js +1 -1
  68. package/cjs/components/button/button.d.ts +2 -2
  69. package/cjs/components/cascader/cascader.js +1 -6
  70. package/cjs/components/cascader-view/cascader-view.d.ts +1 -0
  71. package/cjs/components/cascader-view/cascader-view.js +2 -1
  72. package/cjs/components/date-picker/date-picker.d.ts +1 -1
  73. package/cjs/components/date-picker/index.d.ts +1 -1
  74. package/cjs/components/ellipsis/ellipsis.d.ts +2 -2
  75. package/cjs/components/ellipsis/ellipsis.js +17 -17
  76. package/cjs/components/form/form-subscribe.js +1 -1
  77. package/cjs/components/image/image.d.ts +1 -1
  78. package/cjs/components/image/image.js +1 -0
  79. package/cjs/components/input/input.d.ts +2 -4
  80. package/cjs/components/list/list-item.d.ts +1 -1
  81. package/cjs/components/notice-bar/notice-bar.css +2 -0
  82. package/cjs/components/notice-bar/notice-bar.d.ts +2 -0
  83. package/cjs/components/notice-bar/notice-bar.js +2 -1
  84. package/cjs/components/popup/popup.d.ts +1 -0
  85. package/cjs/components/popup/popup.js +2 -0
  86. package/cjs/components/pull-to-refresh/pull-to-refresh.js +4 -2
  87. package/cjs/components/slider/slider.js +6 -4
  88. package/cjs/components/swiper/swiper.js +16 -12
  89. package/cjs/components/text-area/text-area.d.ts +1 -1
  90. package/cjs/utils/reduce-and-restore-motion.js +1 -1
  91. package/es/components/avatar/avatar.js +1 -1
  92. package/es/components/button/button.d.ts +2 -2
  93. package/es/components/cascader/cascader.js +1 -6
  94. package/es/components/cascader-view/cascader-view.d.ts +1 -0
  95. package/es/components/cascader-view/cascader-view.js +2 -1
  96. package/es/components/date-picker/date-picker.d.ts +1 -1
  97. package/es/components/date-picker/index.d.ts +1 -1
  98. package/es/components/ellipsis/ellipsis.d.ts +2 -2
  99. package/es/components/ellipsis/ellipsis.js +17 -17
  100. package/es/components/form/form-subscribe.js +1 -1
  101. package/es/components/image/image.d.ts +1 -1
  102. package/es/components/image/image.js +1 -0
  103. package/es/components/input/input.d.ts +2 -4
  104. package/es/components/list/list-item.d.ts +1 -1
  105. package/es/components/notice-bar/notice-bar.css +2 -0
  106. package/es/components/notice-bar/notice-bar.d.ts +2 -0
  107. package/es/components/notice-bar/notice-bar.js +2 -1
  108. package/es/components/popup/popup.d.ts +1 -0
  109. package/es/components/popup/popup.js +2 -0
  110. package/es/components/pull-to-refresh/pull-to-refresh.js +4 -2
  111. package/es/components/slider/slider.js +6 -4
  112. package/es/components/swiper/swiper.js +17 -13
  113. package/es/components/text-area/text-area.d.ts +1 -1
  114. package/es/utils/reduce-and-restore-motion.js +1 -1
  115. package/package.json +2 -2
  116. package/umd/antd-mobile.js +1 -1
@@ -502,7 +502,7 @@ function attachPropertiesToComponent(component, properties) {
502
502
  return ret;
503
503
  }
504
504
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
505
- var _classnames_2_3_2_classnames = { exports: {} };
505
+ var classnames = { exports: {} };
506
506
  /*!
507
507
  Copyright (c) 2018 Jed Watson.
508
508
  Licensed under the MIT License (MIT), see
@@ -548,8 +548,8 @@ var _classnames_2_3_2_classnames = { exports: {} };
548
548
  window.classNames = classNames2;
549
549
  }
550
550
  })();
551
- })(_classnames_2_3_2_classnames);
552
- const classNames = _classnames_2_3_2_classnames.exports;
551
+ })(classnames);
552
+ const classNames = classnames.exports;
553
553
  function withNativeProps(props, element) {
554
554
  const p = Object.assign({}, element.props);
555
555
  if (props.className) {
@@ -2210,6 +2210,15 @@ function isEqual$1(value, other) {
2210
2210
  return baseIsEqual(value, other);
2211
2211
  }
2212
2212
  var isEqual_1 = isEqual$1;
2213
+ function useGetState(initialState) {
2214
+ var _a = __read(useState$1(initialState), 2), state = _a[0], setState = _a[1];
2215
+ var stateRef = useRef(state);
2216
+ stateRef.current = state;
2217
+ var getState = useCallback(function() {
2218
+ return stateRef.current;
2219
+ }, []);
2220
+ return [state, setState, getState];
2221
+ }
2213
2222
  (function() {
2214
2223
  if (typeof window !== "object") {
2215
2224
  return;
@@ -2833,27 +2842,6 @@ function useRafState(initialState) {
2833
2842
  });
2834
2843
  return [state, setRafState];
2835
2844
  }
2836
- var overArg = _overArg;
2837
- var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
2838
- var _getPrototype = getPrototype$2;
2839
- var baseGetTag = _baseGetTag, getPrototype$1 = _getPrototype, isObjectLike$1 = isObjectLike_1;
2840
- var objectTag = "[object Object]";
2841
- var funcProto = Function.prototype, objectProto$1 = Object.prototype;
2842
- var funcToString = funcProto.toString;
2843
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
2844
- var objectCtorString = funcToString.call(Object);
2845
- function isPlainObject$1(value) {
2846
- if (!isObjectLike$1(value) || baseGetTag(value) != objectTag) {
2847
- return false;
2848
- }
2849
- var proto = getPrototype$1(value);
2850
- if (proto === null) {
2851
- return true;
2852
- }
2853
- var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
2854
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
2855
- }
2856
- var isPlainObject_1 = isPlainObject$1;
2857
2845
  var useUnmountedRef = function() {
2858
2846
  var unmountedRef = useRef(false);
2859
2847
  useEffect(function() {
@@ -9308,6 +9296,7 @@ function createUseGesture(actions) {
9308
9296
  }
9309
9297
  const classPrefix$1k = `adm-popup`;
9310
9298
  const defaultProps$12 = Object.assign(Object.assign({}, defaultPopupBaseProps), {
9299
+ closeOnSwipe: false,
9311
9300
  position: "bottom"
9312
9301
  });
9313
9302
  const Popup$1 = (p) => {
@@ -9351,6 +9340,8 @@ const Popup$1 = (p) => {
9351
9340
  swipe: [, swipeY]
9352
9341
  }) => {
9353
9342
  var _a;
9343
+ if (!props.closeOnSwipe)
9344
+ return;
9354
9345
  if (swipeY === 1 && props.position === "bottom" || swipeY === -1 && props.position === "top") {
9355
9346
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
9356
9347
  }
@@ -9646,13 +9637,51 @@ const AutoCenter$1 = (props) => {
9646
9637
  };
9647
9638
  const AutoCenter = AutoCenter$1;
9648
9639
  const avatar = "";
9640
+ const Fallback = memo(() => React__default.createElement("svg", {
9641
+ className: "adm-avatar-fallback",
9642
+ width: "88px",
9643
+ height: "88px",
9644
+ viewBox: "0 0 88 88",
9645
+ version: "1.1"
9646
+ }, React__default.createElement("title", null, "\u7F16\u7EC4 3"), React__default.createElement("defs", null, React__default.createElement("polygon", {
9647
+ id: "path-1",
9648
+ points: "0 0 88 0 88 88 0 88"
9649
+ })), React__default.createElement("g", {
9650
+ id: "\u9875\u9762-1",
9651
+ stroke: "none",
9652
+ strokeWidth: "1",
9653
+ fill: "none",
9654
+ fillRule: "evenodd"
9655
+ }, React__default.createElement("g", {
9656
+ id: "\u8BED\u96C0",
9657
+ transform: "translate(-495.000000, -71.000000)"
9658
+ }, React__default.createElement("g", {
9659
+ id: "\u7F16\u7EC4-3",
9660
+ transform: "translate(495.000000, 71.000000)"
9661
+ }, React__default.createElement("mask", {
9662
+ id: "mask-2",
9663
+ fill: "white"
9664
+ }, React__default.createElement("use", {
9665
+ xlinkHref: "#path-1"
9666
+ })), React__default.createElement("use", {
9667
+ id: "Mask",
9668
+ fill: "#EEEEEE",
9669
+ fillRule: "nonzero",
9670
+ xlinkHref: "#path-1"
9671
+ }), React__default.createElement("path", {
9672
+ d: "M44.5707528,16 L43.4292117,16 L42.9575197,16.0086403 L42.9575195,16.0086403 C36.5215787,16.2615464 31.4341803,21.5678078 31.4344832,28.0273864 L31.4344832,34.7776551 L31.4495601,35.3716788 L31.4495593,35.3716628 C31.599687,38.5368723 32.9422041,41.5269327 35.2058513,43.7376716 L38.2147759,46.6775505 L38.4086219,46.8913989 C38.7747759,47.3385365 38.9750835,47.9001589 38.9750835,48.4833848 L38.9750835,48.8938006 L38.9556989,49.1897326 L38.9556989,49.1897325 C38.8577746,49.9812662 38.3754713,50.67284 37.667703,51.036605 L18.7375269,60.7440265 L18.4101421,60.9276334 L18.4101423,60.9276333 C16.9141658,61.8418636 16.0009389,63.4714674 16,65.2283758 L16,66.070809 L16.0129231,66.3948217 C16.1766149,68.4123376 17.860922,70 19.91569,70 L68.0843101,70 L68.08431,70 C70.2460467,70 71.9988087,68.243122 72,66.0751224 L72,65.2326893 C72,63.3382982 70.9446194,61.6037466 69.2624598,60.7440295 L50.3322837,51.036608 L50.3322835,51.0366079 C49.5291218,50.6249082 49.0240448,49.7962466 49.024903,48.8916436 L49.024903,48.4812278 C49.024903,47.8029608 49.3005955,47.1527756 49.7852106,46.6775603 L52.7941352,43.7376813 L52.7941354,43.7376811 C55.204308,41.3832325 56.5636029,38.151975 56.5633606,34.7776456 L56.5633606,28.0273769 L56.5633606,28.0273774 C56.5633606,21.3848531 51.1940878,16 44.5707524,16 L44.5707528,16 Z",
9673
+ id: "\u5F62\u72B6",
9674
+ fill: "#CCCCCC",
9675
+ fillRule: "nonzero",
9676
+ mask: "url(#mask-2)"
9677
+ }))))));
9649
9678
  const image = "";
9650
- var _stagedComponents_1_1_3_stagedComponents = {};
9679
+ var stagedComponents = {};
9651
9680
  var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
9652
9681
  return mod && mod.__esModule ? mod : { "default": mod };
9653
9682
  };
9654
- Object.defineProperty(_stagedComponents_1_1_3_stagedComponents, "__esModule", { value: true });
9655
- var staged_1 = _stagedComponents_1_1_3_stagedComponents.staged = void 0;
9683
+ Object.defineProperty(stagedComponents, "__esModule", { value: true });
9684
+ var staged_1 = stagedComponents.staged = void 0;
9656
9685
  const react_1 = __importDefault(React__default);
9657
9686
  function processNext(next) {
9658
9687
  if (typeof next === "function") {
@@ -9671,7 +9700,7 @@ function staged(stage) {
9671
9700
  return processNext(next);
9672
9701
  };
9673
9702
  }
9674
- staged_1 = _stagedComponents_1_1_3_stagedComponents.staged = staged;
9703
+ staged_1 = stagedComponents.staged = staged;
9675
9704
  function toCSSLength(val) {
9676
9705
  return typeof val === "number" ? `${val}px` : val;
9677
9706
  }
@@ -9743,6 +9772,7 @@ const Image$2 = staged_1((p) => {
9743
9772
  }
9744
9773
  const img = React__default.createElement("img", {
9745
9774
  ref: imgRef,
9775
+ id: props.id,
9746
9776
  className: `${classPrefix$1g}-img`,
9747
9777
  src,
9748
9778
  alt: props.alt,
@@ -9793,44 +9823,6 @@ const Image$2 = staged_1((p) => {
9793
9823
  }), renderInner()));
9794
9824
  });
9795
9825
  const Image$1 = Image$2;
9796
- const Fallback = memo(() => React__default.createElement("svg", {
9797
- className: "adm-avatar-fallback",
9798
- width: "88px",
9799
- height: "88px",
9800
- viewBox: "0 0 88 88",
9801
- version: "1.1"
9802
- }, React__default.createElement("title", null, "\u7F16\u7EC4 3"), React__default.createElement("defs", null, React__default.createElement("polygon", {
9803
- id: "path-1",
9804
- points: "0 0 88 0 88 88 0 88"
9805
- })), React__default.createElement("g", {
9806
- id: "\u9875\u9762-1",
9807
- stroke: "none",
9808
- strokeWidth: "1",
9809
- fill: "none",
9810
- fillRule: "evenodd"
9811
- }, React__default.createElement("g", {
9812
- id: "\u8BED\u96C0",
9813
- transform: "translate(-495.000000, -71.000000)"
9814
- }, React__default.createElement("g", {
9815
- id: "\u7F16\u7EC4-3",
9816
- transform: "translate(495.000000, 71.000000)"
9817
- }, React__default.createElement("mask", {
9818
- id: "mask-2",
9819
- fill: "white"
9820
- }, React__default.createElement("use", {
9821
- xlinkHref: "#path-1"
9822
- })), React__default.createElement("use", {
9823
- id: "Mask",
9824
- fill: "#EEEEEE",
9825
- fillRule: "nonzero",
9826
- xlinkHref: "#path-1"
9827
- }), React__default.createElement("path", {
9828
- d: "M44.5707528,16 L43.4292117,16 L42.9575197,16.0086403 L42.9575195,16.0086403 C36.5215787,16.2615464 31.4341803,21.5678078 31.4344832,28.0273864 L31.4344832,34.7776551 L31.4495601,35.3716788 L31.4495593,35.3716628 C31.599687,38.5368723 32.9422041,41.5269327 35.2058513,43.7376716 L38.2147759,46.6775505 L38.4086219,46.8913989 C38.7747759,47.3385365 38.9750835,47.9001589 38.9750835,48.4833848 L38.9750835,48.8938006 L38.9556989,49.1897326 L38.9556989,49.1897325 C38.8577746,49.9812662 38.3754713,50.67284 37.667703,51.036605 L18.7375269,60.7440265 L18.4101421,60.9276334 L18.4101423,60.9276333 C16.9141658,61.8418636 16.0009389,63.4714674 16,65.2283758 L16,66.070809 L16.0129231,66.3948217 C16.1766149,68.4123376 17.860922,70 19.91569,70 L68.0843101,70 L68.08431,70 C70.2460467,70 71.9988087,68.243122 72,66.0751224 L72,65.2326893 C72,63.3382982 70.9446194,61.6037466 69.2624598,60.7440295 L50.3322837,51.036608 L50.3322835,51.0366079 C49.5291218,50.6249082 49.0240448,49.7962466 49.024903,48.8916436 L49.024903,48.4812278 C49.024903,47.8029608 49.3005955,47.1527756 49.7852106,46.6775603 L52.7941352,43.7376813 L52.7941354,43.7376811 C55.204308,41.3832325 56.5636029,38.151975 56.5633606,34.7776456 L56.5633606,28.0273769 L56.5633606,28.0273774 C56.5633606,21.3848531 51.1940878,16 44.5707524,16 L44.5707528,16 Z",
9829
- id: "\u5F62\u72B6",
9830
- fill: "#CCCCCC",
9831
- fillRule: "nonzero",
9832
- mask: "url(#mask-2)"
9833
- }))))));
9834
9826
  const classPrefix$1f = "adm-avatar";
9835
9827
  const defaultProps$$ = {
9836
9828
  fallback: React__default.createElement(Fallback, null),
@@ -10487,7 +10479,7 @@ const ScrollMask$1 = (props) => {
10487
10479
  }));
10488
10480
  };
10489
10481
  const ScrollMask = ScrollMask$1;
10490
- var _reactIs_18_2_0_reactIs = { exports: {} };
10482
+ var reactIs$1 = { exports: {} };
10491
10483
  var reactIs_development$1 = {};
10492
10484
  /**
10493
10485
  * @license React
@@ -10672,12 +10664,12 @@ var reactIs_development$1 = {};
10672
10664
  {
10673
10665
  module.exports = reactIs_development$1;
10674
10666
  }
10675
- })(_reactIs_18_2_0_reactIs);
10667
+ })(reactIs$1);
10676
10668
  function traverseReactNode(children, fn) {
10677
10669
  let i2 = 0;
10678
10670
  function handle(target) {
10679
10671
  React__default.Children.forEach(target, (child) => {
10680
- if (!_reactIs_18_2_0_reactIs.exports.isFragment(child)) {
10672
+ if (!reactIs$1.exports.isFragment(child)) {
10681
10673
  fn(child, i2);
10682
10674
  i2 += 1;
10683
10675
  } else {
@@ -11248,7 +11240,7 @@ function subscribe(onStoreChange) {
11248
11240
  };
11249
11241
  }
11250
11242
  function useMotionReduced() {
11251
- return shim.exports.useSyncExternalStore(subscribe, isMotionReduced);
11243
+ return shim.exports.useSyncExternalStore(subscribe, isMotionReduced, isMotionReduced);
11252
11244
  }
11253
11245
  const classPrefix$16 = "adm-spin-loading";
11254
11246
  const colorRecord$2 = {
@@ -12158,6 +12150,7 @@ const CascaderView$1 = (p) => {
12158
12150
  }
12159
12151
  setValue2(next);
12160
12152
  };
12153
+ const whetherLoading = (options) => props.loading || options === optionSkeleton;
12161
12154
  return withNativeProps(props, React__default.createElement("div", {
12162
12155
  className: classPrefix$Z
12163
12156
  }, React__default.createElement(Tabs, {
@@ -12178,7 +12171,7 @@ const CascaderView$1 = (p) => {
12178
12171
  forceRender: true
12179
12172
  }, React__default.createElement("div", {
12180
12173
  className: `${classPrefix$Z}-content`
12181
- }, level.options === optionSkeleton ? React__default.createElement("div", {
12174
+ }, whetherLoading(level.options) ? React__default.createElement("div", {
12182
12175
  className: `${classPrefix$Z}-skeleton`
12183
12176
  }, React__default.createElement(Skeleton, {
12184
12177
  className: `${classPrefix$Z}-skeleton-line-1`,
@@ -12262,12 +12255,7 @@ const Cascader = forwardRef((p, ref) => {
12262
12255
  if (!visible) {
12263
12256
  setInnerValue(value);
12264
12257
  }
12265
- }, [visible]);
12266
- useEffect(() => {
12267
- if (!visible) {
12268
- setInnerValue(value);
12269
- }
12270
- }, [value]);
12258
+ }, [visible, value]);
12271
12259
  const cascaderElement = withNativeProps(props, React__default.createElement("div", {
12272
12260
  className: classPrefix$Y
12273
12261
  }, React__default.createElement("div", {
@@ -13602,6 +13590,8 @@ const defaultProps$G = {
13602
13590
  const Ellipsis$1 = (p) => {
13603
13591
  const props = mergeProps(defaultProps$G, p);
13604
13592
  const rootRef = useRef(null);
13593
+ const expandElRef = useRef(null);
13594
+ const collapseElRef = useRef(null);
13605
13595
  const [ellipsised, setEllipsised] = useState$1({});
13606
13596
  const [expanded, setExpanded] = useState$1(props.defaultExpanded);
13607
13597
  const [exceeded, setExceeded] = useState$1(false);
@@ -13610,21 +13600,19 @@ const Ellipsis$1 = (p) => {
13610
13600
  return chars.slice(start2, end).join("");
13611
13601
  }
13612
13602
  function calcEllipsised() {
13603
+ var _a, _b;
13613
13604
  const root2 = rootRef.current;
13614
13605
  if (!root2)
13615
13606
  return;
13616
- if (!root2.offsetParent)
13617
- return;
13607
+ const originDisplay = root2.style.display;
13608
+ root2.style.display = "block";
13618
13609
  const originStyle = window.getComputedStyle(root2);
13619
13610
  const container = document.createElement("div");
13620
13611
  const styleNames = Array.prototype.slice.apply(originStyle);
13621
13612
  styleNames.forEach((name) => {
13622
13613
  container.style.setProperty(name, originStyle.getPropertyValue(name));
13623
13614
  });
13624
- container.style.position = "fixed";
13625
- container.style.left = "999999px";
13626
- container.style.top = "999999px";
13627
- container.style.zIndex = "-1000";
13615
+ root2.style.display = originDisplay;
13628
13616
  container.style.height = "auto";
13629
13617
  container.style.minHeight = "auto";
13630
13618
  container.style.maxHeight = "auto";
@@ -13653,9 +13641,9 @@ const Ellipsis$1 = (p) => {
13653
13641
  }
13654
13642
  const middle2 = Math.round((left + right) / 2);
13655
13643
  if (props.direction === "end") {
13656
- container.innerText = getSubString(0, middle2) + "..." + actionText;
13644
+ container.innerHTML = getSubString(0, middle2) + "..." + actionText;
13657
13645
  } else {
13658
- container.innerText = actionText + "..." + getSubString(middle2, end);
13646
+ container.innerHTML = actionText + "..." + getSubString(middle2, end);
13659
13647
  }
13660
13648
  if (container.offsetHeight <= maxHeight) {
13661
13649
  if (props.direction === "end") {
@@ -13679,7 +13667,7 @@ const Ellipsis$1 = (p) => {
13679
13667
  }
13680
13668
  const leftPartMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2);
13681
13669
  const rightPartMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2);
13682
- container.innerText = getSubString(0, leftPartMiddle) + "..." + actionText + "..." + getSubString(rightPartMiddle, end);
13670
+ container.innerHTML = getSubString(0, leftPartMiddle) + "..." + actionText + "..." + getSubString(rightPartMiddle, end);
13683
13671
  if (container.offsetHeight <= maxHeight) {
13684
13672
  return checkMiddle([leftPartMiddle, leftPart[1]], [rightPart[0], rightPartMiddle]);
13685
13673
  } else {
@@ -13688,7 +13676,9 @@ const Ellipsis$1 = (p) => {
13688
13676
  };
13689
13677
  setExceeded(true);
13690
13678
  const end = props.content.length;
13691
- const actionText = expanded ? props.collapseText : props.expandText;
13679
+ const collapseEl = typeof props.collapseText === "string" ? props.collapseText : (_a = collapseElRef.current) === null || _a === void 0 ? void 0 : _a.innerHTML;
13680
+ const expandEl = typeof props.expandText === "string" ? props.expandText : (_b = expandElRef.current) === null || _b === void 0 ? void 0 : _b.innerHTML;
13681
+ const actionText = expanded ? collapseEl : expandEl;
13692
13682
  const middle = Math.floor((0 + end) / 2);
13693
13683
  const ellipsised2 = props.direction === "middle" ? checkMiddle([0, middle], [middle, end]) : check(0, end);
13694
13684
  setEllipsised(ellipsised2);
@@ -13700,24 +13690,23 @@ const Ellipsis$1 = (p) => {
13700
13690
  calcEllipsised();
13701
13691
  }, [props.content, props.direction, props.rows, props.expandText, props.collapseText]);
13702
13692
  const expandActionElement = exceeded && props.expandText ? withStopPropagation(props.stopPropagationForActionButtons, React__default.createElement("a", {
13693
+ ref: expandElRef,
13703
13694
  onClick: () => {
13704
13695
  setExpanded(true);
13705
13696
  }
13706
13697
  }, props.expandText)) : null;
13707
13698
  const collapseActionElement = exceeded && props.collapseText ? withStopPropagation(props.stopPropagationForActionButtons, React__default.createElement("a", {
13699
+ ref: collapseElRef,
13708
13700
  onClick: () => {
13709
13701
  setExpanded(false);
13710
13702
  }
13711
13703
  }, props.collapseText)) : null;
13712
13704
  const renderContent = () => {
13713
- if (!exceeded) {
13705
+ if (!exceeded)
13714
13706
  return props.content;
13715
- }
13716
- if (expanded) {
13707
+ if (expanded)
13717
13708
  return React__default.createElement(React__default.Fragment, null, props.content, collapseActionElement);
13718
- } else {
13719
- return React__default.createElement(React__default.Fragment, null, ellipsised.leading, expandActionElement, ellipsised.tailing);
13720
- }
13709
+ return React__default.createElement(React__default.Fragment, null, ellipsised.leading, expandActionElement, ellipsised.tailing);
13721
13710
  };
13722
13711
  return withNativeProps(props, React__default.createElement("div", {
13723
13712
  ref: rootRef,
@@ -14795,7 +14784,7 @@ function _createSuper(Derived) {
14795
14784
  return _possibleConstructorReturn(this, result2);
14796
14785
  };
14797
14786
  }
14798
- var _reactIs_16_13_1_reactIs = { exports: {} };
14787
+ var reactIs = { exports: {} };
14799
14788
  var reactIs_development = {};
14800
14789
  /** @license React v16.13.1
14801
14790
  * react-is.development.js
@@ -14955,7 +14944,7 @@ var reactIs_development = {};
14955
14944
  {
14956
14945
  module.exports = reactIs_development;
14957
14946
  }
14958
- })(_reactIs_16_13_1_reactIs);
14947
+ })(reactIs);
14959
14948
  function toArray$2(children) {
14960
14949
  var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
14961
14950
  var ret = [];
@@ -14965,7 +14954,7 @@ function toArray$2(children) {
14965
14954
  }
14966
14955
  if (Array.isArray(child)) {
14967
14956
  ret = ret.concat(toArray$2(child));
14968
- } else if (_reactIs_16_13_1_reactIs.exports.isFragment(child) && child.props) {
14957
+ } else if (reactIs.exports.isFragment(child) && child.props) {
14969
14958
  ret = ret.concat(toArray$2(child.props.children, option));
14970
14959
  } else {
14971
14960
  ret.push(child);
@@ -18581,16 +18570,37 @@ var baseCreate$1 = function() {
18581
18570
  };
18582
18571
  }();
18583
18572
  var _baseCreate = baseCreate$1;
18584
- var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype$1 = _isPrototype;
18573
+ var overArg = _overArg;
18574
+ var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
18575
+ var _getPrototype = getPrototype$2;
18576
+ var baseCreate = _baseCreate, getPrototype$1 = _getPrototype, isPrototype$1 = _isPrototype;
18585
18577
  function initCloneObject$1(object4) {
18586
- return typeof object4.constructor == "function" && !isPrototype$1(object4) ? baseCreate(getPrototype(object4)) : {};
18578
+ return typeof object4.constructor == "function" && !isPrototype$1(object4) ? baseCreate(getPrototype$1(object4)) : {};
18587
18579
  }
18588
18580
  var _initCloneObject = initCloneObject$1;
18589
- var isArrayLike$1 = isArrayLike_1, isObjectLike = isObjectLike_1;
18581
+ var isArrayLike$1 = isArrayLike_1, isObjectLike$1 = isObjectLike_1;
18590
18582
  function isArrayLikeObject$1(value) {
18591
- return isObjectLike(value) && isArrayLike$1(value);
18583
+ return isObjectLike$1(value) && isArrayLike$1(value);
18592
18584
  }
18593
18585
  var isArrayLikeObject_1 = isArrayLikeObject$1;
18586
+ var baseGetTag = _baseGetTag, getPrototype = _getPrototype, isObjectLike = isObjectLike_1;
18587
+ var objectTag = "[object Object]";
18588
+ var funcProto = Function.prototype, objectProto$1 = Object.prototype;
18589
+ var funcToString = funcProto.toString;
18590
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
18591
+ var objectCtorString = funcToString.call(Object);
18592
+ function isPlainObject$1(value) {
18593
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
18594
+ return false;
18595
+ }
18596
+ var proto = getPrototype(value);
18597
+ if (proto === null) {
18598
+ return true;
18599
+ }
18600
+ var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
18601
+ return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
18602
+ }
18603
+ var isPlainObject_1 = isPlainObject$1;
18594
18604
  function safeGet$2(object4, key) {
18595
18605
  if (key === "constructor" && typeof object4[key] === "function") {
18596
18606
  return;
@@ -18993,9 +19003,9 @@ function isSimpleFunctionComponent(type4) {
18993
19003
  return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
18994
19004
  }
18995
19005
  function isSafeSetRefComponent(component) {
18996
- if (_reactIs_18_2_0_reactIs.exports.isFragment(component))
19006
+ if (reactIs$1.exports.isFragment(component))
18997
19007
  return false;
18998
- if (_reactIs_18_2_0_reactIs.exports.isMemo(component))
19008
+ if (reactIs$1.exports.isMemo(component))
18999
19009
  return isSafeSetRefComponent(component.type);
19000
19010
  return !isSimpleFunctionComponent(component.type);
19001
19011
  }
@@ -20055,13 +20065,6 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
20055
20065
  }
20056
20066
  return rectToClientRect(rect);
20057
20067
  }
20058
- function hasFixedPositionAncestor(element, stopNode) {
20059
- const parentNode = getParentNode(element);
20060
- if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
20061
- return false;
20062
- }
20063
- return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
20064
- }
20065
20068
  function getClippingElementAncestors(element, cache) {
20066
20069
  const cachedResult = cache.get(element);
20067
20070
  if (cachedResult) {
@@ -20073,11 +20076,11 @@ function getClippingElementAncestors(element, cache) {
20073
20076
  let currentNode = elementIsFixed ? getParentNode(element) : element;
20074
20077
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
20075
20078
  const computedStyle = getComputedStyle$1(currentNode);
20076
- const currentNodeIsContaining = isContainingBlock(currentNode);
20077
- if (!currentNodeIsContaining && computedStyle.position === "fixed") {
20079
+ const containingBlock = isContainingBlock(currentNode);
20080
+ if (computedStyle.position === "fixed") {
20078
20081
  currentContainingBlockComputedStyle = null;
20079
20082
  }
20080
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
20083
+ const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
20081
20084
  if (shouldDropCurrentNode) {
20082
20085
  result2 = result2.filter((ancestor) => ancestor !== currentNode);
20083
20086
  } else {
@@ -20214,19 +20217,17 @@ function autoUpdate(reference, floating, update2, options) {
20214
20217
  options = {};
20215
20218
  }
20216
20219
  const {
20217
- ancestorScroll = true,
20220
+ ancestorScroll: _ancestorScroll = true,
20218
20221
  ancestorResize = true,
20219
20222
  elementResize = true,
20220
20223
  animationFrame = false
20221
20224
  } = options;
20225
+ const ancestorScroll = _ancestorScroll && !animationFrame;
20222
20226
  const ancestors = ancestorScroll || ancestorResize ? [...isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : [], ...getOverflowAncestors(floating)] : [];
20223
20227
  ancestors.forEach((ancestor) => {
20224
- const isVisualViewport = !isElement(ancestor) && ancestor.toString().includes("V");
20225
- if (ancestorScroll && (animationFrame ? isVisualViewport : true)) {
20226
- ancestor.addEventListener("scroll", update2, {
20227
- passive: true
20228
- });
20229
- }
20228
+ ancestorScroll && ancestor.addEventListener("scroll", update2, {
20229
+ passive: true
20230
+ });
20230
20231
  ancestorResize && ancestor.addEventListener("resize", update2);
20231
20232
  });
20232
20233
  let observer = null;
@@ -20811,7 +20812,7 @@ const FormSubscribe = (props) => {
20811
20812
  const update2 = useUpdate$1();
20812
20813
  const form = useContext(Context$1);
20813
20814
  const value = form.getFieldsValue(props.to);
20814
- const childNode = React__default.useMemo(() => props.children(value, form), [JSON.stringify(value)]);
20815
+ const childNode = React__default.useMemo(() => props.children(value, form), [JSON.stringify(value), props.children]);
20815
20816
  return React__default.createElement(React__default.Fragment, null, childNode, props.to.map((namePath) => React__default.createElement(Watcher, {
20816
20817
  key: namePath.toString(),
20817
20818
  form,
@@ -22344,7 +22345,8 @@ const NoticeBar$1 = memo((p) => {
22344
22345
  return withNativeProps(props, React__default.createElement("div", {
22345
22346
  className: classNames(classPrefix$x, `${classPrefix$x}-${props.color}`, {
22346
22347
  [`${classPrefix$x}-wrap`]: props.wrap
22347
- })
22348
+ }),
22349
+ onClick: props.onClick
22348
22350
  }, props.icon && React__default.createElement("span", {
22349
22351
  className: `${classPrefix$x}-left`
22350
22352
  }, props.icon), React__default.createElement("span", {
@@ -22794,6 +22796,7 @@ const PullToRefresh$1 = (p) => {
22794
22796
  config: {
22795
22797
  tension: 300,
22796
22798
  friction: 30,
22799
+ round: true,
22797
22800
  clamp: true
22798
22801
  }
22799
22802
  }));
@@ -22854,7 +22857,8 @@ const PullToRefresh$1 = (p) => {
22854
22857
  return;
22855
22858
  }
22856
22859
  const [, y] = state.movement;
22857
- if (state.first && y > 0) {
22860
+ const parsedY = Math.ceil(y);
22861
+ if (state.first && parsedY > 0) {
22858
22862
  let getScrollTop = function(element) {
22859
22863
  return "scrollTop" in element ? element.scrollTop : element.scrollY;
22860
22864
  };
@@ -22882,7 +22886,7 @@ const PullToRefresh$1 = (p) => {
22882
22886
  event.preventDefault();
22883
22887
  }
22884
22888
  event.stopPropagation();
22885
- const height = Math.max(rubberbandIfOutOfBounds(y, 0, 0, headHeight * 5, 0.5), 0);
22889
+ const height = Math.max(rubberbandIfOutOfBounds(parsedY, 0, 0, headHeight * 5, 0.5), 0);
22886
22890
  api.start({
22887
22891
  height
22888
22892
  });
@@ -23597,6 +23601,9 @@ const Marks$1 = Marks;
23597
23601
  function supportBigInt() {
23598
23602
  return typeof BigInt === "function";
23599
23603
  }
23604
+ function isEmpty(value) {
23605
+ return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
23606
+ }
23600
23607
  function trimNumber(numStr) {
23601
23608
  var str = numStr.trim();
23602
23609
  var negative = str.startsWith("-");
@@ -23662,92 +23669,6 @@ function validateNumber(num) {
23662
23669
  }
23663
23670
  return /^\s*-?\d+(\.\d+)?\s*$/.test(num) || /^\s*-?\d+\.\s*$/.test(num) || /^\s*-?\.\d+\s*$/.test(num);
23664
23671
  }
23665
- function isEmpty(value) {
23666
- return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
23667
- }
23668
- var NumberDecimal = /* @__PURE__ */ function() {
23669
- function NumberDecimal2(value) {
23670
- _classCallCheck(this, NumberDecimal2);
23671
- _defineProperty(this, "origin", "");
23672
- _defineProperty(this, "number", void 0);
23673
- _defineProperty(this, "empty", void 0);
23674
- if (isEmpty(value)) {
23675
- this.empty = true;
23676
- return;
23677
- }
23678
- this.origin = String(value);
23679
- this.number = Number(value);
23680
- }
23681
- _createClass(NumberDecimal2, [{
23682
- key: "negate",
23683
- value: function negate() {
23684
- return new NumberDecimal2(-this.toNumber());
23685
- }
23686
- }, {
23687
- key: "add",
23688
- value: function add(value) {
23689
- if (this.isInvalidate()) {
23690
- return new NumberDecimal2(value);
23691
- }
23692
- var target = Number(value);
23693
- if (Number.isNaN(target)) {
23694
- return this;
23695
- }
23696
- var number4 = this.number + target;
23697
- if (number4 > Number.MAX_SAFE_INTEGER) {
23698
- return new NumberDecimal2(Number.MAX_SAFE_INTEGER);
23699
- }
23700
- if (number4 < Number.MIN_SAFE_INTEGER) {
23701
- return new NumberDecimal2(Number.MIN_SAFE_INTEGER);
23702
- }
23703
- var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
23704
- return new NumberDecimal2(number4.toFixed(maxPrecision));
23705
- }
23706
- }, {
23707
- key: "isEmpty",
23708
- value: function isEmpty2() {
23709
- return this.empty;
23710
- }
23711
- }, {
23712
- key: "isNaN",
23713
- value: function isNaN2() {
23714
- return Number.isNaN(this.number);
23715
- }
23716
- }, {
23717
- key: "isInvalidate",
23718
- value: function isInvalidate() {
23719
- return this.isEmpty() || this.isNaN();
23720
- }
23721
- }, {
23722
- key: "equals",
23723
- value: function equals(target) {
23724
- return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
23725
- }
23726
- }, {
23727
- key: "lessEquals",
23728
- value: function lessEquals(target) {
23729
- return this.add(target.negate().toString()).toNumber() <= 0;
23730
- }
23731
- }, {
23732
- key: "toNumber",
23733
- value: function toNumber2() {
23734
- return this.number;
23735
- }
23736
- }, {
23737
- key: "toString",
23738
- value: function toString() {
23739
- var safe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
23740
- if (!safe) {
23741
- return this.origin;
23742
- }
23743
- if (this.isInvalidate()) {
23744
- return "";
23745
- }
23746
- return num2str(this.number);
23747
- }
23748
- }]);
23749
- return NumberDecimal2;
23750
- }();
23751
23672
  var BigIntDecimal = /* @__PURE__ */ function() {
23752
23673
  function BigIntDecimal2(value) {
23753
23674
  _classCallCheck(this, BigIntDecimal2);
@@ -23812,6 +23733,18 @@ var BigIntDecimal = /* @__PURE__ */ function() {
23812
23733
  clone.negative = !clone.negative;
23813
23734
  return clone;
23814
23735
  }
23736
+ }, {
23737
+ key: "cal",
23738
+ value: function cal(offset2, calculator, calDecimalLen) {
23739
+ var maxDecimalLength = Math.max(this.getDecimalStr().length, offset2.getDecimalStr().length);
23740
+ var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
23741
+ var offsetAlignedDecimal = offset2.alignDecimal(maxDecimalLength);
23742
+ var valueStr = calculator(myAlignedDecimal, offsetAlignedDecimal).toString();
23743
+ var nextDecimalLength = calDecimalLen(maxDecimalLength);
23744
+ var _trimNumber = trimNumber(valueStr), negativeStr = _trimNumber.negativeStr, trimStr = _trimNumber.trimStr;
23745
+ var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(nextDecimalLength + 1, "0"));
23746
+ return new BigIntDecimal2("".concat(hydrateValueStr.slice(0, -nextDecimalLength), ".").concat(hydrateValueStr.slice(-nextDecimalLength)));
23747
+ }
23815
23748
  }, {
23816
23749
  key: "add",
23817
23750
  value: function add(value) {
@@ -23822,13 +23755,24 @@ var BigIntDecimal = /* @__PURE__ */ function() {
23822
23755
  if (offset2.isInvalidate()) {
23823
23756
  return this;
23824
23757
  }
23825
- var maxDecimalLength = Math.max(this.getDecimalStr().length, offset2.getDecimalStr().length);
23826
- var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
23827
- var offsetAlignedDecimal = offset2.alignDecimal(maxDecimalLength);
23828
- var valueStr = (myAlignedDecimal + offsetAlignedDecimal).toString();
23829
- var _trimNumber = trimNumber(valueStr), negativeStr = _trimNumber.negativeStr, trimStr = _trimNumber.trimStr;
23830
- var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(maxDecimalLength + 1, "0"));
23831
- return new BigIntDecimal2("".concat(hydrateValueStr.slice(0, -maxDecimalLength), ".").concat(hydrateValueStr.slice(-maxDecimalLength)));
23758
+ return this.cal(offset2, function(num1, num2) {
23759
+ return num1 + num2;
23760
+ }, function(len) {
23761
+ return len;
23762
+ });
23763
+ }
23764
+ }, {
23765
+ key: "multi",
23766
+ value: function multi(value) {
23767
+ var target = new BigIntDecimal2(value);
23768
+ if (this.isInvalidate() || target.isInvalidate()) {
23769
+ return new BigIntDecimal2(NaN);
23770
+ }
23771
+ return this.cal(target, function(num1, num2) {
23772
+ return num1 * num2;
23773
+ }, function(len) {
23774
+ return len * 2;
23775
+ });
23832
23776
  }
23833
23777
  }, {
23834
23778
  key: "isEmpty",
@@ -23878,6 +23822,106 @@ var BigIntDecimal = /* @__PURE__ */ function() {
23878
23822
  }]);
23879
23823
  return BigIntDecimal2;
23880
23824
  }();
23825
+ var NumberDecimal = /* @__PURE__ */ function() {
23826
+ function NumberDecimal2(value) {
23827
+ _classCallCheck(this, NumberDecimal2);
23828
+ _defineProperty(this, "origin", "");
23829
+ _defineProperty(this, "number", void 0);
23830
+ _defineProperty(this, "empty", void 0);
23831
+ if (isEmpty(value)) {
23832
+ this.empty = true;
23833
+ return;
23834
+ }
23835
+ this.origin = String(value);
23836
+ this.number = Number(value);
23837
+ }
23838
+ _createClass(NumberDecimal2, [{
23839
+ key: "negate",
23840
+ value: function negate() {
23841
+ return new NumberDecimal2(-this.toNumber());
23842
+ }
23843
+ }, {
23844
+ key: "add",
23845
+ value: function add(value) {
23846
+ if (this.isInvalidate()) {
23847
+ return new NumberDecimal2(value);
23848
+ }
23849
+ var target = Number(value);
23850
+ if (Number.isNaN(target)) {
23851
+ return this;
23852
+ }
23853
+ var number4 = this.number + target;
23854
+ if (number4 > Number.MAX_SAFE_INTEGER) {
23855
+ return new NumberDecimal2(Number.MAX_SAFE_INTEGER);
23856
+ }
23857
+ if (number4 < Number.MIN_SAFE_INTEGER) {
23858
+ return new NumberDecimal2(Number.MIN_SAFE_INTEGER);
23859
+ }
23860
+ var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
23861
+ return new NumberDecimal2(number4.toFixed(maxPrecision));
23862
+ }
23863
+ }, {
23864
+ key: "multi",
23865
+ value: function multi(value) {
23866
+ var target = Number(value);
23867
+ if (this.isInvalidate() || Number.isNaN(target)) {
23868
+ return new NumberDecimal2(NaN);
23869
+ }
23870
+ var number4 = this.number * target;
23871
+ if (number4 > Number.MAX_SAFE_INTEGER) {
23872
+ return new NumberDecimal2(Number.MAX_SAFE_INTEGER);
23873
+ }
23874
+ if (number4 < Number.MIN_SAFE_INTEGER) {
23875
+ return new NumberDecimal2(Number.MIN_SAFE_INTEGER);
23876
+ }
23877
+ var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
23878
+ return new NumberDecimal2(number4.toFixed(maxPrecision));
23879
+ }
23880
+ }, {
23881
+ key: "isEmpty",
23882
+ value: function isEmpty2() {
23883
+ return this.empty;
23884
+ }
23885
+ }, {
23886
+ key: "isNaN",
23887
+ value: function isNaN2() {
23888
+ return Number.isNaN(this.number);
23889
+ }
23890
+ }, {
23891
+ key: "isInvalidate",
23892
+ value: function isInvalidate() {
23893
+ return this.isEmpty() || this.isNaN();
23894
+ }
23895
+ }, {
23896
+ key: "equals",
23897
+ value: function equals(target) {
23898
+ return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
23899
+ }
23900
+ }, {
23901
+ key: "lessEquals",
23902
+ value: function lessEquals(target) {
23903
+ return this.add(target.negate().toString()).toNumber() <= 0;
23904
+ }
23905
+ }, {
23906
+ key: "toNumber",
23907
+ value: function toNumber2() {
23908
+ return this.number;
23909
+ }
23910
+ }, {
23911
+ key: "toString",
23912
+ value: function toString() {
23913
+ var safe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
23914
+ if (!safe) {
23915
+ return this.origin;
23916
+ }
23917
+ if (this.isInvalidate()) {
23918
+ return "";
23919
+ }
23920
+ return num2str(this.number);
23921
+ }
23922
+ }]);
23923
+ return NumberDecimal2;
23924
+ }();
23881
23925
  function getMiniDecimal(value) {
23882
23926
  if (supportBigInt()) {
23883
23927
  return new BigIntDecimal(value);
@@ -23889,7 +23933,7 @@ function toFixed(numStr, separatorStr, precision) {
23889
23933
  if (numStr === "") {
23890
23934
  return "";
23891
23935
  }
23892
- var _trimNumber2 = trimNumber(numStr), negativeStr = _trimNumber2.negativeStr, integerStr = _trimNumber2.integerStr, decimalStr = _trimNumber2.decimalStr;
23936
+ var _trimNumber = trimNumber(numStr), negativeStr = _trimNumber.negativeStr, integerStr = _trimNumber.integerStr, decimalStr = _trimNumber.decimalStr;
23893
23937
  var precisionDecimalStr = "".concat(separatorStr).concat(decimalStr);
23894
23938
  var numberWithoutDecimal = "".concat(negativeStr).concat(integerStr);
23895
23939
  if (precision >= 0) {
@@ -24069,13 +24113,14 @@ const Slider$1 = (p) => {
24069
24113
  const pointList = useMemo(() => {
24070
24114
  if (marks) {
24071
24115
  return Object.keys(marks).map(parseFloat).sort((a, b) => a - b);
24072
- } else {
24116
+ } else if (ticks) {
24073
24117
  const points = [];
24074
24118
  for (let i2 = getMiniDecimal(min2); i2.lessEquals(getMiniDecimal(max2)); i2 = i2.add(step)) {
24075
24119
  points.push(i2.toNumber());
24076
24120
  }
24077
24121
  return points;
24078
24122
  }
24123
+ return [];
24079
24124
  }, [marks, ticks, step, min2, max2]);
24080
24125
  function getValueByPosition(position) {
24081
24126
  const newPosition = position < min2 ? min2 : position > max2 ? max2 : position;
@@ -24083,9 +24128,9 @@ const Slider$1 = (p) => {
24083
24128
  if (pointList.length) {
24084
24129
  value = nearest(pointList, newPosition);
24085
24130
  } else {
24086
- const lengthPerStep = 100 / ((max2 - min2) / step);
24087
- const steps2 = Math.round(newPosition / lengthPerStep);
24088
- value = steps2 * lengthPerStep * (max2 - min2) * 0.01 + min2;
24131
+ const cell = Math.round((newPosition - min2) / step);
24132
+ const nextVal = getMiniDecimal(cell).multi(step);
24133
+ value = getMiniDecimal(min2).add(nextVal.toString()).toNumber();
24089
24134
  }
24090
24135
  return value;
24091
24136
  }
@@ -24917,6 +24962,7 @@ let currentUid;
24917
24962
  const Swiper = forwardRef(staged_1((p, ref) => {
24918
24963
  const props = mergeProps(defaultProps$a, p);
24919
24964
  const [uid] = useState$1({});
24965
+ const timeoutRef = useRef(null);
24920
24966
  const isVertical = props.direction === "vertical";
24921
24967
  const slideRatio = props.slideSize / 100;
24922
24968
  const offsetRatio = props.trackOffset / 100;
@@ -24957,7 +25003,7 @@ const Swiper = forwardRef(staged_1((p, ref) => {
24957
25003
  const trackPixels = isVertical ? track.offsetHeight : track.offsetWidth;
24958
25004
  return trackPixels * props.slideSize / 100;
24959
25005
  }
24960
- const [current, setCurrent] = useState$1(props.defaultIndex);
25006
+ const [current, setCurrent, getCurrent] = useGetState(props.defaultIndex);
24961
25007
  const [dragging, setDragging, draggingRef] = useRefState(false);
24962
25008
  function boundIndex(current2) {
24963
25009
  let min2 = 0;
@@ -25062,10 +25108,10 @@ const Swiper = forwardRef(staged_1((p, ref) => {
25062
25108
  var _a;
25063
25109
  const roundedIndex = Math.round(index2);
25064
25110
  const targetIndex = loop2 ? modulus(roundedIndex, count) : bound(roundedIndex, 0, count - 1);
25065
- setCurrent(targetIndex);
25066
- if (targetIndex !== current) {
25111
+ if (targetIndex !== getCurrent()) {
25067
25112
  (_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, targetIndex);
25068
25113
  }
25114
+ setCurrent(targetIndex);
25069
25115
  api.start({
25070
25116
  position: (loop2 ? roundedIndex : boundIndex(roundedIndex)) * 100,
25071
25117
  immediate
@@ -25092,18 +25138,19 @@ const Swiper = forwardRef(staged_1((p, ref) => {
25092
25138
  autoplay,
25093
25139
  autoplayInterval
25094
25140
  } = props;
25141
+ const runTimeSwiper = () => {
25142
+ timeoutRef.current = window.setTimeout(() => {
25143
+ swipeNext();
25144
+ runTimeSwiper();
25145
+ }, autoplayInterval);
25146
+ };
25095
25147
  useEffect(() => {
25096
25148
  if (!autoplay || dragging)
25097
25149
  return;
25098
- let interval;
25099
- function tick() {
25100
- interval = window.setTimeout(tick, autoplayInterval);
25101
- swipeNext();
25102
- }
25103
- interval = window.setTimeout(tick, autoplayInterval);
25150
+ runTimeSwiper();
25104
25151
  return () => {
25105
- if (interval)
25106
- window.clearTimeout(interval);
25152
+ if (timeoutRef.current)
25153
+ window.clearTimeout(timeoutRef.current);
25107
25154
  };
25108
25155
  }, [autoplay, autoplayInterval, dragging, count]);
25109
25156
  function renderTrackInner() {
@@ -25133,9 +25180,11 @@ const Swiper = forwardRef(staged_1((p, ref) => {
25133
25180
  style: {
25134
25181
  [isVertical ? "y" : "x"]: position.to((position2) => `${-position2}%`)
25135
25182
  }
25136
- }, React__default.Children.map(validChildren, (child) => {
25183
+ }, React__default.Children.map(validChildren, (child, index2) => {
25137
25184
  return React__default.createElement("div", {
25138
- className: `${classPrefix$a}-slide`
25185
+ className: classNames(`${classPrefix$a}-slide`, {
25186
+ [`${classPrefix$a}-slide-active`]: current === index2
25187
+ })
25139
25188
  }, child);
25140
25189
  }));
25141
25190
  }