@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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui-react-taro v2.6.14 Fri Jul 19 2024 16:23:26 GMT+0800 (China Standard Time)
2
+ * @nutui/nutui-react-taro v2.6.15 Fri Jul 26 2024 15:18:34 GMT+0800 (China Standard Time)
3
3
  * (c) 2023 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -127,7 +127,6 @@ const S = m;
127
127
  const g$6 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "ArrowDown", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgMjg5LjgzYTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM0IDYwLjM0bDM4NCAzODRhNDIuNjcgNDIuNjcgMCAwIDAgNjAuMzYgMGwzODQtMzg0YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjM2LTYwLjM0TDUxMiA2NDMuNjd6Ii8+PC9zdmc+" });
128
128
  g$6.defaultProps = k;
129
129
  const g$5 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "ArrowLeft", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik03MTIuODMgMTU4LjE3YTQyLjY3IDQyLjY3IDAgMSAwLTYwLjMzLTYwLjM0bC0zODQgMzg0YTQyLjY3IDQyLjY3IDAgMCAwIDAgNjAuMzZsMzg0IDM4NGE0Mi42NyA0Mi42NyAwIDEgMCA2MC4zMy02MC4zNkwzNTkgNTEyeiIvPjwvc3ZnPg==" });
130
- g$5.defaultProps = k;
131
130
  const a$2 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "ArrowUp", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMxQTFBMUEiIGQ9Ik0xNTguMTcgNzM0LjE3YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM0LTYwLjM0bDM4NC0zODRhNDIuNjcgNDIuNjcgMCAwIDEgNjAuMzYgMGwzODQgMzg0YTQyLjY3IDQyLjY3IDAgMSAxLTYwLjM2IDYwLjM0TDUxMiAzODAuMzN6Ii8+PC9zdmc+" });
132
131
  a$2.defaultProps = k;
133
132
  const g$4 = (M) => /* @__PURE__ */ React__default.createElement(S, { ...M, name: M.name || "CheckChecked", svg64: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPjxwYXRoIGZpbGw9IiMzMzMiIGQ9Ik01MDYuNjUgMi44MkMyMjguMDEgMi44Mi4wMyAyMzAuOC4wMyA1MDkuNDRzMjI3Ljk4IDUwNi42MiA1MDYuNjIgNTA2LjYyIDUwNi42Mi0yMjcuOTggNTA2LjYzLTUwNi42MlM3ODguMTEgMi44MiA1MDYuNjUgMi44Mm0wIDc4OC4wOGMtMTU0LjggMC0yODEuNDYtMTI2LjY2LTI4MS40NS0yODEuNDZzMTI2LjY2LTI4MS40NiAyODEuNDUtMjgxLjQ2IDI4MS40NiAxMjYuNjYgMjgxLjQ2IDI4MS40NlM2NjEuNDUgNzkwLjkgNTA2LjY1IDc5MC45Ii8+PHBhdGggZmlsbD0iIzMzMyIgZD0iTTM4MCA1MDkuNDRhMTI2LjY2IDEyNi42NiAwIDEgMCAyNTMuMzEgMCAxMjYuNjYgMTI2LjY2IDAgMSAwLTI1My4zMSAwIi8+PC9zdmc+" });
@@ -197,7 +196,7 @@ const ComponentDefaults = {
197
196
  style: {}
198
197
  };
199
198
  const prefixCls$2 = "nut-button";
200
- const defaultProps$1v = {
199
+ const defaultProps$1u = {
201
200
  ...ComponentDefaults,
202
201
  color: "",
203
202
  type: "default",
@@ -232,7 +231,7 @@ const Button = React__default.forwardRef(
232
231
  onClick,
233
232
  ...rest
234
233
  } = {
235
- ...defaultProps$1v,
234
+ ...defaultProps$1u,
236
235
  ...props
237
236
  };
238
237
  const getStyle = useCallback(() => {
@@ -299,7 +298,7 @@ const Button = React__default.forwardRef(
299
298
  );
300
299
  Button.displayName = "NutButton";
301
300
  const CellGroupContext = createContext(null);
302
- const defaultProps$1u = {
301
+ const defaultProps$1t = {
303
302
  ...ComponentDefaults,
304
303
  title: "",
305
304
  description: "",
@@ -308,7 +307,7 @@ const defaultProps$1u = {
308
307
  const classPrefix$r = "nut-cell-group";
309
308
  const CellGroup = (props) => {
310
309
  const { children, className, title, description, divider, ...rest } = {
311
- ...defaultProps$1u,
310
+ ...defaultProps$1t,
312
311
  ...props
313
312
  };
314
313
  return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React__default.createElement(
@@ -320,7 +319,7 @@ const CellGroup = (props) => {
320
319
  ));
321
320
  };
322
321
  CellGroup.displayName = "NutCellGroup";
323
- const defaultProps$1t = {
322
+ const defaultProps$1s = {
324
323
  ...ComponentDefaults,
325
324
  title: null,
326
325
  description: null,
@@ -345,7 +344,7 @@ const Cell = (props) => {
345
344
  style,
346
345
  ...rest
347
346
  } = {
348
- ...defaultProps$1t,
347
+ ...defaultProps$1s,
349
348
  ...props
350
349
  };
351
350
  const handleClick = (event) => {
@@ -1520,7 +1519,7 @@ ConfigProvider.displayName = "NutConfigProvider";
1520
1519
  const pxCheck = (value) => {
1521
1520
  return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
1522
1521
  };
1523
- const defaultProps$1s = {
1522
+ const defaultProps$1r = {
1524
1523
  src: "",
1525
1524
  error: true,
1526
1525
  loading: true
@@ -1539,7 +1538,7 @@ const Image$1 = (props) => {
1539
1538
  onLoad,
1540
1539
  onError,
1541
1540
  ...rest
1542
- } = { ...defaultProps$1s, ...props };
1541
+ } = { ...defaultProps$1r, ...props };
1543
1542
  const [innerLoading, setInnerLoading] = useState(true);
1544
1543
  const [isError, setIsError] = useState(false);
1545
1544
  const handleLoad = (e2) => {
@@ -3558,7 +3557,7 @@ const Overlay = (props) => {
3558
3557
  };
3559
3558
  Overlay.displayName = "NutOverlay";
3560
3559
  const DataContext$1 = createContext({});
3561
- const defaultProps$1r = {
3560
+ const defaultProps$1q = {
3562
3561
  ...ComponentDefaults,
3563
3562
  span: "24",
3564
3563
  offset: "0",
@@ -3566,7 +3565,7 @@ const defaultProps$1r = {
3566
3565
  };
3567
3566
  const Col = (props) => {
3568
3567
  const { className, style, span, offset, children, onClick } = {
3569
- ...defaultProps$1r,
3568
+ ...defaultProps$1q,
3570
3569
  ...props
3571
3570
  };
3572
3571
  const [colName, setColName] = useState("");
@@ -3599,7 +3598,7 @@ const Col = (props) => {
3599
3598
  );
3600
3599
  };
3601
3600
  Col.displayName = "NutCol";
3602
- const defaultProps$1q = {
3601
+ const defaultProps$1p = {
3603
3602
  ...ComponentDefaults,
3604
3603
  contentPosition: "center",
3605
3604
  direction: "horizontal"
@@ -3607,7 +3606,7 @@ const defaultProps$1q = {
3607
3606
  const classPrefix$o = `nut-divider`;
3608
3607
  const Divider = (props) => {
3609
3608
  const { children, contentPosition, style, className, direction, ...rest } = {
3610
- ...defaultProps$1q,
3609
+ ...defaultProps$1p,
3611
3610
  ...props
3612
3611
  };
3613
3612
  const classes = direction === "horizontal" ? classNames({
@@ -3628,7 +3627,7 @@ const gridContext = {
3628
3627
  }
3629
3628
  };
3630
3629
  const GridContext = React__default.createContext(gridContext);
3631
- const defaultProps$1p = {
3630
+ const defaultProps$1o = {
3632
3631
  text: "",
3633
3632
  columns: 4,
3634
3633
  gap: 0,
@@ -3654,7 +3653,7 @@ const GridItem = (props) => {
3654
3653
  onClick,
3655
3654
  ...rest
3656
3655
  } = {
3657
- ...defaultProps$1p,
3656
+ ...defaultProps$1o,
3658
3657
  ...props
3659
3658
  };
3660
3659
  const classPrefix2 = "nut-grid-item";
@@ -3713,7 +3712,7 @@ const GridItem = (props) => {
3713
3712
  );
3714
3713
  };
3715
3714
  GridItem.displayName = "NutGridItem";
3716
- const defaultProps$1o = {
3715
+ const defaultProps$1n = {
3717
3716
  columns: 4,
3718
3717
  gap: 0,
3719
3718
  center: true,
@@ -3734,7 +3733,7 @@ const Grid = (props) => {
3734
3733
  className,
3735
3734
  onClick,
3736
3735
  ...rest
3737
- } = { ...defaultProps$1o, ...props };
3736
+ } = { ...defaultProps$1n, ...props };
3738
3737
  const childrenDom = React__default.Children.toArray(children);
3739
3738
  const classPrefix2 = "nut-grid";
3740
3739
  const rootClass = () => {
@@ -3770,14 +3769,14 @@ const Grid = (props) => {
3770
3769
  };
3771
3770
  Grid.displayName = "NutGrid";
3772
3771
  Grid.Item = GridItem;
3773
- const defaultProps$1n = {};
3772
+ const defaultProps$1m = {};
3774
3773
  const Layout = (props) => {
3775
- ({ ...defaultProps$1n, ...props });
3774
+ ({ ...defaultProps$1m, ...props });
3776
3775
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-layout" }, "Layout");
3777
3776
  };
3778
3777
  Layout.displayName = "NutLayout";
3779
3778
  const classPrefix$n = "nut-row";
3780
- const defaultProps$1m = {
3779
+ const defaultProps$1l = {
3781
3780
  ...ComponentDefaults,
3782
3781
  type: "",
3783
3782
  justify: "start",
@@ -3797,7 +3796,7 @@ const Row = (props) => {
3797
3796
  gutter,
3798
3797
  onClick
3799
3798
  } = {
3800
- ...defaultProps$1m,
3799
+ ...defaultProps$1l,
3801
3800
  ...props
3802
3801
  };
3803
3802
  const getClass = (prefix, type22) => {
@@ -3831,12 +3830,12 @@ const Row = (props) => {
3831
3830
  };
3832
3831
  Row.displayName = "NutRow";
3833
3832
  const prefixCls$1 = "nut-space";
3834
- const defaultProps$1l = {
3833
+ const defaultProps$1k = {
3835
3834
  direction: "horizontal"
3836
3835
  };
3837
3836
  const Space = (props) => {
3838
3837
  const { className, style, children, wrap, align, direction, justify } = {
3839
- ...defaultProps$1l,
3838
+ ...defaultProps$1k,
3840
3839
  ...props
3841
3840
  };
3842
3841
  const cls = classNames(
@@ -3928,7 +3927,7 @@ const getRectByTaro = async (element) => {
3928
3927
  }
3929
3928
  return Promise.resolve(makeRect(0, 0));
3930
3929
  };
3931
- const defaultProps$1k = {
3930
+ const defaultProps$1j = {
3932
3931
  ...ComponentDefaults,
3933
3932
  position: "top",
3934
3933
  zIndex: 900
@@ -3945,7 +3944,7 @@ const Sticky = (props) => {
3945
3944
  className,
3946
3945
  onChange,
3947
3946
  ...rest
3948
- } = { ...defaultProps$1k, ...props };
3947
+ } = { ...defaultProps$1j, ...props };
3949
3948
  const stickyRef = useRef(null);
3950
3949
  const rootRef = useRef(null);
3951
3950
  const [rootRect, setRootRect] = useState({});
@@ -3961,13 +3960,10 @@ const Sticky = (props) => {
3961
3960
  width: ""
3962
3961
  };
3963
3962
  }
3964
- const style2 = {};
3965
- if (rootRect.height) {
3966
- style2.height = rootRect.height;
3967
- }
3968
- if (rootRect.width) {
3969
- style2.width = rootRect.width;
3970
- }
3963
+ const style2 = {
3964
+ height: rootRect.height ?? "",
3965
+ width: rootRect.width ?? ""
3966
+ };
3971
3967
  return style2;
3972
3968
  }, [fixed, rootRect.height, rootRect.width]);
3973
3969
  const stickyStyle = useMemo$1(() => {
@@ -3978,36 +3974,37 @@ const Sticky = (props) => {
3978
3974
  [position]: ""
3979
3975
  };
3980
3976
  }
3981
- const style2 = {};
3982
- if (rootRect.height) style2.height = rootRect.height;
3983
- if (rootRect.width) style2.width = rootRect.width;
3984
- style2.transform = `translate3d(0, ${transform}px, 0)`;
3985
- style2[position] = threshold;
3986
- style2.zIndex = zIndex;
3977
+ const style2 = {
3978
+ height: rootRect.height ?? "",
3979
+ width: rootRect.width ?? "",
3980
+ transform: `translate3d(0, ${transform}px, 0)`,
3981
+ [position]: threshold,
3982
+ zIndex
3983
+ };
3987
3984
  return style2;
3988
3985
  }, [fixed, rootRect.height, rootRect.width, transform, position]);
3989
3986
  const handleScroll = async (scrollTop) => {
3990
3987
  const curRootRect = await getRectByTaro(rootRef.current);
3991
3988
  const stickyRect = await getRectByTaro(stickyRef.current);
3992
- if (curRootRect && stickyRect) {
3993
- setRootRect(curRootRect);
3994
- if (position === "top") {
3995
- if (container) {
3996
- const containerRect = await getRectByTaro(container.current);
3997
- const difference = containerRect.bottom - threshold - curRootRect.height;
3998
- const curTransform = difference < 0 ? difference : 0;
3999
- setTransform(curTransform);
4000
- const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
4001
- setFixed(curFixed);
4002
- } else {
4003
- setFixed(threshold > curRootRect.top);
4004
- }
3989
+ if (!curRootRect || !stickyRect) {
3990
+ console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
3991
+ return;
3992
+ }
3993
+ setRootRect(curRootRect);
3994
+ if (position === "top") {
3995
+ if (container) {
3996
+ const containerRect = await getRectByTaro(container.current);
3997
+ const difference = containerRect.bottom - threshold - curRootRect.height;
3998
+ const curTransform = difference < 0 ? difference : 0;
3999
+ setTransform(curTransform);
4000
+ const curFixed = threshold > curRootRect.top && containerRect.bottom > 0;
4001
+ setFixed(curFixed);
4005
4002
  } else {
4006
- const windowHeight = getSystemInfoSync().windowHeight;
4007
- setFixed(windowHeight - threshold < curRootRect.bottom);
4003
+ setFixed(threshold > curRootRect.top);
4008
4004
  }
4009
4005
  } else {
4010
- console.warn("getRectByTaro获取失败", { stickyRect, curRootRect });
4006
+ const windowHeight = getSystemInfoSync().windowHeight;
4007
+ setFixed(windowHeight - threshold < curRootRect.bottom);
4011
4008
  }
4012
4009
  };
4013
4010
  const getElement = useCallback(() => {
@@ -4063,7 +4060,7 @@ const SafeArea = (props) => {
4063
4060
  );
4064
4061
  };
4065
4062
  SafeArea.displayName = "NutSafeArea";
4066
- const defaultProps$1j = {
4063
+ const defaultProps$1i = {
4067
4064
  ...ComponentDefaults,
4068
4065
  threshold: 200,
4069
4066
  zIndex: 900,
@@ -4072,7 +4069,7 @@ const defaultProps$1j = {
4072
4069
  const BackTop = (props) => {
4073
4070
  const rtl = useRtl();
4074
4071
  const { children, threshold, zIndex, className, duration, style, onClick } = {
4075
- ...defaultProps$1j,
4072
+ ...defaultProps$1i,
4076
4073
  ...props
4077
4074
  };
4078
4075
  const classPrefix2 = "nut-backtop";
@@ -4116,7 +4113,7 @@ const BackTop = (props) => {
4116
4113
  };
4117
4114
  BackTop.displayName = "NutBackTop";
4118
4115
  const elevatorContext = createContext({});
4119
- const defaultProps$1i = {
4116
+ const defaultProps$1h = {
4120
4117
  ...ComponentDefaults,
4121
4118
  height: "200px",
4122
4119
  floorKey: "title",
@@ -4143,7 +4140,7 @@ const Elevator = (props) => {
4143
4140
  children,
4144
4141
  ...rest
4145
4142
  } = {
4146
- ...defaultProps$1i,
4143
+ ...defaultProps$1h,
4147
4144
  ...props
4148
4145
  };
4149
4146
  const classPrefix2 = "nut-elevator";
@@ -4358,7 +4355,7 @@ const Elevator = (props) => {
4358
4355
  };
4359
4356
  Elevator.displayName = "NutElevator";
4360
4357
  Elevator.Context = elevatorContext;
4361
- const defaultProps$1h = {
4358
+ const defaultProps$1g = {
4362
4359
  ...ComponentDefaults,
4363
4360
  activeText: "",
4364
4361
  inactiveText: "",
@@ -4386,7 +4383,7 @@ const FixedNav = (props) => {
4386
4383
  content,
4387
4384
  ...rest
4388
4385
  } = {
4389
- ...defaultProps$1h,
4386
+ ...defaultProps$1g,
4390
4387
  ...props
4391
4388
  };
4392
4389
  const classPrefix2 = "nut-fixednav";
@@ -4439,7 +4436,7 @@ const FixedNav = (props) => {
4439
4436
  );
4440
4437
  };
4441
4438
  FixedNav.displayName = "NutFixedNav";
4442
- const defaultProps$1g = {
4439
+ const defaultProps$1f = {
4443
4440
  ...ComponentDefaults,
4444
4441
  left: "",
4445
4442
  right: "",
@@ -4464,7 +4461,7 @@ const NavBar = (props) => {
4464
4461
  zIndex,
4465
4462
  onBackClick
4466
4463
  } = {
4467
- ...defaultProps$1g,
4464
+ ...defaultProps$1f,
4468
4465
  ...props
4469
4466
  };
4470
4467
  const classPrefix2 = "nut-navbar";
@@ -4543,7 +4540,7 @@ const NavBar = (props) => {
4543
4540
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React__default.createElement(View, { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
4544
4541
  };
4545
4542
  NavBar.displayName = "NutNavBar";
4546
- const defaultProps$1f = {
4543
+ const defaultProps$1e = {
4547
4544
  ...ComponentDefaults,
4548
4545
  position: "center",
4549
4546
  transition: "",
@@ -4596,7 +4593,7 @@ const Popup = (props) => {
4596
4593
  afterShow,
4597
4594
  afterClose,
4598
4595
  onClick
4599
- } = { ...defaultProps$1f, ...props };
4596
+ } = { ...defaultProps$1e, ...props };
4600
4597
  let innerIndex = zIndex || _zIndex;
4601
4598
  const [index, setIndex] = useState(innerIndex);
4602
4599
  const [innerVisible, setInnerVisible] = useState(visible);
@@ -4738,7 +4735,7 @@ const Popup = (props) => {
4738
4735
  };
4739
4736
  Popup.displayName = "NutPopup";
4740
4737
  const OffsetContext = createContext(20);
4741
- const defaultProps$1e = {
4738
+ const defaultProps$1d = {
4742
4739
  ...ComponentDefaults,
4743
4740
  position: "left",
4744
4741
  width: "80%"
@@ -4756,7 +4753,7 @@ const SideNavBar = (props) => {
4756
4753
  indent,
4757
4754
  ...rest
4758
4755
  } = {
4759
- ...defaultProps$1e,
4756
+ ...defaultProps$1d,
4760
4757
  ...props
4761
4758
  };
4762
4759
  const innerIndent = indent ? Number(indent) : 20;
@@ -4814,13 +4811,13 @@ const SideNavBarItem = (props) => {
4814
4811
  title
4815
4812
  );
4816
4813
  };
4817
- const defaultProps$1d = {
4814
+ const defaultProps$1c = {
4818
4815
  open: true
4819
4816
  };
4820
4817
  const SubSideNavBar = (props) => {
4821
4818
  const classPrefix2 = "nut-subsidenavbar";
4822
4819
  const { title, value, children, onClick, open: open2, ...rest } = {
4823
- ...defaultProps$1d,
4820
+ ...defaultProps$1c,
4824
4821
  ...props
4825
4822
  };
4826
4823
  const [subShow, setSubShow] = useState(open2);
@@ -4898,7 +4895,7 @@ function usePropsValue({
4898
4895
  );
4899
4896
  return [stateRef.current, setState];
4900
4897
  }
4901
- const defaultProps$1c = {
4898
+ const defaultProps$1b = {
4902
4899
  ...ComponentDefaults,
4903
4900
  value: "",
4904
4901
  dot: false,
@@ -4923,7 +4920,7 @@ const Badge = (props) => {
4923
4920
  color,
4924
4921
  fill
4925
4922
  } = {
4926
- ...defaultProps$1c,
4923
+ ...defaultProps$1b,
4927
4924
  ...props
4928
4925
  };
4929
4926
  const classPrefix2 = "nut-badge";
@@ -4977,7 +4974,7 @@ const Badge = (props) => {
4977
4974
  };
4978
4975
  Badge.displayName = "NutBadge";
4979
4976
  const TabbarContext = React__default.createContext(null);
4980
- const defaultProps$1b = {
4977
+ const defaultProps$1a = {
4981
4978
  ...ComponentDefaults,
4982
4979
  title: "",
4983
4980
  icon: null,
@@ -5003,7 +5000,7 @@ const TabbarItem = (props) => {
5003
5000
  index,
5004
5001
  ...rest
5005
5002
  } = {
5006
- ...defaultProps$1b,
5003
+ ...defaultProps$1a,
5007
5004
  ...props
5008
5005
  };
5009
5006
  const active = index === (ctx == null ? void 0 : ctx.selectIndex);
@@ -5041,7 +5038,7 @@ const TabbarItem = (props) => {
5041
5038
  icon ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React__default.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React__default.createElement("div", { className: titleClass }, title))
5042
5039
  );
5043
5040
  };
5044
- const defaultProps$1a = {
5041
+ const defaultProps$19 = {
5045
5042
  ...ComponentDefaults,
5046
5043
  defaultValue: 0,
5047
5044
  fixed: false,
@@ -5064,7 +5061,7 @@ const Tabbar = (props) => {
5064
5061
  style,
5065
5062
  onSwitch
5066
5063
  } = {
5067
- ...defaultProps$1a,
5064
+ ...defaultProps$19,
5068
5065
  ...props
5069
5066
  };
5070
5067
  const classPrefix2 = "nut-tabbar";
@@ -5106,14 +5103,14 @@ const Tabbar = (props) => {
5106
5103
  };
5107
5104
  Tabbar.displayName = "NutTabbar";
5108
5105
  Tabbar.Item = TabbarItem;
5109
- const defaultProps$19 = {
5106
+ const defaultProps$18 = {
5110
5107
  title: "",
5111
5108
  value: "",
5112
5109
  disabled: false
5113
5110
  };
5114
5111
  const TabPane = (props) => {
5115
5112
  const { children, autoHeightClassName, className, disabled } = {
5116
- ...defaultProps$19,
5113
+ ...defaultProps$18,
5117
5114
  ...props
5118
5115
  };
5119
5116
  const classPrefix2 = "nut-tabpane";
@@ -5154,7 +5151,7 @@ function useUuid() {
5154
5151
  const idRef = useRef(uniqueId());
5155
5152
  return idRef.current;
5156
5153
  }
5157
- const defaultProps$18 = {
5154
+ const defaultProps$17 = {
5158
5155
  ...ComponentDefaults,
5159
5156
  tabStyle: {},
5160
5157
  activeColor: "",
@@ -5184,7 +5181,7 @@ const Tabs = (props) => {
5184
5181
  defaultValue: outerDefaultValue,
5185
5182
  ...rest
5186
5183
  } = {
5187
- ...defaultProps$18,
5184
+ ...defaultProps$17,
5188
5185
  ...props
5189
5186
  };
5190
5187
  const uuid = useUuid();
@@ -5407,7 +5404,7 @@ const Tabs = (props) => {
5407
5404
  };
5408
5405
  Tabs.displayName = "NutTabs";
5409
5406
  Tabs.TabPane = TabPane;
5410
- const defaultProps$17 = {
5407
+ const defaultProps$16 = {
5411
5408
  type: "custom",
5412
5409
  existList: [],
5413
5410
  defaultIcon: null,
@@ -5426,7 +5423,7 @@ const ExistRender = (props) => {
5426
5423
  onSelect,
5427
5424
  onSwitch,
5428
5425
  ...rest
5429
- } = { ...defaultProps$17, ...props };
5426
+ } = { ...defaultProps$16, ...props };
5430
5427
  const classPrefix2 = "nut-address";
5431
5428
  const selectedExist = (item) => {
5432
5429
  existList.forEach((list, index) => {
@@ -5588,7 +5585,7 @@ class Tree {
5588
5585
  return pathNodes;
5589
5586
  }
5590
5587
  }
5591
- const defaultProps$16 = {
5588
+ const defaultProps$15 = {
5592
5589
  ...ComponentDefaults,
5593
5590
  activeColor: "",
5594
5591
  activeIcon: "checklist",
@@ -5633,7 +5630,7 @@ const InternalCascader = (props, ref) => {
5633
5630
  onClose,
5634
5631
  onChange,
5635
5632
  onPathChange
5636
- } = { ...defaultProps$16, ...props };
5633
+ } = { ...defaultProps$15, ...props };
5637
5634
  const [tabvalue, setTabvalue] = useState("c1");
5638
5635
  const [optionsData, setOptionsData] = useState([]);
5639
5636
  const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
@@ -5941,7 +5938,7 @@ const InternalCascader = (props, ref) => {
5941
5938
  };
5942
5939
  const Cascader = React__default.forwardRef(InternalCascader);
5943
5940
  Cascader.displayName = "NutCascader";
5944
- const defaultProps$15 = {
5941
+ const defaultProps$14 = {
5945
5942
  ...ComponentDefaults,
5946
5943
  visible: false,
5947
5944
  type: "custom",
@@ -5968,7 +5965,7 @@ const CustomRender = (props) => {
5968
5965
  onPathChange,
5969
5966
  ...rest
5970
5967
  } = {
5971
- ...defaultProps$15,
5968
+ ...defaultProps$14,
5972
5969
  ...props
5973
5970
  };
5974
5971
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, type4 === "custom" && /* @__PURE__ */ React__default.createElement(
@@ -5993,7 +5990,7 @@ const CustomRender = (props) => {
5993
5990
  }
5994
5991
  ));
5995
5992
  };
5996
- const defaultProps$14 = {
5993
+ const defaultProps$13 = {
5997
5994
  ...ComponentDefaults,
5998
5995
  defaultValue: [],
5999
5996
  type: "custom",
@@ -6035,7 +6032,7 @@ const InternalAddress = (props, ref) => {
6035
6032
  onSwitch,
6036
6033
  ...rest
6037
6034
  } = {
6038
- ...defaultProps$14,
6035
+ ...defaultProps$13,
6039
6036
  ...props
6040
6037
  };
6041
6038
  const classPrefix2 = "nut-address";
@@ -6373,7 +6370,7 @@ const isEnd = (day, days) => {
6373
6370
  const isStartAndEnd = (days) => {
6374
6371
  return days.length >= 2 && Utils.isEqual(days[0], days[1]);
6375
6372
  };
6376
- const defaultProps$13 = {
6373
+ const defaultProps$12 = {
6377
6374
  ...ComponentDefaults,
6378
6375
  type: "single",
6379
6376
  autoBackfill: false,
@@ -6434,7 +6431,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6434
6431
  onUpdate,
6435
6432
  onDayClick,
6436
6433
  onPageChange
6437
- } = { ...defaultProps$13, ...props };
6434
+ } = { ...defaultProps$12, ...props };
6438
6435
  const weekdays = locale.calendaritem.weekdays;
6439
6436
  const weeks = [
6440
6437
  ...weekdays.slice(firstDayOfWeek, 7),
@@ -6730,8 +6727,10 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6730
6727
  };
6731
6728
  useEffect(() => {
6732
6729
  setCurrentDate(resetDefaultValue() || []);
6733
- popup && resetRender();
6734
6730
  }, [defaultValue]);
6731
+ useEffect(() => {
6732
+ popup && resetRender();
6733
+ }, [currentDate]);
6735
6734
  const scrollToDate = (date4) => {
6736
6735
  if (Utils.compareDate(date4, propStartDate)) {
6737
6736
  date4 = propStartDate;
@@ -6982,7 +6981,7 @@ const CalendarItem = React__default.forwardRef((props, ref) => {
6982
6981
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
6983
6982
  });
6984
6983
  CalendarItem.displayName = "NutCalendarItem";
6985
- const defaultProps$12 = {
6984
+ const defaultProps$11 = {
6986
6985
  ...ComponentDefaults,
6987
6986
  type: "single",
6988
6987
  autoBackfill: false,
@@ -7045,7 +7044,7 @@ const Calendar = React__default.forwardRef((props, ref) => {
7045
7044
  onConfirm,
7046
7045
  onDayClick,
7047
7046
  onPageChange
7048
- } = { ...defaultProps$12, ...props };
7047
+ } = { ...defaultProps$11, ...props };
7049
7048
  const calendarRef = useRef(null);
7050
7049
  const close2 = () => {
7051
7050
  onClose && onClose();
@@ -7194,7 +7193,7 @@ const getCurrentWeekDays = (day, firstDayOfWeek) => {
7194
7193
  )
7195
7194
  ];
7196
7195
  };
7197
- const defaultProps$11 = {
7196
+ const defaultProps$10 = {
7198
7197
  ...ComponentDefaults,
7199
7198
  type: "single",
7200
7199
  firstDayOfWeek: 0
@@ -7218,7 +7217,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
7218
7217
  onDayClick,
7219
7218
  onPageChange,
7220
7219
  onChange
7221
- } = { ...defaultProps$11, ...props };
7220
+ } = { ...defaultProps$10, ...props };
7222
7221
  const [month, setMonth] = useState(() => {
7223
7222
  let date4 = new Date(Date.now());
7224
7223
  const val = value || defaultValue;
@@ -7522,7 +7521,7 @@ const CalendarCard = React__default.forwardRef((props, ref) => {
7522
7521
  });
7523
7522
  CalendarCard.displayName = "NutCalendarCard";
7524
7523
  const CheckboxGroupContext = createContext(null);
7525
- const defaultProps$10 = {
7524
+ const defaultProps$$ = {
7526
7525
  max: void 0,
7527
7526
  min: void 0,
7528
7527
  list: false,
@@ -7542,17 +7541,17 @@ const CheckboxGroup = React__default.forwardRef(
7542
7541
  className,
7543
7542
  disabled,
7544
7543
  list,
7545
- onChange,
7546
7544
  value,
7547
7545
  defaultValue,
7548
7546
  max,
7549
7547
  min,
7550
- onLimit,
7551
7548
  labelPosition,
7552
7549
  direction,
7553
7550
  options,
7551
+ onChange,
7552
+ onLimit,
7554
7553
  ...rest
7555
- } = { ...defaultProps$10, ...props };
7554
+ } = { ...defaultProps$$, ...props };
7556
7555
  useImperativeHandle(ref, () => ({
7557
7556
  toggle(state) {
7558
7557
  if (state === false) {
@@ -7579,8 +7578,8 @@ const CheckboxGroup = React__default.forwardRef(
7579
7578
  }
7580
7579
  }));
7581
7580
  const [_value, setValue] = usePropsValue({
7582
- value: props.value,
7583
- defaultValue: props.defaultValue,
7581
+ value,
7582
+ defaultValue,
7584
7583
  finalValue: [],
7585
7584
  onChange
7586
7585
  });
@@ -7632,7 +7631,7 @@ const CheckboxGroup = React__default.forwardRef(
7632
7631
  className: classNames(
7633
7632
  classPrefix$j,
7634
7633
  {
7635
- [`nut-checkboxgroup-${props.direction}`]: props.direction,
7634
+ [`nut-checkboxgroup-${direction}`]: direction,
7636
7635
  [`nut-checkboxgroup-list`]: list
7637
7636
  },
7638
7637
  className
@@ -7644,9 +7643,8 @@ const CheckboxGroup = React__default.forwardRef(
7644
7643
  );
7645
7644
  }
7646
7645
  );
7647
- CheckboxGroup.defaultProps = defaultProps$10;
7648
7646
  CheckboxGroup.displayName = "NutCheckboxGroup";
7649
- const defaultProps$$ = {
7647
+ const defaultProps$_ = {
7650
7648
  ...ComponentDefaults,
7651
7649
  disabled: false,
7652
7650
  shape: "round",
@@ -7660,7 +7658,7 @@ const defaultProps$$ = {
7660
7658
  const classPrefix$i = "nut-checkbox";
7661
7659
  const Checkbox = (props) => {
7662
7660
  const { children } = {
7663
- ...defaultProps$$,
7661
+ ...defaultProps$_,
7664
7662
  ...props
7665
7663
  };
7666
7664
  const {
@@ -8041,7 +8039,7 @@ function useRefs() {
8041
8039
  }, []);
8042
8040
  return [refs.current, setRefs, reset];
8043
8041
  }
8044
- const defaultProps$_ = {
8042
+ const defaultProps$Z = {
8045
8043
  ...ComponentDefaults,
8046
8044
  visible: false,
8047
8045
  title: "",
@@ -8072,7 +8070,7 @@ const InternalPicker = (props, ref) => {
8072
8070
  afterClose,
8073
8071
  onChange,
8074
8072
  ...rest
8075
- } = { ...defaultProps$_, ...props };
8073
+ } = { ...defaultProps$Z, ...props };
8076
8074
  const classPrefix2 = "nut-picker";
8077
8075
  const classes = classNames(classPrefix2, className);
8078
8076
  const [selectedValue, setSelectedValue] = usePropsValue({
@@ -8384,7 +8382,7 @@ const padZero = (num, targetLength = 2) => {
8384
8382
  return str;
8385
8383
  };
8386
8384
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
8387
- const defaultProps$Z = {
8385
+ const defaultProps$Y = {
8388
8386
  ...ComponentDefaults,
8389
8387
  visible: false,
8390
8388
  title: "",
@@ -8417,7 +8415,7 @@ const DatePicker = (props) => {
8417
8415
  style,
8418
8416
  ...rest
8419
8417
  } = {
8420
- ...defaultProps$Z,
8418
+ ...defaultProps$Y,
8421
8419
  ...props
8422
8420
  };
8423
8421
  const { locale } = useConfig$1();
@@ -8541,7 +8539,7 @@ const DatePicker = (props) => {
8541
8539
  if (!isEqual) {
8542
8540
  setSelectedDate(formatValue(newDate));
8543
8541
  }
8544
- props.onChange && props.onChange(
8542
+ onChange == null ? void 0 : onChange(
8545
8543
  selectedOptions,
8546
8544
  [
8547
8545
  String(newDate.getFullYear()),
@@ -8638,8 +8636,8 @@ const DatePicker = (props) => {
8638
8636
  }
8639
8637
  pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
8640
8638
  setPickerValue([...pickerValue]);
8641
- if (props.filter && props.filter(type22, arr)) {
8642
- return props.filter(type22, arr);
8639
+ if (filter == null ? void 0 : filter(type22, arr)) {
8640
+ return filter == null ? void 0 : filter(type22, arr);
8643
8641
  }
8644
8642
  return arr;
8645
8643
  };
@@ -8706,7 +8704,6 @@ const DatePicker = (props) => {
8706
8704
  )
8707
8705
  );
8708
8706
  };
8709
- DatePicker.defaultProps = defaultProps$Z;
8710
8707
  DatePicker.displayName = "NutDatePicker";
8711
8708
  const Context = createContext({});
8712
8709
  function _extends() {
@@ -9943,7 +9940,7 @@ const useForm = (form) => {
9943
9940
  }
9944
9941
  return [formRef.current];
9945
9942
  };
9946
- const defaultProps$Y = {
9943
+ const defaultProps$X = {
9947
9944
  ...ComponentDefaults,
9948
9945
  labelPosition: "right",
9949
9946
  starPosition: "left",
@@ -9974,7 +9971,7 @@ const Form = React__default.forwardRef(
9974
9971
  starPosition,
9975
9972
  form
9976
9973
  } = {
9977
- ...defaultProps$Y,
9974
+ ...defaultProps$X,
9978
9975
  ...props
9979
9976
  };
9980
9977
  let formInstance;
@@ -10030,7 +10027,7 @@ function isForwardRefComponent(component) {
10030
10027
  }
10031
10028
  ).$$typeof === component.type.$$typeof;
10032
10029
  }
10033
- const defaultProps$X = {
10030
+ const defaultProps$W = {
10034
10031
  ...ComponentDefaults,
10035
10032
  required: false,
10036
10033
  name: "",
@@ -10126,7 +10123,7 @@ const _FormItem = class _FormItem extends React__default.Component {
10126
10123
  style,
10127
10124
  errorMessageAlign
10128
10125
  } = {
10129
- ...defaultProps$X,
10126
+ ...defaultProps$W,
10130
10127
  ...this.props
10131
10128
  };
10132
10129
  const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
@@ -10195,7 +10192,7 @@ const _FormItem = class _FormItem extends React__default.Component {
10195
10192
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
10196
10193
  }
10197
10194
  };
10198
- _FormItem.defaultProps = defaultProps$X;
10195
+ _FormItem.defaultProps = defaultProps$W;
10199
10196
  _FormItem.contextType = Context;
10200
10197
  let FormItem = _FormItem;
10201
10198
  const InnerForm = Form;
@@ -10225,7 +10222,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
10225
10222
  const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
10226
10223
  return value.replace(regExp, "");
10227
10224
  }
10228
- const defaultProps$W = {
10225
+ const defaultProps$V = {
10229
10226
  ...ComponentDefaults,
10230
10227
  type: "text",
10231
10228
  name: "",
@@ -10270,7 +10267,7 @@ const Input = forwardRef(
10270
10267
  value: _value,
10271
10268
  ...rest
10272
10269
  } = {
10273
- ...defaultProps$W,
10270
+ ...defaultProps$V,
10274
10271
  ...props
10275
10272
  };
10276
10273
  const [value, setValue] = usePropsValue({
@@ -10421,7 +10418,7 @@ const Input = forwardRef(
10421
10418
  }
10422
10419
  );
10423
10420
  Input.displayName = "NutInput";
10424
- const defaultProps$V = {
10421
+ const defaultProps$U = {
10425
10422
  ...ComponentDefaults,
10426
10423
  disabled: false,
10427
10424
  readOnly: false,
@@ -10459,7 +10456,7 @@ const InputNumber = (props) => {
10459
10456
  onChange,
10460
10457
  ...restProps
10461
10458
  } = {
10462
- ...defaultProps$V,
10459
+ ...defaultProps$U,
10463
10460
  ...props
10464
10461
  };
10465
10462
  const classes = classNames(classPrefix$h, className, {
@@ -10612,7 +10609,7 @@ const InputNumber = (props) => {
10612
10609
  )));
10613
10610
  };
10614
10611
  InputNumber.displayName = "NutInputNumber";
10615
- const defaultProps$U = {
10612
+ const defaultProps$T = {
10616
10613
  ...ComponentDefaults,
10617
10614
  columns: 1,
10618
10615
  direction: "down",
@@ -10643,7 +10640,7 @@ const MenuItem = forwardRef((props, ref) => {
10643
10640
  parent,
10644
10641
  index
10645
10642
  } = {
10646
- ...defaultProps$U,
10643
+ ...defaultProps$T,
10647
10644
  ...props
10648
10645
  };
10649
10646
  const [showPopup, setShowPopup] = useState(show2);
@@ -10824,7 +10821,7 @@ const MenuItem = forwardRef((props, ref) => {
10824
10821
  ));
10825
10822
  });
10826
10823
  MenuItem.displayName = "NutMenuItem";
10827
- const defaultProps$T = {
10824
+ const defaultProps$S = {
10828
10825
  ...ComponentDefaults,
10829
10826
  activeColor: "",
10830
10827
  closeOnOverlayClick: true,
@@ -10851,7 +10848,7 @@ const Menu = (props) => {
10851
10848
  onOpen,
10852
10849
  ...rest
10853
10850
  } = {
10854
- ...defaultProps$T,
10851
+ ...defaultProps$S,
10855
10852
  ...props
10856
10853
  };
10857
10854
  const menuRef = useRef(null);
@@ -10930,14 +10927,10 @@ const Menu = (props) => {
10930
10927
  return /* @__PURE__ */ React__default.createElement(
10931
10928
  "div",
10932
10929
  {
10933
- className: classNames(
10934
- "nut-menu-title ",
10935
- {
10936
- active: showMenuItem[index],
10937
- disabled
10938
- },
10939
- className
10940
- ),
10930
+ className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
10931
+ active: showMenuItem[index],
10932
+ disabled
10933
+ }),
10941
10934
  style: { color: showMenuItem[index] ? activeColor : "" },
10942
10935
  key: index,
10943
10936
  onClick: () => {
@@ -11114,7 +11107,7 @@ const NumberKeyboard = (props) => {
11114
11107
  };
11115
11108
  NumberKeyboard.displayName = "NutNumberKeyboard";
11116
11109
  const RadioContext = React__default.createContext(null);
11117
- const defaultProps$S = {
11110
+ const defaultProps$R = {
11118
11111
  labelPosition: "right",
11119
11112
  onChange: (value) => {
11120
11113
  },
@@ -11136,7 +11129,7 @@ const RadioGroup = React__default.forwardRef(
11136
11129
  options,
11137
11130
  disabled,
11138
11131
  ...rest
11139
- } = { ...defaultProps$S, ...props };
11132
+ } = { ...defaultProps$R, ...props };
11140
11133
  const [val2State, setVal2State] = usePropsValue({
11141
11134
  defaultValue: props.defaultValue,
11142
11135
  value: props.value,
@@ -11193,9 +11186,8 @@ const RadioGroup = React__default.forwardRef(
11193
11186
  );
11194
11187
  }
11195
11188
  );
11196
- RadioGroup.defaultProps = defaultProps$S;
11197
11189
  RadioGroup.displayName = "NutRadioGroup";
11198
- const defaultProps$R = {
11190
+ const defaultProps$Q = {
11199
11191
  ...ComponentDefaults,
11200
11192
  disabled: false,
11201
11193
  shape: "round",
@@ -11221,7 +11213,7 @@ const Radio = (props) => {
11221
11213
  onChange,
11222
11214
  ...others
11223
11215
  } = {
11224
- ...defaultProps$R,
11216
+ ...defaultProps$Q,
11225
11217
  ...props
11226
11218
  };
11227
11219
  let { labelPosition, disabled, ...rest } = others;
@@ -11321,10 +11313,9 @@ const Radio = (props) => {
11321
11313
  renderRadioItem()
11322
11314
  );
11323
11315
  };
11324
- Radio.defaultProps = defaultProps$R;
11325
11316
  Radio.displayName = "NutRadio";
11326
11317
  Radio.Group = RadioGroup;
11327
- const defaultProps$Q = {
11318
+ const defaultProps$P = {
11328
11319
  ...ComponentDefaults,
11329
11320
  range: false,
11330
11321
  min: 0,
@@ -11353,7 +11344,7 @@ const Range = (props) => {
11353
11344
  step,
11354
11345
  value,
11355
11346
  defaultValue
11356
- } = { ...defaultProps$Q, ...props };
11347
+ } = { ...defaultProps$P, ...props };
11357
11348
  const classPrefix2 = "nut-range";
11358
11349
  const [buttonIndex, setButtonIndex] = useState(0);
11359
11350
  const [dragStatus, setDragStatus] = useState("start");
@@ -11635,7 +11626,7 @@ const Range = (props) => {
11635
11626
  ))), maxDescription !== null && /* @__PURE__ */ React__default.createElement("div", { className: "max" }, maxDescription || max));
11636
11627
  };
11637
11628
  Range.displayName = "NutRange";
11638
- const defaultProps$P = {
11629
+ const defaultProps$O = {
11639
11630
  ...ComponentDefaults,
11640
11631
  count: 5,
11641
11632
  min: 0,
@@ -11663,7 +11654,7 @@ const Rate = (props) => {
11663
11654
  onChange,
11664
11655
  onTouchEnd
11665
11656
  } = {
11666
- ...defaultProps$P,
11657
+ ...defaultProps$O,
11667
11658
  ...props
11668
11659
  };
11669
11660
  const classPrefix2 = "nut-rate";
@@ -11820,7 +11811,7 @@ const Rate = (props) => {
11820
11811
  );
11821
11812
  };
11822
11813
  Rate.displayName = "NutRate";
11823
- const defaultProps$O = {
11814
+ const defaultProps$N = {
11824
11815
  ...ComponentDefaults,
11825
11816
  placeholder: "",
11826
11817
  shape: "square",
@@ -11862,7 +11853,7 @@ const SearchBar = (props) => {
11862
11853
  onSearch,
11863
11854
  onInputClick
11864
11855
  } = {
11865
- ...defaultProps$O,
11856
+ ...defaultProps$N,
11866
11857
  ...props
11867
11858
  };
11868
11859
  const [value, setValue] = useState(() => outerValue);
@@ -11979,7 +11970,7 @@ const SearchBar = (props) => {
11979
11970
  );
11980
11971
  };
11981
11972
  SearchBar.displayName = "NutSearchBar";
11982
- const defaultProps$N = {
11973
+ const defaultProps$M = {
11983
11974
  ...ComponentDefaults,
11984
11975
  value: "",
11985
11976
  visible: false,
@@ -12016,7 +12007,7 @@ const InternalShortPassword = (props, ref) => {
12016
12007
  onCloseIconClick,
12017
12008
  ...rest
12018
12009
  } = {
12019
- ...defaultProps$N,
12010
+ ...defaultProps$M,
12020
12011
  ...props
12021
12012
  };
12022
12013
  const classPrefix2 = "nut-shortpassword";
@@ -12076,7 +12067,7 @@ const InternalShortPassword = (props, ref) => {
12076
12067
  );
12077
12068
  };
12078
12069
  const ShortPassword = React__default.forwardRef(InternalShortPassword);
12079
- const defaultProps$M = {
12070
+ const defaultProps$L = {
12080
12071
  ...ComponentDefaults,
12081
12072
  canvasId: "spcanvas",
12082
12073
  type: "png",
@@ -12095,7 +12086,7 @@ const InternalSignature = (props, ref) => {
12095
12086
  onClear,
12096
12087
  ...rest
12097
12088
  } = {
12098
- ...defaultProps$M,
12089
+ ...defaultProps$L,
12099
12090
  ...props
12100
12091
  };
12101
12092
  const classPrefix2 = `nut-signature`;
@@ -12252,7 +12243,7 @@ const Signature = React__default.forwardRef(
12252
12243
  InternalSignature
12253
12244
  );
12254
12245
  Signature.displayName = "NutSignature";
12255
- const defaultProps$L = {
12246
+ const defaultProps$K = {
12256
12247
  ...ComponentDefaults,
12257
12248
  disabled: false,
12258
12249
  activeText: "",
@@ -12270,7 +12261,7 @@ const Switch = (props) => {
12270
12261
  onChange,
12271
12262
  ...rest
12272
12263
  } = {
12273
- ...defaultProps$L,
12264
+ ...defaultProps$K,
12274
12265
  ...props
12275
12266
  };
12276
12267
  const classPrefix2 = "nut-switch";
@@ -12298,7 +12289,7 @@ const Switch = (props) => {
12298
12289
  );
12299
12290
  };
12300
12291
  Switch.displayName = "NutSwitch";
12301
- const defaultProps$K = {
12292
+ const defaultProps$J = {
12302
12293
  ...ComponentDefaults,
12303
12294
  defaultValue: "",
12304
12295
  showCount: false,
@@ -12326,7 +12317,7 @@ const TextArea = (props) => {
12326
12317
  onBlur,
12327
12318
  onFocus,
12328
12319
  ...rest
12329
- } = { ...defaultProps$K, ...props };
12320
+ } = { ...defaultProps$J, ...props };
12330
12321
  const classPrefix2 = "nut-textarea";
12331
12322
  const compositionRef = useRef(false);
12332
12323
  const format2 = (value2) => {
@@ -12556,7 +12547,7 @@ class FileItem {
12556
12547
  this.formData = {};
12557
12548
  }
12558
12549
  }
12559
- const defaultProps$J = {
12550
+ const defaultProps$I = {
12560
12551
  ...ComponentDefaults,
12561
12552
  percent: 0,
12562
12553
  showText: false,
@@ -12580,7 +12571,7 @@ const Progress = (props) => {
12580
12571
  delay,
12581
12572
  ...rest
12582
12573
  } = {
12583
- ...defaultProps$J,
12574
+ ...defaultProps$I,
12584
12575
  ...props
12585
12576
  };
12586
12577
  const classPrefix2 = "nut-progress";
@@ -12789,7 +12780,7 @@ const Preview = ({
12789
12780
  );
12790
12781
  }));
12791
12782
  };
12792
- const defaultProps$I = {
12783
+ const defaultProps$H = {
12793
12784
  ...ComponentDefaults,
12794
12785
  url: "",
12795
12786
  maxCount: 1,
@@ -12864,7 +12855,7 @@ const InternalUploader = (props, ref) => {
12864
12855
  beforeXhrUpload,
12865
12856
  beforeDelete,
12866
12857
  ...restProps
12867
- } = { ...defaultProps$I, ...props };
12858
+ } = { ...defaultProps$H, ...props };
12868
12859
  const [fileList, setFileList] = usePropsValue({
12869
12860
  value,
12870
12861
  defaultValue,
@@ -12885,6 +12876,10 @@ const InternalUploader = (props, ref) => {
12885
12876
  clearUploadQueue();
12886
12877
  }
12887
12878
  }));
12879
+ const fileListRef = useRef([]);
12880
+ useEffect(() => {
12881
+ fileListRef.current = fileList;
12882
+ }, [fileList]);
12888
12883
  const clearUploadQueue = (index = -1) => {
12889
12884
  if (index > -1) {
12890
12885
  uploadQueue.splice(index, 1);
@@ -12964,7 +12959,7 @@ const InternalUploader = (props, ref) => {
12964
12959
  uploadOption.onStart = (option) => {
12965
12960
  clearUploadQueue(index);
12966
12961
  setFileList(
12967
- fileList.map((item) => {
12962
+ fileListRef.current.map((item) => {
12968
12963
  if (item.uid === fileItem.uid) {
12969
12964
  item.status = "ready";
12970
12965
  item.message = locale.uploader.readyUpload;
@@ -12972,23 +12967,23 @@ const InternalUploader = (props, ref) => {
12972
12967
  return item;
12973
12968
  })
12974
12969
  );
12975
- onStart && onStart(option);
12970
+ onStart == null ? void 0 : onStart(option);
12976
12971
  };
12977
12972
  uploadOption.onProgress = (e2, option) => {
12978
12973
  setFileList(
12979
- fileList.map((item) => {
12974
+ fileListRef.current.map((item) => {
12980
12975
  if (item.uid === fileItem.uid) {
12981
12976
  item.status = UPLOADING;
12982
12977
  item.message = locale.uploader.uploading;
12983
12978
  item.percentage = e2.progress;
12984
- onProgress && onProgress({ e: e2, option, percentage: item.percentage });
12979
+ onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
12985
12980
  }
12986
12981
  return item;
12987
12982
  })
12988
12983
  );
12989
12984
  };
12990
12985
  uploadOption.onSuccess = (responseText, option) => {
12991
- const list = fileList.map((item) => {
12986
+ const list = fileListRef.current.map((item) => {
12992
12987
  if (item.uid === fileItem.uid) {
12993
12988
  item.status = SUCCESS;
12994
12989
  item.message = locale.uploader.success;
@@ -13004,7 +12999,7 @@ const InternalUploader = (props, ref) => {
13004
12999
  });
13005
13000
  };
13006
13001
  uploadOption.onFailure = (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 = ERROR;
13010
13005
  item.message = locale.uploader.error;
@@ -13066,8 +13061,8 @@ const InternalUploader = (props, ref) => {
13066
13061
  if (preview) {
13067
13062
  fileItem.url = fileType === "video" ? file.thumbTempFilePath : filepath;
13068
13063
  }
13069
- setFileList([...fileList, fileItem]);
13070
13064
  executeUpload(fileItem, index);
13065
+ setFileList([...fileList, fileItem]);
13071
13066
  });
13072
13067
  };
13073
13068
  const filterFiles = (files) => {
@@ -13081,9 +13076,7 @@ const InternalUploader = (props, ref) => {
13081
13076
  }
13082
13077
  return true;
13083
13078
  });
13084
- if (oversizes.length) {
13085
- onOversize && onOversize(files);
13086
- }
13079
+ oversizes.length && (onOversize == null ? void 0 : onOversize(files));
13087
13080
  const currentFileLength = filterFile.length + fileList.length;
13088
13081
  if (currentFileLength > maximum) {
13089
13082
  filterFile.splice(filterFile.length - (currentFileLength - maximum));
@@ -13153,7 +13146,7 @@ const InternalUploader = (props, ref) => {
13153
13146
  };
13154
13147
  const Uploader = React__default.forwardRef(InternalUploader);
13155
13148
  Uploader.displayName = "NutUploader";
13156
- const defaultProps$H = {
13149
+ const defaultProps$G = {
13157
13150
  ...ComponentDefaults,
13158
13151
  visible: false,
13159
13152
  description: "",
@@ -13179,7 +13172,7 @@ const ActionSheet = (props) => {
13179
13172
  className,
13180
13173
  style,
13181
13174
  ...rest
13182
- } = { ...defaultProps$H, ...props };
13175
+ } = { ...defaultProps$G, ...props };
13183
13176
  const classPrefix2 = "nut-actionsheet";
13184
13177
  const cancelActionSheet = () => {
13185
13178
  onCancel && onCancel();
@@ -13317,7 +13310,7 @@ function useParams(args) {
13317
13310
  const params = stateRef.current;
13318
13311
  return { params, setParams };
13319
13312
  }
13320
- const defaultProps$G = {
13313
+ const defaultProps$F = {
13321
13314
  title: "",
13322
13315
  content: "",
13323
13316
  header: "",
@@ -13371,7 +13364,7 @@ const BaseDialog = (props) => {
13371
13364
  beforeClose
13372
13365
  },
13373
13366
  setParams
13374
- } = useParams({ ...defaultProps$G, ...props });
13367
+ } = useParams({ ...defaultProps$F, ...props });
13375
13368
  useCustomEvent(
13376
13369
  id,
13377
13370
  ({ status, options }) => {
@@ -13496,11 +13489,11 @@ function close$1(selector) {
13496
13489
  const path = useCustomEventsPath(selector);
13497
13490
  customEvents.trigger(path, { status: false });
13498
13491
  }
13499
- BaseDialog.defaultProps = defaultProps$G;
13492
+ BaseDialog.defaultProps = defaultProps$F;
13500
13493
  BaseDialog.displayName = "NutDialog";
13501
13494
  BaseDialog.open = open$1;
13502
13495
  BaseDialog.close = close$1;
13503
- const defaultProps$F = {
13496
+ const defaultProps$E = {
13504
13497
  ...ComponentDefaults,
13505
13498
  attract: false,
13506
13499
  direction: void 0,
@@ -13525,7 +13518,7 @@ const Drag = (props) => {
13525
13518
  style,
13526
13519
  ...reset
13527
13520
  } = {
13528
- ...defaultProps$F,
13521
+ ...defaultProps$E,
13529
13522
  ...props
13530
13523
  };
13531
13524
  const classPrefix2 = "nut-drag";
@@ -13638,7 +13631,7 @@ const defaultStatus = {
13638
13631
  error: "https://storage.360buyimg.com/imgtools/f3278d0ebb-0ce360c0-c0ac-11ee-8375-193101bb1a46.png",
13639
13632
  network: "https://storage.360buyimg.com/imgtools/43c30f7e29-0d483d10-c0ac-11ee-bec4-eb4d2a09a51d.png"
13640
13633
  };
13641
- const defaultProps$E = {
13634
+ const defaultProps$D = {
13642
13635
  ...ComponentDefaults,
13643
13636
  title: "",
13644
13637
  description: "",
@@ -13662,7 +13655,7 @@ const Empty = (props) => {
13662
13655
  actions,
13663
13656
  ...rest
13664
13657
  } = {
13665
- ...defaultProps$E,
13658
+ ...defaultProps$D,
13666
13659
  ...props
13667
13660
  };
13668
13661
  const [imgStyle, setImgStyle] = useState({});
@@ -13707,7 +13700,7 @@ const Empty = (props) => {
13707
13700
  })), children);
13708
13701
  };
13709
13702
  Empty.displayName = "NutEmpty";
13710
- const defaultProps$D = {
13703
+ const defaultProps$C = {
13711
13704
  ...ComponentDefaults,
13712
13705
  type: "default",
13713
13706
  hasMore: true,
@@ -13734,7 +13727,7 @@ const InfiniteLoading = (props) => {
13734
13727
  onScroll,
13735
13728
  ...rest
13736
13729
  } = {
13737
- ...defaultProps$D,
13730
+ ...defaultProps$C,
13738
13731
  ...props
13739
13732
  };
13740
13733
  const [isInfiniting, setIsInfiniting] = useState(false);
@@ -13826,6 +13819,7 @@ const InfiniteLoading = (props) => {
13826
13819
  return /* @__PURE__ */ React__default.createElement(
13827
13820
  ScrollView,
13828
13821
  {
13822
+ ...rest,
13829
13823
  className: classes,
13830
13824
  scrollY: true,
13831
13825
  id: "scroller",
@@ -13835,8 +13829,7 @@ const InfiniteLoading = (props) => {
13835
13829
  onScrollToLower: lower,
13836
13830
  onTouchStart: touchStart,
13837
13831
  onTouchMove: touchMove,
13838
- onTouchEnd: touchEnd,
13839
- ...rest
13832
+ onTouchEnd: touchEnd
13840
13833
  },
13841
13834
  /* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-top", ref: refreshTop, style: getStyle() }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-top-tips" }, pullingText || locale.infiniteloading.pullRefreshText)),
13842
13835
  /* @__PURE__ */ React__default.createElement("div", { className: "nut-infinite-container" }, children),
@@ -13848,7 +13841,7 @@ const loadingMap = {
13848
13841
  circular: D$5,
13849
13842
  spinner: I
13850
13843
  };
13851
- const defaultProps$C = {
13844
+ const defaultProps$B = {
13852
13845
  ...ComponentDefaults,
13853
13846
  // 对比一下,个人感觉还是Loading1比较好看一些,所以用它作为了默认的loading图标
13854
13847
  type: "circular",
@@ -13856,7 +13849,7 @@ const defaultProps$C = {
13856
13849
  };
13857
13850
  const Loading = (props) => {
13858
13851
  const { className, style, children, direction, icon, ...rest } = {
13859
- ...defaultProps$C,
13852
+ ...defaultProps$B,
13860
13853
  ...props
13861
13854
  };
13862
13855
  const classPrefix2 = "nut-loading";
@@ -13876,7 +13869,7 @@ const Loading = (props) => {
13876
13869
  );
13877
13870
  };
13878
13871
  Loading.displayName = "NutLoading";
13879
- const defaultProps$B = {
13872
+ const defaultProps$A = {
13880
13873
  ...ComponentDefaults,
13881
13874
  align: "left",
13882
13875
  direction: "horizontal",
@@ -13919,7 +13912,7 @@ const NoticeBar = (props) => {
13919
13912
  onClick,
13920
13913
  onItemClick
13921
13914
  } = {
13922
- ...defaultProps$B,
13915
+ ...defaultProps$A,
13923
13916
  ...props
13924
13917
  };
13925
13918
  const classPrefix2 = "nut-noticebar";
@@ -14293,7 +14286,7 @@ const NoticeBar = (props) => {
14293
14286
  ) : null);
14294
14287
  };
14295
14288
  NoticeBar.displayName = "NutNoticeBar";
14296
- const defaultProps$A = {
14289
+ const defaultProps$z = {
14297
14290
  ...ComponentDefaults,
14298
14291
  id: "",
14299
14292
  duration: 3e3,
@@ -14319,7 +14312,7 @@ const Notify = (props) => {
14319
14312
  duration,
14320
14313
  onClose,
14321
14314
  onClick
14322
- } = { ...defaultProps$A, ...props };
14315
+ } = { ...defaultProps$z, ...props };
14323
14316
  useCustomEvent(id, (status) => {
14324
14317
  status ? show2() : hide2();
14325
14318
  });
@@ -14390,11 +14383,11 @@ function close(selector) {
14390
14383
  const path = useCustomEventsPath(selector);
14391
14384
  customEvents.trigger(path, false);
14392
14385
  }
14393
- Notify.defaultProps = defaultProps$A;
14386
+ Notify.defaultProps = defaultProps$z;
14394
14387
  Notify.displayName = "NutNotify";
14395
14388
  Notify.open = open;
14396
14389
  Notify.close = close;
14397
- const defaultProps$z = {
14390
+ const defaultProps$y = {
14398
14391
  ...ComponentDefaults,
14399
14392
  list: [],
14400
14393
  theme: "light",
@@ -14439,7 +14432,7 @@ const Popover = (props) => {
14439
14432
  onSelect,
14440
14433
  ...rest
14441
14434
  } = {
14442
- ...defaultProps$z,
14435
+ ...defaultProps$y,
14443
14436
  ...props
14444
14437
  };
14445
14438
  const popoverRef = useRef(null);
@@ -14697,7 +14690,7 @@ function rubberbandIfOutOfBounds(position, min, max, dimension, constant = 0.15)
14697
14690
  return position;
14698
14691
  }
14699
14692
  const sleep = (time) => new Promise((resolve) => setTimeout(resolve, time));
14700
- const defaultProps$y = {
14693
+ const defaultProps$x = {
14701
14694
  ...ComponentDefaults,
14702
14695
  type: "default",
14703
14696
  pullingText: "",
@@ -14717,7 +14710,7 @@ const PullToRefresh = (p) => {
14717
14710
  const { locale } = useConfig$1();
14718
14711
  const touch = useTouch();
14719
14712
  const props = {
14720
- ...defaultProps$y,
14713
+ ...defaultProps$x,
14721
14714
  ...p,
14722
14715
  ...{
14723
14716
  pullingText: p.pullingText || locale.pullToRefresh.pullingText,
@@ -14835,10 +14828,9 @@ const PullToRefresh = (p) => {
14835
14828
  /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-content` }, props.children)
14836
14829
  );
14837
14830
  };
14838
- PullToRefresh.defaultProps = defaultProps$y;
14839
14831
  PullToRefresh.displayName = "NutPullToRefresh";
14840
14832
  const AvatarContext = createContext({});
14841
- const defaultProps$x = {
14833
+ const defaultProps$w = {
14842
14834
  ...ComponentDefaults,
14843
14835
  maxContent: "",
14844
14836
  max: "",
@@ -14849,7 +14841,7 @@ const defaultProps$x = {
14849
14841
  };
14850
14842
  const classPrefix$b = `nut-avatar-group`;
14851
14843
  const AvatarGroup = (props) => {
14852
- const propAvatarGroup = { ...defaultProps$x, ...props };
14844
+ const propAvatarGroup = { ...defaultProps$w, ...props };
14853
14845
  const { className, style, children } = propAvatarGroup;
14854
14846
  const avatarGroupRef = useRef(null);
14855
14847
  const cls = classNames(classPrefix$b, className);
@@ -14860,7 +14852,7 @@ const AvatarGroup = (props) => {
14860
14852
  return /* @__PURE__ */ React__default.createElement(AvatarContext.Provider, { value: parentAvatar }, /* @__PURE__ */ React__default.createElement("div", { className: cls, style, ref: avatarGroupRef }, children));
14861
14853
  };
14862
14854
  AvatarGroup.displayName = "NutAvatarGroup";
14863
- const defaultProps$w = {
14855
+ const defaultProps$v = {
14864
14856
  ...ComponentDefaults,
14865
14857
  size: "",
14866
14858
  shape: "round",
@@ -14890,7 +14882,7 @@ const Avatar = (props) => {
14890
14882
  onError,
14891
14883
  ...rest
14892
14884
  } = {
14893
- ...defaultProps$w,
14885
+ ...defaultProps$v,
14894
14886
  ...props
14895
14887
  };
14896
14888
  const [maxSum, setMaxSum] = useState(0);
@@ -14980,7 +14972,7 @@ const Avatar = (props) => {
14980
14972
  };
14981
14973
  Avatar.displayName = "NutAvatar";
14982
14974
  Avatar.Group = AvatarGroup;
14983
- const defaultProps$v = {
14975
+ const defaultProps$u = {
14984
14976
  ...ComponentDefaults,
14985
14977
  rows: 1,
14986
14978
  animated: false,
@@ -15003,7 +14995,7 @@ const Skeleton = (props) => {
15003
14995
  avatarShape,
15004
14996
  ...rest
15005
14997
  } = {
15006
- ...defaultProps$v,
14998
+ ...defaultProps$u,
15007
14999
  ...props
15008
15000
  };
15009
15001
  const classPrefix2 = "nut-skeleton";
@@ -15049,7 +15041,7 @@ function preventDefault(event, isStopPropagation) {
15049
15041
  event.stopPropagation();
15050
15042
  }
15051
15043
  }
15052
- const defaultProps$u = {
15044
+ const defaultProps$t = {
15053
15045
  ...ComponentDefaults,
15054
15046
  name: ""
15055
15047
  };
@@ -15069,7 +15061,7 @@ const Swipe = forwardRef((props, instanceRef) => {
15069
15061
  };
15070
15062
  nextTick(() => getWidth());
15071
15063
  });
15072
- const { children, className, style } = { ...defaultProps$u, ...props };
15064
+ const { children, className, style } = { ...defaultProps$t, ...props };
15073
15065
  const root2 = useRef();
15074
15066
  const opened = useRef(false);
15075
15067
  const lockClick = useRef(false);
@@ -15229,9 +15221,8 @@ const Swipe = forwardRef((props, instanceRef) => {
15229
15221
  /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left"), children, renderActionContent("right"))
15230
15222
  );
15231
15223
  });
15232
- Swipe.defaultProps = defaultProps$u;
15233
15224
  Swipe.displayName = "NutSwipe";
15234
- const defaultProps$t = {
15225
+ const defaultProps$s = {
15235
15226
  ...ComponentDefaults,
15236
15227
  id: "",
15237
15228
  icon: null,
@@ -15280,7 +15271,7 @@ const Toast = (props) => {
15280
15271
  wordBreak
15281
15272
  },
15282
15273
  setParams
15283
- } = useParams({ ...defaultProps$t, ...props });
15274
+ } = useParams({ ...defaultProps$s, ...props });
15284
15275
  const timer = useRef(-1);
15285
15276
  const [innerVisible, setInnerVisible] = usePropsValue({
15286
15277
  value: visible,
@@ -15388,11 +15379,11 @@ function hide(selector) {
15388
15379
  const path = useCustomEventsPath(selector);
15389
15380
  customEvents.trigger(path, { status: false });
15390
15381
  }
15391
- Toast.defaultProps = defaultProps$t;
15382
+ Toast.defaultProps = defaultProps$s;
15392
15383
  Toast.displayName = "NutToast";
15393
15384
  Toast.show = show;
15394
15385
  Toast.hide = hide;
15395
- const defaultProps$s = {
15386
+ const defaultProps$r = {
15396
15387
  ...ComponentDefaults,
15397
15388
  type: "shake",
15398
15389
  action: "initial",
@@ -15403,7 +15394,7 @@ const defaultProps$s = {
15403
15394
  const classPrefix$8 = `nut-animate`;
15404
15395
  const Animate = (props) => {
15405
15396
  const { className, type: type4, action, loop, onClick, children, ...rest } = {
15406
- ...defaultProps$s,
15397
+ ...defaultProps$r,
15407
15398
  ...props
15408
15399
  };
15409
15400
  const [clicked, setClicked] = useState(false);
@@ -15425,7 +15416,7 @@ const Animate = (props) => {
15425
15416
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animate" }, /* @__PURE__ */ React__default.createElement("div", { className: cls, onClick: handleClick, ...rest }, children));
15426
15417
  };
15427
15418
  Animate.displayName = "NutAnimate";
15428
- const defaultProps$r = {
15419
+ const defaultProps$q = {
15429
15420
  ...ComponentDefaults,
15430
15421
  length: 0,
15431
15422
  value: "",
@@ -15444,7 +15435,7 @@ const CountUp = (props) => {
15444
15435
  style,
15445
15436
  ...reset
15446
15437
  } = {
15447
- ...defaultProps$r,
15438
+ ...defaultProps$q,
15448
15439
  ...props
15449
15440
  };
15450
15441
  const classPrefix2 = "nut-countup";
@@ -15518,9 +15509,9 @@ const CountUp = (props) => {
15518
15509
  );
15519
15510
  })));
15520
15511
  };
15521
- CountUp.defaultProps = defaultProps$r;
15512
+ CountUp.defaultProps = defaultProps$q;
15522
15513
  CountUp.displayName = "NutCountUp";
15523
- const defaultProps$q = {};
15514
+ const defaultProps$p = {};
15524
15515
  const _AnimatingNumbers = class _AnimatingNumbers extends Component {
15525
15516
  constructor(props) {
15526
15517
  super(props);
@@ -15530,12 +15521,12 @@ const _AnimatingNumbers = class _AnimatingNumbers extends Component {
15530
15521
  return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
15531
15522
  }
15532
15523
  };
15533
- _AnimatingNumbers.defaultProps = defaultProps$q;
15524
+ _AnimatingNumbers.defaultProps = defaultProps$p;
15534
15525
  _AnimatingNumbers.displayName = "NutAnimatingNumbers";
15535
15526
  _AnimatingNumbers.CountUp = CountUp;
15536
15527
  let AnimatingNumbers = _AnimatingNumbers;
15537
15528
  AnimatingNumbers.CountUp = CountUp;
15538
- const defaultProps$p = {
15529
+ const defaultProps$o = {
15539
15530
  ...ComponentDefaults,
15540
15531
  className: "",
15541
15532
  url: "",
@@ -15579,7 +15570,7 @@ const Audio = (props) => {
15579
15570
  iconFontClassName,
15580
15571
  ...rest
15581
15572
  } = {
15582
- ...defaultProps$p,
15573
+ ...defaultProps$o,
15583
15574
  ...props
15584
15575
  };
15585
15576
  const [playing, setPlaying] = useState(false);
@@ -15598,19 +15589,19 @@ const Audio = (props) => {
15598
15589
  audioCtx.autoplay = autoplay || false;
15599
15590
  audioCtx.loop = loop || false;
15600
15591
  audioCtx.onPause(() => {
15601
- props.onPause && props.onPause(audioCtx);
15592
+ onPause == null ? void 0 : onPause(audioCtx);
15602
15593
  });
15603
15594
  audioCtx.onEnded(() => {
15604
- if (props.loop) {
15595
+ if (loop) {
15605
15596
  console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
15606
15597
  } else {
15607
- props.onPlayEnd && props.onPlayEnd(audioCtx);
15598
+ onPlayEnd == null ? void 0 : onPlayEnd(audioCtx);
15608
15599
  }
15609
15600
  });
15610
15601
  audioCtx.onPlay(() => {
15611
15602
  const { duration } = audioCtx;
15612
15603
  setTotalSeconds(Math.floor(duration));
15613
- props.onPlay && props.onPlay(audioCtx);
15604
+ onPlay == null ? void 0 : onPlay(audioCtx);
15614
15605
  });
15615
15606
  audioCtx.onCanplay(() => {
15616
15607
  const intervalID = setInterval(function() {
@@ -15620,7 +15611,7 @@ const Audio = (props) => {
15620
15611
  }
15621
15612
  }, 500);
15622
15613
  setIsCanPlay(true);
15623
- props.onCanPlay && props.onCanPlay(audioCtx);
15614
+ onCanPlay == null ? void 0 : onCanPlay(audioCtx);
15624
15615
  });
15625
15616
  audioCtx.onTimeUpdate(() => {
15626
15617
  const time = parseInt(`${audioCtx.currentTime}`);
@@ -15652,14 +15643,14 @@ const Audio = (props) => {
15652
15643
  statusRef.current.currentTime = Math.max(currentTime - 1, 0);
15653
15644
  setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
15654
15645
  audioCtx.seek(statusRef.current.currentTime);
15655
- props.onFastBack && props.onFastBack(audioCtx);
15646
+ onFastBack == null ? void 0 : onFastBack(audioCtx);
15656
15647
  };
15657
15648
  const handleForward = () => {
15658
15649
  const currentTime = Math.floor(audioCtx.currentTime);
15659
15650
  statusRef.current.currentTime = Math.min(currentTime + 1, audioCtx.duration);
15660
15651
  setCurrentDuration(formatSeconds(statusRef.current.currentTime.toString()));
15661
15652
  audioCtx.seek(statusRef.current.currentTime);
15662
- props.onForward && props.onForward(audioCtx);
15653
+ onForward == null ? void 0 : onForward(audioCtx);
15663
15654
  };
15664
15655
  const handleStatusChange = () => {
15665
15656
  setPlaying(!playing);
@@ -15743,9 +15734,8 @@ const Audio = (props) => {
15743
15734
  };
15744
15735
  return /* @__PURE__ */ React__default.createElement("div", { className: `${classPrefix2} ${className}`, style, ...rest }, renderAudio());
15745
15736
  };
15746
- Audio.defaultProps = defaultProps$p;
15747
15737
  Audio.displayName = "NutAudio";
15748
- const defaultProps$o = {
15738
+ const defaultProps$n = {
15749
15739
  ...ComponentDefaults,
15750
15740
  strokeWidth: 5,
15751
15741
  radius: 50,
@@ -15769,7 +15759,7 @@ const CircleProgress = (props) => {
15769
15759
  strokeLinecap,
15770
15760
  ...restProps
15771
15761
  } = {
15772
- ...defaultProps$o,
15762
+ ...defaultProps$n,
15773
15763
  ...props
15774
15764
  };
15775
15765
  const oldValue = useRef(percent);
@@ -15869,7 +15859,7 @@ const collapseContext = {
15869
15859
  rotate: 180
15870
15860
  };
15871
15861
  const CollapseContext = createContext(collapseContext);
15872
- const defaultProps$n = {
15862
+ const defaultProps$m = {
15873
15863
  ...ComponentDefaults,
15874
15864
  title: null,
15875
15865
  name: "",
@@ -15890,7 +15880,7 @@ const CollapseItem = (props) => {
15890
15880
  className,
15891
15881
  ...rest
15892
15882
  } = {
15893
- ...defaultProps$n,
15883
+ ...defaultProps$m,
15894
15884
  ...props
15895
15885
  };
15896
15886
  const classPrefix2 = "nut-collapse-item";
@@ -16003,7 +15993,7 @@ const CollapseItem = (props) => {
16003
15993
  ));
16004
15994
  };
16005
15995
  CollapseItem.displayName = "NutCollapseItem";
16006
- const defaultProps$m = {
15996
+ const defaultProps$l = {
16007
15997
  ...ComponentDefaults,
16008
15998
  defaultActiveName: [],
16009
15999
  accordion: false,
@@ -16022,7 +16012,7 @@ const Collapse = (props) => {
16022
16012
  rotate,
16023
16013
  onChange
16024
16014
  } = {
16025
- ...defaultProps$m,
16015
+ ...defaultProps$l,
16026
16016
  ...props
16027
16017
  };
16028
16018
  const classPrefix2 = "nut-collapse";
@@ -16081,7 +16071,7 @@ const Collapse = (props) => {
16081
16071
  };
16082
16072
  Collapse.displayName = "NutCollapse";
16083
16073
  Collapse.Item = CollapseItem;
16084
- const defaultProps$l = {
16074
+ const defaultProps$k = {
16085
16075
  ...ComponentDefaults,
16086
16076
  paused: false,
16087
16077
  startTime: Date.now(),
@@ -16113,7 +16103,7 @@ const InternalCountDown = (props, ref) => {
16113
16103
  onUpdate,
16114
16104
  children,
16115
16105
  ...rest
16116
- } = { ...defaultProps$l, ...props };
16106
+ } = { ...defaultProps$k, ...props };
16117
16107
  const classPrefix2 = "nut-countdown";
16118
16108
  const [restTimeStamp, setRestTime] = useState(0);
16119
16109
  const stateRef = useRef({
@@ -16318,7 +16308,7 @@ const CountDown = React__default.forwardRef(
16318
16308
  InternalCountDown
16319
16309
  );
16320
16310
  CountDown.displayName = "NutCountDown";
16321
- const defaultProps$k = {
16311
+ const defaultProps$j = {
16322
16312
  ...ComponentDefaults,
16323
16313
  content: "",
16324
16314
  direction: "end",
@@ -16346,7 +16336,7 @@ const Ellipsis = (props) => {
16346
16336
  onClick,
16347
16337
  onChange,
16348
16338
  ...rest
16349
- } = { ...defaultProps$k, ...props };
16339
+ } = { ...defaultProps$j, ...props };
16350
16340
  const maxHeight = useRef(0);
16351
16341
  const [exceeded, setExceeded] = useState(false);
16352
16342
  const [expanded, setExpanded] = useState(false);
@@ -16638,7 +16628,7 @@ const Ellipsis = (props) => {
16638
16628
  ));
16639
16629
  };
16640
16630
  Ellipsis.displayName = "NutEllipsis";
16641
- const defaultProps$j = {
16631
+ const defaultProps$i = {
16642
16632
  total: 3,
16643
16633
  current: 0,
16644
16634
  direction: "horizontal"
@@ -16646,7 +16636,7 @@ const defaultProps$j = {
16646
16636
  const classPrefix$5 = `nut-indicator`;
16647
16637
  const Indicator = (props) => {
16648
16638
  const { total, current, children, className, direction, ...rest } = {
16649
- ...defaultProps$j,
16639
+ ...defaultProps$i,
16650
16640
  ...props
16651
16641
  };
16652
16642
  const classes = classNames({
@@ -16670,7 +16660,7 @@ const Indicator = (props) => {
16670
16660
  return /* @__PURE__ */ React__default.createElement("div", { className: classNames(classPrefix$5, classes, className), ...rest }, renderElement());
16671
16661
  };
16672
16662
  Indicator.displayName = "NutIndicator";
16673
- const defaultProps$i = {
16663
+ const defaultProps$h = {
16674
16664
  direction: "horizontal",
16675
16665
  indicator: false,
16676
16666
  autoPlay: false,
@@ -16695,7 +16685,7 @@ const Swiper = forwardRef((props, ref) => {
16695
16685
  style,
16696
16686
  ...rest
16697
16687
  } = {
16698
- ...defaultProps$i,
16688
+ ...defaultProps$h,
16699
16689
  ...props
16700
16690
  };
16701
16691
  const [current, setCurrent] = useState(defaultValue);
@@ -16806,17 +16796,11 @@ const Swiper = forwardRef((props, ref) => {
16806
16796
  renderIndicator()
16807
16797
  );
16808
16798
  });
16809
- Swiper.defaultProps = defaultProps$i;
16810
16799
  Swiper.displayName = "NutSwiper";
16811
- const defaultProps$h = {
16812
- itemId: "",
16813
- skipHiddenItemLayout: false
16814
- };
16815
16800
  const SwiperItem = (props) => {
16816
16801
  const { children, ...rest } = props;
16817
16802
  return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
16818
16803
  };
16819
- SwiperItem.defaultProps = defaultProps$h;
16820
16804
  SwiperItem.displayName = "NutSwiperItem";
16821
16805
  const InnerSwiper = Swiper;
16822
16806
  InnerSwiper.Item = SwiperItem;
@@ -17548,10 +17532,6 @@ const Table = (props) => {
17548
17532
  });
17549
17533
  };
17550
17534
  const renderBodyTds = (item, rowIndex) => {
17551
- const { rowRender } = item;
17552
- if (rowRender && typeof rowRender === "function") {
17553
- return rowRender(item, rowIndex);
17554
- }
17555
17535
  return sortDataItem().map(([value, render]) => {
17556
17536
  return /* @__PURE__ */ React__default.createElement(
17557
17537
  "div",
@@ -17570,7 +17550,12 @@ const Table = (props) => {
17570
17550
  };
17571
17551
  const renderBodyTrs = () => {
17572
17552
  return innerValue.map((item, index) => {
17573
- return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, renderBodyTds(item, index));
17553
+ const inner = renderBodyTds(item, index);
17554
+ const { rowRender } = item;
17555
+ if (rowRender && typeof rowRender === "function") {
17556
+ return rowRender(item, index, { inner });
17557
+ }
17558
+ return /* @__PURE__ */ React__default.createElement("div", { className: bodyClassPrefix, key: index }, inner);
17574
17559
  });
17575
17560
  };
17576
17561
  return /* @__PURE__ */ React__default.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React__default.createElement(
@@ -18596,6 +18581,8 @@ const defaultProps$1 = {
18596
18581
  gapY: 48,
18597
18582
  width: 120,
18598
18583
  height: 64,
18584
+ startX: 0,
18585
+ startY: 0,
18599
18586
  image: "",
18600
18587
  imageWidth: 120,
18601
18588
  imageHeight: 64,
@@ -18614,6 +18601,8 @@ const WaterMark = (props) => {
18614
18601
  className,
18615
18602
  gapX,
18616
18603
  gapY,
18604
+ startX,
18605
+ startY,
18617
18606
  width,
18618
18607
  height,
18619
18608
  image,
@@ -18694,7 +18683,7 @@ const WaterMark = (props) => {
18694
18683
  const markSize = Number(fontSize) * ratio;
18695
18684
  ctx.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
18696
18685
  ctx.fillStyle = color;
18697
- ctx.fillText(content, 0, 0);
18686
+ ctx.fillText(content, startX, startY);
18698
18687
  ctx.restore();
18699
18688
  setBase64Url(canvas.toDataURL());
18700
18689
  }