@nutui/nutui-react-taro 2.6.14 → 2.6.15

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 (56) hide show
  1. package/CHANGELOG.md +914 -909
  2. package/README.md +21 -28
  3. package/dist/esm/Audio.js +1 -1
  4. package/dist/esm/Calendar.js +1 -1
  5. package/dist/esm/CalendarItem.js +1 -1
  6. package/dist/esm/Checkbox.js +1 -1
  7. package/dist/esm/CheckboxGroup.js +1 -1
  8. package/dist/esm/DatePicker.js +1 -1
  9. package/dist/esm/ImagePreview.js +1 -1
  10. package/dist/esm/InfiniteLoading.js +1 -1
  11. package/dist/esm/Menu.js +1 -1
  12. package/dist/esm/PullToRefresh.js +1 -1
  13. package/dist/esm/Radio.js +1 -1
  14. package/dist/esm/RadioGroup.js +1 -1
  15. package/dist/esm/Sticky.js +1 -1
  16. package/dist/esm/Swipe.js +1 -1
  17. package/dist/esm/Swiper.js +1 -2
  18. package/dist/esm/SwiperItem.js +1 -1
  19. package/dist/esm/Table.js +1 -1
  20. package/dist/esm/Uploader/style/style.css +1 -1
  21. package/dist/esm/Uploader.js +1 -1
  22. package/dist/esm/WaterMark.js +1 -1
  23. package/dist/esm/{audio.taro-DzSc40G9.js → audio.taro-CD-vP_u0.js} +7 -8
  24. package/dist/esm/{calendar.taro-Bf5owfGd.js → calendar.taro-BXrHr8bg.js} +1 -1
  25. package/dist/esm/{calendaritem.taro-PLHReAvU.js → calendaritem.taro-CRultyrO.js} +3 -1
  26. package/dist/esm/{checkbox.taro-Dc054oRo.js → checkbox.taro-CgqJyhrh.js} +4 -5
  27. package/dist/esm/{datepicker.taro-DTyJrlhD.js → datepicker.taro-BxaZ3Fjv.js} +3 -4
  28. package/dist/esm/{imagepreview.taro-DtgQJEQ_.js → imagepreview.taro-CF-CCJ1Q.js} +1 -1
  29. package/dist/esm/{infiniteloading.taro-DmDQKk_d.js → infiniteloading.taro-TbcBB0Qr.js} +1 -1
  30. package/dist/esm/{menu.taro-CrPdDbYM.js → menu.taro-BeuoJcj7.js} +2 -2
  31. package/dist/esm/nutui-react.es.js +16 -16
  32. package/dist/esm/{pulltorefresh.taro-CZReoWwU.js → pulltorefresh.taro-BScP6uPx.js} +0 -1
  33. package/dist/esm/{radio.taro-BNSceequ.js → radio.taro-CzOHqD3O.js} +0 -2
  34. package/dist/esm/{sticky.taro-DZzgkigZ.js → sticky.taro-Zbz7wQH8.js} +29 -31
  35. package/dist/esm/{swipe.taro-yUhne9XU.js → swipe.taro-Bsk2fnEl.js} +0 -1
  36. package/dist/esm/{swiperitem.taro-DeiNSrJV.js → swiperitem.taro-BleF1EOs.js} +0 -5
  37. package/dist/esm/{table.taro-D2M3D2Vj.js → table.taro-B6WCKTkO.js} +6 -5
  38. package/dist/esm/{uploader.taro-CiamsRGo.js → uploader.taro-DfO2HWvy.js} +13 -11
  39. package/dist/esm/{watermark.taro-BR12yZQt.js → watermark.taro-CZ6R5FlJ.js} +3 -3
  40. package/dist/locales/base.js +1 -1
  41. package/dist/locales/en-US.js +1 -1
  42. package/dist/locales/id-ID.js +1 -1
  43. package/dist/locales/tr-TR.js +1 -1
  44. package/dist/locales/zh-CN.js +1 -1
  45. package/dist/locales/zh-TW.js +1 -1
  46. package/dist/locales/zh-UG.js +1 -1
  47. package/dist/nutui.react.es.js +236 -247
  48. package/dist/nutui.react.umd.js +236 -247
  49. package/dist/packages/uploader/uploader.scss +3 -1
  50. package/dist/style.css +1 -1
  51. package/dist/types/packages/swiperitem/swiperitem.d.ts +0 -1
  52. package/dist/types/packages/watermark/watermark.d.ts +2 -0
  53. package/dist/types/packages/watermark/watermark.taro.d.ts +10 -0
  54. package/dist/types/utils/get-scroll-parent.d.ts +1 -1
  55. package/dist/types/utils/use-client-rect.d.ts +1 -1
  56. package/package.json +2 -2
@@ -2,7 +2,7 @@
2
2
  typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("@tarojs/components"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "@tarojs/components", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.components, global2.ReactDOM));
3
3
  })(this, function(exports2, React, Taro, components, ReactDOM) {
4
4
  "use strict";/*!
5
- * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:23:26 GMT+0800 (China Standard Time)
5
+ * @nutui/nutui-react-taro v2.6.15 Fri Jul 26 2024 15:18:34 GMT+0800 (China Standard Time)
6
6
  * (c) 2023 @jdf2e.
7
7
  * Released under the MIT License.
8
8
  */
@@ -143,7 +143,6 @@
143
143
  const g$6 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowDown", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgMjg5LjgzYTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM0IDYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDAgNjAuMzYgMGwzODQtMzg0YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM2LTYwLjM0TDUxMiA2NDMuNjd6Ii8+PC9zdmc+" });
144
144
  g$6.defaultProps = k;
145
145
  const g$5 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowLeft", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik03MTIuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjMzLTYwLjM0bC0zODQgMzg0YTQyLjY3IDQyLjY3IDAgMCAwIDAgNjAuMzZsMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMCA2MC4zMy02MC4zNkwzNTkgNTEyeiIvPjwvc3ZnPg==" });
146
- g$5.defaultProps = k;
147
146
  const a$2 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "ArrowUp", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgNzM0LjE3YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM0LTYwLjM0bDM4NC0zODRhNDIuNjcgNDIuNjcgMCAwIDEgNjAuMzYgMGwzODQgMzg0YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM2IDYwLjM0TDUxMiAzODAuMzN6Ii8+PC9zdmc+" });
148
147
  a$2.defaultProps = k;
149
148
  const g$4 = (M) => /* @__PURE__ */ React.createElement(S, { ...M, name: M.name || "CheckChecked", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMzMzMiIGQ9Ik01MDYuNjUgMi44MkMyMjguMDEgMi44Mi4wMyAyMzAuOC4wMyA1MDkuNDRzMjI3Ljk4IDUwNi42MiA1MDYuNjIgNTA2LjYyIDUwNi42Mi0yMjcuOTggNTA2LjYzLTUwNi42MlM3ODguMTEgMi44MiA1MDYuNjUgMi44Mm0wIDc4OC4wOGMtMTU0LjggMC0yODEuNDYtMTI2LjY2LTI4MS40NS0yODEuNDZzMTI2LjY2LTI4MS40NiAyODEuNDUtMjgxLjQ2IDI4MS40NiAxMjYuNjYgMjgxLjQ2IDI4MS40NlM2NjEuNDUgNzkwLjkgNTA2LjY1IDc5MC45Ii8+PHBhdGggZmlsbD0iIzMzMyIgZD0iTTM4MCA1MDkuNDRhMTI2LjY2IDEyNi42NiAwIDEgMCAyNTMuMzEgMCAxMjYuNjYgMTI2LjY2IDAgMSAwLTI1My4zMSAwIi8+PC9zdmc+" });
@@ -213,7 +212,7 @@
213
212
  style: {}
214
213
  };
215
214
  const prefixCls$2 = "nut-button";
216
- const defaultProps$1v = {
215
+ const defaultProps$1u = {
217
216
  ...ComponentDefaults,
218
217
  color: "",
219
218
  type: "default",
@@ -248,7 +247,7 @@
248
247
  onClick,
249
248
  ...rest
250
249
  } = {
251
- ...defaultProps$1v,
250
+ ...defaultProps$1u,
252
251
  ...props
253
252
  };
254
253
  const getStyle = React.useCallback(() => {
@@ -315,7 +314,7 @@
315
314
  );
316
315
  Button.displayName = "NutButton";
317
316
  const CellGroupContext = React.createContext(null);
318
- const defaultProps$1u = {
317
+ const defaultProps$1t = {
319
318
  ...ComponentDefaults,
320
319
  title: "",
321
320
  description: "",
@@ -324,7 +323,7 @@
324
323
  const classPrefix$r = "nut-cell-group";
325
324
  const CellGroup = (props) => {
326
325
  const { children, className, title, description, divider, ...rest } = {
327
- ...defaultProps$1u,
326
+ ...defaultProps$1t,
328
327
  ...props
329
328
  };
330
329
  return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React.createElement(
@@ -336,7 +335,7 @@
336
335
  ));
337
336
  };
338
337
  CellGroup.displayName = "NutCellGroup";
339
- const defaultProps$1t = {
338
+ const defaultProps$1s = {
340
339
  ...ComponentDefaults,
341
340
  title: null,
342
341
  description: null,
@@ -361,7 +360,7 @@
361
360
  style,
362
361
  ...rest
363
362
  } = {
364
- ...defaultProps$1t,
363
+ ...defaultProps$1s,
365
364
  ...props
366
365
  };
367
366
  const handleClick = (event) => {
@@ -1536,7 +1535,7 @@
1536
1535
  const pxCheck = (value) => {
1537
1536
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
1538
1537
  };
1539
- const defaultProps$1s = {
1538
+ const defaultProps$1r = {
1540
1539
  src: "",
1541
1540
  error: true,
1542
1541
  loading: true
@@ -1555,7 +1554,7 @@
1555
1554
  onLoad,
1556
1555
  onError,
1557
1556
  ...rest
1558
- } = { ...defaultProps$1s, ...props };
1557
+ } = { ...defaultProps$1r, ...props };
1559
1558
  const [innerLoading, setInnerLoading] = React.useState(true);
1560
1559
  const [isError, setIsError] = React.useState(false);
1561
1560
  const handleLoad = (e2) => {
@@ -3574,7 +3573,7 @@
3574
3573
  };
3575
3574
  Overlay.displayName = "NutOverlay";
3576
3575
  const DataContext$1 = React.createContext({});
3577
- const defaultProps$1r = {
3576
+ const defaultProps$1q = {
3578
3577
  ...ComponentDefaults,
3579
3578
  span: "24",
3580
3579
  offset: "0",
@@ -3582,7 +3581,7 @@
3582
3581
  };
3583
3582
  const Col = (props) => {
3584
3583
  const { className, style, span, offset, children, onClick } = {
3585
- ...defaultProps$1r,
3584
+ ...defaultProps$1q,
3586
3585
  ...props
3587
3586
  };
3588
3587
  const [colName, setColName] = React.useState("");
@@ -3615,7 +3614,7 @@
3615
3614
  );
3616
3615
  };
3617
3616
  Col.displayName = "NutCol";
3618
- const defaultProps$1q = {
3617
+ const defaultProps$1p = {
3619
3618
  ...ComponentDefaults,
3620
3619
  contentPosition: "center",
3621
3620
  direction: "horizontal"
@@ -3623,7 +3622,7 @@
3623
3622
  const classPrefix$o = `nut-divider`;
3624
3623
  const Divider = (props) => {
3625
3624
  const { children, contentPosition, style, className, direction, ...rest } = {
3626
- ...defaultProps$1q,
3625
+ ...defaultProps$1p,
3627
3626
  ...props
3628
3627
  };
3629
3628
  const classes = direction === "horizontal" ? classNames({
@@ -3644,7 +3643,7 @@
3644
3643
  }
3645
3644
  };
3646
3645
  const GridContext = React.createContext(gridContext);
3647
- const defaultProps$1p = {
3646
+ const defaultProps$1o = {
3648
3647
  text: "",
3649
3648
  columns: 4,
3650
3649
  gap: 0,
@@ -3670,7 +3669,7 @@
3670
3669
  onClick,
3671
3670
  ...rest
3672
3671
  } = {
3673
- ...defaultProps$1p,
3672
+ ...defaultProps$1o,
3674
3673
  ...props
3675
3674
  };
3676
3675
  const classPrefix2 = "nut-grid-item";
@@ -3729,7 +3728,7 @@
3729
3728
  );
3730
3729
  };
3731
3730
  GridItem.displayName = "NutGridItem";
3732
- const defaultProps$1o = {
3731
+ const defaultProps$1n = {
3733
3732
  columns: 4,
3734
3733
  gap: 0,
3735
3734
  center: true,
@@ -3750,7 +3749,7 @@
3750
3749
  className,
3751
3750
  onClick,
3752
3751
  ...rest
3753
- } = { ...defaultProps$1o, ...props };
3752
+ } = { ...defaultProps$1n, ...props };
3754
3753
  const childrenDom = React.Children.toArray(children);
3755
3754
  const classPrefix2 = "nut-grid";
3756
3755
  const rootClass = () => {
@@ -3786,14 +3785,14 @@
3786
3785
  };
3787
3786
  Grid.displayName = "NutGrid";
3788
3787
  Grid.Item = GridItem;
3789
- const defaultProps$1n = {};
3788
+ const defaultProps$1m = {};
3790
3789
  const Layout = (props) => {
3791
- ({ ...defaultProps$1n, ...props });
3790
+ ({ ...defaultProps$1m, ...props });
3792
3791
  return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
3793
3792
  };
3794
3793
  Layout.displayName = "NutLayout";
3795
3794
  const classPrefix$n = "nut-row";
3796
- const defaultProps$1m = {
3795
+ const defaultProps$1l = {
3797
3796
  ...ComponentDefaults,
3798
3797
  type: "",
3799
3798
  justify: "start",
@@ -3813,7 +3812,7 @@
3813
3812
  gutter,
3814
3813
  onClick
3815
3814
  } = {
3816
- ...defaultProps$1m,
3815
+ ...defaultProps$1l,
3817
3816
  ...props
3818
3817
  };
3819
3818
  const getClass = (prefix, type22) => {
@@ -3847,12 +3846,12 @@
3847
3846
  };
3848
3847
  Row.displayName = "NutRow";
3849
3848
  const prefixCls$1 = "nut-space";
3850
- const defaultProps$1l = {
3849
+ const defaultProps$1k = {
3851
3850
  direction: "horizontal"
3852
3851
  };
3853
3852
  const Space = (props) => {
3854
3853
  const { className, style, children, wrap, align, direction, justify } = {
3855
- ...defaultProps$1l,
3854
+ ...defaultProps$1k,
3856
3855
  ...props
3857
3856
  };
3858
3857
  const cls = classNames(
@@ -3944,7 +3943,7 @@
3944
3943
  }
3945
3944
  return Promise.resolve(makeRect(0, 0));
3946
3945
  };
3947
- const defaultProps$1k = {
3946
+ const defaultProps$1j = {
3948
3947
  ...ComponentDefaults,
3949
3948
  position: "top",
3950
3949
  zIndex: 900
@@ -3961,7 +3960,7 @@
3961
3960
  className,
3962
3961
  onChange,
3963
3962
  ...rest
3964
- } = { ...defaultProps$1k, ...props };
3963
+ } = { ...defaultProps$1j, ...props };
3965
3964
  const stickyRef = React.useRef(null);
3966
3965
  const rootRef = React.useRef(null);
3967
3966
  const [rootRect, setRootRect] = React.useState({});
@@ -3977,13 +3976,10 @@
3977
3976
  width: ""
3978
3977
  };
3979
3978
  }
3980
- const style2 = {};
3981
- if (rootRect.height) {
3982
- style2.height = rootRect.height;
3983
- }
3984
- if (rootRect.width) {
3985
- style2.width = rootRect.width;
3986
- }
3979
+ const style2 = {
3980
+ height: rootRect.height ?? "",
3981
+ width: rootRect.width ?? ""
3982
+ };
3987
3983
  return style2;
3988
3984
  }, [fixed, rootRect.height, rootRect.width]);
3989
3985
  const stickyStyle = React.useMemo(() => {
@@ -3994,36 +3990,37 @@
3994
3990
  [position]: ""
3995
3991
  };
3996
3992
  }
3997
- const style2 = {};
3998
- if (rootRect.height) style2.height = rootRect.height;
3999
- if (rootRect.width) style2.width = rootRect.width;
4000
- style2.transform = `translate3d(0, ${transform}px, 0)`;
4001
- style2[position] = threshold;
4002
- style2.zIndex = zIndex;
3993
+ const style2 = {
3994
+ height: rootRect.height ?? "",
3995
+ width: rootRect.width ?? "",
3996
+ transform: `translate3d(0, ${transform}px, 0)`,
3997
+ [position]: threshold,
3998
+ zIndex
3999
+ };
4003
4000
  return style2;
4004
4001
  }, [fixed, rootRect.height, rootRect.width, transform, position]);
4005
4002
  const handleScroll = async (scrollTop) => {
4006
4003
  const curRootRect = await getRectByTaro(rootRef.current);
4007
4004
  const stickyRect = await getRectByTaro(stickyRef.current);
4008
- if (curRootRect && stickyRect) {
4009
- setRootRect(curRootRect);
4010
- if (position === "top") {
4011
- if (container) {
4012
- const containerRect = await getRectByTaro(container.current);
4013
- const difference = containerRect.bottom - threshold - curRootRect.height;
4014
- const curTransform = difference < 0 ? difference : 0;
4015
- setTransform(curTransform);
4016
- const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
4017
- setFixed(curFixed);
4018
- } else {
4019
- setFixed(threshold > curRootRect.top);
4020
- }
4005
+ if (!curRootRect || !stickyRect) {
4006
+ console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
4007
+ return;
4008
+ }
4009
+ setRootRect(curRootRect);
4010
+ if (position === "top") {
4011
+ if (container) {
4012
+ const containerRect = await getRectByTaro(container.current);
4013
+ const difference = containerRect.bottom - threshold - curRootRect.height;
4014
+ const curTransform = difference < 0 ? difference : 0;
4015
+ setTransform(curTransform);
4016
+ const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
4017
+ setFixed(curFixed);
4021
4018
  } else {
4022
- const windowHeight = Taro.getSystemInfoSync().windowHeight;
4023
- setFixed(windowHeight - threshold < curRootRect.bottom);
4019
+ setFixed(threshold > curRootRect.top);
4024
4020
  }
4025
4021
  } else {
4026
- console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
4022
+ const windowHeight = Taro.getSystemInfoSync().windowHeight;
4023
+ setFixed(windowHeight - threshold < curRootRect.bottom);
4027
4024
  }
4028
4025
  };
4029
4026
  const getElement = React.useCallback(() => {
@@ -4079,7 +4076,7 @@
4079
4076
  );
4080
4077
  };
4081
4078
  SafeArea.displayName = "NutSafeArea";
4082
- const defaultProps$1j = {
4079
+ const defaultProps$1i = {
4083
4080
  ...ComponentDefaults,
4084
4081
  threshold: 200,
4085
4082
  zIndex: 900,
@@ -4088,7 +4085,7 @@
4088
4085
  const BackTop = (props) => {
4089
4086
  const rtl = useRtl();
4090
4087
  const { children, threshold, zIndex, className, duration, style, onClick } = {
4091
- ...defaultProps$1j,
4088
+ ...defaultProps$1i,
4092
4089
  ...props
4093
4090
  };
4094
4091
  const classPrefix2 = "nut-backtop";
@@ -4132,7 +4129,7 @@
4132
4129
  };
4133
4130
  BackTop.displayName = "NutBackTop";
4134
4131
  const elevatorContext = React.createContext({});
4135
- const defaultProps$1i = {
4132
+ const defaultProps$1h = {
4136
4133
  ...ComponentDefaults,
4137
4134
  height: "200px",
4138
4135
  floorKey: "title",
@@ -4159,7 +4156,7 @@
4159
4156
  children,
4160
4157
  ...rest
4161
4158
  } = {
4162
- ...defaultProps$1i,
4159
+ ...defaultProps$1h,
4163
4160
  ...props
4164
4161
  };
4165
4162
  const classPrefix2 = "nut-elevator";
@@ -4374,7 +4371,7 @@
4374
4371
  };
4375
4372
  Elevator.displayName = "NutElevator";
4376
4373
  Elevator.Context = elevatorContext;
4377
- const defaultProps$1h = {
4374
+ const defaultProps$1g = {
4378
4375
  ...ComponentDefaults,
4379
4376
  activeText: "",
4380
4377
  inactiveText: "",
@@ -4402,7 +4399,7 @@
4402
4399
  content,
4403
4400
  ...rest
4404
4401
  } = {
4405
- ...defaultProps$1h,
4402
+ ...defaultProps$1g,
4406
4403
  ...props
4407
4404
  };
4408
4405
  const classPrefix2 = "nut-fixednav";
@@ -4455,7 +4452,7 @@
4455
4452
  );
4456
4453
  };
4457
4454
  FixedNav.displayName = "NutFixedNav";
4458
- const defaultProps$1g = {
4455
+ const defaultProps$1f = {
4459
4456
  ...ComponentDefaults,
4460
4457
  left: "",
4461
4458
  right: "",
@@ -4480,7 +4477,7 @@
4480
4477
  zIndex,
4481
4478
  onBackClick
4482
4479
  } = {
4483
- ...defaultProps$1g,
4480
+ ...defaultProps$1f,
4484
4481
  ...props
4485
4482
  };
4486
4483
  const classPrefix2 = "nut-navbar";
@@ -4559,7 +4556,7 @@
4559
4556
  return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement(components.View, { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
4560
4557
  };
4561
4558
  NavBar.displayName = "NutNavBar";
4562
- const defaultProps$1f = {
4559
+ const defaultProps$1e = {
4563
4560
  ...ComponentDefaults,
4564
4561
  position: "center",
4565
4562
  transition: "",
@@ -4612,7 +4609,7 @@
4612
4609
  afterShow,
4613
4610
  afterClose,
4614
4611
  onClick
4615
- } = { ...defaultProps$1f, ...props };
4612
+ } = { ...defaultProps$1e, ...props };
4616
4613
  let innerIndex = zIndex || _zIndex;
4617
4614
  const [index, setIndex] = React.useState(innerIndex);
4618
4615
  const [innerVisible, setInnerVisible] = React.useState(visible);
@@ -4754,7 +4751,7 @@
4754
4751
  };
4755
4752
  Popup.displayName = "NutPopup";
4756
4753
  const OffsetContext = React.createContext(20);
4757
- const defaultProps$1e = {
4754
+ const defaultProps$1d = {
4758
4755
  ...ComponentDefaults,
4759
4756
  position: "left",
4760
4757
  width: "80%"
@@ -4772,7 +4769,7 @@
4772
4769
  indent,
4773
4770
  ...rest
4774
4771
  } = {
4775
- ...defaultProps$1e,
4772
+ ...defaultProps$1d,
4776
4773
  ...props
4777
4774
  };
4778
4775
  const innerIndent = indent ? Number(indent) : 20;
@@ -4830,13 +4827,13 @@
4830
4827
  title
4831
4828
  );
4832
4829
  };
4833
- const defaultProps$1d = {
4830
+ const defaultProps$1c = {
4834
4831
  open: true
4835
4832
  };
4836
4833
  const SubSideNavBar = (props) => {
4837
4834
  const classPrefix2 = "nut-subsidenavbar";
4838
4835
  const { title, value, children, onClick, open: open2, ...rest } = {
4839
- ...defaultProps$1d,
4836
+ ...defaultProps$1c,
4840
4837
  ...props
4841
4838
  };
4842
4839
  const [subShow, setSubShow] = React.useState(open2);
@@ -4914,7 +4911,7 @@
4914
4911
  );
4915
4912
  return [stateRef.current, setState];
4916
4913
  }
4917
- const defaultProps$1c = {
4914
+ const defaultProps$1b = {
4918
4915
  ...ComponentDefaults,
4919
4916
  value: "",
4920
4917
  dot: false,
@@ -4939,7 +4936,7 @@
4939
4936
  color,
4940
4937
  fill
4941
4938
  } = {
4942
- ...defaultProps$1c,
4939
+ ...defaultProps$1b,
4943
4940
  ...props
4944
4941
  };
4945
4942
  const classPrefix2 = "nut-badge";
@@ -4993,7 +4990,7 @@
4993
4990
  };
4994
4991
  Badge.displayName = "NutBadge";
4995
4992
  const TabbarContext = React.createContext(null);
4996
- const defaultProps$1b = {
4993
+ const defaultProps$1a = {
4997
4994
  ...ComponentDefaults,
4998
4995
  title: "",
4999
4996
  icon: null,
@@ -5019,7 +5016,7 @@
5019
5016
  index,
5020
5017
  ...rest
5021
5018
  } = {
5022
- ...defaultProps$1b,
5019
+ ...defaultProps$1a,
5023
5020
  ...props
5024
5021
  };
5025
5022
  const active = index === (ctx == null ? void 0 : ctx.selectIndex);
@@ -5057,7 +5054,7 @@
5057
5054
  icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
5058
5055
  );
5059
5056
  };
5060
- const defaultProps$1a = {
5057
+ const defaultProps$19 = {
5061
5058
  ...ComponentDefaults,
5062
5059
  defaultValue: 0,
5063
5060
  fixed: false,
@@ -5080,7 +5077,7 @@
5080
5077
  style,
5081
5078
  onSwitch
5082
5079
  } = {
5083
- ...defaultProps$1a,
5080
+ ...defaultProps$19,
5084
5081
  ...props
5085
5082
  };
5086
5083
  const classPrefix2 = "nut-tabbar";
@@ -5122,14 +5119,14 @@
5122
5119
  };
5123
5120
  Tabbar.displayName = "NutTabbar";
5124
5121
  Tabbar.Item = TabbarItem;
5125
- const defaultProps$19 = {
5122
+ const defaultProps$18 = {
5126
5123
  title: "",
5127
5124
  value: "",
5128
5125
  disabled: false
5129
5126
  };
5130
5127
  const TabPane = (props) => {
5131
5128
  const { children, autoHeightClassName, className, disabled } = {
5132
- ...defaultProps$19,
5129
+ ...defaultProps$18,
5133
5130
  ...props
5134
5131
  };
5135
5132
  const classPrefix2 = "nut-tabpane";
@@ -5170,7 +5167,7 @@
5170
5167
  const idRef = React.useRef(uniqueId());
5171
5168
  return idRef.current;
5172
5169
  }
5173
- const defaultProps$18 = {
5170
+ const defaultProps$17 = {
5174
5171
  ...ComponentDefaults,
5175
5172
  tabStyle: {},
5176
5173
  activeColor: "",
@@ -5200,7 +5197,7 @@
5200
5197
  defaultValue: outerDefaultValue,
5201
5198
  ...rest
5202
5199
  } = {
5203
- ...defaultProps$18,
5200
+ ...defaultProps$17,
5204
5201
  ...props
5205
5202
  };
5206
5203
  const uuid = useUuid();
@@ -5423,7 +5420,7 @@
5423
5420
  };
5424
5421
  Tabs.displayName = "NutTabs";
5425
5422
  Tabs.TabPane = TabPane;
5426
- const defaultProps$17 = {
5423
+ const defaultProps$16 = {
5427
5424
  type: "custom",
5428
5425
  existList: [],
5429
5426
  defaultIcon: null,
@@ -5442,7 +5439,7 @@
5442
5439
  onSelect,
5443
5440
  onSwitch,
5444
5441
  ...rest
5445
- } = { ...defaultProps$17, ...props };
5442
+ } = { ...defaultProps$16, ...props };
5446
5443
  const classPrefix2 = "nut-address";
5447
5444
  const selectedExist = (item) => {
5448
5445
  existList.forEach((list, index) => {
@@ -5604,7 +5601,7 @@
5604
5601
  return pathNodes;
5605
5602
  }
5606
5603
  }
5607
- const defaultProps$16 = {
5604
+ const defaultProps$15 = {
5608
5605
  ...ComponentDefaults,
5609
5606
  activeColor: "",
5610
5607
  activeIcon: "checklist",
@@ -5649,7 +5646,7 @@
5649
5646
  onClose,
5650
5647
  onChange,
5651
5648
  onPathChange
5652
- } = { ...defaultProps$16, ...props };
5649
+ } = { ...defaultProps$15, ...props };
5653
5650
  const [tabvalue, setTabvalue] = React.useState("c1");
5654
5651
  const [optionsData, setOptionsData] = React.useState([]);
5655
5652
  const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
@@ -5957,7 +5954,7 @@
5957
5954
  };
5958
5955
  const Cascader = React.forwardRef(InternalCascader);
5959
5956
  Cascader.displayName = "NutCascader";
5960
- const defaultProps$15 = {
5957
+ const defaultProps$14 = {
5961
5958
  ...ComponentDefaults,
5962
5959
  visible: false,
5963
5960
  type: "custom",
@@ -5984,7 +5981,7 @@
5984
5981
  onPathChange,
5985
5982
  ...rest
5986
5983
  } = {
5987
- ...defaultProps$15,
5984
+ ...defaultProps$14,
5988
5985
  ...props
5989
5986
  };
5990
5987
  return /* @__PURE__ */ React.createElement(React.Fragment, null, type2 === "custom" && /* @__PURE__ */ React.createElement(
@@ -6009,7 +6006,7 @@
6009
6006
  }
6010
6007
  ));
6011
6008
  };
6012
- const defaultProps$14 = {
6009
+ const defaultProps$13 = {
6013
6010
  ...ComponentDefaults,
6014
6011
  defaultValue: [],
6015
6012
  type: "custom",
@@ -6051,7 +6048,7 @@
6051
6048
  onSwitch,
6052
6049
  ...rest
6053
6050
  } = {
6054
- ...defaultProps$14,
6051
+ ...defaultProps$13,
6055
6052
  ...props
6056
6053
  };
6057
6054
  const classPrefix2 = "nut-address";
@@ -6389,7 +6386,7 @@
6389
6386
  const isStartAndEnd = (days) => {
6390
6387
  return days.length >= 2 && Utils.isEqual(days[0], days[1]);
6391
6388
  };
6392
- const defaultProps$13 = {
6389
+ const defaultProps$12 = {
6393
6390
  ...ComponentDefaults,
6394
6391
  type: "single",
6395
6392
  autoBackfill: false,
@@ -6450,7 +6447,7 @@
6450
6447
  onUpdate,
6451
6448
  onDayClick,
6452
6449
  onPageChange
6453
- } = { ...defaultProps$13, ...props };
6450
+ } = { ...defaultProps$12, ...props };
6454
6451
  const weekdays = locale.calendaritem.weekdays;
6455
6452
  const weeks = [
6456
6453
  ...weekdays.slice(firstDayOfWeek, 7),
@@ -6746,8 +6743,10 @@
6746
6743
  };
6747
6744
  React.useEffect(() => {
6748
6745
  setCurrentDate(resetDefaultValue() || []);
6749
- popup && resetRender();
6750
6746
  }, [defaultValue]);
6747
+ React.useEffect(() => {
6748
+ popup && resetRender();
6749
+ }, [currentDate]);
6751
6750
  const scrollToDate = (date2) => {
6752
6751
  if (Utils.compareDate(date2, propStartDate)) {
6753
6752
  date2 = propStartDate;
@@ -6998,7 +6997,7 @@
6998
6997
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
6999
6998
  });
7000
6999
  CalendarItem.displayName = "NutCalendarItem";
7001
- const defaultProps$12 = {
7000
+ const defaultProps$11 = {
7002
7001
  ...ComponentDefaults,
7003
7002
  type: "single",
7004
7003
  autoBackfill: false,
@@ -7061,7 +7060,7 @@
7061
7060
  onConfirm,
7062
7061
  onDayClick,
7063
7062
  onPageChange
7064
- } = { ...defaultProps$12, ...props };
7063
+ } = { ...defaultProps$11, ...props };
7065
7064
  const calendarRef = React.useRef(null);
7066
7065
  const close2 = () => {
7067
7066
  onClose && onClose();
@@ -7210,7 +7209,7 @@
7210
7209
  )
7211
7210
  ];
7212
7211
  };
7213
- const defaultProps$11 = {
7212
+ const defaultProps$10 = {
7214
7213
  ...ComponentDefaults,
7215
7214
  type: "single",
7216
7215
  firstDayOfWeek: 0
@@ -7234,7 +7233,7 @@
7234
7233
  onDayClick,
7235
7234
  onPageChange,
7236
7235
  onChange
7237
- } = { ...defaultProps$11, ...props };
7236
+ } = { ...defaultProps$10, ...props };
7238
7237
  const [month, setMonth] = React.useState(() => {
7239
7238
  let date2 = new Date(Date.now());
7240
7239
  const val = value || defaultValue;
@@ -7538,7 +7537,7 @@
7538
7537
  });
7539
7538
  CalendarCard.displayName = "NutCalendarCard";
7540
7539
  const CheckboxGroupContext = React.createContext(null);
7541
- const defaultProps$10 = {
7540
+ const defaultProps$$ = {
7542
7541
  max: void 0,
7543
7542
  min: void 0,
7544
7543
  list: false,
@@ -7558,17 +7557,17 @@
7558
7557
  className,
7559
7558
  disabled,
7560
7559
  list,
7561
- onChange,
7562
7560
  value,
7563
7561
  defaultValue,
7564
7562
  max,
7565
7563
  min,
7566
- onLimit,
7567
7564
  labelPosition,
7568
7565
  direction,
7569
7566
  options,
7567
+ onChange,
7568
+ onLimit,
7570
7569
  ...rest
7571
- } = { ...defaultProps$10, ...props };
7570
+ } = { ...defaultProps$$, ...props };
7572
7571
  React.useImperativeHandle(ref, () => ({
7573
7572
  toggle(state) {
7574
7573
  if (state === false) {
@@ -7595,8 +7594,8 @@
7595
7594
  }
7596
7595
  }));
7597
7596
  const [_value, setValue] = usePropsValue({
7598
- value: props.value,
7599
- defaultValue: props.defaultValue,
7597
+ value,
7598
+ defaultValue,
7600
7599
  finalValue: [],
7601
7600
  onChange
7602
7601
  });
@@ -7648,7 +7647,7 @@
7648
7647
  className: classNames(
7649
7648
  classPrefix$j,
7650
7649
  {
7651
- [`nut-checkboxgroup-${props.direction}`]: props.direction,
7650
+ [`nut-checkboxgroup-${direction}`]: direction,
7652
7651
  [`nut-checkboxgroup-list`]: list
7653
7652
  },
7654
7653
  className
@@ -7660,9 +7659,8 @@
7660
7659
  );
7661
7660
  }
7662
7661
  );
7663
- CheckboxGroup.defaultProps = defaultProps$10;
7664
7662
  CheckboxGroup.displayName = "NutCheckboxGroup";
7665
- const defaultProps$$ = {
7663
+ const defaultProps$_ = {
7666
7664
  ...ComponentDefaults,
7667
7665
  disabled: false,
7668
7666
  shape: "round",
@@ -7676,7 +7674,7 @@
7676
7674
  const classPrefix$i = "nut-checkbox";
7677
7675
  const Checkbox = (props) => {
7678
7676
  const { children } = {
7679
- ...defaultProps$$,
7677
+ ...defaultProps$_,
7680
7678
  ...props
7681
7679
  };
7682
7680
  const {
@@ -8057,7 +8055,7 @@
8057
8055
  }, []);
8058
8056
  return [refs.current, setRefs, reset];
8059
8057
  }
8060
- const defaultProps$_ = {
8058
+ const defaultProps$Z = {
8061
8059
  ...ComponentDefaults,
8062
8060
  visible: false,
8063
8061
  title: "",
@@ -8088,7 +8086,7 @@
8088
8086
  afterClose,
8089
8087
  onChange,
8090
8088
  ...rest
8091
- } = { ...defaultProps$_, ...props };
8089
+ } = { ...defaultProps$Z, ...props };
8092
8090
  const classPrefix2 = "nut-picker";
8093
8091
  const classes = classNames(classPrefix2, className);
8094
8092
  const [selectedValue, setSelectedValue] = usePropsValue({
@@ -8400,7 +8398,7 @@
8400
8398
  return str;
8401
8399
  };
8402
8400
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
8403
- const defaultProps$Z = {
8401
+ const defaultProps$Y = {
8404
8402
  ...ComponentDefaults,
8405
8403
  visible: false,
8406
8404
  title: "",
@@ -8433,7 +8431,7 @@
8433
8431
  style,
8434
8432
  ...rest
8435
8433
  } = {
8436
- ...defaultProps$Z,
8434
+ ...defaultProps$Y,
8437
8435
  ...props
8438
8436
  };
8439
8437
  const { locale } = useConfig$1();
@@ -8557,7 +8555,7 @@
8557
8555
  if (!isEqual) {
8558
8556
  setSelectedDate(formatValue(newDate));
8559
8557
  }
8560
- props.onChange && props.onChange(
8558
+ onChange == null ? void 0 : onChange(
8561
8559
  selectedOptions,
8562
8560
  [
8563
8561
  String(newDate.getFullYear()),
@@ -8654,8 +8652,8 @@
8654
8652
  }
8655
8653
  pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
8656
8654
  setPickerValue([...pickerValue]);
8657
- if (props.filter && props.filter(type22, arr)) {
8658
- return props.filter(type22, arr);
8655
+ if (filter == null ? void 0 : filter(type22, arr)) {
8656
+ return filter == null ? void 0 : filter(type22, arr);
8659
8657
  }
8660
8658
  return arr;
8661
8659
  };
@@ -8722,7 +8720,6 @@
8722
8720
  )
8723
8721
  );
8724
8722
  };
8725
- DatePicker.defaultProps = defaultProps$Z;
8726
8723
  DatePicker.displayName = "NutDatePicker";
8727
8724
  const Context = React.createContext({});
8728
8725
  function _extends() {
@@ -9959,7 +9956,7 @@
9959
9956
  }
9960
9957
  return [formRef.current];
9961
9958
  };
9962
- const defaultProps$Y = {
9959
+ const defaultProps$X = {
9963
9960
  ...ComponentDefaults,
9964
9961
  labelPosition: "right",
9965
9962
  starPosition: "left",
@@ -9990,7 +9987,7 @@
9990
9987
  starPosition,
9991
9988
  form
9992
9989
  } = {
9993
- ...defaultProps$Y,
9990
+ ...defaultProps$X,
9994
9991
  ...props
9995
9992
  };
9996
9993
  let formInstance;
@@ -10046,7 +10043,7 @@
10046
10043
  }
10047
10044
  ).$$typeof === component.type.$$typeof;
10048
10045
  }
10049
- const defaultProps$X = {
10046
+ const defaultProps$W = {
10050
10047
  ...ComponentDefaults,
10051
10048
  required: false,
10052
10049
  name: "",
@@ -10142,7 +10139,7 @@
10142
10139
  style,
10143
10140
  errorMessageAlign
10144
10141
  } = {
10145
- ...defaultProps$X,
10142
+ ...defaultProps$W,
10146
10143
  ...this.props
10147
10144
  };
10148
10145
  const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
@@ -10211,7 +10208,7 @@
10211
10208
  return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
10212
10209
  }
10213
10210
  };
10214
- _FormItem.defaultProps = defaultProps$X;
10211
+ _FormItem.defaultProps = defaultProps$W;
10215
10212
  _FormItem.contextType = Context;
10216
10213
  let FormItem = _FormItem;
10217
10214
  const InnerForm = Form;
@@ -10241,7 +10238,7 @@
10241
10238
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
10242
10239
  return value.replace(regExp, "");
10243
10240
  }
10244
- const defaultProps$W = {
10241
+ const defaultProps$V = {
10245
10242
  ...ComponentDefaults,
10246
10243
  type: "text",
10247
10244
  name: "",
@@ -10286,7 +10283,7 @@
10286
10283
  value: _value,
10287
10284
  ...rest
10288
10285
  } = {
10289
- ...defaultProps$W,
10286
+ ...defaultProps$V,
10290
10287
  ...props
10291
10288
  };
10292
10289
  const [value, setValue] = usePropsValue({
@@ -10437,7 +10434,7 @@
10437
10434
  }
10438
10435
  );
10439
10436
  Input.displayName = "NutInput";
10440
- const defaultProps$V = {
10437
+ const defaultProps$U = {
10441
10438
  ...ComponentDefaults,
10442
10439
  disabled: false,
10443
10440
  readOnly: false,
@@ -10475,7 +10472,7 @@
10475
10472
  onChange,
10476
10473
  ...restProps
10477
10474
  } = {
10478
- ...defaultProps$V,
10475
+ ...defaultProps$U,
10479
10476
  ...props
10480
10477
  };
10481
10478
  const classes = classNames(classPrefix$h, className, {
@@ -10628,7 +10625,7 @@
10628
10625
  )));
10629
10626
  };
10630
10627
  InputNumber.displayName = "NutInputNumber";
10631
- const defaultProps$U = {
10628
+ const defaultProps$T = {
10632
10629
  ...ComponentDefaults,
10633
10630
  columns: 1,
10634
10631
  direction: "down",
@@ -10659,7 +10656,7 @@
10659
10656
  parent,
10660
10657
  index
10661
10658
  } = {
10662
- ...defaultProps$U,
10659
+ ...defaultProps$T,
10663
10660
  ...props
10664
10661
  };
10665
10662
  const [showPopup, setShowPopup] = React.useState(show2);
@@ -10840,7 +10837,7 @@
10840
10837
  ));
10841
10838
  });
10842
10839
  MenuItem.displayName = "NutMenuItem";
10843
- const defaultProps$T = {
10840
+ const defaultProps$S = {
10844
10841
  ...ComponentDefaults,
10845
10842
  activeColor: "",
10846
10843
  closeOnOverlayClick: true,
@@ -10867,7 +10864,7 @@
10867
10864
  onOpen,
10868
10865
  ...rest
10869
10866
  } = {
10870
- ...defaultProps$T,
10867
+ ...defaultProps$S,
10871
10868
  ...props
10872
10869
  };
10873
10870
  const menuRef = React.useRef(null);
@@ -10946,14 +10943,10 @@
10946
10943
  return /* @__PURE__ */ React.createElement(
10947
10944
  "div",
10948
10945
  {
10949
- className: classNames(
10950
- "nut-menu-title ",
10951
- {
10952
- active: showMenuItem[index],
10953
- disabled
10954
- },
10955
- className
10956
- ),
10946
+ className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
10947
+ active: showMenuItem[index],
10948
+ disabled
10949
+ }),
10957
10950
  style: { color: showMenuItem[index] ? activeColor : "" },
10958
10951
  key: index,
10959
10952
  onClick: () => {
@@ -11130,7 +11123,7 @@
11130
11123
  };
11131
11124
  NumberKeyboard.displayName = "NutNumberKeyboard";
11132
11125
  const RadioContext = React.createContext(null);
11133
- const defaultProps$S = {
11126
+ const defaultProps$R = {
11134
11127
  labelPosition: "right",
11135
11128
  onChange: (value) => {
11136
11129
  },
@@ -11152,7 +11145,7 @@
11152
11145
  options,
11153
11146
  disabled,
11154
11147
  ...rest
11155
- } = { ...defaultProps$S, ...props };
11148
+ } = { ...defaultProps$R, ...props };
11156
11149
  const [val2State, setVal2State] = usePropsValue({
11157
11150
  defaultValue: props.defaultValue,
11158
11151
  value: props.value,
@@ -11209,9 +11202,8 @@
11209
11202
  );
11210
11203
  }
11211
11204
  );
11212
- RadioGroup.defaultProps = defaultProps$S;
11213
11205
  RadioGroup.displayName = "NutRadioGroup";
11214
- const defaultProps$R = {
11206
+ const defaultProps$Q = {
11215
11207
  ...ComponentDefaults,
11216
11208
  disabled: false,
11217
11209
  shape: "round",
@@ -11237,7 +11229,7 @@
11237
11229
  onChange,
11238
11230
  ...others
11239
11231
  } = {
11240
- ...defaultProps$R,
11232
+ ...defaultProps$Q,
11241
11233
  ...props
11242
11234
  };
11243
11235
  let { labelPosition, disabled, ...rest } = others;
@@ -11337,10 +11329,9 @@
11337
11329
  renderRadioItem()
11338
11330
  );
11339
11331
  };
11340
- Radio.defaultProps = defaultProps$R;
11341
11332
  Radio.displayName = "NutRadio";
11342
11333
  Radio.Group = RadioGroup;
11343
- const defaultProps$Q = {
11334
+ const defaultProps$P = {
11344
11335
  ...ComponentDefaults,
11345
11336
  range: false,
11346
11337
  min: 0,
@@ -11369,7 +11360,7 @@
11369
11360
  step,
11370
11361
  value,
11371
11362
  defaultValue
11372
- } = { ...defaultProps$Q, ...props };
11363
+ } = { ...defaultProps$P, ...props };
11373
11364
  const classPrefix2 = "nut-range";
11374
11365
  const [buttonIndex, setButtonIndex] = React.useState(0);
11375
11366
  const [dragStatus, setDragStatus] = React.useState("start");
@@ -11651,7 +11642,7 @@
11651
11642
  ))), maxDescription !== null && /* @__PURE__ */ React.createElement("div", { className: "max" }, maxDescription || max));
11652
11643
  };
11653
11644
  Range.displayName = "NutRange";
11654
- const defaultProps$P = {
11645
+ const defaultProps$O = {
11655
11646
  ...ComponentDefaults,
11656
11647
  count: 5,
11657
11648
  min: 0,
@@ -11679,7 +11670,7 @@
11679
11670
  onChange,
11680
11671
  onTouchEnd
11681
11672
  } = {
11682
- ...defaultProps$P,
11673
+ ...defaultProps$O,
11683
11674
  ...props
11684
11675
  };
11685
11676
  const classPrefix2 = "nut-rate";
@@ -11836,7 +11827,7 @@
11836
11827
  );
11837
11828
  };
11838
11829
  Rate.displayName = "NutRate";
11839
- const defaultProps$O = {
11830
+ const defaultProps$N = {
11840
11831
  ...ComponentDefaults,
11841
11832
  placeholder: "",
11842
11833
  shape: "square",
@@ -11878,7 +11869,7 @@
11878
11869
  onSearch,
11879
11870
  onInputClick
11880
11871
  } = {
11881
- ...defaultProps$O,
11872
+ ...defaultProps$N,
11882
11873
  ...props
11883
11874
  };
11884
11875
  const [value, setValue] = React.useState(() => outerValue);
@@ -11995,7 +11986,7 @@
11995
11986
  );
11996
11987
  };
11997
11988
  SearchBar.displayName = "NutSearchBar";
11998
- const defaultProps$N = {
11989
+ const defaultProps$M = {
11999
11990
  ...ComponentDefaults,
12000
11991
  value: "",
12001
11992
  visible: false,
@@ -12032,7 +12023,7 @@
12032
12023
  onCloseIconClick,
12033
12024
  ...rest
12034
12025
  } = {
12035
- ...defaultProps$N,
12026
+ ...defaultProps$M,
12036
12027
  ...props
12037
12028
  };
12038
12029
  const classPrefix2 = "nut-shortpassword";
@@ -12092,7 +12083,7 @@
12092
12083
  );
12093
12084
  };
12094
12085
  const ShortPassword = React.forwardRef(InternalShortPassword);
12095
- const defaultProps$M = {
12086
+ const defaultProps$L = {
12096
12087
  ...ComponentDefaults,
12097
12088
  canvasId: "spcanvas",
12098
12089
  type: "png",
@@ -12111,7 +12102,7 @@
12111
12102
  onClear,
12112
12103
  ...rest
12113
12104
  } = {
12114
- ...defaultProps$M,
12105
+ ...defaultProps$L,
12115
12106
  ...props
12116
12107
  };
12117
12108
  const classPrefix2 = `nut-signature`;
@@ -12268,7 +12259,7 @@
12268
12259
  InternalSignature
12269
12260
  );
12270
12261
  Signature.displayName = "NutSignature";
12271
- const defaultProps$L = {
12262
+ const defaultProps$K = {
12272
12263
  ...ComponentDefaults,
12273
12264
  disabled: false,
12274
12265
  activeText: "",
@@ -12286,7 +12277,7 @@
12286
12277
  onChange,
12287
12278
  ...rest
12288
12279
  } = {
12289
- ...defaultProps$L,
12280
+ ...defaultProps$K,
12290
12281
  ...props
12291
12282
  };
12292
12283
  const classPrefix2 = "nut-switch";
@@ -12314,7 +12305,7 @@
12314
12305
  );
12315
12306
  };
12316
12307
  Switch.displayName = "NutSwitch";
12317
- const defaultProps$K = {
12308
+ const defaultProps$J = {
12318
12309
  ...ComponentDefaults,
12319
12310
  defaultValue: "",
12320
12311
  showCount: false,
@@ -12342,7 +12333,7 @@
12342
12333
  onBlur,
12343
12334
  onFocus,
12344
12335
  ...rest
12345
- } = { ...defaultProps$K, ...props };
12336
+ } = { ...defaultProps$J, ...props };
12346
12337
  const classPrefix2 = "nut-textarea";
12347
12338
  const compositionRef = React.useRef(false);
12348
12339
  const format2 = (value2) => {
@@ -12572,7 +12563,7 @@
12572
12563
  this.formData = {};
12573
12564
  }
12574
12565
  }
12575
- const defaultProps$J = {
12566
+ const defaultProps$I = {
12576
12567
  ...ComponentDefaults,
12577
12568
  percent: 0,
12578
12569
  showText: false,
@@ -12596,7 +12587,7 @@
12596
12587
  delay,
12597
12588
  ...rest
12598
12589
  } = {
12599
- ...defaultProps$J,
12590
+ ...defaultProps$I,
12600
12591
  ...props
12601
12592
  };
12602
12593
  const classPrefix2 = "nut-progress";
@@ -12805,7 +12796,7 @@
12805
12796
  );
12806
12797
  }));
12807
12798
  };
12808
- const defaultProps$I = {
12799
+ const defaultProps$H = {
12809
12800
  ...ComponentDefaults,
12810
12801
  url: "",
12811
12802
  maxCount: 1,
@@ -12880,7 +12871,7 @@
12880
12871
  beforeXhrUpload,
12881
12872
  beforeDelete,
12882
12873
  ...restProps
12883
- } = { ...defaultProps$I, ...props };
12874
+ } = { ...defaultProps$H, ...props };
12884
12875
  const [fileList, setFileList] = usePropsValue({
12885
12876
  value,
12886
12877
  defaultValue,
@@ -12901,6 +12892,10 @@
12901
12892
  clearUploadQueue();
12902
12893
  }
12903
12894
  }));
12895
+ const fileListRef = React.useRef([]);
12896
+ React.useEffect(() => {
12897
+ fileListRef.current = fileList;
12898
+ }, [fileList]);
12904
12899
  const clearUploadQueue = (index = -1) => {
12905
12900
  if (index > -1) {
12906
12901
  uploadQueue.splice(index, 1);
@@ -12980,7 +12975,7 @@
12980
12975
  uploadOption.onStart = (option) => {
12981
12976
  clearUploadQueue(index);
12982
12977
  setFileList(
12983
- fileList.map((item) => {
12978
+ fileListRef.current.map((item) => {
12984
12979
  if (item.uid === fileItem.uid) {
12985
12980
  item.status = "ready";
12986
12981
  item.message = locale.uploader.readyUpload;
@@ -12988,23 +12983,23 @@
12988
12983
  return item;
12989
12984
  })
12990
12985
  );
12991
- onStart && onStart(option);
12986
+ onStart == null ? void 0 : onStart(option);
12992
12987
  };
12993
12988
  uploadOption.onProgress = (e2, option) => {
12994
12989
  setFileList(
12995
- fileList.map((item) => {
12990
+ fileListRef.current.map((item) => {
12996
12991
  if (item.uid === fileItem.uid) {
12997
12992
  item.status = UPLOADING;
12998
12993
  item.message = locale.uploader.uploading;
12999
12994
  item.percentage = e2.progress;
13000
- onProgress && onProgress({ e: e2, option, percentage: item.percentage });
12995
+ onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
13001
12996
  }
13002
12997
  return item;
13003
12998
  })
13004
12999
  );
13005
13000
  };
13006
13001
  uploadOption.onSuccess = (responseText, option) => {
13007
- const list = fileList.map((item) => {
13002
+ const list = fileListRef.current.map((item) => {
13008
13003
  if (item.uid === fileItem.uid) {
13009
13004
  item.status = SUCCESS;
13010
13005
  item.message = locale.uploader.success;
@@ -13020,7 +13015,7 @@
13020
13015
  });
13021
13016
  };
13022
13017
  uploadOption.onFailure = (responseText, option) => {
13023
- const list = fileList.map((item) => {
13018
+ const list = fileListRef.current.map((item) => {
13024
13019
  if (item.uid === fileItem.uid) {
13025
13020
  item.status = ERROR;
13026
13021
  item.message = locale.uploader.error;
@@ -13082,8 +13077,8 @@
13082
13077
  if (preview) {
13083
13078
  fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
13084
13079
  }
13085
- setFileList([...fileList, fileItem]);
13086
13080
  executeUpload(fileItem, index);
13081
+ setFileList([...fileList, fileItem]);
13087
13082
  });
13088
13083
  };
13089
13084
  const filterFiles = (files) => {
@@ -13097,9 +13092,7 @@
13097
13092
  }
13098
13093
  return true;
13099
13094
  });
13100
- if (oversizes.length) {
13101
- onOversize && onOversize(files);
13102
- }
13095
+ oversizes.length && (onOversize == null ? void 0 : onOversize(files));
13103
13096
  const currentFileLength = filterFile.length + fileList.length;
13104
13097
  if (currentFileLength > maximum) {
13105
13098
  filterFile.splice(filterFile.length - (currentFileLength - maximum));
@@ -13169,7 +13162,7 @@
13169
13162
  };
13170
13163
  const Uploader = React.forwardRef(InternalUploader);
13171
13164
  Uploader.displayName = "NutUploader";
13172
- const defaultProps$H = {
13165
+ const defaultProps$G = {
13173
13166
  ...ComponentDefaults,
13174
13167
  visible: false,
13175
13168
  description: "",
@@ -13195,7 +13188,7 @@
13195
13188
  className,
13196
13189
  style,
13197
13190
  ...rest
13198
- } = { ...defaultProps$H, ...props };
13191
+ } = { ...defaultProps$G, ...props };
13199
13192
  const classPrefix2 = "nut-actionsheet";
13200
13193
  const cancelActionSheet = () => {
13201
13194
  onCancel && onCancel();
@@ -13333,7 +13326,7 @@
13333
13326
  const params = stateRef.current;
13334
13327
  return { params, setParams };
13335
13328
  }
13336
- const defaultProps$G = {
13329
+ const defaultProps$F = {
13337
13330
  title: "",
13338
13331
  content: "",
13339
13332
  header: "",
@@ -13387,7 +13380,7 @@
13387
13380
  beforeClose
13388
13381
  },
13389
13382
  setParams
13390
- } = useParams({ ...defaultProps$G, ...props });
13383
+ } = useParams({ ...defaultProps$F, ...props });
13391
13384
  useCustomEvent(
13392
13385
  id,
13393
13386
  ({ status, options }) => {
@@ -13512,11 +13505,11 @@
13512
13505
  const path = useCustomEventsPath(selector);
13513
13506
  customEvents.trigger(path, { status: false });
13514
13507
  }
13515
- BaseDialog.defaultProps = defaultProps$G;
13508
+ BaseDialog.defaultProps = defaultProps$F;
13516
13509
  BaseDialog.displayName = "NutDialog";
13517
13510
  BaseDialog.open = open$1;
13518
13511
  BaseDialog.close = close$1;
13519
- const defaultProps$F = {
13512
+ const defaultProps$E = {
13520
13513
  ...ComponentDefaults,
13521
13514
  attract: false,
13522
13515
  direction: void 0,
@@ -13541,7 +13534,7 @@
13541
13534
  style,
13542
13535
  ...reset
13543
13536
  } = {
13544
- ...defaultProps$F,
13537
+ ...defaultProps$E,
13545
13538
  ...props
13546
13539
  };
13547
13540
  const classPrefix2 = "nut-drag";
@@ -13654,7 +13647,7 @@
13654
13647
  error: "https://storage.360buyimg.com/imgtools/f3278d0ebb-0ce360c0-c0ac-11ee-8375-193101bb1a46.png",
13655
13648
  network: "https://storage.360buyimg.com/imgtools/43c30f7e29-0d483d10-c0ac-11ee-bec4-eb4d2a09a51d.png"
13656
13649
  };
13657
- const defaultProps$E = {
13650
+ const defaultProps$D = {
13658
13651
  ...ComponentDefaults,
13659
13652
  title: "",
13660
13653
  description: "",
@@ -13678,7 +13671,7 @@
13678
13671
  actions,
13679
13672
  ...rest
13680
13673
  } = {
13681
- ...defaultProps$E,
13674
+ ...defaultProps$D,
13682
13675
  ...props
13683
13676
  };
13684
13677
  const [imgStyle, setImgStyle] = React.useState({});
@@ -13723,7 +13716,7 @@
13723
13716
  })), children);
13724
13717
  };
13725
13718
  Empty.displayName = "NutEmpty";
13726
- const defaultProps$D = {
13719
+ const defaultProps$C = {
13727
13720
  ...ComponentDefaults,
13728
13721
  type: "default",
13729
13722
  hasMore: true,
@@ -13750,7 +13743,7 @@
13750
13743
  onScroll,
13751
13744
  ...rest
13752
13745
  } = {
13753
- ...defaultProps$D,
13746
+ ...defaultProps$C,
13754
13747
  ...props
13755
13748
  };
13756
13749
  const [isInfiniting, setIsInfiniting] = React.useState(false);
@@ -13842,6 +13835,7 @@
13842
13835
  return /* @__PURE__ */ React.createElement(
13843
13836
  components.ScrollView,
13844
13837
  {
13838
+ ...rest,
13845
13839
  className: classes,
13846
13840
  scrollY: true,
13847
13841
  id: "scroller",
@@ -13851,8 +13845,7 @@
13851
13845
  onScrollToLower: lower,
13852
13846
  onTouchStart: touchStart,
13853
13847
  onTouchMove: touchMove,
13854
- onTouchEnd: touchEnd,
13855
- ...rest
13848
+ onTouchEnd: touchEnd
13856
13849
  },
13857
13850
  /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-top-tips" }, pullingText || locale.infiniteloading.pullRefreshText)),
13858
13851
  /* @__PURE__ */ React.createElement("div", { className: "nut-infinite-container" }, children),
@@ -13864,7 +13857,7 @@
13864
13857
  circular: D$5,
13865
13858
  spinner: I
13866
13859
  };
13867
- const defaultProps$C = {
13860
+ const defaultProps$B = {
13868
13861
  ...ComponentDefaults,
13869
13862
  // 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
13870
13863
  type: "circular",
@@ -13872,7 +13865,7 @@
13872
13865
  };
13873
13866
  const Loading = (props) => {
13874
13867
  const { className, style, children, direction, icon, ...rest } = {
13875
- ...defaultProps$C,
13868
+ ...defaultProps$B,
13876
13869
  ...props
13877
13870
  };
13878
13871
  const classPrefix2 = "nut-loading";
@@ -13892,7 +13885,7 @@
13892
13885
  );
13893
13886
  };
13894
13887
  Loading.displayName = "NutLoading";
13895
- const defaultProps$B = {
13888
+ const defaultProps$A = {
13896
13889
  ...ComponentDefaults,
13897
13890
  align: "left",
13898
13891
  direction: "horizontal",
@@ -13935,7 +13928,7 @@
13935
13928
  onClick,
13936
13929
  onItemClick
13937
13930
  } = {
13938
- ...defaultProps$B,
13931
+ ...defaultProps$A,
13939
13932
  ...props
13940
13933
  };
13941
13934
  const classPrefix2 = "nut-noticebar";
@@ -14309,7 +14302,7 @@
14309
14302
  ) : null);
14310
14303
  };
14311
14304
  NoticeBar.displayName = "NutNoticeBar";
14312
- const defaultProps$A = {
14305
+ const defaultProps$z = {
14313
14306
  ...ComponentDefaults,
14314
14307
  id: "",
14315
14308
  duration: 3e3,
@@ -14335,7 +14328,7 @@
14335
14328
  duration,
14336
14329
  onClose,
14337
14330
  onClick
14338
- } = { ...defaultProps$A, ...props };
14331
+ } = { ...defaultProps$z, ...props };
14339
14332
  useCustomEvent(id, (status) => {
14340
14333
  status ? show2() : hide2();
14341
14334
  });
@@ -14406,11 +14399,11 @@
14406
14399
  const path = useCustomEventsPath(selector);
14407
14400
  customEvents.trigger(path, false);
14408
14401
  }
14409
- Notify.defaultProps = defaultProps$A;
14402
+ Notify.defaultProps = defaultProps$z;
14410
14403
  Notify.displayName = "NutNotify";
14411
14404
  Notify.open = open;
14412
14405
  Notify.close = close;
14413
- const defaultProps$z = {
14406
+ const defaultProps$y = {
14414
14407
  ...ComponentDefaults,
14415
14408
  list: [],
14416
14409
  theme: "light",
@@ -14455,7 +14448,7 @@
14455
14448
  onSelect,
14456
14449
  ...rest
14457
14450
  } = {
14458
- ...defaultProps$z,
14451
+ ...defaultProps$y,
14459
14452
  ...props
14460
14453
  };
14461
14454
  const popoverRef = React.useRef(null);
@@ -14713,7 +14706,7 @@
14713
14706
  return position;
14714
14707
  }
14715
14708
  const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
14716
- const defaultProps$y = {
14709
+ const defaultProps$x = {
14717
14710
  ...ComponentDefaults,
14718
14711
  type: "default",
14719
14712
  pullingText: "",
@@ -14733,7 +14726,7 @@
14733
14726
  const { locale } = useConfig$1();
14734
14727
  const touch = useTouch();
14735
14728
  const props = {
14736
- ...defaultProps$y,
14729
+ ...defaultProps$x,
14737
14730
  ...p,
14738
14731
  ...{
14739
14732
  pullingText: p.pullingText || locale.pullToRefresh.pullingText,
@@ -14851,10 +14844,9 @@
14851
14844
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children)
14852
14845
  );
14853
14846
  };
14854
- PullToRefresh.defaultProps = defaultProps$y;
14855
14847
  PullToRefresh.displayName = "NutPullToRefresh";
14856
14848
  const AvatarContext = React.createContext({});
14857
- const defaultProps$x = {
14849
+ const defaultProps$w = {
14858
14850
  ...ComponentDefaults,
14859
14851
  maxContent: "",
14860
14852
  max: "",
@@ -14865,7 +14857,7 @@
14865
14857
  };
14866
14858
  const classPrefix$b = `nut-avatar-group`;
14867
14859
  const AvatarGroup = (props) => {
14868
- const propAvatarGroup = { ...defaultProps$x, ...props };
14860
+ const propAvatarGroup = { ...defaultProps$w, ...props };
14869
14861
  const { className, style, children } = propAvatarGroup;
14870
14862
  const avatarGroupRef = React.useRef(null);
14871
14863
  const cls = classNames(classPrefix$b, className);
@@ -14876,7 +14868,7 @@
14876
14868
  return /* @__PURE__ */ React.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
14877
14869
  };
14878
14870
  AvatarGroup.displayName = "NutAvatarGroup";
14879
- const defaultProps$w = {
14871
+ const defaultProps$v = {
14880
14872
  ...ComponentDefaults,
14881
14873
  size: "",
14882
14874
  shape: "round",
@@ -14906,7 +14898,7 @@
14906
14898
  onError,
14907
14899
  ...rest
14908
14900
  } = {
14909
- ...defaultProps$w,
14901
+ ...defaultProps$v,
14910
14902
  ...props
14911
14903
  };
14912
14904
  const [maxSum, setMaxSum] = React.useState(0);
@@ -14996,7 +14988,7 @@
14996
14988
  };
14997
14989
  Avatar.displayName = "NutAvatar";
14998
14990
  Avatar.Group = AvatarGroup;
14999
- const defaultProps$v = {
14991
+ const defaultProps$u = {
15000
14992
  ...ComponentDefaults,
15001
14993
  rows: 1,
15002
14994
  animated: false,
@@ -15019,7 +15011,7 @@
15019
15011
  avatarShape,
15020
15012
  ...rest
15021
15013
  } = {
15022
- ...defaultProps$v,
15014
+ ...defaultProps$u,
15023
15015
  ...props
15024
15016
  };
15025
15017
  const classPrefix2 = "nut-skeleton";
@@ -15065,7 +15057,7 @@
15065
15057
  event.stopPropagation();
15066
15058
  }
15067
15059
  }
15068
- const defaultProps$u = {
15060
+ const defaultProps$t = {
15069
15061
  ...ComponentDefaults,
15070
15062
  name: ""
15071
15063
  };
@@ -15085,7 +15077,7 @@
15085
15077
  };
15086
15078
  Taro.nextTick(() => getWidth());
15087
15079
  });
15088
- const { children, className, style } = { ...defaultProps$u, ...props };
15080
+ const { children, className, style } = { ...defaultProps$t, ...props };
15089
15081
  const root2 = React.useRef();
15090
15082
  const opened = React.useRef(false);
15091
15083
  const lockClick = React.useRef(false);
@@ -15245,9 +15237,8 @@
15245
15237
  /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
15246
15238
  );
15247
15239
  });
15248
- Swipe.defaultProps = defaultProps$u;
15249
15240
  Swipe.displayName = "NutSwipe";
15250
- const defaultProps$t = {
15241
+ const defaultProps$s = {
15251
15242
  ...ComponentDefaults,
15252
15243
  id: "",
15253
15244
  icon: null,
@@ -15296,7 +15287,7 @@
15296
15287
  wordBreak
15297
15288
  },
15298
15289
  setParams
15299
- } = useParams({ ...defaultProps$t, ...props });
15290
+ } = useParams({ ...defaultProps$s, ...props });
15300
15291
  const timer = React.useRef(-1);
15301
15292
  const [innerVisible, setInnerVisible] = usePropsValue({
15302
15293
  value: visible,
@@ -15404,11 +15395,11 @@
15404
15395
  const path = useCustomEventsPath(selector);
15405
15396
  customEvents.trigger(path, { status: false });
15406
15397
  }
15407
- Toast.defaultProps = defaultProps$t;
15398
+ Toast.defaultProps = defaultProps$s;
15408
15399
  Toast.displayName = "NutToast";
15409
15400
  Toast.show = show;
15410
15401
  Toast.hide = hide;
15411
- const defaultProps$s = {
15402
+ const defaultProps$r = {
15412
15403
  ...ComponentDefaults,
15413
15404
  type: "shake",
15414
15405
  action: "initial",
@@ -15419,7 +15410,7 @@
15419
15410
  const classPrefix$8 = `nut-animate`;
15420
15411
  const Animate = (props) => {
15421
15412
  const { className, type: type2, action, loop, onClick, children, ...rest } = {
15422
- ...defaultProps$s,
15413
+ ...defaultProps$r,
15423
15414
  ...props
15424
15415
  };
15425
15416
  const [clicked, setClicked] = React.useState(false);
@@ -15441,7 +15432,7 @@
15441
15432
  return /* @__PURE__ */ React.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
15442
15433
  };
15443
15434
  Animate.displayName = "NutAnimate";
15444
- const defaultProps$r = {
15435
+ const defaultProps$q = {
15445
15436
  ...ComponentDefaults,
15446
15437
  length: 0,
15447
15438
  value: "",
@@ -15460,7 +15451,7 @@
15460
15451
  style,
15461
15452
  ...reset
15462
15453
  } = {
15463
- ...defaultProps$r,
15454
+ ...defaultProps$q,
15464
15455
  ...props
15465
15456
  };
15466
15457
  const classPrefix2 = "nut-countup";
@@ -15534,9 +15525,9 @@
15534
15525
  );
15535
15526
  })));
15536
15527
  };
15537
- CountUp.defaultProps = defaultProps$r;
15528
+ CountUp.defaultProps = defaultProps$q;
15538
15529
  CountUp.displayName = "NutCountUp";
15539
- const defaultProps$q = {};
15530
+ const defaultProps$p = {};
15540
15531
  const _AnimatingNumbers = class _AnimatingNumbers extends React.Component {
15541
15532
  constructor(props) {
15542
15533
  super(props);
@@ -15546,12 +15537,12 @@
15546
15537
  return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
15547
15538
  }
15548
15539
  };
15549
- _AnimatingNumbers.defaultProps = defaultProps$q;
15540
+ _AnimatingNumbers.defaultProps = defaultProps$p;
15550
15541
  _AnimatingNumbers.displayName = "NutAnimatingNumbers";
15551
15542
  _AnimatingNumbers.CountUp = CountUp;
15552
15543
  let AnimatingNumbers = _AnimatingNumbers;
15553
15544
  AnimatingNumbers.CountUp = CountUp;
15554
- const defaultProps$p = {
15545
+ const defaultProps$o = {
15555
15546
  ...ComponentDefaults,
15556
15547
  className: "",
15557
15548
  url: "",
@@ -15595,7 +15586,7 @@
15595
15586
  iconFontClassName,
15596
15587
  ...rest
15597
15588
  } = {
15598
- ...defaultProps$p,
15589
+ ...defaultProps$o,
15599
15590
  ...props
15600
15591
  };
15601
15592
  const [playing, setPlaying] = React.useState(false);
@@ -15614,19 +15605,19 @@
15614
15605
  audioCtx.autoplay = autoplay || false;
15615
15606
  audioCtx.loop = loop || false;
15616
15607
  audioCtx.onPause(() => {
15617
- props.onPause && props.onPause(audioCtx);
15608
+ onPause == null ? void 0 : onPause(audioCtx);
15618
15609
  });
15619
15610
  audioCtx.onEnded(() => {
15620
- if (props.loop) {
15611
+ if (loop) {
15621
15612
  console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
15622
15613
  } else {
15623
- props.onPlayEnd && props.onPlayEnd(audioCtx);
15614
+ onPlayEnd == null ? void 0 : onPlayEnd(audioCtx);
15624
15615
  }
15625
15616
  });
15626
15617
  audioCtx.onPlay(() => {
15627
15618
  const { duration } = audioCtx;
15628
15619
  setTotalSeconds(Math.floor(duration));
15629
- props.onPlay && props.onPlay(audioCtx);
15620
+ onPlay == null ? void 0 : onPlay(audioCtx);
15630
15621
  });
15631
15622
  audioCtx.onCanplay(() => {
15632
15623
  const intervalID = setInterval(function() {
@@ -15636,7 +15627,7 @@
15636
15627
  }
15637
15628
  }, 500);
15638
15629
  setIsCanPlay(true);
15639
- props.onCanPlay && props.onCanPlay(audioCtx);
15630
+ onCanPlay == null ? void 0 : onCanPlay(audioCtx);
15640
15631
  });
15641
15632
  audioCtx.onTimeUpdate(() => {
15642
15633
  const time = parseInt(`${audioCtx.currentTime}`);
@@ -15668,14 +15659,14 @@
15668
15659
  statusRef.current.currentTime = Math.max(currentTime - 1, 0);
15669
15660
  setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
15670
15661
  audioCtx.seek(statusRef.current.currentTime);
15671
- props.onFastBack && props.onFastBack(audioCtx);
15662
+ onFastBack == null ? void 0 : onFastBack(audioCtx);
15672
15663
  };
15673
15664
  const handleForward = () => {
15674
15665
  const currentTime = Math.floor(audioCtx.currentTime);
15675
15666
  statusRef.current.currentTime = Math.min(currentTime + 1, audioCtx.duration);
15676
15667
  setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
15677
15668
  audioCtx.seek(statusRef.current.currentTime);
15678
- props.onForward && props.onForward(audioCtx);
15669
+ onForward == null ? void 0 : onForward(audioCtx);
15679
15670
  };
15680
15671
  const handleStatusChange = () => {
15681
15672
  setPlaying(!playing);
@@ -15759,9 +15750,8 @@
15759
15750
  };
15760
15751
  return /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, renderAudio());
15761
15752
  };
15762
- Audio.defaultProps = defaultProps$p;
15763
15753
  Audio.displayName = "NutAudio";
15764
- const defaultProps$o = {
15754
+ const defaultProps$n = {
15765
15755
  ...ComponentDefaults,
15766
15756
  strokeWidth: 5,
15767
15757
  radius: 50,
@@ -15785,7 +15775,7 @@
15785
15775
  strokeLinecap,
15786
15776
  ...restProps
15787
15777
  } = {
15788
- ...defaultProps$o,
15778
+ ...defaultProps$n,
15789
15779
  ...props
15790
15780
  };
15791
15781
  const oldValue = React.useRef(percent);
@@ -15885,7 +15875,7 @@
15885
15875
  rotate: 180
15886
15876
  };
15887
15877
  const CollapseContext = React.createContext(collapseContext);
15888
- const defaultProps$n = {
15878
+ const defaultProps$m = {
15889
15879
  ...ComponentDefaults,
15890
15880
  title: null,
15891
15881
  name: "",
@@ -15906,7 +15896,7 @@
15906
15896
  className,
15907
15897
  ...rest
15908
15898
  } = {
15909
- ...defaultProps$n,
15899
+ ...defaultProps$m,
15910
15900
  ...props
15911
15901
  };
15912
15902
  const classPrefix2 = "nut-collapse-item";
@@ -16019,7 +16009,7 @@
16019
16009
  ));
16020
16010
  };
16021
16011
  CollapseItem.displayName = "NutCollapseItem";
16022
- const defaultProps$m = {
16012
+ const defaultProps$l = {
16023
16013
  ...ComponentDefaults,
16024
16014
  defaultActiveName: [],
16025
16015
  accordion: false,
@@ -16038,7 +16028,7 @@
16038
16028
  rotate,
16039
16029
  onChange
16040
16030
  } = {
16041
- ...defaultProps$m,
16031
+ ...defaultProps$l,
16042
16032
  ...props
16043
16033
  };
16044
16034
  const classPrefix2 = "nut-collapse";
@@ -16097,7 +16087,7 @@
16097
16087
  };
16098
16088
  Collapse.displayName = "NutCollapse";
16099
16089
  Collapse.Item = CollapseItem;
16100
- const defaultProps$l = {
16090
+ const defaultProps$k = {
16101
16091
  ...ComponentDefaults,
16102
16092
  paused: false,
16103
16093
  startTime: Date.now(),
@@ -16129,7 +16119,7 @@
16129
16119
  onUpdate,
16130
16120
  children,
16131
16121
  ...rest
16132
- } = { ...defaultProps$l, ...props };
16122
+ } = { ...defaultProps$k, ...props };
16133
16123
  const classPrefix2 = "nut-countdown";
16134
16124
  const [restTimeStamp, setRestTime] = React.useState(0);
16135
16125
  const stateRef = React.useRef({
@@ -16334,7 +16324,7 @@
16334
16324
  InternalCountDown
16335
16325
  );
16336
16326
  CountDown.displayName = "NutCountDown";
16337
- const defaultProps$k = {
16327
+ const defaultProps$j = {
16338
16328
  ...ComponentDefaults,
16339
16329
  content: "",
16340
16330
  direction: "end",
@@ -16362,7 +16352,7 @@
16362
16352
  onClick,
16363
16353
  onChange,
16364
16354
  ...rest
16365
- } = { ...defaultProps$k, ...props };
16355
+ } = { ...defaultProps$j, ...props };
16366
16356
  const maxHeight = React.useRef(0);
16367
16357
  const [exceeded, setExceeded] = React.useState(false);
16368
16358
  const [expanded, setExpanded] = React.useState(false);
@@ -16654,7 +16644,7 @@
16654
16644
  ));
16655
16645
  };
16656
16646
  Ellipsis.displayName = "NutEllipsis";
16657
- const defaultProps$j = {
16647
+ const defaultProps$i = {
16658
16648
  total: 3,
16659
16649
  current: 0,
16660
16650
  direction: "horizontal"
@@ -16662,7 +16652,7 @@
16662
16652
  const classPrefix$5 = `nut-indicator`;
16663
16653
  const Indicator = (props) => {
16664
16654
  const { total, current, children, className, direction, ...rest } = {
16665
- ...defaultProps$j,
16655
+ ...defaultProps$i,
16666
16656
  ...props
16667
16657
  };
16668
16658
  const classes = classNames({
@@ -16686,7 +16676,7 @@
16686
16676
  return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$5, classes, className), ...rest }, renderElement());
16687
16677
  };
16688
16678
  Indicator.displayName = "NutIndicator";
16689
- const defaultProps$i = {
16679
+ const defaultProps$h = {
16690
16680
  direction: "horizontal",
16691
16681
  indicator: false,
16692
16682
  autoPlay: false,
@@ -16711,7 +16701,7 @@
16711
16701
  style,
16712
16702
  ...rest
16713
16703
  } = {
16714
- ...defaultProps$i,
16704
+ ...defaultProps$h,
16715
16705
  ...props
16716
16706
  };
16717
16707
  const [current, setCurrent] = React.useState(defaultValue);
@@ -16822,17 +16812,11 @@
16822
16812
  renderIndicator()
16823
16813
  );
16824
16814
  });
16825
- Swiper.defaultProps = defaultProps$i;
16826
16815
  Swiper.displayName = "NutSwiper";
16827
- const defaultProps$h = {
16828
- itemId: "",
16829
- skipHiddenItemLayout: false
16830
- };
16831
16816
  const SwiperItem = (props) => {
16832
16817
  const { children, ...rest } = props;
16833
16818
  return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
16834
16819
  };
16835
- SwiperItem.defaultProps = defaultProps$h;
16836
16820
  SwiperItem.displayName = "NutSwiperItem";
16837
16821
  const InnerSwiper = Swiper;
16838
16822
  InnerSwiper.Item = SwiperItem;
@@ -17564,10 +17548,6 @@
17564
17548
  });
17565
17549
  };
17566
17550
  const renderBodyTds = (item, rowIndex) => {
17567
- const { rowRender } = item;
17568
- if (rowRender && typeof rowRender === "function") {
17569
- return rowRender(item, rowIndex);
17570
- }
17571
17551
  return sortDataItem().map(([value, render]) => {
17572
17552
  return /* @__PURE__ */ React.createElement(
17573
17553
  "div",
@@ -17586,7 +17566,12 @@
17586
17566
  };
17587
17567
  const renderBodyTrs = () => {
17588
17568
  return innerValue.map((item, index) => {
17589
- return /* @__PURE__ */ React.createElement("div", { className: bodyClassPrefix, key: index }, renderBodyTds(item, index));
17569
+ const inner = renderBodyTds(item, index);
17570
+ const { rowRender } = item;
17571
+ if (rowRender && typeof rowRender === "function") {
17572
+ return rowRender(item, index, { inner });
17573
+ }
17574
+ return /* @__PURE__ */ React.createElement("div", { className: bodyClassPrefix, key: index }, inner);
17590
17575
  });
17591
17576
  };
17592
17577
  return /* @__PURE__ */ React.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React.createElement(
@@ -18612,6 +18597,8 @@
18612
18597
  gapY: 48,
18613
18598
  width: 120,
18614
18599
  height: 64,
18600
+ startX: 0,
18601
+ startY: 0,
18615
18602
  image: "",
18616
18603
  imageWidth: 120,
18617
18604
  imageHeight: 64,
@@ -18630,6 +18617,8 @@
18630
18617
  className,
18631
18618
  gapX,
18632
18619
  gapY,
18620
+ startX,
18621
+ startY,
18633
18622
  width,
18634
18623
  height,
18635
18624
  image,
@@ -18710,7 +18699,7 @@
18710
18699
  const markSize = Number(fontSize) * ratio;
18711
18700
  ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
18712
18701
  ctx.fillStyle = color;
18713
- ctx.fillText(content, 0, 0);
18702
+ ctx.fillText(content, startX, startY);
18714
18703
  ctx.restore();
18715
18704
  setBase64Url(canvas.toDataURL());
18716
18705
  }