@nutui/nutui-react-taro 3.0.8 → 3.0.9-beta.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 (207) hide show
  1. package/CHANGELOG.md +13 -14
  2. package/dist/cjs/hooks/index.d.ts +14 -0
  3. package/dist/cjs/hooks/index.js +19 -0
  4. package/dist/cjs/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  5. package/dist/cjs/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  6. package/dist/cjs/hooks/use-memo.d.ts +1 -1
  7. package/dist/cjs/hooks/use-memo.js +1 -1
  8. package/dist/cjs/hooks/use-refs.d.ts +1 -1
  9. package/dist/cjs/hooks/use-refs.js +1 -1
  10. package/dist/cjs/hooks/use-uuid.d.ts +1 -1
  11. package/dist/cjs/hooks/use-uuid.js +1 -1
  12. package/dist/cjs/hooks/use-watch.d.ts +2 -2
  13. package/dist/cjs/hooks/use-watch.js +2 -3
  14. package/dist/cjs/packages/address/address.d.ts +1 -1
  15. package/dist/cjs/packages/avatar/avatar.js +6 -6
  16. package/dist/cjs/packages/avatarcropper/avatarcropper.js +1 -1
  17. package/dist/cjs/packages/badge/badge.js +5 -5
  18. package/dist/cjs/packages/barrage/barrage.js +3 -3
  19. package/dist/cjs/packages/button/button.js +3 -3
  20. package/dist/cjs/packages/cell/cell.js +2 -2
  21. package/dist/cjs/packages/col/col.js +3 -3
  22. package/dist/cjs/packages/collapseitem/collapseitem.js +4 -4
  23. package/dist/cjs/packages/configprovider/configprovider.js +2 -2
  24. package/dist/cjs/packages/countdown/countdown.js +2 -2
  25. package/dist/cjs/packages/dialog/dialog.js +5 -5
  26. package/dist/cjs/packages/drag/drag.js +5 -5
  27. package/dist/cjs/packages/elevator/elevator.js +4 -4
  28. package/dist/cjs/packages/ellipsis/ellipsis.js +4 -4
  29. package/dist/cjs/packages/griditem/griditem.js +4 -4
  30. package/dist/cjs/packages/hoverbutton/hoverbutton.js +2 -2
  31. package/dist/cjs/packages/hoverbuttonitem/hoverbuttonitem.js +2 -2
  32. package/dist/cjs/packages/image/image.js +2 -2
  33. package/dist/cjs/packages/indicator/indicator.js +2 -2
  34. package/dist/cjs/packages/infiniteloading/infiniteloading.js +2 -2
  35. package/dist/cjs/packages/lottie/lottiemp.js +3 -3
  36. package/dist/cjs/packages/menuitem/menuitem.js +4 -4
  37. package/dist/cjs/packages/noticebar/noticebar.js +4 -4
  38. package/dist/cjs/packages/notify/notify.js +5 -5
  39. package/dist/cjs/packages/nutui.react.build.d.ts +2 -0
  40. package/dist/cjs/packages/nutui.react.build.js +2 -0
  41. package/dist/cjs/packages/nutui.react.d.ts +2 -0
  42. package/dist/cjs/packages/nutui.react.js +2 -0
  43. package/dist/cjs/packages/overlay/overlay.js +2 -2
  44. package/dist/cjs/packages/pagination/pagination.js +3 -3
  45. package/dist/cjs/packages/picker/picker.js +2 -2
  46. package/dist/cjs/packages/pickerview/pickerroller.js +7 -7
  47. package/dist/cjs/packages/popover/popover.js +15 -15
  48. package/dist/cjs/packages/popup/popup.js +4 -4
  49. package/dist/cjs/packages/price/price.js +2 -2
  50. package/dist/cjs/packages/progress/progress.js +13 -13
  51. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +4 -4
  52. package/dist/cjs/packages/range/range.js +13 -13
  53. package/dist/cjs/packages/rate/rate.js +4 -4
  54. package/dist/cjs/packages/sidebar/sidebar.js +2 -2
  55. package/dist/cjs/packages/sticky/sticky.js +7 -7
  56. package/dist/cjs/packages/swipe/swipe.js +10 -10
  57. package/dist/cjs/packages/swiper/swiper.js +4 -4
  58. package/dist/cjs/packages/tabs/tabs.js +2 -2
  59. package/dist/cjs/packages/toast/toast.js +3 -3
  60. package/dist/cjs/packages/tour/tour.js +2 -2
  61. package/dist/cjs/packages/trendarrow/trendarrow.js +3 -3
  62. package/dist/cjs/packages/virtuallist/virtuallist.js +1 -1
  63. package/dist/cjs/utils/clamp.d.ts +1 -0
  64. package/dist/cjs/utils/clamp.js +13 -0
  65. package/dist/cjs/utils/event-mocker.d.ts +21 -0
  66. package/dist/cjs/utils/index.d.ts +34 -6
  67. package/dist/cjs/utils/index.js +35 -54
  68. package/dist/cjs/utils/interceptor.js +2 -2
  69. package/dist/cjs/utils/is-function.d.ts +1 -0
  70. package/dist/cjs/utils/is-function.js +14 -0
  71. package/dist/cjs/utils/is-object.d.ts +1 -0
  72. package/dist/cjs/utils/is-object.js +14 -0
  73. package/dist/cjs/utils/is-promise.d.ts +1 -0
  74. package/dist/cjs/utils/is-promise.js +15 -0
  75. package/dist/cjs/utils/lru.d.ts +1 -1
  76. package/dist/cjs/utils/lru.js +1 -1
  77. package/dist/cjs/utils/merge.d.ts +0 -1
  78. package/dist/cjs/utils/merge.js +0 -4
  79. package/dist/cjs/utils/prevent-default.d.ts +1 -0
  80. package/dist/cjs/utils/prevent-default.js +18 -0
  81. package/dist/cjs/utils/raf.d.ts +0 -1
  82. package/dist/cjs/utils/raf.js +3 -6
  83. package/dist/{es/utils → cjs/utils/taro}/add-color-for-harmony.d.ts +1 -2
  84. package/dist/cjs/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +5 -11
  85. package/dist/cjs/utils/taro/get-rect-by-id.d.ts +1 -0
  86. package/dist/cjs/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +3 -3
  87. package/dist/cjs/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
  88. package/dist/cjs/utils/{get-rect-by-taro.js → taro/get-rect.js} +9 -10
  89. package/dist/cjs/utils/taro/px-transform.d.ts +1 -0
  90. package/dist/cjs/utils/{px-transform.js → taro/px-transform.js} +3 -3
  91. package/dist/cjs/utils/upper-case-first.d.ts +1 -0
  92. package/dist/cjs/utils/upper-case-first.js +17 -0
  93. package/dist/es/hooks/index.d.ts +14 -0
  94. package/dist/es/hooks/index.js +14 -0
  95. package/dist/es/hooks/{use-custom-event.js → taro/use-custom-event.js} +1 -1
  96. package/dist/es/hooks/{use-lock-scoll-taro.js → taro/use-lock-scoll.js} +1 -1
  97. package/dist/es/hooks/use-memo.d.ts +1 -1
  98. package/dist/es/hooks/use-memo.js +1 -1
  99. package/dist/es/hooks/use-refs.d.ts +1 -1
  100. package/dist/es/hooks/use-refs.js +1 -1
  101. package/dist/es/hooks/use-uuid.d.ts +1 -1
  102. package/dist/es/hooks/use-uuid.js +1 -1
  103. package/dist/es/hooks/use-watch.d.ts +2 -2
  104. package/dist/es/hooks/use-watch.js +1 -2
  105. package/dist/es/packages/address/address.d.ts +1 -1
  106. package/dist/es/packages/avatar/avatar.js +2 -2
  107. package/dist/es/packages/avatarcropper/avatarcropper.js +1 -1
  108. package/dist/es/packages/badge/badge.js +2 -2
  109. package/dist/es/packages/barrage/barrage.js +3 -3
  110. package/dist/es/packages/button/button.js +1 -1
  111. package/dist/es/packages/cell/cell.js +1 -1
  112. package/dist/es/packages/col/col.js +1 -1
  113. package/dist/es/packages/collapseitem/collapseitem.js +3 -3
  114. package/dist/es/packages/configprovider/configprovider.js +1 -1
  115. package/dist/es/packages/countdown/countdown.js +1 -1
  116. package/dist/es/packages/dialog/dialog.js +3 -3
  117. package/dist/es/packages/drag/drag.js +4 -4
  118. package/dist/es/packages/elevator/elevator.js +2 -2
  119. package/dist/es/packages/ellipsis/ellipsis.js +4 -4
  120. package/dist/es/packages/griditem/griditem.js +1 -1
  121. package/dist/es/packages/hoverbutton/hoverbutton.js +1 -1
  122. package/dist/es/packages/hoverbuttonitem/hoverbuttonitem.js +1 -1
  123. package/dist/es/packages/image/image.js +1 -1
  124. package/dist/es/packages/indicator/indicator.js +1 -1
  125. package/dist/es/packages/infiniteloading/infiniteloading.js +1 -1
  126. package/dist/es/packages/lottie/lottiemp.js +2 -2
  127. package/dist/es/packages/menuitem/menuitem.js +4 -4
  128. package/dist/es/packages/noticebar/noticebar.js +4 -4
  129. package/dist/es/packages/notify/notify.js +3 -3
  130. package/dist/es/packages/nutui.react.build.d.ts +2 -0
  131. package/dist/es/packages/nutui.react.build.js +2 -0
  132. package/dist/es/packages/overlay/overlay.js +1 -1
  133. package/dist/es/packages/pagination/pagination.js +1 -1
  134. package/dist/es/packages/picker/picker.js +1 -1
  135. package/dist/es/packages/pickerview/pickerroller.js +4 -4
  136. package/dist/es/packages/popover/popover.js +6 -6
  137. package/dist/es/packages/popup/popup.js +2 -2
  138. package/dist/es/packages/price/price.js +1 -1
  139. package/dist/es/packages/progress/progress.js +3 -3
  140. package/dist/es/packages/pulltorefresh/pulltorefresh.js +2 -2
  141. package/dist/es/packages/range/range.js +5 -5
  142. package/dist/es/packages/rate/rate.js +3 -3
  143. package/dist/es/packages/sidebar/sidebar.js +1 -1
  144. package/dist/es/packages/sticky/sticky.js +6 -6
  145. package/dist/es/packages/swipe/swipe.js +7 -7
  146. package/dist/es/packages/swiper/swiper.js +1 -1
  147. package/dist/es/packages/tabs/tabs.js +1 -1
  148. package/dist/es/packages/toast/toast.js +2 -2
  149. package/dist/es/packages/tour/tour.js +2 -2
  150. package/dist/es/packages/trendarrow/trendarrow.js +1 -1
  151. package/dist/es/packages/virtuallist/virtuallist.js +1 -1
  152. package/dist/es/utils/clamp.d.ts +1 -0
  153. package/dist/es/utils/clamp.js +3 -0
  154. package/dist/es/utils/event-mocker.d.ts +21 -0
  155. package/dist/es/utils/index.d.ts +34 -6
  156. package/dist/es/utils/index.js +34 -29
  157. package/dist/es/utils/interceptor.js +1 -1
  158. package/dist/es/utils/is-function.d.ts +1 -0
  159. package/dist/es/utils/is-function.js +4 -0
  160. package/dist/es/utils/is-object.d.ts +1 -0
  161. package/dist/es/utils/is-object.js +4 -0
  162. package/dist/es/utils/is-promise.d.ts +1 -0
  163. package/dist/es/utils/is-promise.js +5 -0
  164. package/dist/es/utils/lru.d.ts +1 -1
  165. package/dist/es/utils/lru.js +1 -2
  166. package/dist/es/utils/merge.d.ts +0 -1
  167. package/dist/es/utils/merge.js +0 -1
  168. package/dist/es/utils/prevent-default.d.ts +1 -0
  169. package/dist/es/utils/prevent-default.js +8 -0
  170. package/dist/es/utils/raf.d.ts +0 -1
  171. package/dist/es/utils/raf.js +1 -1
  172. package/dist/{cjs/utils → es/utils/taro}/add-color-for-harmony.d.ts +1 -2
  173. package/dist/es/utils/{add-color-for-harmony.js → taro/add-color-for-harmony.js} +2 -3
  174. package/dist/es/utils/taro/get-rect-by-id.d.ts +1 -0
  175. package/dist/es/{hooks/use-taro-rect.js → utils/taro/get-rect-by-id.js} +1 -1
  176. package/dist/es/utils/{get-rect-by-taro.d.ts → taro/get-rect.d.ts} +1 -1
  177. package/dist/es/utils/{get-rect-by-taro.js → taro/get-rect.js} +4 -4
  178. package/dist/es/utils/taro/px-transform.d.ts +1 -0
  179. package/dist/es/utils/{px-transform.js → taro/px-transform.js} +2 -2
  180. package/dist/es/utils/upper-case-first.d.ts +1 -0
  181. package/dist/es/utils/upper-case-first.js +7 -0
  182. package/dist/nutui.react.umd.js +506 -217
  183. package/dist/style.css +1 -1
  184. package/dist/style.scss +48 -48
  185. package/package.json +1 -1
  186. package/dist/cjs/hooks/use-taro-rect.d.ts +0 -1
  187. package/dist/cjs/utils/px-transform.d.ts +0 -1
  188. package/dist/es/hooks/use-taro-rect.d.ts +0 -1
  189. package/dist/es/utils/px-transform.d.ts +0 -1
  190. /package/dist/cjs/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
  191. /package/dist/cjs/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
  192. /package/dist/cjs/utils/{test/event.js → event-mocker.js} +0 -0
  193. /package/dist/cjs/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  194. /package/dist/cjs/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  195. /package/dist/cjs/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
  196. /package/dist/cjs/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  197. /package/dist/cjs/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
  198. /package/dist/cjs/utils/{platform-taro.js → taro/platform.js} +0 -0
  199. /package/dist/es/hooks/{use-custom-event.d.ts → taro/use-custom-event.d.ts} +0 -0
  200. /package/dist/es/hooks/{use-lock-scoll-taro.d.ts → taro/use-lock-scoll.d.ts} +0 -0
  201. /package/dist/es/utils/{test/event.js → event-mocker.js} +0 -0
  202. /package/dist/es/{hooks/use-client-rect.d.ts → utils/get-rect.d.ts} +0 -0
  203. /package/dist/es/{hooks/use-client-rect.js → utils/get-rect.js} +0 -0
  204. /package/dist/es/utils/{get-system-info.d.ts → taro/get-system-info.d.ts} +0 -0
  205. /package/dist/es/utils/{get-system-info.js → taro/get-system-info.js} +0 -0
  206. /package/dist/es/utils/{platform-taro.d.ts → taro/platform.d.ts} +0 -0
  207. /package/dist/es/utils/{platform-taro.js → taro/platform.js} +0 -0
@@ -19,6 +19,7 @@
19
19
  return Object.freeze(n);
20
20
  }
21
21
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
22
+ const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
22
23
  function _define_property(obj, key2, value2) {
23
24
  if (key2 in obj) {
24
25
  Object.defineProperty(obj, key2, { value: value2, enumerable: true, configurable: true, writable: true });
@@ -186,7 +187,7 @@
186
187
  const handleClick = (e) => {
187
188
  onClick && onClick(e);
188
189
  };
189
- const pxCheck = (value2) => {
190
+ const pxCheck2 = (value2) => {
190
191
  if (value2 === "")
191
192
  return "";
192
193
  return isNaN(Number(value2)) ? String(value2) : value2 + "px";
@@ -196,8 +197,8 @@
196
197
  return `${fallback ? globalConfig.fontClassName : ""} ${classPrefix2} ${classPrefix2}-${iconName} ${className}`;
197
198
  };
198
199
  const props2Style = {};
199
- const checkedWidth = pxCheck(width2 || size || "");
200
- const checkedHeight = pxCheck(height2 || size || "");
200
+ const checkedWidth = pxCheck2(width2 || size || "");
201
+ const checkedHeight = pxCheck2(height2 || size || "");
201
202
  if (checkedWidth) {
202
203
  props2Style["width"] = checkedWidth;
203
204
  }
@@ -255,7 +256,7 @@
255
256
  const handleClick = (e) => {
256
257
  onClick && onClick(e);
257
258
  };
258
- const pxCheck = (value2) => {
259
+ const pxCheck2 = (value2) => {
259
260
  if (value2 === "")
260
261
  return 0;
261
262
  return parseInt(value2);
@@ -265,8 +266,8 @@
265
266
  return `${fallback ? globalConfig.fontClassName : ""} ${classPrefix2} ${classPrefix2}-${iconName} ${className}`;
266
267
  };
267
268
  const props2Style = {};
268
- const checkedWidth = pxCheck(width2 || size || "");
269
- const checkedHeight = pxCheck(height2 || size || "");
269
+ const checkedWidth = pxCheck2(width2 || size || "");
270
+ const checkedHeight = pxCheck2(height2 || size || "");
270
271
  if (checkedWidth) {
271
272
  props2Style["width"] = checkedWidth;
272
273
  }
@@ -449,6 +450,11 @@
449
450
  "web"
450
451
  ].includes(Taro.getEnv().toLowerCase());
451
452
  };
453
+ var miniprogram = function() {
454
+ return [
455
+ "mini"
456
+ ].includes(Taro.getEnv().toLowerCase());
457
+ };
452
458
  var prefixCls$2 = "nut-button";
453
459
  var defaultProps$1A = _object_spread_props(_object_spread({}, ComponentDefaults), {
454
460
  color: "",
@@ -1175,7 +1181,7 @@
1175
1181
  };
1176
1182
  ConfigProvider.displayName = "NutConfigProvider";
1177
1183
  function pxTransform(value2, radix) {
1178
- if (harmony()) return Taro.pxTransform(value2, 375);
1184
+ if (harmony()) return Taro.pxTransform(value2, radix || 375);
1179
1185
  return "".concat(value2, "px");
1180
1186
  }
1181
1187
  var defaultProps$1y = _object_spread_props(_object_spread({}, ComponentDefaults), {
@@ -1301,7 +1307,7 @@
1301
1307
  ]);
1302
1308
  var _useState = _sliced_to_array(React.useState(true), 2), innerLoading = _useState[0], setInnerLoading = _useState[1];
1303
1309
  var _useState1 = _sliced_to_array(React.useState(false), 2), isError = _useState1[0], setIsError = _useState1[1];
1304
- var pxCheck = function(value2) {
1310
+ var pxCheck2 = function(value2) {
1305
1311
  return Number.isNaN(Number(value2)) ? String(value2) : pxTransform(+value2);
1306
1312
  };
1307
1313
  var handleLoad = function(e) {
@@ -1317,12 +1323,12 @@
1317
1323
  }
1318
1324
  };
1319
1325
  var containerStyle = _object_spread({}, height2 ? {
1320
- height: pxCheck(height2)
1326
+ height: pxCheck2(height2)
1321
1327
  } : {}, width2 ? {
1322
- width: pxCheck(width2)
1328
+ width: pxCheck2(width2)
1323
1329
  } : {}, radius !== void 0 && radius !== null ? {
1324
1330
  overflow: "hidden",
1325
- borderRadius: pxCheck(radius)
1331
+ borderRadius: pxCheck2(radius)
1326
1332
  } : {});
1327
1333
  var imgStyle = _object_spread_props(_object_spread({}, style), {
1328
1334
  width: width2,
@@ -2588,7 +2594,7 @@
2588
2594
  setTimeout(this.nextCallback, timeout);
2589
2595
  }
2590
2596
  };
2591
- _proto.render = function render() {
2597
+ _proto.render = function render2() {
2592
2598
  var status = this.state.status;
2593
2599
  if (status === UNMOUNTED) {
2594
2600
  return null;
@@ -2929,7 +2935,7 @@
2929
2935
  removeClass(node, doneClassName);
2930
2936
  }
2931
2937
  };
2932
- _proto.render = function render() {
2938
+ _proto.render = function render2() {
2933
2939
  var _this$props = this.props;
2934
2940
  _this$props.classNames;
2935
2941
  var props = _objectWithoutPropertiesLoose$1(_this$props, ["classNames"]);
@@ -3191,12 +3197,27 @@
3191
3197
  }
3192
3198
  return root2;
3193
3199
  }
3194
- var passiveSupported = false;
3200
+ function getAllScrollableParents(element) {
3201
+ var scrollableParents = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
3202
+ if (!element) {
3203
+ return scrollableParents;
3204
+ }
3205
+ var isScrollable = element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
3206
+ if (isScrollable) {
3207
+ if (element.nodeName === "HTML") {
3208
+ scrollableParents.push(document);
3209
+ } else {
3210
+ scrollableParents.push(element);
3211
+ }
3212
+ }
3213
+ return getAllScrollableParents(element.parentElement, scrollableParents);
3214
+ }
3215
+ exports.passiveSupported = false;
3195
3216
  if (canUseDom) {
3196
3217
  try {
3197
3218
  var opts = Object.defineProperty({}, "passive", {
3198
3219
  get: function get() {
3199
- passiveSupported = true;
3220
+ exports.passiveSupported = true;
3200
3221
  }
3201
3222
  });
3202
3223
  window.addEventListener("test-passive-supported", null, opts);
@@ -3245,7 +3266,7 @@
3245
3266
  };
3246
3267
  var lock = function() {
3247
3268
  document.addEventListener("touchstart", touch.start);
3248
- document.addEventListener("touchmove", onTouchMove, passiveSupported ? {
3269
+ document.addEventListener("touchmove", onTouchMove, exports.passiveSupported ? {
3249
3270
  passive: false
3250
3271
  } : false);
3251
3272
  if (!totalLockCount) {
@@ -3751,6 +3772,9 @@
3751
3772
  var getWindowInfo = function() {
3752
3773
  return Taro.canIUse("getWindowInfo") ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
3753
3774
  };
3775
+ var getAppBaseInfo = function() {
3776
+ return Taro.canIUse("getAppBaseInfo") ? Taro.getAppBaseInfo() : Taro.getSystemInfoSync();
3777
+ };
3754
3778
  function useWatch$1(dep, callback) {
3755
3779
  var config2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
3756
3780
  immediate: false
@@ -3841,7 +3865,7 @@
3841
3865
  ]);
3842
3866
  return MiniLru2;
3843
3867
  }();
3844
- var inBrowser$1 = typeof document !== "undefined" && !!document.scripts;
3868
+ var inBrowser = typeof document !== "undefined" && !!document.scripts;
3845
3869
  function isWindow(val2) {
3846
3870
  return val2 === window;
3847
3871
  }
@@ -3883,14 +3907,14 @@
3883
3907
  height: height2
3884
3908
  };
3885
3909
  }
3886
- var getRectByTaro = /* @__PURE__ */ function() {
3910
+ var getRectInMultiPlatform = /* @__PURE__ */ function() {
3887
3911
  var _ref = _async_to_generator(function(element) {
3888
3912
  var harmonyId;
3889
3913
  var _arguments = arguments;
3890
3914
  return __generator(this, function(_state) {
3891
3915
  harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : "";
3892
3916
  if (element) {
3893
- if (inBrowser$1) {
3917
+ if (inBrowser) {
3894
3918
  return [
3895
3919
  2,
3896
3920
  Promise.resolve(getRect(element))
@@ -3919,7 +3943,7 @@
3919
3943
  ];
3920
3944
  });
3921
3945
  });
3922
- return function getRectByTaro2(element) {
3946
+ return function getRectInMultiPlatform2(element) {
3923
3947
  return _ref.apply(this, arguments);
3924
3948
  };
3925
3949
  }();
@@ -3999,13 +4023,13 @@
3999
4023
  case 0:
4000
4024
  return [
4001
4025
  4,
4002
- getRectByTaro(rootRef.current)
4026
+ getRectInMultiPlatform(rootRef.current)
4003
4027
  ];
4004
4028
  case 1:
4005
4029
  curRootRect = _state.sent();
4006
4030
  return [
4007
4031
  4,
4008
- getRectByTaro(stickyRef.current)
4032
+ getRectInMultiPlatform(stickyRef.current)
4009
4033
  ];
4010
4034
  case 2:
4011
4035
  stickyRect = _state.sent();
@@ -4029,7 +4053,7 @@
4029
4053
  ];
4030
4054
  return [
4031
4055
  4,
4032
- getRectByTaro(container.current)
4056
+ getRectInMultiPlatform(container.current)
4033
4057
  ];
4034
4058
  case 3:
4035
4059
  containerRect = _state.sent();
@@ -4745,7 +4769,6 @@
4745
4769
  setState
4746
4770
  ];
4747
4771
  }
4748
- var inBrowser = typeof window !== "undefined";
4749
4772
  function requestAniFrame() {
4750
4773
  if (inBrowser) {
4751
4774
  var _window = window;
@@ -4757,6 +4780,14 @@
4757
4780
  setTimeout(callback, 1e3 / 60);
4758
4781
  };
4759
4782
  }
4783
+ function cancelRaf(id) {
4784
+ if (inBrowser) {
4785
+ var _window = window;
4786
+ (_window.cancelAnimationFrame || _window.webkitCancelAnimationFrame)(id);
4787
+ } else {
4788
+ clearTimeout(id);
4789
+ }
4790
+ }
4760
4791
  const requestAniFrame$1 = requestAniFrame();
4761
4792
  function mergeProps() {
4762
4793
  for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -4774,6 +4805,17 @@
4774
4805
  });
4775
4806
  return ret;
4776
4807
  }
4808
+ function mergeProp(defaultProp) {
4809
+ for (var _len = arguments.length, propList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
4810
+ propList[_key - 1] = arguments[_key];
4811
+ }
4812
+ for (var i2 = propList.length - 1; i2 >= 0; i2 -= 1) {
4813
+ if (propList[i2] !== void 0) {
4814
+ return propList[i2];
4815
+ }
4816
+ }
4817
+ return defaultProp;
4818
+ }
4777
4819
  var defaultProps$1i = {
4778
4820
  title: "",
4779
4821
  value: "",
@@ -6394,6 +6436,9 @@
6394
6436
  };
6395
6437
  var getDaysStatus = function(type2, year, month) {
6396
6438
  var days = Utils.getMonthDays("".concat(year), "".concat(month));
6439
+ if (type2 === "prev" && days >= 7) {
6440
+ days -= 7;
6441
+ }
6397
6442
  return Array.from(Array(days), function(v, k) {
6398
6443
  return {
6399
6444
  day: k + 1,
@@ -6412,7 +6457,7 @@
6412
6457
  }
6413
6458
  var days = Utils.getMonthPreDay(+year, +month);
6414
6459
  days -= firstDayOfWeek;
6415
- if (days >= 7) {
6460
+ if (type2 === "prev" && days >= 7) {
6416
6461
  days -= 7;
6417
6462
  }
6418
6463
  var preDates = Utils.getMonthDays("".concat(preYear), "".concat(preMonth));
@@ -7911,6 +7956,142 @@
7911
7956
  CheckboxGroup.displayName = "NutCheckboxGroup";
7912
7957
  var InnerCheckbox = Checkbox;
7913
7958
  InnerCheckbox.Group = CheckboxGroup;
7959
+ function addColorForHarmony(maybeElement, color) {
7960
+ if (React.isValidElement(maybeElement) && harmony()) {
7961
+ return React.cloneElement(maybeElement, {
7962
+ color
7963
+ });
7964
+ }
7965
+ return maybeElement;
7966
+ }
7967
+ function bound(position2, min, max) {
7968
+ var ret = position2;
7969
+ if (min !== void 0) {
7970
+ ret = Math.max(position2, min);
7971
+ }
7972
+ if (max !== void 0) {
7973
+ ret = Math.min(ret, max);
7974
+ }
7975
+ return ret;
7976
+ }
7977
+ var UPPERCASE = RegExp("[\\p{Lu}]", "u");
7978
+ var LOWERCASE = RegExp("[\\p{Ll}]", "u");
7979
+ var LEADING_CAPITAL = RegExp("^[\\p{Lu}](?![\\p{Lu}])", "gu");
7980
+ var IDENTIFIER = RegExp("([\\p{Alpha}\\p{N}_]|$)", "u");
7981
+ var SEPARATORS = /[_.\- ]+/;
7982
+ var LEADING_SEPARATORS = new RegExp("^".concat(SEPARATORS.source));
7983
+ var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
7984
+ var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+".concat(IDENTIFIER.source), "gu");
7985
+ var preserveCamelCase = function(string2, toLowerCase, toUpperCase) {
7986
+ var isLastCharLower = false;
7987
+ var isLastCharUpper = false;
7988
+ var isLastLastCharUpper = false;
7989
+ for (var index2 = 0; index2 < string2.length; index2++) {
7990
+ var character = string2[index2];
7991
+ if (isLastCharLower && UPPERCASE.test(character)) {
7992
+ string2 = "".concat(string2.slice(0, index2), "-").concat(string2.slice(index2));
7993
+ isLastCharLower = false;
7994
+ isLastLastCharUpper = isLastCharUpper;
7995
+ isLastCharUpper = true;
7996
+ index2++;
7997
+ } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
7998
+ string2 = "".concat(string2.slice(0, index2 - 1), "-").concat(string2.slice(index2 - 1));
7999
+ isLastLastCharUpper = isLastCharUpper;
8000
+ isLastCharUpper = false;
8001
+ isLastCharLower = true;
8002
+ } else {
8003
+ isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
8004
+ isLastLastCharUpper = isLastCharUpper;
8005
+ isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
8006
+ }
8007
+ }
8008
+ return string2;
8009
+ };
8010
+ var preserveConsecutiveUppercase = function(input, toLowerCase) {
8011
+ LEADING_CAPITAL.lastIndex = 0;
8012
+ return input.replace(LEADING_CAPITAL, function(m1) {
8013
+ return toLowerCase(m1);
8014
+ });
8015
+ };
8016
+ var postProcess = function(input, toUpperCase) {
8017
+ SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
8018
+ NUMBERS_AND_IDENTIFIER.lastIndex = 0;
8019
+ return input.replace(SEPARATORS_AND_IDENTIFIER, function(_, identifier) {
8020
+ return toUpperCase(identifier);
8021
+ }).replace(NUMBERS_AND_IDENTIFIER, function(m) {
8022
+ return toUpperCase(m);
8023
+ });
8024
+ };
8025
+ var camelCase = function(input, options) {
8026
+ if (!(typeof input === "string" || Array.isArray(input))) {
8027
+ throw new TypeError("Expected the input to be `string | string[]`");
8028
+ }
8029
+ options = _object_spread({
8030
+ pascalCase: false,
8031
+ preserveConsecutiveUppercase: false
8032
+ }, options);
8033
+ if (Array.isArray(input)) {
8034
+ input = input.map(function(x) {
8035
+ return x.trim();
8036
+ }).filter(function(x) {
8037
+ return x.length;
8038
+ }).join("-");
8039
+ } else {
8040
+ input = input.trim();
8041
+ }
8042
+ if (input.length === 0) {
8043
+ return "";
8044
+ }
8045
+ var toLowerCase = options.locale === false ? function(string2) {
8046
+ return string2.toLowerCase();
8047
+ } : function(string2) {
8048
+ return string2.toLocaleLowerCase(options.locale);
8049
+ };
8050
+ var toUpperCase = options.locale === false ? function(string2) {
8051
+ return string2.toUpperCase();
8052
+ } : function(string2) {
8053
+ return string2.toLocaleUpperCase(options.locale);
8054
+ };
8055
+ if (input.length === 1) {
8056
+ if (SEPARATORS.test(input)) {
8057
+ return "";
8058
+ }
8059
+ return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
8060
+ }
8061
+ var hasUpperCase = input !== toLowerCase(input);
8062
+ if (hasUpperCase) {
8063
+ input = preserveCamelCase(input, toLowerCase, toUpperCase);
8064
+ }
8065
+ input = input.replace(LEADING_SEPARATORS, "");
8066
+ input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
8067
+ if (options.pascalCase) {
8068
+ input = toUpperCase(input.charAt(0)) + input.slice(1);
8069
+ }
8070
+ return postProcess(input, toUpperCase);
8071
+ };
8072
+ var clamp = function(num, min, max) {
8073
+ return Math.min(Math.max(num, min), max);
8074
+ };
8075
+ var getRectById = function(id) {
8076
+ return new Promise(function(resolve, reject) {
8077
+ if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
8078
+ var t = document ? document.querySelector("#".concat(id)) : "";
8079
+ if (t) {
8080
+ resolve(t === null || t === void 0 ? void 0 : t.getBoundingClientRect());
8081
+ }
8082
+ reject();
8083
+ } else {
8084
+ var query = Taro.createSelectorQuery();
8085
+ query.select("#".concat(id)).boundingClientRect().exec(function(rect) {
8086
+ if (rect[0]) {
8087
+ resolve(rect[0]);
8088
+ } else {
8089
+ reject();
8090
+ }
8091
+ });
8092
+ }
8093
+ });
8094
+ };
7914
8095
  var isObject = function(val2) {
7915
8096
  return val2 !== null && (typeof val2 === "undefined" ? "undefined" : _type_of(val2)) === "object";
7916
8097
  };
@@ -7920,8 +8101,110 @@
7920
8101
  var isPromise = function(val2) {
7921
8102
  return isObject(val2) && isFunction(val2.then) && isFunction(val2.catch);
7922
8103
  };
7923
- var clamp = function(num, min, max) {
7924
- return Math.min(Math.max(num, min), max);
8104
+ var funcInterceptor = function(interceptor, param) {
8105
+ var _param_args = param.args, args = _param_args === void 0 ? [] : _param_args, done = param.done, canceled = param.canceled;
8106
+ if (interceptor) {
8107
+ var returnVal = interceptor.apply(null, args);
8108
+ if (isPromise(returnVal)) {
8109
+ returnVal.then(function(value2) {
8110
+ if (value2) {
8111
+ done(value2);
8112
+ } else if (canceled) {
8113
+ canceled();
8114
+ }
8115
+ }).catch(function() {
8116
+ });
8117
+ } else if (returnVal) {
8118
+ done();
8119
+ } else if (canceled) {
8120
+ canceled();
8121
+ }
8122
+ } else {
8123
+ done();
8124
+ }
8125
+ };
8126
+ var isDate = function(val2) {
8127
+ return Object.prototype.toString.call(val2) === "[object Date]" && !Number.isNaN(val2.getTime());
8128
+ };
8129
+ function isForwardRefComponent(component) {
8130
+ return component.type && component.type.$$typeof && // eslint-disable-next-line react/display-name
8131
+ React.forwardRef(
8132
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8133
+ // @ts-ignore
8134
+ function() {
8135
+ }
8136
+ ).$$typeof === component.type.$$typeof;
8137
+ }
8138
+ function main() {
8139
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
8140
+ items[_key] = arguments[_key];
8141
+ }
8142
+ return merge.apply(void 0, _to_consumable_array(items));
8143
+ }
8144
+ main.clone = clone;
8145
+ main.isPlainObject = isPlainObject;
8146
+ main.recursive = recursive;
8147
+ function merge() {
8148
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
8149
+ items[_key] = arguments[_key];
8150
+ }
8151
+ return _merge(items[0] === true, false, items);
8152
+ }
8153
+ function recursive() {
8154
+ for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
8155
+ items[_key] = arguments[_key];
8156
+ }
8157
+ return _merge(items[0] === true, true, items);
8158
+ }
8159
+ function clone(input) {
8160
+ if (Array.isArray(input)) {
8161
+ var output = [];
8162
+ for (var index2 = 0; index2 < input.length; ++index2) output.push(clone(input[index2]));
8163
+ return output;
8164
+ }
8165
+ if (isPlainObject(input)) {
8166
+ var output1 = {};
8167
+ for (var index1 in input) output1[index1] = clone(input[index1]);
8168
+ return output1;
8169
+ }
8170
+ return input;
8171
+ }
8172
+ function isPlainObject(input) {
8173
+ if (input === null || (typeof input === "undefined" ? "undefined" : _type_of(input)) !== "object") return false;
8174
+ if (Object.getPrototypeOf(input) === null) return true;
8175
+ var ref = input;
8176
+ while (Object.getPrototypeOf(ref) !== null) ref = Object.getPrototypeOf(ref);
8177
+ return Object.getPrototypeOf(input) === ref;
8178
+ }
8179
+ function _recursiveMerge(base, extend) {
8180
+ if (!isPlainObject(base) || !isPlainObject(extend)) return extend;
8181
+ for (var key2 in extend) {
8182
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
8183
+ base[key2] = isPlainObject(base[key2]) && isPlainObject(extend[key2]) ? _recursiveMerge(base[key2], extend[key2]) : extend[key2];
8184
+ }
8185
+ return base;
8186
+ }
8187
+ function _merge(isClone, isRecursive, items) {
8188
+ var result;
8189
+ if (isClone || !isPlainObject(result = items.shift())) result = {};
8190
+ for (var index2 = 0; index2 < items.length; ++index2) {
8191
+ var item = items[index2];
8192
+ if (!isPlainObject(item)) continue;
8193
+ for (var key2 in item) {
8194
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
8195
+ var value2 = isClone ? clone(item[key2]) : item[key2];
8196
+ result[key2] = isRecursive ? _recursiveMerge(result[key2], value2) : value2;
8197
+ }
8198
+ }
8199
+ return result;
8200
+ }
8201
+ var padZero = function(num) {
8202
+ var targetLength = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
8203
+ var str = "".concat(num);
8204
+ while (str.length < targetLength) {
8205
+ str = "0".concat(str);
8206
+ }
8207
+ return str;
7925
8208
  };
7926
8209
  function preventDefault$1(event, isStopPropagation) {
7927
8210
  if (typeof event.cancelable !== "boolean" || event.cancelable) {
@@ -7931,6 +8214,100 @@
7931
8214
  event.stopPropagation();
7932
8215
  }
7933
8216
  }
8217
+ var pxCheck = function(value2) {
8218
+ return parseFloat(value2.toString());
8219
+ };
8220
+ var fullClone = _object_spread({}, ReactDOM__namespace);
8221
+ var version = fullClone.version, reactRender = fullClone.render, unmountComponentAtNode = fullClone.unmountComponentAtNode;
8222
+ var createRoot;
8223
+ try {
8224
+ var mainVersion = Number((version || "").split(".")[0]);
8225
+ if (mainVersion >= 18 && fullClone.createRoot) {
8226
+ createRoot = fullClone.createRoot;
8227
+ }
8228
+ } catch (e) {
8229
+ }
8230
+ function toggleWarning(skip) {
8231
+ var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
8232
+ if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && (typeof __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === "undefined" ? "undefined" : _type_of(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)) === "object") {
8233
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
8234
+ }
8235
+ }
8236
+ var MARK = "__nutui_react_root__";
8237
+ function legacyRender(node, container) {
8238
+ reactRender(node, container);
8239
+ }
8240
+ function concurrentRender(node, container) {
8241
+ toggleWarning(true);
8242
+ var root2 = container[MARK] || createRoot(container);
8243
+ toggleWarning(false);
8244
+ root2.render(node);
8245
+ container[MARK] = root2;
8246
+ }
8247
+ function render(node, container) {
8248
+ if (createRoot) {
8249
+ concurrentRender(node, container);
8250
+ return;
8251
+ }
8252
+ legacyRender(node, container);
8253
+ }
8254
+ function legacyUnmount(container) {
8255
+ return unmountComponentAtNode(container);
8256
+ }
8257
+ function concurrentUnmount(container) {
8258
+ return _concurrentUnmount.apply(this, arguments);
8259
+ }
8260
+ function _concurrentUnmount() {
8261
+ _concurrentUnmount = _async_to_generator(function(container) {
8262
+ return __generator(this, function(_state) {
8263
+ return [
8264
+ 2,
8265
+ Promise.resolve().then(function() {
8266
+ var _container_MARK;
8267
+ (_container_MARK = container[MARK]) === null || _container_MARK === void 0 ? void 0 : _container_MARK.unmount();
8268
+ delete container[MARK];
8269
+ })
8270
+ ];
8271
+ });
8272
+ });
8273
+ return _concurrentUnmount.apply(this, arguments);
8274
+ }
8275
+ function unmount(container) {
8276
+ if (createRoot) {
8277
+ return concurrentUnmount(container);
8278
+ }
8279
+ return legacyUnmount(container);
8280
+ }
8281
+ function rubberband(distance, dimension, constant) {
8282
+ return distance * dimension * constant / (dimension + constant * distance);
8283
+ }
8284
+ function rubberbandIfOutOfBounds(position2, min, max, dimension) {
8285
+ var constant = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.15;
8286
+ if (constant === 0) return bound(position2, min, max);
8287
+ if (position2 < min) return -rubberband(min - position2, dimension, constant) + min;
8288
+ if (position2 > max) return +rubberband(position2 - max, dimension, constant) + max;
8289
+ return position2;
8290
+ }
8291
+ var sleep = function(time2) {
8292
+ return new Promise(function(resolve) {
8293
+ return setTimeout(resolve, time2);
8294
+ });
8295
+ };
8296
+ function toArray(value2) {
8297
+ if (value2 === void 0 || value2 === null) {
8298
+ return [];
8299
+ }
8300
+ return Array.isArray(value2) ? value2 : [
8301
+ value2
8302
+ ];
8303
+ }
8304
+ var upperCaseFirst = function(str) {
8305
+ str = str.toLowerCase();
8306
+ str = str.replace(/\b\w+\b/g, function(word) {
8307
+ return word.substring(0, 1).toUpperCase() + word.substring(1);
8308
+ });
8309
+ return str;
8310
+ };
7934
8311
  var momentum = function(distance, duration) {
7935
8312
  var speed = Math.abs(distance / duration);
7936
8313
  return speed / 3e-3 * (distance < 0 ? -1 : 1);
@@ -8070,7 +8447,7 @@
8070
8447
  ]);
8071
8448
  return [
8072
8449
  4,
8073
- getRectByTaro(placeholderRef.current)
8450
+ getRectInMultiPlatform(placeholderRef.current)
8074
8451
  ];
8075
8452
  case 1:
8076
8453
  placeholder = _state.sent();
@@ -8136,7 +8513,7 @@
8136
8513
  });
8137
8514
  React.useEffect(function() {
8138
8515
  var _pickerRollerRef_current, _pickerRollerRef_current1, _pickerRollerRef_current2;
8139
- var eventOptions = passiveSupported ? {
8516
+ var eventOptions = exports.passiveSupported ? {
8140
8517
  passive: false,
8141
8518
  once: true
8142
8519
  } : false;
@@ -8532,17 +8909,6 @@
8532
8909
  })));
8533
8910
  };
8534
8911
  var Picker = /* @__PURE__ */ React.forwardRef(InternalPicker$1);
8535
- var isDate = function(val2) {
8536
- return Object.prototype.toString.call(val2) === "[object Date]" && !Number.isNaN(val2.getTime());
8537
- };
8538
- var padZero = function(num) {
8539
- var targetLength = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
8540
- var str = "".concat(num);
8541
- while (str.length < targetLength) {
8542
- str = "0".concat(str);
8543
- }
8544
- return str;
8545
- };
8546
8912
  function getLastDayOfMonth(year, month) {
8547
8913
  return new Date(year, month, 0).getDate();
8548
8914
  }
@@ -10030,60 +10396,6 @@
10030
10396
  Schema.warning = warning;
10031
10397
  Schema.messages = messages;
10032
10398
  Schema.validators = validators;
10033
- function merge() {
10034
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
10035
- items[_key] = arguments[_key];
10036
- }
10037
- return _merge(items[0] === true, false, items);
10038
- }
10039
- function recursive() {
10040
- for (var _len = arguments.length, items = new Array(_len), _key = 0; _key < _len; _key++) {
10041
- items[_key] = arguments[_key];
10042
- }
10043
- return _merge(items[0] === true, true, items);
10044
- }
10045
- function clone(input) {
10046
- if (Array.isArray(input)) {
10047
- var output = [];
10048
- for (var index2 = 0; index2 < input.length; ++index2) output.push(clone(input[index2]));
10049
- return output;
10050
- }
10051
- if (isPlainObject(input)) {
10052
- var output1 = {};
10053
- for (var index1 in input) output1[index1] = clone(input[index1]);
10054
- return output1;
10055
- }
10056
- return input;
10057
- }
10058
- function isPlainObject(input) {
10059
- if (input === null || (typeof input === "undefined" ? "undefined" : _type_of(input)) !== "object") return false;
10060
- if (Object.getPrototypeOf(input) === null) return true;
10061
- var ref = input;
10062
- while (Object.getPrototypeOf(ref) !== null) ref = Object.getPrototypeOf(ref);
10063
- return Object.getPrototypeOf(input) === ref;
10064
- }
10065
- function _recursiveMerge(base, extend) {
10066
- if (!isPlainObject(base) || !isPlainObject(extend)) return extend;
10067
- for (var key2 in extend) {
10068
- if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
10069
- base[key2] = isPlainObject(base[key2]) && isPlainObject(extend[key2]) ? _recursiveMerge(base[key2], extend[key2]) : extend[key2];
10070
- }
10071
- return base;
10072
- }
10073
- function _merge(isClone, isRecursive, items) {
10074
- var result;
10075
- if (isClone || !isPlainObject(result = items.shift())) result = {};
10076
- for (var index2 = 0; index2 < items.length; ++index2) {
10077
- var item = items[index2];
10078
- if (!isPlainObject(item)) continue;
10079
- for (var key2 in item) {
10080
- if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") continue;
10081
- var value2 = isClone ? clone(item[key2]) : item[key2];
10082
- result[key2] = isRecursive ? _recursiveMerge(result[key2], value2) : value2;
10083
- }
10084
- }
10085
- return result;
10086
- }
10087
10399
  var SECRET = "NUT_FORM_INTERNAL";
10088
10400
  var FormStore = /* @__PURE__ */ function() {
10089
10401
  function FormStore2() {
@@ -10576,23 +10888,6 @@
10576
10888
  subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
10577
10889
  if (superClass) _set_prototype_of(subClass, superClass);
10578
10890
  }
10579
- function isForwardRefComponent(component) {
10580
- return component.type && component.type.$$typeof && // eslint-disable-next-line react/display-name
10581
- React.forwardRef(
10582
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10583
- // @ts-ignore
10584
- function() {
10585
- }
10586
- ).$$typeof === component.type.$$typeof;
10587
- }
10588
- function toArray(value2) {
10589
- if (value2 === void 0 || value2 === null) {
10590
- return [];
10591
- }
10592
- return Array.isArray(value2) ? value2 : [
10593
- value2
10594
- ];
10595
- }
10596
10891
  var defaultProps$Z = _object_spread_props(_object_spread({}, ComponentDefaults), {
10597
10892
  required: false,
10598
10893
  name: "",
@@ -10768,7 +11063,7 @@
10768
11063
  },
10769
11064
  {
10770
11065
  key: "render",
10771
- value: function render() {
11066
+ value: function render2() {
10772
11067
  var children = this.props.children;
10773
11068
  var child = Array.isArray(children) ? children[0] : children;
10774
11069
  var returnChildNode;
@@ -10998,16 +11293,6 @@
10998
11293
  })));
10999
11294
  });
11000
11295
  Input.displayName = "NutInput";
11001
- function bound(position2, min, max) {
11002
- var ret = position2;
11003
- if (min !== void 0) {
11004
- ret = Math.max(position2, min);
11005
- }
11006
- if (max !== void 0) {
11007
- ret = Math.min(ret, max);
11008
- }
11009
- return ret;
11010
- }
11011
11296
  var defaultProps$X = _object_spread_props(_object_spread({}, ComponentDefaults), {
11012
11297
  disabled: false,
11013
11298
  readOnly: false,
@@ -11300,7 +11585,7 @@
11300
11585
  p = parent2.menuRef.current;
11301
11586
  return [
11302
11587
  4,
11303
- getRectByTaro(p)
11588
+ getRectInMultiPlatform(p)
11304
11589
  ];
11305
11590
  case 1:
11306
11591
  rect = _state.sent();
@@ -11329,7 +11614,7 @@
11329
11614
  var updateItemOffset = React.useCallback(function() {
11330
11615
  if (!parent2.lockScroll) return;
11331
11616
  var p = parent2.menuRef.current;
11332
- getRectByTaro(p).then(function(rect) {
11617
+ getRectInMultiPlatform(p).then(function(rect) {
11333
11618
  if (rect) {
11334
11619
  setPosition({
11335
11620
  height: rect.height,
@@ -12214,7 +12499,7 @@
12214
12499
  setDragStatus("");
12215
12500
  return [
12216
12501
  4,
12217
- getRectByTaro(root2.current)
12502
+ getRectInMultiPlatform(root2.current)
12218
12503
  ];
12219
12504
  case 1:
12220
12505
  rect = _state.sent();
@@ -12302,7 +12587,7 @@
12302
12587
  setDragStatus("draging");
12303
12588
  return [
12304
12589
  4,
12305
- getRectByTaro(root2.current)
12590
+ getRectInMultiPlatform(root2.current)
12306
12591
  ];
12307
12592
  case 1:
12308
12593
  rect = _state.sent();
@@ -12624,7 +12909,7 @@
12624
12909
  var _loop = function(index3) {
12625
12910
  var item = refs[index3];
12626
12911
  if (item) {
12627
- getRectByTaro(item).then(function(res) {
12912
+ getRectInMultiPlatform(item).then(function(res) {
12628
12913
  rateRects.current[index3] = res;
12629
12914
  });
12630
12915
  }
@@ -13346,28 +13631,6 @@
13346
13631
  }, inputValue.length, "/", maxLength < 0 ? 0 : maxLength)));
13347
13632
  };
13348
13633
  TextArea.displayName = "NutTextArea";
13349
- var funcInterceptor = function(interceptor, param) {
13350
- var _param_args = param.args, args = _param_args === void 0 ? [] : _param_args, done = param.done, canceled = param.canceled;
13351
- if (interceptor) {
13352
- var returnVal = interceptor.apply(null, args);
13353
- if (isPromise(returnVal)) {
13354
- returnVal.then(function(value2) {
13355
- if (value2) {
13356
- done(value2);
13357
- } else if (canceled) {
13358
- canceled();
13359
- }
13360
- }).catch(function() {
13361
- });
13362
- } else if (returnVal) {
13363
- done();
13364
- } else if (canceled) {
13365
- canceled();
13366
- }
13367
- } else {
13368
- done();
13369
- }
13370
- };
13371
13634
  var defaultProps$K = _object_spread_props(_object_spread({}, ComponentDefaults), {
13372
13635
  percent: 0,
13373
13636
  showText: false,
@@ -14516,7 +14779,7 @@
14516
14779
  _getWindowInfo = getWindowInfo(), screenWidth = _getWindowInfo.screenWidth, windowHeight = _getWindowInfo.windowHeight;
14517
14780
  return [
14518
14781
  4,
14519
- getRectByTaro(dragRef.current)
14782
+ getRectInMultiPlatform(dragRef.current)
14520
14783
  ];
14521
14784
  case 1:
14522
14785
  _ref2 = _state.sent(), width2 = _ref2.width, height2 = _ref2.height, dragTop = _ref2.top, dragLeft = _ref2.left;
@@ -23225,7 +23488,7 @@
23225
23488
  }
23226
23489
  this.renderModifiers();
23227
23490
  };
23228
- SVGShapeElement.prototype.searchShapes = function(arr, itemsData, prevViewData, container, level, transformers, render) {
23491
+ SVGShapeElement.prototype.searchShapes = function(arr, itemsData, prevViewData, container, level, transformers, render2) {
23229
23492
  var ownTransformers = [].concat(transformers);
23230
23493
  var i2;
23231
23494
  var len2 = arr.length - 1;
@@ -23239,7 +23502,7 @@
23239
23502
  for (i2 = len2; i2 >= 0; i2 -= 1) {
23240
23503
  processedPos = this.searchProcessedElement(arr[i2]);
23241
23504
  if (!processedPos) {
23242
- arr[i2]._render = render;
23505
+ arr[i2]._render = render2;
23243
23506
  } else {
23244
23507
  itemsData[i2] = prevViewData[processedPos - 1];
23245
23508
  }
@@ -23264,7 +23527,7 @@
23264
23527
  itemsData[i2].prevViewData[j] = itemsData[i2].it[j];
23265
23528
  }
23266
23529
  }
23267
- this.searchShapes(arr[i2].it, itemsData[i2].it, itemsData[i2].prevViewData, itemsData[i2].gr, level + 1, ownTransformers, render);
23530
+ this.searchShapes(arr[i2].it, itemsData[i2].it, itemsData[i2].prevViewData, itemsData[i2].gr, level + 1, ownTransformers, render2);
23268
23531
  if (arr[i2]._render) {
23269
23532
  if (itemsData[i2].gr.parentNode !== container) {
23270
23533
  container.appendChild(itemsData[i2].gr);
@@ -23298,7 +23561,7 @@
23298
23561
  itemsData[i2] = modifier;
23299
23562
  modifier.init(this, arr, i2, itemsData);
23300
23563
  this.shapeModifiers.push(modifier);
23301
- render = false;
23564
+ render2 = false;
23302
23565
  } else {
23303
23566
  modifier = itemsData[i2];
23304
23567
  modifier.closed = true;
@@ -35618,13 +35881,13 @@
35618
35881
  }
35619
35882
  return [
35620
35883
  4,
35621
- getRectByTaro(wrapRef.current)
35884
+ getRectInMultiPlatform(wrapRef.current)
35622
35885
  ];
35623
35886
  case 1:
35624
35887
  warpRes = _state.sent();
35625
35888
  return [
35626
35889
  4,
35627
- getRectByTaro(contentRef.current)
35890
+ getRectInMultiPlatform(contentRef.current)
35628
35891
  ];
35629
35892
  case 2:
35630
35893
  contentRes = _state.sent();
@@ -35715,7 +35978,7 @@
35715
35978
  case 0:
35716
35979
  return [
35717
35980
  4,
35718
- getRectByTaro(container === null || container === void 0 ? void 0 : container.current)
35981
+ getRectInMultiPlatform(container === null || container === void 0 ? void 0 : container.current)
35719
35982
  ];
35720
35983
  case 1:
35721
35984
  rects = _state.sent();
@@ -36119,7 +36382,7 @@
36119
36382
  ];
36120
36383
  return [
36121
36384
  4,
36122
- getRectByTaro(document.querySelector("#".concat(targetId)), targetId)
36385
+ getRectInMultiPlatform(document.querySelector("#".concat(targetId)), targetId)
36123
36386
  ];
36124
36387
  case 1:
36125
36388
  _tmp = _state2.sent();
@@ -36130,7 +36393,7 @@
36130
36393
  case 2:
36131
36394
  return [
36132
36395
  4,
36133
- getRectByTaro(popoverRef.current, popoverId)
36396
+ getRectInMultiPlatform(popoverRef.current, popoverId)
36134
36397
  ];
36135
36398
  case 3:
36136
36399
  _tmp = _state2.sent();
@@ -36171,7 +36434,7 @@
36171
36434
  case 0:
36172
36435
  return [
36173
36436
  4,
36174
- getRectByTaro(popoverContentRef.current)
36437
+ getRectInMultiPlatform(popoverContentRef.current)
36175
36438
  ];
36176
36439
  case 1:
36177
36440
  rectContent = _state2.sent();
@@ -36366,21 +36629,6 @@
36366
36629
  })));
36367
36630
  };
36368
36631
  Popover.displayName = "NutPopover";
36369
- function rubberband(distance, dimension, constant) {
36370
- return distance * dimension * constant / (dimension + constant * distance);
36371
- }
36372
- function rubberbandIfOutOfBounds(position2, min, max, dimension) {
36373
- var constant = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.15;
36374
- if (constant === 0) return bound(position2, min, max);
36375
- if (position2 < min) return -rubberband(min - position2, dimension, constant) + min;
36376
- if (position2 > max) return +rubberband(position2 - max, dimension, constant) + max;
36377
- return position2;
36378
- }
36379
- var sleep = function(time2) {
36380
- return new Promise(function(resolve) {
36381
- return setTimeout(resolve, time2);
36382
- });
36383
- };
36384
36632
  var defaultProps$z = _object_spread_props(_object_spread({}, ComponentDefaults), {
36385
36633
  type: "default",
36386
36634
  pullingText: "",
@@ -36711,7 +36959,7 @@
36711
36959
  ];
36712
36960
  return [
36713
36961
  4,
36714
- getRectByTaro(leftWrapper.current, leftId)
36962
+ getRectInMultiPlatform(leftWrapper.current, leftId)
36715
36963
  ];
36716
36964
  case 1:
36717
36965
  leftRect = _state.sent();
@@ -36728,7 +36976,7 @@
36728
36976
  ];
36729
36977
  return [
36730
36978
  4,
36731
- getRectByTaro(rightWrapper.current, rightId)
36979
+ getRectInMultiPlatform(rightWrapper.current, rightId)
36732
36980
  ];
36733
36981
  case 3:
36734
36982
  rightRect = _state.sent();
@@ -36795,7 +37043,7 @@
36795
37043
  ];
36796
37044
  return [
36797
37045
  4,
36798
- getRectByTaro(leftWrapper.current, leftId)
37046
+ getRectInMultiPlatform(leftWrapper.current, leftId)
36799
37047
  ];
36800
37048
  case 1:
36801
37049
  leftRect = _state.sent();
@@ -36812,7 +37060,7 @@
36812
37060
  ];
36813
37061
  return [
36814
37062
  4,
36815
- getRectByTaro(rightWrapper.current, rightId)
37063
+ getRectInMultiPlatform(rightWrapper.current, rightId)
36816
37064
  ];
36817
37065
  case 3:
36818
37066
  rightRect = _state.sent();
@@ -37289,7 +37537,7 @@
37289
37537
  _create_class(AnimatingNumbers2, [
37290
37538
  {
37291
37539
  key: "render",
37292
- value: function render() {
37540
+ value: function render2() {
37293
37541
  return /* @__PURE__ */ React.createElement(components.View, {
37294
37542
  className: "nut-animatingnumbers"
37295
37543
  });
@@ -37813,7 +38061,7 @@
37813
38061
  case 0:
37814
38062
  return [
37815
38063
  4,
37816
- getRectByTaro(contentRef.current, target)
38064
+ getRectInMultiPlatform(contentRef.current, target)
37817
38065
  ];
37818
38066
  case 1:
37819
38067
  res = _state.sent();
@@ -38244,7 +38492,7 @@
38244
38492
  case 0:
38245
38493
  return [
38246
38494
  4,
38247
- getRectByTaro(symbolContain === null || symbolContain === void 0 ? void 0 : symbolContain.current)
38495
+ getRectInMultiPlatform(symbolContain === null || symbolContain === void 0 ? void 0 : symbolContain.current)
38248
38496
  ];
38249
38497
  case 1:
38250
38498
  refe = _state.sent();
@@ -38315,7 +38563,7 @@
38315
38563
  case 0:
38316
38564
  return [
38317
38565
  4,
38318
- getRectByTaro(rootContain.current)
38566
+ getRectInMultiPlatform(rootContain.current)
38319
38567
  ];
38320
38568
  case 1:
38321
38569
  refe = _state.sent();
@@ -38358,7 +38606,7 @@
38358
38606
  case 0:
38359
38607
  return [
38360
38608
  4,
38361
- getRectByTaro(rootContain.current)
38609
+ getRectInMultiPlatform(rootContain.current)
38362
38610
  ];
38363
38611
  case 1:
38364
38612
  refe = _state.sent();
@@ -38900,14 +39148,6 @@
38900
39148
  }, closeIcon === true ? /* @__PURE__ */ React.createElement(IconSVG$p, null) : closeIcon));
38901
39149
  };
38902
39150
  ImagePreview.displayName = "NutImagePreview";
38903
- function addColorForHarmony(maybeElement, color) {
38904
- if (React.isValidElement(maybeElement) && harmony()) {
38905
- return React.cloneElement(maybeElement, {
38906
- color
38907
- });
38908
- }
38909
- return maybeElement;
38910
- }
38911
39151
  var defaultPaginationOptions = {
38912
39152
  current: 0,
38913
39153
  itemsPerPage: 10,
@@ -39477,12 +39717,12 @@
39477
39717
  };
39478
39718
  var renderBodyTds = function(item, rowIndex) {
39479
39719
  return sortDataItem().map(function(param) {
39480
- var _param = _sliced_to_array(param, 2), value2 = _param[0], render = _param[1];
39720
+ var _param = _sliced_to_array(param, 2), value2 = _param[0], render2 = _param[1];
39481
39721
  return /* @__PURE__ */ React.createElement(components.View, {
39482
39722
  className: classNames("".concat(bodyClassPrefix, "-td"), cellClasses(getColumnItem(value2)), getStickyClass(value2)),
39483
39723
  key: value2,
39484
39724
  style: getStickyStyle(value2)
39485
- }, typeof item[value2] === "function" || typeof render === "function" ? /* @__PURE__ */ React.createElement(components.View, null, render ? render(item, rowIndex) : item[value2](item)) : item[value2]);
39725
+ }, typeof item[value2] === "function" || typeof render2 === "function" ? /* @__PURE__ */ React.createElement(components.View, null, render2 ? render2(item, rowIndex) : item[value2](item)) : item[value2]);
39486
39726
  });
39487
39727
  };
39488
39728
  var renderBodyTrs = function() {
@@ -39603,26 +39843,6 @@
39603
39843
  }, children)));
39604
39844
  };
39605
39845
  Tag.displayName = "NutTag";
39606
- var getTaroRectById = function(id) {
39607
- return new Promise(function(resolve, reject) {
39608
- if (Taro.getEnv() === Taro.ENV_TYPE.WEB) {
39609
- var t = document ? document.querySelector("#".concat(id)) : "";
39610
- if (t) {
39611
- resolve(t === null || t === void 0 ? void 0 : t.getBoundingClientRect());
39612
- }
39613
- reject();
39614
- } else {
39615
- var query = Taro.createSelectorQuery();
39616
- query.select("#".concat(id)).boundingClientRect().exec(function(rect) {
39617
- if (rect[0]) {
39618
- resolve(rect[0]);
39619
- } else {
39620
- reject();
39621
- }
39622
- });
39623
- }
39624
- });
39625
- };
39626
39846
  var defaultProps$9 = _object_spread_props(_object_spread({}, ComponentDefaults), {
39627
39847
  visible: false,
39628
39848
  type: "step",
@@ -39676,7 +39896,7 @@
39676
39896
  active2
39677
39897
  ]);
39678
39898
  var getRootPosition = function() {
39679
- getTaroRectById(list[active2].target).then(function(rect) {
39899
+ getRectById(list[active2].target).then(function(rect) {
39680
39900
  setMaskRect({
39681
39901
  top: rect.top,
39682
39902
  left: rect.left,
@@ -40702,7 +40922,7 @@
40702
40922
  ];
40703
40923
  return [
40704
40924
  4,
40705
- getRectByTaro(node)
40925
+ getRectInMultiPlatform(node)
40706
40926
  ];
40707
40927
  case 1:
40708
40928
  refe = _state.sent();
@@ -40799,7 +41019,7 @@
40799
41019
  ];
40800
41020
  return [
40801
41021
  4,
40802
- getRectByTaro(el)
41022
+ getRectInMultiPlatform(el)
40803
41023
  ];
40804
41024
  case 1:
40805
41025
  refe = _state.sent();
@@ -41295,6 +41515,7 @@
41295
41515
  };
41296
41516
  WaterMark.displayName = "NutWaterMark";
41297
41517
  var destroyList = [];
41518
+ var useIsomorphicLayoutEffect = canUseDom ? React.useLayoutEffect : React.useEffect;
41298
41519
  exports.ActionSheet = ActionSheet;
41299
41520
  exports.Address = Address;
41300
41521
  exports.Animate = Animate;
@@ -41320,6 +41541,7 @@
41320
41541
  exports.Col = Col;
41321
41542
  exports.Collapse = Collapse;
41322
41543
  exports.CollapseItem = CollapseItem;
41544
+ exports.ComponentDefaults = ComponentDefaults;
41323
41545
  exports.ConfigProvider = ConfigProvider;
41324
41546
  exports.CountDown = CountDown;
41325
41547
  exports.DatePicker = DatePicker;
@@ -41348,6 +41570,7 @@
41348
41570
  exports.Lottie = Lottie;
41349
41571
  exports.Menu = Menu;
41350
41572
  exports.MenuItem = MenuItem;
41573
+ exports.MiniLru = MiniLru;
41351
41574
  exports.NavBar = NavBar;
41352
41575
  exports.NoticeBar = NoticeBar;
41353
41576
  exports.Notify = Notify;
@@ -41396,13 +41619,79 @@
41396
41619
  exports.Tour = Tour;
41397
41620
  exports.TrendArrow = TrendArrow;
41398
41621
  exports.Uploader = Uploader;
41622
+ exports.Utils = Utils;
41399
41623
  exports.Video = Video;
41400
41624
  exports.VirtualList = VirtualList;
41401
41625
  exports.WaterMark = WaterMark;
41626
+ exports.addColorForHarmony = addColorForHarmony;
41627
+ exports.bound = bound;
41628
+ exports.camelCase = camelCase;
41629
+ exports.canUseDom = canUseDom;
41630
+ exports.cancelRaf = cancelRaf;
41631
+ exports.clamp = clamp;
41632
+ exports.clone = clone;
41633
+ exports.customEvents = customEvents;
41402
41634
  exports.destroyList = destroyList;
41635
+ exports.funcInterceptor = funcInterceptor;
41636
+ exports.getAllScrollableParents = getAllScrollableParents;
41637
+ exports.getAppBaseInfo = getAppBaseInfo;
41638
+ exports.getCurrMonthData = getCurrMonthData;
41639
+ exports.getDaysStatus = getDaysStatus;
41403
41640
  exports.getDefaultConfig = getDefaultConfig;
41641
+ exports.getDeviceInfo = getDeviceInfo;
41642
+ exports.getPreMonthDates = getPreMonthDates;
41643
+ exports.getRect = getRect;
41644
+ exports.getRectById = getRectById;
41645
+ exports.getRectInMultiPlatform = getRectInMultiPlatform;
41646
+ exports.getRefValue = getRefValue;
41647
+ exports.getScrollParent = getScrollParent;
41648
+ exports.getWindowInfo = getWindowInfo;
41649
+ exports.harmony = harmony;
41650
+ exports.inBrowser = inBrowser;
41651
+ exports.isDate = isDate;
41652
+ exports.isEmpty = isEmpty;
41653
+ exports.isForwardRefComponent = isForwardRefComponent;
41654
+ exports.isFunction = isFunction;
41655
+ exports.isObject = isObject;
41656
+ exports.isPlainObject = isPlainObject;
41657
+ exports.isPromise = isPromise;
41658
+ exports.isWindow = isWindow;
41659
+ exports.main = main;
41660
+ exports.makeRect = makeRect;
41661
+ exports.merge = merge;
41662
+ exports.mergeProp = mergeProp;
41663
+ exports.mergeProps = mergeProps;
41664
+ exports.miniprogram = miniprogram;
41665
+ exports.padZero = padZero;
41666
+ exports.preventDefault = preventDefault$1;
41667
+ exports.pxCheck = pxCheck;
41668
+ exports.pxTransform = pxTransform;
41669
+ exports.recursive = recursive;
41670
+ exports.render = render;
41671
+ exports.rubberband = rubberband;
41672
+ exports.rubberbandIfOutOfBounds = rubberbandIfOutOfBounds;
41404
41673
  exports.setDefaultConfig = setDefaultConfig;
41674
+ exports.sleep = sleep;
41675
+ exports.toArray = toArray;
41676
+ exports.unmount = unmount;
41677
+ exports.upperCaseFirst = upperCaseFirst;
41405
41678
  exports.useConfig = useConfig;
41679
+ exports.useCustomEvent = useCustomEvent;
41680
+ exports.useCustomEventsPath = useCustomEventsPath;
41681
+ exports.useForceUpdate = useForceUpdate;
41682
+ exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
41683
+ exports.useLockScroll = useLockScroll;
41684
+ exports.useLockScrollTaro = useLockScrollTaro;
41685
+ exports.useMemo = useMemo;
41686
+ exports.usePagination = usePagination;
41687
+ exports.useParams = useParams;
41688
+ exports.usePropsValue = usePropsValue;
41689
+ exports.useRefState = useRefState;
41690
+ exports.useRefs = useRefs;
41406
41691
  exports.useRtl = useRtl;
41692
+ exports.useTouch = useTouch;
41693
+ exports.useUuid = useUuid;
41694
+ exports.useWatch = useWatch$1;
41695
+ exports.web = web;
41407
41696
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
41408
41697
  });